diff --git a/.gitignore b/.gitignore index 3ec700458d0a455ed748bb4a6a498a844ae197b8..409232b7376b9c452400727cdac69f42ffdc2c69 100644 --- a/.gitignore +++ b/.gitignore @@ -1,30 +1,33 @@ -.depend -Make.dep -*.o -*.a -*.d -*.i -*~ -.swp -.*.swp -core -.gdbinit -cscope.out -/.config -/.config.old -/.version -/Make.defs -/setenv.sh -/setenv.bat -/nuttx -/nuttx.* -/nuttx-* -/_SAVED_APPS_config -/*.map -/*.elf -/*.srec -/*.bin -/*.ihx -/*.hex -/pcode -/tags +.depend +Make.dep +*.o +*.a +*.d +*.i +*~ +.swp +.*.swp +core +.gdbinit +cscope.out +/.config +/.config.old +/.version +/Make.defs +/setenv.sh +/setenv.bat +/nuttx +/nuttx.* +/nuttx-* +/_SAVED_APPS_config +/*.map +/*.elf +/*.srec +/*.bin +/*.ihx +/*.hex +/pcode +/tags +/.settings/ +/.cproject +/.project diff --git a/COPYING b/COPYING index 1c82d0ca2023919592e284a3d3a57f5e71f3a4f8..a8113ab027c91b871a68a2632d5f69200e4ca81b 100644 --- a/COPYING +++ b/COPYING @@ -93,7 +93,7 @@ has a similar BSD style license: IGMP ^^^^ -IGMP support, if enabled in uIP, adds additional logic by Steve Reynolds: +IGMP support, if enabled, adds additional logic by Steve Reynolds: Copyright (c) 2002 CITEL Technologies Ltd. All rights reserved. diff --git a/ChangeLog b/ChangeLog index dab311760b5513dd0fc682e9f422869f0114ae10..226425ca8fc47c0ea564a2b4feba890d483c1ace 100755 --- a/ChangeLog +++ b/ChangeLog @@ -11586,7 +11586,7 @@ * configs/stm32l476vg-disco: Add support for the STM32L476VG Discovery board. From Dave (2016-03-25). -7.16 2016-xx-xx Gregory Nutt +7.16 2016-06-01 Gregory Nutt * PM: Add activity domain to all PM interfaces and driver callbacks. If CONFIG_PM_NDOMAINS == 1, then the legacy behavior is preserved. If @@ -11615,7 +11615,7 @@ * STM3220G-EVAL: Add support for both the IAR and uVision GCC IDEs From Kha Vo (2016-04-08). * STM32F429I Discovery: Add support for the uVision GCC IDE. From - * Kha Vo (2016-04-08). + Kha Vo (2016-04-08). * libc/signal and include/signal.h: Rename sigset() to signal(). sigset() is the System V function; signal() is the obsoleted POSIX name. These seem to be equivalent. Neither are relevant in modern @@ -11640,7 +11640,7 @@ is interpreted as a packed dual frame exchange. Sebastien Lorquet (2016-04-13). * net/sockets/listen.c and accept.c and include/nuttx/net: Separate - out psock_listen() and psock_accepti() for internal OS usage + out psock_listen() and psock_accept() for internal OS usage (2016-04-14). * fs/inode/, fs/vfs/, and sched/task/: File and socket descriptors are no longer allocated for kernel threads. They must use SYSLOG for @@ -11753,7 +11753,7 @@ * 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). + set the CCFG_SYSIO SYSIO Pins. From David 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). @@ -11767,7 +11767,7 @@ 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 + * arch/arm/src/lpc43xx: 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 @@ -11813,3 +11813,361 @@ * 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). + * arch/arm/src/stm32l4: Get I2C working for STM32L4. From Dave + (ziggurat29) (2016-05-25). + * fs/ and include/nuttx/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). + * drivers/analog/adc.c, include/nuttx/analog/adc.h, and all ADC lower + half drivers: No longer uses global adc_receive() call. Added a new + bind() method to the ADC interface. Now the ADC upper half driver + will register its receipt-of-data callback. This change allows the + ADC lower half driver to be used with a differ ADC upper half + (2016-05-26). + * drivers/analog/ads1255.c: Must not do SPI access from interrupt + handler. Use the worker thread instead. Must also lock the SPI bus + before using it. (2015-05-26). + * drivers/: Several SPI-based drivers modified. All drivers that use + SPI must call SPI_LOCK and SPI_UNLOCK. This is not optional + (2016-05-26). + * drivers/sensors: Fix a bug in crc computation for ms583730. + Implement POSIX read (2016-05-27). + * arch/arm/src/samv7: This is a fix to a problem in the handling of the + oneshot timer. Due to a wrong assumption concerning the behavior + directly after the start of the timer/counter the function + sam_oneshot_cancel(…) calculates the wrong remaining time. The code + assumes that the counter register is zero directly after the start of + the timer, but this is not true. To start the time/counter a software + trigger is invoked, this trigger starts the timer/count and sets the + counter register to zero, but the reset of the counter register is not + performed instantly. According to the datasheet: "The counter can be + reset by a trigger. In this case, the counter value passes to zero on + the next valid edge of the selected clock." Thus the counter is set to + zero between 0 and USEC_PER_TICK microseconds after the clock was + started. + In my fix I use the freerun count value to determine if at least one + tick passed since the start of the timer and thus if the value of the + oneshot counter is correct. I also tried to use the function + up_timer_gettime(…) to achieve this but, at least if compiled with no + optimization the problem vanishes without using the value of the + function, the function call takes too long. + Another problem treated in the fix is that if the oneshot timer/counter + is canceled, we only know the remaining time with a precision of + USEC_PER_TICK microseconds. This means the calculated remaining time + is between 0 and USEC_PER_TICK microseconds too long. To fix this I + subtract one tick if the calculated remaining time is greater than one + tick and otherwise set the remaining time to zero. By doing so the + measured times are much more precise as without it. From Stefan Kolb + (2016-05-27). + * arch/arm/src/sama5: Stefan Kolb's change to the SAMV7 Oneshot Timer + should also be applied to the SAMA5 oneshot time since the drivers are + identical (2016-05-27). + * arch/arm/src/stm32l4: Add support for SPI 4 and 5 on stm32f411 chips. + From Konstantin Berezenko (2016-05-27). + * arch/arm/src/sam34: Stefan Kolb's change to the SAMV7 Oneshot Timer + should also be applied to the SAM3/4 oneshot time since the drivers + are identical (2016-05-29). + * arch/arm/src/stm32: Allow to not use all channel in a lower part of + PWM. From Pierre-noel Bouteville (2016-05-30). + * libc/math: Add a NAN test on 'x' in asin function of lib_asin.c. + Suggested by Pierre-noel Bouteville (2016-05-31). + * arch/arm/src/stm32: Fix logic in F4 RTCC driver that prevent ALARM + interrupt. From Neil Hancock (2016-05-31). + * arch/arm/src/stm32: Fix STM32 ValueLine ADC IRQ number selection. + From David Sidrane (2016-05-31). + * arch/arm/src/samv7: Fix missing unlock of device in MCAN + mcan_txempty(). From Frank Benkert (2016-06-01). + +7.17 2016-xx-xx Gregory Nutt + + * drivers/mtd/flash_eraseall.c: Removed. This is no longer used + in the OS and is simply a wrapper around the MDIOC_BULKERASE + IOCTL command. It used to be called (only) from + apps/system/flash_eraseall, but that has been removed because it + violated the OS/application interface -- by calling flash_eraseall(). + The old code can be found in the Obsoleted' repository (and a revised + version can be found at apps/fsutils/flash_eraseall) (2016-06-03). + * arch/arm/src/stm32: STM32 Timer Driver: Change calculation of per- + timer pre-scaler value. Add support for all timers (2016-6-03) + * drivers/lcd: Correct conditional compilation in ST7565 driver. From + Pierre-noel Bouteville (2016-6-03) + * arch/arm/src/stm32: Correct conditional compilation in STM32 timer + capture logic. From Pierre-noel Bouteville (2016-6-03) + * arch/arm/src/efm32: Fix EFM32 FLASH conditional compilation. From + Pierre-noel Bouteville (2016-6-03) + * arch/arm/src/lpc43xx: Fix errors in GPIO interrupt logic. From v01d + (phreakuencies) (2016-06-04) + * arch/arm/src/kl and lpc11xx: rename xyz_lowputc to up_putc. Remove + all references to up_lowputc, everywhere (2016-06-04). + * configs/stm32f103-minimum: Add minnsh configuration. From Alan + Carvalho de Assis (2016-06-04). + * arch/arm/src/stm32: Add the up_getc() function to STM32 in order to + support the minnsh configuration. From Alan Carvalho de Assis + (2016-06-04). + * include/sys/boardctl.h: Needs to be usable with C++ files (2016-06-05). + * tools/tesbuild.sh will now build NxWM configurations (2016-06-05). + * arch/arm/src/stm32: In PWM driver, just update duty if frequency is + not changed and PSM started. This removeis glitch or blinking when + only duty is frequently changed. From Pierre-noel Bouteville (2016-06-05). + * arch/arm/src/kinetis: Add a USB device controller driver. Derived from + the pic32mx usb driver, which uses the same usb controller. From kfazz + (2016-06). + * configs/teensy-3.x: Add USB support and a usbnsh configuration. From + kfazz (2016-06). + * arch/arm/src/stm32: Add support for the STM32F105R. From Konstantin + Berezenko (2016-06-06). + * include/signal.h: Change type of SIG_ERR, SIG_IGN, ... to + _sa_handler_t. They type void does not work with the IAR toolchain. + From Aleksandr Vyhovanec (2016-06-07). + * arch/arm/src/stm32f7 and include/stm32f7: Added STM32FF76xxx and + STM32FF7xx families. From David Sidrane (2016-06-08). + * Refactoring configs/nucleo-144 sub-directories to support additional + nucleo-144 board. Add support for the Nucleo-F767ZI board. From David + Sidrane (2016-06-08). + * arch/arm/src/kinetis: Add a USB device controller driver for kinetis. + Derived from pic32mx usb driver, which uses the same usb controller. + From kfazz (2016-06-06). + * configs/teensy-3.x: Add USB device support and usbnsh configuration. + From kfazz (2016-06-06. + * arch/arm/src/stm32: Add STM32F105R support. From Konstantin Berezenko + (2016-06-06). + * include/signal.h: Change type of SIG_IGN and related defines to + _sa_handler_t. From Aleksandr Vyhovanec (2016-06-07). + * configs/nucleo-144: Refactored configs/nucleo-144 sub-directories to + support additional nucleo-144 board. Add support for the Nucleo-F767ZI + board. From David Sidrane (2016-06-07). + * arch/arm/src/stm32f7: Add support for STM32FF76xxx and STM32FF7xx + families. From David Sidrane (2016-06-08). + * include/assert.h: Check if NDEBUG is defined. From Paul Alexander + Patience (2016-06-08). + * arch/arm/src/stm32: Fix STM32 DMA code and configuration for STM32F37X + chips. From Marten Svanfeldt (2016-06-08). + * drivers/mtd: Add a driver of IS25xP SPI flash devices. From Marten + Svanfeldt (2016-06-09). + * arch/arm/src/Kconfig and configs/teensy-3.x: Teensy clock fixes. The + High Gain bit in MCG_C1 was preventing teensy from booting except + after a programming session. The second change doesn't appear to + change any functionality, but complies with restrictions in the k20 + family reference manual on FEI -> FBE clock transiions. From kfazz + (2016-06-09). + * configs/*/include/board.h: Fix timer input clock definitions. From + David Sidrane (2016-06-09). + * Networking: In both IPv6 and IPv4 incoming logic: (1) Should check + if the packet size is large enough before trying to access the packet + length in the IP header. (2) In the comparison between the IP length + and the full packet length, need to subtract the size of the link + layer header before making the comparison or we will get false + positives (i.e., the packet is really too small) (2016-06-09) + * drivers/mtd: Added driver of IS25xP SPI flash devices. Based on + sst25xx driver. From Marten Svanfeldt (2016-06-09). + * arch/arm/src/kinetis: Teensy clock fixes. The High Gain bit in + MCG_C1 was preventing teensy from booting except after a programming + session. The second change doesn't appear to change any functionality, + but complies with restrictions in the k20 family reference manual on + FEI -> FBE clock transiions. From kfazz (2016-06-09). + * arch/arm/src/stm32: Fix timer input clock definitions. From David + Sidrane (2016-06-09). + * configs/: All configurations that have both CONFIG_NSH_LIBRARY=y and + CONFIG_NET=y must now also have CONFIG_NSH_NETINIT=y (2016-06-09). + * arch/arm/src/kinetis: Kinetis pwm support, based on kl_pwm driver. + From kfazz (2016-06-09). + * net/: In both IPv6 and IPv4 incoming logic: (1) Should check if the + packet size is large enough before trying to access the packet length + in the IP header. (2) In the comparison between the IP length and the + full packet length, need to subtract the size of the link layer header + before making the comparison or we will get false positives (i.e., the + packet is really too small) (2016-06-09). + * arch/srm/src/stm32: Fix compilation errors in debug mode of + stm32_pwm.c. From Konstantin Berezenko (2016-06-09). + * arch/arm/src/kinetis: Support up to 8 channels per timer. From kfazz + (2016-06-09). + * lib/: crc16: fix error. From Paul Alexander Patience (2016-06-10). + * lib/: Add crc64 support. From Paul Alexander Patience (2016-06-10). + * arch/arm/src/kinetis: Added kl_dumpgpio functionality as + kinetis_pindump. From kfazz (2016-06-10). + * arch/arm/src/sam34: Fix some errors in AFEC header file. From + OrbitalFox (2016-06-10). + * arch/arm/include/stm32: Correct the can2 rx irq number for stm32f10xx + chips. From Konstantin Berezenko (2016-06-10). + * drivers/include/input: Button upper half driver: Add definitions + needed for compilation with the poll() interface is not disabled + (2016-06-11). + * Kconfig/, include/debug.h, and many other files: (1) Debug features + are now enabled separately from debug output. CONFIG_DEBUG is gone. + It is replaced with CONFIG_DEBUG_FEATURES. (2) The macros dbg() and + vdbg() have renamed as err() and info(), respectively. This also + applies to all of the variants as well, lldbg(), llvdbg(), XXdbg(), + XXvdbg(), XXlldbg(), and XXllvdbg(). (3) Add a new debug level, + warn() (and all variants vwarn(), llwarn(), etc.). (4) Debug + assertions can now be enabled separately from debug output. (5) You + can now enable subsystem/device driver debug output at different + output levels. For example, CONFIG_DEBUG_FS no longer enables file + system debug output. It enables general file system debug logic and + enables selection of CONFIG_DEBUG_FS_ERROR, CONFIG_DEBUG_FS_WARN, + and CONFIG_DEBUG_FS_INFO (2016-06-12). + * strtoul() and strtoull(): Fix errno settings required by function + definition. Resolved Bitbucket Issue #1. From Sebastien Lorquet + (2016-06-13) + * arch/arm/src/stm32f7: Add SPI driver. DMA not yet supported. From + David Sidrane (2016-06-14). + * configs/nucleo-144: Add test for STM32 F7 SPI. From David Sidrane + (2016-06-14). + * alert(): New debug macro: alert(). This is high priority, + unconditional output and is used to simplify and stanardize crash + error reporting(2016-06-14). + * arch/arm/src/tiva: Bug Fix in tiva_serial.c - UART5, UART6 and UART7 + were not being configured as TTYS0 for printing over serial console. + From Shirshak Sengupta (2016-06-14). + * SAMV7: SPI: SPI-Freq. 40MHz; VARSELECT; hw-features + This change adds the following improvements: + - Increase the allowed SPI-Frequency from 20 to 40 MHz. + - Correct and rename the "VARSELECT" option + This option was included in the code as "CONFIG_SPI_VARSELECT" but + nowhere defined in a Kconfig file. The change renames it to + "CONFIG_SAMV7_SPI_VARSELECT" and corrects the implementation + according the datasheet of Atmel. In short, this option switches + the processor from "fixed peripheral selection" (single device) to + "variable peripheral selection" (multiple devices on the bus). + - Add a new Function to the interface to control the timing and delays + of the chip according the ChipSelect lines. This function can + control the delay between the assertion of the ChipSelect and the + first bit, between the last bit and the de-assertion of the + ChipSelect and between two ChipSelects. This is needed to tune the + transfer according the specification of the connected devices. + - Add three "hw-features" for the SAMV7, which controls the behavior + of the ChipSelect: + - force CS inactive after transfer: this forces a (short) + de-assertion of the CS after a transfer, even if more data is + available in time + - force CS active after transfer: this forces the CS to stay active + after a transfer, even if the chip runs out of data. + Btw.: this is a prerequisit to make the LASTXFER bit working at all. + - escape LASTXFER: this suppresses the LASTXFER bit at the end of the + next transfer. The "escape"-Flag is reset automatically. + From Frank Benkert (2016-06-14) + * Many CONFIG_DEBUG_* options did not have matching macros defined in + include/debug.h. Rather, there were various definitions scattered + throughout the sourse tree. These were collected together and + centralized with single macro definitions in include/debug.h + (2016-06-15) + * STM32F7: Add SPI, I2C, and ADC drivers. From Lok Tep (2016-06-15). + * err(), warn(), info(), and alert() renamed to include leading '_'. + This was done to avoid some naming collisions (2-06-16 + * STM32: Move backup domain reset to to earlier in the initialization + sequence (stm32_rcc.c() in order to avoid disabling LSE during RTC + initialiation. From Alan Carvalho de Assis (2016-06-16). + * SYSLOG: syslog() will now automatically redirect output to lowsyslog() + if called from an interrupt handler (2016-06-16). + * STM32: When configuring a GPIO via stm32_configgpio() the function + will first set the mode to output and then set the initial state of + the gpio later on. If you have an application with an externaly + pulled-up pin, this would lead to a glitch on the line that may be + dangerous in some applications (e.G. Reset Line for other chips, + etc). This changes sets the output state before configuring the pin + as an output. From Pascal Speck (2016-06-17). + * STM32 F7: Apply Pascal Speck's GPIO STM32 change to STM32 L4 + (2016-06-17). + * STM32 L4: Apply Pascal Speck's GPIO STM32 change to STM32 L4. + From Sebastien Lorquet (2016-06-17). + * Review all uses of *err(). These macro family should indicate only + error conditions. Convert *err() to either *info() or add ERROR:, + depending on if an error is reported (2016-06-17). + * STM32F7: Review, correct, and update I2C, SPI, and ADC drivers. From + David Sidrane (2016-06-17). + * LPC17 Ethernet: Needs to correctly ignore PHYID2 revision number + when comparing PHY IDs (2016-06-18). + * SYSLOG: Consolidate all SYSLOG logic in drivers/syslog. Add an + abstraction layer that supports: (1) redirection of SYSLOG outpout. + This is usually so that you can boot with one SYSLOG output but + transition to another SYSLOG output when the OS has initialialized, + (2) adds common serialization of interrupt output as a configuration + option. Without this configuration setting, interrupt level output + will be asynchronous. And (3) vsyslog is now a system call and is + usable with other-than-FLAT builds (2016-06-19). + * TCP Networking: While working with version 7.10 I discovered a + problem in TCP stack that could be observed on high network load. + Generally speaking, the problem is that RST flag is set in + unnecessary case, in which between loss of some TCP packet and its + proper retransmission, another packets had been successfully sent. + The scenario is as follows: NuttX did not receive ACK for some + sent packet, so it has been probably lost somewhere. But before + its retransmission starts, NuttX is correctly issuing next TCP + packets, with sequence numbers increasing properly. When the + retransmission of previously lost packet finally succeeds, tcp_input + receives the accumulated ACK value, which acknowledges also the + packets sent in the meantime (i.e. between unsuccessful sending of + lost packet and its proper retransmission). However, variable unackseq + is still set to conn->isn + conn->sent, which is truth only if no + further packets transmission occurred in the meantime. Because of + incorrect (in such specific case) unackseq value, few lines further + condition if (ackseq <= unackseq)is not met, and, as a result, we + are going to reset label. From Jakub Łągwa (2016-06-20). + * SYSLOG: Remove lowsyslog(), vlowsyslog(), and associated macros + *llinfo(), *llwarn(), and llerr(). In the redesigned syslog() logic, + these serve no purpose (2016-06-20). + * Make system: Need to build the drivers/ directory even it file + descriptors are not supported. There are things in the drivers/ + directory that are still needed (like SYSLOG logic) (2016-06-20). + * assert.h: Define static assert for C++ usage. From Paul Alexander + Patience (2016-06-21). + * arch/arm/src/stm32l4: Add ioctls to set/get bit timing in stm32l4. + Add ioctl hooks to allow future management of can id filters. From + Sebastien Lorquet (2016-06-21). + * drivers/can.c: Add support for poll. From Paul Alexander Patience + (2016-06-21). + * drivers/syslog: Extend SYSLOG logic so that we can send SYSLOG output + to a file. Not verified on initial commit (2016-06-21). + * arch/arm/src/stm32l4: Add some CAN mode IOCTL calls. These will be + useful for device autotest when the application boots. They are + redundant with the CONFIG_CAN_LOOPBACK option, which can now just be + interpreted as a default setting. From Sebastien Lorquet (2016-06-22). + * drivers/syslog: syslog_dev_flush() needs to check if the inode is a + mountpoint before calling the flush() method. Noted by David Sidrane + (2016-06-22). + * arch/arm/src/stm32f7: Adds SDMMC1 for stm32F7 74-75. From Lok Tep + (2016-06-22). + * drivers/syslog: SYSLOG character device channel will now expand LF to + CR-LF. Controllable with a configuration option (2016-06-22). + * arch/arm/src/stm32l4: Implementation of loopback IOCTLs. From + Sebastien Lorquet (2016-06-22). + * Documentation: Add SYSLOG documentation to the porting guide + (2016-06-22). + * configs/stm32f746g-disco: Removed knsh configuration it failed to + refresh (via tools/refresh.sh). I assume that it is a hand-edited + configuration and, hence, must be removed from the repository + (2016-06-23). + * arch/arm/arc/sam34: DAC bugfix: DACC_WPMR_WPKEY_MASK -> DACC_WPMR_WPKEY. + Timer bugfix: Fix ops check in TCIOC_STOP. From Wolfgang Reissnegge + (2016-06-23). + * arch/arm/src/stm32: Port STM32L4 CAN IOCTLs to STM32. From Sebastien + Lorquet (2016-06-24). + * configs/Konfig:Add configuration logic to include a Kconfig file in + each custom configuration. Includes adding a dummy custom board + configuration directory. A consequence of this that each custom board + directory will now need to contain a Kconfig file. NOTE also that + the new board directory does not take effect in the configuration + menus until the NEXT time you run 'make menuconfig' (2016-06-24). + * drivers/ioexpander: Add support for a very simple GPIO driver. It + supports only pre-conrigured input and output pins and only basic + input and output operations (2016-06-24). + * arch/arm/src/lpc43xx: Correct auto-negotiation mode in the LPC43xx + Ethernet. From Alexander Vasiljev (2016-06-24) + * arch/arm/src/samv7: TWIHS Driver improved and GPIO-Driver fixed for + Open-Drain Pins + - sam_gpioread: Now the actual line level from the pin is read back. + This is extremely important for Open-Drain Pins, which can be used + bidirectionally + - Re-Implemented twi_reset-function and enhanced it so it can be + called from inside the driver (see next point) + - Glitch-Filter: Added a configuration option to enable the twi-built- + in glitch filter + - Added a "Single Master Mode": In EMC Testing the TWI-Bus got stuck + because the TWI-Master detected a Multi-Master access (but there is + no second master). With the option "Single Master" we detect these + events and automatically trigger a twi_reset. We also do an + automatic recovery if a slave got stuck (SDA stays low). + With the above changes I²C-Bus reliability in harsh environments (eg. + EMC) is greatly improved. The small change in the GPIO-Driver was + necessary because otherwise you cannot read back the correct line + status of Open-Drain Outputs and this is needed by the twi_reset + function. From Michael Spahlinger (2016-06-24) diff --git a/Directories.mk b/Directories.mk index 6eeedc79e8a484095ca15f31ccaf20cb9212bad9..2e42a8a435f25de41b1646e5bcea5a60787b7a86 100644 --- a/Directories.mk +++ b/Directories.mk @@ -59,7 +59,10 @@ endif # # FSDIRS depend on file descriptor support; NONFSDIRS do not (except for parts # of FSDIRS). We will exclude FSDIRS from the build if file descriptor -# support is disabled +# support is disabled. NOTE that drivers, in general, depends on file +# descriptor support but is always built because there are other components +# in the drivers directory that are needed even if file descriptors are not +# supported. # CONTEXTDIRS include directories that have special, one-time pre-build # requirements. Normally this includes things like auto-generation of # configuration specific files or creation of configurable symbolic links @@ -69,8 +72,8 @@ endif # be cleaned to prevent garbage from collecting in them when changing # configurations. -NONFSDIRS = sched configs $(ARCH_SRC) $(NUTTX_ADDONS) -FSDIRS = fs drivers binfmt +NONFSDIRS = sched drivers configs $(ARCH_SRC) $(NUTTX_ADDONS) +FSDIRS = fs binfmt CONTEXTDIRS = $(APPDIR) USERDIRS = OTHERDIRS = lib diff --git a/Documentation/NuttX.html b/Documentation/NuttX.html index 9910e4c275d0cb67c8095802b5a73737d16f1286..83c42c61cfdf3d786affc954a7b1fd3bd0ae9b7c 100644 --- a/Documentation/NuttX.html +++ b/Documentation/NuttX.html @@ -8,7 +8,7 @@

NuttX RTOS

-

Last Updated: April 12, 2016

+

Last Updated: June 1, 2016

@@ -1340,11 +1340,11 @@

Released Versions

In addition to the ever-changing GIT repository, there are frozen released versions of NuttX available. - The current release is NuttX 7.15. - NuttX 7.15 is the 115th release of NuttX. - It was released on March 27, 2016, and is available for download from the + The current release is NuttX 7.16. + NuttX 7.16 is the 116th release of NuttX. + It was released on June 1, 2016, and is available for download from the Bitbucket.org website. - Note that the release consists of two tarballs: nuttx-7.15.tar.gz and apps-7.15.tar.gz. + Note that the release consists of two tarballs: nuttx-7.16.tar.gz and apps-7.16.tar.gz. Both may be needed (see the top-level nuttx/README.txt file for build information).

@@ -1353,7 +1353,7 @@
  • nuttx.

      - Release notes for NuttX 7.15 are available here. + Release notes for NuttX 7.16 are available here. Release notes for all released versions on NuttX are available in the Bitbucket GIT. The ChangeLog for all releases of NuttX is available in the ChangeLog file that can viewed in the Bitbucket GIT. The ChangeLog for the current release is at the bottom of that file. @@ -1361,7 +1361,7 @@

  • apps.
  • Atmel AVR @@ -2257,7 +2257,7 @@

    NXP/Freescale i.MX6. - A port is underway for the following i.MX6 board + The basic port has been completed for the following i.MX6 board

    • @@ -2268,9 +2268,13 @@

      STATUS: - The basic, minimal port is code complete and introduced in NuttX-7.15, but has not yet been tested. - I am still waiting for the reciept of the Sabre board. - Expect to see the verified Sabre-6Quad support (with SMP!) in NuttX-7.16. + The basic, minimal port is code complete and introduced in NuttX-7.15, but had not yet been tested at that time due to the inavailability of hardware. + This basic port was verified in the NuttX-7.16 release, however. + The port is still mininal and more device drivers are needed to make the port usable. +

      +

      + Basic support of NuttX running in SMP mode on the i.MX6Q was also accomplished in NuttX-7.16. + However, there are still known issues with SMP support on this platform as described in the README file for the board.

    @@ -2907,13 +2911,26 @@ nsh>

    STMicro STM32F103C4/8 (STM32 F1 Low- and Medium-Density Family). - This port is for "STM32 Tiny" development board. - This board is available from several vendors on the net, and may be sold under different names. - It is based on a STM32 F103C8T6 MCU, and is bundled with a nRF24L01 wireless communication module. + There are two ports available for this family:

      -

      - STATUS: +

    • +

      + One port is for "STM32 Tiny" development board. + This board is available from several vendors on the net, and may be sold under different names. + It is based on a STM32 F103C8T6 MCU, and is bundled with a nRF24L01 wireless communication module. +

      +
    • +
    • +

      + The other port is for a generic minimual STM32F103CBT6 "blue" board contributed by Alan Carvalho de Assis. +

      +
    • +
    +

    + STATUS: + +

      The basic STM32F103C8 port was released in NuttX version 6.28. This work was contributed by Laurent Latil. Refer to the NuttX board README file for further information. @@ -3160,11 +3177,17 @@ nsh>

      - STATUS: - The peripherals of the STM32 F2 family are compatible with the STM32 F4 family. - See discussion of the STM3240G-EVAL board below for further information. - Refer also to the NuttX board README file for further information. -
    +

    + STATUS: + The peripherals of the STM32 F2 family are compatible with the STM32 F4 family. + See discussion of the STM3240G-EVAL board below for further information. + Refer also to the NuttX board README file for further information. +

    +

    + Support for both the IAR and uVision GCC IDEs added for the STM3220G-EVAL board in NuttX 7.16. + From Kha Vo. +

    +
@@ -3779,6 +3802,10 @@ nsh> In Nutt-7.7, Marco Krahl included support for a framebuffer based driver using the LTDC and DMA2D. Marcos's implementation included extensions to support more advance LTDC functions through an auxiliary interface. +
  • + Support for the uVision GCC IDE added for theSTM32F429I-Discovery board in NuttX 7.16. + From Kha Vo. +
  • Refer to the STM32F429I-Discovery board README file for further information. @@ -3853,6 +3880,15 @@ nsh>

  • UART, USART, Serial Console
  • GPIO, DMA, I2C, RNG, SPI
  • +

    + NuttX-7.16. + Additional drivers were contributed: +

    +
      +
    • QSPI with DMA and memory mapped support. From Dave (ziggurat29).
    • +
    • CAN contributed by Sebastien Lorquet.
    • +
    • I2C made functional by Dave (ziggurat29).
    • +
    @@ -3968,6 +4004,13 @@ nsh> The NXP WaveShare LPC4337-WS port is was contributed by Lok Tep and first released in NuttX-7.14.

    +
  • +

    NuttX-7.16 + Support for the LPC4337JET100 chip was contribed by Alexander Vasiljev. + Alexander also contributed an LPC43xx AES driver available in NuttX-7.16. +

    +
  • + @@ -4407,13 +4450,24 @@ Mem: 29232 5920 23312 23312

    STMicro STM32 F745/F746. - This port uses the STMicro STM32F746G-DISCO development board featuring the STM32F746NGH6 MCU. The STM32F746NGH6 is a 216MHz Cortex-M7 operation with 1024Kb Flash. - Refer to the STMicro web site for further information about this board. + Two boards are supported for this MCU:

      - STATUS: - The basic port is complete and there are two, verified configurations available. + STM32F746G Discovery. + One port uses the STMicro STM32F746G-DISCO development board featuring the STM32F746NGH6 MCU. The STM32F746NGH6 is a 216MHz Cortex-M7 operation with 1024Kb Flash. + Refer to the STMicro web site for further information about this board. +

      +

      + A basic port for the Nucleo-144 board with the STM32F746ZG MCU was contribued in NuttX-7.16 by Kconstantin Berezenko. +

      +
    +

    + STATUS: +

    +
      +

      + The basic STM32F746G-DISCO port is complete and there are two, verified configurations available. Both configurations use the NuttShell (NSH) and a serial console; one includes Ethernet support. DMA supports is available. The STM32 F7 peripherals are very similar to some members of the STM32 F4 and additional drivers can easily be ported the F7 as discussed in this Wiki page: Porting Drivers to the STM32 F7 diff --git a/Documentation/NuttXCCodingStandard.html b/Documentation/NuttXCCodingStandard.html index d1e96795c773271a3b2339bc63940a3165799d10..e3b3103297aaba92d4d8266f20c81484c0bd19c8 100644 --- a/Documentation/NuttXCCodingStandard.html +++ b/Documentation/NuttXCCodingStandard.html @@ -162,10 +162,10 @@ Pre-processor Definitions

    • - Private Types + Private Types (definitions)
    • - Private Function Prototypes + Private Function Prototypes (declarations)
    • Private Data (definitions) @@ -191,7 +191,7 @@ Pre-processor Definitions
    • - Public Types + Public Types (definitions)
    • Public Data (declarations) @@ -212,12 +212,12 @@

      Header File Idempotence. - C header file must protect against multipleinclusion through the use of macros that "guard" against multiple definitions if the header file is included multiple times. + C header file must protect against multiple inclusion through the use of macros that "guard" against multiple definitions if the header file is included multiple times.

      Appendix A: NuttX Configuration Settings
      @@ -802,7 +809,7 @@

      Definitions in the Make.defs file probably depend on some of the settings in the .config file. For example, the CFLAGS will most likely be - different if CONFIG_DEBUG=y. + different if CONFIG_DEBUG_FEATURES=y.

      The included tools/Config.mk file contains additional definitions that may @@ -4901,8 +4908,7 @@ int kbd_decode(FAR struct lib_instream_s *stream, FAR struct kbd_getstate_s *sta

      include/nuttx/net/netdev.h. All structures and APIs needed to work with Ethernet drivers are provided in this header file. - The structure struct net_driver_s defines the interface and is passed to uIP via - netdev_register(). + The structure struct net_driver_s defines the interface and is passed to the network via netdev_register().

    • @@ -5547,9 +5553,507 @@ int kbd_decode(FAR struct lib_instream_s *stream, FAR struct kbd_getstate_s *sta
    -

    6.4 Power Management

    +

    6.4 SYSLOG

    + +

    6.4.1 SYSLOG Interfaces

    +

    6.4.1.1 Standard SYSLOG Interfaces

    + + The NuttX SYSLOG is an architecture for getting debug and status + information from the system. The syslogging interfaces are defined in the + header file include/syslog.h. The primary interface to SYSLOG sub-system + is the function syslog() and, to a lesser extent, its companion vsyslog(): + +

    6.4.1.2 syslog() and vsyslog()

    +

    Function Prototypes:

    +
      +#include <syslog.h>
      +int syslog(int priority, FAR const IPTR char *format, ...);
      +int vsyslog(int priority, FAR const IPTR char *src, va_list ap);
      +
    +

    Description: + syslog() generates a log message. The priority argument is formed by ORing the facility and the level values (see include/syslog.h). The remaining arguments are a format, as in printf() and any arguments to the format. +

    +

    + The NuttX implementation does not support any special formatting characters beyond those supported by printf(). +

    +

    + The function vsyslog() performs the same task as syslog() with the difference that it takes a set of arguments which have been obtained using the stdarg variable argument list macros. +

    + +

    6.4.1.3 setlogmask()

    +

    + The additional setlogmask() interface can use use to filter SYSLOG output: +

    +

    Function Prototype:

    +
      +#include <syslog.h>
      +int setlogmask(int mask);
      +
    +

    Description: + The setlogmask() function sets the logmask and returns the previous mask. If the mask argument is zerio, the current logmask is not modified. +

    +

    + The SYSLOG priorities are: LOG_EMERG, LOG_ALERT, LOG_CRIT, LOG_ERR, LOG_WARNING, LOG_NOTICE, LOG_INFO, and LOG_DEBUG. The bit corresponding to a priority p is LOG_MASK(p); LOG_UPTO(p) provides the mask of all priorities in the above list up to and including p. +

    +

    + Per OpenGroup.org "If the maskpri argument is 0, the current log mask is not modified." In this implementation, the value zero is permitted in order to disable all SYSLOG levels. +

    +

    + REVISIT: Per POSIX the SYSLOG mask should be a per-process value but in NuttX, the scope of the mask is dependent on the nature of the build: +

    +
      + +
    • +

      + Flat Build: There is one, global SYSLOG mask that controls all output. +

    • +
    • +

      + Protected Build: There are two SYSLOG masks. One within the kernel that controls only kernel output. And one in user-space that controls only user SYSLOG output. +

    • +
    • +

      + Kernel Build: The kernel build is compliant with the POSIX requirement: There will be one mask for for each user process, controlling the SYSLOG output only form that process. There will be a separate mask accessable only in the kernel code to control kernel SYSLOG output. +

    +

    + The above are all standard interfaces as defined at OpenGroup.org. Those interfaces are available for use by application software. The remaining interfaces discussed in this section are non-standard, OS-internal interfaces. +

    + +

    6.4.1.4 Debug Interfaces

    +

    + In NuttX, syslog output is really synonymous to debug output and, herefore, the debugging interface macros defined in the header file + include/debug.h are also syslogging interfaces. Those macros are simply wrappers around syslog(). The debugging interfaces differ from the syslog interfaces in that: +

    +
      + +
    • +

      + They do not take a priority parameter; the priority is inherent in the + debug macro name. +

    • +
    • +

      + They decorate the output stream with information such as the file name +

    • +
    • +

      + They can each be disabled via configuration options. +

    • +
    +

    + Each debug macro has a base name that represents the priority and a prefix that represents the sub-system. Each macro is individually initialized by both priority and sub-system. For example, uerr() is the macro used for error level messages from the USB subsystem and is enabled with CONFIG_DEBUG_USB_ERROR. +

    +

    + The base debug macro names, their priority, and configuration variable are summarized below: +

    +
      + +
    • +

      + info(). The info() macro is the lowest priority (LOG_INFO) and is intended to provide general information about the flow of program execution so that you can get an overview of the behavior of the program. info() is often very chatty and voluminous and usually more information than you may want to see. The info() macro is controlled via CONFIG_DEBUG_subsystem_INFO +

    • +
    • +

      + warn(). The warn() macro has medium priority (LOG_WARN) and is controlled by CONFIG_DEBUG_subsystem_WARN. The warn() is intended to + note exceptional or unexpected conditions that meigh be potential + errors or, perhaps, minor errors that easily recovered. +

    • +
    • +

      + err(). This is a high priority debug macro (LOG_ERROR) and controlled by CONFIG_DEBUG_subsystem_ERROR. The err() is reserved to indicate important error conditions. +

    • +
    • +

      + alert(). The highest priority debug macro (LOG_EMERG) and is controlled by CONFIG_DEBUG_ALERT. The alert() macro is reserved for use solely by assertion and crash handling logic. It also differs from the other macros in that it cannot be enabled or disabled per subsystem. +

    • +
    + +

    6.4.2 SYSLOG Channels

    +

    6.4.2.1 SYSLOG Channel Interfaces

    +

    + In the NuttX SYSLOG implementation, the underlying device logic the supports the SYSLOG output is referred to as a SYSLOG channel. Each SYSLOG channel is represented by an interface defined in include/nuttx/syslog/syslog.h: +

    +
      +    /* This structure provides the interface to a SYSLOG device */
      +
      +    typedef CODE int (*syslog_putc_t)(int ch);
      +    typedef CODE int (*syslog_flush_t)(void);
      +
      +    struct syslog_channel_s
      +    {
      +      /* I/O redirection methods */
      +
      +      syslog_putc_t sc_putc;    /* Normal buffered output */
      +      syslog_putc_t sc_force;   /* Low-level output for interrupt handlers */
      +      syslog_flush_t sc_flush;  /* Flush buffered output (on crash) */
      +
      +      /* Implementation specific logic may follow */
      +    };
      +
    +

    + The channel interface is instantiated by calling syslog_channel(): +

    + +

    6.4.2.1 syslog_channel()

    +

    Function Prototype:

    +
      +#include <nuttx/syslog/syslog.h>
      +int syslog_channel(FAR const struct syslog_channel_s *channel);
      +
    +

    Description: + Configure the SYSLOG function to use the provided channel to generate SYSLOG output. +

    +

    + syslog_channel() is a non-standard, internal OS interface and is not available to applications. It may be called numerous times as necessary to change channel interfaces. + By default, all system log output goes to console (/dev/console). +

    +

    Input Parmeters: +

      +
    • +

      + channel: Describes the interface to the channel to be used. +

    • +
    +

    Returned Value: +

      +

      + Zero (OK)is returned on success. A negated errno value is returned on any failure. +

      +
    + +

    6.4.2.2 SYSLOG Channel Initialization

    +

    + The initial, default SYSLOG channel is established with statically initialized global variables so that some level of SYSLOG output may be available immediately upon reset. This initialized data is in the file drivers/syslog/syslog_channel.c. The initial SYSLOG capability is determined by the selected SYSLOG channel: +

    +
      +
    • +

      + In-Memory Buffer (RAMLOG). Full SYSLOG capability as available at reset. +

    • +
    • +

      + Serial Console. If the serial implementation provides the low-level character output function up_putc(), then that low level serial output is available as soon as the serial device has been configured. +

    • +
    • +

      + For all other SYSLOG channels, all SYSLOG output goes to the bit- + bucket until the SYSLOG channel device has been initialized. +

    • +
    +

    + The syslog channel device is initialized when the bring-up logic calls syslog_initialize(): +

    + +

    6.4.2.3 syslog_initialize()

    +

    Function Prototype:

    +
      +#include <nuttx/syslog/syslog.h>
      +#ifndef CONFIG_ARCH_SYSLOG
      +int syslog_initialize(enum syslog_init_e phase);
      +#else
      +#  define syslog_initialize(phase)
      +#endif
      +
    +

    Description: + One power up, the SYSLOG facility is non-existent or limited to very low-level output. This function is called later in the initialization sequence after full driver support has been initialized. It installs the configured SYSLOG drivers and enables full SYSLOG capability. +

    +

    + This function performs these basic operations: +

    +
      +
    • +

      + Initialize the SYSLOG device +

    • +
    • +

      + Call syslog_channel() to begin using that device. +

    • +
    • +

      + If CONFIG_ARCH_SYSLOG is selected, then the architecture-specific logic will provide its own SYSLOG device initialize which must include as a minimum a call to syslog_channel() to use the device. +

    • +
    +

    Input Parameters: +

      +
    • +

      + phase: One of {SYSLOG_INIT_EARLY, SYSLOG_INIT_LATE} +

    • +
    +

    Returned Value: + Zero (OK) is returned on success; a negated errno value is returned on any failure. +

    +

    + Different types of SYSLOG devices have different OS initialization + requirements. Some are available immediately at reset, some are available + after some basic OS initialization, and some only after OS is fully + initialized. In order to satisfy these different initialization + requirements, syslog_initialize() is called twice from the boot-up logic: +

    +
      +
    • +

      + syslog_initialize() is called from the architecture-specific up_initialize() function as some as basic hardware resources have been initialized: Timers, interrupts, etc. In this case, syslog_initialize() is called with the argument SYSLOG_INIT_EARLY. +

    • +
    • +

      + syslog_initialize() is called again from os_start() when the full OS initialization has completed, just before the application main entry point is spawned. In this case, syslog_initialize() is called with the argument SYSLOG_INIT_LATE. +

    • +
    +

    + There are other types of SYSLOG channel devices that may require even further initialization. For example, the file SYSLOG channel (described below) cannot be initialized until the necessary file systems have been mounted. +

    + +

    6.4.2.3 Interrupt Level SYSLOG Output

    +

    + As a general statement, SYSLOG output only supports //normal// output from NuttX tasks. However, for debugging purposes, it is also useful to get SYSLOG output from interrupt level logic. In an embedded system, that is often where the most critical operations are performed. +

    +

    + There are three conditions under which SYSLOG output generated from interrupt level processing can a included the SYSLOG output stream: +

    +
      +
    1. +

      Low-Level Serial Output. + If you are using a SYSLOG console channel (CONFIG_SYSLOG_CONSOLE) with a serial console (CONFIG_SYSLOG_SERIAL_CONSOLE) and if the underlying architecture supports the low-level up_putc() interface(CONFIG_ARCH_LOWPUTC), then the SYLOG logic will direct the output to up_putc() which is capable of generating the serial output within the context of an interrupt handler. +

      +

      + There are a few issues in doing this however: +

      +
        +
      • +

        + up_putc() is able to generate debug output in any context because it disables serial interrupts and polls the hardware directly. These polls may take many milliseconds and during that time, all interrupts are disable within the interrupt handler. This, of course, interferes with the real-time behavior of the RTOS. +

        +
      • +
      • +

        + The output generated by up_putc() is immediate and in real-time. The normal SYSLOG output, on the other hand, is buffered in the serial driver and may be delayed with respect to the immediate output by many lines. Therefore, the interrupt level SYSLOG ouput provided throug up_putc() is grossly out of synchronization with other debug output +

        +
      • +
      + +
    2. +
    3. +

      In-Memory Buffering. + If the RAMLOG SYSLOG channel is supported, then all SYSLOG output is buffered in memory. Interrupt level SYSLOG output is no different than normal SYSLOG output in this case. +

      +
    4. +
    5. +

      Serialization Buffer. + A final option is the use the an interrupt buffer to buffer the interrupt level SYSLOG output. In this case: +

      +
        +
      • +

        + SYSLOG output generated from interrupt level process in not sent to the SYSLOG channel immediately. Rather, it is buffered in the interrupt serialization buffer. +

        +
      • +
      • +

        + Later, when the next normal syslog output is generated, it will first empty the content of the interrupt buffer to the SYSLOG device in the proper context. It will then be followed by the normal syslog output. In this case, the interrupt level SYSLOG output will interrupt the normal output stream and the interrupt level SYSLOG output will be inserted into the correct position in the SYSLOG output when the next normal SYLOG output is generated. +

        +
      • +
      +

      + The SYSLOG interrupt buffer is enabled with CONFIG_SYSLOG_INTBUFFER. When the interrupt buffer is enabled, you must also provide the size of the interrupt buffer with CONFIG_SYSLOG_INTBUFSIZE. +

      +
    6. +
    + +

    6.4.3 SYSLOG Channel Options

    +

    6.4.3.1 SYSLOG Console Device

    +

    + The typical SYSLOG device is the system console. If you are using a serial console, for example, then the SYSLOG output will appear on that serial port. +

    +

    + This SYSLOG channel is automatically selected by syslog_initialize() in the LATE initialization phase based on configuration options. The configuration options that affect this channel selection include: +

    +
      +
    • +

      + CONFIG_DEV_CONSOLE. This setting indicates that the system supports a console device, i.e., that the character device /dev/console exists. +

    • +
    • +

      + CONFIG_SERIAL_CONSOLE. This configuration option is automatically selected when a UART or USART is configured as the system console. There is no user selection. +

    • +
    • +

      + CONFIG_SYSLOG_CONSOLE. This configuration option is manually selected from the SYSLOG menu. This is the option that acutally enables the SYSLOG console device. It depends on CONFIG_DEV_CONSOLE and it will automatically select CONFIG_SYSLOG_SERIAL_CONSOLE if CONFIG_SERIAL_CONSOLE is selected. +

    • +
    • +

      + CONFIG_ARCH_LOWPUTC. This is an indication from the architecture configuration that the platform supports the up_putc() interface. up_putc() is a very low level UART interface that can even be used from interrupt handling. +

    • +
    • +

      + CONFIG_SYSLOG_SERIAL_CONSOLE. This enables certain features of the SYSLOG operation that depend on a serial console. If CONFIG_ARCH_LOWPUTC is also selected, for example, then up_putc() will be used for the forced SYSLOG output. +

    • +
    +

    + Interrupt level SYSLOG output will be lost unless: (1) the interrupt buffer + is enabled to support serialization, or (2) a serial console is used and + up_putc() is supported. +

    +

    + NOTE: The console channel uses the fixed character device at /dev/console. The console channel is not synonymous with stdout (or file descriptor 1). stdout is the current output from a task when, say, printf() if used. Initially, stdout does, indeed, use the /dev/console device. However, stdout may subsequently be redirected to some other device or file. This is always the case, for example, when a transient device is used for a console -- such as a USB console or a Telnet console. The SYSLOG channel is not redirected as stdout is; the SYSLOG channel will stayed fixed (unless it is explicitly changed via syslog_channel()). +

    +

    + References: drivers/syslog/syslog_consolechannel.c and + drivers/syslog/syslog_device.c +

    + +

    6.4.3.2 SYSLOG Character Device

    +

    + The system console device, /dev/console, is a character driver with some special properties. However, any character driver may be used as the SYSLOG output channel. For example, suppose you have a serial console on /dev/ttyS0 and you want SYSLOG output on /dev/ttyS1. Or suppose you support only a Telnet console but want to capture debug output /dev/ttyS0. +

    +

    + This SYSLOG device channel is selected with CONFIG_SYSLOG_CHAR and has no other dependencies. Differences fromthe SYSLOG console channel include: +

    +
      +
    • +

      + CONFIG_SYSLOG_DEVPATH. This configuration option string must be set provide the full path to the character device to be used. +

    • +
    • +

      + The forced SYSLOG output always goes to the bit-bucket. This means that interrupt level SYSLOG output will be lost unless the interrupt buffer is enabled to support serialization. +

    • +
    • +

      + CONFIG_SYSLOG_CHAR_CRLF. If CONFIG_SYSLOG_CHAR_CRLF is selected, then linefeeds in the SYSLOG output will be expanded to Carriage Return plus Linefeed. Since the character device is not a console device, the addition of carriage returns to line feeds would not be performed otherwise. You would probably want this expansion if you use a serial terminal program with the character device output. +

    • +
    +

    + References: drivers/syslog/syslog_devchannel.c and drivers/syslog/syslog_device.c +

    + +

    6.4.3.3 SYSLOG File Device

    +

    + Files can also be used as the sink for SYSLOG output. There is, however, a very fundamental difference in using a file as opposed the system console, a RAM buffer, or character device: You must first mount the file system that supports the SYSLOG file. That difference means that the file SYSLOG channel cannot be supported during the boot-up phase but can be instantiated later when board level logic configures the application environment, including mounting of the file systems. +

    +

    + The interface syslog_file_channel() is used to configure the SYSLOG file channel: +

    + +

    6.4.3.4 syslog_file_channel()

    +

    Function Prototype:

    +
      +#include <nuttx/syslog/syslog.h>
      +#ifdef CONFIG_SYSLOG_FILE
      +int syslog_file_channel(FAR const char *devpath);
      +#endif
      +
    +

    Description: + Configure to use a file in a mounted file system at devpath as the SYSLOG channel. +

    +

    + This tiny function is simply a wrapper around syslog_dev_initialize() and syslog_channel(). It calls syslog_dev_initialize() to configure the character file at devpath then calls syslog_channel() to use that device as the SYSLOG output channel. +

    +

    + File SYSLOG channels differ from other SYSLOG channels in that they cannot be established until after fully booting and mounting the target file system. This function would need to be called from board-specific bring-up logic AFTER mounting the file system containing devpath. +

    +

    + SYSLOG data generated prior to calling syslog_file_channel() will, of course, not be included in the file. +

    +

    + NOTE interrupt level SYSLOG output will be lost in this case unless the interrupt buffer is used. +

    + +

    Input Parameters: +

      +
    • +

      + devpath: The full path to the file to be used for SYSLOG output. This may be an existing file or not. If the file exists, + syslog_file_channel() will append new SYSLOG data to the end of the file. If it does not, then syslog_file_channel() will create the file. +

    • +
    +

    Returned Value: + Zero (OK) is returned on success; a negated errno value is returned on any failure. +

    +

    + References: drivers/syslog/syslog_filechannel.c, drivers/syslog/syslog_device.c, and include/nuttx/syslog/syslog.h. +

    + +

    6.4.3.5 SYSLOG RAMLOG Device

    +

    + The RAMLOG is a standalone feature that can be used to buffer any + character data in memory. There are, however, special configurations + that can be used to configure the RAMLOG as a SYSLOG channel. The RAMLOG + functionality is described in a more general way in the following + paragraphs. +

    + +

    6.4.4 RAM Logging Device

    +

    + The RAM logging driver is a driver that was intended to support debugging output (SYSLOG) when the normal serial output is not available. For example, if you are using a Telnet or USB serial console, the debug output will get lost -- or worse. For example, what if you want to debug the network over Telnet? +

    +

    + The RAM logging driver can also accept debug output data from interrupt handler with no special serialization buffering. As an added benefit, the RAM logging driver is much less invasive. Since no actual I/O is performed with the debug output is generated, the RAM logger tends to be much faster and will interfere much less when used with time critical drivers. +

    +

    + The RAM logging driver is similar to a pipe in that it saves the debugging output in a circular buffer in RAM. It differs from a pipe in numerous details as needed to support logging. +

    +

    + This driver is built when CONFIG_RAMLOG is defined in the Nuttx configuration. +

    + +

    6.4.4.1 dmesg

    +

    + When the RAMLOG (with SYSLOG) is enabled, a new NuttShell (NSH) command will appear: dmesg. The dmesg command will dump the contents of the circular buffer to the console (and also clear the circular buffer). +

    + +

    6.4.4.2 RAMLOG Configuration options

    +
      +
    • +

      + CONFIG_RAMLOG: Enables the RAM logging feature +

    • +
    • +

      + CONFIG_RAMLOG_CONSOLE: Use the RAM logging device as a system console. If this feature is enabled (along with CONFIG_DEV_CONSOLE), then all console output will be re-directed to a circular buffer in RAM. This might be useful, for example, if the only console is a Telnet console. Then in that case, console output from non-Telnet threads will go to the circular buffer and can be viewed using the NSH dmesg command. This optional is not useful in other scenarios. +

    • +
    • +

      + CONFIG_RAMLOG_SYSLOG: Use the RAM logging device for the SYSLOG interface. If this feature is enabled, then all debug output will be re-directed to the circular buffer in RAM. This RAM log can be viewed from NSH using the dmesg command. NOTE: Unlike the limited, generic character driver SYSLOG device, the RAMLOG can be used to capture debug output from + interrupt level handlers. +

    • +
    • +

      + CONFIG_RAMLOG_NPOLLWAITERS: The number of threads than can be waiting for this driver on poll(). Default: 4 +

    • +
    +

    + If CONFIG_RAMLOG_CONSOLE or CONFIG_RAMLOG_SYSLOG is selected, then the following must also be provided: +

    +
      +
    • +

      + CONFIG_RAMLOG_BUFSIZE: The size of the circular buffer to use. Default: 1024 bytes. +

    • +
    +

    + Other miscellaneous settings +

    +
      +
    • +

      + CONFIG_RAMLOG_CRLF: Pre-pend a carriage return before every linefeed that goes into the RAM log. +

    • +
    • +

      + CONFIG_RAMLOG_NONBLOCKING: Reading from the RAMLOG will never block if the RAMLOG is empty. If the RAMLOG is empty, then zero is returned (usually interpreted as end-of-file). If you do not define this, the NSH dmesg command will lock up when called! So you probably do want this! +

    • +
    • +

      + CONFIG_RAMLOG_NPOLLWAITERS: The maximum number of threads that may be waiting on the poll method. +

    • +
    + +

    6.5 Power Management

    -

    6.4.1 Overview

    +

    6.5.1 Overview

    Power Management (PM) Sub-System. NuttX supports a simple power management (PM) sub-system. This sub-system: @@ -5633,12 +6137,12 @@ int kbd_decode(FAR struct lib_instream_s *stream, FAR struct kbd_getstate_s *sta Multiple PM domains might be useful, for example, if you would want to control power states associated with a network separately from power states associated with a user interface.

    -

    6.4.2 Interfaces

    +

    6.5.2 Interfaces

    All PM interfaces are declared in the file include/nuttx/power/pm.h.

    -

    6.4.2.1 pm_initialize()

    +

    6.5.2.1 pm_initialize()

    Function Prototype:

       #include <nuttx/power/pm.h>
      @@ -5655,7 +6159,7 @@ None
       None
       

      -

      6.4.2.2 pm_register()

      +

      6.5.2.2 pm_register()

      Function Prototype:

         #include <nuttx/power/pm.h>
        @@ -5675,7 +6179,7 @@ int pm_register(FAR struct pm_callback_s *callbacks);
         Zero (OK) on success; otherwise a negated errno value is returned.
         

        -

        6.4.2.3 pm_activity()

        +

        6.5.2.3 pm_activity()

        Function Prototype:

           #include <nuttx/power/pm.h>
          @@ -5704,7 +6208,7 @@ void pm_activity(int domain, int priority);
             This function may be called from an interrupt handler (this is the ONLY PM function that may be called from an interrupt handler!).
           

          -

          6.4.2.4 pm_checkstate()

          +

          6.5.2.4 pm_checkstate()

          Function Prototype:

             #include <nuttx/power/pm.h>
            @@ -5734,7 +6238,7 @@ enum pm_state_e pm_checkstate(int domain);
               The recommended power management state.
             

            -

            6.4.2.5 pm_changestate()

            +

            6.5.2.5 pm_changestate()

            Function Prototype:

               #include <nuttx/power/pm.h>
              @@ -5764,14 +6268,14 @@ enum pm_state_e pm_checkstate(int domain);
                  suspend the IDLE thread before it completes the entire state change unless interrupts are disabled throughout the state change.
               

              -

              6.4.3 Callbacks

              +

              6.5.3 Callbacks

              The struct pm_callback_s includes the pointers to the driver callback functions. This structure is defined include/nuttx/power/pm.h. These callback functions can be used to provide power management information to the driver.

              -

              6.4.3.1 prepare()

              +

              6.5.3.1 prepare()

              Function Prototype:

                 int (*prepare)(FAR struct pm_callback_s *cb, int domain, enum pm_state_e pmstate);
                @@ -5801,7 +6305,7 @@ int (*prepare)(FAR struct pm_callback_s *cb, int domain, enum pm_state_e pmstate
                    consumption modes!
                 

                -

                6.4.3.1 notify()

                +

                6.5.3.1 notify()

                Function Prototype:

                   #include <nuttx/power/pm.h>
                  diff --git a/Documentation/NuttxUserGuide.html b/Documentation/NuttxUserGuide.html
                  index a91959e198d41fb126e6397e5865d4efe39135df..3766eba646fda9464e641f870b44ecacf44972e0 100644
                  --- a/Documentation/NuttxUserGuide.html
                  +++ b/Documentation/NuttxUserGuide.html
                  @@ -8755,9 +8755,8 @@ FAR void *mmap(FAR void *start, size_t length, int prot, int flags, int fd, off_
                   
                   
                   

                  - NuttX includes a simple interface layer based on uIP (see http://www.sics.se). - NuttX supports subset of a standard socket interface to uIP. - These network feature can be enabled by settings in the architecture configuration file. + NuttX supports a BSD-compatible socket interface layer. + These socket interface can be enabled by settings in the architecture configuration file. Those socket APIs are discussed in the following paragraphs.

                    diff --git a/Documentation/UsbTrace.html b/Documentation/UsbTrace.html index 7efb7ebccbae864f39babfe12d882a25209fa3e4..a6800983d5bcb272c099f6bfba24de374b9a707a 100644 --- a/Documentation/UsbTrace.html +++ b/Documentation/UsbTrace.html @@ -125,7 +125,7 @@

                    • CONFIG_USBDEV_TRACE, or
                    • -
                    • CONFIG_DEBUG and CONFIG_DEBUG_USB
                    • +
                    • CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB

                    Log Data Sink. The logged data itself may go to either (1) an internal circular buffer, or (2) may be provided on the console. @@ -137,7 +137,7 @@ Here is an example of USB trace output using apps/examples/usbserial for an LPC1768 platform with the following NuttX configuration settings:

                      -
                    • CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, CONFIG_USB +
                    • CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, CONFIG_USB
                    • CONFIG_EXAMPLES_USBSERIAL_TRACEINIT, CONFIG_EXAMPLES_USBSERIAL_TRACECLASS, CONFIG_EXAMPLES_USBSERIAL_TRACETRANSFERS, CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER, CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS diff --git a/FlatLibs.mk b/FlatLibs.mk index 13dcc6c3400f0b24f52fe5bfd140265af0a8c6f3..69fe6a9fa067419996c597ec493e4273d519c0a8 100644 --- a/FlatLibs.mk +++ b/FlatLibs.mk @@ -45,6 +45,12 @@ NUTTXLIBS = lib$(DELIM)libsched$(LIBEXT) USERLIBS = +# Driver support. Generally depends on file descriptor support but there +# are some components in the drivers directory that are needed even if file +# descriptors are not supported. + +NUTTXLIBS += lib$(DELIM)libdrivers$(LIBEXT) + # Add libraries for board support NUTTXLIBS += lib$(DELIM)libconfigs$(LIBEXT) @@ -89,11 +95,8 @@ ifeq ($(CONFIG_NFILE_DESCRIPTORS),0) ifneq ($(CONFIG_NSOCKET_DESCRIPTORS),0) NUTTXLIBS += lib$(DELIM)libfs$(LIBEXT) endif -ifeq ($(CONFIG_NET),y) -NUTTXLIBS += lib$(DELIM)libdrivers$(LIBEXT) -endif else -NUTTXLIBS += lib$(DELIM)libfs$(LIBEXT) lib$(DELIM)libdrivers$(LIBEXT) lib$(DELIM)libbinfmt$(LIBEXT) +NUTTXLIBS += lib$(DELIM)libfs$(LIBEXT) lib$(DELIM)libbinfmt$(LIBEXT) endif # Add libraries for the NX graphics sub-system diff --git a/Kconfig b/Kconfig index 17d6e351f9eb96bb6f72fe51044c4780d9a375a1..c174c16e4cb5e97417909295eeb92d7bd829ba79 100644 --- a/Kconfig +++ b/Kconfig @@ -395,9 +395,14 @@ endmenu # Customize Header Files menu "Debug Options" -config DEBUG +config DEBUG_ALERT + bool + default n + +config DEBUG_FEATURES bool "Enable Debug Features" default n + select DEBUG_ALERT ---help--- Enables built-in debug features. Selecting this option will (1) Enable debug assertions in the code, (2) enable extended parameter testing in @@ -405,71 +410,270 @@ config DEBUG Note that enabling this option by itself does not produce debug output. Debug output must also be selected on a subsystem-by-subsystem basis. -config ARCH_HAVE_HEAPCHECK - bool +if DEBUG_FEATURES + +comment "Debug SYSLOG Output Controls" + +config DEBUG_ERROR + bool "Enable Error Output" default n + ---help--- + Enables output from [a-z]err() statements. Errors are significant system + exceptions that require immediate attention. -if DEBUG +config DEBUG_WARN + bool "Enable Warnings Output" + default n + depends on DEBUG_ERROR + ---help--- + Enables output from [a-z]warn() statements. Warnings are considered to + be various unexpected conditions, potential errors or errors that will + not have serious consequences. -config DEBUG_VERBOSE - bool "Enable Debug Verbose Output" +config DEBUG_INFO + bool "Enable Informational Debug Output" default n + depends on DEBUG_WARN ---help--- - Enables verbose debug output (assuming debug features are enabled). - As a general rule, when DEBUG is enabled only errors will be - reported in the debug SYSLOG output. But if you also enable - DEBUG_VERBOSE, then very chatty (and often annoying) output will be - generated. This means there are two levels of debug output: - errors-only and everything. + Enables verbose "informational" debug output. If you enable + CONFIG_DEBUG_INFO, then very chatty (and often annoying) output + will be generated. + +config DEBUG_ASSERTIONS + bool "Enable Debug Assertions" + default n + ---help--- + Enables the DEBUGASSERT() macro. When CONFIG_DEBUG_ASSERTIONS is + defined, DEBUGASSERT() will cause the system to halt if the + assertion fails. If CONFIG_DEBUG_ASSERTIONS is not defined + DEBUGASSERT() compiled out of the system. In general, you would + set CONFIG_DEBUG_ASSERTIONS=y during debug, but disable the + assertions on a final, buckled up system. comment "Subsystem Debug Options" config DEBUG_AUDIO - bool "Audio Device Debug Output" + bool "Audio Device Debug Features" default n depends on AUDIO ---help--- - Enable low level debug SYSLOG output from the audio subsystem and + Enable audio device debug features. + Enable low level debug featurs for the audio subsystem and for audio device drivers. (disabled by default). Support for this debug option is architecture-specific and may not be available for some MCUs. +if DEBUG_AUDIO + +config DEBUG_AUDIO_ERROR + bool "Audio Device Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable audio device error output to SYSLOG. + +config DEBUG_AUDIO_WARN + bool "Audio Device Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable audio device warning output to SYSLOG. + +config DEBUG_AUDIO_INFO + bool "Audio Device Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable audio device informational output to SYSLOG. + +endif # DEBUG_AUDIO + config DEBUG_BINFMT - bool "Binary Loader Debug Output" + bool "Binary Loader Debug Features" default n depends on !BINFMT_DISABLE ---help--- - Enable binary loader debug SYSLOG output (disabled by default) + Enable binary loader debug features. + +if DEBUG_BINFMT + +config DEBUG_BINFMT_ERROR + bool "Binary Loader Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable binary loader error output to SYSLOG. + +config DEBUG_BINFMT_WARN + bool "Binary Loader Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable binary loader warning output to SYSLOG. + +config DEBUG_BINFMT_INFO + bool "Binary Loader Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable binary loader informational output to SYSLOG. + +endif # DEBUG_BINFMT config DEBUG_CRYPTO - bool "Crypto Debug Output" + bool "Crypto Debug Features" default n depends on CRYPTO ---help--- - Enable Crypto debug SYSLOG output (disabled by default) + Enable cryptographic debug features. + +if DEBUG_CRYPTO + +config DEBUG_CRYPTO_ERROR + bool "Crypto Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable cryptographic error output to SYSLOG. + +config DEBUG_CRYPTO_WARN + bool "Crypto Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable cryptographic warning output to SYSLOG. + +config DEBUG_CRYPTO_INFO + bool "Crypto Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable cryptographic informational output to SYSLOG. + +endif # DEBUG_CRYPTO config DEBUG_FS - bool "File System Debug Output" + bool "File System Debug Features" default n ---help--- - Enable file system debug SYSLOG output (disabled by default) + Enable file system debug features. + +if DEBUG_FS + +config DEBUG_FS_ERROR + bool "File System Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable file system error output to SYSLOG. + +config DEBUG_FS_WARN + bool "File System Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable file system warning output to SYSLOG. + +config DEBUG_FS_INFO + bool "File System Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable file system informational output to SYSLOG. + +endif # DEBUG_FS config DEBUG_GRAPHICS - bool "Graphics Debug Output" + bool "Graphics Debug Features" default n ---help--- - Enable NX graphics debug SYSLOG output (disabled by default) + Enable NX graphics subsystem debug features. + +if DEBUG_GRAPHICS + +config DEBUG_GRAPHICS_ERROR + bool "Graphics Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable NX graphics subsystem error output to SYSLOG. + +config DEBUG_GRAPHICS_WARN + bool "Graphics Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable NX graphics subsystem warning output to SYSLOG. + +config DEBUG_GRAPHICS_INFO + bool "Graphics Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable NX graphics subsystem informational output to SYSLOG. + +endif # DEBUG_GRAPHICS config DEBUG_LIB - bool "C Library Debug Output" + bool "C Library Debug Features" + default n + ---help--- + Enable C library debug features. + +if DEBUG_LIB + +config DEBUG_LIB_ERROR + bool "C Library Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable C library error output to SYSLOG. + +config DEBUG_LIB_WARN + bool "C Library Warnings Output" default n + depends on DEBUG_WARN ---help--- - Enable C library debug SYSLOG output (disabled by default) + Enable C library warning output to SYSLOG. + +config DEBUG_LIB_INFO + bool "C Library Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable C library informational output to SYSLOG. + +endif # DEBUG_LIB config DEBUG_MM - bool "Memory Manager Debug Output" + bool "Memory Manager Debug Features" default n ---help--- - Enable memory management debug SYSLOG output (disabled by default) + Enable memory management debug features. + +if DEBUG_MM + +config DEBUG_MM_ERROR + bool "Memory Manager Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable memory management error output to SYSLOG. + +config DEBUG_MM_WARN + bool "Memory Manager Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable memory management warning output to SYSLOG. + +config DEBUG_MM_INFO + bool "Memory Manager Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable memory management informational output to SYSLOG. + +endif # DEBUG_MM config DEBUG_SHM bool "Shared Memory Debug Output" @@ -479,25 +683,101 @@ config DEBUG_SHM Enable shared memory management debug SYSLOG output (disabled by default) config DEBUG_NET - bool "Network Debug Output" + bool "Network Debug Features" default n depends on ARCH_HAVE_NET ---help--- - Enable network debug SYSLOG output (disabled by default) + Enable network debug features. + +if DEBUG_NET + +config DEBUG_NET_ERROR + bool "Network Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable network error output to SYSLOG. + +config DEBUG_NET_WARN + bool "Network Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable network warning output to SYSLOG. + +config DEBUG_NET_INFO + bool "Network Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable network informational output to SYSLOG. + +endif # DEBUG_NET config DEBUG_SCHED - bool "Scheduler Debug Output" + bool "Scheduler Debug Features" default n ---help--- - Enable OS debug SYSLOG output (disabled by default) + Enable OS scheduler debug features. + +if DEBUG_SCHED + +config DEBUG_SCHED_ERROR + bool "Scheduler Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable OS scheduler error output to SYSLOG. + +config DEBUG_SCHED_WARN + bool "Scheduler Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable OS scheduler warning output to SYSLOG. + +config DEBUG_SCHED_INFO + bool "Scheduler Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable OS scheduler informational output to SYSLOG. + +endif # DEBUG_SCHED config DEBUG_SYSCALL - bool "SYSCALL Debug Output" + bool "SYSCALL Debug Features" default n depends on LIB_SYSCALL ---help--- - Enable very low level output related to system calls. This gives - you basically a poor man's version of strace. + Enable very low level features related to system calls. If SYSCAL + output is enabled, this gives you basically a poor man's version of + strace. + +if DEBUG_SYSCALL + +config DEBUG_SYSCALL_ERROR + bool "SYSCALL Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable OS SYSCALL error output to SYSLOG. + +config DEBUG_SYSCALL_WARN + bool "SYSCALL Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable OS SYSCALL warning output to SYSLOG. + +config DEBUG_SYSCALL_INFO + bool "SYSCALL Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable OS SYSCALL informational output to SYSLOG. + +endif # DEBUG_SYSCALL config DEBUG_WIRELESS bool "Wireless Device Debug Output" @@ -511,25 +791,46 @@ config DEBUG_WIRELESS comment "OS Function Debug Options" config DEBUG_DMA - bool "DMA Debug Output" + bool "DMA Debug Features" default n depends on ARCH_DMA ---help--- - Enable DMA-releated debug SYSLOG output (disabled by default). + Enable DMA debug features. + Support for this debug option is architecture-specific and may not be available for some MCUs. -config DEBUG_HEAP - bool "Heap usage debug hooks" +if DEBUG_DMA + +config DEBUG_DMA_ERROR + bool "DMA Error Output" default n - depends on ARCH_HAVE_HEAPCHECK + depends on DEBUG_ERROR ---help--- - Enable hooks to check heap usage. Only supported by a few architectures. + Enable DMA error output to SYSLOG. + +config DEBUG_DMA_WARN + bool "DMA Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable DMA warning output to SYSLOG. + +config DEBUG_DMA_INFO + bool "DMA Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable DMA informational output to SYSLOG. + +endif # DEBUG_DMA config DEBUG_IRQ - bool "Interrupt Controller Debug Output" + bool "Interrupt Controller Debug Features" default n ---help--- + Enable interrupt controller debug features. + Some (but not all) architectures support debug output to verify interrupt controller logic. If supported, then option will enable that output. This may interfere with normal operations! You @@ -537,158 +838,634 @@ config DEBUG_IRQ that here is a problem with that logic. On some platforms, this option may even cause crashes! Use with care! +if DEBUG_IRQ + +config DEBUG_IRQ_ERROR + bool "DMA Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable interrupt controller error output to SYSLOG. + +config DEBUG_IRQ_WARN + bool "DMA Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable interrupt controller warning output to SYSLOG. + +config DEBUG_IRQ_INFO + bool "DMA Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable interrupt controller informational output to SYSLOG. + +endif # DEBUG_IRQ + config DEBUG_PAGING - bool "Demand Paging Debug Output" + bool "Paging Debug Features" default n depends on PAGING ---help--- - Enable demand paging debug SYSLOG output (disabled by default) + Enable OS demand paging debug features. + +if DEBUG_PAGING + +config DEBUG_PAGING_ERROR + bool "Paging Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable OS demand paging error output to SYSLOG. + +config DEBUG_PAGING_WARN + bool "Paging Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable OS demand paging warning output to SYSLOG. + +config DEBUG_PAGING_INFO + bool "Paging Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable OS demand paging informational output to SYSLOG. + +endif # DEBUG_PAGING comment "Driver Debug Options" config DEBUG_LCD - bool "Low-level LCD Debug Output" + bool "Low-level LCD Debug Features" default n depends on LCD ---help--- - Enable low level debug SYSLOG output from the LCD driver (disabled - by default). Support for this debug option is board-specific and - may not be available for some boards. + Enable LCD driver debug features. + + Support for this debug option is board-specific and may not + be available for some boards. +if DEBUG_LCD + +config DEBUG_LCD_ERROR + bool "LCD Driver Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable LCD driver error output to SYSLOG. + +config DEBUG_LCD_WARN + bool "LCD Driver Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable LCD driver warning output to SYSLOG. + +config DEBUG_LCD_INFO + bool "LCD Driver Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable LCD driver informational output to SYSLOG. + +endif # DEBUG_LCD config DEBUG_LEDS - bool "Low-level LED Debug Output" + bool "Low-level LED Debug Features" default n depends on ARCH_HAVE_LEDS ---help--- - Enable low level debug from board-specific LED logic. Support for - this debug option is board-specific and may not be available for - some boards. + Enable LED driver debug features. + + Support for this debug option is board-specific and may not + be available for some boards. + +if DEBUG_LEDS + +config DEBUG_LEDS_ERROR + bool "LED Driver Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable LED driver error output to SYSLOG. + +config DEBUG_LEDS_WARN + bool "LED Driver Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable LED driver warning output to SYSLOG. + +config DEBUG_LEDS_INFO + bool "LED Driver Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable LED driver informational output to SYSLOG. + +endif # DEBUG_LEDS config DEBUG_INPUT - bool "Input Device Debug Output" + bool "Input Device Debug Features" default n depends on INPUT ---help--- - Enable low level debug SYSLOG output from the input device drivers + Enable input d. + Enable low level evice debug features for the input device drivers such as mice and touchscreens (disabled by default). Support for this debug option is board-specific and may not be available for some boards. +if DEBUG_INPUT + +config DEBUG_INPUT_ERROR + bool "Input Device Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable input device error output to SYSLOG. + +config DEBUG_INPUT_WARN + bool "Input Device Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable input device warning output to SYSLOG. + +config DEBUG_INPUT_INFO + bool "Input Device Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable input device informational output to SYSLOG. + +endif # DEBUG_INPUT + config DEBUG_ANALOG - bool "Analog Device Debug Output" + bool "Analog Device Debug Features" default n + depends on ANALOG ---help--- - Enable low level debug SYSLOG output from the analog device drivers - such as A/D and D/A converters (disabled by default). Support for - this debug option is architecture-specific and may not be available - for some MCUs. + Enable analog device debug features. + Enable low level debug features the analog device drivers such as + A/D and D/A converters (disabled by default). Support for this + debug option is architecture-specific and may not be available for + some MCUs. + +if DEBUG_ANALOG + +config DEBUG_ANALOG_ERROR + bool "Analog Device Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable analog device error output to SYSLOG. + +config DEBUG_ANALOG_WARN + bool "Analog Device Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable analog device warning output to SYSLOG. + +config DEBUG_ANALOG_INFO + bool "Analog Device Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable CAN driver informational output to SYSLOG. + +endif # DEBUG_ANALOG config DEBUG_CAN - bool "CAN Debug Output" + bool "CAN Debug Features" default n depends on CAN ---help--- - Enable CAN driver debug SYSLOG output (disabled by default). + Enable CAN driver debug features. + Support for this debug option is architecture-specific and may not be available for some MCUs. +if DEBUG_CAN + +config DEBUG_CAN_ERROR + bool "CAN Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable CAN driver error output to SYSLOG. + +config DEBUG_CAN_WARN + bool "CAN Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable CAN driver warning output to SYSLOG. + +config DEBUG_CAN_INFO + bool "CAN Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable CAN driver informational output to SYSLOG. + +endif # DEBUG_CAN + config DEBUG_GPIO - bool "GPIO Debug Output" + bool "GPIO Debug Features" default n ---help--- - Enable GPIO-releated debug SYSLOG output (disabled by default). + Enable GPIO debug features. + Support for this debug option is architecture-specific and may not be available for some MCUs. +if DEBUG_GPIO + +config DEBUG_GPIO_ERROR + bool "GPIO Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable GPIO error output to SYSLOG. + +config DEBUG_GPIO_WARN + bool "GPIO Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable GPIO warning output to SYSLOG. + +config DEBUG_GPIO_INFO + bool "GPIO Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable GPIO informational output to SYSLOG. + +endif # DEBUG_GPIO + config DEBUG_I2C - bool "I2C Debug Output" + bool "I2C Debug Features" default n depends on I2C ---help--- - Enable I2C driver debug SYSLOG output (disabled by default). + Enable I2C debug features. + Support for this debug option is architecture-specific and may not be available for some MCUs. +if DEBUG_I2C + +config DEBUG_I2C_ERROR + bool "I2C Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable I2C driver error output to SYSLOG. + +config DEBUG_I2C_WARN + bool "I2C Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable I2C driver warning output to SYSLOG. + +config DEBUG_I2C_INFO + bool "I2C Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable I2C driver informational output to SYSLOG. + +endif # DEBUG_I2C + config DEBUG_I2S - bool "I2S Debug Output" + bool "I2S Debug Features" default n depends on I2S ---help--- - Enable I2S driver debug SYSLOG output (disabled by default). + Enable I2S debug features. + Support for this debug option is architecture-specific and may not be available for some MCUs. +if DEBUG_I2S + +config DEBUG_I2S_ERROR + bool "I2S Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable I2S driver error output to SYSLOG. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +config DEBUG_I2S_WARN + bool "I2S Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable I2S driver warning output to SYSLOG. + +config DEBUG_I2S_INFO + bool "I2S Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable I2S driver informational output to SYSLOG. + +endif # DEBUG_I2S + config DEBUG_PWM - bool "PWM Debug Output" + bool "PWM Debug Features" default n depends on PWM ---help--- - Enable PWM driver debug SYSLOG output (disabled by default). + Enable PWM debug features. + Support for this debug option is architecture-specific and may not be available for some MCUs. +if DEBUG_PWM + +config DEBUG_PWM_ERROR + bool "PWM Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable PWM driver error output to SYSLOG. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +config DEBUG_PWM_WARN + bool "PWM Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable PWM driver warning output to SYSLOG. + +config DEBUG_PWM_INFO + bool "PWM Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable PWM driver informational output to SYSLOG. + +endif # DEBUG_PWM + config DEBUG_RTC - bool "RTC Debug Output" + bool "RTC Debug Features" default n depends on RTC ---help--- - Enable RTC driver debug SYSLOG output (disabled by default). + Enable RTC debug features. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +if DEBUG_RTC + +config DEBUG_RTC_ERROR + bool "RTC Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable RTC driver error output to SYSLOG. + Support for this debug option is architecture-specific and may not be available for some MCUs. -config DEBUG_SDIO - bool "SDIO Debug Output" +config DEBUG_RTC_WARN + bool "RTC Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable RTC driver warning output to SYSLOG. + +config DEBUG_RTC_INFO + bool "RTC Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable RTC driver informational output to SYSLOG. + +endif # DEBUG_RTC + +config DEBUG_MEMCARD + bool "Memory Card Driver Debug Features" default n depends on MMCSD_SDIO ---help--- - Enable SDIO driver debug SYSLOG output (disabled by default). + Enable MMC/SD memory card Driver debug features. + Support for this debug option is architecture-specific and may not be available for some MCUs. +if DEBUG_MEMCARD + +config DEBUG_MEMCARD_ERROR + bool "Memory Card Driver Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable MMC/SD memory card driver error output to SYSLOG. + + Support for this debug option is architecture-specific and may not + be available for some MCUs. + +config DEBUG_MEMCARD_WARN + bool "Memory Card Driver Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable MMC/SD memory card driver warning output to SYSLOG. + +config DEBUG_MEMCARD_INFO + bool "Memory Card Driver Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable MMC/SD memory card driver informational output to SYSLOG. + +endif # DEBUG_MEMCARD + config DEBUG_SENSORS - bool "Sensor Debug Output" + bool "Sensor Debug Features" default n depends on SENSORS ---help--- - Enable sensor driver debug SYSLOG output (disabled by default). + Enable sensor driver debug features. + Support for this debug option is architecture-specific and may not be available for some MCUs. +if DEBUG_SENSORS + +config DEBUG_SENSORS_ERROR + bool "Sensor Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable sensor driver error output to SYSLOG. + +config DEBUG_SENSORS_WARN + bool "Sensor Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable sensor driver warning output to SYSLOG. + +config DEBUG_SENSORS_INFO + bool "Sensor Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable sensor driver informational output to SYSLOG. + +endif # DEBUG_SENSORS + config DEBUG_SPI - bool "SPI Debug Output" + bool "SPI Debug Features" default n depends on SPI ---help--- - Enable I2C driver debug SYSLOG output (disabled by default). + Enable SPI debug features. + Support for this debug option is architecture-specific and may not be available for some MCUs. +if DEBUG_SPI + +config DEBUG_SPI_ERROR + bool "SPI Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable SPI error output to SYSLOG. + +config DEBUG_SPI_WARN + bool "SPI Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable SPI warning output to SYSLOG. + +config DEBUG_SPI_INFO + bool "SPI Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable SPI informational output to SYSLOG. + +endif # DEBUG_SPI + config DEBUG_TIMER - bool "Timer Debug Output" + bool "Timer Debug Features" default n depends on TIMER ---help--- - Enable timer debug SYSLOG output (disabled by default). + Enable timer debug features. + Support for this debug option is architecture-specific and may not be available for some MCUs. +if DEBUG_TIMER + +config DEBUG_TIMER_ERROR + bool "Timer Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable timer error output to SYSLOG. + +config DEBUG_TIMER_WARN + bool "Timer Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable timer warning output to SYSLOG. + +config DEBUG_TIMER_INFO + bool "Timer Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable timer informational output to SYSLOG. + +endif # DEBUG_TIMER + config DEBUG_USB - bool "USB Debug Output" + bool "USB Debug Features" default n depends on USBDEV || USBHOST ---help--- - Enable usb debug SYSLOG output (disabled by default) + Enable USB debug features. + +if DEBUG_USB + +config DEBUG_USB_ERROR + bool "USB Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable USB error output to SYSLOG. + +config DEBUG_USB_WARN + bool "USB Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable USB warning output to SYSLOG. + +config DEBUG_USB_INFO + bool "USB Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable USB informational output to SYSLOG. + +endif # DEBUG_USB config DEBUG_WATCHDOG - bool "Watchdog Timer Debug Output" + bool "Watchdog Timer Debug Features" default n depends on WATCHDOG ---help--- - Enable watchdog timer debug SYSLOG output (disabled by default). + Enable watchdog timer debug features. + Support for this debug option is architecture-specific and may not be available for some MCUs. -endif # DEBUG +if DEBUG_WATCHDOG + +config DEBUG_WATCHDOG_ERROR + bool "Watchdog Timer Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable watchdog time error output to SYSLOG. + +config DEBUG_WATCHDOG_WARN + bool "Watchdog Timer Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable watchdog time warning output to SYSLOG. + +config DEBUG_WATCHDOG_INFO + bool "Watchdog Timer Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable watchdog time informational output to SYSLOG. + +endif # DEBUG_WATCHDOG +endif # DEBUG_FEATURES config ARCH_HAVE_STACKCHECK bool @@ -705,6 +1482,18 @@ config STACK_COLORATION Only supported by a few architectures. +config ARCH_HAVE_HEAPCHECK + bool + default n + +config HEAP_COLORATION + bool "Heap coloration" + default n + depends on ARCH_HAVE_HEAPCHECK + ---help--- + Enable heap coloration to check heap usage. Only supported by a few + architectures. + config DEBUG_SYMBOLS bool "Generate Debug Symbols" default n diff --git a/KernelLibs.mk b/KernelLibs.mk index a7888d714dceec8e15641311fc2fe46a6886d748..719430b6c9be4d435f414d62813dd4b87022f35b 100644 --- a/KernelLibs.mk +++ b/KernelLibs.mk @@ -45,6 +45,12 @@ NUTTXLIBS = lib$(DELIM)libsched$(LIBEXT) USERLIBS = +# Driver support. Generally depends on file descriptor support but there +# are some components in the drivers directory that are needed even if file +# descriptors are not supported. + +NUTTXLIBS += lib$(DELIM)libdrivers$(LIBEXT) + # Add libraries for board support NUTTXLIBS += lib$(DELIM)libconfigs$(LIBEXT) @@ -83,11 +89,8 @@ ifeq ($(CONFIG_NFILE_DESCRIPTORS),0) ifneq ($(CONFIG_NSOCKET_DESCRIPTORS),0) NUTTXLIBS += lib$(DELIM)libfs$(LIBEXT) endif -ifeq ($(CONFIG_NET),y) -NUTTXLIBS += lib$(DELIM)libdrivers$(LIBEXT) -endif else -NUTTXLIBS += lib$(DELIM)libfs$(LIBEXT) lib$(DELIM)libdrivers$(LIBEXT) lib$(DELIM)libbinfmt$(LIBEXT) +NUTTXLIBS += lib$(DELIM)libfs$(LIBEXT) lib$(DELIM)libbinfmt$(LIBEXT) endif # Add libraries for the NX graphics sub-system diff --git a/Makefile.unix b/Makefile.unix index 022c7962169728566385ea3666e8b05b01815b47..a6913ad672a7a87a9b5887a426ab5303a328f8ec 100644 --- a/Makefile.unix +++ b/Makefile.unix @@ -480,22 +480,22 @@ pass2dep: context tools/mkdeps$(HOSTEXEEXT) tools/cnvwindeps$(HOSTEXEEXT) # location: http://ymorin.is-a-geek.org/projects/kconfig-frontends. See # README.txt file in the NuttX tools GIT repository for additional information. -config: apps_preconfig +config: context apps_preconfig $(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-conf Kconfig -oldconfig: apps_preconfig +oldconfig: context apps_preconfig $(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-conf --oldconfig Kconfig -olddefconfig: apps_preconfig +olddefconfig: context apps_preconfig $(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-conf --olddefconfig Kconfig -menuconfig: apps_preconfig +menuconfig: context apps_preconfig $(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-mconf Kconfig -qconfig: apps_preconfig +qconfig: context apps_preconfig $(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-qconf Kconfig -gconfig: apps_preconfig +gconfig: context apps_preconfig $(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-gconf Kconfig # export diff --git a/Makefile.win b/Makefile.win index 5a71a42122b76d51fa96d2422549c6f45480c04a..5556efb79ff28a9a4d183bab6dc7b3ba1bd4c4e9 100644 --- a/Makefile.win +++ b/Makefile.win @@ -480,16 +480,16 @@ pass2dep: context tools\mkdeps$(HOSTEXEEXT) # location: http://ymorin.is-a-geek.org/projects/kconfig-frontends. See # misc\tools\README.txt for additional information. -config: apps_preconfig +config: context apps_preconfig $(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& kconfig-conf Kconfig -oldconfig: apps_preconfig - $(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& kconfig-conf --oldconfig Kconfig +oldconfig: context apps_preconfig + $(Q) context set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& kconfig-conf --oldconfig Kconfig -olddefconfig: apps_preconfig +olddefconfig: context apps_preconfig $(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& kconfig-conf --olddefconfig Kconfig -menuconfig: configenv apps_preconfig +menuconfig: context configenv apps_preconfig $(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& kconfig-mconf Kconfig # export diff --git a/ProtectedLibs.mk b/ProtectedLibs.mk index 70185eacf47162a4f850a36919d398786f3f97b2..4f2e2c6072d35fc34030967de75fa7fe93434c5d 100644 --- a/ProtectedLibs.mk +++ b/ProtectedLibs.mk @@ -45,6 +45,12 @@ NUTTXLIBS = lib$(DELIM)libsched$(LIBEXT) USERLIBS = +# Driver support. Generally depends on file descriptor support but there +# are some components in the drivers directory that are needed even if file +# descriptors are not supported. + +NUTTXLIBS += lib$(DELIM)libdrivers$(LIBEXT) + # Add libraries for board support NUTTXLIBS += lib$(DELIM)libconfigs$(LIBEXT) @@ -89,11 +95,8 @@ ifeq ($(CONFIG_NFILE_DESCRIPTORS),0) ifneq ($(CONFIG_NSOCKET_DESCRIPTORS),0) NUTTXLIBS += lib$(DELIM)libfs$(LIBEXT) endif -ifeq ($(CONFIG_NET),y) -NUTTXLIBS += lib$(DELIM)libdrivers$(LIBEXT) -endif else -NUTTXLIBS += lib$(DELIM)libfs$(LIBEXT) lib$(DELIM)libdrivers$(LIBEXT) lib$(DELIM)libbinfmt$(LIBEXT) +NUTTXLIBS += lib$(DELIM)libfs$(LIBEXT) lib$(DELIM)libbinfmt$(LIBEXT) endif # Add libraries for the NX graphics sub-system diff --git a/README.txt b/README.txt index db0e5e6c10b2e3f515978c38b7a3223be767639c..b3cb19a407d1186cd21c99a0e3c7c5ec67d60efc 100644 --- a/README.txt +++ b/README.txt @@ -960,10 +960,13 @@ Native Windows Build In this build, you cannot use a Cygwin or MSYS shell. Rather the build must be performed in a Windows console window. Here is a better terminal than the standard issue, CMD.exe terminal: ConEmu which can be downloaded from: - http://code.google.com/p/conemu-maximus5/ + https://sourceforge.net/projects/conemu/ or https://conemu.github.io/ . Build Tools. The build still relies on some Unix-like commands. I use - the GNUWin32 tools that can be downloaded from http://gnuwin32.sourceforge.net/. + the GNUWin32 tools that can be downloaded from http://gnuwin32.sourceforge.net/ + using the 'Download all' selection. Individual packages can be download + instead if you know what you are doing and want a faster download (No, I + can't tell you which packages you should or should not download). Host Compiler: I use the MingGW GCC compiler which can be downloaded from http://www.mingw.org/. If you are using GNUWin32, then it is recommended @@ -971,12 +974,13 @@ Native Windows Build This capability should still be considered a work in progress because: - (1) It has not been verified on all targets and tools, and - (2) it still lacks some of the creature-comforts of the more mature environments. + (1) It has not been verified on all targets and tools, and + (2) it still lacks some of the creature-comforts of the more mature + environments. - There is an alternative to the setenv.sh script available for the Windows - native environment: tools/configure.bat. See tools/README.txt for additional - information. + There is an alternative to the setenv.sh script available for the Windows + native environment: tools/configure.bat. See tools/README.txt for additional + information. Installing GNUWin32 ------------------- diff --git a/ReleaseNotes b/ReleaseNotes index 89cf4119a4d6c8e6d8c3d67735711e75b99d81fd..c760fca73723f71cf5a0ac0ae51f45a043ffefad 100644 --- a/ReleaseNotes +++ b/ReleaseNotes @@ -5303,7 +5303,8 @@ Additional new features and extended functionality: can be re-enabled if needed via configuration option. - NXFFS: Make the start up scan of the media a configuration option. It just takes to long and is not really necessary! Those rare cases - where the scan was helpful can be fixed using flash_eraseall(). + where the scan was helpful can be fixed using MDIOC_BULKERASE IOCTL + command. * General Drivers: @@ -10716,3 +10717,365 @@ detailed bugfix information): - Moved C++ initialization logic out of the RTOS and into the application space, specifically to apps/platform/board, where it belongs. + +NuttX-7.16 Release Notes +------------------------ + +The 116th release of NuttX, Version 7.16, was made on June 1, 2016, +and is available for download from the Bitbucket.org website. Note +that release consists of two tarballs: nuttx-7.16.tar.gz and +apps-7.16.tar.gz. These are available from: + + https://bitbucket.org/nuttx/nuttx/downloads + https://bitbucket.org/nuttx/apps/downloads + +Both may be needed (see the top-level nuttx/README.txt file for build +information). + +Additional new features and extended functionality: + + * Core OS: + + - Power Management: Add activity domain to all PM interfaces and + driver callbacks. If CONFIG_PM_NDOMAINS == 1, then the legacy + behavior is preserved. If CONFIG_PM_NDOMAINS > 1, then multiple + PM domains are supported. This will allow separate control for + certain power management groups. For example, a network can be + shut down without affect an ongoing UI (and vice versa). + - board_app_initialize(): board_app_initialize() now accepts an + argument that may be used to support initialization in different + configurations. + + * File System and Block and MTD Drivers: + + - N25Qxxx: Add MTD support for Micron N25Qxxx family of QSPI flash. + From Dave (ziggurat29). + - SST26F: Add an MTD driver for SST26F spi/qspi flash devices (SPI + mode only). From Sebastien Lorquet. + - File Descriptor Detach: 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. + + * Networking and Network Drivers: + + - listen()/accept(): Separate out psock_listen() and psock_accepti() + for internal, thread independent OS usage (i.e., without a socket + descriptor). + - VNC Server: Add support for a VNC server. This logic is code + complete and functional, but not well tested. + + * Graphics and Graphic Drivers: + + - Framebuffer driver: Add a display number to each interface in order + to support multiple display devices. + - VNC Server: Add support for a VNC server. This logic is code + complete and functional, but not well tested. + - LCD Backpack: Add support for PCF8574 LCD Backpack driver. This + driver supports an interface board that is based on the PCF8574 I/O + 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). + + * Common Device Drivers: + + - RTC: Simplify the RTC interface. The old interface was way too + complex and was not fully implemented anywhere. + - BH1750FVI: Add a character driver for Rohm Ambient Light Sensor + BH1750FVI. From Alan Carvalho de Assis. + - CAN: Improve CAN error reporting. From Frank Benkert. + - aes.h: Modifications to the crypto API needed for LPC43xx. From + Alexander Vasiljev. + - ADC: Interface no longer uses global adc_receive() call. Added a + new bind() method to the ADC interface. Now the ADC upper half + driver will register its receipt-of-data callback. This change + allows the ADC lower half driver to be used with a differ ADC upper + half. + + * Simulation Platform: + + - Linux Host Networking: 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. + + * ARMv7-A, ARMv7-R, and ARMv7-M: + + - ARMv7-M: Convert more assembly language files for use with the IAR + toolchain. From Kha Vo. + - ARMv7-A: Complete re-design of SMP-related logic to initialize each + CPUn, n > 0, when CONFIG_SMP=y. + + * Atmel SAMV7: + + - Add a JTAG config and ERASE config to Kconfig to set the + CCFG_SYSIO SYSIO Pins. From David Sidrane. + - System Reset: 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. + + * Atmel SAMV7 Boards: + + - SAMV71-XULT: Add configuration(s) that were be used to verify VNC + graphics output as well as mouse and keyboard input. + + * NXP Freescale i.MX6 Boards: + + - Sabre-6Quad: The basic i.MX6 port is complete. This is a minimal + port at present and probably still has some as-of-yet-undiscovered + issues. + - Sabre-6Quad: Basic SMP NSH configuration is now working. But this + is probably only because the SMP test case does not stress the + logic. There are know outstanding SMP issues as noted in the + Sabre-6Quad README.txt file. + + * NXP Freescale LPC43xx: + + - LPC4337jet100: Add definitions for the LPC4337jet100 chip. From + Alexander Vasiljev. + + * NXP Freescale LPC43xx Drivers: + + - AES: Add AES support. From Alexander Vasiljev. + + * STMicro STM32: + + - STM32 L4: Add configuration options to allow SRAM2 to be used for + heap, or not at all, and to zero-initialize it on OS start, or not + at all. From Dave dev@ziggurat29.com. + - STM32 L4: Add support for HSE and MSI clocks, and auto trim of MSI + to LSE (needed for USB). From Dave (ziggurat29) + - STM32 L4: Add support for unique id function to arch; modified board + to support unique id boardctl. From Dave (ziggurat29) + + * STMicro STM32 Drivers: + + - STM32 F4 RTC: Add a custom RTC driver with support for alarms. From + Neil Hancock. + - STM32 L4 QSPI: Add a QSPI driver with DMA support and (optional + memory mapped mode support. From Dave ziggurat29). + - STM32, STM32 L4, and STM32 F7 Serial: Add support for compliant + SD-style breaks. From David Sidrane. + - STM32 L4 CAN: Add CAN support for STM32L4. From Sebastien Lorquet. + - STM32 1-Wire: 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. + - STM32 L4 SPI: Add support for SPI 4 and 5 on stm32f411 chips. From + Konstantin Berezenko. + - STM32 ADC: Allow omitting use of channels in a lower part of PWM. + From Pierre-noel Bouteville. + - STM32 L4 I2C: Get I2C working for STM32L4. From Dave (ziggurat29). + + * STMicro STM32 Boards: + + - STM3220G-EVAL: Add support for both the IAR and uVision GCC IDEs. + From Kha Vo. + - STM32F429I Discovery: Add support for the uVision GCC IDE. From + Kha Vo. + - STM32F4 Discovery: Integrate BH1750FVI driver in the STM32F4 Discovery + board. From Alan Carvalho de Assis. + - STM32L476VG Discovery: Add support for QSPI based N25Qxxx flash. + From Dave (ziggurat29) + - STM32L476VG Discovery: Add board ioctls for allowing user application + to cause QSPI memory mapped mode to be engaged and disengaged. Also + partitioned QSPI flash for file system and other (eventually xip). + From Dave (ziggurat29) + - Nucleo-144: Basic port for the Nucleo-144 board with the STM32F746ZG + MCU. From Kconstantin Berezenko. + - STM32F103 Minimum: Add support for this minimual STM32F103CBT6 "blue" + board. From Alan Carvalho de Assis. + - STM32F411E Discovery: Add basic configuration for stm32f411e-disco + board with STM32F411VE chip. From Konstantin Berezenko. + + * Build/Configuration System: + + - Moved NuttX repository to https://bitbucket.org/nuttx/nuttx. + Eliminated use of sub-modules. + - Add support for the IAR toolchain for the limited case of the ARMv7-M + architecture and the STM32 chip. From Aleksandr Vyhovanec. + - make export: Pass top-level make to the script to allow -j greater + than 1. From David Sidrane. + - fs/Kconfig: Allow CONFIG_FS_WRITABLE to be manually selectable. This + is needed when there are no writable file systems, but write support + is still needed in BCH or FTL. + - arch/*/Makefile: Add definitions that can be overrided to use GCC + instead of LD in the final link. From Paul Alexander Patience . + + * Applications: apps/netutils: + + - apps/netutils/esp8266: ESP8266 driver application. From Pierre-noel + Bouteville. + + * Applications: apps/examples: + + - apps/examples/alarm: Add a simple test of the ALARM iotcl calls of + the RTC driver. + - apps/examples/nximage: Add a configuration option to select + greyscale. + + * Platforms: apps/platform: + + - apps/platform/nucleo-144: Add platform files for NUCLEO-144 + (NUCLEO-F746ZG). From Mark Olsson. + - apps/examples/media: You can now override the default device driver + path by providing an alternal path on the command line. From + Sbastien Lorquet. + +Works-In-Progress: + + * IEEE802.14.5/6LowPAN. Hooks and framework for this effort were + introduced in NuttX-7.15. Work has continued on this effort on + forks from the main repositories, albeit with many interruptions. + The completion of this wireless feature will postponed until at + least NuttX-7.17. + + * i.MX6 SMP. Partially functional, but there is more that still + needs to be done. + +Bugfixes. Only the most critical bugfixes are listed here (see the +ChangeLog for the complete list of bugfixes and for additional, more +detailed bugfix information): + + * Core OS: + + - Various places: Search for places where a stray semicolon following + an if condition cause the if body to be executed unconditionally. + Fixes in all SAM DMA logic, unionfs, OS signalling logic, and others. + - enter/leave_critical_section() may attempt to access task lists + before they have been initialized in the SMP configuration. + + * File System/Block Drivers: + + - SMART MTD: Return code of smart_scan not checked, can cause success + result in failure case, leading to 'dev' pointer being invalid. From + Dave (ziggurat29) + - mount: Fix a backward debug assertion. Noted by David Sidrane. + + * Common Drivers: + + - NRF24L01: Fix backward calculation of relative frequency. Noted by + Henry Zhang. + - PCA9555 I/O expander: Fix an error in the PCA9555 driver: Under + certain error conditions, interrupts were not being re-enabled. + Sebastien Lorquet. + - ADS1255: Must not do SPI access from interrupt handler. Use the + worker thread instead. Must also lock the SPI bus before using it. + - Several SPI-based drivers modified. All drivers that use SPI must + call SPI_LOCK and SPI_UNLOCK. This is not optional. + - MS583730: Fix a bug in crc computation for ms583730. Implement + POSIX read. + + * Atmel SAMV7: + + - Fix typo in MATRIX register definitions. From Stefan Kolb. + - SAMV7 Tickless Mode: This is a fix to a problem in the handling of + the oneshot timer. Due to a wrong assumption concerning the behavior + directly after the start of the timer/counter the function + sam_oneshot_cancel() calculates the wrong remaining time. The code + assumes that the counter register is zero directly after the start + of the timer, but this is not true. To start the time/counter a + software trigger is invoked, this trigger starts the timer/count and + sets the counter register to zero, but the reset of the counter + register is not performed instantly. According to the datasheet: + "The counter can be reset by a trigger. In this case, the counter + value passes to zero on the next valid edge of the selected clock." + Thus the counter is set to zero between 0 and USEC_PER_TICK + microseconds after the clock was started. + In my fix I use the freerun count value to determine if at least one + tick passed since the start of the timer and thus if the value of + the oneshot counter is correct. I also tried to use the function + up_timer_gettime() to achieve this but, at least if compiled with + no optimization the problem vanishes without using the value of the + function, the function call takes too long. + Another problem treated in the fix is that if the oneshot timer/counter + is canceled, we only know the remaining time with a precision of + USEC_PER_TICK microseconds. This means the calculated remaining time + is between 0 and USEC_PER_TICK microseconds too long. To fix this I + subtract one tick if the calculated remaining time is greater than + one tick and otherwise set the remaining time to zero. By doing so + the measured times are much more precise as without it. From Stefan + Kolb. + + * Atmel SAMA5: + + - SAMA5: Stefan Kolb's change to the SAMV7 Oneshot Timer should also + be applied to the SAMA5 oneshot time since the drivers are identical. + + * Atmel SAM3/4: + + - SAM3/4: Stefan Kolb's change to the SAMV7 Oneshot Timer should also + be applied to the SAM3/4 oneshot time since the drivers are identical. + + * Atmel SAMV7 Drivers: + + - SAMV7 TWIHS (as well as SAM3/4 and SAMA5: 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. + - USBHS Device: 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. + - MCAN: Fix missing unlock of device in MCAN mcan_txempty(). From + Frank Benkert. + + * STMicro STM32: + + - STM32 L4 Clocking: Problem with resetting backup domain clears + clocking options set up before in *rcc.c use INITS flag to avoid + magic reg value to detect power up reset state of RTC correct a + problem clearing interrupt flags (they weren't) which prevented an + alarm from ever being used more than once per reset cycle. From + Dave (ziggurat29) + + * STMicro STM32 Drivers: + + - STM32L4 SPI: That STM32Lr SPI driver is quite different. They now + handle frames of arbitrary size between 4 and 16 bits. It was broken + before a new bit has to be set (RX fifo threshold) to handle <= 8-bit + transactions. If not set, the default is 16-bit packed >=8-bit + frames and the RXNE bit is never set (it is set when 16-bits are + received). weird things as always. This also add 8-bit access + routines to the data register, because a 16-bit access to the data + register when the frame size is below 9 bits is interpreted as a + packed dual frame exchange. Sebastien Lorquet. + - STM32: Correct some bad commits that broke the LTDC display example. + From Marco Krahl. + - STM32 F4 RTC: Fix logic in F4 RTCC driver that prevent ALARM + interrupt. From Neil Hancock. + - STM32 F1 ADC: Fix STM32 ValueLine ADC IRQ number selection. From + David Sidrane. + + * STMicro STM32 Boards: + + - STM32F429I Discovery: Correct some bad commits that broke the LTDC + display example. From Marco Krahl. + + * TI Tiva: + + - GPIO Interrupts: Fix a bug of GPIO falling-edge interrupt for tiva. + From Young. + + * C Library: + + - math: Add a NAN test on 'x' in asin function of lib_asin.c. Suggested + by Pierre-noel Bouteville. + + * Build/Configuration System: + + - Several Makefiles: Add .PHONY definitions to prevent 'clean up to date' + message weirdness when 'make clean' is done with no .config or + Make.defs file. diff --git a/TODO b/TODO index eeb3e6d29dd90561c3bde9a85ba40df051df2874..a4c960e2e18b5004b1242728731a7c3ee3caa424 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,4 @@ -NuttX TODO List (Last updated May 28, 2016) +NuttX TODO List (Last updated June 6, 2016) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This file summarizes known NuttX bugs, limitations, inconsistencies with @@ -23,7 +23,7 @@ nuttx/: (11) Libraries (libc/, libm/) (11) File system/Generic drivers (fs/, drivers/) (8) Graphics subsystem (graphics/) - (1) Build system / Toolchains + (2) Build system / Toolchains (3) Linux/Cywgin simulation (arch/sim) (4) ARM (arch/arm/) @@ -599,6 +599,12 @@ o Kernel/Protected Build For a truly secure system. Privileges need to be checked in every interface that permits one thread to modify the properties of another thread. + + NOTE: It would be a simple matter to simply disable user + threads from modifying privileged threads. However, you + might also want to be able to modify privileged threads from + user tasks with certain permissions. Permissions is a much + more complex issue. Status: Open Priority: Low for most embedded systems but would be a critical need if NuttX were used in a secure system. @@ -1595,6 +1601,19 @@ o Build system Status: Open Priority: Low. + Title: NATIVE WINDOWS BUILD BROKEN + Description: The way that apps/ no generates Kmenu files depends on changes added + to apps/tools/mkkconfig.sh. Similar changes need to be made to + apps/tools/mkkconfig.bat to restore the Windows Native build. + UPDATE: The mkkconfig.bat script has been updated and appears to work. + A native build has still not been attempted and there could likely be + issues the carriage returns in Kconfig files. There are also some + issues the interpreters/ficl and bas directories during 'make menuconfig' + that still need to be investigated. + Status: Open + Priority: Low, since I am not aware of anyone using the Windows Native build. + But, of course, very high if you want to use it. + o Other drivers (drivers/) ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/arch/Kconfig b/arch/Kconfig index fd61f2fbf55f96b6af107d6dc625c9454d389d94..fa5bf48edaac40ba39ebdad7f7ad75fc5d50b770 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -58,6 +58,7 @@ config ARCH_SIM select ARCH_HAVE_TLS select ARCH_HAVE_TICKLESS select ARCH_HAVE_POWEROFF + select SERIAL_CONSOLE ---help--- Linux/Cywgin user-mode simulation. @@ -525,6 +526,7 @@ config ARCH_IRQPRIO config ARCH_STACKDUMP bool "Dump stack on assertions" default n + select DEBUG_ALERT ---help--- Enable to do stack dumps after assertions diff --git a/arch/README.txt b/arch/README.txt index df34133df9c310d0555b4c7a0c033cbe5946d062..114f2f6f1e7e430067cf244458edbc5a37ffada5 100644 --- a/arch/README.txt +++ b/arch/README.txt @@ -134,6 +134,8 @@ src/Makefile Supported Architectures ^^^^^^^^^^^^^^^^^^^^^^^ +NOTE: nuttx/Documentation/NuttX.html for current information about the +state of these MCU ports. arch/sim - Linux/Cygwin simulation A user-mode port of NuttX to the x86 Linux platform is available. @@ -145,135 +147,68 @@ arch/arm - ARM-based micro-controllers This directory holds common ARM architectures. At present, this includes the following subdirectories: - arch/arm/include and arch/arm/src/common - Common ARM/Cortex-M3 logic. - - arch/arm/src/arm and arch/arm/include/arm - Common ARM-specific logic - - arch/arm/src/armv7-m and arch/arm/include/armv7-m - Common ARMv7-M logic (Cortex-M3 and Cortex-M4) - - arch/arm/include/c5471 and arch/arm/src/c5471 - TI TMS320C5471 (also called TMS320DM180 or just C5471). - NuttX operates on the ARM7 of this dual core processor. This port - complete, verified, and included in the NuttX release 0.1.1. - - arch/arm/include/calypso and arch/arm/src/calypso - TI "Calypso" MCU used in various cell phones (and, in particular, - by the Osmocom-bb project). Like the c5471, NuttX operates on the - ARM7 of this dual core processor. This port was contributed by - Denis Carilki and includes the work of Denis, Alan Carvalho de Assis, - and Stefan Richter. Calypso support first appeared in NuttX-6.17. - - arch/arm/include/dm320 and arch/arm/src/dm320 - TI TMS320DM320 (also called just DM320). - NuttX operates on the ARM9EJS of this dual core processor. This port - complete, verified, and included in the NuttX release 0.2.1. - - arch/arm/include/imx and arch/arm/src/imx - Freescale MC9328MX1 or i.MX1. This port uses the Freescale MX1ADS - development board with a GNU arm-elf toolchain* under either Linux or Cygwin. - STATUS: This port has stalled because of development tool issues. Coding - is complete on the basic port (timer, serial console, SPI). - - arch/arm/include/lm and arch/arm/src/lm - These directories contain support for the Luminary LM3S/4F family. The - initial, release of this port was included in NuttX version 0.4.6. The - current port includes timer, serial console, Ethernet, SSI, and microSD - support. There are working configurations the NuttX OS test, to run the - NuttShell (NSH), the NuttX networking test, and the uIP web server. - - arch/arm/include/lpc214x and arch/arm/src/lpc214x - These directories provide support for NXP LPC214x family of - ARM7TDMI processors. This port boots and passes the OS test (examples/ostest). - The port is complete and verifed. As of NuttX 0.3.17, the port includes: - timer interrupts, serial console, USB driver, and SPI-based MMC/SD card - support. A verifed NuttShell (NSH) configuration is also available. - - arch/arm/include/lpc2378 and arch/arm/src/lpc2378. - NXP LPC2378. Support is provided for the NXP LPC2378 MCU. This port was - contributed by Rommel Marcelo is was first released in NuttX-5.3. - STATUS: This port boots and passes the OS test (examples/ostest) and - includes a working implementation of the NuttShell (NSH). The port is - complete and verified. As of NuttX 5.3, the port includes only basic - timer interrupts and serial console support. - - arch/arm/include/lpc31xx and arch/arm/src/lpc31xx - These directories provide support for NXP LPC31xx family of - ARM926EJ-S processors. The port for the NXP LPC3131 was first - released in NuttX-5.1 (but was not functional until NuttX-5.2). - STATUS: The basic EA3131 port is complete and verified in NuttX-5.2 - This basic port includes basic boot-up, serial console, and timer - interrupts. This port was extended in NuttX 5.3 with a USB high - speed driver contributed by David Hewson. This port has been - verified using the NuttX OS test, USB serial and mass storage tests - and includes a working implementation of the NuttShell ((NSH)). - - This port was later extended to support additional members of the - LPC31xx family including, specifically, the LPC3152. - - arch/arm/include/sam3u and arch/arm/src/sam3u - Atmel AT91SAM3U. This port is for Atmel AT91SAM3U4E MCU. - STATUS: The basic AT91SAM3U port was released in NuttX version 5.1. - The basic port includes boot-up logic, interrupt driven serial - console, and system timer interrupts. That release passes the - NuttX OS test and is proven to have a valid OS implementation. A - onfiguration to support the NuttShell is also included. - - arch/arm/include/stm32 and arch/arm/src/stm32 - These directories contain support for the STMicro STM32 F1, F2, and - F4 families. - - STATUS: The basic STM32 F1 port was released in NuttX version 0.4.12. - and has continued to develop consistently over time. It now includes - support for the F2 and F4 families and a rich offering of peripheral - drivers. - - arch/arm/include/str71x and arch/arm/src/str71x - These directories provide support for the STMicro STR71x processors. - Coding is complete on the basic port (boot logic, system time, serial console), - but no testing has been performed due to some problems I am having with my - JTAG wiggler and OpenOCD on Linux. + Architecture Support + arch/arm/include and arch/arm/src/common + arch/arm/src/arm and arch/arm/include/arm + arch/arm/src/armv7-a and arch/arm/include/armv7-a + arch/arm/src/armv7-m and arch/arm/include/armv7-m + arch/arm/src/armv7-r and arch/arm/include/armv7-4 + + MCU support + arch/arm/include/c5471 and arch/arm/src/c5471 + arch/arm/include/calypso and arch/arm/src/calypso + arch/arm/include/dm320 and arch/arm/src/dm320 + arch/arm/include/efm32 and arch/arm/src/efm32 + arch/arm/include/imx1 and arch/arm/src/imx1 + arch/arm/include/imx6 and arch/arm/src/imx6 + arch/arm/include/kinetis and arch/arm/src/kinetis + arch/arm/include/kl and arch/arm/src/kl + arch/arm/include/lpc11xx and arch/arm/src/lpc11xx + arch/arm/include/lpc17xx and arch/arm/src/lpc17xx + arch/arm/include/lpc214x and arch/arm/src/lpc214x + arch/arm/include/lpc2378 and arch/arm/src/lpc2378. + arch/arm/include/lpc31xx and arch/arm/src/lpc31xx + arch/arm/include/lpc43xx and arch/arm/src/lpc43xx + arch/arm/include/moxart and arch/arm/src/moxart + arch/arm/include/nuc1xx and arch/arm/src/nuc1xx + arch/arm/include/sam34 and arch/arm/src/sam34 + arch/arm/include/sama45 and arch/arm/src/sama5 + arch/arm/include/samdl and arch/arm/src/samdl + arch/arm/include/samv7 and arch/arm/src/samv7 + arch/arm/include/stm32 and arch/arm/src/stm32 + arch/arm/include/stm32f7 and arch/arm/src/stm32f7 + arch/arm/include/stm32l4 and arch/arm/src/stm32l4 + arch/arm/include/str71x and arch/arm/src/str71x + arch/arm/include/tiva and arch/arm/src/tiva + arch/arm/include/tms570 and arch/arm/src/tms570 arch/avr This directory is dedicated to ports to the Atmel AVR (8-bit) and AVR32 (32-bit) MCU families. STATUS: Under development. - arch/avr/include/avr and arch/avr/src/avr - Common support for all 8-bit AVR MCUs + Architecture Support + arch/avr/include/avr and arch/avr/src/avr + arch/avr/include/avr32 and arch/avr/src/avr32 - arch/avr/include/atmega and arch/avr/src/atmega - Support specifically for the AVR ATMega family (specifically only for - the ATMega128 at the moment). - - arch/avr/include/at90usb and arch/avr/src/at90usb - Support specifically for the AVR AT90USB646, 647, 1286, and 1287 family. - - arch/avr/include/avr32 and arch/avr/src/avr32 - Common support for all AVR32 MCUs - - arch/avr/include/at32uc3 and arch/avr/src/at32uc3 - Support specifically for the AT32UC3Bxxx family (specifically only for - the AT32UC3B0256 at the moment). + MCU support + arch/avr/include/atmega and arch/avr/src/atmega + arch/avr/include/at90usb and arch/avr/src/at90usb + arch/avr/include/at32uc3 and arch/avr/src/at32uc3 arch/hc This directory is dedicated to ports to the Freescale HC family. arch/arm/include/m9s12 and arch/arm/src/m9s12 - These directories provide support for the Freescale mc9s12x family. - STATUS: Fragments of this port were first released in nuttx-5.0 and - the port was "code-complete" as nuttx-5.18. However, the final - verification effort has been stalled because of higher priority tasks. arch/mips This directory is dedicated to ports to the MIPS family. - arch/mips/include/mips32 and arch/mips/src/mips32 - Common support for all MIPS32 architectures + Architecture Support + arch/mips/include/mips32 and arch/mips/src/mips32 - arch/mips/include/pic32mx and arch/mips/src/pic32mx - Support for all MicroChip PIC32MX architectures + MCU support + arch/mips/include/pic32mx and arch/mips/src/pic32mx + arch/mips/include/pic32mz and arch/mips/src/pic32mz arch/rgmp @@ -288,52 +223,42 @@ arch/rgmp arch/sh - SuperH and related Hitachi/Renesas microcontrollers - arch/sh/include and arch/sh/src/common - Common SuperH logic. + Architecture Support + arch/sh/include and arch/sh/src/common - arch/sh/include/shs and arch/sh/src/sh1 - Support for the SH-1 processor. + MCU support + arch/sh/include/m16c and arch/sh/src/m16c + arch/sh/include/sh1 and arch/sh/src/sh1 arch/x86 - Intel x86 architectures This directory holds related, 32- and 64-bit architectures from Intel. At present, this includes the following subdirectories: - arch/x86/include and arch/x86/src/common - Common x86 logic. + Architecture Support + arch/x86/include and arch/x86/src/common - arch/x86/include/i486 and arch/x86/src/i486 - These directories hold definitions and logic appropriate for any - instantiation of the 32-bit i486 architecture. - - arch/x86/include/qemu and arch/x86/src/qemu - This is the implementation of NuttX on the QEMU x86 simulation. + MCU support + arch/x86/include/i486 and arch/x86/src/i486 + arch/x86/include/qemu and arch/x86/src/qemu arch/z16 - ZiLOG 16-bit processors This directory holds related, 16-bit architectures from ZiLOG. At present, this includes the following subdirectories: - arch/z16/include and arch/z16/src/common - Common microcontroller logic. + Architecture Support + arch/z16/include and arch/z16/src/common - arch/z16/include/z16f and arch/z16/src/z16f - ZiLOG z16f Microcontroller. - STATUS: Released in nuttx-0.3.7. Fully functional other than issues - addressed in ${TOPDIR}/TODO. + MCU support + arch/z16/include/z16f and arch/z16/src/z16f arch/z80 - ZiLOG 8-bit microcontrollers This directory holds related, 8-bit architectures from ZiLOG. At present, this includes the following subdirectories: - arch/z80/include and arch/z80/src/common - Common microcontroller logic. - - arch/z80/include/z80 and arch/z80/src/z80 - Classic ZiLOG z80 Microcontroller. - STATUS: Functional with no known defects. There are still several - OS features that have not yet been tested (e.g., networking). - - arch/z80/include/z8 and arch/z80/src/z8 - ZiLOG Z8Encore! Microcontroller + Architecture Support + arch/z80/include and arch/z80/src/common - arch/z80/include/ez80 and arch/z80/src/ez80 - ZiLOG ez80 Acclaim! Microcontroller + MCU support + arch/z80/include/z80 and arch/z80/src/z80 + arch/z80/include/z8 and arch/z80/src/z8 + arch/z80/include/ez80 and arch/z80/src/ez80 diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 6b6c046060d4e3ba2d7233c2a90d9f18b1c401f0..fcc1c9ce9821b82dbbfc1f61b1bf29523a391529 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -213,6 +213,7 @@ config ARCH_CHIP_SAMV7 select ARCH_HAVE_RAMFUNCS select ARCH_HAVE_TICKLESS select ARMV7M_HAVE_STACKCHECK + select ARCH_HAVE_I2CRESET ---help--- Atmel SAMV7 (ARM Cortex-M7) architectures @@ -588,7 +589,7 @@ config ARCH_ROMPGTABLE config DEBUG_HARDFAULT bool "Verbose Hard-Fault Debug" default n - depends on DEBUG && (ARCH_CORTEXM3 || ARCH_CORTEXM4 || ARCH_CORTEXM7) + depends on DEBUG_FEATURES && (ARCH_CORTEXM3 || ARCH_CORTEXM4 || ARCH_CORTEXM7) ---help--- Enables verbose debug output when a hard fault is occurs. This verbose output is sometimes helpful when debugging difficult hard fault problems, diff --git a/arch/arm/include/efm32/irq.h b/arch/arm/include/efm32/irq.h index 7bd0449d621d225ad6408ea8d6422c28f71e4781..a5f2eff8e47850dc2826a75f7887f0bbe7461022 100644 --- a/arch/arm/include/efm32/irq.h +++ b/arch/arm/include/efm32/irq.h @@ -60,7 +60,7 @@ /* Processor Exceptions (vectors 0-15) */ -#define EFM32_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG) */ +#define EFM32_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG_FEATURES) */ /* Vector 0: Reset stack pointer value */ /* Vector 1: Reset (not handler as an IRQ) */ #define EFM32_IRQ_NMI (2) /* Vector 2: Non-Maskable Interrupt (NMI) */ diff --git a/arch/arm/include/kinetis/irq.h b/arch/arm/include/kinetis/irq.h index 3355f29b02cf2dcaa2570722632ddea9bd1c57a9..16b59ab8ae96fc4054e91e16ac849c0cb2f2293f 100644 --- a/arch/arm/include/kinetis/irq.h +++ b/arch/arm/include/kinetis/irq.h @@ -58,7 +58,7 @@ /* Processor Exceptions (vectors 0-15) */ -#define KINETIS_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG) */ +#define KINETIS_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG_FEATURES) */ /* Vector 0: Reset stack pointer value */ /* Vector 1: Reset (not handler as an IRQ) */ #define KINETIS_IRQ_NMI (2) /* Vector 2: Non-Maskable Interrupt (NMI) */ diff --git a/arch/arm/include/kl/irq.h b/arch/arm/include/kl/irq.h index 27ba8575f52d023f7c9324244a967c05075b6d1c..93021827300d09f52eb1c91b7518cbe43a6d123c 100644 --- a/arch/arm/include/kl/irq.h +++ b/arch/arm/include/kl/irq.h @@ -58,7 +58,7 @@ /* Processor Exceptions (vectors 0-15) */ -#define KL_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG) */ +#define KL_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG_FEATURES) */ /* Vector 0: Reset stack pointer value */ /* Vector 1: Reset (not handler as an IRQ) */ #define KL_IRQ_NMI (2) /* Vector 2: Non-Maskable Interrupt (NMI) */ diff --git a/arch/arm/include/lpc11xx/irq.h b/arch/arm/include/lpc11xx/irq.h index caac7c3e170c1d858882bbf13a32ae10bb6741fd..46ff7d27cac9225a98bca731e1a287dff5beb9ab 100644 --- a/arch/arm/include/lpc11xx/irq.h +++ b/arch/arm/include/lpc11xx/irq.h @@ -59,7 +59,7 @@ /* Common Processor Exceptions (vectors 0-15) */ -#define LPC11_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG) */ +#define LPC11_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG_FEATURES) */ /* Vector 0: Reset stack pointer value */ /* Vector 1: Reset (not handler as an IRQ) */ #define LPC11_IRQ_NMI (2) /* Vector 2: Non-Maskable Interrupt (NMI) */ diff --git a/arch/arm/include/lpc17xx/irq.h b/arch/arm/include/lpc17xx/irq.h index 6af683225ca64dbcad3a639e1f64714018f68976..99bffe17ebbd38510bc10b734fcd1623d480e010 100644 --- a/arch/arm/include/lpc17xx/irq.h +++ b/arch/arm/include/lpc17xx/irq.h @@ -59,7 +59,7 @@ /* Common Processor Exceptions (vectors 0-15) */ -#define LPC17_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG) */ +#define LPC17_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG_FEATURES) */ /* Vector 0: Reset stack pointer value */ /* Vector 1: Reset (not handler as an IRQ) */ #define LPC17_IRQ_NMI (2) /* Vector 2: Non-Maskable Interrupt (NMI) */ diff --git a/arch/arm/include/lpc43xx/chip.h b/arch/arm/include/lpc43xx/chip.h index a88559df21b6055a38e815e52b0ff040b9412125..4592117de184bb059bacd774145714233b1c4e17 100644 --- a/arch/arm/include/lpc43xx/chip.h +++ b/arch/arm/include/lpc43xx/chip.h @@ -322,8 +322,8 @@ # define LPC43_NADC10_CHANNELS (8) /* Eight ADC channels */ # undef LPC43_NADC12 /* No 12-bit ADC controllers */ #elif defined(CONFIG_ARCH_CHIP_LPC4337JBD144) -# define LPC43_FLASH_BANKA_SIZE (512*1025) /* 1024Kb FLASH */ -# define LPC43_FLASH_BANKB_SIZE (512*1025) +# 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 */ @@ -426,8 +426,8 @@ # define LPC43_NADC10_CHANNELS (8) /* Eight ADC channels */ # undef LPC43_NADC12 /* No 12-bit ADC controllers */ #elif defined(CONFIG_ARCH_CHIP_LPC4353FBD208) -# define LPC43_FLASH_BANKA_SIZE (256*1025) /* 512Kb FLASH */ -# define LPC43_FLASH_BANKB_SIZE (256*1025) +# define LPC43_FLASH_BANKA_SIZE (256*1024) /* 512Kb FLASH */ +# define LPC43_FLASH_BANKB_SIZE (256*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 */ @@ -452,8 +452,8 @@ # define LPC43_NADC10_CHANNELS (8) /* Eight ADC channels */ # undef LPC43_NADC12 /* No 12-bit ADC controllers */ #elif defined(CONFIG_ARCH_CHIP_LPC4353FET180) -# define LPC43_FLASH_BANKA_SIZE (256*1025) /* 512Kb FLASH */ -# define LPC43_FLASH_BANKB_SIZE (256*1025) +# define LPC43_FLASH_BANKA_SIZE (256*1024) /* 512Kb FLASH */ +# define LPC43_FLASH_BANKB_SIZE (256*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 */ @@ -478,8 +478,8 @@ # define LPC43_NADC10_CHANNELS (8) /* Eight ADC channels */ # undef LPC43_NADC12 /* No 12-bit ADC controllers */ #elif defined(CONFIG_ARCH_CHIP_LPC4353FET256) -# define LPC43_FLASH_BANKA_SIZE (256*1025) /* 512Kb FLASH */ -# define LPC43_FLASH_BANKB_SIZE (256*1025) +# define LPC43_FLASH_BANKA_SIZE (256*1024) /* 512Kb FLASH */ +# define LPC43_FLASH_BANKB_SIZE (256*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 */ @@ -504,8 +504,8 @@ # define LPC43_NADC10_CHANNELS (8) /* Eight ADC channels */ # undef LPC43_NADC12 /* No 12-bit ADC controllers */ #elif defined(CONFIG_ARCH_CHIP_LPC4357FET180) -# define LPC43_FLASH_BANKA_SIZE (512*1025) /* 1024Kb FLASH */ -# define LPC43_FLASH_BANKB_SIZE (512*1025) +# 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 */ @@ -530,8 +530,8 @@ # define LPC43_NADC10_CHANNELS (8) /* Eight ADC channels */ # undef LPC43_NADC12 /* No 12-bit ADC controllers */ #elif defined(CONFIG_ARCH_CHIP_LPC4357FBD208) -# define LPC43_FLASH_BANKA_SIZE (512*1025) /* 1024Kb FLASH */ -# define LPC43_FLASH_BANKB_SIZE (512*1025) +# 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 */ @@ -556,8 +556,8 @@ # define LPC43_NADC10_CHANNELS (8) /* Eight ADC channels */ # undef LPC43_NADC12 /* No 12-bit ADC controllers */ #elif defined(CONFIG_ARCH_CHIP_LPC4357FET256) -# define LPC43_FLASH_BANKA_SIZE (512*1025) /* 1024Kb FLASH */ -# define LPC43_FLASH_BANKB_SIZE (512*1025) +# 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 */ diff --git a/arch/arm/include/lpc43xx/irq.h b/arch/arm/include/lpc43xx/irq.h index 9b103e97185005d00d3e254fee0d6ca03ccf3fce..dd9790ab10774093de24bfce479ecf4ee39f4103 100644 --- a/arch/arm/include/lpc43xx/irq.h +++ b/arch/arm/include/lpc43xx/irq.h @@ -59,7 +59,7 @@ /* Processor Exceptions (vectors 0-15) */ -#define LPC43_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG) */ +#define LPC43_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG_FEATURES) */ /* Vector 0: Reset stack pointer value */ /* Vector 1: Reset (not handler as an IRQ) */ #define LPC43_IRQ_NMI (2) /* Vector 2: Non-Maskable Interrupt (NMI) */ diff --git a/arch/arm/include/nuc1xx/irq.h b/arch/arm/include/nuc1xx/irq.h index 0db0379d1b4b4360b1ba4fe68491c546afcdf1d5..26b0d8125f510f055abdc400f8e08a8e66e52a44 100644 --- a/arch/arm/include/nuc1xx/irq.h +++ b/arch/arm/include/nuc1xx/irq.h @@ -58,7 +58,7 @@ /* Processor Exceptions (vectors 0-15) */ -#define NUC_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG) */ +#define NUC_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG_FEATURES) */ /* Vector 0: Reset stack pointer value */ /* Vector 1: Reset (not handler as an IRQ) */ #define NUC_IRQ_NMI (2) /* Vector 2: Non-Maskable Interrupt (NMI) */ diff --git a/arch/arm/include/sam34/irq.h b/arch/arm/include/sam34/irq.h index 521cd5a93cd71b10d8f5076fb8283a0bd4fbc423..a0f5de604f78b1455b2e72f10108a31f4c8efd42 100644 --- a/arch/arm/include/sam34/irq.h +++ b/arch/arm/include/sam34/irq.h @@ -58,7 +58,7 @@ /* Common Processor Exceptions (vectors 0-15) */ -#define SAM_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG) */ +#define SAM_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG_FEATURES) */ /* Vector 0: Reset stack pointer value */ /* Vector 1: Reset (not handler as an IRQ) */ #define SAM_IRQ_NMI (2) /* Vector 2: Non-Maskable Interrupt (NMI) */ diff --git a/arch/arm/include/samdl/irq.h b/arch/arm/include/samdl/irq.h index d74584fb298cc557b03dfe5dfb2804d0a811152c..7da8c7b21e6282b70b4645c57fb806645ef07fc2 100644 --- a/arch/arm/include/samdl/irq.h +++ b/arch/arm/include/samdl/irq.h @@ -58,7 +58,7 @@ /* Processor Exceptions (vectors 0-15) */ -#define SAM_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG) */ +#define SAM_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG_FEATURES) */ /* Vector 0: Reset stack pointer value */ /* Vector 1: Reset (not handler as an IRQ) */ #define SAM_IRQ_NMI (2) /* Vector 2: Non-Maskable Interrupt (NMI) */ diff --git a/arch/arm/include/samv7/irq.h b/arch/arm/include/samv7/irq.h index 4c33f3dbec0bb4b61b846958c7226f274b549b84..eec3d12e054038332fe20043930130db88ed1820 100644 --- a/arch/arm/include/samv7/irq.h +++ b/arch/arm/include/samv7/irq.h @@ -58,7 +58,7 @@ /* Common Processor Exceptions (vectors 0-15) */ -#define SAM_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG) */ +#define SAM_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG_FEATURES) */ /* Vector 0: Reset stack pointer value */ /* Vector 1: Reset (not handler as an IRQ) */ #define SAM_IRQ_NMI (2) /* Vector 2: Non-Maskable Interrupt (NMI) */ diff --git a/arch/arm/include/stm32/chip.h b/arch/arm/include/stm32/chip.h index 98d0073c50617e9ab25a7cb6ddf2e99f0ffb3586..e476bff892e5eaa37ba673c01d64096eb2359b22 100644 --- a/arch/arm/include/stm32/chip.h +++ b/arch/arm/include/stm32/chip.h @@ -903,6 +903,43 @@ # define STM32_NRNG 0 /* No random number generator (RNG) */ # define STM32_NDCMI 0 /* No digital camera interface (DCMI) */ +#elif defined(CONFIG_ARCH_CHIP_STM32F105RB) +# undef CONFIG_STM32_STM32L15XX /* STM32L151xx and STM32L152xx family */ +# undef CONFIG_STM32_ENERGYLITE /* STM32L EnergyLite family */ +# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */ +# undef CONFIG_STM32_LOWDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */ +# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */ +# 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 */ +# define CONFIG_STM32_CONNECTIVITYLINE 1 /* STM32F105x and STM32F107x */ +# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */ +# undef CONFIG_STM32_STM32F30XX /* STM32F30xxx family */ +# undef CONFIG_STM32_STM32F37XX /* STM32F37xxx family */ +# undef CONFIG_STM32_STM32F40XX /* STM32F405xx and STM32407xx */ +# define STM32_NFSMC 1 /* FSMC */ +# define STM32_NATIM 1 /* One advanced timers TIM1 */ +# define STM32_NGTIM 4 /* 16-bit general timers TIM2-5 with DMA */ +# define STM32_NGTIMNDMA 0 /* No 16-bit general timers without DMA */ +# define STM32_NBTIM 2 /* Two basic timers, TIM6-7 */ +# define STM32_NDMA 2 /* DMA1-2 */ +# define STM32_NSPI 3 /* SPI1-3 */ +# define STM32_NI2S 2 /* I2S1-2 (multiplexed with SPI2-3) */ +# define STM32_NUSART 5 /* USART1-3, UART 4-5 */ +# define STM32_NI2C 2 /* I2C1-2 */ +# define STM32_NCAN 2 /* CAN1-2 */ +# define STM32_NSDIO 0 /* No SDIO */ +# define STM32_NLCD 0 /* No LCD */ +# define STM32_NUSBOTG 1 /* USB OTG FS/HS */ +# define STM32_NGPIO 51 /* GPIOA-E */ +# define STM32_NADC 2 /* ADC1-2 */ +# define STM32_NDAC 2 /* DAC1-2 */ +# define STM32_NCAPSENSE 0 /* No capacitive sensing channels */ +# define STM32_NCRC 1 /* CRC */ +# define STM32_NETHERNET 0 /* 100/100 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_STM32F107VC) # undef CONFIG_STM32_STM32L15XX /* STM32L151xx and STM32L152xx family */ # undef CONFIG_STM32_ENERGYLITE /* STM32L EnergyLite family */ @@ -2430,7 +2467,7 @@ # if defined(CONFIG_ARCH_CHIP_STM32F469A) # define STM32_NETHERNET 0 /* No Ethernet MAC */ # elif defined(CONFIG_ARCH_CHIP_STM32F469I) || \ -# defined(CONFIG_ARCH_CHIP_STM32F469B) || \ + defined(CONFIG_ARCH_CHIP_STM32F469B) || \ defined(CONFIG_ARCH_CHIP_STM32F469N) # define STM32_NETHERNET 1 /* 100/100 Ethernet MAC */ # endif diff --git a/arch/arm/include/stm32/irq.h b/arch/arm/include/stm32/irq.h index 1d57bc3e500147c86db55809a6c4cad1aca92c5e..2c9b188f0258348928741b88bba8f1a61546d46a 100644 --- a/arch/arm/include/stm32/irq.h +++ b/arch/arm/include/stm32/irq.h @@ -59,7 +59,7 @@ /* Processor Exceptions (vectors 0-15) */ -#define STM32_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG) */ +#define STM32_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG_FEATURES) */ /* Vector 0: Reset stack pointer value */ /* Vector 1: Reset (not handler as an IRQ) */ #define STM32_IRQ_NMI (2) /* Vector 2: Non-Maskable Interrupt (NMI) */ diff --git a/arch/arm/include/stm32/stm32f10xxx_irq.h b/arch/arm/include/stm32/stm32f10xxx_irq.h index 29f07b0fd8837e37be3182765bbe25130ef752e3..beed4952541de0e89a5f46c27ed19cb22ec47ba7 100644 --- a/arch/arm/include/stm32/stm32f10xxx_irq.h +++ b/arch/arm/include/stm32/stm32f10xxx_irq.h @@ -199,7 +199,7 @@ # define STM32_IRQ_ETH (77) /* 61: Ethernet global interrupt */ # define STM32_IRQ_ETHWKUP (78) /* 62: Ethernet Wakeup through EXTI line interrupt */ # define STM32_IRQ_CAN2TX (79) /* 63: CAN2 TX interrupts */ -# define STM32_IRQ_CAN2RX0 (70) /* 64: CAN2 RX0 interrupts */ +# define STM32_IRQ_CAN2RX0 (80) /* 64: CAN2 RX0 interrupts */ # define STM32_IRQ_CAN2RX1 (81) /* 65: CAN2 RX1 interrupt */ # define STM32_IRQ_CAN2SCE (82) /* 66: CAN2 SCE interrupt */ # define STM32_IRQ_OTGFS (83) /* 67: USB On The Go FS global interrupt */ diff --git a/arch/arm/include/stm32f7/chip.h b/arch/arm/include/stm32f7/chip.h index 372bd1143f4529271932312ce75e3bd89919a2f8..b3beb4e09e8697413a363f70b74df38caed19bb9 100644 --- a/arch/arm/include/stm32f7/chip.h +++ b/arch/arm/include/stm32f7/chip.h @@ -1,8 +1,9 @@ /************************************************************************************ * arch/arm/include/stm32f7/chip.h * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -45,99 +46,272 @@ /************************************************************************************ * Pre-processor Definitions ************************************************************************************/ -/* STM32F745xx, STM32F746xx, and STM32F56xx. Differences between family members: - * - * ----------- ---------------- ----- -------- ------------ -------- - * PART PACKAGE GPIOs SPI/I2S ADC CHANNELS LCD-TFT? - * ----------- ---------------- ----- -------- ------------ -------- - * STM32F745Vx LQFP100 82 4/3 16 No - * STM32F745Zx WLCSP143/LQFP144 114 6/3 24 No - * STM32F745Ix UFBGA176/LQFP176 140 6/3 24 No - * STM32F745Bx LQFP208 168 6/3 24 No - * STM32F745Nx TFBGA216 68 6/3 24 No - * - * STM32F746Vx LQFP100 82 4/3 16 Yes - * STM32F746Zx WLCSP143/LQFP144 114 6/3 24 Yes - * STM32F746Ix UFBGA176/LQFP176 140 6/3 24 Yes - * STM32F746Bx LQFP208 168 6/3 24 Yes - * STM32F746Nx TFBGA216 168 6/3 24 Yes - * - * STM32F756Vx LQFP100 82 4/3 16 Yes - * STM32F756Zx WLCSP143/LQFP144 114 6/3 24 Yes - * STM32F756Ix UFBGA176/LQFP176 140 6/3 24 Yes - * STM32F756Bx LQFP208 168 6/3 24 Yes - * STM32F756Nx TFBGA216 168 6/3 24 Yes - * ----------- ---------------- ----- -------- ------------ -------- +/* STM32F745xx, STM32F746xx, STM32F756xx, STM32F765xx, STM32F767xx, STM32F768xx, + * STM32F769xx, STM32F777xx and STM32F779xx Differences between family members: + * + * ----------- ---------------- ----- ---- ----- ---- ---- ---- ---- ---- ----- ----- ---- ------------ ------ + * SPI ADC LCD + * PART PACKAGE GPIOs I2S CHAN TFT MIPI JPEG CAN ETH DFSDM CRYPTO FPU RAM L1 + * ----------- ---------------- ----- ---- ----- ---- ---- ---- ---- ---- ----- ----- ---- ------------ ------ + * STM32F745Vx LQFP100 82 4/3 16 No No No 2 Yes No No SFPU (240+16+64) 4+4 + * STM32F745Zx WLCSP143/LQFP144 114 6/3 24 No No No 2 Yes No No SFPU (240+16+64) 4+4 + * STM32F745Ix UFBGA176/LQFP176 140 6/3 24 No No No 2 Yes No No SFPU (240+16+64) 4+4 + * STM32F745Bx LQFP208 168 6/3 24 No No No 2 Yes No No SFPU (240+16+64) 4+4 + * STM32F745Nx TFBGA216 68 6/3 24 No No No 2 Yes No No SFPU (240+16+64) 4+4 + * + * STM32F746Vx LQFP100 82 4/3 16 Yes No No 2 Yes No No SFPU (240+16+64) 4+4 + * STM32F746Zx WLCSP143/LQFP144 114 6/3 24 Yes No No 2 Yes No No SFPU (240+16+64) 4+4 + * STM32F746Ix UFBGA176/LQFP176 140 6/3 24 Yes No No 2 Yes No No SFPU (240+16+64) 4+4 + * STM32F746Bx LQFP208 168 6/3 24 Yes No No 2 Yes No No SFPU (240+16+64) 4+4 + * STM32F746Nx TFBGA216 168 6/3 24 Yes No No 2 Yes No No SFPU + * + * STM32F756Vx LQFP100 82 4/3 16 Yes No No 2 Yes No Yes SFPU (240+16+64) 4+4 + * STM32F756Zx WLCSP143/LQFP144 114 6/3 24 Yes No No 2 Yes No Yes SFPU (240+16+64) 4+4 + * STM32F756Ix UFBGA176/LQFP176 140 6/3 24 Yes No No 2 Yes No Yes SFPU (240+16+64) 4+4 + * STM32F756Bx LQFP208 168 6/3 24 Yes No No 2 Yes No Yes SFPU (240+16+64) 4+4 + * STM32F756Nx TFBGA216 168 6/3 24 Yes No No 2 Yes No Yes SFPU (240+16+64) 4+4 + * + * STM32F765Vx LQFP100 82 4/3 16 No No No 3 Yes Yes No DFPU (368+16+128) 16+16 + * STM32F765Zx WLCSP143/LQFP144 114 6/3 24 No No No 3 Yes Yes No DFPU (368+16+128) 16+16 + * STM32F765Ix UFBGA176/LQFP176 140 6/3 24 No No No 3 Yes Yes No DFPU (368+16+128) 16+16 + * STM32F765Bx LQFP208 168 6/3 24 No No No 3 Yes Yes No DFPU (368+16+128) 16+16 + * STM32F765Nx TFBGA216 168 6/3 24 No No No 3 Yes Yes No DFPU (368+16+128) 16+16 + * + * STM32F767Vx LQFP100 82 4/3 16 Yes No Yes 3 Yes Yes No DFPU (368+16+128) 16+16 + * STM32F767Zx WLCSP143/LQFP144 114 6/3 24 Yes No Yes 3 Yes Yes No DFPU (368+16+128) 16+16 + * STM32F767Ix UFBGA176/LQFP176 132 6/3 24 Yes Yes Yes 3 Yes Yes No DFPU (368+16+128) 16+16 + * STM32F767Bx LQFP208 168 6/3 24 Yes Yes Yes 3 Yes Yes No DFPU (368+16+128) 16+16 + * STM32F767Nx TFBGA216 159 6/3 24 Yes Yes Yes 3 Yes Yes No DFPU (368+16+128) 16+16 + * + * STM32F768Ax WLCSP180 129 6/3 24 Yes Yes Yes 3 No Yes No DFPU (368+16+128) 16+16 + * + * STM32F769Vx LQFP100 82 4/3 16 Yes No Yes 3 Yes Yes No DFPU (368+16+128) 16+16 + * STM32F769Zx LQFP144 114 6/3 24 Yes No Yes 3 Yes Yes No DFPU (368+16+128) 16+16 + * STM32F769Ix UFBGA176/LQFP176 132 6/3 24 Yes Yes Yes 3 Yes Yes No DFPU (368+16+128) 16+16 + * STM32F769Bx LQFP208 168 6/3 24 Yes Yes Yes 3 Yes Yes No DFPU (368+16+128) 16+16 + * STM32F769Nx TFBGA216 159 6/3 24 Yes Yes Yes 3 Yes Yes No DFPU (368+16+128) 16+16 + * + * STM32F769Ax WLCSP180 129 6/3 24 Yes Yes Yes 3 No Yes No DFPU (368+16+128) 16+16 + * + * STM32F777Vx LQFP100 82 4/3 16 Yes No Yes 3 Yes Yes Yes DFPU (368+16+128) 16+16 + * STM32F777Zx LQFP144 114 6/3 24 Yes No Yes 3 Yes Yes Yes DFPU (368+16+128) 16+16 + * STM32F777Ix UFBGA176/LQFP176 132 6/3 24 Yes Yes Yes 3 Yes Yes Yes DFPU (368+16+128) 16+16 + * STM32F777Bx LQFP208 159 6/3 24 Yes Yes Yes 3 Yes Yes Yes DFPU (368+16+128) 16+16 + * STM32F777Nx TFBGA216 159 6/3 24 Yes Yes Yes 3 Yes Yes Yes DFPU (368+16+128) 16+16 + * + * STM32F778Ax WLCSP180 129 6/3 24 Yes Yes Yes 3 No Yes Yes DFPU (368+16+128) 16+16 + * + * STM32F779Ix UFBGA176/LQFP176 132 6/3 24 Yes Yes Yes 3 Yes Yes Yes DFPU (368+16+128) 16+16 + * STM32F779Bx LQFP208 159 6/3 24 Yes Yes Yes 3 Yes Yes Yes DFPU (368+16+128) 16+16 + * STM32F779Nx TFBGA216 159 6/3 24 Yes Yes Yes 3 Yes Yes Yes DFPU (368+16+128) 16+16 + + * STM32F779Ax WLCSP180 129 6/3 24 Yes Yes Yes 3 No Yes Yes DFPU (368+16+128) 16+16 + * ----------- ---------------- ----- ---- ----- ---- ---- ---- ---- ---- ----- ----- ---- ------------ ------ * * Parts STM32F74xxE have 512Kb of FLASH * Parts STM32F74xxG have 1024Kb of FLASH + * Parts STM32F74xxI have 2048Kb of FLASH + * + * The correct FLASH size will be set CONFIG_STM32F7_FLASH_CONFIG_x or overridden + * with CONFIG_STM32F7_FLASH_OVERRIDE_x * - * The correct FLASH size must be set with a CONFIG_STM32F7_FLASH_*KB - * selection. */ +#if defined(CONFIG_ARCH_CHIP_STM32F745VG) || \ + defined(CONFIG_ARCH_CHIP_STM32F745VE) || \ + defined(CONFIG_ARCH_CHIP_STM32F745IG) || \ + defined(CONFIG_ARCH_CHIP_STM32F745IE) || \ + defined(CONFIG_ARCH_CHIP_STM32F745ZE) || \ + defined(CONFIG_ARCH_CHIP_STM32F745ZG) || \ + defined(CONFIG_ARCH_CHIP_STM32F746BG) || \ + defined(CONFIG_ARCH_CHIP_STM32F746VG) || \ + defined(CONFIG_ARCH_CHIP_STM32F746VE) || \ + defined(CONFIG_ARCH_CHIP_STM32F746BE) || \ + defined(CONFIG_ARCH_CHIP_STM32F746ZG) || \ + defined(CONFIG_ARCH_CHIP_STM32F746IE) || \ + defined(CONFIG_ARCH_CHIP_STM32F746NG) || \ + defined(CONFIG_ARCH_CHIP_STM32F746NE) || \ + defined(CONFIG_ARCH_CHIP_STM32F746ZE) || \ + defined(CONFIG_ARCH_CHIP_STM32F746IG) || \ + defined(CONFIG_ARCH_CHIP_STM32F756NG) || \ + defined(CONFIG_ARCH_CHIP_STM32F756BG) || \ + defined(CONFIG_ARCH_CHIP_STM32F756IG) || \ + defined(CONFIG_ARCH_CHIP_STM32F756VG) || \ + defined(CONFIG_ARCH_CHIP_STM32F756ZG) || \ + defined(CONFIG_ARCH_CHIP_STM32F765NI) || \ + defined(CONFIG_ARCH_CHIP_STM32F765VI) || \ + defined(CONFIG_ARCH_CHIP_STM32F765VG) || \ + defined(CONFIG_ARCH_CHIP_STM32F765BI) || \ + defined(CONFIG_ARCH_CHIP_STM32F765NG) || \ + defined(CONFIG_ARCH_CHIP_STM32F765ZG) || \ + defined(CONFIG_ARCH_CHIP_STM32F765ZI) || \ + defined(CONFIG_ARCH_CHIP_STM32F765IG) || \ + defined(CONFIG_ARCH_CHIP_STM32F765BG) || \ + defined(CONFIG_ARCH_CHIP_STM32F765II) || \ + defined(CONFIG_ARCH_CHIP_STM32F767NG) || \ + defined(CONFIG_ARCH_CHIP_STM32F767IG) || \ + defined(CONFIG_ARCH_CHIP_STM32F767VG) || \ + defined(CONFIG_ARCH_CHIP_STM32F767ZG) || \ + defined(CONFIG_ARCH_CHIP_STM32F767NI) || \ + defined(CONFIG_ARCH_CHIP_STM32F767VI) || \ + defined(CONFIG_ARCH_CHIP_STM32F767BG) || \ + defined(CONFIG_ARCH_CHIP_STM32F767ZI) || \ + defined(CONFIG_ARCH_CHIP_STM32F767II) || \ + defined(CONFIG_ARCH_CHIP_STM32F769BI) || \ + defined(CONFIG_ARCH_CHIP_STM32F769II) || \ + defined(CONFIG_ARCH_CHIP_STM32F769BG) || \ + defined(CONFIG_ARCH_CHIP_STM32F769NI) || \ + defined(CONFIG_ARCH_CHIP_STM32F769AI) || \ + defined(CONFIG_ARCH_CHIP_STM32F769NG) || \ + defined(CONFIG_ARCH_CHIP_STM32F769IG) || \ + defined(CONFIG_ARCH_CHIP_STM32F777ZI) || \ + defined(CONFIG_ARCH_CHIP_STM32F777VI) || \ + defined(CONFIG_ARCH_CHIP_STM32F777NI) || \ + defined(CONFIG_ARCH_CHIP_STM32F777BI) || \ + defined(CONFIG_ARCH_CHIP_STM32F777II) || \ + defined(CONFIG_ARCH_CHIP_STM32F778AI) || \ + defined(CONFIG_ARCH_CHIP_STM32F779II) || \ + defined(CONFIG_ARCH_CHIP_STM32F779NI) || \ + defined(CONFIG_ARCH_CHIP_STM32F779BI) || \ + defined(CONFIG_ARCH_CHIP_STM32F779AI) +#else +# error STM32 F7 chip not identified +#endif -#if defined(CONFIG_ARCH_CHIP_STM32F745) || defined(CONFIG_ARCH_CHIP_STM32F746) || \ - defined(CONFIG_ARCH_CHIP_STM32F756) - -#if defined(CONFIG_ARCH_CHIP_STM32F745) -# define STM32F7_STM32F745XX 1 /* STM32F745xx family */ -# undef STM32F7_STM32F746XX /* Not STM32F746xx family */ -# undef STM32F7_STM32F756XX /* Not STM32F756xx family */ - -# define STM32F7_NLCDTFT 0 /* No LCD-TFT */ - -#elif defined(CONFIG_ARCH_CHIP_STM32F746) - -# undef STM32F7_STM32F745XX /* Not STM32F745xx family */ -# define STM32F7_STM32F746XX 1 /* STM32F746xx family */ -# undef STM32F7_STM32F756XX /* Not STM32F756xx family */ - -# define STM32F7_NLCDTFT 1 /* One LCD-TFT */ - -#else /* if defined(CONFIG_ARCH_CHIP_STM32F746) */ - -# undef STM32F7_STM32F745XX /* Not STM32F745xx family */ -# undef STM32F7_STM32F746XX /* Not STM32F746xx family */ -# define STM32F7_STM32F756XX 1 /* STM32F756xx family */ +/* Size SRAM */ -# define STM32F7_NLCDTFT 1 /* One LCD-TFT */ +#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) +# define STM32F7_SRAM1_SIZE (240*1024) /* 240Kb SRAM1 on AHB bus Matrix */ +# define STM32F7_SRAM2_SIZE (16*1024) /* 16Kb SRAM2 on AHB bus Matrix */ +# if defined(CONFIG_ARMV7M_HAVE_DTCM) +# define STM32F7_DTCM_SRAM_SIZE (64*1024) /* 64Kb DTCM SRAM on TCM interface */ +# else +# define STM32F7_DTCM_SRAM_SIZE (0) /* No DTCM SRAM on TCM interface */ +# endif +# if defined(CONFIG_ARMV7M_HAVE_ITCM) +# define STM32F7_ITCM_SRAM_SIZE (16*1024) /* 16Kb ITCM SRAM on TCM interface */ +# else +# define STM32F7_ITCM_SRAM_SIZE (0) /* No ITCM SRAM on TCM interface */ +# endif +#elif defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77X) +# define STM32F7_SRAM1_SIZE (368*1024) /* 368Kb SRAM1 on AHB bus Matrix */ +# define STM32F7_SRAM2_SIZE (16*1024) /* 16Kb SRAM2 on AHB bus Matrix */ +# if defined(CONFIG_ARMV7M_HAVE_DTCM) +# define STM32F7_DTCM_SRAM_SIZE (128*1024) /* 128Kb DTCM SRAM on TCM interface */ +# else +# define STM32F7_DTCM_SRAM_SIZE (0) /* No DTCM SRAM on TCM interface */ +# endif +# if defined(CONFIG_ARMV7M_HAVE_ITCM) +# define STM32F7_ITCM_SRAM_SIZE (16*1024) /* 16Kb ITCM SRAM on TCM interface */ +# else +# define STM32F7_ITCM_SRAM_SIZE (0) /* No ITCM SRAM on TCM interface */ +# endif +#else +# error STM32 F7 chip Family not identified #endif -# define STM32F7_SRAM1_SIZE (240*1024) /* 240Kb SRAM1 on AHB bus Matrix */ -# define STM32F7_SRAM2_SIZE (16*1024) /* 16Kb SRAM2 on AHB bus Matrix */ -# define STM32F7_DTCM_SRAM_SIZE (64*1024) /* 64Kb DTCM SRAM on TCM inerface */ -# define STM32F7_ITCM_SRAM_SIZE (16*1024) /* 16Kb ITCM SRAM on TCM inerface */ +/* Common to all Family members */ -# define STM32F7_NFSMC 1 /* Have FSMC memory controller */ -# define STM32F7_NETHERNET 1 /* 100/100 Ethernet MAC */ # define STM32F7_NATIM 2 /* Two advanced timers TIM1 and 8 */ # define STM32F7_NGTIM32 2 /* 32-bit general timers TIM2 and 5 with DMA */ # define STM32F7_NGTIM16 2 /* 16-bit general timers TIM3 and 4 with DMA */ # define STM32F7_NGTIMNDMA 6 /* 16-bit general timers TIM9-14 without DMA */ # define STM32F7_NBTIM 2 /* Two basic timers, TIM6-7 */ -# define STM32F7_NRNG 1 /* Random number generator (RNG) */ # define STM32F7_NUART 4 /* UART 4-5 and 7-8 */ # define STM32F7_NUSART 4 /* USART1-3 and 6 */ -# define STM32F7_NSPI 6 /* SPI1-6 (Except V series) */ # define STM32F7_NI2S 3 /* I2S1-2 (multiplexed with SPI1-3) */ # define STM32F7_NI2C 4 /* I2C1-4 */ # define STM32F7_NUSBOTGFS 1 /* USB OTG FS */ # define STM32F7_NUSBOTGHS 1 /* USB OTG HS */ -# define STM32F7_NCAN 2 /* CAN1-2 */ # define STM32F7_NSAI 2 /* SAI1-2 */ # define STM32F7_NSPDIFRX 4 /* 4 SPDIFRX inputs */ -# define STM32F7_NSDMMC 1 /* SDMMC interface */ -# define STM32F7_NDCMI 1 /* Digital camera interface (DCMI) */ # define STM32F7_NDMA 2 /* DMA1-2 */ -# define STM32F7_NDMA2D 1 /* DChrom-ART Accelerator™ (DMA2D) */ # define STM32F7_NGPIO 11 /* 11 GPIO ports, GPIOA-K */ # define STM32F7_NADC 3 /* 12-bit ADC1-3, 24 channels *except V series) */ # define STM32F7_NDAC 2 /* 12-bit DAC1-2 */ # define STM32F7_NCAPSENSE 0 /* No capacitive sensing channels */ # define STM32F7_NCRC 1 /* CRC */ +/* TBD FPU Configuration */ + +#if defined(CONFIG_ARCH_HAVE_FPU) #else -# error STM32 F7 chip not identified +#endif + +#if defined(CONFIG_ARCH_HAVE_DPFPU) +#else +#endif + +/* Diversification based on Family and package */ + +#if defined(CONFIG_STM32F7_HAVE_FSMC) +# define STM32F7_NFSMC 1 /* Have FSMC memory controller */ +#else +# define STM32F7_NFSMC 0 /* No FSMC memory controller */ +#endif +#if defined(CONFIG_STM32F7_HAVE_ETHRNET) +# define STM32F7_NETHERNET 1 /* 100/100 Ethernet MAC */ +#else +# define STM32F7_NETHERNET 0 /* No 100/100 Ethernet MAC */ +#endif +#if defined(CONFIG_STM32F7_HAVE_RNG) +# define STM32F7_NRNG 1 /* Random number generator (RNG) */ +#else +# define STM32F7_NRNG 0 /* No Random number generator (RNG) */ +#endif +#if defined(CONFIG_STM32F7_HAVE_SPI5) && defined(CONFIG_STM32F7_HAVE_SPI6) +# define STM32F7_NSPI 6 /* SPI1-6 (Except V series) */ +#else +# define STM32F7_NSPI 4 /* SPI1-4 V series */ +#endif +#if defined(CONFIG_STM32F7_HAVE_SDMMC2) +# define STM32F7_NSDMMC 2 /* 2 SDMMC interfaces */ +#else +# define STM32F7_NSDMMC 1 /* 1 SDMMC interface */ +#endif +#if defined(CONFIG_STM32F7_HAVE_CAN3) +# define STM32F7_NCAN 3 /* CAN1-3 */ +#else +# define STM32F7_NCAN 2 /* CAN1-2 */ +#endif +#if defined(CONFIG_STM32F7_HAVE_DCMI) +# define STM32F7_NDCMI 1 /* Digital camera interface (DCMI) */ +#else +# define STM32F7_NDCMI 0 /* No Digital camera interface (DCMI) */ +#endif +#if defined(CONFIG_STM32F7_HAVE_DSIHOST) +# define STM32F7_NDSIHOST 1 /* Have MIPI DSI Host */ +#else +# define STM32F7_NDSIHOST 0 /* No MIPI DSI Host */ +#endif +#if defined (CONFIG_STM32F7_HAVE_LTDC) +# define STM32F7_NLCDTFT 1 /* One LCD-TFT */ +#else +# define STM32F7_NLCDTFT 0 /* No LCD-TFT */ +#endif +#if defined(CONFIG_STM32F7_HAVE_DMA2D) +# define STM32F7_NDMA2D 0 /* No DChrom-ART Accelerator™ (DMA2D) */ +#else +# define STM32F7_NDMA2D 1 /* DChrom-ART Accelerator™ (DMA2D) */ +#endif +#if defined(CONFIG_STM32F7_HAVE_JPEG) +#define STM32F7_NJPEG 1 /* One JPEG Converter */ +#else +#define STM32F7_NJPEG 0 /* No JPEG Converter */ +#endif +#if defined(CONFIG_STM32F7_HAVE_CRYP) +#define STM32F7_NCRYP 1 /* One CRYP engine */ +#else +#define STM32F7_NCRYP 0 /* No CRYP engine */ +#endif +#if defined(CONFIG_STM32F7_HAVE_HASH) +#define STM32F7_NHASH 1 /* One HASH engine */ +#else +#define STM32F7_NHASH 0 /* No HASH engine */ +#endif +#if defined(CONFIG_STM32F7_HAVE_DFSDM) +#define STM32F7_NDFSDM 4 /* One set of 4 Digital filters */ +#else +#define STM32F7_NDFSDM 0 /* No Digital filters */ #endif /* NVIC priority levels *************************************************************/ diff --git a/arch/arm/include/stm32f7/irq.h b/arch/arm/include/stm32f7/irq.h index 5a5c710803668cca2b371ceaca5c60d89b510c5a..f09659190b74a2f4078b0c0df1f5f31cbcfe2389 100644 --- a/arch/arm/include/stm32f7/irq.h +++ b/arch/arm/include/stm32f7/irq.h @@ -57,7 +57,7 @@ /* Processor Exceptions (vectors 0-15) */ -#define STM32_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG) */ +#define STM32_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG_FEATURES) */ /* Vector 0: Reset stack pointer value */ /* Vector 1: Reset (not handler as an IRQ) */ #define STM32_IRQ_NMI (2) /* Vector 2: Non-Maskable Interrupt (NMI) */ @@ -78,6 +78,8 @@ #if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) # include +#elif defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) +# include #else # error "Unsupported STM32 F7 chip" #endif diff --git a/arch/arm/include/stm32f7/stm32f76xx77xx_irq.h b/arch/arm/include/stm32f7/stm32f76xx77xx_irq.h new file mode 100644 index 0000000000000000000000000000000000000000..6c0461f9ef22bb07ef8381ebdcb1cc86c28eaee8 --- /dev/null +++ b/arch/arm/include/stm32f7/stm32f76xx77xx_irq.h @@ -0,0 +1,215 @@ +/**************************************************************************************************** + * arch/arm/include/stm32f7/stm32f76xx77xx_irq.h.h + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Authors: 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. + * + ****************************************************************************************************/ + +/* This file should never be included directed but, rather, only indirectly through arch/irq.h */ + +#ifndef __ARCH_ARM_INCLUDE_STM32F7_STM32F76XX77XX_IRQ_H +#define __ARCH_ARM_INCLUDE_STM32F7_STM32F76XX77XX_IRQ_H + +/**************************************************************************************************** + * Included Files + ****************************************************************************************************/ + +#include + +/**************************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************************/ + +/* IRQ numbers. The IRQ number corresponds vector number and hence map directly to bits in the + * NVIC. This does, however, waste several words of memory in the IRQ to handle mapping tables. + * + * Processor Exceptions (vectors 0-15). These common definitions can be found in the file + * nuttx/arch/arm/include/stm32f7/irq.h which includes this file + * + * External interrupts (vectors >= 16) + */ + +#define STM32_IRQ_WWDG (STM32_IRQ_FIRST+0) /* 0: Window Watchdog interrupt */ +#define STM32_IRQ_PVD (STM32_IRQ_FIRST+1) /* 1: PVD through EXTI Line detection interrupt */ +#define STM32_IRQ_TAMPER (STM32_IRQ_FIRST+2) /* 2: Tamper and time stamp interrupts */ +#define STM32_IRQ_TIMESTAMP (STM32_IRQ_FIRST+2) /* 2: Tamper and time stamp interrupts */ +#define STM32_IRQ_RTC_WKUP (STM32_IRQ_FIRST+3) /* 3: RTC global interrupt */ +#define STM32_IRQ_FLASH (STM32_IRQ_FIRST+4) /* 4: Flash global interrupt */ +#define STM32_IRQ_RCC (STM32_IRQ_FIRST+5) /* 5: RCC global interrupt */ +#define STM32_IRQ_EXTI0 (STM32_IRQ_FIRST+6) /* 6: EXTI Line 0 interrupt */ +#define STM32_IRQ_EXTI1 (STM32_IRQ_FIRST+7) /* 7: EXTI Line 1 interrupt */ +#define STM32_IRQ_EXTI2 (STM32_IRQ_FIRST+8) /* 8: EXTI Line 2 interrupt */ +#define STM32_IRQ_EXTI3 (STM32_IRQ_FIRST+9) /* 9: EXTI Line 3 interrupt */ +#define STM32_IRQ_EXTI4 (STM32_IRQ_FIRST+10) /* 10: EXTI Line 4 interrupt */ +#define STM32_IRQ_DMA1S0 (STM32_IRQ_FIRST+11) /* 11: DMA1 Stream 0 global interrupt */ +#define STM32_IRQ_DMA1S1 (STM32_IRQ_FIRST+12) /* 12: DMA1 Stream 1 global interrupt */ +#define STM32_IRQ_DMA1S2 (STM32_IRQ_FIRST+13) /* 13: DMA1 Stream 2 global interrupt */ +#define STM32_IRQ_DMA1S3 (STM32_IRQ_FIRST+14) /* 14: DMA1 Stream 3 global interrupt */ +#define STM32_IRQ_DMA1S4 (STM32_IRQ_FIRST+15) /* 15: DMA1 Stream 4 global interrupt */ +#define STM32_IRQ_DMA1S5 (STM32_IRQ_FIRST+16) /* 16: DMA1 Stream 5 global interrupt */ +#define STM32_IRQ_DMA1S6 (STM32_IRQ_FIRST+17) /* 17: DMA1 Stream 6 global interrupt */ +#define STM32_IRQ_ADC (STM32_IRQ_FIRST+18) /* 18: ADC1, ADC2, and ADC3 global interrupt */ +#define STM32_IRQ_CAN1TX (STM32_IRQ_FIRST+19) /* 19: CAN1 TX interrupts */ +#define STM32_IRQ_CAN1RX0 (STM32_IRQ_FIRST+20) /* 20: CAN1 RX0 interrupts */ +#define STM32_IRQ_CAN1RX1 (STM32_IRQ_FIRST+21) /* 21: CAN1 RX1 interrupt */ +#define STM32_IRQ_CAN1SCE (STM32_IRQ_FIRST+22) /* 22: CAN1 SCE interrupt */ +#define STM32_IRQ_EXTI95 (STM32_IRQ_FIRST+23) /* 23: EXTI Line[9:5] interrupts */ +#define STM32_IRQ_TIM1BRK (STM32_IRQ_FIRST+24) /* 24: TIM1 Break interrupt */ +#define STM32_IRQ_TIM9 (STM32_IRQ_FIRST+24) /* 24: TIM9 global interrupt */ +#define STM32_IRQ_TIM1UP (STM32_IRQ_FIRST+25) /* 25: TIM1 Update interrupt */ +#define STM32_IRQ_TIM10 (STM32_IRQ_FIRST+25) /* 25: TIM10 global interrupt */ +#define STM32_IRQ_TIM1TRGCOM (STM32_IRQ_FIRST+26) /* 26: TIM1 Trigger and Commutation interrupts */ +#define STM32_IRQ_TIM11 (STM32_IRQ_FIRST+26) /* 26: TIM11 global interrupt */ +#define STM32_IRQ_TIM1CC (STM32_IRQ_FIRST+27) /* 27: TIM1 Capture Compare interrupt */ +#define STM32_IRQ_TIM2 (STM32_IRQ_FIRST+28) /* 28: TIM2 global interrupt */ +#define STM32_IRQ_TIM3 (STM32_IRQ_FIRST+29) /* 29: TIM3 global interrupt */ +#define STM32_IRQ_TIM4 (STM32_IRQ_FIRST+30) /* 30: TIM4 global interrupt */ +#define STM32_IRQ_I2C1EV (STM32_IRQ_FIRST+31) /* 31: I2C1 event interrupt */ +#define STM32_IRQ_I2C1ER (STM32_IRQ_FIRST+32) /* 32: I2C1 error interrupt */ +#define STM32_IRQ_I2C2EV (STM32_IRQ_FIRST+33) /* 33: I2C2 event interrupt */ +#define STM32_IRQ_I2C2ER (STM32_IRQ_FIRST+34) /* 34: I2C2 error interrupt */ +#define STM32_IRQ_SPI1 (STM32_IRQ_FIRST+35) /* 35: SPI1 global interrupt */ +#define STM32_IRQ_SPI2 (STM32_IRQ_FIRST+36) /* 36: SPI2 global interrupt */ +#define STM32_IRQ_USART1 (STM32_IRQ_FIRST+37) /* 37: USART1 global interrupt */ +#define STM32_IRQ_USART2 (STM32_IRQ_FIRST+38) /* 38: USART2 global interrupt */ +#define STM32_IRQ_USART3 (STM32_IRQ_FIRST+39) /* 39: USART3 global interrupt */ +#define STM32_IRQ_EXTI1510 (STM32_IRQ_FIRST+40) /* 40: EXTI Line[15:10] interrupts */ +#define STM32_IRQ_RTCALRM (STM32_IRQ_FIRST+41) /* 41: RTC alarm through EXTI line interrupt */ +#define STM32_IRQ_OTGFSWKUP (STM32_IRQ_FIRST+42) /* 42: USB On-The-Go FS Wakeup through EXTI line interrupt */ +#define STM32_IRQ_TIM8BRK (STM32_IRQ_FIRST+43) /* 43: TIM8 Break interrupt */ +#define STM32_IRQ_TIM12 (STM32_IRQ_FIRST+43) /* 43: TIM12 global interrupt */ +#define STM32_IRQ_TIM8UP (STM32_IRQ_FIRST+44) /* 44: TIM8 Update interrupt */ +#define STM32_IRQ_TIM13 (STM32_IRQ_FIRST+44) /* 44: TIM13 global interrupt */ +#define STM32_IRQ_TIM8TRGCOM (STM32_IRQ_FIRST+45) /* 45: TIM8 Trigger and Commutation interrupts */ +#define STM32_IRQ_TIM14 (STM32_IRQ_FIRST+45) /* 45: TIM14 global interrupt */ +#define STM32_IRQ_TIM8CC (STM32_IRQ_FIRST+46) /* 46: TIM8 Capture Compare interrupt */ +#define STM32_IRQ_DMA1S7 (STM32_IRQ_FIRST+47) /* 47: DMA1 Stream 7 global interrupt */ +#define STM32_IRQ_FSMC (STM32_IRQ_FIRST+48) /* 48: FSMC global interrupt */ +#define STM32_IRQ_SDMMC1 (STM32_IRQ_FIRST+49) /* 49: SDMMC1 global interrupt */ +#define STM32_IRQ_TIM5 (STM32_IRQ_FIRST+50) /* 50: TIM5 global interrupt */ +#define STM32_IRQ_SPI3 (STM32_IRQ_FIRST+51) /* 51: SPI3 global interrupt */ +#define STM32_IRQ_UART4 (STM32_IRQ_FIRST+52) /* 52: UART4 global interrupt */ +#define STM32_IRQ_UART5 (STM32_IRQ_FIRST+53) /* 53: UART5 global interrupt */ +#define STM32_IRQ_TIM6 (STM32_IRQ_FIRST+54) /* 54: TIM6 global interrupt */ +#define STM32_IRQ_DAC (STM32_IRQ_FIRST+54) /* 54: DAC1 and DAC2 underrun error interrupts */ +#define STM32_IRQ_TIM7 (STM32_IRQ_FIRST+55) /* 55: TIM7 global interrupt */ +#define STM32_IRQ_DMA2S0 (STM32_IRQ_FIRST+56) /* 56: DMA2 Stream 0 global interrupt */ +#define STM32_IRQ_DMA2S1 (STM32_IRQ_FIRST+57) /* 57: DMA2 Stream 1 global interrupt */ +#define STM32_IRQ_DMA2S2 (STM32_IRQ_FIRST+58) /* 58: DMA2 Stream 2 global interrupt */ +#define STM32_IRQ_DMA2S3 (STM32_IRQ_FIRST+59) /* 59: DMA2 Stream 3 global interrupt */ +#define STM32_IRQ_DMA2S4 (STM32_IRQ_FIRST+60) /* 60: DMA2 Stream 4 global interrupt */ +#define STM32_IRQ_ETH (STM32_IRQ_FIRST+61) /* 61: Ethernet global interrupt */ +#define STM32_IRQ_ETHWKUP (STM32_IRQ_FIRST+62) /* 62: Ethernet Wakeup through EXTI line interrupt */ +#define STM32_IRQ_CAN2TX (STM32_IRQ_FIRST+63) /* 63: CAN2 TX interrupts */ +#define STM32_IRQ_CAN2RX0 (STM32_IRQ_FIRST+64) /* 64: CAN2 RX0 interrupts */ +#define STM32_IRQ_CAN2RX1 (STM32_IRQ_FIRST+65) /* 65: CAN2 RX1 interrupt */ +#define STM32_IRQ_CAN2SCE (STM32_IRQ_FIRST+66) /* 66: CAN2 SCE interrupt */ +#define STM32_IRQ_OTGFS (STM32_IRQ_FIRST+67) /* 67: USB On The Go FS global interrupt */ +#define STM32_IRQ_DMA2S5 (STM32_IRQ_FIRST+68) /* 68: DMA2 Stream 5 global interrupt */ +#define STM32_IRQ_DMA2S6 (STM32_IRQ_FIRST+69) /* 69: DMA2 Stream 6 global interrupt */ +#define STM32_IRQ_DMA2S7 (STM32_IRQ_FIRST+70) /* 70: DMA2 Stream 7 global interrupt */ +#define STM32_IRQ_USART6 (STM32_IRQ_FIRST+71) /* 71: USART6 global interrupt */ +#define STM32_IRQ_I2C3EV (STM32_IRQ_FIRST+72) /* 72: I2C3 event interrupt */ +#define STM32_IRQ_I2C3ER (STM32_IRQ_FIRST+73) /* 73: I2C3 error interrupt */ +#define STM32_IRQ_OTGHSEP1OUT (STM32_IRQ_FIRST+74) /* 74: USB On The Go HS End Point 1 Out global interrupt */ +#define STM32_IRQ_OTGHSEP1IN (STM32_IRQ_FIRST+75) /* 75: USB On The Go HS End Point 1 In global interrupt */ +#define STM32_IRQ_OTGHSWKUP (STM32_IRQ_FIRST+76) /* 76: USB On The Go HS Wakeup through EXTI interrupt */ +#define STM32_IRQ_OTGHS (STM32_IRQ_FIRST+77) /* 77: USB On The Go HS global interrupt */ +#define STM32_IRQ_DCMI (STM32_IRQ_FIRST+78) /* 78: DCMI global interrupt */ +#define STM32_IRQ_CRYP (STM32_IRQ_FIRST+79) /* 79: CRYP crypto global interrupt */ +#define STM32_IRQ_HASH (STM32_IRQ_FIRST+80) /* 80: Hash and Rng global interrupt */ +#define STM32_IRQ_RNG (STM32_IRQ_FIRST+80) /* 80: Hash and Rng global interrupt */ +#define STM32_IRQ_FPU (STM32_IRQ_FIRST+81) /* 81: FPU global interrupt */ +#define STM32_IRQ_UART7 (STM32_IRQ_FIRST+82) /* 82: UART7 global interrupt */ +#define STM32_IRQ_UART8 (STM32_IRQ_FIRST+83) /* 83: UART8 global interrupt */ +#define STM32_IRQ_SPI4 (STM32_IRQ_FIRST+84) /* 84: SPI4 global interrupt */ +#define STM32_IRQ_SPI5 (STM32_IRQ_FIRST+85) /* 85: SPI5 global interrupt */ +#define STM32_IRQ_SPI6 (STM32_IRQ_FIRST+86) /* 86: SPI6 global interrupt */ +#define STM32_IRQ_SAI1 (STM32_IRQ_FIRST+87) /* 87: SAI1 global interrupt */ +#define STM32_IRQ_LTDCINT (STM32_IRQ_FIRST+88) /* 88: LCD-TFT global interrupt */ +#define STM32_IRQ_LTDCERRINT (STM32_IRQ_FIRST+89) /* 89: LCD-TFT global Error interrupt */ +#define STM32_IRQ_DMA2D (STM32_IRQ_FIRST+90) /* 90: DMA2D global interrupt */ +#define STM32_IRQ_SAI2 (STM32_IRQ_FIRST+91) /* 91: SAI2 global interrupt */ +#define STM32_IRQ_QUADSPI (STM32_IRQ_FIRST+92) /* 92: QuadSPI global interrupt */ +#define STM32_IRQ_LPTIMER1 (STM32_IRQ_FIRST+93) /* 93: LP Timer1 global interrupt */ +#define STM32_IRQ_HDMICEC (STM32_IRQ_FIRST+94) /* 94: HDMI-CEC global interrupt */ +#define STM32_IRQ_I2C4EV (STM32_IRQ_FIRST+95) /* 95: I2C4 event interrupt */ +#define STM32_IRQ_I2C4ER (STM32_IRQ_FIRST+96) /* 96: I2C4 Error interrupt */ +#define STM32_IRQ_SPDIFRX (STM32_IRQ_FIRST+97) /* 97: SPDIFRX global interrupt */ +#define STM32_IRQ_DSIHOST (STM32_IRQ_FIRST+98) /* 98: DSI host global interrupt */ +#define STM32_IRQ_DFSDM1FLT0 (STM32_IRQ_FIRST+99) /* 99: DFSDM1 Filter 0 global interrupt */ +#define STM32_IRQ_DFSDM1FLT1 (STM32_IRQ_FIRST+100) /* 100: DFSDM1 Filter 1 global interrupt */ +#define STM32_IRQ_DFSDM1FLT2 (STM32_IRQ_FIRST+101) /* 101: DFSDM1 Filter 2 global interrupt */ +#define STM32_IRQ_DFSDM1FLT3 (STM32_IRQ_FIRST+102) /* 102: DFSDM1 Filter 3 global interrupt */ +#define STM32_IRQ_SDMMC2 (STM32_IRQ_FIRST+103) /* 103: SDMMC2 global interrupt */ +#define STM32_IRQ_CAN3TX (STM32_IRQ_FIRST+104) /* 104: CAN3 TX interrupt */ +#define STM32_IRQ_CAN3RX0 (STM32_IRQ_FIRST+105) /* 105: CAN3 RX0 interrupt */ +#define STM32_IRQ_CAN3RX1 (STM32_IRQ_FIRST+106) /* 106: CAN3 RX1 interrupt */ +#define STM32_IRQ_CAN3SCE (STM32_IRQ_FIRST+107) /* 107: CAN3 SCE interrupt */ +#define STM32_IRQ_JPEG (STM32_IRQ_FIRST+108) /* 108: JPEG global interrupt */ +#define STM32_IRQ_MDIOS (STM32_IRQ_FIRST+109) /* 109: MDIO slave global interrupt */ + +#define NR_INTERRUPTS 110 +#define NR_VECTORS (STM32_IRQ_FIRST+NR_INTERRUPTS) + +/* EXTI interrupts (Do not use IRQ numbers) */ + +#define NR_IRQS NR_VECTORS + +/**************************************************************************************************** + * Public Types + ****************************************************************************************************/ + +/**************************************************************************************************** + * Public Data + ****************************************************************************************************/ + +#ifndef __ASSEMBLY__ +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/**************************************************************************************************** + * Public Functions + ****************************************************************************************************/ + +#undef EXTERN +#ifdef __cplusplus +} +#endif +#endif + +#endif /* __ARCH_ARM_INCLUDE_STM32F7_STM32F76XX77XX_IRQ_H */ diff --git a/arch/arm/include/stm32l4/irq.h b/arch/arm/include/stm32l4/irq.h index ebfb22667891d9084a91b3b87ee0afed7db0a55f..89e74c1760bedd01330ff9062de2016f0542782f 100644 --- a/arch/arm/include/stm32l4/irq.h +++ b/arch/arm/include/stm32l4/irq.h @@ -57,7 +57,7 @@ /* Processor Exceptions (vectors 0-15) */ -#define STM32L4_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG) */ +#define STM32L4_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG_FEATURES) */ /* Vector 0: Reset stack pointer value */ /* Vector 1: Reset (not handler as an IRQ) */ #define STM32L4_IRQ_NMI (2) /* Vector 2: Non-Maskable Interrupt (NMI) */ diff --git a/arch/arm/include/tiva/irq.h b/arch/arm/include/tiva/irq.h index 17c73a254de4d8f121593187ba0b4c62fad42a41..d6a3216da96da623e67e666ee3a606e9b7ea630b 100644 --- a/arch/arm/include/tiva/irq.h +++ b/arch/arm/include/tiva/irq.h @@ -162,7 +162,7 @@ /* Processor Exceptions (vectors 0-15) */ -#define TIVA_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG) */ +#define TIVA_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG_FEATURES) */ /* Vector 0: Reset stack pointer value */ /* Vector 1: Reset (not handler as an IRQ) */ #define TIVA_IRQ_NMI (2) /* Vector 2: Non-Maskable Interrupt (NMI) */ diff --git a/arch/arm/src/a1x/a1x_irq.c b/arch/arm/src/a1x/a1x_irq.c index 65e18ffd73bb5b9e53291d548221da072f50368f..ecabb5ff4d66b77df5f7bab603d6866da245a18f 100644 --- a/arch/arm/src/a1x/a1x_irq.c +++ b/arch/arm/src/a1x/a1x_irq.c @@ -77,7 +77,7 @@ volatile uint32_t *g_current_regs[1]; * ****************************************************************************/ -#if defined(CONFIG_DEBUG_IRQ) +#if defined(CONFIG_DEBUG_IRQ_INFO) static void a1x_dumpintc(const char *msg, int irq) { irqstate_t flags; @@ -85,40 +85,42 @@ static void a1x_dumpintc(const char *msg, int irq) /* Dump some relevant ARMv7 register contents */ flags = enter_critical_section(); - lldbg("ARMv7 (%s, irq=%d):\n", msg, irq); - lldbg(" CPSR: %08x SCTLR: %08x\n", flags, cp15_rdsctlr()); + + irqinfo("ARMv7 (%s, irq=%d):\n", msg, irq); + irqinfo(" CPSR: %08x SCTLR: %08x\n", flags, cp15_rdsctlr()); /* Dump all of the (readable) INTC register contents */ - lldbg("INTC (%s, irq=%d):\n", msg, irq); - lldbg(" VECTOR: %08x BASE: %08x PROTECT: %08x NMICTRL: %08x\n", - getreg32(A1X_INTC_VECTOR), getreg32(A1X_INTC_BASEADDR), - getreg32(A1X_INTC_PROTECT), getreg32(A1X_INTC_NMICTRL)); - lldbg(" IRQ PEND: %08x %08x %08x\n", - getreg32(A1X_INTC_IRQ_PEND0), getreg32(A1X_INTC_IRQ_PEND1), - getreg32(A1X_INTC_IRQ_PEND2)); - lldbg(" FIQ PEND: %08x %08x %08x\n", - getreg32(A1X_INTC_FIQ_PEND0), getreg32(A1X_INTC_FIQ_PEND1), - getreg32(A1X_INTC_FIQ_PEND2)); - lldbg(" SEL: %08x %08x %08x\n", - getreg32(A1X_INTC_IRQ_SEL0), getreg32(A1X_INTC_IRQ_SEL1), - getreg32(A1X_INTC_IRQ_SEL2)); - lldbg(" EN: %08x %08x %08x\n", - getreg32(A1X_INTC_EN0), getreg32(A1X_INTC_EN1), - getreg32(A1X_INTC_EN2)); - lldbg(" MASK: %08x %08x %08x\n", - getreg32(A1X_INTC_MASK0), getreg32(A1X_INTC_MASK1), - getreg32(A1X_INTC_MASK2)); - lldbg(" RESP: %08x %08x %08x\n", - getreg32(A1X_INTC_RESP0), getreg32(A1X_INTC_RESP1), - getreg32(A1X_INTC_RESP2)); - lldbg(" FF: %08x %08x %08x\n", - getreg32(A1X_INTC_FF0), getreg32(A1X_INTC_FF1), - getreg32(A1X_INTC_FF2)); - lldbg(" PRIO: %08x %08x %08x %08x %08x\n", - getreg32(A1X_INTC_PRIO0), getreg32(A1X_INTC_PRIO1), - getreg32(A1X_INTC_PRIO2), getreg32(A1X_INTC_PRIO3), - getreg32(A1X_INTC_PRIO4)); + irqinfo("INTC (%s, irq=%d):\n", msg, irq); + irqinfo(" VECTOR: %08x BASE: %08x PROTECT: %08x NMICTRL: %08x\n", + getreg32(A1X_INTC_VECTOR), getreg32(A1X_INTC_BASEADDR), + getreg32(A1X_INTC_PROTECT), getreg32(A1X_INTC_NMICTRL)); + irqinfo(" IRQ PEND: %08x %08x %08x\n", + getreg32(A1X_INTC_IRQ_PEND0), getreg32(A1X_INTC_IRQ_PEND1), + getreg32(A1X_INTC_IRQ_PEND2)); + irqinfo(" FIQ PEND: %08x %08x %08x\n", + getreg32(A1X_INTC_FIQ_PEND0), getreg32(A1X_INTC_FIQ_PEND1), + getreg32(A1X_INTC_FIQ_PEND2)); + irqinfo(" SEL: %08x %08x %08x\n", + getreg32(A1X_INTC_IRQ_SEL0), getreg32(A1X_INTC_IRQ_SEL1), + getreg32(A1X_INTC_IRQ_SEL2)); + irqinfo(" EN: %08x %08x %08x\n", + getreg32(A1X_INTC_EN0), getreg32(A1X_INTC_EN1), + getreg32(A1X_INTC_EN2)); + irqinfo(" MASK: %08x %08x %08x\n", + getreg32(A1X_INTC_MASK0), getreg32(A1X_INTC_MASK1), + getreg32(A1X_INTC_MASK2)); + irqinfo(" RESP: %08x %08x %08x\n", + getreg32(A1X_INTC_RESP0), getreg32(A1X_INTC_RESP1), + getreg32(A1X_INTC_RESP2)); + irqinfo(" FF: %08x %08x %08x\n", + getreg32(A1X_INTC_FF0), getreg32(A1X_INTC_FF1), + getreg32(A1X_INTC_FF2)); + irqinfo(" PRIO: %08x %08x %08x %08x %08x\n", + getreg32(A1X_INTC_PRIO0), getreg32(A1X_INTC_PRIO1), + getreg32(A1X_INTC_PRIO2), getreg32(A1X_INTC_PRIO3), + getreg32(A1X_INTC_PRIO4)); + leave_critical_section(flags); } #else diff --git a/arch/arm/src/a1x/a1x_serial.c b/arch/arm/src/a1x/a1x_serial.c index b6e536fdc601ecc0f79ec321a8eeb0f09258f4d4..7dae40aa997d827feaba429f65fb27fef106f7cb 100644 --- a/arch/arm/src/a1x/a1x_serial.c +++ b/arch/arm/src/a1x/a1x_serial.c @@ -1156,7 +1156,7 @@ static int uart_interrupt(struct uart_dev_s *dev) /* Read the modem status register (MSR) to clear */ status = up_serialin(priv, A1X_UART_MSR_OFFSET); - vdbg("MSR: %02x\n", status); + _info("MSR: %02x\n", status); break; } @@ -1167,7 +1167,7 @@ static int uart_interrupt(struct uart_dev_s *dev) /* Read the line status register (LSR) to clear */ status = up_serialin(priv, A1X_UART_LSR_OFFSET); - vdbg("LSR: %02x\n", status); + _info("LSR: %02x\n", status); break; } @@ -1192,7 +1192,7 @@ static int uart_interrupt(struct uart_dev_s *dev) default: { - lldbg("Unexpected IIR: %02x\n", status); + _err("ERROR: Unexpected IIR: %02x\n", status); break; } } diff --git a/arch/arm/src/arm/up_assert.c b/arch/arm/src/arm/up_assert.c index 336a76c8613862c4bcea2c7b559eb727c947360e..3d188174b3d3ea661b7d508ef738cbef6fb73761 100644 --- a/arch/arm/src/arm/up_assert.c +++ b/arch/arm/src/arm/up_assert.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/arm/up_assert.c * - * Copyright (C) 2007-2010, 2012-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2010, 2012-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include #include @@ -77,23 +66,6 @@ # undef CONFIG_ARCH_USBDUMP #endif -/* The following is just intended to keep some ugliness out of the mainline - * code. We are going to print the task name if: - * - * CONFIG_TASK_NAME_SIZE > 0 && <-- The task has a name - * (defined(CONFIG_DEBUG) || <-- And the debug is enabled (lldbg used) - * defined(CONFIG_ARCH_STACKDUMP) <-- Or lowsyslog() is used - */ - -#undef CONFIG_PRINT_TASKNAME -#if CONFIG_TASK_NAME_SIZE > 0 && (defined(CONFIG_DEBUG) || defined(CONFIG_ARCH_STACKDUMP)) -# define CONFIG_PRINT_TASKNAME 1 -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -127,7 +99,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base) for (stack = sp & ~0x1f; stack < stack_base; stack += 32) { uint32_t *ptr = (uint32_t *)stack; - lldbg("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n", + _alert("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n", stack, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7]); } @@ -154,12 +126,12 @@ static inline void up_registerdump(void) for (regs = REG_R0; regs <= REG_R15; regs += 8) { uint32_t *ptr = (uint32_t *)&CURRENT_REGS[regs]; - lldbg("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n", + _alert("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n", regs, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7]); } - lldbg("CPSR: %08x\n", CURRENT_REGS[REG_CPSR]); + _alert("CPSR: %08x\n", CURRENT_REGS[REG_CPSR]); } } #else @@ -179,7 +151,7 @@ static int usbtrace_syslog(FAR const char *fmt, ...) /* Let vsyslog do the real work */ va_start(ap, fmt); - ret = lowvsyslog(LOG_INFO, fmt, ap); + ret = vsyslog(LOG_EMERG, fmt, ap); va_end(ap); return ret; } @@ -228,12 +200,12 @@ static void up_dumpstate(void) /* Show interrupt stack info */ - lldbg("sp: %08x\n", sp); - lldbg("IRQ stack:\n"); - lldbg(" base: %08x\n", istackbase); - lldbg(" size: %08x\n", istacksize); + _alert("sp: %08x\n", sp); + _alert("IRQ stack:\n"); + _alert(" base: %08x\n", istackbase); + _alert(" size: %08x\n", istacksize); #ifdef CONFIG_STACK_COLORATION - lldbg(" used: %08x\n", up_check_intstack()); + _alert(" used: %08x\n", up_check_intstack()); #endif /* Does the current stack pointer lie within the interrupt @@ -251,24 +223,24 @@ static void up_dumpstate(void) */ sp = g_intstackbase; - lldbg("sp: %08x\n", sp); + _alert("sp: %08x\n", sp); } /* Show user stack info */ - lldbg("User stack:\n"); - lldbg(" base: %08x\n", ustackbase); - lldbg(" size: %08x\n", ustacksize); + _alert("User stack:\n"); + _alert(" base: %08x\n", ustackbase); + _alert(" size: %08x\n", ustacksize); #ifdef CONFIG_STACK_COLORATION - lldbg(" used: %08x\n", up_check_tcbstack(rtcb)); + _alert(" used: %08x\n", up_check_tcbstack(rtcb)); #endif #else - lldbg("sp: %08x\n", sp); - lldbg("stack base: %08x\n", ustackbase); - lldbg("stack size: %08x\n", ustacksize); + _alert("sp: %08x\n", sp); + _alert("stack base: %08x\n", ustackbase); + _alert("stack size: %08x\n", ustacksize); #ifdef CONFIG_STACK_COLORATION - lldbg("stack used: %08x\n", up_check_tcbstack(rtcb)); + _alert("stack used: %08x\n", up_check_tcbstack(rtcb)); #endif #endif @@ -279,7 +251,7 @@ static void up_dumpstate(void) if (sp > ustackbase || sp <= ustackbase - ustacksize) { #if !defined(CONFIG_ARCH_INTERRUPTSTACK) || CONFIG_ARCH_INTERRUPTSTACK < 4 - lldbg("ERROR: Stack pointer is not within allocated stack\n"); + _alert("ERROR: Stack pointer is not within allocated stack\n"); #endif } else @@ -339,17 +311,17 @@ static void _up_assert(int errorcode) void up_assert(const uint8_t *filename, int lineno) { -#ifdef CONFIG_PRINT_TASKNAME +#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG_ALERT) struct tcb_s *rtcb = this_task(); #endif board_autoled_on(LED_ASSERTION); -#ifdef CONFIG_PRINT_TASKNAME - lldbg("Assertion failed at file:%s line: %d task: %s\n", +#if CONFIG_TASK_NAME_SIZE > 0 + _alert("Assertion failed at file:%s line: %d task: %s\n", filename, lineno, rtcb->name); #else - lldbg("Assertion failed at file:%s line: %d\n", + _alert("Assertion failed at file:%s line: %d\n", filename, lineno); #endif diff --git a/arch/arm/src/arm/up_dataabort.c b/arch/arm/src/arm/up_dataabort.c index 2ab00b15c9403b3e349288ef734b3c48f68a37f9..318c59232c46ab0464c2a6c3be1ec2885247cdf7 100644 --- a/arch/arm/src/arm/up_dataabort.c +++ b/arch/arm/src/arm/up_dataabort.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/arm/up_dataabort.c * - * Copyright (C) 2007-2011, 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2011, 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include @@ -63,18 +52,6 @@ # include "arm.h" #endif -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -112,7 +89,6 @@ void up_dataabort(uint32_t *regs, uint32_t far, uint32_t fsr) * for register dumps and possibly context switching. */ - savestate = (uint32_t *)CURRENT_REGS; #endif CURRENT_REGS = regs; @@ -131,7 +107,7 @@ void up_dataabort(uint32_t *regs, uint32_t far, uint32_t fsr) * fatal error. */ - pglldbg("FSR: %08x FAR: %08x\n", fsr, far); + pginfo("FSR: %08x FAR: %08x\n", fsr, far); if ((fsr & FSR_MASK) != FSR_PAGE) { goto segfault; @@ -142,7 +118,7 @@ void up_dataabort(uint32_t *regs, uint32_t far, uint32_t fsr) * (It has not yet been saved in the register context save area). */ - pgllvdbg("VBASE: %08x VEND: %08x\n", PG_PAGED_VBASE, PG_PAGED_VEND); + pginfo("VBASE: %08x VEND: %08x\n", PG_PAGED_VBASE, PG_PAGED_VEND); if (far < PG_PAGED_VBASE || far >= PG_PAGED_VEND) { goto segfault; @@ -180,7 +156,7 @@ void up_dataabort(uint32_t *regs, uint32_t far, uint32_t fsr) segfault: #endif - lldbg("Data abort. PC: %08x FAR: %08x FSR: %08x\n", regs[REG_PC], far, fsr); + _alert("Data abort. PC: %08x FAR: %08x FSR: %08x\n", regs[REG_PC], far, fsr); PANIC(); } @@ -196,7 +172,7 @@ void up_dataabort(uint32_t *regs) /* Crash -- possibly showing diagnost debug information. */ - lldbg("Data abort. PC: %08x\n", regs[REG_PC]); + _alert("Data abort. PC: %08x\n", regs[REG_PC]); PANIC(); } diff --git a/arch/arm/src/arm/up_elf.c b/arch/arm/src/arm/up_elf.c index 07eba7341d9a85a59703fbc936ad87510eb586c4..c6d88bdc325c8f40f57191b5c145444a90579e70 100644 --- a/arch/arm/src/arm/up_elf.c +++ b/arch/arm/src/arm/up_elf.c @@ -86,7 +86,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr) if (ehdr->e_machine != EM_ARM) { - bdbg("Not for ARM: e_machine=%04x\n", ehdr->e_machine); + berr("ERROR: Not for ARM: e_machine=%04x\n", ehdr->e_machine); return -ENOEXEC; } @@ -94,7 +94,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr) if (ehdr->e_ident[EI_CLASS] != ELFCLASS32) { - bdbg("Need 32-bit objects: e_ident[EI_CLASS]=%02x\n", ehdr->e_ident[EI_CLASS]); + berr("ERROR: Need 32-bit objects: e_ident[EI_CLASS]=%02x\n", ehdr->e_ident[EI_CLASS]); return -ENOEXEC; } @@ -106,7 +106,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr) if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB) #endif { - bdbg("Wrong endian-ness: e_ident[EI_DATA]=%02x\n", ehdr->e_ident[EI_DATA]); + berr("ERROR: Wrong endian-ness: e_ident[EI_DATA]=%02x\n", ehdr->e_ident[EI_DATA]); return -ENOEXEC; } @@ -114,7 +114,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr) if ((ehdr->e_entry & 3) != 0) { - bdbg("Entry point is not properly aligned: %08x\n", ehdr->e_entry); + berr("ERROR: Entry point is not properly aligned: %08x\n", ehdr->e_entry); return -ENOEXEC } @@ -172,7 +172,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_CALL: case R_ARM_JUMP24: { - bvdbg("Performing PC24 [%d] link at addr %08lx [%08lx] to sym '%s' st_value=%08lx\n", + binfo("Performing PC24 [%d] link at addr %08lx [%08lx] to sym '%s' st_value=%08lx\n", ELF32_R_TYPE(rel->r_info), (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value); @@ -185,7 +185,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, offset += sym->st_value - addr; if (offset & 3 || offset <= (int32_t) 0xfe000000 || offset >= (int32_t) 0x02000000) { - bdbg(" ERROR: PC24 [%d] relocation out of range, offset=%08lx\n", + berr("ERROR: PC24 [%d] relocation out of range, offset=%08lx\n", ELF32_R_TYPE(rel->r_info), offset); return -EINVAL; @@ -201,7 +201,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_ABS32: case R_ARM_TARGET1: /* New ABI: TARGET1 always treated as ABS32 */ { - bvdbg("Performing ABS32 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", + binfo("Performing ABS32 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value); *(uint32_t *)addr += sym->st_value; @@ -210,7 +210,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_V4BX: { - bvdbg("Performing V4BX link at addr=%08lx [%08lx]\n", + binfo("Performing V4BX link at addr=%08lx [%08lx]\n", (long)addr, (long)(*(uint32_t *)addr)); /* Preserve only Rm and the condition code */ @@ -225,7 +225,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_PREL31: { - bvdbg("Performing PREL31 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", + binfo("Performing PREL31 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value); offset = *(uint32_t *)addr + sym->st_value - addr; @@ -236,7 +236,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_MOVW_ABS_NC: case R_ARM_MOVT_ABS: { - bvdbg("Performing MOVx_ABS [%d] link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", + binfo("Performing MOVx_ABS [%d] link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", ELF32_R_TYPE(rel->r_info), (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value); @@ -256,7 +256,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, break; default: - bdbg("Unsupported relocation: %d\n", ELF32_R_TYPE(rel->r_info)); + berr("ERROR: Unsupported relocation: %d\n", ELF32_R_TYPE(rel->r_info)); return -EINVAL; } @@ -266,6 +266,6 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym, uintptr_t addr) { - bdbg("RELA relocation not supported\n"); + berr("ERROR: RELA relocation not supported\n"); return -ENOSYS; } diff --git a/arch/arm/src/arm/up_head.S b/arch/arm/src/arm/up_head.S index 53f94a2e0faf31dd1cb2c73141c0c8c89bfa571f..da317c12f978c740dc6472bdbcdbfb19e7411b4f 100644 --- a/arch/arm/src/arm/up_head.S +++ b/arch/arm/src/arm/up_head.S @@ -208,7 +208,7 @@ /* This macro will modify r0, r1, r2 and r14 */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES .macro showprogress, code mov r0, #\code bl up_lowputc diff --git a/arch/arm/src/arm/up_nommuhead.S b/arch/arm/src/arm/up_nommuhead.S index 04c5205efe057ee58a52286f961e40e3a65624ad..d8689d85bd6ee0d893a2e8f7040a44422d0787ae 100644 --- a/arch/arm/src/arm/up_nommuhead.S +++ b/arch/arm/src/arm/up_nommuhead.S @@ -49,7 +49,7 @@ /* This macro will modify r0, r1, r2 and r14 */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES .macro showprogress, code mov r0, #\code bl up_lowputc @@ -115,7 +115,7 @@ __start: bl up_earlyserialinit #endif -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES mov r0, #'C' bl up_putc mov r0, #'\n' diff --git a/arch/arm/src/arm/up_prefetchabort.c b/arch/arm/src/arm/up_prefetchabort.c index ed2bfb1bf9db8035dfb43915edf2ca23ad37051a..ab97efd5737264712b8b8e4b20e68e35d7ad9f00 100644 --- a/arch/arm/src/arm/up_prefetchabort.c +++ b/arch/arm/src/arm/up_prefetchabort.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/arm/up_prefetchabort.c * - * Copyright (C) 2007-2011, 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2011, 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include @@ -110,8 +99,8 @@ void up_prefetchabort(uint32_t *regs) * virtual addresses. */ - pglldbg("VADDR: %08x VBASE: %08x VEND: %08x\n", - regs[REG_PC], PG_PAGED_VBASE, PG_PAGED_VEND); + pginfo("VADDR: %08x VBASE: %08x VEND: %08x\n", + regs[REG_PC], PG_PAGED_VBASE, PG_PAGED_VEND); if (regs[REG_R15] >= PG_PAGED_VBASE && regs[REG_R15] < PG_PAGED_VEND) { @@ -148,7 +137,7 @@ void up_prefetchabort(uint32_t *regs) else #endif { - lldbg("Prefetch abort. PC: %08x\n", regs[REG_PC]); + _alert("Prefetch abort. PC: %08x\n", regs[REG_PC]); PANIC(); } } diff --git a/arch/arm/src/arm/up_releasepending.c b/arch/arm/src/arm/up_releasepending.c index 4defb895e00e0398df6d95c135f521300e313211..c0ee7e6e727051e418f6e8638db3f8e9cbafe3ef 100644 --- a/arch/arm/src/arm/up_releasepending.c +++ b/arch/arm/src/arm/up_releasepending.c @@ -67,7 +67,7 @@ void up_release_pending(void) { struct tcb_s *rtcb = this_task(); - slldbg("From TCB=%p\n", rtcb); + sinfo("From TCB=%p\n", rtcb); /* Merge the g_pendingtasks list into the ready-to-run task list */ diff --git a/arch/arm/src/arm/up_reprioritizertr.c b/arch/arm/src/arm/up_reprioritizertr.c index 8f6b739d08dc5cb7265c9234dcc93cb9b1faebe1..95679e31dd7276d9b11c1c24d8a8dfa25e7c1e1c 100644 --- a/arch/arm/src/arm/up_reprioritizertr.c +++ b/arch/arm/src/arm/up_reprioritizertr.c @@ -95,7 +95,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) struct tcb_s *rtcb = this_task(); bool switch_needed; - slldbg("TCB=%p PRI=%d\n", tcb, priority); + sinfo("TCB=%p PRI=%d\n", tcb, priority); /* Remove the tcb task from the ready-to-run list. * sched_removereadytorun will return true if we just diff --git a/arch/arm/src/arm/up_schedulesigaction.c b/arch/arm/src/arm/up_schedulesigaction.c index 3972b7792120a9ebe55b3ae569862e5b259c90cd..f6f0c655e8fe2cd623e84ea9e487b6c0af15ac33 100644 --- a/arch/arm/src/arm/up_schedulesigaction.c +++ b/arch/arm/src/arm/up_schedulesigaction.c @@ -94,7 +94,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) { irqstate_t flags; - sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver); + sinfo("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver); /* Make sure that interrupts are disabled */ @@ -108,7 +108,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * being delivered to the currently executing task. */ - sdbg("rtcb=0x%p CURRENT_REGS=0x%p\n", this_task(), CURRENT_REGS); + sinfo("rtcb=0x%p CURRENT_REGS=0x%p\n", this_task(), CURRENT_REGS); if (tcb == this_task()) { diff --git a/arch/arm/src/arm/up_sigdeliver.c b/arch/arm/src/arm/up_sigdeliver.c index c03511d4df485c2648ae567bcbdb43656196e8d7..29176429f3cecd284f677bb9f74cb46be9570aeb 100644 --- a/arch/arm/src/arm/up_sigdeliver.c +++ b/arch/arm/src/arm/up_sigdeliver.c @@ -95,7 +95,7 @@ void up_sigdeliver(void) board_autoled_on(LED_SIGNAL); - sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", + sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); ASSERT(rtcb->xcp.sigdeliver != NULL); @@ -126,7 +126,7 @@ void up_sigdeliver(void) * errno that is needed by the user logic (it is probably EINTR). */ - sdbg("Resuming\n"); + sinfo("Resuming\n"); (void)up_irq_save(); rtcb->pterrno = saved_errno; diff --git a/arch/arm/src/arm/up_syscall.c b/arch/arm/src/arm/up_syscall.c index 07d8ac26d229a90eff58544e4349008ffde9a7d4..c52b036951920870dff3fc4882d72e63f17a07cb 100644 --- a/arch/arm/src/arm/up_syscall.c +++ b/arch/arm/src/arm/up_syscall.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/arm/up_syscall.c * - * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include @@ -58,22 +47,6 @@ #include "up_arch.h" #include "up_internal.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * vectors - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -82,8 +55,8 @@ * Name: up_syscall * * Description: - * SWI interrupts will vection here with insn=the SWI - * instruction and xcp=the interrupt context + * SWI interrupts will vector here with insn=the SWI instruction and + * xcp=the interrupt context * * The handler may get the SWI number be de-referencing * the return address saved in the xcp and decoding @@ -93,7 +66,7 @@ void up_syscall(uint32_t *regs) { - lldbg("Syscall from 0x%x\n", regs[REG_PC]); + _alert("Syscall from 0x%x\n", regs[REG_PC]); CURRENT_REGS = regs; PANIC(); } diff --git a/arch/arm/src/arm/up_undefinedinsn.c b/arch/arm/src/arm/up_undefinedinsn.c index 99b1e3fc66b1bca83ed545f1f9e6442f24d65ad2..364b072acdef98754b6e72d7921904c05576427b 100644 --- a/arch/arm/src/arm/up_undefinedinsn.c +++ b/arch/arm/src/arm/up_undefinedinsn.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/arm/up_undefinedinsn.c * - * Copyright (C) 2007-2009, 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include #include @@ -58,18 +47,6 @@ #include "up_internal.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -80,7 +57,7 @@ void up_undefinedinsn(uint32_t *regs) { - lldbg("Undefined instruction at 0x%x\n", regs[REG_PC]); + _alert("Undefined instruction at 0x%x\n", regs[REG_PC]); CURRENT_REGS = regs; PANIC(); } diff --git a/arch/arm/src/armv6-m/nvic.h b/arch/arm/src/armv6-m/nvic.h index 945d5c4338f27eddd05964437a3989e5459fbce5..b6f4391a4a68466c299e149d152d83d0ad48f284 100644 --- a/arch/arm/src/armv6-m/nvic.h +++ b/arch/arm/src/armv6-m/nvic.h @@ -41,6 +41,7 @@ ****************************************************************************************************/ #include +#include /**************************************************************************************************** * Pre-processor Definitions @@ -386,7 +387,7 @@ extern "C" * ****************************************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES void up_dumpnvic(FAR const char *msg); #else # define up_dumpnvic(m) diff --git a/arch/arm/src/armv6-m/up_assert.c b/arch/arm/src/armv6-m/up_assert.c index dcb71392696ac255d524318c661bc8d5c0b136df..f218cd477b028866ec07d179ca4daeedda62f1a7 100644 --- a/arch/arm/src/armv6-m/up_assert.c +++ b/arch/arm/src/armv6-m/up_assert.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/armv6-m/up_assert.c * - * Copyright (C) 2013-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2013-2015, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include #include @@ -76,23 +65,6 @@ # undef CONFIG_ARCH_USBDUMP #endif -/* The following is just intended to keep some ugliness out of the mainline - * code. We are going to print the task name if: - * - * CONFIG_TASK_NAME_SIZE > 0 && <-- The task has a name - * (defined(CONFIG_DEBUG) || <-- And the debug is enabled (lldbg used) - * defined(CONFIG_ARCH_STACKDUMP) <-- Or lowsyslog() is used - */ - -#undef CONFIG_PRINT_TASKNAME -#if CONFIG_TASK_NAME_SIZE > 0 && (defined(CONFIG_DEBUG) || defined(CONFIG_ARCH_STACKDUMP)) -# define CONFIG_PRINT_TASKNAME 1 -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -126,7 +98,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base) for (stack = sp & ~0x1f; stack < stack_base; stack += 32) { uint32_t *ptr = (uint32_t *)stack; - lldbg("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n", + _alert("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n", stack, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7]); } @@ -144,12 +116,12 @@ static void up_taskdump(FAR struct tcb_s *tcb, FAR void *arg) { /* Dump interesting properties of this task */ -#ifdef CONFIG_PRINT_TASKNAME - lldbg("%s: PID=%d Stack Used=%lu of %lu\n", +#if CONFIG_TASK_NAME_SIZE > 0 + _alert("%s: PID=%d Stack Used=%lu of %lu\n", tcb->name, tcb->pid, (unsigned long)up_check_tcbstack(tcb), (unsigned long)tcb->adj_stack_size); #else - lldbg("PID: %d Stack Used=%lu of %lu\n", + _alert("PID: %d Stack Used=%lu of %lu\n", tcb->pid, (unsigned long)up_check_tcbstack(tcb), (unsigned long)tcb->adj_stack_size); #endif @@ -184,22 +156,22 @@ static inline void up_registerdump(void) { /* Yes.. dump the interrupt registers */ - lldbg("R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", + _alert("R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", CURRENT_REGS[REG_R0], CURRENT_REGS[REG_R1], CURRENT_REGS[REG_R2], CURRENT_REGS[REG_R3], CURRENT_REGS[REG_R4], CURRENT_REGS[REG_R5], CURRENT_REGS[REG_R6], CURRENT_REGS[REG_R7]); - lldbg("R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", + _alert("R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", CURRENT_REGS[REG_R8], CURRENT_REGS[REG_R9], CURRENT_REGS[REG_R10], CURRENT_REGS[REG_R11], CURRENT_REGS[REG_R12], CURRENT_REGS[REG_R13], CURRENT_REGS[REG_R14], CURRENT_REGS[REG_R15]); #ifdef CONFIG_BUILD_PROTECTED - lldbg("xPSR: %08x PRIMASK: %08x EXEC_RETURN: %08x\n", + _alert("xPSR: %08x PRIMASK: %08x EXEC_RETURN: %08x\n", CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK], CURRENT_REGS[REG_EXC_RETURN]); #else - lldbg("xPSR: %08x PRIMASK: %08x\n", + _alert("xPSR: %08x PRIMASK: %08x\n", CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK]); #endif } @@ -221,7 +193,7 @@ static int usbtrace_syslog(FAR const char *fmt, ...) /* Let vsyslog do the real work */ va_start(ap, fmt); - ret = lowvsyslog(LOG_INFO, fmt, ap); + ret = vsyslog(LOG_EMERG, fmt, ap); va_end(ap); return ret; } @@ -270,12 +242,12 @@ static void up_dumpstate(void) /* Show interrupt stack info */ - lldbg("sp: %08x\n", sp); - lldbg("IRQ stack:\n"); - lldbg(" base: %08x\n", istackbase); - lldbg(" size: %08x\n", istacksize); + _alert("sp: %08x\n", sp); + _alert("IRQ stack:\n"); + _alert(" base: %08x\n", istackbase); + _alert(" size: %08x\n", istacksize); #ifdef CONFIG_STACK_COLORATION - lldbg(" used: %08x\n", up_check_intstack()); + _alert(" used: %08x\n", up_check_intstack()); #endif /* Does the current stack pointer lie within the interrupt @@ -297,14 +269,14 @@ static void up_dumpstate(void) if (CURRENT_REGS) { sp = CURRENT_REGS[REG_R13]; - lldbg("sp: %08x\n", sp); + _alert("sp: %08x\n", sp); } - lldbg("User stack:\n"); - lldbg(" base: %08x\n", ustackbase); - lldbg(" size: %08x\n", ustacksize); + _alert("User stack:\n"); + _alert(" base: %08x\n", ustackbase); + _alert(" size: %08x\n", ustacksize); #ifdef CONFIG_STACK_COLORATION - lldbg(" used: %08x\n", up_check_tcbstack(rtcb)); + _alert(" used: %08x\n", up_check_tcbstack(rtcb)); #endif /* Dump the user stack if the stack pointer lies within the allocated user @@ -317,11 +289,11 @@ static void up_dumpstate(void) } #else - lldbg("sp: %08x\n", sp); - lldbg("stack base: %08x\n", ustackbase); - lldbg("stack size: %08x\n", ustacksize); + _alert("sp: %08x\n", sp); + _alert("stack base: %08x\n", ustackbase); + _alert("stack size: %08x\n", ustacksize); #ifdef CONFIG_STACK_COLORATION - lldbg("stack used: %08x\n", up_check_tcbstack(rtcb)); + _alert("stack used: %08x\n", up_check_tcbstack(rtcb)); #endif /* Dump the user stack if the stack pointer lies within the allocated user @@ -330,7 +302,7 @@ static void up_dumpstate(void) if (sp > ustackbase || sp <= ustackbase - ustacksize) { - lldbg("ERROR: Stack pointer is not within allocated stack\n"); + _alert("ERROR: Stack pointer is not within allocated stack\n"); } else { @@ -394,17 +366,17 @@ static void _up_assert(int errorcode) void up_assert(const uint8_t *filename, int lineno) { -#ifdef CONFIG_PRINT_TASKNAME +#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG_ALERT) struct tcb_s *rtcb = this_task(); #endif board_autoled_on(LED_ASSERTION); -#ifdef CONFIG_PRINT_TASKNAME - lldbg("Assertion failed at file:%s line: %d task: %s\n", +#if CONFIG_TASK_NAME_SIZE > 0 + _alert("Assertion failed at file:%s line: %d task: %s\n", filename, lineno, rtcb->name); #else - lldbg("Assertion failed at file:%s line: %d\n", + _alert("Assertion failed at file:%s line: %d\n", filename, lineno); #endif diff --git a/arch/arm/src/armv6-m/up_dumpnvic.c b/arch/arm/src/armv6-m/up_dumpnvic.c index 36c2fdf21682cf9e24b417aa83da5bcd60ae845c..8439ac6a2a91f7005ea86a5fe762fdf560dbce8b 100644 --- a/arch/arm/src/armv6-m/up_dumpnvic.c +++ b/arch/arm/src/armv6-m/up_dumpnvic.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/armv6-m/up_dumpnvic.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 @@ -48,19 +48,7 @@ #include "nvic.h" -#ifdef CONFIG_DEBUG - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ +#ifdef CONFIG_DEBUG_FEATURES /**************************************************************************** * Public Functions @@ -76,6 +64,7 @@ void up_dumpnvic(FAR const char *msg) { +#ifdef CONFIG_DEBUG_INFO irqstate_t flags; int i; @@ -83,29 +72,30 @@ void up_dumpnvic(FAR const char *msg) flags = enter_critical_section(); - lldbg("NVIC: %s\n", msg); - lldbg(" ISER: %08x ICER: %08x ISPR: %08x ICPR: %08x\n", - getreg32(ARMV6M_NVIC_ISER), getreg32(ARMV6M_NVIC_ICER), - getreg32(ARMV6M_NVIC_ISPR), getreg32(ARMV6M_NVIC_ICPR)); + _info("NVIC: %s\n", msg); + _info(" ISER: %08x ICER: %08x ISPR: %08x ICPR: %08x\n", + getreg32(ARMV6M_NVIC_ISER), getreg32(ARMV6M_NVIC_ICER), + getreg32(ARMV6M_NVIC_ISPR), getreg32(ARMV6M_NVIC_ICPR)); for (i = 0 ; i < 8; i += 4) { - lldbg(" IPR%d: %08x IPR%d: %08x IPR%d: %08x IPR%d: %08x\n", - i, getreg32(ARMV6M_NVIC_IPR(i)), - i+1, getreg32(ARMV6M_NVIC_IPR(i+1)), - i+2, getreg32(ARMV6M_NVIC_IPR(i+2)), - i+3, getreg32(ARMV6M_NVIC_IPR(i+3))); + _info(" IPR%d: %08x IPR%d: %08x IPR%d: %08x IPR%d: %08x\n", + i, getreg32(ARMV6M_NVIC_IPR(i)), + i+1, getreg32(ARMV6M_NVIC_IPR(i+1)), + i+2, getreg32(ARMV6M_NVIC_IPR(i+2)), + i+3, getreg32(ARMV6M_NVIC_IPR(i+3))); } - lldbg("SYSCON:\n"); - lldbg(" CPUID: %08x ICSR: %08x AIRCR: %08x SCR: %08x\n", - getreg32(ARMV6M_SYSCON_CPUID), getreg32(ARMV6M_SYSCON_ICSR), - getreg32(ARMV6M_SYSCON_AIRCR), getreg32(ARMV6M_SYSCON_SCR)); - lldbg(" CCR: %08x SHPR2: %08x SHPR3: %08x\n", - getreg32(ARMV6M_SYSCON_CCR), getreg32(ARMV6M_SYSCON_SHPR2), - getreg32(ARMV6M_SYSCON_SHPR3)); + _info("SYSCON:\n"); + _info(" CPUID: %08x ICSR: %08x AIRCR: %08x SCR: %08x\n", + getreg32(ARMV6M_SYSCON_CPUID), getreg32(ARMV6M_SYSCON_ICSR), + getreg32(ARMV6M_SYSCON_AIRCR), getreg32(ARMV6M_SYSCON_SCR)); + _info(" CCR: %08x SHPR2: %08x SHPR3: %08x\n", + getreg32(ARMV6M_SYSCON_CCR), getreg32(ARMV6M_SYSCON_SHPR2), + getreg32(ARMV6M_SYSCON_SHPR3)); leave_critical_section(flags); +#endif } -#endif /* CONFIG_DEBUG */ +#endif /* CONFIG_DEBUG_FEATURES */ diff --git a/arch/arm/src/armv6-m/up_elf.c b/arch/arm/src/armv6-m/up_elf.c index dbe002cbb1a97419821aa7b3d2821a12e029ae97..7bde5d01106c3086b361c9bdab48d2aaa2186593 100644 --- a/arch/arm/src/armv6-m/up_elf.c +++ b/arch/arm/src/armv6-m/up_elf.c @@ -86,7 +86,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr) if (ehdr->e_machine != EM_ARM) { - bdbg("Not for ARM: e_machine=%04x\n", ehdr->e_machine); + berr("ERROR: Not for ARM: e_machine=%04x\n", ehdr->e_machine); return -ENOEXEC; } @@ -94,7 +94,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr) if (ehdr->e_ident[EI_CLASS] != ELFCLASS32) { - bdbg("Need 32-bit objects: e_ident[EI_CLASS]=%02x\n", ehdr->e_ident[EI_CLASS]); + berr("ERROR: Need 32-bit objects: e_ident[EI_CLASS]=%02x\n", ehdr->e_ident[EI_CLASS]); return -ENOEXEC; } @@ -106,7 +106,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr) if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB) #endif { - bdbg("Wrong endian-ness: e_ident[EI_DATA]=%02x\n", ehdr->e_ident[EI_DATA]); + berr("ERROR: Wrong endian-ness: e_ident[EI_DATA]=%02x\n", ehdr->e_ident[EI_DATA]); return -ENOEXEC; } @@ -168,7 +168,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_CALL: case R_ARM_JUMP24: { - bvdbg("Performing PC24 [%d] link at addr %08lx [%08lx] to sym '%s' st_value=%08lx\n", + binfo("Performing PC24 [%d] link at addr %08lx [%08lx] to sym '%s' st_value=%08lx\n", ELF32_R_TYPE(rel->r_info), (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value); @@ -181,7 +181,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, offset += sym->st_value - addr; if (offset & 3 || offset <= (int32_t) 0xfe000000 || offset >= (int32_t) 0x02000000) { - bdbg(" ERROR: PC24 [%d] relocation out of range, offset=%08lx\n", + berr("ERROR: ERROR: PC24 [%d] relocation out of range, offset=%08lx\n", ELF32_R_TYPE(rel->r_info), offset); return -EINVAL; @@ -197,7 +197,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_ABS32: case R_ARM_TARGET1: /* New ABI: TARGET1 always treated as ABS32 */ { - bvdbg("Performing ABS32 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", + binfo("Performing ABS32 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value); *(uint32_t *)addr += sym->st_value; @@ -245,7 +245,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, upper_insn = (uint32_t)(*(uint16_t *)addr); lower_insn = (uint32_t)(*(uint16_t *)(addr + 2)); - bvdbg("Performing THM_JUMP24 [%d] link at addr=%08lx [%04x %04x] to sym=%p st_value=%08lx\n", + binfo("Performing THM_JUMP24 [%d] link at addr=%08lx [%04x %04x] to sym=%p st_value=%08lx\n", ELF32_R_TYPE(rel->r_info), (long)addr, (int)upper_insn, (int)lower_insn, sym, (long)sym->st_value); @@ -279,7 +279,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, /* And perform the relocation */ - bvdbg(" S=%d J1=%d J2=%d offset=%08lx branch target=%08lx\n", + binfo(" S=%d J1=%d J2=%d offset=%08lx branch target=%08lx\n", S, J1, J2, (long)offset, offset + sym->st_value - addr); offset += sym->st_value - addr; @@ -290,7 +290,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, if (ELF32_ST_TYPE(sym->st_info) == STT_FUNC && (offset & 1) == 0) { - bdbg(" ERROR: JUMP24 [%d] requires odd offset, offset=%08lx\n", + berr("ERROR: ERROR: JUMP24 [%d] requires odd offset, offset=%08lx\n", ELF32_R_TYPE(rel->r_info), offset); return -EINVAL; @@ -300,7 +300,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, if (offset <= (int32_t)0xff000000 || offset >= (int32_t)0x01000000) { - bdbg(" ERROR: JUMP24 [%d] relocation out of range, branch taget=%08lx\n", + berr("ERROR: ERROR: JUMP24 [%d] relocation out of range, branch taget=%08lx\n", ELF32_R_TYPE(rel->r_info), offset); return -EINVAL; @@ -320,14 +320,14 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, lower_insn = ((lower_insn & 0xd000) | (J1 << 13) | (J2 << 11) | ((offset >> 1) & 0x07ff)); *(uint16_t *)(addr + 2) = (uint16_t)lower_insn; - bvdbg(" S=%d J1=%d J2=%d insn [%04x %04x]\n", + binfo(" S=%d J1=%d J2=%d insn [%04x %04x]\n", S, J1, J2, (int)upper_insn, (int)lower_insn); } break; case R_ARM_V4BX: { - bvdbg("Performing V4BX link at addr=%08lx [%08lx]\n", + binfo("Performing V4BX link at addr=%08lx [%08lx]\n", (long)addr, (long)(*(uint32_t *)addr)); /* Preserve only Rm and the condition code */ @@ -342,7 +342,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_PREL31: { - bvdbg("Performing PREL31 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", + binfo("Performing PREL31 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value); offset = *(uint32_t *)addr + sym->st_value - addr; @@ -353,7 +353,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_MOVW_ABS_NC: case R_ARM_MOVT_ABS: { - bvdbg("Performing MOVx_ABS [%d] link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", + binfo("Performing MOVx_ABS [%d] link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", ELF32_R_TYPE(rel->r_info), (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value); @@ -408,7 +408,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, upper_insn = (uint32_t)(*(uint16_t *)addr); lower_insn = (uint32_t)(*(uint16_t *)(addr + 2)); - bvdbg("Performing THM_MOVx [%d] link at addr=%08lx [%04x %04x] to sym=%p st_value=%08lx\n", + binfo("Performing THM_MOVx [%d] link at addr=%08lx [%04x %04x] to sym=%p st_value=%08lx\n", ELF32_R_TYPE(rel->r_info), (long)addr, (int)upper_insn, (int)lower_insn, sym, (long)sym->st_value); @@ -425,7 +425,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, /* And perform the relocation */ - bvdbg(" offset=%08lx branch target=%08lx\n", + binfo(" offset=%08lx branch target=%08lx\n", (long)offset, offset + sym->st_value); offset += sym->st_value; @@ -445,13 +445,13 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, lower_insn = ((lower_insn & 0x8f00) | ((offset & 0x0700) << 4) | (offset & 0x00ff)); *(uint16_t *)(addr + 2) = (uint16_t)lower_insn; - bvdbg(" insn [%04x %04x]\n", + binfo(" insn [%04x %04x]\n", (int)upper_insn, (int)lower_insn); } break; default: - bdbg("Unsupported relocation: %d\n", ELF32_R_TYPE(rel->r_info)); + berr("ERROR: Unsupported relocation: %d\n", ELF32_R_TYPE(rel->r_info)); return -EINVAL; } @@ -461,6 +461,6 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym, uintptr_t addr) { - bdbg("RELA relocation not supported\n"); + berr("ERROR: RELA relocation not supported\n"); return -ENOSYS; } diff --git a/arch/arm/src/armv6-m/up_hardfault.c b/arch/arm/src/armv6-m/up_hardfault.c index edd1bab6a23606f93397d4c85bd62494de83cf90..b3c24d885151cf63fd6dd50179bc890c622dea98 100644 --- a/arch/arm/src/armv6-m/up_hardfault.c +++ b/arch/arm/src/armv6-m/up_hardfault.c @@ -55,25 +55,13 @@ ****************************************************************************/ #ifdef CONFIG_DEBUG_HARDFAULT -# define hfdbg(format, ...) lldbg(format, ##__VA_ARGS__) +# define hfinfo(format, ...) _alert(format, ##__VA_ARGS__) #else -# define hfdbg(x...) +# define hfinfo(x...) #endif #define INSN_SVC0 0xdf00 /* insn: svc 0 */ -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -118,7 +106,7 @@ int up_hardfault(int irq, FAR void *context) /* Fetch the instruction that caused the Hard fault */ uint16_t insn = *pc; - hfdbg(" PC: %p INSN: %04x\n", pc, insn); + hfinfo(" PC: %p INSN: %04x\n", pc, insn); /* If this was the instruction 'svc 0', then forward processing * to the SVCall handler @@ -126,7 +114,7 @@ int up_hardfault(int irq, FAR void *context) if (insn == INSN_SVC0) { - hfdbg("Forward SVCall\n"); + hfinfo("Forward SVCall\n"); return up_svcall(irq, context); } } @@ -134,22 +122,22 @@ int up_hardfault(int irq, FAR void *context) #if defined(CONFIG_DEBUG_HARDFAULT) /* Dump some hard fault info */ - hfdbg("\nHard Fault:\n"); - hfdbg(" IRQ: %d regs: %p\n", irq, regs); - hfdbg(" PRIMASK: %08x IPSR: %08x\n", - getprimask(), getipsr()); - hfdbg(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", - regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3], - regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]); - hfdbg(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", - regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11], - regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]); - hfdbg(" xPSR: %08x PRIMASK: %08x (saved)\n", - CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK]); + _alert("\nHard Fault:\n"); + _alert(" IRQ: %d regs: %p\n", irq, regs); + _alert(" PRIMASK: %08x IPSR: %08x\n", + getprimask(), getipsr()); + _alert(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", + regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3], + regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]); + _alert(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", + regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11], + regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]); + _alert(" xPSR: %08x PRIMASK: %08x (saved)\n", + CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK]); #endif (void)up_irq_save(); - lldbg("PANIC!!! Hard fault\n"); + _alert("PANIC!!! Hard fault\n"); PANIC(); return OK; /* Won't get here */ } diff --git a/arch/arm/src/armv6-m/up_releasepending.c b/arch/arm/src/armv6-m/up_releasepending.c index c3e2d02ea70c64ed4323136e48f3dff423627322..3c925a02b816280902308c6f314ef8baadc8dc9c 100644 --- a/arch/arm/src/armv6-m/up_releasepending.c +++ b/arch/arm/src/armv6-m/up_releasepending.c @@ -66,7 +66,7 @@ void up_release_pending(void) { struct tcb_s *rtcb = this_task(); - slldbg("From TCB=%p\n", rtcb); + sinfo("From TCB=%p\n", rtcb); /* Merge the g_pendingtasks list into the ready-to-run task list */ diff --git a/arch/arm/src/armv6-m/up_reprioritizertr.c b/arch/arm/src/armv6-m/up_reprioritizertr.c index bd50b88b70c2d8c05e5f29b410eeff6af135ac88..41f0c8700d33b9b6859c372b6a134087d4ed89e7 100644 --- a/arch/arm/src/armv6-m/up_reprioritizertr.c +++ b/arch/arm/src/armv6-m/up_reprioritizertr.c @@ -94,7 +94,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) struct tcb_s *rtcb = this_task(); bool switch_needed; - slldbg("TCB=%p PRI=%d\n", tcb, priority); + sinfo("TCB=%p PRI=%d\n", tcb, priority); /* Remove the tcb task from the ready-to-run list. * sched_removereadytorun will return true if we just removed the head diff --git a/arch/arm/src/armv6-m/up_schedulesigaction.c b/arch/arm/src/armv6-m/up_schedulesigaction.c index be9505a9c2c9ae74404f0cf8edd4d215b42cc432..5040582bacf59d2c87c8f27501cb454fd648b357 100644 --- a/arch/arm/src/armv6-m/up_schedulesigaction.c +++ b/arch/arm/src/armv6-m/up_schedulesigaction.c @@ -107,7 +107,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) { irqstate_t flags; - sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver); + sinfo("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver); /* Make sure that interrupts are disabled */ @@ -121,7 +121,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * to the currently executing task. */ - sdbg("rtcb=0x%p CURRENT_REGS=0x%p\n", this_task(), CURRENT_REGS); + sinfo("rtcb=0x%p CURRENT_REGS=0x%p\n", this_task(), CURRENT_REGS); if (tcb == this_task()) { diff --git a/arch/arm/src/armv6-m/up_sigdeliver.c b/arch/arm/src/armv6-m/up_sigdeliver.c index 84b89542a207aff8cceb519d51bd8e0ac47ce0ff..c2b3e8675e0ee606060d2872254b66607aa5a354 100644 --- a/arch/arm/src/armv6-m/up_sigdeliver.c +++ b/arch/arm/src/armv6-m/up_sigdeliver.c @@ -100,7 +100,7 @@ void up_sigdeliver(void) board_autoled_on(LED_SIGNAL); - sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", + sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); ASSERT(rtcb->xcp.sigdeliver != NULL); @@ -135,7 +135,7 @@ void up_sigdeliver(void) * errno that is needed by the user logic (it is probably EINTR). */ - sdbg("Resuming\n"); + sinfo("Resuming\n"); (void)up_irq_save(); rtcb->pterrno = saved_errno; diff --git a/arch/arm/src/armv6-m/up_svcall.c b/arch/arm/src/armv6-m/up_svcall.c index b5cec07937933cdc12a47165f980057554c8b0e2..1cd7e3a33b058a55747d143080c9610ae4fbc779 100644 --- a/arch/arm/src/armv6-m/up_svcall.c +++ b/arch/arm/src/armv6-m/up_svcall.c @@ -55,33 +55,6 @@ #include "exc_return.h" #include "up_internal.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Configuration ************************************************************/ - -/* Debug ********************************************************************/ -/* Debug output from this file may interfere with context switching! To get - * debug output you must enabled the following in your NuttX configuration: - * - * - CONFIG_DEBUG and CONFIG_DEBUG_SYSCALL (shows only syscalls) - * - CONFIG_DEBUG and CONFIG_DEBUG_SVCALL (shows everything) - */ - -#if defined(CONFIG_DEBUG_SYSCALL) || defined(CONFIG_DEBUG_SVCALL) -# define svcdbg(format, ...) lldbg(format, ##__VA_ARGS__) -#else -# define svcdbg(x...) -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -169,24 +142,24 @@ int up_svcall(int irq, FAR void *context) * and R1..R7 = variable number of arguments depending on the system call. */ -#if defined(CONFIG_DEBUG_SYSCALL) || defined(CONFIG_DEBUG_SVCALL) +#ifdef CONFIG_DEBUG_SYSCALL_INFO # ifndef CONFIG_DEBUG_SVCALL if (cmd > SYS_switch_context) # endif { - svcdbg("SVCALL Entry: regs: %p cmd: %d\n", regs, cmd); - svcdbg(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", - regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3], - regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]); - svcdbg(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", - regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11], - regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]); + svcinfo("SVCALL Entry: regs: %p cmd: %d\n", regs, cmd); + svcinfo(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", + regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3], + regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]); + svcinfo(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", + regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11], + regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]); # ifdef CONFIG_BUILD_PROTECTED - svcdbg(" PSR: %08x PRIMASK: %08x EXC_RETURN: %08x\n", - regs[REG_XPSR], regs[REG_PRIMASK], regs[REG_EXC_RETURN]); + svcinfo(" PSR: %08x PRIMASK: %08x EXC_RETURN: %08x\n", + regs[REG_XPSR], regs[REG_PRIMASK], regs[REG_EXC_RETURN]); # else - svcdbg(" PSR: %08x PRIMASK: %08x\n", - regs[REG_XPSR], regs[REG_PRIMASK]); + svcinfo(" PSR: %08x PRIMASK: %08x\n", + regs[REG_XPSR], regs[REG_PRIMASK]); # endif } #endif @@ -471,7 +444,7 @@ int up_svcall(int irq, FAR void *context) regs[REG_R0] -= CONFIG_SYS_RESERVED; #else - slldbg("ERROR: Bad SYS call: %d\n", regs[REG_R0]); + svcerr("ERROR: Bad SYS call: %d\n", regs[REG_R0]); #endif } break; @@ -479,37 +452,37 @@ int up_svcall(int irq, FAR void *context) /* Report what happened. That might difficult in the case of a context switch */ -#if defined(CONFIG_DEBUG_SYSCALL) || defined(CONFIG_DEBUG_SVCALL) +#ifdef CONFIG_DEBUG_SYSCALL_INFO # ifndef CONFIG_DEBUG_SVCALL if (cmd > SYS_switch_context) # else if (regs != CURRENT_REGS) # endif { - svcdbg("SVCall Return:\n"); - svcdbg(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", - CURRENT_REGS[REG_R0], CURRENT_REGS[REG_R1], - CURRENT_REGS[REG_R2], CURRENT_REGS[REG_R3], - CURRENT_REGS[REG_R4], CURRENT_REGS[REG_R5], - CURRENT_REGS[REG_R6], CURRENT_REGS[REG_R7]); - svcdbg(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", - CURRENT_REGS[REG_R8], CURRENT_REGS[REG_R9], - CURRENT_REGS[REG_R10], CURRENT_REGS[REG_R11], - CURRENT_REGS[REG_R12], CURRENT_REGS[REG_R13], - CURRENT_REGS[REG_R14], CURRENT_REGS[REG_R15]); + svcinfo("SVCall Return:\n"); + svcinfo(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", + CURRENT_REGS[REG_R0], CURRENT_REGS[REG_R1], + CURRENT_REGS[REG_R2], CURRENT_REGS[REG_R3], + CURRENT_REGS[REG_R4], CURRENT_REGS[REG_R5], + CURRENT_REGS[REG_R6], CURRENT_REGS[REG_R7]); + svcinfo(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", + CURRENT_REGS[REG_R8], CURRENT_REGS[REG_R9], + CURRENT_REGS[REG_R10], CURRENT_REGS[REG_R11], + CURRENT_REGS[REG_R12], CURRENT_REGS[REG_R13], + CURRENT_REGS[REG_R14], CURRENT_REGS[REG_R15]); #ifdef CONFIG_BUILD_PROTECTED - svcdbg(" PSR: %08x PRIMASK: %08x EXC_RETURN: %08x\n", - CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK], - CURRENT_REGS[REG_EXC_RETURN]); + svcinfo(" PSR: %08x PRIMASK: %08x EXC_RETURN: %08x\n", + CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK], + CURRENT_REGS[REG_EXC_RETURN]); #else - svcdbg(" PSR: %08x PRIMASK: %08x\n", - CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK]); + svcinfo(" PSR: %08x PRIMASK: %08x\n", + CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK]); #endif } # ifdef CONFIG_DEBUG_SVCALL else { - svcdbg("SVCall Return: %d\n", regs[REG_R0]); + svcinfo("SVCall Return: %d\n", regs[REG_R0]); } # endif #endif diff --git a/arch/arm/src/armv7-a/arm_addrenv.c b/arch/arm/src/armv7-a/arm_addrenv.c index 2bd1f886cecc08fa8ea163c382416c38cbe64375..7d2818283dca2d1148ea3ecb01c9c4b66fae85a0 100644 --- a/arch/arm/src/armv7-a/arm_addrenv.c +++ b/arch/arm/src/armv7-a/arm_addrenv.c @@ -257,7 +257,7 @@ int up_addrenv_create(size_t textsize, size_t datasize, size_t heapsize, { int ret; - bvdbg("addrenv=%p textsize=%lu datasize=%lu\n", + binfo("addrenv=%p textsize=%lu datasize=%lu\n", addrenv, (unsigned long)textsize, (unsigned long)datasize); DEBUGASSERT(addrenv); @@ -278,7 +278,7 @@ int up_addrenv_create(size_t textsize, size_t datasize, size_t heapsize, MMU_L2_UTEXTFLAGS); if (ret < 0) { - bdbg("ERROR: Failed to create .text region: %d\n", ret); + berr("ERROR: Failed to create .text region: %d\n", ret); goto errout; } @@ -293,7 +293,7 @@ int up_addrenv_create(size_t textsize, size_t datasize, size_t heapsize, MMU_L2_UDATAFLAGS); if (ret < 0) { - bdbg("ERROR: Failed to create .bss/.data region: %d\n", ret); + berr("ERROR: Failed to create .bss/.data region: %d\n", ret); goto errout; } @@ -305,7 +305,7 @@ int up_addrenv_create(size_t textsize, size_t datasize, size_t heapsize, ret = up_addrenv_initdata((uintptr_t)addrenv->data[0] & PMD_PTE_PADDR_MASK); if (ret < 0) { - bdbg("ERROR: Failed to initialize .bss/.data region: %d\n", ret); + berr("ERROR: Failed to initialize .bss/.data region: %d\n", ret); goto errout; } #endif @@ -318,7 +318,7 @@ int up_addrenv_create(size_t textsize, size_t datasize, size_t heapsize, MMU_L2_UDATAFLAGS); if (ret < 0) { - bdbg("ERROR: Failed to create heap region: %d\n", ret); + berr("ERROR: Failed to create heap region: %d\n", ret); goto errout; } @@ -353,7 +353,7 @@ errout: int up_addrenv_destroy(FAR group_addrenv_t *addrenv) { - bvdbg("addrenv=%p\n", addrenv); + binfo("addrenv=%p\n", addrenv); DEBUGASSERT(addrenv); /* Destroy the .text region */ @@ -405,7 +405,7 @@ int up_addrenv_destroy(FAR group_addrenv_t *addrenv) int up_addrenv_vtext(FAR group_addrenv_t *addrenv, FAR void **vtext) { - bvdbg("return=%p\n", (FAR void *)CONFIG_ARCH_TEXT_VBASE); + binfo("return=%p\n", (FAR void *)CONFIG_ARCH_TEXT_VBASE); /* Not much to do in this case */ @@ -439,7 +439,7 @@ int up_addrenv_vtext(FAR group_addrenv_t *addrenv, FAR void **vtext) int up_addrenv_vdata(FAR group_addrenv_t *addrenv, uintptr_t textsize, FAR void **vdata) { - bvdbg("return=%p\n", + binfo("return=%p\n", (FAR void *)(CONFIG_ARCH_DATA_VBASE + ARCH_DATA_RESERVE_SIZE)); /* Not much to do in this case */ @@ -636,7 +636,7 @@ int up_addrenv_restore(FAR const save_addrenv_t *oldenv) uintptr_t vaddr; int i; - bvdbg("oldenv=%p\n", oldenv); + binfo("oldenv=%p\n", oldenv); DEBUGASSERT(oldenv); for (vaddr = CONFIG_ARCH_TEXT_VBASE, i = 0; @@ -752,7 +752,7 @@ int up_addrenv_coherent(FAR const group_addrenv_t *addrenv) int up_addrenv_clone(FAR const group_addrenv_t *src, FAR group_addrenv_t *dest) { - bvdbg("src=%p dest=%p\n", src, dest); + binfo("src=%p dest=%p\n", src, dest); DEBUGASSERT(src && dest); /* Just copy the address environment from the source to the destination */ @@ -784,7 +784,7 @@ int up_addrenv_clone(FAR const group_addrenv_t *src, int up_addrenv_attach(FAR struct task_group_s *group, FAR struct tcb_s *tcb) { - bvdbg("group=%p tcb=%p\n", group, tcb); + binfo("group=%p tcb=%p\n", group, tcb); /* Nothing needs to be done in this implementation */ @@ -817,7 +817,7 @@ int up_addrenv_attach(FAR struct task_group_s *group, FAR struct tcb_s *tcb) int up_addrenv_detach(FAR struct task_group_s *group, FAR struct tcb_s *tcb) { - bvdbg("group=%p tcb=%p\n", group, tcb); + binfo("group=%p tcb=%p\n", group, tcb); /* Nothing needs to be done in this implementation */ diff --git a/arch/arm/src/armv7-a/arm_addrenv_kstack.c b/arch/arm/src/armv7-a/arm_addrenv_kstack.c index da2a474126edce8306937c48ce5202bb016f14b7..5bb2b688b541cc09b477555ac879010dd39f7d06 100644 --- a/arch/arm/src/armv7-a/arm_addrenv_kstack.c +++ b/arch/arm/src/armv7-a/arm_addrenv_kstack.c @@ -144,7 +144,7 @@ int up_addrenv_kstackalloc(FAR struct tcb_s *tcb) { - bvdbg("tcb=%p stacksize=%u\n", tcb, ARCH_KERNEL_STACKSIZE); + binfo("tcb=%p stacksize=%u\n", tcb, ARCH_KERNEL_STACKSIZE); DEBUGASSERT(tcb && tcb->xcp.kstack == 0); @@ -153,7 +153,7 @@ int up_addrenv_kstackalloc(FAR struct tcb_s *tcb) tcb->xcp.kstack = (FAR uint32_t *)kmm_memalign(8, ARCH_KERNEL_STACKSIZE); if (!tcb->xcp.kstack) { - bdbg("ERROR: Failed to allocate the kernel stack\n"); + berr("ERROR: Failed to allocate the kernel stack\n"); return -ENOMEM; } @@ -177,7 +177,7 @@ int up_addrenv_kstackalloc(FAR struct tcb_s *tcb) int up_addrenv_kstackfree(FAR struct tcb_s *tcb) { - bvdbg("tcb=%p\n", tcb); + binfo("tcb=%p\n", tcb); DEBUGASSERT(tcb); /* Does the exiting thread have a kernel stack? */ diff --git a/arch/arm/src/armv7-a/arm_addrenv_shm.c b/arch/arm/src/armv7-a/arm_addrenv_shm.c index 9a05b9f7b92997542052a72156a2b7c1dab6cbb2..cc9c9440d802dba65a345c74e6c7ebbb98e108c6 100644 --- a/arch/arm/src/armv7-a/arm_addrenv_shm.c +++ b/arch/arm/src/armv7-a/arm_addrenv_shm.c @@ -92,7 +92,7 @@ int up_shmat(FAR uintptr_t *pages, unsigned int npages, uintptr_t vaddr) unsigned int nmapped; unsigned int shmndx; - shmvdbg("pages=%p npages=%d vaddr=%08lx\n", + shminfo("pages=%p npages=%d vaddr=%08lx\n", pages, npages, (unsigned long)vaddr); /* Sanity checks */ @@ -241,7 +241,7 @@ int up_shmdt(uintptr_t vaddr, unsigned int npages) unsigned int nunmapped; unsigned int shmndx; - shmvdbg("npages=%d vaddr=%08lx\n", npages, (unsigned long)vaddr); + shminfo("npages=%d vaddr=%08lx\n", npages, (unsigned long)vaddr); /* Sanity checks */ diff --git a/arch/arm/src/armv7-a/arm_addrenv_ustack.c b/arch/arm/src/armv7-a/arm_addrenv_ustack.c index 206d517ef3810f7190d84bc1d0241328b851ddf9..4b7be01bd6d73e4c8df83412385790799d7ed909 100644 --- a/arch/arm/src/armv7-a/arm_addrenv_ustack.c +++ b/arch/arm/src/armv7-a/arm_addrenv_ustack.c @@ -143,7 +143,7 @@ int up_addrenv_ustackalloc(FAR struct tcb_s *tcb, size_t stacksize) { int ret; - bvdbg("tcb=%p stacksize=%lu\n", tcb, (unsigned long)stacksize); + binfo("tcb=%p stacksize=%lu\n", tcb, (unsigned long)stacksize); DEBUGASSERT(tcb); @@ -163,7 +163,7 @@ int up_addrenv_ustackalloc(FAR struct tcb_s *tcb, size_t stacksize) MMU_L2_UDATAFLAGS); if (ret < 0) { - bdbg("ERROR: Failed to create stack region: %d\n", ret); + berr("ERROR: Failed to create stack region: %d\n", ret); up_addrenv_ustackfree(tcb); return ret; } @@ -190,7 +190,7 @@ int up_addrenv_ustackalloc(FAR struct tcb_s *tcb, size_t stacksize) int up_addrenv_ustackfree(FAR struct tcb_s *tcb) { - bvdbg("tcb=%p\n", tcb); + binfo("tcb=%p\n", tcb); DEBUGASSERT(tcb); /* Destroy the stack region */ @@ -221,7 +221,7 @@ int up_addrenv_ustackfree(FAR struct tcb_s *tcb) int up_addrenv_vustack(FAR const struct tcb_s *tcb, FAR void **vstack) { - bvdbg("Return=%p\n", (FAR void *)CONFIG_ARCH_STACK_VBASE); + binfo("Return=%p\n", (FAR void *)CONFIG_ARCH_STACK_VBASE); /* Not much to do in this case */ diff --git a/arch/arm/src/armv7-a/arm_addrenv_utils.c b/arch/arm/src/armv7-a/arm_addrenv_utils.c index f3147918f26e5f32c8d749b19eb6be06a1b1aee0..2eb58623afaa55e5da925232879a620c256823c5 100644 --- a/arch/arm/src/armv7-a/arm_addrenv_utils.c +++ b/arch/arm/src/armv7-a/arm_addrenv_utils.c @@ -84,7 +84,7 @@ int arm_addrenv_create_region(FAR uintptr_t **list, unsigned int listlen, unsigned int i; unsigned int j; - bvdbg("listlen=%d vaddr=%08lx regionsize=%ld, mmuflags=%08x\n", + binfo("listlen=%d vaddr=%08lx regionsize=%ld, mmuflags=%08x\n", listlen, (unsigned long)vaddr, (unsigned long)regionsize, (unsigned int)mmuflags); @@ -98,7 +98,7 @@ int arm_addrenv_create_region(FAR uintptr_t **list, unsigned int listlen, npages = MM_NPAGES(regionsize); if (npages > (listlen << (20 - MM_PGSHIFT))) { - bdbg("ERROR: npages=%u listlen=%u\n", npages, listlen); + berr("ERROR: npages=%u listlen=%u\n", npages, listlen); return -E2BIG; } @@ -201,7 +201,7 @@ void arm_addrenv_destroy_region(FAR uintptr_t **list, unsigned int listlen, int i; int j; - bvdbg("listlen=%d vaddr=%08lx\n", listlen, (unsigned long)vaddr); + binfo("listlen=%d vaddr=%08lx\n", listlen, (unsigned long)vaddr); for (i = 0; i < listlen; vaddr += SECTION_SIZE, list++, i++) { diff --git a/arch/arm/src/armv7-a/arm_assert.c b/arch/arm/src/armv7-a/arm_assert.c index ab3bd4c90819c9eea4377d7116f9a111cf366c31..3c798d33a0d832f98753fb80496b695c51969b03 100644 --- a/arch/arm/src/armv7-a/arm_assert.c +++ b/arch/arm/src/armv7-a/arm_assert.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/armv7-a/arm_assert.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 @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include #include @@ -75,19 +64,6 @@ # undef CONFIG_ARCH_USBDUMP #endif -/* The following is just intended to keep some ugliness out of the mainline - * code. We are going to print the task name if: - * - * CONFIG_TASK_NAME_SIZE > 0 && <-- The task has a name - * (defined(CONFIG_DEBUG) || <-- And the debug is enabled (lldbg used) - * defined(CONFIG_ARCH_STACKDUMP) <-- Or lowsyslog() is used - */ - -#undef CONFIG_PRINT_TASKNAME -#if CONFIG_TASK_NAME_SIZE > 0 && (defined(CONFIG_DEBUG) || defined(CONFIG_ARCH_STACKDUMP)) -# define CONFIG_PRINT_TASKNAME 1 -#endif - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -121,7 +97,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base) for (stack = sp & ~0x1f; stack < stack_base; stack += 32) { uint32_t *ptr = (uint32_t *)stack; - lldbg("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n", + _alert("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n", stack, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7]); } @@ -139,12 +115,12 @@ static void up_taskdump(FAR struct tcb_s *tcb, FAR void *arg) { /* Dump interesting properties of this task */ -#ifdef CONFIG_PRINT_TASKNAME - lldbg("%s: PID=%d Stack Used=%lu of %lu\n", +#if CONFIG_TASK_NAME_SIZE > 0 + _alert("%s: PID=%d Stack Used=%lu of %lu\n", tcb->name, tcb->pid, (unsigned long)up_check_tcbstack(tcb), (unsigned long)tcb->adj_stack_size); #else - lldbg("PID: %d Stack Used=%lu of %lu\n", + _alert("PID: %d Stack Used=%lu of %lu\n", tcb->pid, (unsigned long)up_check_tcbstack(tcb), (unsigned long)tcb->adj_stack_size); #endif @@ -184,12 +160,12 @@ static inline void up_registerdump(void) for (regs = REG_R0; regs <= REG_R15; regs += 8) { uint32_t *ptr = (uint32_t *)&CURRENT_REGS[regs]; - lldbg("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n", + _alert("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n", regs, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7]); } - lldbg("CPSR: %08x\n", CURRENT_REGS[REG_CPSR]); + _alert("CPSR: %08x\n", CURRENT_REGS[REG_CPSR]); } } #else @@ -209,7 +185,7 @@ static int usbtrace_syslog(FAR const char *fmt, ...) /* Let vsyslog do the real work */ va_start(ap, fmt); - ret = lowvsyslog(LOG_INFO, fmt, ap); + ret = vsyslog(LOG_EMERG, fmt, ap); va_end(ap); return ret; } @@ -253,7 +229,7 @@ static void up_dumpstate(void) ustacksize = (uint32_t)rtcb->adj_stack_size; } - lldbg("Current sp: %08x\n", sp); + _alert("Current sp: %08x\n", sp); #if CONFIG_ARCH_INTERRUPTSTACK > 3 /* Get the limits on the interrupt stack memory */ @@ -263,21 +239,21 @@ static void up_dumpstate(void) /* Show interrupt stack info */ - lldbg("Interrupt stack:\n"); - lldbg(" base: %08x\n", istackbase); - lldbg(" size: %08x\n", istacksize); + _alert("Interrupt stack:\n"); + _alert(" base: %08x\n", istackbase); + _alert(" size: %08x\n", istacksize); #ifdef CONFIG_STACK_COLORATION - lldbg(" used: %08x\n", up_check_intstack()); + _alert(" used: %08x\n", up_check_intstack()); #endif #endif /* Show user stack info */ - lldbg("User stack:\n"); - lldbg(" base: %08x\n", ustackbase); - lldbg(" size: %08x\n", ustacksize); + _alert("User stack:\n"); + _alert(" base: %08x\n", ustackbase); + _alert(" size: %08x\n", ustacksize); #ifdef CONFIG_STACK_COLORATION - lldbg(" used: %08x\n", up_check_tcbstack(rtcb)); + _alert(" used: %08x\n", up_check_tcbstack(rtcb)); #endif #ifdef CONFIG_ARCH_KERNEL_STACK @@ -287,9 +263,9 @@ static void up_dumpstate(void) { kstackbase = (uint32_t)rtcb->xcp.kstack + CONFIG_ARCH_KERNEL_STACKSIZE - 4; - lldbg("Kernel stack:\n"); - lldbg(" base: %08x\n", kstackbase); - lldbg(" size: %08x\n", CONFIG_ARCH_KERNEL_STACKSIZE); + _alert("Kernel stack:\n"); + _alert(" base: %08x\n", kstackbase); + _alert(" size: %08x\n", CONFIG_ARCH_KERNEL_STACKSIZE); } #endif @@ -300,7 +276,7 @@ static void up_dumpstate(void) { /* Yes.. dump the interrupt stack */ - lldbg("Interrupt Stack\n", sp); + _alert("Interrupt Stack\n", sp); up_stackdump(sp, istackbase); /* Extract the user stack pointer which should lie @@ -308,7 +284,7 @@ static void up_dumpstate(void) */ sp = g_intstackbase; - lldbg("User sp: %08x\n", sp); + _alert("User sp: %08x\n", sp); } #endif @@ -318,7 +294,7 @@ static void up_dumpstate(void) if (sp > ustackbase - ustacksize && sp < ustackbase) { - lldbg("User Stack\n", sp); + _alert("User Stack\n", sp); up_stackdump(sp, ustackbase); } @@ -329,7 +305,7 @@ static void up_dumpstate(void) if (sp >= (uint32_t)rtcb->xcp.kstack && sp < kstackbase) { - lldbg("Kernel Stack\n", sp); + _alert("Kernel Stack\n", sp); up_stackdump(sp, kstackbase); } #endif @@ -337,7 +313,7 @@ static void up_dumpstate(void) #ifdef CONFIG_SMP /* Show the CPU number */ - lldbg("CPU%d:\n", up_cpu_index()); + _alert("CPU%d:\n", up_cpu_index()); #endif /* Then dump the CPU registers (if available) */ @@ -396,16 +372,16 @@ static void _up_assert(int errorcode) void up_assert(const uint8_t *filename, int lineno) { -#ifdef CONFIG_PRINT_TASKNAME +#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG_ALERT) struct tcb_s *rtcb = this_task(); #endif board_autoled_on(LED_ASSERTION); -#ifdef CONFIG_PRINT_TASKNAME - lldbg("Assertion failed at file:%s line: %d task: %s\n", +#if CONFIG_TASK_NAME_SIZE > 0 + _alert("Assertion failed at file:%s line: %d task: %s\n", filename, lineno, rtcb->name); #else - lldbg("Assertion failed at file:%s line: %d\n", + _alert("Assertion failed at file:%s line: %d\n", filename, lineno); #endif up_dumpstate(); diff --git a/arch/arm/src/armv7-a/arm_cpustart.c b/arch/arm/src/armv7-a/arm_cpustart.c index 1ec95da855a9122c37c018593feda1c0d9118b2b..88906a717ded5441a01f73310458fff480089ffc 100644 --- a/arch/arm/src/armv7-a/arm_cpustart.c +++ b/arch/arm/src/armv7-a/arm_cpustart.c @@ -64,19 +64,19 @@ static inline void arm_registerdump(FAR struct tcb_s *tcb) { int regndx; - lldbg("CPU%d:\n", up_cpu_index()); + _info("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]); + _info("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]); + _info("CPSR: %08x\n", tcb->xcp.regs[REG_CPSR]); } #else # define arm_registerdump(tcb) @@ -106,7 +106,7 @@ int arm_start_handler(int irq, FAR void *context) { FAR struct tcb_s *tcb; - sllvdbg("CPU%d Started\n", up_cpu_index()); + sinfo("CPU%d Started\n", up_cpu_index()); /* Reset scheduler parameters */ @@ -155,7 +155,7 @@ int arm_start_handler(int irq, FAR void *context) int up_cpu_start(int cpu) { - sllvdbg("Starting CPU%d\n", cpu); + sinfo("Starting CPU%d\n", cpu); DEBUGASSERT(cpu >= 0 && cpu < CONFIG_SMP_NCPUS && cpu != this_cpu()); diff --git a/arch/arm/src/armv7-a/arm_dataabort.c b/arch/arm/src/armv7-a/arm_dataabort.c index 818557c552abc99c82e0acde220c62afeb9ff910..50c95a20188001fd7013b49f8822ce9ec930d9bc 100644 --- a/arch/arm/src/armv7-a/arm_dataabort.c +++ b/arch/arm/src/armv7-a/arm_dataabort.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/armv7-a/arm_dataabort.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 @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include @@ -115,7 +104,7 @@ uint32_t *arm_dataabort(uint32_t *regs, uint32_t dfar, uint32_t dfsr) * fatal error. */ - pglldbg("DFSR: %08x DFAR: %08x\n", dfsr, dfar); + pginfo("DFSR: %08x DFAR: %08x\n", dfsr, dfar); if ((dfsr & FSR_MASK) != FSR_PAGE) { goto segfault; @@ -126,7 +115,7 @@ uint32_t *arm_dataabort(uint32_t *regs, uint32_t dfar, uint32_t dfsr) * (It has not yet been saved in the register context save area). */ - pgllvdbg("VBASE: %08x VEND: %08x\n", PG_PAGED_VBASE, PG_PAGED_VEND); + pginfo("VBASE: %08x VEND: %08x\n", PG_PAGED_VBASE, PG_PAGED_VEND); if (dfar < PG_PAGED_VBASE || dfar >= PG_PAGED_VEND) { goto segfault; @@ -163,7 +152,7 @@ uint32_t *arm_dataabort(uint32_t *regs, uint32_t dfar, uint32_t dfsr) return regs; segfault: - lldbg("Data abort. PC: %08x DFAR: %08x DFSR: %08x\n", + _alert("Data abort. PC: %08x DFAR: %08x DFSR: %08x\n", regs[REG_PC], dfar, dfsr); PANIC(); return regs; /* To keep the compiler happy */ @@ -181,7 +170,7 @@ uint32_t *arm_dataabort(uint32_t *regs, uint32_t dfar, uint32_t dfsr) /* Crash -- possibly showing diagnostic debug information. */ - lldbg("Data abort. PC: %08x DFAR: %08x DFSR: %08x\n", + _alert("Data abort. PC: %08x DFAR: %08x DFSR: %08x\n", regs[REG_PC], dfar, dfsr); PANIC(); return regs; /* To keep the compiler happy */ diff --git a/arch/arm/src/armv7-a/arm_elf.c b/arch/arm/src/armv7-a/arm_elf.c index 57898e136af7a37afb95de9dcfe2af5b29056677..8b9528159ce2e27ba61b44b77f64d90b9c193773 100644 --- a/arch/arm/src/armv7-a/arm_elf.c +++ b/arch/arm/src/armv7-a/arm_elf.c @@ -74,7 +74,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr) if (ehdr->e_machine != EM_ARM) { - bdbg("Not for ARM: e_machine=%04x\n", ehdr->e_machine); + berr("ERROR: Not for ARM: e_machine=%04x\n", ehdr->e_machine); return -ENOEXEC; } @@ -82,7 +82,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr) if (ehdr->e_ident[EI_CLASS] != ELFCLASS32) { - bdbg("Need 32-bit objects: e_ident[EI_CLASS]=%02x\n", ehdr->e_ident[EI_CLASS]); + berr("ERROR: Need 32-bit objects: e_ident[EI_CLASS]=%02x\n", ehdr->e_ident[EI_CLASS]); return -ENOEXEC; } @@ -94,7 +94,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr) if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB) #endif { - bdbg("Wrong endian-ness: e_ident[EI_DATA]=%02x\n", ehdr->e_ident[EI_DATA]); + berr("ERROR: Wrong endian-ness: e_ident[EI_DATA]=%02x\n", ehdr->e_ident[EI_DATA]); return -ENOEXEC; } @@ -102,7 +102,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr) if ((ehdr->e_entry & 3) != 0) { - bdbg("Entry point is not properly aligned: %08x\n", ehdr->e_entry); + berr("ERROR: Entry point is not properly aligned: %08x\n", ehdr->e_entry); return -ENOEXEC; } @@ -162,7 +162,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_CALL: case R_ARM_JUMP24: { - bvdbg("Performing PC24 [%d] link at addr %08lx [%08lx] to sym '%s' st_value=%08lx\n", + binfo("Performing PC24 [%d] link at addr %08lx [%08lx] to sym '%s' st_value=%08lx\n", ELF32_R_TYPE(rel->r_info), (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value); @@ -175,7 +175,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, offset += sym->st_value - addr; if (offset & 3 || offset <= (int32_t) 0xfe000000 || offset >= (int32_t) 0x02000000) { - bdbg(" ERROR: PC24 [%d] relocation out of range, offset=%08lx\n", + berr("ERROR: PC24 [%d] relocation out of range, offset=%08lx\n", ELF32_R_TYPE(rel->r_info), offset); return -EINVAL; @@ -191,7 +191,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_ABS32: case R_ARM_TARGET1: /* New ABI: TARGET1 always treated as ABS32 */ { - bvdbg("Performing ABS32 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", + binfo("Performing ABS32 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value); *(uint32_t *)addr += sym->st_value; @@ -200,7 +200,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_V4BX: { - bvdbg("Performing V4BX link at addr=%08lx [%08lx]\n", + binfo("Performing V4BX link at addr=%08lx [%08lx]\n", (long)addr, (long)(*(uint32_t *)addr)); /* Preserve only Rm and the condition code */ @@ -215,7 +215,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_PREL31: { - bvdbg("Performing PREL31 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", + binfo("Performing PREL31 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value); offset = *(uint32_t *)addr + sym->st_value - addr; @@ -226,7 +226,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_MOVW_ABS_NC: case R_ARM_MOVT_ABS: { - bvdbg("Performing MOVx_ABS [%d] link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", + binfo("Performing MOVx_ABS [%d] link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", ELF32_R_TYPE(rel->r_info), (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value); @@ -246,7 +246,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, break; default: - bdbg("Unsupported relocation: %d\n", ELF32_R_TYPE(rel->r_info)); + berr("ERROR: Unsupported relocation: %d\n", ELF32_R_TYPE(rel->r_info)); return -EINVAL; } @@ -256,6 +256,6 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym, uintptr_t addr) { - bdbg("RELA relocation not supported\n"); + berr("ERROR: RELA relocation not supported\n"); return -ENOSYS; } diff --git a/arch/arm/src/armv7-a/arm_gicv2.c b/arch/arm/src/armv7-a/arm_gicv2.c index 990a2c66dd3dd11ae2e9d58e6ab6dc020ecef858..e99eb540fdef6e55cd24f9c9cd30aeae5f380630 100644 --- a/arch/arm/src/armv7-a/arm_gicv2.c +++ b/arch/arm/src/armv7-a/arm_gicv2.c @@ -387,7 +387,7 @@ uint32_t *arm_decodeirq(uint32_t *regs) regval = getreg32(GIC_ICCIAR); irq = (regval & GIC_ICCIAR_INTID_MASK) >> GIC_ICCIAR_INTID_SHIFT; - gicllvdbg("irq=%d\n", irq); + irqinfo("irq=%d\n", irq); /* Ignore spurions IRQs. ICCIAR will report 1023 if there is no pending * interrupt. diff --git a/arch/arm/src/armv7-a/arm_gicv2_dump.c b/arch/arm/src/armv7-a/arm_gicv2_dump.c index 9e4dfa340f1f97b25cdf3c55dce81d9f1610012e..23e43738da24a1716663f518a2294a08c1306a4f 100644 --- a/arch/arm/src/armv7-a/arm_gicv2_dump.c +++ b/arch/arm/src/armv7-a/arm_gicv2_dump.c @@ -40,12 +40,12 @@ #include #include -#include +#include #include "up_arch.h" #include "gic.h" -#if defined(CONFIG_ARMV7A_HAVE_GICv2) && defined(CONFIG_DEBUG_IRQ) +#if defined(CONFIG_ARMV7A_HAVE_GICv2) && defined(CONFIG_DEBUG_IRQ_INFO) /**************************************************************************** * Private Functions @@ -69,22 +69,22 @@ static inline void arm_gic_dump_cpu(bool all, int irq, int nlines) { - lowsyslog(LOG_INFO, " CPU Interface Registers:\n"); - lowsyslog(LOG_INFO, " ICR: %08x PMR: %08x BPR: %08x IAR: %08x\n", - getreg32(GIC_ICCICR), getreg32(GIC_ICCPMR), - getreg32(GIC_ICCBPR), getreg32(GIC_ICCIAR)); - lowsyslog(LOG_INFO, " RPR: %08x HPIR: %08x ABPR: %08x\n", - getreg32(GIC_ICCRPR), getreg32(GIC_ICCHPIR), - getreg32(GIC_ICCABPR)); - lowsyslog(LOG_INFO, " AIAR: %08x AHPIR: %08x IDR: %08x\n", - getreg32(GIC_ICCAIAR), getreg32(GIC_ICCAHPIR), - getreg32(GIC_ICCIDR)); - lowsyslog(LOG_INFO, " APR1: %08x APR2: %08x APR3: %08x APR4: %08x\n", - getreg32(GIC_ICCAPR1), getreg32(GIC_ICCAPR2), - getreg32(GIC_ICCAPR3), getreg32(GIC_ICCAPR4)); - lowsyslog(LOG_INFO, " NSAPR1: %08x NSAPR2: %08x NSAPR3: %08x NSAPR4: %08x\n", - getreg32(GIC_ICCNSAPR1), getreg32(GIC_ICCNSAPR2), - getreg32(GIC_ICCNSAPR3), getreg32(GIC_ICCNSAPR4)); + irqinfo(" CPU Interface Registers:\n"); + irqinfo(" ICR: %08x PMR: %08x BPR: %08x IAR: %08x\n", + getreg32(GIC_ICCICR), getreg32(GIC_ICCPMR), + getreg32(GIC_ICCBPR), getreg32(GIC_ICCIAR)); + irqinfo(" RPR: %08x HPIR: %08x ABPR: %08x\n", + getreg32(GIC_ICCRPR), getreg32(GIC_ICCHPIR), + getreg32(GIC_ICCABPR)); + irqinfo(" AIAR: %08x AHPIR: %08x IDR: %08x\n", + getreg32(GIC_ICCAIAR), getreg32(GIC_ICCAHPIR), + getreg32(GIC_ICCIDR)); + irqinfo(" APR1: %08x APR2: %08x APR3: %08x APR4: %08x\n", + getreg32(GIC_ICCAPR1), getreg32(GIC_ICCAPR2), + getreg32(GIC_ICCAPR3), getreg32(GIC_ICCAPR4)); + irqinfo(" NSAPR1: %08x NSAPR2: %08x NSAPR3: %08x NSAPR4: %08x\n", + getreg32(GIC_ICCNSAPR1), getreg32(GIC_ICCNSAPR2), + getreg32(GIC_ICCNSAPR3), getreg32(GIC_ICCNSAPR4)); } /**************************************************************************** @@ -110,9 +110,9 @@ static void arm_gic_dumpregs(uintptr_t regaddr, int nlines, int incr) incr <<= 2; for (i = 0; i < nlines; i += incr, regaddr += 16) { - lowsyslog(LOG_INFO, " %08x %08x %08x %08x\n", - getreg32(regaddr), getreg32(regaddr + 4), - getreg32(regaddr + 8), getreg32(regaddr + 12)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(regaddr), getreg32(regaddr + 4), + getreg32(regaddr + 8), getreg32(regaddr + 12)); } } @@ -135,7 +135,7 @@ static void arm_gic_dumpregs(uintptr_t regaddr, int nlines, int incr) static inline void arm_gic_dump4(const char *name, uintptr_t regaddr, int nlines) { - lowsyslog(LOG_INFO, " %s[%08lx]\n", name, (unsigned long)regaddr); + irqinfo(" %s[%08lx]\n", name, (unsigned long)regaddr); arm_gic_dumpregs(regaddr, nlines, 4); } @@ -158,7 +158,7 @@ static inline void arm_gic_dump4(const char *name, uintptr_t regaddr, static inline void arm_gic_dump8(const char *name, uintptr_t regaddr, int nlines) { - lowsyslog(LOG_INFO, " %s[%08lx]\n", name, (unsigned long)regaddr); + irqinfo(" %s[%08lx]\n", name, (unsigned long)regaddr); arm_gic_dumpregs(regaddr, nlines, 8); } @@ -181,7 +181,7 @@ static inline void arm_gic_dump8(const char *name, uintptr_t regaddr, static inline void arm_gic_dump16(const char *name, uintptr_t regaddr, int nlines) { - lowsyslog(LOG_INFO, " %s[%08lx]\n", name, (unsigned long)regaddr); + irqinfo(" %s[%08lx]\n", name, (unsigned long)regaddr); arm_gic_dumpregs(regaddr, nlines, 16); } @@ -204,7 +204,7 @@ static inline void arm_gic_dump16(const char *name, uintptr_t regaddr, static inline void arm_gic_dump32(const char *name, uintptr_t regaddr, int nlines) { - lowsyslog(LOG_INFO, " %s[%08lx]\n", name, (unsigned long)regaddr); + irqinfo(" %s[%08lx]\n", name, (unsigned long)regaddr); arm_gic_dumpregs(regaddr, nlines, 32); } @@ -226,10 +226,10 @@ static inline void arm_gic_dump32(const char *name, uintptr_t regaddr, static inline void arm_gic_dump_distributor(bool all, int irq, int nlines) { - lowsyslog(LOG_INFO, " Distributor Registers:\n"); - lowsyslog(LOG_INFO, " DCR: %08x ICTR: %08x IIDR: %08x\n", - getreg32(GIC_ICDDCR), getreg32(GIC_ICDICTR), - getreg32(GIC_ICDIIDR)); + irqinfo(" Distributor Registers:\n"); + irqinfo(" DCR: %08x ICTR: %08x IIDR: %08x\n", + getreg32(GIC_ICDDCR), getreg32(GIC_ICDICTR), + getreg32(GIC_ICDIIDR)); if (all) { @@ -246,27 +246,27 @@ static inline void arm_gic_dump_distributor(bool all, int irq, int nlines) } else { - lowsyslog(LOG_INFO, " ISR: %08x ISER: %08x ISPR: %08x SAR: %08x\n", - getreg32(GIC_ICDISR(irq)), getreg32(GIC_ICDISER(irq)), - getreg32(GIC_ICDISPR(irq)), getreg32(GIC_ICDSAR(irq))); - lowsyslog(LOG_INFO, " IPR: %08x IPTR: %08x ICFR: %08x SPISR: %08x\n", - getreg32(GIC_ICDIPR(irq)), getreg32(GIC_ICDIPTR(irq)), - getreg32(GIC_ICDICFR(irq)), getreg32(GIC_ICDSPISR(irq))); - lowsyslog(LOG_INFO, " NSACR: %08x SCPR: %08x\n", - getreg32(GIC_ICDNSACR(irq)), getreg32(GIC_ICDSCPR(irq))); + irqinfo(" ISR: %08x ISER: %08x ISPR: %08x SAR: %08x\n", + getreg32(GIC_ICDISR(irq)), getreg32(GIC_ICDISER(irq)), + getreg32(GIC_ICDISPR(irq)), getreg32(GIC_ICDSAR(irq))); + irqinfo(" IPR: %08x IPTR: %08x ICFR: %08x SPISR: %08x\n", + getreg32(GIC_ICDIPR(irq)), getreg32(GIC_ICDIPTR(irq)), + getreg32(GIC_ICDICFR(irq)), getreg32(GIC_ICDSPISR(irq))); + irqinfo(" NSACR: %08x SCPR: %08x\n", + getreg32(GIC_ICDNSACR(irq)), getreg32(GIC_ICDSCPR(irq))); } - lowsyslog(LOG_INFO, " PIDR[%08lx]:\n", (unsigned long)GIC_ICDPIDR(0)); - lowsyslog(LOG_INFO, " %08x %08x %08x %08x\n", - getreg32(GIC_ICDPIDR(0)), getreg32(GIC_ICDPIDR(1)), - getreg32(GIC_ICDPIDR(2)), getreg32(GIC_ICDPIDR(3))); - lowsyslog(LOG_INFO, " %08x %08x %08x %08x\n", - getreg32(GIC_ICDPIDR(4)), getreg32(GIC_ICDPIDR(5)), - getreg32(GIC_ICDPIDR(6))); - lowsyslog(LOG_INFO, " CIDR[%08lx]:\n", (unsigned long)GIC_ICDCIDR(0)); - lowsyslog(LOG_INFO, " %08x %08x %08x %08x\n", - getreg32(GIC_ICDCIDR(0)), getreg32(GIC_ICDCIDR(1)), - getreg32(GIC_ICDCIDR(2)), getreg32(GIC_ICDCIDR(3))); + irqinfo(" PIDR[%08lx]:\n", (unsigned long)GIC_ICDPIDR(0)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(GIC_ICDPIDR(0)), getreg32(GIC_ICDPIDR(1)), + getreg32(GIC_ICDPIDR(2)), getreg32(GIC_ICDPIDR(3))); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(GIC_ICDPIDR(4)), getreg32(GIC_ICDPIDR(5)), + getreg32(GIC_ICDPIDR(6))); + irqinfo(" CIDR[%08lx]:\n", (unsigned long)GIC_ICDCIDR(0)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(GIC_ICDCIDR(0)), getreg32(GIC_ICDCIDR(1)), + getreg32(GIC_ICDCIDR(2)), getreg32(GIC_ICDCIDR(3))); } /**************************************************************************** @@ -295,15 +295,15 @@ void arm_gic_dump(const char *msg, bool all, int irq) if (all) { - lowsyslog(LOG_INFO, "GIC: %s NLINES=%u\n", msg, nlines); + irqinfo("GIC: %s NLINES=%u\n", msg, nlines); } else { - lowsyslog(LOG_INFO, "GIC: %s IRQ=%d\n", msg, irq); + irqinfo("GIC: %s IRQ=%d\n", msg, irq); } arm_gic_dump_cpu(all, irq, nlines); arm_gic_dump_distributor(all, irq, nlines); } -#endif /* CONFIG_ARMV7A_HAVE_GICv2 && CONFIG_DEBUG_IRQ */ +#endif /* CONFIG_ARMV7A_HAVE_GICv2 && CONFIG_DEBUG_IRQ_INFO */ diff --git a/arch/arm/src/armv7-a/arm_head.S b/arch/arm/src/armv7-a/arm_head.S index 220026da340758619e11b7ec48c3b122957a5975..c98ab30719d5774314346cea3c4ab0ece6007022 100644 --- a/arch/arm/src/armv7-a/arm_head.S +++ b/arch/arm/src/armv7-a/arm_head.S @@ -169,7 +169,7 @@ /* This macro will modify r0, r1, r2 and r14 */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES .macro showprogress, code mov r0, #\code bl up_lowputc diff --git a/arch/arm/src/armv7-a/arm_l2cc_pl310.c b/arch/arm/src/armv7-a/arm_l2cc_pl310.c index 64aeaf3b8bc61cbec7dc990fee8011650c961de3..9d455e40d270d8daec5a960739716f01599fcbfe 100644 --- a/arch/arm/src/armv7-a/arm_l2cc_pl310.c +++ b/arch/arm/src/armv7-a/arm_l2cc_pl310.c @@ -411,7 +411,7 @@ void up_l2ccinitialize(void) putreg32(L2CC_CR_L2CEN, L2CC_CR); } - lldbg("(%d ways) * (%d bytes/way) = %d bytes\n", + sinfo("(%d ways) * (%d bytes/way) = %d bytes\n", PL310_NWAYS, PL310_WAYSIZE, PL310_CACHE_SIZE); } diff --git a/arch/arm/src/armv7-a/arm_pghead.S b/arch/arm/src/armv7-a/arm_pghead.S index bc4c99ce26da187dc4508f79e9737b4663ca1fbf..1a546c813d4007ea2105fb0ae544df94dc469956 100644 --- a/arch/arm/src/armv7-a/arm_pghead.S +++ b/arch/arm/src/armv7-a/arm_pghead.S @@ -194,7 +194,7 @@ /* This macro will modify r0, r1, r2 and r14 */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES .macro showprogress, code mov r0, #\code bl up_lowputc diff --git a/arch/arm/src/armv7-a/arm_prefetchabort.c b/arch/arm/src/armv7-a/arm_prefetchabort.c index bdd28c4a3aa72505bd66d469e5d6bcf24dddeee5..0bb8cd37932f68ed9c101f5ad575b3a7f7f16f38 100644 --- a/arch/arm/src/armv7-a/arm_prefetchabort.c +++ b/arch/arm/src/armv7-a/arm_prefetchabort.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/armv7-a/arm_prefetchabort.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 @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include @@ -97,8 +86,8 @@ uint32_t *arm_prefetchabort(uint32_t *regs, uint32_t ifar, uint32_t ifsr) * virtual addresses. */ - pglldbg("VADDR: %08x VBASE: %08x VEND: %08x\n", - regs[REG_PC], PG_PAGED_VBASE, PG_PAGED_VEND); + pginfo("VADDR: %08x VBASE: %08x VEND: %08x\n", + regs[REG_PC], PG_PAGED_VBASE, PG_PAGED_VEND); if (regs[REG_R15] >= PG_PAGED_VBASE && regs[REG_R15] < PG_PAGED_VEND) { @@ -134,7 +123,7 @@ uint32_t *arm_prefetchabort(uint32_t *regs, uint32_t ifar, uint32_t ifsr) } else { - lldbg("Prefetch abort. PC: %08x IFAR: %08x IFSR: %08x\n", + _alert("Prefetch abort. PC: %08x IFAR: %08x IFSR: %08x\n", regs[REG_PC], ifar, ifsr); PANIC(); } @@ -154,7 +143,7 @@ uint32_t *arm_prefetchabort(uint32_t *regs, uint32_t ifar, uint32_t ifsr) /* Crash -- possibly showing diagnostic debug information. */ - lldbg("Prefetch abort. PC: %08x IFAR: %08x IFSR: %08x\n", + _alert("Prefetch abort. PC: %08x IFAR: %08x IFSR: %08x\n", regs[REG_PC], ifar, ifsr); PANIC(); return regs; /* To keep the compiler happy */ diff --git a/arch/arm/src/armv7-a/arm_releasepending.c b/arch/arm/src/armv7-a/arm_releasepending.c index 9696e931c0bdb7643535b0aa3e795eb237cb9c8c..7afc6989a75829f647ee14ba35e2a6b3ef991415 100644 --- a/arch/arm/src/armv7-a/arm_releasepending.c +++ b/arch/arm/src/armv7-a/arm_releasepending.c @@ -67,7 +67,7 @@ void up_release_pending(void) { struct tcb_s *rtcb = this_task(); - slldbg("From TCB=%p\n", rtcb); + sinfo("From TCB=%p\n", rtcb); /* Merge the g_pendingtasks list into the ready-to-run task list */ diff --git a/arch/arm/src/armv7-a/arm_reprioritizertr.c b/arch/arm/src/armv7-a/arm_reprioritizertr.c index d4b2699f6dd01f2a3cc0c3be38038f1961c18c6e..4381178e05b311e620c620b6d9465e10cec5a333 100644 --- a/arch/arm/src/armv7-a/arm_reprioritizertr.c +++ b/arch/arm/src/armv7-a/arm_reprioritizertr.c @@ -95,7 +95,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) struct tcb_s *rtcb = this_task(); bool switch_needed; - slldbg("TCB=%p PRI=%d\n", tcb, priority); + sinfo("TCB=%p PRI=%d\n", tcb, priority); /* Remove the tcb task from the ready-to-run list. * sched_removereadytorun will return true if we just diff --git a/arch/arm/src/armv7-a/arm_schedulesigaction.c b/arch/arm/src/armv7-a/arm_schedulesigaction.c index 3dfe5fc285f7c9a5f4de4a519107067c5ca1bb34..89df348ba039c8942f4c76ac3692b48be245482f 100644 --- a/arch/arm/src/armv7-a/arm_schedulesigaction.c +++ b/arch/arm/src/armv7-a/arm_schedulesigaction.c @@ -94,7 +94,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) { irqstate_t flags; - sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver); + sinfo("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver); /* Make sure that interrupts are disabled */ @@ -108,7 +108,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * to the currently executing task. */ - sdbg("rtcb=0x%p CURRENT_REGS=0x%p\n", this_task(), CURRENT_REGS); + sinfo("rtcb=0x%p CURRENT_REGS=0x%p\n", this_task(), CURRENT_REGS); if (tcb == this_task()) { diff --git a/arch/arm/src/armv7-a/arm_sigdeliver.c b/arch/arm/src/armv7-a/arm_sigdeliver.c index 32f1e0b40d1219f98a282c6ca98fa5c7070bcc6a..be720a464c3550d648b6c4ec52f9de108bc54ba8 100644 --- a/arch/arm/src/armv7-a/arm_sigdeliver.c +++ b/arch/arm/src/armv7-a/arm_sigdeliver.c @@ -83,7 +83,7 @@ void up_sigdeliver(void) board_autoled_on(LED_SIGNAL); - sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", + sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); ASSERT(rtcb->xcp.sigdeliver != NULL); @@ -114,7 +114,7 @@ void up_sigdeliver(void) * errno that is needed by the user logic (it is probably EINTR). */ - sdbg("Resuming\n"); + sinfo("Resuming\n"); (void)up_irq_save(); rtcb->pterrno = saved_errno; diff --git a/arch/arm/src/armv7-a/arm_syscall.c b/arch/arm/src/armv7-a/arm_syscall.c index 854ece3de2cdf789db4e59069a03236733dd78da..77b33b45f4be7954bc50389d3c3d8ccade7776eb 100644 --- a/arch/arm/src/armv7-a/arm_syscall.c +++ b/arch/arm/src/armv7-a/arm_syscall.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/armv7-a/arm_syscall.c * - * Copyright (C) 2013-2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2013-2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include #include @@ -65,17 +54,6 @@ #include "addrenv.h" #include "up_internal.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ - -#if defined(CONFIG_DEBUG_SYSCALL) -# define svcdbg(format, ...) lldbg(format, ##__VA_ARGS__) -#else -# define svcdbg(x...) -#endif - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -178,16 +156,14 @@ uint32_t *arm_syscall(uint32_t *regs) * and R1..R7 = variable number of arguments depending on the system call. */ -#if defined(CONFIG_DEBUG_SYSCALL) - svcdbg("SYSCALL Entry: regs: %p cmd: %d\n", regs, cmd); - svcdbg(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", - regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3], - regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]); - svcdbg(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", - regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11], - regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]); - svcdbg("CPSR: %08x\n", regs[REG_CPSR]); -#endif + svcinfo("SYSCALL Entry: regs: %p cmd: %d\n", regs, cmd); + svcinfo(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", + regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3], + regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]); + svcinfo(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", + regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11], + regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]); + svcinfo("CPSR: %08x\n", regs[REG_CPSR]); /* Handle the SVCall according to the command in R0 */ @@ -480,7 +456,7 @@ uint32_t *arm_syscall(uint32_t *regs) regs[REG_R0] -= CONFIG_SYS_RESERVED; #else - svcdbg("ERROR: Bad SYS call: %d\n", regs[REG_R0]); + svcerr("ERROR: Bad SYS call: %d\n", regs[REG_R0]); #endif #ifdef CONFIG_ARCH_KERNEL_STACK @@ -501,18 +477,16 @@ uint32_t *arm_syscall(uint32_t *regs) break; } -#if defined(CONFIG_DEBUG_SYSCALL) /* Report what happened */ - svcdbg("SYSCALL Exit: regs: %p\n", regs); - svcdbg(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", - regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3], - regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]); - svcdbg(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", - regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11], + svcinfo("SYSCALL Exit: regs: %p\n", regs); + svcinfo(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", + regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3], + regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]); + svcinfo(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", + regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11], regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]); - svcdbg("CPSR: %08x\n", regs[REG_CPSR]); -#endif + svcinfo("CPSR: %08x\n", regs[REG_CPSR]); /* Return the last value of curent_regs. This supports context switches * on return from the exception. That capability is only used with the @@ -526,7 +500,7 @@ uint32_t *arm_syscall(uint32_t *regs) uint32_t *arm_syscall(uint32_t *regs) { - lldbg("SYSCALL from 0x%x\n", regs[REG_PC]); + _alert("SYSCALL from 0x%x\n", regs[REG_PC]); CURRENT_REGS = regs; PANIC(); } diff --git a/arch/arm/src/armv7-a/arm_undefinedinsn.c b/arch/arm/src/armv7-a/arm_undefinedinsn.c index 0c051d9dd916accbf64c8e0d35fb5a5ad801071d..54dbcc25b8a2aa0ce2da4506083a11934f1fef5e 100644 --- a/arch/arm/src/armv7-a/arm_undefinedinsn.c +++ b/arch/arm/src/armv7-a/arm_undefinedinsn.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/armv7-a/arm_undefinedinsn.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 @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include #include @@ -68,7 +57,7 @@ uint32_t *arm_undefinedinsn(uint32_t *regs) { - lldbg("Undefined instruction at 0x%x\n", regs[REG_PC]); + _alert("Undefined instruction at 0x%x\n", regs[REG_PC]); CURRENT_REGS = regs; PANIC(); return regs; /* To keep the compiler happy */ diff --git a/arch/arm/src/armv7-a/gic.h b/arch/arm/src/armv7-a/gic.h index cc6ee4833004f661ec96a5f9d248d23944a7ff6b..8774065135069c3cc747a2eeca47d89e8e876e6e 100644 --- a/arch/arm/src/armv7-a/gic.h +++ b/arch/arm/src/armv7-a/gic.h @@ -590,21 +590,6 @@ #define GIC_IRQ_SPI 32 /* First SPI interrupt ID */ -/* General Macro Definitions ************************************************/ -/* Debug */ - -#ifdef CONFIG_DEBUG_IRQ -# define gicdbg(format, ...) dbg(format, ##__VA_ARGS__) -# define giclldbg(format, ...) lldbg(format, ##__VA_ARGS__) -# define gicvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -# define gicllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__) -#else -# define gicdbg(x...) -# define giclldbg(x...) -# define gicvdbg(x...) -# define gicllvdbg(x...) -#endif - /**************************************************************************** * Inline Functions ****************************************************************************/ @@ -817,7 +802,7 @@ int arm_pause_handler(int irq, FAR void *context); * ****************************************************************************/ -#ifdef CONFIG_DEBUG_IRQ +#ifdef CONFIG_DEBUG_IRQ_INFO void arm_gic_dump(const char *msg, bool all, int irq); #else # define arm_gic_dump(m,a,i) diff --git a/arch/arm/src/armv7-m/Kconfig b/arch/arm/src/armv7-m/Kconfig index 406e2e46624be926494b130312a91d539bc3c02b..404dce07538ef771a6b176e8109dedf20fc6313e 100644 --- a/arch/arm/src/armv7-m/Kconfig +++ b/arch/arm/src/armv7-m/Kconfig @@ -160,6 +160,7 @@ config ARMV7M_STACKCHECK config ARMV7M_ITMSYSLOG bool "ITM SYSLOG support" default n + select ARCH_SYSLOG select SYSLOG ---help--- Enable hooks to support ITM syslog output. This requires additional diff --git a/arch/arm/src/armv7-m/itm_syslog.h b/arch/arm/src/armv7-m/itm_syslog.h index 1b42be2ea8e442ee412ebf9169103b7c8fa9f289..40f71624f57dad9714603f428ef48e839f0d843d 100644 --- a/arch/arm/src/armv7-m/itm_syslog.h +++ b/arch/arm/src/armv7-m/itm_syslog.h @@ -57,7 +57,7 @@ * ****************************************************************************/ -#if defined(CONFIG_SYSLOG) || defined(CONFIG_ARMV7M_ITMSYSLOG) +#ifdef CONFIG_ARMV7M_ITMSYSLOG void itm_syslog_initialize(void); #else # define itm_syslog_initialize() diff --git a/arch/arm/src/armv7-m/mpu.h b/arch/arm/src/armv7-m/mpu.h index 310c21a90912303363435c59a6dbf1f348386ca2..22348a23a685653a1555b14728ab37c30596f9e1 100644 --- a/arch/arm/src/armv7-m/mpu.h +++ b/arch/arm/src/armv7-m/mpu.h @@ -219,12 +219,13 @@ uint32_t mpu_subregion(uintptr_t base, size_t size, uint8_t l2size); static inline void mpu_showtype(void) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_SCHED_INFO uint32_t regval = getreg32(MPU_TYPE); - dbg("%s MPU Regions: data=%d instr=%d\n", - (regval & MPU_TYPE_SEPARATE) != 0 ? "Separate" : "Unified", - (regval & MPU_TYPE_DREGION_MASK) >> MPU_TYPE_DREGION_SHIFT, - (regval & MPU_TYPE_IREGION_MASK) >> MPU_TYPE_IREGION_SHIFT); + + sinfo("%s MPU Regions: data=%d instr=%d\n", + (regval & MPU_TYPE_SEPARATE) != 0 ? "Separate" : "Unified", + (regval & MPU_TYPE_DREGION_MASK) >> MPU_TYPE_DREGION_SHIFT, + (regval & MPU_TYPE_IREGION_MASK) >> MPU_TYPE_IREGION_SHIFT); #endif } diff --git a/arch/arm/src/armv7-m/up_assert.c b/arch/arm/src/armv7-m/up_assert.c index 0f6fa00d219488401220dc6d35a5d469786f66d8..b34cfc73950343db2ab09940953f55a9daf14fab 100644 --- a/arch/arm/src/armv7-m/up_assert.c +++ b/arch/arm/src/armv7-m/up_assert.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/armv7-m/up_assert.c * - * Copyright (C) 2009-2010, 2012-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2009-2010, 2012-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include #include @@ -75,23 +64,6 @@ # undef CONFIG_ARCH_USBDUMP #endif -/* The following is just intended to keep some ugliness out of the mainline - * code. We are going to print the task name if: - * - * CONFIG_TASK_NAME_SIZE > 0 && <-- The task has a name - * (defined(CONFIG_DEBUG) || <-- And the debug is enabled (lldbg used) - * defined(CONFIG_ARCH_STACKDUMP) <-- Or lowsyslog() is used - */ - -#undef CONFIG_PRINT_TASKNAME -#if CONFIG_TASK_NAME_SIZE > 0 && (defined(CONFIG_DEBUG) || defined(CONFIG_ARCH_STACKDUMP)) -# define CONFIG_PRINT_TASKNAME 1 -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -125,7 +97,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base) for (stack = sp & ~0x1f; stack < stack_base; stack += 32) { uint32_t *ptr = (uint32_t *)stack; - lldbg("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n", + _alert("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n", stack, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7]); } @@ -143,12 +115,12 @@ static void up_taskdump(FAR struct tcb_s *tcb, FAR void *arg) { /* Dump interesting properties of this task */ -#ifdef CONFIG_PRINT_TASKNAME - lldbg("%s: PID=%d Stack Used=%lu of %lu\n", +#if CONFIG_TASK_NAME_SIZE > 0 + _alert("%s: PID=%d Stack Used=%lu of %lu\n", tcb->name, tcb->pid, (unsigned long)up_check_tcbstack(tcb), (unsigned long)tcb->adj_stack_size); #else - lldbg("PID: %d Stack Used=%lu of %lu\n", + _alert("PID: %d Stack Used=%lu of %lu\n", tcb->pid, (unsigned long)up_check_tcbstack(tcb), (unsigned long)tcb->adj_stack_size); #endif @@ -183,29 +155,29 @@ static inline void up_registerdump(void) { /* Yes.. dump the interrupt registers */ - lldbg("R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", + _alert("R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", CURRENT_REGS[REG_R0], CURRENT_REGS[REG_R1], CURRENT_REGS[REG_R2], CURRENT_REGS[REG_R3], CURRENT_REGS[REG_R4], CURRENT_REGS[REG_R5], CURRENT_REGS[REG_R6], CURRENT_REGS[REG_R7]); - lldbg("R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", + _alert("R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", CURRENT_REGS[REG_R8], CURRENT_REGS[REG_R9], CURRENT_REGS[REG_R10], CURRENT_REGS[REG_R11], CURRENT_REGS[REG_R12], CURRENT_REGS[REG_R13], CURRENT_REGS[REG_R14], CURRENT_REGS[REG_R15]); #ifdef CONFIG_ARMV7M_USEBASEPRI - lldbg("xPSR: %08x BASEPRI: %08x CONTROL: %08x\n", + _alert("xPSR: %08x BASEPRI: %08x CONTROL: %08x\n", CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_BASEPRI], getcontrol()); #else - lldbg("xPSR: %08x PRIMASK: %08x CONTROL: %08x\n", + _alert("xPSR: %08x PRIMASK: %08x CONTROL: %08x\n", CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK], getcontrol()); #endif #ifdef REG_EXC_RETURN - lldbg("EXC_RETURN: %08x\n", CURRENT_REGS[REG_EXC_RETURN]); + _alert("EXC_RETURN: %08x\n", CURRENT_REGS[REG_EXC_RETURN]); #endif } } @@ -226,7 +198,7 @@ static int usbtrace_syslog(FAR const char *fmt, ...) /* Let vsyslog do the real work */ va_start(ap, fmt); - ret = lowvsyslog(LOG_INFO, fmt, ap); + ret = vsyslog(LOG_EMERG, fmt, ap); va_end(ap); return ret; } @@ -275,12 +247,12 @@ static void up_dumpstate(void) /* Show interrupt stack info */ - lldbg("sp: %08x\n", sp); - lldbg("IRQ stack:\n"); - lldbg(" base: %08x\n", istackbase); - lldbg(" size: %08x\n", istacksize); + _alert("sp: %08x\n", sp); + _alert("IRQ stack:\n"); + _alert(" base: %08x\n", istackbase); + _alert(" size: %08x\n", istacksize); #ifdef CONFIG_STACK_COLORATION - lldbg(" used: %08x\n", up_check_intstack()); + _alert(" used: %08x\n", up_check_intstack()); #endif /* Does the current stack pointer lie within the interrupt @@ -302,14 +274,14 @@ static void up_dumpstate(void) if (CURRENT_REGS) { sp = CURRENT_REGS[REG_R13]; - lldbg("sp: %08x\n", sp); + _alert("sp: %08x\n", sp); } - lldbg("User stack:\n"); - lldbg(" base: %08x\n", ustackbase); - lldbg(" size: %08x\n", ustacksize); + _alert("User stack:\n"); + _alert(" base: %08x\n", ustackbase); + _alert(" size: %08x\n", ustacksize); #ifdef CONFIG_STACK_COLORATION - lldbg(" used: %08x\n", up_check_tcbstack(rtcb)); + _alert(" used: %08x\n", up_check_tcbstack(rtcb)); #endif /* Dump the user stack if the stack pointer lies within the allocated user @@ -325,11 +297,11 @@ static void up_dumpstate(void) /* Show user stack info */ - lldbg("sp: %08x\n", sp); - lldbg("stack base: %08x\n", ustackbase); - lldbg("stack size: %08x\n", ustacksize); + _alert("sp: %08x\n", sp); + _alert("stack base: %08x\n", ustackbase); + _alert("stack size: %08x\n", ustacksize); #ifdef CONFIG_STACK_COLORATION - lldbg("stack used: %08x\n", up_check_tcbstack(rtcb)); + _alert("stack used: %08x\n", up_check_tcbstack(rtcb)); #endif /* Dump the user stack if the stack pointer lies within the allocated user @@ -338,7 +310,7 @@ static void up_dumpstate(void) if (sp > ustackbase || sp <= ustackbase - ustacksize) { - lldbg("ERROR: Stack pointer is not within the allocated stack\n"); + _alert("ERROR: Stack pointer is not within the allocated stack\n"); } else { @@ -403,17 +375,17 @@ static void _up_assert(int errorcode) void up_assert(const uint8_t *filename, int lineno) { -#ifdef CONFIG_PRINT_TASKNAME +#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG_ALERT) struct tcb_s *rtcb = this_task(); #endif board_autoled_on(LED_ASSERTION); -#ifdef CONFIG_PRINT_TASKNAME - lldbg("Assertion failed at file:%s line: %d task: %s\n", +#if CONFIG_TASK_NAME_SIZE > 0 + _alert("Assertion failed at file:%s line: %d task: %s\n", filename, lineno, rtcb->name); #else - lldbg("Assertion failed at file:%s line: %d\n", + _alert("Assertion failed at file:%s line: %d\n", filename, lineno); #endif diff --git a/arch/arm/src/armv7-m/up_elf.c b/arch/arm/src/armv7-m/up_elf.c index bf492f1acaa5ac25ac8a7c1a0aec6fd73f49866f..f2e0cdd97925d84fb99f1479a22b4cb980019bfe 100644 --- a/arch/arm/src/armv7-m/up_elf.c +++ b/arch/arm/src/armv7-m/up_elf.c @@ -82,7 +82,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr) if (ehdr->e_machine != EM_ARM) { - bdbg("Not for ARM: e_machine=%04x\n", ehdr->e_machine); + berr("ERROR: Not for ARM: e_machine=%04x\n", ehdr->e_machine); return -ENOEXEC; } @@ -90,7 +90,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr) if (ehdr->e_ident[EI_CLASS] != ELFCLASS32) { - bdbg("Need 32-bit objects: e_ident[EI_CLASS]=%02x\n", ehdr->e_ident[EI_CLASS]); + berr("ERROR: Need 32-bit objects: e_ident[EI_CLASS]=%02x\n", ehdr->e_ident[EI_CLASS]); return -ENOEXEC; } @@ -102,7 +102,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr) if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB) #endif { - bdbg("Wrong endian-ness: e_ident[EI_DATA]=%02x\n", ehdr->e_ident[EI_DATA]); + berr("ERROR: Wrong endian-ness: e_ident[EI_DATA]=%02x\n", ehdr->e_ident[EI_DATA]); return -ENOEXEC; } @@ -164,7 +164,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_CALL: case R_ARM_JUMP24: { - bvdbg("Performing PC24 [%d] link at addr %08lx [%08lx] to sym '%s' st_value=%08lx\n", + binfo("Performing PC24 [%d] link at addr %08lx [%08lx] to sym '%s' st_value=%08lx\n", ELF32_R_TYPE(rel->r_info), (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value); @@ -177,7 +177,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, offset += sym->st_value - addr; if (offset & 3 || offset <= (int32_t) 0xfe000000 || offset >= (int32_t) 0x02000000) { - bdbg(" ERROR: PC24 [%d] relocation out of range, offset=%08lx\n", + berr("ERROR: ERROR: PC24 [%d] relocation out of range, offset=%08lx\n", ELF32_R_TYPE(rel->r_info), offset); return -EINVAL; @@ -193,7 +193,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_ABS32: case R_ARM_TARGET1: /* New ABI: TARGET1 always treated as ABS32 */ { - bvdbg("Performing ABS32 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", + binfo("Performing ABS32 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value); *(uint32_t *)addr += sym->st_value; @@ -204,7 +204,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_TARGET2: /* TARGET2 is a platform-specific relocation: gcc-arm-none-eabi * performs a self relocation */ { - bvdbg("Performing TARGET2 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", + binfo("Performing TARGET2 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value); *(uint32_t *)addr += sym->st_value - addr; @@ -253,7 +253,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, upper_insn = (uint32_t)(*(uint16_t *)addr); lower_insn = (uint32_t)(*(uint16_t *)(addr + 2)); - bvdbg("Performing THM_JUMP24 [%d] link at addr=%08lx [%04x %04x] to sym=%p st_value=%08lx\n", + binfo("Performing THM_JUMP24 [%d] link at addr=%08lx [%04x %04x] to sym=%p st_value=%08lx\n", ELF32_R_TYPE(rel->r_info), (long)addr, (int)upper_insn, (int)lower_insn, sym, (long)sym->st_value); @@ -287,7 +287,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, /* And perform the relocation */ - bvdbg(" S=%d J1=%d J2=%d offset=%08lx branch target=%08lx\n", + binfo(" S=%d J1=%d J2=%d offset=%08lx branch target=%08lx\n", S, J1, J2, (long)offset, offset + sym->st_value - addr); offset += sym->st_value - addr; @@ -298,7 +298,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, if (ELF32_ST_TYPE(sym->st_info) == STT_FUNC && (offset & 1) == 0) { - bdbg(" ERROR: JUMP24 [%d] requires odd offset, offset=%08lx\n", + berr("ERROR: ERROR: JUMP24 [%d] requires odd offset, offset=%08lx\n", ELF32_R_TYPE(rel->r_info), offset); return -EINVAL; @@ -308,7 +308,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, if (offset <= (int32_t)0xff000000 || offset >= (int32_t)0x01000000) { - bdbg(" ERROR: JUMP24 [%d] relocation out of range, branch taget=%08lx\n", + berr("ERROR: ERROR: JUMP24 [%d] relocation out of range, branch taget=%08lx\n", ELF32_R_TYPE(rel->r_info), offset); return -EINVAL; @@ -328,14 +328,14 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, lower_insn = ((lower_insn & 0xd000) | (J1 << 13) | (J2 << 11) | ((offset >> 1) & 0x07ff)); *(uint16_t *)(addr + 2) = (uint16_t)lower_insn; - bvdbg(" S=%d J1=%d J2=%d insn [%04x %04x]\n", + binfo(" S=%d J1=%d J2=%d insn [%04x %04x]\n", S, J1, J2, (int)upper_insn, (int)lower_insn); } break; case R_ARM_V4BX: { - bvdbg("Performing V4BX link at addr=%08lx [%08lx]\n", + binfo("Performing V4BX link at addr=%08lx [%08lx]\n", (long)addr, (long)(*(uint32_t *)addr)); /* Preserve only Rm and the condition code */ @@ -350,7 +350,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_PREL31: { - bvdbg("Performing PREL31 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", + binfo("Performing PREL31 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value); offset = *(uint32_t *)addr + sym->st_value - addr; @@ -361,7 +361,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_MOVW_ABS_NC: case R_ARM_MOVT_ABS: { - bvdbg("Performing MOVx_ABS [%d] link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", + binfo("Performing MOVx_ABS [%d] link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", ELF32_R_TYPE(rel->r_info), (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value); @@ -416,7 +416,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, upper_insn = (uint32_t)(*(uint16_t *)addr); lower_insn = (uint32_t)(*(uint16_t *)(addr + 2)); - bvdbg("Performing THM_MOVx [%d] link at addr=%08lx [%04x %04x] to sym=%p st_value=%08lx\n", + binfo("Performing THM_MOVx [%d] link at addr=%08lx [%04x %04x] to sym=%p st_value=%08lx\n", ELF32_R_TYPE(rel->r_info), (long)addr, (int)upper_insn, (int)lower_insn, sym, (long)sym->st_value); @@ -433,7 +433,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, /* And perform the relocation */ - bvdbg(" offset=%08lx branch target=%08lx\n", + binfo(" offset=%08lx branch target=%08lx\n", (long)offset, offset + sym->st_value); offset += sym->st_value; @@ -455,13 +455,13 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, (offset & 0x00ff)); *(uint16_t *)(addr + 2) = (uint16_t)lower_insn; - bvdbg(" insn [%04x %04x]\n", + binfo(" insn [%04x %04x]\n", (int)upper_insn, (int)lower_insn); } break; default: - bdbg("Unsupported relocation: %d\n", ELF32_R_TYPE(rel->r_info)); + berr("ERROR: Unsupported relocation: %d\n", ELF32_R_TYPE(rel->r_info)); return -EINVAL; } @@ -471,7 +471,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym, uintptr_t addr) { - bdbg("RELA relocation not supported\n"); + berr("ERROR: RELA relocation not supported\n"); return -ENOSYS; } diff --git a/arch/arm/src/armv7-m/up_hardfault.c b/arch/arm/src/armv7-m/up_hardfault.c index 807d45cc43922595c1dbb7a3c92a0235acbf76e9..fe133cc4f3782fe2e96aadbac49daf970f32f9b3 100644 --- a/arch/arm/src/armv7-m/up_hardfault.c +++ b/arch/arm/src/armv7-m/up_hardfault.c @@ -60,25 +60,13 @@ */ #ifdef CONFIG_DEBUG_HARDFAULT -# define hfdbg(format, ...) lldbg(format, ##__VA_ARGS__) +# define hfalert(format, ...) _alert(format, ##__VA_ARGS__) #else -# define hfdbg(x...) +# define hfalert(x...) #endif #define INSN_SVC0 0xdf00 /* insn: svc 0 */ -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -127,7 +115,7 @@ int up_hardfault(int irq, FAR void *context) /* Fetch the instruction that caused the Hard fault */ uint16_t insn = *pc; - hfdbg(" PC: %p INSN: %04x\n", pc, insn); + hfalert(" PC: %p INSN: %04x\n", pc, insn); /* If this was the instruction 'svc 0', then forward processing * to the SVCall handler @@ -135,7 +123,7 @@ int up_hardfault(int irq, FAR void *context) if (insn == INSN_SVC0) { - hfdbg("Forward SVCall\n"); + hfalert("Forward SVCall\n"); return up_svcall(irq, context); } } @@ -143,43 +131,43 @@ int up_hardfault(int irq, FAR void *context) /* Dump some hard fault info */ - hfdbg("Hard Fault:\n"); - hfdbg(" IRQ: %d regs: %p\n", irq, regs); - hfdbg(" BASEPRI: %08x PRIMASK: %08x IPSR: %08x CONTROL: %08x\n", - getbasepri(), getprimask(), getipsr(), getcontrol()); - hfdbg(" CFAULTS: %08x HFAULTS: %08x DFAULTS: %08x BFAULTADDR: %08x AFAULTS: %08x\n", - getreg32(NVIC_CFAULTS), getreg32(NVIC_HFAULTS), - getreg32(NVIC_DFAULTS), getreg32(NVIC_BFAULT_ADDR), - getreg32(NVIC_AFAULTS)); - hfdbg(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", - regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3], - regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]); - hfdbg(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", - regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11], - regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]); + hfalert("Hard Fault:\n"); + hfalert(" IRQ: %d regs: %p\n", irq, regs); + hfalert(" BASEPRI: %08x PRIMASK: %08x IPSR: %08x CONTROL: %08x\n", + getbasepri(), getprimask(), getipsr(), getcontrol()); + hfalert(" CFAULTS: %08x HFAULTS: %08x DFAULTS: %08x BFAULTADDR: %08x AFAULTS: %08x\n", + getreg32(NVIC_CFAULTS), getreg32(NVIC_HFAULTS), + getreg32(NVIC_DFAULTS), getreg32(NVIC_BFAULT_ADDR), + getreg32(NVIC_AFAULTS)); + hfalert(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", + regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3], + regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]); + hfalert(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", + regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11], + regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]); #ifdef CONFIG_ARMV7M_USEBASEPRI # ifdef REG_EXC_RETURN - hfdbg(" xPSR: %08x BASEPRI: %08x EXC_RETURN: %08x (saved)\n", - CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_BASEPRI], - CURRENT_REGS[REG_EXC_RETURN]); + hfalert(" xPSR: %08x BASEPRI: %08x EXC_RETURN: %08x (saved)\n", + CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_BASEPRI], + CURRENT_REGS[REG_EXC_RETURN]); # else - hfdbg(" xPSR: %08x BASEPRI: %08x (saved)\n", - CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_BASEPRI]); + hfalert(" xPSR: %08x BASEPRI: %08x (saved)\n", + CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_BASEPRI]); # endif #else # ifdef REG_EXC_RETURN - hfdbg(" xPSR: %08x PRIMASK: %08x EXC_RETURN: %08x (saved)\n", - CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK], - CURRENT_REGS[REG_EXC_RETURN]); + hfalert(" xPSR: %08x PRIMASK: %08x EXC_RETURN: %08x (saved)\n", + CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK], + CURRENT_REGS[REG_EXC_RETURN]); # else - hfdbg(" xPSR: %08x PRIMASK: %08x (saved)\n", - CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK]); + hfalert(" xPSR: %08x PRIMASK: %08x (saved)\n", + CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK]); # endif #endif (void)up_irq_save(); - lldbg("PANIC!!! Hard fault: %08x\n", getreg32(NVIC_HFAULTS)); + _alert("PANIC!!! Hard fault: %08x\n", getreg32(NVIC_HFAULTS)); PANIC(); return OK; } diff --git a/arch/arm/src/armv7-m/up_itm_syslog.c b/arch/arm/src/armv7-m/up_itm_syslog.c index 94b499879a79b9111a9225f50f6990a66e6059fb..d63fed09adb238e571c2cdd74f731759cb67e848 100644 --- a/arch/arm/src/armv7-m/up_itm_syslog.c +++ b/arch/arm/src/armv7-m/up_itm_syslog.c @@ -2,7 +2,7 @@ * arch/arm/src/armv7-m/up_itm_syslog.c * * Copyright (C) 2014 Pierre-noel Bouteville . All rights reserved. - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Authors: Pierre-noel Bouteville * Gregory Nutt * @@ -52,7 +52,7 @@ #include "up_arch.h" #include "itm_syslog.h" -#if defined(CONFIG_SYSLOG) || defined(CONFIG_ARMV7M_ITMSYSLOG) +#ifdef CONFIG_ARMV7M_ITMSYSLOG /**************************************************************************** * Pre-processor Definitions @@ -72,6 +72,73 @@ # define CONFIG_ARMV7M_ITMSYSLOG_PORT 0 #endif +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +/* SYSLOG channel methods */ + +static int itm_putc(int ch); +static int itm_flush(void); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* This structure describes the ITM SYSLOG channel */ + +static const struct syslog_channel_s g_itm_channel = +{ + .sc_putc = itm_putc, + .sc_force = itm_putc, + .sc_flush = itm_flush, +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: itm_putc + * + * Description: + * This is the low-level system logging interface. + * + ****************************************************************************/ + +static int itm_putc(int ch) +{ + /* ITM enabled */ + + if ((getreg32(ITM_TCR) & ITM_TCR_ITMENA_Msk) == 0) + { + return EOF; + } + + /* ITM Port "CONFIG_ARMV7M_ITMSYSLOG_PORT" enabled */ + + if (getreg32(ITM_TER) & (1 << CONFIG_ARMV7M_ITMSYSLOG_PORT)) + { + while (getreg32(ITM_PORT(CONFIG_ARMV7M_ITMSYSLOG_PORT)) == 0); + putreg8((uint8_t)ch, ITM_PORT(CONFIG_ARMV7M_ITMSYSLOG_PORT)); + } + + return ch; +} + +/**************************************************************************** + * Name: itm_flush + * + * Description: + * A dummy FLUSH method + * + ****************************************************************************/ + +static int itm_flush(void) +{ + return OK; +} + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -116,38 +183,10 @@ void itm_syslog_initialize(void) putreg32(0x0001000d, ITM_TCR); putreg32(0x00000100, TPI_FFCR); putreg32(0xffffffff, ITM_TER); /* Enable 32 Ports */ -} -/**************************************************************************** - * Name: syslog_putc - * - * Description: - * This is the low-level system logging interface. The debugging/syslogging - * interfaces are syslog() and lowsyslog(). The difference is that - * the syslog() internface writes to fd=1 (stdout) whereas lowsyslog() uses - * a lower level interface that works from interrupt handlers. This - * function is the low-level interface used to implement lowsyslog(). - * - ****************************************************************************/ + /* Setup the SYSLOG channel */ -int syslog_putc(int ch) -{ - /* ITM enabled */ - - if ((getreg32(ITM_TCR) & ITM_TCR_ITMENA_Msk) == 0) - { - return EOF; - } - - /* ITM Port "CONFIG_ARMV7M_ITMSYSLOG_PORT" enabled */ - - if (getreg32(ITM_TER) & (1 << CONFIG_ARMV7M_ITMSYSLOG_PORT)) - { - while (getreg32(ITM_PORT(CONFIG_ARMV7M_ITMSYSLOG_PORT)) == 0); - putreg8((uint8_t)ch, ITM_PORT(CONFIG_ARMV7M_ITMSYSLOG_PORT)); - } - - return ch; + (void)syslog_channel(&g_itm_channel); } -#endif /* CONFIG_SYSLOG && CONFIG_ARMV7M_ITMSYSLOG */ +#endif /* CONFIG_ARMV7M_ITMSYSLOG */ diff --git a/arch/arm/src/armv7-m/up_memfault.c b/arch/arm/src/armv7-m/up_memfault.c index 145dba531d0d788fc61d212c3f9ec860f0e2da35..f883209b769ed75e256c320e25a81fb513c0f7bd 100644 --- a/arch/arm/src/armv7-m/up_memfault.c +++ b/arch/arm/src/armv7-m/up_memfault.c @@ -55,23 +55,13 @@ #undef DEBUG_MEMFAULTS /* Define to debug memory management faults */ #ifdef DEBUG_MEMFAULTS -# define mfdbg(format, ...) lldbg(format, ##__VA_ARGS__) +# define mferr(format, ...) _alert(format, ##__VA_ARGS__) +# define mfinfo(format, ...) _alert(format, ##__VA_ARGS__) #else -# define mfdbg(x...) +# define mferr(x...) +# define mfinfo(x...) #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -92,36 +82,36 @@ int up_memfault(int irq, FAR void *context) /* Dump some memory management fault info */ (void)up_irq_save(); - lldbg("PANIC!!! Memory Management Fault:\n"); - mfdbg(" IRQ: %d context: %p\n", irq, regs); - lldbg(" CFAULTS: %08x MMFAR: %08x\n", + _alert("PANIC!!! Memory Management Fault:\n"); + mfinfo(" IRQ: %d context: %p\n", irq, regs); + _alert(" CFAULTS: %08x MMFAR: %08x\n", getreg32(NVIC_CFAULTS), getreg32(NVIC_MEMMANAGE_ADDR)); - mfdbg(" BASEPRI: %08x PRIMASK: %08x IPSR: %08x CONTROL: %08x\n", - getbasepri(), getprimask(), getipsr(), getcontrol()); - mfdbg(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", - regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3], - regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]); - mfdbg(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", - regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11], - regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]); + mfinfo(" BASEPRI: %08x PRIMASK: %08x IPSR: %08x CONTROL: %08x\n", + getbasepri(), getprimask(), getipsr(), getcontrol()); + mfinfo(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", + regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3], + regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]); + mfinfo(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", + regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11], + regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]); #ifdef CONFIG_ARMV7M_USEBASEPRI # ifdef REG_EXC_RETURN - mfdbg(" xPSR: %08x BASEPRI: %08x EXC_RETURN: %08x (saved)\n", - CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_BASEPRI], - CURRENT_REGS[REG_EXC_RETURN]); + mfinfo(" xPSR: %08x BASEPRI: %08x EXC_RETURN: %08x (saved)\n", + CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_BASEPRI], + CURRENT_REGS[REG_EXC_RETURN]); # else - mfdbg(" xPSR: %08x BASEPRI: %08x (saved)\n", - CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_BASEPRI]); + mfinfo(" xPSR: %08x BASEPRI: %08x (saved)\n", + CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_BASEPRI]); # endif #else # ifdef REG_EXC_RETURN - mfdbg(" xPSR: %08x PRIMASK: %08x EXC_RETURN: %08x (saved)\n", - CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK], - CURRENT_REGS[REG_EXC_RETURN]); + mfinfo(" xPSR: %08x PRIMASK: %08x EXC_RETURN: %08x (saved)\n", + CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK], + CURRENT_REGS[REG_EXC_RETURN]); # else - mfdbg(" xPSR: %08x PRIMASK: %08x (saved)\n", - CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK]); + mfinfo(" xPSR: %08x PRIMASK: %08x (saved)\n", + CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK]); # endif #endif diff --git a/arch/arm/src/armv7-m/up_ramvec_attach.c b/arch/arm/src/armv7-m/up_ramvec_attach.c index 3700cdb00bc1542ff0b44e29585e3363475cded5..6b954803e03db95599e75c5d3066d61c2cd80b36 100644 --- a/arch/arm/src/armv7-m/up_ramvec_attach.c +++ b/arch/arm/src/armv7-m/up_ramvec_attach.c @@ -49,39 +49,6 @@ #ifdef CONFIG_ARCH_RAMVECTORS -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the interrupt - * config. NOTE: that only lldbg types are used so that the output is - * immediately available. - */ - -#ifdef CONFIG_DEBUG_IRQ -# define intdbg lldbg -# define intvdbg llvdbg -#else -# define intdbg(x...) -# define intvdbg(x...) -#endif - -/**************************************************************************** - * Private Type Declarations - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -103,7 +70,7 @@ int up_ramvec_attach(int irq, up_vector_t vector) { int ret = -EINVAL; - intvdbg("%s IRQ%d\n", vector ? "Attaching" : "Detaching", irq); + irqinfo("%s IRQ%d\n", vector ? "Attaching" : "Detaching", irq); if ((unsigned)irq < NR_VECTORS) { diff --git a/arch/arm/src/armv7-m/up_ramvec_initialize.c b/arch/arm/src/armv7-m/up_ramvec_initialize.c index 80b176d67403d0eaf8d14cb880ac1b3e99946bc7..277862bcf36db15d4528da6121089e614c9c1ac2 100644 --- a/arch/arm/src/armv7-m/up_ramvec_initialize.c +++ b/arch/arm/src/armv7-m/up_ramvec_initialize.c @@ -71,24 +71,6 @@ #define RAMVEC_ALIGN ((~NVIC_VECTAB_TBLOFF_MASK & 0xffff) + 1) -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the interrupt - * config. NOTE: that only lldbg types are used so that the output is - * immediately available. - */ - -#ifdef CONFIG_DEBUG_IRQ -# define intdbg lldbg -# define intvdbg llvdbg -#else -# define intdbg(x...) -# define intvdbg(x...) -#endif - -/**************************************************************************** - * Private Type Declarations - ****************************************************************************/ - /**************************************************************************** * Public Data ****************************************************************************/ @@ -147,7 +129,7 @@ void up_ramvec_initialize(void) src = (const CODE up_vector_t *)getreg32(NVIC_VECTAB); dest = g_ram_vectors; - intvdbg("src=%p dest=%p\n", src, dest); + irqinfo("src=%p dest=%p\n", src, dest); for (i = 0; i < ARMV7M_VECTAB_SIZE; i++) { @@ -163,7 +145,7 @@ void up_ramvec_initialize(void) * the table alignment is insufficient. */ - intvdbg("NVIC_VECTAB=%08x\n", getreg32(NVIC_VECTAB)); + irqinfo("NVIC_VECTAB=%08x\n", getreg32(NVIC_VECTAB)); DEBUGASSERT(getreg32(NVIC_VECTAB) == (uint32_t)g_ram_vectors); } diff --git a/arch/arm/src/armv7-m/up_releasepending.c b/arch/arm/src/armv7-m/up_releasepending.c index e9f4cceb33cdf2181f3273caa7bc473d0ea4201d..83be88094e75072d3bc5c8020673c247465829cf 100644 --- a/arch/arm/src/armv7-m/up_releasepending.c +++ b/arch/arm/src/armv7-m/up_releasepending.c @@ -66,7 +66,7 @@ void up_release_pending(void) { struct tcb_s *rtcb = this_task(); - slldbg("From TCB=%p\n", rtcb); + sinfo("From TCB=%p\n", rtcb); /* Merge the g_pendingtasks list into the ready-to-run task list */ diff --git a/arch/arm/src/armv7-m/up_reprioritizertr.c b/arch/arm/src/armv7-m/up_reprioritizertr.c index d3415e77414246695490bb00e54bb912dbb6dac7..5e65a3d33837b16d3928614b6fbd726d2009b34d 100644 --- a/arch/arm/src/armv7-m/up_reprioritizertr.c +++ b/arch/arm/src/armv7-m/up_reprioritizertr.c @@ -94,7 +94,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) struct tcb_s *rtcb = this_task(); bool switch_needed; - slldbg("TCB=%p PRI=%d\n", tcb, priority); + sinfo("TCB=%p PRI=%d\n", tcb, priority); /* Remove the tcb task from the ready-to-run list. * sched_removereadytorun will return true if we just removed the head diff --git a/arch/arm/src/armv7-m/up_schedulesigaction.c b/arch/arm/src/armv7-m/up_schedulesigaction.c index c44298c14ece181a4a7033324d600a2258b752c8..cf70662510c47a0515ee4825353446af5a522c66 100644 --- a/arch/arm/src/armv7-m/up_schedulesigaction.c +++ b/arch/arm/src/armv7-m/up_schedulesigaction.c @@ -95,7 +95,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) { irqstate_t flags; - sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver); + sinfo("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver); DEBUGASSERT(tcb != NULL && sigdeliver != NULL); /* Make sure that interrupts are disabled */ @@ -110,7 +110,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * to the currently executing task. */ - sdbg("rtcb=0x%p CURRENT_REGS=0x%p\n", this_task(), CURRENT_REGS); + sinfo("rtcb=0x%p CURRENT_REGS=0x%p\n", this_task(), CURRENT_REGS); if (tcb == this_task()) { diff --git a/arch/arm/src/armv7-m/up_sigdeliver.c b/arch/arm/src/armv7-m/up_sigdeliver.c index bfa672aa7acf3d154b2169869a9c9166149ea4bc..6169b512796e839588dfaee8b2dd40c5ff8d6b1c 100644 --- a/arch/arm/src/armv7-m/up_sigdeliver.c +++ b/arch/arm/src/armv7-m/up_sigdeliver.c @@ -95,7 +95,7 @@ void up_sigdeliver(void) board_autoled_on(LED_SIGNAL); - sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", + sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); ASSERT(rtcb->xcp.sigdeliver != NULL); @@ -138,7 +138,7 @@ void up_sigdeliver(void) * errno that is needed by the user logic (it is probably EINTR). */ - sdbg("Resuming\n"); + sinfo("Resuming\n"); (void)up_irq_save(); rtcb->pterrno = saved_errno; diff --git a/arch/arm/src/armv7-m/up_svcall.c b/arch/arm/src/armv7-m/up_svcall.c index 4d28224fd7eba41837ef4b49a91a4381733c4af4..8e78de3a4329cfbb117dab28455b2f94922882ce 100644 --- a/arch/arm/src/armv7-m/up_svcall.c +++ b/arch/arm/src/armv7-m/up_svcall.c @@ -56,33 +56,6 @@ #include "exc_return.h" #include "up_internal.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Configuration ************************************************************/ - -/* Debug ********************************************************************/ -/* Debug output from this file may interfere with context switching! To get - * debug output you must enabled the following in your NuttX configuration: - * - * - CONFIG_DEBUG and CONFIG_DEBUG_SYSCALL (shows only syscalls) - * - CONFIG_DEBUG and CONFIG_DEBUG_SVCALL (shows everything) - */ - -#if defined(CONFIG_DEBUG_SYSCALL) || defined(CONFIG_DEBUG_SVCALL) -# define svcdbg(format, ...) lldbg(format, ##__VA_ARGS__) -#else -# define svcdbg(x...) -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -164,23 +137,23 @@ int up_svcall(int irq, FAR void *context) * and R1..R7 = variable number of arguments depending on the system call. */ -#if defined(CONFIG_DEBUG_SYSCALL) || defined(CONFIG_DEBUG_SVCALL) +#ifdef CONFIG_DEBUG_SYSCALL_INFO # ifndef CONFIG_DEBUG_SVCALL if (cmd > SYS_switch_context) # endif { - svcdbg("SVCALL Entry: regs: %p cmd: %d\n", regs, cmd); - svcdbg(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", - regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3], - regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]); - svcdbg(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", - regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11], - regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]); + svcinfo("SVCALL Entry: regs: %p cmd: %d\n", regs, cmd); + svcinfo(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", + regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3], + regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]); + svcinfo(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", + regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11], + regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]); # ifdef REG_EXC_RETURN - svcdbg(" PSR: %08x EXC_RETURN: %08x\n", - regs[REG_XPSR], regs[REG_EXC_RETURN]); + svcinfo(" PSR: %08x EXC_RETURN: %08x\n", + regs[REG_XPSR], regs[REG_EXC_RETURN]); # else - svcdbg(" PSR: %08x\n", regs[REG_XPSR]); + svcinfo(" PSR: %08x\n", regs[REG_XPSR]); # endif } #endif @@ -473,7 +446,7 @@ int up_svcall(int irq, FAR void *context) regs[REG_R0] -= CONFIG_SYS_RESERVED; #else - slldbg("ERROR: Bad SYS call: %d\n", regs[REG_R0]); + svcerr("ERROR: Bad SYS call: %d\n", regs[REG_R0]); #endif } break; @@ -481,35 +454,35 @@ int up_svcall(int irq, FAR void *context) /* Report what happened. That might difficult in the case of a context switch */ -#if defined(CONFIG_DEBUG_SYSCALL) || defined(CONFIG_DEBUG_SVCALL) +#ifdef CONFIG_DEBUG_SYSCALL_INFO # ifndef CONFIG_DEBUG_SVCALL if (cmd > SYS_switch_context) # else if (regs != CURRENT_REGS) # endif { - svcdbg("SVCall Return:\n"); - svcdbg(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", - CURRENT_REGS[REG_R0], CURRENT_REGS[REG_R1], - CURRENT_REGS[REG_R2], CURRENT_REGS[REG_R3], - CURRENT_REGS[REG_R4], CURRENT_REGS[REG_R5], - CURRENT_REGS[REG_R6], CURRENT_REGS[REG_R7]); - svcdbg(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", - CURRENT_REGS[REG_R8], CURRENT_REGS[REG_R9], - CURRENT_REGS[REG_R10], CURRENT_REGS[REG_R11], - CURRENT_REGS[REG_R12], CURRENT_REGS[REG_R13], - CURRENT_REGS[REG_R14], CURRENT_REGS[REG_R15]); + svcinfo("SVCall Return:\n"); + svcinfo(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", + CURRENT_REGS[REG_R0], CURRENT_REGS[REG_R1], + CURRENT_REGS[REG_R2], CURRENT_REGS[REG_R3], + CURRENT_REGS[REG_R4], CURRENT_REGS[REG_R5], + CURRENT_REGS[REG_R6], CURRENT_REGS[REG_R7]); + svcinfo(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", + CURRENT_REGS[REG_R8], CURRENT_REGS[REG_R9], + CURRENT_REGS[REG_R10], CURRENT_REGS[REG_R11], + CURRENT_REGS[REG_R12], CURRENT_REGS[REG_R13], + CURRENT_REGS[REG_R14], CURRENT_REGS[REG_R15]); # ifdef REG_EXC_RETURN - svcdbg(" PSR: %08x EXC_RETURN: %08x\n", - CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_EXC_RETURN]); + svcinfo(" PSR: %08x EXC_RETURN: %08x\n", + CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_EXC_RETURN]); # else - svcdbg(" PSR: %08x\n", CURRENT_REGS[REG_XPSR]); + svcinfo(" PSR: %08x\n", CURRENT_REGS[REG_XPSR]); # endif } # ifdef CONFIG_DEBUG_SVCALL else { - svcdbg("SVCall Return: %d\n", regs[REG_R0]); + svcinfo("SVCall Return: %d\n", regs[REG_R0]); } # endif #endif diff --git a/arch/arm/src/armv7-r/arm_assert.c b/arch/arm/src/armv7-r/arm_assert.c index 11dd9fad09be9e339bb896a1767a819ff7e0583a..b841416450be9d4b20e612b6d2fea91c4d305c6a 100644 --- a/arch/arm/src/armv7-r/arm_assert.c +++ b/arch/arm/src/armv7-r/arm_assert.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/armv7-r/arm_assert.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 @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include #include @@ -69,25 +58,13 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* USB trace dumping */ #ifndef CONFIG_USBDEV_TRACE # undef CONFIG_ARCH_USBDUMP #endif -/* The following is just intended to keep some ugliness out of the mainline - * code. We are going to print the task name if: - * - * CONFIG_TASK_NAME_SIZE > 0 && <-- The task has a name - * (defined(CONFIG_DEBUG) || <-- And the debug is enabled (lldbg used) - * defined(CONFIG_ARCH_STACKDUMP) <-- Or lowsyslog() is used - */ - -#undef CONFIG_PRINT_TASKNAME -#if CONFIG_TASK_NAME_SIZE > 0 && (defined(CONFIG_DEBUG) || defined(CONFIG_ARCH_STACKDUMP)) -# define CONFIG_PRINT_TASKNAME 1 -#endif - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -121,7 +98,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base) for (stack = sp & ~0x1f; stack < stack_base; stack += 32) { uint32_t *ptr = (uint32_t *)stack; - lldbg("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n", + _alert("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n", stack, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7]); } @@ -139,12 +116,12 @@ static void up_taskdump(FAR struct tcb_s *tcb, FAR void *arg) { /* Dump interesting properties of this task */ -#ifdef CONFIG_PRINT_TASKNAME - lldbg("%s: PID=%d Stack Used=%lu of %lu\n", +#if CONFIG_TASK_NAME_SIZE > 0 + _alert("%s: PID=%d Stack Used=%lu of %lu\n", tcb->name, tcb->pid, (unsigned long)up_check_tcbstack(tcb), (unsigned long)tcb->adj_stack_size); #else - lldbg("PID: %d Stack Used=%lu of %lu\n", + _alert("PID: %d Stack Used=%lu of %lu\n", tcb->pid, (unsigned long)up_check_tcbstack(tcb), (unsigned long)tcb->adj_stack_size); #endif @@ -184,12 +161,12 @@ static inline void up_registerdump(void) for (regs = REG_R0; regs <= REG_R15; regs += 8) { uint32_t *ptr = (uint32_t *)&CURRENT_REGS[regs]; - lldbg("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n", + _alert("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n", regs, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7]); } - lldbg("CPSR: %08x\n", CURRENT_REGS[REG_CPSR]); + _alert("CPSR: %08x\n", CURRENT_REGS[REG_CPSR]); } } #else @@ -209,7 +186,7 @@ static int usbtrace_syslog(FAR const char *fmt, ...) /* Let vsyslog do the real work */ va_start(ap, fmt); - ret = lowvsyslog(LOG_INFO, fmt, ap); + ret = vsyslog(LOG_EMERG, fmt, ap); va_end(ap); return ret; } @@ -253,7 +230,7 @@ static void up_dumpstate(void) ustacksize = (uint32_t)rtcb->adj_stack_size; } - lldbg("Current sp: %08x\n", sp); + _alert("Current sp: %08x\n", sp); #if CONFIG_ARCH_INTERRUPTSTACK > 3 /* Get the limits on the interrupt stack memory */ @@ -263,21 +240,21 @@ static void up_dumpstate(void) /* Show interrupt stack info */ - lldbg("Interrupt stack:\n"); - lldbg(" base: %08x\n", istackbase); - lldbg(" size: %08x\n", istacksize); + _alert("Interrupt stack:\n"); + _alert(" base: %08x\n", istackbase); + _alert(" size: %08x\n", istacksize); #ifdef CONFIG_STACK_COLORATION - lldbg(" used: %08x\n", up_check_intstack()); + _alert(" used: %08x\n", up_check_intstack()); #endif #endif /* Show user stack info */ - lldbg("User stack:\n"); - lldbg(" base: %08x\n", ustackbase); - lldbg(" size: %08x\n", ustacksize); + _alert("User stack:\n"); + _alert(" base: %08x\n", ustackbase); + _alert(" size: %08x\n", ustacksize); #ifdef CONFIG_STACK_COLORATION - lldbg(" used: %08x\n", up_check_tcbstack(rtcb)); + _alert(" used: %08x\n", up_check_tcbstack(rtcb)); #endif #ifdef CONFIG_ARCH_KERNEL_STACK @@ -287,9 +264,9 @@ static void up_dumpstate(void) { kstackbase = (uint32_t)rtcb->xcp.kstack + CONFIG_ARCH_KERNEL_STACKSIZE - 4; - lldbg("Kernel stack:\n"); - lldbg(" base: %08x\n", kstackbase); - lldbg(" size: %08x\n", CONFIG_ARCH_KERNEL_STACKSIZE); + _alert("Kernel stack:\n"); + _alert(" base: %08x\n", kstackbase); + _alert(" size: %08x\n", CONFIG_ARCH_KERNEL_STACKSIZE); } #endif @@ -300,7 +277,7 @@ static void up_dumpstate(void) { /* Yes.. dump the interrupt stack */ - lldbg("Interrupt Stack\n", sp); + _alert("Interrupt Stack\n", sp); up_stackdump(sp, istackbase); /* Extract the user stack pointer which should lie @@ -308,7 +285,7 @@ static void up_dumpstate(void) */ sp = g_intstackbase; - lldbg("User sp: %08x\n", sp); + _alert("User sp: %08x\n", sp); } #endif @@ -318,7 +295,7 @@ static void up_dumpstate(void) if (sp > ustackbase - ustacksize && sp < ustackbase) { - lldbg("User Stack\n", sp); + _alert("User Stack\n", sp); up_stackdump(sp, ustackbase); } @@ -329,7 +306,7 @@ static void up_dumpstate(void) if (sp >= (uint32_t)rtcb->xcp.kstack && sp < kstackbase) { - lldbg("Kernel Stack\n", sp); + _alert("Kernel Stack\n", sp); up_stackdump(sp, kstackbase); } #endif @@ -390,16 +367,16 @@ static void _up_assert(int errorcode) void up_assert(const uint8_t *filename, int lineno) { -#ifdef CONFIG_PRINT_TASKNAME +#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG_ALERT) struct tcb_s *rtcb = this_task(); #endif board_autoled_on(LED_ASSERTION); -#ifdef CONFIG_PRINT_TASKNAME - lldbg("Assertion failed at file:%s line: %d task: %s\n", +#if CONFIG_TASK_NAME_SIZE > 0 + _alert("Assertion failed at file:%s line: %d task: %s\n", filename, lineno, rtcb->name); #else - lldbg("Assertion failed at file:%s line: %d\n", + _alert("Assertion failed at file:%s line: %d\n", filename, lineno); #endif up_dumpstate(); diff --git a/arch/arm/src/armv7-r/arm_dataabort.c b/arch/arm/src/armv7-r/arm_dataabort.c index 789fb0f5adae6e62bc6be4e1b919da3f9b56abcc..52f5d124365dbe84f502b6f133721e76e174faa2 100644 --- a/arch/arm/src/armv7-r/arm_dataabort.c +++ b/arch/arm/src/armv7-r/arm_dataabort.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/armv7-r/arm_dataabort.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 @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include @@ -86,7 +75,7 @@ uint32_t *arm_dataabort(uint32_t *regs, uint32_t dfar, uint32_t dfsr) /* Crash -- possibly showing diagnostic debug information. */ - lldbg("Data abort. PC: %08x DFAR: %08x DFSR: %08x\n", + _alert("Data abort. PC: %08x DFAR: %08x DFSR: %08x\n", regs[REG_PC], dfar, dfsr); PANIC(); return regs; /* To keep the compiler happy */ diff --git a/arch/arm/src/armv7-r/arm_elf.c b/arch/arm/src/armv7-r/arm_elf.c index 698ecd0084fc3c80ebf5ab99b927d3a810ee4762..4ab4713b62e1998fe39dd575e0a93f1b5c6dee1e 100644 --- a/arch/arm/src/armv7-r/arm_elf.c +++ b/arch/arm/src/armv7-r/arm_elf.c @@ -86,7 +86,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr) if (ehdr->e_machine != EM_ARM) { - bdbg("Not for ARM: e_machine=%04x\n", ehdr->e_machine); + berr("ERROR: Not for ARM: e_machine=%04x\n", ehdr->e_machine); return -ENOEXEC; } @@ -94,7 +94,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr) if (ehdr->e_ident[EI_CLASS] != ELFCLASS32) { - bdbg("Need 32-bit objects: e_ident[EI_CLASS]=%02x\n", ehdr->e_ident[EI_CLASS]); + berr("ERROR: Need 32-bit objects: e_ident[EI_CLASS]=%02x\n", ehdr->e_ident[EI_CLASS]); return -ENOEXEC; } @@ -106,7 +106,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr) if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB) #endif { - bdbg("Wrong endian-ness: e_ident[EI_DATA]=%02x\n", ehdr->e_ident[EI_DATA]); + berr("ERROR: Wrong endian-ness: e_ident[EI_DATA]=%02x\n", ehdr->e_ident[EI_DATA]); return -ENOEXEC; } @@ -114,7 +114,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr) if ((ehdr->e_entry & 3) != 0) { - bdbg("Entry point is not properly aligned: %08x\n", ehdr->e_entry); + berr("ERROR: Entry point is not properly aligned: %08x\n", ehdr->e_entry); return -ENOEXEC; } @@ -174,7 +174,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_CALL: case R_ARM_JUMP24: { - bvdbg("Performing PC24 [%d] link at addr %08lx [%08lx] to sym '%s' st_value=%08lx\n", + binfo("Performing PC24 [%d] link at addr %08lx [%08lx] to sym '%s' st_value=%08lx\n", ELF32_R_TYPE(rel->r_info), (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value); @@ -187,8 +187,8 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, offset += sym->st_value - addr; if (offset & 3 || offset <= (int32_t) 0xfe000000 || offset >= (int32_t) 0x02000000) { - bdbg(" ERROR: PC24 [%d] relocation out of range, offset=%08lx\n", - ELF32_R_TYPE(rel->r_info), offset); + berr("ERROR: ERROR: PC24 [%d] relocation out of range, offset=%08lx\n", + ELF32_R_TYPE(rel->r_info), offset); return -EINVAL; } @@ -203,7 +203,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_ABS32: case R_ARM_TARGET1: /* New ABI: TARGET1 always treated as ABS32 */ { - bvdbg("Performing ABS32 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", + binfo("Performing ABS32 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value); *(uint32_t *)addr += sym->st_value; @@ -212,7 +212,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_V4BX: { - bvdbg("Performing V4BX link at addr=%08lx [%08lx]\n", + binfo("Performing V4BX link at addr=%08lx [%08lx]\n", (long)addr, (long)(*(uint32_t *)addr)); /* Preserve only Rm and the condition code */ @@ -227,7 +227,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_PREL31: { - bvdbg("Performing PREL31 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", + binfo("Performing PREL31 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value); offset = *(uint32_t *)addr + sym->st_value - addr; @@ -238,7 +238,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, case R_ARM_MOVW_ABS_NC: case R_ARM_MOVT_ABS: { - bvdbg("Performing MOVx_ABS [%d] link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", + binfo("Performing MOVx_ABS [%d] link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n", ELF32_R_TYPE(rel->r_info), (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value); @@ -258,7 +258,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, break; default: - bdbg("Unsupported relocation: %d\n", ELF32_R_TYPE(rel->r_info)); + berr("ERROR: Unsupported relocation: %d\n", ELF32_R_TYPE(rel->r_info)); return -EINVAL; } @@ -268,6 +268,6 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym, uintptr_t addr) { - bdbg("RELA relocation not supported\n"); + berr("ERROR: RELA relocation not supported\n"); return -ENOSYS; } diff --git a/arch/arm/src/armv7-r/arm_l2cc_pl310.c b/arch/arm/src/armv7-r/arm_l2cc_pl310.c index e019e70e95f2e95d4a1581da09d3f350585c29d1..18c3d224a2c6cbfb6e10d62007f55c42f3c0709f 100644 --- a/arch/arm/src/armv7-r/arm_l2cc_pl310.c +++ b/arch/arm/src/armv7-r/arm_l2cc_pl310.c @@ -411,8 +411,8 @@ void up_l2ccinitialize(void) putreg32(L2CC_CR_L2CEN, L2CC_CR); } - lldbg("(%d ways) * (%d bytes/way) = %d bytes\n", - PL310_NWAYS, PL310_WAYSIZE, PL310_CACHE_SIZE); + sinfo("(%d ways) * (%d bytes/way) = %d bytes\n", + PL310_NWAYS, PL310_WAYSIZE, PL310_CACHE_SIZE); } /**************************************************************************** diff --git a/arch/arm/src/armv7-r/arm_prefetchabort.c b/arch/arm/src/armv7-r/arm_prefetchabort.c index bf16d194676ce28f4402db9c4330a28c73c90c6a..74713f5ad3eae3be527be24885bab7aaea3df460 100644 --- a/arch/arm/src/armv7-r/arm_prefetchabort.c +++ b/arch/arm/src/armv7-r/arm_prefetchabort.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/armv7-r/arm_prefetchabort.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 @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include @@ -82,7 +71,7 @@ uint32_t *arm_prefetchabort(uint32_t *regs, uint32_t ifar, uint32_t ifsr) /* Crash -- possibly showing diagnostic debug information. */ - lldbg("Prefetch abort. PC: %08x IFAR: %08x IFSR: %08x\n", + _alert("Prefetch abort. PC: %08x IFAR: %08x IFSR: %08x\n", regs[REG_PC], ifar, ifsr); PANIC(); return regs; /* To keep the compiler happy */ diff --git a/arch/arm/src/armv7-r/arm_releasepending.c b/arch/arm/src/armv7-r/arm_releasepending.c index 89827085907498d7edaab83db8dd1fab47e3c817..a66de941356278880015b60eeeec25132b261cdf 100644 --- a/arch/arm/src/armv7-r/arm_releasepending.c +++ b/arch/arm/src/armv7-r/arm_releasepending.c @@ -67,7 +67,7 @@ void up_release_pending(void) { struct tcb_s *rtcb = this_task(); - slldbg("From TCB=%p\n", rtcb); + sinfo("From TCB=%p\n", rtcb); /* Merge the g_pendingtasks list into the ready-to-run task list */ diff --git a/arch/arm/src/armv7-r/arm_reprioritizertr.c b/arch/arm/src/armv7-r/arm_reprioritizertr.c index 4fed13e8f272ca7b43fd90e1e65109e3bc18ae63..db96424eb2f4d6042c672334f327784d4fcecbee 100644 --- a/arch/arm/src/armv7-r/arm_reprioritizertr.c +++ b/arch/arm/src/armv7-r/arm_reprioritizertr.c @@ -95,7 +95,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) struct tcb_s *rtcb = this_task(); bool switch_needed; - slldbg("TCB=%p PRI=%d\n", tcb, priority); + sinfo("TCB=%p PRI=%d\n", tcb, priority); /* Remove the tcb task from the ready-to-run list. * sched_removereadytorun will return true if we just diff --git a/arch/arm/src/armv7-r/arm_schedulesigaction.c b/arch/arm/src/armv7-r/arm_schedulesigaction.c index 692debff2f0590db39b0d6d12d8c716cdf210c9f..a51d660cb4c686297671874d892868d1d91d266d 100644 --- a/arch/arm/src/armv7-r/arm_schedulesigaction.c +++ b/arch/arm/src/armv7-r/arm_schedulesigaction.c @@ -94,7 +94,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) { irqstate_t flags; - sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver); + sinfo("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver); /* Make sure that interrupts are disabled */ @@ -108,7 +108,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * to the currently executing task. */ - sdbg("rtcb=0x%p CURRENT_REGS=0x%p\n", this_task(), CURRENT_REGS); + sinfo("rtcb=0x%p CURRENT_REGS=0x%p\n", this_task(), CURRENT_REGS); if (tcb == this_task()) { diff --git a/arch/arm/src/armv7-r/arm_sigdeliver.c b/arch/arm/src/armv7-r/arm_sigdeliver.c index f638b35bfd64aec670f86dca54c1a23ebe4ad4c3..280a5ef9c71b0bb360fc444edb21675d85c72eab 100644 --- a/arch/arm/src/armv7-r/arm_sigdeliver.c +++ b/arch/arm/src/armv7-r/arm_sigdeliver.c @@ -83,7 +83,7 @@ void up_sigdeliver(void) board_autoled_on(LED_SIGNAL); - sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", + sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); ASSERT(rtcb->xcp.sigdeliver != NULL); @@ -114,7 +114,7 @@ void up_sigdeliver(void) * errno that is needed by the user logic (it is probably EINTR). */ - sdbg("Resuming\n"); + sinfo("Resuming\n"); (void)up_irq_save(); rtcb->pterrno = saved_errno; diff --git a/arch/arm/src/armv7-r/arm_syscall.c b/arch/arm/src/armv7-r/arm_syscall.c index 3e41a3484344f1dafbbfa8258f892f3986c125b8..49290d5509ef138578d1f52f66b62982f21f17cf 100644 --- a/arch/arm/src/armv7-r/arm_syscall.c +++ b/arch/arm/src/armv7-r/arm_syscall.c @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include #include @@ -64,18 +53,7 @@ #include "up_internal.h" /**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ - -#if defined(CONFIG_DEBUG_SYSCALL) -# define svcdbg(format, ...) lldbg(format, ##__VA_ARGS__) -#else -# define svcdbg(x...) -#endif - -/**************************************************************************** - * Private Data + * Private Functions ****************************************************************************/ /**************************************************************************** @@ -176,16 +154,14 @@ uint32_t *arm_syscall(uint32_t *regs) * and R1..R7 = variable number of arguments depending on the system call. */ -#if defined(CONFIG_DEBUG_SYSCALL) - svcdbg("SYSCALL Entry: regs: %p cmd: %d\n", regs, cmd); - svcdbg(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", - regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3], - regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]); - svcdbg(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", - regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11], - regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]); - svcdbg("CPSR: %08x\n", regs[REG_CPSR]); -#endif + svcinfo("SYSCALL Entry: regs: %p cmd: %d\n", regs, cmd); + svcinfo(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", + regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3], + regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]); + svcinfo(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", + regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11], + regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]); + svcinfo("CPSR: %08x\n", regs[REG_CPSR]); /* Handle the SVCall according to the command in R0 */ @@ -478,7 +454,7 @@ uint32_t *arm_syscall(uint32_t *regs) regs[REG_R0] -= CONFIG_SYS_RESERVED; #else - svcdbg("ERROR: Bad SYS call: %d\n", regs[REG_R0]); + svcerr("ERROR: Bad SYS call: %d\n", regs[REG_R0]); #endif #ifdef CONFIG_ARCH_KERNEL_STACK @@ -499,18 +475,16 @@ uint32_t *arm_syscall(uint32_t *regs) break; } -#if defined(CONFIG_DEBUG_SYSCALL) /* Report what happened */ - svcdbg("SYSCALL Exit: regs: %p\n", regs); - svcdbg(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", - regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3], - regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]); - svcdbg(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", - regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11], - regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]); - svcdbg("CPSR: %08x\n", regs[REG_CPSR]); -#endif + svcinfo("SYSCALL Exit: regs: %p\n", regs); + svcinfo(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n", + regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3], + regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]); + svcinfo(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n", + regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11], + regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]); + svcinfo("CPSR: %08x\n", regs[REG_CPSR]); /* Return the last value of curent_regs. This supports context switches * on return from the exception. That capability is only used with the @@ -524,7 +498,7 @@ uint32_t *arm_syscall(uint32_t *regs) uint32_t *arm_syscall(uint32_t *regs) { - lldbg("SYSCALL from 0x%x\n", regs[REG_PC]); + _alert("SYSCALL from 0x%x\n", regs[REG_PC]); CURRENT_REGS = regs; PANIC(); } diff --git a/arch/arm/src/armv7-r/arm_undefinedinsn.c b/arch/arm/src/armv7-r/arm_undefinedinsn.c index b1db4f88686c6f35d98ef625c8e3a50a1b4af2dc..733fb06cb2b4ec245e40aa0fcf3e96ab73a5f5bc 100644 --- a/arch/arm/src/armv7-r/arm_undefinedinsn.c +++ b/arch/arm/src/armv7-r/arm_undefinedinsn.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/armv7-r/arm_undefinedinsn.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 @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include #include @@ -58,18 +47,6 @@ #include "up_internal.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -80,7 +57,7 @@ uint32_t *arm_undefinedinsn(uint32_t *regs) { - lldbg("Undefined instruction at 0x%x\n", regs[REG_PC]); + _alert("Undefined instruction at 0x%x\n", regs[REG_PC]); CURRENT_REGS = regs; PANIC(); return regs; /* To keep the compiler happy */ diff --git a/arch/arm/src/armv7-r/mpu.h b/arch/arm/src/armv7-r/mpu.h index 67aeb2e94a240db6b6f00282643b4590dca98065..e9e29cf13f853807c66f99c72cd8497a0f8c175b 100644 --- a/arch/arm/src/armv7-r/mpu.h +++ b/arch/arm/src/armv7-r/mpu.h @@ -359,12 +359,12 @@ static inline void mpu_set_rgnr(unsigned int rgnr) static inline void mpu_showtype(void) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_SCHED_INFO uint32_t regval = mpu_get_mpuir(); - dbg("%s MPU Regions: data=%d instr=%d\n", - (regval & MPUIR_SEPARATE) != 0 ? "Separate" : "Unified", - (regval & MPUIR_DREGION_MASK) >> MPUIR_DREGION_SHIFT, - (regval & MPUIR_IREGION_MASK) >> MPUIR_IREGION_SHIFT); + sinfo("%s MPU Regions: data=%d instr=%d\n", + (regval & MPUIR_SEPARATE) != 0 ? "Separate" : "Unified", + (regval & MPUIR_DREGION_MASK) >> MPUIR_DREGION_SHIFT, + (regval & MPUIR_IREGION_MASK) >> MPUIR_IREGION_SHIFT); #endif } diff --git a/arch/arm/src/c5471/c5471_ethernet.c b/arch/arm/src/c5471/c5471_ethernet.c index 11c157f35f41c7f5d401235a16308c4b3d9d0d7b..b7563aa0545b5909eb66f29080f050120a840245 100644 --- a/arch/arm/src/c5471/c5471_ethernet.c +++ b/arch/arm/src/c5471/c5471_ethernet.c @@ -331,9 +331,9 @@ struct c5471_driver_s uint32_t c_rxdropped; /* Packets dropped because of size */ #endif - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ - struct net_driver_s c_dev; /* Interface understood by uIP */ + struct net_driver_s c_dev; /* Interface understood by the network */ }; /**************************************************************************** @@ -413,11 +413,11 @@ static void c5471_macassign(struct c5471_driver_s *c5471); #ifdef CONFIG_C5471_NET_DUMPBUFFER static inline void c5471_dumpbuffer(const char *msg, const uint8_t *buffer, unsigned int nbytes) { - /* CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, and CONFIG_DEBUG_NET have to be + /* CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_NET have to be * defined or the following does nothing. */ - nvdbgdumpbuffer(msg, buffer, nbytes); + ninfodumpbuffer(msg, buffer, nbytes); } #else # define c5471_dumpbuffer(msg, buffer,nbytes) @@ -737,22 +737,22 @@ static int c5471_phyinit (void) phyid = (c5471_mdread(0, MD_PHY_MSB_REG) << 16) | c5471_mdread(0, MD_PHY_LSB_REG); if (phyid != LU3X31_T64_PHYID) { - ndbg("Unrecognized PHY ID: %08x\n", phyid); + nerr("ERROR: Unrecognized PHY ID: %08x\n", phyid); return ERROR; } /* Next, Set desired network rate, 10BaseT, 100BaseT, or auto. */ #ifdef CONFIG_C5471_AUTONEGOTIATION - ndbg("Setting PHY Transceiver for Autonegotiation\n"); + ninfo("Setting PHY Transceiver for Autonegotiation\n"); c5471_mdwrite(0, MD_PHY_CONTROL_REG, MODE_AUTONEG); #endif #ifdef CONFIG_C5471_BASET100 - ndbg("Setting PHY Transceiver for 100BaseT FullDuplex\n"); + ninfo("Setting PHY Transceiver for 100BaseT FullDuplex\n"); c5471_mdwrite(0, MD_PHY_CONTROL_REG, MODE_100MBIT_FULLDUP); #endif #ifdef CONFIG_C5471_BASET10 - ndbg("Setting PHY Transceiver for 10BaseT FullDuplex\n"); + ninfo("Setting PHY Transceiver for 10BaseT FullDuplex\n"); c5471_mdwrite(0, MD_PHY_CONTROL_REG, MODE_10MBIT_FULLDUP); #endif @@ -802,7 +802,7 @@ static inline void c5471_inctxcpu(struct c5471_driver_s *c5471) c5471->c_txcpudesc += 2*sizeof(uint32_t); } - nvdbg("TX CPU desc: %08x\n", c5471->c_txcpudesc); + ninfo("TX CPU desc: %08x\n", c5471->c_txcpudesc); } /**************************************************************************** @@ -825,7 +825,7 @@ static inline void c5471_incrxcpu(struct c5471_driver_s *c5471) c5471->c_rxcpudesc += 2*sizeof(uint32_t); } - nvdbg("RX CPU desc: %08x\n", c5471->c_rxcpudesc); + ninfo("RX CPU desc: %08x\n", c5471->c_rxcpudesc); } /**************************************************************************** @@ -861,7 +861,7 @@ static int c5471_transmit(struct c5471_driver_s *c5471) bfirstframe = true; c5471->c_lastdescstart = c5471->c_rxcpudesc; - nvdbg("Packet size: %d RX CPU desc: %08x\n", nbytes, c5471->c_rxcpudesc); + ninfo("Packet size: %d RX CPU desc: %08x\n", nbytes, c5471->c_rxcpudesc); c5471_dumpbuffer("Transmit packet", dev->d_buf, dev->d_len); while (nbytes) @@ -918,7 +918,7 @@ static int c5471_transmit(struct c5471_driver_s *c5471) putreg32(((getreg32(c5471->c_rxcpudesc) & ~EIM_RXDESC_BYTEMASK) | framelen), c5471->c_rxcpudesc); nbytes -= framelen; - nvdbg("Wrote framelen: %d nbytes: %d nshorts: %d\n", framelen, nbytes, nshorts); + ninfo("Wrote framelen: %d nbytes: %d nshorts: %d\n", framelen, nbytes, nshorts); if (0 == nbytes) { @@ -960,7 +960,7 @@ static int c5471_transmit(struct c5471_driver_s *c5471) * Function: c5471_txpoll * * Description: - * The transmitter is available, check if uIP has any outgoing packets ready + * The transmitter is available, check if the network has any outgoing packets ready * to send. This is a callback from devif_poll(). devif_poll() may be called: * * 1. When the preceding TX packet send is complete, @@ -1092,43 +1092,43 @@ static void c5471_rxstatus(struct c5471_driver_s *c5471) if ((rxstatus & EIM_TXDESC_RETRYERROR) != 0) { c5471->c_rxretries++; - nvdbg("c_rxretries: %d\n", c5471->c_rxretries); + ninfo("c_rxretries: %d\n", c5471->c_rxretries); } if ((rxstatus & EIM_TXDESC_HEARTBEAT) != 0) { c5471->c_rxheartbeat++; - nvdbg("c_rxheartbeat: %d\n", c5471->c_rxheartbeat); + ninfo("c_rxheartbeat: %d\n", c5471->c_rxheartbeat); } if ((rxstatus & EIM_TXDESC_LCOLLISON) != 0) { c5471->c_rxlcollision++; - nvdbg("c_rxlcollision: %d\n", c5471->c_rxlcollision); + ninfo("c_rxlcollision: %d\n", c5471->c_rxlcollision); } if ((rxstatus & EIM_TXDESC_COLLISION) != 0) { c5471->c_rxcollision++; - nvdbg("c_rxcollision: %d\n", c5471->c_rxcollision); + ninfo("c_rxcollision: %d\n", c5471->c_rxcollision); } if ((rxstatus & EIM_TXDESC_CRCERROR) != 0) { c5471->c_rxcrc++; - nvdbg("c_rxcrc: %d\n", c5471->c_rxcrc); + ninfo("c_rxcrc: %d\n", c5471->c_rxcrc); } if ((rxstatus & EIM_TXDESC_UNDERRUN) != 0) { c5471->c_rxunderrun++; - nvdbg("c_rxunderrun: %d\n", c5471->c_rxunderrun); + ninfo("c_rxunderrun: %d\n", c5471->c_rxunderrun); } if ((rxstatus & EIM_TXDESC_LOC) != 0) { c5471->c_rxloc++; - nvdbg("c_rxloc: %d\n", c5471->c_rxloc); + ninfo("c_rxloc: %d\n", c5471->c_rxloc); } } } @@ -1162,11 +1162,11 @@ static void c5471_receive(struct c5471_driver_s *c5471) int j = 0; /* Walk the newly received packet contained within the EIM and transfer - * its contents to the uIP buffer. This frees up the memory contained within + * its contents to the network buffer. This frees up the memory contained within * the EIM for additional packets that might be received later from the network. */ - nvdbg("Reading TX CPU desc: %08x\n", c5471->c_txcpudesc); + ninfo("Reading TX CPU desc: %08x\n", c5471->c_txcpudesc); while (bmore) { /* Words #0 and #1 of descriptor */ @@ -1185,7 +1185,7 @@ static void c5471_receive(struct c5471_driver_s *c5471) framelen = (getreg32(c5471->c_txcpudesc) & EIM_TXDESC_BYTEMASK); packetlen += framelen; - /* Check if the received packet will fit within the uIP packet buffer */ + /* Check if the received packet will fit within the network packet buffer */ if (packetlen < (CONFIG_NET_ETH_MTU + 4)) { @@ -1196,7 +1196,7 @@ static void c5471_receive(struct c5471_driver_s *c5471) /* Divide by 2 with round up to get the number of 16-bit words. */ nshorts = (framelen + 1) >> 1; - nvdbg("Reading framelen: %d packetlen: %d nshorts: %d packetmen: %p\n", + ninfo("Reading framelen: %d packetlen: %d nshorts: %d packetmen: %p\n", framelen, packetlen, nshorts, packetmem); for (i = 0 ; i < nshorts; i++, j++) @@ -1210,7 +1210,7 @@ static void c5471_receive(struct c5471_driver_s *c5471) } else { - nvdbg("Discarding framelen: %d packetlen\n", framelen, packetlen); + ninfo("Discarding framelen: %d packetlen\n", framelen, packetlen); } if (getreg32(c5471->c_txcpudesc) & EIM_TXDESC_LIF) @@ -1234,7 +1234,7 @@ static void c5471_receive(struct c5471_driver_s *c5471) c5471_inctxcpu(c5471); } - /* Adjust the packet length to remove the CRC bytes that uIP doesn't care about. */ + /* Adjust the packet length to remove the CRC bytes that the network doesn't care about. */ packetlen -= 4; @@ -1244,8 +1244,8 @@ static void c5471_receive(struct c5471_driver_s *c5471) c5471->c_rxpackets++; #endif - /* If we successfully transferred the data into the uIP buffer, then pass it on - * to uIP for processing. + /* If we successfully transferred the data into the network buffer, then pass it on + * to the network for processing. */ if (packetlen > 0 && packetlen < CONFIG_NET_ETH_MTU) @@ -1253,7 +1253,7 @@ static void c5471_receive(struct c5471_driver_s *c5471) /* Set amount of data in c5471->c_dev.d_len. */ dev->d_len = packetlen; - nvdbg("Received packet, packetlen: %d type: %02x\n", packetlen, ntohs(BUF->type)); + ninfo("Received packet, packetlen: %d type: %02x\n", packetlen, ntohs(BUF->type)); c5471_dumpbuffer("Received packet", dev->d_buf, dev->d_len); #ifdef CONFIG_NET_PKT @@ -1267,7 +1267,7 @@ static void c5471_receive(struct c5471_driver_s *c5471) #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); /* Handle ARP on input then give the IPv4 packet to the network * layer @@ -1310,7 +1310,7 @@ static void c5471_receive(struct c5471_driver_s *c5471) #ifdef CONFIG_NET_IPv6 if (BUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); /* Give the IPv6 packet to the network layer */ @@ -1371,7 +1371,7 @@ static void c5471_receive(struct c5471_driver_s *c5471) { /* Increment the count of dropped packets */ - ndbg("Too big! packetlen: %d\n", packetlen); + nwarn("WARNING: Too big! packetlen: %d\n", packetlen); c5471->c_rxdropped++; } #endif @@ -1432,43 +1432,43 @@ static void c5471_txstatus(struct c5471_driver_s *c5471) if ((txstatus & EIM_RXDESC_MISS) != 0) { c5471->c_txmiss++; - nvdbg("c_txmiss: %d\n", c5471->c_txmiss); + ninfo("c_txmiss: %d\n", c5471->c_txmiss); } if ((txstatus & EIM_RXDESC_VLAN) != 0) { c5471->c_txvlan++; - nvdbg("c_txvlan: %d\n", c5471->c_txvlan); + ninfo("c_txvlan: %d\n", c5471->c_txvlan); } if ((txstatus & EIM_RXDESC_LFRAME) != 0) { c5471->c_txlframe++; - nvdbg("c_txlframe: %d\n", c5471->c_txlframe); + ninfo("c_txlframe: %d\n", c5471->c_txlframe); } if ((txstatus & EIM_RXDESC_SFRAME) != 0) { c5471->c_txsframe++; - nvdbg("c_txsframe: %d\n", c5471->c_txsframe); + ninfo("c_txsframe: %d\n", c5471->c_txsframe); } if ((txstatus & EIM_RXDESC_CRCERROR) != 0) { c5471->c_txcrc++; - nvdbg("c_txcrc: %d\n", c5471->c_txcrc); + ninfo("c_txcrc: %d\n", c5471->c_txcrc); } if ((txstatus & EIM_RXDESC_OVERRUN) != 0) { c5471->c_txoverrun++; - nvdbg("c_txoverrun: %d\n", c5471->c_txoverrun); + ninfo("c_txoverrun: %d\n", c5471->c_txoverrun); } if ((txstatus & EIM_RXDESC_OVERRUN) != 0) { c5471->c_txalign++; - nvdbg("c_txalign: %d\n", c5471->c_txalign); + ninfo("c_txalign: %d\n", c5471->c_txalign); } } } @@ -1496,7 +1496,7 @@ static void c5471_txdone(struct c5471_driver_s *c5471) wd_cancel(c5471->c_txtimeout); - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ (void)devif_poll(&c5471->c_dev, c5471_txpoll); } @@ -1607,7 +1607,7 @@ static void c5471_txtimeout(int argc, uint32_t arg, ...) #ifdef CONFIG_C5471_NET_STATS c5471->c_txtimeouts++; - nvdbg("c_txtimeouts: %d\n", c5471->c_txtimeouts); + ninfo("c_txtimeouts: %d\n", c5471->c_txtimeouts); #endif /* Then try to restart the hardware */ @@ -1615,7 +1615,7 @@ static void c5471_txtimeout(int argc, uint32_t arg, ...) c5471_ifdown(&c5471->c_dev); c5471_ifup(&c5471->c_dev); - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ (void)devif_poll(&c5471->c_dev, c5471_txpoll); } @@ -1647,7 +1647,7 @@ static void c5471_polltimer(int argc, uint32_t arg, ...) if ((EIM_TXDESC_OWN_HOST & getreg32(c5471->c_rxcpudesc)) == 0) { - /* If so, update TCP timing states and poll uIP for new XMIT data */ + /* If so, update TCP timing states and poll the network for new XMIT data */ (void)devif_timer(&c5471->c_dev, c5471_txpoll); } @@ -1680,9 +1680,9 @@ static int c5471_ifup(struct net_driver_s *dev) struct c5471_driver_s *c5471 = (struct c5471_driver_s *)dev->d_private; volatile uint32_t clearbits; - ndbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); /* Initilize Ethernet interface */ @@ -1742,7 +1742,7 @@ static int c5471_ifdown(struct net_driver_s *dev) struct c5471_driver_s *c5471 = (struct c5471_driver_s *)dev->d_private; irqstate_t flags; - ndbg("Stopping\n"); + ninfo("Stopping\n"); /* Disable the Ethernet interrupt */ @@ -1798,7 +1798,7 @@ static int c5471_txavail(struct net_driver_s *dev) struct c5471_driver_s *c5471 = (struct c5471_driver_s *)dev->d_private; irqstate_t flags; - ndbg("Polling\n"); + ninfo("Polling\n"); flags = enter_critical_section(); /* Ignore the notification if the interface is not yet up */ @@ -1811,7 +1811,7 @@ static int c5471_txavail(struct net_driver_s *dev) if ((EIM_TXDESC_OWN_HOST & getreg32(c5471->c_rxcpudesc)) == 0) { - /* If so, then poll uIP for new XMIT data */ + /* If so, then poll the network for new XMIT data */ (void)devif_poll(&c5471->c_dev, c5471_txpoll); } @@ -1951,7 +1951,7 @@ static void c5471_eimconfig(struct c5471_driver_s *c5471) /* TX ENET 0 */ - ndbg("TX ENET0 desc: %08x pbuf: %08x\n", desc, pbuf); + ninfo("TX ENET0 desc: %08x pbuf: %08x\n", desc, pbuf); putreg32((desc & 0x0000ffff), ENET0_TDBA); /* 16-bit offset address */ for (i = NUM_DESC_TX-1; i >= 0; i--) { @@ -1978,7 +1978,7 @@ static void c5471_eimconfig(struct c5471_driver_s *c5471) /* RX ENET 0 */ - ndbg("RX ENET0 desc: %08x pbuf: %08x\n", desc, pbuf); + ninfo("RX ENET0 desc: %08x pbuf: %08x\n", desc, pbuf); putreg32((desc & 0x0000ffff), ENET0_RDBA); /* 16-bit offset address */ for (i = NUM_DESC_RX-1; i >= 0; i--) { @@ -2005,7 +2005,7 @@ static void c5471_eimconfig(struct c5471_driver_s *c5471) /* TX CPU */ - ndbg("TX CPU desc: %08x pbuf: %08x\n", desc, pbuf); + ninfo("TX CPU desc: %08x pbuf: %08x\n", desc, pbuf); c5471->c_txcpudesc = desc; putreg32((desc & 0x0000ffff), EIM_CPU_TXBA); /* 16-bit offset address */ for (i = NUM_DESC_TX-1; i >= 0; i--) @@ -2035,7 +2035,7 @@ static void c5471_eimconfig(struct c5471_driver_s *c5471) /* RX CPU */ - ndbg("RX CPU desc: %08x pbuf: %08x\n", desc, pbuf); + ninfo("RX CPU desc: %08x pbuf: %08x\n", desc, pbuf); c5471->c_rxcpudesc = desc; putreg32((desc & 0x0000ffff), EIM_CPU_RXBA); /* 16-bit offset address */ for (i = NUM_DESC_RX-1; i >= 0; i--) @@ -2063,7 +2063,7 @@ static void c5471_eimconfig(struct c5471_driver_s *c5471) pbuf += sizeof(uint32_t); /* Ether Module's "Buffer Usage Word" */ } - ndbg("END desc: %08x pbuf: %08x\n", desc, pbuf); + ninfo("END desc: %08x pbuf: %08x\n", desc, pbuf); /* Save the descriptor packet size */ @@ -2150,13 +2150,13 @@ static void c5471_eimconfig(struct c5471_driver_s *c5471) static void c5471_reset(struct c5471_driver_s *c5471) { #if defined(CONFIG_C5471_PHY_LU3X31T_T64) - ndbg("EIM reset\n"); + ninfo("EIM reset\n"); c5471_eimreset(c5471); #endif - ndbg("PHY init\n"); + ninfo("PHY init\n"); c5471_phyinit(); - ndbg("EIM config\n"); + ninfo("EIM config\n"); c5471_eimconfig(c5471); } @@ -2178,7 +2178,7 @@ static void c5471_macassign(struct c5471_driver_s *c5471) uint8_t *mptr = dev->d_mac.ether_addr_octet; register uint32_t tmp; - ndbg("MAC: %0x:%0x:%0x:%0x:%0x:%0x\n", + ninfo("MAC: %0x:%0x:%0x:%0x:%0x:%0x\n", mptr[0], mptr[1], mptr[2], mptr[3], mptr[4], mptr[5]); /* Set CPU port MAC address. S/W will only see incoming packets that match @@ -2241,7 +2241,7 @@ void up_netinitialize(void) { /* We could not attach the ISR to the ISR */ - nlldbg("irq_attach() failed\n"); + nerr("ERROR: irq_attach() failed\n"); return; } diff --git a/arch/arm/src/c5471/c5471_watchdog.c b/arch/arm/src/c5471/c5471_watchdog.c index 2143246d6e7597754d6716eb259808b946a17af4..d1381f45d46d217e635fe48cfc751bf6a1c2fc65 100644 --- a/arch/arm/src/c5471/c5471_watchdog.c +++ b/arch/arm/src/c5471/c5471_watchdog.c @@ -155,7 +155,7 @@ static inline unsigned int wdt_prescaletoptv(unsigned int prescale) } } - dbg("prescale=%d -> ptv=%d\n", prescale, ptv); + wdinfo("prescale=%d -> ptv=%d\n", prescale, ptv); return ptv; } @@ -173,7 +173,7 @@ static int wdt_setusec(uint32_t usec) uint32_t divisor = 1; uint32_t mode; - dbg("usec=%d\n", usec); + wdinfo("usec=%d\n", usec); /* Calculate a value of prescaler and divisor that will be able * to count to the usec. It may not be exact or the best @@ -186,7 +186,7 @@ static int wdt_setusec(uint32_t usec) do { divisor = (CLOCK_MHZx2 * usec) / (prescaler * 2); - dbg("divisor=0x%x prescaler=0x%x\n", divisor, prescaler); + wdinfo("divisor=0x%x prescaler=0x%x\n", divisor, prescaler); if (divisor >= 0x10000) { @@ -194,7 +194,7 @@ static int wdt_setusec(uint32_t usec) { /* This is the max possible ~2.5 seconds. */ - dbg("prescaler=0x%x too big!\n", prescaler); + wderr("ERROR: prescaler=0x%x too big!\n", prescaler); return ERROR; } @@ -207,19 +207,19 @@ static int wdt_setusec(uint32_t usec) } while (divisor >= 0x10000); - dbg("prescaler=0x%x divisor=0x%x\n", prescaler, divisor); + wdinfo("prescaler=0x%x divisor=0x%x\n", prescaler, divisor); mode = wdt_prescaletoptv(prescaler); mode &= ~C5471_TIMER_AUTORELOAD; /* One shot mode. */ mode |= divisor << 5; - dbg("mode=0x%x\n", mode); + wdinfo("mode=0x%x\n", mode); c5471_wdt_cntl = mode; /* Now start the watchdog */ c5471_wdt_cntl |= C5471_TIMER_STARTBIT; - dbg("cntl_timer=0x%x\n", c5471_wdt_cntl); + wdinfo("cntl_timer=0x%x\n", c5471_wdt_cntl); return 0; } @@ -234,17 +234,17 @@ static int wdt_setusec(uint32_t usec) static int wdt_interrupt(int irq, void *context) { - dbg("expired\n"); + wdinfo("expired\n"); #if defined(CONFIG_SOFTWARE_REBOOT) # if defined(CONFIG_SOFTWARE_TEST) - dbg(" Test only\n"); + wdinfo(" Test only\n"); # else - dbg(" Re-booting\n"); + wdinfo(" Re-booting\n"); # warning "Add logic to reset CPU here" # endif #else - dbg(" No reboot\n"); + wdinfo(" No reboot\n"); #endif return OK; } @@ -259,7 +259,7 @@ static ssize_t wdt_read(struct file *filep, char *buffer, size_t buflen) * not work if the user provides a buffer smaller than 18 bytes. */ - dbg("buflen=%d\n", buflen); + wdinfo("buflen=%d\n", buflen); if (buflen >= 18) { sprintf(buffer, "%08x %08x\n", c5471_wdt_cntl, c5471_wdt_count); @@ -274,7 +274,7 @@ static ssize_t wdt_read(struct file *filep, char *buffer, size_t buflen) static ssize_t wdt_write(struct file *filep, const char *buffer, size_t buflen) { - dbg("buflen=%d\n", buflen); + wdinfo("buflen=%d\n", buflen); if (buflen) { /* Reset the timer to the maximum delay */ @@ -292,7 +292,7 @@ static ssize_t wdt_write(struct file *filep, const char *buffer, size_t buflen) static int wdt_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { - dbg("ioctl Call: cmd=0x%x arg=0x%x", cmd, arg); + wdinfo("ioctl Call: cmd=0x%x arg=0x%x", cmd, arg); /* Process the IOCTL command (see arch/watchdog.h) */ @@ -315,8 +315,6 @@ static int wdt_ioctl(FAR struct file *filep, int cmd, unsigned long arg) static int wdt_open(struct file *filep) { - dbg(""); - if (g_wdtopen) { return -EBUSY; @@ -339,11 +337,8 @@ static int wdt_open(struct file *filep) static int wdt_close(struct file *filep) { - dbg(""); - /* The task controlling the watchdog has terminated. Take the timer - * the - * watchdog in interrupt mode -- we are going to reset unless the + * the watchdog in interrupt mode -- we are going to reset unless the * reopened again soon. */ @@ -367,7 +362,7 @@ int up_wdtinit(void) { int ret; - dbg("C547x Watchdog Driver\n"); + wdinfo("C547x Watchdog Driver\n"); /* Register as /dev/wdt */ @@ -379,7 +374,7 @@ int up_wdtinit(void) /* Register for an interrupt level callback through wdt_interrupt */ - dbg("Attach to IRQ=%d\n", C5471_IRQ_WATCHDOG); + wdinfo("Attach to IRQ=%d\n", C5471_IRQ_WATCHDOG); /* Make sure that the timer is stopped */ diff --git a/arch/arm/src/calypso/calypso_spi.c b/arch/arm/src/calypso/calypso_spi.c index e3b063a559d671f504750e3bf711c16c479be0ec..36727927c43680dfb23f20f173a80efeb0b14822 100644 --- a/arch/arm/src/calypso/calypso_spi.c +++ b/arch/arm/src/calypso/calypso_spi.c @@ -216,8 +216,8 @@ int spi_xfer(uint8_t dev_idx, uint8_t bitlen, const void *dout, void *din) tmp <<= (32-bitlen); /* align to MSB */ } - dbg("spi_xfer(dev_idx=%u, bitlen=%u, data_out=0x%08x): ", - dev_idx, bitlen, tmp); + spiinfo("spi_xfer(dev_idx=%u, bitlen=%u, data_out=0x%08x): ", + dev_idx, bitlen, tmp); /* fill transmit registers */ @@ -236,14 +236,14 @@ int spi_xfer(uint8_t dev_idx, uint8_t bitlen, const void *dout, void *din) } putreg16(reg_ctrl, SPI_REG(REG_CTRL)); - dbg("reg_ctrl=0x%04x ", reg_ctrl); + spiinfo("reg_ctrl=0x%04x ", reg_ctrl); /* wait until the transfer is complete */ while (1) { reg_status = getreg16(SPI_REG(REG_STATUS)); - dbg("status=0x%04x ", reg_status); + spiinfo("status=0x%04x ", reg_status); if (din && (reg_status & SPI_STATUS_RE)) { break; @@ -262,7 +262,7 @@ int spi_xfer(uint8_t dev_idx, uint8_t bitlen, const void *dout, void *din) { tmp = getreg16(SPI_REG(REG_RX_MSB)) << 16; tmp |= getreg16(SPI_REG(REG_RX_LSB)); - dbg("data_in=0x%08x ", tmp); + spiinfo("data_in=0x%08x ", tmp); if (bitlen <= 8) { @@ -278,7 +278,7 @@ int spi_xfer(uint8_t dev_idx, uint8_t bitlen, const void *dout, void *din) } } - dbg("\n"); + spiinfo("\n"); return 0; } diff --git a/arch/arm/src/calypso/calypso_uwire.c b/arch/arm/src/calypso/calypso_uwire.c index d837a7abdc249ac67c300fcfe566aa575c28f6ac..fe2c33b7cc152392786c3e19cd7890b0c42b8c9f 100644 --- a/arch/arm/src/calypso/calypso_uwire.c +++ b/arch/arm/src/calypso/calypso_uwire.c @@ -112,7 +112,7 @@ int uwire_xfer(int cs, int bitlen, const void *dout, void *din) /* FIXME uwire_init always selects CS0 for now */ - dbg("uwire_xfer(dev_idx=%u, bitlen=%u\n", cs, bitlen); + _info("uwire_xfer(dev_idx=%u, bitlen=%u\n", cs, bitlen); /* select the chip */ @@ -128,7 +128,7 @@ int uwire_xfer(int cs, int bitlen, const void *dout, void *din) tmp <<= 16 - bitlen; /* align to MSB */ putreg16(tmp, UWIRE_REG(REG_DATA)); - dbg(", data_out=0x%04hx", tmp); + _info(", data_out=0x%04hx", tmp); } tmp = (dout ? UWIRE_CSR_BITS_WR(bitlen) : 0) | @@ -142,7 +142,7 @@ int uwire_xfer(int cs, int bitlen, const void *dout, void *din) _uwire_wait(UWIRE_CSR_RDRB, UWIRE_CSR_RDRB); tmp = getreg16(UWIRE_REG(REG_DATA)); - dbg(", data_in=0x%08x", tmp); + _info(", data_in=0x%08x", tmp); if (bitlen <= 8) *(uint8_t *)din = tmp & 0xff; @@ -155,7 +155,7 @@ int uwire_xfer(int cs, int bitlen, const void *dout, void *din) putreg16(UWIRE_CSR_IDX(0) | 0, UWIRE_REG(REG_CSR)); _uwire_wait(UWIRE_CSR_CSRB, 0); - dbg(")\n"); + _info(")\n"); return 0; } diff --git a/arch/arm/src/common/up_createstack.c b/arch/arm/src/common/up_createstack.c index c3aa9d7adb917d16f1e2c8c2c2e64402bbd8a26d..70d83a83a58ac63a42569869836ba0f42f3f07f3 100644 --- a/arch/arm/src/common/up_createstack.c +++ b/arch/arm/src/common/up_createstack.c @@ -205,12 +205,12 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype) } #endif /* CONFIG_TLS */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Was the allocation successful? */ if (!tcb->stack_alloc_ptr) { - sdbg("ERROR: Failed to allocate stack, size %d\n", stack_size); + serr("ERROR: Failed to allocate stack, size %d\n", stack_size); } #endif } diff --git a/arch/arm/src/common/up_exit.c b/arch/arm/src/common/up_exit.c index 57137a60def127946b8ed5079c442e2433bd85d6..4d16f2a8a55c2c0fe8ebf12b55c6fe61118f316c 100644 --- a/arch/arm/src/common/up_exit.c +++ b/arch/arm/src/common/up_exit.c @@ -52,6 +52,14 @@ #include "group/group.h" #include "up_internal.h" +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -66,7 +74,7 @@ * ****************************************************************************/ -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG) +#ifdef CONFIG_DUMP_ON_EXIT static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) { #if CONFIG_NFILE_DESCRIPTORS > 0 @@ -77,8 +85,8 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) int i; #endif - sdbg(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid); - sdbg(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state); + sinfo(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid); + sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state); #if CONFIG_NFILE_DESCRIPTORS > 0 filelist = tcb->group->tg_filelist; @@ -87,8 +95,8 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) struct inode *inode = filelist->fl_files[i].f_inode; if (inode) { - sdbg(" fd=%d refcount=%d\n", - i, inode->i_crefs); + sinfo(" fd=%d refcount=%d\n", + i, inode->i_crefssinfo); } } #endif @@ -101,11 +109,11 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) if (filep->fs_fd >= 0) { #if CONFIG_STDIO_BUFFER_SIZE > 0 - sdbg(" fd=%d nbytes=%d\n", - filep->fs_fd, - filep->fs_bufpos - filep->fs_bufstart); + sinfo(" fd=%d nbytes=%d\n", + filep->fs_fd, + filep->fs_bufpos - filep->fs_bufstart); #else - sdbg(" fd=%d\n", filep->fs_fd); + sinfo(" fd=%d\n", filep->fs_fd); #endif } } @@ -138,10 +146,10 @@ void _exit(int status) (void)up_irq_save(); - slldbg("TCB=%p exiting\n", this_task()); + sinfo("TCB=%p exiting\n", this_task()); -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG) - slldbg("Other tasks:\n"); +#ifdef CONFIG_DUMP_ON_EXIT + sinfo("Other tasks:\n"); sched_foreach(_up_dumponexit, NULL); #endif diff --git a/arch/arm/src/common/up_initialize.c b/arch/arm/src/common/up_initialize.c index 511138e4f51640de6328d0d1019d6241ca2c2898..6b5117adf1bdd83745c35827a377856d400288cd 100644 --- a/arch/arm/src/common/up_initialize.c +++ b/arch/arm/src/common/up_initialize.c @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include @@ -72,18 +72,18 @@ * ****************************************************************************/ -#if defined(CONFIG_ARCH_CALIBRATION) && defined(CONFIG_DEBUG) +#if defined(CONFIG_ARCH_CALIBRATION) && defined(CONFIG_DEBUG_FEATURES) static void up_calibratedelay(void) { int i; - lldbg("Beginning 100s delay\n"); + _warn("Beginning 100s delay\n"); for (i = 0; i < 100; i++) { up_mdelay(1000); } - lldbg("End 100s delay\n"); + _warn("End 100s delay\n"); } #else # define up_calibratedelay() @@ -222,7 +222,7 @@ void up_initialize(void) #if defined(CONFIG_DEV_LOWCONSOLE) lowconsole_init(); -#elif defined(CONFIG_SYSLOG_CONSOLE) +#elif defined(CONFIG_CONSOLE_SYSLOG) syslog_console_init(); #elif defined(CONFIG_RAMLOG_CONSOLE) ramlog_consoleinit(); @@ -246,14 +246,12 @@ void up_initialize(void) up_rnginitialize(); #endif - /* Initialize the system logging device */ + /* Early initialization of the system logging device. Some SYSLOG channel + * can be initialized early in the initialization sequence because they + * depend on only minimal OS initialization. + */ -#ifdef CONFIG_SYSLOG_CHAR - syslog_initialize(); -#endif -#ifdef CONFIG_RAMLOG_SYSLOG - ramlog_sysloginit(); -#endif + syslog_initialize(SYSLOG_INIT_EARLY); #ifndef CONFIG_NETDEV_LATEINIT /* Initialize the network */ diff --git a/arch/arm/src/common/up_internal.h b/arch/arm/src/common/up_internal.h index 8dccf8a1ef073639233fe062dd9d35990332f3d9..feec433355893d006eeb7494a730fa865f06f03d 100644 --- a/arch/arm/src/common/up_internal.h +++ b/arch/arm/src/common/up_internal.h @@ -63,6 +63,10 @@ #undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */ #undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */ +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT /* Needs CONFIG_DEBUG_SCHED_INFO */ +#endif + /* Determine which (if any) console driver to use. If a console is enabled * and no other console device is specified, then a serial console is * assumed. @@ -97,13 +101,6 @@ # define USE_SERIALDRIVER 1 #endif -/* Determine which device to use as the system logging device */ - -#ifndef CONFIG_SYSLOG -# undef CONFIG_SYSLOG_CHAR -# undef CONFIG_RAMLOG_SYSLOG -#endif - /* Check if an interrupt stack size is configured */ #ifndef CONFIG_ARCH_INTERRUPTSTACK diff --git a/arch/arm/src/common/up_vfork.c b/arch/arm/src/common/up_vfork.c index b902ccba7b9f93dcbd8e6f22181f472bd97a5f26..e655ab15b43c1648777e5f454ddcf04faec162f5 100644 --- a/arch/arm/src/common/up_vfork.c +++ b/arch/arm/src/common/up_vfork.c @@ -130,12 +130,12 @@ pid_t up_vfork(const struct vfork_s *context) uint32_t stackutil; int ret; - svdbg("vfork context [%p]:\n", context); - svdbg(" r4:%08x r5:%08x r6:%08x r7:%08x\n", + sinfo("vfork context [%p]:\n", context); + sinfo(" r4:%08x r5:%08x r6:%08x r7:%08x\n", context->r4, context->r5, context->r6, context->r7); - svdbg(" r8:%08x r9:%08x r10:%08x\n", + sinfo(" r8:%08x r9:%08x r10:%08x\n", context->r8, context->r9, context->r10); - svdbg(" fp:%08x sp:%08x lr:%08x\n", + sinfo(" fp:%08x sp:%08x lr:%08x\n", context->fp, context->sp, context->lr); /* Allocate and initialize a TCB for the child task. */ @@ -143,11 +143,11 @@ pid_t up_vfork(const struct vfork_s *context) child = task_vforksetup((start_t)(context->lr & ~1)); if (!child) { - sdbg("ERROR: task_vforksetup failed\n"); + serr("ERROR: task_vforksetup failed\n"); return (pid_t)ERROR; } - svdbg("TCBs: Parent=%p Child=%p\n", parent, child); + sinfo("TCBs: Parent=%p Child=%p\n", parent, child); /* Get the size of the parent task's stack. Due to alignment operations, * the adjusted stack size may be smaller than the stack size originally @@ -162,7 +162,7 @@ pid_t up_vfork(const struct vfork_s *context) parent->flags & TCB_FLAG_TTYPE_MASK); if (ret != OK) { - sdbg("ERROR: up_create_stack failed: %d\n", ret); + serr("ERROR: up_create_stack failed: %d\n", ret); task_vforkabort(child, -ret); return (pid_t)ERROR; } @@ -176,7 +176,7 @@ pid_t up_vfork(const struct vfork_s *context) DEBUGASSERT((uint32_t)parent->adj_stack_ptr > context->sp); stackutil = (uint32_t)parent->adj_stack_ptr - context->sp; - svdbg("Parent: stacksize:%d stackutil:%d\n", stacksize, stackutil); + sinfo("Parent: stacksize:%d stackutil:%d\n", stacksize, stackutil); /* Make some feeble effort to preserve the stack contents. This is * feeble because the stack surely contains invalid pointers and other @@ -201,9 +201,9 @@ pid_t up_vfork(const struct vfork_s *context) newfp = context->fp; } - svdbg("Parent: stack base:%08x SP:%08x FP:%08x\n", + sinfo("Parent: stack base:%08x SP:%08x FP:%08x\n", parent->adj_stack_ptr, context->sp, context->fp); - svdbg("Child: stack base:%08x SP:%08x FP:%08x\n", + sinfo("Child: stack base:%08x SP:%08x FP:%08x\n", child->cmn.adj_stack_ptr, newsp, newfp); /* Update the stack pointer, frame pointer, and volatile registers. When diff --git a/arch/arm/src/dm320/dm320_decodeirq.c b/arch/arm/src/dm320/dm320_decodeirq.c index 5d36a6bdc65685f41bc4bdb50e6710b3d82b6071..5d7e709588192ac5e9ad2f0dd0b3aa61e2cbf64e 100644 --- a/arch/arm/src/dm320/dm320_decodeirq.c +++ b/arch/arm/src/dm320/dm320_decodeirq.c @@ -51,22 +51,6 @@ #include "group/group.h" -/******************************************************************************** - * Pre-processor Definitions - ********************************************************************************/ - -/******************************************************************************** - * Public Data - ********************************************************************************/ - -/******************************************************************************** - * Private Data - ********************************************************************************/ - -/******************************************************************************** - * Private Functions - ********************************************************************************/ - /******************************************************************************** * Public Functions ********************************************************************************/ @@ -74,8 +58,8 @@ void up_decodeirq(uint32_t *regs) { #ifdef CONFIG_SUPPRESS_INTERRUPTS - lowsyslog(LOG_ERR, "Unexpected IRQ\n"); CURRENT_REGS = regs; + err("ERROR: Unexpected IRQ\n"); PANIC(); #else /* Decode the interrupt. First, fetch the interrupt id register. */ diff --git a/arch/arm/src/dm320/dm320_framebuffer.c b/arch/arm/src/dm320/dm320_framebuffer.c index 8fd4ec44634f3890f2a9c883ed49a99fa9d48738..dcedcb62e5d277cd46d2280e1055017ef09db437 100644 --- a/arch/arm/src/dm320/dm320_framebuffer.c +++ b/arch/arm/src/dm320/dm320_framebuffer.c @@ -768,15 +768,15 @@ static void dm320_disable(void) { /* Disable all planes */ - gvdbg("Inactivate OSD:\n"); + ginfo("Inactivate OSD:\n"); putreg16(0, DM320_OSD_OSDWIN0MD); /* Win0 mode = 0 (1:active) */ putreg16(0, DM320_OSD_OSDWIN1MD); /* Win1 mode = 0 (1:active) */ putreg16(0, DM320_OSD_RECTCUR); /* Rectangular cursor mode = 0 (1:active) */ - gvdbg("DM320_OSD_OSDWIN0MD: %04x\n", getreg16(DM320_OSD_OSDWIN0MD)); - gvdbg("DM320_OSD_OSDWIN1MD: %04x\n", getreg16(DM320_OSD_OSDWIN1MD)); - gvdbg("DM320_OSD_RECTCUR: %04x\n", getreg16(DM320_OSD_RECTCUR)); + ginfo("DM320_OSD_OSDWIN0MD: %04x\n", getreg16(DM320_OSD_OSDWIN0MD)); + ginfo("DM320_OSD_OSDWIN1MD: %04x\n", getreg16(DM320_OSD_OSDWIN1MD)); + ginfo("DM320_OSD_RECTCUR: %04x\n", getreg16(DM320_OSD_RECTCUR)); } /**************************************************************************** @@ -791,17 +791,17 @@ static void dm320_hwinitialize(void) /* Initialize the main video to correct the origin */ - gvdbg("Setup main video origin:\n"); + ginfo("Setup main video origin:\n"); putreg16(CONFIG_DM320_BASEX, DM320_OSD_BASEPX); putreg16(CONFIG_DM320_BASEY, DM320_OSD_BASEPY); - gvdbg("DM320_OSD_BASEPX: %04x\n", getreg16(DM320_OSD_BASEPX)); - gvdbg("DM320_OSD_BASEPY: %04x\n", getreg16(DM320_OSD_BASEPY)); + ginfo("DM320_OSD_BASEPX: %04x\n", getreg16(DM320_OSD_BASEPX)); + ginfo("DM320_OSD_BASEPY: %04x\n", getreg16(DM320_OSD_BASEPY)); /* Set up the frame buffer address registers */ - gvdbg("Setup framebuffer addresses:\n"); + ginfo("Setup framebuffer addresses:\n"); putreg16(((dm320_osd1upperoffset() << 8) | @@ -809,9 +809,9 @@ static void dm320_hwinitialize(void) putreg16(dm320_osd0loweroffset(), DM320_OSD_OSDWIN0ADL); putreg16(dm320_osd1loweroffset(), DM320_OSD_OSDWIN1ADL); - gvdbg("DM320_OSD_OSDWINADH: %04x\n", getreg16(DM320_OSD_OSDWINADH)); - gvdbg("DM320_OSD_OSDWIN0ADL: %04x\n", getreg16(DM320_OSD_OSDWIN0ADL)); - gvdbg("DM320_OSD_OSDWIN1ADL: %04x\n", getreg16(DM320_OSD_OSDWIN1ADL)); + ginfo("DM320_OSD_OSDWINADH: %04x\n", getreg16(DM320_OSD_OSDWINADH)); + ginfo("DM320_OSD_OSDWIN0ADL: %04x\n", getreg16(DM320_OSD_OSDWIN0ADL)); + ginfo("DM320_OSD_OSDWIN1ADL: %04x\n", getreg16(DM320_OSD_OSDWIN1ADL)); /* Set up VID WIN0 */ @@ -820,19 +820,19 @@ static void dm320_hwinitialize(void) #endif #ifndef CONFIG_DM320_VID0_DISABLE - gvdbg("Initialize video win0:\n"); + ginfo("Initialize video win0:\n"); putreg16(dm320_vid0loweroffset(), DM320_OSD_VIDWIN0ADL); - gvdbg("DM320_OSD_VIDWINADH: %04x\n", getreg16(DM320_OSD_VIDWINADH)); - gvdbg("DM320_OSD_VIDWIN0ADL: %04x\n", getreg16(DM320_OSD_VIDWIN0ADL)); + ginfo("DM320_OSD_VIDWINADH: %04x\n", getreg16(DM320_OSD_VIDWINADH)); + ginfo("DM320_OSD_VIDWIN0ADL: %04x\n", getreg16(DM320_OSD_VIDWIN0ADL)); dm320_blankscreen((uint8_t *)g_vid0base, DM320_VID0_FBLEN); #ifndef CONFIG_DM320_DISABLE_PINGPONG putreg16(dm320_vid0ppupperoffset(), DM320_OSD_PPVWIN0ADH); putreg16(dm320_vid0pploweroffset(), DM320_OSD_PPVWIN0ADL); - gvdbg("DM320_OSD_PPVWIN0ADH: %04x\n", getreg16(DM320_OSD_PPVWIN0ADH)); - gvdbg("DM320_OSD_PPVWIN0ADL: %04x\n", getreg16(DM320_OSD_PPVWIN0ADL)); + ginfo("DM320_OSD_PPVWIN0ADH: %04x\n", getreg16(DM320_OSD_PPVWIN0ADH)); + ginfo("DM320_OSD_PPVWIN0ADL: %04x\n", getreg16(DM320_OSD_PPVWIN0ADL)); dm320_blankscreen((uint8_t *)g_vid0ppbase, DM320_VID0_FBLEN); #endif @@ -842,21 +842,21 @@ static void dm320_hwinitialize(void) putreg16(CONFIG_DM320_VID0_XRES, DM320_OSD_VIDWIN0XL); putreg16(CONFIG_DM320_VID0_YRES, DM320_OSD_VIDWIN0YL); - gvdbg("DM320_OSD_VIDWIN0XP: %04x\n", getreg16(DM320_OSD_VIDWIN0XP)); - gvdbg("DM320_OSD_VIDWIN0YP: %04x\n", getreg16(DM320_OSD_VIDWIN0YP)); - gvdbg("DM320_OSD_VIDWIN0OFST: %04x\n", getreg16(DM320_OSD_VIDWIN0OFST)); - gvdbg("DM320_OSD_VIDWIN0XL: %04x\n", getreg16(DM320_OSD_VIDWIN0XL)); - gvdbg("DM320_OSD_VIDWIN0YL: %04x\n", getreg16(DM320_OSD_VIDWIN0YL)); + ginfo("DM320_OSD_VIDWIN0XP: %04x\n", getreg16(DM320_OSD_VIDWIN0XP)); + ginfo("DM320_OSD_VIDWIN0YP: %04x\n", getreg16(DM320_OSD_VIDWIN0YP)); + ginfo("DM320_OSD_VIDWIN0OFST: %04x\n", getreg16(DM320_OSD_VIDWIN0OFST)); + ginfo("DM320_OSD_VIDWIN0XL: %04x\n", getreg16(DM320_OSD_VIDWIN0XL)); + ginfo("DM320_OSD_VIDWIN0YL: %04x\n", getreg16(DM320_OSD_VIDWIN0YL)); #endif /* Set up VID WIN1 */ #ifndef CONFIG_DM320_VID1_DISABLE - gvdbg("Initialize video win1:\n"); + ginfo("Initialize video win1:\n"); putreg16(dm320_vid1loweroffset(), DM320_OSD_VIDWIN1ADL); - gvdbg("DM320_OSD_VIDWINADH: %04x\n", getreg16(DM320_OSD_VIDWINADH)); - gvdbg("DM320_OSD_VIDWIN1ADL: %04x\n", getreg16(DM320_OSD_VIDWIN1ADL)); + ginfo("DM320_OSD_VIDWINADH: %04x\n", getreg16(DM320_OSD_VIDWINADH)); + ginfo("DM320_OSD_VIDWIN1ADL: %04x\n", getreg16(DM320_OSD_VIDWIN1ADL)); dm320_blankscreen((uint8_t *)g_vid1base, DM320_VID1_FBLEN); putreg16(CONFIG_DM320_VID1_XPOS, DM320_OSD_VIDWIN1XP); @@ -865,20 +865,20 @@ static void dm320_hwinitialize(void) putreg16(CONFIG_DM320_VID1_XRES, DM320_OSD_VIDWIN1XL); putreg16(CONFIG_DM320_VID1_YRES, DM320_OSD_VIDWIN1YL); - gvdbg("DM320_OSD_VIDWIN1XP: %04x\n", getreg16(DM320_OSD_VIDWIN1XP)); - gvdbg("DM320_OSD_VIDWIN1YP: %04x\n", getreg16(DM320_OSD_VIDWIN1YP)); - gvdbg("DM320_OSD_VIDWIN1OFST: %04x\n", getreg16(DM320_OSD_VIDWIN1OFST)); - gvdbg("DM320_OSD_VIDWIN1XL: %04x\n", getreg16(DM320_OSD_VIDWIN1XL)); - gvdbg("DM320_OSD_VIDWIN1YL: %04x\n", getreg16(DM320_OSD_VIDWIN1YL)); + ginfo("DM320_OSD_VIDWIN1XP: %04x\n", getreg16(DM320_OSD_VIDWIN1XP)); + ginfo("DM320_OSD_VIDWIN1YP: %04x\n", getreg16(DM320_OSD_VIDWIN1YP)); + ginfo("DM320_OSD_VIDWIN1OFST: %04x\n", getreg16(DM320_OSD_VIDWIN1OFST)); + ginfo("DM320_OSD_VIDWIN1XL: %04x\n", getreg16(DM320_OSD_VIDWIN1XL)); + ginfo("DM320_OSD_VIDWIN1YL: %04x\n", getreg16(DM320_OSD_VIDWIN1YL)); #endif putreg16(DM320_VIDMODE, DM320_OSD_VIDWINMD); - gvdbg("DM320_OSD_VIDWINMD: %04x\n", getreg16(DM320_OSD_VIDWINMD)); + ginfo("DM320_OSD_VIDWINMD: %04x\n", getreg16(DM320_OSD_VIDWINMD)); /* Set up OSD WIN0 */ #ifndef CONFIG_DM320_OSD0_DISABLE - gvdbg("Initialize OSD win0:\n"); + ginfo("Initialize OSD win0:\n"); dm320_blankscreen((uint8_t *)g_osd0base, DM320_OSD0_FBLEN); putreg16(CONFIG_DM320_OSD0_XPOS, DM320_OSD_OSDWIN0XP); @@ -892,18 +892,18 @@ static void dm320_hwinitialize(void) putreg16(CONFIG_DM320_OSD0_YRES, DM320_OSD_OSDWIN0YL); putreg16(INITIAL_OSD0MODE, DM320_OSD_OSDWIN0MD); - gvdbg("DM320_OSD_OSDWIN0XP: %04x\n", getreg16(DM320_OSD_OSDWIN0XP)); - gvdbg("DM320_OSD_OSDWIN0YP: %04x\n", getreg16(DM320_OSD_OSDWIN0YP)); - gvdbg("DM320_OSD_OSDWIN0OFST: %04x\n", getreg16(DM320_OSD_OSDWIN0OFST)); - gvdbg("DM320_OSD_OSDWIN0XL: %04x\n", getreg16(DM320_OSD_OSDWIN0XL)); - gvdbg("DM320_OSD_OSDWIN0YL: %04x\n", getreg16(DM320_OSD_OSDWIN0YL)); - gvdbg("DM320_OSD_OSDWIN0MD: %04x\n", getreg16(DM320_OSD_OSDWIN0MD)); + ginfo("DM320_OSD_OSDWIN0XP: %04x\n", getreg16(DM320_OSD_OSDWIN0XP)); + ginfo("DM320_OSD_OSDWIN0YP: %04x\n", getreg16(DM320_OSD_OSDWIN0YP)); + ginfo("DM320_OSD_OSDWIN0OFST: %04x\n", getreg16(DM320_OSD_OSDWIN0OFST)); + ginfo("DM320_OSD_OSDWIN0XL: %04x\n", getreg16(DM320_OSD_OSDWIN0XL)); + ginfo("DM320_OSD_OSDWIN0YL: %04x\n", getreg16(DM320_OSD_OSDWIN0YL)); + ginfo("DM320_OSD_OSDWIN0MD: %04x\n", getreg16(DM320_OSD_OSDWIN0MD)); #endif /* Set up OSD WIN1 */ #ifndef CONFIG_DM320_OSD1_DISABLE - gvdbg("Initialize OSD win1\n"); + ginfo("Initialize OSD win1\n"); dm320_blankscreen((uint8_t *)g_osd1base, DM320_OSD1_FBLEN); putreg16(CONFIG_DM320_OSD1_XPOS, DM320_OSD_OSDWIN1XP); @@ -917,18 +917,18 @@ static void dm320_hwinitialize(void) putreg16(CONFIG_DM320_OSD1_YRES, DM320_OSD_OSDWIN1YL); putreg16(INITIAL_OSD1MODE, DM320_OSD_OSDWIN1MD); - gvdbg("DM320_OSD_OSDWIN1XP: %04x\n", getreg16(DM320_OSD_OSDWIN1XP)); - gvdbg("DM320_OSD_OSDWIN1YP: %04x\n", getreg16(DM320_OSD_OSDWIN1YP)); - gvdbg("DM320_OSD_OSDWIN1OFST: %04x\n", getreg16(DM320_OSD_OSDWIN1OFST)); - gvdbg("DM320_OSD_OSDWIN1XL: %04x\n", getreg16(DM320_OSD_OSDWIN1XL)); - gvdbg("DM320_OSD_OSDWIN1YL: %04x\n", getreg16(DM320_OSD_OSDWIN1YL)); - gvdbg("DM320_OSD_OSDWIN1MD: %04x\n", getreg16(DM320_OSD_OSDWIN1MD)); + ginfo("DM320_OSD_OSDWIN1XP: %04x\n", getreg16(DM320_OSD_OSDWIN1XP)); + ginfo("DM320_OSD_OSDWIN1YP: %04x\n", getreg16(DM320_OSD_OSDWIN1YP)); + ginfo("DM320_OSD_OSDWIN1OFST: %04x\n", getreg16(DM320_OSD_OSDWIN1OFST)); + ginfo("DM320_OSD_OSDWIN1XL: %04x\n", getreg16(DM320_OSD_OSDWIN1XL)); + ginfo("DM320_OSD_OSDWIN1YL: %04x\n", getreg16(DM320_OSD_OSDWIN1YL)); + ginfo("DM320_OSD_OSDWIN1MD: %04x\n", getreg16(DM320_OSD_OSDWIN1MD)); #endif /* Set up the rectangular cursor with defaults */ #ifdef CONFIG_FB_HWCURSOR - gdbg("Initialize rectangular cursor\n"); + lcdinfo("Initialize rectangular cursor\n"); putreg16(0, DM320_OSD_CURXP); putreg16(0, DM320_OSD_CURYP); @@ -946,11 +946,11 @@ static void dm320_hwinitialize(void) putreg16(DM320_RECTCURSOR_SETUP, DM320_OSD_RECTCUR); - gvdbg("DM320_OSD_CURXP: %04x\n", getreg16(DM320_OSD_CURXP)); - gvdbg("DM320_OSD_CURYP: %04x\n", getreg16(DM320_OSD_CURYP)); - gvdbg("DM320_OSD_CURXL: %04x\n", getreg16(DM320_OSD_CURXL)); - gvdbg("DM320_OSD_CURYL: %04x\n", getreg16(DM320_OSD_CURYL)); - gvdbg("DM320_OSD_RECTCUR: %04x\n", getreg16(DM320_OSD_RECTCUR)); + ginfo("DM320_OSD_CURXP: %04x\n", getreg16(DM320_OSD_CURXP)); + ginfo("DM320_OSD_CURYP: %04x\n", getreg16(DM320_OSD_CURYP)); + ginfo("DM320_OSD_CURXL: %04x\n", getreg16(DM320_OSD_CURXL)); + ginfo("DM320_OSD_CURYL: %04x\n", getreg16(DM320_OSD_CURYL)); + ginfo("DM320_OSD_RECTCUR: %04x\n", getreg16(DM320_OSD_RECTCUR)); #endif /* Set main window to the hardware default state. That initial @@ -969,7 +969,7 @@ static void dm320_hwinitialize(void) */ putreg16(CONFIG_DM320_BKGDCLUT, DM320_OSD_OSDMODE); - gvdbg("DM320_OSD_OSDMODE: %04x\n", getreg16(DM320_OSD_OSDMODE)); + ginfo("DM320_OSD_OSDMODE: %04x\n", getreg16(DM320_OSD_OSDMODE)); } /**************************************************************************** @@ -980,7 +980,7 @@ static void dm320_hwinitialize(void) static int dm320_getvid0videoinfo(FAR struct fb_vtable_s *vtable, FAR struct fb_videoinfo_s *vinfo) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!vtable || !vinfo) { return -EINVAL; @@ -1003,7 +1003,7 @@ static int dm320_getvid0videoinfo(FAR struct fb_vtable_s *vtable, static int dm320_getvid0planeinfo(FAR struct fb_vtable_s *vtable, int planeno, FAR struct fb_planeinfo_s *pinfo) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!vtable || !pinfo) { return -EINVAL; @@ -1027,7 +1027,7 @@ static int dm320_getvid0planeinfo(FAR struct fb_vtable_s *vtable, int planeno, static int dm320_getvid1videoinfo(FAR struct fb_vtable_s *vtable, FAR struct fb_videoinfo_s *vinfo) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!vtable || !vinfo) { return -EINVAL; @@ -1050,7 +1050,7 @@ static int dm320_getvid1videoinfo(FAR struct fb_vtable_s *vtable, static int dm320_getvid1planeinfo(FAR struct fb_vtable_s *vtable, int planeno, FAR struct fb_planeinfo_s *pinfo) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!vtable || !pinfo) { return -EINVAL; @@ -1074,7 +1074,7 @@ static int dm320_getvid1planeinfo(FAR struct fb_vtable_s *vtable, int planeno, static int dm320_getosd0videoinfo(FAR struct fb_vtable_s *vtable, FAR struct fb_videoinfo_s *vinfo) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!vtable || !vinfo) { return -EINVAL; @@ -1101,7 +1101,7 @@ static int dm320_getosd0videoinfo(FAR struct fb_vtable_s *vtable, static int dm320_getosd0planeinfo(FAR struct fb_vtable_s *vtable, int planeno, FAR struct fb_planeinfo_s *pinfo) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!vtable || !pinfo) { return -EINVAL; @@ -1125,7 +1125,7 @@ static int dm320_getosd0planeinfo(FAR struct fb_vtable_s *vtable, int planeno, static int dm320_getosd1videoinfo(FAR struct fb_vtable_s *vtable, FAR struct fb_videoinfo_s *vinfo) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!vtable || !vinfo) { return -EINVAL; @@ -1152,7 +1152,7 @@ static int dm320_getosd1videoinfo(FAR struct fb_vtable_s *vtable, static int dm320_getosd1planeinfo(FAR struct fb_vtable_s *vtable, int planeno, FAR struct fb_planeinfo_s *pinfo) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!vtable || !pinfo) { return -EINVAL; @@ -1196,7 +1196,7 @@ static int dm320_putcmap(FAR struct fb_vtable_s *vtable, FAR struct fb_cmap_s *c int len int i; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!vtable || !cmap || !cmap->read || !cmap->green || !cmap->blue) { return -EINVAL; @@ -1245,7 +1245,7 @@ static int dm320_getcursor(FAR struct fb_vtable_s *vtable, FAR struct fb_cursora { irqstate_t flags; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!vtable || !attrib) { return -EINVAL; @@ -1265,16 +1265,16 @@ static int dm320_getcursor(FAR struct fb_vtable_s *vtable, FAR struct fb_cursora attrib->mxsize.w = MAX_XRES; attrib->mxsize.h = MAX_YRES; - gvdbg("DM320_OSD_CURXP: %04x\n", attrib->pos.x); - gvdbg("DM320_OSD_CURYP: %04x\n", attrib->pos.y); + ginfo("DM320_OSD_CURXP: %04x\n", attrib->pos.x); + ginfo("DM320_OSD_CURYP: %04x\n", attrib->pos.y); #ifdef CONFIG_FB_HWCURSORSIZE - gvdbg("DM320_OSD_CURXL: %04x\n", attrib->size.w); - gvdbg("DM320_OSD_CURYL: %04x\n", attrib->size.h); + ginfo("DM320_OSD_CURXL: %04x\n", attrib->size.w); + ginfo("DM320_OSD_CURYL: %04x\n", attrib->size.h); #else - gvdbg("DM320_OSD_CURXL: %04x\n", getreg16(DM320_OSD_CURXL)); - gvdbg("DM320_OSD_CURYL: %04x\n", getreg16(DM320_OSD_CURYL)); + ginfo("DM320_OSD_CURXL: %04x\n", getreg16(DM320_OSD_CURXL)); + ginfo("DM320_OSD_CURYL: %04x\n", getreg16(DM320_OSD_CURYL)); #endif - gvdbg("DM320_OSD_RECTCUR: %04x\n", getreg16(DM320_OSD_RECTCUR)); + ginfo("DM320_OSD_RECTCUR: %04x\n", getreg16(DM320_OSD_RECTCUR)); } #endif @@ -1288,7 +1288,7 @@ static int dm320_setcursor(FAR struct fb_vtable_s *vtable, FAR struct fb_setcurs irqstate_t flags; uint16_t regval; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!vtable || !settings) { return -EINVAL; @@ -1300,7 +1300,7 @@ static int dm320_setcursor(FAR struct fb_vtable_s *vtable, FAR struct fb_setcurs flags = enter_critical_section(); if ((settings->flags & FB_CUR_SETPOSITION) != 0) { - gvdbg("x=%d y=%d\n", settings->pos.x, settings->pos.y); + ginfo("x=%d y=%d\n", settings->pos.x, settings->pos.y); if (settings->pos.x > MAX_YRES) { @@ -1319,7 +1319,7 @@ static int dm320_setcursor(FAR struct fb_vtable_s *vtable, FAR struct fb_setcurs #ifdef CONFIG_FB_HWCURSORSIZE if ((settings->flags & FB_CUR_SETSIZE) != 0) { - gvdbg("h=%d w=%d\n", settings->size.h, settings->size.w); + ginfo("h=%d w=%d\n", settings->size.h, settings->size.w); if (settings->size.w > MAX_YRES) { @@ -1349,11 +1349,11 @@ static int dm320_setcursor(FAR struct fb_vtable_s *vtable, FAR struct fb_setcurs putreg16(regval, DM320_OSD_RECTCUR); leave_critical_section(flags); - gvdbg("DM320_OSD_CURXP: %04x\n", getreg16(DM320_OSD_CURXP)); - gvdbg("DM320_OSD_CURYP: %04x\n", getreg16(DM320_OSD_CURYP)); - gvdbg("DM320_OSD_CURXL: %04x\n", getreg16(DM320_OSD_CURXL)); - gvdbg("DM320_OSD_CURYL: %04x\n", getreg16(DM320_OSD_CURYL)); - gvdbg("DM320_OSD_RECTCUR: %04x\n", getreg16(DM320_OSD_RECTCUR)); + ginfo("DM320_OSD_CURXP: %04x\n", getreg16(DM320_OSD_CURXP)); + ginfo("DM320_OSD_CURYP: %04x\n", getreg16(DM320_OSD_CURYP)); + ginfo("DM320_OSD_CURXL: %04x\n", getreg16(DM320_OSD_CURXL)); + ginfo("DM320_OSD_CURYL: %04x\n", getreg16(DM320_OSD_CURYL)); + ginfo("DM320_OSD_RECTCUR: %04x\n", getreg16(DM320_OSD_RECTCUR)); } #endif @@ -1381,17 +1381,17 @@ int up_fbinitialize(int display) { int ret; - gvdbg("Allocating framebuffers\n"); + ginfo("Allocating framebuffers\n"); ret = dm320_allocvideomemory(); if (ret != 0) { - gdbg("Failed to allocate video buffers\n"); + lcderr("ERROR: Failed to allocate video buffers\n"); return ret; } /* Initialize the hardware */ - gvdbg("Initializing hardware\n"); + ginfo("Initializing hardware\n"); dm320_hwinitialize(); return 0; } diff --git a/arch/arm/src/dm320/dm320_usbdev.c b/arch/arm/src/dm320/dm320_usbdev.c index f0f87b7f584c88cbe5ca18d1eac7ebf1bc4b2102..df25123b09ec08ed7062a6572bd1448877386802 100644 --- a/arch/arm/src/dm320/dm320_usbdev.c +++ b/arch/arm/src/dm320/dm320_usbdev.c @@ -268,7 +268,7 @@ struct dm320_epinfo_s /* Register operations */ -#if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_DM320_USBDEV_REGDEBUG static uint32_t dm320_getreg8(uint32_t addr); static uint32_t dm320_getreg16(uint32_t addr); static uint32_t dm320_getreg32(uint32_t addr); @@ -422,7 +422,7 @@ static const struct dm320_epinfo_s g_epinfo[DM320_NENDPOINTS] = * ****************************************************************************/ -#if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_DM320_USBDEV_REGDEBUG static uint8_t dm320_getreg8(uint32_t addr) { static uint32_t prevaddr = 0; @@ -443,7 +443,7 @@ static uint8_t dm320_getreg8(uint32_t addr) { if (count == 4) { - lldbg("...\n"); + uinfo("...\n"); } return val; @@ -460,7 +460,7 @@ static uint8_t dm320_getreg8(uint32_t addr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + uinfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -472,7 +472,7 @@ static uint8_t dm320_getreg8(uint32_t addr) /* Show the register value read */ - lldbg("%08x->%02x\n", addr, val); + uinfo("%08x->%02x\n", addr, val); return val; } #endif @@ -485,7 +485,7 @@ static uint8_t dm320_getreg8(uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_DM320_USBDEV_REGDEBUG static uint32_t dm320_getreg16(uint32_t addr) { static uint32_t prevaddr = 0; @@ -506,7 +506,7 @@ static uint32_t dm320_getreg16(uint32_t addr) { if (count == 4) { - lldbg("...\n"); + uinfo("...\n"); } return val; @@ -523,7 +523,7 @@ static uint32_t dm320_getreg16(uint32_t addr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + uinfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -535,7 +535,7 @@ static uint32_t dm320_getreg16(uint32_t addr) /* Show the register value read */ - lldbg("%08x->%04x\n", addr, val); + uinfo("%08x->%04x\n", addr, val); return val; } #endif @@ -548,7 +548,7 @@ static uint32_t dm320_getreg16(uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_DM320_USBDEV_REGDEBUG static uint32_t dm320_getreg32(uint32_t addr) { static uint32_t prevaddr = 0; @@ -569,7 +569,7 @@ static uint32_t dm320_getreg32(uint32_t addr) { if (count == 4) { - lldbg("...\n"); + uinfo("...\n"); } return val; @@ -586,7 +586,7 @@ static uint32_t dm320_getreg32(uint32_t addr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + uinfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -598,7 +598,7 @@ static uint32_t dm320_getreg32(uint32_t addr) /* Show the register value read */ - lldbg("%08x->%08x\n", addr, val); + uinfo("%08x->%08x\n", addr, val); return val; } #endif @@ -611,12 +611,12 @@ static uint32_t dm320_getreg32(uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_DM320_USBDEV_REGDEBUG static void dm320_putreg8(uint8_t val, uint32_t addr) { /* Show the register value being written */ - lldbg("%08x<-%02x\n", addr, val); + uinfo("%08x<-%02x\n", addr, val); /* Write the value */ @@ -632,12 +632,12 @@ static void dm320_putreg8(uint8_t val, uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_DM320_USBDEV_REGDEBUG static void dm320_putreg16(uint16_t val, uint32_t addr) { /* Show the register value being written */ - lldbg("%08x<-%04x\n", addr, val); + uinfo("%08x<-%04x\n", addr, val); /* Write the value */ @@ -653,12 +653,12 @@ static void dm320_putreg16(uint16_t val, uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_DM320_USBDEV_REGDEBUG static void dm320_putreg32(uint32_t val, uint32_t addr) { /* Show the register value being written */ - lldbg("%08x<-%08x\n", addr, val); + uinfo("%08x<-%08x\n", addr, val); /* Write the value */ @@ -1216,8 +1216,8 @@ static inline void dm320_ep0setup(struct dm320_usbdev_s *priv) value = GETUINT16(ctrl.value); len = GETUINT16(ctrl.len); - ullvdbg("type=%02x req=%02x value=%04x index=%04x len=%04x\n", - ctrl.type, ctrl.req, value, index, len); + uinfo("type=%02x req=%02x value=%04x index=%04x len=%04x\n", + ctrl.type, ctrl.req, value, index, len); /* Dispatch any non-standard requests */ @@ -1618,7 +1618,7 @@ static int dm320_ctlrinterrupt(int irq, FAR void *context) } else { - ullvdbg("Pending data on OUT endpoint\n"); + uinfo("Pending data on OUT endpoint\n"); priv->rxpending = 1; } } @@ -1943,7 +1943,7 @@ static int dm320_epdisable(FAR struct usbdev_ep_s *ep) FAR struct dm320_ep_s *privep = (FAR struct dm320_ep_s *)ep; irqstate_t flags; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { usbtrace(TRACE_DEVERROR(DM320_TRACEERR_INVALIDPARMS), 0); @@ -1974,7 +1974,7 @@ static FAR struct usbdev_req_s *dm320_epallocreq(FAR struct usbdev_ep_s *ep) { FAR struct dm320_req_s *privreq; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { return NULL; @@ -2005,7 +2005,7 @@ static void dm320_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s { FAR struct dm320_req_s *privreq = (FAR struct dm320_req_s *)req; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !req) { usbtrace(TRACE_DEVERROR(DM320_TRACEERR_INVALIDPARMS), 0); @@ -2075,7 +2075,7 @@ static int dm320_epsubmit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *r irqstate_t flags; int ret = OK; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!req || !req->callback || !req->buf || !ep) { usbtrace(TRACE_DEVERROR(DM320_TRACEERR_INVALIDPARMS), 0); @@ -2170,7 +2170,7 @@ static int dm320_epcancel(struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) FAR struct dm320_usbdev_s *priv; irqstate_t flags; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !req) { usbtrace(TRACE_DEVERROR(DM320_TRACEERR_INVALIDPARMS), 0); @@ -2293,7 +2293,7 @@ static int dm320_getframe(struct usbdev_s *dev) usbtrace(TRACE_DEVGETFRAME, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev) { usbtrace(TRACE_DEVERROR(DM320_TRACEERR_INVALIDPARMS), 0); @@ -2345,7 +2345,7 @@ static int dm320_selfpowered(struct usbdev_s *dev, bool selfpowered) usbtrace(TRACE_DEVSELFPOWERED, (uint16_t)selfpowered); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev) { usbtrace(TRACE_DEVERROR(DM320_TRACEERR_INVALIDPARMS), 0); @@ -2415,9 +2415,9 @@ void up_usbinitialize(void) memset(priv, 0, sizeof(struct dm320_usbdev_s)); priv->usbdev.ops = &g_devops; -#ifdef CONFIG_DEBUG_USB +#ifdef CONFIG_DEBUG_USB_INFO chiprev = dm320_getreg16(DM320_BUSC_REVR); - ulldbg("DM320 revision : %d.%d\n", chiprev >> 4, chiprev & 0x0f); + uinfo("DM320 revision : %d.%d\n", chiprev >> 4, chiprev & 0x0f); #endif /* Enable USB clock & GIO clock */ @@ -2544,7 +2544,7 @@ int usbdev_register(FAR struct usbdevclass_driver_s *driver) usbtrace(TRACE_DEVREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || (driver->speed != USB_SPEED_FULL) || !driver->ops->bind || !driver->ops->unbind || !driver->ops->setup) { @@ -2602,7 +2602,7 @@ int usbdev_unregister(FAR struct usbdevclass_driver_s *driver) { usbtrace(TRACE_DEVUNREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (driver != g_usbdev.driver) { usbtrace(TRACE_DEVERROR(DM320_TRACEERR_INVALIDPARMS), 0); diff --git a/arch/arm/src/efm32/Kconfig b/arch/arm/src/efm32/Kconfig index ad1abfbfa06550a44aeb96d644df6eed23467004..877cca10740d2309d6d0830c87e6d79f490e2eb9 100644 --- a/arch/arm/src/efm32/Kconfig +++ b/arch/arm/src/efm32/Kconfig @@ -140,7 +140,7 @@ config EFM32_FLASHPROG config EFM32_RMU_DEBUG bool "Reset Management Unit (RMU) DEBUG " default n - depends on EFM32_RMU && DEBUG + depends on EFM32_RMU && DEBUG_FEATURES config EFM32_I2C0 bool "I2C0" diff --git a/arch/arm/src/efm32/efm32_adc.c b/arch/arm/src/efm32/efm32_adc.c index 53cb731ad6091b64e8682a580d9b2779f81d5bfc..c9e339e6ea27e8495b2eafddd16892bb0cf14873 100644 --- a/arch/arm/src/efm32/efm32_adc.c +++ b/arch/arm/src/efm32/efm32_adc.c @@ -716,23 +716,23 @@ endif /* defined(ADC_COUNT) && (ADC_COUNT > 0) */ #ifdef ADC_HAVE_TIMER static void adc_tim_dumpregs(struct efm32_dev_s *priv, FAR const char *msg) { -#if defined(CONFIG_DEBUG_ANALOG) && defined(CONFIG_DEBUG_VERBOSE) - avdbg("%s:\n", msg); - avdbg(" CR1: %04x CR2: %04x SMCR: %04x DIER: %04x\n", +#if defined(CONFIG_DEBUG_ANALOG) && defined(CONFIG_DEBUG_INFO) + ainfo("%s:\n", msg); + ainfo(" CR1: %04x CR2: %04x SMCR: %04x DIER: %04x\n", tim_getreg(priv, EFM32_GTIM_CR1_OFFSET), tim_getreg(priv, EFM32_GTIM_CR2_OFFSET), tim_getreg(priv, EFM32_GTIM_SMCR_OFFSET), tim_getreg(priv, EFM32_GTIM_DIER_OFFSET)); - avdbg(" SR: %04x EGR: 0000 CCMR1: %04x CCMR2: %04x\n", + ainfo(" SR: %04x EGR: 0000 CCMR1: %04x CCMR2: %04x\n", tim_getreg(priv, EFM32_GTIM_SR_OFFSET), tim_getreg(priv, EFM32_GTIM_CCMR1_OFFSET), tim_getreg(priv, EFM32_GTIM_CCMR2_OFFSET)); - avdbg(" CCER: %04x CNT: %04x PSC: %04x ARR: %04x\n", + ainfo(" CCER: %04x CNT: %04x PSC: %04x ARR: %04x\n", tim_getreg(priv, EFM32_GTIM_CCER_OFFSET), tim_getreg(priv, EFM32_GTIM_CNT_OFFSET), tim_getreg(priv, EFM32_GTIM_PSC_OFFSET), tim_getreg(priv, EFM32_GTIM_ARR_OFFSET)); - avdbg(" CCR1: %04x CCR2: %04x CCR3: %04x CCR4: %04x\n", + ainfo(" CCR1: %04x CCR2: %04x CCR3: %04x CCR4: %04x\n", tim_getreg(priv, EFM32_GTIM_CCR1_OFFSET), tim_getreg(priv, EFM32_GTIM_CCR2_OFFSET), tim_getreg(priv, EFM32_GTIM_CCR3_OFFSET), @@ -740,7 +740,7 @@ static void adc_tim_dumpregs(struct efm32_dev_s *priv, FAR const char *msg) if (priv->tbase == EFM32_TIM1_BASE || priv->tbase == EFM32_TIM8_BASE) { - avdbg(" RCR: %04x BDTR: %04x DCR: %04x DMAR: %04x\n", + ainfo(" RCR: %04x BDTR: %04x DCR: %04x DMAR: %04x\n", tim_getreg(priv, EFM32_ATIM_RCR_OFFSET), tim_getreg(priv, EFM32_ATIM_BDTR_OFFSET), tim_getreg(priv, EFM32_ATIM_DCR_OFFSET), @@ -748,7 +748,7 @@ static void adc_tim_dumpregs(struct efm32_dev_s *priv, FAR const char *msg) } else { - avdbg(" DCR: %04x DMAR: %04x\n", + ainfo(" DCR: %04x DMAR: %04x\n", tim_getreg(priv, EFM32_GTIM_DCR_OFFSET), tim_getreg(priv, EFM32_GTIM_DMAR_OFFSET)); } @@ -775,7 +775,7 @@ static void adc_startconv(struct efm32_dev_s *priv, bool enable) { uint32_t regval; - avdbg("enable: %d\n", enable); + ainfo("enable: %d\n", enable); regval = adc_getreg(priv, EFM32_ADC_CR2_OFFSET); if (enable) @@ -864,7 +864,7 @@ static void adc_enable(FAR struct efm32_dev_s *priv, bool enable) { uint32_t regval; - avdbg("enable: %d\n", enable); + ainfo("enable: %d\n", enable); regval = adc_getreg(priv, EFM32_ADC_CR2_OFFSET); if (enable) @@ -922,7 +922,7 @@ static void adc_reset(FAR struct adc_dev_s *dev) int ret; #endif - avdbg("intf: ADC%d\n", priv->intf); + ainfo("intf: ADC%d\n", priv->intf); flags = enter_critical_section(); /* Enable ADC reset state */ @@ -1040,11 +1040,11 @@ static void adc_reset(FAR struct adc_dev_s *dev) leave_critical_section(flags); - avdbg("SR: 0x%08x CR1: 0x%08x CR2: 0x%08x\n", + ainfo("SR: 0x%08x CR1: 0x%08x CR2: 0x%08x\n", adc_getreg(priv, EFM32_ADC_SR_OFFSET), adc_getreg(priv, EFM32_ADC_CR1_OFFSET), adc_getreg(priv, EFM32_ADC_CR2_OFFSET)); - avdbg("SQR1: 0x%08x SQR2: 0x%08x SQR3: 0x%08x\n", + ainfo("SQR1: 0x%08x SQR2: 0x%08x SQR3: 0x%08x\n", adc_getreg(priv, EFM32_ADC_SQR1_OFFSET), adc_getreg(priv, EFM32_ADC_SQR2_OFFSET), adc_getreg(priv, EFM32_ADC_SQR3_OFFSET)); @@ -1081,7 +1081,7 @@ static int adc_setup(FAR struct adc_dev_s *dev) /* Enable the ADC interrupt */ - avdbg("Enable the ADC interrupt: irq=%d\n", priv->irq); + ainfo("Enable the ADC interrupt: irq=%d\n", priv->irq); up_enable_irq(priv->irq); } @@ -1132,7 +1132,7 @@ static void adc_rxint(FAR struct adc_dev_s *dev, bool enable) FAR struct efm32_dev_s *priv = (FAR struct efm32_dev_s *)dev->ad_priv; uint32_t regval; - avdbg("intf: %d enable: %d\n", priv->intf, enable); + ainfo("intf: %d enable: %d\n", priv->intf, enable); regval = adc_getreg(priv, EFM32_ADC_CR1_OFFSET); if (enable) @@ -1191,7 +1191,7 @@ static int adc_interrupt(FAR struct adc_dev_s *dev) adcsr = adc_getreg(priv, EFM32_ADC_SR_OFFSET); if ((adcsr & ADC_SR_AWD) != 0) { - alldbg("WARNING: Analog Watchdog, Value converted out of range!\n"); + awarn("WARNING: Analog Watchdog, Value converted out of range!\n"); } /* EOC: End of conversion */ @@ -1271,12 +1271,12 @@ struct adc_dev_s *efm32_adcinitialize(int intf, const uint8_t *chanlist, int nch FAR struct adc_dev_s *dev; FAR struct efm32_dev_s *priv; - avdbg("intf: %d nchannels: %d\n", intf, nchannels); + ainfo("intf: %d nchannels: %d\n", intf, nchannels); #ifdef CONFIG_EFM32_ADC1 if (intf == 1) { - avdbg("ADC1 Selected\n"); + ainfo("ADC1 Selected\n"); dev = &g_adcdev1; } else @@ -1284,7 +1284,7 @@ struct adc_dev_s *efm32_adcinitialize(int intf, const uint8_t *chanlist, int nch #ifdef CONFIG_EFM32_ADC2 if (intf == 2) { - avdbg("ADC2 Selected\n"); + ainfo("ADC2 Selected\n"); dev = &g_adcdev2; } else @@ -1292,13 +1292,13 @@ struct adc_dev_s *efm32_adcinitialize(int intf, const uint8_t *chanlist, int nch #ifdef CONFIG_EFM32_ADC3 if (intf == 3) { - avdbg("ADC3 Selected\n"); + ainfo("ADC3 Selected\n"); dev = &g_adcdev3; } else #endif { - adbg("No ADC interface defined\n"); + aerr("ERROR: No ADC interface defined\n"); return NULL; } diff --git a/arch/arm/src/efm32/efm32_clockconfig.c b/arch/arm/src/efm32/efm32_clockconfig.c index e2f0d3b5df7fc7530b39e467470ce7f587dc56d0..5ecdf03c12fe5f2c9adc043093ef2c81a937560e 100644 --- a/arch/arm/src/efm32/efm32_clockconfig.c +++ b/arch/arm/src/efm32/efm32_clockconfig.c @@ -450,7 +450,7 @@ static inline uint32_t efm32_hfclk_config(uint32_t hfclksel, uint32_t hfclkdiv) } break; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES default: PANIC(); #endif @@ -884,7 +884,7 @@ static inline void efm32_gpioclock(void) * ****************************************************************************/ -#if defined(CONFIG_SYSLOG) || defined(CONFIG_ARMV7M_ITMSYSLOG) +#ifdef CONFIG_ARMV7M_ITMSYSLOG static inline void efm32_itm_syslog(void) { int regval; diff --git a/arch/arm/src/efm32/efm32_config.h b/arch/arm/src/efm32/efm32_config.h index b60c3a60e4dcb267198c7bd710df888e5c5937fe..f0bf6335d96aa4f9eb6171cc499352bec686af34 100644 --- a/arch/arm/src/efm32/efm32_config.h +++ b/arch/arm/src/efm32/efm32_config.h @@ -127,7 +127,7 @@ #undef HAVE_UART_CONSOLE #undef HAVE_LEUART_CONSOLE -#if defined(CONFIG_SYSLOG_CONSOLE) +#if defined(CONFIG_CONSOLE_SYSLOG) # undef CONFIG_USART1_SERIAL_CONSOLE # undef CONFIG_USART2_SERIAL_CONSOLE # undef CONFIG_UART0_SERIAL_CONSOLE diff --git a/arch/arm/src/efm32/efm32_dma.c b/arch/arm/src/efm32/efm32_dma.c index a96bc160c0de6a072f6d9b4e3227ff576f5eec97..4bf901500b604b5498b2f9bdbef98625c4dc0f97 100644 --- a/arch/arm/src/efm32/efm32_dma.c +++ b/arch/arm/src/efm32/efm32_dma.c @@ -270,7 +270,7 @@ void weak_function up_dmainitialize(void) uint32_t regval; int i; - dmallvdbg("Initialize XDMAC0\n"); + dmainfo("Initialize XDMAC0\n"); /* Initialize the channel list */ @@ -416,7 +416,7 @@ void efm32_dmafree(DMA_HANDLE handle) struct dma_channel_s *dmach = (struct dma_channel_s *)handle; DEBUGASSERT(dmach != NULL && dmach->inuse); - dmavdbg("DMA channel %d\n", dmach->chan); + dmainfo("DMA channel %d\n", dmach->chan); /* Disable the channel */ @@ -745,7 +745,7 @@ void efm32_dmastop(DMA_HANDLE handle) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void efm32_dmasample(DMA_HANDLE handle, struct efm32_dmaregs_s *regs) { struct dma_channel_s *dmach = (struct dma_channel_s *)handle; @@ -798,35 +798,35 @@ void efm32_dmasample(DMA_HANDLE handle, struct efm32_dmaregs_s *regs) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void efm32_dmadump(DMA_HANDLE handle, const struct efm32_dmaregs_s *regs, const char *msg) { struct dma_channel_s *dmach = (struct dma_channel_s *)handle; - dmadbg("%s\n", msg); - dmadbg(" DMA Registers:\n"); - dmadbg(" STATUS: %08x\n", regs->status); - dmadbg(" CTRLBASE: %08x\n", regs->ctrlbase); - dmadbg(" ALTCTRLBASE: %08x\n", regs->altctrlbase); - dmadbg(" CHWAITSTATUS: %08x\n", regs->chwaitstatus); - dmadbg(" CHUSEBURSTS: %08x\n", regs->chusebursts); - dmadbg(" CHREQMASKS: %08x\n", regs->chreqmasks); - dmadbg(" CHENS: %08x\n", regs->chens); - dmadbg(" CHALTS: %08x\n", regs->chalts); - dmadbg(" CHPRIS: %08x\n", regs->chpris); - dmadbg(" ERRORC: %08x\n", regs->errorc); - dmadbg(" CHREQSTATUS: %08x\n", regs->chreqstatus); - dmadbg(" CHSREQSTATUS: %08x\n", regs->chsreqstatus); - dmadbg(" IEN: %08x\n", regs->ien); + dmainfo("%s\n", msg); + dmainfo(" DMA Registers:\n"); + dmainfo(" STATUS: %08x\n", regs->status); + dmainfo(" CTRLBASE: %08x\n", regs->ctrlbase); + dmainfo(" ALTCTRLBASE: %08x\n", regs->altctrlbase); + dmainfo(" CHWAITSTATUS: %08x\n", regs->chwaitstatus); + dmainfo(" CHUSEBURSTS: %08x\n", regs->chusebursts); + dmainfo(" CHREQMASKS: %08x\n", regs->chreqmasks); + dmainfo(" CHENS: %08x\n", regs->chens); + dmainfo(" CHALTS: %08x\n", regs->chalts); + dmainfo(" CHPRIS: %08x\n", regs->chpris); + dmainfo(" ERRORC: %08x\n", regs->errorc); + dmainfo(" CHREQSTATUS: %08x\n", regs->chreqstatus); + dmainfo(" CHSREQSTATUS: %08x\n", regs->chsreqstatus); + dmainfo(" IEN: %08x\n", regs->ien); #if defined(CONFIG_EFM32_EFM32GG) - dmadbg(" CTRL: %08x\n", regs->ctrl); - dmadbg(" RDS: %08x\n", regs->rds); - dmadbg(" LOOP0: %08x\n", regs->loop0); - dmadbg(" LOOP1: %08x\n", regs->loop1); - dmadbg(" RECT0: %08x\n", regs->rect0); + dmainfo(" CTRL: %08x\n", regs->ctrl); + dmainfo(" RDS: %08x\n", regs->rds); + dmainfo(" LOOP0: %08x\n", regs->loop0); + dmainfo(" LOOP1: %08x\n", regs->loop1); + dmainfo(" RECT0: %08x\n", regs->rect0); #endif - dmadbg(" DMA Channel %d Registers:\n", dmach->chan); - dmadbg(" CHCTRL: %08x\n", regs->chnctrl); + dmainfo(" DMA Channel %d Registers:\n", dmach->chan); + dmainfo(" CHCTRL: %08x\n", regs->chnctrl); } #endif diff --git a/arch/arm/src/efm32/efm32_dma.h b/arch/arm/src/efm32/efm32_dma.h index 2cedb881f3822b3203365ba51a074c2747f0dfbb..011a7d987421d0ce823c77dfeb6b9890aecb000a 100644 --- a/arch/arm/src/efm32/efm32_dma.h +++ b/arch/arm/src/efm32/efm32_dma.h @@ -109,7 +109,7 @@ typedef FAR void *DMA_HANDLE; typedef void (*dma_callback_t)(DMA_HANDLE handle, uint8_t status, void *arg); -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO struct efm32_dmaregs_s { uint32_t status; /* DMA Status Register */ @@ -282,7 +282,7 @@ void efm32_dmastop(DMA_HANDLE handle); * ************************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void efm32_dmasample(DMA_HANDLE handle, struct efm32_dmaregs_s *regs); #else # define efm32_dmasample(handle,regs) @@ -299,7 +299,7 @@ void efm32_dmasample(DMA_HANDLE handle, struct efm32_dmaregs_s *regs); * ************************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void efm32_dmadump(DMA_HANDLE handle, const struct efm32_dmaregs_s *regs, const char *msg); #else diff --git a/arch/arm/src/efm32/efm32_flash.c b/arch/arm/src/efm32/efm32_flash.c index a35422b73da9786785ef5b7f692b386b5a4f1031..1353bbbdb12f2cccec47425947f324cf1eb913c2 100644 --- a/arch/arm/src/efm32/efm32_flash.c +++ b/arch/arm/src/efm32/efm32_flash.c @@ -845,7 +845,7 @@ ssize_t __ramfunc__ up_progmem_write(size_t addr, const void *buf, size_t size) bitband_set_peripheral(EFM32_MSC_WRITECTRL, _MSC_WRITECTRL_WREN_SHIFT, 0); -#if (defined(CONFIG_EFM32_EFM32GG) || defined(CONFIG_EFM32_EFM32WG)) && (2==WORDS_PER_DATA_PHASE) +#if (defined(CONFIG_EFM32_EFM32GG) || defined(CONFIG_EFM32_EFM32WG)) /* Turn off double word write cycle support. */ diff --git a/arch/arm/src/efm32/efm32_gpio.c b/arch/arm/src/efm32/efm32_gpio.c index 77bc980481dd95c755d85472b73cf584915a8715..7ffc58cf3445f37d7522b8fffc1cec6129eb54eb 100644 --- a/arch/arm/src/efm32/efm32_gpio.c +++ b/arch/arm/src/efm32/efm32_gpio.c @@ -390,7 +390,7 @@ bool efm32_gpioread(gpio_pinset_t pinset) * ************************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO int efm32_dumpgpio(uint32_t pinset, const char *msg) { #warning Missing logic diff --git a/arch/arm/src/efm32/efm32_gpio.h b/arch/arm/src/efm32/efm32_gpio.h index ed54bb5148c80f63ad81b579f1f91840e3933eac..7dc6624975e97b9260f446f6f50b2d7bd8ab7941 100644 --- a/arch/arm/src/efm32/efm32_gpio.h +++ b/arch/arm/src/efm32/efm32_gpio.h @@ -50,10 +50,6 @@ ************************************************************************************/ /* Configuration ********************************************************************/ -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_GPIO -#endif - #define EFM32_NGPIO 5 /* (5) GPIOA-F */ /* Bit-encoded input to efm32_configgpio() *******************************************/ @@ -350,7 +346,7 @@ void efm32_gpioirqclear(int irq); * ************************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO int efm32_dumpgpio(uint32_t pinset, const char *msg); #else # define efm32_dumpgpio(p,m) diff --git a/arch/arm/src/efm32/efm32_i2c.c b/arch/arm/src/efm32/efm32_i2c.c index 3f4638390e6b5871642d944b870a58353fe9680f..d05f9ae22a6ec6fc9446623a048559b540f1f8f3 100644 --- a/arch/arm/src/efm32/efm32_i2c.c +++ b/arch/arm/src/efm32/efm32_i2c.c @@ -134,16 +134,6 @@ /* Debug ****************************************************************************/ -/* CONFIG_DEBUG_I2C + CONFIG_DEBUG enables general I2C debug output. */ - -#ifdef CONFIG_DEBUG_I2C -# define i2cdbg dbg -# define i2cvdbg vdbg -#else -# define i2cdbg(x...) -# define i2cvdbg(x...) -#endif - /* I2C event trace logic. NOTE: trace uses the internal, non-standard, * low-level debug interface syslog() but does not require that any other debug * is enabled. @@ -605,7 +595,7 @@ static inline int efm32_i2c_sem_waitdone(FAR struct efm32_i2c_priv_s *priv) while (priv->result == I2CRESULT_INPROGRESS); - i2cvdbg("result: %s elapsed: %d threshold: %d i2c_state %s " + i2cinfo("result: %s elapsed: %d threshold: %d i2c_state %s " "I2Cx_STATES: %08x I2Cx_IF: %08x\n", efm32_i2c_result_str(priv->result), elapsed, timeout, efm32_i2c_state_str(priv->i2c_state), priv->i2c_reg_state, @@ -652,7 +642,7 @@ static inline int efm32_i2c_sem_waitdone(FAR struct efm32_i2c_priv_s *priv) while ((priv->result == I2CRESULT_INPROGRESS) && elapsed < timeout); - i2cvdbg("result: %s elapsed: %d threshold: %d i2c_state %s " + i2cinfo("result: %s elapsed: %d threshold: %d i2c_state %s " "I2Cx_STATES: %08x I2Cx_IF: %08x\n", efm32_i2c_result_str(priv->result), elapsed, timeout, efm32_i2c_state_str(priv->i2c_state), priv->i2c_reg_state, @@ -761,7 +751,7 @@ static void efm32_i2c_tracenew(FAR struct efm32_i2c_priv_s *priv) if (priv->tndx >= (CONFIG_I2C_NTRACE - 1)) { - i2cdbg("Trace table overflow\n"); + i2cerr("ERROR: Trace table overflow\n"); return; } @@ -1536,9 +1526,9 @@ static int efm32_i2c_transfer(FAR struct i2c_master_s *dev, { ret = -ETIMEDOUT; - i2cdbg("Timed out: I2Cx_STATE: 0x%04x I2Cx_STATUS: 0x%08x\n", - efm32_i2c_getreg(priv, EFM32_I2C_STATE_OFFSET), - efm32_i2c_getreg(priv, EFM32_I2C_STATUS_OFFSET)); + i2cerr("ERROR: Timed out: I2Cx_STATE: 0x%04x I2Cx_STATUS: 0x%08x\n", + efm32_i2c_getreg(priv, EFM32_I2C_STATE_OFFSET), + efm32_i2c_getreg(priv, EFM32_I2C_STATUS_OFFSET)); /* Abort */ diff --git a/arch/arm/src/efm32/efm32_idle.c b/arch/arm/src/efm32/efm32_idle.c index 62d4e6315ba8021e99b4390648d63b2dce98d3b6..9a6d9f7e155142fa1a099ec3627a862514c377cf 100644 --- a/arch/arm/src/efm32/efm32_idle.c +++ b/arch/arm/src/efm32/efm32_idle.c @@ -110,7 +110,7 @@ static void up_idlepm(void) /* Perform board-specific, state-dependent logic here */ - llvdbg("newstate= %d oldstate=%d\n", newstate, oldstate); + _info("newstate= %d oldstate=%d\n", newstate, oldstate); /* Then force the global state change */ diff --git a/arch/arm/src/efm32/efm32_irq.c b/arch/arm/src/efm32/efm32_irq.c index 821d5cdc76d469b0538df013ede64f8509ddecff..63fa4b18ec7bc2e873cfeb0a8a91215691797480 100644 --- a/arch/arm/src/efm32/efm32_irq.c +++ b/arch/arm/src/efm32/efm32_irq.c @@ -109,44 +109,46 @@ extern uint32_t _vectors[]; * ****************************************************************************/ -#if defined(CONFIG_DEBUG_IRQ) +#if defined(CONFIG_DEBUG_IRQ_INFO) static void efm32_dumpnvic(const char *msg, int irq) { irqstate_t flags; flags = enter_critical_section(); - lldbg("NVIC (%s, irq=%d):\n", msg, irq); - lldbg(" INTCTRL: %08x VECTAB: %08x\n", - getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB)); - lldbg(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n", - getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA), - getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE)); - lldbg(" IRQ ENABLE: %08x %08x %08x\n", - getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE), - getreg32(NVIC_IRQ64_95_ENABLE)); - lldbg(" SYSH_PRIO: %08x %08x %08x\n", - getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY), - getreg32(NVIC_SYSH12_15_PRIORITY)); - lldbg(" IRQ PRIO: %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY), - getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY)); - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY), - getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY)); + + irqinfo("NVIC (%s, irq=%d):\n", msg, irq); + irqinfo(" INTCTRL: %08x VECTAB: %08x\n", + getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB)); + irqinfo(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n", + getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA), + getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE)); + irqinfo(" IRQ ENABLE: %08x %08x %08x\n", + getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE), + getreg32(NVIC_IRQ64_95_ENABLE)); + irqinfo(" SYSH_PRIO: %08x %08x %08x\n", + getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY), + getreg32(NVIC_SYSH12_15_PRIORITY)); + irqinfo(" IRQ PRIO: %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY), + getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY), + getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY)); #if NR_VECTORS >= (EFM32_IRQ_INTERRUPTS + 32) - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY), - getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY), + getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY)); #if NR_VECTORS >= (EFM32_IRQ_INTERRUPTS + 48) - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ48_51_PRIORITY), getreg32(NVIC_IRQ52_55_PRIORITY), - getreg32(NVIC_IRQ56_59_PRIORITY), getreg32(NVIC_IRQ60_63_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ48_51_PRIORITY), getreg32(NVIC_IRQ52_55_PRIORITY), + getreg32(NVIC_IRQ56_59_PRIORITY), getreg32(NVIC_IRQ60_63_PRIORITY)); #if NR_VECTORS >= (EFM32_IRQ_INTERRUPTS + 64) - lldbg(" %08x\n", - getreg32(NVIC_IRQ64_67_PRIORITY)); + irqinfo(" %08x\n", + getreg32(NVIC_IRQ64_67_PRIORITY)); #endif #endif #endif + leave_critical_section(flags); } #else @@ -164,11 +166,11 @@ static void efm32_dumpnvic(const char *msg, int irq) * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES static int efm32_nmi(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! NMI received\n"); + _err("PANIC!!! NMI received\n"); PANIC(); return 0; } @@ -176,7 +178,7 @@ static int efm32_nmi(int irq, FAR void *context) static int efm32_busfault(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS)); + _err("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS)); PANIC(); return 0; } @@ -184,7 +186,7 @@ static int efm32_busfault(int irq, FAR void *context) static int efm32_usagefault(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS)); + _err("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS)); PANIC(); return 0; } @@ -192,7 +194,7 @@ static int efm32_usagefault(int irq, FAR void *context) static int efm32_pendsv(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! PendSV received\n"); + _err("PANIC!!! PendSV received\n"); PANIC(); return 0; } @@ -200,7 +202,7 @@ static int efm32_pendsv(int irq, FAR void *context) static int efm32_dbgmonitor(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Debug Monitor received\n"); + _err("PANIC!!! Debug Monitor received\n"); PANIC(); return 0; } @@ -208,7 +210,7 @@ static int efm32_dbgmonitor(int irq, FAR void *context) static int efm32_reserved(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Reserved interrupt\n"); + _err("PANIC!!! Reserved interrupt\n"); PANIC(); return 0; } @@ -448,7 +450,7 @@ void up_irqinitialize(void) /* Attach all other processor exceptions (except reset and sys tick) */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES irq_attach(EFM32_IRQ_NMI, efm32_nmi); #ifndef CONFIG_ARM_MPU irq_attach(EFM32_IRQ_MEMFAULT, up_memfault); diff --git a/arch/arm/src/efm32/efm32_leserial.c b/arch/arm/src/efm32/efm32_leserial.c index e57af783531a4c39980ec868be90b3534fed7043..8a5de9378880d1ccffa5f89d037a6b1165536a9f 100644 --- a/arch/arm/src/efm32/efm32_leserial.c +++ b/arch/arm/src/efm32/efm32_leserial.c @@ -119,7 +119,7 @@ #define EFM32_TXERR_INTS (LEUART_IEN_TXOF) #define EFM32_RXERR_INTS (LEUART_IEN_RXOF | LEUART_IEN_PERR | \ LEUART_IEN_FERR) -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES # define EFM32_TX_INTS (LEUART_IEN_TXBL | EFM32_TXERR_INTS) # define EFM32_RX_INTS (LEUART_IEN_RXDATAV | EFM32_RXERR_INTS) #else @@ -506,7 +506,7 @@ static int efm32_interrupt(struct uart_dev_s *dev) uart_xmitchars(dev); } -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Check for receive errors */ if ((intflags & EFM32_RXERR_INTS) != 0) @@ -518,7 +518,7 @@ static int efm32_interrupt(struct uart_dev_s *dev) * FERR - Framing Error Interrupt Enable */ - lldbg("RX ERROR: %08x\n", intflags); + _err("RX ERROR: %08x\n", intflags); } /* Check for transmit errors */ @@ -527,7 +527,7 @@ static int efm32_interrupt(struct uart_dev_s *dev) { /* TXOF - TX Overflow Interrupt Enable */ - lldbg("RX ERROR: %08x\n", intflags); + _err("RX ERROR: %08x\n", intflags); } #endif diff --git a/arch/arm/src/efm32/efm32_pwm.c b/arch/arm/src/efm32/efm32_pwm.c index 04941d44344cae714da23e60e40ac909b4ec1937..b34d8aeb2ff9b1bd8ff5658898c25e49604252c2 100644 --- a/arch/arm/src/efm32/efm32_pwm.c +++ b/arch/arm/src/efm32/efm32_pwm.c @@ -75,29 +75,10 @@ /* The following definitions are used to identify the various time types */ /* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing PWM */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_PWM -#endif - -#ifdef CONFIG_DEBUG_PWM -# define pwmdbg dbg -# define pwmlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define pwmvdbg vdbg -# define pwmllvdbg llvdbg -# define pwm_dumpgpio(p,m) efm32_dumpgpio(p,m) -# else -# define pwmlldbg(x...) -# define pwmllvdbg(x...) -# define pwm_dumpgpio(p,m) -# endif + +#ifdef CONFIG_DEBUG_PWM_INFO +# define pwm_dumpgpio(p,m) efm32_dumpgpio(p,m) #else -# define pwmdbg(x...) -# define pwmlldbg(x...) -# define pwmvdbg(x...) -# define pwmllvdbg(x...) # define pwm_dumpgpio(p,m) #endif @@ -136,7 +117,7 @@ static uint32_t pwm_getreg(struct efm32_pwmtimer_s *priv, int offset); static void pwm_putreg(struct efm32_pwmtimer_s *priv, int offset, uint32_t value); -#if defined(CONFIG_DEBUG_PWM) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_PWM_INFO static void pwm_dumpregs(struct efm32_pwmtimer_s *priv, FAR const char *msg); #else # define pwm_dumpregs(priv,msg) @@ -323,29 +304,29 @@ static void pwm_putreg(struct efm32_pwmtimer_s *priv, int offset, uint32_t value * ****************************************************************************/ -#if defined(CONFIG_DEBUG_PWM) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_PWM_INFO static void pwm_dumpregs(struct efm32_pwmtimer_s *priv, FAR const char *msg) { /* TODO debug pwm_dumpregs */ #if 0 - pwmvdbg("%s:\n", msg); - pwmvdbg(" CR1: %04x CR2: %04x SMCR: %04x DIER: %04x\n", + pwminfo("%s:\n", msg); + pwminfo(" CR1: %04x CR2: %04x SMCR: %04x DIER: %04x\n", pwm_getreg(priv, STM32_GTIM_CR1_OFFSET), pwm_getreg(priv, STM32_GTIM_CR2_OFFSET), pwm_getreg(priv, STM32_GTIM_SMCR_OFFSET), pwm_getreg(priv, STM32_GTIM_DIER_OFFSET)); - pwmvdbg(" SR: %04x EGR: %04x CCMR1: %04x CCMR2: %04x\n", + pwminfo(" SR: %04x EGR: %04x CCMR1: %04x CCMR2: %04x\n", pwm_getreg(priv, STM32_GTIM_SR_OFFSET), pwm_getreg(priv, STM32_GTIM_EGR_OFFSET), pwm_getreg(priv, STM32_GTIM_CCMR1_OFFSET), pwm_getreg(priv, STM32_GTIM_CCMR2_OFFSET)); - pwmvdbg(" CCER: %04x CNT: %04x PSC: %04x ARR: %04x\n", + pwminfo(" CCER: %04x CNT: %04x PSC: %04x ARR: %04x\n", pwm_getreg(priv, STM32_GTIM_CCER_OFFSET), pwm_getreg(priv, STM32_GTIM_CNT_OFFSET), pwm_getreg(priv, STM32_GTIM_PSC_OFFSET), pwm_getreg(priv, STM32_GTIM_ARR_OFFSET)); - pwmvdbg(" CCR1: %04x CCR2: %04x CCR3: %04x CCR4: %04x\n", + pwminfo(" CCR1: %04x CCR2: %04x CCR3: %04x CCR4: %04x\n", pwm_getreg(priv, STM32_GTIM_CCR1_OFFSET), pwm_getreg(priv, STM32_GTIM_CCR2_OFFSET), pwm_getreg(priv, STM32_GTIM_CCR3_OFFSET), @@ -353,7 +334,7 @@ static void pwm_dumpregs(struct efm32_pwmtimer_s *priv, FAR const char *msg) #if defined(CONFIG_STM32_TIM1_PWM) || defined(CONFIG_STM32_TIM8_PWM) if (priv->timtype == TIMTYPE_ADVANCED) { - pwmvdbg(" RCR: %04x BDTR: %04x DCR: %04x DMAR: %04x\n", + pwminfo(" RCR: %04x BDTR: %04x DCR: %04x DMAR: %04x\n", pwm_getreg(priv, STM32_ATIM_RCR_OFFSET), pwm_getreg(priv, STM32_ATIM_BDTR_OFFSET), pwm_getreg(priv, STM32_ATIM_DCR_OFFSET), @@ -362,7 +343,7 @@ static void pwm_dumpregs(struct efm32_pwmtimer_s *priv, FAR const char *msg) else #endif { - pwmvdbg(" DCR: %04x DMAR: %04x\n", + pwminfo(" DCR: %04x DMAR: %04x\n", pwm_getreg(priv, STM32_GTIM_DCR_OFFSET), pwm_getreg(priv, STM32_GTIM_DMAR_OFFSET)); } @@ -396,11 +377,11 @@ static int pwm_timer(FAR struct efm32_pwmtimer_s *priv, DEBUGASSERT(priv != NULL && info != NULL); #ifdef CONFIG_PWM_PULSECOUNT - pwmvdbg("TIMER%d channel: %d frequency: %d duty: %08x count: %d\n", + pwminfo("TIMER%d channel: %d frequency: %d duty: %08x count: %d\n", priv->timid, priv->channel, info->frequency, info->duty, info->count); #else - pwmvdbg("TIMER%d channel: %d frequency: %d duty: %08x\n", + pwminfo("TIMER%d channel: %d frequency: %d duty: %08x\n", priv->timid, priv->channel, info->frequency, info->duty); #endif DEBUGASSERT(info->frequency > 0 && info->duty >= 0 && @@ -414,7 +395,7 @@ static int pwm_timer(FAR struct efm32_pwmtimer_s *priv, if (efm32_timer_set_freq(priv->base, priv->pclk, info->frequency) < 0) { - pwmdbg("Cannot set TIMER frequency %dHz from clock %dHz\n", + pwmerr("ERROR: Cannot set TIMER frequency %dHz from clock %dHz\n", info->frequency, priv->pclk); return -EINVAL; } @@ -541,8 +522,8 @@ static int pwm_interrupt(struct efm32_pwmtimer_s *priv) /* Now all of the time critical stuff is done so we can do some debug output */ - pwmllvdbg("Update interrupt SR: %04x prev: %d curr: %d count: %d\n", - regval, priv->prev, priv->curr, priv->count); + pwminfo("Update interrupt SR: %04x prev: %d curr: %d count: %d\n", + regval, priv->prev, priv->curr, priv->count); return OK; #else @@ -669,7 +650,7 @@ static int pwm_setup(FAR struct pwm_lowerhalf_s *dev) { FAR struct efm32_pwmtimer_s *priv = (FAR struct efm32_pwmtimer_s *)dev; - pwmvdbg("TIMER%d pincfg: %08x\n", priv->timid, priv->pincfg); + pwminfo("TIMER%d pincfg: %08x\n", priv->timid, priv->pincfg); pwm_dumpregs(priv, "Initially"); /* Configure the PWM output pin, but do not start the timer yet */ @@ -726,7 +707,7 @@ static int pwm_shutdown(FAR struct pwm_lowerhalf_s *dev) FAR struct efm32_pwmtimer_s *priv = (FAR struct efm32_pwmtimer_s *)dev; uint32_t pincfg; - pwmvdbg("TIMER%d pincfg: %08x\n", priv->timid, priv->pincfg); + pwminfo("TIMER%d pincfg: %08x\n", priv->timid, priv->pincfg); /* Make sure that the output has been stopped */ @@ -805,7 +786,7 @@ static int pwm_stop(FAR struct pwm_lowerhalf_s *dev) FAR struct efm32_pwmtimer_s *priv = (FAR struct efm32_pwmtimer_s *)dev; irqstate_t flags; - pwmvdbg("TIMER%d\n", priv->timid); + pwminfo("TIMER%d\n", priv->timid); /* Disable interrupts momentary to stop any ongoing timer processing and * to prevent any concurrent access to the reset register. @@ -843,12 +824,12 @@ static int pwm_stop(FAR struct pwm_lowerhalf_s *dev) static int pwm_ioctl(FAR struct pwm_lowerhalf_s *dev, int cmd, unsigned long arg) { -#ifdef CONFIG_DEBUG_PWM +#ifdef CONFIG_DEBUG_PWM_INFO FAR struct efm32_pwmtimer_s *priv = (FAR struct efm32_pwmtimer_s *)dev; /* There are no platform-specific ioctl commands */ - pwmvdbg("TIMER%d\n", priv->timid); + pwminfo("TIMER%d\n", priv->timid); #endif return -ENOTTY; } @@ -878,7 +859,7 @@ FAR struct pwm_lowerhalf_s *efm32_pwminitialize(int timer) { FAR struct efm32_pwmtimer_s *lower; - pwmvdbg("TIMER%d\n", timer); + pwminfo("TIMER%d\n", timer); switch (timer) { @@ -933,7 +914,7 @@ FAR struct pwm_lowerhalf_s *efm32_pwminitialize(int timer) #endif default: - pwmdbg("No such timer configured\n"); + pwmerr("ERROR: No such timer configured\n"); return NULL; } diff --git a/arch/arm/src/efm32/efm32_rmu.c b/arch/arm/src/efm32/efm32_rmu.c index 6b77564b24d73e5ff3805a804e75bf11bb06edbd..57d7b0e02b76d82a03a67010b6d0da4a6f98163b 100644 --- a/arch/arm/src/efm32/efm32_rmu.c +++ b/arch/arm/src/efm32/efm32_rmu.c @@ -63,7 +63,7 @@ * Private Types ************************************************************************************/ -#ifdef CONFIG_EFM32_RMU_DEBUG +#if defined(CONFIG_EFM32_RMU_DEBUG) && defined(CONFIG_DEBUG_WARN) typedef struct { const uint32_t val; @@ -76,7 +76,7 @@ typedef struct * Private Data ************************************************************************************/ -#ifdef CONFIG_EFM32_RMU_DEBUG +#if defined(CONFIG_EFM32_RMU_DEBUG) && defined(CONFIG_DEBUG_WARN) static efm32_reset_cause_list_t efm32_reset_cause_list[] = { { @@ -191,7 +191,7 @@ uint32_t g_efm32_rstcause; * ************************************************************************************/ -#ifdef CONFIG_EFM32_RMU_DEBUG +#if defined(CONFIG_EFM32_RMU_DEBUG) && defined(CONFIG_DEBUG_WARN) const char *efm32_reset_cause_list_str(uint32_t reg, unsigned int *idx) { int len = sizeof(efm32_reset_cause_list)/sizeof(efm32_reset_cause_list[0]); @@ -261,8 +261,8 @@ void efm32_rmu_initialize(void) putreg32(EMU_LOCK_LOCKKEY_LOCK, EMU_LOCK_LOCKKEY_LOCK); } -#ifdef CONFIG_EFM32_RMU_DEBUG - rmudbg("RMU => reg = 0x%08X\n", g_efm32_rstcause); +#if defined(CONFIG_EFM32_RMU_DEBUG) && defined(CONFIG_DEBUG_WARN) + rmuwarn("RMU => reg = 0x%08X\n", g_efm32_rstcause); for (; ; ) { const char *str; @@ -273,7 +273,7 @@ void efm32_rmu_initialize(void) break; } - rmudbg("RMU => %s\n", str); + rmuwarn("RMU => %s\n", str); } #endif } diff --git a/arch/arm/src/efm32/efm32_rmu.h b/arch/arm/src/efm32/efm32_rmu.h index 0aae6fbb0d97b34543af55153e1831a3a72ea1c4..1bcfec2d33f0952fbd1bc9753dcc1aec951dcda1 100644 --- a/arch/arm/src/efm32/efm32_rmu.h +++ b/arch/arm/src/efm32/efm32_rmu.h @@ -50,21 +50,18 @@ ****************************************************************************/ /* Configuration ************************************************************/ -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE +#ifndef CONFIG_DEBUG_ERROR # undef CONFIG_EFM32_RMU_DEBUG #endif #ifdef CONFIG_EFM32_RMU_DEBUG -# define rmudbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define rmuvdbg lldbg -# else -# define rmuvdbg(x...) -# endif +# define rmuerr _err +# define rmuwarn _warn +# define rmuinfo _info #else -# define rmudbg(x...) -# define rmuvdbg(x...) +# define rmuerr(x...) +# define rmuwarn(x...) +# define rmuinfo(x...) #endif /**************************************************************************** diff --git a/arch/arm/src/efm32/efm32_rtc_burtc.c b/arch/arm/src/efm32/efm32_rtc_burtc.c index 914ebd03ff3b226f7ac48575f32d17596dcdbb71..52c8811ae50b1dd0ac3a07015339380e4d1a8f26 100644 --- a/arch/arm/src/efm32/efm32_rtc_burtc.c +++ b/arch/arm/src/efm32/efm32_rtc_burtc.c @@ -130,16 +130,6 @@ #define __CNT_CARRY_REG EFM32_BURTC_RET_REG(0) #define __CNT_ZERO_REG EFM32_BURTC_RET_REG(1) -#if defined CONFIG_DEBUG && defined CONFIG_RTC_DEBUG -# define burtcdbg lldbg -#else -# define burtcdbg(x...) -#endif - -/************************************************************************************ - * Private Types - ************************************************************************************/ - /************************************************************************************ * Private Data ************************************************************************************/ @@ -191,7 +181,7 @@ static int efm32_rtc_burtc_interrupt(int irq, void *context) if (source & BURTC_IF_LFXOFAIL) { - burtcdbg("BURTC_IF_LFXOFAIL"); + rtcerr("ERROR: BURTC_IF_LFXOFAIL"); } #ifdef CONFIG_RTC_HIRES @@ -245,7 +235,7 @@ static void efm32_rtc_burtc_init(void) regval = g_efm32_rstcause; regval2 = getreg32(EFM32_BURTC_CTRL); - burtcdbg("BURTC RESETCAUSE=0x%08X BURTC_CTRL=0x%08X\n", regval, regval2); + rtcinfo("BURTC RESETCAUSE=0x%08X BURTC_CTRL=0x%08X\n", regval, regval2); if (!(regval2 & BURTC_CTRL_RSTEN) && !(regval & RMU_RSTCAUSE_BUBODREG) && @@ -262,11 +252,11 @@ static void efm32_rtc_burtc_init(void) /* restore saved base time */ - burtcdbg("BURTC OK\n"); + rtcinfo("BURTC OK\n"); return; } - burtcdbg("BURTC RESETED\n"); + rtcinfo("BURTC RESET\n"); /* Disable reset of BackupDomain */ @@ -358,7 +348,7 @@ static uint64_t efm32_get_burtc_tick(void) val = (uint64_t)cnt_carry*__CNT_TOP + cnt + cnt_zero; - burtcdbg("Get Tick carry %u zero %u reg %u\n", cnt_carry, cnt_carry,cnt); + rtcinfo("Get Tick carry %u zero %u reg %u\n", cnt_carry, cnt_carry,cnt); return val; } @@ -449,7 +439,7 @@ int up_rtc_gettime(FAR struct timespec *tp) tp->tv_sec = val / CONFIG_RTC_FREQUENCY; tp->tv_nsec = (val % CONFIG_RTC_FREQUENCY)*(NSEC_PER_SEC/CONFIG_RTC_FREQUENCY); - burtcdbg("Get RTC %u.%09u\n", tp->tv_sec, tp->tv_nsec); + rtcinfo("Get RTC %u.%09u\n", tp->tv_sec, tp->tv_nsec); return OK; } @@ -499,7 +489,7 @@ int up_rtc_settime(FAR const struct timespec *tp) cnt_carry = val / __CNT_TOP; cnt = val % __CNT_TOP; - burtcdbg("Set RTC %u.%09u carry %u zero %u reg %u\n", + rtcinfo("Set RTC %u.%09u carry %u zero %u reg %u\n", tp->tv_sec, tp->tv_nsec, cnt_carry, cnt, cnt_reg); putreg32(cnt_carry, __CNT_CARRY_REG); diff --git a/arch/arm/src/efm32/efm32_serial.c b/arch/arm/src/efm32/efm32_serial.c index fed33adcba28fc10f17177ba5fb58b8ecd775f47..52848fcd03d67af9589a519370860a9f4ed18dda 100644 --- a/arch/arm/src/efm32/efm32_serial.c +++ b/arch/arm/src/efm32/efm32_serial.c @@ -205,7 +205,7 @@ #define EFM32_TXERR_INTS (USART_IEN_TXOF) #define EFM32_RXERR_INTS (USART_IEN_RXOF | USART_IEN_RXUF | \ USART_IEN_PERR | USART_IEN_FERR) -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES # define EFM32_TX_INTS (USART_IEN_TXBL | EFM32_TXERR_INTS) # define EFM32_RX_INTS (USART_IEN_RXDATAV | EFM32_RXERR_INTS) #else @@ -768,7 +768,7 @@ static int efm32_rxinterrupt(struct uart_dev_s *dev) uart_recvchars(dev); } -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Check for receive errors */ if ((intflags & EFM32_RXERR_INTS) != 0) @@ -780,7 +780,7 @@ static int efm32_rxinterrupt(struct uart_dev_s *dev) * FERR - Framing Error Interrupt Enable */ - lldbg("RX ERROR: %08x\n", intflags); + _err("RX ERROR: %08x\n", intflags); } #endif @@ -856,14 +856,14 @@ static int efm32_txinterrupt(struct uart_dev_s *dev) uart_xmitchars(dev); } -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Check for transmit errors */ if ((intflags & EFM32_TXERR_INTS) != 0) { /* TXOF - TX Overflow Interrupt Enable */ - lldbg("RX ERROR: %08x\n", intflags); + _err("RX ERROR: %08x\n", intflags); } #endif diff --git a/arch/arm/src/efm32/efm32_spi.c b/arch/arm/src/efm32/efm32_spi.c index 05c0ab7c5197bf77625fd22f03f0889d8f70c4c2..c4dbb3b282d9cf926688eae0b9d0a30e8946095b 100644 --- a/arch/arm/src/efm32/efm32_spi.c +++ b/arch/arm/src/efm32/efm32_spi.c @@ -91,26 +91,6 @@ #define SPI_DMA16_CONFIG (EFM32_DMA_XFERSIZE_HWORD | EFM32_DMA_MEMINCR) #define SPI_DMA16NULL_CONFIG (EFM32_DMA_XFERSIZE_HWORD | EFM32_DMA_NOINCR) -/* Debug ********************************************************************/ -/* Check if SPI debug is enabled */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_SPI -#endif - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - /**************************************************************************** * Private Types ****************************************************************************/ @@ -897,7 +877,7 @@ static uint32_t spi_setfrequency(struct spi_dev_s *dev, uint32_t frequency) */ actual = (BOARD_HFPERCLK_FREQUENCY << 7) / (256 + clkdiv); - spivdbg("frequency=%u actual=%u\n", frequency, actual); + spiinfo("frequency=%u actual=%u\n", frequency, actual); /* Save the frequency selection so that subsequent reconfigurations * will be faster. @@ -932,7 +912,7 @@ static void spi_setmode(struct spi_dev_s *dev, enum spi_mode_e mode) uint32_t setting; uint32_t regval; - spivdbg("mode=%d\n", mode); + spiinfo("mode=%d\n", mode); DEBUGASSERT(priv && priv->config); config = priv->config; @@ -998,7 +978,7 @@ static void spi_setbits(struct spi_dev_s *dev, int nbits) uint32_t setting; bool lsbfirst; - spivdbg("nbits=%d\n", nbits); + spiinfo("nbits=%d\n", nbits); DEBUGASSERT(priv && priv->config); config = priv->config; @@ -1222,7 +1202,7 @@ static uint16_t spi_send(struct spi_dev_s *dev, uint16_t wd) spi_wait_status(config, _USART_STATUS_RXDATAV_MASK, USART_STATUS_RXDATAV); ret = (uint16_t)spi_getreg(config, EFM32_USART_RXDATA_OFFSET); - spivdbg("Sent: %04x Return: %04x \n", wd, ret); + spiinfo("Sent: %04x Return: %04x \n", wd, ret); return ret; } @@ -1263,7 +1243,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, DEBUGASSERT(priv && priv->config); config = priv->config; - spivdbg("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); + spiinfo("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); /* Flush any unread data */ @@ -1427,7 +1407,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, else #endif { - spivdbg("txbuffer=%p rxbuffer=%p nwords=%d\n", + spiinfo("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); /* Pre-calculate the timeout value */ @@ -1456,7 +1436,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, ret = wd_start(priv->wdog, (int)ticks, spi_dma_timeout, 1, (uint32_t)priv); if (ret < 0) { - spidbg("ERROR: Failed to start timeout\n"); + spierr("ERROR: Failed to start timeout\n"); } /* Then wait for each to complete. TX should complete first */ @@ -1492,7 +1472,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, static void spi_sndblock(struct spi_dev_s *dev, const void *txbuffer, size_t nwords) { - spivdbg("txbuffer=%p nwords=%d\n", txbuffer, nwords); + spiinfo("txbuffer=%p nwords=%d\n", txbuffer, nwords); return spi_exchange(dev, txbuffer, NULL, nwords); } #endif @@ -1521,7 +1501,7 @@ static void spi_sndblock(struct spi_dev_s *dev, const void *txbuffer, static void spi_recvblock(struct spi_dev_s *dev, void *rxbuffer, size_t nwords) { - spivdbg("rxbuffer=%p nwords=%d\n", rxbuffer, nwords); + spiinfo("rxbuffer=%p nwords=%d\n", rxbuffer, nwords); return spi_exchange(dev, NULL, rxbuffer, nwords); } #endif @@ -1594,7 +1574,7 @@ static int spi_portinitialize(struct efm32_spidev_s *priv) priv->rxdmach = efm32_dmachannel(); if (!priv->rxdmach) { - spidbg("ERROR: Failed to allocate the RX DMA channel for SPI port: %d\n", + spierr("ERROR: Failed to allocate the RX DMA channel for SPI port: %d\n", port); goto errout; } @@ -1602,7 +1582,7 @@ static int spi_portinitialize(struct efm32_spidev_s *priv) priv->txdmach = efm32_dmachannel(); if (!priv->txdmach) { - spidbg("ERROR: Failed to allocate the TX DMA channel for SPI port: %d\n", + spierr("ERROR: Failed to allocate the TX DMA channel for SPI port: %d\n", port); goto errout_with_rxdmach; } @@ -1612,7 +1592,7 @@ static int spi_portinitialize(struct efm32_spidev_s *priv) priv->wdog = wd_create(); if (!priv->wdog) { - spidbg("ERROR: Failed to create a timer for SPI port: %d\n", port); + spierr("ERROR: Failed to create a timer for SPI port: %d\n", port); goto errout_with_txdmach; } @@ -1709,7 +1689,7 @@ struct spi_dev_s *efm32_spibus_initialize(int port) else #endif { - spidbg("ERROR: Unsupported SPI port: %d\n", port); + spierr("ERROR: Unsupported SPI port: %d\n", port); return NULL; } @@ -1731,7 +1711,7 @@ struct spi_dev_s *efm32_spibus_initialize(int port) ret = spi_portinitialize(priv); if (ret < 0) { - spidbg("ERROR: Failed to initialize SPI port %d\n", port); + spierr("ERROR: Failed to initialize SPI port %d\n", port); leave_critical_section(flags); return NULL; } diff --git a/arch/arm/src/efm32/efm32_start.c b/arch/arm/src/efm32/efm32_start.c index ec0171f2307b17cc93b29c239364aedf98435788..f62e1461d51e9476adf440eae9634365b4e9e90c 100644 --- a/arch/arm/src/efm32/efm32_start.c +++ b/arch/arm/src/efm32/efm32_start.c @@ -85,7 +85,7 @@ static void go_os_start(void *pv, unsigned int nbytes) * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES # if defined(CONFIG_ARMV7M_ITMSYSLOG) # define showprogress(c) (void)syslog_putc(c) # elif defined(HAVE_UART_CONSOLE) || defined(HAVE_LEUART_CONSOLE) diff --git a/arch/arm/src/efm32/efm32_timer.c b/arch/arm/src/efm32/efm32_timer.c index 19c50b56c20e7dd9de87526934eaf1344ded0de2..6264c3a378243369f4b713c9dae04b20982c787a 100644 --- a/arch/arm/src/efm32/efm32_timer.c +++ b/arch/arm/src/efm32/efm32_timer.c @@ -55,50 +55,18 @@ #include "efm32_config.h" #include "efm32_gpio.h" - /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ /* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing TIMER */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_TIMER -#endif -#ifdef CONFIG_DEBUG_TIMER -# define efm32_timerdbg dbg -# define efm32_timerlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define efm32_timervdbg vdbg -# define efm32_timerllvdbg llvdbg -# define efm32_timer_dumpgpio(p,m) efm32_dumpgpio(p,m) -# else -# define efm32_timerlldbg(x...) -# define efm32_timerllvdbg(x...) -# define efm32_timer_dumpgpio(p,m) -# endif +#ifdef CONFIG_DEBUG_TIMER_INFO +# define efm32_timer_dumpgpio(p,m) efm32_dumpgpio(p,m) #else -# define efm32_timerdbg(x...) -# define efm32_timerlldbg(x...) -# define efm32_timervdbg(x...) -# define efm32_timerllvdbg(x...) # define efm32_timer_dumpgpio(p,m) #endif -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Static Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -119,48 +87,43 @@ void efm32_timer_dumpregs(uintptr_t base, FAR const char *msg) { +#ifdef CONFIG_DEBUG_TIMER_INFO int i; - efm32_timervdbg("%s:\n", msg); - efm32_timervdbg(" CTRL: %04x STATUS: %04x IEN: %04x IF: %04x\n", - getreg32(base + EFM32_TIMER_CTRL_OFFSET ), - getreg32(base + EFM32_TIMER_STATUS_OFFSET ), - getreg32(base + EFM32_TIMER_IEN_OFFSET ), - getreg32(base + EFM32_TIMER_IF_OFFSET ) - ); - efm32_timervdbg(" TOP: %04x TOPB: %04x CNT: %04x ROUTE: %04x\n", - getreg32(base + EFM32_TIMER_TOP_OFFSET ), - getreg32(base + EFM32_TIMER_TOPB_OFFSET ), - getreg32(base + EFM32_TIMER_CNT_OFFSET ), - getreg32(base + EFM32_TIMER_ROUTE_OFFSET ) - ); + tmrinfo("%s:\n", msg); + tmrinfo(" CTRL: %04x STATUS: %04x IEN: %04x IF: %04x\n", + getreg32(base + EFM32_TIMER_CTRL_OFFSET ), + getreg32(base + EFM32_TIMER_STATUS_OFFSET ), + getreg32(base + EFM32_TIMER_IEN_OFFSET ), + getreg32(base + EFM32_TIMER_IF_OFFSET )); + tmrinfo(" TOP: %04x TOPB: %04x CNT: %04x ROUTE: %04x\n", + getreg32(base + EFM32_TIMER_TOP_OFFSET ), + getreg32(base + EFM32_TIMER_TOPB_OFFSET ), + getreg32(base + EFM32_TIMER_CNT_OFFSET ), + getreg32(base + EFM32_TIMER_ROUTE_OFFSET )); for (i = 0; i < EFM32_TIMER_NCC; i++) { -#if defined(CONFIG_DEBUG_TIMER) && defined(CONFIG_DEBUG_VERBOSE) uintptr_t base_cc = base + EFM32_TIMER_CC_OFFSET(i); -#endif - efm32_timervdbg("CC%d => CTRL: %04x CCV: %04x CCVP: %04x CCVB: %04x\n", - i - getreg32(base_cc + EFM32_TIMER_CC_CTRL_OFFSET ), - getreg32(base_cc + EFM32_TIMER_CC_CCV_OFFSET ), - getreg32(base_cc + EFM32_TIMER_CC_CCVP_OFFSET ), - getreg32(base_cc + EFM32_TIMER_CC_CCVB_OFFSET ) - ); + + tmrinfo("CC%d => CTRL: %04x CCV: %04x CCVP: %04x CCVB: %04x\n", + i + getreg32(base_cc + EFM32_TIMER_CC_CTRL_OFFSET ), + getreg32(base_cc + EFM32_TIMER_CC_CCV_OFFSET ), + getreg32(base_cc + EFM32_TIMER_CC_CCVP_OFFSET ), + getreg32(base_cc + EFM32_TIMER_CC_CCVB_OFFSET )); } - efm32_timervdbg("DTCTRL: %04x DTTIME: %04x DTFC: %04x DTOGEN: %04x\n", - getreg32(base + EFM32_TIMER_CTRL_OFFSET ), - getreg32(base + EFM32_TIMER_STATUS_OFFSET ), - getreg32(base + EFM32_TIMER_IEN_OFFSET ), - getreg32(base + EFM32_TIMER_IF_OFFSET ) - ); - efm32_timervdbg("DTFAULT: %04x DTFAULTC: %04x DTLOCK: %04x \n", - getreg32(base + EFM32_TIMER_CTRL_OFFSET ), - getreg32(base + EFM32_TIMER_STATUS_OFFSET ), - getreg32(base + EFM32_TIMER_IEN_OFFSET ), - getreg32(base + EFM32_TIMER_IF_OFFSET ) - ); + tmrinfo("DTCTRL: %04x DTTIME: %04x DTFC: %04x DTOGEN: %04x\n", + getreg32(base + EFM32_TIMER_CTRL_OFFSET ), + getreg32(base + EFM32_TIMER_STATUS_OFFSET ), + getreg32(base + EFM32_TIMER_IEN_OFFSET ), + getreg32(base + EFM32_TIMER_IF_OFFSET )); + tmrinfo("DTFAULT: %04x DTFAULTC: %04x DTLOCK: %04x \n", + getreg32(base + EFM32_TIMER_CTRL_OFFSET ), + getreg32(base + EFM32_TIMER_STATUS_OFFSET ), + getreg32(base + EFM32_TIMER_IEN_OFFSET ), +#endif } /**************************************************************************** @@ -238,6 +201,7 @@ void efm32_timer_reset(uintptr_t base) * prescaler setted, -1 in case of error. * ****************************************************************************/ + int efm32_timer_set_freq(uintptr_t base, uint32_t clk_freq, uint32_t freq) { int prescaler = 0; @@ -262,8 +226,7 @@ int efm32_timer_set_freq(uintptr_t base, uint32_t clk_freq, uint32_t freq) reload = (clk_freq / prescaler / freq); - efm32_timerdbg("Source: %4xHz Div: %4x Reload: %4x \n", - clk_freq, prescaler, reload); + tmrinfo("Source: %4xHz Div: %4x Reload: %4x \n", clk_freq, prescaler, reload); putreg32(reload, base + EFM32_TIMER_TOP_OFFSET); diff --git a/arch/arm/src/efm32/efm32_usbdev.c b/arch/arm/src/efm32/efm32_usbdev.c index fb20993657f4f926aa58d0d9f1cc6ee91a4dcd18..26753dd3ff4d64965a3cf95552148658e8c10c83 100644 --- a/arch/arm/src/efm32/efm32_usbdev.c +++ b/arch/arm/src/efm32/efm32_usbdev.c @@ -114,6 +114,10 @@ # error "FIFO allocations exceed FIFO memory size" #endif +#ifndef CONFIG_DEBUG_USB_INFO +# undef CONFIG_EFM32_USBDEV_REGDEBUG +#endif + /* The actual FIFO addresses that we use must be aligned to 4-byte boundaries; * FIFO sizes must be provided in units of 32-bit words. */ @@ -474,7 +478,7 @@ struct efm32_usbdev_s /* Register operations ********************************************************/ -#if defined(CONFIG_EFM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_EFM32_USBDEV_REGDEBUG static uint32_t efm32_getreg(uint32_t addr); static void efm32_putreg(uint32_t val, uint32_t addr); #else @@ -794,7 +798,7 @@ const struct trace_msg_t g_usb_trace_strings_intdecode[] = * ****************************************************************************/ -#if defined(CONFIG_EFM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_EFM32_USBDEV_REGDEBUG static uint32_t efm32_getreg(uint32_t addr) { static uint32_t prevaddr = 0; @@ -815,7 +819,7 @@ static uint32_t efm32_getreg(uint32_t addr) { if (count == 4) { - lldbg("...\n"); + uinfo("...\n"); } return val; @@ -832,7 +836,7 @@ static uint32_t efm32_getreg(uint32_t addr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + uinfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -844,7 +848,7 @@ static uint32_t efm32_getreg(uint32_t addr) /* Show the register value read */ - lldbg("%08x->%08x\n", addr, val); + uinfo("%08x->%08x\n", addr, val); return val; } #endif @@ -857,12 +861,12 @@ static uint32_t efm32_getreg(uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_EFM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_EFM32_USBDEV_REGDEBUG static void efm32_putreg(uint32_t val, uint32_t addr) { /* Show the register value being written */ - lldbg("%08x<-%08x\n", addr, val); + uinfo("%08x<-%08x\n", addr, val); /* Write the value */ @@ -1220,9 +1224,9 @@ static void efm32_epin_request(FAR struct efm32_usbdev_s *priv, return; } - ullvdbg("EP%d req=%p: len=%d xfrd=%d zlp=%d\n", - privep->epphy, privreq, privreq->req.len, - privreq->req.xfrd, privep->zlp); + uinfo("EP%d req=%p: len=%d xfrd=%d zlp=%d\n", + privep->epphy, privreq, privreq->req.len, + privreq->req.xfrd, privep->zlp); /* Check for a special case: If we are just starting a request (xfrd==0) and * the class driver is trying to send a zero-length packet (len==0). Then set @@ -1486,8 +1490,8 @@ static void efm32_epout_complete(FAR struct efm32_usbdev_s *priv, return; } - ullvdbg("EP%d: len=%d xfrd=%d\n", - privep->epphy, privreq->req.len, privreq->req.xfrd); + uinfo("EP%d: len=%d xfrd=%d\n", + privep->epphy, privreq->req.len, privreq->req.xfrd); /* Return the completed read request to the class driver and mark the state * IDLE. @@ -1521,7 +1525,7 @@ static inline void efm32_ep0out_receive(FAR struct efm32_ep_s *privep, int bcnt) DEBUGASSERT(privep && privep->ep.priv); priv = (FAR struct efm32_usbdev_s *)privep->ep.priv; - ullvdbg("EP0: bcnt=%d\n", bcnt); + uinfo("EP0: bcnt=%d\n", bcnt); usbtrace(TRACE_READ(EP0), bcnt); /* Verify that an OUT SETUP request as received before this data was @@ -1614,7 +1618,8 @@ static inline void efm32_epout_receive(FAR struct efm32_ep_s *privep, int bcnt) return; } - ullvdbg("EP%d: len=%d xfrd=%d\n", privep->epphy, privreq->req.len, privreq->req.xfrd); + uinfo("EP%d: len=%d xfrd=%d\n", + privep->epphy, privreq->req.len, privreq->req.xfrd); usbtrace(TRACE_READ(privep->epphy), bcnt); /* Get the number of bytes to transfer from the RxFIFO */ @@ -1698,7 +1703,7 @@ static void efm32_epout_request(FAR struct efm32_usbdev_s *priv, return; } - ullvdbg("EP%d: len=%d\n", privep->epphy, privreq->req.len); + uinfo("EP%d: len=%d\n", privep->epphy, privreq->req.len); /* Ignore any attempt to receive a zero length packet (this really * should not happen. @@ -2494,8 +2499,8 @@ static inline void efm32_ep0out_setup(struct efm32_usbdev_s *priv) ctrlreq.index = GETUINT16(priv->ctrlreq.index); ctrlreq.len = GETUINT16(priv->ctrlreq.len); - ullvdbg("type=%02x req=%02x value=%04x index=%04x len=%04x\n", - ctrlreq.type, ctrlreq.req, ctrlreq.value, ctrlreq.index, ctrlreq.len); + uinfo("type=%02x req=%02x value=%04x index=%04x len=%04x\n", + ctrlreq.type, ctrlreq.req, ctrlreq.value, ctrlreq.index, ctrlreq.len); /* Check for a standard request */ @@ -2629,7 +2634,7 @@ static inline void efm32_epout_interrupt(FAR struct efm32_usbdev_s *priv) if ((daint & 1) != 0) { regval = efm32_getreg(EFM32_USB_DOEPINT(epno)); - ulldbg("DOEPINT(%d) = %08x\n", epno, regval); + uinfo("DOEPINT(%d) = %08x\n", epno, regval); efm32_putreg(0xFF, EFM32_USB_DOEPINT(epno)); } @@ -2859,8 +2864,8 @@ static inline void efm32_epin_interrupt(FAR struct efm32_usbdev_s *priv) { if ((daint & 1) != 0) { - ulldbg("DIEPINT(%d) = %08x\n", - epno, efm32_getreg(EFM32_USB_DIEPINT(epno))); + uinfo("DIEPINT(%d) = %08x\n", + epno, efm32_getreg(EFM32_USB_DIEPINT(epno))); efm32_putreg(0xFF, EFM32_USB_DIEPINT(epno)); } @@ -3799,7 +3804,7 @@ static int efm32_epout_configure(FAR struct efm32_ep_s *privep, uint8_t eptype, break; default: - udbg("Unsupported maxpacket: %d\n", maxpacket); + uerr("ERROR: Unsupported maxpacket: %d\n", maxpacket); return -EINVAL; } } @@ -3894,7 +3899,7 @@ static int efm32_epin_configure(FAR struct efm32_ep_s *privep, uint8_t eptype, break; default: - udbg("Unsupported maxpacket: %d\n", maxpacket); + uerr("ERROR: Unsupported maxpacket: %d\n", maxpacket); return -EINVAL; } } @@ -4184,7 +4189,7 @@ static int efm32_ep_disable(FAR struct usbdev_ep_s *ep) { FAR struct efm32_ep_s *privep = (FAR struct efm32_ep_s *)ep; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { usbtrace(TRACE_DEVERROR(EFM32_TRACEERR_INVALIDPARMS), 0); @@ -4224,7 +4229,7 @@ static FAR struct usbdev_req_s *efm32_ep_allocreq(FAR struct usbdev_ep_s *ep) { FAR struct efm32_req_s *privreq; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { usbtrace(TRACE_DEVERROR(EFM32_TRACEERR_INVALIDPARMS), 0); @@ -4257,7 +4262,7 @@ static void efm32_ep_freereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s { FAR struct efm32_req_s *privreq = (FAR struct efm32_req_s *)req; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !req) { usbtrace(TRACE_DEVERROR(EFM32_TRACEERR_INVALIDPARMS), 0); @@ -4329,11 +4334,12 @@ static int efm32_ep_submit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s * /* Some sanity checking */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!req || !req->callback || !req->buf || !ep) { usbtrace(TRACE_DEVERROR(EFM32_TRACEERR_INVALIDPARMS), 0); - ullvdbg("req=%p callback=%p buf=%p ep=%p\n", req, req->callback, req->buf, ep); + uinfo("req=%p callback=%p buf=%p ep=%p\n", + req, req->callback, req->buf, ep); return -EINVAL; } #endif @@ -4341,7 +4347,7 @@ static int efm32_ep_submit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s * usbtrace(TRACE_EPSUBMIT, privep->epphy); priv = privep->dev; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv->driver) { usbtrace(TRACE_DEVERROR(EFM32_TRACEERR_NOTCONFIGURED), priv->usbdev.speed); @@ -4418,7 +4424,7 @@ static int efm32_ep_cancel(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s * FAR struct efm32_ep_s *privep = (FAR struct efm32_ep_s *)ep; irqstate_t flags; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !req) { usbtrace(TRACE_DEVERROR(EFM32_TRACEERR_INVALIDPARMS), 0); @@ -4876,7 +4882,7 @@ static int efm32_selfpowered(struct usbdev_s *dev, bool selfpowered) usbtrace(TRACE_DEVSELFPOWERED, (uint16_t)selfpowered); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev) { usbtrace(TRACE_DEVERROR(EFM32_TRACEERR_INVALIDPARMS), 0); @@ -5482,7 +5488,7 @@ void up_usbinitialize(void) ret = irq_attach(EFM32_IRQ_USB, efm32_usbinterrupt); if (ret < 0) { - udbg("irq_attach failed\n", ret); + uerr("ERROR: irq_attach failed\n", ret); goto errout; } @@ -5605,7 +5611,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) usbtrace(TRACE_DEVREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !driver->ops->bind || !driver->ops->unbind || !driver->ops->disconnect || !driver->ops->setup) { @@ -5676,7 +5682,7 @@ int usbdev_unregister(struct usbdevclass_driver_s *driver) usbtrace(TRACE_DEVUNREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (driver != priv->driver) { usbtrace(TRACE_DEVERROR(EFM32_TRACEERR_INVALIDPARMS), 0); diff --git a/arch/arm/src/efm32/efm32_usbhost.c b/arch/arm/src/efm32/efm32_usbhost.c index cc9fe1c7d8d0a3037c98b0b74bfa2e488578ab1b..19f80bc43d4322b130e47cf29eb866d7dd65f0fc 100644 --- a/arch/arm/src/efm32/efm32_usbhost.c +++ b/arch/arm/src/efm32/efm32_usbhost.c @@ -92,9 +92,9 @@ * CONFIG_EFM32_OTGFS_SOFINTR - Enable SOF interrupts. Why would you ever * want to do that? * CONFIG_EFM32_USBHOST_REGDEBUG - Enable very low-level register access - * debug. Depends on CONFIG_DEBUG. + * debug. Depends on CONFIG_DEBUG_FEATURES. * CONFIG_EFM32_USBHOST_PKTDUMP - Dump all incoming and outgoing USB - * packets. Depends on CONFIG_DEBUG. + * packets. Depends on CONFIG_DEBUG_FEATURES. */ /* Default RxFIFO size */ @@ -121,9 +121,9 @@ # define CONFIG_EFM32_OTGFS_DESCSIZE 128 #endif -/* Register/packet debug depends on CONFIG_DEBUG */ +/* Register/packet debug depends on CONFIG_DEBUG_FEATURES */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_USB_INFO # undef CONFIG_EFM32_USBHOST_REGDEBUG # undef CONFIG_EFM32_USBHOST_PKTDUMP #endif @@ -582,7 +582,7 @@ static const struct efm32_usbhost_trace_s g_trace2[TRACE2_NSTRINGS] = #ifdef CONFIG_EFM32_USBHOST_REGDEBUG static void efm32_printreg(uint32_t addr, uint32_t val, bool iswrite) { - lldbg("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val); + uinfo("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val); } #endif @@ -632,7 +632,7 @@ static void efm32_checkreg(uint32_t addr, uint32_t val, bool iswrite) { /* No.. More than one. */ - lldbg("[repeats %d more times]\n", count); + uinfo("[repeats %d more times]\n", count); } } @@ -1362,7 +1362,7 @@ static int efm32_ctrlep_alloc(FAR struct efm32_usbhost_s *priv, ctrlep = (FAR struct efm32_ctrlinfo_s *)kmm_malloc(sizeof(struct efm32_ctrlinfo_s)); if (ctrlep == NULL) { - udbg("ERROR: Failed to allocate control endpoint container\n"); + uerr("ERROR: Failed to allocate control endpoint container\n"); return -ENOMEM; } @@ -1372,7 +1372,7 @@ static int efm32_ctrlep_alloc(FAR struct efm32_usbhost_s *priv, hport->funcaddr, hport->speed, ctrlep); if (ret < 0) { - udbg("ERROR: efm32_ctrlchan_alloc failed: %d\n", ret); + uerr("ERROR: efm32_ctrlchan_alloc failed: %d\n", ret); kmm_free(ctrlep); return ret; } @@ -1424,7 +1424,7 @@ static int efm32_xfrep_alloc(FAR struct efm32_usbhost_s *priv, chidx = efm32_chan_alloc(priv); if (chidx < 0) { - udbg("ERROR: Failed to allocate a host channel\n"); + uerr("ERROR: Failed to allocate a host channel\n"); return -ENOMEM; } @@ -1934,7 +1934,7 @@ static ssize_t efm32_in_transfer(FAR struct efm32_usbhost_s *priv, int chidx, ret = efm32_in_setup(priv, chidx); if (ret < 0) { - udbg("ERROR: efm32_in_setup failed: %d\n", ret); + uerr("ERROR: efm32_in_setup failed: %d\n", ret); return (ssize_t)ret; } @@ -1965,7 +1965,7 @@ static ssize_t efm32_in_transfer(FAR struct efm32_usbhost_s *priv, int chidx, { /* Break out and return the error */ - udbg("ERROR: efm32_chan_wait failed: %d\n", ret); + uerr("ERROR: efm32_chan_wait failed: %d\n", ret); return (ssize_t)ret; } } @@ -2010,13 +2010,13 @@ static void efm32_in_next(FAR struct efm32_usbhost_s *priv, return; } - udbg("ERROR: efm32_in_setup failed: %d\n", ret); + uerr("ERROR: efm32_in_setup failed: %d\n", ret); result = ret; } /* The transfer is complete, with or without an error */ - uvdbg("Transfer complete: %d\n", result); + uinfo("Transfer complete: %d\n", result); /* Extract the callback information */ @@ -2068,7 +2068,7 @@ static int efm32_in_asynch(FAR struct efm32_usbhost_s *priv, int chidx, ret = efm32_chan_asynchsetup(priv, chan, callback, arg); if (ret < 0) { - udbg("ERROR: efm32_chan_asynchsetup failed: %d\n", ret); + uerr("ERROR: efm32_chan_asynchsetup failed: %d\n", ret); return ret; } @@ -2077,7 +2077,7 @@ static int efm32_in_asynch(FAR struct efm32_usbhost_s *priv, int chidx, ret = efm32_in_setup(priv, chidx); if (ret < 0) { - udbg("ERROR: efm32_in_setup failed: %d\n", ret); + uerr("ERROR: efm32_in_setup failed: %d\n", ret); } /* And return with the transfer pending */ @@ -2203,7 +2203,7 @@ static ssize_t efm32_out_transfer(FAR struct efm32_usbhost_s *priv, int chidx, ret = efm32_out_setup(priv, chidx); if (ret < 0) { - udbg("ERROR: efm32_out_setup failed: %d\n", ret); + uerr("ERROR: efm32_out_setup failed: %d\n", ret); return (ssize_t)ret; } @@ -2231,7 +2231,7 @@ static ssize_t efm32_out_transfer(FAR struct efm32_usbhost_s *priv, int chidx, { /* Break out and return the error */ - udbg("ERROR: efm32_chan_wait failed: %d\n", ret); + uerr("ERROR: efm32_chan_wait failed: %d\n", ret); return (ssize_t)ret; } @@ -2296,13 +2296,13 @@ static void efm32_out_next(FAR struct efm32_usbhost_s *priv, return; } - udbg("ERROR: efm32_out_setup failed: %d\n", ret); + uerr("ERROR: efm32_out_setup failed: %d\n", ret); result = ret; } /* The transfer is complete, with or without an error */ - uvdbg("Transfer complete: %d\n", result); + uinfo("Transfer complete: %d\n", result); /* Extract the callback information */ @@ -2354,7 +2354,7 @@ static int efm32_out_asynch(FAR struct efm32_usbhost_s *priv, int chidx, ret = efm32_chan_asynchsetup(priv, chan, callback, arg); if (ret < 0) { - udbg("ERROR: efm32_chan_asynchsetup failed: %d\n", ret); + uerr("ERROR: efm32_chan_asynchsetup failed: %d\n", ret); return ret; } @@ -2363,7 +2363,7 @@ static int efm32_out_asynch(FAR struct efm32_usbhost_s *priv, int chidx, ret = efm32_out_setup(priv, chidx); if (ret < 0) { - udbg("ERROR: efm32_out_setup failed: %d\n", ret); + uerr("ERROR: efm32_out_setup failed: %d\n", ret); } /* And return with the transfer pending */ @@ -2448,7 +2448,7 @@ static inline void efm32_gint_hcinisr(FAR struct efm32_usbhost_s *priv, /* AND the two to get the set of enabled, pending HC interrupts */ pending &= regval; - ullvdbg("HCINTMSK%d: %08x pending: %08x\n", chidx, regval, pending); + uinfo("HCINTMSK%d: %08x pending: %08x\n", chidx, regval, pending); /* Check for a pending ACK response received/transmitted (ACK) interrupt */ @@ -2709,7 +2709,7 @@ static inline void efm32_gint_hcoutisr(FAR struct efm32_usbhost_s *priv, /* AND the two to get the set of enabled, pending HC interrupts */ pending &= regval; - ullvdbg("HCINTMSK%d: %08x pending: %08x\n", chidx, regval, pending); + uinfo("HCINTMSK%d: %08x pending: %08x\n", chidx, regval, pending); /* Check for a pending ACK response received/transmitted (ACK) interrupt */ @@ -3012,7 +3012,7 @@ static inline void efm32_gint_rxflvlisr(FAR struct efm32_usbhost_s *priv) /* Read and pop the next status from the Rx FIFO */ grxsts = efm32_getreg(EFM32_USB_GRXSTSP); - ullvdbg("GRXSTS: %08x\n", grxsts); + uinfo("GRXSTS: %08x\n", grxsts); /* Isolate the channel number/index in the status word */ @@ -3166,8 +3166,8 @@ static inline void efm32_gint_nptxfeisr(FAR struct efm32_usbhost_s *priv) /* Write the next group of packets into the Tx FIFO */ - ullvdbg("HNPTXSTS: %08x chidx: %d avail: %d buflen: %d xfrd: %d wrsize: %d\n", - regval, chidx, avail, chan->buflen, chan->xfrd, wrsize); + uinfo("HNPTXSTS: %08x chidx: %d avail: %d buflen: %d xfrd: %d wrsize: %d\n", + regval, chidx, avail, chan->buflen, chan->xfrd, wrsize); efm32_gint_wrpacket(priv, chan->buffer, chidx, wrsize); } @@ -3254,8 +3254,8 @@ static inline void efm32_gint_ptxfeisr(FAR struct efm32_usbhost_s *priv) /* Write the next group of packets into the Tx FIFO */ - ullvdbg("HPTXSTS: %08x chidx: %d avail: %d buflen: %d xfrd: %d wrsize: %d\n", - regval, chidx, avail, chan->buflen, chan->xfrd, wrsize); + uinfo("HPTXSTS: %08x chidx: %d avail: %d buflen: %d xfrd: %d wrsize: %d\n", + regval, chidx, avail, chan->buflen, chan->xfrd, wrsize); efm32_gint_wrpacket(priv, chan->buffer, chidx, wrsize); } @@ -3827,7 +3827,7 @@ static int efm32_wait(FAR struct usbhost_connection_s *conn, *hport = connport; leave_critical_section(flags); - uvdbg("RHport Connected: %s\n", connport->connected ? "YES" : "NO"); + uinfo("RHport Connected: %s\n", connport->connected ? "YES" : "NO"); return OK; } @@ -3844,7 +3844,7 @@ static int efm32_wait(FAR struct usbhost_connection_s *conn, *hport = connport; leave_critical_section(flags); - uvdbg("Hub port Connected: %s\n", connport->connected ? "YES" : "NO"); + uinfo("Hub port Connected: %s\n", connport->connected ? "YES" : "NO"); return OK; } #endif @@ -3932,7 +3932,7 @@ static int efm32_rh_enumerate(FAR struct efm32_usbhost_s *priv, ret = efm32_ctrlchan_alloc(priv, 0, 0, priv->rhport.hport.speed, &priv->ep0); if (ret < 0) { - udbg("ERROR: Failed to allocate a control endpoint: %d\n", ret); + uerr("ERROR: Failed to allocate a control endpoint: %d\n", ret); } return ret; @@ -3964,7 +3964,7 @@ static int efm32_enumerate(FAR struct usbhost_connection_s *conn, /* Then let the common usbhost_enumerate do the real enumeration. */ - uvdbg("Enumerate the device\n"); + uinfo("Enumerate the device\n"); priv->smstate = SMSTATE_ENUM; ret = usbhost_enumerate(hport, &hport->devclass); @@ -3978,7 +3978,7 @@ static int efm32_enumerate(FAR struct usbhost_connection_s *conn, { /* Return to the disconnected state */ - udbg("ERROR: Enumeration failed: %d\n", ret); + uerr("ERROR: Enumeration failed: %d\n", ret); efm32_gint_disconnected(priv); } @@ -4380,7 +4380,7 @@ static int efm32_ctrlin(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, DEBUGASSERT(priv != NULL && ep0info != NULL && req != NULL); usbhost_vtrace2(USBHOST_VTRACE2_CTRLIN, req->type, req->req); - uvdbg("type:%02x req:%02x value:%02x%02x index:%02x%02x len:%02x%02x\n", + uinfo("type:%02x req:%02x value:%02x%02x index:%02x%02x len:%02x%02x\n", req->type, req->req, req->value[1], req->value[0], req->index[1], req->index[0], req->len[1], req->len[0]); @@ -4465,7 +4465,7 @@ static int efm32_ctrlout(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, DEBUGASSERT(priv != NULL && ep0info != NULL && req != NULL); usbhost_vtrace2(USBHOST_VTRACE2_CTRLOUT, req->type, req->req); - uvdbg("type:%02x req:%02x value:%02x%02x index:%02x%02x len:%02x%02x\n", + uinfo("type:%02x req:%02x value:%02x%02x index:%02x%02x len:%02x%02x\n", req->type, req->req, req->value[1], req->value[0], req->index[1], req->index[0], req->len[1], req->len[0]); @@ -4583,7 +4583,7 @@ static ssize_t efm32_transfer(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep unsigned int chidx = (unsigned int)ep; ssize_t nbytes; - uvdbg("chidx: %d buflen: %d\n", (unsigned int)ep, buflen); + uinfo("chidx: %d buflen: %d\n", (unsigned int)ep, buflen); DEBUGASSERT(priv && buffer && chidx < EFM32_MAX_TX_FIFOS && buflen > 0); @@ -4650,7 +4650,7 @@ static int efm32_asynch(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep, unsigned int chidx = (unsigned int)ep; int ret; - uvdbg("chidx: %d buflen: %d\n", (unsigned int)ep, buflen); + uinfo("chidx: %d buflen: %d\n", (unsigned int)ep, buflen); DEBUGASSERT(priv && buffer && chidx < EFM32_MAX_TX_FIFOS && buflen > 0); @@ -4700,7 +4700,7 @@ static int efm32_cancel(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep) unsigned int chidx = (unsigned int)ep; irqstate_t flags; - uvdbg("chidx: %u: %d\n", chidx); + uinfo("chidx: %u: %d\n", chidx); DEBUGASSERT(priv && chidx < EFM32_MAX_TX_FIFOS); chan = &priv->chan[chidx]; @@ -4795,7 +4795,8 @@ static int efm32_connect(FAR struct usbhost_driver_s *drvr, /* Set the connected/disconnected flag */ hport->connected = connected; - ullvdbg("Hub port %d connected: %s\n", hport->port, connected ? "YES" : "NO"); + uinfo("Hub port %d connected: %s\n", + hport->port, connected ? "YES" : "NO"); /* Report the connection event */ diff --git a/arch/arm/src/imx1/imx_decodeirq.c b/arch/arm/src/imx1/imx_decodeirq.c index 5c35e68fab2dbc619aeea11cc6146698c74a09b4..48164d9099c465561c9cb65e30b0b14c140c5404 100644 --- a/arch/arm/src/imx1/imx_decodeirq.c +++ b/arch/arm/src/imx1/imx_decodeirq.c @@ -74,8 +74,8 @@ void up_decodeirq(uint32_t *regs) { #ifdef CONFIG_SUPPRESS_INTERRUPTS - lowsyslog(LOG_ERR, "Unexpected IRQ\n"); CURRENT_REGS = regs; + err("ERROR: Unexpected IRQ\n"); PANIC(); #else uint32_t regval; diff --git a/arch/arm/src/imx6/Make.defs b/arch/arm/src/imx6/Make.defs index 3f949158e360ccc1203c49de51db70ddbac7aea3..4870aa1d1de74e3aa0b92853040c9931c3357ed0 100644 --- a/arch/arm/src/imx6/Make.defs +++ b/arch/arm/src/imx6/Make.defs @@ -83,7 +83,7 @@ ifeq ($(CONFIG_SMP),y) CMN_CSRCS += arm_cpuindex.c arm_cpustart.c arm_cpupause.c arm_cpuidlestack.c endif -ifeq ($(CONFIG_DEBUG_IRQ),y) +ifeq ($(CONFIG_DEBUG_IRQ_INFO),y) CMN_CSRCS += arm_gicv2_dump.c endif @@ -150,3 +150,7 @@ CHIP_CSRCS += imx_serial.c imx_lowputc.c ifeq ($(CONFIG_SMP),y) CHIP_CSRCS += imx_cpuboot.c endif + +ifeq ($(CONFIG_IMX6_ECSPI),y) +CHIP_CSRCS += imx_ecspi.c +endif diff --git a/arch/arm/src/imx6/imx_gpio.h b/arch/arm/src/imx6/imx_gpio.h index 2c3acd9abe28c35dc8baad9849f46c6fc9394e48..23ca29c318714cb886c366ae4b585b3e61684ef5 100644 --- a/arch/arm/src/imx6/imx_gpio.h +++ b/arch/arm/src/imx6/imx_gpio.h @@ -288,7 +288,7 @@ void imx_gpioirq_disable(int irq); * ************************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO int imx_dump_gpio(uint32_t pinset, const char *msg); #else # define imx_dumpgpio(p,m) diff --git a/arch/arm/src/imx6/imx_lowputc.c b/arch/arm/src/imx6/imx_lowputc.c index a6387e732168c2b2bda1cb45c3b4ab04fb0077a0..8bfabf7085641fb359bfd3555ebe96265224df57 100644 --- a/arch/arm/src/imx6/imx_lowputc.c +++ b/arch/arm/src/imx6/imx_lowputc.c @@ -584,7 +584,7 @@ int imx_uart_configure(uint32_t base, FAR const struct uart_config_s *config) * ************************************************************************************/ -#if defined(IMX_HAVE_UART) && defined(CONFIG_DEBUG) +#if defined(IMX_HAVE_UART) && defined(CONFIG_DEBUG_FEATURES) void imx_lowputc(int ch) { /* Poll the TX fifo trigger level bit of the UART status register. When the TXFE diff --git a/arch/arm/src/imx6/imx_lowputc.h b/arch/arm/src/imx6/imx_lowputc.h index d487931dc63362a429f80b953a7255e818a04312..081f366ea7cb6e7ed1265001fedc0ff6800bffdb 100644 --- a/arch/arm/src/imx6/imx_lowputc.h +++ b/arch/arm/src/imx6/imx_lowputc.h @@ -105,7 +105,7 @@ int imx_uart_configure(uint32_t base, FAR const struct uart_config_s *config); * ************************************************************************************/ -#if defined(IMX_HAVE_UART) && defined(CONFIG_DEBUG) +#if defined(IMX_HAVE_UART) && defined(CONFIG_DEBUG_FEATURES) void imx_lowputc(int ch); #else # define imx_lowputc(ch) diff --git a/arch/arm/src/kinetis/Kconfig b/arch/arm/src/kinetis/Kconfig index fdf54e1941c65fe4445f3d303201eba7b1f58ea2..5710c2d32ce6c7e4067fcc53e430f3aa734dde0b 100644 --- a/arch/arm/src/kinetis/Kconfig +++ b/arch/arm/src/kinetis/Kconfig @@ -383,6 +383,69 @@ config KINETIS_PIT endmenu +config KINETIS_FTM0_PWM + bool "FTM0 PWM" + default n + depends on KINETIS_FTM0 + ---help--- + Reserve timer 0 for use by PWM + + Timer devices may be used for different purposes. One special purpose is + to generate modulated outputs for such things as motor control. If KINETIS_FTM0 + is defined then THIS following may also be defined to indicate that + the timer is intended to be used for pulsed output modulation. + +config KINETIS_FTM0_CHANNEL + int "FTM0 PWM Output Channel" + default 0 + range 0 7 + depends on KINETIS_FTM0_PWM + ---help--- + If FTM0 is enabled for PWM usage, you also need specifies the timer output + channel {0,..,7} + +config KINETIS_FTM1_PWM + bool "FTM1 PWM" + default n + depends on KINETIS_FTM1 + ---help--- + Reserve timer 1 for use by PWM + + Timer devices may be used for different purposes. One special purpose is + to generate modulated outputs for such things as motor control. If KINETIS_FTM1 + is defined then THIS following may also be defined to indicate that + the timer is intended to be used for pulsed output modulation. + +config KINETIS_FTM1_CHANNEL + int "FTM1 PWM Output Channel" + default 0 + range 0 1 + depends on KINETIS_FTM1_PWM + ---help--- + If FTM1 is enabled for PWM usage, you also need specifies the timer output + channel {0,..,1} + +config KINETIS_FTM2_PWM + bool "FTM2 PWM" + default n + depends on KINETIS_FTM2 + ---help--- + Reserve timer 2 for use by PWM + + Timer devices may be used for different purposes. One special purpose is + to generate modulated outputs for such things as motor control. If KINETIS_FTM2 + is defined then THIS following may also be defined to indicate that + the timer is intended to be used for pulsed output modulation. + +config KINETIS_FTM2_CHANNEL + int "FTM2 PWM Output Channel" + default 0 + range 0 1 + depends on KINETIS_FTM2_PWM + ---help--- + If FTM2 is enabled for PWM usage, you also need specifies the timer output + channel {0,..,1} + comment "Kinetis GPIO Interrupt Configuration" config GPIO_IRQ diff --git a/arch/arm/src/kinetis/Make.defs b/arch/arm/src/kinetis/Make.defs index c9c5ec6ca802c979bb4f056e4a6ff9b8e95ff2fd..662dd618737f74b868560d730be62f3c6e6a209a 100644 --- a/arch/arm/src/kinetis/Make.defs +++ b/arch/arm/src/kinetis/Make.defs @@ -107,8 +107,8 @@ ifeq ($(CONFIG_GPIO_IRQ),y) CHIP_CSRCS += kinetis_pinirq.c endif -ifeq ($(CONFIG_DEBUG_GPIO),y) -CHIP_CSRCS += kinetis_pindbg.c +ifeq ($(CONFIG_DEBUG_GPIO_INFO),y) +CHIP_CSRCS += kinetis_pindump.c endif ifeq ($(CONFIG_KINETIS_SDHC),y) @@ -127,6 +127,10 @@ ifeq ($(CONFIG_KINETIS_DMA),y) CHIP_CSRCS += kinetis_dma.c kinetis_pindma.c endif +ifeq ($(CONFIG_PWM),y) +CHIP_CSRCS += kinetis_pwm.c +endif + ifeq ($(CONFIG_NET),y) ifeq ($(CONFIG_KINETIS_ENET),y) CHIP_CSRCS += kinetis_enet.c diff --git a/arch/arm/src/kinetis/kinetis.h b/arch/arm/src/kinetis/kinetis.h index b0c016d22a1dfea6f7077175d8a2b03f0e8c08e6..ae02ce7e4f81aae52892db227f2874b25d47dd0b 100644 --- a/arch/arm/src/kinetis/kinetis.h +++ b/arch/arm/src/kinetis/kinetis.h @@ -566,8 +566,8 @@ void kinetis_pindmadisable(uint32_t pinset); * ************************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO -int kinetis_pindump(uint32_t pinset, const char *msg); +#ifdef CONFIG_DEBUG_GPIO_INFO +void kinetis_pindump(uint32_t pinset, const char *msg); #else # define kinetis_pindump(p,m) #endif diff --git a/arch/arm/src/kinetis/kinetis_clockconfig.c b/arch/arm/src/kinetis/kinetis_clockconfig.c index dc2fe0482bf893b6fda5a199785dfbb3ae184c41..7221b9dc6e76416e6edc83b1ef9b1ddac09e7f34 100644 --- a/arch/arm/src/kinetis/kinetis_clockconfig.c +++ b/arch/arm/src/kinetis/kinetis_clockconfig.c @@ -1,8 +1,7 @@ /**************************************************************************** * arch/arm/src/kinetis/kinetis_clockconfig.c - * arch/arm/src/chip/kinetis_clockconfig.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 @@ -66,14 +65,6 @@ void __ramfunc__ kinesis_setdividers(uint32_t div1, uint32_t div2, uint32_t div3, uint32_t div4); -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -133,7 +124,11 @@ void kinetis_pllconfig(void) * RANGE = 2 (Oscillator of 8 MHz to 32 MHz) */ +#ifdef BOARD_EXTAL_LP + putreg8(MCG_C2_EREFS | MCG_C2_RANGE_VHIGH, KINETIS_MCG_C2); +#else putreg8(MCG_C2_EREFS | MCG_C2_HGO | MCG_C2_RANGE_VHIGH, KINETIS_MCG_C2); +#endif /* BOARD_EXTAL_LP */ #endif /* Released latched state of oscillator and GPIO */ @@ -156,7 +151,11 @@ void kinetis_pllconfig(void) * CLKS = 2 (Clock Source Select, External reference clock) */ +#ifdef BOARD_FRDIV + putreg8(BOARD_FRDIV | MCG_C1_CLKS_EXTREF, KINETIS_MCG_C1); +#else putreg8(MCG_C1_FRDIV_DIV256 | MCG_C1_CLKS_EXTREF, KINETIS_MCG_C1); +#endif /* If we aren't using an oscillator input we don't need to wait for the * oscillator to initialize diff --git a/arch/arm/src/kinetis/kinetis_enet.c b/arch/arm/src/kinetis/kinetis_enet.c index 95e511546ff441ae6d5b9ca11b842b8f7d9bccbb..aa4b3cf10165271bcfb3acb4dd3e1817f8692d4f 100644 --- a/arch/arm/src/kinetis/kinetis_enet.c +++ b/arch/arm/src/kinetis/kinetis_enet.c @@ -165,9 +165,9 @@ struct kinetis_driver_s struct enet_desc_s *txdesc; /* A pointer to the list of TX descriptor */ struct enet_desc_s *rxdesc; /* A pointer to the list of RX descriptors */ - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ - struct net_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by the network */ /* The DMA descriptors. A unaligned uint8_t is used to allocate the * memory; 16 is added to assure that we can meet the descriptor alignment @@ -435,7 +435,7 @@ static int kinetis_transmit(FAR struct kinetis_driver_s *priv) * Function: kinetis_txpoll * * Description: - * The transmitter is available, check if uIP has any outgoing packets ready + * The transmitter is available, check if the network has any outgoing packets ready * to send. This is a callback from devif_poll(). devif_poll() may be called: * * 1. When the preceding TX packet send is complete, @@ -557,7 +557,7 @@ static void kinetis_receive(FAR struct kinetis_driver_s *priv) #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); NETDEV_RXIPV4(&priv->dev); /* Handle ARP on input then give the IPv4 packet to the network @@ -598,7 +598,7 @@ static void kinetis_receive(FAR struct kinetis_driver_s *priv) #ifdef CONFIG_NET_IPv6 if (BUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); NETDEV_RXIPV6(&priv->dev); /* Give the IPv6 packet to the network layer */ @@ -731,7 +731,7 @@ static void kinetis_txdone(FAR struct kinetis_driver_s *priv) putreg32(regval, KINETIS_ENET_EIMR); } - /* There should be space for a new TX in any event. Poll uIP for new XMIT + /* There should be space for a new TX in any event. Poll the network for new XMIT * data */ @@ -848,7 +848,7 @@ static void kinetis_txtimeout(int argc, uint32_t arg, ...) (void)kinetis_ifdown(&priv->dev); (void)kinetis_ifup(&priv->dev); - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ (void)devif_poll(&priv->dev, kinetis_txpoll); } @@ -881,7 +881,7 @@ static void kinetis_polltimer(int argc, uint32_t arg, ...) if (!kinetics_txringfull(priv)) { - /* If so, update TCP timing states and poll uIP for new XMIT data. Hmmm.. + /* If so, update TCP timing states and poll the network for new XMIT data. Hmmm.. * might be bug here. Does this mean if there is a transmit in progress, * we will missing TCP time state updates? */ @@ -918,9 +918,9 @@ static int kinetis_ifup(struct net_driver_s *dev) uint8_t *mac = dev->d_mac.ether_addr_octet; uint32_t regval; - ndbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); /* Initialize ENET buffers */ @@ -1112,7 +1112,7 @@ static int kinetis_txavail(struct net_driver_s *dev) if (!kinetics_txringfull(priv)) { - /* No, there is space for another transfer. Poll uIP for new + /* No, there is space for another transfer. Poll the network for new * XMIT data. */ @@ -1695,7 +1695,7 @@ int kinetis_netinitialize(int intf) { /* We could not attach the ISR to the interrupt */ - ndbg("Failed to attach EMACTMR IRQ\n"); + nerr("ERROR: Failed to attach EMACTMR IRQ\n"); return -EAGAIN; } #endif @@ -1706,7 +1706,7 @@ int kinetis_netinitialize(int intf) { /* We could not attach the ISR to the interrupt */ - ndbg("Failed to attach EMACTX IRQ\n"); + nerr("ERROR: Failed to attach EMACTX IRQ\n"); return -EAGAIN; } @@ -1716,7 +1716,7 @@ int kinetis_netinitialize(int intf) { /* We could not attach the ISR to the interrupt */ - ndbg("Failed to attach EMACRX IRQ\n"); + nerr("ERROR: Failed to attach EMACRX IRQ\n"); return -EAGAIN; } @@ -1726,7 +1726,7 @@ int kinetis_netinitialize(int intf) { /* We could not attach the ISR to the interrupt */ - ndbg("Failed to attach EMACMISC IRQ\n"); + nerr("ERROR: Failed to attach EMACMISC IRQ\n"); return -EAGAIN; } diff --git a/arch/arm/src/kinetis/kinetis_irq.c b/arch/arm/src/kinetis/kinetis_irq.c index 44f21af47d611f546d8c80d9c2c13bc2b6aedcb5..d2a04de3ae6c1e9e6fe51f345fa9ee18774e5b05 100644 --- a/arch/arm/src/kinetis/kinetis_irq.c +++ b/arch/arm/src/kinetis/kinetis_irq.c @@ -105,50 +105,51 @@ extern uint32_t _vectors[]; * ****************************************************************************/ -#if defined(CONFIG_DEBUG_IRQ) +#if defined(CONFIG_DEBUG_IRQ_INFO) static void kinetis_dumpnvic(const char *msg, int irq) { irqstate_t flags; flags = enter_critical_section(); - lldbg("NVIC (%s, irq=%d):\n", msg, irq); - lldbg(" INTCTRL: %08x VECTAB: %08x\n", - getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB)); + + irqinfo("NVIC (%s, irq=%d):\n", msg, irq); + irqinfo(" INTCTRL: %08x VECTAB: %08x\n", + getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB)); #if 0 - lldbg(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n", - getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA), - getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE)); + irqinfo(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n", + getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA), + getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE)); #endif - lldbg(" IRQ ENABLE: %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE), - getreg32(NVIC_IRQ64_95_ENABLE), getreg32(NVIC_IRQ96_127_ENABLE)); - lldbg(" SYSH_PRIO: %08x %08x %08x\n", - getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY), - getreg32(NVIC_SYSH12_15_PRIORITY)); - lldbg(" IRQ PRIO: %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY), - getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY)); - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY), - getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY)); - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY), - getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY)); - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ48_51_PRIORITY), getreg32(NVIC_IRQ52_55_PRIORITY), - getreg32(NVIC_IRQ56_59_PRIORITY), getreg32(NVIC_IRQ60_63_PRIORITY)); - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ64_67_PRIORITY), getreg32(NVIC_IRQ68_71_PRIORITY), - getreg32(NVIC_IRQ72_75_PRIORITY), getreg32(NVIC_IRQ76_79_PRIORITY)); - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ80_83_PRIORITY), getreg32(NVIC_IRQ84_87_PRIORITY), - getreg32(NVIC_IRQ88_91_PRIORITY), getreg32(NVIC_IRQ92_95_PRIORITY)); - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ96_99_PRIORITY), getreg32(NVIC_IRQ100_103_PRIORITY), - getreg32(NVIC_IRQ104_107_PRIORITY), getreg32(NVIC_IRQ108_111_PRIORITY)); + irqinfo(" IRQ ENABLE: %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE), + getreg32(NVIC_IRQ64_95_ENABLE), getreg32(NVIC_IRQ96_127_ENABLE)); + irqinfo(" SYSH_PRIO: %08x %08x %08x\n", + getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY), + getreg32(NVIC_SYSH12_15_PRIORITY)); + irqinfo(" IRQ PRIO: %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY), + getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY), + getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY), + getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ48_51_PRIORITY), getreg32(NVIC_IRQ52_55_PRIORITY), + getreg32(NVIC_IRQ56_59_PRIORITY), getreg32(NVIC_IRQ60_63_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ64_67_PRIORITY), getreg32(NVIC_IRQ68_71_PRIORITY), + getreg32(NVIC_IRQ72_75_PRIORITY), getreg32(NVIC_IRQ76_79_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ80_83_PRIORITY), getreg32(NVIC_IRQ84_87_PRIORITY), + getreg32(NVIC_IRQ88_91_PRIORITY), getreg32(NVIC_IRQ92_95_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ96_99_PRIORITY), getreg32(NVIC_IRQ100_103_PRIORITY), + getreg32(NVIC_IRQ104_107_PRIORITY), getreg32(NVIC_IRQ108_111_PRIORITY)); #if NR_VECTORS > 111 - lldbg(" %08x %08x\n", - getreg32(NVIC_IRQ112_115_PRIORITY), getreg32(NVIC_IRQ116_119_PRIORITY)); + irqinfo(" %08x %08x\n", + getreg32(NVIC_IRQ112_115_PRIORITY), getreg32(NVIC_IRQ116_119_PRIORITY)); #endif leave_critical_section(flags); @@ -168,11 +169,11 @@ static void kinetis_dumpnvic(const char *msg, int irq) * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES static int kinetis_nmi(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! NMI received\n"); + _err("PANIC!!! NMI received\n"); PANIC(); return 0; } @@ -180,7 +181,7 @@ static int kinetis_nmi(int irq, FAR void *context) static int kinetis_busfault(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Bus fault recived\n"); + _err("PANIC!!! Bus fault recived\n"); PANIC(); return 0; } @@ -188,7 +189,7 @@ static int kinetis_busfault(int irq, FAR void *context) static int kinetis_usagefault(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Usage fault received\n"); + _err("PANIC!!! Usage fault received\n"); PANIC(); return 0; } @@ -196,7 +197,7 @@ static int kinetis_usagefault(int irq, FAR void *context) static int kinetis_pendsv(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! PendSV received\n"); + _err("PANIC!!! PendSV received\n"); PANIC(); return 0; } @@ -204,7 +205,7 @@ static int kinetis_pendsv(int irq, FAR void *context) static int kinetis_dbgmonitor(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Debug Monitor received\n"); + _err("PANIC!!! Debug Monitor received\n"); PANIC(); return 0; } @@ -212,7 +213,7 @@ static int kinetis_dbgmonitor(int irq, FAR void *context) static int kinetis_reserved(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Reserved interrupt\n"); + _err("PANIC!!! Reserved interrupt\n"); PANIC(); return 0; } @@ -420,7 +421,7 @@ void up_irqinitialize(void) /* Attach all other processor exceptions (except reset and sys tick) */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES irq_attach(KINETIS_IRQ_NMI, kinetis_nmi); #ifndef CONFIG_ARM_MPU irq_attach(KINETIS_IRQ_MEMFAULT, up_memfault); diff --git a/arch/arm/src/kinetis/kinetis_pindump.c b/arch/arm/src/kinetis/kinetis_pindump.c new file mode 100644 index 0000000000000000000000000000000000000000..579c01bb4d2c9d1752e29d6002664b4d9e910500 --- /dev/null +++ b/arch/arm/src/kinetis/kinetis_pindump.c @@ -0,0 +1,128 @@ +/**************************************************************************** + * arch/arm/src/kinetis/kinetis_pindump.c + * + * Copyright (C) 2013, 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 "up_arch.h" + +#include "kinetis.h" +#include "kinetis_gpio.h" +#include "kinetis_port.h" + +#ifdef CONFIG_DEBUG_GPIO_INFO + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* Port letters for prettier debug output */ + +static const char g_portchar[KINETIS_NPORTS] = +{ +#if KINETIS_NPORTS > 9 +# error "Additional support required for this number of GPIOs" +#elif KINETIS_NPORTS > 8 + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I' +#elif KINETIS_NPORTS > 7 + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H' +#elif KINETIS_NPORTS > 6 + 'A', 'B', 'C', 'D', 'E', 'F', 'G' +#elif KINETIS_NPORTS > 5 + 'A', 'B', 'C', 'D', 'E', 'F' +#elif KINETIS_NPORTS > 4 + 'A', 'B', 'C', 'D', 'E' +#elif KINETIS_NPORTS > 3 + 'A', 'B', 'C', 'D' +#elif KINETIS_NPORTS > 2 + 'A', 'B', 'C' +#elif KINETIS_NPORTS > 1 + 'A', 'B' +#elif KINETIS_NPORTS > 0 + 'A' +#else +# error "Bad number of GPIOs" +#endif +}; + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Function: kinetis_pindump + * + * Description: + * Dump all GPIO registers associated with the provided pin description + * along with a descriptive messasge. + * + ****************************************************************************/ + +void kinetis_pindump(uint32_t pinset, const char *msg) +{ + irqstate_t flags; + uintptr_t base; + int port; + + /* Decode the port and pin. Use the port number to get the GPIO base + * address. + */ + + port = (pinset & _PIN_PORT_MASK) >> _PIN_PORT_SHIFT; + DEBUGASSERT((unsigned)port < KINETIS_NPORTS); + base = KINETIS_GPIO_BASE(port); + + /* The following requires exclusive access to the GPIO registers */ + + flags = enter_critical_section(); + + gpioinfo("GPIO%c pinset: %08x base: %08x -- %s\n", + g_portchar[port], pinset, base, msg); + gpioinfo(" PDOR: %08x PDIR: %08x PDDR: %08x\n", + getreg32(base + KINETIS_GPIO_PDOR_OFFSET), + getreg32(base + KINETIS_GPIO_PDIR_OFFSET), + getreg32(base + KINETIS_GPIO_PDDR_OFFSET)); + + leave_critical_section(flags); +} + +#endif /* CONFIG_DEBUG_GPIO_INFO */ diff --git a/arch/arm/src/kinetis/kinetis_pwm.c b/arch/arm/src/kinetis/kinetis_pwm.c new file mode 100644 index 0000000000000000000000000000000000000000..0730bf8dd835beb841ae70c14eea92e4f0ced95f --- /dev/null +++ b/arch/arm/src/kinetis/kinetis_pwm.c @@ -0,0 +1,789 @@ +/**************************************************************************** + * arch/arm/src/kinetis/kinetis_pwm.c + * + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * Alan Carvalho de Assis + * Ken Fazzone + * + * 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 "up_internal.h" +#include "up_arch.h" + +#include "chip.h" + +#include "kinetis.h" +#include "kinetis_pwm.h" +#include "kinetis_gpio.h" +#include "kinetis_ftm.h" +#include "kinetis_sim.h" + +/* This module then only compiles if there is at least one enabled timer + * intended for use with the PWM upper half driver. + */ + +#if defined(CONFIG_KINETIS_FTM0_PWM) || defined(CONFIG_KINETIS_FTM1_PWM) || \ + defined(CONFIG_KINETIS_FTM2_PWM) + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ +/* PWM/Timer Definitions ****************************************************/ + +/* Debug ********************************************************************/ + +#ifdef CONFIG_DEBUG_PWM_INFO +# define pwm_dumpgpio(p,m) kinetis_pindump(p,m) +#else +# define pwm_dumpgpio(p,m) +#endif + +/**************************************************************************** + * Private Types + ****************************************************************************/ +/* This structure represents the state of one PWM timer */ + +struct kinetis_pwmtimer_s +{ + FAR const struct pwm_ops_s *ops; /* PWM operations */ + uint8_t tpmid; /* Timer/PWM Module ID {0,..,2} */ + uint8_t channel; /* Timer/PWM Module channel: {0,..5} */ + uint32_t base; /* The base address of the timer */ + uint32_t pincfg; /* Output pin configuration */ + uint32_t pclk; /* The frequency of the peripheral clock */ +}; + +/**************************************************************************** + * Static Function Prototypes + ****************************************************************************/ + +/* Register access */ + +static uint32_t pwm_getreg(struct kinetis_pwmtimer_s *priv, int offset); +static void pwm_putreg(struct kinetis_pwmtimer_s *priv, int offset, uint32_t value); + +#ifdef CONFIG_DEBUG_PWM_INFO +static void pwm_dumpregs(struct kinetis_pwmtimer_s *priv, FAR const char *msg); +#else +# define pwm_dumpregs(priv,msg) +#endif + +/* Timer management */ + +static int pwm_timer(FAR struct kinetis_pwmtimer_s *priv, + FAR const struct pwm_info_s *info); + +/* PWM driver methods */ + +static int pwm_setup(FAR struct pwm_lowerhalf_s *dev); +static int pwm_shutdown(FAR struct pwm_lowerhalf_s *dev); + +static int pwm_start(FAR struct pwm_lowerhalf_s *dev, + FAR const struct pwm_info_s *info); + +static int pwm_stop(FAR struct pwm_lowerhalf_s *dev); +static int pwm_ioctl(FAR struct pwm_lowerhalf_s *dev, + int cmd, unsigned long arg); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* This is the list of lower half PWM driver methods used by the upper half + * driver. + */ + +static const struct pwm_ops_s g_pwmops = +{ + .setup = pwm_setup, + .shutdown = pwm_shutdown, + .start = pwm_start, + .stop = pwm_stop, + .ioctl = pwm_ioctl, +}; + +#ifdef CONFIG_KINETIS_FTM0_PWM +static struct kinetis_pwmtimer_s g_pwm0dev = +{ + .ops = &g_pwmops, + .tpmid = 0, + .channel = CONFIG_KINETIS_FTM0_CHANNEL, + .base = KINETIS_FTM0_BASE, + .pincfg = PWM_FTM0_PINCFG, + .pclk = BOARD_CORECLK_FREQ, +}; +#endif + +#ifdef CONFIG_KINETIS_FTM1_PWM +static struct kinetis_pwmtimer_s g_pwm1dev = +{ + .ops = &g_pwmops, + .tpmid = 1, + .channel = CONFIG_KINETIS_FTM1_CHANNEL, + .base = KINETIS_FTM1_BASE, + .pincfg = PWM_FTM1_PINCFG, + .pclk = BOARD_CORECLK_FREQ, +}; +#endif + +#ifdef CONFIG_KINETIS_FTM2_PWM +static struct kinetis_pwmtimer_s g_pwm2dev = +{ + .ops = &g_pwmops, + .tpmid = 2, + .channel = CONFIG_KINETIS_FTM2_CHANNEL, + .base = KINETIS_FTM2_BASE, + .pincfg = PWM_FTM2_PINCFG, + .pclk = BOARD_CORECLK_FREQ, +}; +#endif + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: pwm_getreg + * + * Description: + * Read the value of an PWM timer register. + * + * Input Parameters: + * priv - A reference to the PWM block status + * offset - The offset to the register to read + * + * Returned Value: + * The current contents of the specified register + * + ****************************************************************************/ + +static uint32_t pwm_getreg(struct kinetis_pwmtimer_s *priv, int offset) +{ + return getreg32(priv->base + offset); +} + +/**************************************************************************** + * Name: pwm_putreg + * + * Description: + * Read the value of an PWM timer register. + * + * Input Parameters: + * priv - A reference to the PWM block status + * offset - The offset to the register to read + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void pwm_putreg(struct kinetis_pwmtimer_s *priv, int offset, uint32_t value) +{ + putreg32(value, priv->base + offset); +} + +/**************************************************************************** + * Name: pwm_dumpregs + * + * Description: + * Dump all timer registers. + * + * Input parameters: + * priv - A reference to the PWM block status + * + * Returned Value: + * None + * + ****************************************************************************/ + +#ifdef CONFIG_DEBUG_PWM_INFO +static void pwm_dumpregs(struct kinetis_pwmtimer_s *priv, FAR const char *msg) +{ + int nchannels = (priv->tpmid == 0) ? 8 : 2; + + pwminfo("%s:\n", msg); + pwminfo(" FTM%d_SC: %04x FTM%d_CNT: %04x FTM%d_MOD: %04x\n", + priv->tpmid, + pwm_getreg(priv, KINETIS_FTM_SC_OFFSET), + priv->tpmid, + pwm_getreg(priv, KINETIS_FTM_CNT_OFFSET), + priv->tpmid, + pwm_getreg(priv, KINETIS_FTM_MOD_OFFSET)); + pwminfo(" FTM%d_STATUS: %04x FTM%d_CONF: %04x\n", + priv->tpmid, + pwm_getreg(priv, KINETIS_FTM_STATUS_OFFSET), + priv->tpmid, + pwm_getreg(priv, KINETIS_FTM_CONF_OFFSET)); + pwminfo(" FTM%d_C0SC: %04x FTM%d_C0V: %04x\n", + priv->tpmid, + pwm_getreg(priv, KINETIS_FTM_C0SC_OFFSET), + priv->tpmid, + pwm_getreg(priv, KINETIS_FTM_C0V_OFFSET)); + pwminfo(" FTM%d_C1SC: %04x FTM%d_C1V: %04x\n", + priv->tpmid, + pwm_getreg(priv, KINETIS_FTM_C1SC_OFFSET), + priv->tpmid, + pwm_getreg(priv, KINETIS_FTM_C1V_OFFSET)); + + if (nchannels >= 3) + { + pwminfo(" FTM%d_C2SC: %04x FTM%d_C2V: %04x\n", + priv->tpmid, + pwm_getreg(priv, KINETIS_FTM_C2SC_OFFSET), + priv->tpmid, + pwm_getreg(priv, KINETIS_FTM_C2V_OFFSET)); + } + + if (nchannels >= 4) + { + pwminfo(" FTM%d_C3SC: %04x FTM%d_C3V: %04x\n", + priv->tpmid, + pwm_getreg(priv, KINETIS_FTM_C3SC_OFFSET), + priv->tpmid, + pwm_getreg(priv, KINETIS_FTM_C3V_OFFSET)); + } + + if (nchannels >= 5) + { + pwminfo(" FTM%d_C4SC: %04x FTM%d_C4V: %04x\n", + priv->tpmid, + pwm_getreg(priv, KINETIS_FTM_C4SC_OFFSET), + priv->tpmid, + pwm_getreg(priv, KINETIS_FTM_C4V_OFFSET)); + } + + if (nchannels >= 6) + { + pwminfo(" FTM%d_C5SC: %04x FTM%d_C5V: %04x\n", + priv->tpmid, + pwm_getreg(priv, KINETIS_FTM_C5SC_OFFSET), + priv->tpmid, + pwm_getreg(priv, KINETIS_FTM_C5V_OFFSET)); + } + if (nchannels >= 7) + { + pwminfo(" FTM%d_C6SC: %04x FTM%d_C6V: %04x\n", + priv->tpmid, + pwm_getreg(priv, KINETIS_FTM_C6SC_OFFSET), + priv->tpmid, + pwm_getreg(priv, KINETIS_FTM_C6V_OFFSET)); + } + if (nchannels >= 8) + { + pwminfo(" FTM%d_C7SC: %04x FTM%d_C7V: %04x\n", + priv->tpmid, + pwm_getreg(priv, KINETIS_FTM_C7SC_OFFSET), + priv->tpmid, + pwm_getreg(priv, KINETIS_FTM_C7V_OFFSET)); + } +} +#endif + +/**************************************************************************** + * Name: pwm_timer + * + * Description: + * (Re-)initialize the timer resources and start the pulsed output + * + * Input parameters: + * priv - A reference to the lower half PWM driver state structure + * info - A reference to the characteristics of the pulsed output + * + * Returned Value: + * Zero on success; a negated errno value on failure + * + ****************************************************************************/ + +static int pwm_timer(FAR struct kinetis_pwmtimer_s *priv, + FAR const struct pwm_info_s *info) +{ + /* Calculated values */ + + uint32_t prescaler; + uint32_t tpmclk; + uint32_t modulo; + uint32_t regval; + uint32_t cv; + uint8_t i; + + static const uint8_t presc_values[8] = {1, 2, 4, 8, 16, 32, 64, 128}; + + /* Register contents */ + + DEBUGASSERT(priv != NULL && info != NULL); + + pwminfo("FTM%d channel: %d frequency: %d duty: %08x\n", + priv->tpmid, priv->channel, info->frequency, info->duty); + + DEBUGASSERT(info->frequency > 0 && info->duty > 0 && + info->duty < uitoub16(100)); + + /* Calculate optimal values for the timer prescaler and for the timer modulo + * register. If' frequency' is the desired frequency, then + * + * modulo = tpmclk / frequency + * tpmclk = pclk / presc + * + * Or, + * + * modulo = pclk / presc / frequency + * + * There are many solutions to do this, but the best solution will be the + * one that has the largest modulo value and the smallest prescaler value. + * That is the solution that should give us the most accuracy in the timer + * control. Subject to: + * + * 1 <= presc <= 128 (need to be 1, 2, 4, 8, 16, 32, 64, 128) + * 1 <= modulo <= 65535 + * + * So presc = pclk / 65535 / frequency would be optimal. + * + * Example: + * + * pclk = 24 MHz + * frequency = 100 Hz + * + * prescaler = 24,000,000 / 65,535 / 100 + * = 3.6 (or 4 -- taking the ceiling always) + * timclk = 24,000,000 / 4 + * = 6,000,000 + * modulo = 6,000,000 / 100 + * = 60,000 + */ + + prescaler = (priv->pclk / info->frequency + 65534) / 65535; + + for (i = 0; i < 7; i++) + { + if (prescaler <= presc_values[i]) + { + break; + } + } + + prescaler = i; + + tpmclk = priv->pclk / presc_values[prescaler]; + + modulo = tpmclk / info->frequency; + if (modulo < 1) + { + modulo = 1; + } + else if (modulo > 65535) + { + modulo = 65535; + } + + /* Duty cycle: + * + * duty cycle = cv / modulo (fractional value) + */ + + cv = b16toi(info->duty * modulo + b16HALF); + + pwminfo("FTM%d PCLK: %d frequency: %d FTMCLK: %d prescaler: %d modulo: %d c0v: %d\n", + priv->tpmid, priv->pclk, info->frequency, tpmclk, + presc_values[prescaler], modulo, cv); + + /* Disable FTM and reset CNT before writing MOD and PS */ + + pwm_putreg(priv, KINETIS_FTM_SC_OFFSET, FTM_SC_CLKS_NONE); + pwm_putreg(priv, KINETIS_FTM_CNT_OFFSET, 0); + + /* Set the modulo value */ + + pwm_putreg(priv, KINETIS_FTM_MOD_OFFSET, (uint16_t)modulo); + + /* Set the duty cycle for channel specific */ + + switch (priv->channel) + { + case 0: /* PWM Mode configuration: Channel 0 */ + { + pwm_putreg(priv, KINETIS_FTM_C0SC_OFFSET, FTM_CSC_MSB | FTM_CSC_ELSB); + pwm_putreg(priv, KINETIS_FTM_C0V_OFFSET, (uint16_t) cv); + } + break; + + case 1: /* PWM Mode configuration: Channel 1 */ + { + pwm_putreg(priv, KINETIS_FTM_C1SC_OFFSET, FTM_CSC_MSB | FTM_CSC_ELSB); + pwm_putreg(priv, KINETIS_FTM_C1V_OFFSET, (uint16_t) cv); + } + break; + + case 2: /* PWM Mode configuration: Channel 2 */ + { + pwm_putreg(priv, KINETIS_FTM_C2SC_OFFSET, FTM_CSC_MSB | FTM_CSC_ELSB); + pwm_putreg(priv, KINETIS_FTM_C2V_OFFSET, (uint16_t) cv); + } + break; + + case 3: /* PWM Mode configuration: Channel 3 */ + { + pwm_putreg(priv, KINETIS_FTM_C3SC_OFFSET, FTM_CSC_MSB | FTM_CSC_ELSB); + pwm_putreg(priv, KINETIS_FTM_C3V_OFFSET, (uint16_t) cv); + } + break; + + case 4: /* PWM Mode configuration: Channel 4 */ + { + pwm_putreg(priv, KINETIS_FTM_C4SC_OFFSET, FTM_CSC_MSB | FTM_CSC_ELSB); + pwm_putreg(priv, KINETIS_FTM_C4V_OFFSET, (uint16_t) cv); + } + break; + + case 5: /* PWM Mode configuration: Channel 5 */ + { + pwm_putreg(priv, KINETIS_FTM_C5SC_OFFSET, FTM_CSC_MSB | FTM_CSC_ELSB); + pwm_putreg(priv, KINETIS_FTM_C5V_OFFSET, (uint16_t) cv); + } + break; + + case 6: /* PWM Mode configuration: Channel 6 */ + { + pwm_putreg(priv, KINETIS_FTM_C6SC_OFFSET, FTM_CSC_MSB | FTM_CSC_ELSB); + pwm_putreg(priv, KINETIS_FTM_C6V_OFFSET, (uint16_t) cv); + } + break; + case 7: /* PWM Mode configuration: Channel 7 */ + { + pwm_putreg(priv, KINETIS_FTM_C7SC_OFFSET, FTM_CSC_MSB | FTM_CSC_ELSB); + pwm_putreg(priv, KINETIS_FTM_C7V_OFFSET, (uint16_t) cv); + } + break; + + default: + pwmerr("ERROR: No such channel: %d\n", priv->channel); + return -EINVAL; + } + + /* Set prescaler and enable clock */ + + regval = pwm_getreg(priv, KINETIS_FTM_SC_OFFSET); + regval &= ~(FTM_SC_PS_MASK); + regval &= ~(FTM_SC_CLKS_MASK); + regval |= prescaler | FTM_SC_CLKS_SYSCLK; + pwm_putreg(priv, KINETIS_FTM_SC_OFFSET, (uint16_t)regval); + + pwm_dumpregs(priv, "After starting"); + return OK; +} + +/**************************************************************************** + * Name: pwm_setup + * + * Description: + * This method is called when the driver is opened. The lower half driver + * should configure and initialize the device so that it is ready for use. + * It should not, however, output pulses until the start method is called. + * + * Input parameters: + * dev - A reference to the lower half PWM driver state structure + * + * Returned Value: + * Zero on success; a negated errno value on failure + * + * Assumptions: + * AHB1 or 2 clocking for the GPIOs and timer has already been configured + * by the RCC logic at power up. + * + ****************************************************************************/ + +static int pwm_setup(FAR struct pwm_lowerhalf_s *dev) +{ + uint32_t regval; + FAR struct kinetis_pwmtimer_s *priv = (FAR struct kinetis_pwmtimer_s *)dev; + + /* Enable access to FTM modules */ + + regval = getreg32(KINETIS_SIM_SCGC6); + regval |= SIM_SCGC6_FTM0 | SIM_SCGC6_FTM1; + putreg32(regval, KINETIS_SIM_SCGC6); + + regval = getreg32(KINETIS_SIM_SCGC3); + regval |= SIM_SCGC3_FTM2; + putreg32(regval, KINETIS_SIM_SCGC3); + + pwminfo("FTM%d pincfg: %08x\n", priv->tpmid, priv->pincfg); + pwm_dumpregs(priv, "Initially"); + + /* Configure the PWM output pin, but do not start the timer yet */ + + kinetis_pinconfig(priv->pincfg); + pwm_dumpgpio(priv->pincfg, "PWM setup"); + return OK; +} + +/**************************************************************************** + * Name: pwm_shutdown + * + * Description: + * This method is called when the driver is closed. The lower half driver + * stop pulsed output, free any resources, disable the timer hardware, and + * put the system into the lowest possible power usage state + * + * Input parameters: + * dev - A reference to the lower half PWM driver state structure + * + * Returned Value: + * Zero on success; a negated errno value on failure + * + ****************************************************************************/ + +static int pwm_shutdown(FAR struct pwm_lowerhalf_s *dev) +{ + FAR struct kinetis_pwmtimer_s *priv = (FAR struct kinetis_pwmtimer_s *)dev; + uint32_t pincfg; + + pwminfo("FTM%d pincfg: %08x\n", priv->tpmid, priv->pincfg); + + /* Make sure that the output has been stopped */ + + pwm_stop(dev); + + /* Then put the GPIO pin back to the default state */ + + pincfg = (priv->pincfg & ~(_PIN_MODE_MASK)); + pincfg |= GPIO_INPUT; + kinetis_pinconfig(pincfg); + return OK; +} + +/**************************************************************************** + * Name: pwm_start + * + * Description: + * (Re-)initialize the timer resources and start the pulsed output + * + * Input parameters: + * dev - A reference to the lower half PWM driver state structure + * info - A reference to the characteristics of the pulsed output + * + * Returned Value: + * Zero on success; a negated errno value on failure + * + ****************************************************************************/ + +static int pwm_start(FAR struct pwm_lowerhalf_s *dev, + FAR const struct pwm_info_s *info) +{ + FAR struct kinetis_pwmtimer_s *priv = (FAR struct kinetis_pwmtimer_s *)dev; + return pwm_timer(priv, info); +} + +/**************************************************************************** + * Name: pwm_stop + * + * Description: + * Stop the pulsed output and reset the timer resources + * + * Input parameters: + * dev - A reference to the lower half PWM driver state structure + * + * Returned Value: + * Zero on success; a negated errno value on failure + * + * Assumptions: + * This function is called to stop the pulsed output at anytime. This + * method is also called from the timer interrupt handler when a repetition + * count expires... automatically stopping the timer. + * + ****************************************************************************/ + +static int pwm_stop(FAR struct pwm_lowerhalf_s *dev) +{ + FAR struct kinetis_pwmtimer_s *priv = (FAR struct kinetis_pwmtimer_s *)dev; + irqstate_t flags; + + pwminfo("FTM%d\n", priv->tpmid); + + /* Disable interrupts momentary to stop any ongoing timer processing and + * to prevent any concurrent access to the reset register. + */ + + flags = enter_critical_section(); + + /* Disable further interrupts and stop the timer */ + + pwm_putreg(priv, KINETIS_FTM_SC_OFFSET, FTM_SC_CLKS_NONE); + pwm_putreg(priv, KINETIS_FTM_CNT_OFFSET, 0); + + /* Determine which timer channel to clear */ + + switch (priv->channel) + { + case 0: + pwm_putreg(priv, KINETIS_FTM_C0V_OFFSET, 0); + break; + + case 1: + pwm_putreg(priv, KINETIS_FTM_C1V_OFFSET, 0); + break; + + case 2: + pwm_putreg(priv, KINETIS_FTM_C2V_OFFSET, 0); + break; + + case 3: + pwm_putreg(priv, KINETIS_FTM_C3V_OFFSET, 0); + break; + + case 4: + pwm_putreg(priv, KINETIS_FTM_C4V_OFFSET, 0); + break; + + case 5: + pwm_putreg(priv, KINETIS_FTM_C5V_OFFSET, 0); + break; + + case 6: + pwm_putreg(priv, KINETIS_FTM_C6V_OFFSET, 0); + break; + + case 7: + pwm_putreg(priv, KINETIS_FTM_C7V_OFFSET, 0); + break; + + default: + pwmerr("ERROR: No such channel: %d\n", priv->channel); + return -EINVAL; + } + + leave_critical_section(flags); + + pwm_dumpregs(priv, "After stop"); + return OK; +} + +/**************************************************************************** + * Name: pwm_ioctl + * + * Description: + * Lower-half logic may support platform-specific ioctl commands + * + * Input parameters: + * dev - A reference to the lower half PWM driver state structure + * cmd - The ioctl command + * arg - The argument accompanying the ioctl command + * + * Returned Value: + * Zero on success; a negated errno value on failure + * + ****************************************************************************/ + +static int pwm_ioctl(FAR struct pwm_lowerhalf_s *dev, int cmd, unsigned long arg) +{ +#ifdef CONFIG_DEBUG_PWM_INFO + FAR struct kinetis_pwmtimer_s *priv = (FAR struct kinetis_pwmtimer_s *)dev; + + /* There are no platform-specific ioctl commands */ + + pwminfo("FTM%d\n", priv->tpmid); +#endif + return -ENOTTY; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: kinetis_pwminitialize + * + * Description: + * Initialize one timer for use with the upper_level PWM driver. + * + * Input Parameters: + * timer - A number identifying the timer use. + * + * Returned Value: + * On success, a pointer to the kinetis lower half PWM driver is returned. + * NULL is returned on any failure. + * + ****************************************************************************/ + +FAR struct pwm_lowerhalf_s *kinetis_pwminitialize(int timer) +{ + FAR struct kinetis_pwmtimer_s *lower; + + pwminfo("FTM%d\n", timer); + + switch (timer) + { +#ifdef CONFIG_KINETIS_FTM0_PWM + case 0: + lower = &g_pwm0dev; + + break; +#endif + +#ifdef CONFIG_KINETIS_FTM1_PWM + case 1: + lower = &g_pwm1dev; + + break; +#endif + +#ifdef CONFIG_KINETIS_FTM2_PWM + case 2: + lower = &g_pwm2dev; + + break; +#endif + + default: + pwmerr("ERROR: No such timer configured\n"); + return NULL; + } + + return (FAR struct pwm_lowerhalf_s *)lower; +} + +#endif /* CONFIG_KINETIS_FTMn_PWM, n = 0,...,2 */ diff --git a/arch/arm/src/kinetis/kinetis_pwm.h b/arch/arm/src/kinetis/kinetis_pwm.h new file mode 100644 index 0000000000000000000000000000000000000000..09508d4bfea7a1433bb7865600a1d924c4fa4e63 --- /dev/null +++ b/arch/arm/src/kinetis/kinetis_pwm.h @@ -0,0 +1,198 @@ +/************************************************************************************ + * arch/arm/src/kinetis/kinetis_pwm.h + * + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * Alan Carvalho de Assis + * Ken Fazzone + * + * 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_KINETIS_KINETIS_PWM_H +#define __ARCH_ARM_SRC_KINETIS_KINETIS_PWM_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "chip.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Configuration ********************************************************************/ +/* Timer devices may be used for different purposes. One special purpose is + * to generate modulated outputs for such things as motor control. If CONFIG_KINETIS_FTMn + * is defined then the CONFIG_KINETIS_FTMn_PWM must also be defined to indicate that + * timer "n" is intended to be used for pulsed output signal generation. + */ + +#ifndef CONFIG_KINETIS_FTM0 +# undef CONFIG_KINETIS_FTM0_PWM +#endif +#ifndef CONFIG_KINETIS_FTM1 +# undef CONFIG_KINETIS_FTM1_PWM +#endif +#ifndef CONFIG_KINETIS_FTM2 +# undef CONFIG_KINETIS_FTM2_PWM +#endif + +/* Check if PWM support for any channel is enabled. */ + +#if defined(CONFIG_KINETIS_FTM0_PWM) || defined(CONFIG_KINETIS_FTM1_PWM) || \ + defined(CONFIG_KINETIS_FTM2_PWM) + +#include +#include "kinetis_pinmux.h" + +/* For each timer that is enabled for PWM usage, we need the following additional + * configuration settings: + * + * CONFIG_KINETIS_FTMx_CHANNEL - Specifies the timer output channel {1,..,4} + * PWM_FTMx_CHn - One of the values defined in kinetis*_pinmap.h. In the case + * where there are multiple pin selections, the correct setting must be provided + * in the arch/board/board.h file. + */ + +#ifdef CONFIG_KINETIS_FTM0_PWM +# if !defined(CONFIG_KINETIS_FTM0_CHANNEL) +# error "CONFIG_KINETIS_FTM0_CHANNEL must be provided" +# elif CONFIG_KINETIS_FTM0_CHANNEL == 0 +# define PWM_FTM0_PINCFG GPIO_FTM0_CH0OUT +# elif CONFIG_KINETIS_FTM0_CHANNEL == 1 +# define PWM_FTM0_PINCFG GPIO_FTM0_CH1OUT +# elif CONFIG_KINETIS_FTM0_CHANNEL == 2 +# define PWM_FTM0_PINCFG GPIO_FTM0_CH2OUT +# elif CONFIG_KINETIS_FTM0_CHANNEL == 3 +# define PWM_FTM0_PINCFG GPIO_FTM0_CH3OUT +# elif CONFIG_KINETIS_FTM0_CHANNEL == 4 +# define PWM_FTM0_PINCFG GPIO_FTM0_CH4OUT +# elif CONFIG_KINETIS_FTM0_CHANNEL == 5 +# define PWM_FTM0_PINCFG GPIO_FTM0_CH5OUT +# elif CONFIG_KINETIS_FTM0_CHANNEL == 6 +# define PWM_FTM0_PINCFG GPIO_FTM0_CH6OUT +# elif CONFIG_KINETIS_FTM0_CHANNEL == 7 +# define PWM_FTM0_PINCFG GPIO_FTM0_CH7OUT +# else +# error "Unsupported value of CONFIG_KINETIS_FTM1_CHANNEL" +# endif +#endif + +#ifdef CONFIG_KINETIS_FTM1_PWM +# if !defined(CONFIG_KINETIS_FTM1_CHANNEL) +# error "CONFIG_KINETIS_FTM1_CHANNEL must be provided" +# elif CONFIG_KINETIS_FTM1_CHANNEL == 0 +# define PWM_FTM1_PINCFG GPIO_FTM1_CH0OUT +# elif CONFIG_KINETIS_FTM1_CHANNEL == 1 +# define PWM_FTM1_PINCFG GPIO_FTM1_CH1OUT +# elif CONFIG_KINETIS_FTM1_CHANNEL == 2 +# define PWM_FTM1_PINCFG GPIO_FTM1_CH2OUT +# elif CONFIG_KINETIS_FTM1_CHANNEL == 3 +# define PWM_FTM1_PINCFG GPIO_FTM1_CH3OUT +# elif CONFIG_KINETIS_FTM1_CHANNEL == 4 +# define PWM_FTM1_PINCFG GPIO_FTM1_CH4OUT +# elif CONFIG_KINETIS_FTM1_CHANNEL == 5 +# define PWM_FTM1_PINCFG GPIO_FTM1_CH5OUT +# else +# error "Unsupported value of CONFIG_KINETIS_FTM2_CHANNEL" +# endif +#endif + +#ifdef CONFIG_KINETIS_FTM2_PWM +# if !defined(CONFIG_KINETIS_FTM2_CHANNEL) +# error "CONFIG_KINETIS_FTM2_CHANNEL must be provided" +# elif CONFIG_KINETIS_FTM2_CHANNEL == 0 +# define PWM_FTM2_PINCFG GPIO_FTM2_CH0OUT +# elif CONFIG_KINETIS_FTM2_CHANNEL == 1 +# define PWM_FTM2_PINCFG GPIO_FTM2_CH1OUT +# elif CONFIG_KINETIS_FTM2_CHANNEL == 2 +# define PWM_FTM2_PINCFG GPIO_FTM2_CH2OUT +# elif CONFIG_KINETIS_FTM2_CHANNEL == 3 +# define PWM_FTM2_PINCFG GPIO_FTM2_CH3OUT +# elif CONFIG_KINETIS_FTM2_CHANNEL == 4 +# define PWM_FTM2_PINCFG GPIO_FTM2_CH4OUT +# elif CONFIG_KINETIS_FTM2_CHANNEL == 5 +# define PWM_FTM2_PINCFG GPIO_FTM2_CH5OUT +# else +# error "Unsupported value of CONFIG_KINETIS_FTM3_CHANNEL" +# endif +#endif + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +#ifndef __ASSEMBLY__ + +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: kinetis_pwminitialize + * + * Description: + * Initialize one timer for use with the upper_level PWM driver. + * + * Input Parameters: + * timer - A number identifying the timer use. + * + * Returned Value: + * On success, a pointer to the kinetis lower half PWM driver is returned. + * NULL is returned on any failure. + * + ************************************************************************************/ + +FAR struct pwm_lowerhalf_s *kinetis_pwminitialize(int timer); + +#undef EXTERN +#if defined(__cplusplus) +} +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* CONFIG_KINETIS_FTMx_PWM */ +#endif /* __ARCH_ARM_SRC_KINETIS_KINETIS_PWM_H */ diff --git a/arch/arm/src/kinetis/kinetis_sdhc.c b/arch/arm/src/kinetis/kinetis_sdhc.c index 7841cc1ad59e7e3ec842515f39fcc8f61d2aa709..aff35be9b4d8fc82346d9c92666c3b7ff8fce837 100644 --- a/arch/arm/src/kinetis/kinetis_sdhc.c +++ b/arch/arm/src/kinetis/kinetis_sdhc.c @@ -89,7 +89,7 @@ # define CONFIG_KINETIS_SDHC_DMAPRIO DMA_CCR_PRIMED #endif -#if !defined(CONFIG_DEBUG_FS) || !defined(CONFIG_DEBUG_VERBOSE) +#ifndef CONFIG_DEBUG_MEMCARD_INFO # undef CONFIG_SDIO_XFRDEBUG #endif @@ -574,29 +574,29 @@ static void kinetis_sample(struct kinetis_dev_s *priv, int index) static void kinetis_dumpsample(struct kinetis_dev_s *priv, struct kinetis_sdhcregs_s *regs, const char *msg) { - fdbg("SDHC Registers: %s\n", msg); - fdbg(" DSADDR[%08x]: %08x\n", KINETIS_SDHC_DSADDR, regs->dsaddr); - fdbg(" BLKATTR[%08x]: %08x\n", KINETIS_SDHC_BLKATTR, regs->blkattr); - fdbg(" CMDARG[%08x]: %08x\n", KINETIS_SDHC_CMDARG, regs->cmdarg); - fdbg(" XFERTY[%08x]: %08x\n", KINETIS_SDHC_XFERTYP, regs->xferty); - fdbg(" CMDRSP0[%08x]: %08x\n", KINETIS_SDHC_CMDRSP0, regs->cmdrsp0); - fdbg(" CMDRSP1[%08x]: %08x\n", KINETIS_SDHC_CMDRSP1, regs->cmdrsp1); - fdbg(" CMDRSP2[%08x]: %08x\n", KINETIS_SDHC_CMDRSP2, regs->cmdrsp2); - fdbg(" CMDRSP3[%08x]: %08x\n", KINETIS_SDHC_CMDRSP3, regs->cmdrsp3); - fdbg(" PRSSTAT[%08x]: %08x\n", KINETIS_SDHC_PRSSTAT, regs->prsstat); - fdbg(" PROCTL[%08x]: %08x\n", KINETIS_SDHC_PROCTL, regs->proctl); - fdbg(" SYSCTL[%08x]: %08x\n", KINETIS_SDHC_SYSCTL, regs->sysctl); - fdbg(" IRQSTAT[%08x]: %08x\n", KINETIS_SDHC_IRQSTAT, regs->irqstat); - fdbg("IRQSTATEN[%08x]: %08x\n", KINETIS_SDHC_IRQSTATEN, regs->irqstaten); - fdbg(" IRQSIGEN[%08x]: %08x\n", KINETIS_SDHC_IRQSIGEN, regs->irqsigen); - fdbg(" AC12ERR[%08x]: %08x\n", KINETIS_SDHC_AC12ERR, regs->ac12err); - fdbg(" HTCAPBLT[%08x]: %08x\n", KINETIS_SDHC_HTCAPBLT, regs->htcapblt); - fdbg(" WML[%08x]: %08x\n", KINETIS_SDHC_WML, regs->wml); - fdbg(" ADMAES[%08x]: %08x\n", KINETIS_SDHC_ADMAES, regs->admaes); - fdbg(" ADSADDR[%08x]: %08x\n", KINETIS_SDHC_ADSADDR, regs->adsaddr); - fdbg(" VENDOR[%08x]: %08x\n", KINETIS_SDHC_VENDOR, regs->vendor); - fdbg(" MMCBOOT[%08x]: %08x\n", KINETIS_SDHC_MMCBOOT, regs->mmcboot); - fdbg(" HOSTVER[%08x]: %08x\n", KINETIS_SDHC_HOSTVER, regs->hostver); + mcinfo("SDHC Registers: %s\n", msg); + mcinfo(" DSADDR[%08x]: %08x\n", KINETIS_SDHC_DSADDR, regs->dsaddr); + mcinfo(" BLKATTR[%08x]: %08x\n", KINETIS_SDHC_BLKATTR, regs->blkattr); + mcinfo(" CMDARG[%08x]: %08x\n", KINETIS_SDHC_CMDARG, regs->cmdarg); + mcinfo(" XFERTY[%08x]: %08x\n", KINETIS_SDHC_XFERTYP, regs->xferty); + mcinfo(" CMDRSP0[%08x]: %08x\n", KINETIS_SDHC_CMDRSP0, regs->cmdrsp0); + mcinfo(" CMDRSP1[%08x]: %08x\n", KINETIS_SDHC_CMDRSP1, regs->cmdrsp1); + mcinfo(" CMDRSP2[%08x]: %08x\n", KINETIS_SDHC_CMDRSP2, regs->cmdrsp2); + mcinfo(" CMDRSP3[%08x]: %08x\n", KINETIS_SDHC_CMDRSP3, regs->cmdrsp3); + mcinfo(" PRSSTAT[%08x]: %08x\n", KINETIS_SDHC_PRSSTAT, regs->prsstat); + mcinfo(" PROCTL[%08x]: %08x\n", KINETIS_SDHC_PROCTL, regs->proctl); + mcinfo(" SYSCTL[%08x]: %08x\n", KINETIS_SDHC_SYSCTL, regs->sysctl); + mcinfo(" IRQSTAT[%08x]: %08x\n", KINETIS_SDHC_IRQSTAT, regs->irqstat); + mcinfo("IRQSTATEN[%08x]: %08x\n", KINETIS_SDHC_IRQSTATEN, regs->irqstaten); + mcinfo(" IRQSIGEN[%08x]: %08x\n", KINETIS_SDHC_IRQSIGEN, regs->irqsigen); + mcinfo(" AC12ERR[%08x]: %08x\n", KINETIS_SDHC_AC12ERR, regs->ac12err); + mcinfo(" HTCAPBLT[%08x]: %08x\n", KINETIS_SDHC_HTCAPBLT, regs->htcapblt); + mcinfo(" WML[%08x]: %08x\n", KINETIS_SDHC_WML, regs->wml); + mcinfo(" ADMAES[%08x]: %08x\n", KINETIS_SDHC_ADMAES, regs->admaes); + mcinfo(" ADSADDR[%08x]: %08x\n", KINETIS_SDHC_ADSADDR, regs->adsaddr); + mcinfo(" VENDOR[%08x]: %08x\n", KINETIS_SDHC_VENDOR, regs->vendor); + mcinfo(" MMCBOOT[%08x]: %08x\n", KINETIS_SDHC_MMCBOOT, regs->mmcboot); + mcinfo(" HOSTVER[%08x]: %08x\n", KINETIS_SDHC_HOSTVER, regs->hostver); } #endif @@ -791,8 +791,8 @@ static void kinetis_transmit(struct kinetis_dev_s *priv) * ready (BWR) */ - fllvdbg("Entry: remaining: %d IRQSTAT: %08x\n", - priv->remaining, getreg32(KINETIS_SDHC_IRQSTAT)); + mcinfo("Entry: remaining: %d IRQSTAT: %08x\n", + priv->remaining, getreg32(KINETIS_SDHC_IRQSTAT)); while (priv->remaining > 0 && (getreg32(KINETIS_SDHC_IRQSTAT) & SDHC_INT_BWR) != 0) @@ -837,9 +837,8 @@ static void kinetis_transmit(struct kinetis_dev_s *priv) putreg32(data.w, KINETIS_SDHC_DATPORT); } - fllvdbg("Exit: remaining: %d IRQSTAT: %08x\n", - priv->remaining, getreg32(KINETIS_SDHC_IRQSTAT)); - + mcinfo("Exit: remaining: %d IRQSTAT: %08x\n", + priv->remaining, getreg32(KINETIS_SDHC_IRQSTAT)); } #endif @@ -877,8 +876,8 @@ static void kinetis_receive(struct kinetis_dev_s *priv) * ready (BRR) */ - fllvdbg("Entry: remaining: %d IRQSTAT: %08x\n", - priv->remaining, getreg32(KINETIS_SDHC_IRQSTAT)); + mcinfo("Entry: remaining: %d IRQSTAT: %08x\n", + priv->remaining, getreg32(KINETIS_SDHC_IRQSTAT)); while (priv->remaining > 0 && (getreg32(KINETIS_SDHC_IRQSTAT) & SDHC_INT_BRR) != 0) @@ -929,10 +928,9 @@ static void kinetis_receive(struct kinetis_dev_s *priv) putreg32(watermark << SDHC_WML_RD_SHIFT, KINETIS_SDHC_WML); - fllvdbg("Exit: remaining: %d IRQSTAT: %08x WML: %08x\n", - priv->remaining, getreg32(KINETIS_SDHC_IRQSTAT), - getreg32(KINETIS_SDHC_WML)); - + mcinfo("Exit: remaining: %d IRQSTAT: %08x WML: %08x\n", + priv->remaining, getreg32(KINETIS_SDHC_IRQSTAT), + getreg32(KINETIS_SDHC_WML)); } #endif @@ -973,7 +971,7 @@ static void kinetis_eventtimeout(int argc, uint32_t arg) /* Wake up any waiting threads */ kinetis_endwait(priv, SDIOWAIT_TIMEOUT); - flldbg("Timeout: remaining: %d\n", priv->remaining); + mcerr("ERROR: Timeout: remaining: %d\n", priv->remaining); } } @@ -1105,8 +1103,8 @@ static int kinetis_interrupt(int irq, void *context) regval = getreg32(KINETIS_SDHC_IRQSIGEN); enabled = getreg32(KINETIS_SDHC_IRQSTAT) & regval; - fllvdbg("IRQSTAT: %08x IRQSIGEN %08x enabled: %08x\n", - getreg32(KINETIS_SDHC_IRQSTAT), regval, enabled); + mcinfo("IRQSTAT: %08x IRQSIGEN %08x enabled: %08x\n", + getreg32(KINETIS_SDHC_IRQSTAT), regval, enabled); /* Disable card interrupts to clear the card interrupt to the host system. */ @@ -1162,7 +1160,7 @@ static int kinetis_interrupt(int irq, void *context) { /* Terminate the transfer with an error */ - flldbg("ERROR: Data block CRC failure, remaining: %d\n", priv->remaining); + mcerr("ERROR: Data block CRC failure, remaining: %d\n", priv->remaining); kinetis_endtransfer(priv, SDIOWAIT_TRANSFERDONE | SDIOWAIT_ERROR); } @@ -1172,7 +1170,7 @@ static int kinetis_interrupt(int irq, void *context) { /* Terminate the transfer with an error */ - flldbg("ERROR: Data timeout, remaining: %d\n", priv->remaining); + mcerr("ERROR: Data timeout, remaining: %d\n", priv->remaining); kinetis_endtransfer(priv, SDIOWAIT_TRANSFERDONE | SDIOWAIT_TIMEOUT); } } @@ -1289,9 +1287,9 @@ static void kinetis_reset(FAR struct sdio_dev_s *dev) putreg32(SDHC_INT_ALL, KINETIS_SDHC_IRQSTATEN); - fvdbg("SYSCTL: %08x PRSSTAT: %08x IRQSTATEN: %08x\n", - getreg32(KINETIS_SDHC_SYSCTL), getreg32(KINETIS_SDHC_PRSSTAT), - getreg32(KINETIS_SDHC_IRQSTATEN)); + mcinfo("SYSCTL: %08x PRSSTAT: %08x IRQSTATEN: %08x\n", + getreg32(KINETIS_SDHC_SYSCTL), getreg32(KINETIS_SDHC_PRSSTAT), + getreg32(KINETIS_SDHC_IRQSTATEN)); /* The next phase of the hardware reset would be to set the SYSCTRL INITA * bit to send 80 clock ticks for card to power up and then reset the card @@ -1504,7 +1502,7 @@ static void kinetis_frequency(FAR struct sdio_dev_s *dev, uint32_t frequency) regval |= (SDHC_SYSCTL_SDCLKEN | SDHC_SYSCTL_PEREN | SDHC_SYSCTL_HCKEN | SDHC_SYSCTL_IPGEN); putreg32(regval, KINETIS_SDHC_SYSCTL); - fvdbg("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL)); + mcinfo("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL)); } #endif @@ -1538,7 +1536,7 @@ static void kinetis_clock(FAR struct sdio_dev_s *dev, enum sdio_clock_e rate) regval = getreg32(KINETIS_SDHC_SYSCTL); regval &= ~SDHC_SYSCTL_SDCLKEN; putreg32(regval, KINETIS_SDHC_SYSCTL); - fvdbg("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL)); + mcinfo("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL)); switch (rate) { @@ -1552,7 +1550,7 @@ static void kinetis_clock(FAR struct sdio_dev_s *dev, enum sdio_clock_e rate) regval &= ~(SDHC_SYSCTL_IPGEN | SDHC_SYSCTL_HCKEN | SDHC_SYSCTL_PEREN | SDHC_SYSCTL_SDCLKFS_MASK | SDHC_SYSCTL_DVS_MASK); putreg32(regval, KINETIS_SDHC_SYSCTL); - fvdbg("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL)); + mcinfo("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL)); return; } @@ -1593,7 +1591,7 @@ static void kinetis_clock(FAR struct sdio_dev_s *dev, enum sdio_clock_e rate) regval = getreg32(KINETIS_SDHC_SYSCTL); regval &= ~SDHC_SYSCTL_SDCLKEN; putreg32(regval, KINETIS_SDHC_SYSCTL); - fvdbg("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL)); + mcinfo("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL)); /* Clear the old prescaler and divisor values so that new ones can be ORed * in. @@ -1619,7 +1617,7 @@ static void kinetis_clock(FAR struct sdio_dev_s *dev, enum sdio_clock_e rate) regval &= ~(SDHC_SYSCTL_IPGEN | SDHC_SYSCTL_HCKEN | SDHC_SYSCTL_PEREN); putreg32(regval, KINETIS_SDHC_SYSCTL); - fvdbg("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL)); + mcinfo("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL)); return; } @@ -1653,7 +1651,7 @@ static void kinetis_clock(FAR struct sdio_dev_s *dev, enum sdio_clock_e rate) } putreg32(regval, KINETIS_SDHC_SYSCTL); - fvdbg("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL)); + mcinfo("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL)); } #endif @@ -1824,7 +1822,7 @@ static int kinetis_sendcmd(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t ar /* Other bits? What about CMDTYP? */ - fvdbg("cmd: %08x arg: %08x regval: %08x\n", cmd, arg, regval); + mcinfo("cmd: %08x arg: %08x regval: %08x\n", cmd, arg, regval); /* The Command Inhibit (CIHB) bit is set in the PRSSTAT bit immediately * after the transfer type register is written. This bit is cleared when @@ -1840,8 +1838,8 @@ static int kinetis_sendcmd(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t ar { if (--timeout <= 0) { - fdbg("ERROR: Timeout cmd: %08x PRSSTAT: %08x\n", - cmd, getreg32(KINETIS_SDHC_PRSSTAT)); + mcerr("ERROR: Timeout cmd: %08x PRSSTAT: %08x\n", + cmd, getreg32(KINETIS_SDHC_PRSSTAT)); return -EBUSY; } @@ -2079,8 +2077,8 @@ static int kinetis_waitresponse(FAR struct sdio_dev_s *dev, uint32_t cmd) { if (--timeout <= 0) { - fdbg("ERROR: Timeout cmd: %08x IRQSTAT: %08x\n", - cmd, getreg32(KINETIS_SDHC_IRQSTAT)); + mcerr("ERROR: Timeout cmd: %08x IRQSTAT: %08x\n", + cmd, getreg32(KINETIS_SDHC_IRQSTAT)); return -ETIMEDOUT; } @@ -2090,8 +2088,8 @@ static int kinetis_waitresponse(FAR struct sdio_dev_s *dev, uint32_t cmd) if ((getreg32(KINETIS_SDHC_IRQSTAT) & errors) != 0) { - fdbg("ERROR: cmd: %08x errors: %08x IRQSTAT: %08x\n", - cmd, errors, getreg32(KINETIS_SDHC_IRQSTAT)); + mcerr("ERROR: cmd: %08x errors: %08x IRQSTAT: %08x\n", + cmd, errors, getreg32(KINETIS_SDHC_IRQSTAT)); ret = -EIO; } @@ -2152,10 +2150,10 @@ static int kinetis_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd, */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!rshort) { - fdbg("ERROR: rshort=NULL\n"); + mcerr("ERROR: rshort=NULL\n"); ret = -EINVAL; } @@ -2165,7 +2163,7 @@ static int kinetis_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd, (cmd & MMCSD_RESPONSE_MASK) != MMCSD_R1B_RESPONSE && (cmd & MMCSD_RESPONSE_MASK) != MMCSD_R6_RESPONSE) { - fdbg("ERROR: Wrong response CMD=%08x\n", cmd); + mcerr("ERROR: Wrong response CMD=%08x\n", cmd); ret = -EINVAL; } else @@ -2176,12 +2174,12 @@ static int kinetis_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd, regval = getreg32(KINETIS_SDHC_IRQSTAT); if ((regval & SDHC_INT_CTOE) != 0) { - fdbg("ERROR: Command timeout: %08x\n", regval); + mcerr("ERROR: Command timeout: %08x\n", regval); ret = -ETIMEDOUT; } else if ((regval & SDHC_INT_CCE) != 0) { - fdbg("ERROR: CRC failure: %08x\n", regval); + mcerr("ERROR: CRC failure: %08x\n", regval); ret = -EIO; } } @@ -2209,12 +2207,12 @@ static int kinetis_recvlong(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t r * 0 1 End bit */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Check that R1 is the correct response to this command */ if ((cmd & MMCSD_RESPONSE_MASK) != MMCSD_R2_RESPONSE) { - fdbg("ERROR: Wrong response CMD=%08x\n", cmd); + mcerr("ERROR: Wrong response CMD=%08x\n", cmd); ret = -EINVAL; } else @@ -2225,12 +2223,12 @@ static int kinetis_recvlong(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t r regval = getreg32(KINETIS_SDHC_IRQSTAT); if (regval & SDHC_INT_CTOE) { - fdbg("ERROR: Timeout IRQSTAT: %08x\n", regval); + mcerr("ERROR: Timeout IRQSTAT: %08x\n", regval); ret = -ETIMEDOUT; } else if (regval & SDHC_INT_CCE) { - fdbg("ERROR: CRC fail IRQSTAT: %08x\n", regval); + mcerr("ERROR: CRC fail IRQSTAT: %08x\n", regval); ret = -EIO; } } @@ -2263,11 +2261,11 @@ static int kinetis_recvshort(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t /* Check that this is the correct response to this command */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if ((cmd & MMCSD_RESPONSE_MASK) != MMCSD_R3_RESPONSE && (cmd & MMCSD_RESPONSE_MASK) != MMCSD_R7_RESPONSE) { - fdbg("ERROR: Wrong response CMD=%08x\n", cmd); + mcerr("ERROR: Wrong response CMD=%08x\n", cmd); ret = -EINVAL; } else @@ -2280,7 +2278,7 @@ static int kinetis_recvshort(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t regval = getreg32(KINETIS_SDHC_IRQSTAT); if (regval & SDHC_INT_CTOE) { - fdbg("ERROR: Timeout IRQSTAT: %08x\n", regval); + mcerr("ERROR: Timeout IRQSTAT: %08x\n", regval); ret = -ETIMEDOUT; } } @@ -2416,7 +2414,7 @@ static sdio_eventset_t kinetis_eventwait(FAR struct sdio_dev_s *dev, 1, (uint32_t)priv); if (ret != OK) { - fdbg("ERROR: wd_start failed: %d\n", ret); + mcerr("ERROR: wd_start failed: %d\n", ret); } } @@ -2486,7 +2484,7 @@ static void kinetis_callbackenable(FAR struct sdio_dev_s *dev, { struct kinetis_dev_s *priv = (struct kinetis_dev_s *)dev; - fvdbg("eventset: %02x\n", eventset); + mcinfo("eventset: %02x\n", eventset); DEBUGASSERT(priv != NULL); priv->cbevents = eventset; @@ -2522,7 +2520,7 @@ static int kinetis_registercallback(FAR struct sdio_dev_s *dev, /* Disable callbacks and register this callback and is argument */ - fvdbg("Register %p(%p)\n", callback, arg); + mcinfo("Register %p(%p)\n", callback, arg); DEBUGASSERT(priv != NULL); priv->cbevents = 0; @@ -2694,8 +2692,8 @@ static void kinetis_callback(void *arg) /* Is a callback registered? */ DEBUGASSERT(priv != NULL); - fvdbg("Callback %p(%p) cbevents: %02x cdstatus: %02x\n", - priv->callback, priv->cbarg, priv->cbevents, priv->cdstatus); + mcinfo("Callback %p(%p) cbevents: %02x cdstatus: %02x\n", + priv->callback, priv->cbarg, priv->cbevents, priv->cdstatus); if (priv->callback) { @@ -2739,14 +2737,14 @@ static void kinetis_callback(void *arg) { /* Yes.. queue it */ - fvdbg("Queuing callback to %p(%p)\n", priv->callback, priv->cbarg); + mcinfo("Queuing callback to %p(%p)\n", priv->callback, priv->cbarg); (void)work_queue(HPWORK, &priv->cbwork, (worker_t)priv->callback, priv->cbarg, 0); } else { /* No.. then just call the callback here */ - fvdbg("Callback to %p(%p)\n", priv->callback, priv->cbarg); + mcinfo("Callback to %p(%p)\n", priv->callback, priv->cbarg); priv->callback(priv->cbarg); } } @@ -2792,7 +2790,7 @@ FAR struct sdio_dev_s *sdhc_initialize(int slotno) regval = getreg32(KINETIS_SIM_SCGC3); regval |= SIM_SCGC3_SDHC; putreg32(regval, KINETIS_SIM_SCGC3); - fvdbg("SIM_SCGC3: %08x\n", regval); + mcinfo("SIM_SCGC3: %08x\n", regval); /* In addition to the system clock, the SDHC module needs a clock for the * base for the external card clock. There are four possible sources for @@ -2808,7 +2806,7 @@ FAR struct sdio_dev_s *sdhc_initialize(int slotno) regval &= ~SIM_SOPT2_SDHCSRC_MASK; regval |= SIM_SOPT2_SDHCSRC_CORE; putreg32(regval, KINETIS_SIM_SOPT2); - fvdbg("SIM_SOPT2: %08x\n", regval); + mcinfo("SIM_SOPT2: %08x\n", regval); /* Configure pins for 1 or 4-bit, wide-bus operation (the chip is capable * of 8-bit wide bus operation but D4-D7 are not configured). @@ -2892,7 +2890,7 @@ void sdhc_mediachange(FAR struct sdio_dev_s *dev, bool cardinslot) priv->cdstatus &= ~SDIO_STATUS_PRESENT; } - fvdbg("cdstatus OLD: %02x NEW: %02x\n", cdstatus, priv->cdstatus); + mcinfo("cdstatus OLD: %02x NEW: %02x\n", cdstatus, priv->cdstatus); /* Perform any requested callback if the status has changed */ @@ -2937,7 +2935,7 @@ void sdhc_wrprotect(FAR struct sdio_dev_s *dev, bool wrprotect) priv->cdstatus &= ~SDIO_STATUS_WRPROTECTED; } - fvdbg("cdstatus: %02x\n", priv->cdstatus); + mcinfo("cdstatus: %02x\n", priv->cdstatus); leave_critical_section(flags); } #endif /* CONFIG_KINETIS_SDHC */ diff --git a/arch/arm/src/kinetis/kinetis_serial.c b/arch/arm/src/kinetis/kinetis_serial.c index 550ff55917d5a613f893164ea9a74ba147e4f219..d47235ba90b8055f2217be0b0b18b3293e3a2b3b 100644 --- a/arch/arm/src/kinetis/kinetis_serial.c +++ b/arch/arm/src/kinetis/kinetis_serial.c @@ -232,7 +232,7 @@ struct up_dev_s uintptr_t uartbase; /* Base address of UART registers */ uint32_t baud; /* Configured baud */ uint32_t clock; /* Clocking frequency of the UART module */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES uint8_t irqe; /* Error IRQ associated with this UART (for enable) */ #endif uint8_t irqs; /* Status IRQ associated with this UART (for enable) */ @@ -250,8 +250,8 @@ static int up_setup(struct uart_dev_s *dev); static void up_shutdown(struct uart_dev_s *dev); static int up_attach(struct uart_dev_s *dev); static void up_detach(struct uart_dev_s *dev); -#ifdef CONFIG_DEBUG -static int up_interrupte(int irq, void *context); +#ifdef CONFIG_DEBUG_FEATURES +static int up_interrupt(int irq, void *context); #endif static int up_interrupts(int irq, void *context); static int up_ioctl(struct file *filep, int cmd, unsigned long arg); @@ -327,7 +327,7 @@ static struct up_dev_s g_uart0priv = .uartbase = KINETIS_UART0_BASE, .clock = BOARD_CORECLK_FREQ, .baud = CONFIG_UART0_BAUD, -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES .irqe = KINETIS_IRQ_UART0E, #endif .irqs = KINETIS_IRQ_UART0S, @@ -361,7 +361,7 @@ static struct up_dev_s g_uart1priv = .uartbase = KINETIS_UART1_BASE, .clock = BOARD_CORECLK_FREQ, .baud = CONFIG_UART1_BAUD, -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES .irqe = KINETIS_IRQ_UART1E, #endif .irqs = KINETIS_IRQ_UART1S, @@ -395,7 +395,7 @@ static struct up_dev_s g_uart2priv = .uartbase = KINETIS_UART2_BASE, .clock = BOARD_BUS_FREQ, .baud = CONFIG_UART2_BAUD, -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES .irqe = KINETIS_IRQ_UART2E, #endif .irqs = KINETIS_IRQ_UART2S, @@ -429,7 +429,7 @@ static struct up_dev_s g_uart3priv = .uartbase = KINETIS_UART3_BASE, .clock = BOARD_BUS_FREQ, .baud = CONFIG_UART3_BAUD, -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES .irqe = KINETIS_IRQ_UART3E, #endif .irqs = KINETIS_IRQ_UART3S, @@ -463,7 +463,7 @@ static struct up_dev_s g_uart4priv = .uartbase = KINETIS_UART4_BASE, .clock = BOARD_BUS_FREQ, .baud = CONFIG_UART4_BAUD, -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES .irqe = KINETIS_IRQ_UART4E, #endif .irqs = KINETIS_IRQ_UART4S, @@ -497,7 +497,7 @@ static struct up_dev_s g_uart5priv = .uartbase = KINETIS_UART5_BASE, .clock = BOARD_BUS_FREQ, .baud = CONFIG_UART5_BAUD, -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES .irqe = KINETIS_IRQ_UART5E, #endif .irqs = KINETIS_IRQ_UART5S, @@ -626,7 +626,7 @@ static int up_setup(struct uart_dev_s *dev) /* Set up the interrupt priority */ up_prioritize_irq(priv->irqs, priv->irqprio); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES up_prioritize_irq(priv->irqe, priv->irqprio); #endif #endif @@ -681,16 +681,16 @@ static int up_attach(struct uart_dev_s *dev) */ ret = irq_attach(priv->irqs, up_interrupts); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (ret == OK) { - ret = irq_attach(priv->irqe, up_interrupte); + ret = irq_attach(priv->irqe, up_interrupt); } #endif if (ret == OK) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES up_enable_irq(priv->irqe); #endif up_enable_irq(priv->irqs); @@ -716,7 +716,7 @@ static void up_detach(struct uart_dev_s *dev) /* Disable interrupts */ up_restoreuartint(priv, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES up_disable_irq(priv->irqe); #endif up_disable_irq(priv->irqs); @@ -724,13 +724,13 @@ static void up_detach(struct uart_dev_s *dev) /* Detach from the interrupt(s) */ irq_detach(priv->irqs); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES irq_detach(priv->irqe); #endif } /**************************************************************************** - * Name: up_interrupte + * Name: up_interrupt * * Description: * This is the UART error interrupt handler. It will be invoked when an @@ -738,8 +738,8 @@ static void up_detach(struct uart_dev_s *dev) * ****************************************************************************/ -#ifdef CONFIG_DEBUG -static int up_interrupte(int irq, void *context) +#ifdef CONFIG_DEBUG_FEATURES +static int up_interrupt(int irq, void *context) { struct uart_dev_s *dev = NULL; struct up_dev_s *priv; @@ -790,6 +790,7 @@ static int up_interrupte(int irq, void *context) { PANIC(); } + priv = (struct up_dev_s *)dev->priv; DEBUGASSERT(priv); @@ -804,11 +805,15 @@ static int up_interrupte(int irq, void *context) */ regval = up_serialin(priv, KINETIS_UART_S1_OFFSET); - lldbg("S1: %02x\n", regval); + _info("S1: %02x\n", regval); + UNUSED(regval); + regval = up_serialin(priv, KINETIS_UART_D_OFFSET); + UNUSED(regval); + return OK; } -#endif /* CONFIG_DEBUG */ +#endif /* CONFIG_DEBUG_FEATURES */ /**************************************************************************** * Name: up_interrupts @@ -1064,7 +1069,7 @@ static void up_rxint(struct uart_dev_s *dev, bool enable) } else { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES # warning "Revisit: How are errors enabled?" priv->ie |= UART_C2_RIE; #else diff --git a/arch/arm/src/kinetis/kinetis_start.c b/arch/arm/src/kinetis/kinetis_start.c index f686e77915cedb8a48cf085dbec960fe039c2b26..8de2524ef5600670e156c6369017d490dac20016 100644 --- a/arch/arm/src/kinetis/kinetis_start.c +++ b/arch/arm/src/kinetis/kinetis_start.c @@ -156,8 +156,8 @@ void __start(void) /* Show reset status */ - dbg("Reset status: %02x:%02x\n", - getreg8(KINETIS_SMC_SRSH), getreg8(KINETIS_SMC_SRSL)); + _warn("Reset status: %02x:%02x\n", + getreg8(KINETIS_SMC_SRSH), getreg8(KINETIS_SMC_SRSL)); /* Then start NuttX */ diff --git a/arch/arm/src/kinetis/kinetis_usbdev.c b/arch/arm/src/kinetis/kinetis_usbdev.c new file mode 100644 index 0000000000000000000000000000000000000000..8deedb7603c99ecbd06bf8bd25c39ff9ea4abf85 --- /dev/null +++ b/arch/arm/src/kinetis/kinetis_usbdev.c @@ -0,0 +1,4677 @@ +/**************************************************************************** + * arch/arm/src/kinetis/kinetis_usbdev.c + * + * Copyright (C) 2011-2014, 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * References: + * This file derives from the STM32 USB device driver with modifications + * based on additional information from: + * + * - "USB On-The-Go (OTG)", DS61126E, Microchip Technology Inc., 2009 + * - Sample code provided with the Sure Electronics PIC32 board + * (which seems to have derived from Microchip PICDEM PIC18 code). + * + * 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 +#include + +#include + +#include "up_arch.h" +#include "kinetis.h" +#include "kinetis_usbotg.h" +#include "kinetis_sim.h" +#include "kinetis_fmc.h" + +#if defined(CONFIG_USBDEV) && defined(CONFIG_KINETIS_USBOTG) + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +#ifndef CONFIG_USBDEV_EP0_MAXSIZE +# define CONFIG_USBDEV_EP0_MAXSIZE 64 +#endif + +/* Extremely detailed register/BDT debug that you would normally never want + * enabled. + */ + +#ifndef CONFIG_DEBUG_USB_INFO +# undef CONFIG_KHCI_USBDEV_REGDEBUG +# undef CONFIG_KHCI_USBDEV_BDTDEBUG +#endif + +/* Disable this logic because it is buggy. It works most of the time but + * has some lurking issues that keep this higher performance solution from + * being usable. + */ + +#undef CONFIG_USBDEV_NOREADAHEAD /* Makes no difference */ + +#undef CONFIG_USBDEV_NOWRITEAHEAD +#define CONFIG_USBDEV_NOWRITEAHEAD 1 /* Fixes some problems with IN transfers */ + +/* Interrupts ***************************************************************/ +/* Initial interrupt sets */ + +#ifdef CONFIG_USB_SOFINTS +# define USB_SOF_INTERRUPT USB_INT_SOFTOK +#else +# define USB_SOF_INTERRUPT 0 +#endif + +#define ERROR_INTERRUPTS (USB_ERRSTAT_PIDERR | USB_ERRSTAT_CRC5EOF | \ + USB_ERRSTAT_CRC16 | USB_ERRSTAT_DFN8 | USB_ERRSTAT_BTOERR | \ + USB_ERRSTAT_BTSERR) + +#define NORMAL_INTERRUPTS (USB_INT_USBRST | USB_INT_ERROR | USB_SOF_INTERRUPT | \ + USB_INT_TOKDNE | USB_INT_SLEEP | USB_INT_STALL) + +/* Endpoints ****************************************************************/ + +#define USB_STAT_ENDPT(n) ((n) << USB_STAT_ENDP_SHIFT) /* Endpoint n, n=0..15 */ + +#define USB_STAT_ODD_ODD USB_STAT_ODD /* The last transaction was to the ODD BD bank */ +#define USB_STAT_ODD_EVEN 0 /* The last transaction was to the EVEN BD bank */ + +#define USB_STAT_TX_IN USB_STAT_TX /* Last transaction was a transmit transfer (TX) */ +#define USB_STAT_TX_OUT 0 /* Last transaction was a receive transfer (RX) */ + +#define KHCI_NENDPOINTS (16) +#define EP0 (0) + +#define KHCI_ENDP_BIT(ep) (1 << (ep)) +#define KHCI_ENDP_ALLSET 0xffff + +#define SIM_CLKDIV2_USBDIV(n) (uint32_t)(((n) & 0x07) << 1) + +/* BDT Table Indexing. The BDT is addressed in the hardware as follows: + * + * Bits 9-31: These come the BDT address bits written into the BDTP3, + * BDTP2, and BDTP1 registers + * Bits 5-8: The endpoint number + * Bit 4: Direction: + * 1 = Transmit: SETUP/OUT for host, IN for function + * 0 = Receive: IN for host, SETUP/OUT for function + * Bit 3: PPBI, the ping point buffer index bit (0=EVEN, 1=ODD) + * Bits 0-2: Supports 8-byte BDT entries + */ + +#define EP0_OUT_EVEN (0) +#define EP0_OUT_ODD (1) +#define EP0_IN_EVEN (2) +#define EP0_IN_ODD (3) +#define EP_OUT_EVEN(ep) ((int)(ep) << 2) +#define EP_OUT_ODD(ep) (((int)(ep) << 2) + 1) +#define EP_IN_EVEN(ep) (((int)(ep) << 2) + 2) +#define EP_IN_ODD(ep) (((int)(ep) << 2) + 3) + +#define EP(ep,dir,pp) (((int)(ep) << 2) + ((int)(dir) << 1) + (int)(pp)) +#define EP_DIR_OUT 0 +#define EP_DIR_IN 1 +#define EP_PP_EVEN 0 +#define EP_PP_ODD 1 + +/* Packet sizes. We use a fixed 64 max packet size for all endpoint types */ + +#define KHCI_MAXPACKET_SHIFT (6) +#define KHCI_MAXPACKET_SIZE (1 << (KHCI_MAXPACKET_SHIFT)) + +#define KHCI_EP0MAXPACKET KHCI_MAXPACKET_SIZE + +/* Endpoint register initialization parameters */ + +#define KHCI_EP_CONTROL (USB_ENDPT_EPHSHK | USB_ENDPT_EPTXEN | USB_ENDPT_EPRXEN) +#define KHCI_EP_BULKIN (USB_ENDPT_EPTXEN | USB_ENDPT_EPCTLDIS | USB_ENDPT_EPHSHK) +#define KHCI_EP_BULKOUT (USB_ENDPT_EPRXEN | USB_ENDPT_EPCTLDIS | USB_ENDPT_EPHSHK) +#define KHCI_EP_INTIN (USB_ENDPT_EPTXEN | USB_ENDPT_EPCTLDIS | USB_ENDPT_EPHSHK) +#define KHCI_EP_INTOUT (USB_ENDPT_EPRXEN | USB_ENDPT_EPCTLDIS | USB_ENDPT_EPHSHK) +#define KHCI_EP_ISOCIN (USB_ENDPT_EPTXEN | USB_ENDPT_EPCTLDIS) +#define KHCI_EP_ISOCOUT (USB_ENDPT_EPRXEN | USB_ENDPT_EPCTLDIS) + +/* USB-related masks */ + +#define REQRECIPIENT_MASK (USB_REQ_TYPE_MASK | USB_REQ_RECIPIENT_MASK) + +/* Request queue operations *************************************************/ + +#define khci_rqempty(q) ((q)->head == NULL) +#define khci_rqhead(q) ((q)->head) +#define khci_rqtail(q) ((q)->tail) + +#define RESTART_DELAY (150 * CLOCKS_PER_SEC / 1000) + +/* USB trace ****************************************************************/ +/* Trace error codes */ + +#define KHCI_TRACEERR_ALLOCFAIL 0x0001 +#define KHCI_TRACEERR_BADCLEARFEATURE 0x0002 +#define KHCI_TRACEERR_BADDEVGETSTATUS 0x0003 +#define KHCI_TRACEERR_BADEPGETSTATUS 0x0004 +#define KHCI_TRACEERR_BADEPNO 0x0005 +#define KHCI_TRACEERR_BADEPTYPE 0x0006 +#define KHCI_TRACEERR_BADGETCONFIG 0x0007 +#define KHCI_TRACEERR_BADGETSETDESC 0x0008 +#define KHCI_TRACEERR_BADGETSTATUS 0x0009 +#define KHCI_TRACEERR_BADSETADDRESS 0x000a +#define KHCI_TRACEERR_BADSETCONFIG 0x000b +#define KHCI_TRACEERR_BADSETFEATURE 0x000c +#define KHCI_TRACEERR_BINDFAILED 0x000d +#define KHCI_TRACEERR_DISPATCHSTALL 0x000e +#define KHCI_TRACEERR_DRIVER 0x000f +#define KHCI_TRACEERR_DRIVERREGISTERED 0x0010 +#define KHCI_TRACEERR_EP0SETUPSTALLED 0x0011 +#define KHCI_TRACEERR_EPDISABLED 0x0012 +#define KHCI_TRACEERR_EPOUTNULLPACKET 0x0013 +#define KHCI_TRACEERR_EPRESERVE 0x0014 +#define KHCI_TRACEERR_INVALIDCTRLREQ 0x0015 +#define KHCI_TRACEERR_INVALIDPARMS 0x0016 +#define KHCI_TRACEERR_IRQREGISTRATION 0x0017 +#define KHCI_TRACEERR_NOTCONFIGURED 0x0018 +#define KHCI_TRACEERR_REQABORTED 0x0019 +#define KHCI_TRACEERR_INVALIDSTATE 0x001a + +/* Trace interrupt codes */ + +#define KHCI_TRACEINTID_CLEARFEATURE 0x0001 +#define KHCI_TRACEINTID_DEVGETSTATUS 0x0002 +#define KHCI_TRACEINTID_DISPATCH 0x0003 +#define KHCI_TRACEINTID_EP0IN 0x0004 +#define KHCI_TRACEINTID_EP0INDONE 0x0005 +#define KHCI_TRACEINTID_EP0OUTDONE 0x0006 +#define KHCI_TRACEINTID_EP0SETUPDONE 0x0007 +#define KHCI_TRACEINTID_EP0SETUPSETADDRESS 0x0008 +#define KHCI_TRACEINTID_EP0ADDRESSSET 0x0009 +#define KHCI_TRACEINTID_EPGETSTATUS 0x000a +#define KHCI_TRACEINTID_EPINDONE 0x000b +#define KHCI_TRACEINTID_EPINQEMPTY 0x000c +#define KHCI_TRACEINTID_EPOUTDONE 0x000d +#define KHCI_TRACEINTID_EPOUTQEMPTY 0x000e +#define KHCI_TRACEINTID_SOF 0x000f +#define KHCI_TRACEINTID_GETCONFIG 0x0010 +#define KHCI_TRACEINTID_GETSETDESC 0x0011 +#define KHCI_TRACEINTID_GETSETIF 0x0012 +#define KHCI_TRACEINTID_GETSTATUS 0x0013 +#define KHCI_TRACEINTID_IFGETSTATUS 0x0014 +#define KHCI_TRACEINTID_TRNC 0x0015 +#define KHCI_TRACEINTID_TRNCS 0x0016 +#define KHCI_TRACEINTID_INTERRUPT 0x0017 +#define KHCI_TRACEINTID_NOSTDREQ 0x0018 +#define KHCI_TRACEINTID_RESET 0x0019 +#define KHCI_TRACEINTID_SETCONFIG 0x001a +#define KHCI_TRACEINTID_SETFEATURE 0x001b +#define KHCI_TRACEINTID_IDLE 0x001c +#define KHCI_TRACEINTID_SYNCHFRAME 0x001d +#define KHCI_TRACEINTID_WKUP 0x001e +#define KHCI_TRACEINTID_T1MSEC 0x001f +#define KHCI_TRACEINTID_OTGID 0x0020 +#define KHCI_TRACEINTID_STALL 0x0021 +#define KHCI_TRACEINTID_UERR 0x0022 +#define KHCI_TRACEINTID_SUSPENDED 0x0023 +#define KHCI_TRACEINTID_WAITRESET 0x0024 + +#ifdef CONFIG_USBDEV_TRACE_STRINGS +const struct trace_msg_t g_usb_trace_strings_intdecode[] = +{ + TRACE_STR(KHCI_TRACEINTID_CLEARFEATURE ), /* 0x0001 */ + TRACE_STR(KHCI_TRACEINTID_DEVGETSTATUS ), /* 0x0002 */ + TRACE_STR(KHCI_TRACEINTID_DISPATCH ), /* 0x0003 */ + TRACE_STR(KHCI_TRACEINTID_EP0IN ), /* 0x0004 */ + TRACE_STR(KHCI_TRACEINTID_EP0INDONE ), /* 0x0005 */ + TRACE_STR(KHCI_TRACEINTID_EP0OUTDONE ), /* 0x0006 */ + TRACE_STR(KHCI_TRACEINTID_EP0SETUPDONE ), /* 0x0007 */ + TRACE_STR(KHCI_TRACEINTID_EP0SETUPSETADDRESS ), /* 0x0008 */ + TRACE_STR(KHCI_TRACEINTID_EP0ADDRESSSET ), /* 0x0009 */ + TRACE_STR(KHCI_TRACEINTID_EPGETSTATUS ), /* 0x000a */ + TRACE_STR(KHCI_TRACEINTID_EPINDONE ), /* 0x000b */ + TRACE_STR(KHCI_TRACEINTID_EPINQEMPTY ), /* 0x000c */ + TRACE_STR(KHCI_TRACEINTID_EPOUTDONE ), /* 0x000d */ + TRACE_STR(KHCI_TRACEINTID_EPOUTQEMPTY ), /* 0x000e */ + TRACE_STR(KHCI_TRACEINTID_SOF ), /* 0x000f */ + TRACE_STR(KHCI_TRACEINTID_GETCONFIG ), /* 0x0010 */ + TRACE_STR(KHCI_TRACEINTID_GETSETDESC ), /* 0x0011 */ + TRACE_STR(KHCI_TRACEINTID_GETSETIF ), /* 0x0012 */ + TRACE_STR(KHCI_TRACEINTID_GETSTATUS ), /* 0x0013 */ + TRACE_STR(KHCI_TRACEINTID_IFGETSTATUS ), /* 0x0014 */ + TRACE_STR(KHCI_TRACEINTID_TRNC ), /* 0x0015 */ + TRACE_STR(KHCI_TRACEINTID_TRNCS ), /* 0x0016 */ + TRACE_STR(KHCI_TRACEINTID_INTERRUPT ), /* 0x0017 */ + TRACE_STR(KHCI_TRACEINTID_NOSTDREQ ), /* 0x0018 */ + TRACE_STR(KHCI_TRACEINTID_RESET ), /* 0x0019 */ + TRACE_STR(KHCI_TRACEINTID_SETCONFIG ), /* 0x001a */ + TRACE_STR(KHCI_TRACEINTID_SETFEATURE ), /* 0x001b */ + TRACE_STR(KHCI_TRACEINTID_IDLE ), /* 0x001c */ + TRACE_STR(KHCI_TRACEINTID_SYNCHFRAME ), /* 0x001d */ + TRACE_STR(KHCI_TRACEINTID_WKUP ), /* 0x001e */ + TRACE_STR(KHCI_TRACEINTID_T1MSEC ), /* 0x001f */ + TRACE_STR(KHCI_TRACEINTID_OTGID ), /* 0x0020 */ + TRACE_STR(KHCI_TRACEINTID_STALL ), /* 0x0021 */ + TRACE_STR(KHCI_TRACEINTID_UERR ), /* 0x0022 */ + TRACE_STR(KHCI_TRACEINTID_SUSPENDED ), /* 0x0023 */ + TRACE_STR(KHCI_TRACEINTID_WAITRESET ), /* 0x0024 */ + TRACE_STR_END +}; +#endif + +#ifdef CONFIG_USBDEV_TRACE_STRINGS +const struct trace_msg_t g_usb_trace_strings_deverror[] = +{ + TRACE_STR(KHCI_TRACEERR_ALLOCFAIL ), /* 0x0001 */ + TRACE_STR(KHCI_TRACEERR_BADCLEARFEATURE ), /* 0x0002 */ + TRACE_STR(KHCI_TRACEERR_BADDEVGETSTATUS ), /* 0x0003 */ + TRACE_STR(KHCI_TRACEERR_BADEPGETSTATUS ), /* 0x0004 */ + TRACE_STR(KHCI_TRACEERR_BADEPNO ), /* 0x0005 */ + TRACE_STR(KHCI_TRACEERR_BADEPTYPE ), /* 0x0006 */ + TRACE_STR(KHCI_TRACEERR_BADGETCONFIG ), /* 0x0007 */ + TRACE_STR(KHCI_TRACEERR_BADGETSETDESC ), /* 0x0008 */ + TRACE_STR(KHCI_TRACEERR_BADGETSTATUS ), /* 0x0009 */ + TRACE_STR(KHCI_TRACEERR_BADSETADDRESS ), /* 0x000a */ + TRACE_STR(KHCI_TRACEERR_BADSETCONFIG ), /* 0x000b */ + TRACE_STR(KHCI_TRACEERR_BADSETFEATURE ), /* 0x000c */ + TRACE_STR(KHCI_TRACEERR_BINDFAILED ), /* 0x000d */ + TRACE_STR(KHCI_TRACEERR_DISPATCHSTALL ), /* 0x000e */ + TRACE_STR(KHCI_TRACEERR_DRIVER ), /* 0x000f */ + TRACE_STR(KHCI_TRACEERR_DRIVERREGISTERED ), /* 0x0010 */ + TRACE_STR(KHCI_TRACEERR_EP0SETUPSTALLED ), /* 0x0011 */ + TRACE_STR(KHCI_TRACEERR_EPDISABLED ), /* 0x0012 */ + TRACE_STR(KHCI_TRACEERR_EPOUTNULLPACKET ), /* 0x0013 */ + TRACE_STR(KHCI_TRACEERR_EPRESERVE ), /* 0x0014 */ + TRACE_STR(KHCI_TRACEERR_INVALIDCTRLREQ ), /* 0x0015 */ + TRACE_STR(KHCI_TRACEERR_INVALIDPARMS ), /* 0x0016 */ + TRACE_STR(KHCI_TRACEERR_IRQREGISTRATION ), /* 0x0017 */ + TRACE_STR(KHCI_TRACEERR_NOTCONFIGURED ), /* 0x0018 */ + TRACE_STR(KHCI_TRACEERR_REQABORTED ), /* 0x0019 */ + TRACE_STR(KHCI_TRACEERR_INVALIDSTATE ), /* 0x001a */ + TRACE_STR_END +}; +#endif + +/* Misc Helper Macros *******************************************************/ + +/* Ever-present MIN and MAX macros */ + +#ifndef MIN +# define MIN(a,b) (a < b ? a : b) +#endif + +#ifndef MAX +# define MAX(a,b) (a > b ? a : b) +#endif + +/* Byte ordering in host-based values */ + +#ifdef CONFIG_ENDIAN_BIG +# define LSB 1 +# define MSB 0 +#else +# define LSB 0 +# define MSB 1 +#endif + +/* Debug ********************************************************************/ +/* CONFIG_KHCI_USBDEV_REGDEBUG enables dumping of all low-level register + * access and BDT accesses. Normally, this generates so much debug output + * that USB may not even be functional. + */ + +#ifdef CONFIG_KHCI_USBDEV_REGDEBUG +# undef CONFIG_KHCI_USBDEV_BDTDEBUG +# define CONFIG_KHCI_USBDEV_BDTDEBUG 1 +#else +# define khci_getreg(addr) getreg8(addr) +# define khci_putreg(val,addr) putreg8(val,addr) +#endif + +/* CONFIG_KHCI_USBDEV_BDTDEBUG dumps most BDT settings */ + +#ifdef CONFIG_KHCI_USBDEV_BDTDEBUG +# define bdterr uerr +# define bdtinfo uinfo +#else +# define bdterr(x...) +# define bdtinfo(x...) +#endif + +/**************************************************************************** + * Private Type Definitions + ****************************************************************************/ + +/* Overvall device state */ + +enum khci_devstate_e +{ + DEVSTATE_DETACHED = 0, /* Not connected to a host */ + DEVSTATE_ATTACHED, /* Connected to a host */ + DEVSTATE_POWERED, /* Powered */ + DEVSTATE_DEFAULT, /* Default state */ + DEVSTATE_ADDRPENDING, /* Waiting for an address */ + DEVSTATE_ADDRESS, /* Address received */ + DEVSTATE_CONFIGURED, /* Configuration received */ +}; + +/* The various states of the control pipe */ + +enum khci_ctrlstate_e +{ + CTRLSTATE_WAITSETUP = 0, /* No request in progress, waiting for setup */ + CTRLSTATE_RDREQUEST, /* Read request (OUT) in progress */ + CTRLSTATE_WRREQUEST, /* Write request (IN) in progress */ + CTRLSTATE_STALL, /* EP0 stall requested */ + CTRLSTATE_STALLED /* EP0 is stalled */ +}; + +union wb_u +{ + uint16_t w; + uint8_t b[2]; +}; + +/* A container for a request so that the request make be retained in a + * singly-linked list. + */ + +struct khci_req_s +{ + struct usbdev_req_s req; /* Standard USB request */ +#ifdef CONFIG_USBDEV_NOWRITEAHEAD + uint16_t inflight[1]; /* The number of bytes "in-flight" */ +#else + uint16_t inflight[2]; /* The number of bytes "in-flight" */ +#endif + struct khci_req_s *flink; /* Supports a singly linked list */ +}; + +/* This structure represents the 'head' of a singly linked list of requests */ + +struct khci_queue_s +{ + struct khci_req_s *head; /* Head of the request queue */ + struct khci_req_s *tail; /* Tail of the request queue */ +}; + +/* This is the internal representation of an endpoint */ + +struct khci_ep_s +{ + /* Common endpoint fields. This must be the first thing defined in the + * structure so that it is possible to simply cast from struct usbdev_ep_s + * to struct khci_ep_s. + */ + + struct usbdev_ep_s ep; /* Standard endpoint structure */ + + /* KHCI-specific fields */ + + struct khci_usbdev_s *dev; /* Reference to private driver data */ + struct khci_queue_s pend; /* List of pending (inactive) requests for this endpoint */ + struct khci_queue_s active; /* List of active requests for this endpoint */ + uint8_t stalled:1; /* true: Endpoint is stalled */ + uint8_t halted:1; /* true: Endpoint feature halted */ + uint8_t txnullpkt:1; /* Null packet needed at end of TX transfer */ + uint8_t txdata1:1; /* Data0/1 of next TX transfer */ + uint8_t rxdata1:1; /* Data0/1 of next RX transfer */ + volatile struct usbotg_bdtentry_s *bdtin; /* BDT entry for the IN transaction */ + volatile struct usbotg_bdtentry_s *bdtout; /* BDT entry for the OUT transaction */ +}; + +struct khci_usbdev_s +{ + /* Common device fields. This must be the first thing defined in the + * structure so that it is possible to simply cast from struct usbdev_s + * to structkhci_usbdev_s. + */ + + struct usbdev_s usbdev; + + /* The bound device class driver */ + + struct usbdevclass_driver_s *driver; + + /* KHCI-specific fields */ + + struct usb_ctrlreq_s ctrl; /* Last EP0 request */ + uint8_t devstate; /* Driver state (see enum khci_devstate_e) */ + uint8_t ctrlstate; /* Control EP state (see enum khci_ctrlstate_e) */ + uint8_t selfpowered:1; /* 1: Device is self powered */ + uint8_t rwakeup:1; /* 1: Device supports remote wakeup */ + uint8_t attached:1; /* Device is attached to the host */ + uint8_t ep0done:1; /* EP0 OUT already prepared */ + uint8_t rxbusy:1; /* EP0 OUT data transfer in progress */ + uint16_t epavail; /* Bitset of available endpoints */ + uint16_t epstalled; /* Bitset of stalled endpoints */ + WDOG_ID wdog; /* Supports the restart delay */ + + /* The endpoint list */ + + struct khci_ep_s eplist[KHCI_NENDPOINTS]; +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +/* Register operations ******************************************************/ + +#ifdef CONFIG_KHCI_USBDEV_REGDEBUG +static uint16_t khci_getreg(uint32_t addr); +static void khci_putreg(uint32_t val, uint32_t addr); +#endif + +/* Suspend/Resume Helpers ***************************************************/ + +static void khci_suspend(struct khci_usbdev_s *priv); +static void khci_resume(struct khci_usbdev_s *priv); + +/* Request Queue Management *************************************************/ + +static struct khci_req_s *khci_remfirst(struct khci_queue_s *queue); +static struct khci_req_s *khci_remlast(struct khci_queue_s *queue); +static void khci_addlast(struct khci_queue_s *queue, + struct khci_req_s *req); +static void khci_addfirst(struct khci_queue_s *queue, + struct khci_req_s *req); + +/* Request Helpers **********************************************************/ + +static void khci_reqreturn(struct khci_ep_s *privep, + struct khci_req_s *privreq, int16_t result); +static void khci_reqcomplete(struct khci_ep_s *privep, + int16_t result); +static void khci_epwrite(struct khci_ep_s *privep, + volatile struct usbotg_bdtentry_s *bdt, + const uint8_t *src, uint32_t nbytes); +static void khci_wrcomplete(struct khci_usbdev_s *priv, + struct khci_ep_s *privep); +static void khci_rqrestart(int argc, uint32_t arg1, ...); +static void khci_delayedrestart(struct khci_usbdev_s *priv, + uint8_t epno); +static void khci_rqstop(struct khci_ep_s *privep); +static int khci_wrstart(struct khci_usbdev_s *priv, + struct khci_ep_s *privep); +static int khci_wrrequest(struct khci_usbdev_s *priv, + struct khci_ep_s *privep); +static int khci_rdcomplete(struct khci_usbdev_s *priv, + struct khci_ep_s *privep); +static int khci_ep0rdsetup(struct khci_usbdev_s *priv, + uint8_t *dest, int readlen); +static int khci_rdsetup(struct khci_ep_s *privep, uint8_t *dest, + int readlen); +static int khci_rdrequest(struct khci_usbdev_s *priv, + struct khci_ep_s *privep); +static void khci_cancelrequests(struct khci_ep_s *privep, + int16_t result); + +/* Interrupt level processing ***********************************************/ + +static void khci_dispatchrequest(struct khci_usbdev_s *priv); +static void khci_ep0stall(struct khci_usbdev_s *priv); +static void khci_eptransfer(struct khci_usbdev_s *priv, uint8_t epno, + uint16_t ustat); +static void khci_ep0nextsetup(struct khci_usbdev_s *priv); +static void khci_ep0rdcomplete(struct khci_usbdev_s *priv); +static void khci_ep0setup(struct khci_usbdev_s *priv); +static void khci_ep0outcomplete(struct khci_usbdev_s *priv); +static void khci_ep0incomplete(struct khci_usbdev_s *priv); +static void khci_ep0transfer(struct khci_usbdev_s *priv, + uint16_t ustat); +static int khci_interrupt(int irq, void *context); + +/* Endpoint helpers *********************************************************/ + +static inline struct khci_ep_s * + khci_epreserve(struct khci_usbdev_s *priv, uint8_t epset); +static inline void + khci_epunreserve(struct khci_usbdev_s *priv, + struct khci_ep_s *privep); +static inline bool + khci_epreserved(struct khci_usbdev_s *priv, int epno); +static void khci_ep0configure(struct khci_usbdev_s *priv); + +/* Endpoint operations ******************************************************/ + +static int khci_epconfigure(struct usbdev_ep_s *ep, + const struct usb_epdesc_s *desc, bool last); +static int khci_epdisable(struct usbdev_ep_s *ep); +static struct usbdev_req_s * + khci_epallocreq(struct usbdev_ep_s *ep); +static void khci_epfreereq(struct usbdev_ep_s *ep, + struct usbdev_req_s *); +static int khci_epsubmit(struct usbdev_ep_s *ep, + struct usbdev_req_s *req); +static int khci_epcancel(struct usbdev_ep_s *ep, + struct usbdev_req_s *req); +static int khci_epbdtstall(struct usbdev_ep_s *ep, bool resume, + bool epin); +static int khci_epstall(struct usbdev_ep_s *ep, bool resume); + +/* USB device controller operations *****************************************/ + +static struct usbdev_ep_s * + khci_allocep(struct usbdev_s *dev, uint8_t epno, bool in, + uint8_t eptype); +static void khci_freeep(struct usbdev_s *dev, struct usbdev_ep_s *ep); +static int khci_getframe(struct usbdev_s *dev); +static int khci_wakeup(struct usbdev_s *dev); +static int khci_selfpowered(struct usbdev_s *dev, bool selfpowered); + +/* Initialization/Reset *****************************************************/ + +static void khci_reset(struct khci_usbdev_s *priv); +static void khci_attach(struct khci_usbdev_s *priv); +static void khci_detach(struct khci_usbdev_s *priv); +static void khci_swreset(struct khci_usbdev_s *priv); +static void khci_hwreset(struct khci_usbdev_s *priv); +static void khci_stateinit(struct khci_usbdev_s *priv); +static void khci_hwshutdown(struct khci_usbdev_s *priv); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* Since there is only a single USB interface, all status information can be + * be simply retained in a single global instance. + */ + +static struct khci_usbdev_s g_usbdev; + +static const struct usbdev_epops_s g_epops = +{ + .configure = khci_epconfigure, + .disable = khci_epdisable, + .allocreq = khci_epallocreq, + .freereq = khci_epfreereq, + .submit = khci_epsubmit, + .cancel = khci_epcancel, + .stall = khci_epstall, +}; + +static const struct usbdev_ops_s g_devops = +{ + .allocep = khci_allocep, + .freeep = khci_freeep, + .getframe = khci_getframe, + .wakeup = khci_wakeup, + .selfpowered = khci_selfpowered, + .pullup = kinetis_usbpullup, +}; + +/* Buffer Descriptor Table. Four BDT entries per endpoint + * + * The BDT is addressed in the hardware as follows: + * + * Bits 9-31: These come the BDT address bits written into the BDTP3, BDTP2 + * and BDTP1 registers + * Bits 5-8: The endpoint number + * Bit 4: Direction (0=IN/Tx, 1 = OUT/Rx) + * Bit 3: PPBI, the ping point buffer index bit. + * Bits 0-2: Supports 8-byte BDT entries + */ + +static volatile struct usbotg_bdtentry_s g_bdt[4*KHCI_NENDPOINTS] + __attribute__ ((aligned(512))); + +/**************************************************************************** + * Private Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Register Operations + ****************************************************************************/ + + /**************************************************************************** + * Name: khci_getreg + ****************************************************************************/ + +#ifdef CONFIG_KHCI_USBDEV_REGDEBUG +static uint16_t khci_getreg(uint32_t addr) +{ + static uint32_t prevaddr = 0; + static uint32_t preval = 0; + static uint32_t count = 0; + + /* Read the value from the register */ + + uint16_t val = getreg8(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) + { + uinfo("...\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 */ + + uinfo("[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 */ + + uinfo("%08x->%04x\n", addr, val); + return val; +} +#endif + +/**************************************************************************** + * Name: khci_putreg + ****************************************************************************/ + +#ifdef CONFIG_KHCI_USBDEV_REGDEBUG +static void khci_putreg(uint32_t val, uint32_t addr) +{ + /* Show the register value being written */ + + uinfo("%08x<-%04x\n", addr, val); + + /* Write the value */ + + putreg8(val, addr); +} +#endif + +/**************************************************************************** + * Request Helpers + ****************************************************************************/ + +/**************************************************************************** + * Name: khci_remfirst + ****************************************************************************/ + +static struct khci_req_s *khci_remfirst(struct khci_queue_s *queue) +{ + struct khci_req_s *ret = queue->head; + + if (ret) + { + queue->head = ret->flink; + if (!queue->head) + { + queue->tail = NULL; + } + + ret->flink = NULL; + } + + return ret; +} + + +/**************************************************************************** + * Name: khci_remlast + ****************************************************************************/ + +static struct khci_req_s *khci_remlast(struct khci_queue_s *queue) +{ + struct khci_req_s *prev; + struct khci_req_s *ret = queue->tail; + + ret = queue->tail; + if (ret) + { + if (queue->head == queue->tail) + { + queue->head = NULL; + queue->tail = NULL; + } + else + { + for (prev = queue->head; + prev && prev->flink != ret; + prev = prev->flink); + + if (prev) + { + prev->flink = NULL; + queue->tail = prev; + } + } + + ret->flink = NULL; + } + + return ret; +} + +/**************************************************************************** + * Name: khci_addlast + ****************************************************************************/ + +static void khci_addlast(struct khci_queue_s *queue, struct khci_req_s *req) +{ + req->flink = NULL; + if (!queue->head) + { + queue->head = req; + queue->tail = req; + } + else + { + queue->tail->flink = req; + queue->tail = req; + } +} + +/**************************************************************************** + * Name: khci_addfirst + ****************************************************************************/ + +static void khci_addfirst(struct khci_queue_s *queue, struct khci_req_s *req) +{ + req->flink = queue->head; + if (!queue->head) + { + queue->tail = req; + } + + queue->head = req; +} + +/**************************************************************************** + * Name: khci_reqreturn + ****************************************************************************/ + +static void khci_reqreturn(struct khci_ep_s *privep, + struct khci_req_s *privreq, int16_t result) +{ + /* If endpoint 0, temporarily reflect the state of protocol stalled + * in the callback. + */ + + bool stalled = privep->stalled; + if (USB_EPNO(privep->ep.eplog) == EP0) + { + privep->stalled = (privep->dev->ctrlstate == CTRLSTATE_STALLED); + } + + /* Save the result in the request structure */ + + privreq->req.result = result; + + /* Callback to the request completion handler */ + + privreq->flink = NULL; + privreq->req.callback(&privep->ep, &privreq->req); + + /* Restore the stalled indication */ + + privep->stalled = stalled; +} + +/**************************************************************************** + * Name: khci_reqcomplete + ****************************************************************************/ + +static void khci_reqcomplete(struct khci_ep_s *privep, int16_t result) +{ + struct khci_req_s *privreq; + irqstate_t flags; + + /* Remove the completed request at the head of the endpoint's active + * request list. + */ + + flags = enter_critical_section(); + privreq = khci_remfirst(&privep->active); + leave_critical_section(flags); + + if (privreq) + { + /* Return the request to the class driver */ + + khci_reqreturn(privep, privreq, result); + } +} + +/**************************************************************************** + * Name: khci_epwrite + ****************************************************************************/ + +static void khci_epwrite(struct khci_ep_s *privep, + volatile struct usbotg_bdtentry_s *bdt, + const uint8_t *src, uint32_t nbytes) +{ + uint32_t status; + + usbtrace(TRACE_WRITE(USB_EPNO(privep->ep.eplog)), nbytes); + + /* Clear all bits in the status (assuring that we own the BDT) */ + + bdt->status = 0; + + /* Get the correct data toggle (as well as other BDT bits) */ + + if (privep->txdata1) + { + status = (USB_BDT_UOWN | USB_BDT_DATA1 | USB_BDT_DTS); + privep->txdata1 = 0; + } + else + { + status = (USB_BDT_UOWN | USB_BDT_DATA0 | USB_BDT_DTS); + privep->txdata1 = 1; + } + + /* Set the data pointer and data length */ + + bdt->addr = (uint8_t *)src; + status |= (nbytes << USB_BDT_BYTECOUNT_SHIFT) | USB_BDT_DTS; + + /* And, finally, give the BDT to the USB */ + + bdtinfo("EP%d BDT IN [%p] {%08x, %08x}\n", + USB_EPNO(privep->ep.eplog), bdt, status, bdt->addr); + + bdt->status = status; +} + +/**************************************************************************** + * Name: khci_wrcomplete + ****************************************************************************/ + +static void khci_wrcomplete(struct khci_usbdev_s *priv, + struct khci_ep_s *privep) +{ + volatile struct usbotg_bdtentry_s *bdtin; + struct khci_req_s *privreq; + int bytesleft; + int epno; + + /* Check the request at the head of the endpoint's active request queue. + * Since we got here from a write completion event, the active request queue + * should not be empty. + */ + + privreq = khci_rqhead(&privep->active); + DEBUGASSERT(privreq != NULL); + + /* An outgoing IN packet has completed. bdtin should point to the BDT + * that just completed. + */ + + bdtin = privep->bdtin; + epno = USB_EPNO(privep->ep.eplog); + +#ifdef CONFIG_USBDEV_NOWRITEAHEAD + uinfo("EP%d: len=%d xfrd=%d inflight=%d\n", + epno, privreq->req.len, privreq->req.xfrd, privreq->inflight[0]); +#else + uinfo("EP%d: len=%d xfrd=%d inflight={%d, %d}\n", + epno, privreq->req.len, privreq->req.xfrd, + privreq->inflight[0], privreq->inflight[1]); +#endif + bdtinfo("EP%d BDT IN [%p] {%08x, %08x}\n", + epno, bdtin, bdtin->status, bdtin->addr); + + /* We should own the BDT that just completed. But NULLify the entire BDT IN. + * Why? So that we can tell later that the BDT available. No, it is not + * sufficient to look at the UOWN bit. If UOWN==0, then the transfer has + * been completed BUT it may not yet have been processed. But a completely + * NULLified BDT is a sure indication + */ + + DEBUGASSERT((bdtin->status & USB_BDT_UOWN) == USB_BDT_COWN); + bdtin->status = 0; + bdtin->addr = 0; + + /* Toggle bdtin to the other BDT. Is the current bdtin the EVEN bdt? */ + + privep->bdtin = &g_bdt[EP_IN_EVEN(epno)]; + if (bdtin == privep->bdtin) + { + /* Yes.. Then the other BDT is the ODD BDT */ + + privep->bdtin++; + } + + /* Update the number of bytes transferred. */ + + privreq->req.xfrd += privreq->inflight[0]; +#ifdef CONFIG_USBDEV_NOWRITEAHEAD + privreq->inflight[0] = 0; +#else + privreq->inflight[0] = privreq->inflight[1]; + privreq->inflight[1] = 0; +#endif + bytesleft = privreq->req.len - privreq->req.xfrd; + + /* If all of the bytes were sent (bytesleft == 0) and no NULL packet is + * needed (!txnullpkt), then we are finished with the transfer + */ + + if (bytesleft == 0 && !privep->txnullpkt) + { + /* The transfer is complete. Give the completed request back to + * the class driver. + */ + + usbtrace(TRACE_COMPLETE(USB_EPNO(privep->ep.eplog)), privreq->req.xfrd); + khci_reqcomplete(privep, OK); + + /* Special case writes to endpoint zero. If there is no transfer in + * progress, then we need to configure to received the next SETUP packet. + */ + + if (USB_EPNO(privep->ep.eplog) == 0) + { + priv->ctrlstate = CTRLSTATE_WAITSETUP; + } + } +} + +/**************************************************************************** + * Name: khci_rqrestart + ****************************************************************************/ + +static void khci_rqrestart(int argc, uint32_t arg1, ...) +{ + struct khci_usbdev_s *priv; + struct khci_ep_s *privep; + struct khci_req_s *privreq; + uint16_t epstalled; + uint16_t mask; + int epno; + + /* Recover the pointer to the driver structure */ + + priv = (struct khci_usbdev_s *)((uintptr_t)arg1); + DEBUGASSERT(priv != NULL); + + /* Sample and clear the set of endpoints that have recovered from a stall */ + + epstalled = priv->epstalled; + priv->epstalled = 0; + + /* Loop, checking each bit in the epstalled bit set */ + + for (epno = 0; epstalled && epno < KHCI_NENDPOINTS; epno++) + { + /* Has this encpoint recovered from a stall? */ + + mask = (1 << epno); + if ((epstalled & mask) != 0) + { + /* Yes, this endpoint needs to be restarteed */ + + epstalled &= ~mask; + privep = &priv->eplist[epno]; + + /* Reset some endpoint state variables */ + + privep->stalled = false; + privep->txnullpkt = false; + + /* Check the request at the head of the endpoint's pending request queue */ + + privreq = khci_rqhead(&privep->pend); + if (privreq) + { + /* Restart transmission after we have recovered from a stall */ + + privreq->req.xfrd = 0; + privreq->inflight[0] = 0; +#ifndef CONFIG_USBDEV_NOWRITEAHEAD + privreq->inflight[1] = 0; +#endif + (void)khci_wrrequest(priv, privep); + } + } + } +} + +/**************************************************************************** + * Name: khci_delayedrestart + ****************************************************************************/ + +static void khci_delayedrestart(struct khci_usbdev_s *priv, uint8_t epno) +{ + /* Add endpoint to the set of endpoints that need to be restarted */ + + priv->epstalled |= (1 << epno); + + /* And start (or re-start) the watchdog timer */ + + wd_start(priv->wdog, RESTART_DELAY, khci_rqrestart, 1, (uint32_t)priv); +} + +/**************************************************************************** + * Name: khci_rqstop + ****************************************************************************/ + +static void khci_rqstop(struct khci_ep_s *privep) +{ + struct khci_req_s *privreq; + + /* Move all of the active requests back to the pending request queue */ + + while ((privreq = khci_remlast(&privep->active))) + { + /* Move the request back to the head of the pending list */ + + khci_addfirst(&privep->pend, privreq); + } +} + +/**************************************************************************** + * Name: khci_wrstart + ****************************************************************************/ + +static int khci_wrstart(struct khci_usbdev_s *priv, + struct khci_ep_s *privep) +{ + volatile struct usbotg_bdtentry_s *bdt; + struct khci_req_s *privreq; + uint8_t *buf; + uint8_t epno; + int nbytes; + int bytesleft; + int xfrd; + int index; + + /* We get here when either (1) an IN endpoint completion interrupt occurs, + * or (2) a new write request is reqeived from the class. + */ + + /* Get the endpoint number that we are servicing */ + + epno = USB_EPNO(privep->ep.eplog); + + /* Decide which BDT to use. bdtin points to the "current" BDT. That is, + * the one that either (1) available for next transfer, or (2) the one + * that is currently busy with the current transfer. If the current + * BDT is busy, we have the option of setting up the other BDT in advance + * in order to improve data transfer performance. + */ + + bdt = privep->bdtin; + index = 0; + + if (bdt->status || bdt->addr) + { +#ifdef CONFIG_USBDEV_NOWRITEAHEAD + /* The current BDT is not available and write ahead is disabled. There + * is nothing we can do now. Return -EBUSY to indicate this condition. + */ + + return -EBUSY; +#else + /* The current BDT is not available, check the other BDT */ + + volatile struct usbotg_bdtentry_s *otherbdt; + otherbdt = &g_bdt[EP(epno, EP_DIR_IN, EP_PP_EVEN)]; + if (otherbdt == bdt) + { + otherbdt++; + } + + /* Is it available? */ + + if (otherbdt->status || otherbdt->addr) + { + /* No, neither are available. We cannot perform the transfer now. + * Return -EBUSY to indicate this condition. + */ + + return -EBUSY; + } + + /* Yes... use the other BDT */ + + bdt = otherbdt; + index = 1; +#endif + } + + /* A BDT is available. Which request should we be operating on? The last + * incomplete, active request would be at the tail of the active list. + */ + + privreq = khci_rqtail(&privep->active); + + /* This request would be NULL if there is no incomplete, active request. */ + + if (privreq) + { + /* Get the number of bytes left to be transferred in the request */ + + xfrd = privreq->req.xfrd; + bytesleft = privreq->req.len - xfrd; + + /* Even if the request is incomplete, transfer of all the requested + * bytes may already been started. NOTE: inflight[1] should be zero + * because we know that there is a BDT available. + */ + +#ifndef CONFIG_USBDEV_NOWRITEAHEAD + DEBUGASSERT(privreq->inflight[1] == 0); +#endif + /* Has the transfer been initiated for all of the bytes? */ + + if (bytesleft > privreq->inflight[0]) + { + /* No.. we have more work to do with this request */ + + xfrd += privreq->inflight[0]; + bytesleft -= privreq->inflight[0]; + } + + /* Do we need to send a null packet after this packet? */ + + else if (privep->txnullpkt) + { + /* Yes... set up for the NULL packet transfer */ + + xfrd = privreq->req.len; + bytesleft = 0; + } + else + { + /* No.. We are finished with this request. We need to get the + * next request from the head of the pending request list. + */ + + privreq = NULL; + } + } + + /* If privreq is NULL here then either (1) there is no active request, or + * (2) the (only) active request is fully queued. In either case, we need + * to get the next request from the head of the pending request list. + */ + + if (!privreq) + { + /* Remove the next request from the head of the pending request list */ + + privreq = khci_remfirst(&privep->pend); + if (!privreq) + { + /* The pending request list is empty. There are no queued TX + * requests to be sent. + */ + + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_EPINQEMPTY), epno); + + /* Return -ENODATA to indicate that there are no further requests + * to be processed. + */ + + return -ENODATA; + } + + /* Add this request to the tail of the active request list */ + + khci_addlast(&privep->active, privreq); + + /* Set up the first transfer for this request */ + + xfrd = 0; + bytesleft = privreq->req.len; + } + + uinfo("epno=%d req=%p: len=%d xfrd=%d index=%d nullpkt=%d\n", + epno, privreq, privreq->req.len, xfrd, index, privep->txnullpkt); + + /* Get the number of bytes left to be sent in the packet */ + + nbytes = bytesleft; + if (nbytes > 0 || privep->txnullpkt) + { + /* Either send the maxpacketsize or all of the remaining data in + * the request. + */ + + privep->txnullpkt = 0; + if (nbytes >= privep->ep.maxpacket) + { + nbytes = privep->ep.maxpacket; + + /* Handle the case where this packet is exactly the + * maxpacketsize. Do we need to send a zero-length packet + * in this case? + */ + + if (bytesleft == privep->ep.maxpacket && + (privreq->req.flags & USBDEV_REQFLAGS_NULLPKT) != 0) + { + privep->txnullpkt = 1; + } + } + } + + /* Send the packet (might be a null packet with nbytes == 0) */ + + buf = privreq->req.buf + xfrd; + + /* Setup the writes to the endpoints */ + + khci_epwrite(privep, bdt, buf, nbytes); + + /* Special case endpoint 0 state information. The write request is in + * progress. + */ + + if (epno == 0) + { + priv->ctrlstate = CTRLSTATE_WRREQUEST; + } + + /* Update for the next data IN interrupt */ + + privreq->inflight[index] = nbytes; + return OK; +} + +/**************************************************************************** + * Name: khci_wrrequest + ****************************************************************************/ + +static int khci_wrrequest(struct khci_usbdev_s *priv, struct khci_ep_s *privep) +{ + int ret; + + /* Always try to start two transfers in order to take advantage of the + * KHCI's ping pong buffering. + */ + + ret = khci_wrstart(priv, privep); +#ifndef CONFIG_USBDEV_NOWRITEAHEAD + if (ret == OK) + { + /* Note: We need to return the error condition only if nothing was + * queued + */ + + (void)khci_wrstart(priv, privep); + } +#else + UNUSED(ret); +#endif + + /* We return OK to indicate that a write request is still in progress */ + + return khci_rqhead(&privep->active) == NULL ? -ENODATA : OK; +} + +/**************************************************************************** + * Name: khci_rdcomplete + ****************************************************************************/ + +static int khci_rdcomplete(struct khci_usbdev_s *priv, + struct khci_ep_s *privep) +{ + volatile struct usbotg_bdtentry_s *bdtout; + struct khci_req_s *privreq; + int epno; + + /* Check the request at the head of the endpoint's active request queue */ + + privreq = khci_rqhead(&privep->active); + if (!privreq) + { + /* There is no active packet waiting to receive any data. Then why are + * we here? + */ + + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_EPOUTQEMPTY), + USB_EPNO(privep->ep.eplog)); + return -EINVAL; + } + + /* bdtout should point to the BDT that just completed */ + + bdtout = privep->bdtout; + epno = USB_EPNO(privep->ep.eplog); + + uinfo("EP%d: len=%d xfrd=%d\n", + epno, privreq->req.len, privreq->req.xfrd); + bdtinfo("EP%d BDT OUT [%p] {%08x, %08x}\n", + epno, bdtout, bdtout->status, bdtout->addr); + + /* We should own the BDT that just completed */ + + DEBUGASSERT((bdtout->status & USB_BDT_UOWN) == USB_BDT_COWN); + + /* Get the length of the data received from the BDT. */ + + privreq->req.xfrd = (bdtout->status & USB_BDT_BYTECOUNT_MASK) >> USB_BDT_BYTECOUNT_SHIFT; + + /* Complete the transfer and return the request to the class driver. */ + + usbtrace(TRACE_COMPLETE(USB_EPNO(privep->ep.eplog)), privreq->req.xfrd); + khci_reqcomplete(privep, OK); + + /* Nullify the BDT entry that just completed. Why? So that we can tell later + * that the BDT has been processed. No, it is not sufficient to look at the + * UOWN bit. If UOWN==0, then the transfer has been completed BUT it may not + * yet have been processed. + */ + + bdtout->status = 0; + bdtout->addr = 0; + + /* Toggle bdtout to the other BDT. Is the current bdtout the EVEN bdt? */ + + privep->bdtout = &g_bdt[EP_OUT_EVEN(epno)]; + if (bdtout == privep->bdtout) + { + /* Yes.. Then the other BDT is the ODD BDT */ + + privep->bdtout++; + } + + /* Set up the next read operation */ + + return khci_rdrequest(priv, privep); +} + +/**************************************************************************** + * Name: khci_ep0rdsetup + ****************************************************************************/ + +static int khci_ep0rdsetup(struct khci_usbdev_s *priv, uint8_t *dest, + int readlen) +{ + volatile struct usbotg_bdtentry_s *bdtout; + volatile struct usbotg_bdtentry_s *otherbdt; + struct khci_ep_s *privep; + uint32_t status; + + /* bdtout refers to the next ping-pong BDT to use. */ + + privep = &priv->eplist[EP0]; + bdtout = privep->bdtout; + + /* Get the other BDT. Check if the current BDT the EVEN BDT? */ + + otherbdt = &g_bdt[EP_OUT_EVEN(EP0)]; + if (bdtout == otherbdt) + { + /* Yes.. then the other BDT is the ODD BDT. */ + + otherbdt++; + } + + /* If there is no RX transfer in progress, then the other BDT is setup + * to receive the next setup packet. There is a race condition here! + * Stop any setup packet. + */ + + if (!priv->rxbusy) + { + /* Nullify all BDT OUT entries. Why? So that we can tell later + * that the BDT available. No, it is not sufficient to look at the + * UOWN bit. If UOWN==0, then the transfer has been completed BUT + * it may not yet have been processed. But a completely NULLified + * BDT is a sure indication + */ + + bdtout->status = 0; + bdtout->addr = 0; + otherbdt->status = 0; + otherbdt->addr = 0; + + /* Reset the other BDT to zero... this will cause any attempted use + * of the other BDT to be NAKed. Set the first DATA0/1 value to 1. + */ + + privep->rxdata1 = 1; + } + + /* Otherwise, there are RX transfers in progress. bdtout may be + * unavailable now. In that case, we are free to setup the other BDT + * in order to improve performance. NOTE: That we check if the + * entire BDT has been NULLified. That is the only sure indication + * that the BDT is available (see above). + */ + + if (bdtout->status || bdtout->addr) + { +#ifdef CONFIG_USBDEV_NOREADAHEAD + /* We will not try to read ahead */ + + return -EBUSY; +#else + /* bdtout is not available. Is the other BDT available? */ + + if (otherbdt->status || otherbdt->addr) + { + /* Neither are available... we cannot accept the request now */ + + return -EBUSY; + } + + /* Use the other BDT */ + + bdtout = otherbdt; +#endif + } + + usbtrace(TRACE_READ(EP0), readlen); + + /* Get the correct data toggle (as well as other BDT bits) */ + + if (privep->rxdata1) + { + status = (USB_BDT_UOWN | USB_BDT_DATA1 | USB_BDT_DTS); + privep->rxdata1 = 0; + } + else + { + status = (USB_BDT_UOWN | USB_BDT_DATA0 | USB_BDT_DTS); + privep->rxdata1 = 1; + } + + /* Set the data pointer, data length, and enable the endpoint */ + + bdtout->addr = (uint8_t *)dest; + status |= ((uint32_t)readlen << USB_BDT_BYTECOUNT_SHIFT); + + /* Then give the BDT to the USB */ + + bdtinfo("EP0 BDT OUT [%p] {%08x, %08x}\n", bdtout, status, bdtout->addr); + bdtout->status = status; + + priv->ctrlstate = CTRLSTATE_RDREQUEST; + priv->rxbusy = 1; + return OK; +} + +/**************************************************************************** + * Name: khci_rdsetup + ****************************************************************************/ + +static int khci_rdsetup(struct khci_ep_s *privep, uint8_t *dest, int readlen) +{ + volatile struct usbotg_bdtentry_s *bdtout; + uint32_t status; + int epno; + + /* Select a BDT. Check both the even and the ODD BDT and use the first one + * that we own. + */ + + epno = USB_EPNO(privep->ep.eplog); + + /* bdtout refers to the next ping-pong BDT to use. However, bdtout may be + * unavailable now. But, in that case, we are free to setup the other BDT + * in order to improve performance. + * + * Note that we NULLify the BDT OUT entries. This is so that we can tell + * that the BDT readlly available. No, it is not sufficient to look at the + * UOWN bit. If UOWN==0, then the transfer has been completed BUT it may + * not yet have been processed. But a completely NULLified BDT is a sure + * indication + */ + + bdtout = privep->bdtout; + if (bdtout->status || bdtout->addr) + { +#ifdef CONFIG_USBDEV_NOREADAHEAD + /* We will not try to read-ahead */ + + return -EBUSY; +#else + volatile struct usbotg_bdtentry_s *otherbdt; + + /* Is the current BDT the EVEN BDT? */ + + otherbdt = &g_bdt[EP_OUT_EVEN(epno)]; + if (bdtout == otherbdt) + { + /* Yes.. select the ODD BDT */ + + otherbdt++; + } + + /* Is the other BDT available? */ + + if (otherbdt->status || otherbdt->addr) + { + /* Neither are available... we cannot accept the request now */ + + return -EBUSY; + } + + /* Use the other BDT */ + + bdtout = otherbdt; +#endif + } + + usbtrace(TRACE_READ(USB_EPNO(privep->ep.eplog)), readlen); + + /* Clear status bits (making sure that UOWN is cleared before doing anything + * else). + */ + + bdtout->status = 0; + + /* Set the data pointer, data length, and enable the endpoint */ + + bdtout->addr = (uint8_t *)dest; + + /* Get the correct data toggle. */ + + if (privep->rxdata1) + { + status = (USB_BDT_UOWN | USB_BDT_DATA1 | USB_BDT_DTS); + privep->rxdata1 = 0; + } + else + { + status = (USB_BDT_UOWN | USB_BDT_DATA0 | USB_BDT_DTS); + privep->rxdata1 = 1; + } + + /* Set the data length (preserving the data toggle). */ + + status |= ((uint32_t)readlen << USB_BDT_BYTECOUNT_SHIFT); + + /* Then give the BDT to the USB */ + + bdtinfo("EP%d BDT OUT [%p] {%08x, %08x}\n", + epno, bdtout, status, bdtout->addr); + + bdtout->status = status; + return OK; +} + +/**************************************************************************** + * Name: khci_rdrequest + ****************************************************************************/ + +static int khci_rdrequest(struct khci_usbdev_s *priv, + struct khci_ep_s *privep) +{ + struct khci_req_s *privreq; + int readlen; + int ret; + + /* Check the request at the head of the endpoint request queue */ + + privreq = khci_rqhead(&privep->pend); + if (!privreq) + { + /* There is no packet to receive any data. */ + + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_EPOUTQEMPTY), + USB_EPNO(privep->ep.eplog)); + + /* Special case reads from to endpoint zero. If there is no transfer in + * progress, then we need to configure to received the next SETUP packet. + */ + + if (USB_EPNO(privep->ep.eplog) == 0 && + priv->ctrlstate == CTRLSTATE_RDREQUEST) + { + priv->ctrlstate = CTRLSTATE_WAITSETUP; + priv->rxbusy = 0; + } + + return OK; + } + + uinfo("EP%d: len=%d\n", USB_EPNO(privep->ep.eplog), privreq->req.len); + + /* Ignore any attempt to receive a zero length packet */ + + if (privreq->req.len == 0) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_EPOUTNULLPACKET), 0); + khci_reqcomplete(privep, OK); + return OK; + } + + /* Limit the size of the transfer to either the buffer size or the max + * packet size of the endpoint. + */ + + readlen = MIN(privreq->req.len, privep->ep.maxpacket); + + /* Handle EP0 in a few special ways */ + + if (USB_EPNO(privep->ep.eplog) == EP0) + { + ret = khci_ep0rdsetup(priv, privreq->req.buf, readlen); + } + else + { + ret = khci_rdsetup(privep, privreq->req.buf, readlen); + } + + /* If the read request was successfully setup, then move the request from + * the head of the pending request queue to the tail of the active request + * queue. + */ + + if (ret == OK) + { + privreq = khci_remfirst(&privep->pend); + DEBUGASSERT(privreq != NULL); + khci_addlast(&privep->active, privreq); + } + + return ret; +} + +/**************************************************************************** + * Name: khci_cancelrequests + ****************************************************************************/ + +static void khci_cancelrequests(struct khci_ep_s *privep, int16_t result) +{ + struct khci_req_s *privreq; + + while ((privreq = khci_remfirst(&privep->active))) + { + usbtrace(TRACE_COMPLETE(USB_EPNO(privep->ep.eplog)), privreq->req.xfrd); + khci_reqreturn(privep, privreq, result); + } + + while ((privreq = khci_remfirst(&privep->pend))) + { + usbtrace(TRACE_COMPLETE(USB_EPNO(privep->ep.eplog)), privreq->req.xfrd); + khci_reqreturn(privep, privreq, result); + } +} + +/**************************************************************************** + * Interrupt Level Processing + ****************************************************************************/ + +/**************************************************************************** + * Name: khci_dispatchrequest + ****************************************************************************/ + +static void khci_dispatchrequest(struct khci_usbdev_s *priv) +{ + int ret; + + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_DISPATCH), 0); + if (priv && priv->driver) + { + /* Forward to the control request to the class driver implementation */ + + ret = CLASS_SETUP(priv->driver, &priv->usbdev, &priv->ctrl, NULL, 0); + if (ret < 0) + { + /* Stall on failure */ + + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_DISPATCHSTALL), 0); + priv->ctrlstate = CTRLSTATE_STALL; + } + } +} + +/**************************************************************************** + * Name: khci_ep0stall + ****************************************************************************/ + +static void khci_ep0stall(struct khci_usbdev_s *priv) +{ + uint32_t regval; + + /* Check if EP0 is stalled */ + + regval = khci_getreg(KINETIS_USB0_ENDPT0); + if ((regval & USB_ENDPT_EPSTALL) != 0) + { + /* If so, clear the EP0 stall status */ + + regval &= ~USB_ENDPT_EPSTALL; + khci_putreg(regval, KINETIS_USB0_ENDPT0); + } +} + +/**************************************************************************** + * Name: khci_eptransfer + ****************************************************************************/ + +static void khci_eptransfer(struct khci_usbdev_s *priv, uint8_t epno, + uint16_t ustat) +{ + struct khci_ep_s *privep; + int ret; + + /* Decode and service non control endpoints interrupt */ + + privep = &priv->eplist[epno]; + + /* Check if the last transaction was an EP0 OUT transaction */ + + if ((ustat & USB_STAT_TX) == USB_STAT_TX_OUT) + { + /* OUT: host-to-device */ + + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_EPOUTDONE), ustat); + + /* Handle read requests. Call khci_rdcomplete() to complete the OUT + * transfer and setup the next out transfer. + */ + + ret = khci_rdcomplete(priv, privep); +#ifdef CONFIG_USBDEV_NOREADAHEAD + if (ret == OK) + { + /* If that succeeds, then try to set up another OUT transfer. */ + + (void)khci_rdrequest(priv, privep); + } +#else + UNUSED(ret); +#endif + } + else + { + /* IN: device-to-host */ + + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_EPINDONE), ustat); + + /* An outgoing IN packet has completed. Update the number of bytes transferred + * and check for completion of the transfer. + */ + + khci_wrcomplete(priv, privep); + + /* Handle additional queued write requests */ + + (void)khci_wrrequest(priv, privep); + } +} + +/**************************************************************************** + * Name: khci_ep0nextsetup + * + * Description: + * This function is called (1) after sucessful completion of an EP0 Setup + * command, or (2) after receipt of the OUT complete event (for simple + * transfers). It simply sets up the single BDT to accept the next + * SETUP commend. + * + ****************************************************************************/ + +static void khci_ep0nextsetup(struct khci_usbdev_s *priv) +{ + volatile struct usbotg_bdtentry_s *bdt = priv->eplist[EP0].bdtout; + uint32_t bytecount; + + /* This operation should be performed no more than once per OUT transaction. + * priv->ep0done is set to zero at the beginning of processing of each EP0 + * transfer. It is set the first time that this function runs after the EP0 + * transfer. + */ + + if (!priv->ep0done) + { + bytecount = (USB_SIZEOF_CTRLREQ << USB_BDT_BYTECOUNT_SHIFT); + bdt->addr = (uint8_t *)&priv->ctrl; + bdt->status = (USB_BDT_UOWN | bytecount); + priv->ep0done = 1; + } +} + +/**************************************************************************** + * Name: khci_ep0rdcomplete + * + * Description: + * This function is called after a sequence of read sequence. In this + * context, only one BDT is used. Both BDTs must be prepared to receive + * SETUP packets. + * + ****************************************************************************/ + +static void khci_ep0rdcomplete(struct khci_usbdev_s *priv) +{ + volatile struct usbotg_bdtentry_s *bdt; + struct khci_ep_s *ep0; + uint32_t physaddr; + uint32_t bytecount; + + /* This operation should be performed no more than once per OUT transaction. + * priv->ep0done is set to zero at the beginning of processing of each EP0 + * transfer. It is set the first time that this function runs after the EP0 + * transfer. + */ + + if (!priv->ep0done) + { + bytecount = (USB_SIZEOF_CTRLREQ << USB_BDT_BYTECOUNT_SHIFT); + physaddr = (uint32_t)&priv->ctrl; + + bdt = &g_bdt[EP0_OUT_EVEN]; + bdt->addr = (uint8_t *)physaddr; + bdt->status = (USB_BDT_UOWN | bytecount); + + bdt = &g_bdt[EP0_OUT_ODD]; + bdt->addr = (uint8_t *)physaddr; + bdt->status = (USB_BDT_UOWN | bytecount); + + priv->ep0done = 1; + + /* Data toggling is not used on SETUP transfers. And IN transfer + * resulting from a SETUP command should begin with DATA1. + */ + + ep0 = &priv->eplist[EP0]; + ep0->rxdata1 = 0; + ep0->txdata1 = 1; + } +} + +/**************************************************************************** + * Name: khci_ep0setup + ****************************************************************************/ + +static void khci_ep0setup(struct khci_usbdev_s *priv) +{ + volatile struct usbotg_bdtentry_s *bdt; + struct khci_ep_s *ep0; + struct khci_ep_s *privep; + union wb_u value; + union wb_u index; + union wb_u len; + union wb_u response; + uint32_t regval; + bool dispatched = false; + uint8_t epno; + int nbytes = 0; /* Assume zero-length packet */ + int ret; + + /* Cancel any pending requests. */ + + ep0 = &priv->eplist[EP0]; + khci_cancelrequests(ep0, -EPROTO); + + /* Assume NOT stalled; no TX in progress; no RX overrun. Data 0/1 toggling + * is not used on SETUP packets, but any following EP0 IN transfer should + * beginning with DATA1. + */ + + ep0->stalled = false; + ep0->rxdata1 = 0; + ep0->txdata1 = 1; + + /* Initialize for the SETUP */ + + priv->ctrlstate = CTRLSTATE_WAITSETUP; + + /* And extract the little-endian 16-bit values to host order */ + + value.w = GETUINT16(priv->ctrl.value); + index.w = GETUINT16(priv->ctrl.index); + len.w = GETUINT16(priv->ctrl.len); + + uinfo("SETUP: type=%02x req=%02x value=%04x index=%04x len=%04x\n", + priv->ctrl.type, priv->ctrl.req, value.w, index.w, len.w); + + /* Dispatch any non-standard requests */ + + if ((priv->ctrl.type & USB_REQ_TYPE_MASK) != USB_REQ_TYPE_STANDARD) + { + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_NOSTDREQ), priv->ctrl.type); + + /* Let the class implementation handle all non-standar requests */ + + khci_dispatchrequest(priv); + dispatched = true; + goto resume_packet_processing; /* Sorry about the goto */ + } + + /* Handle standard request. Pick off the things of interest to the + * USB device controller driver; pass what is left to the class driver + */ + + switch (priv->ctrl.req) + { + case USB_REQ_GETSTATUS: + { + /* type: device-to-host; recipient = device, interface, endpoint + * value: 0 + * index: zero interface endpoint + * len: 2; data = status + */ + + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_GETSTATUS), priv->ctrl.type); + if (len.w != 2 || (priv->ctrl.type & USB_REQ_DIR_IN) == 0 || + index.b[MSB] != 0 || value.w != 0) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_BADEPGETSTATUS), 0); + priv->ctrlstate = CTRLSTATE_STALL; + } + else + { + switch (priv->ctrl.type & USB_REQ_RECIPIENT_MASK) + { + case USB_REQ_RECIPIENT_ENDPOINT: + { + epno = USB_EPNO(index.b[LSB]); + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_EPGETSTATUS), epno); + if (epno >= KHCI_NENDPOINTS) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_BADEPGETSTATUS), epno); + priv->ctrlstate = CTRLSTATE_STALL; + } + else + { + privep = &priv->eplist[epno]; + response.w = 0; /* Not stalled */ + nbytes = 2; /* Response size: 2 bytes */ + + if (USB_ISEPIN(index.b[LSB])) + { + /* IN endpoint */ + + bdt = privep->bdtin; + } + else + { + /* OUT endpoint */ + + bdt = privep->bdtout; + } + + /* BSTALL set if stalled */ + + if ((bdt->status & USB_BDT_BSTALL) != 0) + { + response.b[LSB] = 1; /* Stalled, set bit 0 */ + } + } + } + break; + + case USB_REQ_RECIPIENT_DEVICE: + { + if (index.w == 0) + { + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_DEVGETSTATUS), 0); + + /* Features: Remote Wakeup=YES; selfpowered=? */ + + response.w = 0; + response.b[LSB] = (priv->selfpowered << USB_FEATURE_SELFPOWERED) | + (priv->rwakeup << USB_FEATURE_REMOTEWAKEUP); + nbytes = 2; /* Response size: 2 bytes */ + } + else + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_BADDEVGETSTATUS), 0); + priv->ctrlstate = CTRLSTATE_STALL; + } + } + break; + + case USB_REQ_RECIPIENT_INTERFACE: + { + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_IFGETSTATUS), 0); + response.w = 0; + nbytes = 2; /* Response size: 2 bytes */ + } + break; + + default: + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_BADGETSTATUS), 0); + priv->ctrlstate = CTRLSTATE_STALL; + } + break; + } + } + } + break; + + case USB_REQ_CLEARFEATURE: + { + /* type: host-to-device; recipient = device, interface or endpoint + * value: feature selector + * index: zero interface endpoint; + * len: zero, data = none + */ + + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_CLEARFEATURE), priv->ctrl.type); + if ((priv->ctrl.type & USB_REQ_RECIPIENT_MASK) == USB_REQ_RECIPIENT_DEVICE) + { + /* Disable B device from performing HNP */ + +#ifdef CONFIG_USBOTG + if (value.w == USBOTG_FEATURE_B_HNP_ENABLE) + { + /* Disable HNP */ +#warning Missing Logic + } + + /* Disable A device HNP support */ + + else if (value.w == USBOTG_FEATURE_A_HNP_SUPPORT) + { + /* Disable HNP support */ +#warning Missing Logic + } + + /* Disable alternate HNP support */ + + else if (value.w == USBOTG_FEATURE_A_ALT_HNP_SUPPORT) + { + /* Disable alternate HNP */ +#warning Missing Logic + } + else +#endif + /* Disable remote wakeup */ + + if (value.w == USB_FEATURE_REMOTEWAKEUP) + { + priv->rwakeup = 0; + } + else + { + /* Let the class implementation handle all other device features */ + + khci_dispatchrequest(priv); + dispatched = true; + } + } + else if ((priv->ctrl.type & USB_REQ_RECIPIENT_MASK) == USB_REQ_RECIPIENT_ENDPOINT) + { + epno = USB_EPNO(index.b[LSB]); + if (epno > 0 && epno < KHCI_NENDPOINTS && index.b[MSB] == 0 && + value.w == USB_FEATURE_ENDPOINTHALT && len.w == 0) + { + privep = &priv->eplist[epno]; + privep->halted = false; + ret = khci_epstall(&privep->ep, true); + UNUSED(ret); + } + else + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_BADCLEARFEATURE), 0); + priv->ctrlstate = CTRLSTATE_STALL; + } + } + else + { + /* Let the class implementation handle all other recipients. */ + + khci_dispatchrequest(priv); + dispatched = true; + } + } + break; + + case USB_REQ_SETFEATURE: + { + /* type: host-to-device; recipient = device, interface, endpoint + * value: feature selector + * index: zero interface endpoint; + * len: 0; data = none + */ + + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_SETFEATURE), priv->ctrl.type); + + if ((priv->ctrl.type & USB_REQ_RECIPIENT_MASK) == USB_REQ_RECIPIENT_DEVICE) + { + /* Enable B device to perform HNP */ + +#ifdef CONFIG_USBOTG + if (value.w == USBOTG_FEATURE_B_HNP_ENABLE) + { + /* Enable HNP */ +#warning "Missing logic" + } + + /* Enable A device HNP supports */ + + else if (value.w == USBOTG_FEATURE_A_HNP_SUPPORT) + { + /* Enable HNP support */ +#warning "Missing logic" + } + + /* Another port on the A device supports HNP */ + + else if (value.w == USBOTG_FEATURE_A_ALT_HNP_SUPPORT) + { + /* Enable alternate HNP */ +#warning "Missing logic" + } + else +#endif + + if (value.w == USB_FEATURE_REMOTEWAKEUP) + { + priv->rwakeup = 0; + } + else if (value.w == USB_FEATURE_TESTMODE) + { + /* Special case recipient=device test mode */ + + uinfo("test mode: %d\n", index.w); + } + else + { + /* Let the class implementation handle all other device features */ + + khci_dispatchrequest(priv); + dispatched = true; + } + } + else if ((priv->ctrl.type & USB_REQ_RECIPIENT_MASK) == USB_REQ_RECIPIENT_ENDPOINT) + { + /* Handler recipient=endpoint */ + + epno = USB_EPNO(index.b[LSB]); + if (epno < KHCI_NENDPOINTS && index.b[MSB] == 0 && + value.w == USB_FEATURE_ENDPOINTHALT && len.w == 0) + { + privep = &priv->eplist[epno]; + privep->halted = true; + ret = khci_epstall(&privep->ep, false); + UNUSED(ret); + } + else + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_BADSETFEATURE), 0); + priv->ctrlstate = CTRLSTATE_STALL; + } + } + else + { + /* The class driver handles all recipients except recipient=endpoint */ + + khci_dispatchrequest(priv); + dispatched = true; + } + } + break; + + case USB_REQ_SETADDRESS: + { + /* type: host-to-device; recipient = device + * value: device address + * index: 0 + * len: 0; data = none + */ + + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_EP0SETUPSETADDRESS), value.w); + if ((priv->ctrl.type & USB_REQ_RECIPIENT_MASK) != USB_REQ_RECIPIENT_DEVICE || + index.w != 0 || len.w != 0 || value.w > 127) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_BADSETADDRESS), 0); + priv->ctrlstate = CTRLSTATE_STALL; + } + else + { + /* Note that setting of the device address will be deferred. A zero-length + * packet will be sent and the device address will be set when the zero- + * length packet transfer completes. + */ + + priv->devstate = DEVSTATE_ADDRPENDING; + } + } + break; + + case USB_REQ_GETDESCRIPTOR: + /* type: device-to-host; recipient = device + * value: descriptor type and index + * index: 0 or language ID; + * len: descriptor len; data = descriptor + */ + case USB_REQ_SETDESCRIPTOR: + /* type: host-to-device; recipient = device + * value: descriptor type and index + * index: 0 or language ID; + * len: descriptor len; data = descriptor + */ + + { + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_GETSETDESC), priv->ctrl.type); + if ((priv->ctrl.type & USB_REQ_RECIPIENT_MASK) == USB_REQ_RECIPIENT_DEVICE) + { + /* The request seems valid... let the class implementation handle it */ + + khci_dispatchrequest(priv); + dispatched = true; + } + else + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_BADGETSETDESC), 0); + priv->ctrlstate = CTRLSTATE_STALL; + } + } + break; + + case USB_REQ_GETCONFIGURATION: + /* type: device-to-host; recipient = device + * value: 0; + * index: 0; + * len: 1; data = configuration value + */ + + { + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_GETCONFIG), priv->ctrl.type); + if ((priv->ctrl.type & USB_REQ_RECIPIENT_MASK) == USB_REQ_RECIPIENT_DEVICE && + value.w == 0 && index.w == 0 && len.w == 1) + { + /* The request seems valid... let the class implementation handle it */ + + khci_dispatchrequest(priv); + dispatched = true; + } + else + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_BADGETCONFIG), 0); + priv->ctrlstate = CTRLSTATE_STALL; + } + } + break; + + case USB_REQ_SETCONFIGURATION: + /* type: host-to-device; recipient = device + * value: configuration value + * index: 0; + * len: 0; data = none + */ + + { + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_SETCONFIG), priv->ctrl.type); + if ((priv->ctrl.type & USB_REQ_RECIPIENT_MASK) == USB_REQ_RECIPIENT_DEVICE && + index.w == 0 && len.w == 0) + { + /* The request seems valid... let the class implementation handle it */ + + khci_dispatchrequest(priv); + dispatched = true; + } + else + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_BADSETCONFIG), 0); + priv->ctrlstate = CTRLSTATE_STALL; + } + } + break; + + case USB_REQ_GETINTERFACE: + /* type: device-to-host; recipient = interface + * value: 0 + * index: interface; + * len: 1; data = alt interface + */ + case USB_REQ_SETINTERFACE: + /* type: host-to-device; recipient = interface + * value: alternate setting + * index: interface; + * len: 0; data = none + */ + + { + /* Let the class implementation handle the request */ + + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_GETSETIF), priv->ctrl.type); + khci_dispatchrequest(priv); + dispatched = true; + } + break; + + case USB_REQ_SYNCHFRAME: + /* type: device-to-host; recipient = endpoint + * value: 0 + * index: endpoint; + * len: 2; data = frame number + */ + + { + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_SYNCHFRAME), 0); + } + break; + + default: + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_INVALIDCTRLREQ), priv->ctrl.req); + priv->ctrlstate = CTRLSTATE_STALL; + } + break; + } + + /* PKTDIS bit is set when a Setup Transaction is received. Clear to resume + * packet processing. + */ + +resume_packet_processing: + regval = khci_getreg(KINETIS_USB0_CTL); + regval &= ~USB_CTL_TXSUSPENDTOKENBUSY; + khci_putreg(regval, KINETIS_USB0_CTL); + + /* At this point, the request has been handled and there are three possible + * outcomes: + * + * 1. The setup request was successfully handled above and a response packet + * must be sent (may be a zero length packet). + * 2. The request was successfully handled by the class implementation. In + * case, the EP0 IN response has already been queued and the local variable + * 'dispatched' will be set to true and ctrlstate != CTRLSTATE_STALL; + * 3. An error was detected in either the above logic or by the class implementation + * logic. In either case, priv->state will be set CTRLSTATE_STALL + * to indicate this case. + * + * NOTE: Non-standard requests are a special case. They are handled by the + * class implementation and this function returned early above, skipping this + * logic altogether. + */ + + if (!dispatched && (priv->ctrlstate != CTRLSTATE_STALL)) + { + /* The SETUP command was not dispatched to the class driver and the SETUP + * command did not cause a stall. We will respond. First, restrict the + * data length to the length requested in the setup packet + */ + + if (nbytes > len.w) + { + nbytes = len.w; + } + + /* Send the EP0 SETUP response (might be a zero-length packet) */ + + khci_epwrite(ep0, ep0->bdtin, response.b, nbytes); + priv->ctrlstate = CTRLSTATE_WAITSETUP; + } + + /* Did we stall? This might have occurred from the above logic OR the stall + * condition may have been set less obviously in khci_dispatchrequest(). + * In either case, we handle the stall condition the same. + * + * However, bad things happen if we try to stall a SETUP packet. So lets + * not. If we wait a bit, things will recover. Hmmm.. If we completed + * the data phase (perhaps by sending a NULL packet), then I think we + * could stall the endpoint and perhaps speed things up a bit???. + */ + + /* Set up the BDT to accept the next setup commend. */ + + khci_ep0nextsetup(priv); + priv->ctrlstate = CTRLSTATE_WAITSETUP; +} + +/**************************************************************************** + * Name: khci_ep0incomplete + ****************************************************************************/ + +static void khci_ep0incomplete(struct khci_usbdev_s *priv) +{ + struct khci_ep_s *ep0 = &priv->eplist[EP0]; + volatile struct usbotg_bdtentry_s *bdtlast; + int ret; + + /* Get the last BDT and make sure that we own it. */ + + bdtlast = ep0->bdtin; + + /* Make sure that we own the last BDT. */ + + bdtlast->status = 0; + bdtlast->addr = 0; + + /* Are we processing the completion of one packet of an outgoing request + * from the class driver? + */ + + if (priv->ctrlstate == CTRLSTATE_WRREQUEST) + { + /* An outgoing EP0 transfer has completed. Update the byte count and + * check for the completion of the transfer. + * + * NOTE: khci_wrcomplete() will toggle bdtin to the other buffer so + * we do not need to that for this case. + */ + + khci_wrcomplete(priv, &priv->eplist[EP0]); + + /* Handle the next queue IN transfer. If there are no further queued + * IN transfers, khci_wrrequest will return -ENODATA and that is the + * only expected error return value in this context. + */ + + ret = khci_wrrequest(priv, &priv->eplist[EP0]); + if (ret < 0) + { + DEBUGASSERT(ret == -ENODATA); + + /* If there is nothing to be sent, then we need to configure to + * receive the next SETUP packet. + */ + + priv->ctrlstate = CTRLSTATE_WAITSETUP; + } + } + + /* No.. Are we processing the completion of a status response? */ + + else if (priv->ctrlstate == CTRLSTATE_WAITSETUP) + { + /* Get the next IN BDT */ + + if (bdtlast == &g_bdt[EP0_IN_EVEN]) + { + ep0->bdtin = &g_bdt[EP0_IN_ODD]; + } + else + { + DEBUGASSERT(bdtlast == &g_bdt[EP0_IN_ODD]); + ep0->bdtin = &g_bdt[EP0_IN_EVEN]; + } + + /* Look at the saved SETUP command. Was it a SET ADDRESS request? + * If so, then now is the time to set the address. + */ + + if (priv->devstate == DEVSTATE_ADDRPENDING) + { + uint16_t addr = GETUINT16(priv->ctrl.value); + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_EP0ADDRESSSET), addr); + + /* This should be the equivalent state */ + + DEBUGASSERT(priv->ctrl.req == USB_REQ_SETADDRESS && + (priv->ctrl.type & REQRECIPIENT_MASK) == + (USB_REQ_TYPE_STANDARD | USB_REQ_RECIPIENT_DEVICE)); + + /* Set (or clear) the address */ + + khci_putreg(addr, KINETIS_USB0_ADDR); + if (addr > 0) + { + priv->devstate = DEVSTATE_ADDRESS; + } + else + { + priv->devstate = DEVSTATE_DEFAULT; + } + } + } + + /* No other state is expected in this context */ + + else + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_INVALIDSTATE), priv->ctrlstate); + priv->ctrlstate = CTRLSTATE_STALL; + } +} + +/**************************************************************************** + * Name: khci_ep0outcomplete + ****************************************************************************/ + +static void khci_ep0outcomplete(struct khci_usbdev_s *priv) +{ + struct khci_ep_s *ep0 = &priv->eplist[EP0]; + + switch (priv->ctrlstate) + { + /* Read request in progress */ + + case CTRLSTATE_RDREQUEST: + + /* Process the next read request for EP0 */ + + khci_rdcomplete(priv, ep0); + + /* Was this the end of the OUT transfer? */ + + if (priv->ctrlstate == CTRLSTATE_WAITSETUP) + { + /* Prepare EP0 OUT for the next SETUP transaction. */ + + khci_ep0rdcomplete(priv); + } + break; + + /* No transfer in progress, waiting for SETUP */ + + case CTRLSTATE_WAITSETUP: + { + /* In this case the last OUT transaction must have been a status + * stage of a CTRLSTATE_WRREQUEST: Prepare EP0 OUT for the next SETUP + * transaction. + */ + + khci_ep0nextsetup(priv); + } + break; + + /* Unexpected state OR host aborted the OUT transfer before it completed, + * STALL the endpoint in either case + */ + + default: + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_INVALIDSTATE), priv->ctrlstate); + priv->ctrlstate = CTRLSTATE_STALL; + } + break; + } +} + +/**************************************************************************** + * Name: khci_ep0transfer + ****************************************************************************/ + +static void khci_ep0transfer(struct khci_usbdev_s *priv, uint16_t ustat) +{ + volatile struct usbotg_bdtentry_s *bdt; + + /* The following information is available in the status register : + * + * ENDPT - The 4 bit endpoint number that cause the interrupt. + * DIR - The direction of the endpoint. + * PPBI - The ping-pong buffer used in the transaction. + */ + + priv->ep0done = 0; + + /* Check if the last transaction was an EP0 OUT transaction */ + + if ((ustat & USB_STAT_TX) == USB_STAT_TX_OUT) + { + int index; + + /* It was an EP0 OUT transaction. Get the index to the BDT. */ + + index = ((ustat & USB_STAT_ODD) == 0 ? EP0_OUT_EVEN : EP0_OUT_ODD); + bdt = &g_bdt[index]; + priv->eplist[0].bdtout = bdt; + + bdtinfo("EP0 BDT OUT [%p] {%08x, %08x}\n", bdt, bdt->status, bdt->addr); + + /* Check the current EP0 OUT buffer contains a SETUP packet */ + + if (((bdt->status & USB_BDT_PID_MASK) >> USB_BDT_PID_SHIFT) == USB_PID_SETUP_TOKEN) + { + /* Check if the SETUP transaction data went into the priv->ctrl + * buffer. If not, then we will need to copy it. + */ + + if (bdt->addr != (uint8_t *)&priv->ctrl) + { + void *src = (void *)bdt->addr; + void *dest = &priv->ctrl; + + memcpy(dest, src, USB_SIZEOF_CTRLREQ); + bdt->addr = (uint8_t *)&priv->ctrl; + } + + /* Handle the control OUT transfer */ + + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_EP0SETUPDONE), bdt->status); + khci_ep0setup(priv); + } + else + { + /* Handle the data OUT transfer */ + + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_EP0OUTDONE), ustat); + khci_ep0outcomplete(priv); + } + } + + /* No.. it was an EP0 IN transfer */ + + else /* if ((status & USB_STAT_TX) == USB_STAT_TX_IN) */ + { + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_EP0INDONE), ustat); + + /* Handle the IN transfer complete */ + + khci_ep0incomplete(priv); + } + + /* Check for a request to stall EP0 */ + + if (priv->ctrlstate == CTRLSTATE_STALL) + { + /* Stall EP0 */ + + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_EP0SETUPSTALLED), priv->ctrlstate); + (void)khci_epstall(&priv->eplist[EP0].ep, false); + } +} + +/**************************************************************************** + * Name: khci_interrupt + ****************************************************************************/ + +static int khci_interrupt(int irq, void *context) +{ + /* For now there is only one USB controller, but we will always refer to + * it using a pointer to make any future ports to multiple USB controllers + * easier. + */ + + struct khci_usbdev_s *priv = &g_usbdev; + uint16_t usbir; + uint16_t otgir; + uint32_t regval; + int i; + + /* Get the set of pending USB and OTG interrupts interrupts */ + + usbir = khci_getreg(KINETIS_USB0_ISTAT) & khci_getreg(KINETIS_USB0_INTEN); + otgir = khci_getreg(KINETIS_USB0_OTGISTAT) & khci_getreg(KINETIS_USB0_OTGICR); + + usbtrace(TRACE_INTENTRY(KHCI_TRACEINTID_INTERRUPT), usbir | otgir); + +#ifdef CONFIG_USBOTG + /* Session Request Protocol (SRP) Time Out Check */ + + /* if USB OTG SRP is ready */ +# warning "Missing logic" + { + /* Check if the 1 millisecond timer has expired */ + + if ((otgir & USBOTG_INT_T1MSEC) != 0) + { + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_T1MSEC), otgir); + + /* Check for the USB OTG SRP timeout */ +# warning "Missing logic" + { + /* Handle OTG events of the SRP timeout has expired */ +# warning "Missing logic" + } + + /* Clear Interrupt 1 msec timer Flag */ + + khci_putreg(USBOTG_INT_T1MSEC, KINETIS_USB0_ISTAT); + } + } +#endif + + /* Handle events while we are in the attached state */ + + if (priv->devstate == DEVSTATE_ATTACHED) + { + /* Clear all USB interrupts */ + + khci_putreg(USB_INT_ALL, KINETIS_USB0_ISTAT); + + /* Make sure that the USE reset and IDLE detect interrupts are enabled */ + + regval = khci_getreg(KINETIS_USB0_INTEN); + regval |= (USB_INT_USBRST | USB_INT_SLEEP); + khci_putreg(regval, KINETIS_USB0_INTEN); + + /* Now were are in the powered state */ + + priv->devstate = DEVSTATE_POWERED; + } + +#ifdef CONFIG_USBOTG + /* Check if the ID Pin Changed State */ + + if ((otgir & USBOTG_INT_ID) != 0) + { + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_OTGID), otgir); + + /* Re-detect and re-initialize */ +#warning "Missing logic" + + khci_putreg(USBOTG_INT_ID, KINETIS_USB0_ISTAT); + } +#endif +#if 0 + /* Service the USB Activity Interrupt */ + + if ((otgir & USBOTG_INT_ACTV) != 0) + { + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_WKUP), otgir); + + /* Wake-up from susepnd mode */ + + khci_putreg(USBOTG_INT_ACTV, KINETIS_USB0_ISTAT); + khci_resume(priv); + } + + /* It is pointless to continue servicing if the device is in suspend mode. */ +x + if ((khci_getreg(KINETIS_USB0_CTL) & USB_USBCTRL_SUSP) != 0) + { + /* Just clear the interrupt and return */ + + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_SUSPENDED), khci_getreg(KINETIS_USB0_CTL)); + goto interrupt_exit; + } +#endif + + /* Service USB Bus Reset Interrupt. When bus reset is received during + * suspend, ACTVIF will be set first, once the UCONbits.SUSPND is clear, + * then the URSTIF bit will be asserted. This is why URSTIF is checked + * after ACTVIF. The USB reset flag is masked when the USB state is in + * DEVSTATE_DETACHED or DEVSTATE_ATTACHED, and therefore cannot cause a + * USB reset event during these two states. + */ + + if ((usbir & USB_INT_USBRST) != 0) + { + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_RESET), usbir); + + /* Reset interrupt received. Restore our initial state. NOTE: the + * hardware automatically resets the USB address, so we really just + * need reset any existing configuration/transfer states. + */ + khci_reset(priv); + priv->devstate = DEVSTATE_DEFAULT; + +#ifdef CONFIG_USBOTG + /* Disable and deactivate HNP */ +#warning Missing Logic +#endif + /* Acknowlege the reset interrupt */ + + khci_putreg(USB_INT_USBRST, KINETIS_USB0_ISTAT); + goto interrupt_exit; + } + + /* Service IDLE interrupts */ + + if ((usbir & USB_INT_SLEEP) != 0) + { + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_IDLE), usbir); + +#ifdef CONFIG_USBOTG + /* If Suspended, Try to switch to Host */ +#warning "Missing logic" +#else + khci_suspend(priv); + +#endif + khci_putreg(USB_INT_SLEEP, KINETIS_USB0_ISTAT); + } + + /* Service SOF interrupts */ + +#ifdef CONFIG_USB_SOFINTS + if ((usbir & USB_INT_SOFTOK) != 0) + { + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_SOF), 0); + + /* I am not sure why you would ever enable SOF interrupts */ + + khci_putreg(USB_INT_SOFTOK, KINETIS_USB0_ISTAT); + } +#endif + + /* Service stall interrupts */ + + if ((usbir & USB_INT_STALL) != 0) + { + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_STALL), usbir); + + khci_ep0stall(priv); + + /* Clear the pending STALL interrupt */ + + khci_putreg(USB_INT_STALL, KINETIS_USB0_ISTAT); + } + + /* Service error interrupts */ + + if ((usbir & USB_INT_ERROR) != 0) + { + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_UERR), usbir); + uerr("ERROR: EIR=%04x\n", khci_getreg(KINETIS_USB0_ERRSTAT)); + + /* Clear all pending USB error interrupts */ + + khci_putreg(USB_EINT_ALL, KINETIS_USB0_ERRSTAT); + } + + /* There is no point in continuing if the host has not sent a bus reset. + * Once bus reset is received, the device transitions into the DEFAULT + * state and is ready for communication. + */ + +#if 0 + if (priv->devstate < DEVSTATE_DEFAULT) + { + /* Just clear the interrupt and return */ + + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_WAITRESET), priv->devstate); + goto interrupt_exit; + } +#endif + + /* Service USB Transaction Complete Interrupt */ + + if ((usbir & USB_INT_TOKDNE) != 0) + { + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_TRNC), usbir); + + /* Drain the USAT FIFO entries. If the USB FIFO ever gets full, USB + * bandwidth utilization can be compromised, and the device won't be + * able to receive SETUP packets. + */ + + for (i = 0; i < 4; i++) + { + uint8_t epno; + + /* Check the pending interrupt register. Is token processing complete. */ + + if ((khci_getreg(KINETIS_USB0_ISTAT) & USB_INT_TOKDNE) != 0) + { + regval = khci_getreg(KINETIS_USB0_STAT); + khci_putreg(USB_INT_TOKDNE, KINETIS_USB0_ISTAT); + + usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_TRNCS), regval); + + /* Handle the endpoint transfer complete event. */ + + epno = (regval & USB_STAT_ENDP_MASK) >> USB_STAT_ENDP_SHIFT; + if (epno == 0) + { + khci_ep0transfer(priv, regval); + } + else + { + khci_eptransfer(priv, epno, regval); + } + } + else + { + /* USTAT FIFO must be empty. */ + + break; + } + } + } + + /* Clear the pending USB interrupt. Goto is used in the above to assure + * that all interrupt exists pass through this logic. + */ + +interrupt_exit: + kinetis_clrpend(KINETIS_IRQ_USBOTG); + usbtrace(TRACE_INTEXIT(KHCI_TRACEINTID_INTERRUPT), usbir | otgir); + return OK; +} + +/**************************************************************************** + * Suspend/Resume Helpers + ****************************************************************************/ +/**************************************************************************** + * Name: khci_suspend + ****************************************************************************/ + +static void khci_suspend(struct khci_usbdev_s *priv) +{ +#if 0 + uint32_t regval; +#endif + + /* Notify the class driver of the suspend event */ + + if (priv->driver) + { + CLASS_SUSPEND(priv->driver, &priv->usbdev); + } + +#if 0 + /* Enable the ACTV interrupt. + * + * NOTE: Do not clear UIRbits.ACTVIF here! Reason: ACTVIF is only + * generated once an IDLEIF has been generated. This is a 1:1 ratio + * interrupt generation. For every IDLEIF, there will be only one ACTVIF + * regardless of the number of subsequent bus transitions. If the ACTIF + * is cleared here, a problem could occur. The driver services IDLEIF + * first because ACTIVIE=0. If this routine clears the only ACTIVIF, + * then it can never get out of the suspend mode. + */ + + regval = khci_getreg(KINETIS_USB0_OTGICR); + regval |= USBOTG_INT_ACTV; + khci_putreg(regval, KINETIS_USB0_OTGICR); + + /* Disable further IDLE interrupts. Once is enough. */ + + regval = khci_getreg(KINETIS_USB0_INTEN); + regval &= ~USB_INT_SLEEP; + khci_putreg(regval, KINETIS_USB0_INTEN); +#endif + + /* Invoke a callback into board-specific logic. The board-specific logic + * may enter into sleep or idle modes or switch to a slower clock, etc. + */ + + kinetis_usbsuspend((struct usbdev_s *)priv, false); +} + +/**************************************************************************** + * Name: khci_resume + ****************************************************************************/ + +static void khci_resume(struct khci_usbdev_s *priv) +{ + irqstate_t flags; + uint32_t regval; + + flags = enter_critical_section(); + + /* Start RESUME signaling */ + + regval = khci_getreg(KINETIS_USB0_CTL); + regval |= USB_CTL_RESUME; + khci_putreg(regval, KINETIS_USB0_CTL); + + /* Keep the RESUME line set for 1-13 ms */ + + up_mdelay(10); + + regval &= ~USB_CTL_RESUME; + khci_putreg(regval, KINETIS_USB0_CTL); + + /* This function is called when the USB activity interrupt occurs. + * If using clock switching, this is the place to call out to + * logic to restore the original MCU core clock frequency. + */ + + kinetis_usbsuspend((struct usbdev_s *)priv, true); + + /* Disable further activity interrupts */ +#if 0 + regval = khci_getreg(KINETIS_USB0_OTGICR); + regval &= ~USBOTG_INT_ACTV; + khci_putreg(regval, KINETIS_USB0_OTGICR); +#endif + + /* The ACTVIF bit cannot be cleared immediately after the USB module wakes + * up from Suspend or while the USB module is suspended. A few clock cycles + * are required to synchronize the internal hardware state machine before + * the ACTIVIF bit can be cleared by firmware. Clearing the ACTVIF bit + * before the internal hardware is synchronized may not have an effect on + * the value of ACTVIF. Additionally, if the USB module uses the clock from + * the 96 MHz PLL source, then after clearing the SUSPND bit, the USB + * module may not be immediately operational while waiting for the 96 MHz + * PLL to lock. + */ + + khci_putreg(USB_INT_SLEEP, KINETIS_USB0_ISTAT); + + /* Notify the class driver of the resume event */ + + if (priv->driver) + { + CLASS_RESUME(priv->driver, &priv->usbdev); + } + + leave_critical_section(flags); +} + +/**************************************************************************** + * Endpoint Helpers + ****************************************************************************/ +/**************************************************************************** + * Name: khci_epreserve + ****************************************************************************/ + +static inline struct khci_ep_s * +khci_epreserve(struct khci_usbdev_s *priv, uint8_t epset) +{ + struct khci_ep_s *privep = NULL; + irqstate_t flags; + int epndx = 0; + + flags = enter_critical_section(); + epset &= priv->epavail; + if (epset) + { + /* Select the lowest bit in the set of matching, available endpoints + * (skipping EP0) + */ + + for (epndx = 1; epndx < KHCI_NENDPOINTS; epndx++) + { + uint8_t bit = KHCI_ENDP_BIT(epndx); + if ((epset & bit) != 0) + { + /* Mark the endpoint no longer available */ + + priv->epavail &= ~bit; + + /* And return the pointer to the standard endpoint structure */ + + privep = &priv->eplist[epndx]; + break; + } + } + } + + leave_critical_section(flags); + return privep; +} + +/**************************************************************************** + * Name: khci_epunreserve + ****************************************************************************/ + +static inline void +khci_epunreserve(struct khci_usbdev_s *priv, struct khci_ep_s *privep) +{ + irqstate_t flags = enter_critical_section(); + priv->epavail |= KHCI_ENDP_BIT(USB_EPNO(privep->ep.eplog)); + leave_critical_section(flags); +} + +/**************************************************************************** + * Name: khci_epreserved + ****************************************************************************/ + +static inline bool +khci_epreserved(struct khci_usbdev_s *priv, int epno) +{ + return ((priv->epavail & KHCI_ENDP_BIT(epno)) == 0); +} + +/**************************************************************************** + * Name: khci_ep0configure + ****************************************************************************/ + +static void khci_ep0configure(struct khci_usbdev_s *priv) +{ + volatile struct usbotg_bdtentry_s *bdt; + struct khci_ep_s *ep0; + uint32_t bytecount; + + /* Enable the EP0 endpoint */ + + khci_putreg(KHCI_EP_CONTROL, KINETIS_USB0_ENDPT0); + + /* Configure the OUT BDTs. We assume that the ping-poing buffer index has + * just been reset and we expect to receive on the EVEN BDT first. Data + * toggle synchronization is not needed for SETUP packets. + */ + + ep0 = &priv->eplist[EP0]; + bytecount = (USB_SIZEOF_CTRLREQ << USB_BDT_BYTECOUNT_SHIFT); + + bdt = &g_bdt[EP0_OUT_EVEN]; + bdt->addr = (uint8_t *)&priv->ctrl; + bdt->status = (USB_BDT_UOWN | bytecount); + ep0->bdtout = bdt; + + bdt++; + bdt->status = (USB_BDT_UOWN | bytecount); + bdt->addr = (uint8_t *)&priv->ctrl; + + /* Configure the IN BDTs. */ + + bdt = &g_bdt[EP0_IN_EVEN]; + bdt->status = 0; + bdt->addr = 0; + ep0->bdtin = bdt; + + bdt++; + bdt->status = 0; + bdt->addr = 0; + + /* Data toggling is not used on SETUP transfers. And IN transfer resulting + * from a SETUP command should begin with DATA1. + */ + + ep0->rxdata1 = 0; + ep0->txdata1 = 1; +} + +/**************************************************************************** + * Endpoint operations + ****************************************************************************/ + +/**************************************************************************** + * Name: khci_epconfigure + ****************************************************************************/ + +static int khci_epconfigure(struct usbdev_ep_s *ep, + const struct usb_epdesc_s *desc, + bool last) +{ + struct khci_ep_s *privep = (struct khci_ep_s *)ep; + volatile struct usbotg_bdtentry_s *bdt; + uint16_t maxpacket; + uint32_t regval; + uint8_t epno; + bool epin; + bool bidi; + int index; + +#ifdef CONFIG_DEBUG_FEATURES + if (!ep || !desc) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_INVALIDPARMS), 0); + uerr("ERROR: ep=%p desc=%p\n"); + return -EINVAL; + } +#endif + + /* Get the unadorned endpoint address */ + + epno = USB_EPNO(desc->addr); + epin = USB_ISEPIN(desc->addr); + + usbtrace(TRACE_EPCONFIGURE, (uint16_t)epno); + DEBUGASSERT(epno == USB_EPNO(ep->eplog)); + + /* Set the requested type */ + + switch (desc->attr & USB_EP_ATTR_XFERTYPE_MASK) + { + case USB_EP_ATTR_XFER_INT: /* Interrupt endpoint */ + regval = epin ? KHCI_EP_INTIN : KHCI_EP_INTOUT; + break; + + case USB_EP_ATTR_XFER_BULK: /* Bulk endpoint */ + regval = epin ? KHCI_EP_BULKIN : KHCI_EP_BULKOUT; + break; + + case USB_EP_ATTR_XFER_ISOC: /* Isochronous endpoint */ + regval = epin ? KHCI_EP_ISOCIN : KHCI_EP_ISOCOUT; + break; + + case USB_EP_ATTR_XFER_CONTROL: /* Control endpoint */ + regval = KHCI_EP_CONTROL; + bidi = true; + break; + + default: + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_BADEPTYPE), (uint16_t)desc->type); + return -EINVAL; + } + + /* Enable the endpoint */ + + khci_putreg(regval, KINETIS_USB0_ENDPT(epno)); + + /* Setup up buffer descriptor table (BDT) entry/ies for this endpoint */ + + if (epin || bidi) + { + /* Get the pointer to BDT entry */ + + index = EP(epno, EP_DIR_IN, EP_PP_EVEN); + bdt = &g_bdt[index]; + privep->bdtin = bdt; + + /* Mark that we own the entry */ + + bdt->status = 0; + bdt->addr = 0; + + bdtinfo("EP%d BDT IN [%p] {%08x, %08x}\n", + epno, bdt, bdt->status, bdt->addr); + + /* Now do the same for the other buffer. */ + + bdt++; + bdt->status = 0; + bdt->addr = 0; + + bdtinfo("EP%d BDT IN [%p] {%08x, %08x}\n", + epno, bdt, bdt->status, bdt->addr); + } + + if (!epin || bidi) + { + index = EP(epno, EP_DIR_OUT, EP_PP_EVEN); + bdt = &g_bdt[index]; + privep->bdtout = bdt; + + /* Mark that we own the entry */ + + bdt->status = 0; + bdt->addr = 0; + + bdtinfo("EP%d BDT OUT [%p] {%08x, %08x}\n", + epno, bdt, bdt->status, bdt->addr); + + /* Now do the same for the other buffer. */ + + bdt++; + bdt->status = 0; + bdt->addr = 0; + + bdtinfo("EP%d BDT OUT [%p] {%08x, %08x}\n", + epno, bdt, bdt->status, bdt->addr); + } + + /* Get the maxpacket size of the endpoint. */ + + maxpacket = GETUINT16(desc->mxpacketsize); + DEBUGASSERT(maxpacket <= KHCI_MAXPACKET_SIZE); + ep->maxpacket = maxpacket; + + /* Set the full, logic EP number (that includes direction encoded in bit 7) */ + + if (epin) + { + ep->eplog = USB_EPIN(epno); + } + else + { + ep->eplog = USB_EPOUT(epno); + } + + return OK; +} + +/**************************************************************************** + * Name: khci_epdisable + ****************************************************************************/ + +static int khci_epdisable(struct usbdev_ep_s *ep) +{ + struct khci_ep_s *privep; + volatile uint32_t *ptr; + int epno; + int i; + irqstate_t flags; + +#ifdef CONFIG_DEBUG_FEATURES + if (!ep) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_INVALIDPARMS), 0); + uerr("ERROR: ep=%p\n", ep); + return -EINVAL; + } +#endif + + privep = (struct khci_ep_s *)ep; + epno = USB_EPNO(ep->eplog); + usbtrace(TRACE_EPDISABLE, epno); + + /* Cancel any ongoing activity */ + + flags = enter_critical_section(); + khci_cancelrequests(privep, -ESHUTDOWN); + + /* Disable the endpoint */ + + khci_putreg(0, KINETIS_USB0_ENDPT(epno)); + + /* Reset the BDTs for the endpoint. Four BDT entries per endpoint; Two + * 32-bit words per BDT. + */ + + ptr = (uint32_t *)&g_bdt[EP(epno, EP_DIR_OUT, EP_PP_EVEN)]; + for (i = 0; i < USB_BDT_WORD_SIZE * USB_NBDTS_PER_EP; i++) + { + *ptr++ = 0; + } + + leave_critical_section(flags); + return OK; +} + +/**************************************************************************** + * Name: khci_epallocreq + ****************************************************************************/ + +static struct usbdev_req_s *khci_epallocreq(struct usbdev_ep_s *ep) +{ + struct khci_req_s *privreq; + +#ifdef CONFIG_DEBUG_FEATURES + if (!ep) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_INVALIDPARMS), 0); + return NULL; + } +#endif + + usbtrace(TRACE_EPALLOCREQ, USB_EPNO(ep->eplog)); + + privreq = (struct khci_req_s *)kmm_malloc(sizeof(struct khci_req_s)); + if (!privreq) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_ALLOCFAIL), 0); + return NULL; + } + + memset(privreq, 0, sizeof(struct khci_req_s)); + return &privreq->req; +} + +/**************************************************************************** + * Name: khci_epfreereq + ****************************************************************************/ + +static void khci_epfreereq(struct usbdev_ep_s *ep, struct usbdev_req_s *req) +{ + struct khci_req_s *privreq = (struct khci_req_s *)req; + +#ifdef CONFIG_DEBUG_FEATURES + if (!ep || !req) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_INVALIDPARMS), 0); + return; + } +#endif + + usbtrace(TRACE_EPFREEREQ, USB_EPNO(ep->eplog)); + + kmm_free(privreq); +} + +/**************************************************************************** + * Name: khci_epsubmit + ****************************************************************************/ + +static int khci_epsubmit(struct usbdev_ep_s *ep, struct usbdev_req_s *req) +{ + struct khci_req_s *privreq = (struct khci_req_s *)req; + struct khci_ep_s *privep = (struct khci_ep_s *)ep; + struct khci_usbdev_s *priv; + irqstate_t flags; + uint8_t epno; + int ret = OK; + +#ifdef CONFIG_DEBUG_FEATURES + if (!req || !req->callback || !req->buf || !ep) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_INVALIDPARMS), 0); + uerr("ERROR: req=%p callback=%p buf=%p ep=%p\n", + req, req->callback, req->buf, ep); + return -EINVAL; + } +#endif + + usbtrace(TRACE_EPSUBMIT, USB_EPNO(ep->eplog)); + priv = privep->dev; + +#ifdef CONFIG_DEBUG_FEATURES + if (!priv->driver) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_NOTCONFIGURED), priv->usbdev.speed); + uerr("ERROR: driver=%p\n", priv->driver); + return -ESHUTDOWN; + } +#endif + + /* Handle the request from the class driver */ + + epno = USB_EPNO(ep->eplog); + req->result = -EINPROGRESS; + req->xfrd = 0; + privreq->inflight[0] = 0; +#ifndef CONFIG_USBDEV_NOWRITEAHEAD + privreq->inflight[1] = 0; +#endif + flags = enter_critical_section(); + + /* Add the new request to the request queue for the OUT endpoint */ + + khci_addlast(&privep->pend, privreq); + + /* Handle IN (device-to-host) requests. NOTE: If the class device is + * using the bi-directional EP0, then we assume that they intend the EP0 + * IN functionality. + */ + + if (USB_ISEPIN(ep->eplog) || epno == EP0) + { + usbtrace(TRACE_INREQQUEUED(epno), req->len); + + /* If the endpoint is not stalled and an IN endpoint BDT is available, + * then transfer the data now. + */ + + if (!privep->stalled) + { + (void)khci_wrrequest(priv, privep); + } + } + + /* Handle OUT (host-to-device) requests */ + + else + { + usbtrace(TRACE_OUTREQQUEUED(epno), req->len); + + /* Set up the read operation (unless the endpoint is stalled). Because + * the KHCI supports ping-pong* buffering. There may be two pending + * read requests. The following call will attempt to setup a read + * using this request for this endpoint. It is not harmful if this + * fails. + */ + + if (!privep->stalled) + { + (void)khci_rdrequest(priv, privep); + } + } + + leave_critical_section(flags); + return ret; +} + +/**************************************************************************** + * Name: khci_epcancel + ****************************************************************************/ + +static int khci_epcancel(struct usbdev_ep_s *ep, struct usbdev_req_s *req) +{ + struct khci_ep_s *privep = (struct khci_ep_s *)ep; + irqstate_t flags; + +#ifdef CONFIG_DEBUG_FEATURES + if (!ep || !req) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_INVALIDPARMS), 0); + return -EINVAL; + } +#endif + + usbtrace(TRACE_EPCANCEL, USB_EPNO(ep->eplog)); + + flags = enter_critical_section(); + khci_cancelrequests(privep, -EAGAIN); + leave_critical_section(flags); + return OK; +} + +/**************************************************************************** + * Name: khci_epbdtstall + ****************************************************************************/ + +static int khci_epbdtstall(struct usbdev_ep_s *ep, bool resume, bool epin) +{ + struct khci_ep_s *privep; + struct khci_usbdev_s *priv; + volatile struct usbotg_bdtentry_s *bdt; + volatile struct usbotg_bdtentry_s *otherbdt; + uint32_t regaddr; + uint32_t regval; + uint8_t epno; + + /* Recover pointers */ + + privep = (struct khci_ep_s *)ep; + priv = (struct khci_usbdev_s *)privep->dev; + epno = USB_EPNO(ep->eplog); + + /* Check for an IN endpoint */ + + if (epin) + { + /* Get a pointer to the current IN BDT */ + + bdt = privep->bdtin; + + /* Get the other BDT */ + + otherbdt = &g_bdt[EP(epno, EP_DIR_IN, EP_PP_EVEN)]; + if (otherbdt == bdt) + { + otherbdt++; + } + + /* Reset the data toggle */ + + privep->txdata1 = false; + } + + /* Otherwise it is an an OUT endpoint. */ + + else + { + /* Get a pointer to the current OUT BDT */ + + bdt = privep->bdtout; + + /* Get a pointer to the other BDT */ + + otherbdt = &g_bdt[EP(epno, EP_DIR_OUT, EP_PP_EVEN)]; + if (otherbdt == bdt) + { + otherbdt++; + } + + /* Reset the data toggle */ + + privep->rxdata1 = false; + } + + /* Handle the resume condition */ + + if (resume) + { + /* Resuming a stalled endpoint */ + + usbtrace(TRACE_EPRESUME, epno); + + /* Point to the appropriate EP register */ + + regaddr = KINETIS_USB0_ENDPT(epno); + + /* Clear the STALL bit in the UEP register */ + + regval = khci_getreg(regaddr); + regval &= ~USB_ENDPT_EPSTALL; + khci_putreg(regval, regaddr); + + /* Check for the EP0 OUT endpoint. This is a special case because we + * need to set it up to receive the next setup packet (Hmmm... what + * if there are queued outgoing reponses. We need to revisit this.) + */ + + if (epno == 0 && !epin) + { + uint32_t bytecount = (USB_SIZEOF_CTRLREQ << USB_BDT_BYTECOUNT_SHIFT); + uint32_t physaddr = (uint32_t)&priv->ctrl; + + /* Configure the other BDT to receive a SETUP command. */ + + otherbdt->addr = (uint8_t *)physaddr; + otherbdt->status = (USB_BDT_UOWN | bytecount); + + /* Configure the current BDT to receive a SETUP command. */ + + bdt->addr = (uint8_t *)physaddr; + bdt->status = (USB_BDT_UOWN | bytecount); + + bdtinfo("EP0 BDT IN [%p] {%08x, %08x}\n", + bdt, bdt->status, bdt->addr); + bdtinfo("EP0 BDT IN [%p] {%08x, %08x}\n", + otherbdt, otherbdt->status, otherbdt->addr); + } + else + { + /* Return the other BDT to the CPU. */ + + otherbdt->addr = 0; + otherbdt->status = 0; + + /* Return the current BDT to the CPU. */ + + bdt->addr = 0; + bdt->status = 0; + + bdtinfo("EP%d BDT %s [%p] {%08x, %08x}\n", + epno, epin ? "IN" : "OUT", bdt, bdt->status, bdt->addr); + bdtinfo("EP%d BDT %s [%p] {%08x, %08x}\n", + epno, epin ? "IN" : "OUT", otherbdt, otherbdt->status, otherbdt->addr); + + /* Restart any queued requests (after a delay so that we can be assured + * that the hardware has recovered from the stall -- I don't know of any + * other way to assure this.). + */ + + khci_delayedrestart(priv, epno); + } + } + + /* Handle the stall condition */ + + else + { + usbtrace(TRACE_EPSTALL, epno); + privep->stalled = true; + + /* Stall the other BDT. */ + + otherbdt->status = (USB_BDT_UOWN | USB_BDT_BSTALL); + otherbdt->addr = 0; + + /* Stall the current BDT. */ + + bdt->status = (USB_BDT_UOWN | USB_BDT_BSTALL); + bdt->addr = 0; + + /* Stop any queued requests. Hmmm.. is there a race condition here? */ + + khci_rqstop(privep); + + bdtinfo("EP%d BDT %s [%p] {%08x, %08x}\n", + epno, epin ? "IN" : "OUT", bdt, bdt->status, bdt->addr); + bdtinfo("EP%d BDT %s [%p] {%08x, %08x}\n", + epno, epin ? "IN" : "OUT", otherbdt, otherbdt->status, otherbdt->addr); + } + + return OK; +} + +/**************************************************************************** + * Name: khci_epstall + ****************************************************************************/ + +static int khci_epstall(struct usbdev_ep_s *ep, bool resume) +{ + struct khci_ep_s *privep; + irqstate_t flags; + int ret; + +#ifdef CONFIG_DEBUG_FEATURES + if (!ep) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_INVALIDPARMS), 0); + return -EINVAL; + } +#endif + + /* Recover pointers */ + + privep = (struct khci_ep_s *)ep; + + /* STALL or RESUME the endpoint */ + + flags = enter_critical_section(); + + /* Special case EP0. When we stall EP0 we have to stall both the IN and + * OUT BDTs. + */ + + if (USB_EPNO(ep->eplog) == 0) + { + ret = khci_epbdtstall(ep, resume, true); + if (ret == OK) + { + ret = khci_epbdtstall(ep, resume, false); + } + + /* Set the EP0 control state appropriately */ + + privep->dev->ctrlstate = resume ? CTRLSTATE_WAITSETUP : CTRLSTATE_STALLED; + } + + /* Otherwise, select the BDT for the endpoint direction */ + + else + { + /* It is a unidirectional endpoint */ + + ret = khci_epbdtstall(ep, resume, USB_ISEPIN(ep->eplog)); + } + + leave_critical_section(flags); + return ret; +} + +/**************************************************************************** + * Device Controller Operations + ****************************************************************************/ +/**************************************************************************** + * Name: khci_allocep + ****************************************************************************/ + +static struct usbdev_ep_s *khci_allocep(struct usbdev_s *dev, uint8_t epno, + bool epin, uint8_t eptype) +{ + struct khci_usbdev_s *priv = (struct khci_usbdev_s *)dev; + struct khci_ep_s *privep = NULL; + uint16_t epset = KHCI_ENDP_ALLSET; + + usbtrace(TRACE_DEVALLOCEP, (uint16_t)epno); +#ifdef CONFIG_DEBUG_FEATURES + if (!dev) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_INVALIDPARMS), 0); + return NULL; + } +#endif + + /* Ignore any direction bits in the logical address */ + + epno = USB_EPNO(epno); + + /* A logical address of 0 means that any endpoint will do */ + + if (epno > 0) + { + /* Otherwise, we will return the endpoint structure only for the requested + * 'logical' endpoint. All of the other checks will still be performed. + * + * First, verify that the logical endpoint is in the range supported by + * by the hardware. + */ + + if (epno >= KHCI_NENDPOINTS) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_BADEPNO), (uint16_t)epno); + return NULL; + } + + /* Convert the logical address to a physical OUT endpoint address and + * remove all of the candidate endpoints from the bitset except for the + * the IN/OUT pair for this logical address. + */ + + epset = KHCI_ENDP_BIT(epno); + } + + /* Check if the selected endpoint number is available */ + + privep = khci_epreserve(priv, epset); + if (!privep) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_EPRESERVE), (uint16_t)epset); + return NULL; + } + + return &privep->ep; +} + +/**************************************************************************** + * Name: khci_freeep + ****************************************************************************/ + +static void khci_freeep(struct usbdev_s *dev, struct usbdev_ep_s *ep) +{ + struct khci_usbdev_s *priv; + struct khci_ep_s *privep; + +#ifdef CONFIG_DEBUG_FEATURES + if (!dev || !ep) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_INVALIDPARMS), 0); + return; + } +#endif + + priv = (struct khci_usbdev_s *)dev; + privep = (struct khci_ep_s *)ep; + usbtrace(TRACE_DEVFREEEP, (uint16_t)USB_EPNO(ep->eplog)); + DEBUGASSERT(priv && privep); + + /* Disable the endpoint */ + + (void)khci_epdisable(ep); + + /* Mark the endpoint as available */ + + khci_epunreserve(priv, privep); +} + +/**************************************************************************** + * Name: khci_getframe + ****************************************************************************/ + +static int khci_getframe(struct usbdev_s *dev) +{ + uint16_t frml; + uint16_t frmh; + uint16_t tmp; + +#ifdef CONFIG_DEBUG_FEATURES + if (!dev) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_INVALIDPARMS), 0); + return -EINVAL; + } +#endif + + /* Return the last frame number detected by the hardware. Thr FRMH/L + * registers are updated with the current frame number whenever a SOF + * TOKEN is received. + */ + + do + { + /* Loop until we can be sure that there was no wrap from the FRML + * to the FRMH register. + */ + + frmh = khci_getreg(KINETIS_USB0_FRMNUMH) & USB_FRMNUMH_MASK; + frml = khci_getreg(KINETIS_USB0_FRMNUML) & USB_FRMNUML_MASK; + tmp = khci_getreg(KINETIS_USB0_FRMNUMH) & USB_FRMNUMH_MASK; + } + while (frmh != tmp); + + /* Combine to for the full 11-bit value */ + + tmp = (frmh) << 8 | frml; + usbtrace(TRACE_DEVGETFRAME, tmp); + return tmp; +} + +/**************************************************************************** + * Name: khci_wakeup + ****************************************************************************/ + +static int khci_wakeup(struct usbdev_s *dev) +{ + struct khci_usbdev_s *priv = (struct khci_usbdev_s *)dev; + + usbtrace(TRACE_DEVWAKEUP, 0); +#ifdef CONFIG_DEBUG_FEATURES + if (!dev) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_INVALIDPARMS), 0); + return -EINVAL; + } +#endif + + /* Resume normal operation. */ + + khci_resume(priv); + return OK; +} + +/**************************************************************************** + * Name: khci_selfpowered + ****************************************************************************/ + +static int khci_selfpowered(struct usbdev_s *dev, bool selfpowered) +{ + struct khci_usbdev_s *priv = (struct khci_usbdev_s *)dev; + + usbtrace(TRACE_DEVSELFPOWERED, (uint16_t)selfpowered); + +#ifdef CONFIG_DEBUG_FEATURES + if (!dev) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_INVALIDPARMS), 0); + return -ENODEV; + } +#endif + + priv->selfpowered = selfpowered; + return OK; +} + +/**************************************************************************** + * Initialization/Reset + ****************************************************************************/ + +/**************************************************************************** + * Name: khci_reset + * + * Description: + * Reset the software and hardware states. If the USB controller has been + * attached to a host, then connect to the bus as well. At the end of + * this reset, the hardware should be in the full up, ready-to-run state. + * + ****************************************************************************/ + +static void khci_reset(struct khci_usbdev_s *priv) +{ + /* Reset the software configuration */ + + khci_swreset(priv); + + /* Re-configure the USB controller in its initial, unconnected state */ + + khci_hwreset(priv); + + /* khci_attach() was called, then the attach flag will be set and we + * should also attach to the USB bus. + */ + + if (priv->attached) + { + /* usbdev_attach() has already been called.. attach to the bus + * now + */ + + khci_attach(priv); + } +} + +/**************************************************************************** + * Name: khci_attach + ****************************************************************************/ + +static void khci_attach(struct khci_usbdev_s *priv) +{ + uint32_t regval; + + /* Check if we are in the detached state */ + + if (priv->devstate == DEVSTATE_DETACHED) + { + /* Disable USB interrupts at the interrupt controller */ + + up_disable_irq(KINETIS_IRQ_USBOTG); + + /* Initialize registers to known states. */ + +#if 1 + khci_putreg(0x1,KINETIS_USB0_CTL); + khci_putreg(0,KINETIS_USB0_USBCTRL); +#endif + + /* Enable interrupts at the USB controller */ + + khci_putreg(ERROR_INTERRUPTS, KINETIS_USB0_ERREN); + khci_putreg(NORMAL_INTERRUPTS, KINETIS_USB0_INTEN); + + /* Configure EP0 */ + + khci_ep0configure(priv); + + /* Flush any pending transactions */ +#if 1 + while ((khci_getreg(KINETIS_USB0_ISTAT) & USB_INT_TOKDNE) != 0) + { + khci_putreg(USB_INT_TOKDNE, KINETIS_USB0_ISTAT); + } + + /* Make sure packet processing is enabled */ + + regval = khci_getreg(KINETIS_USB0_CTL); + regval &= ~USB_CTL_TXSUSPENDTOKENBUSY; + khci_putreg(regval, KINETIS_USB0_CTL); + + /* Enable the USB module and attach to bus */ + + do + { + regval = khci_getreg(KINETIS_USB0_CTL); + if ((regval & USB_CTL_USBENSOFEN) == 0) + { + khci_putreg(regval | USB_CTL_USBENSOFEN, KINETIS_USB0_CTL); + } + } + while ((regval & USB_CTL_USBENSOFEN) == 0); + + /* Enable OTG */ + +#ifdef CONFIG_USBOTG + regval = khci_getreg(KINETIS_USB0_OTGCTL); + regval |= (USBOTG_CON_DPPULUP | USBOTG_CON_OTGEN); + khci_putreg(regval, KINETIS_USB0_OTGCTL); +#endif + + /* Transition to the attached state */ + + priv->devstate = DEVSTATE_ATTACHED; + priv->usbdev.speed = USB_SPEED_FULL; + + /* Clear all pending USB interrupts */ + + khci_putreg(USB_EINT_ALL, KINETIS_USB0_ERRSTAT); + khci_putreg(USB_INT_ALL, KINETIS_USB0_ISTAT); +#endif + + /* Enable USB interrupts at the interrupt controller */ + + up_enable_irq(KINETIS_IRQ_USBOTG); + + /* Enable pull-up to connect the device. The host should enumerate us + * some time after this + */ + + kinetis_usbpullup(&priv->usbdev, true); + } +} + +/**************************************************************************** + * Name: khci_detach + ****************************************************************************/ + +static void khci_detach(struct khci_usbdev_s *priv) +{ +#ifdef CONFIG_USBOTG + uint32_t regval; +#endif + + /* Disable USB interrupts at the interrupt controller */ + + up_disable_irq(KINETIS_IRQ_USBOTG); + + /* Disable the USB controller and detach from the bus. */ + + khci_putreg(0, KINETIS_USB0_CTL); + + /* Mask all USB interrupts */ + + khci_putreg(0, KINETIS_USB0_INTEN); + + /* We are now in the detached state */ + + priv->attached = 0; + priv->devstate = DEVSTATE_DETACHED; + +#ifdef CONFIG_USBOTG + /* Disable the D+ Pullup */ + + regval = khci_getreg(KINETIS_USB0_OTGCTL); + regval &= ~USBOTG_CON_DPPULUP; + khci_putreg(regval, KINETIS_USB0_OTGCTL); + + /* Disable and deactivate HNP */ +#warning Missing Logic + + /* Check if the ID Pin Changed State */ + + if ((khci_getreg(KINETIS_USB0_ISTAT) & khci_getreg(KINETIS_USB0_OTGICR) & USBOTG_INT_ID) != 0) + { + /* Re-detect & Initialize */ +#warning "Missing logic" + + /* Clear ID Interrupt Flag */ + + khci_putreg(USBOTG_INT_ID, KINETIS_USB0_ISTAT); + } +#endif +} + +/**************************************************************************** + * Name: khci_swreset + ****************************************************************************/ + +static void khci_swreset(struct khci_usbdev_s *priv) +{ + int epno; + + /* Tell the class driver that we are disconnected. The class driver + * should then accept any new configurations. + */ + + if (priv->driver) + { + CLASS_DISCONNECT(priv->driver, &priv->usbdev); + } + + /* Flush and reset endpoint states (except EP0) */ + + for (epno = 1; epno < KHCI_NENDPOINTS; epno++) + { + struct khci_ep_s *privep = &priv->eplist[epno]; + + /* Cancel any queued requests. Since they are canceled + * with status -ESHUTDOWN, then will not be requeued + * until the configuration is reset. NOTE: This should + * not be necessary... the CLASS_DISCONNECT above should + * result in the class implementation calling khci_epdisable + * for each of its configured endpoints. + */ + + khci_cancelrequests(privep, -EAGAIN); + + /* Reset endpoint status */ + + privep->stalled = false; + privep->halted = false; + privep->txnullpkt = false; + } + + /* Reset to the default address */ + + khci_putreg(0, KINETIS_USB0_ADDR); + + /* Unconfigure each endpoint by clearing the endpoint control registers + * (except EP0) + */ + + for (epno = 1; epno < KHCI_NENDPOINTS; epno++) + { + khci_putreg(0, KINETIS_USB0_ENDPT(epno)); + } + + /* Reset the control state */ + + priv->ctrlstate = CTRLSTATE_WAITSETUP; + priv->rxbusy = 0; +} + +/**************************************************************************** + * Name: khci_hwreset + * + * Description: + * Reset the hardware and leave it in a known, unready state. + * + ****************************************************************************/ + +static void khci_hwreset(struct khci_usbdev_s *priv) +{ + uint32_t regval; + +#define USB_FLASH_ACCESS +#ifdef USB_FLASH_ACCESS + /* Allow USBOTG-FS Controller to Read from FLASH */ + + regval = getreg32(KINETIS_FMC_PFAPR); + regval &= ~(FMC_PFAPR_M4AP_MASK); + regval |= (FMC_PFAPR_RDONLY << FMC_PFAPR_M4AP_SHIFT); + putreg32(regval, KINETIS_FMC_PFAPR); +#endif + + /* Clear all of the buffer descriptor table (BDT) entries */ + + memset((void *)g_bdt, 0, sizeof(g_bdt)); + + /* Soft reset the USB Module */ + + regval = khci_getreg(KINETIS_USB0_USBTRC0); + regval |= USB_USBTRC0_USBRESET; + khci_putreg(regval,KINETIS_USB0_USBTRC0); + + /* Is this really necessary? */ + + while (khci_getreg(KINETIS_USB0_USBTRC0) & USB_USBTRC0_USBRESET); + + /* Set the address of the buffer descriptor table (BDT) + * + * BDTP1: Bit 1-7: Bits 9-15 of the BDT base address + * BDTP2: Bit 0-7: Bits 16-23 of the BDT base address + * BDTP3: Bit 0-7: Bits 24-31 of the BDT base address + */ + + khci_putreg((uint8_t)((uint32_t)g_bdt >> 24), KINETIS_USB0_BDTPAGE3); + khci_putreg((uint8_t)((uint32_t)g_bdt >> 16), KINETIS_USB0_BDTPAGE2); + khci_putreg((uint8_t)(((uint32_t)g_bdt >> 8) & USB_BDTPAGE1_MASK), KINETIS_USB0_BDTPAGE1); + + uinfo("BDT Address %hhx \n" ,&g_bdt); + uinfo("BDTPAGE3 %hhx\n",khci_getreg(KINETIS_USB0_BDTPAGE3)); + uinfo("BDTPAGE2 %hhx\n",khci_getreg(KINETIS_USB0_BDTPAGE2)); + uinfo("BDTPAGE1 %hhx\n",khci_getreg(KINETIS_USB0_BDTPAGE1)); + + /* Clear any pending interrupts */ + + khci_putreg(0xFF, KINETIS_USB0_ERRSTAT); + khci_putreg(0xFF, KINETIS_USB0_ISTAT); + khci_putreg(0xFF,KINETIS_USB0_OTGISTAT); + +#if 1 + /* Assert reset request to all of the Ping Pong buffer pointers. This + * will reset all Even/Odd buffer pointers to the EVEN BD banks. + */ + + regval = khci_getreg(KINETIS_USB0_CTL); + regval |= USB_CTL_ODDRST; + khci_putreg(regval, KINETIS_USB0_CTL); + + /* Bring the ping pong buffer pointers out of reset */ + + regval &= ~USB_CTL_ODDRST; + khci_putreg(regval, KINETIS_USB0_CTL); +#endif + +#if 1 + /* Undocumented bit */ + + regval = khci_getreg(KINETIS_USB0_USBTRC0); + regval |= 0x40; + khci_putreg(regval,KINETIS_USB0_USBTRC0); +#endif + + priv->devstate = DEVSTATE_DETACHED; +} + +/**************************************************************************** + * Name: khci_stateinit + ****************************************************************************/ + +static void khci_stateinit(struct khci_usbdev_s *priv) +{ + int epno; + + /* Disconnect the device / disable the pull-up. We don't want the + * host to enumerate us until the class driver is registered. + */ + + kinetis_usbpullup(&priv->usbdev, false); + + /* Initialize the device state structure. NOTE: many fields + * have the initial value of zero and, hence, are not explicitly + * initialized here. + */ + + memset(priv, 0, sizeof(struct khci_usbdev_s)); + priv->usbdev.ops = &g_devops; + priv->usbdev.ep0 = &priv->eplist[EP0].ep; + priv->epavail = KHCI_ENDP_ALLSET & ~KHCI_ENDP_BIT(EP0); + priv->rwakeup = 1; + + /* Initialize the endpoint list */ + + for (epno = 0; epno < KHCI_NENDPOINTS; epno++) + { + struct khci_ep_s *privep = &priv->eplist[epno]; + + /* Set endpoint operations, reference to driver structure (not + * really necessary because there is only one controller), and + * the (physical) endpoint number which is just the index to the + * endpoint. + */ + + privep->ep.ops = &g_epops; + privep->dev = priv; + privep->ep.eplog = epno; + + /* We will use a fixed maxpacket size for all endpoints (perhaps + * ISOC endpoints could have larger maxpacket???). A smaller + * packet size can be selected when the endpoint is configured. + */ + + privep->ep.maxpacket = KHCI_MAXPACKET_SIZE; + } + + /* Select a smaller endpoint size for EP0 */ + +#if KHCI_EP0MAXPACKET < KHCI_MAXPACKET_SIZE + priv->eplist[EP0].ep.maxpacket = KHCI_EP0MAXPACKET; +#endif +} + +/**************************************************************************** + * Name: khci_hwshutdown + ****************************************************************************/ + +static void khci_hwshutdown(struct khci_usbdev_s *priv) +{ +#if 0 + uint32_t regval; +#endif + + /* Put the hardware and driver in its initial, unconnected state */ + + khci_swreset(priv); + khci_hwreset(priv); + priv->usbdev.speed = USB_SPEED_UNKNOWN; + + /* Disable all interrupts and force the USB controller into reset */ + + khci_putreg(0, KINETIS_USB0_ERREN); + khci_putreg(0, KINETIS_USB0_INTEN); + + /* Clear any pending interrupts */ + + khci_putreg(USB_EINT_ALL, KINETIS_USB0_ERRSTAT); + khci_putreg(USB_INT_ALL, KINETIS_USB0_ISTAT); + + /* Disconnect the device / disable the pull-up */ + + kinetis_usbpullup(&priv->usbdev, false); + + /* Power down the USB controller */ +#warning FIXME powerdown USB Controller + +#if 0 + regval = khci_getreg(KHCI_USB_PWRC); + regval &= ~USB_PWRC_USBPWR; + khci_putreg(regval, KHCI_USB_PWRC); +#endif +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: up_usbinitialize + * + * Description: + * Initialize the USB driver + * + * Input Parameters: + * None + * + * Returned Value: + * None + * + ****************************************************************************/ + +void up_usbinitialize(void) +{ + struct khci_usbdev_s *priv = &g_usbdev; + uint32_t regval; + + /* For now there is only one USB controller, but we will always refer to + * it using a pointer to make any future ports to multiple USB controllers + * easier. + */ +#if 1 + /* 1: Select clock source */ + + regval = getreg32(KINETIS_SIM_SOPT2); + regval |= SIM_SOPT2_PLLFLLSEL | SIM_SOPT2_USBSRC; + putreg32(regval, KINETIS_SIM_SOPT2); + + regval = getreg32(KINETIS_SIM_CLKDIV2); +#if defined(CONFIG_TEENSY_3X_OVERCLOCK) + /* (USBFRAC + 0)/(USBDIV + 1) = (1 + 0)/(1 + 1) = 1/2 for 96Mhz clock */ + + regval = SIM_CLKDIV2_USBDIV(1); +#else + /* 72Mhz */ + + regval = SIM_CLKDIV2_USBDIV(2) | SIM_CLKDIV2_USBFRAC; +#endif + putreg32(regval, KINETIS_SIM_CLKDIV2); + + /* 2: Gate USB clock */ + + regval = getreg32(KINETIS_SIM_SCGC4); + regval |= SIM_SCGC4_USBOTG; + putreg32(regval, KINETIS_SIM_SCGC4); + +#endif + + usbtrace(TRACE_DEVINIT, 0); + + /* Initialize the driver state structure */ + + khci_stateinit(priv); + + /* Then perform a few one-time initialization operstions. First, initialize + * the watchdog timer that is used to perform a delayed queue restart + * after recovering from a stall. + */ + + priv->epstalled = 0; + priv->wdog = wd_create(); + + /* Attach USB controller interrupt handler. The hardware will not be + * initialized and interrupts will not be enabled until the class device + * driver is bound. Getting the IRQs here only makes sure that we have + * them when we need them later. + */ + + if (irq_attach(KINETIS_IRQ_USBOTG, khci_interrupt) != 0) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_IRQREGISTRATION), + (uint16_t)KINETIS_IRQ_USBOTG); + up_usbuninitialize(); + } + +#ifdef CONFIG_ARCH_IRQPRIO + /* Set the interrupt priority */ + + up_prioritize_irq(KINETIS_IRQ_USBOTG, 112); +#endif +} + +/**************************************************************************** + * Name: up_usbuninitialize + * Description: + * Initialize the USB driver + * Input Parameters: + * None + * + * Returned Value: + * None + * + ****************************************************************************/ + +void up_usbuninitialize(void) +{ + /* For now there is only one USB controller, but we will always refer to + * it using a pointer to make any future ports to multiple USB controllers + * easier. + */ + + struct khci_usbdev_s *priv = &g_usbdev; + irqstate_t flags; + + flags = enter_critical_section(); + usbtrace(TRACE_DEVUNINIT, 0); + + /* Disable and detach the USB IRQs */ + + up_disable_irq(KINETIS_IRQ_USBOTG); + irq_detach(KINETIS_IRQ_USBOTG); + + if (priv->driver) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_DRIVERREGISTERED), 0); + usbdev_unregister(priv->driver); + } + + /* Put the hardware in an inactive state */ + + khci_hwshutdown(priv); + leave_critical_section(flags); +} + +/**************************************************************************** + * Name: usbdev_register + * + * Description: + * Register a USB device class driver. The class driver's bind() method + * will be called to bind it to a USB device driver. + * + ****************************************************************************/ + +int usbdev_register(struct usbdevclass_driver_s *driver) +{ + /* For now there is only one USB controller, but we will always refer to + * it using a pointer to make any future ports to multiple USB controllers + * easier. + */ + + struct khci_usbdev_s *priv = &g_usbdev; + int ret; + + usbtrace(TRACE_DEVREGISTER, 0); + +#ifdef CONFIG_DEBUG_FEATURES + if (!driver || !driver->ops->bind || !driver->ops->unbind || + !driver->ops->disconnect || !driver->ops->setup) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_INVALIDPARMS), 0); + return -EINVAL; + } + + if (priv->driver) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_DRIVER), 0); + return -EBUSY; + } +#endif + + /* First hook up the driver */ + + priv->driver = driver; + + /* Then bind the class driver */ + + ret = CLASS_BIND(driver, &priv->usbdev); + if (ret) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_BINDFAILED), (uint16_t)-ret); + priv->driver = NULL; + } + + /* The class driver has been successfully bound. */ + + else + { + /* Setup the USB controller in it initial ready-to-run state (might + * be connected or unconnected, depending on usbdev_attach() has + * been called). + */ + + DEBUGASSERT(priv->devstate == DEVSTATE_DETACHED); + khci_reset(priv); + } + + return ret; +} + +/**************************************************************************** + * Name: usbdev_unregister + * + * Description: + * Un-register usbdev class driver. If the USB device is connected to a + * USB host, it will first disconnect(). The driver is also requested to + * unbind() and clean up any device state, before this procedure finally + * returns. + * + ****************************************************************************/ + +int usbdev_unregister(struct usbdevclass_driver_s *driver) +{ + /* For now there is only one USB controller, but we will always refer to + * it using a pointer to make any future ports to multiple USB controllers + * easier. + */ + + struct khci_usbdev_s *priv = &g_usbdev; + irqstate_t flags; + + usbtrace(TRACE_DEVUNREGISTER, 0); + +#ifdef CONFIG_DEBUG_FEATURES + if (driver != priv->driver) + { + usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_INVALIDPARMS), 0); + return -EINVAL; + } +#endif + + /* Reset the hardware and cancel all requests. All requests must be + * canceled while the class driver is still bound. This will put + * the hardware back into its initial, unconnected state. + */ + + flags = enter_critical_section(); + khci_swreset(priv); + khci_hwreset(priv); + + /* Unbind the class driver */ + + CLASS_UNBIND(driver, &priv->usbdev); + + /* Disable USB controller interrupts (but keep them attached) */ + + up_disable_irq(KINETIS_IRQ_USBOTG); + + /* Put the hardware in an inactive state. Then bring the hardware back up + * in the reset state (this is probably not necessary, the khci_hwreset() + * call above was probably sufficient). + */ + + khci_hwshutdown(priv); + khci_stateinit(priv); + + /* Unhook the driver */ + + priv->driver = NULL; + leave_critical_section(flags); + return OK; +} + +/**************************************************************************** + * Name: khci_usbattach and khci_usbdetach + * + * Description: + * The USB stack must be notified when the device is attached or detached + * by calling one of these functions. + * + ****************************************************************************/ + +void khci_usbattach(void) +{ + /* For now there is only one USB controller, but we will always refer to + * it using a pointer to make any future ports to multiple USB controllers + * easier. + */ + + struct khci_usbdev_s *priv = &g_usbdev; + + /* Mark that we are attached */ + + priv->attached = 1; + + /* This API may be called asynchronously from other initialization + * interfaces. In particular, we may not want to attach the bus yet... + * that should only be done when the class driver is attached. Has + * the class driver been attached? + */ + + if (priv->driver) + { + /* Yes.. then attach to the bus */ + + khci_attach(priv); + } +} + +void khci_usbdetach(void) +{ + /* For now there is only one USB controller, but we will always refer to + * it using a pointer to make any future ports to multiple USB controllers + * easier. + */ + + struct khci_usbdev_s *priv = &g_usbdev; + + /* Detach from the bus */ + + khci_detach(priv); +} + +#endif /* CONFIG_USBDEV && CONFIG_KHCI_USB */ diff --git a/arch/arm/src/kinetis/kinetis_usbotg.h b/arch/arm/src/kinetis/kinetis_usbotg.h index 127c718312d629bc98bd5c45cb983f650a53f6e8..de53d512933301f567c5089c9276d7480d544b7d 100644 --- a/arch/arm/src/kinetis/kinetis_usbotg.h +++ b/arch/arm/src/kinetis/kinetis_usbotg.h @@ -1,7 +1,7 @@ /******************************************************************************************** * arch/arm/src/kinetis/kinetis_usbotg.h * - * 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 @@ -217,6 +217,8 @@ #define USB_INT_ATTACH (1 << 6) /* Bit 6: Attach Interrupt */ #define USB_INT_STALL (1 << 7) /* Bit 7: Stall Interrupt */ +#define USB_INT_ALL 0xFF + /* Error Interrupt Status Register and Error Interrupt Enable Register (8-bit) */ #define USB_ERRSTAT_PIDERR (1 << 0) /* Bit 0: This bit is set when the PID check field fails */ @@ -228,6 +230,8 @@ /* Bit 6: Reserved */ #define USB_ERRSTAT_BTSERR (1 << 7) /* Bit 7: Bit stuff error is detected */ +#define USB_EINT_ALL 0xBF + /* Status Register (8-bit) */ /* Bits 0-1: Reserved */ @@ -259,6 +263,7 @@ #define USB_BDTPAGE1_MASK (0x7f << USB_BDTPAGE1_SHIFT) /* Frame Number Register Low (8-bit, bits 0-7 of the 11 bit frame number) */ +#define USB_FRMNUML_MASK 0xFF /* Frame Number Register High (8-bit) */ /* Bits 3-7: Reserved */ #define USB_FRMNUMH_SHIFT (0) /* Bits 0-2: Bits 8-10 of the 11-bit frame number */ @@ -313,16 +318,58 @@ #define USB_USBTRC0_SYNC_DET (1 << 1) /* Bit 1: Synchronous USB Interrupt Detect */ #define USB_USBTRC0_RESUME_INT (1 << 0) /* Bit 0: USB Asynchronous Interrupt */ -/******************************************************************************************** +/* Buffer Descriptor Table (BDT) ****************************************************/ +/* Offset 0: On write (software->hardware) */ + +#define USB_BDT_STATUS_MASK 0xfc /* Bits 2-7: Status bits */ +#define USB_BDT_BSTALL (1 << 2) /* Bit 2: Buffer Stall Enable bit */ +#define USB_BDT_DTS (1 << 3) /* Bit 3: Data Toggle Synchronization Enable bit */ +#define USB_BDT_NINC (1 << 4) /* Bit 4: DMA Address Increment Disable bit */ +#define USB_BDT_KEEP (1 << 5) /* Bit 5: BD Keep Enable bit */ +#define USB_BDT_DATA01 (1 << 6) /* Bit 6: Data Toggle Packet bit */ +#define USB_BDT_UOWN (1 << 7) /* Bit 7: USB Own bit */ +#define USB_BDT_BYTECOUNT_SHIFT (16) /* Bits 16-25: Byte Count bits */ +#define USB_BDT_BYTECOUNT_MASK (0x3ff << USB_BDT_BYTECOUNT_SHIFT) + +#define USB_BDT_DATA0 0 /* DATA0 packet expected next */ +#define USB_BDT_DATA1 USB_BDT_DATA01 /* DATA1 packet expected next */ +#define USB_BDT_COWN 0 /* CPU owns the descriptor */ + +/* Offset 0: On read (hardware->software) */ + +#define USB_BDT_PID_SHIFT (2) /* Bits 2-5: Packet Identifier bits */ +#define USB_BDT_PID_MASK (15 << USB_BDT_PID_SHIFT) + /* Bit 7: USB Own bit (same) */ + /* Bits 16-25: Byte Count bits (same) */ + +/* Offset 4: BUFFER_ADDRESS, 32-bit Buffer Address bits */ + +#define USB_BDT_BYTES_SIZE 8 /* Eight bytes per BDT */ +#define USB_BDT_WORD_SIZE 2 /* Two 32-bit words per BDT */ +#define USB_NBDTS_PER_EP 4 /* Number of BDTS per endpoint: IN/OUT and EVEN/ODD */ + +/************************************************************************************ * Public Types - ********************************************************************************************/ + ************************************************************************************/ -/******************************************************************************************** - * Public Data - ********************************************************************************************/ +#ifndef __ASSEMBLY__ + +/* Buffer Descriptor Status Register layout. */ + +struct usbotg_bdtentry_s +{ + uint32_t status; /* Status, byte count, and PID */ + uint8_t *addr; /* Buffer address */ +}; +#endif /******************************************************************************************** * Public Functions ********************************************************************************************/ +struct usbdev_s; +int kinetis_usbpullup(FAR struct usbdev_s *dev, bool enable); +void kinetis_usbsuspend(FAR struct usbdev_s *dev, bool resume); +void khci_usbattach(void); + #endif /* __ARCH_ARM_SRC_KINETIS_KINETIS_USBOTG_H */ diff --git a/arch/arm/src/kl/Make.defs b/arch/arm/src/kl/Make.defs index 68c58af802e470f8a565a0b55728c4d57087bfa1..105d267a73ac32ea846f1d8b2e12103b7eb02e18 100644 --- a/arch/arm/src/kl/Make.defs +++ b/arch/arm/src/kl/Make.defs @@ -65,12 +65,12 @@ else ifeq ($(CONFIG_MODULE),y) CMN_CSRCS += up_elf.c endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) CMN_CSRCS += up_dumpnvic.c endif CHIP_ASRCS = -CHIP_CSRCS = kl_clockconfig.c kl_gpio.c kl_idle.c kl_irq.c kl_lowgetc.c +CHIP_CSRCS = kl_clockconfig.c kl_gpio.c kl_idle.c kl_irq.c kl_getc.c CHIP_CSRCS += kl_lowputc.c kl_serial.c kl_start.c kl_cfmconfig.c ifneq ($(CONFIG_SCHED_TICKLESS),y) @@ -101,6 +101,6 @@ ifeq ($(CONFIG_PWM),y) CHIP_CSRCS += kl_pwm.c endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) CHIP_CSRCS += kl_dumpgpio.c endif diff --git a/arch/arm/src/kl/kl_dumpgpio.c b/arch/arm/src/kl/kl_dumpgpio.c index b6ea6de628318495dd17d2f5a53cd459290b736d..0e6dadfd8ef0cdacd35a067bfe759828ece1a0e4 100644 --- a/arch/arm/src/kl/kl_dumpgpio.c +++ b/arch/arm/src/kl/kl_dumpgpio.c @@ -39,6 +39,11 @@ #include +/* Output debug info even if debug output is not selected. */ + +#undef CONFIG_DEBUG_INFO +#define CONFIG_DEBUG_INFO 1 + #include #include @@ -48,14 +53,13 @@ #include "chip.h" #include "kl_gpio.h" -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /**************************************************************************** * Private Data ****************************************************************************/ /* Port letters for prettier debug output */ -#ifdef CONFIG_DEBUG static const char g_portchar[KL_GPIO_NPORTS] = { #if KL_GPIO_NPORTS > 9 @@ -82,15 +86,6 @@ static const char g_portchar[KL_GPIO_NPORTS] = # error "Bad number of GPIOs" #endif }; -#endif - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ /**************************************************************************** * Public Functions @@ -123,14 +118,14 @@ void kl_dumpgpio(gpio_cfgset_t pinset, const char *msg) flags = enter_critical_section(); - lldbg("GPIO%c pinset: %08x base: %08x -- %s\n", - g_portchar[port], pinset, base, msg); - lldbg(" PDOR: %08x PDIR: %08x PDDR: %08x\n", - getreg32(base + KL_GPIO_PDOR_OFFSET), - getreg32(base + KL_GPIO_PDIR_OFFSET), - getreg32(base + KL_GPIO_PDDR_OFFSET)); + _info("GPIO%c pinset: %08x base: %08x -- %s\n", + g_portchar[port], pinset, base, msg); + _info(" PDOR: %08x PDIR: %08x PDDR: %08x\n", + getreg32(base + KL_GPIO_PDOR_OFFSET), + getreg32(base + KL_GPIO_PDIR_OFFSET), + getreg32(base + KL_GPIO_PDDR_OFFSET)); leave_critical_section(flags); } -#endif /* CONFIG_DEBUG */ +#endif /* CONFIG_DEBUG_FEATURES */ diff --git a/arch/arm/src/kl/kl_lowgetc.c b/arch/arm/src/kl/kl_getc.c similarity index 63% rename from arch/arm/src/kl/kl_lowgetc.c rename to arch/arm/src/kl/kl_getc.c index f1c02981d2cf95761b11cd37484f27e92fc2b8aa..8b63ec217d6fe8859fc8470d6ffa1c7b03102e0a 100644 --- a/arch/arm/src/kl/kl_lowgetc.c +++ b/arch/arm/src/kl/kl_getc.c @@ -1,7 +1,7 @@ /**************************************************************************** - * arch/arm/src/kl/kl_lowgetc.c + * arch/arm/src/kl/kl_getc.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 @@ -41,75 +41,42 @@ #include -#include -#include - -#include "up_internal.h" #include "up_arch.h" #include "kl_config.h" -#include "kl_lowgetc.h" - -#include "chip/kl_uart.h" +#include "kl_getc.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* Select UART parameters for the selected console */ #if defined(CONFIG_UART0_SERIAL_CONSOLE) # define CONSOLE_BASE KL_UART0_BASE -# define CONSOLE_FREQ BOARD_CORECLK_FREQ -# define CONSOLE_BAUD CONFIG_UART0_BAUD -# define CONSOLE_BITS CONFIG_UART0_BITS -# define CONSOLE_PARITY CONFIG_UART0_PARITY #elif defined(CONFIG_UART1_SERIAL_CONSOLE) # define CONSOLE_BASE KL_UART1_BASE -# define CONSOLE_FREQ BOARD_BUSCLK_FREQ -# define CONSOLE_BAUD CONFIG_UART1_BAUD -# define CONSOLE_BITS CONFIG_UART1_BITS -# define CONSOLE_PARITY CONFIG_UART1_PARITY #elif defined(CONFIG_UART2_SERIAL_CONSOLE) # define CONSOLE_BASE KL_UART2_BASE -# define CONSOLE_FREQ BOARD_BUSCLK_FREQ -# define CONSOLE_BAUD CONFIG_UART2_BAUD -# define CONSOLE_BITS CONFIG_UART2_BITS -# define CONSOLE_PARITY CONFIG_UART2_PARITY #endif -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: up_lowgetc + * Name: up_getc * * Description: * Input one byte from the serial console * + * REVIST: If used with the serial driver enabled, then this could + * interfere with the serial driver operations. Serial interrupts should + * be disabled when this function executes in that case. + * ****************************************************************************/ -int kl_lowgetc(void) +int up_getc(void) { uint8_t ch = 0; @@ -118,11 +85,11 @@ int kl_lowgetc(void) * we have data in the buffer to read. */ - while ((getreg8(CONSOLE_BASE+KL_UART_S1_OFFSET) & UART_S1_RDRF) == 0); + while ((getreg8(CONSOLE_BASE + KL_UART_S1_OFFSET) & UART_S1_RDRF) == 0); /* Then read a character from the UART data register */ - ch = getreg8(CONSOLE_BASE+KL_UART_D_OFFSET); + ch = getreg8(CONSOLE_BASE + KL_UART_D_OFFSET); #endif return (int)ch; diff --git a/arch/arm/src/kl/kl_getc.h b/arch/arm/src/kl/kl_getc.h new file mode 100644 index 0000000000000000000000000000000000000000..aff6b2a0b37890ca8efe8725caef0cb82ff08d4a --- /dev/null +++ b/arch/arm/src/kl/kl_getc.h @@ -0,0 +1,48 @@ +/************************************************************************************ + * arch/arm/src/kl/kl_getc.h + * + * Copyright (C) 2013, 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_KL_KINETIS_GETC_H +#define __ARCH_ARM_SRC_KL_KINETIS_GETC_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "kl_config.h" +#include "chip/kl_uart.h" + +#endif /* __ARCH_ARM_SRC_KL_KINETIS_GETC_H */ diff --git a/arch/arm/src/kl/kl_idle.c b/arch/arm/src/kl/kl_idle.c index e711b39e3c51d92765be3de3576e98aa29e5364e..f7db42f276cc89e8a4d64f6ae9c6a08e5db869de 100644 --- a/arch/arm/src/kl/kl_idle.c +++ b/arch/arm/src/kl/kl_idle.c @@ -103,7 +103,7 @@ static void up_idlepm(void) /* Perform board-specific, state-dependent logic here */ - llvdbg("newstate= %d oldstate=%d\n", newstate, oldstate); + _info("newstate= %d oldstate=%d\n", newstate, oldstate); /* Then force the global state change */ diff --git a/arch/arm/src/kl/kl_irq.c b/arch/arm/src/kl/kl_irq.c index 87d47ab35c0d9f2ce06874e42bdc131730332cde..b37f7afe1c99aa98cd2c7ad88a5ff247b5b86e01 100644 --- a/arch/arm/src/kl/kl_irq.c +++ b/arch/arm/src/kl/kl_irq.c @@ -90,34 +90,34 @@ volatile uint32_t *g_current_regs[1]; * ****************************************************************************/ -#if defined(CONFIG_DEBUG_IRQ) +#if defined(CONFIG_DEBUG_IRQ_INFO) static void kl_dumpnvic(const char *msg, int irq) { irqstate_t flags; flags = enter_critical_section(); - lldbg("NVIC (%s, irq=%d):\n", msg, irq); - lldbg(" ISER: %08x ICER: %08x\n", - getreg32(ARMV6M_NVIC_ISER), getreg32(ARMV6M_NVIC_ICER)); - lldbg(" ISPR: %08x ICPR: %08x\n", - getreg32(ARMV6M_NVIC_ISPR), getreg32(ARMV6M_NVIC_ICPR)); - lldbg(" IRQ PRIO: %08x %08x %08x %08x\n", - getreg32(ARMV6M_NVIC_IPR0), getreg32(ARMV6M_NVIC_IPR1), - getreg32(ARMV6M_NVIC_IPR2), getreg32(ARMV6M_NVIC_IPR3)); - lldbg(" %08x %08x %08x %08x\n", - getreg32(ARMV6M_NVIC_IPR4), getreg32(ARMV6M_NVIC_IPR5), - getreg32(ARMV6M_NVIC_IPR6), getreg32(ARMV6M_NVIC_IPR7)); - - lldbg("SYSCON:\n"); - lldbg(" CPUID: %08x\n", - getreg32(ARMV6M_SYSCON_CPUID)); - lldbg(" ICSR: %08x AIRCR: %08x\n", - getreg32(ARMV6M_SYSCON_ICSR), getreg32(ARMV6M_SYSCON_AIRCR)); - lldbg(" SCR: %08x CCR: %08x\n", - getreg32(ARMV6M_SYSCON_SCR), getreg32(ARMV6M_SYSCON_CCR)); - lldbg(" SHPR2: %08x SHPR3: %08x\n", - getreg32(ARMV6M_SYSCON_SHPR2), getreg32(ARMV6M_SYSCON_SHPR3)); + irqinfo("NVIC (%s, irq=%d):\n", msg, irq); + irqinfo(" ISER: %08x ICER: %08x\n", + getreg32(ARMV6M_NVIC_ISER), getreg32(ARMV6M_NVIC_ICER)); + irqinfo(" ISPR: %08x ICPR: %08x\n", + getreg32(ARMV6M_NVIC_ISPR), getreg32(ARMV6M_NVIC_ICPR)); + irqinfo(" IRQ PRIO: %08x %08x %08x %08x\n", + getreg32(ARMV6M_NVIC_IPR0), getreg32(ARMV6M_NVIC_IPR1), + getreg32(ARMV6M_NVIC_IPR2), getreg32(ARMV6M_NVIC_IPR3)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(ARMV6M_NVIC_IPR4), getreg32(ARMV6M_NVIC_IPR5), + getreg32(ARMV6M_NVIC_IPR6), getreg32(ARMV6M_NVIC_IPR7)); + + irqinfo("SYSCON:\n"); + irqinfo(" CPUID: %08x\n", + getreg32(ARMV6M_SYSCON_CPUID)); + irqinfo(" ICSR: %08x AIRCR: %08x\n", + getreg32(ARMV6M_SYSCON_ICSR), getreg32(ARMV6M_SYSCON_AIRCR)); + irqinfo(" SCR: %08x CCR: %08x\n", + getreg32(ARMV6M_SYSCON_SCR), getreg32(ARMV6M_SYSCON_CCR)); + irqinfo(" SHPR2: %08x SHPR3: %08x\n", + getreg32(ARMV6M_SYSCON_SHPR2), getreg32(ARMV6M_SYSCON_SHPR3)); leave_critical_section(flags); } @@ -137,11 +137,11 @@ static void kl_dumpnvic(const char *msg, int irq) * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES static int kl_nmi(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! NMI received\n"); + _err("PANIC!!! NMI received\n"); PANIC(); return 0; } @@ -149,7 +149,7 @@ static int kl_nmi(int irq, FAR void *context) static int kl_pendsv(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! PendSV received\n"); + _err("PANIC!!! PendSV received\n"); PANIC(); return 0; } @@ -157,7 +157,7 @@ static int kl_pendsv(int irq, FAR void *context) static int kl_reserved(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Reserved interrupt\n"); + _err("PANIC!!! Reserved interrupt\n"); PANIC(); return 0; } @@ -236,7 +236,7 @@ void up_irqinitialize(void) /* Attach all other processor exceptions (except reset and sys tick) */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES irq_attach(KL_IRQ_NMI, kl_nmi); irq_attach(KL_IRQ_PENDSV, kl_pendsv); irq_attach(KL_IRQ_RESERVED, kl_reserved); diff --git a/arch/arm/src/kl/kl_pwm.c b/arch/arm/src/kl/kl_pwm.c index c4714178e4cb03dd65a17c42946ea661cf1b283b..6f3f6e40503b5ae149b55a772db9713e3827182e 100644 --- a/arch/arm/src/kl/kl_pwm.c +++ b/arch/arm/src/kl/kl_pwm.c @@ -73,29 +73,10 @@ /* PWM/Timer Definitions ****************************************************/ /* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing PWM */ -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_PWM -#endif - -#ifdef CONFIG_DEBUG_PWM -# define pwmdbg dbg -# define pwmlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define pwmvdbg vdbg -# define pwmllvdbg llvdbg -# define pwm_dumpgpio(p,m) kl_dumpgpio(p,m) -# else -# define pwmlldbg(x...) -# define pwmllvdbg(x...) -# define pwm_dumpgpio(p,m) -# endif +#ifdef CONFIG_DEBUG_PWM_INFO +# define pwm_dumpgpio(p,m) kl_dumpgpio(p,m) #else -# define pwmdbg(x...) -# define pwmlldbg(x...) -# define pwmvdbg(x...) -# define pwmllvdbg(x...) # define pwm_dumpgpio(p,m) #endif @@ -122,7 +103,7 @@ struct kl_pwmtimer_s static uint32_t pwm_getreg(struct kl_pwmtimer_s *priv, int offset); static void pwm_putreg(struct kl_pwmtimer_s *priv, int offset, uint32_t value); -#if defined(CONFIG_DEBUG_PWM) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_PWM_INFO static void pwm_dumpregs(struct kl_pwmtimer_s *priv, FAR const char *msg); #else # define pwm_dumpregs(priv,msg) @@ -253,30 +234,30 @@ static void pwm_putreg(struct kl_pwmtimer_s *priv, int offset, uint32_t value) * ****************************************************************************/ -#if defined(CONFIG_DEBUG_PWM) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_PWM_INFO static void pwm_dumpregs(struct kl_pwmtimer_s *priv, FAR const char *msg) { int nchannels = (priv->tpmid == 0) ? 6 : 2; - pwmvdbg("%s:\n", msg); - pwmvdbg(" TPM%d_SC: %04x TPM%d_CNT: %04x TPM%d_MOD: %04x\n", + pwminfo("%s:\n", msg); + pwminfo(" TPM%d_SC: %04x TPM%d_CNT: %04x TPM%d_MOD: %04x\n", priv->tpmid, pwm_getreg(priv, TPM_SC_OFFSET), priv->tpmid, pwm_getreg(priv, TPM_CNT_OFFSET), priv->tpmid, pwm_getreg(priv, TPM_MOD_OFFSET)); - pwmvdbg(" TPM%d_STATUS: %04x TPM%d_CONF: %04x\n", + pwminfo(" TPM%d_STATUS: %04x TPM%d_CONF: %04x\n", priv->tpmid, pwm_getreg(priv, TPM_STATUS_OFFSET), priv->tpmid, pwm_getreg(priv, TPM_CONF_OFFSET)); - pwmvdbg(" TPM%d_C0SC: %04x TPM%d_C0V: %04x\n", + pwminfo(" TPM%d_C0SC: %04x TPM%d_C0V: %04x\n", priv->tpmid, pwm_getreg(priv, TPM_C0SC_OFFSET), priv->tpmid, pwm_getreg(priv, TPM_C0V_OFFSET)); - pwmvdbg(" TPM%d_C1SC: %04x TPM%d_C1V: %04x\n", + pwminfo(" TPM%d_C1SC: %04x TPM%d_C1V: %04x\n", priv->tpmid, pwm_getreg(priv, TPM_C1SC_OFFSET), priv->tpmid, @@ -284,7 +265,7 @@ static void pwm_dumpregs(struct kl_pwmtimer_s *priv, FAR const char *msg) if (nchannels >= 3) { - pwmvdbg(" TPM%d_C2SC: %04x TPM%d_C2V: %04x\n", + pwminfo(" TPM%d_C2SC: %04x TPM%d_C2V: %04x\n", priv->tpmid, pwm_getreg(priv, TPM_C2SC_OFFSET), priv->tpmid, @@ -293,7 +274,7 @@ static void pwm_dumpregs(struct kl_pwmtimer_s *priv, FAR const char *msg) if (nchannels >= 4) { - pwmvdbg(" TPM%d_C3SC: %04x TPM%d_C3V: %04x\n", + pwminfo(" TPM%d_C3SC: %04x TPM%d_C3V: %04x\n", priv->tpmid, pwm_getreg(priv, TPM_C3SC_OFFSET), priv->tpmid, @@ -302,7 +283,7 @@ static void pwm_dumpregs(struct kl_pwmtimer_s *priv, FAR const char *msg) if (nchannels >= 5) { - pwmvdbg(" TPM%d_C4SC: %04x TPM%d_C4V: %04x\n", + pwminfo(" TPM%d_C4SC: %04x TPM%d_C4V: %04x\n", priv->tpmid, pwm_getreg(priv, TPM_C4SC_OFFSET), priv->tpmid, @@ -311,7 +292,7 @@ static void pwm_dumpregs(struct kl_pwmtimer_s *priv, FAR const char *msg) if (nchannels >= 6) { - pwmvdbg(" TPM%d_C5SC: %04x TPM%d_C5V: %04x\n", + pwminfo(" TPM%d_C5SC: %04x TPM%d_C5V: %04x\n", priv->tpmid, pwm_getreg(priv, TPM_C5SC_OFFSET), priv->tpmid, @@ -353,7 +334,7 @@ static int pwm_timer(FAR struct kl_pwmtimer_s *priv, DEBUGASSERT(priv != NULL && info != NULL); - pwmvdbg("TPM%d channel: %d frequency: %d duty: %08x\n", + pwminfo("TPM%d channel: %d frequency: %d duty: %08x\n", priv->tpmid, priv->channel, info->frequency, info->duty); DEBUGASSERT(info->frequency > 0 && info->duty > 0 && @@ -423,7 +404,7 @@ static int pwm_timer(FAR struct kl_pwmtimer_s *priv, cv = b16toi(info->duty * modulo + b16HALF); - pwmvdbg("TPM%d PCLK: %d frequency: %d TPMCLK: %d prescaler: %d modulo: %d c0v: %d\n", + pwminfo("TPM%d PCLK: %d frequency: %d TPMCLK: %d prescaler: %d modulo: %d c0v: %d\n", priv->tpmid, priv->pclk, info->frequency, tpmclk, presc_values[prescaler], modulo, cv); @@ -483,7 +464,7 @@ static int pwm_timer(FAR struct kl_pwmtimer_s *priv, break; default: - pwmdbg("No such channel: %d\n", priv->channel); + pwmerr("ERROR: No such channel: %d\n", priv->channel); return -EINVAL; } @@ -530,7 +511,7 @@ static int pwm_setup(FAR struct pwm_lowerhalf_s *dev) regval |= SIM_SCGC6_TPM0 | SIM_SCGC6_TPM1 | SIM_SCGC6_TPM2; putreg32(regval, KL_SIM_SCGC6); - pwmvdbg("TPM%d pincfg: %08x\n", priv->tpmid, priv->pincfg); + pwminfo("TPM%d pincfg: %08x\n", priv->tpmid, priv->pincfg); pwm_dumpregs(priv, "Initially"); /* Configure the PWM output pin, but do not start the timer yet */ @@ -561,7 +542,7 @@ static int pwm_shutdown(FAR struct pwm_lowerhalf_s *dev) FAR struct kl_pwmtimer_s *priv = (FAR struct kl_pwmtimer_s *)dev; uint32_t pincfg; - pwmvdbg("TPM%d pincfg: %08x\n", priv->tpmid, priv->pincfg); + pwminfo("TPM%d pincfg: %08x\n", priv->tpmid, priv->pincfg); /* Make sure that the output has been stopped */ @@ -621,7 +602,7 @@ static int pwm_stop(FAR struct pwm_lowerhalf_s *dev) FAR struct kl_pwmtimer_s *priv = (FAR struct kl_pwmtimer_s *)dev; irqstate_t flags; - pwmvdbg("TPM%d\n", priv->tpmid); + pwminfo("TPM%d\n", priv->tpmid); /* Disable interrupts momentary to stop any ongoing timer processing and * to prevent any concurrent access to the reset register. @@ -663,7 +644,7 @@ static int pwm_stop(FAR struct pwm_lowerhalf_s *dev) break; default: - pwmdbg("No such channel: %d\n", priv->channel); + pwmerr("ERROR: No such channel: %d\n", priv->channel); return -EINVAL; } @@ -691,12 +672,12 @@ static int pwm_stop(FAR struct pwm_lowerhalf_s *dev) static int pwm_ioctl(FAR struct pwm_lowerhalf_s *dev, int cmd, unsigned long arg) { -#ifdef CONFIG_DEBUG_PWM +#ifdef CONFIG_DEBUG_PWM_INFO FAR struct kl_pwmtimer_s *priv = (FAR struct kl_pwmtimer_s *)dev; /* There are no platform-specific ioctl commands */ - pwmvdbg("TPM%d\n", priv->tpmid); + pwminfo("TPM%d\n", priv->tpmid); #endif return -ENOTTY; } @@ -724,7 +705,7 @@ FAR struct pwm_lowerhalf_s *kl_pwminitialize(int timer) { FAR struct kl_pwmtimer_s *lower; - pwmvdbg("TPM%d\n", timer); + pwminfo("TPM%d\n", timer); switch (timer) { @@ -750,7 +731,7 @@ FAR struct pwm_lowerhalf_s *kl_pwminitialize(int timer) #endif default: - pwmdbg("No such timer configured\n"); + pwmerr("ERROR: No such timer configured\n"); return NULL; } diff --git a/arch/arm/src/kl/kl_serial.c b/arch/arm/src/kl/kl_serial.c index fb135ca79557b979872f8868c6bcc95db781a421..fab56a34d5eaeda4f1bb5b0fbcfaa3cf6787dbd1 100644 --- a/arch/arm/src/kl/kl_serial.c +++ b/arch/arm/src/kl/kl_serial.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/kl/kl_serial.c * - * Copyright (C) 2013-2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2013-2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -59,15 +59,14 @@ #include "kl_config.h" #include "kl_lowputc.h" -#include "kl_lowgetc.h" #include "chip.h" #include "kl_gpio.h" #include "chip/kl_uart.h" - /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* Some sanity checks *******************************************************/ /* Is there at least one UART enabled and configured as a RS-232 device? */ @@ -958,18 +957,4 @@ int up_putc(int ch) return ch; } -/**************************************************************************** - * Name: up_getc - * - * Description: - * Provide priority, low-level access to support OS debug writes - * - ****************************************************************************/ - -int up_getc(void) -{ - /* Check for LF */ - - return kl_lowgetc(); -} #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/kl/kl_spi.c b/arch/arm/src/kl/kl_spi.c index 0b738aedf5ea7f135d36c638cd8959fe050ecff8..e9fb9947cd48b643006189d6f0bb32da1e230cd9 100644 --- a/arch/arm/src/kl/kl_spi.c +++ b/arch/arm/src/kl/kl_spi.c @@ -59,29 +59,6 @@ #if defined(CONFIG_KL_SPI0) || defined(CONFIG_KL_SPI1) -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* The following enable debug output from this file: - * - * CONFIG_DEBUG - Define to enable general debug features - * CONFIG_DEBUG_SPI - Define to enable basic SSP debug (needs CONFIG_DEBUG) - * CONFIG_DEBUG_VERBOSE - Define to enable verbose SSP debug - */ - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - /**************************************************************************** * Private Types ****************************************************************************/ @@ -364,7 +341,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) priv->frequency = frequency; priv->actual = actual; - spidbg("Frequency %d->%d\n", frequency, actual); + spiinfo("Frequency %d->%d\n", frequency, actual); return actual; } @@ -388,7 +365,7 @@ static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode) FAR struct kl_spidev_s *priv = (FAR struct kl_spidev_s *)dev; uint8_t regval; - spivdbg("mode=%d\n", mode); + spiinfo("mode=%d\n", mode); /* Has the mode changed? */ @@ -519,7 +496,7 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, FAR uint8_t *txptr = (FAR uint8_t *)txbuffer; uint8_t data; - spivdbg("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); + spiinfo("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); /* Loop, sending each word in the user-provied data buffer. */ @@ -585,7 +562,7 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *txbuffer, size_t nwords) { - spivdbg("txbuffer=%p nwords=%d\n", txbuffer, nwords); + spiinfo("txbuffer=%p nwords=%d\n", txbuffer, nwords); return spi_exchange(dev, txbuffer, NULL, nwords); } #endif @@ -612,7 +589,7 @@ static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *txbuffer, #ifndef CONFIG_SPI_EXCHANGE static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *rxbuffer, size_t nwords) { - spivdbg("rxbuffer=%p nwords=%d\n", rxbuffer, nwords); + spiinfo("rxbuffer=%p nwords=%d\n", rxbuffer, nwords); return spi_exchange(dev, NULL, rxbuffer, nwords); } #endif @@ -687,7 +664,7 @@ FAR struct spi_dev_s *kl_spibus_initialize(int port) else #endif { - spidbg("ERROR: Port %d not configured\n", port); + spierr("ERROR: Port %d not configured\n", port); return NULL; } diff --git a/arch/arm/src/kl/kl_start.c b/arch/arm/src/kl/kl_start.c index 63491ac74d70503d749dfb32f01c9d59e55f0173..6e9970517f57854eb7cc18986237dccbd6bd50b7 100644 --- a/arch/arm/src/kl/kl_start.c +++ b/arch/arm/src/kl/kl_start.c @@ -94,7 +94,7 @@ const uint32_t g_idle_topstack = IDLE_STACK; * ****************************************************************************/ -#if defined(CONFIG_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) # define showprogress(c) kl_lowputc((uint32_t)c) #else # define showprogress(c) diff --git a/arch/arm/src/lpc11xx/Kconfig b/arch/arm/src/lpc11xx/Kconfig index 45bb842a302f9c4706c1b9986899e4b4ba73fc81..31a9711cf078a719d6502a45c4f9e19a5f8cd708 100644 --- a/arch/arm/src/lpc11xx/Kconfig +++ b/arch/arm/src/lpc11xx/Kconfig @@ -229,10 +229,11 @@ config CAN_LOOPBACK config CAN_REGDEBUG bool "Register level debug" - depends on DEBUG + depends on DEBUG_CAN_INFO default n ---help--- - Output detailed register-level CAN debug information. Requires also DEBUG and DEBUG_CAN. + Output detailed register-level CAN debug information. Requires also + CONFIG_DEBUG_CAN_INFO. endmenu diff --git a/arch/arm/src/lpc11xx/Make.defs b/arch/arm/src/lpc11xx/Make.defs index a40c14354551c34726aea625a64d500731fd607f..041419c2488e42776cb9ed6abd3270ec76e896c7 100644 --- a/arch/arm/src/lpc11xx/Make.defs +++ b/arch/arm/src/lpc11xx/Make.defs @@ -65,13 +65,13 @@ else ifeq ($(CONFIG_MODULE),y) CMN_CSRCS += up_elf.c endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) CMN_CSRCS += up_dumpnvic.c endif CHIP_ASRCS = CHIP_CSRCS = lpc11_clockconfig.c lpc11_gpio.c lpc11_i2c.c lpc11_idle.c -CHIP_CSRCS += lpc11_irq.c lpc11_lowputc.c lpc11_lowgetc.c lpc11_serial.c +CHIP_CSRCS += lpc11_irq.c lpc11_lowputc.c lpc11_getc.c lpc11_serial.c CHIP_CSRCS += lpc11_spi.c lpc11_ssp.c lpc11_start.c # Configuration-dependent LPC11xx files diff --git a/arch/arm/src/lpc11xx/lpc11_lowgetc.c b/arch/arm/src/lpc11xx/lpc11_getc.c similarity index 65% rename from arch/arm/src/lpc11xx/lpc11_lowgetc.c rename to arch/arm/src/lpc11xx/lpc11_getc.c index a0a12b6108021f4ba2bf1cc1755e7d6375959985..f809e9d3438b367fb60e0dc699adb74c3f8bbd17 100644 --- a/arch/arm/src/lpc11xx/lpc11_lowgetc.c +++ b/arch/arm/src/lpc11xx/lpc11_getc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/lpc11/lpc11_lowgetc.c + * arch/arm/src/lpc11/lpc11_getc.c * * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -41,77 +41,41 @@ #include -#include -#include - -#include "up_internal.h" #include "up_arch.h" -#include "chip/lpc11_syscon.h" -#include "chip/lpc11_uart.h" - -#include "lpc11_gpio.h" -#include "lpc11_lowgetc.h" -#include "lpc11_serial.h" +#include "lpc11_getc.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* Select UART parameters for the selected console */ #if defined(CONFIG_UART0_SERIAL_CONSOLE) # define CONSOLE_BASE LPC11_UART0_BASE -# define CONSOLE_FREQ BOARD_CORECLK_FREQ -# define CONSOLE_BAUD CONFIG_UART0_BAUD -# define CONSOLE_BITS CONFIG_UART0_BITS -# define CONSOLE_PARITY CONFIG_UART0_PARITY #elif defined(CONFIG_UART1_SERIAL_CONSOLE) # define CONSOLE_BASE LPC11_UART1_BASE -# define CONSOLE_FREQ BOARD_BUSCLK_FREQ -# define CONSOLE_BAUD CONFIG_UART1_BAUD -# define CONSOLE_BITS CONFIG_UART1_BITS -# define CONSOLE_PARITY CONFIG_UART1_PARITY #elif defined(CONFIG_UART2_SERIAL_CONSOLE) # define CONSOLE_BASE LPC11_UART2_BASE -# define CONSOLE_FREQ BOARD_BUSCLK_FREQ -# define CONSOLE_BAUD CONFIG_UART2_BAUD -# define CONSOLE_BITS CONFIG_UART2_BITS -# define CONSOLE_PARITY CONFIG_UART2_PARITY #endif -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: up_lowgetc + * Name: up_getc * * Description: - * Input one byte from the serial console + * Input one byte from the serial console. + * + * REVIST: If used with the serial driver enabled, then this could + * interfere with the serial driver operations. Serial interrupts should + * be disabled when this function executes in that case. * ****************************************************************************/ -int lpc11_lowgetc(void) +int up_getc(void) { uint8_t ch = 0; diff --git a/arch/arm/src/lpc11xx/lpc11_getc.h b/arch/arm/src/lpc11xx/lpc11_getc.h new file mode 100644 index 0000000000000000000000000000000000000000..e00864bfc48b573ef4cb6a97939473b6935b05ac --- /dev/null +++ b/arch/arm/src/lpc11xx/lpc11_getc.h @@ -0,0 +1,47 @@ +/************************************************************************************ + * arch/arm/src/lpc11/lpc11_getc.h + * + * Copyright (C) 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_SRC_LPC11XX_LPC11_GETC_H +#define __ARCH_ARM_SRC_LPC11XX_LPC11_GETC_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include "lpc11_serial.h" +#include "chip/lpc11_uart.h" + +#endif /* __ARCH_ARM_SRC_LPC11XX_LPC11_GETC_H */ diff --git a/arch/arm/src/lpc11xx/lpc11_gpio.h b/arch/arm/src/lpc11xx/lpc11_gpio.h index 3bff062e073d7b4a1c89b0a8e3917223daaf6b5f..a0e1c2d8990d8e2dc769ac30a97c71ed03789aaa 100644 --- a/arch/arm/src/lpc11xx/lpc11_gpio.h +++ b/arch/arm/src/lpc11xx/lpc11_gpio.h @@ -180,7 +180,7 @@ void lpc11_gpioirqdisable(int irq); * ************************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO int lpc11_dumpgpio(lpc11_pinset_t pinset, const char *msg); #else # define lpc11_dumpgpio(p,m) diff --git a/arch/arm/src/lpc11xx/lpc11_gpiodbg.c b/arch/arm/src/lpc11xx/lpc11_gpiodbg.c index 6be8d9c55fee4b6b11c0177cc31cdf6c17cf08f2..86b3098dcda3f98a01bc9460811cf1784982c91d 100644 --- a/arch/arm/src/lpc11xx/lpc11_gpiodbg.c +++ b/arch/arm/src/lpc11xx/lpc11_gpiodbg.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/lpc11xx/lpc11_gpiodbg.c * - * Copyright (C) 2010-2011, 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2010-2011, 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -39,6 +39,11 @@ #include +/* Output debug info even if debug output is not selected. */ + +#undef CONFIG_DEBUG_INFO +#define CONFIG_DEBUG_INFO 1 + #include #include #include @@ -49,23 +54,7 @@ #include "chip.h" #include "lpc11_gpio.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_GPIO -#endif - -#ifdef CONFIG_DEBUG_GPIO - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ +#ifdef CONFIG_DEBUG_GPIO_INFO /**************************************************************************** * Private Functions @@ -157,34 +146,34 @@ int lpc11_dumpgpio(lpc11_pinset_t pinset, const char *msg) /* The following requires exclusive access to the GPIO registers */ flags = enter_critical_section(); - lldbg("GPIO%c pin%d (pinset: %08x) -- %s\n", - port + '0', pin, pinset, msg); + gpioinfo("GPIO%c pin%d (pinset: %08x) -- %s\n", + port + '0', pin, pinset, msg); #if defined(LPC176x) - lldbg(" PINSEL[%08x]: %08x PINMODE[%08x]: %08x ODMODE[%08x]: %08x\n", - pinsel, pinsel ? getreg32(pinsel) : 0, - pinmode, pinmode ? getreg32(pinmode) : 0, - g_odmode[port], getreg32(g_odmode[port])); + gpioinfo(" PINSEL[%08x]: %08x PINMODE[%08x]: %08x ODMODE[%08x]: %08x\n", + pinsel, pinsel ? getreg32(pinsel) : 0, + pinmode, pinmode ? getreg32(pinmode) : 0, + g_odmode[port], getreg32(g_odmode[port])); #elif defined(LPC178x) - lldbg(" IOCON[%08x]: %08x\n", iocon, getreg32(iocon)); + gpioinfo(" IOCON[%08x]: %08x\n", iocon, getreg32(iocon)); #endif base = g_fiobase[port]; - lldbg(" FIODIR[%08x]: %08x FIOMASK[%08x]: %08x FIOPIN[%08x]: %08x\n", - base+LPC11_FIO_DIR_OFFSET, getreg32(base+LPC11_FIO_DIR_OFFSET), - base+LPC11_FIO_MASK_OFFSET, getreg32(base+LPC11_FIO_MASK_OFFSET), - base+LPC11_FIO_PIN_OFFSET, getreg32(base+LPC11_FIO_PIN_OFFSET)); + gpioinfo(" FIODIR[%08x]: %08x FIOMASK[%08x]: %08x FIOPIN[%08x]: %08x\n", + base+LPC11_FIO_DIR_OFFSET, getreg32(base+LPC11_FIO_DIR_OFFSET), + base+LPC11_FIO_MASK_OFFSET, getreg32(base+LPC11_FIO_MASK_OFFSET), + base+LPC11_FIO_PIN_OFFSET, getreg32(base+LPC11_FIO_PIN_OFFSET)); base = g_intbase[port]; - lldbg(" IOINTSTATUS[%08x]: %08x INTSTATR[%08x]: %08x INSTATF[%08x]: %08x\n", - LPC11_GPIOINT_IOINTSTATUS, getreg32(LPC11_GPIOINT_IOINTSTATUS), - base+LPC11_GPIOINT_INTSTATR_OFFSET, getreg32(base+LPC11_GPIOINT_INTSTATR_OFFSET), - base+LPC11_GPIOINT_INTSTATF_OFFSET, getreg32(base+LPC11_GPIOINT_INTSTATF_OFFSET)); - lldbg(" INTENR[%08x]: %08x INTENF[%08x]: %08x\n", - base+LPC11_GPIOINT_INTENR_OFFSET, getreg32(base+LPC11_GPIOINT_INTENR_OFFSET), - base+LPC11_GPIOINT_INTENF_OFFSET, getreg32(base+LPC11_GPIOINT_INTENF_OFFSET)); + gpioinfo(" IOINTSTATUS[%08x]: %08x INTSTATR[%08x]: %08x INSTATF[%08x]: %08x\n", + LPC11_GPIOINT_IOINTSTATUS, getreg32(LPC11_GPIOINT_IOINTSTATUS), + base+LPC11_GPIOINT_INTSTATR_OFFSET, getreg32(base+LPC11_GPIOINT_INTSTATR_OFFSET), + base+LPC11_GPIOINT_INTSTATF_OFFSET, getreg32(base+LPC11_GPIOINT_INTSTATF_OFFSET)); + gpioinfo(" INTENR[%08x]: %08x INTENF[%08x]: %08x\n", + base+LPC11_GPIOINT_INTENR_OFFSET, getreg32(base+LPC11_GPIOINT_INTENR_OFFSET), + base+LPC11_GPIOINT_INTENF_OFFSET, getreg32(base+LPC11_GPIOINT_INTENF_OFFSET)); + leave_critical_section(flags); return OK; } -#endif /* CONFIG_DEBUG_GPIO */ - +#endif /* CONFIG_DEBUG_GPIO_INFO */ diff --git a/arch/arm/src/lpc11xx/lpc11_i2c.c b/arch/arm/src/lpc11xx/lpc11_i2c.c index f838629fb2e50c6c217eac3f6cec0a44d4b88128..184290a602fbc3a7dad9ab122cec2a5fa615ff40 100644 --- a/arch/arm/src/lpc11xx/lpc11_i2c.c +++ b/arch/arm/src/lpc11xx/lpc11_i2c.c @@ -485,7 +485,7 @@ struct i2c_master_s *lpc11_i2cbus_initialize(int port) if (port > 1) { - dbg("lpc I2C Only support 0,1\n"); + i2cerr("ERROR: LPC I2C only supports ports 0 and 1\n"); return NULL; } diff --git a/arch/arm/src/lpc11xx/lpc11_irq.c b/arch/arm/src/lpc11xx/lpc11_irq.c index c6daaba380de3f4595ce7c7e7b304648c8746578..f861943bc0a111522e571bc9f75b917dde8cc2f0 100644 --- a/arch/arm/src/lpc11xx/lpc11_irq.c +++ b/arch/arm/src/lpc11xx/lpc11_irq.c @@ -86,34 +86,34 @@ volatile uint32_t *g_current_regs[1]; * ****************************************************************************/ -#if defined(CONFIG_DEBUG_IRQ) +#if defined(CONFIG_DEBUG_IRQ_INFO) static void lpc11_dumpnvic(const char *msg, int irq) { irqstate_t flags; flags = enter_critical_section(); - lldbg("NVIC (%s, irq=%d):\n", msg, irq); - lldbg(" ISER: %08x ICER: %08x\n", - getreg32(ARMV6M_NVIC_ISER), getreg32(ARMV6M_NVIC_ICER)); - lldbg(" ISPR: %08x ICPR: %08x\n", - getreg32(ARMV6M_NVIC_ISPR), getreg32(ARMV6M_NVIC_ICPR)); - lldbg(" IRQ PRIO: %08x %08x %08x %08x\n", - getreg32(ARMV6M_NVIC_IPR0), getreg32(ARMV6M_NVIC_IPR1), - getreg32(ARMV6M_NVIC_IPR2), getreg32(ARMV6M_NVIC_IPR3)); - lldbg(" %08x %08x %08x %08x\n", - getreg32(ARMV6M_NVIC_IPR4), getreg32(ARMV6M_NVIC_IPR5), - getreg32(ARMV6M_NVIC_IPR6), getreg32(ARMV6M_NVIC_IPR7)); - - lldbg("SYSCON:\n"); - lldbg(" CPUID: %08x\n", - getreg32(ARMV6M_SYSCON_CPUID)); - lldbg(" ICSR: %08x AIRCR: %08x\n", - getreg32(ARMV6M_SYSCON_ICSR), getreg32(ARMV6M_SYSCON_AIRCR)); - lldbg(" SCR: %08x CCR: %08x\n", - getreg32(ARMV6M_SYSCON_SCR), getreg32(ARMV6M_SYSCON_CCR)); - lldbg(" SHPR2: %08x SHPR3: %08x\n", - getreg32(ARMV6M_SYSCON_SHPR2), getreg32(ARMV6M_SYSCON_SHPR3)); + irqinfo("NVIC (%s, irq=%d):\n", msg, irq); + irqinfo(" ISER: %08x ICER: %08x\n", + getreg32(ARMV6M_NVIC_ISER), getreg32(ARMV6M_NVIC_ICER)); + irqinfo(" ISPR: %08x ICPR: %08x\n", + getreg32(ARMV6M_NVIC_ISPR), getreg32(ARMV6M_NVIC_ICPR)); + irqinfo(" IRQ PRIO: %08x %08x %08x %08x\n", + getreg32(ARMV6M_NVIC_IPR0), getreg32(ARMV6M_NVIC_IPR1), + getreg32(ARMV6M_NVIC_IPR2), getreg32(ARMV6M_NVIC_IPR3)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(ARMV6M_NVIC_IPR4), getreg32(ARMV6M_NVIC_IPR5), + getreg32(ARMV6M_NVIC_IPR6), getreg32(ARMV6M_NVIC_IPR7)); + + irqinfo("SYSCON:\n"); + irqinfo(" CPUID: %08x\n", + getreg32(ARMV6M_SYSCON_CPUID)); + irqinfo(" ICSR: %08x AIRCR: %08x\n", + getreg32(ARMV6M_SYSCON_ICSR), getreg32(ARMV6M_SYSCON_AIRCR)); + irqinfo(" SCR: %08x CCR: %08x\n", + getreg32(ARMV6M_SYSCON_SCR), getreg32(ARMV6M_SYSCON_CCR)); + irqinfo(" SHPR2: %08x SHPR3: %08x\n", + getreg32(ARMV6M_SYSCON_SHPR2), getreg32(ARMV6M_SYSCON_SHPR3)); leave_critical_section(flags); } @@ -133,11 +133,11 @@ static void lpc11_dumpnvic(const char *msg, int irq) * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES static int lpc11_nmi(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! NMI received\n"); + _err("PANIC!!! NMI received\n"); PANIC(); return 0; } @@ -145,7 +145,7 @@ static int lpc11_nmi(int irq, FAR void *context) static int lpc11_pendsv(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! PendSV received\n"); + _err("PANIC!!! PendSV received\n"); PANIC(); return 0; } @@ -153,7 +153,7 @@ static int lpc11_pendsv(int irq, FAR void *context) static int lpc11_reserved(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Reserved interrupt\n"); + _err("PANIC!!! Reserved interrupt\n"); PANIC(); return 0; } @@ -232,7 +232,7 @@ void up_irqinitialize(void) /* Attach all other processor exceptions (except reset and sys tick) */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES irq_attach(LPC11_IRQ_NMI, lpc11_nmi); irq_attach(LPC11_IRQ_PENDSV, lpc11_pendsv); irq_attach(LPC11_IRQ_RESERVED, lpc11_reserved); diff --git a/arch/arm/src/lpc11xx/lpc11_serial.c b/arch/arm/src/lpc11xx/lpc11_serial.c index 6bbd488a3eeda0442442d4ff86c8410c9acf0077..55c05ac51724716cc7d38f9c99ee63263dfb6397 100644 --- a/arch/arm/src/lpc11xx/lpc11_serial.c +++ b/arch/arm/src/lpc11xx/lpc11_serial.c @@ -64,7 +64,6 @@ #include "chip.h" #include "chip/lpc11_uart.h" #include "lpc11_gpio.h" -#include "lpc11_lowgetc.h" #include "lpc11_serial.h" /**************************************************************************** @@ -631,7 +630,7 @@ static int up_interrupt(int irq, void *context) /* Read the line status register (LSR) to clear */ status = up_serialin(priv, LPC11_UART_LSR_OFFSET); - vdbg("LSR: %02x\n", status); + _info("LSR: %02x\n", status); break; } @@ -639,7 +638,7 @@ static int up_interrupt(int irq, void *context) default: { - dbg("Unexpected IIR: %02x\n", status); + _err("ERROR: Unexpected IIR: %02x\n", status); break; } } @@ -1041,19 +1040,4 @@ int up_putc(int ch) return ch; } -/**************************************************************************** - * Name: up_getc - * - * Description: - * Provide priority, low-level access to support OS debug writes - * - ****************************************************************************/ - -int up_getc(void) -{ - /* Check for LF */ - - return lpc11_lowgetc(); -} - #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/lpc11xx/lpc11_spi.c b/arch/arm/src/lpc11xx/lpc11_spi.c index 178bd77c3604f635383b8c4647f2e0150db39ff6..c3f9157fe5246fe8eb1d4ef8077d9503a96d629f 100644 --- a/arch/arm/src/lpc11xx/lpc11_spi.c +++ b/arch/arm/src/lpc11xx/lpc11_spi.c @@ -71,26 +71,6 @@ # error "CONFIG_SPI_EXCHANGE must not be defined in the configuration" #endif -/* Debug ********************************************************************/ -/* The following enable debug output from this file: - * - * CONFIG_DEBUG - Define to enable general debug features - * CONFIG_DEBUG_SPI - Define to enable basic SSP debug (needs CONFIG_DEBUG) - * CONFIG_DEBUG_VERBOSE - Define to enable verbose SSP debug - */ - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - /* SSP Clocking *************************************************************/ /* The CPU clock by 1, 2, 4, or 8 to get the SPI peripheral clock (SPI_CLOCK). * SPI_CLOCK may be further divided by 8-254 to get the SPI clock. If we @@ -292,7 +272,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, priv->frequency = frequency; priv->actual = actual; - spidbg("Frequency %d->%d\n", frequency, actual); + spiinfo("Frequency %d->%d\n", frequency, actual); return actual; } @@ -456,7 +436,7 @@ static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, FAR uint8_t *ptr = (FAR uint8_t *)buffer; uint8_t data; - spidbg("nwords: %d\n", nwords); + spiinfo("nwords: %d\n", nwords); while (nwords) { /* Write the data to transmitted to the SPI Data Register */ @@ -503,7 +483,7 @@ static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, { FAR uint8_t *ptr = (FAR uint8_t *)buffer; - spidbg("nwords: %d\n", nwords); + spiinfo("nwords: %d\n", nwords); while (nwords) { /* Write some dummy data to the SPI Data Register in order to clock the diff --git a/arch/arm/src/lpc11xx/lpc11_ssp.c b/arch/arm/src/lpc11xx/lpc11_ssp.c index c94eac7692d0198ff318afb9fbc950c2d9466331..a5a66d862a975c104b95b478642aff3778a87ca5 100644 --- a/arch/arm/src/lpc11xx/lpc11_ssp.c +++ b/arch/arm/src/lpc11xx/lpc11_ssp.c @@ -72,26 +72,6 @@ # error "CONFIG_SPI_EXCHANGE must not be defined in the configuration" #endif -/* Debug ********************************************************************/ -/* The following enable debug output from this file: - * - * CONFIG_DEBUG - Define to enable general debug features - * CONFIG_DEBUG_SPI - Define to enable basic SSP debug (needs CONFIG_DEBUG) - * CONFIG_DEBUG_VERBOSE - Define to enable verbose SSP debug - */ - -#ifdef CONFIG_DEBUG_SPI -# define sspdbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define sspdbg(x...) -# define spivdbg(x...) -#endif - /* SSP Clocking *************************************************************/ #if defined(LPC111x) @@ -474,7 +454,7 @@ static uint32_t ssp_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) priv->frequency = frequency; priv->actual = actual; - sspdbg("Frequency %d->%d\n", frequency, actual); + spiinfo("Frequency %d->%d\n", frequency, actual); return actual; } @@ -525,7 +505,7 @@ static void ssp_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode) break; default: - sspdbg("Bad mode: %d\n", mode); + spierr("ERROR: Bad mode: %d\n", mode); DEBUGASSERT(FALSE); return; } @@ -613,7 +593,7 @@ static uint16_t ssp_send(FAR struct spi_dev_s *dev, uint16_t wd) /* Get the value from the RX FIFO and return it */ regval = ssp_getreg(priv, LPC11_SSP_DR_OFFSET); - sspdbg("%04x->%04x\n", wd, regval); + spiinfo("%04x->%04x\n", wd, regval); return (uint16_t)regval; } @@ -651,7 +631,7 @@ static void ssp_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, /* Loop while thre are bytes remaining to be sent */ - sspdbg("nwords: %d\n", nwords); + spiinfo("nwords: %d\n", nwords); u.pv = buffer; while (nwords > 0) { @@ -679,7 +659,7 @@ static void ssp_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, /* Then discard all card responses until the RX & TX FIFOs are emptied. */ - sspdbg("discarding\n"); + spiinfo("discarding\n"); do { /* Is there anything in the RX fifo? */ @@ -744,7 +724,7 @@ static void ssp_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, * occurred). */ - sspdbg("nwords: %d\n", nwords); + spiinfo("nwords: %d\n", nwords); u.pv = buffer; while (nwords || rxpending) { @@ -754,7 +734,7 @@ static void ssp_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, * and (3) there are more bytes to be sent. */ - spivdbg("TX: rxpending: %d nwords: %d\n", rxpending, nwords); + spiinfo("TX: rxpending: %d nwords: %d\n", rxpending, nwords); while ((ssp_getreg(priv, LPC11_SSP_SR_OFFSET) & SSP_SR_TNF) && (rxpending < LPC11_SSP_FIFOSZ) && nwords) { @@ -767,7 +747,7 @@ static void ssp_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, * empty. */ - spivdbg("RX: rxpending: %d\n", rxpending); + spiinfo("RX: rxpending: %d\n", rxpending); while (ssp_getreg(priv, LPC11_SSP_SR_OFFSET) & SSP_SR_RNE) { data = (uint8_t)ssp_getreg(priv, LPC11_SSP_DR_OFFSET); diff --git a/arch/arm/src/lpc11xx/lpc11_start.c b/arch/arm/src/lpc11xx/lpc11_start.c index 78429691490d69c6284c9e1adb74fb1133fff331..917cdeae275e6a5ef705a3e14e67293309b684c6 100644 --- a/arch/arm/src/lpc11xx/lpc11_start.c +++ b/arch/arm/src/lpc11xx/lpc11_start.c @@ -86,7 +86,7 @@ const uint32_t g_idle_topstack = IDLE_STACK; * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES # define showprogress(c) up_lowputc(c) #else # define showprogress(c) diff --git a/arch/arm/src/lpc11xx/lpc11_timer.c b/arch/arm/src/lpc11xx/lpc11_timer.c index b9106becbcc016f8f4cd7876b470546d85746389..e742dc2de0b97ad5690f9d544edc2264769709a2 100644 --- a/arch/arm/src/lpc11xx/lpc11_timer.c +++ b/arch/arm/src/lpc11xx/lpc11_timer.c @@ -80,31 +80,11 @@ #define TIMTYPE_TIM1 TIMTYPE_ADVANCED - /* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing PWM */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_PWM -#endif -#ifdef CONFIG_DEBUG_PWM -# define pwmdbg dbg -# define pwmlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define pwmvdbg vdbg -# define pwmllvdbg llvdbg -# define pwm_dumpgpio(p,m) stm32_dumpgpio(p,m) -# else -# define pwmlldbg(x...) -# define pwmllvdbg(x...) -# define pwm_dumpgpio(p,m) -# endif +#ifdef CONFIG_DEBUG_PWM_INFO +# define pwm_dumpgpio(p,m) stm32_dumpgpio(p,m) #else -# define pwmdbg(x...) -# define pwmlldbg(x...) -# define pwmvdbg(x...) -# define pwmllvdbg(x...) # define pwm_dumpgpio(p,m) #endif @@ -133,7 +113,7 @@ struct lpc11_timer_s static uint32_t timer_getreg(struct lpc11_timer_s *priv, int offset); static void timer_putreg(struct lpc11_timer_s *priv, int offset, uint32_t value); -#if defined(CONFIG_DEBUG_PWM) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_PWM_INFO static void timer_dumpregs(struct lpc11_timer_s *priv, FAR const char *msg); #else # define timer_dumpregs(priv,msg) @@ -242,11 +222,11 @@ static void timer_putreg(struct lpc11_timer_s *priv, int offset, * ****************************************************************************/ -#if defined(CONFIG_DEBUG_PWM) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_PWM_INFO static void timer_dumpregs(struct lpc11_timer_s *priv, FAR const char *msg) { - pwmdbg("%s:\n", msg); - pwmdbg(" CR1: %04x CR2: %04x SMCR: %04x DIER: %04x\n", + pwminfo("%s:\n", msg); + pwminfo(" CR1: %04x CR2: %04x SMCR: %04x DIER: %04x\n", timer_getreg(priv, LPC11_PWM_MR0_OFFSET), timer_getreg(priv, LPC11_PWM_MR1_OFFSET), timer_getreg(priv, LPC11_PWM_MR2_OFFSET), @@ -254,7 +234,7 @@ static void timer_dumpregs(struct lpc11_timer_s *priv, FAR const char *msg) #if defined(CONFIG_LPC11_TMR0) if (priv->timtype == TIMTYPE_ADVANCED) { - pwmdbg(" RCR: %04x BDTR: %04x DCR: %04x DMAR: %04x\n", + pwminfo(" RCR: %04x BDTR: %04x DCR: %04x DMAR: %04x\n", timer_getreg(priv, LPC11_PWM_MR0_OFFSET), timer_getreg(priv, LPC11_PWM_MR1_OFFSET), timer_getreg(priv, LPC11_PWM_MR2_OFFSET), @@ -263,7 +243,7 @@ static void timer_dumpregs(struct lpc11_timer_s *priv, FAR const char *msg) else #endif { - pwmdbg(" DCR: %04x DMAR: %04x\n", + pwminfo(" DCR: %04x DMAR: %04x\n", timer_getreg(priv, LPC11_PWM_MR2_OFFSET), timer_getreg(priv, LPC11_PWM_MR3_OFFSET)); } @@ -469,7 +449,7 @@ static int timer_shutdown(FAR struct pwm_lowerhalf_s *dev) FAR struct lpc11_timer_s *priv = (FAR struct lpc11_timer_s *)dev; uint32_t pincfg; - pwmdbg("TIM%d pincfg: %08x\n", priv->timid, priv->pincfg); + pwminfo("TIM%d pincfg: %08x\n", priv->timid, priv->pincfg); /* Make sure that the output has been stopped */ @@ -525,7 +505,7 @@ static int timer_stop(FAR struct pwm_lowerhalf_s *dev) uint32_t regval; irqstate_t flags; - pwmdbg("TIM%d\n", priv->timid); + pwminfo("TIM%d\n", priv->timid); /* Disable interrupts momentary to stop any ongoing timer processing and * to prevent any concurrent access to the reset register. @@ -551,7 +531,7 @@ static int timer_stop(FAR struct pwm_lowerhalf_s *dev) leave_critical_section(flags); - pwmdbg("regaddr: %08x resetbit: %08x\n", regaddr, resetbit); + pwminfo("regaddr: %08x resetbit: %08x\n", regaddr, resetbit); timer_dumpregs(priv, "After stop"); return OK; } @@ -575,12 +555,12 @@ static int timer_stop(FAR struct pwm_lowerhalf_s *dev) static int timer_ioctl(FAR struct pwm_lowerhalf_s *dev, int cmd, unsigned long arg) { -#ifdef CONFIG_DEBUG_TIMER +#ifdef CONFIG_DEBUG_PWM_INFO FAR struct lpc11_timer_s *priv = (FAR struct lpc11_timer_s *)dev; /* There are no platform-specific ioctl commands */ - pwmdbg("TIM%d\n", priv->timid); + pwminfo("TIM%d\n", priv->timid); #endif return -ENOTTY; } @@ -610,7 +590,7 @@ FAR struct pwm_lowerhalf_s *lpc11_timerinitialize(int timer) { FAR struct lpc11_timer_s *lower; - pwmdbg("TIM%d\n", timer); + pwminfo("TIM%d\n", timer); switch (timer) { @@ -624,7 +604,7 @@ FAR struct pwm_lowerhalf_s *lpc11_timerinitialize(int timer) #endif default: - pwmdbg("No such timer configured\n"); + pwmerr("ERROR: No such timer configured\n"); return NULL; } diff --git a/arch/arm/src/lpc17xx/Kconfig b/arch/arm/src/lpc17xx/Kconfig index 4bb53068bb687b6213aad7464bb4451b31479cfb..abfd205fedcbd26c96c252541a1794164a766e33 100644 --- a/arch/arm/src/lpc17xx/Kconfig +++ b/arch/arm/src/lpc17xx/Kconfig @@ -594,12 +594,13 @@ config CAN_LOOPBACK ---help--- Enable CAN loopback mode -config CAN_REGDEBUG +config LPC17_CAN_REGDEBUG bool "Register level debug" - depends on DEBUG + depends on DEBUG_CAN_INFO default n ---help--- - Output detailed register-level CAN debug information. Requires also DEBUG and DEBUG_CAN. + Output detailed register-level CAN debug information. Requires also + CONFIG_DEBUG_CAN_INFO. endmenu @@ -703,12 +704,12 @@ config NET_WOL ---help--- Enable Wake-up on Lan (not fully implemented). -config NET_REGDEBUG +config LPC17_NET_REGDEBUG bool "Ethernet register-level debug" - depends on DEBUG + depends on DEBUG_NET_INFO default n ---help--- - Enable low level register debug. Also needs DEBUG. + Enable low level register debug. Also needs CONFIG_DEBUG_NET_INFO. config NET_HASH bool "Hashing" @@ -900,10 +901,11 @@ config LPC17_USBDEV_NOLED config LPC17_USBDEV_REGDEBUG bool "Register level debug" - depends on DEBUG + depends on DEBUG_USB_INFO default n ---help--- - Output detailed register-level USB device debug information. Requires also DEBUG. + Output detailed register-level USB device debug information. Requires + also CONFIG_DEBUG_USB_INFO. endmenu @@ -976,9 +978,10 @@ config USBHOST_ISOC_DISABLE config LPC17_USBHOST_REGDEBUG bool "Register level debug" - depends on DEBUG + depends on DEBUG_USB_INFO default n ---help--- - Output detailed register-level USB host debug information. Requires also DEBUG. + Output detailed register-level USB host debug information. Requires + also CONFIG_DEBUG_USB_INFO. endmenu diff --git a/arch/arm/src/lpc17xx/Make.defs b/arch/arm/src/lpc17xx/Make.defs index 2d6193a41d7625b116086e1e7d91e808fd4059ac..919f70e75799a37d9fc011c04a80c7136aa74a25 100644 --- a/arch/arm/src/lpc17xx/Make.defs +++ b/arch/arm/src/lpc17xx/Make.defs @@ -137,7 +137,7 @@ ifeq ($(CONFIG_GPIO_IRQ),y) CHIP_CSRCS += lpc17_gpioint.c endif -ifeq ($(CONFIG_DEBUG_GPIO),y) +ifeq ($(CONFIG_DEBUG_GPIO_INFO),y) CHIP_CSRCS += lpc17_gpiodbg.c endif diff --git a/arch/arm/src/lpc17xx/lpc176x_rtc.c b/arch/arm/src/lpc17xx/lpc176x_rtc.c index a0aa525ff736ccd5d172ef4e8d5ac111a781014c..8e04d2f2eba7e41f674cf0326182c0bbeaf44251 100644 --- a/arch/arm/src/lpc17xx/lpc176x_rtc.c +++ b/arch/arm/src/lpc17xx/lpc176x_rtc.c @@ -72,30 +72,6 @@ # error "CONFIG_RTC_HIRES must NOT be set with this driver" #endif -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_RTC -#endif - -/* Constants ************************************************************************/ - -/* Debug ****************************************************************************/ - -#ifdef CONFIG_DEBUG_RTC -# define rtcdbg dbg -# define rtcvdbg vdbg -# define rtclldbg lldbg -# define rtcllvdbg llvdbg -#else -# define rtcdbg(x...) -# define rtcvdbg(x...) -# define rtclldbg(x...) -# define rtcllvdbg(x...) -#endif - -/************************************************************************************ - * Private Types - ************************************************************************************/ - /************************************************************************************ * Private Data ************************************************************************************/ @@ -131,12 +107,12 @@ volatile bool g_rtc_enabled = false; * ************************************************************************************/ -#ifdef CONFIG_DEBUG_RTC +#ifdef CONFIG_DEBUG_RTC_INFO static void rtc_dumpregs(FAR const char *msg) { - rtclldbg("%s:\n", msg); - rtclldbg(" DOM : %08x\n", (getreg32(LPC17_RTC_DOM) & RTC_DOM_MASK)); - rtclldbg(" DOW : %08x\n", (getreg32(LPC17_RTC_DOW) & RTC_DOW_MASK)); + rtcinfo("%s:\n", msg); + rtcinfo(" DOM : %08x\n", (getreg32(LPC17_RTC_DOM) & RTC_DOM_MASK)); + rtcinfo(" DOW : %08x\n", (getreg32(LPC17_RTC_DOW) & RTC_DOW_MASK)); } #else # define rtc_dumpregs(msg) @@ -156,16 +132,16 @@ static void rtc_dumpregs(FAR const char *msg) * ************************************************************************************/ -#ifdef CONFIG_DEBUG_RTC +#ifdef CONFIG_DEBUG_RTC_INFO static void rtc_dumptime(FAR struct tm *tp, FAR const char *msg) { - rtclldbg("%s:\n", msg); - rtclldbg(" tm_sec: %08x\n", tp->tm_sec); - rtclldbg(" tm_min: %08x\n", tp->tm_min); - rtclldbg(" tm_hour: %08x\n", tp->tm_hour); - rtclldbg(" tm_mday: %08x\n", tp->tm_mday); - rtclldbg(" tm_mon: %08x\n", tp->tm_mon); - rtclldbg(" tm_year: %08x\n", tp->tm_year); + rtcinfo("%s:\n", msg); + rtcinfo(" tm_sec: %08x\n", tp->tm_sec); + rtcinfo(" tm_min: %08x\n", tp->tm_min); + rtcinfo(" tm_hour: %08x\n", tp->tm_hour); + rtcinfo(" tm_mday: %08x\n", tp->tm_mday); + rtcinfo(" tm_mon: %08x\n", tp->tm_mon); + rtcinfo(" tm_year: %08x\n", tp->tm_year); } #else # define rtc_dumptime(tp, msg) diff --git a/arch/arm/src/lpc17xx/lpc17_can.c b/arch/arm/src/lpc17xx/lpc17_can.c index c3949f2778e0427b0de7aae20582dd6e5ccf223f..f25de325b9f8d9e22b1d9265b9427850f86403e2 100644 --- a/arch/arm/src/lpc17xx/lpc17_can.c +++ b/arch/arm/src/lpc17xx/lpc17_can.c @@ -160,25 +160,8 @@ /* Debug ********************************************************************/ /* Non-standard debug that may be enabled just for testing CAN */ -#if !defined(CONFIG_DEBUG) || !defined(CONFIG_DEBUG_CAN) -# undef CONFIG_CAN_REGDEBUG -#endif - -#ifdef CONFIG_DEBUG_CAN -# ifdef CONFIG_CAN_REGDEBUG -# define candbg lldbg -# define canvdbg llvdbg -# else -# define candbg dbg -# define canvdbg vdbg -# endif -# define canlldbg lldbg -# define canllvdbg llvdbg -#else -# define candbg(x...) -# define canvdbg(x...) -# define canlldbg(x...) -# define canllvdbg(x...) +#ifndef CONFIG_DEBUG_CAN_INFO +# undef CONFIG_LPC17_CAN_REGDEBUG #endif /* Timing *******************************************************************/ @@ -203,14 +186,14 @@ struct up_dev_s ****************************************************************************/ /* CAN Register access */ -#ifdef CONFIG_CAN_REGDEBUG +#ifdef CONFIG_LPC17_CAN_REGDEBUG static void can_printreg(uint32_t addr, uint32_t value); #endif static uint32_t can_getreg(struct up_dev_s *priv, int offset); static void can_putreg(struct up_dev_s *priv, int offset, uint32_t value); -#ifdef CONFIG_CAN_REGDEBUG +#ifdef CONFIG_LPC17_CAN_REGDEBUG static uint32_t can_getcommon(uint32_t addr); static void can_putcommon(uint32_t addr, uint32_t value); #else @@ -308,7 +291,7 @@ static struct can_dev_s g_can2dev = * ****************************************************************************/ -#ifdef CONFIG_CAN_REGDEBUG +#ifdef CONFIG_LPC17_CAN_REGDEBUG static void can_printreg(uint32_t addr, uint32_t value) { static uint32_t prevaddr = 0; @@ -325,7 +308,7 @@ static void can_printreg(uint32_t addr, uint32_t value) { if (count == 4) { - lldbg("...\n"); + caninfo("...\n"); } return; @@ -342,7 +325,7 @@ static void can_printreg(uint32_t addr, uint32_t value) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + caninfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -354,7 +337,7 @@ static void can_printreg(uint32_t addr, uint32_t value) /* Show the register value read */ - lldbg("%08x->%08x\n", addr, value); + caninfo("%08x->%08x\n", addr, value); } #endif @@ -372,7 +355,7 @@ static void can_printreg(uint32_t addr, uint32_t value) * ****************************************************************************/ -#ifdef CONFIG_CAN_REGDEBUG +#ifdef CONFIG_LPC17_CAN_REGDEBUG static uint32_t can_getreg(struct up_dev_s *priv, int offset) { uint32_t addr; @@ -408,14 +391,14 @@ static uint32_t can_getreg(struct up_dev_s *priv, int offset) * ****************************************************************************/ -#ifdef CONFIG_CAN_REGDEBUG +#ifdef CONFIG_LPC17_CAN_REGDEBUG static void can_putreg(struct up_dev_s *priv, int offset, uint32_t value) { uint32_t addr = priv->base + offset; /* Show the register value being written */ - lldbg("%08x<-%08x\n", addr, value); + caninfo("%08x<-%08x\n", addr, value); /* Write the value */ @@ -442,7 +425,7 @@ static void can_putreg(struct up_dev_s *priv, int offset, uint32_t value) * ****************************************************************************/ -#ifdef CONFIG_CAN_REGDEBUG +#ifdef CONFIG_LPC17_CAN_REGDEBUG static uint32_t can_getcommon(uint32_t addr) { uint32_t value; @@ -470,12 +453,12 @@ static uint32_t can_getcommon(uint32_t addr) * ****************************************************************************/ -#ifdef CONFIG_CAN_REGDEBUG +#ifdef CONFIG_LPC17_CAN_REGDEBUG static void can_putcommon(uint32_t addr, uint32_t value) { /* Show the register value being written */ - lldbg("%08x<-%08x\n", addr, value); + caninfo("%08x<-%08x\n", addr, value); /* Write the value */ @@ -504,7 +487,7 @@ static void can_reset(FAR struct can_dev_s *dev) irqstate_t flags; int ret; - canvdbg("CAN%d\n", priv->port); + caninfo("CAN%d\n", priv->port); flags = enter_critical_section(); @@ -520,7 +503,7 @@ static void can_reset(FAR struct can_dev_s *dev) ret = can_bittiming(priv); if (ret != OK) { - candbg("ERROR: Failed to set bit timing: %d\n", ret); + canerr("ERROR: Failed to set bit timing: %d\n", ret); } /* Restart the CAN */ @@ -553,18 +536,19 @@ static void can_reset(FAR struct can_dev_s *dev) static int can_setup(FAR struct can_dev_s *dev) { -#ifdef CONFIG_DEBUG_CAN +#ifdef CONFIG_DEBUG_CAN_INFO FAR struct up_dev_s *priv = (FAR struct up_dev_s *)dev->cd_priv; #endif int ret; - canvdbg("CAN%d\n", priv->port); + caninfo("CAN%d\n", priv->port); ret = irq_attach(LPC17_IRQ_CAN, can12_interrupt); if (ret == OK) { up_enable_irq(LPC17_IRQ_CAN); } + return ret; } @@ -585,10 +569,10 @@ static int can_setup(FAR struct can_dev_s *dev) static void can_shutdown(FAR struct can_dev_s *dev) { -#ifdef CONFIG_DEBUG_CAN +#ifdef CONFIG_DEBUG_CAN_INFO FAR struct up_dev_s *priv = (FAR struct up_dev_s *)dev->cd_priv; - canvdbg("CAN%d\n", priv->port); + caninfo("CAN%d\n", priv->port); #endif up_disable_irq(LPC17_IRQ_CAN); @@ -615,7 +599,7 @@ static void can_rxint(FAR struct can_dev_s *dev, bool enable) uint32_t regval; irqstate_t flags; - canvdbg("CAN%d enable: %d\n", priv->port, enable); + caninfo("CAN%d enable: %d\n", priv->port, enable); /* The EIR register is also modifed from the interrupt handler, so we have * to protect this code section. @@ -656,7 +640,7 @@ static void can_txint(FAR struct can_dev_s *dev, bool enable) uint32_t regval; irqstate_t flags; - canvdbg("CAN%d enable: %d\n", priv->port, enable); + caninfo("CAN%d enable: %d\n", priv->port, enable); /* Only disabling of the TX interrupt is supported here. The TX interrupt * is automatically enabled just before a message is sent in order to avoid @@ -697,7 +681,7 @@ 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) { - dbg("Fix me:Not Implemented\n"); + canerr("ERROR: Fix me -- Not Implemented\n"); return 0; } @@ -717,7 +701,7 @@ 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) { - dbg("Fix me:Not Implemented\n"); + canerr("ERROR: Fix me -- Not Implemented\n"); return 0; } @@ -753,7 +737,7 @@ static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg) irqstate_t flags; int ret = OK; - canvdbg("CAN%d ID: %d DLC: %d\n", + caninfo("CAN%d ID: %d DLC: %d\n", priv->port, msg->cm_hdr.ch_id, msg->cm_hdr.ch_dlc); if (msg->cm_hdr.ch_rtr) @@ -878,7 +862,7 @@ static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg) } else { - candbg("No available transmission buffer, SR: %08x\n", regval); + canerr("ERROR: No available transmission buffer, SR: %08x\n", regval); ret = -EBUSY; } @@ -958,7 +942,7 @@ static void can_interrupt(FAR struct can_dev_s *dev) /* Read the interrupt and capture register (also clearing most status bits) */ regval = can_getreg(priv, LPC17_CAN_ICR_OFFSET); - canllvdbg("CAN%d ICR: %08x\n", priv->port, regval); + caninfo("CAN%d ICR: %08x\n", priv->port, regval); /* Check for a receive interrupt */ @@ -988,7 +972,7 @@ static void can_interrupt(FAR struct can_dev_s *dev) if ((rfs & CAN_RFS_FF) != 0) { - canlldbg("ERROR: Received message with extended identifier. Dropped\n"); + canerr("ERROR: Received message with extended identifier. Dropped\n"); } else #endif @@ -1065,7 +1049,7 @@ static int can12_interrupt(int irq, void *context) { /* Handle CAN1/2 interrupts */ - canllvdbg("irq: %d\n", irq); + caninfo("irq: %d\n", irq); #ifdef CONFIG_LPC17_CAN1 can_interrupt(&g_can1dev); @@ -1142,8 +1126,8 @@ static int can_bittiming(struct up_dev_s *priv) uint32_t ts2; uint32_t sjw; - canllvdbg("CAN%d PCLK: %d baud: %d\n", priv->port, - CAN_CLOCK_FREQUENCY(priv->divisor), priv->baud); + caninfo("CAN%d PCLK: %d baud: %d\n", priv->port, + CAN_CLOCK_FREQUENCY(priv->divisor), priv->baud); /* Try to get CAN_BIT_QUANTA quanta in one bit_time. * @@ -1195,7 +1179,7 @@ static int can_bittiming(struct up_dev_s *priv) sjw = 1; - canllvdbg("TS1: %d TS2: %d BRP: %d SJW= %d\n", ts1, ts2, brp, sjw); + caninfo("TS1: %d TS2: %d BRP: %d SJW= %d\n", ts1, ts2, brp, sjw); /* Configure bit timing */ @@ -1212,7 +1196,7 @@ static int can_bittiming(struct up_dev_s *priv) btr |= CAN_BTR_SAM; #endif - canllvdbg("Setting CANxBTR= 0x%08x\n", btr); + caninfo("Setting CANxBTR= 0x%08x\n", btr); can_putreg(priv, LPC17_CAN_BTR_OFFSET, btr); /* Set bit timing */ return OK; } @@ -1240,7 +1224,7 @@ FAR struct can_dev_s *lpc17_caninitialize(int port) irqstate_t flags; uint32_t regval; - canllvdbg("CAN%d\n", port); + caninfo("CAN%d\n", port); flags = enter_critical_section(); @@ -1299,7 +1283,7 @@ FAR struct can_dev_s *lpc17_caninitialize(int port) else #endif { - candbg("Unsupported port: %d\n", port); + canerr("ERROR: Unsupported port: %d\n", port); leave_critical_section(flags); return NULL; } diff --git a/arch/arm/src/lpc17xx/lpc17_dac.c b/arch/arm/src/lpc17xx/lpc17_dac.c index d5100c5e50a443eacd766e4b5508980de71201e3..003d6092664620401d2d9356ef201b915b0024ce 100644 --- a/arch/arm/src/lpc17xx/lpc17_dac.c +++ b/arch/arm/src/lpc17xx/lpc17_dac.c @@ -170,9 +170,9 @@ static int dac_send(FAR struct dac_dev_s *dev, FAR struct dac_msg_s *msg) /* 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"); + aerr("ERROR: Fix me -- Not Implemented\n"); return 0; } diff --git a/arch/arm/src/lpc17xx/lpc17_ethernet.c b/arch/arm/src/lpc17xx/lpc17_ethernet.c index 4bc992d2ce9cf440c3a38deeb694361a504ba149..13730506821648d46e4bcbbd6437d1ebf4a470f5 100644 --- a/arch/arm/src/lpc17xx/lpc17_ethernet.c +++ b/arch/arm/src/lpc17xx/lpc17_ethernet.c @@ -127,17 +127,17 @@ #endif /* Debug Configuration *****************************************************/ -/* Register debug -- can only happen of CONFIG_DEBUG is selected */ +/* Register debug -- can only happen of CONFIG_DEBUG_NET_INFO is selected */ -#ifndef CONFIG_DEBUG -# undef CONFIG_NET_REGDEBUG +#ifndef CONFIG_DEBUG_NET_INFO +# undef CONFIG_LPC17_NET_REGDEBUG #endif /* CONFIG_NET_DUMPPACKET will dump the contents of each packet to the * console. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_NET_INFO # undef CONFIG_NET_DUMPPACKET #endif @@ -301,7 +301,7 @@ static const uint16_t g_enetpins[GPIO_NENET_PINS] = /* Register operations */ -#ifdef CONFIG_NET_REGDEBUG +#ifdef CONFIG_LPC17_NET_REGDEBUG static void lpc17_printreg(uint32_t addr, uint32_t val, bool iswrite); static void lpc17_checkreg(uint32_t addr, uint32_t val, bool iswrite); static uint32_t lpc17_getreg(uint32_t addr); @@ -365,7 +365,7 @@ static int lpc17_rmmac(struct net_driver_s *dev, const uint8_t *mac); /* Initialization functions */ -#if defined(CONFIG_NET_REGDEBUG) && defined(CONFIG_DEBUG_GPIO) +#if defined(CONFIG_LPC17_NET_REGDEBUG) && defined(CONFIG_DEBUG_GPIO_INFO) static void lpc17_showpins(void); #else # define lpc17_showpins() @@ -374,7 +374,7 @@ static void lpc17_showpins(void); /* PHY initialization functions */ #ifdef LPC17_HAVE_PHY -# ifdef CONFIG_NET_REGDEBUG +# ifdef CONFIG_LPC17_NET_REGDEBUG static void lpc17_showmii(uint8_t phyaddr, const char *msg); # else # define lpc17_showmii(phyaddr,msg) @@ -412,10 +412,10 @@ static void lpc17_ethreset(struct lpc17_driver_s *priv); * ****************************************************************************/ -#ifdef CONFIG_NET_REGDEBUG +#ifdef CONFIG_LPC17_NET_REGDEBUG static void lpc17_printreg(uint32_t addr, uint32_t val, bool iswrite) { - dbg("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val); + ninfo("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val); } #endif @@ -427,7 +427,7 @@ static void lpc17_printreg(uint32_t addr, uint32_t val, bool iswrite) * ****************************************************************************/ -#ifdef CONFIG_NET_REGDEBUG +#ifdef CONFIG_LPC17_NET_REGDEBUG static void lpc17_checkreg(uint32_t addr, uint32_t val, bool iswrite) { static uint32_t prevaddr = 0; @@ -465,7 +465,7 @@ static void lpc17_checkreg(uint32_t addr, uint32_t val, bool iswrite) { /* No.. More than one. */ - dbg("[repeats %d more times]\n", count); + ninfo("[repeats %d more times]\n", count); } } @@ -491,7 +491,7 @@ static void lpc17_checkreg(uint32_t addr, uint32_t val, bool iswrite) * ****************************************************************************/ -#ifdef CONFIG_NET_REGDEBUG +#ifdef CONFIG_LPC17_NET_REGDEBUG static uint32_t lpc17_getreg(uint32_t addr) { /* Read the value from the register */ @@ -513,7 +513,7 @@ static uint32_t lpc17_getreg(uint32_t addr) * ****************************************************************************/ -#ifdef CONFIG_NET_REGDEBUG +#ifdef CONFIG_LPC17_NET_REGDEBUG static void lpc17_putreg(uint32_t val, uint32_t addr) { /* Check if we need to print this value */ @@ -837,8 +837,8 @@ static void lpc17_rxdone_process(struct lpc17_driver_s *priv) if ((*rxstat & RXSTAT_INFO_ERROR) != 0) { - nlldbg("Error. considx: %08x prodidx: %08x rxstat: %08x\n", - considx, prodidx, *rxstat); + nerr("ERROR: considx: %08x prodidx: %08x rxstat: %08x\n", + considx, prodidx, *rxstat); NETDEV_RXERRORS(&priv->lp_dev); } @@ -850,21 +850,21 @@ static void lpc17_rxdone_process(struct lpc17_driver_s *priv) /* else */ if (pktlen > CONFIG_NET_ETH_MTU + CONFIG_NET_GUARDSIZE) { - nlldbg("Too big. considx: %08x prodidx: %08x pktlen: %d rxstat: %08x\n", - considx, prodidx, pktlen, *rxstat); + nwarn("WARNING: Too big. considx: %08x prodidx: %08x pktlen: %d rxstat: %08x\n", + considx, prodidx, pktlen, *rxstat); NETDEV_RXERRORS(&priv->lp_dev); } else if ((*rxstat & RXSTAT_INFO_LASTFLAG) == 0) { - nlldbg("Fragment. considx: %08x prodidx: %08x pktlen: %d rxstat: %08x\n", - considx, prodidx, pktlen, *rxstat); + ninfo("Fragment. considx: %08x prodidx: %08x pktlen: %d rxstat: %08x\n", + considx, prodidx, pktlen, *rxstat); NETDEV_RXFRAGMENTS(&priv->lp_dev); fragment = true; } else if (fragment) { - nlldbg("Last fragment. considx: %08x prodidx: %08x pktlen: %d rxstat: %08x\n", - considx, prodidx, pktlen, *rxstat); + ninfo("Last fragment. considx: %08x prodidx: %08x pktlen: %d rxstat: %08x\n", + considx, prodidx, pktlen, *rxstat); NETDEV_RXFRAGMENTS(&priv->lp_dev); fragment = false; } @@ -906,7 +906,7 @@ static void lpc17_rxdone_process(struct lpc17_driver_s *priv) #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); NETDEV_RXIPV4(&priv->lp_dev); /* Handle ARP on input then give the IPv4 packet to the @@ -948,7 +948,7 @@ static void lpc17_rxdone_process(struct lpc17_driver_s *priv) #ifdef CONFIG_NET_IPv6 if (BUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); NETDEV_RXIPV6(&priv->lp_dev); /* Give the IPv6 packet to the network layer */ @@ -1202,13 +1202,13 @@ static int lpc17_interrupt(int irq, void *context) { if ((status & ETH_INT_RXOVR) != 0) { - nlldbg("RX Overrun. status: %08x\n", status); + nerr("ERROR: RX Overrun. status: %08x\n", status); NETDEV_RXERRORS(&priv->lp_dev); } if ((status & ETH_INT_TXUNR) != 0) { - nlldbg("TX Underrun. status: %08x\n", status); + nerr("ERROR: TX Underrun. status: %08x\n", status); NETDEV_TXERRORS(&priv->lp_dev); } @@ -1229,7 +1229,7 @@ static int lpc17_interrupt(int irq, void *context) if ((status & ETH_INT_RXERR) != 0) { - nlldbg("RX Error. status: %08x\n", status); + nerr("ERROR: RX ERROR: status: %08x\n", status); NETDEV_RXERRORS(&priv->lp_dev); } @@ -1281,7 +1281,7 @@ static int lpc17_interrupt(int irq, void *context) if ((status & ETH_INT_TXERR) != 0) { - nlldbg("TX Error. status: %08x\n", status); + nerr("ERROR: TX ERROR: status: %08x\n", status); NETDEV_TXERRORS(&priv->lp_dev); } @@ -1671,7 +1671,7 @@ static void lpc17_ipv6multicast(FAR struct lpc17_driver_s *priv) mac[4] = tmp16 & 0xff; mac[5] = tmp16 >> 8; - nvdbg("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", + ninfo("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); (void)lpc17_addmac(dev, mac); @@ -1720,9 +1720,9 @@ static int lpc17_ifup(struct net_driver_s *dev) uint32_t regval; int ret; - ndbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); /* Reset the Ethernet controller (again) */ @@ -1733,7 +1733,7 @@ static int lpc17_ifup(struct net_driver_s *dev) ret = lpc17_phyinit(priv); if (ret != 0) { - ndbg("lpc17_phyinit failed: %d\n", ret); + nerr("ERROR: lpc17_phyinit failed: %d\n", ret); return ret; } @@ -2145,8 +2145,8 @@ static int lpc17_addmac(struct net_driver_s *dev, const uint8_t *mac) uint32_t crc; unsigned int ndx; - nllvdbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); /* Hash function: * @@ -2221,8 +2221,8 @@ static int lpc17_rmmac(struct net_driver_s *dev, const uint8_t *mac) uint32_t crc; unsigned int ndx; - nllvdbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); /* Hash function: * @@ -2292,7 +2292,7 @@ static int lpc17_rmmac(struct net_driver_s *dev, const uint8_t *mac) * ****************************************************************************/ -#if defined(CONFIG_NET_REGDEBUG) && defined(CONFIG_DEBUG_GPIO) +#if defined(CONFIG_LPC17_NET_REGDEBUG) && defined(CONFIG_DEBUG_GPIO_INFO) static void lpc17_showpins(void) { lpc17_dumpgpio(GPIO_PORT1 | GPIO_PIN0, "P1[1-15]"); @@ -2316,17 +2316,17 @@ static void lpc17_showpins(void) * ****************************************************************************/ -#if defined(CONFIG_NET_REGDEBUG) && defined(LPC17_HAVE_PHY) +#if defined(CONFIG_LPC17_NET_REGDEBUG) && defined(LPC17_HAVE_PHY) static void lpc17_showmii(uint8_t phyaddr, const char *msg) { - dbg("PHY " LPC17_PHYNAME ": %s\n", msg); - dbg(" MCR: %04x\n", lpc17_phyread(phyaddr, MII_MCR)); - dbg(" MSR: %04x\n", lpc17_phyread(phyaddr, MII_MSR)); - dbg(" ADVERTISE: %04x\n", lpc17_phyread(phyaddr, MII_ADVERTISE)); - dbg(" LPA: %04x\n", lpc17_phyread(phyaddr, MII_LPA)); - dbg(" EXPANSION: %04x\n", lpc17_phyread(phyaddr, MII_EXPANSION)); + ninfo("PHY " LPC17_PHYNAME ": %s\n", msg); + ninfo(" MCR: %04x\n", lpc17_phyread(phyaddr, MII_MCR)); + ninfo(" MSR: %04x\n", lpc17_phyread(phyaddr, MII_MSR)); + ninfo(" ADVERTISE: %04x\n", lpc17_phyread(phyaddr, MII_ADVERTISE)); + ninfo(" LPA: %04x\n", lpc17_phyread(phyaddr, MII_LPA)); + ninfo(" EXPANSION: %04x\n", lpc17_phyread(phyaddr, MII_EXPANSION)); #ifdef CONFIG_ETH0_PHY_KS8721 - dbg(" 10BTCR: %04x\n", lpc17_phyread(phyaddr, MII_KS8721_10BTCR)); + ninfo(" 10BTCR: %04x\n", lpc17_phyread(phyaddr, MII_KS8721_10BTCR)); #endif } #endif @@ -2462,7 +2462,7 @@ static inline int lpc17_phyreset(uint8_t phyaddr) } } - ndbg("Reset failed. MCR: %04x\n", phyreg); + nerr("ERROR: Reset failed. MCR: %04x\n", phyreg); return -ETIMEDOUT; } #endif @@ -2509,7 +2509,7 @@ static inline int lpc17_phyautoneg(uint8_t phyaddr) } } - ndbg("Auto-negotiation failed. MSR: %04x\n", phyreg); + nerr("ERROR: Auto-negotiation failed. MSR: %04x\n", phyreg); return -ETIMEDOUT; } #endif @@ -2593,7 +2593,7 @@ static int lpc17_phymode(uint8_t phyaddr, uint8_t mode) #endif } - ndbg("Link failed. MSR: %04x\n", phyreg); + nerr("ERROR: Link failed. MSR: %04x\n", phyreg); return -ETIMEDOUT; } #endif @@ -2647,20 +2647,20 @@ static inline int lpc17_phyinit(struct lpc17_driver_s *priv) */ phyreg = (unsigned int)lpc17_phyread(phyaddr, MII_PHYID1); - nvdbg("Addr: %d PHY ID1: %04x\n", phyaddr, phyreg); + ninfo("Addr: %d PHY ID1: %04x\n", phyaddr, phyreg); /* Compare OUI bits 3-18 */ if (phyreg == LPC17_PHYID1) { phyreg = lpc17_phyread(phyaddr, MII_PHYID2); - nvdbg("Addr: %d PHY ID2: %04x\n", phyaddr, phyreg); + ninfo("Addr: %d PHY ID2: %04x\n", phyaddr, phyreg); /* Compare OUI bits 19-24 and the 6-bit model number (ignoring the * 4-bit revision number). */ - if ((phyreg & 0xfff0) == LPC17_PHYID2) + if ((phyreg & 0xfff0) == (LPC17_PHYID2 & 0xfff0)) { break; } @@ -2673,10 +2673,10 @@ static inline int lpc17_phyinit(struct lpc17_driver_s *priv) { /* Failed to find PHY at any location */ - ndbg("No PHY detected\n"); + nerr("ERROR: No PHY detected\n"); return -ENODEV; } - nvdbg("phyaddr: %d\n", phyaddr); + ninfo("phyaddr: %d\n", phyaddr); /* Save the discovered PHY device address */ @@ -2760,7 +2760,7 @@ static inline int lpc17_phyinit(struct lpc17_driver_s *priv) break; default: - ndbg("Unrecognized mode: %04x\n", phyreg); + nerr("ERROR: Unrecognized mode: %04x\n", phyreg); return -ENODEV; } @@ -2788,7 +2788,7 @@ static inline int lpc17_phyinit(struct lpc17_driver_s *priv) break; default: - ndbg("Unrecognized mode: %04x\n", phyreg); + nerr("ERROR: Unrecognized mode: %04x\n", phyreg); return -ENODEV; } @@ -2816,7 +2816,7 @@ static inline int lpc17_phyinit(struct lpc17_driver_s *priv) break; default: - ndbg("Unrecognized mode: %04x\n", phyreg); + nerr("ERROR: Unrecognized mode: %04x\n", phyreg); return -ENODEV; } @@ -2862,7 +2862,7 @@ static inline int lpc17_phyinit(struct lpc17_driver_s *priv) } else { - ndbg("Unrecognized mode: %04x\n", phyreg); + nerr("ERROR: Unrecognized mode: %04x\n", phyreg); return -ENODEV; } } @@ -2871,9 +2871,9 @@ static inline int lpc17_phyinit(struct lpc17_driver_s *priv) # warning "PHY Unknown: speed and duplex are bogus" #endif - ndbg("%dBase-T %s duplex\n", - (priv->lp_mode & LPC17_SPEED_MASK) == LPC17_SPEED_100 ? 100 : 10, - (priv->lp_mode & LPC17_DUPLEX_MASK) == LPC17_DUPLEX_FULL ?"full" : "half"); + ninfo("%dBase-T %s duplex\n", + (priv->lp_mode & LPC17_SPEED_MASK) == LPC17_SPEED_100 ? 100 : 10, + (priv->lp_mode & LPC17_DUPLEX_MASK) == LPC17_DUPLEX_FULL ?"full" : "half"); /* Disable auto-configuration. Set the fixed speed/duplex mode. * (probably more than little redundant). diff --git a/arch/arm/src/lpc17xx/lpc17_gpdma.c b/arch/arm/src/lpc17xx/lpc17_gpdma.c index 4a93267718d60943963442a9b5722f2aad35327b..2eb2edf16ab125ea0868f5ba8815ee92b5c465f8 100644 --- a/arch/arm/src/lpc17xx/lpc17_gpdma.c +++ b/arch/arm/src/lpc17xx/lpc17_gpdma.c @@ -654,7 +654,7 @@ void lpc17_dmastop(DMA_HANDLE handle) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG__DEBUG_DMA_INFO void lpc17_dmasample(DMA_HANDLE handle, struct lpc17_dmaregs_s *regs) { struct lpc17_dmach_s *dmach = (DMA_HANDLE)handle; @@ -686,7 +686,7 @@ void lpc17_dmasample(DMA_HANDLE handle, struct lpc17_dmaregs_s *regs) regs->ch.control = getreg32(base + LPC17_DMACH_CONTROL_OFFSET); regs->ch.config = getreg32(base + LPC17_DMACH_CONFIG_OFFSET); } -#endif /* CONFIG_DEBUG_DMA */ +#endif /* CONFIG__DEBUG_DMA_INFO */ /**************************************************************************** * Name: lpc17_dmadump @@ -696,7 +696,7 @@ void lpc17_dmasample(DMA_HANDLE handle, struct lpc17_dmaregs_s *regs) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG__DEBUG_DMA_INFO void lpc17_dmadump(DMA_HANDLE handle, const struct lpc17_dmaregs_s *regs, const char *msg) { @@ -707,49 +707,49 @@ void lpc17_dmadump(DMA_HANDLE handle, const struct lpc17_dmaregs_s *regs, /* Dump the sampled global DMA registers */ - dmadbg("Global GPDMA Registers: %s\n", msg); - dmadbg(" INTST[%08x]: %08x\n", - LPC17_DMA_INTST, regs->gbl.intst); - dmadbg(" INTTCST[%08x]: %08x\n", - LPC17_DMA_INTTCST, regs->gbl.inttcst); - dmadbg(" INTERRST[%08x]: %08x\n", - LPC17_DMA_INTERRST, regs->gbl.interrst); - dmadbg(" RAWINTTCST[%08x]: %08x\n", - LPC17_DMA_RAWINTTCST, regs->gbl.rawinttcst); - dmadbg(" RAWINTERRST[%08x]: %08x\n", - LPC17_DMA_RAWINTERRST, regs->gbl.rawinterrst); - dmadbg(" ENBLDCHNS[%08x]: %08x\n", - LPC17_DMA_ENBLDCHNS, regs->gbl.enbldchns); - dmadbg(" SOFTBREQ[%08x]: %08x\n", - LPC17_DMA_SOFTBREQ, regs->gbl.softbreq); - dmadbg(" SOFTSREQ[%08x]: %08x\n", - LPC17_DMA_SOFTSREQ, regs->gbl.softsreq); - dmadbg(" SOFTLBREQ[%08x]: %08x\n", - LPC17_DMA_SOFTLBREQ, regs->gbl.softlbreq); - dmadbg(" SOFTLSREQ[%08x]: %08x\n", - LPC17_DMA_SOFTLSREQ, regs->gbl.softlsreq); - dmadbg(" CONFIG[%08x]: %08x\n", - LPC17_DMA_CONFIG, regs->gbl.config); - dmadbg(" SYNC[%08x]: %08x\n", - LPC17_DMA_SYNC, regs->gbl.sync); + dmainfo("Global GPDMA Registers: %s\n", msg); + dmainfo(" INTST[%08x]: %08x\n", + LPC17_DMA_INTST, regs->gbl.intst); + dmainfo(" INTTCST[%08x]: %08x\n", + LPC17_DMA_INTTCST, regs->gbl.inttcst); + dmainfo(" INTERRST[%08x]: %08x\n", + LPC17_DMA_INTERRST, regs->gbl.interrst); + dmainfo(" RAWINTTCST[%08x]: %08x\n", + LPC17_DMA_RAWINTTCST, regs->gbl.rawinttcst); + dmainfo(" RAWINTERRST[%08x]: %08x\n", + LPC17_DMA_RAWINTERRST, regs->gbl.rawinterrst); + dmainfo(" ENBLDCHNS[%08x]: %08x\n", + LPC17_DMA_ENBLDCHNS, regs->gbl.enbldchns); + dmainfo(" SOFTBREQ[%08x]: %08x\n", + LPC17_DMA_SOFTBREQ, regs->gbl.softbreq); + dmainfo(" SOFTSREQ[%08x]: %08x\n", + LPC17_DMA_SOFTSREQ, regs->gbl.softsreq); + dmainfo(" SOFTLBREQ[%08x]: %08x\n", + LPC17_DMA_SOFTLBREQ, regs->gbl.softlbreq); + dmainfo(" SOFTLSREQ[%08x]: %08x\n", + LPC17_DMA_SOFTLSREQ, regs->gbl.softlsreq); + dmainfo(" CONFIG[%08x]: %08x\n", + LPC17_DMA_CONFIG, regs->gbl.config); + dmainfo(" SYNC[%08x]: %08x\n", + LPC17_DMA_SYNC, regs->gbl.sync); /* Dump the DMA channel registers */ base = LPC17_DMACH_BASE((uint32_t)dmach->chn); - dmadbg("Channel GPDMA Registers: %d\n", dmach->chn); - - dmadbg(" SRCADDR[%08x]: %08x\n", - base + LPC17_DMACH_SRCADDR_OFFSET, regs->ch.srcaddr); - dmadbg(" DESTADDR[%08x]: %08x\n", - base + LPC17_DMACH_DESTADDR_OFFSET, regs->ch.destaddr); - dmadbg(" LLI[%08x]: %08x\n", - base + LPC17_DMACH_LLI_OFFSET, regs->ch.lli); - dmadbg(" CONTROL[%08x]: %08x\n", - base + LPC17_DMACH_CONTROL_OFFSET, regs->ch.control); - dmadbg(" CONFIG[%08x]: %08x\n", - base + LPC17_DMACH_CONFIG_OFFSET, regs->ch.config); + dmainfo("Channel GPDMA Registers: %d\n", dmach->chn); + + dmainfo(" SRCADDR[%08x]: %08x\n", + base + LPC17_DMACH_SRCADDR_OFFSET, regs->ch.srcaddr); + dmainfo(" DESTADDR[%08x]: %08x\n", + base + LPC17_DMACH_DESTADDR_OFFSET, regs->ch.destaddr); + dmainfo(" LLI[%08x]: %08x\n", + base + LPC17_DMACH_LLI_OFFSET, regs->ch.lli); + dmainfo(" CONTROL[%08x]: %08x\n", + base + LPC17_DMACH_CONTROL_OFFSET, regs->ch.control); + dmainfo(" CONFIG[%08x]: %08x\n", + base + LPC17_DMACH_CONFIG_OFFSET, regs->ch.config); } -#endif /* CONFIG_DEBUG_DMA */ +#endif /* CONFIG__DEBUG_DMA_INFO */ #endif /* CONFIG_LPC17_GPDMA */ diff --git a/arch/arm/src/lpc17xx/lpc17_gpdma.h b/arch/arm/src/lpc17xx/lpc17_gpdma.h index 4e1e499eb1c5e220e6083f40fe011e703c840ab1..a7c0d7009ccbdef0d522665bd9540cf6e3f25091 100644 --- a/arch/arm/src/lpc17xx/lpc17_gpdma.h +++ b/arch/arm/src/lpc17xx/lpc17_gpdma.h @@ -68,7 +68,7 @@ typedef void (*dma_callback_t)(DMA_HANDLE handle, void *arg, int result); /* The following is used for sampling DMA registers when CONFIG DEBUG_DMA is selected */ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG__DEBUG_DMA_INFO struct lpc17_dmaglobalregs_s { /* Global Registers */ @@ -109,7 +109,7 @@ struct lpc17_dmaregs_s struct lpc17_dmachanregs_s ch; }; -#endif /* CONFIG_DEBUG_DMA */ +#endif /* CONFIG__DEBUG_DMA_INFO */ /**************************************************************************** * Public Data @@ -239,7 +239,7 @@ void lpc17_dmastop(DMA_HANDLE handle); * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG__DEBUG_DMA_INFO void lpc17_dmasample(DMA_HANDLE handle, struct lpc17_dmaregs_s *regs); #else # define lpc17_dmasample(handle,regs) @@ -253,7 +253,7 @@ void lpc17_dmasample(DMA_HANDLE handle, struct lpc17_dmaregs_s *regs); * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG__DEBUG_DMA_INFO void lpc17_dmadump(DMA_HANDLE handle, const struct lpc17_dmaregs_s *regs, const char *msg); #else diff --git a/arch/arm/src/lpc17xx/lpc17_gpio.h b/arch/arm/src/lpc17xx/lpc17_gpio.h index e8ec13378992886ae53292bf0862d14e27274d23..1129a26235d02e5ce638b5a5be5bcaa56bbdace0 100644 --- a/arch/arm/src/lpc17xx/lpc17_gpio.h +++ b/arch/arm/src/lpc17xx/lpc17_gpio.h @@ -181,7 +181,7 @@ void lpc17_gpioirqdisable(int irq); * ************************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO int lpc17_dumpgpio(lpc17_pinset_t pinset, const char *msg); #else # define lpc17_dumpgpio(p,m) diff --git a/arch/arm/src/lpc17xx/lpc17_gpiodbg.c b/arch/arm/src/lpc17xx/lpc17_gpiodbg.c index fc6ce33162bee1d163bfc36700c33bd38b848b74..00d0f8fade2c8fc1ad70203fcadbe6ad9754944f 100644 --- a/arch/arm/src/lpc17xx/lpc17_gpiodbg.c +++ b/arch/arm/src/lpc17xx/lpc17_gpiodbg.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/lpc17xx/lpc17_gpiodbg.c * - * Copyright (C) 2010-2011, 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2010-2011, 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -39,6 +39,11 @@ #include +/* Output debug info even if debug output is not selected. */ + +#undef CONFIG_DEBUG_INFO +#define CONFIG_DEBUG_INFO 1 + #include #include #include @@ -49,23 +54,7 @@ #include "chip.h" #include "lpc17_gpio.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_GPIO -#endif - -#ifdef CONFIG_DEBUG_GPIO - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ +#ifdef CONFIG_DEBUG_GPIO_INFO /**************************************************************************** * Private Functions @@ -157,34 +146,36 @@ int lpc17_dumpgpio(lpc17_pinset_t pinset, const char *msg) /* The following requires exclusive access to the GPIO registers */ flags = enter_critical_section(); - lldbg("GPIO%c pin%d (pinset: %08x) -- %s\n", - port + '0', pin, pinset, msg); + + gpioinfo("GPIO%c pin%d (pinset: %08x) -- %s\n", + port + '0', pin, pinset, msg); #if defined(LPC176x) - lldbg(" PINSEL[%08x]: %08x PINMODE[%08x]: %08x ODMODE[%08x]: %08x\n", - pinsel, pinsel ? getreg32(pinsel) : 0, - pinmode, pinmode ? getreg32(pinmode) : 0, - g_odmode[port], getreg32(g_odmode[port])); + gpioinfo(" PINSEL[%08x]: %08x PINMODE[%08x]: %08x ODMODE[%08x]: %08x\n", + pinsel, pinsel ? getreg32(pinsel) : 0, + pinmode, pinmode ? getreg32(pinmode) : 0, + g_odmode[port], getreg32(g_odmode[port])); #elif defined(LPC178x) - lldbg(" IOCON[%08x]: %08x\n", iocon, getreg32(iocon)); + gpioinfo(" IOCON[%08x]: %08x\n", iocon, getreg32(iocon)); #endif base = g_fiobase[port]; - lldbg(" FIODIR[%08x]: %08x FIOMASK[%08x]: %08x FIOPIN[%08x]: %08x\n", - base+LPC17_FIO_DIR_OFFSET, getreg32(base+LPC17_FIO_DIR_OFFSET), - base+LPC17_FIO_MASK_OFFSET, getreg32(base+LPC17_FIO_MASK_OFFSET), - base+LPC17_FIO_PIN_OFFSET, getreg32(base+LPC17_FIO_PIN_OFFSET)); + gpioinfo(" FIODIR[%08x]: %08x FIOMASK[%08x]: %08x FIOPIN[%08x]: %08x\n", + base+LPC17_FIO_DIR_OFFSET, getreg32(base+LPC17_FIO_DIR_OFFSET), + base+LPC17_FIO_MASK_OFFSET, getreg32(base+LPC17_FIO_MASK_OFFSET), + base+LPC17_FIO_PIN_OFFSET, getreg32(base+LPC17_FIO_PIN_OFFSET)); base = g_intbase[port]; - lldbg(" IOINTSTATUS[%08x]: %08x INTSTATR[%08x]: %08x INSTATF[%08x]: %08x\n", - LPC17_GPIOINT_IOINTSTATUS, getreg32(LPC17_GPIOINT_IOINTSTATUS), - base+LPC17_GPIOINT_INTSTATR_OFFSET, getreg32(base+LPC17_GPIOINT_INTSTATR_OFFSET), - base+LPC17_GPIOINT_INTSTATF_OFFSET, getreg32(base+LPC17_GPIOINT_INTSTATF_OFFSET)); - lldbg(" INTENR[%08x]: %08x INTENF[%08x]: %08x\n", - base+LPC17_GPIOINT_INTENR_OFFSET, getreg32(base+LPC17_GPIOINT_INTENR_OFFSET), - base+LPC17_GPIOINT_INTENF_OFFSET, getreg32(base+LPC17_GPIOINT_INTENF_OFFSET)); + gpioinfo(" IOINTSTATUS[%08x]: %08x INTSTATR[%08x]: %08x INSTATF[%08x]: %08x\n", + LPC17_GPIOINT_IOINTSTATUS, getreg32(LPC17_GPIOINT_IOINTSTATUS), + base+LPC17_GPIOINT_INTSTATR_OFFSET, getreg32(base+LPC17_GPIOINT_INTSTATR_OFFSET), + base+LPC17_GPIOINT_INTSTATF_OFFSET, getreg32(base+LPC17_GPIOINT_INTSTATF_OFFSET)); + gpioinfo(" INTENR[%08x]: %08x INTENF[%08x]: %08x\n", + base+LPC17_GPIOINT_INTENR_OFFSET, getreg32(base+LPC17_GPIOINT_INTENR_OFFSET), + base+LPC17_GPIOINT_INTENF_OFFSET, getreg32(base+LPC17_GPIOINT_INTENF_OFFSET)); + leave_critical_section(flags); return OK; } -#endif /* CONFIG_DEBUG_GPIO */ +#endif /* CONFIG_DEBUG_GPIO_INFO */ diff --git a/arch/arm/src/lpc17xx/lpc17_i2c.c b/arch/arm/src/lpc17xx/lpc17_i2c.c index 9b106fdda4e813e2c237fdb1f4f491befa1fc228..58bb2de8987b5d1218ba1b111eb9267a686578ad 100644 --- a/arch/arm/src/lpc17xx/lpc17_i2c.c +++ b/arch/arm/src/lpc17xx/lpc17_i2c.c @@ -485,7 +485,7 @@ struct i2c_master_s *lpc17_i2cbus_initialize(int port) if (port > 1) { - dbg("lpc I2C Only support 0,1\n"); + i2cerr("ERROR: LPC I2C Only supports ports 0 and 1\n"); return NULL; } diff --git a/arch/arm/src/lpc17xx/lpc17_irq.c b/arch/arm/src/lpc17xx/lpc17_irq.c index d1f72be399a9bdd1a7c93424e19fe7e50eca7ed1..44d149c7342f6eb119a55d60e459e753da58972f 100644 --- a/arch/arm/src/lpc17xx/lpc17_irq.c +++ b/arch/arm/src/lpc17xx/lpc17_irq.c @@ -102,33 +102,35 @@ extern uint32_t _vectors[]; * ****************************************************************************/ -#if defined(CONFIG_DEBUG_IRQ) +#if defined(CONFIG_DEBUG_IRQ_INFO) static void lpc17_dumpnvic(const char *msg, int irq) { irqstate_t flags; flags = enter_critical_section(); - lldbg("NVIC (%s, irq=%d):\n", msg, irq); - lldbg(" INTCTRL: %08x VECTAB: %08x\n", - getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB)); + + irqinfo("NVIC (%s, irq=%d):\n", msg, irq); + irqinfo(" INTCTRL: %08x VECTAB: %08x\n", + getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB)); #if 0 - lldbg(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n", - getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA), - getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE)); + irqinfo(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n", + getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA), + getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE)); #endif - lldbg(" IRQ ENABLE: %08x\n", getreg32(NVIC_IRQ0_31_ENABLE)); - lldbg(" SYSH_PRIO: %08x %08x %08x\n", - getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY), - getreg32(NVIC_SYSH12_15_PRIORITY)); - lldbg(" IRQ PRIO: %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY), - getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY)); - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY), - getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY)); - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY), - getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY)); + irqinfo(" IRQ ENABLE: %08x\n", getreg32(NVIC_IRQ0_31_ENABLE)); + irqinfo(" SYSH_PRIO: %08x %08x %08x\n", + getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY), + getreg32(NVIC_SYSH12_15_PRIORITY)); + irqinfo(" IRQ PRIO: %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY), + getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY), + getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY), + getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY)); + leave_critical_section(flags); } #else @@ -146,11 +148,11 @@ static void lpc17_dumpnvic(const char *msg, int irq) * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES static int lpc17_nmi(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! NMI received\n"); + _err("PANIC!!! NMI received\n"); PANIC(); return 0; } @@ -158,7 +160,7 @@ static int lpc17_nmi(int irq, FAR void *context) static int lpc17_busfault(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Bus fault recived\n"); + _err("PANIC!!! Bus fault recived\n"); PANIC(); return 0; } @@ -166,7 +168,7 @@ static int lpc17_busfault(int irq, FAR void *context) static int lpc17_usagefault(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Usage fault received\n"); + _err("PANIC!!! Usage fault received\n"); PANIC(); return 0; } @@ -174,7 +176,7 @@ static int lpc17_usagefault(int irq, FAR void *context) static int lpc17_pendsv(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! PendSV received\n"); + _err("PANIC!!! PendSV received\n"); PANIC(); return 0; } @@ -182,7 +184,7 @@ static int lpc17_pendsv(int irq, FAR void *context) static int lpc17_dbgmonitor(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Debug Monitor received\n"); + _err("PANIC!!! Debug Monitor received\n"); PANIC(); return 0; } @@ -190,7 +192,7 @@ static int lpc17_dbgmonitor(int irq, FAR void *context) static int lpc17_reserved(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Reserved interrupt\n"); + _err("PANIC!!! Reserved interrupt\n"); PANIC(); return 0; } @@ -392,7 +394,7 @@ void up_irqinitialize(void) /* Attach all other processor exceptions (except reset and sys tick) */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES irq_attach(LPC17_IRQ_NMI, lpc17_nmi); #ifndef CONFIG_ARM_MPU irq_attach(LPC17_IRQ_MEMFAULT, up_memfault); diff --git a/arch/arm/src/lpc17xx/lpc17_lcd.c b/arch/arm/src/lpc17xx/lpc17_lcd.c index 79be36191caab688dfce9ed204fdd0bb85dcfbf6..f8a6c6db6c9d6d6ed72a4759249132c2b9655498 100644 --- a/arch/arm/src/lpc17xx/lpc17_lcd.c +++ b/arch/arm/src/lpc17xx/lpc17_lcd.c @@ -202,14 +202,14 @@ struct fb_vtable_s g_fbobject = static int lpc17_getvideoinfo(FAR struct fb_vtable_s *vtable, FAR struct fb_videoinfo_s *vinfo) { - gvdbg("vtable=%p vinfo=%p\n", vtable, vinfo); + lcdinfo("vtable=%p vinfo=%p\n", vtable, vinfo); if (vtable && vinfo) { memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s)); return OK; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -220,14 +220,14 @@ static int lpc17_getvideoinfo(FAR struct fb_vtable_s *vtable, static int lpc17_getplaneinfo(FAR struct fb_vtable_s *vtable, int planeno, FAR struct fb_planeinfo_s *pinfo) { - gvdbg("vtable=%p planeno=%d pinfo=%p\n", vtable, planeno, pinfo); + lcdinfo("vtable=%p planeno=%d pinfo=%p\n", vtable, planeno, pinfo); if (vtable && planeno == 0 && pinfo) { memcpy(pinfo, &g_planeinfo, sizeof(struct fb_planeinfo_s)); return OK; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -244,8 +244,8 @@ static int lpc17_getcmap(FAR struct fb_vtable_s *vtable, int last; int i; - gvdbg("vtable=%p cmap=%p first=%d len=%d\n", - vtable, cmap, cmap->first, cmap->len); + lcdinfo("vtable=%p cmap=%p first=%d len=%d\n", + vtable, cmap, cmap->first, cmap->len); DEBUGASSERT(vtable && cmap && cmap->first < 256 && (cmap->first + cmap->len) < 256); @@ -319,8 +319,8 @@ static int lpc17_putcmap(FAR struct fb_vtable_s *vtable, int last; int i; - gvdbg("vtable=%p cmap=%p first=%d len=%d\n", - vtable, cmap, cmap->first, cmap->len); + lcdinfo("vtable=%p cmap=%p first=%d len=%d\n", + vtable, cmap, cmap->first, cmap->len); DEBUGASSERT(vtable && cmap); @@ -383,27 +383,27 @@ static int lpc17_putcmap(FAR struct fb_vtable_s *vtable, static int lpc17_getcursor(FAR struct fb_vtable_s *vtable, FAR struct fb_cursorattrib_s *attrib) { - gvdbg("vtable=%p attrib=%p\n", vtable, attrib); + lcdinfo("vtable=%p attrib=%p\n", vtable, attrib); if (vtable && attrib) { #ifdef CONFIG_FB_HWCURSORIMAGE attrib->fmt = LPC17_COLOR_FMT; #endif - gvdbg("pos: (x=%d, y=%d)\n", g_cpos.x, g_cpos.y); + lcdinfo("pos: (x=%d, y=%d)\n", g_cpos.x, g_cpos.y); attrib->pos = g_cpos; #ifdef CONFIG_FB_HWCURSORSIZE attrib->mxsize.h = CONFIG_LPC17_LCD_VHEIGHT; attrib->mxsize.w = CONFIG_LPC17_LCD_HWIDTH; - gvdbg("size: (h=%d, w=%d)\n", g_csize.h, g_csize.w); + lcdinfo("size: (h=%d, w=%d)\n", g_csize.h, g_csize.w); attrib->size = g_csize; #endif return OK; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } #endif @@ -416,34 +416,34 @@ static int lpc17_getcursor(FAR struct fb_vtable_s *vtable, static int lpc17_setcursor(FAR struct fb_vtable_s *vtable, FAR struct fb_setcursor_s *setttings) { - gvdbg("vtable=%p setttings=%p\n", vtable, setttings); + lcdinfo("vtable=%p setttings=%p\n", vtable, setttings); if (vtable && setttings) { - gvdbg("flags: %02x\n", settings->flags); + lcdinfo("flags: %02x\n", settings->flags); if ((flags & FB_CUR_SETPOSITION) != 0) { g_cpos = settings->pos; - gvdbg("pos: (h:%d, w:%d)\n", g_cpos.x, g_cpos.y); + lcdinfo("pos: (h:%d, w:%d)\n", g_cpos.x, g_cpos.y); } #ifdef CONFIG_FB_HWCURSORSIZE if ((flags & FB_CUR_SETSIZE) != 0) { g_csize = settings->size; - gvdbg("size: (h:%d, w:%d)\n", g_csize.h, g_csize.w); + lcdinfo("size: (h:%d, w:%d)\n", g_csize.h, g_csize.w); } #endif #ifdef CONFIG_FB_HWCURSORIMAGE if ((flags & FB_CUR_SETIMAGE) != 0) { - gvdbg("image: (h:%d, w:%d) @ %p\n", - settings->img.height, settings->img.width, - settings->img.image); + lcdinfo("image: (h:%d, w:%d) @ %p\n", + settings->img.height, settings->img.width, + settings->img.image); } #endif return OK; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } #endif @@ -473,7 +473,7 @@ int up_fbinitialize(int display) uint32_t regval; int i; - gvdbg("Entry\n"); + lcdinfo("Entry\n"); /* Give LCD bus priority */ @@ -485,7 +485,7 @@ int up_fbinitialize(int display) /* Configure pins */ /* Video data */ - gvdbg("Configuring pins\n"); + lcdinfo("Configuring pins\n"); lpc17_configgpio(GPIO_LCD_VD0); lpc17_configgpio(GPIO_LCD_VD1); @@ -528,7 +528,7 @@ int up_fbinitialize(int display) modifyreg32(LPC17_SYSCON_PCONP, 0, SYSCON_PCONP_PCLCD); - gvdbg("Configuring the LCD controller\n"); + lcdinfo("Configuring the LCD controller\n"); /* Disable the cursor */ @@ -686,7 +686,7 @@ int up_fbinitialize(int display) #endif putreg32(0, LPC17_LCD_INTMSK); - gvdbg("Enabling the display\n"); + lcdinfo("Enabling the display\n"); for (i = LPC17_LCD_PWREN_DELAY; i; i--); @@ -727,7 +727,7 @@ int up_fbinitialize(int display) FAR struct fb_vtable_s *up_fbgetvplane(int display, int vplane) { - gvdbg("vplane: %d\n", vplane); + lcdinfo("vplane: %d\n", vplane); if (vplane == 0) { return &g_fbobject; @@ -801,16 +801,16 @@ void lpc17_lcdclear(nxgl_mxpixel_t color) #if LPC17_BPP > 16 uint32_t *dest = (uint32_t *)CONFIG_LPC17_LCD_VRAMBASE; - gvdbg("Clearing display: color=%08x VRAM=%08x size=%d\n", - color, CONFIG_LPC17_LCD_VRAMBASE, - CONFIG_LPC17_LCD_HWIDTH * CONFIG_LPC17_LCD_VHEIGHT * sizeof(uint32_t)); + lcdinfo("Clearing display: color=%08x VRAM=%08x size=%d\n", + color, CONFIG_LPC17_LCD_VRAMBASE, + CONFIG_LPC17_LCD_HWIDTH * CONFIG_LPC17_LCD_VHEIGHT * sizeof(uint32_t)); #else uint16_t *dest = (uint16_t *)CONFIG_LPC17_LCD_VRAMBASE; - gvdbg("Clearing display: color=%08x VRAM=%08x size=%d\n", - color, CONFIG_LPC17_LCD_VRAMBASE, - CONFIG_LPC17_LCD_HWIDTH * CONFIG_LPC17_LCD_VHEIGHT * sizeof(uint16_t)); + lcdinfo("Clearing display: color=%08x VRAM=%08x size=%d\n", + color, CONFIG_LPC17_LCD_VRAMBASE, + CONFIG_LPC17_LCD_HWIDTH * CONFIG_LPC17_LCD_VHEIGHT * sizeof(uint16_t)); #endif for (i = 0; i < (CONFIG_LPC17_LCD_HWIDTH * CONFIG_LPC17_LCD_VHEIGHT); i++) diff --git a/arch/arm/src/lpc17xx/lpc17_mcpwm.c b/arch/arm/src/lpc17xx/lpc17_mcpwm.c index f8d552941b04a34992b0d2a9898ad0c1b16b08f0..be526964c4a2356a98938a7a4cb107029ef3a750 100644 --- a/arch/arm/src/lpc17xx/lpc17_mcpwm.c +++ b/arch/arm/src/lpc17xx/lpc17_mcpwm.c @@ -81,29 +81,10 @@ #define TIMTYPE_TIM1 TIMTYPE_ADVANCED /* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing PWM */ -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_PWM -#endif - -#ifdef CONFIG_DEBUG_PWM -# define pwmdbg dbg -# define pwmlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define pwmvdbg vdbg -# define pwmllvdbg llvdbg -# define pwm_dumpgpio(p,m) stm32_dumpgpio(p,m) -# else -# define pwmlldbg(x...) -# define pwmllvdbg(x...) -# define pwm_dumpgpio(p,m) -# endif +#ifdef CONFIG_DEBUG_PWM_INFO +# define pwm_dumpgpio(p,m) stm32_dumpgpio(p,m) #else -# define pwmdbg(x...) -# define pwmlldbg(x...) -# define pwmvdbg(x...) -# define pwmllvdbg(x...) # define pwm_dumpgpio(p,m) #endif @@ -132,7 +113,7 @@ struct lpc17_mcpwmtimer_s static uint32_t mcpwm_getreg(struct lpc17_mcpwmtimer_s *priv, int offset); static void mcpwm_putreg(struct lpc17_mcpwmtimer_s *priv, int offset, uint32_t value); -#if defined(CONFIG_DEBUG_PWM) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_PWM_INFO static void mcpwm_dumpregs(struct lpc17_mcpwmtimer_s *priv, FAR const char *msg); #else # define mcpwm_dumpregs(priv,msg) @@ -242,12 +223,12 @@ static void mcpwm_putreg(struct lpc17_mcpwmtimer_s *priv, int offset, uint32_t v * ****************************************************************************/ -#if defined(CONFIG_DEBUG_PWM) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_PWM_INFO static void mcpwm_dumpregs(FAR struct lpc17_mcpwmtimer_s *priv, FAR const char *msg) { - pwmvdbg("%s:\n", msg); - pwmvdbg(" CR1: %04x CR2: %04x SMCR: %04x DIER: %04x\n", + pwminfo("%s:\n", msg); + pwminfo(" CR1: %04x CR2: %04x SMCR: %04x DIER: %04x\n", mcpwm_getreg(priv, LPC17_PWM_MR0_OFFSET), mcpwm_getreg(priv, LPC17_PWM_MR1_OFFSET), mcpwm_getreg(priv, LPC17_PWM_MR2_OFFSET), @@ -255,7 +236,7 @@ static void mcpwm_dumpregs(FAR struct lpc17_mcpwmtimer_s *priv, #if defined(CONFIG_LPC17_MCPWM) if (priv->timtype == TIMTYPE_ADVANCED) { - pwmvdbg(" RCR: %04x BDTR: %04x DCR: %04x DMAR: %04x\n", + pwminfo(" RCR: %04x BDTR: %04x DCR: %04x DMAR: %04x\n", mcpwm_getreg(priv, LPC17_PWM_MR0_OFFSET), mcpwm_getreg(priv, LPC17_PWM_MR1_OFFSET), mcpwm_getreg(priv, LPC17_PWM_MR2_OFFSET), @@ -264,7 +245,7 @@ static void mcpwm_dumpregs(FAR struct lpc17_mcpwmtimer_s *priv, else #endif { - pwmvdbg(" DCR: %04x DMAR: %04x\n", + pwminfo(" DCR: %04x DMAR: %04x\n", mcpwm_getreg(priv, LPC17_PWM_MR2_OFFSET), mcpwm_getreg(priv, LPC17_PWM_MR3_OFFSET)); } @@ -520,7 +501,7 @@ static int mcpwm_shutdown(FAR struct pwm_lowerhalf_s *dev) FAR struct lpc17_mcpwmtimer_s *priv = (FAR struct lpc17_mcpwmtimer_s *)dev; uint32_t pincfg; - pwmvdbg("TIM%d pincfg: %08x\n", priv->timid, priv->pincfg); + pwminfo("TIM%d pincfg: %08x\n", priv->timid, priv->pincfg); /* Make sure that the output has been stopped */ @@ -576,7 +557,7 @@ static int mcpwm_stop(FAR struct pwm_lowerhalf_s *dev) uint32_t regval; irqstate_t flags; - pwmvdbg("TIM%d\n", priv->timid); + pwminfo("TIM%d\n", priv->timid); /* Disable interrupts momentary to stop any ongoing timer processing and * to prevent any concurrent access to the reset register. @@ -602,7 +583,7 @@ static int mcpwm_stop(FAR struct pwm_lowerhalf_s *dev) leave_critical_section(flags); - pwmvdbg("regaddr: %08x resetbit: %08x\n", regaddr, resetbit); + pwminfo("regaddr: %08x resetbit: %08x\n", regaddr, resetbit); mcpwm_dumpregs(priv, "After stop"); return OK; } @@ -625,12 +606,12 @@ static int mcpwm_stop(FAR struct pwm_lowerhalf_s *dev) static int mcpwm_ioctl(FAR struct pwm_lowerhalf_s *dev, int cmd, unsigned long arg) { -#ifdef CONFIG_DEBUG_PWM +#ifdef CONFIG_DEBUG_PWM_INFO FAR struct lpc17_mcpwmtimer_s *priv = (FAR struct lpc17_mcpwmtimer_s *)dev; /* There are no platform-specific ioctl commands */ - pwmvdbg("TIM%d\n", priv->timid); + pwminfo("TIM%d\n", priv->timid); #endif return -ENOTTY; } @@ -660,7 +641,7 @@ FAR struct pwm_lowerhalf_s *lpc17_mcpwminitialize(int timer) { FAR struct lpc17_mcpwmtimer_s *lower; - pwmvdbg("TIM%d\n", timer); + pwminfo("TIM%d\n", timer); switch (timer) { @@ -674,7 +655,7 @@ FAR struct pwm_lowerhalf_s *lpc17_mcpwminitialize(int timer) #endif default: - pwmdbg("No such timer configured\n"); + pwmerr("ERROR: No such timer configured\n"); return NULL; } diff --git a/arch/arm/src/lpc17xx/lpc17_pwm.c b/arch/arm/src/lpc17xx/lpc17_pwm.c index 4f8c79315c607a6735ed60a78c710389a909f2fb..dc073fc1a73dc36b943e0256eacf61bd42719888 100644 --- a/arch/arm/src/lpc17xx/lpc17_pwm.c +++ b/arch/arm/src/lpc17xx/lpc17_pwm.c @@ -99,29 +99,10 @@ #define TCR_PWM_EN (0x00000008) /* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing PWM */ -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_PWM -#endif - -#ifdef CONFIG_DEBUG_PWM -# define pwmdbg dbg -# define pwmlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define pwmvdbg vdbg -# define pwmllvdbg llvdbg -# define pwm_dumpgpio(p,m) stm32_dumpgpio(p,m) -# else -# define pwmlldbg(x...) -# define pwmllvdbg(x...) -# define pwm_dumpgpio(p,m) -# endif +#ifdef CONFIG_DEBUG_PWM_INFO +# define pwm_dumpgpio(p,m) stm32_dumpgpio(p,m) #else -# define pwmdbg(x...) -# define pwmlldbg(x...) -# define pwmvdbg(x...) -# define pwmllvdbg(x...) # define pwm_dumpgpio(p,m) #endif @@ -150,7 +131,7 @@ struct lpc17_pwmtimer_s static uint32_t pwm_getreg(struct lpc17_pwmtimer_s *priv, int offset); static void pwm_putreg(struct lpc17_pwmtimer_s *priv, int offset, uint32_t value); -#if defined(CONFIG_DEBUG_PWM) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_PWM_INFO static void pwm_dumpregs(struct lpc17_pwmtimer_s *priv, FAR const char *msg); #else # define pwm_dumpregs(priv,msg) @@ -258,11 +239,11 @@ static void pwm_putreg(struct lpc17_pwmtimer_s *priv, int offset, uint32_t value * ****************************************************************************/ -#if defined(CONFIG_DEBUG_PWM) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_PWM_INFO static void pwm_dumpregs(struct lpc17_pwmtimer_s *priv, FAR const char *msg) { - pwmvdbg("%s:\n", msg); - pwmvdbg(" CR1: %04x CR2: %04x SMCR: %04x DIER: %04x\n", + pwminfo("%s:\n", msg); + pwminfo(" CR1: %04x CR2: %04x SMCR: %04x DIER: %04x\n", pwm_getreg(priv, LPC17_PWM_MR0_OFFSET), pwm_getreg(priv, LPC17_PWM_MR1_OFFSET), pwm_getreg(priv, LPC17_PWM_MR2_OFFSET), @@ -270,7 +251,7 @@ static void pwm_dumpregs(struct lpc17_pwmtimer_s *priv, FAR const char *msg) #if defined(CONFIG_LPC17_PWM1) if (priv->timtype == TIMTYPE_ADVANCED) { - pwmvdbg(" RCR: %04x BDTR: %04x DCR: %04x DMAR: %04x\n", + pwminfo(" RCR: %04x BDTR: %04x DCR: %04x DMAR: %04x\n", pwm_getreg(priv, LPC17_PWM_MR0_OFFSET), pwm_getreg(priv, LPC17_PWM_MR1_OFFSET), pwm_getreg(priv, LPC17_PWM_MR2_OFFSET), @@ -279,7 +260,7 @@ static void pwm_dumpregs(struct lpc17_pwmtimer_s *priv, FAR const char *msg) else #endif { - pwmvdbg(" DCR: %04x DMAR: %04x\n", + pwminfo(" DCR: %04x DMAR: %04x\n", pwm_getreg(priv, LPC17_PWM_MR2_OFFSET), pwm_getreg(priv, LPC17_PWM_MR3_OFFSET)); } @@ -491,7 +472,7 @@ static int pwm_shutdown(FAR struct pwm_lowerhalf_s *dev) FAR struct lpc17_pwmtimer_s *priv = (FAR struct lpc17_pwmtimer_s *)dev; uint32_t pincfg; - pwmvdbg("TIM%d pincfg: %08x\n", priv->timid, priv->pincfg); + pwminfo("TIM%d pincfg: %08x\n", priv->timid, priv->pincfg); /* Make sure that the output has been stopped */ @@ -547,7 +528,7 @@ static int pwm_stop(FAR struct pwm_lowerhalf_s *dev) uint32_t regval; irqstate_t flags; - pwmvdbg("TIM%d\n", priv->timid); + pwminfo("TIM%d\n", priv->timid); /* Disable interrupts momentary to stop any ongoing timer processing and * to prevent any concurrent access to the reset register. @@ -573,7 +554,7 @@ static int pwm_stop(FAR struct pwm_lowerhalf_s *dev) leave_critical_section(flags); - pwmvdbg("regaddr: %08x resetbit: %08x\n", regaddr, resetbit); + pwminfo("regaddr: %08x resetbit: %08x\n", regaddr, resetbit); pwm_dumpregs(priv, "After stop"); return OK; } @@ -596,12 +577,12 @@ static int pwm_stop(FAR struct pwm_lowerhalf_s *dev) static int pwm_ioctl(FAR struct pwm_lowerhalf_s *dev, int cmd, unsigned long arg) { -#ifdef CONFIG_DEBUG_PWM +#ifdef CONFIG_DEBUG_PWM_INFO FAR struct lpc17_pwmtimer_s *priv = (FAR struct lpc17_pwmtimer_s *)dev; /* There are no platform-specific ioctl commands */ - pwmvdbg("TIM%d\n", priv->timid); + pwminfo("TIM%d\n", priv->timid); #endif return -ENOTTY; } @@ -631,7 +612,7 @@ FAR struct pwm_lowerhalf_s *lpc17_pwminitialize(int timer) { FAR struct lpc17_pwmtimer_s *lower; - pwmvdbg("TIM%d\n", timer); + pwminfo("TIM%d\n", timer); switch (timer) { @@ -645,7 +626,7 @@ FAR struct pwm_lowerhalf_s *lpc17_pwminitialize(int timer) #endif default: - pwmdbg("No such timer configured\n"); + pwmerr("ERROR: No such timer configured\n"); return NULL; } diff --git a/arch/arm/src/lpc17xx/lpc17_sdcard.c b/arch/arm/src/lpc17xx/lpc17_sdcard.c index e6cb9fafd7e117537fe3b192aa14db5255c3601b..2ea6c17c45cc61c68cbd8751f759a36b88c6787a 100644 --- a/arch/arm/src/lpc17xx/lpc17_sdcard.c +++ b/arch/arm/src/lpc17xx/lpc17_sdcard.c @@ -93,8 +93,8 @@ * CONFIG_SDIO_WIDTH_D1_ONLY - This may be selected to force the driver * operate with only a single data line (the default is to use all * 4 SD data lines). - * CONFIG_DEBUG_SDIO - Enables some very low-level debug output - * This also requires CONFIG_DEBUG_FS and CONFIG_DEBUG_VERBOSE + * CONFIG_DEBUG_MEMCARD_* - Enables some very low-level debug output + * This also requires CONFIG_DEBUG_FS and CONFIG_DEBUG_INFO */ #if defined(CONFIG_SDIO_DMA) && !defined(CONFIG_LPC17_GPDMA) @@ -109,10 +109,6 @@ # error "Callback support requires CONFIG_SCHED_WORKQUEUE" #endif -#if !defined(CONFIG_DEBUG_FS) || !defined(CONFIG_DEBUG) -# undef CONFIG_DEBUG_SDIO -#endif - /* Friendly CLKCR bit re-definitions ****************************************/ /* Mode dependent settings. These depend on clock devisor settings that must @@ -213,7 +209,7 @@ /* Register logging support */ -#ifdef CONFIG_DEBUG_SDIO +#ifdef CONFIG_DEBUG_MEMCARD_INFO # ifdef CONFIG_SDIO_DMA # define SAMPLENDX_BEFORE_SETUP 0 # define SAMPLENDX_BEFORE_ENABLE 1 @@ -274,7 +270,7 @@ struct lpc17_dev_s /* Register logging support */ -#ifdef CONFIG_DEBUG_SDIO +#ifdef CONFIG_DEBUG_MEMCARD_INFO struct lpc17_sdcard_regs_s { uint8_t pwr; @@ -314,7 +310,7 @@ static inline uint32_t lpc17_getpwrctrl(void); /* DMA Helpers **************************************************************/ -#ifdef CONFIG_DEBUG_SDIO +#ifdef CONFIG_DEBUG_MEMCARD_INFO static void lpc17_sampleinit(void); static void lpc17_sdcard_sample(struct lpc17_sdcard_regs_s *regs); static void lpc17_sample(struct lpc17_dev_s *priv, int index); @@ -452,7 +448,7 @@ struct lpc17_dev_s g_scard_dev = /* Register logging support */ -#ifdef CONFIG_DEBUG_SDIO +#ifdef CONFIG_DEBUG_MEMCARD_INFO static struct lpc17_sampleregs_s g_sampleregs[DEBUG_NSAMPLES]; #endif @@ -529,8 +525,8 @@ static inline void lpc17_setclock(uint32_t clkcr) regval |= clkcr; putreg32(regval, LPC17_SDCARD_CLOCK); - fvdbg("CLKCR: %08x PWR: %08x\n", - getreg32(LPC17_SDCARD_CLOCK), getreg32(LPC17_SDCARD_PWR)); + mcinfo("CLKCR: %08x PWR: %08x\n", + getreg32(LPC17_SDCARD_CLOCK), getreg32(LPC17_SDCARD_PWR)); } /**************************************************************************** @@ -659,7 +655,7 @@ static inline uint32_t lpc17_getpwrctrl(void) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_SDIO +#ifdef CONFIG_DEBUG_MEMCARD_INFO static void lpc17_sampleinit(void) { memset(g_sampleregs, 0xff, DEBUG_NSAMPLES * sizeof(struct lpc17_sampleregs_s)); @@ -674,7 +670,7 @@ static void lpc17_sampleinit(void) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_SDIO +#ifdef CONFIG_DEBUG_MEMCARD_INFO static void lpc17_sdcard_sample(struct lpc17_sdcard_regs_s *regs) { regs->pwr = (uint8_t)getreg32(LPC17_SDCARD_PWR); @@ -697,7 +693,7 @@ static void lpc17_sdcard_sample(struct lpc17_sdcard_regs_s *regs) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_SDIO +#ifdef CONFIG_DEBUG_MEMCARD_INFO static void lpc17_sample(struct lpc17_dev_s *priv, int index) { struct lpc17_sampleregs_s *regs = &g_sampleregs[index]; @@ -707,6 +703,7 @@ static void lpc17_sample(struct lpc17_dev_s *priv, int index) lpc17_dmasample(priv->dma, ®s->dma); } #endif + lpc17_sdcard_sample(®s->sdcard); } #endif @@ -719,19 +716,19 @@ static void lpc17_sample(struct lpc17_dev_s *priv, int index) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_SDIO +#ifdef CONFIG_DEBUG_MEMCARD_INFO static void lpc17_sdcard_dump(struct lpc17_sdcard_regs_s *regs, const char *msg) { - fdbg("SD Card Registers: %s\n", msg); - fdbg(" POWER[%08x]: %08x\n", LPC17_SDCARD_PWR, regs->pwr); - fdbg(" CLKCR[%08x]: %08x\n", LPC17_SDCARD_CLOCK, regs->clkcr); - fdbg(" DCTRL[%08x]: %08x\n", LPC17_SDCARD_DCTRL, regs->dctrl); - fdbg(" DTIMER[%08x]: %08x\n", LPC17_SDCARD_DTIMER, regs->dtimer); - fdbg(" DLEN[%08x]: %08x\n", LPC17_SDCARD_DLEN, regs->dlen); - fdbg(" DCOUNT[%08x]: %08x\n", LPC17_SDCARD_DCOUNT, regs->dcount); - fdbg(" STA[%08x]: %08x\n", LPC17_SDCARD_STATUS, regs->sta); - fdbg(" MASK[%08x]: %08x\n", LPC17_SDCARD_MASK0, regs->mask); - fdbg("FIFOCNT[%08x]: %08x\n", LPC17_SDCARD_FIFOCNT, regs->fifocnt); + mcinfo("SD Card Registers: %s\n", msg); + mcinfo(" POWER[%08x]: %08x\n", LPC17_SDCARD_PWR, regs->pwr); + mcinfo(" CLKCR[%08x]: %08x\n", LPC17_SDCARD_CLOCK, regs->clkcr); + mcinfo(" DCTRL[%08x]: %08x\n", LPC17_SDCARD_DCTRL, regs->dctrl); + mcinfo(" DTIMER[%08x]: %08x\n", LPC17_SDCARD_DTIMER, regs->dtimer); + mcinfo(" DLEN[%08x]: %08x\n", LPC17_SDCARD_DLEN, regs->dlen); + mcinfo(" DCOUNT[%08x]: %08x\n", LPC17_SDCARD_DCOUNT, regs->dcount); + mcinfo(" STA[%08x]: %08x\n", LPC17_SDCARD_STATUS, regs->sta); + mcinfo(" MASK[%08x]: %08x\n", LPC17_SDCARD_MASK0, regs->mask); + mcinfo("FIFOCNT[%08x]: %08x\n", LPC17_SDCARD_FIFOCNT, regs->fifocnt); } #endif @@ -743,7 +740,7 @@ static void lpc17_sdcard_dump(struct lpc17_sdcard_regs_s *regs, const char *msg) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_SDIO +#ifdef CONFIG_DEBUG_MEMCARD_INFO static void lpc17_dumpsample(struct lpc17_dev_s *priv, struct lpc17_sampleregs_s *regs, const char *msg) { @@ -765,7 +762,7 @@ static void lpc17_dumpsample(struct lpc17_dev_s *priv, * ****************************************************************************/ -#ifdef CONFIG_DEBUG_SDIO +#ifdef CONFIG_DEBUG_MEMCARD_INFO static void lpc17_dumpsamples(struct lpc17_dev_s *priv) { lpc17_dumpsample(priv, &g_sampleregs[SAMPLENDX_BEFORE_SETUP], "Before setup"); @@ -813,7 +810,7 @@ static void lpc17_dmacallback(DMA_HANDLE handle, void *arg, int status) if (status < 0) { - flldbg("DMA error %d, remaining: %d\n", status, priv->remaining); + dmaerr("ERROR: DMA error %d, remaining: %d\n", status, priv->remaining); result = SDIOWAIT_ERROR; } else @@ -1080,7 +1077,7 @@ static void lpc17_eventtimeout(int argc, uint32_t arg) /* Yes.. wake up any waiting threads */ lpc17_endwait(priv, SDIOWAIT_TIMEOUT); - flldbg("Timeout: remaining: %d\n", priv->remaining); + mcerr("ERROR: Timeout: remaining: %d\n", priv->remaining); } } @@ -1297,7 +1294,7 @@ static int lpc17_interrupt(int irq, void *context) { /* Terminate the transfer with an error */ - flldbg("ERROR: Data block CRC failure, remaining: %d\n", priv->remaining); + mcerr("ERROR: Data block CRC failure, remaining: %d\n", priv->remaining); lpc17_endtransfer(priv, SDIOWAIT_TRANSFERDONE | SDIOWAIT_ERROR); } @@ -1307,7 +1304,7 @@ static int lpc17_interrupt(int irq, void *context) { /* Terminate the transfer with an error */ - flldbg("ERROR: Data timeout, remaining: %d\n", priv->remaining); + mcerr("ERROR: Data timeout, remaining: %d\n", priv->remaining); lpc17_endtransfer(priv, SDIOWAIT_TRANSFERDONE | SDIOWAIT_TIMEOUT); } @@ -1317,7 +1314,7 @@ static int lpc17_interrupt(int irq, void *context) { /* Terminate the transfer with an error */ - flldbg("ERROR: RX FIFO overrun, remaining: %d\n", priv->remaining); + mcerr("ERROR: RX FIFO overrun, remaining: %d\n", priv->remaining); lpc17_endtransfer(priv, SDIOWAIT_TRANSFERDONE | SDIOWAIT_ERROR); } @@ -1327,7 +1324,7 @@ static int lpc17_interrupt(int irq, void *context) { /* Terminate the transfer with an error */ - flldbg("ERROR: TX FIFO underrun, remaining: %d\n", priv->remaining); + mcerr("ERROR: TX FIFO underrun, remaining: %d\n", priv->remaining); lpc17_endtransfer(priv, SDIOWAIT_TRANSFERDONE | SDIOWAIT_ERROR); } @@ -1337,7 +1334,7 @@ static int lpc17_interrupt(int irq, void *context) { /* Terminate the transfer with an error */ - flldbg("ERROR: Start bit, remaining: %d\n", priv->remaining); + mcerr("ERROR: Start bit, remaining: %d\n", priv->remaining); lpc17_endtransfer(priv, SDIOWAIT_TRANSFERDONE | SDIOWAIT_ERROR); } } @@ -1480,8 +1477,8 @@ static void lpc17_reset(FAR struct sdio_dev_s *dev) lpc17_setpwrctrl(SDCARD_PWR_CTRL_ON); leave_critical_section(flags); - fvdbg("CLCKR: %08x POWER: %08x\n", - getreg32(LPC17_SDCARD_CLOCK), getreg32(LPC17_SDCARD_PWR)); + mcinfo("CLCKR: %08x POWER: %08x\n", + getreg32(LPC17_SDCARD_CLOCK), getreg32(LPC17_SDCARD_PWR)); } /**************************************************************************** @@ -1689,7 +1686,7 @@ static int lpc17_sendcmd(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t arg) cmdidx = (cmd & MMCSD_CMDIDX_MASK) >> MMCSD_CMDIDX_SHIFT; regval |= cmdidx | SDCARD_CMD_CPSMEN; - fvdbg("cmd: %08x arg: %08x regval: %08x\n", cmd, arg, regval); + mcinfo("cmd: %08x arg: %08x regval: %08x\n", cmd, arg, regval); /* Write the SD card CMD */ @@ -1920,7 +1917,7 @@ static int lpc17_waitresponse(FAR struct sdio_dev_s *dev, uint32_t cmd) { if (--timeout <= 0) { - fdbg("ERROR: Timeout cmd: %08x events: %08x STA: %08x\n", + mcerr("ERROR: Timeout cmd: %08x events: %08x STA: %08x\n", cmd, events, getreg32(LPC17_SDCARD_STATUS)); return -ETIMEDOUT; @@ -1955,7 +1952,7 @@ static int lpc17_waitresponse(FAR struct sdio_dev_s *dev, uint32_t cmd) static int lpc17_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t *rshort) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES uint32_t respcmd; #endif uint32_t regval; @@ -1984,10 +1981,10 @@ static int lpc17_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!rshort) { - fdbg("ERROR: rshort=NULL\n"); + mcerr("ERROR: rshort=NULL\n"); ret = -EINVAL; } @@ -1997,7 +1994,7 @@ static int lpc17_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t (cmd & MMCSD_RESPONSE_MASK) != MMCSD_R1B_RESPONSE && (cmd & MMCSD_RESPONSE_MASK) != MMCSD_R6_RESPONSE) { - fdbg("ERROR: Wrong response CMD=%08x\n", cmd); + mcerr("ERROR: Wrong response CMD=%08x\n", cmd); ret = -EINVAL; } else @@ -2008,15 +2005,15 @@ static int lpc17_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t regval = getreg32(LPC17_SDCARD_STATUS); if ((regval & SDCARD_STATUS_CTIMEOUT) != 0) { - fdbg("ERROR: Command timeout: %08x\n", regval); + mcerr("ERROR: Command timeout: %08x\n", regval); ret = -ETIMEDOUT; } else if ((regval & SDCARD_STATUS_CCRCFAIL) != 0) { - fdbg("ERROR: CRC failure: %08x\n", regval); + mcerr("ERROR: CRC failure: %08x\n", regval); ret = -EIO; } -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES else { /* Check response received is of desired command */ @@ -2024,7 +2021,7 @@ static int lpc17_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t respcmd = getreg32(LPC17_SDCARD_RESPCMD); if ((uint8_t)(respcmd & SDCARD_RESPCMD_MASK) != (cmd & MMCSD_CMDIDX_MASK)) { - fdbg("ERROR: RESCMD=%02x CMD=%08x\n", respcmd, cmd); + mcerr("ERROR: RESCMD=%02x CMD=%08x\n", respcmd, cmd); ret = -EINVAL; } } @@ -2052,12 +2049,12 @@ static int lpc17_recvlong(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t rlo * 0 1 End bit */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Check that R1 is the correct response to this command */ if ((cmd & MMCSD_RESPONSE_MASK) != MMCSD_R2_RESPONSE) { - fdbg("ERROR: Wrong response CMD=%08x\n", cmd); + mcerr("ERROR: Wrong response CMD=%08x\n", cmd); ret = -EINVAL; } else @@ -2068,12 +2065,12 @@ static int lpc17_recvlong(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t rlo regval = getreg32(LPC17_SDCARD_STATUS); if (regval & SDCARD_STATUS_CTIMEOUT) { - fdbg("ERROR: Timeout STA: %08x\n", regval); + mcerr("ERROR: Timeout STA: %08x\n", regval); ret = -ETIMEDOUT; } else if (regval & SDCARD_STATUS_CCRCFAIL) { - fdbg("ERROR: CRC fail STA: %08x\n", regval); + mcerr("ERROR: CRC fail STA: %08x\n", regval); ret = -EIO; } } @@ -2107,11 +2104,11 @@ static int lpc17_recvshort(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t *r /* Check that this is the correct response to this command */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if ((cmd & MMCSD_RESPONSE_MASK) != MMCSD_R3_RESPONSE && (cmd & MMCSD_RESPONSE_MASK) != MMCSD_R7_RESPONSE) { - fdbg("ERROR: Wrong response CMD=%08x\n", cmd); + mcerr("ERROR: Wrong response CMD=%08x\n", cmd); ret = -EINVAL; } else @@ -2124,7 +2121,7 @@ static int lpc17_recvshort(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t *r regval = getreg32(LPC17_SDCARD_STATUS); if (regval & SDCARD_STATUS_CTIMEOUT) { - fdbg("ERROR: Timeout STA: %08x\n", regval); + mcerr("ERROR: Timeout STA: %08x\n", regval); ret = -ETIMEDOUT; } } @@ -2269,7 +2266,7 @@ static sdio_eventset_t lpc17_eventwait(FAR struct sdio_dev_s *dev, 1, (uint32_t)priv); if (ret != OK) { - fdbg("ERROR: wd_start failed: %d\n", ret); + mcerr("ERROR: wd_start failed: %d\n", ret); } } @@ -2341,7 +2338,7 @@ static void lpc17_callbackenable(FAR struct sdio_dev_s *dev, { struct lpc17_dev_s *priv = (struct lpc17_dev_s *)dev; - fvdbg("eventset: %02x\n", eventset); + mcinfo("eventset: %02x\n", eventset); DEBUGASSERT(priv != NULL); priv->cbevents = eventset; @@ -2377,7 +2374,7 @@ static int lpc17_registercallback(FAR struct sdio_dev_s *dev, /* Disable callbacks and register this callback and is argument */ - fvdbg("Register %p(%p)\n", callback, arg); + mcinfo("Register %p(%p)\n", callback, arg); DEBUGASSERT(priv != NULL); priv->cbevents = 0; @@ -2590,8 +2587,8 @@ static void lpc17_callback(void *arg) /* Is a callback registered? */ DEBUGASSERT(priv != NULL); - fvdbg("Callback %p(%p) cbevents: %02x cdstatus: %02x\n", - priv->callback, priv->cbarg, priv->cbevents, priv->cdstatus); + mcinfo("Callback %p(%p) cbevents: %02x cdstatus: %02x\n", + priv->callback, priv->cbarg, priv->cbevents, priv->cdstatus); if (priv->callback) { @@ -2635,14 +2632,14 @@ static void lpc17_callback(void *arg) { /* Yes.. queue it */ - fvdbg("Queuing callback to %p(%p)\n", priv->callback, priv->cbarg); + mcinfo("Queuing callback to %p(%p)\n", priv->callback, priv->cbarg); (void)work_queue(HPWORK, &priv->cbwork, (worker_t)priv->callback, priv->cbarg, 0); } else { /* No.. then just call the callback here */ - fvdbg("Callback to %p(%p)\n", priv->callback, priv->cbarg); + mcinfo("Callback to %p(%p)\n", priv->callback, priv->cbarg); priv->callback(priv->cbarg); } } @@ -2781,7 +2778,7 @@ void sdio_mediachange(FAR struct sdio_dev_s *dev, bool cardinslot) { priv->cdstatus &= ~SDIO_STATUS_PRESENT; } - fvdbg("cdstatus OLD: %02x NEW: %02x\n", cdstatus, priv->cdstatus); + mcinfo("cdstatus OLD: %02x NEW: %02x\n", cdstatus, priv->cdstatus); /* Perform any requested callback if the status has changed */ @@ -2824,7 +2821,8 @@ void sdio_wrprotect(FAR struct sdio_dev_s *dev, bool wrprotect) { priv->cdstatus &= ~SDIO_STATUS_WRPROTECTED; } - fvdbg("cdstatus: %02x\n", priv->cdstatus); + + mcinfo("cdstatus: %02x\n", priv->cdstatus); leave_critical_section(flags); } #endif /* CONFIG_LPC17_SDCARD */ diff --git a/arch/arm/src/lpc17xx/lpc17_serial.c b/arch/arm/src/lpc17xx/lpc17_serial.c index d0e2ceeecf93c6379e7850339d11e8d4ee0dccac..7062c521f484b095a367934d9af96372b88aebcc 100644 --- a/arch/arm/src/lpc17xx/lpc17_serial.c +++ b/arch/arm/src/lpc17xx/lpc17_serial.c @@ -1134,7 +1134,7 @@ static int up_interrupt(int irq, void *context) /* Read the modem status register (MSR) to clear */ status = up_serialin(priv, LPC17_UART_MSR_OFFSET); - vdbg("MSR: %02x\n", status); + _info("MSR: %02x\n", status); break; } @@ -1145,7 +1145,7 @@ static int up_interrupt(int irq, void *context) /* Read the line status register (LSR) to clear */ status = up_serialin(priv, LPC17_UART_LSR_OFFSET); - vdbg("LSR: %02x\n", status); + _info("LSR: %02x\n", status); break; } @@ -1153,7 +1153,7 @@ static int up_interrupt(int irq, void *context) default: { - dbg("Unexpected IIR: %02x\n", status); + _err("ERROR: Unexpected IIR: %02x\n", status); break; } } diff --git a/arch/arm/src/lpc17xx/lpc17_spi.c b/arch/arm/src/lpc17xx/lpc17_spi.c index c915d1dfc2328944b2967d684523ff9c35abf9d2..6ddef3951fc28d26cce59ca4172516f3f3a7d219 100644 --- a/arch/arm/src/lpc17xx/lpc17_spi.c +++ b/arch/arm/src/lpc17xx/lpc17_spi.c @@ -71,26 +71,6 @@ # error "CONFIG_SPI_EXCHANGE must not be defined in the configuration" #endif -/* Debug ********************************************************************/ -/* The following enable debug output from this file: - * - * CONFIG_DEBUG - Define to enable general debug features - * CONFIG_DEBUG_SPI - Define to enable basic SSP debug (needs CONFIG_DEBUG) - * CONFIG_DEBUG_VERBOSE - Define to enable verbose SSP debug - */ - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - /* SSP Clocking *************************************************************/ /* The CPU clock by 1, 2, 4, or 8 to get the SPI peripheral clock (SPI_CLOCK). * SPI_CLOCK may be further divided by 8-254 to get the SPI clock. If we @@ -287,7 +267,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) priv->frequency = frequency; priv->actual = actual; - spidbg("Frequency %d->%d\n", frequency, actual); + spiinfo("Frequency %d->%d\n", frequency, actual); return actual; } @@ -449,7 +429,7 @@ static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size FAR uint8_t *ptr = (FAR uint8_t *)buffer; uint8_t data; - spidbg("nwords: %d\n", nwords); + spiinfo("nwords: %d\n", nwords); while (nwords) { /* Write the data to transmitted to the SPI Data Register */ @@ -494,7 +474,7 @@ static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nw { FAR uint8_t *ptr = (FAR uint8_t *)buffer; - spidbg("nwords: %d\n", nwords); + spiinfo("nwords: %d\n", nwords); while (nwords) { /* Write some dummy data to the SPI Data Register in order to clock the diff --git a/arch/arm/src/lpc17xx/lpc17_ssp.c b/arch/arm/src/lpc17xx/lpc17_ssp.c index 9cdee092423c8c8320d84242a56a8b5c8f7d5b58..d66abf4d9d7e6a2753ac1bbae8edbc2a789388bf 100644 --- a/arch/arm/src/lpc17xx/lpc17_ssp.c +++ b/arch/arm/src/lpc17xx/lpc17_ssp.c @@ -72,26 +72,6 @@ # error "CONFIG_SPI_EXCHANGE must not be defined in the configuration" #endif -/* Debug ********************************************************************/ -/* The following enable debug output from this file: - * - * CONFIG_DEBUG - Define to enable general debug features - * CONFIG_DEBUG_SPI - Define to enable basic SSP debug (needs CONFIG_DEBUG) - * CONFIG_DEBUG_VERBOSE - Define to enable verbose SSP debug - */ - -#ifdef CONFIG_DEBUG_SPI -# define sspdbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define sspdbg(x...) -# define spivdbg(x...) -#endif - /* SSP Clocking *************************************************************/ #if defined(LPC176x) @@ -470,7 +450,7 @@ static uint32_t ssp_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) priv->frequency = frequency; priv->actual = actual; - sspdbg("Frequency %d->%d\n", frequency, actual); + spiinfo("Frequency %d->%d\n", frequency, actual); return actual; } @@ -521,7 +501,7 @@ static void ssp_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode) break; default: - sspdbg("Bad mode: %d\n", mode); + spierr("ERROR: Bad mode: %d\n", mode); DEBUGASSERT(FALSE); return; } @@ -609,7 +589,7 @@ static uint16_t ssp_send(FAR struct spi_dev_s *dev, uint16_t wd) /* Get the value from the RX FIFO and return it */ regval = ssp_getreg(priv, LPC17_SSP_DR_OFFSET); - sspdbg("%04x->%04x\n", wd, regval); + spiinfo("%04x->%04x\n", wd, regval); return (uint16_t)regval; } @@ -646,7 +626,7 @@ static void ssp_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size /* Loop while thre are bytes remaining to be sent */ - sspdbg("nwords: %d\n", nwords); + spiinfo("nwords: %d\n", nwords); u.pv = buffer; while (nwords > 0) { @@ -674,7 +654,7 @@ static void ssp_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size /* Then discard all card responses until the RX & TX FIFOs are emptied. */ - sspdbg("discarding\n"); + spiinfo("discarding\n"); do { /* Is there anything in the RX fifo? */ @@ -735,7 +715,7 @@ static void ssp_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nw /* While there is remaining to be sent (and no synchronization error has occurred) */ - sspdbg("nwords: %d\n", nwords); + spiinfo("nwords: %d\n", nwords); u.pv = buffer; while (nwords || rxpending) { @@ -745,7 +725,7 @@ static void ssp_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nw * and (3) there are more bytes to be sent. */ - spivdbg("TX: rxpending: %d nwords: %d\n", rxpending, nwords); + spiinfo("TX: rxpending: %d nwords: %d\n", rxpending, nwords); while ((ssp_getreg(priv, LPC17_SSP_SR_OFFSET) & SSP_SR_TNF) && (rxpending < LPC17_SSP_FIFOSZ) && nwords) { @@ -756,7 +736,7 @@ static void ssp_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nw /* Now, read the RX data from the RX FIFO while the RX FIFO is not empty */ - spivdbg("RX: rxpending: %d\n", rxpending); + spiinfo("RX: rxpending: %d\n", rxpending); while (ssp_getreg(priv, LPC17_SSP_SR_OFFSET) & SSP_SR_RNE) { data = (uint8_t)ssp_getreg(priv, LPC17_SSP_DR_OFFSET); diff --git a/arch/arm/src/lpc17xx/lpc17_start.c b/arch/arm/src/lpc17xx/lpc17_start.c index 8d95518d02d3db2e930b93ff0e956cb4e8eba1e2..3a0ae1d70554331623ad0447b8a4df2949941ed5 100644 --- a/arch/arm/src/lpc17xx/lpc17_start.c +++ b/arch/arm/src/lpc17xx/lpc17_start.c @@ -82,7 +82,7 @@ * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES # define showprogress(c) up_lowputc(c) #else # define showprogress(c) diff --git a/arch/arm/src/lpc17xx/lpc17_timer.c b/arch/arm/src/lpc17xx/lpc17_timer.c index b4a821ffc0b97e507b807ef877fc715e54b22249..9278578b6785d95f8f3f8ede2d760cc50f8165f6 100644 --- a/arch/arm/src/lpc17xx/lpc17_timer.c +++ b/arch/arm/src/lpc17xx/lpc17_timer.c @@ -82,29 +82,10 @@ /* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing PWM */ -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_PWM -#endif - -#ifdef CONFIG_DEBUG_PWM -# define pwmdbg dbg -# define pwmlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define pwmvdbg vdbg -# define pwmllvdbg llvdbg -# define pwm_dumpgpio(p,m) stm32_dumpgpio(p,m) -# else -# define pwmlldbg(x...) -# define pwmllvdbg(x...) -# define pwm_dumpgpio(p,m) -# endif +#ifdef CONFIG_DEBUG_PWM_INFO +# define pwm_dumpgpio(p,m) stm32_dumpgpio(p,m) #else -# define pwmdbg(x...) -# define pwmlldbg(x...) -# define pwmvdbg(x...) -# define pwmllvdbg(x...) # define pwm_dumpgpio(p,m) #endif @@ -133,7 +114,7 @@ struct lpc17_timer_s static uint32_t timer_getreg(struct lpc17_timer_s *priv, int offset); static void timer_putreg(struct lpc17_timer_s *priv, int offset, uint32_t value); -#if defined(CONFIG_DEBUG_PWM) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_PWM_INFO static void timer_dumpregs(struct lpc17_timer_s *priv, FAR const char *msg); #else # define timer_dumpregs(priv,msg) @@ -242,11 +223,11 @@ static void timer_putreg(struct lpc17_timer_s *priv, int offset, * ****************************************************************************/ -#if defined(CONFIG_DEBUG_PWM) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_PWM_INFO static void timer_dumpregs(struct lpc17_timer_s *priv, FAR const char *msg) { - pwmdbg("%s:\n", msg); - pwmdbg(" CR1: %04x CR2: %04x SMCR: %04x DIER: %04x\n", + pwminfo("%s:\n", msg); + pwminfo(" CR1: %04x CR2: %04x SMCR: %04x DIER: %04x\n", timer_getreg(priv, LPC17_PWM_MR0_OFFSET), timer_getreg(priv, LPC17_PWM_MR1_OFFSET), timer_getreg(priv, LPC17_PWM_MR2_OFFSET), @@ -254,7 +235,7 @@ static void timer_dumpregs(struct lpc17_timer_s *priv, FAR const char *msg) #if defined(CONFIG_LPC17_TMR0) if (priv->timtype == TIMTYPE_ADVANCED) { - pwmdbg(" RCR: %04x BDTR: %04x DCR: %04x DMAR: %04x\n", + pwminfo(" RCR: %04x BDTR: %04x DCR: %04x DMAR: %04x\n", timer_getreg(priv, LPC17_PWM_MR0_OFFSET), timer_getreg(priv, LPC17_PWM_MR1_OFFSET), timer_getreg(priv, LPC17_PWM_MR2_OFFSET), @@ -263,7 +244,7 @@ static void timer_dumpregs(struct lpc17_timer_s *priv, FAR const char *msg) else #endif { - pwmdbg(" DCR: %04x DMAR: %04x\n", + pwminfo(" DCR: %04x DMAR: %04x\n", timer_getreg(priv, LPC17_PWM_MR2_OFFSET), timer_getreg(priv, LPC17_PWM_MR3_OFFSET)); } @@ -469,7 +450,7 @@ static int timer_shutdown(FAR struct pwm_lowerhalf_s *dev) FAR struct lpc17_timer_s *priv = (FAR struct lpc17_timer_s *)dev; uint32_t pincfg; - pwmdbg("TIM%d pincfg: %08x\n", priv->timid, priv->pincfg); + pwminfo("TIM%d pincfg: %08x\n", priv->timid, priv->pincfg); /* Make sure that the output has been stopped */ @@ -525,7 +506,7 @@ static int timer_stop(FAR struct pwm_lowerhalf_s *dev) uint32_t regval; irqstate_t flags; - pwmdbg("TIM%d\n", priv->timid); + pwminfo("TIM%d\n", priv->timid); /* Disable interrupts momentary to stop any ongoing timer processing and * to prevent any concurrent access to the reset register. @@ -551,7 +532,7 @@ static int timer_stop(FAR struct pwm_lowerhalf_s *dev) leave_critical_section(flags); - pwmdbg("regaddr: %08x resetbit: %08x\n", regaddr, resetbit); + pwminfo("regaddr: %08x resetbit: %08x\n", regaddr, resetbit); timer_dumpregs(priv, "After stop"); return OK; } @@ -574,12 +555,12 @@ static int timer_stop(FAR struct pwm_lowerhalf_s *dev) static int timer_ioctl(FAR struct pwm_lowerhalf_s *dev, int cmd, unsigned long arg) { -#ifdef CONFIG_DEBUG_TIMER +#ifdef CONFIG_DEBUG_PWM_INFO FAR struct lpc17_timer_s *priv = (FAR struct lpc17_timer_s *)dev; /* There are no platform-specific ioctl commands */ - pwmdbg("TIM%d\n", priv->timid); + pwminfo("TIM%d\n", priv->timid); #endif return -ENOTTY; } @@ -609,7 +590,7 @@ FAR struct pwm_lowerhalf_s *lpc17_timerinitialize(int timer) { FAR struct lpc17_timer_s *lower; - pwmdbg("TIM%d\n", timer); + pwminfo("TIM%d\n", timer); switch (timer) { @@ -623,7 +604,7 @@ FAR struct pwm_lowerhalf_s *lpc17_timerinitialize(int timer) #endif default: - pwmdbg("No such timer configured\n"); + pwmerr("ERROR: No such timer configured\n"); return NULL; } diff --git a/arch/arm/src/lpc17xx/lpc17_usbdev.c b/arch/arm/src/lpc17xx/lpc17_usbdev.c index 9995e03cdaddbe25fae2b6051b41edeb0fe8cfc9..ca4d5f90d803456e10d95c415d41de0d3ed2eadd 100644 --- a/arch/arm/src/lpc17xx/lpc17_usbdev.c +++ b/arch/arm/src/lpc17xx/lpc17_usbdev.c @@ -99,20 +99,23 @@ # define USB_FRAME_INT 0 #endif -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB # define USB_ERROR_INT USBDEV_INT_ERRINT #else -# undef CONFIG_LPC17_USBDEV_REGDEBUG # define USB_ERROR_INT 0 #endif +#ifndef CONFIG_DEBUG_USB_INFO +# undef CONFIG_LPC17_USBDEV_REGDEBUG +#endif + /* CLKCTRL enable bits */ #define LPC17_CLKCTRL_ENABLES (USBDEV_CLK_DEVCLK|USBDEV_CLK_AHBCLK) /* Dump GPIO registers */ -#if defined(CONFIG_LPC17_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_GPIO) +#if defined(CONFIG_LPC17_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_GPIO_INFO) # define usbdev_dumpgpio() \ do { \ lpc17_dumpgpio(GPIO_USB_DP, "D+ P0.29; D- P0.30"); \ @@ -531,7 +534,7 @@ static struct lpc17_dmadesc_s g_usbddesc[CONFIG_LPC17_USBDEV_NDMADESCRIPTORS]; #ifdef CONFIG_LPC17_USBDEV_REGDEBUG static void lpc17_printreg(uint32_t addr, uint32_t val, bool iswrite) { - lldbg("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val); + uinfo("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val); } #endif @@ -581,7 +584,7 @@ static void lpc17_checkreg(uint32_t addr, uint32_t val, bool iswrite) { /* No.. More than one. */ - lldbg("[repeats %d more times]\n", count); + uinfo("[repeats %d more times]\n", count); } } @@ -1076,8 +1079,9 @@ static int lpc17_wrrequest(struct lpc17_ep_s *privep) return OK; } - ullvdbg("epphy=%d req=%p: len=%d xfrd=%d nullpkt=%d\n", - privep->epphy, privreq, privreq->req.len, privreq->req.xfrd, privep->txnullpkt); + uinfo("epphy=%d req=%p: len=%d xfrd=%d nullpkt=%d\n", + privep->epphy, privreq, privreq->req.len, privreq->req.xfrd, + privep->txnullpkt); /* Ignore any attempt to send a zero length packet on anything but EP0IN */ @@ -1185,8 +1189,8 @@ static int lpc17_rdrequest(struct lpc17_ep_s *privep) return OK; } - ullvdbg("len=%d xfrd=%d nullpkt=%d\n", - privreq->req.len, privreq->req.xfrd, privep->txnullpkt); + uinfo("len=%d xfrd=%d nullpkt=%d\n", + privreq->req.len, privreq->req.xfrd, privep->txnullpkt); /* Ignore any attempt to receive a zero length packet */ @@ -1593,8 +1597,8 @@ static inline void lpc17_ep0setup(struct lpc17_usbdev_s *priv) index = GETUINT16(ctrl.index); len = GETUINT16(ctrl.len); - ullvdbg("type=%02x req=%02x value=%04x index=%04x len=%04x\n", - ctrl.type, ctrl.req, value, index, len); + uinfo("type=%02x req=%02x value=%04x index=%04x len=%04x\n", + ctrl.type, ctrl.req, value, index, len); /* Dispatch any non-standard requests */ @@ -1739,7 +1743,7 @@ static inline void lpc17_ep0setup(struct lpc17_usbdev_s *priv) if (((ctrl.type & USB_REQ_RECIPIENT_MASK) == USB_REQ_RECIPIENT_DEVICE) && value == USB_FEATURE_TESTMODE) { - ullvdbg("test mode: %d\n", index); + uinfo("test mode: %d\n", index); } else if ((ctrl.type & USB_REQ_RECIPIENT_MASK) != USB_REQ_RECIPIENT_ENDPOINT) { @@ -2090,7 +2094,7 @@ static int lpc17_usbinterrupt(int irq, FAR void *context) #endif -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB /* USB engine error interrupt */ if ((devintstatus & USBDEV_INT_ERRINT) != 0) @@ -2321,7 +2325,7 @@ static int lpc17_usbinterrupt(int irq, FAR void *context) } else { - ullvdbg("Pending data on OUT endpoint\n"); + uinfo("Pending data on OUT endpoint\n"); priv->rxpending = 1; } } @@ -2412,7 +2416,7 @@ static int lpc17_dmasetup(struct lpc17_usbdev_s *priv, uint8_t epphy, struct lpc17_dmadesc_s *dmadesc = priv; uint32_t regval; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!priv || epphy < 2) { usbtrace(TRACE_DEVERROR(LPC17_TRACEERR_INVALIDPARMS), 0); @@ -2611,13 +2615,14 @@ static int lpc17_epdisable(FAR struct usbdev_ep_s *ep) uint32_t mask = (1 << privep->epphy); uint32_t regval; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!ep) { usbtrace(TRACE_DEVERROR(LPC17_TRACEERR_INVALIDPARMS), 0); return -EINVAL; } #endif + usbtrace(TRACE_EPDISABLE, privep->epphy); /* Cancel any ongoing activity */ @@ -2653,13 +2658,14 @@ static FAR struct usbdev_req_s *lpc17_epallocreq(FAR struct usbdev_ep_s *ep) { FAR struct lpc17_req_s *privreq; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!ep) { usbtrace(TRACE_DEVERROR(LPC17_TRACEERR_INVALIDPARMS), 0); return NULL; } #endif + usbtrace(TRACE_EPALLOCREQ, ((FAR struct lpc17_ep_s *)ep)->epphy); privreq = (FAR struct lpc17_req_s *)kmm_malloc(sizeof(struct lpc17_req_s)); @@ -2685,13 +2691,14 @@ static void lpc17_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s { FAR struct lpc17_req_s *privreq = (FAR struct lpc17_req_s *)req; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!ep || !req) { usbtrace(TRACE_DEVERROR(LPC17_TRACEERR_INVALIDPARMS), 0); return; } #endif + usbtrace(TRACE_EPFREEREQ, ((FAR struct lpc17_ep_s *)ep)->epphy); kmm_free(privreq); @@ -2793,11 +2800,12 @@ static int lpc17_epsubmit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *r irqstate_t flags; int ret = OK; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!req || !req->callback || !req->buf || !ep) { usbtrace(TRACE_DEVERROR(LPC17_TRACEERR_INVALIDPARMS), 0); - ullvdbg("req=%p callback=%p buf=%p ep=%p\n", req, req->callback, req->buf, ep); + uinfo("req=%p callback=%p buf=%p ep=%p\n", + req, req->callback, req->buf, ep); return -EINVAL; } #endif @@ -2878,7 +2886,7 @@ static int lpc17_epcancel(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *r FAR struct lpc17_ep_s *privep = (FAR struct lpc17_ep_s *)ep; irqstate_t flags; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!ep || !req) { usbtrace(TRACE_DEVERROR(LPC17_TRACEERR_INVALIDPARMS), 0); @@ -3142,7 +3150,7 @@ static int lpc17_selfpowered(struct usbdev_s *dev, bool selfpowered) usbtrace(TRACE_DEVSELFPOWERED, (uint16_t)selfpowered); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!dev) { usbtrace(TRACE_DEVERROR(LPC17_TRACEERR_INVALIDPARMS), 0); @@ -3406,7 +3414,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) usbtrace(TRACE_DEVREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!driver || !driver->ops->bind || !driver->ops->unbind || !driver->ops->disconnect || !driver->ops->setup) { @@ -3456,7 +3464,7 @@ int usbdev_unregister(struct usbdevclass_driver_s *driver) { usbtrace(TRACE_DEVUNREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (driver != g_usbdev.driver) { usbtrace(TRACE_DEVERROR(LPC17_TRACEERR_INVALIDPARMS), 0); diff --git a/arch/arm/src/lpc17xx/lpc17_usbhost.c b/arch/arm/src/lpc17xx/lpc17_usbhost.c index 94003be06d79178b5eb5ebb2299039e2c9e15713..d8d02f629c0ff563d385233701f8adbadc422b8d 100644 --- a/arch/arm/src/lpc17xx/lpc17_usbhost.c +++ b/arch/arm/src/lpc17xx/lpc17_usbhost.c @@ -88,6 +88,10 @@ # define CONFIG_LPC17_USBHOST_NPREALLOC 8 #endif +#ifndef CONFIG_DEBUG_USB_INFO +# undef CONFIG_LPC17_USBHOST_REGDEBUG +#endif + /* OHCI Setup ******************************************************************/ /* Frame Interval / Periodic Start */ @@ -114,7 +118,7 @@ /* Dump GPIO registers */ -#if defined(CONFIG_LPC17_USBHOST_REGDEBUG) && defined(CONFIG_DEBUG_GPIO) +#ifdef CONFIG_LPC17_USBHOST_REGDEBUG # define usbhost_dumpgpio() \ do { \ lpc17_dumpgpio(GPIO_USB_DP, "D+ P0.29; D- P0.30"); \ @@ -456,7 +460,7 @@ static struct lpc17_xfrinfo_s g_xfrbuffers[CONFIG_LPC17_USBHOST_NPREALLOC]; #ifdef CONFIG_LPC17_USBHOST_REGDEBUG static void lpc17_printreg(uint32_t addr, uint32_t val, bool iswrite) { - lldbg("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val); + uinfo("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val); } #endif @@ -506,7 +510,7 @@ static void lpc17_checkreg(uint32_t addr, uint32_t val, bool iswrite) { /* No.. More than one. */ - lldbg("[repeats %d more times]\n", count); + uinfo("[repeats %d more times]\n", count); } } @@ -1192,7 +1196,7 @@ static inline int lpc17_addinted(struct lpc17_usbhost_s *priv, interval = lpc17_getinterval(epdesc->interval); ed->interval = interval; - uvdbg("interval: %d->%d\n", epdesc->interval, interval); + uinfo("interval: %d->%d\n", epdesc->interval, interval); /* Get the offset associated with the ED direction. IN EDs get the even * entries, OUT EDs get the odd entries. @@ -1225,7 +1229,7 @@ static inline int lpc17_addinted(struct lpc17_usbhost_s *priv, interval = priv->outinterval; } } - uvdbg("min interval: %d offset: %d\n", interval, offset); + uinfo("min interval: %d offset: %d\n", interval, offset); /* Get the head of the first of the duplicated entries. The first offset * entry is always guaranteed to contain the common ED list head. @@ -1244,7 +1248,7 @@ static inline int lpc17_addinted(struct lpc17_usbhost_s *priv, ed->hw.nexted = head; lpc17_setinttab((uint32_t)ed, interval, offset); - uvdbg("head: %08x next: %08x\n", ed, head); + uinfo("head: %08x next: %08x\n", ed, head); /* Re-enabled periodic list processing */ @@ -1314,7 +1318,7 @@ static inline int lpc17_reminted(struct lpc17_usbhost_s *priv, */ head = (struct lpc17_ed_s *)HCCA->inttbl[offset]; - uvdbg("ed: %08x head: %08x next: %08x offset: %d\n", + uinfo("ed: %08x head: %08x next: %08x offset: %d\n", ed, head, head ? head->hw.nexted : 0, offset); /* Find the ED to be removed in the ED list */ @@ -1349,7 +1353,7 @@ static inline int lpc17_reminted(struct lpc17_usbhost_s *priv, prev->hw.nexted = ed->hw.nexted; } - uvdbg("ed: %08x head: %08x next: %08x\n", + uinfo("ed: %08x head: %08x next: %08x\n", ed, head, head ? head->hw.nexted : 0); /* Calculate the new minimum interval for this list */ @@ -1363,7 +1367,7 @@ static inline int lpc17_reminted(struct lpc17_usbhost_s *priv, } } - uvdbg("min interval: %d offset: %d\n", interval, offset); + uinfo("min interval: %d offset: %d\n", interval, offset); /* Save the new minimum interval */ @@ -1547,7 +1551,7 @@ static int lpc17_ctrltd(struct lpc17_usbhost_s *priv, struct lpc17_ed_s *ed, xfrinfo = lpc17_alloc_xfrinfo(); if (xfrinfo == NULL) { - udbg("ERROR: lpc17_alloc_xfrinfo failed\n"); + uerr("ERROR: lpc17_alloc_xfrinfo failed\n"); return -ENOMEM; } @@ -1566,7 +1570,7 @@ static int lpc17_ctrltd(struct lpc17_usbhost_s *priv, struct lpc17_ed_s *ed, ret = lpc17_wdhwait(priv, ed); if (ret < 0) { - udbg("ERROR: Device disconnected\n"); + uerr("ERROR: Device disconnected\n"); goto errout_with_xfrinfo; } @@ -1607,7 +1611,7 @@ static int lpc17_ctrltd(struct lpc17_usbhost_s *priv, struct lpc17_ed_s *ed, } else { - udbg("ERROR: Bad TD completion status: %d\n", xfrinfo->tdstatus); + uerr("ERROR: Bad TD completion status: %d\n", xfrinfo->tdstatus); ret = xfrinfo->tdstatus == TD_CC_STALL ? -EPERM : -EIO; } } @@ -1642,7 +1646,7 @@ static int lpc17_usbinterrupt(int irq, void *context) intst = lpc17_getreg(LPC17_USBHOST_INTST); regval = lpc17_getreg(LPC17_USBHOST_INTEN); - ullvdbg("INST: %08x INTEN: %08x\n", intst, regval); + uinfo("INST: %08x INTEN: %08x\n", intst, regval); pending = intst & regval; if (pending != 0) @@ -1652,18 +1656,18 @@ static int lpc17_usbinterrupt(int irq, void *context) if ((pending & OHCI_INT_RHSC) != 0) { uint32_t rhportst1 = lpc17_getreg(LPC17_USBHOST_RHPORTST1); - ullvdbg("Root Hub Status Change, RHPORTST1: %08x\n", rhportst1); + uinfo("Root Hub Status Change, RHPORTST1: %08x\n", rhportst1); if ((rhportst1 & OHCI_RHPORTST_CSC) != 0) { uint32_t rhstatus = lpc17_getreg(LPC17_USBHOST_RHSTATUS); - ullvdbg("Connect Status Change, RHSTATUS: %08x\n", rhstatus); + uinfo("Connect Status Change, RHSTATUS: %08x\n", rhstatus); /* If DRWE is set, Connect Status Change indicates a remote wake-up event */ if (rhstatus & OHCI_RHSTATUS_DRWE) { - ullvdbg("DRWE: Remote wake-up\n"); + uinfo("DRWE: Remote wake-up\n"); } /* Otherwise... Not a remote wake-up event */ @@ -1680,7 +1684,7 @@ static int lpc17_usbinterrupt(int irq, void *context) { /* Yes.. connected. */ - ullvdbg("Connected\n"); + uinfo("Connected\n"); priv->connected = true; priv->change = true; @@ -1694,7 +1698,7 @@ static int lpc17_usbinterrupt(int irq, void *context) } else { - ulldbg("Spurious status change (connected)\n"); + uwarn("WARNING: Spurious status change (connected)\n"); } /* The LSDA (Low speed device attached) bit is valid @@ -1710,7 +1714,7 @@ static int lpc17_usbinterrupt(int irq, void *context) priv->rhport.hport.speed = USB_SPEED_FULL; } - ullvdbg("Speed:%d\n", priv->rhport.hport.speed); + uinfo("Speed:%d\n", priv->rhport.hport.speed); } /* Check if we are now disconnected */ @@ -1719,7 +1723,7 @@ static int lpc17_usbinterrupt(int irq, void *context) { /* Yes.. disconnect the device */ - ullvdbg("Disconnected\n"); + uinfo("Disconnected\n"); priv->connected = false; priv->change = true; @@ -1750,7 +1754,7 @@ static int lpc17_usbinterrupt(int irq, void *context) } else { - ulldbg("Spurious status change (disconnected)\n"); + uwarn("WARNING: Spurious status change (disconnected)\n"); } } @@ -1830,9 +1834,9 @@ static int lpc17_usbinterrupt(int irq, void *context) { /* The transfer failed for some reason... dump some diagnostic info. */ - ulldbg("ERROR: ED xfrtype:%d TD CTRL:%08x/CC:%d RHPORTST1:%08x\n", - ed->xfrtype, td->hw.ctrl, xfrinfo->tdstatus, - lpc17_getreg(LPC17_USBHOST_RHPORTST1)); + uerr("ERROR: ED xfrtype:%d TD CTRL:%08x/CC:%d RHPORTST1:%08x\n", + ed->xfrtype, td->hw.ctrl, xfrinfo->tdstatus, + lpc17_getreg(LPC17_USBHOST_RHPORTST1)); } #endif @@ -1894,7 +1898,7 @@ static int lpc17_usbinterrupt(int irq, void *context) #ifdef CONFIG_DEBUG_USB if ((pending & LPC17_DEBUG_INTS) != 0) { - ulldbg("ERROR: Unhandled interrupts INTST:%08x\n", intst); + uerr("ERROR: Unhandled interrupts INTST:%08x\n", intst); } #endif @@ -1967,8 +1971,8 @@ static int lpc17_wait(struct usbhost_connection_s *conn, *hport = connport; leave_critical_section(flags); - udbg("RHport Connected: %s\n", - connport->connected ? "YES" : "NO"); + uinfo("RHport Connected: %s\n", + connport->connected ? "YES" : "NO"); return OK; } @@ -1987,7 +1991,7 @@ static int lpc17_wait(struct usbhost_connection_s *conn, *hport = connport; leave_critical_section(flags); - udbg("Hub port Connected: %s\n", connport->connected ? "YES" : "NO"); + uinfo("Hub port Connected: %s\n", connport->connected ? "YES" : "NO"); return OK; } #endif @@ -2041,7 +2045,7 @@ static int lpc17_rh_enumerate(struct usbhost_connection_s *conn, { /* No, return an error */ - udbg("Not connected\n"); + uwarn("WARNING: Not connected\n"); return -ENODEV; } @@ -2089,11 +2093,11 @@ static int lpc17_enumerate(FAR struct usbhost_connection_s *conn, /* Then let the common usbhost_enumerate do the real enumeration. */ - uvdbg("Enumerate the device\n"); + uinfo("Enumerate the device\n"); ret = usbhost_enumerate(hport, &hport->devclass); if (ret < 0) { - udbg("ERROR: Enumeration failed: %d\n", ret); + uerr("ERROR: Enumeration failed: %d\n", ret); } return ret; @@ -2155,7 +2159,7 @@ static int lpc17_ep0configure(struct usbhost_driver_s *drvr, usbhost_ep_t ep0, lpc17_givesem(&priv->exclsem); - uvdbg("EP0 CTRL:%08x\n", ed->hw.ctrl); + uinfo("EP0 CTRL:%08x\n", ed->hw.ctrl); return OK; } @@ -2255,7 +2259,7 @@ static int lpc17_epalloc(struct usbhost_driver_s *drvr, ed->hw.ctrl |= ED_CONTROL_F; } #endif - uvdbg("EP%d CTRL:%08x\n", epdesc->addr, ed->hw.ctrl); + uinfo("EP%d CTRL:%08x\n", epdesc->addr, ed->hw.ctrl); /* Initialize the semaphore that is used to wait for the endpoint * WDH event. @@ -2299,7 +2303,7 @@ static int lpc17_epalloc(struct usbhost_driver_s *drvr, { /* No.. destroy it and report the error */ - udbg("ERROR: Failed to queue ED for transfer type: %d\n", ed->xfrtype); + uerr("ERROR: Failed to queue ED for transfer type: %d\n", ed->xfrtype); sem_destroy(&ed->wdhsem); lpc17_edfree(ed); } @@ -2608,7 +2612,7 @@ static int lpc17_ctrlin(struct usbhost_driver_s *drvr, usbhost_ep_t ep0, DEBUGASSERT(priv != NULL && ed != NULL && req != NULL); - uvdbg("type:%02x req:%02x value:%02x%02x index:%02x%02x len:%02x%02x\n", + uinfo("type:%02x req:%02x value:%02x%02x index:%02x%02x len:%02x%02x\n", req->type, req->req, req->value[1], req->value[0], req->index[1], req->index[0], req->len[1], req->len[0]); @@ -2646,7 +2650,7 @@ static int lpc17_ctrlout(struct usbhost_driver_s *drvr, usbhost_ep_t ep0, DEBUGASSERT(priv != NULL && ed != NULL && req != NULL); - uvdbg("type:%02x req:%02x value:%02x%02x index:%02x%02x len:%02x%02x\n", + uinfo("type:%02x req:%02x value:%02x%02x index:%02x%02x len:%02x%02x\n", req->type, req->req, req->value[1], req->value[0], req->index[1], req->index[0], req->len[1], req->len[0]); @@ -2712,7 +2716,7 @@ static int lpc17_transfer_common(struct lpc17_usbhost_s *priv, xfrinfo = ed->xfrinfo; in = (ed->hw.ctrl & ED_CONTROL_D_MASK) == ED_CONTROL_D_IN; - uvdbg("EP%u %s toggle:%u maxpacket:%u buflen:%lu\n", + uinfo("EP%u %s toggle:%u maxpacket:%u buflen:%lu\n", (ed->hw.ctrl & ED_CONTROL_EN_MASK) >> ED_CONTROL_EN_SHIFT, in ? "IN" : "OUT", (ed->hw.headp & ED_HEADP_C) != 0 ? 1 : 0, @@ -2790,7 +2794,7 @@ static int lpc17_dma_alloc(struct lpc17_usbhost_s *priv, if (buflen > CONFIG_USBHOST_IOBUFSIZE) { - uvdbg("buflen (%d) > IO buffer size (%d)\n", + uinfo("buflen (%d) > IO buffer size (%d)\n", buflen, CONFIG_USBHOST_IOBUFSIZE); return -ENOMEM; } @@ -2800,7 +2804,7 @@ static int lpc17_dma_alloc(struct lpc17_usbhost_s *priv, newbuffer = lpc17_allocio(); if (!newbuffer) { - uvdbg("IO buffer allocation failed\n"); + uinfo("IO buffer allocation failed\n"); return -ENOMEM; } @@ -2947,7 +2951,7 @@ static ssize_t lpc17_transfer(struct usbhost_driver_s *drvr, usbhost_ep_t ep, xfrinfo = lpc17_alloc_xfrinfo(); if (xfrinfo == NULL) { - udbg("ERROR: lpc17_alloc_xfrinfo failed\n"); + uerr("ERROR: lpc17_alloc_xfrinfo failed\n"); nbytes = -ENOMEM; goto errout_with_sem; } @@ -2966,7 +2970,7 @@ static ssize_t lpc17_transfer(struct usbhost_driver_s *drvr, usbhost_ep_t ep, ret = lpc17_dma_alloc(priv, ed, buffer, buflen, &alloc); if (ret < 0) { - udbg("ERROR: lpc17_dma_alloc failed: %d\n", ret); + uerr("ERROR: lpc17_dma_alloc failed: %d\n", ret); nbytes = (ssize_t)ret; goto errout_with_xfrinfo; } @@ -2987,7 +2991,7 @@ static ssize_t lpc17_transfer(struct usbhost_driver_s *drvr, usbhost_ep_t ep, ret = lpc17_wdhwait(priv, ed); if (ret < 0) { - udbg("ERROR: Device disconnected\n"); + uerr("ERROR: Device disconnected\n"); nbytes = (ssize_t)ret; goto errout_with_buffers; } @@ -2997,7 +3001,7 @@ static ssize_t lpc17_transfer(struct usbhost_driver_s *drvr, usbhost_ep_t ep, ret = lpc17_transfer_common(priv, ed, buffer, buflen); if (ret < 0) { - udbg("ERROR: lpc17_transfer_common failed: %d\n", ret); + uerr("ERROR: lpc17_transfer_common failed: %d\n", ret); nbytes = (ssize_t)ret; goto errout_with_wdhwait; } @@ -3021,7 +3025,7 @@ static ssize_t lpc17_transfer(struct usbhost_driver_s *drvr, usbhost_ep_t ep, * might understand. */ - udbg("ERROR: Bad TD completion status: %d\n", xfrinfo->tdstatus); + uerr("ERROR: Bad TD completion status: %d\n", xfrinfo->tdstatus); switch (xfrinfo->tdstatus) { @@ -3111,7 +3115,7 @@ static void lpc17_asynch_completion(struct lpc17_usbhost_s *priv, * might understand. */ - udbg("ERROR: Bad TD completion status: %d\n", xfrinfo->tdstatus); + uerr("ERROR: Bad TD completion status: %d\n", xfrinfo->tdstatus); switch (xfrinfo->tdstatus) { @@ -3213,7 +3217,7 @@ static int lpc17_asynch(struct usbhost_driver_s *drvr, usbhost_ep_t ep, xfrinfo = lpc17_alloc_xfrinfo(); if (xfrinfo == NULL) { - udbg("ERROR: lpc17_alloc_xfrinfo failed\n"); + uerr("ERROR: lpc17_alloc_xfrinfo failed\n"); ret = -ENOMEM; goto errout_with_sem; } @@ -3234,7 +3238,7 @@ static int lpc17_asynch(struct usbhost_driver_s *drvr, usbhost_ep_t ep, ret = lpc17_dma_alloc(priv, ed, buffer, buflen, &xfrinfo->alloc); if (ret < 0) { - udbg("ERROR: lpc17_dma_alloc failed: %d\n", ret); + uerr("ERROR: lpc17_dma_alloc failed: %d\n", ret); goto errout_with_sem; } @@ -3251,7 +3255,7 @@ static int lpc17_asynch(struct usbhost_driver_s *drvr, usbhost_ep_t ep, ret = lpc17_transfer_common(priv, ed, buffer, buflen); if (ret < 0) { - udbg("ERROR: lpc17_transfer_common failed: %d\n", ret); + uerr("ERROR: lpc17_transfer_common failed: %d\n", ret); goto errout_with_asynch; } @@ -3454,7 +3458,7 @@ static int lpc17_connect(FAR struct usbhost_driver_s *drvr, /* Set the connected/disconnected flag */ hport->connected = connected; - ullvdbg("Hub port %d connected: %s\n", hport->port, connected ? "YES" : "NO"); + uinfo("Hub port %d connected: %s\n", hport->port, connected ? "YES" : "NO"); /* Report the connection event */ @@ -3695,19 +3699,19 @@ struct usbhost_connection_s *lpc17_usbhost_initialize(int controller) lpc17_configgpio(GPIO_USB_OVRCR); /* USB port Over-Current status */ usbhost_dumpgpio(); - udbg("Initializing Host Stack\n"); + uinfo("Initializing Host Stack\n"); /* Show AHB SRAM memory map */ #if 0 /* Useful if you have doubts about the layout */ - uvdbg("AHB SRAM:\n"); - uvdbg(" HCCA: %08x %d\n", LPC17_HCCA_BASE, LPC17_HCCA_SIZE); - uvdbg(" TDTAIL: %08x %d\n", LPC17_TDTAIL_ADDR, LPC17_TD_SIZE); - uvdbg(" EDCTRL: %08x %d\n", LPC17_EDCTRL_ADDR, LPC17_ED_SIZE); - uvdbg(" EDFREE: %08x %d\n", LPC17_EDFREE_BASE, LPC17_ED_SIZE); - uvdbg(" TDFREE: %08x %d\n", LPC17_TDFREE_BASE, LPC17_EDFREE_SIZE); - uvdbg(" TBFREE: %08x %d\n", LPC17_TBFREE_BASE, LPC17_TBFREE_SIZE); - uvdbg(" IOFREE: %08x %d\n", LPC17_IOFREE_BASE, LPC17_IOBUFFERS * CONFIG_USBHOST_IOBUFSIZE); + uinfo("AHB SRAM:\n"); + uinfo(" HCCA: %08x %d\n", LPC17_HCCA_BASE, LPC17_HCCA_SIZE); + uinfo(" TDTAIL: %08x %d\n", LPC17_TDTAIL_ADDR, LPC17_TD_SIZE); + uinfo(" EDCTRL: %08x %d\n", LPC17_EDCTRL_ADDR, LPC17_ED_SIZE); + uinfo(" EDFREE: %08x %d\n", LPC17_EDFREE_BASE, LPC17_ED_SIZE); + uinfo(" TDFREE: %08x %d\n", LPC17_TDFREE_BASE, LPC17_EDFREE_SIZE); + uinfo(" TBFREE: %08x %d\n", LPC17_TBFREE_BASE, LPC17_TBFREE_SIZE); + uinfo(" IOFREE: %08x %d\n", LPC17_IOFREE_BASE, LPC17_IOBUFFERS * CONFIG_USBHOST_IOBUFSIZE); #endif /* Initialize all the TDs, EDs and HCCA to 0 */ @@ -3825,7 +3829,7 @@ struct usbhost_connection_s *lpc17_usbhost_initialize(int controller) if (irq_attach(LPC17_IRQ_USB, lpc17_usbinterrupt) != 0) { - udbg("Failed to attach IRQ\n"); + uerr("ERROR: Failed to attach IRQ\n"); return NULL; } @@ -3850,8 +3854,8 @@ struct usbhost_connection_s *lpc17_usbhost_initialize(int controller) /* Enable interrupts at the interrupt controller */ up_enable_irq(LPC17_IRQ_USB); /* enable USB interrupt */ - udbg("USB host Initialized, Device connected:%s\n", - priv->connected ? "YES" : "NO"); + uinfo("USB host Initialized, Device connected:%s\n", + priv->connected ? "YES" : "NO"); return &g_usbconn; } diff --git a/arch/arm/src/lpc214x/Kconfig b/arch/arm/src/lpc214x/Kconfig index 68926095cf0deb8d235805575f08c988e03c1c74..a9fc00c245e5beaa0baba9e763fbcf451da98d93 100644 --- a/arch/arm/src/lpc214x/Kconfig +++ b/arch/arm/src/lpc214x/Kconfig @@ -140,7 +140,7 @@ config LPC214X_USBDEV_FRAME_INTERRUPT config LPC214X_USBDEV_REGDEBUG bool "USB Device Register-Level Debug Output" default n - depends on DEBUG + depends on DEBUG_FEATURES endmenu endif diff --git a/arch/arm/src/lpc214x/lpc214x_decodeirq.c b/arch/arm/src/lpc214x/lpc214x_decodeirq.c index 382c0bba022a949b9b37ce894b4073f13d821580..331fea560ebcdf2e9434806fc8a4c86d1f1c3bf6 100644 --- a/arch/arm/src/lpc214x/lpc214x_decodeirq.c +++ b/arch/arm/src/lpc214x/lpc214x_decodeirq.c @@ -111,8 +111,8 @@ static void lpc214x_decodeirq(uint32_t *regs) #endif { #ifdef CONFIG_SUPPRESS_INTERRUPTS - lowsyslog(LOG_ERR, "Unexpected IRQ\n"); CURRENT_REGS = regs; + err("ERROR: Unexpected IRQ\n"); PANIC(); #else diff --git a/arch/arm/src/lpc214x/lpc214x_head.S b/arch/arm/src/lpc214x/lpc214x_head.S index 8db27f29ebde0131b6debe98baf61c91b2c28949..c0d6c7651005064685c3af454ee3866ac941e9d1 100644 --- a/arch/arm/src/lpc214x/lpc214x_head.S +++ b/arch/arm/src/lpc214x/lpc214x_head.S @@ -280,7 +280,7 @@ */ .macro showprogress, code -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES mov r0, #\code bl up_lowputc #endif diff --git a/arch/arm/src/lpc214x/lpc214x_serial.c b/arch/arm/src/lpc214x/lpc214x_serial.c index 62b18ecfe35d4a89935de94b3c94922b961673a8..e1b3511f9ca45dfa2eef6f85718a832aba4d08ae 100644 --- a/arch/arm/src/lpc214x/lpc214x_serial.c +++ b/arch/arm/src/lpc214x/lpc214x_serial.c @@ -530,7 +530,7 @@ static int up_interrupt(int irq, void *context) /* Read the modem status register (MSR) to clear */ status = up_serialin(priv, LPC214X_UART_MSR_OFFSET); - vdbg("MSR: %02x\n", status); + _info("MSR: %02x\n", status); break; } @@ -541,7 +541,7 @@ static int up_interrupt(int irq, void *context) /* Read the line status register (LSR) to clear */ status = up_serialin(priv, LPC214X_UART_LSR_OFFSET); - vdbg("LSR: %02x\n", status); + _info("LSR: %02x\n", status); break; } @@ -549,7 +549,7 @@ static int up_interrupt(int irq, void *context) default: { - dbg("Unexpected IIR: %02x\n", status); + _err("ERROR: Unexpected IIR: %02x\n", status); break; } } diff --git a/arch/arm/src/lpc214x/lpc214x_usbdev.c b/arch/arm/src/lpc214x/lpc214x_usbdev.c index 5c058a6bc3b297353ab3cfd76311a76ca3ca6b98..636c7391251bb145d0e7a9a68e0e6410fafa8279 100644 --- a/arch/arm/src/lpc214x/lpc214x_usbdev.c +++ b/arch/arm/src/lpc214x/lpc214x_usbdev.c @@ -104,7 +104,7 @@ # define USB_FRAME_INT 0 #endif -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES # define USB_ERROR_INT USBDEV_DEVINT_EPRINT #else # define USB_ERROR_INT 0 @@ -382,7 +382,7 @@ struct lpc214x_usbdev_s /* Register operations ********************************************************/ -#if defined(CONFIG_LPC214X_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_LPC214X_USBDEV_REGDEBUG static uint32_t lpc214x_getreg(uint32_t addr); static void lpc214x_putreg(uint32_t val, uint32_t addr); #else @@ -518,7 +518,7 @@ static const struct usbdev_ops_s g_devops = * ****************************************************************************/ -#if defined(CONFIG_LPC214X_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_LPC214X_USBDEV_REGDEBUG static uint32_t lpc214x_getreg(uint32_t addr) { static uint32_t prevaddr = 0; @@ -539,7 +539,7 @@ static uint32_t lpc214x_getreg(uint32_t addr) { if (count == 4) { - lldbg("...\n"); + uinfo("...\n"); } return val; @@ -556,7 +556,7 @@ static uint32_t lpc214x_getreg(uint32_t addr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + uinfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -568,7 +568,7 @@ static uint32_t lpc214x_getreg(uint32_t addr) /* Show the register value read */ - lldbg("%08x->%08x\n", addr, val); + uinfo("%08x->%08x\n", addr, val); return val; } #endif @@ -581,12 +581,12 @@ static uint32_t lpc214x_getreg(uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_LPC214X_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_LPC214X_USBDEV_REGDEBUG static void lpc214x_putreg(uint32_t val, uint32_t addr) { /* Show the register value being written */ - lldbg("%08x<-%08x\n", addr, val); + uinfo("%08x<-%08x\n", addr, val); /* Write the value */ @@ -1021,8 +1021,9 @@ static int lpc214x_wrrequest(struct lpc214x_ep_s *privep) return OK; } - ullvdbg("epphy=%d req=%p: len=%d xfrd=%d nullpkt=%d\n", - privep->epphy, privreq, privreq->req.len, privreq->req.xfrd, privep->txnullpkt); + uinfo("epphy=%d req=%p: len=%d xfrd=%d nullpkt=%d\n", + privep->epphy, privreq, privreq->req.len, privreq->req.xfrd, + privep->txnullpkt); /* Ignore any attempt to send a zero length packet on anything but EP0IN */ @@ -1130,8 +1131,8 @@ static int lpc214x_rdrequest(struct lpc214x_ep_s *privep) return OK; } - ullvdbg("len=%d xfrd=%d nullpkt=%d\n", - privreq->req.len, privreq->req.xfrd, privep->txnullpkt); + uinfo("len=%d xfrd=%d nullpkt=%d\n", + privreq->req.len, privreq->req.xfrd, privep->txnullpkt); /* Ignore any attempt to receive a zero length packet */ @@ -1552,8 +1553,8 @@ static inline void lpc214x_ep0setup(struct lpc214x_usbdev_s *priv) index = GETUINT16(ctrl.index); len = GETUINT16(ctrl.len); - ullvdbg("type=%02x req=%02x value=%04x index=%04x len=%04x\n", - ctrl.type, ctrl.req, value, index, len); + uinfo("type=%02x req=%02x value=%04x index=%04x len=%04x\n", + ctrl.type, ctrl.req, value, index, len); /* Dispatch any non-standard requests */ @@ -1697,7 +1698,7 @@ static inline void lpc214x_ep0setup(struct lpc214x_usbdev_s *priv) if (((ctrl.type & USB_REQ_RECIPIENT_MASK) == USB_REQ_RECIPIENT_DEVICE) && value == USB_FEATURE_TESTMODE) { - ullvdbg("test mode: %d\n", index); + uinfo("test mode: %d\n", index); } else if ((ctrl.type & USB_REQ_RECIPIENT_MASK) != USB_REQ_RECIPIENT_ENDPOINT) { @@ -2055,7 +2056,7 @@ static int lpc214x_usbinterrupt(int irq, FAR void *context) #endif -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* USB engine error interrupt */ if ((devintstatus & USBDEV_DEVINT_EPRINT)) @@ -2287,7 +2288,7 @@ static int lpc214x_usbinterrupt(int irq, FAR void *context) } else { - ullvdbg("Pending data on OUT endpoint\n"); + uinfo("Pending data on OUT endpoint\n"); priv->rxpending = 1; } } @@ -2378,7 +2379,7 @@ static int lpc214x_dmasetup(struct lpc214x_usbdev_s *priv, uint8_t epphy, struct lpc214x_dmadesc_s *dmadesc = priv; uint32_t reg; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv || epphy < 2) { usbtrace(TRACE_DEVERROR(LPC214X_TRACEERR_INVALIDPARMS), 0); @@ -2577,7 +2578,7 @@ static int lpc214x_epdisable(FAR struct usbdev_ep_s *ep) uint32_t mask = (1 << privep->epphy); uint32_t reg; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { usbtrace(TRACE_DEVERROR(LPC214X_TRACEERR_INVALIDPARMS), 0); @@ -2619,7 +2620,7 @@ static FAR struct usbdev_req_s *lpc214x_epallocreq(FAR struct usbdev_ep_s *ep) { FAR struct lpc214x_req_s *privreq; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { usbtrace(TRACE_DEVERROR(LPC214X_TRACEERR_INVALIDPARMS), 0); @@ -2651,7 +2652,7 @@ static void lpc214x_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_ { FAR struct lpc214x_req_s *privreq = (FAR struct lpc214x_req_s *)req; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !req) { usbtrace(TRACE_DEVERROR(LPC214X_TRACEERR_INVALIDPARMS), 0); @@ -2759,11 +2760,12 @@ static int lpc214x_epsubmit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s irqstate_t flags; int ret = OK; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!req || !req->callback || !req->buf || !ep) { usbtrace(TRACE_DEVERROR(LPC214X_TRACEERR_INVALIDPARMS), 0); - ullvdbg("req=%p callback=%p buf=%p ep=%p\n", req, req->callback, req->buf, ep); + uinfo("req=%p callback=%p buf=%p ep=%p\n", + req, req->callback, req->buf, ep); return -EINVAL; } #endif @@ -2844,7 +2846,7 @@ static int lpc214x_epcancel(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s FAR struct lpc214x_ep_s *privep = (FAR struct lpc214x_ep_s *)ep; irqstate_t flags; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !req) { usbtrace(TRACE_DEVERROR(LPC214X_TRACEERR_INVALIDPARMS), 0); @@ -3107,7 +3109,7 @@ static int lpc214x_selfpowered(struct usbdev_s *dev, bool selfpowered) usbtrace(TRACE_DEVSELFPOWERED, (uint16_t)selfpowered); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev) { usbtrace(TRACE_DEVERROR(LPC214X_TRACEERR_INVALIDPARMS), 0); @@ -3322,7 +3324,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) usbtrace(TRACE_DEVREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !driver->ops->bind || !driver->ops->unbind || !driver->ops->disconnect || !driver->ops->setup) { @@ -3372,7 +3374,7 @@ int usbdev_unregister(struct usbdevclass_driver_s *driver) { usbtrace(TRACE_DEVUNREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (driver != g_usbdev.driver) { usbtrace(TRACE_DEVERROR(LPC214X_TRACEERR_INVALIDPARMS), 0); diff --git a/arch/arm/src/lpc2378/Kconfig b/arch/arm/src/lpc2378/Kconfig index 08197970c66441ba32757d370888ef34abbf7406..eb9cba75701bf43af424c84e4c63e2ca32329783 100644 --- a/arch/arm/src/lpc2378/Kconfig +++ b/arch/arm/src/lpc2378/Kconfig @@ -185,7 +185,7 @@ config LPC2378_USBDEV_FRAME_INTERRUPT config LPC2378_USBDEV_REGDEBUG bool "USB Device Register-Level Debug Output" default n - depends on DEBUG + depends on DEBUG_FEATURES endmenu endif diff --git a/arch/arm/src/lpc2378/lpc23xx_decodeirq.c b/arch/arm/src/lpc2378/lpc23xx_decodeirq.c index aca536e6651cbfdc90d61faea9ef5ff466d99a69..9c0e0b5b76454b495414eede55a329769e396493 100644 --- a/arch/arm/src/lpc2378/lpc23xx_decodeirq.c +++ b/arch/arm/src/lpc2378/lpc23xx_decodeirq.c @@ -110,9 +110,9 @@ static void lpc23xx_decodeirq(uint32_t *regs) #endif { #ifdef CONFIG_SUPPRESS_INTERRUPTS - lowsyslog(LOG_ERR, "Unexpected IRQ\n"); - CURRENT_REGS = regs; PANIC(); + err("ERROR: Unexpected IRQ\n"); + CURRENT_REGS = regs; #else /* Check which IRQ fires */ diff --git a/arch/arm/src/lpc2378/lpc23xx_head.S b/arch/arm/src/lpc2378/lpc23xx_head.S index 179b390271c02226308150de9ae423983f223189..551f2d240e7275403bfeeb92b84c81f90bfe93ac 100644 --- a/arch/arm/src/lpc2378/lpc23xx_head.S +++ b/arch/arm/src/lpc2378/lpc23xx_head.S @@ -60,7 +60,7 @@ * modify r0, r1, r2 and r14 */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES .macro showprogress, code mov r0, #\code bl up_lowputc diff --git a/arch/arm/src/lpc2378/lpc23xx_i2c.c b/arch/arm/src/lpc2378/lpc23xx_i2c.c index 54efbc52c00e04c480665578692c786d0a6521c5..1c281e8857411f5f2e356d5eb7801634c50fd617 100644 --- a/arch/arm/src/lpc2378/lpc23xx_i2c.c +++ b/arch/arm/src/lpc2378/lpc23xx_i2c.c @@ -490,7 +490,7 @@ struct i2c_master_s *lpc2378_i2cbus_initialize(int port) if (port > 1) { - dbg("lpc I2C Only support 0,1\n"); + l2cerr("ERROR: lpc I2C Only support 0,1\n"); return NULL; } diff --git a/arch/arm/src/lpc2378/lpc23xx_serial.c b/arch/arm/src/lpc2378/lpc23xx_serial.c index 9650a0827a3b21f490a9977af901f9166cb090b4..48e322ec15adf7545c81b12abf4ca7c286c80d92 100644 --- a/arch/arm/src/lpc2378/lpc23xx_serial.c +++ b/arch/arm/src/lpc2378/lpc23xx_serial.c @@ -320,14 +320,14 @@ static inline void up_configbaud(struct up_dev_s *priv) /* Test values calculated for every multiplier/divisor combination */ uint32_t tdiv; - uint32_t terr; + uint32_t tmperr; int tmulval; int tdivaddval; /* Optimal multiplier/divider values */ uint32_t div = 0; - uint32_t err = 100000; + uint32_t errval = 100000; int mulval = 1; int divaddval = 0; @@ -350,13 +350,13 @@ static inline void up_configbaud(struct up_dev_s *priv) /* Try every valid multiplier, tmulval (or until a perfect match is found). */ - for (tmulval = 1; tmulval <= 15 && err > 0; tmulval++) + for (tmulval = 1; tmulval <= 15 && errval > 0; tmulval++) { /* Try every valid pre-scale div, tdivaddval (or until a perfect match is * found). */ - for (tdivaddval = 0; tdivaddval <= 15 && err > 0; tdivaddval++) + for (tdivaddval = 0; tdivaddval <= 15 && errval > 0; tdivaddval++) { /* Calculate the divisor with these fractional divider settings */ @@ -373,16 +373,16 @@ static inline void up_configbaud(struct up_dev_s *priv) if (actualbaud <= priv->baud) { - terr = priv->baud - actualbaud; + tmperr = priv->baud - actualbaud; } else { - terr = actualbaud - priv->baud; + tmperr = actualbaud - priv->baud; } /* Is this the smallest error we have encountered? */ - if (terr < err) + if (tmperr < errval) { /* Yes, save these settings as the new, candidate optimal * settings @@ -391,7 +391,7 @@ static inline void up_configbaud(struct up_dev_s *priv) mulval = tmulval; divaddval = tdivaddval; div = tdiv; - err = terr; + errval = tmperr; } } } @@ -648,7 +648,7 @@ static int up_interrupt(int irq, void *context) /* Read the modem status register (MSR) to clear */ status = up_serialin(priv, UART_MSR_OFFSET); - vdbg("MSR: %02x\n", status); + _info("MSR: %02x\n", status); break; } @@ -659,7 +659,7 @@ static int up_interrupt(int irq, void *context) /* Read the line status register (LSR) to clear */ status = up_serialin(priv, UART_LSR_OFFSET); - vdbg("LSR: %02x\n", status); + _info("LSR: %02x\n", status); break; } @@ -667,7 +667,7 @@ static int up_interrupt(int irq, void *context) default: { - dbg("Unexpected IIR: %02x\n", status); + _err("ERROR: Unexpected IIR: %02x\n", status); break; } } diff --git a/arch/arm/src/lpc2378/lpc23xx_spi.c b/arch/arm/src/lpc2378/lpc23xx_spi.c index 42c951c9540eafdca16df6aaef7c56be38da5ab6..cf95f63a8bcdbf4797864ce7d66b0c737160d41e 100644 --- a/arch/arm/src/lpc2378/lpc23xx_spi.c +++ b/arch/arm/src/lpc2378/lpc23xx_spi.c @@ -75,21 +75,6 @@ # error CONFIG_SPI_EXCHANGE is not supported by this driver #endif -/* Debug ********************************************************************/ -/* CONFIG_DEBUG_SPI enables debug output from this file */ - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - /* SPI Clocking. * * The CPU clock is divided by by 1, 2, 4, or 8 to get the SPI peripheral @@ -289,7 +274,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) priv->frequency = frequency; priv->actual = actual; - spidbg("Frequency %d->%d\n", frequency, actual); + spiinfo("Frequency %d->%d\n", frequency, actual); return actual; } @@ -453,7 +438,7 @@ static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size FAR uint8_t *ptr = (FAR uint8_t *)buffer; uint8_t data; - spidbg("nwords: %d\n", nwords); + spiinfo("nwords: %d\n", nwords); while (nwords) { /* Write the data to transmitted to the SPI Data Register */ @@ -498,7 +483,7 @@ static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nw { FAR uint8_t *ptr = (FAR uint8_t *)buffer; - spidbg("nwords: %d\n", nwords); + spiinfo("nwords: %d\n", nwords); while (nwords) { /* Write some dummy data to the SPI Data Register in order to clock the diff --git a/arch/arm/src/lpc31xx/Kconfig b/arch/arm/src/lpc31xx/Kconfig index ffdaa81146074f8e13b6a2ae858a5931459c397b..addeaf16e423c3ed1f96a91d02bda779c014078c 100644 --- a/arch/arm/src/lpc31xx/Kconfig +++ b/arch/arm/src/lpc31xx/Kconfig @@ -243,10 +243,11 @@ config LPC31_USBDEV_DMA config LPC31_USBDEV_REGDEBUG bool "Register level debug" - depends on DEBUG + depends on DEBUG_USB_INFO default n ---help--- - Output detailed register-level USB device debug information. Requires also DEBUG. + Output detailed register-level USB device debug information. Requires + also CONFIG_DEBUG_USB_INFO. endmenu # USB device driver controller (DCD) options endif # LPC31_USBOTG && USBDEV @@ -300,7 +301,7 @@ config LPC31_EHCI_PREALLOCATE config LPC31_EHCI_REGDEBUG bool "Enable low-level EHCI register debug" default n - depends on DEBUG + depends on DEBUG_USB_INFO endmenu # USB host controller driver (HCD) options endif # LPC31_USBOTG && USBHOST @@ -309,9 +310,9 @@ menu "SPI device driver options" config LPC31_SPI_REGDEBUG bool "SPI Register level debug" - depends on LPC31_SPI && DEBUG + depends on LPC31_SPI && DEBUG_SPI_INFO default n ---help--- - Output detailed register-level SPI device debug information. Requires also DEBUG. + Output detailed register-level SPI device debug information. Requires also CONFIG_DEBUG_SPI_INFO. endmenu # SPI device driver options diff --git a/arch/arm/src/lpc31xx/lpc31_decodeirq.c b/arch/arm/src/lpc31xx/lpc31_decodeirq.c index 9cfcd3f44353ad25f65f716c4265b823d89e7134..a4f7a11628fa92fc452f77eec4e382c3148e2004 100644 --- a/arch/arm/src/lpc31xx/lpc31_decodeirq.c +++ b/arch/arm/src/lpc31xx/lpc31_decodeirq.c @@ -76,8 +76,8 @@ void up_decodeirq(uint32_t *regs) { #ifdef CONFIG_SUPPRESS_INTERRUPTS - lowsyslog(LOG_ERR, "Unexpected IRQ\n"); CURRENT_REGS = regs; + err("ERROR: Unexpected IRQ\n"); PANIC(); #else int index; diff --git a/arch/arm/src/lpc31xx/lpc31_ehci.c b/arch/arm/src/lpc31xx/lpc31_ehci.c index 67ef095f2d39e3ba0267c926646f284587319c97..e37abe4997f5e3302a668493760845cda9ab2dda 100644 --- a/arch/arm/src/lpc31xx/lpc31_ehci.c +++ b/arch/arm/src/lpc31xx/lpc31_ehci.c @@ -113,7 +113,7 @@ /* Debug options */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_USB_INFO # undef CONFIG_LPC31_EHCI_REGDEBUG #endif @@ -122,13 +122,6 @@ #undef CONFIG_USBHOST_ISOC_DISABLE #define CONFIG_USBHOST_ISOC_DISABLE 1 -/* Simplify DEBUG checks */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_USB -#endif - /* Registers *******************************************************************/ /* Traditionally, NuttX specifies register locations using individual * register offsets from a base address. That tradition is broken here and, @@ -833,7 +826,7 @@ static uint32_t lpc31_swap32(uint32_t value) static void lpc31_printreg(volatile uint32_t *regaddr, uint32_t regval, bool iswrite) { - lldbg("%08x%s%08x\n", (uintptr_t)regaddr, iswrite ? "<-" : "->", regval); + uinfo("%08x%s%08x\n", (uintptr_t)regaddr, iswrite ? "<-" : "->", regval); } #endif @@ -884,7 +877,7 @@ static void lpc31_checkreg(volatile uint32_t *regaddr, uint32_t regval, bool isw { /* No.. More than one. */ - lldbg("[repeats %d more times]\n", count); + uinfo("[repeats %d more times]\n", count); } } @@ -1463,13 +1456,13 @@ static int lpc31_qh_flush(struct lpc31_qh_s *qh) #ifdef CONFIG_LPC31_EHCI_REGDEBUG static void lpc31_qtd_print(struct lpc31_qtd_s *qtd) { - udbg(" QTD[%p]:\n", qtd); - udbg(" hw:\n"); - udbg(" nqp: %08x alt: %08x token: %08x\n", - qtd->hw.nqp, qtd->hw.alt, qtd->hw.token); - udbg(" bpl: %08x %08x %08x %08x %08x\n", - qtd->hw.bpl[0], qtd->hw.bpl[1], qtd->hw.bpl[2], - qtd->hw.bpl[3], qtd->hw.bpl[4]); + uinfo(" QTD[%p]:\n", qtd); + uinfo(" hw:\n"); + uinfo(" nqp: %08x alt: %08x token: %08x\n", + qtd->hw.nqp, qtd->hw.alt, qtd->hw.token); + uinfo(" bpl: %08x %08x %08x %08x %08x\n", + qtd->hw.bpl[0], qtd->hw.bpl[1], qtd->hw.bpl[2], + qtd->hw.bpl[3], qtd->hw.bpl[4]); } #endif @@ -1487,30 +1480,30 @@ static void lpc31_qh_print(struct lpc31_qh_s *qh) struct lpc31_epinfo_s *epinfo; struct ehci_overlay_s *overlay; - udbg("QH[%p]:\n", qh); - udbg(" hw:\n"); - udbg(" hlp: %08x epchar: %08x epcaps: %08x cqp: %08x\n", - qh->hw.hlp, qh->hw.epchar, qh->hw.epcaps, qh->hw.cqp); + uinfo("QH[%p]:\n", qh); + uinfo(" hw:\n"); + uinfo(" hlp: %08x epchar: %08x epcaps: %08x cqp: %08x\n", + qh->hw.hlp, qh->hw.epchar, qh->hw.epcaps, qh->hw.cqp); overlay = &qh->hw.overlay; - udbg(" overlay:\n"); - udbg(" nqp: %08x alt: %08x token: %08x\n", - overlay->nqp, overlay->alt, overlay->token); - udbg(" bpl: %08x %08x %08x %08x %08x\n", - overlay->bpl[0], overlay->bpl[1], overlay->bpl[2], - overlay->bpl[3], overlay->bpl[4]); + uinfo(" overlay:\n"); + uinfo(" nqp: %08x alt: %08x token: %08x\n", + overlay->nqp, overlay->alt, overlay->token); + uinfo(" bpl: %08x %08x %08x %08x %08x\n", + overlay->bpl[0], overlay->bpl[1], overlay->bpl[2], + overlay->bpl[3], overlay->bpl[4]); - udbg(" fqp:\n", qh->fqp); + uinfo(" fqp:\n", qh->fqp); epinfo = qh->epinfo; - udbg(" epinfo[%p]:\n", epinfo); + uinfo(" epinfo[%p]:\n", epinfo); if (epinfo) { - udbg(" EP%d DIR=%s FA=%08x TYPE=%d MaxPacket=%d\n", - epinfo->epno, epinfo->dirin ? "IN" : "OUT", epinfo->devaddr, - epinfo->xfrtype, epinfo->maxpacket); - udbg(" Toggle=%d iocwait=%d speed=%d result=%d\n", - epinfo->toggle, epinfo->iocwait, epinfo->speed, epinfo->result); + uinfo(" EP%d DIR=%s FA=%08x TYPE=%d MaxPacket=%d\n", + epinfo->epno, epinfo->dirin ? "IN" : "OUT", epinfo->devaddr, + epinfo->xfrtype, epinfo->maxpacket); + uinfo(" Toggle=%d iocwait=%d speed=%d result=%d\n", + epinfo->toggle, epinfo->iocwait, epinfo->speed, epinfo->result); } } #endif @@ -2113,7 +2106,7 @@ static int lpc31_async_setup(struct lpc31_rhport_s *rhport, #ifdef CONFIG_USBHOST_TRACE usbhost_vtrace2(EHCI_VTRACE2_ASYNCXFR, epinfo->epno, buflen); #else - uvdbg("RHport%d EP%d: buffer=%p, buflen=%d, req=%p\n", + uinfo("RHport%d EP%d: buffer=%p, buflen=%d, req=%p\n", RHPORT(rhport), epinfo->epno, buffer, buflen, req); #endif @@ -2391,7 +2384,7 @@ static int lpc31_intr_setup(struct lpc31_rhport_s *rhport, #ifdef CONFIG_USBHOST_TRACE usbhost_vtrace2(EHCI_VTRACE2_INTRXFR, epinfo->epno, buflen); #else - uvdbg("RHport%d EP%d: buffer=%p, buflen=%d\n", + uinfo("RHport%d EP%d: buffer=%p, buflen=%d\n", RHPORT(rhport), epinfo->epno, buffer, buflen); #endif @@ -3377,7 +3370,7 @@ static int lpc31_ehci_interrupt(int irq, FAR void *context) #ifdef CONFIG_USBHOST_TRACE usbhost_vtrace1(EHCI_VTRACE1_TOPHALF, usbsts & regval); #else - ullvdbg("USBSTS: %08x USBINTR: %08x\n", usbsts, regval); + uinfo("USBSTS: %08x USBINTR: %08x\n", usbsts, regval); #endif /* Handle all unmasked interrupt sources */ @@ -3909,7 +3902,7 @@ static int lpc31_epalloc(FAR struct usbhost_driver_s *drvr, #ifdef CONFIG_USBHOST_TRACE usbhost_vtrace2(EHCI_VTRACE2_EPALLOC, epdesc->addr, epdesc->xfrtype); #else - uvdbg("EP%d DIR=%s FA=%08x TYPE=%d Interval=%d MaxPacket=%d\n", + uinfo("EP%d DIR=%s FA=%08x TYPE=%d Interval=%d MaxPacket=%d\n", epdesc->addr, epdesc->in ? "IN" : "OUT", hport->funcaddr, epdesc->xfrtype, epdesc->interval, epdesc->mxpacketsize); #endif @@ -4199,7 +4192,7 @@ static int lpc31_ctrlin(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, #ifdef CONFIG_USBHOST_TRACE usbhost_vtrace2(EHCI_VTRACE2_CTRLINOUT, RHPORT(rhport), req->req); #else - uvdbg("RHPort%d type: %02x req: %02x value: %02x%02x index: %02x%02x len: %04x\n", + uinfo("RHPort%d type: %02x req: %02x value: %02x%02x index: %02x%02x len: %04x\n", RHPORT(rhport), req->type, req->req, req->value[1], req->value[0], req->index[1], req->index[0], len); #endif @@ -4222,7 +4215,7 @@ static int lpc31_ctrlin(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, ret = lpc31_async_setup(rhport, ep0info, req, buffer, len); if (ret < 0) { - udbg("ERROR: lpc31_async_setup failed: %d\n", ret); + uerr("ERROR: lpc31_async_setup failed: %d\n", ret); goto errout_with_iocwait; } @@ -4687,7 +4680,7 @@ static int lpc31_connect(FAR struct usbhost_driver_s *drvr, /* Set the connected/disconnected flag */ hport->connected = connected; - ullvdbg("Hub port %d connected: %s\n", hport->port, connected ? "YES" : "NO"); + uinfo("Hub port %d connected: %s\n", hport->port, connected ? "YES" : "NO"); /* Report the connection event */ @@ -4887,7 +4880,7 @@ FAR struct usbhost_connection_s *lpc31_ehci_initialize(int controller) { FAR struct usbhost_hubport_s *hport; uint32_t regval; -#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_ASSERTIONS) uint16_t regval16; unsigned int nports; #endif @@ -5140,7 +5133,7 @@ FAR struct usbhost_connection_s *lpc31_ehci_initialize(int controller) lpc31_putreg(EHCI_INT_ALLINTS, &HCOR->usbsts); -#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_ASSERTIONS) /* Show the EHCI version */ regval16 = lpc31_swap16(HCCR->hciversion); diff --git a/arch/arm/src/lpc31xx/lpc31_lowputc.c b/arch/arm/src/lpc31xx/lpc31_lowputc.c index 3e3213927f14b5c804598dc66bd9584febb54f27..7d1335fd5ad91605e993234f426c05fb00a656e7 100644 --- a/arch/arm/src/lpc31xx/lpc31_lowputc.c +++ b/arch/arm/src/lpc31xx/lpc31_lowputc.c @@ -144,14 +144,14 @@ static inline void up_configbaud(void) /* Test values calculated for every multiplier/divisor combination */ uint32_t tdiv; - uint32_t terr; + uint32_t tmperr; int tmulval; int tdivaddval; /* Optimal multiplier/divider values */ uint32_t div = 0; - uint32_t err = 100000; + uint32_t errval = 100000; int mulval = 1; int divaddval = 0; @@ -176,13 +176,13 @@ static inline void up_configbaud(void) * match is found). */ - for (tmulval = 1 ; tmulval <= 15 && err > 0; tmulval++) + for (tmulval = 1 ; tmulval <= 15 && errval > 0; tmulval++) { /* Try every valid pre-scale div, tdivaddval (or until a perfect * match is found). */ - for (tdivaddval = 0 ; tdivaddval <= 15 && err > 0; tdivaddval++) + for (tdivaddval = 0 ; tdivaddval <= 15 && errval > 0; tdivaddval++) { /* Calculate the divisor with these fractional divider settings */ @@ -199,23 +199,23 @@ static inline void up_configbaud(void) if (actualbaud <= CONFIG_UART_BAUD) { - terr = CONFIG_UART_BAUD - actualbaud; + tmperr = CONFIG_UART_BAUD - actualbaud; } else { - terr = actualbaud - CONFIG_UART_BAUD; + tmperr = actualbaud - CONFIG_UART_BAUD; } /* Is this the smallest error we have encountered? */ - if (terr < err) + if (tmperr < errval) { /* Yes, save these settings as the new, candidate optimal settings */ - mulval = tmulval ; + mulval = tmulval ; divaddval = tdivaddval; div = tdiv; - err = terr; + errval = tmperr; } } } diff --git a/arch/arm/src/lpc31xx/lpc31_serial.c b/arch/arm/src/lpc31xx/lpc31_serial.c index 6567ce267e15179d51e23a4e16265e876d27c61d..bf5ac8cd5869fc895fc8245e7290b621cec4a8ab 100644 --- a/arch/arm/src/lpc31xx/lpc31_serial.c +++ b/arch/arm/src/lpc31xx/lpc31_serial.c @@ -215,14 +215,14 @@ static inline void up_configbaud(void) /* Test values calculated for every multiplier/divisor combination */ uint32_t tdiv; - uint32_t terr; + uint32_t tmperr; int tmulval; int tdivaddval; /* Optimal multiplier/divider values */ uint32_t div = 0; - uint32_t err = 100000; + uint32_t errval = 100000; int mulval = 1; int divaddval = 0; @@ -247,13 +247,13 @@ static inline void up_configbaud(void) * match is found). */ - for (tmulval = 1 ; tmulval <= 15 && err > 0; tmulval++) + for (tmulval = 1 ; tmulval <= 15 && errval > 0; tmulval++) { /* Try every valid pre-scale div, tdivaddval (or until a perfect * match is found). */ - for (tdivaddval = 0 ; tdivaddval <= 15 && err > 0; tdivaddval++) + for (tdivaddval = 0 ; tdivaddval <= 15 && errval > 0; tdivaddval++) { /* Calculate the divisor with these fractional divider settings */ @@ -270,23 +270,23 @@ static inline void up_configbaud(void) if (actualbaud <= CONFIG_UART_BAUD) { - terr = CONFIG_UART_BAUD - actualbaud; + tmperr = CONFIG_UART_BAUD - actualbaud; } else { - terr = actualbaud - CONFIG_UART_BAUD; + tmperr = actualbaud - CONFIG_UART_BAUD; } /* Is this the smallest error we have encountered? */ - if (terr < err) + if (tmperr < errval) { /* Yes, save these settings as the new, candidate optimal settings */ - mulval = tmulval ; + mulval = tmulval ; divaddval = tdivaddval; div = tdiv; - err = terr; + errval = tmperr; } } } @@ -541,7 +541,7 @@ static int up_interrupt(int irq, void *context) /* Read the modem status register (MSR) to clear */ status = getreg32(LPC31_UART_MSR); - fvdbg("MSR: %02x\n", status); + finfo("MSR: %02x\n", status); break; } @@ -552,7 +552,7 @@ static int up_interrupt(int irq, void *context) /* Read the line status register (LSR) to clear */ status = getreg32(LPC31_UART_LSR); - fvdbg("LSR: %02x\n", status); + finfo("LSR: %02x\n", status); break; } @@ -560,7 +560,7 @@ static int up_interrupt(int irq, void *context) default: { - dbg("Unexpected IIR: %02x\n", status); + _err("ERROR: Unexpected IIR: %02x\n", status); break; } } diff --git a/arch/arm/src/lpc31xx/lpc31_spi.c b/arch/arm/src/lpc31xx/lpc31_spi.c index f750ca0792db960e6025838e5975bacabfb70076..ca2544bc2654d65966bf372cdb66992fdd0bd178 100644 --- a/arch/arm/src/lpc31xx/lpc31_spi.c +++ b/arch/arm/src/lpc31xx/lpc31_spi.c @@ -63,10 +63,10 @@ /* Debug ****************************************************************************/ /* CONFIG_LPC31_SPI_REGDEBUG enabled very low, register-level debug output. - * CONFIG_DEBUG must also be defined + * CONFIG_DEBUG_FEATURES must also be defined */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_SPI_INFO # undef CONFIG_LPC31_SPI_REGDEBUG #endif @@ -207,7 +207,7 @@ static bool spi_checkreg(bool wr, uint32_t value, uint32_t address) { if (g_ntimes > 0) { - lldbg("...[Repeats %d times]...\n", g_ntimes); + spiinfo("...[Repeats %d times]...\n", g_ntimes); } g_wrlast = wr; @@ -239,7 +239,7 @@ static void spi_putreg(uint32_t value, uint32_t address) { if (spi_checkreg(true, value, address)) { - lldbg("%08x<-%08x\n", address, value); + spiinfo("%08x<-%08x\n", address, value); } putreg32(value, address); } @@ -265,7 +265,7 @@ static uint32_t spi_getreg(uint32_t address) uint32_t value = getreg32(address); if (spi_checkreg(false, value, address)) { - lldbg("%08x->%08x\n", address, value); + spiinfo("%08x->%08x\n", address, value); } return value; } @@ -921,10 +921,10 @@ FAR struct spi_dev_s *lpc31_spibus_initialize(int port) */ #ifdef CONFIG_LPC31_SPI_REGDEBUG - lldbg("PINS: %08x MODE0: %08x MODE1: %08x\n", - spi_getreg(LPC31_IOCONFIG_SPI_PINS), - spi_getreg(LPC31_IOCONFIG_SPI_MODE0), - spi_getreg(LPC31_IOCONFIG_SPI_MODE1)); + spiinfo("PINS: %08x MODE0: %08x MODE1: %08x\n", + spi_getreg(LPC31_IOCONFIG_SPI_PINS), + spi_getreg(LPC31_IOCONFIG_SPI_MODE0), + spi_getreg(LPC31_IOCONFIG_SPI_MODE1)); #endif /* Enable SPI clocks */ diff --git a/arch/arm/src/lpc31xx/lpc31_usbdev.c b/arch/arm/src/lpc31xx/lpc31_usbdev.c index c1ece00bf6f37f36e4293690ca5bfcb640f5d61e..1cc9ec0d38b146be0ac6d260a63aa0b8257bdc8e 100644 --- a/arch/arm/src/lpc31xx/lpc31_usbdev.c +++ b/arch/arm/src/lpc31xx/lpc31_usbdev.c @@ -100,7 +100,7 @@ # define USB_FRAME_INT 0 #endif -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES # define USB_ERROR_INT USBDEV_USBINTR_UEE #else # define USB_ERROR_INT 0 @@ -343,7 +343,7 @@ struct lpc31_usbdev_s /* Register operations ********************************************************/ -#if defined(CONFIG_LPC31_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_LPC31_USBDEV_REGDEBUG static uint32_t lpc31_getreg(uint32_t addr); static void lpc31_putreg(uint32_t val, uint32_t addr); #else @@ -480,7 +480,7 @@ static const struct usbdev_ops_s g_devops = * ****************************************************************************/ -#if defined(CONFIG_LPC31_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_LPC31_USBDEV_REGDEBUG static uint32_t lpc31_getreg(uint32_t addr) { static uint32_t prevaddr = 0; @@ -501,7 +501,7 @@ static uint32_t lpc31_getreg(uint32_t addr) { if (count == 4) { - lldbg("...\n"); + uinfo("...\n"); } return val; @@ -518,7 +518,7 @@ static uint32_t lpc31_getreg(uint32_t addr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + uinfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -530,7 +530,7 @@ static uint32_t lpc31_getreg(uint32_t addr) /* Show the register value read */ - lldbg("%08x->%08x\n", addr, val); + uinfo("%08x->%08x\n", addr, val); return val; } #endif @@ -543,12 +543,12 @@ static uint32_t lpc31_getreg(uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_LPC31_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_LPC31_USBDEV_REGDEBUG static void lpc31_putreg(uint32_t val, uint32_t addr) { /* Show the register value being written */ - lldbg("%08x<-%08x\n", addr, val); + uinfo("%08x<-%08x\n", addr, val); /* Write the value */ @@ -1183,8 +1183,8 @@ static inline void lpc31_ep0setup(struct lpc31_usbdev_s *priv) index = GETUINT16(ctrl.index); len = GETUINT16(ctrl.len); - ullvdbg("type=%02x req=%02x value=%04x index=%04x len=%04x\n", - ctrl.type, ctrl.req, value, index, len); + uinfo("type=%02x req=%02x value=%04x index=%04x len=%04x\n", + ctrl.type, ctrl.req, value, index, len); /* Dispatch any non-standard requests */ if ((ctrl.type & USB_REQ_TYPE_MASK) != USB_REQ_TYPE_STANDARD) @@ -1323,7 +1323,7 @@ static inline void lpc31_ep0setup(struct lpc31_usbdev_s *priv) if (((ctrl.type & USB_REQ_RECIPIENT_MASK) == USB_REQ_RECIPIENT_DEVICE) && value == USB_FEATURE_TESTMODE) { - ullvdbg("test mode: %d\n", index); + uinfo("test mode: %d\n", index); } else if ((ctrl.type & USB_REQ_RECIPIENT_MASK) != USB_REQ_RECIPIENT_ENDPOINT) { @@ -1536,7 +1536,7 @@ static void lpc31_ep0complete(struct lpc31_usbdev_s *priv, uint8_t epphy) break; default: -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES DEBUGASSERT(priv->ep0state != EP0STATE_DATA_IN && priv->ep0state != EP0STATE_DATA_OUT && priv->ep0state != EP0STATE_SHORTWRITE && @@ -1578,7 +1578,7 @@ static void lpc31_ep0nak(struct lpc31_usbdev_s *priv, uint8_t epphy) lpc31_ep0state (priv, EP0STATE_WAIT_STATUS_OUT); break; default: -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES DEBUGASSERT(priv->ep0state != EP0STATE_WAIT_NAK_IN && priv->ep0state != EP0STATE_WAIT_NAK_OUT); #endif @@ -1939,7 +1939,7 @@ static int lpc31_epdisable(FAR struct usbdev_ep_s *ep) FAR struct lpc31_ep_s *privep = (FAR struct lpc31_ep_s *)ep; irqstate_t flags; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { usbtrace(TRACE_DEVERROR(LPC31_TRACEERR_INVALIDPARMS), 0); @@ -1977,7 +1977,7 @@ static FAR struct usbdev_req_s *lpc31_epallocreq(FAR struct usbdev_ep_s *ep) { FAR struct lpc31_req_s *privreq; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { usbtrace(TRACE_DEVERROR(LPC31_TRACEERR_INVALIDPARMS), 0); @@ -2009,7 +2009,7 @@ static void lpc31_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s { FAR struct lpc31_req_s *privreq = (FAR struct lpc31_req_s *)req; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !req) { usbtrace(TRACE_DEVERROR(LPC31_TRACEERR_INVALIDPARMS), 0); @@ -2079,11 +2079,11 @@ static int lpc31_epsubmit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *r irqstate_t flags; int ret = OK; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!req || !req->callback || !req->buf || !ep) { usbtrace(TRACE_DEVERROR(LPC31_TRACEERR_INVALIDPARMS), 0); - ullvdbg("req=%p callback=%p buf=%p ep=%p\n", req, req->callback, req->buf, ep); + uinfo("req=%p callback=%p buf=%p ep=%p\n", req, req->callback, req->buf, ep); return -EINVAL; } #endif @@ -2144,7 +2144,7 @@ static int lpc31_epcancel(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *r FAR struct lpc31_ep_s *privep = (FAR struct lpc31_ep_s *)ep; irqstate_t flags; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !req) { usbtrace(TRACE_DEVERROR(LPC31_TRACEERR_INVALIDPARMS), 0); @@ -2423,7 +2423,7 @@ static int lpc31_selfpowered(struct usbdev_s *dev, bool selfpowered) usbtrace(TRACE_DEVSELFPOWERED, (uint16_t)selfpowered); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev) { usbtrace(TRACE_DEVERROR(LPC31_TRACEERR_INVALIDPARMS), 0); @@ -2655,7 +2655,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) usbtrace(TRACE_DEVREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !driver->ops->bind || !driver->ops->unbind || !driver->ops->disconnect || !driver->ops->setup) { @@ -2716,7 +2716,7 @@ int usbdev_unregister(struct usbdevclass_driver_s *driver) { usbtrace(TRACE_DEVUNREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (driver != g_usbdev.driver) { usbtrace(TRACE_DEVERROR(LPC31_TRACEERR_INVALIDPARMS), 0); diff --git a/arch/arm/src/lpc43xx/Kconfig b/arch/arm/src/lpc43xx/Kconfig index 5b7d730151e58a4a9065a7a03a0edd4664c4e5ac..e7f830ed2ba5157cebaab467868cfd77e34d7874 100644 --- a/arch/arm/src/lpc43xx/Kconfig +++ b/arch/arm/src/lpc43xx/Kconfig @@ -314,6 +314,12 @@ config LPC43_WWDT endmenu # LPC43xx Peripheral Support +config LPC43_GPIO_IRQ + bool "GPIO interrupt support" + default n + ---help--- + Enable support for GPIO interrupts + if LPC43_ETHERNET menu "Ethernet MAC configuration" @@ -451,9 +457,9 @@ config LPC43_RMII config LPC43_ETHERNET_REGDEBUG bool "Register-Level Debug" default n - depends on DEBUG + depends on DEBUG_NET_INFO ---help--- - Enable very low-level register access debug. Depends on DEBUG. + Enable very low-level register access debug. Depends on CONFIG_DEBUG_NET_INFO. endmenu # Ethernet MAC configuration endif # LPC43_ETHERNET diff --git a/arch/arm/src/lpc43xx/Make.defs b/arch/arm/src/lpc43xx/Make.defs index 018b929d4d42044b823d084fc37cc14c2a8a5609..6e5d7ef3a789e822e5243a1608208cb3bb9e5d74 100644 --- a/arch/arm/src/lpc43xx/Make.defs +++ b/arch/arm/src/lpc43xx/Make.defs @@ -110,7 +110,7 @@ ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) CHIP_CSRCS += lpc43_idle.c endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) CHIP_CSRCS += lpc43_debug.c endif @@ -118,7 +118,7 @@ ifeq ($(CONFIG_LPC43_GPDMA),y) CHIP_CSRCS += lpc43_gpdma.c endif -ifeq ($(CONFIG_GPIO_IRQ),y) +ifeq ($(CONFIG_LPC43_GPIO_IRQ),y) CHIP_CSRCS += lpc43_gpioint.c endif diff --git a/arch/arm/src/lpc43xx/lpc43_dac.c b/arch/arm/src/lpc43xx/lpc43_dac.c index 16fa92a36547167452602bb8142ac73d9a7cb2c5..51b7000def9c1df808a41d6bca37f802cf7c0634 100644 --- a/arch/arm/src/lpc43xx/lpc43_dac.c +++ b/arch/arm/src/lpc43xx/lpc43_dac.c @@ -173,7 +173,7 @@ static int dac_send(FAR struct dac_dev_s *dev, FAR struct dac_msg_s *msg) static int dac_ioctl(FAR struct dac_dev_s *dev, int cmd, unsigned long arg) { - dbg("Fix me:Not Implemented\n"); + aerr("ERROR: Fix me:Not Implemented\n"); return 0; } diff --git a/arch/arm/src/lpc43xx/lpc43_debug.c b/arch/arm/src/lpc43xx/lpc43_debug.c index 51cf9470672601f15904c445e435afdcbd7c058a..3b20bc63e74116d6d44f7fbb99003b4093b4d132 100644 --- a/arch/arm/src/lpc43xx/lpc43_debug.c +++ b/arch/arm/src/lpc43xx/lpc43_debug.c @@ -47,23 +47,12 @@ #include "lpc43_pinconfig.h" #include "lpc43_gpio.h" -#ifdef CONFIG_DEBUG - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ +#ifdef CONFIG_DEBUG_FEATURES /**************************************************************************** * Public Functions ****************************************************************************/ + /**************************************************************************** * Function: lpc43_pin_dump * @@ -93,4 +82,4 @@ int lpc43_gpio_dump(uint16_t gpiocfg, const char *msg) return -ENOSYS; } -#endif /* CONFIG_DEBUG */ +#endif /* CONFIG_DEBUG_FEATURES */ diff --git a/arch/arm/src/lpc43xx/lpc43_ehci.c b/arch/arm/src/lpc43xx/lpc43_ehci.c index 08b2ae8e0f99344819224fcb2735b9bb03d59f40..ae462f80b46ac883fd62c21f1978a3eb2dba1d09 100644 --- a/arch/arm/src/lpc43xx/lpc43_ehci.c +++ b/arch/arm/src/lpc43xx/lpc43_ehci.c @@ -105,7 +105,7 @@ /* Debug options */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_USB_INFO # undef CONFIG_LPC43_EHCI_REGDEBUG #endif @@ -116,8 +116,8 @@ /* Simplify DEBUG checks */ -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE +#ifndef CONFIG_DEBUG_FEATURES +# undef CONFIG_DEBUG_INFO # undef CONFIG_DEBUG_USB #endif @@ -817,7 +817,7 @@ static uint32_t lpc43_swap32(uint32_t value) static void lpc43_printreg(volatile uint32_t *regaddr, uint32_t regval, bool iswrite) { - lldbg("%08x%s%08x\n", (uintptr_t)regaddr, iswrite ? "<-" : "->", regval); + uinfo("%08x%s%08x\n", (uintptr_t)regaddr, iswrite ? "<-" : "->", regval); } #endif @@ -868,7 +868,7 @@ static void lpc43_checkreg(volatile uint32_t *regaddr, uint32_t regval, bool isw { /* No.. More than one. */ - lldbg("[repeats %d more times]\n", count); + uinfo("[repeats %d more times]\n", count); } } @@ -1350,13 +1350,13 @@ static int lpc43_qh_discard(struct lpc43_qh_s *qh) #ifdef CONFIG_LPC43_EHCI_REGDEBUG static void lpc43_qtd_print(struct lpc43_qtd_s *qtd) { - udbg(" QTD[%p]:\n", qtd); - udbg(" hw:\n"); - udbg(" nqp: %08x alt: %08x token: %08x\n", - qtd->hw.nqp, qtd->hw.alt, qtd->hw.token); - udbg(" bpl: %08x %08x %08x %08x %08x\n", - qtd->hw.bpl[0], qtd->hw.bpl[1], qtd->hw.bpl[2], - qtd->hw.bpl[3], qtd->hw.bpl[4]); + uinfo(" QTD[%p]:\n", qtd); + uinfo(" hw:\n"); + uinfo(" nqp: %08x alt: %08x token: %08x\n", + qtd->hw.nqp, qtd->hw.alt, qtd->hw.token); + uinfo(" bpl: %08x %08x %08x %08x %08x\n", + qtd->hw.bpl[0], qtd->hw.bpl[1], qtd->hw.bpl[2], + qtd->hw.bpl[3], qtd->hw.bpl[4]); } #endif @@ -1374,30 +1374,30 @@ static void lpc43_qh_print(struct lpc43_qh_s *qh) struct lpc43_epinfo_s *epinfo; struct ehci_overlay_s *overlay; - udbg("QH[%p]:\n", qh); - udbg(" hw:\n"); - udbg(" hlp: %08x epchar: %08x epcaps: %08x cqp: %08x\n", - qh->hw.hlp, qh->hw.epchar, qh->hw.epcaps, qh->hw.cqp); + uinfo("QH[%p]:\n", qh); + uinfo(" hw:\n"); + uinfo(" hlp: %08x epchar: %08x epcaps: %08x cqp: %08x\n", + qh->hw.hlp, qh->hw.epchar, qh->hw.epcaps, qh->hw.cqp); overlay = &qh->hw.overlay; - udbg(" overlay:\n"); - udbg(" nqp: %08x alt: %08x token: %08x\n", - overlay->nqp, overlay->alt, overlay->token); - udbg(" bpl: %08x %08x %08x %08x %08x\n", - overlay->bpl[0], overlay->bpl[1], overlay->bpl[2], - overlay->bpl[3], overlay->bpl[4]); + uinfo(" overlay:\n"); + uinfo(" nqp: %08x alt: %08x token: %08x\n", + overlay->nqp, overlay->alt, overlay->token); + uinfo(" bpl: %08x %08x %08x %08x %08x\n", + overlay->bpl[0], overlay->bpl[1], overlay->bpl[2], + overlay->bpl[3], overlay->bpl[4]); - udbg(" fqp:\n", qh->fqp); + uinfo(" fqp:\n", qh->fqp); epinfo = qh->epinfo; - udbg(" epinfo[%p]:\n", epinfo); + uinfo(" epinfo[%p]:\n", epinfo); if (epinfo) { - udbg(" EP%d DIR=%s FA=%08x TYPE=%d MaxPacket=%d\n", - epinfo->epno, epinfo->dirin ? "IN" : "OUT", epinfo->devaddr, - epinfo->xfrtype, epinfo->maxpacket); - udbg(" Toggle=%d iocwait=%d speed=%d result=%d\n", - epinfo->toggle, epinfo->iocwait, epinfo->speed, epinfo->result); + uinfo(" EP%d DIR=%s FA=%08x TYPE=%d MaxPacket=%d\n", + epinfo->epno, epinfo->dirin ? "IN" : "OUT", epinfo->devaddr, + epinfo->xfrtype, epinfo->maxpacket); + uinfo(" Toggle=%d iocwait=%d speed=%d result=%d\n", + epinfo->toggle, epinfo->iocwait, epinfo->speed, epinfo->result); } } #endif @@ -1989,7 +1989,7 @@ static int lpc43_async_setup(struct lpc43_rhport_s *rhport, #ifdef CONFIG_USBHOST_TRACE usbhost_vtrace2(EHCI_VTRACE2_ASYNCXFR, epinfo->epno, buflen); #else - uvdbg("RHport%d EP%d: buffer=%p, buflen=%d, req=%p\n", + uinfo("RHport%d EP%d: buffer=%p, buflen=%d, req=%p\n", RHPORT(rhport), epinfo->epno, buffer, buflen, req); #endif @@ -2267,7 +2267,7 @@ static int lpc43_intr_setup(struct lpc43_rhport_s *rhport, #ifdef CONFIG_USBHOST_TRACE usbhost_vtrace2(EHCI_VTRACE2_INTRXFR, epinfo->epno, buflen); #else - uvdbg("RHport%d EP%d: buffer=%p, buflen=%d\n", + uinfo("RHport%d EP%d: buffer=%p, buflen=%d\n", RHPORT(rhport), epinfo->epno, buffer, buflen); #endif @@ -3207,7 +3207,7 @@ static int lpc43_ehci_interrupt(int irq, FAR void *context) #ifdef CONFIG_USBHOST_TRACE usbhost_vtrace1(EHCI_VTRACE1_TOPHALF, usbsts & regval); #else - ullvdbg("USBSTS: %08x USBINTR: %08x\n", usbsts, regval); + uinfo("USBSTS: %08x USBINTR: %08x\n", usbsts, regval); #endif /* Handle all unmasked interrupt sources */ @@ -3739,7 +3739,7 @@ static int lpc43_epalloc(FAR struct usbhost_driver_s *drvr, #ifdef CONFIG_USBHOST_TRACE usbhost_vtrace2(EHCI_VTRACE2_EPALLOC, epdesc->addr, epdesc->xfrtype); #else - uvdbg("EP%d DIR=%s FA=%08x TYPE=%d Interval=%d MaxPacket=%d\n", + uinfo("EP%d DIR=%s FA=%08x TYPE=%d Interval=%d MaxPacket=%d\n", epdesc->addr, epdesc->in ? "IN" : "OUT", hport->funcaddr, epdesc->xfrtype, epdesc->interval, epdesc->mxpacketsize); #endif @@ -4023,7 +4023,7 @@ static int lpc43_ctrlin(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, #ifdef CONFIG_USBHOST_TRACE usbhost_vtrace2(EHCI_VTRACE2_CTRLINOUT, RHPORT(rhport), req->req); #else - uvdbg("RHPort%d type: %02x req: %02x value: %02x%02x index: %02x%02x len: %04x\n", + uinfo("RHPort%d type: %02x req: %02x value: %02x%02x index: %02x%02x len: %04x\n", RHPORT(rhport), req->type, req->req, req->value[1], req->value[0], req->index[1], req->index[0], len); #endif @@ -4046,7 +4046,7 @@ static int lpc43_ctrlin(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, ret = lpc43_async_setup(rhport, ep0info, req, buffer, len); if (ret < 0) { - udbg("ERROR: lpc43_async_setup failed: %d\n", ret); + uerr("ERROR: lpc43_async_setup failed: %d\n", ret); goto errout_with_iocwait; } @@ -4511,7 +4511,7 @@ static int lpc43_connect(FAR struct usbhost_driver_s *drvr, /* Set the connected/disconnected flag */ hport->connected = connected; - ullvdbg("Hub port %d connected: %s\n", hport->port, connected ? "YES" : "NO"); + uinfo("Hub port %d connected: %s\n", hport->port, connected ? "YES" : "NO"); /* Report the connection event */ @@ -4711,7 +4711,7 @@ FAR struct usbhost_connection_s *lpc43_ehci_initialize(int controller) { FAR struct usbhost_hubport_s *hport; uint32_t regval; -#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_INFO) uint16_t regval16; unsigned int nports; #endif @@ -4948,7 +4948,7 @@ FAR struct usbhost_connection_s *lpc43_ehci_initialize(int controller) lpc43_putreg(EHCI_INT_ALLINTS, &HCOR->usbsts); -#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_INFO) /* Show the EHCI version */ regval16 = lpc43_swap16(HCCR->hciversion); diff --git a/arch/arm/src/lpc43xx/lpc43_ethernet.c b/arch/arm/src/lpc43xx/lpc43_ethernet.c index 733a161c2be0c620fb2c8a6a978313a78deae50c..086dd0b8f3eb54f44359d0323b82e6506e2756a9 100644 --- a/arch/arm/src/lpc43xx/lpc43_ethernet.c +++ b/arch/arm/src/lpc43xx/lpc43_ethernet.c @@ -197,7 +197,7 @@ * enabled. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_NET_INFO # undef CONFIG_LPC43_ETHMAC_REGDEBUG #endif @@ -522,9 +522,9 @@ struct lpc43_ethmac_s struct work_s work; /* For deferring work to the work queue */ #endif - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ - struct net_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by the network */ /* Used to track transmit and receive descriptors */ @@ -559,7 +559,7 @@ static struct lpc43_ethmac_s g_lpc43ethmac; ****************************************************************************/ /* Register operations ******************************************************/ -#if defined(CONFIG_LPC43_ETHMAC_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_LPC43_ETHMAC_REGDEBUG static uint32_t lpc43_getreg(uint32_t addr); static void lpc43_putreg(uint32_t val, uint32_t addr); static void lpc43_checksetup(void); @@ -683,7 +683,7 @@ static int lpc43_ethconfig(FAR struct lpc43_ethmac_s *priv); * ****************************************************************************/ -#if defined(CONFIG_LPC43_ETHMAC_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_LPC43_ETHMAC_REGDEBUG static uint32_t lpc43_getreg(uint32_t addr) { static uint32_t prevaddr = 0; @@ -704,7 +704,7 @@ static uint32_t lpc43_getreg(uint32_t addr) { if (count == 4) { - lldbg("...\n"); + ninfo("...\n"); } return val; @@ -721,7 +721,7 @@ static uint32_t lpc43_getreg(uint32_t addr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + ninfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -733,7 +733,7 @@ static uint32_t lpc43_getreg(uint32_t addr) /* Show the register value read */ - lldbg("%08x->%08x\n", addr, val); + ninfo("%08x->%08x\n", addr, val); return val; } #endif @@ -755,12 +755,12 @@ static uint32_t lpc43_getreg(uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_LPC43_ETHMAC_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_LPC43_ETHMAC_REGDEBUG static void lpc43_putreg(uint32_t val, uint32_t addr) { /* Show the register value being written */ - lldbg("%08x<-%08x\n", addr, val); + ninfo("%08x<-%08x\n", addr, val); /* Write the value */ @@ -782,7 +782,7 @@ static void lpc43_putreg(uint32_t val, uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_LPC43_ETHMAC_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_LPC43_ETHMAC_REGDEBUG static void lpc43_checksetup(void) { } @@ -928,7 +928,7 @@ static int lpc43_transmit(FAR struct lpc43_ethmac_s *priv) struct eth_txdesc_s *txdesc; struct eth_txdesc_s *txfirst; - /* The internal (optimal) uIP buffer size may be configured to be larger + /* The internal (optimal) network buffer size may be configured to be larger * than the Ethernet buffer size. */ @@ -947,8 +947,8 @@ static int lpc43_transmit(FAR struct lpc43_ethmac_s *priv) txdesc = priv->txhead; txfirst = txdesc; - nllvdbg("d_len: %d d_buf: %p txhead: %p tdes0: %08x\n", - priv->dev.d_len, priv->dev.d_buf, txdesc, txdesc->tdes0); + ninfo("d_len: %d d_buf: %p txhead: %p tdes0: %08x\n", + priv->dev.d_len, priv->dev.d_buf, txdesc, txdesc->tdes0); DEBUGASSERT(txdesc && (txdesc->tdes0 & ETH_TDES0_OWN) == 0); @@ -964,7 +964,7 @@ static int lpc43_transmit(FAR struct lpc43_ethmac_s *priv) bufcount = (priv->dev.d_len + (CONFIG_LPC43_ETH_BUFSIZE-1)) / CONFIG_LPC43_ETH_BUFSIZE; lastsize = priv->dev.d_len - (bufcount - 1) * CONFIG_LPC43_ETH_BUFSIZE; - nllvdbg("bufcount: %d lastsize: %d\n", bufcount, lastsize); + ninfo("bufcount: %d lastsize: %d\n", bufcount, lastsize); /* Set the first segment bit in the first TX descriptor */ @@ -1074,8 +1074,8 @@ static int lpc43_transmit(FAR struct lpc43_ethmac_s *priv) priv->inflight++; - nllvdbg("txhead: %p txtail: %p inflight: %d\n", - priv->txhead, priv->txtail, priv->inflight); + ninfo("txhead: %p txtail: %p inflight: %d\n", + priv->txhead, priv->txtail, priv->inflight); /* If all TX descriptors are in-flight, then we have to disable receive interrupts * too. This is because receive events can trigger more un-stoppable transmit @@ -1114,7 +1114,7 @@ static int lpc43_transmit(FAR struct lpc43_ethmac_s *priv) * Function: lpc43_txpoll * * Description: - * The transmitter is available, check if uIP has any outgoing packets ready + * The transmitter is available, check if the network has any outgoing packets ready * to send. This is a callback from devif_poll(). devif_poll() may be called: * * 1. When the preceding TX packet send is complete, @@ -1373,7 +1373,7 @@ static void lpc43_freesegment(FAR struct lpc43_ethmac_s *priv, struct eth_rxdesc_s *rxdesc; int i; - nllvdbg("rxfirst: %p segments: %d\n", rxfirst, segments); + ninfo("rxfirst: %p segments: %d\n", rxfirst, segments); /* Set OWN bit in RX descriptors. This gives the buffers back to DMA */ @@ -1431,8 +1431,8 @@ static int lpc43_recvframe(FAR struct lpc43_ethmac_s *priv) uint8_t *buffer; int i; - nllvdbg("rxhead: %p rxcurr: %p segments: %d\n", - priv->rxhead, priv->rxcurr, priv->segments); + ninfo("rxhead: %p rxcurr: %p segments: %d\n", + priv->rxhead, priv->rxcurr, priv->segments); /* Check if there are free buffers. We cannot receive new frames in this * design unless there is at least one free buffer. @@ -1440,7 +1440,7 @@ static int lpc43_recvframe(FAR struct lpc43_ethmac_s *priv) if (!lpc43_isfreebuffer(priv)) { - nlldbg("No free buffers\n"); + nerr("ERROR: No free buffers\n"); return -ENOMEM; } @@ -1497,7 +1497,7 @@ static int lpc43_recvframe(FAR struct lpc43_ethmac_s *priv) rxcurr = priv->rxcurr; } - nllvdbg("rxhead: %p rxcurr: %p segments: %d\n", + ninfo("rxhead: %p rxcurr: %p segments: %d\n", priv->rxhead, priv->rxcurr, priv->segments); /* Check if any errors are reported in the frame */ @@ -1520,7 +1520,7 @@ static int lpc43_recvframe(FAR struct lpc43_ethmac_s *priv) buffer = lpc43_allocbuffer(priv); /* Take the buffer from the RX descriptor of the first free - * segment, put it into the uIP device structure, then replace + * segment, put it into the network device structure, then replace * the buffer in the RX descriptor with the newly allocated * buffer. */ @@ -1536,8 +1536,8 @@ static int lpc43_recvframe(FAR struct lpc43_ethmac_s *priv) priv->rxhead = (struct eth_rxdesc_s *)rxdesc->rdes3; lpc43_freesegment(priv, rxcurr, priv->segments); - nllvdbg("rxhead: %p d_buf: %p d_len: %d\n", - priv->rxhead, dev->d_buf, dev->d_len); + ninfo("rxhead: %p d_buf: %p d_len: %d\n", + priv->rxhead, dev->d_buf, dev->d_len); return OK; } @@ -1547,7 +1547,7 @@ static int lpc43_recvframe(FAR struct lpc43_ethmac_s *priv) * scanning logic, and continue scanning with the next frame. */ - nlldbg("DROPPED: RX descriptor errors: %08x\n", rxdesc->rdes0); + nwarn("WARNING: Dropped, RX descriptor errors: %08x\n", rxdesc->rdes0); lpc43_freesegment(priv, rxcurr, priv->segments); } } @@ -1563,8 +1563,8 @@ static int lpc43_recvframe(FAR struct lpc43_ethmac_s *priv) priv->rxhead = rxdesc; - nllvdbg("rxhead: %p rxcurr: %p segments: %d\n", - priv->rxhead, priv->rxcurr, priv->segments); + ninfo("rxhead: %p rxcurr: %p segments: %d\n", + priv->rxhead, priv->rxcurr, priv->segments); return -EAGAIN; } @@ -1602,13 +1602,13 @@ static void lpc43_receive(FAR struct lpc43_ethmac_s *priv) pkt_input(&priv->dev); #endif - /* Check if the packet is a valid size for the uIP buffer configuration + /* Check if the packet is a valid size for the network buffer configuration * (this should not happen) */ if (dev->d_len > CONFIG_NET_ETH_MTU) { - nlldbg("DROPPED: Too big: %d\n", dev->d_len); + nwarn("WARNING: Dropped, Too big: %d\n", dev->d_len); /* Free dropped packet buffer */ if (dev->d_buf) @@ -1632,7 +1632,7 @@ static void lpc43_receive(FAR struct lpc43_ethmac_s *priv) #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); /* Handle ARP on input then give the IPv4 packet to the network * layer @@ -1672,7 +1672,7 @@ static void lpc43_receive(FAR struct lpc43_ethmac_s *priv) #ifdef CONFIG_NET_IPv6 if (BUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); /* Give the IPv6 packet to the network layer */ @@ -1709,7 +1709,7 @@ static void lpc43_receive(FAR struct lpc43_ethmac_s *priv) #ifdef CONFIG_NET_ARP if (BUF->type == htons(ETHTYPE_ARP)) { - nllvdbg("ARP frame\n"); + ninfo("ARP frame\n"); /* Handle ARP packet */ @@ -1727,7 +1727,7 @@ static void lpc43_receive(FAR struct lpc43_ethmac_s *priv) else #endif { - nlldbg("DROPPED: Unknown type: %04x\n", BUF->type); + nwarn("WARNING: Dropped, Unknown type: %04x\n", BUF->type); } /* We are finished with the RX buffer. NOTE: If the buffer is @@ -1768,8 +1768,8 @@ static void lpc43_freeframe(FAR struct lpc43_ethmac_s *priv) struct eth_txdesc_s *txdesc; int i; - nllvdbg("txhead: %p txtail: %p inflight: %d\n", - priv->txhead, priv->txtail, priv->inflight); + ninfo("txhead: %p txtail: %p inflight: %d\n", + priv->txhead, priv->txtail, priv->inflight); /* Scan for "in-flight" descriptors owned by the CPU */ @@ -1784,8 +1784,8 @@ static void lpc43_freeframe(FAR struct lpc43_ethmac_s *priv) * TX descriptors. */ - nllvdbg("txtail: %p tdes0: %08x tdes2: %08x tdes3: %08x\n", - txdesc, txdesc->tdes0, txdesc->tdes2, txdesc->tdes3); + ninfo("txtail: %p tdes0: %08x tdes2: %08x tdes3: %08x\n", + txdesc, txdesc->tdes0, txdesc->tdes2, txdesc->tdes3); DEBUGASSERT(txdesc->tdes2 != 0); @@ -1837,8 +1837,8 @@ static void lpc43_freeframe(FAR struct lpc43_ethmac_s *priv) priv->txtail = txdesc; - nllvdbg("txhead: %p txtail: %p inflight: %d\n", - priv->txhead, priv->txtail, priv->inflight); + ninfo("txhead: %p txtail: %p inflight: %d\n", + priv->txhead, priv->txtail, priv->inflight); } } @@ -1888,7 +1888,7 @@ static void lpc43_txdone(FAR struct lpc43_ethmac_s *priv) lpc43_disableint(priv, ETH_DMAINT_TI); } - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ lpc43_dopoll(priv); } @@ -1975,7 +1975,7 @@ static inline void lpc43_interrupt_process(FAR struct lpc43_ethmac_s *priv) { /* Just let the user know what happened */ - nlldbg("Abnormal event(s): %08x\n", dmasr); + nerr("ERROR: Abnormal event(s): %08x\n", dmasr); /* Clear all pending abnormal events */ @@ -2120,7 +2120,7 @@ static inline void lpc43_txtimeout_process(FAR struct lpc43_ethmac_s *priv) lpc43_ifdown(&priv->dev); lpc43_ifup(&priv->dev); - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ lpc43_dopoll(priv); } @@ -2179,7 +2179,7 @@ static void lpc43_txtimeout_expiry(int argc, uint32_t arg, ...) { FAR struct lpc43_ethmac_s *priv = (FAR struct lpc43_ethmac_s *)arg; - nlldbg("Timeout!\n"); + ninfo("Timeout!\n"); #ifdef CONFIG_NET_NOINTS /* Disable further Ethernet interrupts. This will prevent some race @@ -2381,15 +2381,15 @@ static int lpc43_ifup(struct net_driver_s *dev) int ret; #ifdef CONFIG_NET_IPv4 - ndbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); #endif #ifdef CONFIG_NET_IPv6 - ndbg("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", - dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2], - dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5], - dev->d_ipv6addr[6], dev->d_ipv6addr[7]); + ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", + dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2], + dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5], + dev->d_ipv6addr[6], dev->d_ipv6addr[7]); #endif /* Configure the Ethernet interface for DMA operation. */ @@ -2435,7 +2435,7 @@ static int lpc43_ifdown(struct net_driver_s *dev) FAR struct lpc43_ethmac_s *priv = (FAR struct lpc43_ethmac_s *)dev->d_private; irqstate_t flags; - ndbg("Taking the network down\n"); + ninfo("Taking the network down\n"); /* Disable the Ethernet interrupt */ @@ -2480,7 +2480,7 @@ static int lpc43_ifdown(struct net_driver_s *dev) static inline void lpc43_txavail_process(FAR struct lpc43_ethmac_s *priv) { - nvdbg("ifup: %d\n", priv->ifup); + ninfo("ifup: %d\n", priv->ifup); /* Ignore the notification if the interface is not yet up */ @@ -2647,8 +2647,8 @@ static int lpc43_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) uint32_t temp; uint32_t registeraddress; - nllvdbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); /* Add the MAC address to the hardware multicast hash table */ @@ -2704,8 +2704,8 @@ static int lpc43_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) uint32_t temp; uint32_t registeraddress; - nllvdbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); /* Remove the MAC address to the hardware multicast hash table */ @@ -3065,7 +3065,7 @@ static int lpc43_phyread(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t *val } } - ndbg("MII transfer timed out: phydevaddr: %04x phyregaddr: %04x\n", + nerr("ERROR: MII transfer timed out: phydevaddr: %04x phyregaddr: %04x\n", phydevaddr, phyregaddr); return -ETIMEDOUT; @@ -3124,7 +3124,7 @@ static int lpc43_phywrite(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t val } } - ndbg("MII transfer timed out: phydevaddr: %04x phyregaddr: %04x value: %04x\n", + nerr("ERROR: MII transfer timed out: phydevaddr: %04x phyregaddr: %04x value: %04x\n", phydevaddr, phyregaddr, value); return -ETIMEDOUT; @@ -3161,7 +3161,7 @@ static inline int lpc43_dm9161(FAR struct lpc43_ethmac_s *priv) ret = lpc43_phyread(CONFIG_LPC43_PHYADDR, MII_PHYID1, &phyval); if (ret < 0) { - ndbg("Failed to read the PHY ID1: %d\n", ret); + nerr("ERROR: Failed to read the PHY ID1: %d\n", ret); return ret; } @@ -3172,14 +3172,14 @@ static inline int lpc43_dm9161(FAR struct lpc43_ethmac_s *priv) up_systemreset(); } - nvdbg("PHY ID1: 0x%04X\n", phyval); + ninfo("PHY ID1: 0x%04X\n", phyval); /* Now check the "DAVICOM Specified Configuration Register (DSCR)", Register 16 */ ret = lpc43_phyread(CONFIG_LPC43_PHYADDR, 16, &phyval); if (ret < 0) { - ndbg("Failed to read the PHY Register 0x10: %d\n", ret); + nerr("ERROR: Failed to read the PHY Register 0x10: %d\n", ret); return ret; } @@ -3236,7 +3236,7 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv) ret = lpc43_phywrite(CONFIG_LPC43_PHYADDR, MII_MCR, MII_MCR_RESET); if (ret < 0) { - ndbg("Failed to reset the PHY: %d\n", ret); + nerr("ERROR: Failed to reset the PHY: %d\n", ret); return ret; } @@ -3248,7 +3248,7 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv) ret = lpc43_phy_boardinitialize(0); if (ret < 0) { - ndbg("Failed to initialize the PHY: %d\n", ret); + nerr("ERROR: Failed to initialize the PHY: %d\n", ret); return ret; } #endif @@ -3273,7 +3273,7 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv) ret = lpc43_phyread(CONFIG_LPC43_PHYADDR, MII_MSR, &phyval); if (ret < 0) { - ndbg("Failed to read the PHY MSR: %d\n", ret); + nerr("ERROR: Failed to read the PHY MSR: %d\n", ret); return ret; } else if ((phyval & MII_MSR_LINKSTATUS) != 0) @@ -3284,7 +3284,7 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv) if (timeout >= PHY_RETRY_TIMEOUT) { - ndbg("Timed out waiting for link status: %04x\n", phyval); + nerr("ERROR: Timed out waiting for link status: %04x\n", phyval); return -ETIMEDOUT; } @@ -3293,7 +3293,7 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv) ret = lpc43_phywrite(CONFIG_LPC43_PHYADDR, MII_MCR, MII_MCR_ANENABLE); if (ret < 0) { - ndbg("Failed to enable auto-negotiation: %d\n", ret); + nerr("ERROR: Failed to enable auto-negotiation: %d\n", ret); return ret; } @@ -3304,7 +3304,7 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv) ret = lpc43_phyread(CONFIG_LPC43_PHYADDR, MII_MSR, &phyval); if (ret < 0) { - ndbg("Failed to read the PHY MSR: %d\n", ret); + nerr("ERROR: Failed to read the PHY MSR: %d\n", ret); return ret; } else if ((phyval & MII_MSR_ANEGCOMPLETE) != 0) @@ -3315,7 +3315,7 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv) if (timeout >= PHY_RETRY_TIMEOUT) { - ndbg("Timed out waiting for auto-negotiation\n"); + nerr("ERROR: Timed out waiting for auto-negotiation\n"); return -ETIMEDOUT; } @@ -3324,13 +3324,13 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv) ret = lpc43_phyread(CONFIG_LPC43_PHYADDR, CONFIG_LPC43_PHYSR, &phyval); if (ret < 0) { - ndbg("Failed to read PHY status register\n"); + nerr("ERROR: Failed to read PHY status register\n"); return ret; } /* Remember the selected speed and duplex modes */ - nvdbg("PHYSR[%d]: %04x\n", CONFIG_LPC43_PHYSR, phyval); + ninfo("PHYSR[%d]: %04x\n", CONFIG_LPC43_PHYSR, phyval); #ifdef CONFIG_ETH0_PHY_LAN8720 if ((phyval & (MII_MSR_100BASETXHALF | MII_MSR_100BASETXFULL)) != 0) @@ -3392,6 +3392,9 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv) priv->mbps100 = 1; } #endif +#endif + +#else /* Auto-negotion not selected */ #ifdef CONFIG_LPC43_ETHFD priv->mbps100 = 1; @@ -3400,11 +3403,9 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv) #ifdef CONFIG_LPC43_ETH100MBPS priv->fduplex = 1; #endif -#endif - - /* However we got here, commit to the hardware */ phyval = 0; + if (priv->mbps100) { phyval |= MII_MCR_FULLDPLX; @@ -3418,7 +3419,7 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv) ret = lpc43_phywrite(CONFIG_LPC43_PHYADDR, MII_MCR, phyval); if (ret < 0) { - ndbg("Failed to write the PHY MCR: %d\n", ret); + nerr("ERROR: Failed to write the PHY MCR: %d\n", ret); return ret; } @@ -3434,9 +3435,9 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv) #endif #endif - ndbg("Duplex: %s Speed: %d MBps\n", - priv->fduplex ? "FULL" : "HALF", - priv->mbps100 ? 100 : 10); + ninfo("Duplex: %s Speed: %d MBps\n", + priv->fduplex ? "FULL" : "HALF", + priv->mbps100 ? 100 : 10); return OK; } @@ -3718,11 +3719,11 @@ static void lpc43_macaddress(FAR struct lpc43_ethmac_s *priv) FAR struct net_driver_s *dev = &priv->dev; uint32_t regval; - nllvdbg("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - dev->d_ifname, - dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], - dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], - dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5]); + ninfo("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + dev->d_ifname, + dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], + dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], + dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5]); /* Set the MAC address high register */ @@ -3786,7 +3787,7 @@ static void lpc43_ipv6multicast(FAR struct lpc43_ethmac_s *priv) mac[4] = tmp16 & 0xff; mac[5] = tmp16 >> 8; - nvdbg("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", + ninfo("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); (void)lpc43_addmac(dev, mac); @@ -3925,12 +3926,12 @@ static int lpc43_ethconfig(FAR struct lpc43_ethmac_s *priv) /* Reset the Ethernet block */ - nllvdbg("Reset the Ethernet block\n"); + ninfo("Reset the Ethernet block\n"); lpc43_ethreset(priv); /* Initialize the PHY */ - nllvdbg("Initialize the PHY\n"); + ninfo("Initialize the PHY\n"); ret = lpc43_phyinit(priv); if (ret < 0) { @@ -3945,7 +3946,7 @@ static int lpc43_ethconfig(FAR struct lpc43_ethmac_s *priv) /* Initialize the MAC and DMA */ - nllvdbg("Initialize the MAC and DMA\n"); + ninfo("Initialize the MAC and DMA\n"); ret = lpc43_macconfig(priv); if (ret < 0) { @@ -3966,7 +3967,7 @@ static int lpc43_ethconfig(FAR struct lpc43_ethmac_s *priv) /* Enable normal MAC operation */ - nllvdbg("Enable normal operation\n"); + ninfo("Enable normal operation\n"); return lpc43_macenable(priv); } diff --git a/arch/arm/src/lpc43xx/lpc43_gpdma.c b/arch/arm/src/lpc43xx/lpc43_gpdma.c index 991f80a1cfd74590c4d603727c6ef909b4b581ab..d104080a94d2985648cade171046f0217468dcd4 100644 --- a/arch/arm/src/lpc43xx/lpc43_gpdma.c +++ b/arch/arm/src/lpc43xx/lpc43_gpdma.c @@ -57,48 +57,6 @@ #ifdef CONFIG_LPC43_GPDMA -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef DMA_DEBUG /* Define to enable debug */ -#undef DMA_VERBOSE /* Define to enable verbose debug */ - -#ifdef DMA_DEBUG -# define dmadbg lldbg -# ifdef DMA_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef DMA_VERBOSE -# define dmadbg(x...) -# define spivdbg(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/lpc43xx/lpc43_gpio.c b/arch/arm/src/lpc43xx/lpc43_gpio.c index 3d5db11b7e49646dad43ba004812e808f0812298..783c66c0605a2de6a99780852e2002574129abdb 100644 --- a/arch/arm/src/lpc43xx/lpc43_gpio.c +++ b/arch/arm/src/lpc43xx/lpc43_gpio.c @@ -49,6 +49,10 @@ #include "up_arch.h" #include "lpc43_gpio.h" +#ifdef CONFIG_LPC43_GPIO_IRQ +#include "lpc43_gpioint.h" +#endif + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -181,20 +185,20 @@ int lpc43_gpio_config(uint16_t gpiocfg) case GPIO_MODE_PININTR: /* GPIO pin interrupt */ lpc43_configinput(gpiocfg, port, pin); -#ifdef CONFIG_GPIO_IRQ +#ifdef CONFIG_LPC43_GPIO_IRQ ret = lpc43_gpioint_pinconfig(gpiocfg); #endif break; case GPIO_MODE_GRPINTR: /* GPIO group interrupt */ lpc43_configinput(gpiocfg, port, pin); -#ifdef CONFIG_GPIO_IRQ +#ifdef CONFIG_LPC43_GPIO_IRQ ret = lpc43_gpioint_grpconfig(gpiocfg); #endif break; default : - sdbg("ERROR: Unrecognized pin mode: %04x\n", gpiocfg); + serr("ERROR: Unrecognized pin mode: %04x\n", gpiocfg); ret = -EINVAL; break; } diff --git a/arch/arm/src/lpc43xx/lpc43_gpio.h b/arch/arm/src/lpc43xx/lpc43_gpio.h index 1ee14fac6395d20f41291c07e3bf0c0fa0af1523..24a492beaed8d0f3851258de97427215111ca541 100644 --- a/arch/arm/src/lpc43xx/lpc43_gpio.h +++ b/arch/arm/src/lpc43xx/lpc43_gpio.h @@ -143,7 +143,7 @@ * ..CC C... .... .... */ -#define GPIO_PININT_SHIFT (10) /* Bits 11-13: Pin interrupt number */ +#define GPIO_PININT_SHIFT (11) /* Bits 11-13: Pin interrupt number */ #define GPIO_PININT_MASK (7 << GPIO_PININT_SHIFT) # define GPIO_PININT0 (0 << GPIO_PININT_SHIFT) # define GPIO_PININT1 (1 << GPIO_PININT_SHIFT) @@ -162,9 +162,9 @@ * .... .III .... .... */ -#define _GPIO_INT_LEVEL (1 << 10) /* Bit 10: 1=Level (vs edge) */ -#define _GPIO_INT_HIGH (1 << 9) /* Bit 9: 1=High level or rising edge */ -#define _GPIO_INT_LOW (1 << 8) /* Bit 8: 1=Low level or falling edge */ +#define _GPIO_INT_EDGE (1 << 10) /* Bit 10: 1=Edge (vs level) */ +#define _GPIO_INT_LOW (1 << 9) /* Bit 9: 1=Low level or falling edge */ +#define _GPIO_INT_HIGH (1 << 8) /* Bit 8: 1=High level or rising edge */ #define GPIO_INT_SHIFT (8) /* Bits 8-10: Interrupt mode */ #define GPIO_INT_MASK (7 << GPIO_INT_SHIFT) @@ -176,8 +176,8 @@ #define GPIO_IS_ACTIVE_HI(p) (((p) & _GPIO_INT_HIGH) != 0) #define GPIO_IS_ACTIVE_LOW(p) (((p) & _GPIO_INT_LOW) != 0) -#define GPIO_IS_EDGE(p) (((p) & _GPIO_INT_LEVEL) == 0) -#define GPIO_IS_LEVEL(p) (((p) & _GPIO_INT_LEVEL) != 0) +#define GPIO_IS_LEVEL(p) (((p) & _GPIO_INT_EDGE) == 0) +#define GPIO_IS_EDGE(p) (((p) & _GPIO_INT_EDGE) != 0) /* GPIO Port Number: * @@ -310,7 +310,7 @@ bool lpc43_gpio_read(uint16_t gpiocfg); * ********************************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES int lpc43_gpio_dump(uint16_t gpiocfg, const char *msg); #else # define lpc43_gpio_dump(p,m) diff --git a/arch/arm/src/lpc43xx/lpc43_gpioint.c b/arch/arm/src/lpc43xx/lpc43_gpioint.c index 51e010ba33042ae3349628df7f6000fe27cf55fe..e8726420c15118fa2309e9d6dbc82e866e3ded57 100644 --- a/arch/arm/src/lpc43xx/lpc43_gpioint.c +++ b/arch/arm/src/lpc43xx/lpc43_gpioint.c @@ -57,6 +57,7 @@ #include #include +#include #include @@ -70,7 +71,7 @@ #include "lpc43_gpio.h" #include "lpc43_gpioint.h" -#ifdef CONFIG_GPIO_IRQ +#ifdef CONFIG_LPC43_GPIO_IRQ /**************************************************************************** * Pre-processor Definitions @@ -176,10 +177,13 @@ int lpc43_gpioint_grpinitialize(int group, bool anded, bool level) int lpc43_gpioint_pinconfig(uint16_t gpiocfg) { unsigned int port = ((gpiocfg & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT); - unsigned int pin = ((gpiocfg & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT); + unsigned int pin = ((gpiocfg & GPIO_PIN_MASK) >> GPIO_PIN_SHIFT); unsigned int pinint = ((gpiocfg & GPIO_PININT_MASK) >> GPIO_PININT_SHIFT); uint32_t bitmask = (1 << pinint); - uint32_t regval; + uint32_t pinsel; + uint32_t isel; + uint32_t einr; + uint32_t einf; DEBUGASSERT(port < NUM_GPIO_PORTS && pin < NUM_GPIO_PINS && GPIO_IS_PININT(gpiocfg)); @@ -196,62 +200,69 @@ int lpc43_gpioint_pinconfig(uint16_t gpiocfg) if (pinint < 4) { - regval = getreg32(LPC43_SCU_PINTSEL0); - regval &= ~SCU_PINTSEL0_MASK(pinint); - regval |= ((pin << SCU_PINTSEL0_INTPIN_SHIFT(pinint)) | + pinsel = getreg32(LPC43_SCU_PINTSEL0); + pinsel &= ~SCU_PINTSEL0_MASK(pinint); + pinsel |= ((pin << SCU_PINTSEL0_INTPIN_SHIFT(pinint)) | (port << SCU_PINTSEL0_PORTSEL_SHIFT(pinint))); - putreg32(regval, LPC43_SCU_PINTSEL0); + putreg32(pinsel, LPC43_SCU_PINTSEL0); } else { - regval = getreg32(LPC43_SCU_PINTSEL1); - regval &= ~SCU_PINTSEL1_MASK(pinint); - regval |= ((pin << SCU_PINTSEL1_INTPIN_SHIFT(pinint)) | + pinsel = getreg32(LPC43_SCU_PINTSEL1); + pinsel &= ~SCU_PINTSEL1_MASK(pinint); + pinsel |= ((pin << SCU_PINTSEL1_INTPIN_SHIFT(pinint)) | (port << SCU_PINTSEL1_PORTSEL_SHIFT(pinint))); - putreg32(regval, LPC43_SCU_PINTSEL1); - } - - /* Set level or edge sensitive */ - - regval = getreg32(LPC43_GPIOINT_ISEL); - if (GPIO_IS_LEVEL(gpiocfg)) - { - regval |= bitmask; - } - else - { - regval &= ~bitmask; + putreg32(pinsel, LPC43_SCU_PINTSEL1); } - putreg32(regval, LPC43_GPIOINT_ISEL); + /* Configure the active level or rising/falling edge + * + * ISEL + * 0 = Edge sensitive + * 1 = Level sensitive + * EINR 0-7: + * 0 = Disable rising edge or level interrupt. + * 1 = Enable rising edge or level interrupt. + * EINF 0-7: + * 0 = Disable falling edge interrupt or set active interrupt level + * LOW. + * 1 = Enable falling edge interrupt enabled or set active interrupt + * level HIGH + */ - /* Configure the active high level or rising edge */ + isel = getreg32(LPC43_GPIOINT_ISEL) & ~bitmask; + einr = getreg32(LPC43_GPIOINT_IENR) & ~bitmask; + einf = getreg32(LPC43_GPIOINT_IENF) & ~bitmask; - regval = getreg32(LPC43_GPIOINT_IENR); - if (GPIO_IS_ACTIVE_HI(gpiocfg)) - { - regval |= bitmask; - } - else + switch (gpiocfg & GPIO_INT_MASK) { - regval &= ~bitmask; + case GPIO_INT_LEVEL_HI: + einf |= bitmask; /* Enable active level HI */ + case GPIO_INT_LEVEL_LOW: + isel |= bitmask; /* Level sensitive */ + einr |= bitmask; /* Enable level interrupt */ + break; + + case GPIO_INT_EDGE_RISING: + einr |= bitmask; /* Enable rising edge interrupt */ + break; + + case GPIO_INT_EDGE_BOTH: + einr |= bitmask; /* Enable rising edge interrupt */ + case GPIO_INT_EDGE_FALLING: + einf |= bitmask; /* Enable falling edge interrupt */ + break; + + /* Default is edge sensitive but with both edges disabled. */ + + default: + break; } - putreg32(regval, LPC43_GPIOINT_IENR); - - /* Configure the active high low or falling edge */ - - regval = getreg32(LPC43_GPIOINT_IENF); - if (GPIO_IS_ACTIVE_LOW(gpiocfg)) - { - regval |= bitmask; - } - else - { - regval &= ~bitmask; - } + putreg32(isel, LPC43_GPIOINT_ISEL); + putreg32(einr, LPC43_GPIOINT_IENR); + putreg32(einf, LPC43_GPIOINT_IENF); - putreg32(regval, LPC43_GPIOINT_IENF); return OK; } @@ -321,4 +332,29 @@ int lpc43_gpioint_grpconfig(uint16_t gpiocfg) return OK; } -#endif /* CONFIG_GPIO_IRQ */ +/**************************************************************************** + * Name: lpc43_gpioint_ack + * + * Description: + * Acknowledge the interrupt for a given pint interrupt number. Call this + * inside the interrupt handler. For edge sensitive interrupts, the interrupt + * status is cleared. For level sensitive interrupts, the active-high/-low + * sensitivity is inverted. + * + * Returned Value: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +int lpc43_gpioint_ack(uint8_t intnumber) +{ + uint32_t regval; + + regval = getreg32(LPC43_GPIOINT_IST); + regval |= (1 << intnumber); + putreg32(regval, LPC43_GPIOINT_IST); + + return OK; +} + +#endif /* CONFIG_LPC43_GPIO_IRQ */ diff --git a/arch/arm/src/lpc43xx/lpc43_gpioint.h b/arch/arm/src/lpc43xx/lpc43_gpioint.h index 35b22f7c7f27abd6e150a1e552bf1787308c184d..ae479f83c67a2e74e75dc7d4fe1f14b9975b20a7 100644 --- a/arch/arm/src/lpc43xx/lpc43_gpioint.h +++ b/arch/arm/src/lpc43xx/lpc43_gpioint.h @@ -1,7 +1,7 @@ -/************************************************************************************ +/**************************************************************************** * arch/arm/src/lpc43xx/lpc43_gpioint.h * - * 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 @@ -31,7 +31,8 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************************************/ + ****************************************************************************/ + /* GPIO pin interrupts * * From all available GPIO pins, up to eight pins can be selected in the system @@ -52,31 +53,19 @@ #ifndef __ARCH_ARM_SRC_LPC43XX_LPC43_GPIOINT_H #define __ARCH_ARM_SRC_LPC43XX_LPC43_GPIOINT_H -/************************************************************************************ +/**************************************************************************** * Included Files - ************************************************************************************/ + ****************************************************************************/ #include #include "chip.h" #include "chip/lpc43_gpio.h" -#ifdef CONFIG_GPIO_IRQ +#ifdef CONFIG_LPC43_GPIO_IRQ -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ /**************************************************************************** * Name: lpc43_gpioint_grpinitialize @@ -136,5 +125,21 @@ int lpc43_gpioint_pinconfig(uint16_t gpiocfg); int lpc43_gpioint_grpconfig(uint16_t gpiocfg); -#endif /* CONFIG_GPIO_IRQ */ +/**************************************************************************** + * Name: lpc43_gpioint_ack + * + * Description: + * Acknowledge the interrupt for a given pint interrupt number. Call this + * inside the interrupt handler. For edge sensitive interrupts, the interrupt + * status is cleared. For level sensitive interrupts, the active-high/-low + * sensitivity is inverted. + * + * Returned Value: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +int lpc43_gpioint_ack(uint8_t intnumber); + +#endif /* CONFIG_LPC43_GPIO_IRQ */ #endif /* __ARCH_ARM_SRC_LPC43XX_LPC43_GPIOINT_H */ diff --git a/arch/arm/src/lpc43xx/lpc43_i2c.c b/arch/arm/src/lpc43xx/lpc43_i2c.c index a7ddfa4726cbf0f43a9aa4137269b2d353c8c87d..fed79db207346085b6bed336ce76d95d03587325 100644 --- a/arch/arm/src/lpc43xx/lpc43_i2c.c +++ b/arch/arm/src/lpc43xx/lpc43_i2c.c @@ -464,7 +464,7 @@ struct i2c_master_s *lpc43_i2cbus_initialize(int port) if (port > 1) { - dbg("lpc I2C Only support 0,1\n"); + i2cerr("ERROR: lpc I2C Only suppors ports 0 and 1\n"); return NULL; } diff --git a/arch/arm/src/lpc43xx/lpc43_idle.c b/arch/arm/src/lpc43xx/lpc43_idle.c index 62f665495e01bd3c1fddad91f2278912e347b362..5cc38b16f5facbdea98eef7a1e239bb284f4de52 100644 --- a/arch/arm/src/lpc43xx/lpc43_idle.c +++ b/arch/arm/src/lpc43xx/lpc43_idle.c @@ -98,7 +98,7 @@ static void up_idlepm(void) /* Perform board-specific, state-dependent logic here */ - llvdbg("newstate= %d oldstate=%d\n", newstate, oldstate); + _info("newstate= %d oldstate=%d\n", newstate, oldstate); /* Then force the global state change */ diff --git a/arch/arm/src/lpc43xx/lpc43_irq.c b/arch/arm/src/lpc43xx/lpc43_irq.c index 73ca6d3bc7cb53063899cb35d89b94a058036658..345f63b5c24eb8f639da0c47e9dfe3ed04f1a5d4 100644 --- a/arch/arm/src/lpc43xx/lpc43_irq.c +++ b/arch/arm/src/lpc43xx/lpc43_irq.c @@ -107,37 +107,39 @@ extern uint32_t _vectors[]; * ****************************************************************************/ -#if defined(CONFIG_DEBUG_IRQ) +#if defined(CONFIG_DEBUG_IRQ_INFO) static void lpc43_dumpnvic(const char *msg, int irq) { irqstate_t flags; flags = enter_critical_section(); - lldbg("NVIC (%s, irq=%d):\n", msg, irq); - lldbg(" INTCTRL: %08x VECTAB: %08x\n", - getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB)); + + irqinfo("NVIC (%s, irq=%d):\n", msg, irq); + irqinfo(" INTCTRL: %08x VECTAB: %08x\n", + getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB)); #if 0 - lldbg(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n", - getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA), - getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE)); + irqinfo(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n", + getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA), + getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE)); #endif - lldbg(" IRQ ENABLE: %08x %08x\n", - getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE)); - lldbg(" SYSH_PRIO: %08x %08x %08x\n", - getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY), - getreg32(NVIC_SYSH12_15_PRIORITY)); - lldbg(" IRQ PRIO: %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY), - getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY)); - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY), - getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY)); - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY), - getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY)); - lldbg(" %08x %08x %08x\n", - getreg32(NVIC_IRQ48_51_PRIORITY), getreg32(NVIC_IRQ52_55_PRIORITY), - getreg32(NVIC_IRQ56_59_PRIORITY)); + irqinfo(" IRQ ENABLE: %08x %08x\n", + getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE)); + irqinfo(" SYSH_PRIO: %08x %08x %08x\n", + getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY), + getreg32(NVIC_SYSH12_15_PRIORITY)); + irqinfo(" IRQ PRIO: %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY), + getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY), + getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY), + getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY)); + irqinfo(" %08x %08x %08x\n", + getreg32(NVIC_IRQ48_51_PRIORITY), getreg32(NVIC_IRQ52_55_PRIORITY), + getreg32(NVIC_IRQ56_59_PRIORITY)); + leave_critical_section(flags); } #else @@ -155,11 +157,11 @@ static void lpc43_dumpnvic(const char *msg, int irq) * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES static int lpc43_nmi(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! NMI received\n"); + _err("PANIC!!! NMI received\n"); PANIC(); return 0; } @@ -167,7 +169,7 @@ static int lpc43_nmi(int irq, FAR void *context) static int lpc43_busfault(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Bus fault recived\n"); + _err("PANIC!!! Bus fault recived\n"); PANIC(); return 0; } @@ -175,7 +177,7 @@ static int lpc43_busfault(int irq, FAR void *context) static int lpc43_usagefault(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Usage fault received\n"); + _err("PANIC!!! Usage fault received\n"); PANIC(); return 0; } @@ -183,7 +185,7 @@ static int lpc43_usagefault(int irq, FAR void *context) static int lpc43_pendsv(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! PendSV received\n"); + _err("PANIC!!! PendSV received\n"); PANIC(); return 0; } @@ -191,7 +193,7 @@ static int lpc43_pendsv(int irq, FAR void *context) static int lpc43_dbgmonitor(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Debug Monitor received\n"); + _err("PANIC!!! Debug Monitor received\n"); PANIC(); return 0; } @@ -199,7 +201,7 @@ static int lpc43_dbgmonitor(int irq, FAR void *context) static int lpc43_reserved(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Reserved interrupt\n"); + _err("PANIC!!! Reserved interrupt\n"); PANIC(); return 0; } @@ -246,18 +248,45 @@ static int lpc43_irqinfo(int irq, uintptr_t *regaddr, uint32_t *bit, if (irq >= LPC43_IRQ_EXTINT) { + /* NOTE: We assume that there are at least 32 interrupts */ + if (irq < (LPC43_IRQ_EXTINT + 32)) { + /* Interrupt in range {0-31} */ + *regaddr = (NVIC_IRQ0_31_ENABLE + offset); *bit = 1 << (irq - LPC43_IRQ_EXTINT); } +#if LPC43M4_IRQ_NEXTINT > 95 +# error Extension to interrupt logic needed +#elif LPC43M4_IRQ_NEXTINT > 63 + else if (irq < (LPC43_IRQ_EXTINT + 64)) + { + /* Interrupt in range {32-63} */ + + *regaddr = (NVIC_IRQ32_63_ENABLE + offset); + *bit = 1 << (irq - LPC43_IRQ_EXTINT - 32); + } else if (irq < LPC43M4_IRQ_NIRQS) { + /* Interrupt in range {64-LPC43M4_IRQ_NIRQS}, LPC43M4_IRQ_NIRQS <= 95 */ + + *regaddr = (NVIC_IRQ64_95_ENABLE + offset); + *bit = 1 << (irq - LPC43_IRQ_EXTINT - 64); + } +#else /* if LPC43M4_IRQ_NEXTINT > 31 */ + else if (irq < LPC43M4_IRQ_NIRQS) + { + /* Interrupt in range {32-LPC43M4_IRQ_NIRQS}, LPC43M4_IRQ_NIRQS <= 63 */ + *regaddr = (NVIC_IRQ32_63_ENABLE + offset); *bit = 1 << (irq - LPC43_IRQ_EXTINT - 32); } +#endif else { + /* Interrupt >= LPC43M4_IRQ_NIRQS */ + return ERROR; /* Invalid interrupt */ } } @@ -309,7 +338,7 @@ static int lpc43_irqinfo(int irq, uintptr_t *regaddr, uint32_t *bit, void up_irqinitialize(void) { uint32_t regaddr; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES uint32_t regval; #endif int num_priority_registers; @@ -317,7 +346,12 @@ void up_irqinitialize(void) /* Disable all interrupts */ putreg32(0, NVIC_IRQ0_31_ENABLE); +#if LPC43M4_IRQ_NEXTINT > 31 putreg32(0, NVIC_IRQ32_63_ENABLE); +#if LPC43M4_IRQ_NEXTINT > 63 + putreg32(0, NVIC_IRQ64_95_ENABLE); +#endif +#endif /* Make sure that we are using the correct vector table. The default * vector address is 0x0000:0000 but if we are executing code that is @@ -395,7 +429,7 @@ void up_irqinitialize(void) /* Attach all other processor exceptions (except reset and sys tick) */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES irq_attach(LPC43_IRQ_NMI, lpc43_nmi); #ifndef CONFIG_ARM_MPU irq_attach(LPC43_IRQ_MEMFAULT, up_memfault); @@ -414,7 +448,7 @@ void up_irqinitialize(void) * operation. */ -#if defined(CONFIG_DEBUG) && !defined(CONFIG_ARMV7M_USEBASEPRI) +#if defined(CONFIG_DEBUG_FEATURES) && !defined(CONFIG_ARMV7M_USEBASEPRI) regval = getreg32(NVIC_DEMCR); regval &= ~NVIC_DEMCR_VCHARDERR; putreg32(regval, NVIC_DEMCR); diff --git a/arch/arm/src/lpc43xx/lpc43_pinconfig.h b/arch/arm/src/lpc43xx/lpc43_pinconfig.h index dad885d86bd52050605ed24abd7df00322dde0e7..63e7d768bdc6c712a921970f00819f4512893689 100644 --- a/arch/arm/src/lpc43xx/lpc43_pinconfig.h +++ b/arch/arm/src/lpc43xx/lpc43_pinconfig.h @@ -264,7 +264,7 @@ int lpc43_pin_config(uint32_t pinconf); * ********************************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES int lpc43_pin_dump(uint32_t pinconf, const char *msg); #else # define lpc43_pin_dump(p,m) diff --git a/arch/arm/src/lpc43xx/lpc43_rgu.c b/arch/arm/src/lpc43xx/lpc43_rgu.c index 9671a4f8a59709f3b672240eeeaa33acb1f5c4f6..799e3c21e65dc5cc79a0d2b548cd9b27d2765cf0 100644 --- a/arch/arm/src/lpc43xx/lpc43_rgu.c +++ b/arch/arm/src/lpc43xx/lpc43_rgu.c @@ -75,7 +75,7 @@ * Description: * Reset as many of the LPC43 peripherals as possible. This is necessary * because the LPC43 does not provide any way of performing a full system - * reset under debugger control. So, if CONFIG_DEBUG is set (indicating + * reset under debugger control. So, if CONFIG_DEBUG_FEATURES is set (indicating * that a debugger is being used?), the boot logic will call this * function on all restarts. * diff --git a/arch/arm/src/lpc43xx/lpc43_rgu.h b/arch/arm/src/lpc43xx/lpc43_rgu.h index 2d1604d23a4c3a9b44ce09773c587b1a6c47e75f..f283a9aaf3611d083652eefa8c6c70309cced9fb 100644 --- a/arch/arm/src/lpc43xx/lpc43_rgu.h +++ b/arch/arm/src/lpc43xx/lpc43_rgu.h @@ -76,7 +76,7 @@ extern "C" * Description: * Reset as many of the LPC43 peripherals as possible. This is necessary * because the LPC43 does not provide any way of performing a full system - * reset under debugger control. So, if CONFIG_DEBUG is set (indicating + * reset under debugger control. So, if CONFIG_DEBUG_FEATURES is set (indicating * that a debugger is being used?), the boot logic will call this * function on all restarts. * diff --git a/arch/arm/src/lpc43xx/lpc43_rit.c b/arch/arm/src/lpc43xx/lpc43_rit.c index f80cd550ac052725e44155c8ba45c918c1e5003a..e42fc7db438a7c12f66cb1002028c8f043e7a9a8 100644 --- a/arch/arm/src/lpc43xx/lpc43_rit.c +++ b/arch/arm/src/lpc43xx/lpc43_rit.c @@ -201,8 +201,8 @@ void up_timer_initialize(void) mask_bits++; } - lldbg("mask_bits = %d, mask = %X, ticks_per_int = %d\r\n", - mask_bits, (0xffffffff << (32 - mask_bits)), ticks_per_int); + tmrinfo("mask_bits = %d, mask = %X, ticks_per_int = %d\r\n", + mask_bits, (0xffffffff << (32 - mask_bits)), ticks_per_int); /* Set the mask and compare value so we get interrupts every * RIT_TIMER_RESOLUTION cycles. diff --git a/arch/arm/src/lpc43xx/lpc43_serial.c b/arch/arm/src/lpc43xx/lpc43_serial.c index c12d65597b1b2e7df3709df5f75fe79df6bc052d..56e03bbea03cf0a25adac1d62677f2b0fab6c715 100644 --- a/arch/arm/src/lpc43xx/lpc43_serial.c +++ b/arch/arm/src/lpc43xx/lpc43_serial.c @@ -854,7 +854,7 @@ static int up_interrupt(int irq, void *context) /* Read the modem status register (MSR) to clear */ status = up_serialin(priv, LPC43_UART_MSR_OFFSET); - vdbg("MSR: %02x\n", status); + _info("MSR: %02x\n", status); break; } @@ -865,7 +865,7 @@ static int up_interrupt(int irq, void *context) /* Read the line status register (LSR) to clear */ status = up_serialin(priv, LPC43_UART_LSR_OFFSET); - vdbg("LSR: %02x\n", status); + _info("LSR: %02x\n", status); break; } @@ -873,7 +873,7 @@ static int up_interrupt(int irq, void *context) default: { - dbg("Unexpected IIR: %02x\n", status); + _err("ERROR: Unexpected IIR: %02x\n", status); break; } } diff --git a/arch/arm/src/lpc43xx/lpc43_spi.c b/arch/arm/src/lpc43xx/lpc43_spi.c index 32b5a45913188bb7bc0d1f39dbfafdf51f41bc01..e30b39bf25980e8df1c4dc679bf709a1c1afcc33 100644 --- a/arch/arm/src/lpc43xx/lpc43_spi.c +++ b/arch/arm/src/lpc43xx/lpc43_spi.c @@ -64,21 +64,6 @@ * Pre-processor Definitions ****************************************************************************/ -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef CONFIG_DEBUG_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - /* SPI Clocking. * * The CPU clock by 1, 2, 4, or 8 to get the SPI peripheral clock (SPI_CLOCK). @@ -274,7 +259,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) priv->frequency = frequency; priv->actual = actual; - spidbg("Frequency %d->%d\n", frequency, actual); + spiinfo("Frequency %d->%d\n", frequency, actual); return actual; } @@ -436,7 +421,7 @@ static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size FAR uint8_t *ptr = (FAR uint8_t *)buffer; uint8_t data; - spidbg("nwords: %d\n", nwords); + spiinfo("nwords: %d\n", nwords); while (nwords) { /* Write the data to transmitted to the SPI Data Register */ @@ -481,7 +466,7 @@ static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nw { FAR uint8_t *ptr = (FAR uint8_t *)buffer; - spidbg("nwords: %d\n", nwords); + spiinfo("nwords: %d\n", nwords); while (nwords) { /* Write some dummy data to the SPI Data Register in order to clock the diff --git a/arch/arm/src/lpc43xx/lpc43_spifi.c b/arch/arm/src/lpc43xx/lpc43_spifi.c index 0d90ea9fceb15b162652c9a627e1888c160ef990..71920dc47750290990302ffd9dd6d9670f737df5 100644 --- a/arch/arm/src/lpc43xx/lpc43_spifi.c +++ b/arch/arm/src/lpc43xx/lpc43_spifi.c @@ -92,7 +92,7 @@ * from the SPI address space after each write. * CONFIG_DEBUG_SPIFI_DUMP - Debug option to dump read/write buffers. You * probably do not want to enable this unless you want to dig through a - * *lot* of debug output! Also required CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, + * *lot* of debug output! Also required CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, * and CONFIG_DEBUG_FS, */ @@ -263,7 +263,7 @@ * enable this unless you want to dig through a *lot* of debug output! */ -#if !defined(CONFIG_DEBUG) || !defined(CONFIG_DEBUG_VERBOSE) || !defined(CONFIG_DEBUG_FS) +#if !defined(CONFIG_DEBUG_FEATURES) || !defined(CONFIG_DEBUG_INFO) || !defined(CONFIG_DEBUG_FS) # undef CONFIG_DEBUG_SPIFI_DUMP #endif @@ -382,13 +382,13 @@ static void lpc43_blockerase(struct lpc43_dev_s *priv, off_t sector) priv->operands.dest = SPIFI_BASE + (sector << SPIFI_BLKSHIFT); priv->operands.length = SPIFI_BLKSIZE; - fvdbg("SPIFI_ERASE: dest=%p length=%d\n", + finfo("SPIFI_ERASE: dest=%p length=%d\n", priv->operands.dest, priv->operands.length); result = SPIFI_ERASE(priv, &priv->rom, &priv->operands); if (result != 0) { - fdbg("ERROR: SPIFI_ERASE failed: %05x\n", result); + ferr("ERROR: SPIFI_ERASE failed: %05x\n", result); } } @@ -411,13 +411,13 @@ static inline int lpc43_chiperase(struct lpc43_dev_s *priv) priv->operands.dest = SPIFI_BASE; priv->operands.length = SPIFI_BLKSIZE * priv->nblocks; - fvdbg("SPIFI_ERASE: dest=%p length=%d\n", + finfo("SPIFI_ERASE: dest=%p length=%d\n", priv->operands.dest, priv->operands.length); result = SPIFI_ERASE(priv, &priv->rom, &priv->operands); if (result != 0) { - fdbg("ERROR: SPIFI_ERASE failed: %05x\n", result); + ferr("ERROR: SPIFI_ERASE failed: %05x\n", result); return -EIO; } @@ -457,13 +457,13 @@ static int lpc43_pagewrite(FAR struct lpc43_dev_s *priv, FAR uint8_t *dest, priv->operands.dest = dest; priv->operands.length = nbytes; - fvdbg("SPIFI_PROGRAM: src=%p dest=%p length=%d\n", + finfo("SPIFI_PROGRAM: src=%p dest=%p length=%d\n", src, priv->operands.dest, priv->operands.length); result = SPIFI_PROGRAM(priv, &priv->rom, src, &priv->operands); if (result != 0) { - fdbg("ERROR: SPIFI_PROGRAM failed: %05x\n", result); + ferr("ERROR: SPIFI_PROGRAM failed: %05x\n", result); return -EIO; } @@ -475,7 +475,7 @@ static int lpc43_pagewrite(FAR struct lpc43_dev_s *priv, FAR uint8_t *dest, result = lpc43_verify(priv, dest, src, nbytes); if (result != 0) { - fdbg("ERROR: lpc43_verify failed: %05x\n", result); + ferr("ERROR: lpc43_verify failed: %05x\n", result); return -EIO; } #endif @@ -492,7 +492,7 @@ static inline void lpc43_pageread(FAR struct lpc43_dev_s *priv, FAR uint8_t *dest, FAR const uint8_t *src, size_t nbytes) { - fvdbg("src=%p dest=%p length=%d\n", src, dest, nbytes); + finfo("src=%p dest=%p length=%d\n", src, dest, nbytes); memcpy(dest, src, nbytes); } @@ -511,7 +511,7 @@ static void lpc43_cacheflush(struct lpc43_dev_s *priv) * the cached erase block to FLASH. */ - fvdbg("flags: %02x blkno: %d\n", priv->flags, priv->blkno); + finfo("flags: %02x blkno: %d\n", priv->flags, priv->blkno); if (IS_DIRTY(priv) || IS_ERASED(priv)) { /* Get the SPIFI address corresponding to the cached erase block */ @@ -523,7 +523,7 @@ static void lpc43_cacheflush(struct lpc43_dev_s *priv) ret = lpc43_pagewrite(priv, dest, priv->cache, SPIFI_BLKSIZE); if (ret < 0) { - fdbg("ERROR: lpc43_pagewrite failed: %d\n", ret); + ferr("ERROR: lpc43_pagewrite failed: %d\n", ret); } /* The case is no long dirty and the FLASH is no longer erased */ @@ -551,7 +551,7 @@ static FAR uint8_t *lpc43_cacheread(struct lpc43_dev_s *priv, off_t sector) */ blkno = sector >> (SPIFI_BLKSHIFT - SPIFI_512SHIFT); - fvdbg("sector: %ld blkno: %d\n", sector, blkno); + finfo("sector: %ld blkno: %d\n", sector, blkno); /* Check if the requested erase block is already in the cache */ @@ -612,7 +612,7 @@ static void lpc43_cacheerase(struct lpc43_dev_s *priv, off_t sector) if (!IS_ERASED(priv)) { off_t blkno = sector >> (SPIFI_BLKSHIFT - SPIFI_512SHIFT); - fvdbg("sector: %ld blkno: %d\n", sector, blkno); + finfo("sector: %ld blkno: %d\n", sector, blkno); lpc43_blockerase(priv, blkno); SET_ERASED(priv); @@ -646,7 +646,7 @@ static void lpc43_cachewrite(FAR struct lpc43_dev_s *priv, FAR const uint8_t *bu dest = lpc43_cacheread(priv, sector); - fvdbg("dest=%p src=%p sector: %ld flags: %02x\n", + finfo("dest=%p src=%p sector: %ld flags: %02x\n", dest, buffer, sector, priv->flags); /* Erase the block containing this sector if it is not already erased. @@ -657,7 +657,7 @@ static void lpc43_cachewrite(FAR struct lpc43_dev_s *priv, FAR const uint8_t *bu if (!IS_ERASED(priv)) { off_t blkno = sector >> (SPIFI_BLKSHIFT - SPIFI_512SHIFT); - fvdbg("sector: %ld blkno: %d\n", sector, blkno); + finfo("sector: %ld blkno: %d\n", sector, blkno); lpc43_blockerase(priv, blkno); SET_ERASED(priv); @@ -692,7 +692,7 @@ static int lpc43_erase(FAR struct mtd_dev_s *dev, off_t startblock, size_t nbloc FAR struct lpc43_dev_s *priv = (FAR struct lpc43_dev_s *)dev; size_t blocksleft = nblocks; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); while (blocksleft-- > 0) { @@ -726,7 +726,7 @@ static ssize_t lpc43_bread(FAR struct mtd_dev_s *dev, off_t startblock, size_t n #ifdef CONFIG_SPIFI_SECTOR512 ssize_t nbytes; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* On this device, we can handle the block read just like the byte-oriented read */ @@ -743,7 +743,7 @@ static ssize_t lpc43_bread(FAR struct mtd_dev_s *dev, off_t startblock, size_t n FAR struct lpc43_dev_s *priv = (FAR struct lpc43_dev_s *)dev; ssize_t nbytes; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* On this device, we can handle the block read just like the byte-oriented read */ @@ -774,7 +774,7 @@ static ssize_t lpc43_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t FAR struct lpc43_dev_s *priv = (FAR struct lpc43_dev_s *)dev; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); lpc43_cachewrite(priv, buffer, startblock, nblocks); @@ -786,7 +786,7 @@ static ssize_t lpc43_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t FAR struct lpc43_dev_s *priv = (FAR struct lpc43_dev_s *)dev; FAR uint8_t *dest; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* Get the SPIFI address corresponding to the erase block */ @@ -798,7 +798,7 @@ static ssize_t lpc43_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t ret = lpc43_pagewrite(priv, dest, buffer, nblocks << SPIFI_512SHIFT); if (ret < 0) { - fdbg("ERROR: lpc43_pagewrite failed: %d\n", ret); + ferr("ERROR: lpc43_pagewrite failed: %d\n", ret); return ret; } #endif @@ -819,7 +819,7 @@ static ssize_t lpc43_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes FAR struct lpc43_dev_s *priv = (FAR struct lpc43_dev_s *)dev; FAR const uint8_t *src; - fvdbg("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); + finfo("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); /* Get the SPIFI address corresponding sector */ @@ -829,7 +829,7 @@ static ssize_t lpc43_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes lpc43_pageread(priv, buffer, src, nbytes); - fvdbg("return nbytes: %d\n", (int)nbytes); + finfo("return nbytes: %d\n", (int)nbytes); return nbytes; } @@ -842,7 +842,7 @@ static int lpc43_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) FAR struct lpc43_dev_s *priv = (FAR struct lpc43_dev_s *)dev; int ret = -EINVAL; /* Assume good command with bad parameters */ - fvdbg("cmd: %d \n", cmd); + finfo("cmd: %d \n", cmd); switch (cmd) { @@ -871,7 +871,7 @@ static int lpc43_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) #endif ret = OK; - fvdbg("blocksize: %d erasesize: %d neraseblocks: %d\n", + finfo("blocksize: %d erasesize: %d neraseblocks: %d\n", geo->blocksize, geo->erasesize, geo->neraseblocks); } } @@ -891,7 +891,7 @@ static int lpc43_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) break; } - fvdbg("return %d\n", ret); + finfo("return %d\n", ret); return ret; } @@ -1025,7 +1025,7 @@ static inline int lpc43_rominit(FAR struct lpc43_dev_s *priv) S_RCVCLK | S_FULLCLK, SCLK_MHZ); if (result != 0) { - fdbg("ERROR: SPIFI_INIT failed: %05x\n", result); + ferr("ERROR: SPIFI_INIT failed: %05x\n", result); /* Try again */ @@ -1033,29 +1033,29 @@ static inline int lpc43_rominit(FAR struct lpc43_dev_s *priv) S_RCVCLK | S_FULLCLK, SCLK_MHZ); if (result != 0) { - fdbg("ERROR: SPIFI_INIT failed: %05x\n", result); + ferr("ERROR: SPIFI_INIT failed: %05x\n", result); return -ENODEV; } } - fvdbg("SPFI:\n"); - fvdbg(" base: %08x\n", priv->rom.base); - fvdbg(" regbase: %08x\n", priv->rom.regbase); - fvdbg(" devsize: %08x\n", priv->rom.devsize); - fvdbg(" memsize: %08x\n", priv->rom.memsize); - fvdbg(" mfger: %02x\n", priv->rom.mfger); - fvdbg(" devtype: %02x\n", priv->rom.devtype); - fvdbg(" devid: %02x\n", priv->rom.devid); - fvdbg(" busy: %02x\n", priv->rom.busy); - fvdbg(" stat: %04x\n", priv->rom.stat.h); - fvdbg(" setprot: %04x\n", priv->rom.setprot); - fvdbg(" writeprot: %04x\n", priv->rom.writeprot); - fvdbg(" memcmd: %08x\n", priv->rom.memcmd); - fvdbg(" progcmd: %08x\n", priv->rom.progcmd); - fvdbg(" sectors: %04x\n", priv->rom.sectors); - fvdbg(" protbytes: %04x\n", priv->rom.protbytes); - fvdbg(" opts: %08x\n", priv->rom.opts); - fvdbg(" errcheck: %08x\n", priv->rom.errcheck); + finfo("SPFI:\n"); + finfo(" base: %08x\n", priv->rom.base); + finfo(" regbase: %08x\n", priv->rom.regbase); + finfo(" devsize: %08x\n", priv->rom.devsize); + finfo(" memsize: %08x\n", priv->rom.memsize); + finfo(" mfger: %02x\n", priv->rom.mfger); + finfo(" devtype: %02x\n", priv->rom.devtype); + finfo(" devid: %02x\n", priv->rom.devid); + finfo(" busy: %02x\n", priv->rom.busy); + finfo(" stat: %04x\n", priv->rom.stat.h); + finfo(" setprot: %04x\n", priv->rom.setprot); + finfo(" writeprot: %04x\n", priv->rom.writeprot); + finfo(" memcmd: %08x\n", priv->rom.memcmd); + finfo(" progcmd: %08x\n", priv->rom.progcmd); + finfo(" sectors: %04x\n", priv->rom.sectors); + finfo(" protbytes: %04x\n", priv->rom.protbytes); + finfo(" opts: %08x\n", priv->rom.opts); + finfo(" errcheck: %08x\n", priv->rom.errcheck); /* Get the largest erase block size */ @@ -1065,11 +1065,11 @@ static inline int lpc43_rominit(FAR struct lpc43_dev_s *priv) sectors = priv->rom.sectors; log2 = 0; - fvdbg("FLASH Geometry:\n"); + finfo("FLASH Geometry:\n"); while (sectors > 0) { - fvdbg(" log2: %d rept: %d\n", desc->log2, desc->rept); + finfo(" log2: %d rept: %d\n", desc->log2, desc->rept); /* Check if this is the largest erase block size seen */ @@ -1091,10 +1091,10 @@ static inline int lpc43_rominit(FAR struct lpc43_dev_s *priv) priv->blksize = (1 << log2); priv->nblocks = (priv->rom.memsize - CONFIG_SPIFI_OFFSET) / priv->blksize; - fvdbg("Driver FLASH Geometry:\n"); - fvdbg(" blkshift: %d\n", priv->blkshift); - fvdbg(" blksize: %08x\n", priv->blksize); - fvdbg(" nblocks: %d\n", priv->nblocks); + finfo("Driver FLASH Geometry:\n"); + finfo(" blkshift: %d\n", priv->blkshift); + finfo(" blksize: %08x\n", priv->blksize); + finfo(" nblocks: %d\n", priv->nblocks); #ifdef CONFIG_SPIFI_SECTOR512 DEBUGASSERT(log2 > 9); @@ -1106,10 +1106,10 @@ static inline int lpc43_rominit(FAR struct lpc43_dev_s *priv) priv->nblocks = ((priv->rom.memsize - CONFIG_SPIFI_OFFSET) >> SPIFI_BLKSHIFT); - fvdbg("Driver FLASH Geometry:\n"); - fvdbg(" blkshift: %d\n", SPIFI_BLKSHIFT); - fvdbg(" blksize: %08x\n", SPIFI_BLKSIZE); - fvdbg(" nblocks: %d\n", priv->nblocks); + finfo("Driver FLASH Geometry:\n"); + finfo(" blkshift: %d\n", SPIFI_BLKSHIFT); + finfo(" blksize: %08x\n", SPIFI_BLKSIZE); + finfo(" nblocks: %d\n", priv->nblocks); #endif return OK; @@ -1201,14 +1201,14 @@ FAR struct mtd_dev_s *lpc43_spifi_initialize(void) { /* Allocation failed! Discard all of that work we just did and return NULL */ - fdbg("ERROR: Allocation failed\n"); + ferr("ERROR: Allocation failed\n"); return NULL; } #endif /* Return the implementation-specific state structure as the MTD device */ - fvdbg("Return %p\n", priv); + finfo("Return %p\n", priv); return (FAR struct mtd_dev_s *)priv; } diff --git a/arch/arm/src/lpc43xx/lpc43_ssp.c b/arch/arm/src/lpc43xx/lpc43_ssp.c index 0d227fa8fa57e3ff7f808a366d78870eb564d22f..49f7c5781f990712dfc04833e5a5d33a496590b7 100644 --- a/arch/arm/src/lpc43xx/lpc43_ssp.c +++ b/arch/arm/src/lpc43xx/lpc43_ssp.c @@ -62,34 +62,8 @@ #include "lpc43_ccu.h" #include "lpc43_pinconfig.h" - #if defined(CONFIG_LPC43_SSP0) || defined(CONFIG_LPC43_SSP1) -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* The following enable debug output from this file (needs CONFIG_DEBUG too). - * - * CONFIG_SSP_DEBUG - Define to enable basic SSP debug - * CONFIG_SSP_VERBOSE - Define to enable verbose SSP debug - */ - -#ifdef CONFIG_SSP_DEBUG -# define sspdbg lldbg -# ifdef CONFIG_SSP_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef CONFIG_SSP_VERBOSE -# define sspdbg(x...) -# define spivdbg(x...) -#endif - - - /**************************************************************************** * Private Types ****************************************************************************/ @@ -378,7 +352,7 @@ static uint32_t ssp_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) priv->frequency = frequency; priv->actual = actual; - sspdbg("Frequency %d->%d\n", frequency, actual); + spiinfo("Frequency %d->%d\n", frequency, actual); return actual; } @@ -429,7 +403,7 @@ static void ssp_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode) break; default: - sspdbg("Bad mode: %d\n", mode); + spierr("ERROR: Bad mode: %d\n", mode); DEBUGASSERT(FALSE); return; } @@ -517,7 +491,7 @@ static uint16_t ssp_send(FAR struct spi_dev_s *dev, uint16_t wd) /* Get the value from the RX FIFO and return it */ regval = ssp_getreg(priv, LPC43_SSP_DR_OFFSET); - sspdbg("%04x->%04x\n", wd, regval); + spiinfo("%04x->%04x\n", wd, regval); return (uint16_t)regval; } @@ -564,7 +538,7 @@ static void ssp_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, /* While there is remaining to be sent (and no synchronization error has occurred) */ - sspdbg("nwords: %d\n", nwords); + spiinfo("nwords: %d\n", nwords); tx.pv = txbuffer; rx.pv = rxbuffer; @@ -576,7 +550,7 @@ static void ssp_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, * and (3) there are more bytes to be sent. */ - spivdbg("TX: rxpending: %d nwords: %d\n", rxpending, nwords); + spiinfo("TX: rxpending: %d nwords: %d\n", rxpending, nwords); while ((ssp_getreg(priv, LPC43_SSP_SR_OFFSET) & SSP_SR_TNF) && (rxpending < LPC43_SSP_FIFOSZ) && nwords) { @@ -599,7 +573,7 @@ static void ssp_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, /* Now, read the RX data from the RX FIFO while the RX FIFO is not empty */ - spivdbg("RX: rxpending: %d\n", rxpending); + spiinfo("RX: rxpending: %d\n", rxpending); while (ssp_getreg(priv, LPC43_SSP_SR_OFFSET) & SSP_SR_RNE) { data = ssp_getreg(priv, LPC43_SSP_DR_OFFSET); diff --git a/arch/arm/src/lpc43xx/lpc43_start.c b/arch/arm/src/lpc43xx/lpc43_start.c index 80ffb581ee8fb978e3f69d84435504b2a4493890..e3fe5c552e8b37ff2f652875cd35027fdac61b51 100644 --- a/arch/arm/src/lpc43xx/lpc43_start.c +++ b/arch/arm/src/lpc43xx/lpc43_start.c @@ -87,7 +87,7 @@ * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES # define showprogress(c) up_lowputc(c) #else # define showprogress(c) @@ -271,12 +271,12 @@ void __start(void) /* Reset as many of the LPC43 peripherals as possible. This is necessary * because the LPC43 does not provide any way of performing a full system - * reset under debugger control. So, if CONFIG_DEBUG is set (indicating + * reset under debugger control. So, if CONFIG_DEBUG_FEATURES is set (indicating * that a debugger is being used?), the boot logic will call this * function on all restarts. */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES lpc43_softreset(); #endif diff --git a/arch/arm/src/lpc43xx/lpc43_usb0dev.c b/arch/arm/src/lpc43xx/lpc43_usb0dev.c index 57e3ef2c8ce7a934c7e606182a53b1ab49403721..c583dd30a1854a803bcbd1506dab1fa5121d5bb3 100644 --- a/arch/arm/src/lpc43xx/lpc43_usb0dev.c +++ b/arch/arm/src/lpc43xx/lpc43_usb0dev.c @@ -107,7 +107,7 @@ # define USB_FRAME_INT 0 #endif -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES # define USB_ERROR_INT USBDEV_USBINTR_UEE #else # define USB_ERROR_INT 0 @@ -361,7 +361,7 @@ struct lpc43_usbdev_s /* Register operations ********************************************************/ -#if defined(CONFIG_LPC43_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_LPC43_USBDEV_REGDEBUG static uint32_t lpc43_getreg(uint32_t addr); static void lpc43_putreg(uint32_t val, uint32_t addr); #else @@ -501,7 +501,7 @@ static const struct usbdev_ops_s g_devops = * ****************************************************************************/ -#if defined(CONFIG_LPC43_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_LPC43_USBDEV_REGDEBUG static uint32_t lpc43_getreg(uint32_t addr) { static uint32_t prevaddr = 0; @@ -522,7 +522,7 @@ static uint32_t lpc43_getreg(uint32_t addr) { if (count == 4) { - lldbg("...\n"); + usbinfo("...\n"); } return val; @@ -539,7 +539,7 @@ static uint32_t lpc43_getreg(uint32_t addr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + usbinfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -551,7 +551,7 @@ static uint32_t lpc43_getreg(uint32_t addr) /* Show the register value read */ - lldbg("%08x->%08x\n", addr, val); + usbinfo("%08x->%08x\n", addr, val); return val; } #endif @@ -564,12 +564,12 @@ static uint32_t lpc43_getreg(uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_LPC43_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_LPC43_USBDEV_REGDEBUG static void lpc43_putreg(uint32_t val, uint32_t addr) { /* Show the register value being written */ - lldbg("%08x<-%08x\n", addr, val); + usbinfo("%08x<-%08x\n", addr, val); /* Write the value */ @@ -1228,8 +1228,8 @@ static inline void lpc43_ep0setup(struct lpc43_usbdev_s *priv) priv->ep0buf_len = len; - ullvdbg("type=%02x req=%02x value=%04x index=%04x len=%04x\n", - ctrl->type, ctrl->req, value, index, len); + uinfo("type=%02x req=%02x value=%04x index=%04x len=%04x\n", + ctrl->type, ctrl->req, value, index, len); /* Starting a control request - update state */ @@ -1393,7 +1393,7 @@ static inline void lpc43_ep0setup(struct lpc43_usbdev_s *priv) if (((ctrl->type & USB_REQ_RECIPIENT_MASK) == USB_REQ_RECIPIENT_DEVICE) && value == USB_FEATURE_TESTMODE) { - ullvdbg("test mode: %d\n", index); + uinfo("test mode: %d\n", index); } else if ((ctrl->type & USB_REQ_RECIPIENT_MASK) != USB_REQ_RECIPIENT_ENDPOINT) { @@ -1623,7 +1623,7 @@ static void lpc43_ep0complete(struct lpc43_usbdev_s *priv, uint8_t epphy) break; default: -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES DEBUGASSERT(priv->ep0state != EP0STATE_DATA_IN && priv->ep0state != EP0STATE_DATA_OUT && priv->ep0state != EP0STATE_SHORTWRITE && @@ -1667,7 +1667,7 @@ static void lpc43_ep0nak(struct lpc43_usbdev_s *priv, uint8_t epphy) break; default: -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES DEBUGASSERT(priv->ep0state != EP0STATE_WAIT_NAK_IN && priv->ep0state != EP0STATE_WAIT_NAK_OUT); #endif @@ -2056,7 +2056,7 @@ static int lpc43_epdisable(FAR struct usbdev_ep_s *ep) FAR struct lpc43_ep_s *privep = (FAR struct lpc43_ep_s *)ep; irqstate_t flags; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { usbtrace(TRACE_DEVERROR(LPC43_TRACEERR_INVALIDPARMS), 0); @@ -2100,7 +2100,7 @@ static FAR struct usbdev_req_s *lpc43_epallocreq(FAR struct usbdev_ep_s *ep) { FAR struct lpc43_req_s *privreq; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { usbtrace(TRACE_DEVERROR(LPC43_TRACEERR_INVALIDPARMS), 0); @@ -2132,7 +2132,7 @@ static void lpc43_epfreereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s { FAR struct lpc43_req_s *privreq = (FAR struct lpc43_req_s *)req; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !req) { usbtrace(TRACE_DEVERROR(LPC43_TRACEERR_INVALIDPARMS), 0); @@ -2202,11 +2202,11 @@ static int lpc43_epsubmit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *r irqstate_t flags; int ret = OK; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!req || !req->callback || !req->buf || !ep) { usbtrace(TRACE_DEVERROR(LPC43_TRACEERR_INVALIDPARMS), 0); - ullvdbg("req=%p callback=%p buf=%p ep=%p\n", req, req->callback, req->buf, ep); + uinfo("req=%p callback=%p buf=%p ep=%p\n", req, req->callback, req->buf, ep); return -EINVAL; } #endif @@ -2271,7 +2271,7 @@ static int lpc43_epcancel(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *r FAR struct lpc43_ep_s *privep = (FAR struct lpc43_ep_s *)ep; irqstate_t flags; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !req) { usbtrace(TRACE_DEVERROR(LPC43_TRACEERR_INVALIDPARMS), 0); @@ -2554,7 +2554,7 @@ static int lpc43_selfpowered(struct usbdev_s *dev, bool selfpowered) usbtrace(TRACE_DEVSELFPOWERED, (uint16_t)selfpowered); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev) { usbtrace(TRACE_DEVERROR(LPC43_TRACEERR_INVALIDPARMS), 0); @@ -2790,7 +2790,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) usbtrace(TRACE_DEVREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !driver->ops->bind || !driver->ops->unbind || !driver->ops->disconnect || !driver->ops->setup) { @@ -2851,7 +2851,7 @@ int usbdev_unregister(struct usbdevclass_driver_s *driver) { usbtrace(TRACE_DEVUNREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (driver != g_usbdev.driver) { usbtrace(TRACE_DEVERROR(LPC43_TRACEERR_INVALIDPARMS), 0); diff --git a/arch/arm/src/lpc43xx/spifi/src/spifilib_dev_common.c b/arch/arm/src/lpc43xx/spifi/src/spifilib_dev_common.c index 8adc8f762b30af84b5ef7cfa5691bf07b03dbe88..c3e0a7b53bb6962b59e405be075183af275a8834 100644 --- a/arch/arm/src/lpc43xx/spifi/src/spifilib_dev_common.c +++ b/arch/arm/src/lpc43xx/spifi/src/spifilib_dev_common.c @@ -785,50 +785,50 @@ uint32_t spifiGetSubBlockFromBlock(const SPIFI_HANDLE_T *pHandle, uint32_t block SPIFI_ERR_T spifiProgram(const SPIFI_HANDLE_T *pHandle, uint32_t addr, const uint32_t *writeBuff, uint32_t bytes) { uint32_t sendBytes; - SPIFI_ERR_T err = SPIFI_ERR_NONE; + SPIFI_ERR_T errcode = SPIFI_ERR_NONE; /* Program using up to page size */ - while ((bytes > 0) && (err == SPIFI_ERR_NONE)) { + while ((bytes > 0) && (errcode == SPIFI_ERR_NONE)) { sendBytes = bytes; if (sendBytes > pHandle->pInfoData->pageSize) { sendBytes = pHandle->pInfoData->pageSize; } - err = pHandle->pFamFx->pageProgram(pHandle, addr, writeBuff, sendBytes); + errcode = pHandle->pFamFx->pageProgram(pHandle, addr, writeBuff, sendBytes); addr += sendBytes; writeBuff += (sendBytes >> 2); bytes -= sendBytes; } - return err; + return errcode; } /* Read the device into the passed buffer */ SPIFI_ERR_T spifiRead(const SPIFI_HANDLE_T *pHandle, uint32_t addr, uint32_t *readBuff, uint32_t bytes) { uint32_t readBytes; - SPIFI_ERR_T err = SPIFI_ERR_NONE; + SPIFI_ERR_T errcode = SPIFI_ERR_NONE; /* Read using up to the maximum read size */ - while ((bytes > 0) && (err == SPIFI_ERR_NONE)) { + while ((bytes > 0) && (errcode == SPIFI_ERR_NONE)) { readBytes = bytes; if (readBytes > pHandle->pInfoData->maxReadSize) { readBytes = pHandle->pInfoData->maxReadSize; } - err = pHandle->pFamFx->read(pHandle, addr, readBuff, readBytes); + errcode = pHandle->pFamFx->read(pHandle, addr, readBuff, readBytes); addr += readBytes; readBuff += (readBytes / sizeof(uint32_t)); bytes -= readBytes; } - return err; + return errcode; } /* Erase multiple blocks */ SPIFI_ERR_T spifiErase(const SPIFI_HANDLE_T *pHandle, uint32_t firstBlock, uint32_t numBlocks) { - SPIFI_ERR_T err = SPIFI_ERR_NONE; + SPIFI_ERR_T errcode = SPIFI_ERR_NONE; if ((firstBlock + numBlocks) > pHandle->pInfoData->numBlocks) { return SPIFI_ERR_RANGE; @@ -836,20 +836,20 @@ SPIFI_ERR_T spifiErase(const SPIFI_HANDLE_T *pHandle, uint32_t firstBlock, uint3 /* Only perform erase if numBlocks is != 0 */ for (; (numBlocks); ++firstBlock, --numBlocks) { - err = pHandle->pFamFx->eraseBlock(pHandle, firstBlock); - if (err != SPIFI_ERR_NONE) { + errcode = pHandle->pFamFx->eraseBlock(pHandle, firstBlock); + if (errcode != SPIFI_ERR_NONE) { break; } } - return err; + return errcode; } /* Erase multiple blocks by address range */ SPIFI_ERR_T spifiEraseByAddr(const SPIFI_HANDLE_T *pHandle, uint32_t firstAddr, uint32_t lastAddr) { uint32_t firstBlock, lastBlock; - SPIFI_ERR_T err = SPIFI_ERR_RANGE; + SPIFI_ERR_T errcode = SPIFI_ERR_RANGE; /* Get block numbers for addresses */ firstBlock = spifiGetBlockFromAddr(pHandle, firstAddr); @@ -857,8 +857,8 @@ SPIFI_ERR_T spifiEraseByAddr(const SPIFI_HANDLE_T *pHandle, uint32_t firstAddr, /* Limit to legal address range */ if ((firstBlock != ~0UL) && (lastBlock != ~0UL)) { - err = spifiErase(pHandle, firstBlock, ((lastBlock - firstBlock) + 1)); + errcode = spifiErase(pHandle, firstBlock, ((lastBlock - firstBlock) + 1)); } - return err; + return errcode; } diff --git a/arch/arm/src/moxart/moxart_irq.c b/arch/arm/src/moxart/moxart_irq.c index 8d2b07cc22011c5136622e354ed77009d09ff99a..31ed83c80fbd7e4f30676dde8401e6c18fee3097 100644 --- a/arch/arm/src/moxart/moxart_irq.c +++ b/arch/arm/src/moxart/moxart_irq.c @@ -143,18 +143,15 @@ void up_irqinitialize(void) /* And finally, enable interrupts */ -#if 1 -#define REG(x) (*(volatile uint32_t *)(x)) - lldbg("\n=============================================================\n"); - lldbg("TM CNTL=%08x INTRS=%08x MASK=%08x LOAD=%08x COUNT=%08x M1=%08x\n", - REG(0x98400030), REG(0x98400034), REG(0x98400038), REG(0x98400004), - REG(0x98400000), REG(0x98400008)); - lldbg("IRQ STATUS=%08x MASK=%08x MODE=%08x LEVEL=%08x\n", - REG(0x98800014), REG(0x98800004), REG(0x9880000C), REG(0x98800010)); - lldbg("FIQ STATUS=%08x MASK=%08x MODE=%08x LEVEL=%08x\n", - REG(0x98800034), REG(0x98800024), REG(0x9880002C), REG(0x98800020)); - lldbg("=============================================================\n"); -#endif + irqinfo("TM CNTL=%08x INTRS=%08x MASK=%08x LOAD=%08x COUNT=%08x M1=%08x\n", + getreg32(0x98400030), getreg32(0x98400034), getreg32(0x98400038), + getreg32(0x98400004), getreg32(0x98400000), getreg32(0x98400008)); + irqinfo("IRQ STATUS=%08x MASK=%08x MODE=%08x LEVEL=%08x\n", + getreg32(0x98800014), getreg32(0x98800004), getreg32(0x9880000C), + getreg32(0x98800010)); + irqinfo("FIQ STATUS=%08x MASK=%08x MODE=%08x LEVEL=%08x\n", + getreg32(0x98800034), getreg32(0x98800024), getreg32(0x9880002C), + getreg32(0x98800020)); #ifndef CONFIG_SUPPRESS_INTERRUPTS up_irq_restore(SVC_MODE | PSR_F_BIT); diff --git a/arch/arm/src/nuc1xx/Make.defs b/arch/arm/src/nuc1xx/Make.defs index 3a9f06519125e649d5395e84056e24f1ec2bd0e6..7a5a00e85a2fe4961dacfb800b81548789e42610 100644 --- a/arch/arm/src/nuc1xx/Make.defs +++ b/arch/arm/src/nuc1xx/Make.defs @@ -65,7 +65,7 @@ else ifeq ($(CONFIG_MODULE),y) CMN_CSRCS += up_elf.c endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) CMN_CSRCS += up_dumpnvic.c endif @@ -81,6 +81,6 @@ ifeq ($(CONFIG_BUILD_PROTECTED),y) CHIP_CSRCS += nuc_userspace.c endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) CHIP_CSRCS += nuc_dumpgpio.c endif diff --git a/arch/arm/src/nuc1xx/nuc_dumpgpio.c b/arch/arm/src/nuc1xx/nuc_dumpgpio.c index 480bb4f588d3d96e51bbf284e81488dda38ff8ad..82db651a69b96c1f4a8a3f09d6bcbd4fbe02c8e3 100644 --- a/arch/arm/src/nuc1xx/nuc_dumpgpio.c +++ b/arch/arm/src/nuc1xx/nuc_dumpgpio.c @@ -49,14 +49,13 @@ #include "chip.h" #include "nuc_gpio.h" -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_GPIO_INFO /**************************************************************************** * Private Data ****************************************************************************/ /* Port letters for prettier debug output */ -#ifdef CONFIG_DEBUG static const char g_portchar[NUC_GPIO_NPORTS] = { #if NUC_GPIO_NPORTS > 9 @@ -83,15 +82,6 @@ static const char g_portchar[NUC_GPIO_NPORTS] = # error "Bad number of GPIOs" #endif }; -#endif - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ /**************************************************************************** * Public Functions @@ -124,22 +114,22 @@ void nuc_dumpgpio(gpio_cfgset_t pinset, const char *msg) flags = enter_critical_section(); - lldbg("GPIO%c pinset: %08x base: %08x -- %s\n", - g_portchar[port], pinset, base, msg); - lldbg(" PMD: %08x OFFD: %08x DOUT: %08x DMASK: %08x\n", - getreg32(base + NUC_GPIO_PMD_OFFSET), - getreg32(base + NUC_GPIO_OFFD_OFFSET), - getreg32(base + NUC_GPIO_DOUT_OFFSET), - getreg32(base + NUC_GPIO_DMASK_OFFSET)); - lldbg(" PIN: %08x DBEN: %08x IMD: %08x IEN: %08x\n", - getreg32(base + NUC_GPIO_PIN_OFFSET), - getreg32(base + NUC_GPIO_DBEN_OFFSET), - getreg32(base + NUC_GPIO_IMD_OFFSET), - getreg32(base + NUC_GPIO_IEN_OFFSET)); - lldbg(" ISRC: %08x\n", - getreg32(base + NUC_GPIO_ISRC_OFFSET)); + gpioinfo("GPIO%c pinset: %08x base: %08x -- %s\n", + g_portchar[port], pinset, base, msg); + gpioinfo(" PMD: %08x OFFD: %08x DOUT: %08x DMASK: %08x\n", + getreg32(base + NUC_GPIO_PMD_OFFSET), + getreg32(base + NUC_GPIO_OFFD_OFFSET), + getreg32(base + NUC_GPIO_DOUT_OFFSET), + getreg32(base + NUC_GPIO_DMASK_OFFSET)); + gpioinfo(" PIN: %08x DBEN: %08x IMD: %08x IEN: %08x\n", + getreg32(base + NUC_GPIO_PIN_OFFSET), + getreg32(base + NUC_GPIO_DBEN_OFFSET), + getreg32(base + NUC_GPIO_IMD_OFFSET), + getreg32(base + NUC_GPIO_IEN_OFFSET)); + gpioinfo(" ISRC: %08x\n", + getreg32(base + NUC_GPIO_ISRC_OFFSET)); leave_critical_section(flags); } -#endif /* CONFIG_DEBUG */ +#endif /* CONFIG_DEBUG_GPIO_INFO */ diff --git a/arch/arm/src/nuc1xx/nuc_gpio.h b/arch/arm/src/nuc1xx/nuc_gpio.h index 52e9dd209506eb1c68801ffdd5a13b21ef635864..1fca1dc0e50933c0ae6f6a1142c67d8f7f6cac5a 100644 --- a/arch/arm/src/nuc1xx/nuc_gpio.h +++ b/arch/arm/src/nuc1xx/nuc_gpio.h @@ -245,7 +245,7 @@ bool nuc_gpioread(gpio_cfgset_t pinset); * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES void nuc_dumpgpio(gpio_cfgset_t pinset, const char *msg); #else # define nuc_dumpgpio(p,m) diff --git a/arch/arm/src/nuc1xx/nuc_idle.c b/arch/arm/src/nuc1xx/nuc_idle.c index 9dd225313f948d8c90e4e62fb2466fb4f373d43c..791ce2f09188b40822f8a32d8da2b619d9476242 100644 --- a/arch/arm/src/nuc1xx/nuc_idle.c +++ b/arch/arm/src/nuc1xx/nuc_idle.c @@ -99,7 +99,7 @@ static void up_idlepm(void) /* Perform board-specific, state-dependent logic here */ - llvdbg("newstate= %d oldstate=%d\n", newstate, oldstate); + _info("newstate= %d oldstate=%d\n", newstate, oldstate); /* Then force the global state change */ diff --git a/arch/arm/src/nuc1xx/nuc_irq.c b/arch/arm/src/nuc1xx/nuc_irq.c index 0bdb86a8ee91758b9abe40595dc4197cf239cce5..66f6d78044d7993b62f0dc63cfd566a17ca2d015 100644 --- a/arch/arm/src/nuc1xx/nuc_irq.c +++ b/arch/arm/src/nuc1xx/nuc_irq.c @@ -90,34 +90,34 @@ volatile uint32_t *g_current_regs[1]; * ****************************************************************************/ -#if defined(CONFIG_DEBUG_IRQ) +#if defined(CONFIG_DEBUG_IRQ_INFO) static void nuc_dumpnvic(const char *msg, int irq) { irqstate_t flags; flags = enter_critical_section(); - lldbg("NVIC (%s, irq=%d):\n", msg, irq); - lldbg(" ISER: %08x ICER: %08x\n", - getreg32(ARMV6M_NVIC_ISER), getreg32(ARMV6M_NVIC_ICER)); - lldbg(" ISPR: %08x ICPR: %08x\n", - getreg32(ARMV6M_NVIC_ISPR), getreg32(ARMV6M_NVIC_ICPR)); - lldbg(" IRQ PRIO: %08x %08x %08x %08x\n", - getreg32(ARMV6M_NVIC_IPR0), getreg32(ARMV6M_NVIC_IPR1), - getreg32(ARMV6M_NVIC_IPR2), getreg32(ARMV6M_NVIC_IPR3)); - lldbg(" %08x %08x %08x %08x\n", - getreg32(ARMV6M_NVIC_IPR4), getreg32(ARMV6M_NVIC_IPR5), - getreg32(ARMV6M_NVIC_IPR6), getreg32(ARMV6M_NVIC_IPR7)); - - lldbg("SYSCON:\n"); - lldbg(" CPUID: %08x\n", - getreg32(ARMV6M_SYSCON_CPUID)); - lldbg(" ICSR: %08x AIRCR: %08x\n", - getreg32(ARMV6M_SYSCON_ICSR), getreg32(ARMV6M_SYSCON_AIRCR)); - lldbg(" SCR: %08x CCR: %08x\n", - getreg32(ARMV6M_SYSCON_SCR), getreg32(ARMV6M_SYSCON_CCR)); - lldbg(" SHPR2: %08x SHPR3: %08x\n", - getreg32(ARMV6M_SYSCON_SHPR2), getreg32(ARMV6M_SYSCON_SHPR3)); + irqinfo("NVIC (%s, irq=%d):\n", msg, irq); + irqinfo(" ISER: %08x ICER: %08x\n", + getreg32(ARMV6M_NVIC_ISER), getreg32(ARMV6M_NVIC_ICER)); + irqinfo(" ISPR: %08x ICPR: %08x\n", + getreg32(ARMV6M_NVIC_ISPR), getreg32(ARMV6M_NVIC_ICPR)); + irqinfo(" IRQ PRIO: %08x %08x %08x %08x\n", + getreg32(ARMV6M_NVIC_IPR0), getreg32(ARMV6M_NVIC_IPR1), + getreg32(ARMV6M_NVIC_IPR2), getreg32(ARMV6M_NVIC_IPR3)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(ARMV6M_NVIC_IPR4), getreg32(ARMV6M_NVIC_IPR5), + getreg32(ARMV6M_NVIC_IPR6), getreg32(ARMV6M_NVIC_IPR7)); + + irqinfo("SYSCON:\n"); + irqinfo(" CPUID: %08x\n", + getreg32(ARMV6M_SYSCON_CPUID)); + irqinfo(" ICSR: %08x AIRCR: %08x\n", + getreg32(ARMV6M_SYSCON_ICSR), getreg32(ARMV6M_SYSCON_AIRCR)); + irqinfo(" SCR: %08x CCR: %08x\n", + getreg32(ARMV6M_SYSCON_SCR), getreg32(ARMV6M_SYSCON_CCR)); + irqinfo(" SHPR2: %08x SHPR3: %08x\n", + getreg32(ARMV6M_SYSCON_SHPR2), getreg32(ARMV6M_SYSCON_SHPR3)); leave_critical_section(flags); } @@ -137,11 +137,11 @@ static void nuc_dumpnvic(const char *msg, int irq) * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES static int nuc_nmi(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! NMI received\n"); + _err("PANIC!!! NMI received\n"); PANIC(); return 0; } @@ -149,7 +149,7 @@ static int nuc_nmi(int irq, FAR void *context) static int nuc_pendsv(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! PendSV received\n"); + _err("PANIC!!! PendSV received\n"); PANIC(); return 0; } @@ -157,7 +157,7 @@ static int nuc_pendsv(int irq, FAR void *context) static int nuc_reserved(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Reserved interrupt\n"); + _err("PANIC!!! Reserved interrupt\n"); PANIC(); return 0; } @@ -236,7 +236,7 @@ void up_irqinitialize(void) /* Attach all other processor exceptions (except reset and sys tick) */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES irq_attach(NUC_IRQ_NMI, nuc_nmi); irq_attach(NUC_IRQ_PENDSV, nuc_pendsv); irq_attach(NUC_IRQ_RESERVED, nuc_reserved); diff --git a/arch/arm/src/nuc1xx/nuc_start.c b/arch/arm/src/nuc1xx/nuc_start.c index 3cbb5becdeefd337815e90a32aef0a00dea9d778..80c01077ae817643421d210c4bab4ba6e52c60ca 100644 --- a/arch/arm/src/nuc1xx/nuc_start.c +++ b/arch/arm/src/nuc1xx/nuc_start.c @@ -92,7 +92,7 @@ const uint32_t g_idle_topstack = IDLE_STACK; * ****************************************************************************/ -#if defined(CONFIG_DEBUG) && defined(HAVE_SERIAL_CONSOLE) +#if defined(CONFIG_DEBUG_FEATURES) && defined(HAVE_SERIAL_CONSOLE) # define showprogress(c) nuc_lowputc((uint32_t)c) #else # define showprogress(c) diff --git a/arch/arm/src/sam34/Kconfig b/arch/arm/src/sam34/Kconfig index b704da5674f8f1729b3fb05d6d2ef86d627661c3..8e764dff40ee0fef7a3d407386e21cb0c4f6febd 100644 --- a/arch/arm/src/sam34/Kconfig +++ b/arch/arm/src/sam34/Kconfig @@ -1118,7 +1118,7 @@ config SAM34_SPI_DMATHRESHOLD config SAM34_SPI_DMADEBUG bool "SPI DMA transfer debug" - depends on SAM34_SPI_DMA && DEBUG && DEBUG_DMA + depends on SAM34_SPI_DMA && DEBUG_FEATURES && DEBUG_DMA default n ---help--- Enable special debug instrumentation analyze SPI DMA data transfers. @@ -1128,11 +1128,11 @@ config SAM34_SPI_DMADEBUG config SAM34_SPI_REGDEBUG bool "SPI Register level debug" - depends on DEBUG + depends on DEBUG_SPI_INFO default n ---help--- Output detailed register-level SPI device debug information. - Requires also DEBUG. + Requires also CONFIG_SPI_INFO. endmenu # AT91SAM3/4 SPI device driver options endif # SAM34_SPI0 || SAM34_SPI1 @@ -1336,9 +1336,9 @@ config SAM34_EMAC_PHYSR_100FD config SAM34_EMAC_REGDEBUG bool "Register-Level Debug" default n - depends on DEBUG + depends on DEBUG_NET_INFO ---help--- - Enable very low-level register access debug. Depends on DEBUG. + Enable very low-level register access debug. Depends on CONFIG_DEBUG_NET_INFO. config SAM34_EMAC_ISETH0 bool @@ -1369,7 +1369,7 @@ config SAM34_HSMCI_WRPROOF config SAM34_HSMCI_XFRDEBUG bool "HSMCI transfer debug" - depends on DEBUG_FS && DEBUG_VERBOSE + depends on DEBUG_FS_INFO default n ---help--- Enable special debug instrumentation analyze HSMCI data transfers. @@ -1377,11 +1377,11 @@ config SAM34_HSMCI_XFRDEBUG registers at key points in the data transfer and then dumps all of the registers at the end of the transfer. If DEBUG_DMA is also enabled, then DMA register will be collected as well. Requires also - DEBUG_FS and DEBUG_VERBOSE. + DEBUG_FS and CONFIG_DEBUG_INFO. config SAM34_HSMCI_CMDDEBUG bool "HSMCI command debug" - depends on DEBUG_FS && DEBUG_VERBOSE + depends on DEBUG_FS_INFO default n ---help--- Enable special debug instrumentation analyze HSMCI commands. This @@ -1389,7 +1389,7 @@ config SAM34_HSMCI_CMDDEBUG key points in the data transfer and then dumps all of the registers at the end of the transfer. If DEBUG_DMA is also enabled, then DMA register will be collected as well. Requires also DEBUG_FS and - DEBUG_VERBOSE. + CONFIG_DEBUG_INFO. endmenu # HSMCI device driver options endif # SAM34_HSMCI @@ -1400,7 +1400,7 @@ menu "AT91SAM3/4 USB Full Speed Device Controller driver (DCD) options" config SAM34_UDP_REGDEBUG bool "Enable low-level UDP register debug" default n - depends on DEBUG + depends on DEBUG_USB_INFO endmenu # USB Full Speed Device Controller driver (DCD) options @@ -1415,7 +1415,7 @@ menu "AT91SAM3/4 Timer/Counter options" config SAM34_TC_REGDEBUG bool "Enable low-level timer/counter register debug" default n - depends on DEBUG + depends on DEBUG_TIMER_INFO endmenu # USB Full Speed Device Controller driver (DCD) options diff --git a/arch/arm/src/sam34/chip/sam_afec.h b/arch/arm/src/sam34/chip/sam_afec.h index 9e779a1e4c16f5ce9dc1f4d12e39cc0eeb51cd81..d5a8be44ab94786cc901f8e7b7fa664d9bf6e830 100644 --- a/arch/arm/src/sam34/chip/sam_afec.h +++ b/arch/arm/src/sam34/chip/sam_afec.h @@ -205,57 +205,57 @@ /* Extended Mode Register */ -#define AFEC_EMR_CMPMODE_SHIFT (0) /* Bit 0-1: Comparison Mode */ -#define AFEC_EMR_CMPMODE_MASK (3 << AFEC_EMR_CMPMODE_SHIFT) -# define AFEC_EMR_CMPMODE_LOW (0 << AFEC_EMR_CMPMODE_SHIFT) /* Event when lower than low window threshold */ -# define AFEC_EMR_CMPMODE_HIGH (1 << AFEC_EMR_CMPMODE_SHIFT) /* Event when higher than high window threshold */ -# define AFEC_EMR_CMPMODE_IN (2 << AFEC_EMR_CMPMODE_SHIFT) /* Event when in comparison window */ -# define AFEC_EMR_CMPMODE_OUT (3 << AFEC_EMR_CMPMODE_SHIFT) /* Event when out of comparison window */ -#define AFEC_EMR_CMPSEL_SHIFT (4) /* Bit 4-7: Comparison Selected Channel */ -#define AFEC_EMR_CMPSEL_MASK (15 << AFEC_EMR_CMPSEL_SHIFT) -# define AFEC_EMR_CMPSEL(n) ((uint32_t)(n) << AFEC_EMR_CMPSEL_SHIFT) -#define AFEC_EMR_CMPALL (1 << 9) /* Bit 9: Compare All Channels */ -#define AFEC_EMR_CMPFILTER_SHIFT (12) /* Bits 12-13: Compare Event Filtering */ -#define AFEC_EMR_CMPFILTER_MASK (3 << AFEC_EMR_CMPFILTER_SHIFT) -# define AFEC_EMR_CMPFILTER(n) ((uint32_t)(n) << AFEC_EMR_CMPFILTER_SHIFT) -#define AFEC_EMR_RES_SHIFT (16) /* Bits 16-18: Resolution */ -#define AFEC_EMR_RES_MASK (7 << AFEC_EMR_RES_SHIFT) -# define AFEC_EMR_RES_NOAVG (0 << AFEC_EMR_RES_SHIFT) /* 12-bit resolution, AFEC sample rate is maximum (no averaging) */ -# define AFEC_EMR_RES_LOWRES (1 << AFEC_EMR_RES_SHIFT) /* 10-bit resolution, AFEC sample rate is maximum (no averaging) */ -# define AFEC_EMR_RES_OSR4 (2 << AFEC_EMR_RES_SHIFT) /* 13-bit resolution, AFEC sample rate divided by 4 (averaging) */ -# define AFEC_EMR_RES_OSR16 (3 << AFEC_EMR_RES_SHIFT) /* 14-bit resolution, AFEC sample rate divided by 16 (averaging) */ -# define AFEC_EMR_RES_OSR64 (4 << AFEC_EMR_RES_SHIFT) /* 15-bit resolution, AFEC sample rate divided by 64 (averaging) */ -# define AFEC_EMR_RES_OSR256 (5 << AFEC_EMR_RES_SHIFT) /* 16-bit resolution, AFEC sample rate divided by 256 (averaging) */ -#define AFEC_EMR_TAG (1 << 24) /* Bit 24: TAG of the AFEC_LDCR register */ -#define AFEC_EMR_STM (1 << 25) /* Bit 25: Single Trigger Mode */ +#define AFEC_EMR_CMPMODE_SHIFT (0) /* Bit 0-1: Comparison Mode */ +#define AFEC_EMR_CMPMODE_MASK (3 << AFEC_EMR_CMPMODE_SHIFT) +# define AFEC_EMR_CMPMODE_LOW (0 << AFEC_EMR_CMPMODE_SHIFT) /* Event when lower than low window threshold */ +# define AFEC_EMR_CMPMODE_HIGH (1 << AFEC_EMR_CMPMODE_SHIFT) /* Event when higher than high window threshold */ +# define AFEC_EMR_CMPMODE_IN (2 << AFEC_EMR_CMPMODE_SHIFT) /* Event when in comparison window */ +# define AFEC_EMR_CMPMODE_OUT (3 << AFEC_EMR_CMPMODE_SHIFT) /* Event when out of comparison window */ +#define AFEC_EMR_CMPSEL_SHIFT (3) /* Bit 3-7: Comparison Selected Channel */ +#define AFEC_EMR_CMPSEL_MASK (31 << AFEC_EMR_CMPSEL_SHIFT) +# define AFEC_EMR_CMPSEL(n) ((uint32_t)(n) << AFEC_EMR_CMPSEL_SHIFT) +#define AFEC_EMR_CMPALL (1 << 9) /* Bit 9: Compare All Channels */ +#define AFEC_EMR_CMPFILTER_SHIFT (12) /* Bits 12-13: Compare Event Filtering */ +#define AFEC_EMR_CMPFILTER_MASK (3 << AFEC_EMR_CMPFILTER_SHIFT) +# define AFEC_EMR_CMPFILTER(n) ((uint32_t)(n) << AFEC_EMR_CMPFILTER_SHIFT) +#define AFEC_EMR_RES_SHIFT (16) /* Bits 16-18: Resolution */ +#define AFEC_EMR_RES_MASK (7 << AFEC_EMR_RES_SHIFT) +# define AFEC_EMR_RES_NOAVG (0 << AFEC_EMR_RES_SHIFT) /* 12-bit resolution, AFEC sample rate is maximum (no averaging) */ +# define AFEC_EMR_RES_LOWRES (1 << AFEC_EMR_RES_SHIFT) /* 10-bit resolution, AFEC sample rate is maximum (no averaging) */ +# define AFEC_EMR_RES_OSR4 (2 << AFEC_EMR_RES_SHIFT) /* 13-bit resolution, AFEC sample rate divided by 4 (averaging) */ +# define AFEC_EMR_RES_OSR16 (3 << AFEC_EMR_RES_SHIFT) /* 14-bit resolution, AFEC sample rate divided by 16 (averaging) */ +# define AFEC_EMR_RES_OSR64 (4 << AFEC_EMR_RES_SHIFT) /* 15-bit resolution, AFEC sample rate divided by 64 (averaging) */ +# define AFEC_EMR_RES_OSR256 (5 << AFEC_EMR_RES_SHIFT) /* 16-bit resolution, AFEC sample rate divided by 256 (averaging) */ +#define AFEC_EMR_TAG (1 << 24) /* Bit 24: TAG of the AFEC_LDCR register */ +#define AFEC_EMR_STM (1 << 25) /* Bit 25: Single Trigger Mode */ /* Channel Sequence 1 Register */ #define AFEC_SEQ1R_USCH_SHIFT(n) ((n) << 2) /* n=0..7 */ #define AFEC_SEQ1R_USCH_MASK(n) (15 << AFEC_SEQ1R_USCH_SHIFT(n)) # define AFEC_SEQ1R_USCH(n,v) ((uint32_t)(v) << AFEC_SEQ1R_USCH_SHIFT(n)) -#define AFEC_SEQ1R_USCH0_SHIFT (0) /* Bits 0-3: User sequence number 0 */ +#define AFEC_SEQ1R_USCH0_SHIFT (0) /* Bits 0-3: User sequence number 0 */ #define AFEC_SEQ1R_USCH0_MASK (15 << AFEC_SEQ1R_USCH0_SHIFT) # define AFEC_SEQ1R_USCH0(v) ((uint32_t)(v) << AFEC_SEQ1R_USCH0_SHIFT) -#define AFEC_SEQ1R_USCH1_SHIFT (4) /* Bits 4-7: User sequence number 1 */ +#define AFEC_SEQ1R_USCH1_SHIFT (4) /* Bits 4-7: User sequence number 1 */ #define AFEC_SEQ1R_USCH1_MASK (15 << AFEC_SEQ1R_USCH1_SHIFT) # define AFEC_SEQ1R_USCH1(v) ((uint32_t)(v) << AFEC_SEQ1R_USCH1_SHIFT) -#define AFEC_SEQ1R_USCH2_SHIFT (8) /* Bits 8-11: User sequence number 2 */ +#define AFEC_SEQ1R_USCH2_SHIFT (8) /* Bits 8-11: User sequence number 2 */ #define AFEC_SEQ1R_USCH2_MASK (15 << AFEC_SEQ1R_USCH2_SHIFT) # define AFEC_SEQ1R_USCH2(v) ((uint32_t)(v) << AFEC_SEQ1R_USCH2_SHIFT) -#define AFEC_SEQ1R_USCH3_SHIFT (12) /* Bits 12-15: User sequence number 3 */ +#define AFEC_SEQ1R_USCH3_SHIFT (12) /* Bits 12-15: User sequence number 3 */ #define AFEC_SEQ1R_USCH3_MASK (15 << AFEC_SEQ1R_USCH3_SHIFT) # define AFEC_SEQ1R_USCH3(v) ((uint32_t)(v) << AFEC_SEQ1R_USCH3_SHIFT) -#define AFEC_SEQ1R_USCH4_SHIFT (16) /* Bits 16-19: User sequence number 4 */ +#define AFEC_SEQ1R_USCH4_SHIFT (16) /* Bits 16-19: User sequence number 4 */ #define AFEC_SEQ1R_USCH4_MASK (15 << AFEC_SEQ1R_USCH4_SHIFT) # define AFEC_SEQ1R_USCH4(v) ((uint32_t)(v) << AFEC_SEQ1R_USCH4_SHIFT) -#define AFEC_SEQ1R_USCH5_SHIFT (20) /* Bits 20-23: User sequence number 5 */ +#define AFEC_SEQ1R_USCH5_SHIFT (20) /* Bits 20-23: User sequence number 5 */ #define AFEC_SEQ1R_USCH5_MASK (15 << AFEC_SEQ1R_USCH5_SHIFT) # define AFEC_SEQ1R_USCH5(v) ((uint32_t)(v) << AFEC_SEQ1R_USCH5_SHIFT) -#define AFEC_SEQ1R_USCH6_SHIFT (24) /* Bits 24-27: User sequence number 6 */ +#define AFEC_SEQ1R_USCH6_SHIFT (24) /* Bits 24-27: User sequence number 6 */ #define AFEC_SEQ1R_USCH6_MASK (15 << AFEC_SEQ1R_USCH6_SHIFT) # define AFEC_SEQ1R_USCH6(v) ((uint32_t)(v) << AFEC_SEQ1R_USCH6_SHIFT) -#define AFEC_SEQ1R_USCH7_SHIFT (28) /* Bits 28-31: User sequence number 7 */ +#define AFEC_SEQ1R_USCH7_SHIFT (28) /* Bits 28-31: User sequence number 7 */ #define AFEC_SEQ1R_USCH7_MASK (15 << AFEC_SEQ1R_USCH7_SHIFT) # define AFEC_SEQ1R_USCH7(v) ((uint32_t)(v) << AFEC_SEQ1R_USCH7_SHIFT) @@ -264,28 +264,28 @@ #define AFEC_SEQ2R_USCH_SHIFT(n) (((n)-8) << 2) /* n=8..15 */ #define AFEC_SEQ2R_USCH_MASK(n) (15 << AFEC_SEQ2R_USCH_SHIFT(n)) # define AFEC_SEQ2R_USCH(n,v) ((uint32_t)(v) << AFEC_SEQ2R_USCH_SHIFT(n)) -#define AFEC_SEQ2R_USCH8_SHIFT (0) /* Bits 0-3: User sequence number 8 */ +#define AFEC_SEQ2R_USCH8_SHIFT (0) /* Bits 0-3: User sequence number 8 */ #define AFEC_SEQ2R_USCH8_MASK (15 << AFEC_SEQ2R_USCH8_SHIFT) # define AFEC_SEQ2R_USCH8(v) ((uint32_t)(v) << AFEC_SEQ2R_USCH8_SHIFT) -#define AFEC_SEQ2R_USCH9_SHIFT (4) /* Bits 4-7: User sequence number 9 */ +#define AFEC_SEQ2R_USCH9_SHIFT (4) /* Bits 4-7: User sequence number 9 */ #define AFEC_SEQ2R_USCH9_MASK (15 << AFEC_SEQ2R_USCH9_SHIFT) # define AFEC_SEQ2R_USCH9(v) ((uint32_t)(v) << AFEC_SEQ2R_USCH9_SHIFT) -#define AFEC_SEQ2R_USCH10_SHIFT (8) /* Bits 8-11: User sequence number 10 */ +#define AFEC_SEQ2R_USCH10_SHIFT (8) /* Bits 8-11: User sequence number 10 */ #define AFEC_SEQ2R_USCH10_MASK (15 << AFEC_SEQ2R_USCH10_SHIFT) # define AFEC_SEQ2R_USCH10(v) ((uint32_t)(v) << AFEC_SEQ2R_USCH10_SHIFT) -#define AFEC_SEQ2R_USCH11_SHIFT (12) /* Bits 12-15: User sequence number 11 */ +#define AFEC_SEQ2R_USCH11_SHIFT (12) /* Bits 12-15: User sequence number 11 */ #define AFEC_SEQ2R_USCH11_MASK (15 << AFEC_SEQ2R_USCH11_SHIFT) # define AFEC_SEQ2R_USCH11(v) ((uint32_t)(v) << AFEC_SEQ2R_USCH11_SHIFT) -#define AFEC_SEQ2R_USCH12_SHIFT (16) /* Bits 16-19: User sequence number 12 */ +#define AFEC_SEQ2R_USCH12_SHIFT (16) /* Bits 16-19: User sequence number 12 */ #define AFEC_SEQ2R_USCH12_MASK (15 << AFEC_SEQ2R_USCH12_SHIFT) # define AFEC_SEQ2R_USCH12(v) ((uint32_t)(v) << AFEC_SEQ2R_USCH12_SHIFT) -#define AFEC_SEQ2R_USCH13_SHIFT (20) /* Bits 20-23: User sequence number 13 */ +#define AFEC_SEQ2R_USCH13_SHIFT (20) /* Bits 20-23: User sequence number 13 */ #define AFEC_SEQ2R_USCH13_MASK (15 << AFEC_SEQ2R_USCH13_SHIFT) # define AFEC_SEQ2R_USCH13(v) ((uint32_t)(v) << AFEC_SEQ2R_USCH13_SHIFT) -#define AFEC_SEQ2R_USCH14_SHIFT (24) /* Bits 24-27: User sequence number 14 */ +#define AFEC_SEQ2R_USCH14_SHIFT (24) /* Bits 24-27: User sequence number 14 */ #define AFEC_SEQ2R_USCH14_MASK (15 << AFEC_SEQ2R_USCH14_SHIFT) # define AFEC_SEQ2R_USCH14(v) ((uint32_t)(v) << AFEC_SEQ2R_USCH14_SHIFT) -#define AFEC_SEQ2R_USCH15_SHIFT (28) /* Bits 28-31: User sequence number 15 */ +#define AFEC_SEQ2R_USCH15_SHIFT (28) /* Bits 28-31: User sequence number 15 */ #define AFEC_SEQ2R_USCH15_MASK (15 << AFEC_SEQ2R_USCH15_SHIFT) # define AFEC_SEQ2R_USCH15(v) ((uint32_t)(v) << AFEC_SEQ2R_USCH15_SHIFT) @@ -375,59 +375,59 @@ # define AFEC_CWR_LOWTHRES(n) ((uint32_t)(n) << AFEC_CWR_LOWTHRES_SHIFT) #define AFEC_CWR_HIGHTHRES_SHIFT (16) /* Bits 16-27: High Threshold */ #define AFEC_CWR_HIGHTHRES_MASK (0xfff << AFEC_CWR_LOWTHRES_SHIFT) -# define AFEC_CWR_HIGHTHRES(n)K ((uint32_t)(n) << AFEC_CWR_LOWTHRES_SHIFT) +# define AFEC_CWR_HIGHTHRES(n) ((uint32_t)(n) << AFEC_CWR_LOWTHRES_SHIFT) /* Channel Gain Register */ #define AFEC_CGR_GAIN_SHIFT(n) ((n) << 1) /* n=0..15 */ #define AFEC_CGR_GAIN_MASK(n) (3 << AFEC_CGR_GAIN_SHIFT(n)) # define AFEC_CGR_GAIN(n,v) ((uint32_t)(v) << AFEC_CGR_GAIN_SHIFT(n)) -#define AFEC_CGR_GAIN0_SHIFT (0) /* Bits 0-1: Gain for channel 0 */ +#define AFEC_CGR_GAIN0_SHIFT (0) /* Bits 0-1: Gain for channel 0 */ #define AFEC_CGR_GAIN0_MASK (3 << AFEC_CGR_GAIN0_SHIFT) # define AFEC_CGR_GAIN0(v) ((uint32_t)(v) << AFEC_CGR_GAIN0_SHIFT) -#define AFEC_CGR_GAIN1_SHIFT (2) /* Bits 2-3: Gain for channel 1 */ +#define AFEC_CGR_GAIN1_SHIFT (2) /* Bits 2-3: Gain for channel 1 */ #define AFEC_CGR_GAIN1_MASK (3 << AFEC_CGR_GAIN1_SHIFT) # define AFEC_CGR_GAIN1(v) ((uint32_t)(v) << AFEC_CGR_GAIN1_SHIFT) -#define AFEC_CGR_GAIN2_SHIFT (4) /* Bits 4-5: Gain for channel 2 */ +#define AFEC_CGR_GAIN2_SHIFT (4) /* Bits 4-5: Gain for channel 2 */ #define AFEC_CGR_GAIN2_MASK (3 << AFEC_CGR_GAIN2_SHIFT) # define AFEC_CGR_GAIN2(v) ((uint32_t)(v) << AFEC_CGR_GAIN2_SHIFT) -#define AFEC_CGR_GAIN3_SHIFT (6) /* Bits 6-7: Gain for channel 3 */ +#define AFEC_CGR_GAIN3_SHIFT (6) /* Bits 6-7: Gain for channel 3 */ #define AFEC_CGR_GAIN3_MASK (3 << AFEC_CGR_GAIN3_SHIFT) # define AFEC_CGR_GAIN3(v) ((uint32_t)(v) << AFEC_CGR_GAIN3_SHIFT) -#define AFEC_CGR_GAIN4_SHIFT (8) /* Bits 8-9: Gain for channel 4 */ +#define AFEC_CGR_GAIN4_SHIFT (8) /* Bits 8-9: Gain for channel 4 */ #define AFEC_CGR_GAIN4_MASK (3 << AFEC_CGR_GAIN4_SHIFT) # define AFEC_CGR_GAIN4(v) ((uint32_t)(v) << AFEC_CGR_GAIN4_SHIFT) -#define AFEC_CGR_GAIN5_SHIFT (10) /* Bits 10-11: Gain for channel 5 */ +#define AFEC_CGR_GAIN5_SHIFT (10) /* Bits 10-11: Gain for channel 5 */ #define AFEC_CGR_GAIN5_MASK (3 << AFEC_CGR_GAIN5_SHIFT) # define AFEC_CGR_GAIN5(v) ((uint32_t)(v) << AFEC_CGR_GAIN5_SHIFT) -#define AFEC_CGR_GAIN6_SHIFT (12) /* Bits 12-13: Gain for channel 6 */ +#define AFEC_CGR_GAIN6_SHIFT (12) /* Bits 12-13: Gain for channel 6 */ #define AFEC_CGR_GAIN6_MASK (3 << AFEC_CGR_GAIN6_SHIFT) # define AFEC_CGR_GAIN6(v) ((uint32_t)(v) << AFEC_CGR_GAIN6_SHIFT) -#define AFEC_CGR_GAIN7_SHIFT (14) /* Bits 14-15: Gain for channel 7 */ +#define AFEC_CGR_GAIN7_SHIFT (14) /* Bits 14-15: Gain for channel 7 */ #define AFEC_CGR_GAIN7_MASK (3 << AFEC_CGR_GAIN7_SHIFT) # define AFEC_CGR_GAIN7(v) ((uint32_t)(v) << AFEC_CGR_GAIN7_SHIFT) -#define AFEC_CGR_GAIN8_SHIFT (16) /* Bits 16-17: Gain for channel 8 */ +#define AFEC_CGR_GAIN8_SHIFT (16) /* Bits 16-17: Gain for channel 8 */ #define AFEC_CGR_GAIN8_MASK (3 << AFEC_CGR_GAIN8_SHIFT) # define AFEC_CGR_GAIN8(v) ((uint32_t)(v) << AFEC_CGR_GAIN8_SHIFT) -#define AFEC_CGR_GAIN9_SHIFT (18) /* Bits 18-19: Gain for channel 9 */ +#define AFEC_CGR_GAIN9_SHIFT (18) /* Bits 18-19: Gain for channel 9 */ #define AFEC_CGR_GAIN9_MASK (3 << AFEC_CGR_GAIN9_SHIFT) # define AFEC_CGR_GAIN9(v) ((uint32_t)(v) << AFEC_CGR_GAIN9_SHIFT) -#define AFEC_CGR_GAIN10_SHIFT (20) /* Bits 20-21: Gain for channel 10 */ +#define AFEC_CGR_GAIN10_SHIFT (20) /* Bits 20-21: Gain for channel 10 */ #define AFEC_CGR_GAIN10_MASK (3 << AFEC_CGR_GAIN10_SHIFT) # define AFEC_CGR_GAIN10(v) ((uint32_t)(v) << AFEC_CGR_GAIN10_SHIFT) -#define AFEC_CGR_GAIN11_SHIFT (22) /* Bits 22-23: Gain for channel 11 */ +#define AFEC_CGR_GAIN11_SHIFT (22) /* Bits 22-23: Gain for channel 11 */ #define AFEC_CGR_GAIN11_MASK (3 << AFEC_CGR_GAIN11_SHIFT) # define AFEC_CGR_GAIN11(v) ((uint32_t)(v) << AFEC_CGR_GAIN11_SHIFT) -#define AFEC_CGR_GAIN12_SHIFT (24) /* Bits 24-25: Gain for channel 12 */ +#define AFEC_CGR_GAIN12_SHIFT (24) /* Bits 24-25: Gain for channel 12 */ #define AFEC_CGR_GAIN12_MASK (3 << AFEC_CGR_GAIN12_SHIFT) # define AFEC_CGR_GAIN12(v) ((uint32_t)(v) << AFEC_CGR_GAIN12_SHIFT) -#define AFEC_CGR_GAIN13_SHIFT (26) /* Bits 26-27: Gain for channel 13 */ +#define AFEC_CGR_GAIN13_SHIFT (26) /* Bits 26-27: Gain for channel 13 */ #define AFEC_CGR_GAIN13_MASK (3 << AFEC_CGR_GAIN13_SHIFT) # define AFEC_CGR_GAIN13(v) ((uint32_t)(v) << AFEC_CGR_GAIN13_SHIFT) -#define AFEC_CGR_GAIN14_SHIFT (28) /* Bits 28-29: Gain for channel 14 */ +#define AFEC_CGR_GAIN14_SHIFT (28) /* Bits 28-29: Gain for channel 14 */ #define AFEC_CGR_GAIN14_MASK (3 << AFEC_CGR_GAIN14_SHIFT) # define AFEC_CGR_GAIN14(v) ((uint32_t)(v) << AFEC_CGR_GAIN14_SHIFT) -#define AFEC_CGR_GAIN15_SHIFT (30) /* Bits 30-31: Gain for channel 15 */ +#define AFEC_CGR_GAIN15_SHIFT (30) /* Bits 30-31: Gain for channel 15 */ #define AFEC_CGR_GAIN15_MASK (3 << AFEC_CGR_GAIN15_SHIFT) # define AFEC_CGR_GAIN15(v) ((uint32_t)(v) << AFEC_CGR_GAIN15_SHIFT) @@ -487,8 +487,8 @@ /* Temperature Sensor Mode Register */ -#define AFEC_TEMPMR_RTCT (1 << 0) /* Bit 0: Temperature Sensor RTC Trigger mode */ -#define AFEC_TEMPMR_TEMPCMPMOD_SHIFT (4) /* Bits 4-5: Temperature Comparison Mode */ +#define AFEC_TEMPMR_RTCT (1 << 0) /* Bit 0: Temperature Sensor RTC Trigger mode */ +#define AFEC_TEMPMR_TEMPCMPMOD_SHIFT (4) /* Bits 4-5: Temperature Comparison Mode */ #define AFEC_TEMPMR_TEMPCMPMOD_MASK (3 << AFEC_TEMPMR_TEMPCMPMOD_SHIFT) # define AFEC_TEMPMR_TEMPCMPMOD_LOW (0 << AFEC_TEMPMR_TEMPCMPMOD_SHIFT) /* Event when data is lower than low threshold */ # define AFEC_TEMPMR_TEMPCMPMOD_HIGH (1 << AFEC_TEMPMR_TEMPCMPMOD_SHIFT) /* Event when data is higher than high threshold */ diff --git a/arch/arm/src/sam34/chip/sam_dacc.h b/arch/arm/src/sam34/chip/sam_dacc.h index 4581289edae6b27b4a6f78da6a3868b6718fbf4f..80a61d874a7a20d37ca6ec65aef0813165f8b0eb 100644 --- a/arch/arm/src/sam34/chip/sam_dacc.h +++ b/arch/arm/src/sam34/chip/sam_dacc.h @@ -209,7 +209,7 @@ #define DACC_WPMR_WPEN (1 << 0) /* Bit 0: Write Protect Enable */ #define DACC_WPMR_WPKEY_SHIFT (8) /* Bits 8-31: Write Protect KEY */ #define DACC_WPMR_WPKEY_MASK (0x00ffffff << DACC_WPMR_WPKEY_SHIFT) -# define DACC_WPMR_WPKEY_MASK (0x00444143 << DACC_WPMR_WPKEY_SHIFT) +# define DACC_WPMR_WPKEY (0x00444143 << DACC_WPMR_WPKEY_SHIFT) /* Write Protect Status register */ diff --git a/arch/arm/src/sam34/sam4cm_freerun.c b/arch/arm/src/sam34/sam4cm_freerun.c index 63bcea20315f4e43701f461926d6a376ee1f2bc0..a26578e99aca42d11badcada97df4531f05cf244 100644 --- a/arch/arm/src/sam34/sam4cm_freerun.c +++ b/arch/arm/src/sam34/sam4cm_freerun.c @@ -121,7 +121,7 @@ int sam_freerun_initialize(struct sam_freerun_s *freerun, int chan, uint32_t cmr; int ret; - tcvdbg("chan=%d resolution=%d usec\n", chan, resolution); + tmrinfo("chan=%d resolution=%d usec\n", chan, resolution); DEBUGASSERT(freerun && resolution > 0); /* Get the TC frequency the corresponds to the requested resolution */ @@ -133,13 +133,13 @@ int sam_freerun_initialize(struct sam_freerun_s *freerun, int chan, ret = sam_tc_divisor(frequency, &divisor, &cmr); if (ret < 0) { - tcdbg("ERROR: sam_tc_divisor failed: %d\n", ret); + tmrerr("ERROR: sam_tc_divisor failed: %d\n", ret); return ret; } - tcvdbg("frequency=%lu, divisor=%u, cmr=%08lx\n", - (unsigned long)frequency, (unsigned long)divisor, - (unsigned long)cmr); + tmrinfo("frequency=%lu, divisor=%u, cmr=%08lx\n", + (unsigned long)frequency, (unsigned long)divisor, + (unsigned long)cmr); /* Allocate the timer/counter and select its mode of operation * @@ -172,7 +172,7 @@ int sam_freerun_initialize(struct sam_freerun_s *freerun, int chan, freerun->tch = sam_tc_allocate(chan, cmr); if (!freerun->tch) { - tcdbg("ERROR: Failed to allocate timer channel %d\n", chan); + tmrerr("ERROR: Failed to allocate timer channel %d\n", chan); return -EBUSY; } @@ -257,9 +257,9 @@ int sam_freerun_counter(struct sam_freerun_s *freerun, struct timespec *ts) leave_critical_section(flags); - tcvdbg("counter=%lu (%lu) overflow=%lu, sr=%08lx\n", - (unsigned long)counter, (unsigned long)verify, - (unsigned long)overflow, (unsigned long)sr); + tmrinfo("counter=%lu (%lu) overflow=%lu, sr=%08lx\n", + (unsigned long)counter, (unsigned long)verify, + (unsigned long)overflow, (unsigned long)sr); /* Convert the whole thing to units of microseconds. * @@ -277,7 +277,7 @@ int sam_freerun_counter(struct sam_freerun_s *freerun, struct timespec *ts) ts->tv_sec = sec; ts->tv_nsec = (usec - (sec * USEC_PER_SEC)) * NSEC_PER_USEC; - tcvdbg("usec=%llu ts=(%lu, %lu)\n", + tmrinfo("usec=%llu ts=(%lu, %lu)\n", usec, (unsigned long)ts->tv_sec, (unsigned long)ts->tv_nsec); return OK; diff --git a/arch/arm/src/sam34/sam4cm_oneshot.c b/arch/arm/src/sam34/sam4cm_oneshot.c index eeda41bc8ee98ad77dc48ae420fd3e45a0bba428..a7505b5a72e2871da1e3b126e52334a361327c9e 100644 --- a/arch/arm/src/sam34/sam4cm_oneshot.c +++ b/arch/arm/src/sam34/sam4cm_oneshot.c @@ -91,7 +91,7 @@ static void sam_oneshot_handler(TC_HANDLE tch, void *arg, uint32_t sr) oneshot_handler_t oneshot_handler; void *oneshot_arg; - tcllvdbg("Expired...\n"); + tmrinfo("Expired...\n"); DEBUGASSERT(oneshot && oneshot->handler); /* The clock was stopped, but not disabled when the RC match occurred. @@ -148,7 +148,7 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, uint32_t cmr; int ret; - tcvdbg("chan=%d resolution=%d usec\n", chan, resolution); + tmrinfo("chan=%d resolution=%d usec\n", chan, resolution); DEBUGASSERT(oneshot && resolution > 0); /* Get the TC frequency the corresponds to the requested resolution */ @@ -160,13 +160,13 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, ret = sam_tc_divisor(frequency, &divisor, &cmr); if (ret < 0) { - tcdbg("ERROR: sam_tc_divisor failed: %d\n", ret); + tmrerr("ERROR: sam_tc_divisor failed: %d\n", ret); return ret; } - tcvdbg("frequency=%lu, divisor=%lu, cmr=%08lx\n", - (unsigned long)frequency, (unsigned long)divisor, - (unsigned long)cmr); + tmrinfo("frequency=%lu, divisor=%lu, cmr=%08lx\n", + (unsigned long)frequency, (unsigned long)divisor, + (unsigned long)cmr); /* Allocate the timer/counter and select its mode of operation * @@ -200,7 +200,7 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, oneshot->tch = sam_tc_allocate(chan, cmr); if (!oneshot->tch) { - tcdbg("ERROR: Failed to allocate timer channel %d\n", chan); + tmrerr("ERROR: Failed to allocate timer channel %d\n", chan); return -EBUSY; } @@ -258,8 +258,8 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer uint64_t regval; irqstate_t flags; - tcvdbg("handler=%p arg=%p, ts=(%lu, %lu)\n", - handler, arg, (unsigned long)ts->tv_sec, (unsigned long)ts->tv_nsec); + tmrinfo("handler=%p arg=%p, ts=(%lu, %lu)\n", + handler, arg, (unsigned long)ts->tv_sec, (unsigned long)ts->tv_nsec); DEBUGASSERT(oneshot && handler && ts); /* Was the oneshot already running? */ @@ -269,7 +269,7 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer { /* Yes.. then cancel it */ - tcvdbg("Already running... cancelling\n"); + tmrinfo("Already running... cancelling\n"); (void)sam_oneshot_cancel(oneshot, freerun, NULL); } @@ -291,7 +291,7 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer regval = (usec * (uint64_t)sam_tc_divfreq(oneshot->tch)) / USEC_PER_SEC; - tcvdbg("usec=%llu regval=%08llx\n", usec, regval); + tmrinfo("usec=%llu regval=%08llx\n", usec, regval); DEBUGASSERT(regval <= UINT16_MAX); /* Set up to receive the callback when the interrupt occurs */ @@ -400,7 +400,7 @@ int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *free * REVISIT: This does not appear to be the case. */ - tcvdbg("Cancelling...\n"); + tmrinfo("Cancelling...\n"); count = sam_tc_getcounter(oneshot->tch); rc = sam_tc_getregister(oneshot->tch, TC_REGC); @@ -436,8 +436,8 @@ int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *free * oneshot timer. */ - tcvdbg("rc=%lu count=%lu usec=%lu\n", - (unsigned long)rc, (unsigned long)count, (unsigned long)usec); + tmrinfo("rc=%lu count=%lu usec=%lu\n", + (unsigned long)rc, (unsigned long)count, (unsigned long)usec); /* REVISIT: I am not certain why the timer counter value sometimes * exceeds RC. Might be a bug, or perhaps the counter does not stop @@ -481,8 +481,8 @@ int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *free ts->tv_nsec = (unsigned long)nsec; } - tcvdbg("remaining (%lu, %lu)\n", - (unsigned long)ts->tv_sec, (unsigned long)ts->tv_nsec); + tmrinfo("remaining (%lu, %lu)\n", + (unsigned long)ts->tv_sec, (unsigned long)ts->tv_nsec); } return OK; diff --git a/arch/arm/src/sam34/sam4cm_tc.c b/arch/arm/src/sam34/sam4cm_tc.c index 91ab9c3ca2e86957eb10d6108be31127a1e12b57..d10ac3310128523837b66015e77000a9ad0b6f4d 100644 --- a/arch/arm/src/sam34/sam4cm_tc.c +++ b/arch/arm/src/sam34/sam4cm_tc.c @@ -77,6 +77,10 @@ * Pre-processor Definitions ****************************************************************************/ +#ifndef CONFIG_DEBUG_TIMER_INFO +# undef CONFIG_SAM34_TC_REGDEBUG +#endif + /**************************************************************************** * Private Types ****************************************************************************/ @@ -390,21 +394,21 @@ static void sam_regdump(struct sam_chan_s *chan, const char *msg) uintptr_t base; base = chan->base; - lldbg("TC%d [%08x]: %s\n", chan->chan, (int)base, msg); - lldbg(" BMR: %08x QIMR: %08x QISR: %08x WPMR: %08x\n", - getreg32(base+SAM_TC_BMR_OFFSET), getreg32(base+SAM_TC_QIMR_OFFSET), - getreg32(base+SAM_TC_QISR_OFFSET), getreg32(base+SAM_TC_WPMR_OFFSET)); + tmrinfo("TC%d [%08x]: %s\n", chan->chan, (int)base, msg); + tmrinfo(" BMR: %08x QIMR: %08x QISR: %08x WPMR: %08x\n", + getreg32(base+SAM_TC_BMR_OFFSET), getreg32(base+SAM_TC_QIMR_OFFSET), + getreg32(base+SAM_TC_QISR_OFFSET), getreg32(base+SAM_TC_WPMR_OFFSET)); base = chan->base; - lldbg("TC%d Channel %d [%08x]: %s\n", chan->chan, chan->chan, (int)base, msg); - lldbg(" CMR: %08x SSMR: %08x RAB: %08x CV: %08x\n", - getreg32(base+SAM_TC_CMR_OFFSET), getreg32(base+SAM_TC_SMMR_OFFSET), - getreg32(base+SAM_TC_RAB_OFFSET), getreg32(base+SAM_TC_CV_OFFSET)); - lldbg(" RA: %08x RB: %08x RC: %08x SR: %08x\n", - getreg32(base+SAM_TC_RA_OFFSET), getreg32(base+SAM_TC_RB_OFFSET), - getreg32(base+SAM_TC_RC_OFFSET), getreg32(base+SAM_TC_SR_OFFSET)); - lldbg(" IMR: %08x\n", - getreg32(base+SAM_TC_IMR_OFFSET)); + tmrinfo("TC%d Channel %d [%08x]: %s\n", chan->chan, chan->chan, (int)base, msg); + tmrinfo(" CMR: %08x SSMR: %08x RAB: %08x CV: %08x\n", + getreg32(base+SAM_TC_CMR_OFFSET), getreg32(base+SAM_TC_SMMR_OFFSET), + getreg32(base+SAM_TC_RAB_OFFSET), getreg32(base+SAM_TC_CV_OFFSET)); + tmrinfo(" RA: %08x RB: %08x RC: %08x SR: %08x\n", + getreg32(base+SAM_TC_RA_OFFSET), getreg32(base+SAM_TC_RB_OFFSET), + getreg32(base+SAM_TC_RC_OFFSET), getreg32(base+SAM_TC_SR_OFFSET)); + tmrinfo(" IMR: %08x\n", + getreg32(base+SAM_TC_IMR_OFFSET)); } #endif @@ -447,7 +451,7 @@ static bool sam_checkreg(struct sam_chan_s *chan, bool wr, uint32_t regaddr, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", chan->ntimes); + tmrinfo("...[Repeats %d times]...\n", chan->ntimes); } /* Save information about the new access */ @@ -481,7 +485,7 @@ static inline uint32_t sam_chan_getreg(struct sam_chan_s *chan, #ifdef CONFIG_SAM34_TC_REGDEBUG if (sam_checkreg(chan, false, regaddr, regval)) { - lldbg("%08x->%08x\n", regaddr, regval); + tmrinfo("%08x->%08x\n", regaddr, regval); } #endif @@ -504,7 +508,7 @@ static inline void sam_chan_putreg(struct sam_chan_s *chan, unsigned int offset, #ifdef CONFIG_SAM34_TC_REGDEBUG if (sam_checkreg(chan, true, regaddr, regval)) { - lldbg("%08x<-%08x\n", regaddr, regval); + tmrinfo("%08x<-%08x\n", regaddr, regval); } #endif @@ -757,7 +761,7 @@ static inline struct sam_chan_s *sam_tc_initialize(int channel) { /* Timer/counter is not invalid or not enabled */ - tcdbg("ERROR: Bad channel number: %d\n", channel); + tmrerr("ERROR: Bad channel number: %d\n", channel); return NULL; } @@ -770,7 +774,7 @@ static inline struct sam_chan_s *sam_tc_initialize(int channel) { /* Initialize the channel. */ - tcdbg("Initializing TC%d\n", chconfig->chan); + tmrerr("ERROR: Initializing TC%d\n", chconfig->chan); memset(chan, 0, sizeof(struct sam_chan_s)); sem_init(&chan->exclsem, 0, 1); @@ -831,7 +835,7 @@ static inline struct sam_chan_s *sam_tc_initialize(int channel) { /* No.. return a failure */ - tcdbg("Channel %d is in-used\n", channel); + tmrerr("ERROR: Channel %d is in-use\n", channel); sam_givesem(chan); return NULL; } @@ -876,7 +880,7 @@ TC_HANDLE sam_tc_allocate(int channel, int mode) * access to the requested channel. */ - tcvdbg("channel=%d mode=%08x\n", channel, mode); + tmrinfo("channel=%d mode=%08x\n", channel, mode); chan = sam_tc_initialize(channel); if (chan) @@ -902,7 +906,7 @@ TC_HANDLE sam_tc_allocate(int channel, int mode) /* Return an opaque reference to the channel */ - tcvdbg("Returning %p\n", chan); + tmrinfo("Returning %p\n", chan); return (TC_HANDLE)chan; } @@ -924,7 +928,7 @@ void sam_tc_free(TC_HANDLE handle) { struct sam_chan_s *chan = (struct sam_chan_s *)handle; - tcvdbg("Freeing %p channel=%d inuse=%d\n", chan, chan->chan, chan->inuse); + tmrinfo("Freeing %p channel=%d inuse=%d\n", chan, chan->chan, chan->inuse); DEBUGASSERT(chan && chan->inuse); /* Make sure that interrupts are detached and disabled and that the channel @@ -957,7 +961,7 @@ void sam_tc_start(TC_HANDLE handle) { struct sam_chan_s *chan = (struct sam_chan_s *)handle; - tcvdbg("Starting channel %d inuse=%d\n", chan->chan, chan->inuse); + tmrinfo("Starting channel %d inuse=%d\n", chan->chan, chan->inuse); DEBUGASSERT(chan && chan->inuse); /* Read the SR to clear any pending interrupts on this channel */ @@ -989,7 +993,7 @@ void sam_tc_stop(TC_HANDLE handle) { struct sam_chan_s *chan = (struct sam_chan_s *)handle; - tcvdbg("Stopping channel %d inuse=%d\n", chan->chan, chan->inuse); + tmrinfo("Stopping channel %d inuse=%d\n", chan->chan, chan->inuse); DEBUGASSERT(chan && chan->inuse); sam_chan_putreg(chan, SAM_TC_CCR_OFFSET, TC_CCR_CLKDIS); @@ -1096,8 +1100,8 @@ void sam_tc_setregister(TC_HANDLE handle, int regid, uint32_t regval) DEBUGASSERT(chan && regid < TC_NREGISTERS); - tcvdbg("Channel %d: Set register RC%d to %08lx\n", - chan->chan, regid, (unsigned long)regval); + tmrinfo("Channel %d: Set register RC%d to %08lx\n", + chan->chan, regid, (unsigned long)regval); sam_chan_putreg(chan, g_regoffset[regid], regval); sam_regdump(chan, "Set register"); @@ -1233,7 +1237,7 @@ int sam_tc_divisor(uint32_t frequency, uint32_t *div, uint32_t *tcclks) uint32_t ftcin = sam_tc_infreq(); int ndx = 0; - tcvdbg("frequency=%d\n", frequency); + tmrinfo("frequency=%d\n", frequency); /* Satisfy lower bound. That is, the value of the divider such that: * @@ -1246,7 +1250,7 @@ int sam_tc_divisor(uint32_t frequency, uint32_t *div, uint32_t *tcclks) { /* If no divisor can be found, return -ERANGE */ - tcdbg("Lower bound search failed\n"); + tmrerr("ERROR: Lower bound search failed\n"); return -ERANGE; } } @@ -1270,7 +1274,7 @@ int sam_tc_divisor(uint32_t frequency, uint32_t *div, uint32_t *tcclks) if (div) { uint32_t value = sam_tc_freqdiv_lookup(ftcin, ndx); - tcvdbg("return div=%lu\n", (unsigned long)value); + tmrinfo("return div=%lu\n", (unsigned long)value); *div = value; } @@ -1278,7 +1282,7 @@ int sam_tc_divisor(uint32_t frequency, uint32_t *div, uint32_t *tcclks) if (tcclks) { - tcvdbg("return tcclks=%08lx\n", (unsigned long)TC_CMR_TCCLKS(ndx)); + tmrinfo("return tcclks=%08lx\n", (unsigned long)TC_CMR_TCCLKS(ndx)); *tcclks = TC_CMR_TCCLKS(ndx); } diff --git a/arch/arm/src/sam34/sam4cm_tc.h b/arch/arm/src/sam34/sam4cm_tc.h index 85520d84d935c7b89e3ccc52166ea976351c4397..e474f2bc6666b6cea451cc2626b4ab5aa4764803 100644 --- a/arch/arm/src/sam34/sam4cm_tc.h +++ b/arch/arm/src/sam34/sam4cm_tc.h @@ -71,8 +71,7 @@ /* Timer debug is enabled if any timer client is enabled */ -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_ANALOG +#ifndef CONFIG_DEBUG_TIMER_INFO # undef CONFIG_SAMA5_TC_REGDEBUG #endif @@ -80,20 +79,6 @@ # define CONFIG_SAM34_TC_DEBUG 1 #endif -/* Timer/counter debug output */ - -#ifdef CONFIG_SAM34_TC_DEBUG -# define tcdbg dbg -# define tcvdbg vdbg -# define tclldbg lldbg -# define tcllvdbg llvdbg -#else -# define tcdbg(x...) -# define tcvdbg(x...) -# define tclldbg(x...) -# define tcllvdbg(x...) -#endif - /**************************************************************************** * Public Types ****************************************************************************/ diff --git a/arch/arm/src/sam34/sam4cm_tickless.c b/arch/arm/src/sam34/sam4cm_tickless.c index 7d13e8756ef10502e1c9043d983c4510918597c6..54b6c943af947bec5c4fc5e4005ded68b6755df0 100644 --- a/arch/arm/src/sam34/sam4cm_tickless.c +++ b/arch/arm/src/sam34/sam4cm_tickless.c @@ -197,7 +197,7 @@ static struct sam_tickless_s g_tickless; static void sam_oneshot_handler(void *arg) { - tcllvdbg("Expired...\n"); + tmrinfo("Expired...\n"); sched_timer_expiration(); } @@ -244,7 +244,7 @@ void up_timer_initialize(void) CONFIG_USEC_PER_TICK); if (ret < 0) { - tclldbg("ERROR: sam_oneshot_initialize failed\n"); + tmrerr("ERROR: sam_oneshot_initialize failed\n"); PANIC(); } @@ -256,7 +256,7 @@ void up_timer_initialize(void) ret = sam_oneshot_max_delay(&g_tickless.oneshot, &max_delay); if (ret < 0) { - tclldbg("ERROR: sam_oneshot_max_delay failed\n"); + tmrerr("ERROR: sam_oneshot_max_delay failed\n"); PANIC(); } @@ -280,7 +280,7 @@ void up_timer_initialize(void) CONFIG_USEC_PER_TICK); if (ret < 0) { - tclldbg("ERROR: sam_freerun_initialize failed\n"); + tmrerr("ERROR: sam_freerun_initialize failed\n"); PANIC(); } diff --git a/arch/arm/src/sam34/sam4l_gpio.c b/arch/arm/src/sam34/sam4l_gpio.c index 4dcefcef55e1a5e3ee8e3fe614a674829377d7b9..02394a543faeb63f0b01050a689030aca0f76301 100644 --- a/arch/arm/src/sam34/sam4l_gpio.c +++ b/arch/arm/src/sam34/sam4l_gpio.c @@ -59,7 +59,7 @@ * Private Data ****************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO static const char g_portchar[4] = { 'A', 'B', 'C', 'D' }; #endif @@ -522,7 +522,7 @@ bool sam_gpioread(gpio_pinset_t pinset) * ************************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO int sam_dumpgpio(uint32_t pinset, const char *msg) { irqstate_t flags; @@ -539,23 +539,25 @@ int sam_dumpgpio(uint32_t pinset, const char *msg) /* The following requires exclusive access to the GPIO registers */ flags = enter_critical_section(); - lldbg("GPIO%c pinset: %08x base: %08x -- %s\n", - g_portchar[port], pinset, base, msg); - lldbg(" GPER: %08x PMR0: %08x PMR1: %08x PMR2: %08x\n", - getreg32(base + SAM_GPIO_GPER_OFFSET), getreg32(base + SAM_GPIO_PMR0_OFFSET), - getreg32(base + SAM_GPIO_PMR1_OFFSET), getreg32(base + SAM_GPIO_PMR2_OFFSET)); - lldbg(" ODER: %08x OVR: %08x PVR: %08x PUER: %08x\n", - getreg32(base + SAM_GPIO_ODER_OFFSET), getreg32(base + SAM_GPIO_OVR_OFFSET), - getreg32(base + SAM_GPIO_PVR_OFFSET), getreg32(base + SAM_GPIO_PUER_OFFSET)); - lldbg(" PDER: %08x IER: %08x IMR0: %08x IMR1: %08x\n", - getreg32(base + SAM_GPIO_PDER_OFFSET), getreg32(base + SAM_GPIO_IER_OFFSET), - getreg32(base + SAM_GPIO_IMR0_OFFSET), getreg32(base + SAM_GPIO_IMR1_OFFSET)); - lldbg(" GFER: %08x IFR: %08x ODCR0: %08x ODCR1: %08x\n", - getreg32(base + SAM_GPIO_GFER_OFFSET), getreg32(base + SAM_GPIO_IFR_OFFSET), - getreg32(base + SAM_GPIO_ODCR0_OFFSET), getreg32(base + SAM_GPIO_ODCR1_OFFSET)); - lldbg(" OSRR0: %08x EVER: %08x PARAM: %08x VERS: %08x\n", - getreg32(base + SAM_GPIO_OSRR0_OFFSET), getreg32(base + SAM_GPIO_EVER_OFFSET), - getreg32(base + SAM_GPIO_PARAMETER_OFFSET), getreg32(base + SAM_GPIO_VERSION_OFFSET)); + + gpioinfo("GPIO%c pinset: %08x base: %08x -- %s\n", + g_portchar[port], pinset, base, msg); + gpioinfo(" GPER: %08x PMR0: %08x PMR1: %08x PMR2: %08x\n", + getreg32(base + SAM_GPIO_GPER_OFFSET), getreg32(base + SAM_GPIO_PMR0_OFFSET), + getreg32(base + SAM_GPIO_PMR1_OFFSET), getreg32(base + SAM_GPIO_PMR2_OFFSET)); + gpioinfo(" ODER: %08x OVR: %08x PVR: %08x PUER: %08x\n", + getreg32(base + SAM_GPIO_ODER_OFFSET), getreg32(base + SAM_GPIO_OVR_OFFSET), + getreg32(base + SAM_GPIO_PVR_OFFSET), getreg32(base + SAM_GPIO_PUER_OFFSET)); + gpioinfo(" PDER: %08x IER: %08x IMR0: %08x IMR1: %08x\n", + getreg32(base + SAM_GPIO_PDER_OFFSET), getreg32(base + SAM_GPIO_IER_OFFSET), + getreg32(base + SAM_GPIO_IMR0_OFFSET), getreg32(base + SAM_GPIO_IMR1_OFFSET)); + gpioinfo(" GFER: %08x IFR: %08x ODCR0: %08x ODCR1: %08x\n", + getreg32(base + SAM_GPIO_GFER_OFFSET), getreg32(base + SAM_GPIO_IFR_OFFSET), + getreg32(base + SAM_GPIO_ODCR0_OFFSET), getreg32(base + SAM_GPIO_ODCR1_OFFSET)); + gpioinfo(" OSRR0: %08x EVER: %08x PARAM: %08x VERS: %08x\n", + getreg32(base + SAM_GPIO_OSRR0_OFFSET), getreg32(base + SAM_GPIO_EVER_OFFSET), + getreg32(base + SAM_GPIO_PARAMETER_OFFSET), getreg32(base + SAM_GPIO_VERSION_OFFSET)); + leave_critical_section(flags); return OK; } diff --git a/arch/arm/src/sam34/sam_dmac.c b/arch/arm/src/sam34/sam_dmac.c index bcc8fb03f0726e14c8c3b0176437beba35c26adf..7cf1cff349991acae896bab29e2cf5f9a94ae548 100644 --- a/arch/arm/src/sam34/sam_dmac.c +++ b/arch/arm/src/sam34/sam_dmac.c @@ -889,7 +889,7 @@ sam_allocdesc(struct sam_dma_s *dmach, struct dma_linklist_s *prev, * Obviously setting it to zero would break that usage. */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (src != 0) #endif { @@ -1354,7 +1354,7 @@ static int sam_dmainterrupt(int irq, void *context) void weak_function up_dmainitialize(void) { - dmallvdbg("Initialize DMAC0\n"); + dmainfo("Initialize DMAC0\n"); /* Enable peripheral clock */ @@ -1460,7 +1460,7 @@ DMA_HANDLE sam_dmachannel(uint32_t chflags) sam_givechsem(); - dmavdbg("chflags: %08x returning dmach: %p\n", (int)chflags, dmach); + dmainfo("chflags: %08x returning dmach: %p\n", (int)chflags, dmach); return (DMA_HANDLE)dmach; } @@ -1486,7 +1486,7 @@ void sam_dmaconfig(DMA_HANDLE handle, uint32_t chflags) /* Set the new DMA channel flags. */ - dmavdbg("chflags: %08x\n", (int)chflags); + dmainfo("chflags: %08x\n", (int)chflags); dmach->flags = chflags; } @@ -1507,7 +1507,7 @@ void sam_dmafree(DMA_HANDLE handle) { struct sam_dma_s *dmach = (struct sam_dma_s *)handle; - dmavdbg("dmach: %p\n", dmach); + dmainfo("dmach: %p\n", dmach); DEBUGASSERT((dmach != NULL) && (dmach->inuse)); /* Mark the channel no longer in use. Clearing the inuse flag is an atomic @@ -1536,10 +1536,10 @@ int sam_dmatxsetup(DMA_HANDLE handle, uint32_t paddr, uint32_t maddr, size_t nby size_t maxtransfer; int ret = OK; - dmavdbg("dmach: %p paddr: %08x maddr: %08x nbytes: %d\n", + dmainfo("dmach: %p paddr: %08x maddr: %08x nbytes: %d\n", dmach, (int)paddr, (int)maddr, (int)nbytes); DEBUGASSERT(dmach); - dmavdbg("llhead: %p lltail: %p\n", dmach->llhead, dmach->lltail); + dmainfo("llhead: %p lltail: %p\n", dmach->llhead, dmach->lltail); /* The maximum transfer size in bytes depends upon the maximum number of * transfers and the number of bytes per transfer. @@ -1604,10 +1604,10 @@ int sam_dmarxsetup(DMA_HANDLE handle, uint32_t paddr, uint32_t maddr, size_t nby size_t maxtransfer; int ret = OK; - dmavdbg("dmach: %p paddr: %08x maddr: %08x nbytes: %d\n", + dmainfo("dmach: %p paddr: %08x maddr: %08x nbytes: %d\n", dmach, (int)paddr, (int)maddr, (int)nbytes); DEBUGASSERT(dmach); - dmavdbg("llhead: %p lltail: %p\n", dmach->llhead, dmach->lltail); + dmainfo("llhead: %p lltail: %p\n", dmach->llhead, dmach->lltail); /* The maximum transfer size in bytes depends upon the maximum number of * transfers and the number of bytes per transfer. @@ -1667,7 +1667,7 @@ int sam_dmastart(DMA_HANDLE handle, dma_callback_t callback, void *arg) struct sam_dma_s *dmach = (struct sam_dma_s *)handle; int ret = -EINVAL; - dmavdbg("dmach: %p callback: %p arg: %p\n", dmach, callback, arg); + dmainfo("dmach: %p callback: %p arg: %p\n", dmach, callback, arg); DEBUGASSERT(dmach != NULL); /* Verify that the DMA has been setup (i.e., at least one entry in the @@ -1711,7 +1711,7 @@ void sam_dmastop(DMA_HANDLE handle) struct sam_dma_s *dmach = (struct sam_dma_s *)handle; irqstate_t flags; - dmavdbg("dmach: %p\n", dmach); + dmainfo("dmach: %p\n", dmach); DEBUGASSERT(dmach != NULL); flags = enter_critical_section(); @@ -1730,7 +1730,7 @@ void sam_dmastop(DMA_HANDLE handle) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void sam_dmasample(DMA_HANDLE handle, struct sam_dmaregs_s *regs) { struct sam_dma_s *dmach = (struct sam_dma_s *)handle; @@ -1761,7 +1761,7 @@ void sam_dmasample(DMA_HANDLE handle, struct sam_dmaregs_s *regs) regs->cfg = getreg32(dmach->base + SAM_DMACHAN_CFG_OFFSET); leave_critical_section(flags); } -#endif /* CONFIG_DEBUG_DMA */ +#endif /* CONFIG_DEBUG_DMA_INFO */ /**************************************************************************** * Name: sam_dmadump @@ -1774,28 +1774,28 @@ void sam_dmasample(DMA_HANDLE handle, struct sam_dmaregs_s *regs) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void sam_dmadump(DMA_HANDLE handle, const struct sam_dmaregs_s *regs, const char *msg) { struct sam_dma_s *dmach = (struct sam_dma_s *)handle; - dmadbg("%s\n", msg); - dmadbg(" DMA Global Registers:\n"); - dmadbg(" GCFG[%08x]: %08x\n", SAM_DMAC_GCFG, regs->gcfg); - dmadbg(" EN[%08x]: %08x\n", SAM_DMAC_EN, regs->en); - dmadbg(" SREQ[%08x]: %08x\n", SAM_DMAC_SREQ, regs->sreq); - dmadbg(" CREQ[%08x]: %08x\n", SAM_DMAC_CREQ, regs->creq); - dmadbg(" LAST[%08x]: %08x\n", SAM_DMAC_LAST, regs->last); - dmadbg(" EBCIMR[%08x]: %08x\n", SAM_DMAC_EBCIMR, regs->ebcimr); - dmadbg(" CHSR[%08x]: %08x\n", SAM_DMAC_CHSR, regs->chsr); - dmadbg(" DMA Channel Registers:\n"); - dmadbg(" SADDR[%08x]: %08x\n", dmach->base + SAM_DMACHAN_SADDR_OFFSET, regs->saddr); - dmadbg(" DADDR[%08x]: %08x\n", dmach->base + SAM_DMACHAN_DADDR_OFFSET, regs->daddr); - dmadbg(" DSCR[%08x]: %08x\n", dmach->base + SAM_DMACHAN_DSCR_OFFSET, regs->dscr); - dmadbg(" CTRLA[%08x]: %08x\n", dmach->base + SAM_DMACHAN_CTRLA_OFFSET, regs->ctrla); - dmadbg(" CTRLB[%08x]: %08x\n", dmach->base + SAM_DMACHAN_CTRLB_OFFSET, regs->ctrlb); - dmadbg(" CFG[%08x]: %08x\n", dmach->base + SAM_DMACHAN_CFG_OFFSET, regs->cfg); + dmainfo("%s\n", msg); + dmainfo(" DMA Global Registers:\n"); + dmainfo(" GCFG[%08x]: %08x\n", SAM_DMAC_GCFG, regs->gcfg); + dmainfo(" EN[%08x]: %08x\n", SAM_DMAC_EN, regs->en); + dmainfo(" SREQ[%08x]: %08x\n", SAM_DMAC_SREQ, regs->sreq); + dmainfo(" CREQ[%08x]: %08x\n", SAM_DMAC_CREQ, regs->creq); + dmainfo(" LAST[%08x]: %08x\n", SAM_DMAC_LAST, regs->last); + dmainfo(" EBCIMR[%08x]: %08x\n", SAM_DMAC_EBCIMR, regs->ebcimr); + dmainfo(" CHSR[%08x]: %08x\n", SAM_DMAC_CHSR, regs->chsr); + dmainfo(" DMA Channel Registers:\n"); + dmainfo(" SADDR[%08x]: %08x\n", dmach->base + SAM_DMACHAN_SADDR_OFFSET, regs->saddr); + dmainfo(" DADDR[%08x]: %08x\n", dmach->base + SAM_DMACHAN_DADDR_OFFSET, regs->daddr); + dmainfo(" DSCR[%08x]: %08x\n", dmach->base + SAM_DMACHAN_DSCR_OFFSET, regs->dscr); + dmainfo(" CTRLA[%08x]: %08x\n", dmach->base + SAM_DMACHAN_CTRLA_OFFSET, regs->ctrla); + dmainfo(" CTRLB[%08x]: %08x\n", dmach->base + SAM_DMACHAN_CTRLB_OFFSET, regs->ctrlb); + dmainfo(" CFG[%08x]: %08x\n", dmach->base + SAM_DMACHAN_CFG_OFFSET, regs->cfg); } -#endif /* CONFIG_DEBUG_DMA */ +#endif /* CONFIG_DEBUG_DMA_INFO */ #endif /* CONFIG_SAM34_DMAC0 */ diff --git a/arch/arm/src/sam34/sam_dmac.h b/arch/arm/src/sam34/sam_dmac.h index 0ff4f2e14485f92635e190cf0fab525f7ad3f973..58e7e68eb80d1e8732f6964a11a27ce5e859f5d2 100644 --- a/arch/arm/src/sam34/sam_dmac.h +++ b/arch/arm/src/sam34/sam_dmac.h @@ -50,12 +50,6 @@ * Pre-processor Definitions ************************************************************************************/ -/* Configuration ********************************************************************/ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_DMA -#endif - /* DMA ******************************************************************************/ /* Flags used to characterize the desired DMA channel. The naming convention is that @@ -125,7 +119,7 @@ typedef void (*dma_callback_t)(DMA_HANDLE handle, void *arg, int result); /* The following is used for sampling DMA registers when CONFIG DEBUG_DMA is selected */ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO struct sam_dmaregs_s { /* Global Registers */ @@ -285,7 +279,7 @@ void sam_dmastop(DMA_HANDLE handle); * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void sam_dmasample(DMA_HANDLE handle, struct sam_dmaregs_s *regs); #else # define sam_dmasample(handle,regs) @@ -299,7 +293,7 @@ void sam_dmasample(DMA_HANDLE handle, struct sam_dmaregs_s *regs); * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void sam_dmadump(DMA_HANDLE handle, const struct sam_dmaregs_s *regs, const char *msg); #else diff --git a/arch/arm/src/sam34/sam_emac.c b/arch/arm/src/sam34/sam_emac.c index d33f1d8aabb83151e6e9ee31b1cef566679c2a52..5e4e348f6c05647be73160f66367a2aba99ab88b 100644 --- a/arch/arm/src/sam34/sam_emac.c +++ b/arch/arm/src/sam34/sam_emac.c @@ -231,7 +231,7 @@ * enabled. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_NET_INFO # undef CONFIG_SAM34_EMAC_REGDEBUG #endif @@ -278,9 +278,9 @@ struct sam_emac_s struct work_s work; /* For deferring work to the work queue */ #endif - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ - struct net_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by the network */ /* Used to track transmit and receive descriptors */ @@ -346,7 +346,7 @@ static uint8_t g_rxbuffer[CONFIG_SAM34_EMAC_NRXBUFFERS * EMAC_RX_UNITSIZE] ****************************************************************************/ /* Register operations ******************************************************/ -#if defined(CONFIG_SAM34_EMAC_REGDEBUG) && defined(CONFIG_DEBUG) +#if defined(CONFIG_SAM34_EMAC_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES) static bool sam_checkreg(struct sam_emac_s *priv, bool wr, uint32_t regval, uintptr_t address); static uint32_t sam_getreg(struct sam_emac_s *priv, uintptr_t addr); @@ -419,7 +419,7 @@ static int sam_ioctl(struct net_driver_s *dev, int cmd, long arg); /* PHY Initialization */ -#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_INFO) static void sam_phydump(struct sam_emac_s *priv); #else # define sam_phydump(priv) @@ -490,7 +490,7 @@ static bool sam_checkreg(struct sam_emac_s *priv, bool wr, uint32_t regval, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", priv->ntimes); + ninfo("...[Repeats %d times]...\n", priv->ntimes); } /* Save information about the new access */ @@ -522,7 +522,7 @@ static uint32_t sam_getreg(struct sam_emac_s *priv, uintptr_t address) if (sam_checkreg(priv, false, regval, address)) { - lldbg("%08x->%08x\n", address, regval); + ninfo("%08x->%08x\n", address, regval); } return regval; @@ -543,7 +543,7 @@ static void sam_putreg(struct sam_emac_s *priv, uintptr_t address, { if (sam_checkreg(priv, true, regval, address)) { - lldbg("%08x<-%08x\n", address, regval); + ninfo("%08x<-%08x\n", address, regval); } putreg32(regval, address); @@ -636,7 +636,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv) priv->txdesc = (struct emac_txdesc_s *)kmm_memalign(8, allocsize); if (!priv->txdesc) { - nlldbg("ERROR: Failed to allocate TX descriptors\n"); + nerr("ERROR: Failed to allocate TX descriptors\n"); return -ENOMEM; } @@ -646,7 +646,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv) priv->rxdesc = (struct emac_rxdesc_s *)kmm_memalign(8, allocsize); if (!priv->rxdesc) { - nlldbg("ERROR: Failed to allocate RX descriptors\n"); + nerr("ERROR: Failed to allocate RX descriptors\n"); sam_buffer_free(priv); return -ENOMEM; } @@ -657,7 +657,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv) priv->txbuffer = (uint8_t *)kmm_memalign(8, allocsize); if (!priv->txbuffer) { - nlldbg("ERROR: Failed to allocate TX buffer\n"); + nerr("ERROR: Failed to allocate TX buffer\n"); sam_buffer_free(priv); return -ENOMEM; } @@ -666,7 +666,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv) priv->rxbuffer = (uint8_t *)kmm_memalign(8, allocsize); if (!priv->rxbuffer) { - nlldbg("ERROR: Failed to allocate RX buffer\n"); + nerr("ERROR: Failed to allocate RX buffer\n"); sam_buffer_free(priv); return -ENOMEM; } @@ -753,14 +753,14 @@ static int sam_transmit(struct sam_emac_s *priv) uint32_t regval; uint32_t status; - nllvdbg("d_len: %d txhead: %d\n", dev->d_len, priv->txhead); + ninfo("d_len: %d txhead: %d\n", dev->d_len, priv->txhead); sam_dumppacket("Transmit packet", dev->d_buf, dev->d_len); /* Check parameter */ if (dev->d_len > EMAC_TX_UNITSIZE) { - nlldbg("ERROR: Packet too big: %d\n", dev->d_len); + nerr("ERROR: Packet too big: %d\n", dev->d_len); return -EINVAL; } @@ -772,7 +772,7 @@ static int sam_transmit(struct sam_emac_s *priv) if (sam_txfree(priv) < 1) { - nlldbg("ERROR: No free TX descriptors\n"); + nerr("ERROR: No free TX descriptors\n"); return -EBUSY; } @@ -830,7 +830,7 @@ static int sam_transmit(struct sam_emac_s *priv) if (sam_txfree(priv) < 1) { - nllvdbg("Disabling RX interrupts\n"); + ninfo("Disabling RX interrupts\n"); sam_putreg(priv, SAM_EMAC_IDR, EMAC_INT_RCOMP); } @@ -841,7 +841,7 @@ static int sam_transmit(struct sam_emac_s *priv) * Function: sam_txpoll * * Description: - * The transmitter is available, check if uIP has any outgoing packets ready + * The transmitter is available, check if the network has any outgoing packets ready * to send. This is a callback from devif_poll(). devif_poll() may be called: * * 1. When the preceding TX packet send is complete, @@ -951,7 +951,7 @@ static void sam_dopoll(struct sam_emac_s *priv) if (sam_txfree(priv) > 0) { - /* If we have the descriptor, then poll uIP for new XMIT data. */ + /* If we have the descriptor, then poll the network for new XMIT data. */ (void)devif_poll(dev, sam_txpoll); } @@ -1010,7 +1010,7 @@ static int sam_recvframe(struct sam_emac_s *priv) sam_cmcc_invalidate((uintptr_t)rxdesc, (uintptr_t)rxdesc + sizeof(struct emac_rxdesc_s)); - nllvdbg("rxndx: %d\n", rxndx); + ninfo("rxndx: %d\n", rxndx); while ((rxdesc->addr & EMACRXD_ADDR_OWNER) != 0) { @@ -1060,7 +1060,7 @@ static int sam_recvframe(struct sam_emac_s *priv) { if (rxndx == priv->rxndx) { - nllvdbg("ERROR: No EOF (Invalid of buffers too small)\n"); + nerr("ERROR: No EOF (Invalid of buffers too small)\n"); do { /* Give ownership back to the EMAC */ @@ -1107,7 +1107,7 @@ static int sam_recvframe(struct sam_emac_s *priv) /* Frame size from the EMAC */ dev->d_len = (rxdesc->status & EMACRXD_STA_FRLEN_MASK); - nllvdbg("packet %d-%d (%d)\n", priv->rxndx, rxndx, dev->d_len); + ninfo("packet %d-%d (%d)\n", priv->rxndx, rxndx, dev->d_len); /* All data have been copied in the application frame buffer, * release the RX descriptor @@ -1132,11 +1132,11 @@ static int sam_recvframe(struct sam_emac_s *priv) * all of the data. */ - nllvdbg("rxndx: %d d_len: %d\n", priv->rxndx, dev->d_len); + ninfo("rxndx: %d d_len: %d\n", priv->rxndx, dev->d_len); if (pktlen < dev->d_len) { - nlldbg("ERROR: Buffer size %d; frame size %d\n", dev->d_len, pktlen); + nerr("ERROR: Buffer size %d; frame size %d\n", dev->d_len, pktlen); return -E2BIG; } @@ -1167,7 +1167,7 @@ static int sam_recvframe(struct sam_emac_s *priv) /* No packet was found */ priv->rxndx = rxndx; - nllvdbg("rxndx: %d\n", priv->rxndx); + ninfo("rxndx: %d\n", priv->rxndx); return -EAGAIN; } @@ -1201,13 +1201,13 @@ static void sam_receive(struct sam_emac_s *priv) { sam_dumppacket("Received packet", dev->d_buf, dev->d_len); - /* Check if the packet is a valid size for the uIP buffer configuration + /* Check if the packet is a valid size for the network buffer configuration * (this should not happen) */ if (dev->d_len > CONFIG_NET_ETH_MTU) { - nlldbg("DROPPED: Too big: %d\n", dev->d_len); + nwarn("WARNING: Dropped, Too big: %d\n", dev->d_len); continue; } @@ -1222,7 +1222,7 @@ static void sam_receive(struct sam_emac_s *priv) #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); /* Handle ARP on input then give the IPv4 packet to the network * layer @@ -1262,7 +1262,7 @@ static void sam_receive(struct sam_emac_s *priv) #ifdef CONFIG_NET_IPv6 if (BUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); /* Give the IPv6 packet to the network layer */ @@ -1299,7 +1299,7 @@ static void sam_receive(struct sam_emac_s *priv) #ifdef CONFIG_NET_ARP if (BUF->type == htons(ETHTYPE_ARP)) { - nllvdbg("ARP frame\n"); + ninfo("ARP frame\n"); /* Handle ARP packet */ @@ -1317,7 +1317,7 @@ static void sam_receive(struct sam_emac_s *priv) else #endif { - nlldbg("DROPPED: Unknown type: %04x\n", BUF->type); + nwarn("WARNING: Dropped, Unknown type: %04x\n", BUF->type); } } } @@ -1403,7 +1403,7 @@ static void sam_txdone(struct sam_emac_s *priv) sam_putreg(priv, SAM_EMAC_IER, EMAC_INT_RCOMP); } - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ sam_dopoll(priv); } @@ -1442,7 +1442,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv) imr = sam_getreg(priv, SAM_EMAC_IMR); pending = isr & ~(imr | EMAC_INT_UNUSED); - nllvdbg("isr: %08x pending: %08x\n", isr, pending); + ninfo("isr: %08x pending: %08x\n", isr, pending); /* Check for the completion of a transmission. This should be done before * checking for received data (because receiving can cause another transmission @@ -1468,7 +1468,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv) clrbits = EMAC_TSR_RLE | sam_txinuse(priv); sam_txreset(priv); - nlldbg("ERROR: Retry Limit Exceeded TSR: %08x\n", tsr); + nerr("ERROR: Retry Limit Exceeded TSR: %08x\n", tsr); regval = sam_getreg(priv, SAM_EMAC_NCR); regval |= EMAC_NCR_TXEN; @@ -1479,7 +1479,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv) if ((tsr & EMAC_TSR_COL) != 0) { - nlldbg("ERROR: Collision occurred TSR: %08x\n", tsr); + nerr("ERROR: Collision occurred TSR: %08x\n", tsr); clrbits |= EMAC_TSR_COL; } @@ -1487,7 +1487,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv) if ((tsr & EMAC_TSR_TFC) != 0) { - nlldbg("ERROR: Transmit Frame Corruption due to AHB error: %08x\n", tsr); + nerr("ERROR: Transmit Frame Corruption due to AHB error: %08x\n", tsr); clrbits |= EMAC_TSR_TFC; } @@ -1502,7 +1502,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv) if ((tsr & EMAC_TSR_UND) != 0) { - nlldbg("ERROR: Transmit Underrun TSR: %08x\n", tsr); + nerr("ERROR: Transmit Underrun TSR: %08x\n", tsr); clrbits |= EMAC_TSR_UND; } @@ -1539,7 +1539,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv) if ((rsr & EMAC_RSR_RXOVR) != 0) { - nlldbg("ERROR: Receiver overrun RSR: %08x\n", rsr); + nerr("ERROR: Receiver overrun RSR: %08x\n", rsr); clrbits |= EMAC_RSR_RXOVR; } @@ -1556,7 +1556,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv) if ((rsr & EMAC_RSR_BNA) != 0) { - nlldbg("ERROR: Buffer not available RSR: %08x\n", rsr); + nerr("ERROR: Buffer not available RSR: %08x\n", rsr); clrbits |= EMAC_RSR_BNA; } @@ -1578,7 +1578,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv) if ((pending & EMAC_INT_PFNZ) != 0) { - nlldbg("Pause frame received\n"); + nwarn("WARNING: Pause frame received\n"); } /* Check for Pause Time Zero (PTZ) @@ -1588,7 +1588,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv) if ((pending & EMAC_INT_PTZ) != 0) { - nlldbg("Pause TO!\n"); + nwarn("WARNING: Pause TO!\n"); } #endif } @@ -1725,7 +1725,7 @@ static int sam_emac_interrupt(int irq, void *context) static inline void sam_txtimeout_process(FAR struct sam_emac_s *priv) { - nlldbg("Timeout!\n"); + nerr("ERROR: Timeout!\n"); /* Then reset the hardware. Just take the interface down, then back * up again. @@ -1734,7 +1734,7 @@ static inline void sam_txtimeout_process(FAR struct sam_emac_s *priv) sam_ifdown(&priv->dev); sam_ifup(&priv->dev); - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ sam_dopoll(priv); } @@ -1844,7 +1844,7 @@ static inline void sam_poll_process(FAR struct sam_emac_s *priv) if (sam_txfree(priv) > 0) { - /* Update TCP timing states and poll uIP for new XMIT data. */ + /* Update TCP timing states and poll the network for new XMIT data. */ (void)devif_timer(dev, sam_txpoll); } @@ -1956,13 +1956,13 @@ static int sam_ifup(struct net_driver_s *dev) struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; int ret; - nlldbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); /* Configure the EMAC interface for normal operation. */ - nllvdbg("Initialize the EMAC\n"); + ninfo("Initialize the EMAC\n"); sam_emac_configure(priv); /* Set the MAC address (should have been configured while we were down) */ @@ -1980,7 +1980,7 @@ static int sam_ifup(struct net_driver_s *dev) ret = sam_phyinit(priv); if (ret < 0) { - nlldbg("ERROR: sam_phyinit failed: %d\n", ret); + nerr("ERROR: sam_phyinit failed: %d\n", ret); return ret; } @@ -1989,16 +1989,16 @@ static int sam_ifup(struct net_driver_s *dev) ret = sam_autonegotiate(priv); if (ret < 0) { - nlldbg("ERROR: sam_autonegotiate failed: %d\n", ret); + nerr("ERROR: sam_autonegotiate failed: %d\n", ret); return ret; } while (sam_linkup(priv) == 0); - nllvdbg("Link detected \n"); + ninfo("Link detected \n"); /* Enable normal MAC operation */ - nllvdbg("Enable normal operation\n"); + ninfo("Enable normal operation\n"); /* Set and activate a timer process */ @@ -2032,7 +2032,7 @@ static int sam_ifdown(struct net_driver_s *dev) struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; irqstate_t flags; - nlldbg("Taking the network down\n"); + ninfo("Taking the network down\n"); /* Disable the EMAC interrupt */ @@ -2077,13 +2077,13 @@ static int sam_ifdown(struct net_driver_s *dev) static inline void sam_txavail_process(FAR struct sam_emac_s *priv) { - nllvdbg("ifup: %d\n", priv->ifup); + ninfo("ifup: %d\n", priv->ifup); /* Ignore the notification if the interface is not yet up */ if (priv->ifup) { - /* Poll uIP for new XMIT data */ + /* Poll the network for new XMIT data */ sam_dopoll(priv); } @@ -2331,8 +2331,8 @@ static int sam_addmac(struct net_driver_s *dev, const uint8_t *mac) unsigned int bit; UNUSED(priv); - nllvdbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); /* Calculate the 6-bit has table index */ @@ -2405,8 +2405,8 @@ static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac) unsigned int bit; UNUSED(priv); - nllvdbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); /* Calculate the 6-bit has table index */ @@ -2588,7 +2588,7 @@ static int sam_ioctl(struct net_driver_s *dev, int cmd, long arg) * ****************************************************************************/ -#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_INFO) static void sam_phydump(struct sam_emac_s *priv) { uint32_t regval; @@ -2601,21 +2601,21 @@ static void sam_phydump(struct sam_emac_s *priv) sam_putreg(priv, SAM_EMAC_NCR, regval); #ifdef CONFIG_SAM34_EMAC_RMII - nllvdbg("RMII Registers (Address %02x)\n", priv->phyaddr); + ninfo("RMII Registers (Address %02x)\n", priv->phyaddr); #else /* defined(CONFIG_SAM34_EMAC_MII) */ - nllvdbg("MII Registers (Address %02x)\n", priv->phyaddr); + ninfo("MII Registers (Address %02x)\n", priv->phyaddr); #endif sam_phyread(priv, priv->phyaddr, MII_MCR, &phyval); - nllvdbg(" MCR: %04x\n", phyval); + ninfo(" MCR: %04x\n", phyval); sam_phyread(priv, priv->phyaddr, MII_MSR, &phyval); - nllvdbg(" MSR: %04x\n", phyval); + ninfo(" MSR: %04x\n", phyval); sam_phyread(priv, priv->phyaddr, MII_ADVERTISE, &phyval); - nllvdbg(" ADVERTISE: %04x\n", phyval); + ninfo(" ADVERTISE: %04x\n", phyval); sam_phyread(priv, priv->phyaddr, MII_LPA, &phyval); - nllvdbg(" LPR: %04x\n", phyval); + ninfo(" LPR: %04x\n", phyval); sam_phyread(priv, priv->phyaddr, CONFIG_SAM34_EMAC_PHYSR, &phyval); - nllvdbg(" PHYSR: %04x\n", phyval); + ninfo(" PHYSR: %04x\n", phyval); /* Disable management port */ @@ -2738,7 +2738,7 @@ static int sam_phyreset(struct sam_emac_s *priv) int timeout; int ret; - nllvdbg(" sam_phyreset\n"); + ninfo(" sam_phyreset\n"); /* Enable management port */ @@ -2751,7 +2751,7 @@ static int sam_phyreset(struct sam_emac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, MII_MCR, MII_MCR_RESET); if (ret < 0) { - nlldbg("ERROR: sam_phywrite failed: %d\n", ret); + nerr("ERROR: sam_phywrite failed: %d\n", ret); } /* Wait for the PHY reset to complete */ @@ -2763,7 +2763,7 @@ static int sam_phyreset(struct sam_emac_s *priv) int result = sam_phyread(priv, priv->phyaddr, MII_MCR, &mcr); if (result < 0) { - nlldbg("ERROR: Failed to read the MCR register: %d\n", ret); + nerr("ERROR: Failed to read the MCR register: %d\n", ret); ret = result; } else if ((mcr & MII_MCR_RESET) == 0) @@ -2805,7 +2805,7 @@ static int sam_phyfind(struct sam_emac_s *priv, uint8_t *phyaddr) unsigned int offset; int ret = -ESRCH; - nllvdbg("Find a valid PHY address\n"); + ninfo("Find a valid PHY address\n"); /* Enable management port */ @@ -2828,8 +2828,8 @@ static int sam_phyfind(struct sam_emac_s *priv, uint8_t *phyaddr) else { - nlldbg("ERROR: sam_phyread failed for PHY address %02x: %d\n", - candidate, ret); + nerr("ERROR: sam_phyread failed for PHY address %02x: %d\n", + candidate, ret); for (offset = 0; offset < 32; offset++) { @@ -2850,10 +2850,10 @@ static int sam_phyfind(struct sam_emac_s *priv, uint8_t *phyaddr) if (ret == OK) { - nllvdbg(" PHYID1: %04x PHY addr: %d\n", phyval, candidate); + ninfo(" PHYID1: %04x PHY addr: %d\n", phyval, candidate); *phyaddr = candidate; sam_phyread(priv, candidate, CONFIG_SAM34_EMAC_PHYSR, &phyval); - nllvdbg(" PHYSR: %04x PHY addr: %d\n", phyval, candidate); + ninfo(" PHYSR: %04x PHY addr: %d\n", phyval, candidate); } /* Disable management port */ @@ -2894,7 +2894,7 @@ static int sam_phyread(struct sam_emac_s *priv, uint8_t phyaddr, ret = sam_phywait(priv); if (ret < 0) { - nlldbg("ERROR: sam_phywait failed: %d\n", ret); + nerr("ERROR: sam_phywait failed: %d\n", ret); return ret; } @@ -2918,7 +2918,7 @@ static int sam_phyread(struct sam_emac_s *priv, uint8_t phyaddr, ret = sam_phywait(priv); if (ret < 0) { - nlldbg("ERROR: sam_phywait failed: %d\n", ret); + nerr("ERROR: sam_phywait failed: %d\n", ret); return ret; } @@ -2958,7 +2958,7 @@ static int sam_phywrite(struct sam_emac_s *priv, uint8_t phyaddr, ret = sam_phywait(priv); if (ret < 0) { - nlldbg("ERROR: sam_phywait failed: %d\n", ret); + nerr("ERROR: sam_phywait failed: %d\n", ret); return ret; } @@ -2982,7 +2982,7 @@ static int sam_phywrite(struct sam_emac_s *priv, uint8_t phyaddr, ret = sam_phywait(priv); if (ret < 0) { - nlldbg("ERROR: sam_phywait failed: %d\n", ret); + nerr("ERROR: sam_phywait failed: %d\n", ret); return ret; } @@ -3026,32 +3026,32 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_PHYID1, &phyid1); if (ret < 0) { - nlldbg("ERROR: Failed to read PHYID1\n"); + nerr("ERROR: Failed to read PHYID1\n"); goto errout; } - nllvdbg("PHYID1: %04x PHY address: %02x\n", phyid1, priv->phyaddr); + ninfo("PHYID1: %04x PHY address: %02x\n", phyid1, priv->phyaddr); ret = sam_phyread(priv, priv->phyaddr, MII_PHYID2, &phyid2); if (ret < 0) { - nlldbg("ERROR: Failed to read PHYID2\n"); + nerr("ERROR: Failed to read PHYID2\n"); goto errout; } - nllvdbg("PHYID2: %04x PHY address: %02x\n", phyid2, priv->phyaddr); + ninfo("PHYID2: %04x PHY address: %02x\n", phyid2, priv->phyaddr); if (phyid1 == MII_OUI_MSB && ((phyid2 & MII_PHYID2_OUI_MASK) >> MII_PHYID2_OUI_SHIFT) == MII_OUI_LSB) { - nllvdbg(" Vendor Model Number: %04x\n", - (phyid2 & MII_PHYID2_MODEL_MASK) >> MII_PHYID2_MODEL_SHIFT); - nllvdbg(" Model Revision Number: %04x\n", - (phyid2 & MII_PHYID2_REV_MASK) >> MII_PHYID2_REV_SHIFT); + ninfo(" Vendor Model Number: %04x\n", + (phyid2 & MII_PHYID2_MODEL_MASK) >> MII_PHYID2_MODEL_SHIFT); + ninfo(" Model Revision Number: %04x\n", + (phyid2 & MII_PHYID2_REV_MASK) >> MII_PHYID2_REV_SHIFT); } else { - nlldbg("ERROR: PHY not recognized\n"); + nerr("ERROR: PHY not recognized\n"); } /* Setup control register */ @@ -3059,7 +3059,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_MCR, &mcr); if (ret < 0) { - nlldbg("ERROR: Failed to read MCR\n"); + nerr("ERROR: Failed to read MCR\n"); goto errout; } @@ -3070,7 +3070,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, MII_MCR, mcr); if (ret < 0) { - nlldbg("ERROR: Failed to write MCR\n"); + nerr("ERROR: Failed to write MCR\n"); goto errout; } @@ -3085,7 +3085,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, MII_ADVERTISE, advertise); if (ret < 0) { - nlldbg("ERROR: Failed to write ANAR\n"); + nerr("ERROR: Failed to write ANAR\n"); goto errout; } @@ -3094,7 +3094,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_MCR, &mcr); if (ret < 0) { - nlldbg("ERROR: Failed to read MCR\n"); + nerr("ERROR: Failed to read MCR\n"); goto errout; } @@ -3102,7 +3102,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, MII_MCR, mcr); if (ret < 0) { - nlldbg("ERROR: Failed to write MCR\n"); + nerr("ERROR: Failed to write MCR\n"); goto errout; } @@ -3114,11 +3114,11 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, MII_MCR, mcr); if (ret < 0) { - nlldbg("ERROR: Failed to write MCR\n"); + nerr("ERROR: Failed to write MCR\n"); goto errout; } - nllvdbg(" MCR: %04x\n", mcr); + ninfo(" MCR: %04x\n", mcr); /* Check AutoNegotiate complete */ @@ -3128,7 +3128,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_MSR, &msr); if (ret < 0) { - nlldbg("ERROR: Failed to read MSR\n"); + nerr("ERROR: Failed to read MSR\n"); goto errout; } @@ -3138,7 +3138,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) { /* Yes.. break out of the loop */ - nllvdbg("AutoNegotiate complete\n"); + ninfo("AutoNegotiate complete\n"); break; } @@ -3146,7 +3146,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) if (++timeout >= PHY_RETRY_MAX) { - nlldbg("ERROR: TimeOut\n"); + nerr("ERROR: TimeOut\n"); sam_phydump(priv); ret = -ETIMEDOUT; goto errout; @@ -3158,7 +3158,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_LPA, &lpa); if (ret < 0) { - nlldbg("ERROR: Failed to read ANLPAR\n"); + nerr("ERROR: Failed to read ANLPAR\n"); goto errout; } @@ -3244,13 +3244,13 @@ static bool sam_linkup(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_MSR, &msr); if (ret < 0) { - nlldbg("ERROR: Failed to read MSR: %d\n", ret); + nerr("ERROR: Failed to read MSR: %d\n", ret); goto errout; } if ((msr & MII_MSR_LINKSTATUS) == 0) { - nlldbg("ERROR: MSR LinkStatus: %04x\n", msr); + nerr("ERROR: MSR LinkStatus: %04x\n", msr); goto errout; } @@ -3259,7 +3259,7 @@ static bool sam_linkup(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, CONFIG_SAM34_EMAC_PHYSR, &physr); if (ret < 0) { - nlldbg("ERROR: Failed to read PHYSR: %d\n", ret); + nerr("ERROR: Failed to read PHYSR: %d\n", ret); goto errout; } @@ -3297,7 +3297,7 @@ static bool sam_linkup(struct sam_emac_s *priv) /* Start the EMAC transfers */ - nllvdbg("Link is up\n"); + ninfo("Link is up\n"); linkup = true; errout: @@ -3354,7 +3354,7 @@ static int sam_phyinit(struct sam_emac_s *priv) ret = sam_phyfind(priv, &priv->phyaddr); if (ret < 0) { - nlldbg("ERROR: sam_phyfind failed: %d\n", ret); + nerr("ERROR: sam_phyfind failed: %d\n", ret); return ret; } @@ -3598,11 +3598,11 @@ static void sam_macaddress(struct sam_emac_s *priv) struct net_driver_s *dev = &priv->dev; uint32_t regval; - nllvdbg("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - dev->d_ifname, - dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], - dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], - dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5]); + ninfo("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + dev->d_ifname, + dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], + dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], + dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5]); /* Set the MAC address */ @@ -3664,7 +3664,7 @@ static void sam_ipv6multicast(struct sam_emac_s *priv) mac[4] = tmp16 & 0xff; mac[5] = tmp16 >> 8; - nvdbg("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", + ninfo("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); (void)sam_addmac(dev, mac); @@ -3710,7 +3710,7 @@ static int sam_emac_configure(struct sam_emac_s *priv) { uint32_t regval; - nllvdbg("Entry\n"); + ninfo("Entry\n"); /* Enable clocking to the EMAC peripheral */ @@ -3823,14 +3823,14 @@ void up_netinitialize(void) priv->txpoll = wd_create(); if (!priv->txpoll) { - nlldbg("ERROR: Failed to create periodic poll timer\n"); + nerr("ERROR: Failed to create periodic poll timer\n"); return; } priv->txtimeout = wd_create(); /* Create TX timeout timer */ if (!priv->txtimeout) { - nlldbg("ERROR: Failed to create periodic poll timer\n"); + nerr("ERROR: Failed to create periodic poll timer\n"); goto errout_with_txpoll; } @@ -3843,7 +3843,7 @@ void up_netinitialize(void) ret = sam_buffer_initialize(priv); if (ret < 0) { - nlldbg("ERROR: sam_buffer_initialize failed: %d\n", ret); + nerr("ERROR: sam_buffer_initialize failed: %d\n", ret); goto errout_with_txtimeout; } @@ -3854,7 +3854,7 @@ void up_netinitialize(void) ret = irq_attach(SAM_IRQ_EMAC, sam_emac_interrupt); if (ret < 0) { - nlldbg("ERROR: Failed to attach the handler to the IRQ%d\n", SAM_IRQ_EMAC); + nerr("ERROR: Failed to attach the handler to the IRQ%d\n", SAM_IRQ_EMAC); goto errout_with_buffers; } @@ -3867,7 +3867,7 @@ void up_netinitialize(void) ret = sam_ifdown(&priv->dev); if (ret < 0) { - nlldbg("ERROR: Failed to put the interface in the down state: %d\n", ret); + nerr("ERROR: Failed to put the interface in the down state: %d\n", ret); goto errout_with_buffers; } @@ -3879,7 +3879,7 @@ void up_netinitialize(void) return; } - nlldbg("ERROR: netdev_register() failed: %d\n", ret); + nerr("ERROR: netdev_register() failed: %d\n", ret); errout_with_buffers: sam_buffer_free(priv); diff --git a/arch/arm/src/sam34/sam_gpio.c b/arch/arm/src/sam34/sam_gpio.c index b0f45e89e7ba95b4baa96feceb1b4dd55e19e124..89461c58369c2fc6fe2ef3e8a311a873c99b6c2f 100644 --- a/arch/arm/src/sam34/sam_gpio.c +++ b/arch/arm/src/sam34/sam_gpio.c @@ -70,7 +70,7 @@ * Private Data ****************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO static const char g_portchar[4] = { 'A', 'B', 'C', 'D' }; #endif @@ -473,7 +473,7 @@ bool sam_gpioread(gpio_pinset_t pinset) * ************************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO int sam_dumpgpio(uint32_t pinset, const char *msg) { irqstate_t flags; @@ -488,44 +488,46 @@ int sam_dumpgpio(uint32_t pinset, const char *msg) /* The following requires exclusive access to the GPIO registers */ flags = enter_critical_section(); - lldbg("PIO%c pinset: %08x base: %08x -- %s\n", + + gpioinfo("PIO%c pinset: %08x base: %08x -- %s\n", g_portchar[port], pinset, base, msg); - lldbg(" PSR: %08x OSR: %08x IFSR: %08x ODSR: %08x\n", - getreg32(base + SAM_PIO_PSR_OFFSET), getreg32(base + SAM_PIO_OSR_OFFSET), - getreg32(base + SAM_PIO_IFSR_OFFSET), getreg32(base + SAM_PIO_ODSR_OFFSET)); - lldbg(" PDSR: %08x IMR: %08x ISR: %08x MDSR: %08x\n", - getreg32(base + SAM_PIO_PDSR_OFFSET), getreg32(base + SAM_PIO_IMR_OFFSET), - getreg32(base + SAM_PIO_ISR_OFFSET), getreg32(base + SAM_PIO_MDSR_OFFSET)); + gpioinfo(" PSR: %08x OSR: %08x IFSR: %08x ODSR: %08x\n", + getreg32(base + SAM_PIO_PSR_OFFSET), getreg32(base + SAM_PIO_OSR_OFFSET), + getreg32(base + SAM_PIO_IFSR_OFFSET), getreg32(base + SAM_PIO_ODSR_OFFSET)); + gpioinfo(" PDSR: %08x IMR: %08x ISR: %08x MDSR: %08x\n", + getreg32(base + SAM_PIO_PDSR_OFFSET), getreg32(base + SAM_PIO_IMR_OFFSET), + getreg32(base + SAM_PIO_ISR_OFFSET), getreg32(base + SAM_PIO_MDSR_OFFSET)); #if defined(CONFIG_ARCH_CHIP_SAM3U) - lldbg(" ABSR: %08x SCIFSR: %08x DIFSR: %08x IFDGSR: %08x\n", - getreg32(base + SAM_PIO_ABSR_OFFSET), getreg32(base + SAM_PIO_SCIFSR_OFFSET), - getreg32(base + SAM_PIO_DIFSR_OFFSET), getreg32(base + SAM_PIO_IFDGSR_OFFSET)); + gpioinfo(" ABSR: %08x SCIFSR: %08x DIFSR: %08x IFDGSR: %08x\n", + getreg32(base + SAM_PIO_ABSR_OFFSET), getreg32(base + SAM_PIO_SCIFSR_OFFSET), + getreg32(base + SAM_PIO_DIFSR_OFFSET), getreg32(base + SAM_PIO_IFDGSR_OFFSET)); #elif defined(CONFIG_ARCH_CHIP_SAM4S) || defined(CONFIG_ARCH_CHIP_SAM4E) - lldbg(" ABCDSR: %08x %08x IFSCSR: %08x PPDSR: %08x\n", - getreg32(base + SAM_PIO_ABCDSR1_OFFSET), getreg32(base + SAM_PIO_ABCDSR2_OFFSET), - getreg32(base + SAM_PIO_IFSCSR_OFFSET), getreg32(base + SAM_PIO_PPDSR_OFFSET)); + gpioinfo(" ABCDSR: %08x %08x IFSCSR: %08x PPDSR: %08x\n", + getreg32(base + SAM_PIO_ABCDSR1_OFFSET), getreg32(base + SAM_PIO_ABCDSR2_OFFSET), + getreg32(base + SAM_PIO_IFSCSR_OFFSET), getreg32(base + SAM_PIO_PPDSR_OFFSET)); #endif - lldbg(" PUSR: %08x SCDR: %08x OWSR: %08x AIMMR: %08x\n", - getreg32(base + SAM_PIO_PUSR_OFFSET), getreg32(base + SAM_PIO_SCDR_OFFSET), - getreg32(base + SAM_PIO_OWSR_OFFSET), getreg32(base + SAM_PIO_AIMMR_OFFSET)); - lldbg(" ESR: %08x LSR: %08x ELSR: %08x FELLSR: %08x\n", - getreg32(base + SAM_PIO_ESR_OFFSET), getreg32(base + SAM_PIO_LSR_OFFSET), - getreg32(base + SAM_PIO_ELSR_OFFSET), getreg32(base + SAM_PIO_FELLSR_OFFSET)); - lldbg(" FRLHSR: %08x LOCKSR: %08x WPMR: %08x WPSR: %08x\n", - getreg32(base + SAM_PIO_FRLHSR_OFFSET), getreg32(base + SAM_PIO_LOCKSR_OFFSET), - getreg32(base + SAM_PIO_WPMR_OFFSET), getreg32(base + SAM_PIO_WPSR_OFFSET)); + gpioinfo(" PUSR: %08x SCDR: %08x OWSR: %08x AIMMR: %08x\n", + getreg32(base + SAM_PIO_PUSR_OFFSET), getreg32(base + SAM_PIO_SCDR_OFFSET), + getreg32(base + SAM_PIO_OWSR_OFFSET), getreg32(base + SAM_PIO_AIMMR_OFFSET)); + gpioinfo(" ESR: %08x LSR: %08x ELSR: %08x FELLSR: %08x\n", + getreg32(base + SAM_PIO_ESR_OFFSET), getreg32(base + SAM_PIO_LSR_OFFSET), + getreg32(base + SAM_PIO_ELSR_OFFSET), getreg32(base + SAM_PIO_FELLSR_OFFSET)); + gpioinfo(" FRLHSR: %08x LOCKSR: %08x WPMR: %08x WPSR: %08x\n", + getreg32(base + SAM_PIO_FRLHSR_OFFSET), getreg32(base + SAM_PIO_LOCKSR_OFFSET), + getreg32(base + SAM_PIO_WPMR_OFFSET), getreg32(base + SAM_PIO_WPSR_OFFSET)); #if defined(CONFIG_ARCH_CHIP_SAM4S) || defined(CONFIG_ARCH_CHIP_SAM4E) - lldbg(" PCMR: %08x PCIMR: %08x PCISR: %08x PCRHR: %08x\n", - getreg32(base + SAM_PIO_PCMR_OFFSET), getreg32(base + SAM_PIO_PCIMR_OFFSET), - getreg32(base + SAM_PIO_PCISR_OFFSET), getreg32(base + SAM_PIO_PCRHR_OFFSET)); + gpioinfo(" PCMR: %08x PCIMR: %08x PCISR: %08x PCRHR: %08x\n", + getreg32(base + SAM_PIO_PCMR_OFFSET), getreg32(base + SAM_PIO_PCIMR_OFFSET), + getreg32(base + SAM_PIO_PCISR_OFFSET), getreg32(base + SAM_PIO_PCRHR_OFFSET)); #ifdef CONFIG_ARCH_CHIP_SAM4E - lldbg("SCHMITT: %08x DELAYR:%08x\n", - getreg32(base + SAM_PIO_SCHMITT_OFFSET), getreg32(base + SAM_PIO_DELAYR_OFFSET)); + gpioinfo("SCHMITT: %08x DELAYR:%08x\n", + getreg32(base + SAM_PIO_SCHMITT_OFFSET), getreg32(base + SAM_PIO_DELAYR_OFFSET)); #else - lldbg("SCHMITT: %08x\n", - getreg32(base + SAM_PIO_SCHMITT_OFFSET)); + gpioinfo("SCHMITT: %08x\n", + getreg32(base + SAM_PIO_SCHMITT_OFFSET)); #endif #endif + leave_critical_section(flags); return OK; } diff --git a/arch/arm/src/sam34/sam_gpio.h b/arch/arm/src/sam34/sam_gpio.h index f8f267ef5e39a95025affce1248a5e82c06d9707..a5cbe6e3e3fdc606624aa519d29674a608fa7a49 100644 --- a/arch/arm/src/sam34/sam_gpio.h +++ b/arch/arm/src/sam34/sam_gpio.h @@ -77,24 +77,12 @@ # undef CONFIG_SAM34_GPIO_IRQ #endif -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_GPIO -#endif - /************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Inline Functions + * Public Function Prototypes ************************************************************************************/ #ifndef __ASSEMBLY__ -/************************************************************************************ - * Public Data - ************************************************************************************/ - #undef EXTERN #if defined(__cplusplus) #define EXTERN extern "C" @@ -104,10 +92,6 @@ extern "C" #define EXTERN extern #endif -/************************************************************************************ - * Public Function Prototypes - ************************************************************************************/ - /************************************************************************************ * Name: sam_gpioirqinitialize * @@ -202,7 +186,7 @@ void sam_gpioirqdisable(int irq); * ************************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO int sam_dumpgpio(uint32_t pinset, const char *msg); #else # define sam_dumpgpio(p,m) diff --git a/arch/arm/src/sam34/sam_hsmci.c b/arch/arm/src/sam34/sam_hsmci.c index 21e9098cd5aecc3804eab568f5d86e75a9424c4a..fa4073d6a2799c877ef66df8b2fb4d6a6a0365e4 100644 --- a/arch/arm/src/sam34/sam_hsmci.c +++ b/arch/arm/src/sam34/sam_hsmci.c @@ -104,7 +104,7 @@ #define SAM34_HSMCI_PRIO NVIC_SYSH_PRIORITY_DEFAULT -#if !defined(CONFIG_DEBUG_FS) || !defined(CONFIG_DEBUG_VERBOSE) +#ifndef CONFIG_DEBUG_MEMCARD_INFO # undef CONFIG_SAM34_HSMCI_CMDDEBUG # undef CONFIG_SAM34_HSMCI_XFRDEBUG #endif @@ -831,38 +831,38 @@ static void sam_hsmcisample(struct sam_hsmciregs_s *regs) #if defined(CONFIG_SAM34_HSMCI_XFRDEBUG) || defined(CONFIG_SAM34_HSMCI_CMDDEBUG) static void sam_hsmcidump(struct sam_hsmciregs_s *regs, const char *msg) { - fdbg("HSMCI Registers: %s\n", msg); - fdbg(" MR[%08x]: %08x\n", SAM_HSMCI_MR, regs->mr); - fdbg(" DTOR[%08x]: %08x\n", SAM_HSMCI_DTOR, regs->dtor); - fdbg(" SDCR[%08x]: %08x\n", SAM_HSMCI_SDCR, regs->sdcr); - fdbg(" ARGR[%08x]: %08x\n", SAM_HSMCI_ARGR, regs->argr); - fdbg(" BLKR[%08x]: %08x\n", SAM_HSMCI_BLKR, regs->blkr); - fdbg(" CSTOR[%08x]: %08x\n", SAM_HSMCI_CSTOR, regs->cstor); - fdbg(" RSPR0[%08x]: %08x\n", SAM_HSMCI_RSPR0, regs->rsp0); - fdbg(" RSPR1[%08x]: %08x\n", SAM_HSMCI_RSPR1, regs->rsp1); - fdbg(" RSPR2[%08x]: %08x\n", SAM_HSMCI_RSPR2, regs->rsp2); - fdbg(" RSPR3[%08x]: %08x\n", SAM_HSMCI_RSPR3, regs->rsp3); - fdbg(" SR[%08x]: %08x\n", SAM_HSMCI_SR, regs->sr); - fdbg(" IMR[%08x]: %08x\n", SAM_HSMCI_IMR, regs->imr); + mcinfo("HSMCI Registers: %s\n", msg); + mcinfo(" MR[%08x]: %08x\n", SAM_HSMCI_MR, regs->mr); + mcinfo(" DTOR[%08x]: %08x\n", SAM_HSMCI_DTOR, regs->dtor); + mcinfo(" SDCR[%08x]: %08x\n", SAM_HSMCI_SDCR, regs->sdcr); + mcinfo(" ARGR[%08x]: %08x\n", SAM_HSMCI_ARGR, regs->argr); + mcinfo(" BLKR[%08x]: %08x\n", SAM_HSMCI_BLKR, regs->blkr); + mcinfo(" CSTOR[%08x]: %08x\n", SAM_HSMCI_CSTOR, regs->cstor); + mcinfo(" RSPR0[%08x]: %08x\n", SAM_HSMCI_RSPR0, regs->rsp0); + mcinfo(" RSPR1[%08x]: %08x\n", SAM_HSMCI_RSPR1, regs->rsp1); + mcinfo(" RSPR2[%08x]: %08x\n", SAM_HSMCI_RSPR2, regs->rsp2); + mcinfo(" RSPR3[%08x]: %08x\n", SAM_HSMCI_RSPR3, regs->rsp3); + mcinfo(" SR[%08x]: %08x\n", SAM_HSMCI_SR, regs->sr); + mcinfo(" IMR[%08x]: %08x\n", SAM_HSMCI_IMR, regs->imr); #if defined(CONFIG_ARCH_CHIP_SAM3U) - fdbg(" DMA[%08x]: %08x\n", SAM_HSMCI_DMA, regs->dma); + mcinfo(" DMA[%08x]: %08x\n", SAM_HSMCI_DMA, regs->dma); #endif - fdbg(" CFG[%08x]: %08x\n", SAM_HSMCI_CFG, regs->cfg); - fdbg(" WPMR[%08x]: %08x\n", SAM_HSMCI_WPMR, regs->wpmr); - fdbg(" WPSR[%08x]: %08x\n", SAM_HSMCI_WPSR, regs->wpsr); + mcinfo(" CFG[%08x]: %08x\n", SAM_HSMCI_CFG, regs->cfg); + mcinfo(" WPMR[%08x]: %08x\n", SAM_HSMCI_WPMR, regs->wpmr); + mcinfo(" WPSR[%08x]: %08x\n", SAM_HSMCI_WPSR, regs->wpsr); #ifdef CONFIG_SAM34_PDCA - fdbg("HSMCI PDC Registers:\n"); - fdbg(" RPR[%08x]: %08x\n", SAM_HSMCI_PDC_RPR, regs->pdc_rpr); - fdbg(" RCR[%08x]: %08x\n", SAM_HSMCI_PDC_RCR, regs->pdc_rcr); - fdbg(" TPR[%08x]: %08x\n", SAM_HSMCI_PDC_TPR, regs->pdc_tpr); - fdbg(" TCR[%08x]: %08x\n", SAM_HSMCI_PDC_TCR, regs->pdc_tcr); - fdbg(" RNPR[%08x]: %08x\n", SAM_HSMCI_PDC_RNPR, regs->pdc_rnpr); - fdbg(" RNCR[%08x]: %08x\n", SAM_HSMCI_PDC_RNCR, regs->pdc_rncr); - fdbg(" TNPR[%08x]: %08x\n", SAM_HSMCI_PDC_TNPR, regs->pdc_tnpr); - fdbg(" TNCR[%08x]: %08x\n", SAM_HSMCI_PDC_TNCR, regs->pdc_tncr); -//fdbg(" TCR[%08x]: %08x\n", SAM_HSMCI_PDC_PTCR, regs->pdc_ptcr); - fdbg(" PTSR[%08x]: %08x\n", SAM_HSMCI_PDC_PTSR, regs->pdc_ptsr); + mcinfo("HSMCI PDC Registers:\n"); + mcinfo(" RPR[%08x]: %08x\n", SAM_HSMCI_PDC_RPR, regs->pdc_rpr); + mcinfo(" RCR[%08x]: %08x\n", SAM_HSMCI_PDC_RCR, regs->pdc_rcr); + mcinfo(" TPR[%08x]: %08x\n", SAM_HSMCI_PDC_TPR, regs->pdc_tpr); + mcinfo(" TCR[%08x]: %08x\n", SAM_HSMCI_PDC_TCR, regs->pdc_tcr); + mcinfo(" RNPR[%08x]: %08x\n", SAM_HSMCI_PDC_RNPR, regs->pdc_rnpr); + mcinfo(" RNCR[%08x]: %08x\n", SAM_HSMCI_PDC_RNCR, regs->pdc_rncr); + mcinfo(" TNPR[%08x]: %08x\n", SAM_HSMCI_PDC_TNPR, regs->pdc_tnpr); + mcinfo(" TNCR[%08x]: %08x\n", SAM_HSMCI_PDC_TNCR, regs->pdc_tncr); +//mcinfo(" TCR[%08x]: %08x\n", SAM_HSMCI_PDC_PTCR, regs->pdc_ptcr); + mcinfo(" PTSR[%08x]: %08x\n", SAM_HSMCI_PDC_PTSR, regs->pdc_ptsr); #endif } #endif @@ -1083,7 +1083,7 @@ static void sam_eventtimeout(int argc, uint32_t arg) /* Yes.. wake up any waiting threads */ sam_endwait(priv, SDIOWAIT_TIMEOUT); - flldbg("Timeout\n"); + mcerr("ERROR: Timeout\n"); } } @@ -1278,7 +1278,7 @@ static int sam_interrupt(int irq, void *context) { /* Yes.. Was it some kind of timeout error? */ - flldbg("ERROR: enabled: %08x pending: %08x\n", enabled, pending); + mcerr("ERROR: enabled: %08x pending: %08x\n", enabled, pending); if ((pending & HSMCI_DATA_TIMEOUT_ERRORS) != 0) { /* Yes.. Terminate with a timeout. */ @@ -1320,8 +1320,8 @@ static int sam_interrupt(int irq, void *context) { /* Yes.. Was the error some kind of timeout? */ - fllvdbg("ERROR: events: %08x SR: %08x\n", - priv->cmdrmask, enabled); + mcerr("ERROR: events: %08x SR: %08x\n", + priv->cmdrmask, enabled); if ((pending & HSMCI_RESPONSE_TIMEOUT_ERRORS) != 0) { @@ -1754,7 +1754,7 @@ static int sam_sendcmd(FAR struct sdio_dev_s *dev, /* Write the fully decorated command to CMDR */ - fvdbg("cmd: %08x arg: %08x regval: %08x\n", cmd, arg, regval); + mcinfo("cmd: %08x arg: %08x regval: %08x\n", cmd, arg, regval); putreg32(regval, SAM_HSMCI_CMDR); sam_cmdsample1(SAMPLENDX_AFTER_CMDR); return OK; @@ -1933,7 +1933,7 @@ static int sam_waitresponse(FAR struct sdio_dev_s *dev, uint32_t cmd) { /* Yes.. Was the error some kind of timeout? */ - fdbg("ERROR: cmd: %08x events: %08x SR: %08x\n", + mcerr("ERROR: cmd: %08x events: %08x SR: %08x\n", cmd, priv->cmdrmask, sr); if ((pending & HSMCI_RESPONSE_TIMEOUT_ERRORS) != 0) @@ -1963,7 +1963,7 @@ static int sam_waitresponse(FAR struct sdio_dev_s *dev, uint32_t cmd) } else if (--timeout <= 0) { - fdbg("ERROR: Timeout cmd: %08x events: %08x SR: %08x\n", + mcerr("ERROR: Timeout cmd: %08x events: %08x SR: %08x\n", cmd, priv->cmdrmask, sr); priv->wkupevent = SDIOWAIT_TIMEOUT; @@ -2035,10 +2035,10 @@ static int sam_recvshort(FAR struct sdio_dev_s *dev, * 0 1 End bit */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!rshort) { - fdbg("ERROR: rshort=NULL\n"); + mcerr("ERROR: rshort=NULL\n"); ret = -EINVAL; } @@ -2050,7 +2050,7 @@ static int sam_recvshort(FAR struct sdio_dev_s *dev, (cmd & MMCSD_RESPONSE_MASK) != MMCSD_R3_RESPONSE && (cmd & MMCSD_RESPONSE_MASK) != MMCSD_R7_RESPONSE) { - fdbg("ERROR: Wrong response CMD=%08x\n", cmd); + mcerr("ERROR: Wrong response CMD=%08x\n", cmd); ret = -EINVAL; } else @@ -2095,12 +2095,12 @@ static int sam_recvlong(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t rlong * 0 1 End bit */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Check that R1 is the correct response to this command */ if ((cmd & MMCSD_RESPONSE_MASK) != MMCSD_R2_RESPONSE) { - fdbg("ERROR: Wrong response CMD=%08x\n", cmd); + mcerr("ERROR: Wrong response CMD=%08x\n", cmd); ret = -EINVAL; } else @@ -2282,7 +2282,7 @@ static sdio_eventset_t sam_eventwait(FAR struct sdio_dev_s *dev, 1, (uint32_t)priv); if (ret != OK) { - fdbg("ERROR: wd_start failed: %d\n", ret); + mcerr("ERROR: wd_start failed: %d\n", ret); } } @@ -2348,7 +2348,7 @@ static void sam_callbackenable(FAR struct sdio_dev_s *dev, { struct sam_dev_s *priv = (struct sam_dev_s *)dev; - fvdbg("eventset: %02x\n", eventset); + mcinfo("eventset: %02x\n", eventset); DEBUGASSERT(priv != NULL); priv->cbevents = eventset; @@ -2384,7 +2384,7 @@ static int sam_registercallback(FAR struct sdio_dev_s *dev, /* Disable callbacks and register this callback and is argument */ - fvdbg("Register %p(%p)\n", callback, arg); + mcinfo("Register %p(%p)\n", callback, arg); DEBUGASSERT(priv != NULL); priv->cbevents = 0; @@ -2472,7 +2472,8 @@ static int sam_dmarecvsetup(FAR struct sdio_dev_s *dev, FAR uint8_t *buffer, #ifdef CONFIG_SAM34_PDCA modifyreg32(SAM_HSMCI_MR, 0, HSMCI_MR_PDCMODE); - fdbg("SAM_HSMCI_MR = 0x%08X\n", getreg32(SAM_HSMCI_MR)); + mcinfo("SAM_HSMCI_MR = 0x%08X\n", getreg32(SAM_HSMCI_MR)); + putreg32((uint32_t)buffer, SAM_HSMCI_PDC_RPR); putreg32(buflen/4, SAM_HSMCI_PDC_RCR); putreg32(PDC_PTCR_RXTEN, SAM_HSMCI_PDC_PTCR); @@ -2541,7 +2542,8 @@ static int sam_dmasendsetup(FAR struct sdio_dev_s *dev, #ifdef CONFIG_SAM34_PDCA modifyreg32(SAM_HSMCI_MR, 0, HSMCI_MR_PDCMODE); - fdbg("SAM_HSMCI_MR = 0x%08X\n", getreg32(SAM_HSMCI_MR)); + mcinfo("SAM_HSMCI_MR = 0x%08X\n", getreg32(SAM_HSMCI_MR)); + putreg32((uint32_t)buffer, SAM_HSMCI_PDC_TPR); putreg32(buflen/4, SAM_HSMCI_PDC_TCR); putreg32(PDC_PTCR_TXTEN, SAM_HSMCI_PDC_PTCR); @@ -2581,7 +2583,7 @@ static void sam_callback(void *arg) /* Is a callback registered? */ DEBUGASSERT(priv != NULL); - fvdbg("Callback %p(%p) cbevents: %02x cdstatus: %02x\n", + mcinfo("Callback %p(%p) cbevents: %02x cdstatus: %02x\n", priv->callback, priv->cbarg, priv->cbevents, priv->cdstatus); if (priv->callback) @@ -2626,14 +2628,14 @@ static void sam_callback(void *arg) { /* Yes.. queue it */ - fllvdbg("Queuing callback to %p(%p)\n", priv->callback, priv->cbarg); + mcinfo("Queuing callback to %p(%p)\n", priv->callback, priv->cbarg); (void)work_queue(LPWORK, &priv->cbwork, (worker_t)priv->callback, priv->cbarg, 0); } else { /* No.. then just call the callback here */ - fvdbg("Callback to %p(%p)\n", priv->callback, priv->cbarg); + mcinfo("Callback to %p(%p)\n", priv->callback, priv->cbarg); priv->callback(priv->cbarg); } } @@ -2663,7 +2665,7 @@ FAR struct sdio_dev_s *sdio_initialize(int slotno) struct sam_dev_s *priv = &g_sdiodev; - fdbg("slotno: %d\n", slotno); + mcinfo("slotno: %d\n", slotno); /* Initialize the HSMCI slot structure */ @@ -2741,7 +2743,7 @@ void sdio_mediachange(FAR struct sdio_dev_s *dev, bool cardinslot) priv->cdstatus &= ~SDIO_STATUS_PRESENT; } - fllvdbg("cdstatus OLD: %02x NEW: %02x\n", cdstatus, priv->cdstatus); + mcinfo("cdstatus OLD: %02x NEW: %02x\n", cdstatus, priv->cdstatus); /* Perform any requested callback if the status has changed */ @@ -2786,7 +2788,7 @@ void sdio_wrprotect(FAR struct sdio_dev_s *dev, bool wrprotect) priv->cdstatus &= ~SDIO_STATUS_WRPROTECTED; } - fvdbg("cdstatus: %02x\n", priv->cdstatus); + mcinfo("cdstatus: %02x\n", priv->cdstatus); leave_critical_section(flags); } #endif /* CONFIG_SAM34_HSMCI */ diff --git a/arch/arm/src/sam34/sam_irq.c b/arch/arm/src/sam34/sam_irq.c index 2a8b2f990ed4c6b582a9dca47e5d907927e4e606..68f1777434725792819d5731686ce8acddcffbc8 100644 --- a/arch/arm/src/sam34/sam_irq.c +++ b/arch/arm/src/sam34/sam_irq.c @@ -108,52 +108,54 @@ extern uint32_t _vectors[]; * ****************************************************************************/ -#if defined(CONFIG_DEBUG_IRQ) +#if defined(CONFIG_DEBUG_IRQ_INFO) static void sam_dumpnvic(const char *msg, int irq) { irqstate_t flags; flags = enter_critical_section(); - lldbg("NVIC (%s, irq=%d):\n", msg, irq); - lldbg(" INTCTRL: %08x VECTAB: %08x\n", - getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB)); + + irqinfo("NVIC (%s, irq=%d):\n", msg, irq); + irqinfo(" INTCTRL: %08x VECTAB: %08x\n", + getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB)); #if 0 - lldbg(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n", - getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA), - getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE)); + irqinfo(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n", + getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA), + getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE)); #endif - lldbg(" IRQ ENABLE: %08x %08x %08x\n", - getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE), - getreg32(NVIC_IRQ64_95_ENABLE)); - lldbg(" SYSH_PRIO: %08x %08x %08x\n", - getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY), - getreg32(NVIC_SYSH12_15_PRIORITY)); - lldbg(" IRQ PRIO: %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY), - getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY)); + irqinfo(" IRQ ENABLE: %08x %08x %08x\n", + getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE), + getreg32(NVIC_IRQ64_95_ENABLE)); + irqinfo(" SYSH_PRIO: %08x %08x %08x\n", + getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY), + getreg32(NVIC_SYSH12_15_PRIORITY)); + irqinfo(" IRQ PRIO: %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY), + getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY)); #if SAM_IRQ_NEXTINT > 15 - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY), - getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY), + getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY)); #endif #if SAM_IRQ_NEXTINT > 31 - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY), - getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY), + getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY)); #endif #if SAM_IRQ_NEXTINT > 47 - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ48_51_PRIORITY), getreg32(NVIC_IRQ52_55_PRIORITY), - getreg32(NVIC_IRQ56_59_PRIORITY), getreg32(NVIC_IRQ60_63_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ48_51_PRIORITY), getreg32(NVIC_IRQ52_55_PRIORITY), + getreg32(NVIC_IRQ56_59_PRIORITY), getreg32(NVIC_IRQ60_63_PRIORITY)); #endif #if SAM_IRQ_NEXTINT > 63 - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ64_67_PRIORITY), getreg32(NVIC_IRQ68_71_PRIORITY), - getreg32(NVIC_IRQ72_75_PRIORITY), getreg32(NVIC_IRQ76_79_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ64_67_PRIORITY), getreg32(NVIC_IRQ68_71_PRIORITY), + getreg32(NVIC_IRQ72_75_PRIORITY), getreg32(NVIC_IRQ76_79_PRIORITY)); #endif #if SAM_IRQ_NEXTINT > 79 # warning Missing logic #endif + leave_critical_section(flags); } #else @@ -171,11 +173,11 @@ static void sam_dumpnvic(const char *msg, int irq) * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES static int sam_nmi(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! NMI received\n"); + _err("PANIC!!! NMI received\n"); PANIC(); return 0; } @@ -183,7 +185,7 @@ static int sam_nmi(int irq, FAR void *context) static int sam_busfault(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS)); + _err("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS)); PANIC(); return 0; } @@ -191,7 +193,7 @@ static int sam_busfault(int irq, FAR void *context) static int sam_usagefault(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS)); + _err("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS)); PANIC(); return 0; } @@ -199,7 +201,7 @@ static int sam_usagefault(int irq, FAR void *context) static int sam_pendsv(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! PendSV received\n"); + _err("PANIC!!! PendSV received\n"); PANIC(); return 0; } @@ -207,7 +209,7 @@ static int sam_pendsv(int irq, FAR void *context) static int sam_dbgmonitor(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Debug Monitor received\n"); + _err("PANIC!!! Debug Monitor received\n"); PANIC(); return 0; } @@ -215,7 +217,7 @@ static int sam_dbgmonitor(int irq, FAR void *context) static int sam_reserved(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Reserved interrupt\n"); + _err("PANIC!!! Reserved interrupt\n"); PANIC(); return 0; } @@ -456,7 +458,7 @@ void up_irqinitialize(void) /* Attach all other processor exceptions (except reset and sys tick) */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES irq_attach(SAM_IRQ_NMI, sam_nmi); #ifndef CONFIG_ARM_MPU irq_attach(SAM_IRQ_MEMFAULT, up_memfault); diff --git a/arch/arm/src/sam34/sam_rtc.c b/arch/arm/src/sam34/sam_rtc.c index 8dbe4e9e1af6602dddee528887cabf0772b44745..c4c548cc9f987152aa3c23e0b31309b89e2d89a7 100644 --- a/arch/arm/src/sam34/sam_rtc.c +++ b/arch/arm/src/sam34/sam_rtc.c @@ -80,30 +80,6 @@ #define RTC_MAGIC 0xdeadbeef -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_RTC -#endif - -/* Constants ************************************************************************/ - -/* Debug ****************************************************************************/ - -#ifdef CONFIG_DEBUG_RTC -# define rtcdbg dbg -# define rtcvdbg vdbg -# define rtclldbg lldbg -# define rtcllvdbg llvdbg -#else -# define rtcdbg(x...) -# define rtcvdbg(x...) -# define rtclldbg(x...) -# define rtcllvdbg(x...) -#endif - -/************************************************************************************ - * Private Types - ************************************************************************************/ - /************************************************************************************ * Private Data ************************************************************************************/ @@ -146,19 +122,19 @@ uint32_t g_rtt_offset = 0; * ************************************************************************************/ -#ifdef CONFIG_DEBUG_RTC +#ifdef CONFIG_DEBUG_RTC_INFO static void rtc_dumpregs(FAR const char *msg) { - rtclldbg("%s:\n", msg); - rtclldbg(" CR: %08x\n", getreg32(SAM_RTC_CR)); - rtclldbg(" MR: %08x\n", getreg32(SAM_RTC_MR)); - rtclldbg(" TIMR: %08x\n", getreg32(SAM_RTC_TIMR)); - rtclldbg(" CALR: %08x\n", getreg32(SAM_RTC_CALR)); - rtclldbg(" TIMALR: %08x\n", getreg32(SAM_RTC_TIMALR)); - rtclldbg(" CALALR: %08x\n", getreg32(SAM_RTC_CALALR)); - rtclldbg(" SR: %08x\n", getreg32(SAM_RTC_SR)); - rtclldbg(" IMR: %08x\n", getreg32(SAM_RTC_IMR)); - rtclldbg(" VER: %08x\n", getreg32(SAM_RTC_VER)); + rtcinfo("%s:\n", msg); + rtcinfo(" CR: %08x\n", getreg32(SAM_RTC_CR)); + rtcinfo(" MR: %08x\n", getreg32(SAM_RTC_MR)); + rtcinfo(" TIMR: %08x\n", getreg32(SAM_RTC_TIMR)); + rtcinfo(" CALR: %08x\n", getreg32(SAM_RTC_CALR)); + rtcinfo(" TIMALR: %08x\n", getreg32(SAM_RTC_TIMALR)); + rtcinfo(" CALALR: %08x\n", getreg32(SAM_RTC_CALALR)); + rtcinfo(" SR: %08x\n", getreg32(SAM_RTC_SR)); + rtcinfo(" IMR: %08x\n", getreg32(SAM_RTC_IMR)); + rtcinfo(" VER: %08x\n", getreg32(SAM_RTC_VER)); } #else # define rtc_dumpregs(msg) @@ -178,16 +154,16 @@ static void rtc_dumpregs(FAR const char *msg) * ************************************************************************************/ -#ifdef CONFIG_DEBUG_RTC +#ifdef CONFIG_DEBUG_RTC_INFO static void rtc_dumptime(FAR struct tm *tp, FAR const char *msg) { - rtclldbg("%s:\n", msg); - rtclldbg(" tm_sec: %08x\n", tp->tm_sec); - rtclldbg(" tm_min: %08x\n", tp->tm_min); - rtclldbg(" tm_hour: %08x\n", tp->tm_hour); - rtclldbg(" tm_mday: %08x\n", tp->tm_mday); - rtclldbg(" tm_mon: %08x\n", tp->tm_mon); - rtclldbg(" tm_year: %08x\n", tp->tm_year); + rtcinfo("%s:\n", msg); + rtcinfo(" tm_sec: %08x\n", tp->tm_sec); + rtcinfo(" tm_min: %08x\n", tp->tm_min); + rtcinfo(" tm_hour: %08x\n", tp->tm_hour); + rtcinfo(" tm_mday: %08x\n", tp->tm_mday); + rtcinfo(" tm_mon: %08x\n", tp->tm_mon); + rtcinfo(" tm_year: %08x\n", tp->tm_year); } #else # define rtc_dumptime(tp, msg) @@ -298,7 +274,7 @@ static int rtc_interrupt(int irq, void *context) ret = work_queue(LPWORK, &g_alarmwork, rtc_worker, NULL, 0); if (ret < 0) { - rtclldbg("ERRPR: work_queue failed: %d\n", ret); + rtcerr("ERROR: work_queue failed: %d\n", ret); } /* Disable any further alarm interrupts */ diff --git a/arch/arm/src/sam34/sam_rtt.c b/arch/arm/src/sam34/sam_rtt.c index a0c94f7ef77e0323eafb6009fec459100fa06603..9df244cccea9fa67875b4fd01569a62e36b050ce 100644 --- a/arch/arm/src/sam34/sam_rtt.c +++ b/arch/arm/src/sam34/sam_rtt.c @@ -74,18 +74,8 @@ /* Configuration ************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the timer - * driver. NOTE: that only lldbg types are used so that the output is - * immediately available. - */ - -#ifdef CONFIG_DEBUG_RTT -# define rttdbg lldbg -# define rttvdbg llvdbg -#else -# define rttdbg(x...) -# define rttvdbg(x...) +#ifndef CONFIG_DEBUG_TIMER_INFO +# undef CONFIG_SAM34_RTT_REGDEBUG #endif /**************************************************************************** @@ -115,7 +105,7 @@ struct sam34_lowerhalf_s ****************************************************************************/ /* Register operations ******************************************************/ -#if defined(CONFIG_SAM34_RTT_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_SAM34_RTT_REGDEBUG static uint32_t sam34_getreg(uint32_t addr); static void sam34_putreg(uint32_t val, uint32_t addr); #else @@ -193,7 +183,7 @@ static inline uint32_t sam34_readvr(void) * ****************************************************************************/ -#if defined(CONFIG_SAM34_RTT_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_SAM34_RTT_REGDEBUG static uint32_t sam34_getreg(uint32_t addr) { static uint32_t prevaddr = 0; @@ -214,7 +204,7 @@ static uint32_t sam34_getreg(uint32_t addr) { if (count == 4) { - lldbg("...\n"); + tmrinfo("...\n"); } return val; @@ -231,7 +221,7 @@ static uint32_t sam34_getreg(uint32_t addr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + tmrinfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -243,7 +233,7 @@ static uint32_t sam34_getreg(uint32_t addr) /* Show the register value read */ - lldbg("%08lx->%08lx\n", addr, val); + tmrinfo("%08lx->%08lx\n", addr, val); return val; } #endif @@ -256,12 +246,12 @@ static uint32_t sam34_getreg(uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_SAM34_RTT_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_SAM34_RTT_REGDEBUG static void sam34_putreg(uint32_t val, uint32_t addr) { /* Show the register value being written */ - lldbg("%08lx<-%08lx\n", addr, val); + tmrinfo("%08lx<-%08lx\n", addr, val); /* Write the value */ @@ -287,7 +277,7 @@ static int sam34_interrupt(int irq, FAR void *context) { FAR struct sam34_lowerhalf_s *priv = &g_tcdev; - rttvdbg("Entry\n"); + tmrinfo("Entry\n"); DEBUGASSERT(irq == SAM_IRQ_RTT); /* Check if the interrupt is really pending */ @@ -373,7 +363,7 @@ static int sam34_start(FAR struct timer_lowerhalf_s *lower) uint32_t mr; uint32_t vr; - rttvdbg("Entry\n"); + tmrinfo("Entry\n"); DEBUGASSERT(priv); if (priv->started) @@ -433,7 +423,7 @@ static int sam34_start(FAR struct timer_lowerhalf_s *lower) static int sam34_stop(FAR struct timer_lowerhalf_s *lower) { FAR struct sam34_lowerhalf_s *priv = (FAR struct sam34_lowerhalf_s *)lower; - rttvdbg("Entry\n"); + tmrinfo("Entry\n"); DEBUGASSERT(priv); if (!priv->started) @@ -474,7 +464,7 @@ static int sam34_getstatus(FAR struct timer_lowerhalf_s *lower, { FAR struct sam34_lowerhalf_s *priv = (FAR struct sam34_lowerhalf_s *)lower; - rttvdbg("Entry\n"); + tmrinfo("Entry\n"); DEBUGASSERT(priv); /* Return the status bit */ @@ -498,9 +488,9 @@ static int sam34_getstatus(FAR struct timer_lowerhalf_s *lower, status->timeleft = 1000000ULL*(sam34_getreg(SAM_RTT_AR) - sam34_readvr())/RTT_FCLK; - rttvdbg(" flags : %08x\n", status->flags); - rttvdbg(" timeout : %d\n", status->timeout); - rttvdbg(" timeleft : %d\n", status->timeleft); + tmrinfo(" flags : %08x\n", status->flags); + tmrinfo(" timeout : %d\n", status->timeout); + tmrinfo(" timeleft : %d\n", status->timeleft); return OK; } @@ -526,7 +516,7 @@ static int sam34_settimeout(FAR struct timer_lowerhalf_s *lower, FAR struct sam34_lowerhalf_s *priv = (FAR struct sam34_lowerhalf_s *)lower; DEBUGASSERT(priv); - rttvdbg("Entry: timeout=%d\n", timeout); + tmrinfo("Entry: timeout=%d\n", timeout); if (priv->started) { @@ -537,7 +527,7 @@ static int sam34_settimeout(FAR struct timer_lowerhalf_s *lower, if (timeout < 1 || timeout > RTT_MAXTIMEOUT) { - rttdbg("Cannot represent timeout=%lu > %lu\n", + tmrerr("ERROR: Cannot represent timeout=%lu > %lu\n", timeout, RTT_MAXTIMEOUT); return -ERANGE; } @@ -547,7 +537,7 @@ static int sam34_settimeout(FAR struct timer_lowerhalf_s *lower, timeout = (1000000ULL * priv->clkticks) / RTT_FCLK; /* Truncated timeout */ priv->adjustment = priv->timeout - timeout; /* Truncated time to be added to next interval (dither) */ - rttvdbg("fclk=%d clkticks=%d timout=%d, adjustment=%d\n", + tmrinfo("fclk=%d clkticks=%d timout=%d, adjustment=%d\n", RTT_FCLK, priv->clkticks, priv->timeout, priv->adjustment); return OK; @@ -582,7 +572,7 @@ static tccb_t sam34_sethandler(FAR struct timer_lowerhalf_s *lower, flags = enter_critical_section(); DEBUGASSERT(priv); - rttvdbg("Entry: handler=%p\n", handler); + tmrinfo("Entry: handler=%p\n", handler); /* Get the old handler return value */ @@ -623,7 +613,7 @@ static int sam34_ioctl(FAR struct timer_lowerhalf_s *lower, int cmd, int ret = -ENOTTY; DEBUGASSERT(priv); - rttvdbg("Entry: cmd=%d arg=%ld\n", cmd, arg); + tmrinfo("Entry: cmd=%d arg=%ld\n", cmd, arg); UNUSED(priv); return ret; @@ -653,7 +643,7 @@ void sam_rttinitialize(FAR const char *devpath) { FAR struct sam34_lowerhalf_s *priv = &g_tcdev; - rttvdbg("Entry: devpath=%s\n", devpath); + tmrinfo("Entry: devpath=%s\n", devpath); /* Initialize the driver state structure. Here we assume: (1) the state * structure lies in .bss and was zeroed at reset time. (2) This function diff --git a/arch/arm/src/sam34/sam_spi.c b/arch/arm/src/sam34/sam_spi.c index 424d9218449e6f8185d098442a54e03398f7c69c..4b7f1dba7e8b4a3e23be10979bacfb241a0ee33d 100644 --- a/arch/arm/src/sam34/sam_spi.c +++ b/arch/arm/src/sam34/sam_spi.c @@ -102,7 +102,11 @@ # endif #endif -#ifndef CONFIG_SAM34_SPI_DMA +#ifndef CONFIG_DEBUG_SPI_INFO +# undef CONFIG_SAM34_SPI_REGDEBUG +#endif + +#ifndef CONFIG_DEBUG_DMA_INFO # undef CONFIG_SAM34_SPI_DMADEBUG #endif @@ -132,31 +136,10 @@ #define DMA_TIMEOUT_TICKS MSEC2TICK(DMA_TIMEOUT_MS) /* Debug *******************************************************************/ -/* Check if SPI debut is enabled (non-standard.. no support in - * include/debug.h - */ +/* Check if SPI debut is enabled */ -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_SPI +#ifndef CONFIG_DEBUG_DMA_INFO # undef CONFIG_SAM34_SPI_DMADEBUG -# undef CONFIG_SAM34_SPI_REGDEBUG -#endif - -#ifndef CONFIG_DEBUG_DMA -# undef CONFIG_SAM34_SPI_DMADEBUG -#endif - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) #endif #define DMA_INITIAL 0 @@ -252,7 +235,7 @@ static inline void spi_putreg(struct sam_spidev_s *spi, uint32_t value, unsigned int offset); static inline struct sam_spidev_s *spi_device(struct sam_spics_s *spics); -#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_SPI_INFO static void spi_dumpregs(struct sam_spidev_s *spi, const char *msg); #else # define spi_dumpregs(spi,msg) @@ -441,7 +424,7 @@ static bool spi_checkreg(struct sam_spidev_s *spi, bool wr, uint32_t value, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", spi->ntimes); + spiinfo("...[Repeats %d times]...\n", spi->ntimes); } /* Save information about the new access */ @@ -475,7 +458,7 @@ static inline uint32_t spi_getreg(struct sam_spidev_s *spi, #ifdef CONFIG_SAM34_SPI_REGDEBUG if (spi_checkreg(spi, false, value, address)) { - lldbg("%08x->%08x\n", address, value); + spiinfo("%08x->%08x\n", address, value); } #endif @@ -498,7 +481,7 @@ static inline void spi_putreg(struct sam_spidev_s *spi, uint32_t value, #ifdef CONFIG_SAM34_SPI_REGDEBUG if (spi_checkreg(spi, true, value, address)) { - lldbg("%08x<-%08x\n", address, value); + spiinfo("%08x<-%08x\n", address, value); } #endif @@ -520,20 +503,20 @@ static inline void spi_putreg(struct sam_spidev_s *spi, uint32_t value, * ****************************************************************************/ -#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_SPI_INFO static void spi_dumpregs(struct sam_spidev_s *spi, const char *msg) { - spivdbg("%s:\n", msg); - spivdbg(" MR:%08x SR:%08x IMR:%08x\n", + spiinfo("%s:\n", msg); + spiinfo(" MR:%08x SR:%08x IMR:%08x\n", getreg32(spi->base + SAM_SPI_MR_OFFSET), getreg32(spi->base + SAM_SPI_SR_OFFSET), getreg32(spi->base + SAM_SPI_IMR_OFFSET)); - spivdbg(" CSR0:%08x CSR1:%08x CSR2:%08x CSR3:%08x\n", + spiinfo(" CSR0:%08x CSR1:%08x CSR2:%08x CSR3:%08x\n", getreg32(spi->base + SAM_SPI_CSR0_OFFSET), getreg32(spi->base + SAM_SPI_CSR1_OFFSET), getreg32(spi->base + SAM_SPI_CSR2_OFFSET), getreg32(spi->base + SAM_SPI_CSR3_OFFSET)); - spivdbg(" WPCR:%08x WPSR:%08x\n", + spiinfo(" WPCR:%08x WPSR:%08x\n", getreg32(spi->base + SAM_SPI_WPCR_OFFSET), getreg32(spi->base + SAM_SPI_WPSR_OFFSET)); } @@ -893,7 +876,7 @@ static int spi_lock(struct spi_dev_s *dev, bool lock) struct sam_spics_s *spics = (struct sam_spics_s *)dev; struct sam_spidev_s *spi = spi_device(spics); - spivdbg("lock=%d\n", lock); + spiinfo("lock=%d\n", lock); if (lock) { /* Take the semaphore (perhaps waiting) */ @@ -941,10 +924,10 @@ static void spi_select(struct spi_dev_s *dev, enum spi_dev_e devid, /* Are we selecting or de-selecting the device? */ - spivdbg("selected=%d\n", selected); + spiinfo("selected=%d\n", selected); if (selected) { - spivdbg("cs=%d\n", spics->cs); + spiinfo("cs=%d\n", spics->cs); /* Before writing the TDR, the PCS field in the SPI_MR register must be set * in order to select a slave. @@ -999,7 +982,7 @@ static uint32_t spi_setfrequency(struct spi_dev_s *dev, uint32_t frequency) uint32_t regval; unsigned int offset; - spivdbg("cs=%d frequency=%d\n", spics->cs, frequency); + spiinfo("cs=%d frequency=%d\n", spics->cs, frequency); /* Check if the requested frequency is the same as the frequency selection */ @@ -1069,14 +1052,14 @@ static uint32_t spi_setfrequency(struct spi_dev_s *dev, uint32_t frequency) /* Calculate the new actual frequency */ actual = SAM_SPI_CLOCK / scbr; - spivdbg("csr[offset=%02x]=%08x actual=%d\n", offset, regval, actual); + spiinfo("csr[offset=%02x]=%08x actual=%d\n", offset, regval, actual); /* Save the frequency setting */ spics->frequency = frequency; spics->actual = actual; - spidbg("Frequency %d->%d\n", frequency, actual); + spiinfo("Frequency %d->%d\n", frequency, actual); return actual; } @@ -1102,7 +1085,7 @@ static void spi_setmode(struct spi_dev_s *dev, enum spi_mode_e mode) uint32_t regval; unsigned int offset; - spivdbg("cs=%d mode=%d\n", spics->cs, mode); + spiinfo("cs=%d mode=%d\n", spics->cs, mode); /* Has the mode changed? */ @@ -1145,7 +1128,7 @@ static void spi_setmode(struct spi_dev_s *dev, enum spi_mode_e mode) } spi_putreg(spi, regval, offset); - spivdbg("csr[offset=%02x]=%08x\n", offset, regval); + spiinfo("csr[offset=%02x]=%08x\n", offset, regval); /* Save the mode so that subsequent re-configurations will be faster */ @@ -1175,7 +1158,7 @@ static void spi_setbits(struct spi_dev_s *dev, int nbits) uint32_t regval; unsigned int offset; - spivdbg("cs=%d nbits=%d\n", spics->cs, nbits); + spiinfo("cs=%d nbits=%d\n", spics->cs, nbits); DEBUGASSERT(spics && nbits > 7 && nbits < 17); /* Has the number of bits changed? */ @@ -1190,7 +1173,7 @@ static void spi_setbits(struct spi_dev_s *dev, int nbits) regval |= SPI_CSR_BITS(nbits); spi_putreg(spi, regval, offset); - spivdbg("csr[offset=%02x]=%08x\n", offset, regval); + spiinfo("csr[offset=%02x]=%08x\n", offset, regval); /* Save the selection so the subsequence re-configurations will be faster */ @@ -1228,7 +1211,7 @@ static uint16_t spi_send(struct spi_dev_s *dev, uint16_t wd) rxbyte = (uint8_t)0; spi_exchange(dev, &txbyte, &rxbyte, 1); - spivdbg("Sent %02x received %02x\n", txbyte, rxbyte); + spiinfo("Sent %02x received %02x\n", txbyte, rxbyte); return (uint16_t)rxbyte; } @@ -1276,7 +1259,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, uint8_t *rxptr8; uint8_t *txptr8; - spivdbg("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); + spiinfo("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); /* Set up PCS bits */ @@ -1422,7 +1405,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, return; } - spivdbg("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); + spiinfo("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); spics = (struct sam_spics_s *)dev; spi = spi_device(spics); @@ -1543,7 +1526,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, ret = sam_dmarxsetup(spics->rxdma, regaddr, memaddr, nwords); if (ret < 0) { - dmadbg("ERROR: sam_dmarxsetup failed: %d\n", ret); + dmaerr("ERROR: sam_dmarxsetup failed: %d\n", ret); return; } @@ -1557,7 +1540,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, ret = sam_dmatxsetup(spics->txdma, regaddr, memaddr, nwords); if (ret < 0) { - dmadbg("ERROR: sam_dmatxsetup failed: %d\n", ret); + dmaerr("ERROR: sam_dmatxsetup failed: %d\n", ret); return; } @@ -1569,7 +1552,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, ret = sam_dmastart(spics->rxdma, spi_rxcallback, (void *)spics); if (ret < 0) { - dmadbg("ERROR: RX sam_dmastart failed: %d\n", ret); + dmaerr("ERROR: RX sam_dmastart failed: %d\n", ret); return; } @@ -1578,7 +1561,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, ret = sam_dmastart(spics->txdma, spi_txcallback, (void *)spics); if (ret < 0) { - dmadbg("ERROR: RX sam_dmastart failed: %d\n", ret); + dmaerr("ERROR: RX sam_dmastart failed: %d\n", ret); sam_dmastop(spics->rxdma); return; } @@ -1600,7 +1583,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, (wdentry_t)spi_dmatimeout, 1, (uint32_t)spics); if (ret != OK) { - spidbg("ERROR: wd_start failed: %d\n", ret); + spierr("ERROR: wd_start failed: %d\n", ret); } /* Wait for the DMA complete */ @@ -1651,7 +1634,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, if (spics->result) { - spidbg("ERROR: DMA failed with result: %d\n", spics->result); + spierr("ERROR: DMA failed with result: %d\n", spics->result); } } #endif /* CONFIG_SAM34_SPI_DMA */ @@ -1745,7 +1728,7 @@ struct spi_dev_s *sam_spibus_initialize(int port) /* The support SAM parts have only a single SPI port */ - spivdbg("port: %d csno: %d spino: %d\n", port, csno, spino); + spiinfo("port: %d csno: %d spino: %d\n", port, csno, spino); DEBUGASSERT(csno >= 0 && csno <= SAM_SPI_NCS); #if defined(CONFIG_SAM34_SPI0) && defined(CONFIG_SAM34_SPI1) @@ -1764,7 +1747,7 @@ struct spi_dev_s *sam_spibus_initialize(int port) spics = (struct sam_spics_s *)zalloc(sizeof(struct sam_spics_s)); if (!spics) { - spidbg("ERROR: Failed to allocate a chip select structure\n"); + spierr("ERROR: Failed to allocate a chip select structure\n"); return NULL; } @@ -1787,7 +1770,7 @@ struct spi_dev_s *sam_spibus_initialize(int port) spics->rxdma = sam_dmachannel(0); if (!spics->rxdma) { - spidbg("ERROR: Failed to allocate the RX DMA channel\n"); + spierr("ERROR: Failed to allocate the RX DMA channel\n"); spics->candma = false; } } @@ -1797,7 +1780,7 @@ struct spi_dev_s *sam_spibus_initialize(int port) spics->txdma = sam_dmachannel(0); if (!spics->txdma) { - spidbg("ERROR: Failed to allocate the TX DMA channel\n"); + spierr("ERROR: Failed to allocate the TX DMA channel\n"); sam_dmafree(spics->rxdma); spics->rxdma = NULL; spics->candma = false; @@ -1924,7 +1907,7 @@ struct spi_dev_s *sam_spibus_initialize(int port) spi_putreg(spi, regval, offset); spics->nbits = 8; - spivdbg("csr[offset=%02x]=%08x\n", offset, regval); + spiinfo("csr[offset=%02x]=%08x\n", offset, regval); return &spics->spidev; } diff --git a/arch/arm/src/sam34/sam_start.c b/arch/arm/src/sam34/sam_start.c index dc1d449808ab653ad2d43a1d5730a745c740451b..abae1da7615ee1040fe70e7d33fd8d480ce86b1f 100644 --- a/arch/arm/src/sam34/sam_start.c +++ b/arch/arm/src/sam34/sam_start.c @@ -88,7 +88,7 @@ void __start(void) __attribute__ ((no_instrument_function)); * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES # define showprogress(c) up_lowputc(c) #else # define showprogress(c) diff --git a/arch/arm/src/sam34/sam_tc.c b/arch/arm/src/sam34/sam_tc.c index a95fa495273d1f392a2491705ea48ec45f254790..369aa7323a5e079a99db7e228fdd083be0a951f8 100644 --- a/arch/arm/src/sam34/sam_tc.c +++ b/arch/arm/src/sam34/sam_tc.c @@ -63,6 +63,12 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ + +#ifndef CONFIG_DEBUG_TIMER_INFO +# undef CONFIG_SAM34_TC_REGDEBUG +#endif + /* Clocking *****************************************************************/ /* TODO: Allow selection of any of the input clocks */ @@ -70,22 +76,6 @@ #define TC_FCLK (BOARD_SCLK_FREQUENCY) #define TC_MAXTIMEOUT ((1000000ULL * (1ULL + TC_RVALUE_MASK)) / TC_FCLK) -/* Configuration ************************************************************/ - -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the timer - * driver. NOTE: that only lldbg types are used so that the output is - * immediately available. - */ - -#ifdef CONFIG_DEBUG_TIMER -# define tcdbg lldbg -# define tcvdbg llvdbg -#else -# define tcdbg(x...) -# define tcvdbg(x...) -#endif - /**************************************************************************** * Private Types ****************************************************************************/ @@ -114,7 +104,7 @@ struct sam34_lowerhalf_s ****************************************************************************/ /* Register operations ******************************************************/ -#if defined(CONFIG_SAM34_TC_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_SAM34_TC_REGDEBUG static uint32_t sam34_getreg(uint32_t addr); static void sam34_putreg(uint32_t val, uint32_t addr); #else @@ -174,7 +164,7 @@ static struct sam34_lowerhalf_s g_tcdevs[6]; * ****************************************************************************/ -#if defined(CONFIG_SAM34_TC_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_SAM34_TC_REGDEBUG static uint32_t sam34_getreg(uint32_t addr) { static uint32_t prevaddr = 0; @@ -195,7 +185,7 @@ static uint32_t sam34_getreg(uint32_t addr) { if (count == 4) { - lldbg("...\n"); + tmrinfo("...\n"); } return val; @@ -212,7 +202,7 @@ static uint32_t sam34_getreg(uint32_t addr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + tmrinfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -224,7 +214,7 @@ static uint32_t sam34_getreg(uint32_t addr) /* Show the register value read */ - lldbg("%08lx->%08lx\n", addr, val); + tmrinfo("%08lx->%08lx\n", addr, val); return val; } #endif @@ -237,12 +227,12 @@ static uint32_t sam34_getreg(uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_SAM34_TC_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_SAM34_TC_REGDEBUG static void sam34_putreg(uint32_t val, uint32_t addr) { /* Show the register value being written */ - lldbg("%08lx<-%08lx\n", addr, val); + tmrinfo("%08lx<-%08lx\n", addr, val); /* Write the value */ @@ -268,7 +258,7 @@ static int sam34_interrupt(int irq, FAR void *context) { FAR struct sam34_lowerhalf_s *priv = &g_tcdevs[irq-SAM_IRQ_TC0]; - tcvdbg("Entry\n"); + tmrinfo("Entry\n"); DEBUGASSERT((irq >= SAM_IRQ_TC0) && (irq <= SAM_IRQ_TC5)); /* Check if the interrupt is really pending */ @@ -299,7 +289,7 @@ static int sam34_interrupt(int irq, FAR void *context) /* No handler or the handler returned false.. stop the timer */ sam34_stop((FAR struct timer_lowerhalf_s *)priv); - tcvdbg("Stopped\n"); + tmrinfo("Stopped\n"); } /* TC_INT_CPCS is cleared by reading SAM_TCx_SR */ @@ -328,7 +318,7 @@ static int sam34_start(FAR struct timer_lowerhalf_s *lower) FAR struct sam34_lowerhalf_s *priv = (FAR struct sam34_lowerhalf_s *)lower; uint32_t mr_val; - tcvdbg("Entry\n"); + tmrinfo("Entry\n"); DEBUGASSERT(priv); if (priv->started) @@ -382,7 +372,7 @@ static int sam34_start(FAR struct timer_lowerhalf_s *lower) static int sam34_stop(FAR struct timer_lowerhalf_s *lower) { FAR struct sam34_lowerhalf_s *priv = (FAR struct sam34_lowerhalf_s *)lower; - tcvdbg("Entry\n"); + tmrinfo("Entry\n"); DEBUGASSERT(priv); if (!priv->started) @@ -421,7 +411,7 @@ static int sam34_getstatus(FAR struct timer_lowerhalf_s *lower, FAR struct sam34_lowerhalf_s *priv = (FAR struct sam34_lowerhalf_s *)lower; uint32_t elapsed; - tcvdbg("Entry\n"); + tmrinfo("Entry\n"); DEBUGASSERT(priv); /* Return the status bit */ @@ -446,9 +436,9 @@ static int sam34_getstatus(FAR struct timer_lowerhalf_s *lower, elapsed = sam34_getreg(priv->base + SAM_TC_CV_OFFSET); status->timeleft = ((uint64_t)priv->timeout * elapsed) / (priv->clkticks + 1); /* TODO - check on this +1 */ - tcvdbg(" flags : %08x\n", status->flags); - tcvdbg(" timeout : %d\n", status->timeout); - tcvdbg(" timeleft : %d\n", status->timeleft); + tmrinfo(" flags : %08x\n", status->flags); + tmrinfo(" timeout : %d\n", status->timeout); + tmrinfo(" timeleft : %d\n", status->timeleft); return OK; } @@ -480,14 +470,14 @@ static int sam34_settimeout(FAR struct timer_lowerhalf_s *lower, return -EPERM; } - tcvdbg("Entry: timeout=%d\n", timeout); + tmrinfo("Entry: timeout=%d\n", timeout); /* Can this timeout be represented? */ if (timeout < 1 || timeout > TC_MAXTIMEOUT) { - tcdbg("Cannot represent timeout=%lu > %lu\n", - timeout, TC_MAXTIMEOUT); + tmrerr("ERROR: Cannot represent timeout=%lu > %lu\n", + timeout, TC_MAXTIMEOUT); return -ERANGE; } @@ -496,8 +486,8 @@ static int sam34_settimeout(FAR struct timer_lowerhalf_s *lower, timeout = (1000000ULL * priv->clkticks) / TC_FCLK; /* Truncated timeout */ priv->adjustment = priv->timeout - timeout; /* Truncated time to be added to next interval (dither) */ - tcvdbg("fclk=%d clkticks=%d timout=%d, adjustment=%d\n", - TC_FCLK, priv->clkticks, priv->timeout, priv->adjustment); + tmrinfo("fclk=%d clkticks=%d timout=%d, adjustment=%d\n", + TC_FCLK, priv->clkticks, priv->timeout, priv->adjustment); return OK; } @@ -531,7 +521,7 @@ static tccb_t sam34_sethandler(FAR struct timer_lowerhalf_s *lower, flags = enter_critical_section(); DEBUGASSERT(priv); - tcvdbg("Entry: handler=%p\n", handler); + tmrinfo("Entry: handler=%p\n", handler); /* Get the old handler return value */ @@ -572,7 +562,7 @@ static int sam34_ioctl(FAR struct timer_lowerhalf_s *lower, int cmd, int ret = -ENOTTY; DEBUGASSERT(priv); - tcvdbg("Entry: cmd=%d arg=%ld\n", cmd, arg); + tmrinfo("Entry: cmd=%d arg=%ld\n", cmd, arg); UNUSED(priv); return ret; @@ -602,7 +592,7 @@ void sam_tcinitialize(FAR const char *devpath, int irq) { FAR struct sam34_lowerhalf_s *priv = &g_tcdevs[irq-SAM_IRQ_TC0]; - tcvdbg("Entry: devpath=%s\n", devpath); + tmrinfo("Entry: devpath=%s\n", devpath); DEBUGASSERT((irq >= SAM_IRQ_TC0) && (irq <= SAM_IRQ_TC5)); /* Initialize the driver state structure. Here we assume: (1) the state diff --git a/arch/arm/src/sam34/sam_twi.c b/arch/arm/src/sam34/sam_twi.c index f8c2f7f7caf6af014b1f80c981bcf5eea08b9752..6e4aae14271885d3f60bc02d3dfbfb9ba829e79d 100644 --- a/arch/arm/src/sam34/sam_twi.c +++ b/arch/arm/src/sam34/sam_twi.c @@ -85,6 +85,10 @@ # define CONFIG_SAM34_TWI1_FREQUENCY 100000 #endif +#ifndef CONFIG_DEBUG_I2C_INFO +# undef CONFIG_SAM34_TWI_REGDEBUG +#endif + /* Driver internal definitions *************************************************/ #define TWI_TIMEOUT ((100 * CLK_TCK) / 1000) /* 100 mS */ @@ -95,21 +99,6 @@ #define TWI_MAX_FREQUENCY 66000000 /* Maximum TWI frequency */ -/* Debug ***********************************************************************/ -/* CONFIG_DEBUG_I2C + CONFIG_DEBUG enables general I2C debug output. */ - -#ifdef CONFIG_DEBUG_I2C -# define i2cdbg dbg -# define i2cvdbg vdbg -# define i2clldbg lldbg -# define i2cllvdbg llvdbg -#else -# define i2cdbg(x...) -# define i2cvdbg(x...) -# define i2clldbg(x...) -# define i2cllvdbg(x...) -#endif - /**************************************************************************** * Private Types ****************************************************************************/ @@ -288,7 +277,7 @@ static bool twi_checkreg(struct twi_dev_s *priv, bool wr, uint32_t value, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", priv->ntimes); + i2cinfo("...[Repeats %d times]...\n", priv->ntimes); } /* Save information about the new access */ @@ -320,7 +309,7 @@ static uint32_t twi_getabs(struct twi_dev_s *priv, uintptr_t address) if (twi_checkreg(priv, false, value, address)) { - lldbg("%08x->%08x\n", address, value); + i2cinfo("%08x->%08x\n", address, value); } return value; @@ -341,7 +330,7 @@ static void twi_putabs(struct twi_dev_s *priv, uintptr_t address, { if (twi_checkreg(priv, true, value, address)) { - lldbg("%08x<-%08x\n", address, value); + i2cinfo("%08x<-%08x\n", address, value); } putreg32(value, address); @@ -401,9 +390,9 @@ static int twi_wait(struct twi_dev_s *priv) do { - i2clldbg("TWI%d Waiting...\n", priv->twi); + i2cinfo("TWI%d Waiting...\n", priv->twi); twi_takesem(&priv->waitsem); - i2clldbg("TWI%d Awakened with result: %d\n", priv->twi, priv->result); + i2cinfo("TWI%d Awakened with result: %d\n", priv->twi, priv->result); } while (priv->result == -EBUSY); @@ -460,7 +449,7 @@ static int twi_interrupt(struct twi_dev_s *priv) imr = twi_getrel(priv, SAM_TWI_IMR_OFFSET); pending = sr & imr; - i2cllvdbg("TWI%d pending: %08x\n", priv->twi, pending); + i2cinfo("TWI%d pending: %08x\n", priv->twi, pending); msg = priv->msg; @@ -470,7 +459,7 @@ static int twi_interrupt(struct twi_dev_s *priv) { /* Wake up the thread with an I/O error indication */ - i2clldbg("ERROR: TWI%d pending: %08x\n", priv->twi, pending); + i2cerr("ERROR: TWI%d pending: %08x\n", priv->twi, pending); twi_wakeup(priv, -EIO); } @@ -593,7 +582,7 @@ static void twi_timeout(int argc, uint32_t arg, ...) { struct twi_dev_s *priv = (struct twi_dev_s *)arg; - i2clldbg("TWI%d Timeout!\n", priv->twi); + i2cerr("ERROR: TWI%d Timeout!\n", priv->twi); twi_wakeup(priv, -ETIMEDOUT); } @@ -708,7 +697,7 @@ static int twi_transfer(FAR struct i2c_master_s *dev, int ret; DEBUGASSERT(dev != NULL); - i2cvdbg("TWI%d count: %d\n", priv->twi, count); + i2cinfo("TWI%d count: %d\n", priv->twi, count); /* Get exclusive access to the device */ @@ -742,7 +731,7 @@ static int twi_transfer(FAR struct i2c_master_s *dev, ret = twi_wait(priv); if (ret < 0) { - i2cdbg("ERROR: Transfer failed: %d\n", ret); + i2cerr("ERROR: Transfer failed: %d\n", ret); } leave_critical_section(flags); @@ -842,7 +831,7 @@ static void twi_hw_initialize(struct twi_dev_s *priv, unsigned int pid, uint32_t mck; #endif - i2cvdbg("TWI%d Initializing\n", priv->twi); + i2cinfo("TWI%d Initializing\n", priv->twi); /* SVEN: TWI Slave Mode Enabled */ @@ -925,7 +914,7 @@ struct i2c_master_s *sam_i2cbus_initialize(int bus) uint32_t frequency; unsigned int pid; - i2cvdbg("Initializing TWI%d\n", bus); + i2cinfo("Initializing TWI%d\n", bus); flags = enter_critical_section(); @@ -985,7 +974,7 @@ struct i2c_master_s *sam_i2cbus_initialize(int bus) #endif { leave_critical_section(flags); - i2cdbg("ERROR: Unsupported bus: TWI%d\n", bus); + i2cerr("ERROR: Unsupported bus: TWI%d\n", bus); return NULL; } @@ -1029,7 +1018,7 @@ int sam_i2cbus_uninitialize(FAR struct i2c_master_s * dev) { struct twi_dev_s *priv = (struct twi_dev_s *) dev; - i2cvdbg("TWI%d Un-initializing\n", priv->twi); + i2cinfo("TWI%d Un-initializing\n", priv->twi); /* Disable interrupts */ diff --git a/arch/arm/src/sam34/sam_udp.c b/arch/arm/src/sam34/sam_udp.c index 0a74f5ba243bdaaddb41da57dc7ac2d50296e472..6fe76f4f57b3b5e851ff96ce00a90d8af798bbfe 100644 --- a/arch/arm/src/sam34/sam_udp.c +++ b/arch/arm/src/sam34/sam_udp.c @@ -90,7 +90,7 @@ * enabled. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_USB # undef CONFIG_SAM34_UDP_REGDEBUG #endif @@ -606,7 +606,7 @@ const struct trace_msg_t g_usb_trace_strings_intdecode[] = #ifdef CONFIG_SAM34_UDP_REGDEBUG static void sam_printreg(uintptr_t regaddr, uint32_t regval, bool iswrite) { - lldbg("%p%s%08x\n", regaddr, iswrite ? "<-" : "->", regval); + _info("%p%s%08x\n", regaddr, iswrite ? "<-" : "->", regval); } #endif @@ -657,7 +657,7 @@ static void sam_checkreg(uintptr_t regaddr, uint32_t regval, bool iswrite) { /* No.. More than one. */ - lldbg("[repeats %d more times]\n", count); + _info("[repeats %d more times]\n", count); } } @@ -732,20 +732,20 @@ static inline void sam_putreg(uint32_t regval, uint32_t regaddr) * Name: sam_dumpep ****************************************************************************/ -#if defined(CONFIG_SAM34_UDP_REGDEBUG) && defined(CONFIG_DEBUG) +#if defined(CONFIG_SAM34_UDP_REGDEBUG) && defined(CONFIG_DEBUG_USB) static void sam_dumpep(struct sam_usbdev_s *priv, uint8_t epno) { /* Global Registers */ - lldbg("Global Registers:\n"); - lldbg(" FRMNUM: %08x\n", sam_getreg(SAM_UDP_FRMNUM)); - lldbg("GLBSTAT: %08x\n", sam_getreg(SAM_UDP_GLBSTAT)); - lldbg(" FADDR: %08x\n", sam_getreg(SAM_UDP_FADDR)); - lldbg(" IMR: %08x\n", sam_getreg(SAM_UDP_IMR)); - lldbg(" ISR: %08x\n", sam_getreg(SAM_UDP_ISR)); - lldbg(" RSTEP: %08x\n", sam_getreg(SAM_UDP_RSTEP)); - lldbg(" TXVC: %08x\n", sam_getreg(SAM_UDP_TXVC)); - lldbg(" CSR[%d]: %08x\n", epno, sam_getreg(SAM_UDPEP_CSR(epno))); + _info("Global Registers:\n"); + _info(" FRMNUM: %08x\n", sam_getreg(SAM_UDP_FRMNUM)); + _info("GLBSTAT: %08x\n", sam_getreg(SAM_UDP_GLBSTAT)); + _info(" FADDR: %08x\n", sam_getreg(SAM_UDP_FADDR)); + _info(" IMR: %08x\n", sam_getreg(SAM_UDP_IMR)); + _info(" ISR: %08x\n", sam_getreg(SAM_UDP_ISR)); + _info(" RSTEP: %08x\n", sam_getreg(SAM_UDP_RSTEP)); + _info(" TXVC: %08x\n", sam_getreg(SAM_UDP_TXVC)); + _info(" CSR[%d]: %08x\n", epno, sam_getreg(SAM_UDPEP_CSR(epno))); } #endif @@ -968,9 +968,9 @@ static int sam_req_write(struct sam_usbdev_s *priv, struct sam_ep_s *privep) return -ENOENT; } - ullvdbg("epno=%d req=%p: len=%d xfrd=%d inflight=%d zlpneeded=%d\n", - epno, privreq, privreq->req.len, privreq->req.xfrd, - privreq->inflight, privep->zlpneeded); + uinfo("epno=%d req=%p: len=%d xfrd=%d inflight=%d zlpneeded=%d\n", + epno, privreq, privreq->req.len, privreq->req.xfrd, + privreq->inflight, privep->zlpneeded); /* Handle any bytes in flight. */ @@ -1139,8 +1139,8 @@ static int sam_req_read(struct sam_usbdev_s *priv, struct sam_ep_s *privep, return -ENOENT; } - ullvdbg("EP%d: len=%d xfrd=%d\n", - epno, privreq->req.len, privreq->req.xfrd); + uinfo("EP%d: len=%d xfrd=%d\n", + epno, privreq->req.len, privreq->req.xfrd); /* Ignore any attempt to receive a zero length packet */ @@ -1408,8 +1408,8 @@ static void sam_ep0_setup(struct sam_usbdev_s *priv) index.w = GETUINT16(priv->ctrl.index); len.w = GETUINT16(priv->ctrl.len); - ullvdbg("SETUP: type=%02x req=%02x value=%04x index=%04x len=%04x\n", - priv->ctrl.type, priv->ctrl.req, value.w, index.w, len.w); + uinfo("SETUP: type=%02x req=%02x value=%04x index=%04x len=%04x\n", + priv->ctrl.type, priv->ctrl.req, value.w, index.w, len.w); /* Dispatch any non-standard requests */ @@ -1572,7 +1572,7 @@ static void sam_ep0_setup(struct sam_usbdev_s *priv) { /* Special case recipient=device test mode */ - ullvdbg("test mode: %d\n", index.w); + uinfo("test mode: %d\n", index.w); } else if ((priv->ctrl.type & USB_REQ_RECIPIENT_MASK) != USB_REQ_RECIPIENT_ENDPOINT) { @@ -2749,7 +2749,7 @@ static int sam_ep_configure_internal(struct sam_ep_s *privep, DEBUGASSERT(privep && privep->dev && desc); - uvdbg("len: %02x type: %02x addr: %02x attr: %02x " + uinfo("len: %02x type: %02x addr: %02x attr: %02x " "maxpacketsize: %02x %02x interval: %02x\n", desc->len, desc->type, desc->addr, desc->attr, desc->mxpacketsize[0], desc->mxpacketsize[1], @@ -2891,7 +2891,7 @@ static int sam_ep_configure(struct usbdev_ep_s *ep, /* Verify parameters. Endpoint 0 is not available at this interface */ -#if defined(CONFIG_DEBUG) || defined(CONFIG_USBDEV_TRACE) +#if defined(CONFIG_DEBUG_USB) || defined(CONFIG_USBDEV_TRACE) uint8_t epno = USB_EPNO(desc->addr); usbtrace(TRACE_EPCONFIGURE, (uint16_t)epno); @@ -2942,11 +2942,11 @@ static int sam_ep_disable(struct usbdev_ep_s *ep) irqstate_t flags; uint8_t epno; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!ep) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); - ulldbg("ERROR: ep=%p\n", ep); + uerr("ERROR: ep=%p\n", ep); return -EINVAL; } #endif @@ -2979,13 +2979,14 @@ static struct usbdev_req_s *sam_ep_allocreq(struct usbdev_ep_s *ep) { struct sam_req_s *privreq; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!ep) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); return NULL; } #endif + usbtrace(TRACE_EPALLOCREQ, USB_EPNO(ep->eplog)); privreq = (struct sam_req_s *)kmm_malloc(sizeof(struct sam_req_s)); @@ -3011,7 +3012,7 @@ static void sam_ep_freereq(struct usbdev_ep_s *ep, struct usbdev_req_s *req) { struct sam_req_s *privreq = (struct sam_req_s *)req; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!ep || !req) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); @@ -3074,11 +3075,12 @@ static int sam_ep_submit(struct usbdev_ep_s *ep, struct usbdev_req_s *req) uint8_t epno; int ret = OK; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!req || !req->callback || !req->buf || !ep) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); - ulldbg("ERROR: req=%p callback=%p buf=%p ep=%p\n", req, req->callback, req->buf, ep); + uerr("ERROR: req=%p callback=%p buf=%p ep=%p\n", + req, req->callback, req->buf, ep); return -EINVAL; } #endif @@ -3086,11 +3088,11 @@ static int sam_ep_submit(struct usbdev_ep_s *ep, struct usbdev_req_s *req) usbtrace(TRACE_EPSUBMIT, USB_EPNO(ep->eplog)); priv = privep->dev; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!priv->driver) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_NOTCONFIGURED), priv->usbdev.speed); - ulldbg("ERROR: driver=%p\n", priv->driver); + uerr("ERROR: driver=%p\n", priv->driver); return -ESHUTDOWN; } #endif @@ -3114,11 +3116,11 @@ static int sam_ep_submit(struct usbdev_ep_s *ep, struct usbdev_req_s *req) if (privep->stalled || privep->pending) { - /* Yes.. in this case, save the new they will get in a special - * "pending" they will get queue until the stall is cleared. + /* Yes.. in this case, save the request in a special "pending" + * queue. They will stay queuee until the stall is cleared. */ - ulldbg("Pending stall clear\n"); + uinfo("Pending stall clear\n"); sam_req_enqueue(&privep->pendq, privreq); usbtrace(TRACE_INREQQUEUED(epno), req->len); ret = OK; @@ -3182,13 +3184,14 @@ static int sam_ep_cancel(struct usbdev_ep_s *ep, struct usbdev_req_s *req) struct sam_ep_s *privep = (struct sam_ep_s *)ep; irqstate_t flags; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!ep || !req) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); return -EINVAL; } #endif + usbtrace(TRACE_EPCANCEL, USB_EPNO(ep->eplog)); flags = enter_critical_section(); @@ -3208,7 +3211,7 @@ static int sam_ep_stallresume(struct usbdev_ep_s *ep, bool resume) irqstate_t flags; int ret; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!ep) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); @@ -3283,7 +3286,8 @@ static struct usbdev_ep_s *sam_allocep(struct usbdev_s *dev, uint8_t epno, uint16_t epset = SAM_EPSET_NOTEP0; usbtrace(TRACE_DEVALLOCEP, (uint16_t)epno); -#ifdef CONFIG_DEBUG + +#ifdef CONFIG_DEBUG_USB if (!dev) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); @@ -3345,13 +3349,14 @@ static void sam_freeep(struct usbdev_s *dev, struct usbdev_ep_s *ep) struct sam_usbdev_s *priv; struct sam_ep_s *privep; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!dev || !ep) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); return; } #endif + priv = (struct sam_usbdev_s *)dev; privep = (struct sam_ep_s *)ep; usbtrace(TRACE_DEVFREEEP, (uint16_t)USB_EPNO(ep->eplog)); @@ -3377,7 +3382,7 @@ static int sam_getframe(struct usbdev_s *dev) uint32_t regval; uint16_t frameno; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!dev) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); @@ -3409,7 +3414,8 @@ static int sam_wakeup(struct usbdev_s *dev) uint32_t regval; usbtrace(TRACE_DEVWAKEUP, 0); -#ifdef CONFIG_DEBUG + +#ifdef CONFIG_DEBUG_USB if (!dev) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); @@ -3480,7 +3486,7 @@ static int sam_selfpowered(struct usbdev_s *dev, bool selfpowered) usbtrace(TRACE_DEVSELFPOWERED, (uint16_t)selfpowered); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!dev) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); @@ -3926,7 +3932,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) usbtrace(TRACE_DEVREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!driver || !driver->ops->bind || !driver->ops->unbind || !driver->ops->disconnect || !driver->ops->setup) { @@ -4000,7 +4006,7 @@ int usbdev_unregister(struct usbdevclass_driver_s *driver) usbtrace(TRACE_DEVUNREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (driver != priv->driver) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); diff --git a/arch/arm/src/sam34/sam_wdt.c b/arch/arm/src/sam34/sam_wdt.c index dbb3f6f895ec5136cc1aa17dea21a364840dc9da..cf3d70b1613e66d04fd435a1fbc20d9f8b157904 100644 --- a/arch/arm/src/sam34/sam_wdt.c +++ b/arch/arm/src/sam34/sam_wdt.c @@ -81,18 +81,8 @@ # define CONFIG_SAM34_WDT_DEFTIMOUT WDT_MAXTIMEOUT #endif -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the watchdog - * driver. NOTE: that only lldbg types are used so that the output is - * immediately available. - */ - -#ifdef CONFIG_DEBUG_WATCHDOG -# define wddbg lldbg -# define wdvdbg llvdbg -#else -# define wddbg(x...) -# define wdvdbg(x...) +#ifndef CONFIG_DEBUG_WATCHDOG_INFO +# undef CONFIG_SAM34_WDT_REGDEBUG #endif /**************************************************************************** @@ -118,7 +108,7 @@ struct sam34_lowerhalf_s ****************************************************************************/ /* Register operations ******************************************************/ -#if defined(CONFIG_SAM34_WDT_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_SAM34_WDT_REGDEBUG static uint32_t sam34_getreg(uint32_t addr); static void sam34_putreg(uint32_t val, uint32_t addr); #else @@ -176,7 +166,7 @@ static struct sam34_lowerhalf_s g_wdgdev; * ****************************************************************************/ -#if defined(CONFIG_SAM34_WDT_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_SAM34_WDT_REGDEBUG static uint32_t sam34_getreg(uint32_t addr) { static uint32_t prevaddr = 0; @@ -197,7 +187,7 @@ static uint32_t sam34_getreg(uint32_t addr) { if (count == 4) { - lldbg("...\n"); + wdinfo("...\n"); } return val; @@ -214,7 +204,7 @@ static uint32_t sam34_getreg(uint32_t addr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + wdinfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -226,7 +216,7 @@ static uint32_t sam34_getreg(uint32_t addr) /* Show the register value read */ - lldbg("%08x->%08x\n", addr, val); + wdinfo("%08x->%08x\n", addr, val); return val; } #endif @@ -239,12 +229,12 @@ static uint32_t sam34_getreg(uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_SAM34_WDT_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_SAM34_WDT_REGDEBUG static void sam34_putreg(uint32_t val, uint32_t addr) { /* Show the register value being written */ - lldbg("%08x<-%08x\n", addr, val); + wdinfo("%08x<-%08x\n", addr, val); /* Write the value */ @@ -314,7 +304,7 @@ static int sam34_start(FAR struct watchdog_lowerhalf_s *lower) FAR struct sam34_lowerhalf_s *priv = (FAR struct sam34_lowerhalf_s *)lower; uint32_t mr_val = 0; - wdvdbg("Entry\n"); + wdinfo("Entry\n"); DEBUGASSERT(priv); /* The watchdog is always disabled after a reset. It is enabled by setting @@ -360,7 +350,7 @@ static int sam34_stop(FAR struct watchdog_lowerhalf_s *lower) * except by a reset. */ - wdvdbg("Entry\n"); + wdinfo("Entry\n"); return -ENOSYS; } @@ -386,7 +376,7 @@ static int sam34_stop(FAR struct watchdog_lowerhalf_s *lower) static int sam34_keepalive(FAR struct watchdog_lowerhalf_s *lower) { - wdvdbg("Entry\n"); + wdinfo("Entry\n"); sam34_putreg((WDT_CR_KEY | WDT_CR_WDRSTT), SAM_WDT_CR); return OK; @@ -414,7 +404,7 @@ static int sam34_getstatus(FAR struct watchdog_lowerhalf_s *lower, FAR struct sam34_lowerhalf_s *priv = (FAR struct sam34_lowerhalf_s *)lower; uint32_t elapsed; - wdvdbg("Entry\n"); + wdinfo("Entry\n"); DEBUGASSERT(priv); /* Return the status bit */ @@ -441,10 +431,10 @@ static int sam34_getstatus(FAR struct watchdog_lowerhalf_s *lower, status->timeleft = (priv->timeout * elapsed) / (priv->reload + 1); - wdvdbg("Status : %08x\n", sam34_getreg(SAM_WDT_SR)); - wdvdbg(" flags : %08x\n", status->flags); - wdvdbg(" timeout : %d\n", status->timeout); - wdvdbg(" timeleft : %d\n", status->timeleft); + wdinfo("Status : %08x\n", sam34_getreg(SAM_WDT_SR)); + wdinfo(" flags : %08x\n", status->flags); + wdinfo(" timeout : %d\n", status->timeout); + wdinfo(" timeleft : %d\n", status->timeleft); return OK; } @@ -471,13 +461,13 @@ static int sam34_settimeout(FAR struct watchdog_lowerhalf_s *lower, uint32_t reload; DEBUGASSERT(priv); - wdvdbg("Entry: timeout=%d\n", timeout); + wdinfo("Entry: timeout=%d\n", timeout); /* Can this timeout be represented? */ if (timeout < 1 || timeout > WDT_MAXTIMEOUT) { - wddbg("Cannot represent timeout=%d > %d\n", + wderr("ERROR: Cannot represent timeout=%d > %d\n", timeout, WDT_MAXTIMEOUT); return -ERANGE; } @@ -503,7 +493,7 @@ static int sam34_settimeout(FAR struct watchdog_lowerhalf_s *lower, priv->reload = reload; - wdvdbg("fwdt=%d reload=%d timout=%d\n", + wdinfo("fwdt=%d reload=%d timout=%d\n", WDT_FCLK, reload, priv->timeout); /* Don't commit to MR register until started! */ @@ -543,7 +533,7 @@ static xcpt_t sam34_capture(FAR struct watchdog_lowerhalf_s *lower, uint16_t regval; DEBUGASSERT(priv); - wdvdbg("Entry: handler=%p\n", handler); + wdinfo("Entry: handler=%p\n", handler); /* Get the old handler return value */ @@ -611,7 +601,7 @@ static int sam34_ioctl(FAR struct watchdog_lowerhalf_s *lower, int cmd, int ret = -ENOTTY; DEBUGASSERT(priv); - wdvdbg("Entry: cmd=%d arg=%ld\n", cmd, arg); + wdinfo("Entry: cmd=%d arg=%ld\n", cmd, arg); /* WDIOC_MINTIME: Set the minimum ping time. If two keepalive ioctls * are received within this time, a reset event will be generated. @@ -676,7 +666,7 @@ void sam_wdtinitialize(FAR const char *devpath) WDT_MR_WDRSTEN); sam34_putreg(mr_val, SAM_WDT_MR); - wdvdbg("Entry: devpath=%s\n", devpath); + wdinfo("Entry: devpath=%s\n", devpath); /* NOTE we assume that clocking to the IWDG has already been provided by * the RCC initialization logic. diff --git a/arch/arm/src/sama5/Kconfig b/arch/arm/src/sama5/Kconfig index b2701131bc292e0907c39aac351af9aa5d87d5c3..11aa7179f1f9aff562b9f5c55ca542f093c31f75 100644 --- a/arch/arm/src/sama5/Kconfig +++ b/arch/arm/src/sama5/Kconfig @@ -1393,9 +1393,9 @@ endif # SAMA5_LCDC_HCR config SAMA5_LCDC_REGDEBUG bool "Register-Level Debug" default n - depends on DEBUG + depends on DEBUG_LCD_INFO ---help--- - Enable very low-level register access debug. Depends on DEBUG. + Enable very low-level register access debug. Depends on CONFIG_DEBUG_LCD_INFO. endmenu # LCDC configuration endif # SAMA5_LCDC @@ -1499,9 +1499,9 @@ endif # !SAMA5_GMAC_AUTONEG config SAMA5_GMAC_REGDEBUG bool "Register-Level Debug" default n - depends on DEBUG + depends on DEBUG_NET_INFO ---help--- - Enable very low-level register access debug. Depends on DEBUG. + Enable very low-level register access debug. Depends on CONFIG_DEBUG_NET_INFO. endmenu # GMAC device driver options endif # SAMA5_GMAC @@ -1678,9 +1678,9 @@ config SAMA5_EMACA_NBC config SAMA5_EMACA_REGDEBUG bool "Register-Level Debug" default n - depends on DEBUG + depends on DEBUG_NET_FEATURES ---help--- - Enable very low-level register access debug. Depends on DEBUG. + Enable very low-level register access debug. Depends on CONFIG_DEBUG_NET_FEATURES. endmenu # EMAC device driver options endif # SAMA5_EMACA @@ -2076,7 +2076,7 @@ config SAMA5_EMACB_NBC config SAMA5_EMACB_DEBUG bool "Force EMAC0/1 DEBUG" default n - depends on DEBUG && !DEBUG_NET + depends on DEBUG_FEATURES && !DEBUG_NET ---help--- This option will force debug output from EMAC driver even without network debug output enabled. This is not normally something @@ -2087,9 +2087,9 @@ config SAMA5_EMACB_DEBUG config SAMA5_EMACB_REGDEBUG bool "Register-Level Debug" default n - depends on DEBUG + depends on DEBUG_NET_INFO ---help--- - Enable very low-level register access debug. Depends on DEBUG. + Enable very low-level register access debug. Depends on CONFIG_DEBUG_NET_INFO. endmenu # EMAC device driver options endif # SAMA5_EMACB @@ -2323,11 +2323,11 @@ config SAMA5_CAN_AUTOBAUD config SAMA5_CAN_REGDEBUG bool "CAN Register level debug" - depends on DEBUG + depends on DEBUG_CAN_INFO default n ---help--- Output detailed register-level CAN device debug information. - Requires also DEBUG. + Requires also CONFIG_DEBUG_CAN_INFO. endmenu # CAN device driver options endif # SAMA5_CAN0 || SAMA5_CAN1 @@ -2354,7 +2354,7 @@ config SAMA5_SPI_DMATHRESHOLD config SAMA5_SPI_DMADEBUG bool "SPI DMA transfer debug" - depends on SAMA5_SPI_DMA && DEBUG && DEBUG_DMA + depends on SAMA5_SPI_DMA && DEBUG_FEATURES && DEBUG_DMA default n ---help--- Enable special debug instrumentation analyze SPI DMA data transfers. @@ -2364,11 +2364,11 @@ config SAMA5_SPI_DMADEBUG config SAMA5_SPI_REGDEBUG bool "SPI Register level debug" - depends on DEBUG + depends on DEBUG_SPI_INFO default n ---help--- Output detailed register-level SPI device debug information. - Requires also DEBUG. + Requires also CONFIG_DEBUG_SPI_INFO. endmenu # SPI device driver options endif # SAMA5_SPI0 || SAMA5_SPI1 @@ -2399,11 +2399,11 @@ config SAMA5_TWI3_FREQUENCY config SAMA5_TWI_REGDEBUG bool "TWI register level debug" - depends on DEBUG + depends on DEBUG_I2C_INFO default n ---help--- Output detailed register-level TWI device debug information. - Very invasive! Requires also DEBUG. + Very invasive! Requires also CONFIG_DEBUG_I2C_INFO. endmenu # TWI device driver options endif # SAMA5_TWI0 || SAMA5_TWI1 || SAMA5_TWI2 || SAMA5_TWI3 @@ -2766,7 +2766,7 @@ endif # SAMA5_SSC1 config SAMA5_SSC_DMADEBUG bool "SSC DMA transfer debug" - depends on DEBUG && DEBUG_DMA + depends on DEBUG_FEATURES && DEBUG_DMA default n ---help--- Enable special debug instrumentation analyze SSC DMA data transfers. @@ -2776,11 +2776,11 @@ config SAMA5_SSC_DMADEBUG config SAMA5_SSC_REGDEBUG bool "SSC Register level debug" - depends on DEBUG + depends on DEBUG_I2S_INFO default n ---help--- Output detailed register-level SSC device debug information. - Very invasive! Requires also DEBUG. + Very invasive! Requires also CONFIG_DEBUG_I2S_INFO. config SAMA5_SSC_QDEBUG bool "SSC Queue debug" @@ -2857,7 +2857,7 @@ config SAMA5_HSMCI_WRPROOF config SAMA5_HSMCI_XFRDEBUG bool "HSMCI transfer debug" - depends on DEBUG_FS && DEBUG_VERBOSE + depends on DEBUG_FS_INFO default n ---help--- Enable special debug instrumentation analyze HSMCI data transfers. @@ -2865,11 +2865,11 @@ config SAMA5_HSMCI_XFRDEBUG registers at key points in the data transfer and then dumps all of the registers at the end of the transfer. If DEBUG_DMA is also enabled, then DMA register will be collected as well. Requires also - DEBUG_FS and DEBUG_VERBOSE. + DEBUG_FS and CONFIG_DEBUG_INFO. config SAMA5_HSMCI_CMDDEBUG bool "HSMCI command debug" - depends on DEBUG_FS && DEBUG_VERBOSE + depends on DEBUG_FS_INFO default n ---help--- Enable special debug instrumentation analyze HSMCI commands. This @@ -2877,15 +2877,15 @@ config SAMA5_HSMCI_CMDDEBUG key points in the data transfer and then dumps all of the registers at the end of the transfer. If DEBUG_DMA is also enabled, then DMA register will be collected as well. Requires also DEBUG_FS and - DEBUG_VERBOSE. + CONFIG_DEBUG_INFO. config SAMA5_HSMCI_REGDEBUG bool "HSMCI Register level debug" - depends on DEBUG + depends on DEBUG_MEMCARD_INFO default n ---help--- Output detailed register-level HSCMI device debug information. - Very invasive! Requires also DEBUG. + Very invasive! Requires also CONFIG_DEBUG_MEMCARD_INFO. endmenu # HSMCI device driver options endif # SAMA5_HSMCI0 || SAMA5_HSMCI1 || SAMA5_HSMCI2 @@ -2920,7 +2920,7 @@ config SAMA5_UDPHS_PREALLOCATE config SAMA5_UDPHS_REGDEBUG bool "Enable low-level UDPHS register debug" default n - depends on DEBUG + depends on DEBUG_USB_INFO endmenu # USB High Speed Device Controller driver (DCD) options endif # SAMA5_UDPHS @@ -2960,7 +2960,7 @@ config SAMA5_OHCI_TDBUFSIZE config SAMA5_OHCI_REGDEBUG bool "Enable low-level OHCI register debug" default n - depends on DEBUG + depends on DEBUG_USB_INFO endif # SAMA5_OHCI @@ -3009,7 +3009,7 @@ config SAMA5_EHCI_PREALLOCATE config SAMA5_EHCI_REGDEBUG bool "Enable low-level EHCI register debug" default n - depends on DEBUG + depends on DEBUG_USB_INFO endif # SAMA5_EHCI @@ -3661,7 +3661,7 @@ endif # SAMA5_ADC_HAVE_CHAN config SAMA5_ADC_REGDEBUG bool "Enable register-level ADC/touchscreen debug" default n - depends on DEBUG + depends on DEBUG_ANALOG_INFO ---help--- Enable very low register-level debug output. @@ -3903,23 +3903,23 @@ endif config SAMA5_TC_DEBUG bool "TC debug" - depends on DEBUG + depends on DEBUG_FEATURES default n ---help--- Output high level Timer/Counter device debug information. - Requires also DEBUG. If this option AND DEBUG_VERBOSE are + Requires also CONFIG_DEBUG_FEATURES. If this option AND CONFIG_DEBUG_INFO are enabled, then the system will be overwhelmed the timer debug - output. If DEBUG_VERBOSE is disabled, then debug output will + output. If CONFIG_DEBUG_INFO is disabled, then debug output will only indicate if/when timer-related errors occur. This latter mode is completely usable. config SAMA5_TC_REGDEBUG bool "TC register level debug" - depends on DEBUG + depends on DEBUG_TIMER_INFO default n ---help--- Output detailed register-level Timer/Counter device debug - information. Very invasive! Requires also DEBUG. + information. Very invasive! Requires also CONFIG_DEBUG_TIMER_INFO. endmenu # Timer/counter Configuration endif # SAMA5_HAVE_TC @@ -4150,7 +4150,7 @@ endif # SAMA5_PWM_CHAN3 config SAMA5_PWM_REGDEBUG bool "Enable register-level PWM debug" default n - depends on DEBUG + depends on DEBUG_PWM_INFO ---help--- Enable very low register-level debug output. @@ -4171,8 +4171,8 @@ config SAMA5_WDT_INTERRUPT config SAMA5_WDT_DEBUGHALT bool "Halt on DEBUG" - default y if DEBUG - default n if !DEBUG + default y if DEBUG_FEATURES + default n if !DEBUG_FEATURES ---help--- Halt the watchdog timer in the debug state @@ -4185,7 +4185,7 @@ config SAMA5_WDT_IDLEHALT config SAMA5_WDT_REGDEBUG bool "Register level debug" default n - depends on DEBUG + depends on DEBUG_WATCHDOG_INFO ---help--- Enable low-level register debug output @@ -4688,7 +4688,7 @@ endif # SAMA5_HAVE_PMECC config SAMA5_NAND_DMADEBUG bool "NAND DMA transfer debug" - depends on SAMA5_NAND_DMA && DEBUG && DEBUG_DMA + depends on SAMA5_NAND_DMA && DEBUG_FEATURES && DEBUG_DMA default n ---help--- Enable special debug instrumentation analyze NAND DMA data transfers. @@ -4699,18 +4699,17 @@ config SAMA5_NAND_DMADEBUG config SAMA5_NAND_REGDEBUG bool "Register-Level NAND Debug" default n - depends on DEBUG && DEBUG_FS + depends on DEBUG_FS_INFO ---help--- - Enable very low-level register access debug. Depends on DEBUG and - DEBUG_FS. + Enable very low-level register access debug. Depends on CONFIG_DEBUG_FS_INFO. config SAMA5_NAND_DUMP bool "NAND data dump" default n - depends on DEBUG && DEBUG_FS + depends on DEBUG_FEATURES && DEBUG_FS ---help--- Dump the contents of all data read and written to FLAH. Depends on - DEBUG and DEBUG_FS. + CONFIG_DEBUG_FEATURES and DEBUG_FS. endif # SAMA5_HAVE_NAND endmenu # External Memory Configuration diff --git a/arch/arm/src/sama5/sam_adc.c b/arch/arm/src/sama5/sam_adc.c index 68565bc502fa80f0f5a5fc69253aac04151b7789..dcf82b1f6d9c5f72bf7f7edd4dac7ead2e629e09 100644 --- a/arch/arm/src/sama5/sam_adc.c +++ b/arch/arm/src/sama5/sam_adc.c @@ -371,6 +371,10 @@ #define SAMA5_ADC_SAMPLES (CONFIG_SAMA5_ADC_DMASAMPLES * SAMA5_NCHANNELS) +#ifndef CONFIG_DEBUG_ANALOG_INFO +# undef CONFIG_SAMA5_ADC_REGDEBUG +#endif + /**************************************************************************** * Private Types ****************************************************************************/ @@ -423,7 +427,7 @@ struct sam_adc_s ****************************************************************************/ /* Register operations ******************************************************/ -#if defined(CONFIG_SAMA5_ADC_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_SAMA5_ADC_REGDEBUG static bool sam_adc_checkreg(struct sam_adc_s *priv, bool wr, uint32_t regval, uintptr_t address); #endif @@ -544,7 +548,7 @@ static bool sam_adc_checkreg(struct sam_adc_s *priv, bool wr, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", priv->ntimes); + ainfo("...[Repeats %d times]...\n", priv->ntimes); } /* Save information about the new access */ @@ -604,7 +608,7 @@ static void sam_adc_dmadone(void *arg) int chan; int i; - avdbg("ready=%d enabled=%d\n", priv->enabled, priv->ready); + ainfo("ready=%d enabled=%d\n", priv->enabled, priv->ready); ASSERT(priv != NULL && !priv->ready); /* If the DMA transfer is not enabled, just ignore the data (and do not start @@ -725,7 +729,7 @@ static void sam_adc_dmacallback(DMA_HANDLE handle, void *arg, int result) struct sam_adc_s *priv = (struct sam_adc_s *)arg; int ret; - allvdbg("ready=%d enabled=%d\n", priv->enabled, priv->ready); + ainfo("ready=%d enabled=%d\n", priv->enabled, priv->ready); DEBUGASSERT(priv->ready); /* Check of the bottom half is keeping up with us. @@ -751,7 +755,7 @@ static void sam_adc_dmacallback(DMA_HANDLE handle, void *arg, int result) ret = work_queue(HPWORK, &priv->work, sam_adc_dmadone, priv, 0); if (ret != 0) { - alldbg("ERROR: Failed to queue work: %d\n", ret); + aerr("ERROR: Failed to queue work: %d\n", ret); } } @@ -798,7 +802,7 @@ static int sam_adc_dmasetup(FAR struct sam_adc_s *priv, FAR uint8_t *buffer, uint32_t paddr; uint32_t maddr; - avdbg("buffer=%p buflen=%d\n", buffer, (int)buflen); + ainfo("buffer=%p buflen=%d\n", buffer, (int)buflen); DEBUGASSERT(priv != NULL && buffer != NULL && buflen > 0); DEBUGASSERT(((uint32_t)buffer & 3) == 0); @@ -849,7 +853,7 @@ static void sam_adc_endconversion(void *arg) int chan; ASSERT(priv != NULL); - avdbg("pending=%08x\n", priv->pending); + ainfo("pending=%08x\n", priv->pending); /* Get the set of unmasked, pending ADC interrupts */ @@ -957,7 +961,7 @@ static int sam_adc_interrupt(int irq, void *context) ret = work_queue(HPWORK, &priv->work, sam_adc_endconversion, priv, 0); if (ret != 0) { - alldbg("ERROR: Failed to queue work: %d\n", ret); + aerr("ERROR: Failed to queue work: %d\n", ret); } pending &= ~ADC_INT_EOCALL; @@ -1011,7 +1015,7 @@ static void sam_adc_reset(struct adc_dev_s *dev) #endif uint32_t regval; - avdbg("Resetting..\n"); + ainfo("Resetting..\n"); /* NOTE: We can't really reset the ADC hardware without losing the * touchscreen configuration. @@ -1081,7 +1085,7 @@ static int sam_adc_setup(struct adc_dev_s *dev) struct sam_adc_s *priv = (struct sam_adc_s *)dev->ad_priv; uint32_t regval; - avdbg("Setup\n"); + ainfo("Setup\n"); /* Enable channel number tag. This bit will force the channel number (CHNB) * to be included in the LDCR register content. @@ -1152,7 +1156,7 @@ static void sam_adc_shutdown(struct adc_dev_s *dev) struct sam_adc_s *priv = (struct sam_adc_s *)dev->ad_priv; #endif - avdbg("Shutdown\n"); + ainfo("Shutdown\n"); /* Reset the ADC peripheral */ @@ -1181,7 +1185,7 @@ static void sam_adc_rxint(struct adc_dev_s *dev, bool enable) struct sam_adc_s *priv = (struct sam_adc_s *)dev->ad_priv; #endif - avdbg("enable=%d\n", enable); + ainfo("enable=%d\n", enable); #ifdef CONFIG_SAMA5_ADC_DMA /* Ignore redundant requests */ @@ -1232,7 +1236,7 @@ static int sam_adc_ioctl(struct adc_dev_s *dev, int cmd, unsigned long arg) #endif int ret = OK; - avdbg("cmd=%d arg=%ld\n", cmd, arg); + ainfo("cmd=%d arg=%ld\n", cmd, arg); switch (cmd) { @@ -1277,7 +1281,7 @@ static int sam_adc_settimer(struct sam_adc_s *priv, uint32_t frequency, uint32_t regval; int ret; - avdbg("frequency=%ld channel=%d\n", (long)frequency, channel); + ainfo("frequency=%ld channel=%d\n", (long)frequency, channel); DEBUGASSERT(priv && frequency > 0); /* Configure TC for a 1Hz frequency and trigger on RC compare. */ @@ -1285,7 +1289,7 @@ static int sam_adc_settimer(struct sam_adc_s *priv, uint32_t frequency, ret = sam_tc_divisor(frequency, &div, &tcclks); if (ret < 0) { - adbg("ERROR: sam_tc_divisor failed: %d\n", ret); + aerr("ERROR: sam_tc_divisor failed: %d\n", ret); return ret; } @@ -1304,7 +1308,7 @@ static int sam_adc_settimer(struct sam_adc_s *priv, uint32_t frequency, priv->tc = sam_tc_allocate(channel, mode); if (!priv->tc) { - adbg("ERROR: Failed to allocate channel %d mode %08x\n", channel, mode); + aerr("ERROR: Failed to allocate channel %d mode %08x\n", channel, mode); return -EINVAL; } @@ -1350,7 +1354,7 @@ static void sam_adc_freetimer(struct sam_adc_s *priv) { /* Is a timer allocated? */ - avdbg("tc=%p\n", priv->tc); + ainfo("tc=%p\n", priv->tc); if (priv->tc) { @@ -1377,7 +1381,7 @@ static int sam_adc_trigger(struct sam_adc_s *priv) int ret = OK; #if defined(CONFIG_SAMA5_ADC_SWTRIG) - avdbg("Setup software trigger\n"); + ainfo("Setup software trigger\n"); /* Configure the software trigger */ @@ -1393,7 +1397,7 @@ static int sam_adc_trigger(struct sam_adc_s *priv) sam_adc_putreg(priv, SAM_ADC_TRGR, regval); #elif defined(CONFIG_SAMA5_ADC_ADTRG) - avdbg("Setup ADTRG trigger\n"); + ainfo("Setup ADTRG trigger\n"); /* Configure the trigger via the external ADTRG signal */ @@ -1420,7 +1424,7 @@ static int sam_adc_trigger(struct sam_adc_s *priv) sam_adc_putreg(priv, SAM_ADC_TRGR, regval); #elif defined(CONFIG_SAMA5_ADC_TIOATRIG) - avdbg("Setup timer/counter trigger\n"); + ainfo("Setup timer/counter trigger\n"); /* Start the timer */ @@ -1436,7 +1440,7 @@ static int sam_adc_trigger(struct sam_adc_s *priv) #endif if (ret < 0) { - adbg("ERROR: sam_adc_settimer failed: %d\n", ret); + aerr("ERROR: sam_adc_settimer failed: %d\n", ret); return ret; } @@ -1500,7 +1504,7 @@ static void sam_adc_autocalibrate(struct sam_adc_s *priv) #ifdef CONFIG_SAMA5_ADC_AUTOCALIB uint32_t regval; - avdbg("Entry\n"); + ainfo("Entry\n"); /* Launch an automatic calibration of the ADC cell on next sequence */ @@ -1527,7 +1531,7 @@ static void sam_adc_offset(struct sam_adc_s *priv) { uint32_t regval = 0; - avdbg("Entry\n"); + ainfo("Entry\n"); #ifdef CONFIG_SAMA5_ADC_ANARCH /* Set the offset for each enabled channel. This centers the analog signal @@ -1644,7 +1648,7 @@ static void sam_adc_gain(struct sam_adc_s *priv) #ifdef CONFIG_SAMA5_ADC_ANARCH uint32_t regval; - avdbg("Entry\n"); + ainfo("Entry\n"); /* Set the gain for each enabled channel */ @@ -1690,7 +1694,7 @@ static void sam_adc_gain(struct sam_adc_s *priv) sam_adc_putreg(priv, SAM_ADC_CGR, regval); #else - avdbg("Gain=%d\n", CONFIG_SAMA5_ADC_GAIN); + ainfo("Gain=%d\n", CONFIG_SAMA5_ADC_GAIN); /* Set GAIN0 only. GAIN0 will be used for all channels. */ @@ -1711,7 +1715,7 @@ static void sam_adc_analogchange(struct sam_adc_s *priv) { uint32_t regval; - avdbg("Entry\n"); + ainfo("Entry\n"); /* Enable/disable the analog change feature */ @@ -1754,7 +1758,7 @@ static void sam_adc_setseqr(int chan, uint32_t *seqr1, uint32_t *seqr2, int seq) *seqr1 |= ADC_SEQR1_USCH(seq, chan); } - avdbg("chan=%d seqr1=%08x seqr2=%08x seq=%d\n", chan, *seqr1, *seqr2, seq); + ainfo("chan=%d seqr1=%08x seqr2=%08x seq=%d\n", chan, *seqr1, *seqr2, seq); } #endif @@ -1766,7 +1770,7 @@ static void sam_adc_sequencer(struct sam_adc_s *priv) uint32_t seqr2; int seq; - avdbg("Setup sequencer\n"); + ainfo("Setup sequencer\n"); /* Set user configured channel sequence */ @@ -1855,7 +1859,7 @@ static void sam_adc_sequencer(struct sam_adc_s *priv) #else uint32_t regval; - avdbg("Disable sequencer\n"); + ainfo("Disable sequencer\n"); /* Disable the sequencer */ @@ -1878,7 +1882,7 @@ static void sam_adc_channels(struct sam_adc_s *priv) { uint32_t regval; - avdbg("Entry\n"); + ainfo("Entry\n"); /* Enable channels. */ @@ -1964,7 +1968,7 @@ struct adc_dev_s *sam_adc_initialize(void) if (!priv->initialized) { - avdbg("Initializing...\n"); + ainfo("Initializing...\n"); /* Disable ADC peripheral clock */ @@ -2056,7 +2060,7 @@ struct adc_dev_s *sam_adc_initialize(void) } else { - adbg("ERROR: Cannot realize ADC input frequency\n"); + aerr("ERROR: Cannot realize ADC input frequency\n"); return NULL; } @@ -2108,7 +2112,7 @@ struct adc_dev_s *sam_adc_initialize(void) ret = irq_attach(SAM_IRQ_ADC, sam_adc_interrupt); if (ret < 0) { - adbg("ERROR: Failed to attach IRQ %d: %d\n", SAM_IRQ_ADC, ret); + aerr("ERROR: Failed to attach IRQ %d: %d\n", SAM_IRQ_ADC, ret); return NULL; } @@ -2127,7 +2131,7 @@ struct adc_dev_s *sam_adc_initialize(void) /* Return a pointer to the device structure */ - avdbg("Returning %p\n", &g_adcdev); + ainfo("Returning %p\n", &g_adcdev); return &g_adcdev; } @@ -2143,7 +2147,7 @@ void sam_adc_lock(FAR struct sam_adc_s *priv) { int ret; - avdbg("Locking\n"); + ainfo("Locking\n"); do { @@ -2168,7 +2172,7 @@ void sam_adc_lock(FAR struct sam_adc_s *priv) void sam_adc_unlock(FAR struct sam_adc_s *priv) { - avdbg("Unlocking\n"); + ainfo("Unlocking\n"); sem_post(&priv->exclsem); } @@ -2187,7 +2191,7 @@ uint32_t sam_adc_getreg(struct sam_adc_s *priv, uintptr_t address) if (sam_adc_checkreg(priv, false, regval, address)) { - lldbg("%08x->%08x\n", address, regval); + ainfo("%08x->%08x\n", address, regval); } return regval; @@ -2207,7 +2211,7 @@ void sam_adc_putreg(struct sam_adc_s *priv, uintptr_t address, uint32_t regval) { if (sam_adc_checkreg(priv, true, regval, address)) { - lldbg("%08x<-%08x\n", address, regval); + ainfo("%08x<-%08x\n", address, regval); } putreg32(regval, address); diff --git a/arch/arm/src/sama5/sam_adc.h b/arch/arm/src/sama5/sam_adc.h index f8ba29f157636ed0913b530aca1cf3c069bd6d32..f84a45a65d027e675a4b59417c1d83d04c090b51 100644 --- a/arch/arm/src/sama5/sam_adc.h +++ b/arch/arm/src/sama5/sam_adc.h @@ -57,7 +57,7 @@ # error Work queue support is required (CONFIG_SCHED_WORKQUEUE) #endif -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_SAMA5_ADC_REGDEBUG #endif diff --git a/arch/arm/src/sama5/sam_allocateheap.c b/arch/arm/src/sama5/sam_allocateheap.c index 14388795f984bcd3b72bd4b7835ea6da662b7411..29dcf728f6f6ee0084b9911c3afe81211720e33e 100644 --- a/arch/arm/src/sama5/sam_allocateheap.c +++ b/arch/arm/src/sama5/sam_allocateheap.c @@ -312,9 +312,9 @@ void up_addregion(void) } else { - lldbg("ERROR: SDRAM memory not added to heap. CONFIG_MM_NREGIONS=%d\n", - CONFIG_MM_REGIONS); - lldbg(" Increase the size of CONFIG_MM_NREGIONS\n"); + serr("ERROR: SDRAM memory not added to heap. CONFIG_MM_NREGIONS=%d\n", + CONFIG_MM_REGIONS); + serr(" Increase the size of CONFIG_MM_NREGIONS\n"); } #endif @@ -331,9 +331,9 @@ void up_addregion(void) } else { - lldbg("ERROR: CS0 memory not added to heap. CONFIG_MM_NREGIONS=%d\n", - CONFIG_MM_REGIONS); - lldbg(" Increase the size of CONFIG_MM_NREGIONS\n"); + serr("ERROR: CS0 memory not added to heap. CONFIG_MM_NREGIONS=%d\n", + CONFIG_MM_REGIONS); + serr(" Increase the size of CONFIG_MM_NREGIONS\n"); } #endif @@ -350,9 +350,9 @@ void up_addregion(void) } else { - lldbg("ERROR: CS1 memory not added to heap. CONFIG_MM_NREGIONS=%d\n", - CONFIG_MM_REGIONS); - lldbg(" Increase the size of CONFIG_MM_NREGIONS\n"); + serr("ERROR: CS1 memory not added to heap. CONFIG_MM_NREGIONS=%d\n", + CONFIG_MM_REGIONS); + serr(" Increase the size of CONFIG_MM_NREGIONS\n"); } #endif @@ -369,9 +369,9 @@ void up_addregion(void) } else { - lldbg("ERROR: CS2 memory not added to heap. CONFIG_MM_NREGIONS=%d\n", - CONFIG_MM_REGIONS); - lldbg(" Increase the size of CONFIG_MM_NREGIONS\n"); + serr("ERROR: CS2 memory not added to heap. CONFIG_MM_NREGIONS=%d\n", + CONFIG_MM_REGIONS); + serr(" Increase the size of CONFIG_MM_NREGIONS\n"); } #endif @@ -388,9 +388,9 @@ void up_addregion(void) } else { - lldbg("ERROR: CS3 memory not added to heap. CONFIG_MM_NREGIONS=%d\n", - CONFIG_MM_REGIONS); - lldbg(" Increase the size of CONFIG_MM_NREGIONS\n"); + serr("ERROR: CS3 memory not added to heap. CONFIG_MM_NREGIONS=%d\n", + CONFIG_MM_REGIONS); + serr(" Increase the size of CONFIG_MM_NREGIONS\n"); } #endif @@ -398,9 +398,9 @@ void up_addregion(void) if (nregions > 0) { - lldbg("ERROR: Not all regions added to heap: %d added, but CONFIG_MM_NREGIONS=%d\n", - CONFIG_MM_REGIONS - nregions, CONFIG_MM_REGIONS); - lldbg(" Decrease the size of CONFIG_MM_NREGIONS\n"); + serr("ERROR: Not all regions added to heap: %d added, but CONFIG_MM_NREGIONS=%d\n", + CONFIG_MM_REGIONS - nregions, CONFIG_MM_REGIONS); + serr(" Decrease the size of CONFIG_MM_NREGIONS\n"); } } #endif diff --git a/arch/arm/src/sama5/sam_can.c b/arch/arm/src/sama5/sam_can.c index ac9e93cc08a6e2474498c12ed062702e89892e1c..3e1b3d116a1993da67b2c4614d607ce5cbef4a48 100644 --- a/arch/arm/src/sama5/sam_can.c +++ b/arch/arm/src/sama5/sam_can.c @@ -123,22 +123,7 @@ #define CAN_DEBUG_INTS (CAN_INT_ERRA | CAN_INT_WARN | CAN_INT_CERR | \ CAN_INT_SERR | CAN_INT_FERR | CAN_INT_BERR) -/* 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) +#ifndef CONFIG_DEBUG_CAN_INFO # undef CONFIG_SAMA5_CAN_REGDEBUG #endif @@ -386,7 +371,7 @@ static uint32_t can_getreg(FAR struct sam_can_s *priv, int offset) { if (priv->count == 4) { - lldbg("...\n"); + caninfo("...\n"); } return regval; @@ -403,7 +388,7 @@ static uint32_t can_getreg(FAR struct sam_can_s *priv, int offset) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", priv->count - 3); + caninfo("[repeats %d more times]\n", priv->count - 3); } /* Save the new address, value, and count */ @@ -415,7 +400,7 @@ static uint32_t can_getreg(FAR struct sam_can_s *priv, int offset) /* Show the register value read */ - lldbg("%08x->%08x\n", regaddr, regval); + caninfo("%08x->%08x\n", regaddr, regval); return regval; } @@ -452,7 +437,7 @@ static void can_putreg(FAR struct sam_can_s *priv, int offset, uint32_t regval) /* Show the register value being written */ - lldbg("%08x<-%08x\n", regaddr, regval); + caninfo("%08x<-%08x\n", regaddr, regval); /* Write the value */ @@ -489,29 +474,29 @@ static void can_dumpctrlregs(FAR struct sam_can_s *priv, FAR const char *msg) if (msg) { - canlldbg("Control Registers: %s\n", msg); + caninfo("Control Registers: %s\n", msg); } else { - canlldbg("Control Registers:\n"); + caninfo("Control Registers:\n"); } /* CAN control and status registers */ - lldbg(" MR: %08x IMR: %08x SR: %08x\n", - getreg32(config->base + SAM_CAN_MR_OFFSET), - getreg32(config->base + SAM_CAN_IMR_OFFSET), - getreg32(config->base + SAM_CAN_SR_OFFSET)); + caninfo(" MR: %08x IMR: %08x SR: %08x\n", + getreg32(config->base + SAM_CAN_MR_OFFSET), + getreg32(config->base + SAM_CAN_IMR_OFFSET), + getreg32(config->base + SAM_CAN_SR_OFFSET)); - lldbg(" BR: %08x TIM: %08x TIMESTP: %08x\n", - getreg32(config->base + SAM_CAN_BR_OFFSET), - getreg32(config->base + SAM_CAN_TIM_OFFSET), - getreg32(config->base + SAM_CAN_TIMESTP_OFFSET)); + caninfo(" BR: %08x TIM: %08x TIMESTP: %08x\n", + getreg32(config->base + SAM_CAN_BR_OFFSET), + getreg32(config->base + SAM_CAN_TIM_OFFSET), + getreg32(config->base + SAM_CAN_TIMESTP_OFFSET)); - lldbg(" ECR: %08x WPMR: %08x WPSR: %08x\n", - getreg32(config->base + SAM_CAN_ECR_OFFSET), - getreg32(config->base + SAM_CAN_TCR_OFFSET), - getreg32(config->base + SAM_CAN_ACR_OFFSET)); + caninfo(" ECR: %08x WPMR: %08x WPSR: %08x\n", + getreg32(config->base + SAM_CAN_ECR_OFFSET), + getreg32(config->base + SAM_CAN_TCR_OFFSET), + getreg32(config->base + SAM_CAN_ACR_OFFSET)); } #endif @@ -538,30 +523,30 @@ static void can_dumpmbregs(FAR struct sam_can_s *priv, FAR const char *msg) if (msg) { - canlldbg("Mailbox Registers: %s\n", msg); + caninfo("Mailbox Registers: %s\n", msg); } else { - canlldbg("Mailbox Registers:\n"); + caninfo("Mailbox Registers:\n"); } for (i = 0; i < SAM_CAN_NMAILBOXES; i++) { mbbase = config->base + SAM_CAN_MBn_OFFSET(i); - lldbg(" MB%d:\n", i); + caninfo(" MB%d:\n", i); /* CAN mailbox registers */ - lldbg(" MMR: %08x MAM: %08x MID: %08x MFID: %08x\n", - getreg32(mbbase + SAM_CAN_MMR_OFFSET), - getreg32(mbbase + SAM_CAN_MAM_OFFSET), - getreg32(mbbase + SAM_CAN_MID_OFFSET), - getreg32(mbbase + SAM_CAN_MFID_OFFSET)); + caninfo(" MMR: %08x MAM: %08x MID: %08x MFID: %08x\n", + getreg32(mbbase + SAM_CAN_MMR_OFFSET), + getreg32(mbbase + SAM_CAN_MAM_OFFSET), + getreg32(mbbase + SAM_CAN_MID_OFFSET), + getreg32(mbbase + SAM_CAN_MFID_OFFSET)); - lldbg(" MSR: %08x MDL: %08x MDH: %08x\n", - getreg32(mbbase + SAM_CAN_MSR_OFFSET), - getreg32(mbbase + SAM_CAN_MDL_OFFSET), - getreg32(mbbase + SAM_CAN_MDH_OFFSET)); + caninfo(" MSR: %08x MDL: %08x MDH: %08x\n", + getreg32(mbbase + SAM_CAN_MSR_OFFSET), + getreg32(mbbase + SAM_CAN_MDL_OFFSET), + getreg32(mbbase + SAM_CAN_MDH_OFFSET)); } } #endif @@ -722,7 +707,7 @@ static int can_recvsetup(FAR struct sam_can_s *priv) mbndx = can_mballoc(priv); if (mbndx < 0) { - candbg("ERROR: Failed to allocate mailbox %d: %d\n", mbno, mbndx); + canerr("ERROR: Failed to allocate mailbox %d: %d\n", mbno, mbndx); return mbndx; } @@ -730,7 +715,7 @@ static int can_recvsetup(FAR struct sam_can_s *priv) priv->rxmbset |= (1 << mbndx); - canvdbg("CAN%d Mailbox %d: Index=%d rxmbset=%02x\n", + caninfo("CAN%d Mailbox %d: Index=%d rxmbset=%02x\n", config->port, mbno, mbndx, priv->rxmbset); /* Set up the message ID and filter mask @@ -798,7 +783,7 @@ static void can_reset(FAR struct can_dev_s *dev) config = priv->config; DEBUGASSERT(config); - canllvdbg("CAN%d\n", config->port); + caninfo("CAN%d\n", config->port); UNUSED(config); /* Get exclusive access to the CAN peripheral */ @@ -855,7 +840,7 @@ static int can_setup(FAR struct can_dev_s *dev) config = priv->config; DEBUGASSERT(config); - canllvdbg("CAN%d pid: %d\n", config->port, config->pid); + caninfo("CAN%d pid: %d\n", config->port, config->pid); /* Get exclusive access to the CAN peripheral */ @@ -866,7 +851,7 @@ static int can_setup(FAR struct can_dev_s *dev) ret = can_hwinitialize(priv); if (ret < 0) { - canlldbg("CAN%d H/W initialization failed: %d\n", config->port, ret); + canerr("ERROR: CAN%d H/W initialization failed: %d\n", config->port, ret); return ret; } @@ -878,7 +863,7 @@ static int can_setup(FAR struct can_dev_s *dev) ret = irq_attach(config->pid, config->handler); if (ret < 0) { - canlldbg("Failed to attach CAN%d IRQ (%d)", config->port, config->pid); + canerr("ERROR: Failed to attach CAN%d IRQ (%d)", config->port, config->pid); return ret; } @@ -887,13 +872,13 @@ static int can_setup(FAR struct can_dev_s *dev) ret = can_recvsetup(priv); if (ret < 0) { - canlldbg("CAN%d H/W initialization failed: %d\n", config->port, ret); + canerr("ERROR: CAN%d H/W initialization failed: %d\n", config->port, ret); return ret; } /* Enable all error interrupts */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES can_putreg(priv, SAM_CAN_IER_OFFSET, CAN_DEBUG_INTS); #endif @@ -933,7 +918,7 @@ static void can_shutdown(FAR struct can_dev_s *dev) config = priv->config; DEBUGASSERT(config); - canllvdbg("CAN%d\n", config->port); + caninfo("CAN%d\n", config->port); /* Get exclusive access to the CAN peripheral */ @@ -972,7 +957,7 @@ static void can_rxint(FAR struct can_dev_s *dev, bool enable) FAR struct sam_can_s *priv = dev->cd_priv; DEBUGASSERT(priv && priv->config); - canllvdbg("CAN%d enable: %d\n", priv->config->port, enable); + caninfo("CAN%d enable: %d\n", priv->config->port, enable); /* Enable/disable the mailbox interrupts from all receive mailboxes */ @@ -1005,7 +990,7 @@ static void can_txint(FAR struct can_dev_s *dev, bool enable) FAR struct sam_can_s *priv = dev->cd_priv; DEBUGASSERT(priv && priv->config); - canllvdbg("CAN%d enable: %d\n", priv->config->port, enable); + caninfo("CAN%d enable: %d\n", priv->config->port, enable); /* Get exclusive access to the CAN peripheral */ @@ -1106,9 +1091,9 @@ static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg) priv = dev->cd_priv; DEBUGASSERT(priv && priv->config); - canllvdbg("CAN%d\n", priv->config->port); - canllvdbg("CAN%d ID: %d DLC: %d\n", - priv->config->port, msg->cm_hdr.ch_id, msg->cm_hdr.ch_dlc); + caninfo("CAN%d\n", priv->config->port); + caninfo("CAN%d ID: %d DLC: %d\n", + priv->config->port, msg->cm_hdr.ch_id, msg->cm_hdr.ch_dlc); /* Get exclusive access to the CAN peripheral */ @@ -1119,14 +1104,14 @@ static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg) mbndx = can_mballoc(priv); if (mbndx < 0) { - candbg("ERROR: CAN%d failed to allocate a mailbox: %d\n", + canerr("ERROR: CAN%d failed to allocate a mailbox: %d\n", priv->config->port, mbndx); return mbndx; } priv->txmbset |= (1 << mbndx); - canvdbg("Mailbox Index=%d txmbset=%02x\n", mbndx, priv->txmbset); + caninfo("Mailbox Index=%d txmbset=%02x\n", mbndx, priv->txmbset); /* Set up the ID and mask, standard 11-bit or extended 29-bit. * REVISIT: This logic should be capable of sending standard messages @@ -1342,7 +1327,7 @@ static inline void can_rxinterrupt(FAR struct can_dev_s *dev, int mbndx, ret = can_receive(dev, &hdr, (FAR uint8_t *)md); if (ret < 0) { - canlldbg("ERROR: can_receive failed: %d\n", ret); + canerr("ERROR: can_receive failed: %d\n", ret); } /* Set the MTCR flag in the CAN_MCRx register. This clears the @@ -1437,9 +1422,9 @@ static inline void can_mbinterrupt(FAR struct can_dev_s *dev, int mbndx) case CAN_MMR_MOT_CONSUMER: /* Consumer Mailbox */ case CAN_MMR_MOT_PRODUCER: /* Producer Mailbox */ case CAN_MMR_MOT_DISABLED: /* Mailbox is disabled */ - canlldbg("ERROR: CAN%d MB%d: Unsupported or invalid mailbox type\n", - priv->config->port, mbndx); - canlldbg(" MSR: %08x MMR: %08x\n", msr, mmr); + canerr("ERROR: CAN%d MB%d: Unsupported or invalid mailbox type\n", + priv->config->port, mbndx); + canerr(" MSR: %08x MMR: %08x\n", msr, mmr); break; } } @@ -1530,8 +1515,8 @@ static void can_interrupt(FAR struct can_dev_s *dev) if ((pending & ~CAN_INT_MBALL) != 0) { - canlldbg("ERROR: CAN%d system interrupt, SR=%08x IMR=%08x\n", - priv->config->port, sr, imr); + canerr("ERROR: CAN%d system interrupt, SR=%08x IMR=%08x\n", + priv->config->port, sr, imr); } } @@ -1708,7 +1693,7 @@ static int can_bittiming(struct sam_can_s *priv) { /* The BRP field must be within the range 1 - 0x7f */ - candbg("CAN%d: baud %d too high\n", config->port, config->baud); + canerr("CAN%d ERROR: baud %d too high\n", config->port, config->baud); return -EINVAL; } @@ -1756,7 +1741,7 @@ static int can_bittiming(struct sam_can_s *priv) if ((propag + phase1 + phase2) != (uint32_t)(tq - 4)) { - candbg("CAN%d: Could not realize baud %d\n", config->port, config->baud); + canerr("CAN%d ERROR: Could not realize baud %d\n", config->port, config->baud); return -EINVAL; } @@ -1788,7 +1773,7 @@ static int can_autobaud(struct sam_can_s *priv) uint32_t regval; int ret; - canllvdbg("CAN%d\n", config->port); + caninfo("CAN%d\n", config->port); /* The CAN controller can start listening to the network in Autobaud Mode. * In this case, the error counters are locked and a mailbox may be @@ -1858,7 +1843,7 @@ static int can_hwinitialize(struct sam_can_s *priv) uint32_t mck; int ret; - canllvdbg("CAN%d\n", config->port); + caninfo("CAN%d\n", config->port); /* Configure CAN pins */ @@ -1890,7 +1875,7 @@ static int can_hwinitialize(struct sam_can_s *priv) } else { - candbg("ERROR: Cannot realize CAN input frequency\n"); + canerr("ERROR: Cannot realize CAN input frequency\n"); return -EINVAL; } @@ -1912,7 +1897,7 @@ static int can_hwinitialize(struct sam_can_s *priv) ret = can_bittiming(priv); if (ret < 0) { - candbg("ERROR: Failed to set bit timing: %d\n", ret); + canerr("ERROR: Failed to set bit timing: %d\n", ret); return ret; } @@ -1922,7 +1907,7 @@ static int can_hwinitialize(struct sam_can_s *priv) ret = can_autobaud(priv); if (ret < 0) { - candbg("ERROR: can_autobaud failed: %d\n", ret); + canerr("ERROR: can_autobaud failed: %d\n", ret); return ret; } #endif @@ -1970,7 +1955,7 @@ FAR struct can_dev_s *sam_caninitialize(int port) FAR struct sam_can_s *priv; FAR const struct sam_config_s *config; - canvdbg("CAN%d\n", port); + caninfo("CAN%d\n", port); /* NOTE: Peripherical clocking for CAN0 and/or CAN1 was already provided * by sam_clockconfig() early in the reset sequence. @@ -1999,7 +1984,7 @@ FAR struct can_dev_s *sam_caninitialize(int port) else #endif { - candbg("ERROR: Unsupported port %d\n", port); + canerr("ERROR: Unsupported port %d\n", port); return NULL; } diff --git a/arch/arm/src/sama5/sam_dmac.c b/arch/arm/src/sama5/sam_dmac.c index bf3f1481684dc365848620542012ee4aac424e42..e3a813c1b211889c8887ad86766e94e7fadc319b 100644 --- a/arch/arm/src/sama5/sam_dmac.c +++ b/arch/arm/src/sama5/sam_dmac.c @@ -657,7 +657,7 @@ static uint8_t sam_channel(uint8_t pid, const struct sam_pidmap_s *table, } } - dmadbg("No channel found for pid %d\n", pid); + dmaerr("ERROR: No channel found for pid %d\n", pid); DEBUGPANIC(); return 0x3f; } @@ -1364,7 +1364,7 @@ sam_allocdesc(struct sam_dmach_s *dmach, struct dma_linklist_s *prev, * Obviously setting it to zero would break that usage. */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (saddr != 0) #endif { @@ -1818,7 +1818,7 @@ static int sam_dmac_interrupt(struct sam_dmac_s *dmac) { /* Yes... Terminate the transfer with an error? */ - dmalldbg("ERROR: DMA failed: %08x\n", regval); + dmaerr("ERROR: DMA failed: %08x\n", regval); sam_dmaterminate(dmach, -EIO); } @@ -1920,7 +1920,7 @@ void sam_dmainitialize(struct sam_dmac_s *dmac) void weak_function up_dmainitialize(void) { #ifdef CONFIG_SAMA5_DMAC0 - dmallvdbg("Initialize DMAC0\n"); + dmainfo("Initialize DMAC0\n"); /* Enable peripheral clock */ @@ -1940,7 +1940,7 @@ void weak_function up_dmainitialize(void) #endif #ifdef CONFIG_SAMA5_DMAC1 - dmallvdbg("Initialize DMAC1\n"); + dmainfo("Initialize DMAC1\n"); /* Enable peripheral clock */ @@ -2002,7 +2002,7 @@ DMA_HANDLE sam_dmachannel(uint8_t dmacno, uint32_t chflags) #endif { - dmadbg("ERROR: Bad DMAC number: %d\n", dmacno); + dmaerr("ERROR: Bad DMAC number: %d\n", dmacno); DEBUGPANIC(); return (DMA_HANDLE)NULL; } @@ -2046,12 +2046,12 @@ DMA_HANDLE sam_dmachannel(uint8_t dmacno, uint32_t chflags) if (dmach) { - dmavdbg("DMAC%d CH%d: chflags: %08x returning dmach: %p\n", + dmainfo("DMAC%d CH%d: chflags: %08x returning dmach: %p\n", (int)dmacno, dmach->chan, (int)chflags, dmach); } else { - dmadbg("ERROR: Failed allocate DMAC%d channel\n", (int)dmacno); + dmaerr("ERROR: Failed allocate DMAC%d channel\n", (int)dmacno); } return (DMA_HANDLE)dmach; @@ -2082,13 +2082,13 @@ void sam_dmaconfig(DMA_HANDLE handle, uint32_t chflags) dmach->flags = chflags; #if defined(CONFIG_SAMA5_DMAC0) && defined(CONFIG_SAMA5_DMAC1) - dmavdbg("DMAC%d CH%d: chflags: %08x\n", + dmainfo("DMAC%d CH%d: chflags: %08x\n", dmach->dmac, dmach->chan, (int)chflags); #elif defined(CONFIG_SAMA5_DMAC0) - dmavdbg("DMAC0 CH%d: chflags: %08x\n", + dmainfo("DMAC0 CH%d: chflags: %08x\n", dmach->chan, (int)chflags); #else - dmavdbg("DMAC1 CH%d: chflags: %08x\n", + dmainfo("DMAC1 CH%d: chflags: %08x\n", dmach->chan, (int)chflags); #endif } @@ -2110,7 +2110,7 @@ void sam_dmafree(DMA_HANDLE handle) { struct sam_dmach_s *dmach = (struct sam_dmach_s *)handle; - dmavdbg("dmach: %p\n", dmach); + dmainfo("dmach: %p\n", dmach); DEBUGASSERT((dmach != NULL) && (dmach->inuse)); /* Mark the channel no longer in use. Clearing the inuse flag is an atomic @@ -2140,10 +2140,10 @@ int sam_dmatxsetup(DMA_HANDLE handle, uint32_t paddr, uint32_t maddr, size_t remaining; int ret = OK; - dmavdbg("dmach: %p paddr: %08x maddr: %08x nbytes: %d\n", + dmainfo("dmach: %p paddr: %08x maddr: %08x nbytes: %d\n", dmach, (int)paddr, (int)maddr, (int)nbytes); DEBUGASSERT(dmach); - dmavdbg("llhead: %p lltail: %p\n", dmach->llhead, dmach->lltail); + dmainfo("llhead: %p lltail: %p\n", dmach->llhead, dmach->lltail); /* The maximum transfer size in bytes depends upon the maximum number of * transfers and the number of bytes per transfer. @@ -2219,10 +2219,10 @@ int sam_dmarxsetup(DMA_HANDLE handle, uint32_t paddr, uint32_t maddr, size_t remaining; int ret = OK; - dmavdbg("dmach: %p paddr: %08x maddr: %08x nbytes: %d\n", + dmainfo("dmach: %p paddr: %08x maddr: %08x nbytes: %d\n", dmach, (int)paddr, (int)maddr, (int)nbytes); DEBUGASSERT(dmach); - dmavdbg("llhead: %p lltail: %p\n", dmach->llhead, dmach->lltail); + dmainfo("llhead: %p lltail: %p\n", dmach->llhead, dmach->lltail); /* The maximum transfer size in bytes depends upon the maximum number of * transfers and the number of bytes per transfer. @@ -2294,7 +2294,7 @@ int sam_dmastart(DMA_HANDLE handle, dma_callback_t callback, void *arg) struct sam_dmach_s *dmach = (struct sam_dmach_s *)handle; int ret = -EINVAL; - dmavdbg("dmach: %p callback: %p arg: %p\n", dmach, callback, arg); + dmainfo("dmach: %p callback: %p arg: %p\n", dmach, callback, arg); DEBUGASSERT(dmach != NULL); /* Verify that the DMA has been setup (i.e., at least one entry in the @@ -2338,7 +2338,7 @@ void sam_dmastop(DMA_HANDLE handle) struct sam_dmach_s *dmach = (struct sam_dmach_s *)handle; irqstate_t flags; - dmavdbg("dmach: %p\n", dmach); + dmainfo("dmach: %p\n", dmach); DEBUGASSERT(dmach != NULL); flags = enter_critical_section(); @@ -2414,27 +2414,27 @@ void sam_dmadump(DMA_HANDLE handle, const struct sam_dmaregs_s *regs, struct sam_dmach_s *dmach = (struct sam_dmach_s *)handle; struct sam_dmac_s *dmac = sam_controller(dmach); - dmadbg("%s\n", msg); - dmadbg(" DMA Global Registers:\n"); - dmadbg(" GCFG[%08x]: %08x\n", dmac->base + SAM_DMAC_GCFG_OFFSET, regs->gcfg); - dmadbg(" EN[%08x]: %08x\n", dmac->base + SAM_DMAC_EN_OFFSET, regs->en); - dmadbg(" SREQ[%08x]: %08x\n", dmac->base + SAM_DMAC_SREQ_OFFSET, regs->sreq); - dmadbg(" CREQ[%08x]: %08x\n", dmac->base + SAM_DMAC_CREQ_OFFSET, regs->creq); - dmadbg(" LAST[%08x]: %08x\n", dmac->base + SAM_DMAC_LAST_OFFSET, regs->last); - dmadbg(" EBCIMR[%08x]: %08x\n", dmac->base + SAM_DMAC_EBCIMR_OFFSET, regs->ebcimr); - dmadbg(" EBCISR[%08x]: %08x\n", dmac->base + SAM_DMAC_EBCISR_OFFSET, regs->ebcisr); - dmadbg(" CHSR[%08x]: %08x\n", dmac->base + SAM_DMAC_CHSR_OFFSET, regs->chsr); - dmadbg(" WPMR[%08x]: %08x\n", dmac->base + SAM_DMAC_WPMR_OFFSET, regs->wpmr); - dmadbg(" WPSR[%08x]: %08x\n", dmac->base + SAM_DMAC_WPSR_OFFSET, regs->wpsr); - dmadbg(" DMA Channel Registers:\n"); - dmadbg(" SADDR[%08x]: %08x\n", dmach->base + SAM_DMAC_CH_SADDR_OFFSET, regs->saddr); - dmadbg(" DADDR[%08x]: %08x\n", dmach->base + SAM_DMAC_CH_DADDR_OFFSET, regs->daddr); - dmadbg(" DSCR[%08x]: %08x\n", dmach->base + SAM_DMAC_CH_DSCR_OFFSET, regs->dscr); - dmadbg(" CTRLA[%08x]: %08x\n", dmach->base + SAM_DMAC_CH_CTRLA_OFFSET, regs->ctrla); - dmadbg(" CTRLB[%08x]: %08x\n", dmach->base + SAM_DMAC_CH_CTRLB_OFFSET, regs->ctrlb); - dmadbg(" CFG[%08x]: %08x\n", dmach->base + SAM_DMAC_CH_CFG_OFFSET, regs->cfg); - dmadbg(" SPIP[%08x]: %08x\n", dmach->base + SAM_DMAC_CH_SPIP_OFFSET, regs->spip); - dmadbg(" DPIP[%08x]: %08x\n", dmach->base + SAM_DMAC_CH_DPIP_OFFSET, regs->dpip); + dmainfo("%s\n", msg); + dmainfo(" DMA Global Registers:\n"); + dmainfo(" GCFG[%08x]: %08x\n", dmac->base + SAM_DMAC_GCFG_OFFSET, regs->gcfg); + dmainfo(" EN[%08x]: %08x\n", dmac->base + SAM_DMAC_EN_OFFSET, regs->en); + dmainfo(" SREQ[%08x]: %08x\n", dmac->base + SAM_DMAC_SREQ_OFFSET, regs->sreq); + dmainfo(" CREQ[%08x]: %08x\n", dmac->base + SAM_DMAC_CREQ_OFFSET, regs->creq); + dmainfo(" LAST[%08x]: %08x\n", dmac->base + SAM_DMAC_LAST_OFFSET, regs->last); + dmainfo(" EBCIMR[%08x]: %08x\n", dmac->base + SAM_DMAC_EBCIMR_OFFSET, regs->ebcimr); + dmainfo(" EBCISR[%08x]: %08x\n", dmac->base + SAM_DMAC_EBCISR_OFFSET, regs->ebcisr); + dmainfo(" CHSR[%08x]: %08x\n", dmac->base + SAM_DMAC_CHSR_OFFSET, regs->chsr); + dmainfo(" WPMR[%08x]: %08x\n", dmac->base + SAM_DMAC_WPMR_OFFSET, regs->wpmr); + dmainfo(" WPSR[%08x]: %08x\n", dmac->base + SAM_DMAC_WPSR_OFFSET, regs->wpsr); + dmainfo(" DMA Channel Registers:\n"); + dmainfo(" SADDR[%08x]: %08x\n", dmach->base + SAM_DMAC_CH_SADDR_OFFSET, regs->saddr); + dmainfo(" DADDR[%08x]: %08x\n", dmach->base + SAM_DMAC_CH_DADDR_OFFSET, regs->daddr); + dmainfo(" DSCR[%08x]: %08x\n", dmach->base + SAM_DMAC_CH_DSCR_OFFSET, regs->dscr); + dmainfo(" CTRLA[%08x]: %08x\n", dmach->base + SAM_DMAC_CH_CTRLA_OFFSET, regs->ctrla); + dmainfo(" CTRLB[%08x]: %08x\n", dmach->base + SAM_DMAC_CH_CTRLB_OFFSET, regs->ctrlb); + dmainfo(" CFG[%08x]: %08x\n", dmach->base + SAM_DMAC_CH_CFG_OFFSET, regs->cfg); + dmainfo(" SPIP[%08x]: %08x\n", dmach->base + SAM_DMAC_CH_SPIP_OFFSET, regs->spip); + dmainfo(" DPIP[%08x]: %08x\n", dmach->base + SAM_DMAC_CH_DPIP_OFFSET, regs->dpip); } #endif /* CONFIG_DEBUG_DMA */ #endif /* CONFIG_SAMA5_DMAC0 || CONFIG_SAMA5_DMAC1 */ diff --git a/arch/arm/src/sama5/sam_dmac.h b/arch/arm/src/sama5/sam_dmac.h index c9fc885369db4f1e689ebc442b2b638cf47c2a0c..b6ba92c23f1f60f55796ff8def881c5e9e5e9dd2 100644 --- a/arch/arm/src/sama5/sam_dmac.h +++ b/arch/arm/src/sama5/sam_dmac.h @@ -52,7 +52,7 @@ /* Configuration ********************************************************************/ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_DMA #endif diff --git a/arch/arm/src/sama5/sam_ehci.c b/arch/arm/src/sama5/sam_ehci.c index a6cb3d0d7aacbf46ccdd5113dbde8a7e349a461c..78135e3e8da744b05fddac210d79d1b7aa781732 100644 --- a/arch/arm/src/sama5/sam_ehci.c +++ b/arch/arm/src/sama5/sam_ehci.c @@ -112,7 +112,7 @@ /* Debug options */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_USB_INFO # undef CONFIG_SAMA5_EHCI_REGDEBUG #endif @@ -127,13 +127,6 @@ # undef CONFIG_SAMA5_UHPHS_RHPORT1 #endif -/* Simplify DEBUG checks */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_USB -#endif - /* For now, suppress use of PORTA in any event. I use that for SAM-BA and * would prefer that the board not try to drive VBUS on that port! */ @@ -635,7 +628,7 @@ static uint32_t sam_swap32(uint32_t value) static void sam_printreg(volatile uint32_t *regaddr, uint32_t regval, bool iswrite) { - lldbg("%08x%s%08x\n", (uintptr_t)regaddr, iswrite ? "<-" : "->", regval); + uinfo("%08x%s%08x\n", (uintptr_t)regaddr, iswrite ? "<-" : "->", regval); } #endif @@ -686,7 +679,7 @@ static void sam_checkreg(volatile uint32_t *regaddr, uint32_t regval, bool iswri { /* No.. More than one. */ - lldbg("[repeats %d more times]\n", count); + uinfo("[repeats %d more times]\n", count); } } @@ -1275,13 +1268,13 @@ static int sam_qh_flush(struct sam_qh_s *qh) #ifdef CONFIG_SAMA5_EHCI_REGDEBUG static void sam_qtd_print(struct sam_qtd_s *qtd) { - udbg(" QTD[%p]:\n", qtd); - udbg(" hw:\n"); - udbg(" nqp: %08x alt: %08x token: %08x\n", - qtd->hw.nqp, qtd->hw.alt, qtd->hw.token); - udbg(" bpl: %08x %08x %08x %08x %08x\n", - qtd->hw.bpl[0], qtd->hw.bpl[1], qtd->hw.bpl[2], - qtd->hw.bpl[3], qtd->hw.bpl[4]); + uinfo(" QTD[%p]:\n", qtd); + uinfo(" hw:\n"); + uinfo(" nqp: %08x alt: %08x token: %08x\n", + qtd->hw.nqp, qtd->hw.alt, qtd->hw.token); + uinfo(" bpl: %08x %08x %08x %08x %08x\n", + qtd->hw.bpl[0], qtd->hw.bpl[1], qtd->hw.bpl[2], + qtd->hw.bpl[3], qtd->hw.bpl[4]); } #endif @@ -1299,30 +1292,30 @@ static void sam_qh_print(struct sam_qh_s *qh) struct sam_epinfo_s *epinfo; struct ehci_overlay_s *overlay; - udbg("QH[%p]:\n", qh); - udbg(" hw:\n"); - udbg(" hlp: %08x epchar: %08x epcaps: %08x cqp: %08x\n", - qh->hw.hlp, qh->hw.epchar, qh->hw.epcaps, qh->hw.cqp); + uinfo("QH[%p]:\n", qh); + uinfo(" hw:\n"); + uinfo(" hlp: %08x epchar: %08x epcaps: %08x cqp: %08x\n", + qh->hw.hlp, qh->hw.epchar, qh->hw.epcaps, qh->hw.cqp); overlay = &qh->hw.overlay; - udbg(" overlay:\n"); - udbg(" nqp: %08x alt: %08x token: %08x\n", - overlay->nqp, overlay->alt, overlay->token); - udbg(" bpl: %08x %08x %08x %08x %08x\n", - overlay->bpl[0], overlay->bpl[1], overlay->bpl[2], - overlay->bpl[3], overlay->bpl[4]); + uinfo(" overlay:\n"); + uinfo(" nqp: %08x alt: %08x token: %08x\n", + overlay->nqp, overlay->alt, overlay->token); + uinfo(" bpl: %08x %08x %08x %08x %08x\n", + overlay->bpl[0], overlay->bpl[1], overlay->bpl[2], + overlay->bpl[3], overlay->bpl[4]); - udbg(" fqp:\n", qh->fqp); + uinfo(" fqp:\n", qh->fqp); epinfo = qh->epinfo; - udbg(" epinfo[%p]:\n", epinfo); + uinfo(" epinfo[%p]:\n", epinfo); if (epinfo) { - udbg(" EP%d DIR=%s FA=%08x TYPE=%d MaxPacket=%d\n", - epinfo->epno, epinfo->dirin ? "IN" : "OUT", epinfo->devaddr, - epinfo->xfrtype, epinfo->maxpacket); - udbg(" Toggle=%d iocwait=%d speed=%d result=%d\n", - epinfo->toggle, epinfo->iocwait, epinfo->speed, epinfo->result); + uinfo(" EP%d DIR=%s FA=%08x TYPE=%d MaxPacket=%d\n", + epinfo->epno, epinfo->dirin ? "IN" : "OUT", epinfo->devaddr, + epinfo->xfrtype, epinfo->maxpacket); + uinfo(" Toggle=%d iocwait=%d speed=%d result=%d\n", + epinfo->toggle, epinfo->iocwait, epinfo->speed, epinfo->result); } } #endif @@ -1928,7 +1921,7 @@ static int sam_async_setup(struct sam_rhport_s *rhport, #ifdef CONFIG_USBHOST_TRACE usbhost_vtrace2(EHCI_VTRACE2_ASYNCXFR, epinfo->epno, buflen); #else - uvdbg("RHport%d EP%d: buffer=%p, buflen=%d, req=%p\n", + uinfo("RHport%d EP%d: buffer=%p, buflen=%d, req=%p\n", RHPORT(rhport), epinfo->epno, buffer, buflen, req); #endif @@ -2206,7 +2199,7 @@ static int sam_intr_setup(struct sam_rhport_s *rhport, #ifdef CONFIG_USBHOST_TRACE usbhost_vtrace2(EHCI_VTRACE2_INTRXFR, epinfo->epno, buflen); #else - uvdbg("RHport%d EP%d: buffer=%p, buflen=%d\n", + uinfo("RHport%d EP%d: buffer=%p, buflen=%d\n", RHPORT(rhport), epinfo->epno, buffer, buflen); #endif @@ -3187,7 +3180,7 @@ static int sam_ehci_tophalf(int irq, FAR void *context) #ifdef CONFIG_USBHOST_TRACE usbhost_vtrace1(EHCI_VTRACE1_TOPHALF, usbsts & regval); #else - ullvdbg("USBSTS: %08x USBINTR: %08x\n", usbsts, regval); + uinfo("USBSTS: %08x USBINTR: %08x\n", usbsts, regval); #endif /* Handle all unmasked interrupt sources */ @@ -3730,7 +3723,7 @@ static int sam_epalloc(FAR struct usbhost_driver_s *drvr, #ifdef CONFIG_USBHOST_TRACE usbhost_vtrace2(EHCI_VTRACE2_EPALLOC, epdesc->addr, epdesc->xfrtype); #else - uvdbg("EP%d DIR=%s FA=%08x TYPE=%d Interval=%d MaxPacket=%d\n", + uinfo("EP%d DIR=%s FA=%08x TYPE=%d Interval=%d MaxPacket=%d\n", epdesc->addr, epdesc->in ? "IN" : "OUT", hport->funcaddr, epdesc->xfrtype, epdesc->interval, epdesc->mxpacketsize); #endif @@ -4019,7 +4012,7 @@ static int sam_ctrlin(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, #ifdef CONFIG_USBHOST_TRACE usbhost_vtrace2(EHCI_VTRACE2_CTRLINOUT, RHPORT(rhport), req->req); #else - uvdbg("RHPort%d type: %02x req: %02x value: %02x%02x index: %02x%02x len: %04x\n", + uinfo("RHPort%d type: %02x req: %02x value: %02x%02x index: %02x%02x len: %04x\n", RHPORT(rhport), req->type, req->req, req->value[1], req->value[0], req->index[1], req->index[0], len); #endif @@ -4042,7 +4035,7 @@ static int sam_ctrlin(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, ret = sam_async_setup(rhport, ep0info, req, buffer, len); if (ret < 0) { - udbg("ERROR: sam_async_setup failed: %d\n", ret); + uerr("ERROR: sam_async_setup failed: %d\n", ret); goto errout_with_iocwait; } @@ -4160,7 +4153,7 @@ static ssize_t sam_transfer(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep, if (ret < 0) { - udbg("ERROR: Transfer setup failed: %d\n", ret); + uerr("ERROR: Transfer setup failed: %d\n", ret); goto errout_with_iocwait; } @@ -4500,7 +4493,7 @@ static int sam_connect(FAR struct usbhost_driver_s *drvr, /* Set the connected/disconnected flag */ hport->connected = connected; - ullvdbg("Hub port %d connected: %s\n", hport->port, connected ? "YES" : "NO"); + uinfo("Hub port %d connected: %s\n", hport->port, connected ? "YES" : "NO"); /* Report the connection event */ @@ -4701,7 +4694,7 @@ FAR struct usbhost_connection_s *sam_ehci_initialize(int controller) FAR struct usbhost_hubport_s *hport; irqstate_t flags; uint32_t regval; -#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_ASSERTIONS) uint16_t regval16; unsigned int nports; #endif @@ -4952,7 +4945,7 @@ FAR struct usbhost_connection_s *sam_ehci_initialize(int controller) sam_putreg(EHCI_INT_ALLINTS, &HCOR->usbsts); -#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_ASSERTIONS) /* Show the EHCI version */ regval16 = sam_swap16(HCCR->hciversion); diff --git a/arch/arm/src/sama5/sam_emaca.c b/arch/arm/src/sama5/sam_emaca.c index 5d3ad03e60beb7ae8b113390ae3ba87dbae656ad..3972f2324ac5b37fc2f0869a646b21d6d4b5f591 100644 --- a/arch/arm/src/sama5/sam_emaca.c +++ b/arch/arm/src/sama5/sam_emaca.c @@ -223,7 +223,7 @@ * enabled. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_NET_INFO # undef CONFIG_SAMA5_EMACA_REGDEBUG #endif @@ -267,9 +267,9 @@ struct sam_emac_s WDOG_ID txpoll; /* TX poll timer */ WDOG_ID txtimeout; /* TX timeout timer */ - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ - struct net_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by the network */ /* Used to track transmit and receive descriptors */ @@ -335,7 +335,7 @@ static uint8_t g_rxbuffer[CONFIG_SAMA5_EMAC_NRXBUFFERS * EMAC_RX_UNITSIZE] ****************************************************************************/ /* Register operations ******************************************************/ -#if defined(CONFIG_SAMA5_EMACA_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_SAMA5_EMACA_REGDEBUG static bool sam_checkreg(struct sam_emac_s *priv, bool wr, uint32_t regval, uintptr_t address); static uint32_t sam_getreg(struct sam_emac_s *priv, uintptr_t addr); @@ -390,7 +390,7 @@ static int sam_ioctl(struct net_driver_s *dev, int cmd, long arg); /* PHY Initialization */ -#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_INFO) static void sam_phydump(struct sam_emac_s *priv); #else # define sam_phydump(priv) @@ -461,7 +461,7 @@ static bool sam_checkreg(struct sam_emac_s *priv, bool wr, uint32_t regval, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", priv->ntimes); + ninfo("...[Repeats %d times]...\n", priv->ntimes); } /* Save information about the new access */ @@ -493,7 +493,7 @@ static uint32_t sam_getreg(struct sam_emac_s *priv, uintptr_t address) if (sam_checkreg(priv, false, regval, address)) { - lldbg("%08x->%08x\n", address, regval); + ninfo("%08x->%08x\n", address, regval); } return regval; @@ -514,7 +514,7 @@ static void sam_putreg(struct sam_emac_s *priv, uintptr_t address, { if (sam_checkreg(priv, true, regval, address)) { - lldbg("%08x<-%08x\n", address, regval); + ninfo("%08x<-%08x\n", address, regval); } putreg32(regval, address); @@ -607,7 +607,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv) priv->txdesc = (struct emac_txdesc_s *)kmm_memalign(8, allocsize); if (!priv->txdesc) { - nlldbg("ERROR: Failed to allocate TX descriptors\n"); + nerr("ERROR: Failed to allocate TX descriptors\n"); return -ENOMEM; } @@ -617,7 +617,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv) priv->rxdesc = (struct emac_rxdesc_s *)kmm_memalign(8, allocsize); if (!priv->rxdesc) { - nlldbg("ERROR: Failed to allocate RX descriptors\n"); + nerr("ERROR: Failed to allocate RX descriptors\n"); sam_buffer_free(priv); return -ENOMEM; } @@ -628,7 +628,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv) priv->txbuffer = (uint8_t *)kmm_memalign(8, allocsize); if (!priv->txbuffer) { - nlldbg("ERROR: Failed to allocate TX buffer\n"); + nerr("ERROR: Failed to allocate TX buffer\n"); sam_buffer_free(priv); return -ENOMEM; } @@ -637,7 +637,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv) priv->rxbuffer = (uint8_t *)kmm_memalign(8, allocsize); if (!priv->rxbuffer) { - nlldbg("ERROR: Failed to allocate RX buffer\n"); + nerr("ERROR: Failed to allocate RX buffer\n"); sam_buffer_free(priv); return -ENOMEM; } @@ -725,14 +725,14 @@ static int sam_transmit(struct sam_emac_s *priv) uint32_t regval; uint32_t status; - nllvdbg("d_len: %d txhead: %d\n", dev->d_len, priv->txhead); + ninfo("d_len: %d txhead: %d\n", dev->d_len, priv->txhead); sam_dumppacket("Transmit packet", dev->d_buf, dev->d_len); /* Check parameter */ if (dev->d_len > EMAC_TX_UNITSIZE) { - nlldbg("ERROR: Packet too big: %d\n", dev->d_len); + nerr("ERROR: Packet too big: %d\n", dev->d_len); return -EINVAL; } @@ -744,7 +744,7 @@ static int sam_transmit(struct sam_emac_s *priv) if (sam_txfree(priv) < 1) { - nlldbg("ERROR: No free TX descriptors\n"); + nerr("ERROR: No free TX descriptors\n"); return -EBUSY; } @@ -806,7 +806,7 @@ static int sam_transmit(struct sam_emac_s *priv) if (sam_txfree(priv) < 1) { - nllvdbg("Disabling RX interrupts\n"); + ninfo("Disabling RX interrupts\n"); sam_putreg(priv, SAM_EMAC_IDR, EMAC_INT_RCOMP); } @@ -817,7 +817,7 @@ static int sam_transmit(struct sam_emac_s *priv) * Function: sam_txpoll * * Description: - * The transmitter is available, check if uIP has any outgoing packets ready + * The transmitter is available, check if the network has any outgoing packets ready * to send. This is a callback from devif_poll(). devif_poll() may be called: * * 1. When the preceding TX packet send is complete, @@ -926,7 +926,7 @@ static void sam_dopoll(struct sam_emac_s *priv) if (sam_txfree(priv) > 0) { - /* If we have the descriptor, then poll uIP for new XMIT data. */ + /* If we have the descriptor, then poll the network for new XMIT data. */ (void)devif_poll(dev, sam_txpoll); } @@ -986,7 +986,7 @@ static int sam_recvframe(struct sam_emac_s *priv) arch_invalidate_dcache((uintptr_t)rxdesc, (uintptr_t)rxdesc + sizeof(struct emac_rxdesc_s)); - nllvdbg("rxndx: %d\n", rxndx); + ninfo("rxndx: %d\n", rxndx); while ((rxdesc->addr & EMACRXD_ADDR_OWNER) != 0) { @@ -1042,7 +1042,7 @@ static int sam_recvframe(struct sam_emac_s *priv) { if (rxndx == priv->rxndx) { - nllvdbg("ERROR: No EOF (Invalid of buffers too small)\n"); + nerr("ERROR: No EOF (Invalid of buffers too small)\n"); do { /* Give ownership back to the EMAC */ @@ -1097,7 +1097,7 @@ static int sam_recvframe(struct sam_emac_s *priv) /* Frame size from the EMAC */ dev->d_len = (rxdesc->status & EMACRXD_STA_FRLEN_MASK); - nllvdbg("packet %d-%d (%d)\n", priv->rxndx, rxndx, dev->d_len); + ninfo("packet %d-%d (%d)\n", priv->rxndx, rxndx, dev->d_len); /* All data have been copied in the application frame buffer, * release the RX descriptor @@ -1128,11 +1128,11 @@ static int sam_recvframe(struct sam_emac_s *priv) * all of the data. */ - nllvdbg("rxndx: %d d_len: %d\n", priv->rxndx, dev->d_len); + ninfo("rxndx: %d d_len: %d\n", priv->rxndx, dev->d_len); if (pktlen < dev->d_len) { - nlldbg("ERROR: Buffer size %d; frame size %d\n", dev->d_len, pktlen); + nerr("ERROR: Buffer size %d; frame size %d\n", dev->d_len, pktlen); return -E2BIG; } @@ -1172,7 +1172,7 @@ static int sam_recvframe(struct sam_emac_s *priv) /* No packet was found */ priv->rxndx = rxndx; - nllvdbg("rxndx: %d\n", priv->rxndx); + ninfo("rxndx: %d\n", priv->rxndx); return -EAGAIN; } @@ -1206,13 +1206,13 @@ static void sam_receive(struct sam_emac_s *priv) { sam_dumppacket("Received packet", dev->d_buf, dev->d_len); - /* Check if the packet is a valid size for the uIP buffer configuration + /* Check if the packet is a valid size for the network buffer configuration * (this should not happen) */ if (dev->d_len > CONFIG_NET_ETH_MTU) { - nlldbg("DROPPED: Too big: %d\n", dev->d_len); + nwarn("WARNING: Dropped, Too big: %d\n", dev->d_len); continue; } @@ -1227,7 +1227,7 @@ static void sam_receive(struct sam_emac_s *priv) #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); /* Handle ARP on input then give the IPv4 packet to the network * layer @@ -1267,7 +1267,7 @@ static void sam_receive(struct sam_emac_s *priv) #ifdef CONFIG_NET_IPv6 if (BUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); /* Give the IPv6 packet to the network layer */ @@ -1304,7 +1304,7 @@ static void sam_receive(struct sam_emac_s *priv) #ifdef CONFIG_NET_ARP if (BUF->type == htons(ETHTYPE_ARP)) { - nllvdbg("ARP frame\n"); + ninfo("ARP frame\n"); /* Handle ARP packet */ @@ -1322,7 +1322,7 @@ static void sam_receive(struct sam_emac_s *priv) else #endif { - nlldbg("DROPPED: Unknown type: %04x\n", BUF->type); + nwarn("WARNING: Dropped, Unknown type: %04x\n", BUF->type); } } } @@ -1410,7 +1410,7 @@ static void sam_txdone(struct sam_emac_s *priv) sam_putreg(priv, SAM_EMAC_IER, EMAC_INT_RCOMP); } - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ sam_dopoll(priv); } @@ -1449,7 +1449,7 @@ static int sam_emac_interrupt(int irq, void *context) imr = sam_getreg(priv, SAM_EMAC_IMR); pending = isr & ~(imr | EMAC_INT_UNUSED); - nllvdbg("isr: %08x pending: %08x\n", isr, pending); + ninfo("isr: %08x pending: %08x\n", isr, pending); /* Check for the completion of a transmission. This should be done before * checking for received data (because receiving can cause another transmission @@ -1475,7 +1475,7 @@ static int sam_emac_interrupt(int irq, void *context) clrbits = EMAC_TSR_RLES | sam_txinuse(priv); sam_txreset(priv); - nlldbg("ERROR: Retry Limit Exceeded TSR: %08x\n", tsr); + nerr("ERROR: Retry Limit Exceeded TSR: %08x\n", tsr); regval = sam_getreg(priv, SAM_EMAC_NCR); regval |= EMAC_NCR_TE; @@ -1486,7 +1486,7 @@ static int sam_emac_interrupt(int irq, void *context) if ((tsr & EMAC_TSR_COL) != 0) { - nlldbg("ERROR: Collision occurred TSR: %08x\n", tsr); + nerr("ERROR: Collision occurred TSR: %08x\n", tsr); clrbits |= EMAC_TSR_COL; } @@ -1494,7 +1494,7 @@ static int sam_emac_interrupt(int irq, void *context) if ((tsr & EMAC_TSR_BEX) != 0) { - nlldbg("ERROR: Buffers exhausted mid-frame TSR: %08x\n", tsr); + nerr("ERROR: Buffers exhausted mid-frame TSR: %08x\n", tsr); clrbits |= EMAC_TSR_BEX; } @@ -1509,7 +1509,7 @@ static int sam_emac_interrupt(int irq, void *context) if ((tsr & EMAC_TSR_UND) != 0) { - nlldbg("ERROR: Transmit Underrun TSR: %08x\n", tsr); + nerr("ERROR: Transmit Underrun TSR: %08x\n", tsr); clrbits |= EMAC_TSR_UND; } @@ -1546,7 +1546,7 @@ static int sam_emac_interrupt(int irq, void *context) if ((rsr & EMAC_RSR_OVR) != 0) { - nlldbg("ERROR: Receiver overrun RSR: %08x\n", rsr); + nerr("ERROR: Receiver overrun RSR: %08x\n", rsr); clrbits |= EMAC_RSR_OVR; } @@ -1563,7 +1563,7 @@ static int sam_emac_interrupt(int irq, void *context) if ((rsr & EMAC_RSR_BNA) != 0) { - nlldbg("ERROR: Buffer not available RSR: %08x\n", rsr); + nerr("ERROR: Buffer not available RSR: %08x\n", rsr); clrbits |= EMAC_RSR_BNA; } @@ -1584,7 +1584,7 @@ static int sam_emac_interrupt(int irq, void *context) if ((pending & EMAC_INT_PFR) != 0) { - nlldbg("Pause frame received\n"); + nwarn("WARNING: Pause frame received\n"); } /* Check for Pause Time Zero (PTZ) @@ -1594,7 +1594,7 @@ static int sam_emac_interrupt(int irq, void *context) if ((pending & EMAC_INT_PTZ) != 0) { - nlldbg("Pause TO!\n"); + nwarn("WARNING: Pause TO!\n"); } #endif @@ -1624,7 +1624,7 @@ static void sam_txtimeout(int argc, uint32_t arg, ...) { struct sam_emac_s *priv = (struct sam_emac_s *)arg; - nlldbg("Timeout!\n"); + nerr("ERROR: Timeout!\n"); /* Then reset the hardware. Just take the interface down, then back * up again. @@ -1633,7 +1633,7 @@ static void sam_txtimeout(int argc, uint32_t arg, ...) sam_ifdown(&priv->dev); sam_ifup(&priv->dev); - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ sam_dopoll(priv); } @@ -1667,7 +1667,7 @@ static void sam_polltimer(int argc, uint32_t arg, ...) if (sam_txfree(priv) > 0) { - /* Update TCP timing states and poll uIP for new XMIT data. */ + /* Update TCP timing states and poll the network for new XMIT data. */ (void)devif_timer(dev, sam_txpoll); } @@ -1699,13 +1699,13 @@ static int sam_ifup(struct net_driver_s *dev) struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; int ret; - nlldbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); /* Configure the EMAC interface for normal operation. */ - nllvdbg("Initialize the EMAC\n"); + ninfo("Initialize the EMAC\n"); sam_emac_configure(priv); /* Set the MAC address (should have been configured while we were down) */ @@ -1723,7 +1723,7 @@ static int sam_ifup(struct net_driver_s *dev) ret = sam_phyinit(priv); if (ret < 0) { - nlldbg("ERROR: sam_phyinit failed: %d\n", ret); + nerr("ERROR: sam_phyinit failed: %d\n", ret); return ret; } @@ -1732,16 +1732,16 @@ static int sam_ifup(struct net_driver_s *dev) ret = sam_autonegotiate(priv); if (ret < 0) { - nlldbg("ERROR: sam_autonegotiate failed: %d\n", ret); + nerr("ERROR: sam_autonegotiate failed: %d\n", ret); return ret; } while (sam_linkup(priv) == 0); - nllvdbg("Link detected \n"); + ninfo("Link detected \n"); /* Enable normal MAC operation */ - nllvdbg("Enable normal operation\n"); + ninfo("Enable normal operation\n"); /* Set and activate a timer process */ @@ -1775,7 +1775,7 @@ static int sam_ifdown(struct net_driver_s *dev) struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; irqstate_t flags; - nlldbg("Taking the network down\n"); + ninfo("Taking the network down\n"); /* Disable the EMAC interrupt */ @@ -1825,7 +1825,7 @@ static int sam_txavail(struct net_driver_s *dev) struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; irqstate_t flags; - nllvdbg("ifup: %d\n", priv->ifup); + ninfo("ifup: %d\n", priv->ifup); /* Disable interrupts because this function may be called from interrupt * level processing. @@ -1837,7 +1837,7 @@ static int sam_txavail(struct net_driver_s *dev) if (priv->ifup) { - /* Poll uIP for new XMIT data */ + /* Poll the network for new XMIT data */ sam_dopoll(priv); } @@ -2003,8 +2003,8 @@ static int sam_addmac(struct net_driver_s *dev, const uint8_t *mac) unsigned int bit; UNUSED(priv); - nllvdbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); /* Calculate the 6-bit has table index */ @@ -2077,8 +2077,8 @@ static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac) unsigned int bit; UNUSED(priv); - nllvdbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); /* Calculate the 6-bit has table index */ @@ -2260,7 +2260,7 @@ static int sam_ioctl(struct net_driver_s *dev, int cmd, long arg) * ****************************************************************************/ -#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_INFO) static void sam_phydump(struct sam_emac_s *priv) { uint32_t regval; @@ -2273,21 +2273,21 @@ static void sam_phydump(struct sam_emac_s *priv) sam_putreg(priv, SAM_EMAC_NCR, regval); #ifdef CONFIG_SAMA5_EMAC_RMII - nllvdbg("RMII Registers (Address %02x)\n", priv->phyaddr); + ninfo("RMII Registers (Address %02x)\n", priv->phyaddr); #else /* defined(CONFIG_SAMA5_EMAC_MII) */ - nllvdbg("MII Registers (Address %02x)\n", priv->phyaddr); + ninfo("MII Registers (Address %02x)\n", priv->phyaddr); #endif sam_phyread(priv, priv->phyaddr, MII_MCR, &phyval); - nllvdbg(" MCR: %04x\n", phyval); + ninfo(" MCR: %04x\n", phyval); sam_phyread(priv, priv->phyaddr, MII_MSR, &phyval); - nllvdbg(" MSR: %04x\n", phyval); + ninfo(" MSR: %04x\n", phyval); sam_phyread(priv, priv->phyaddr, MII_ADVERTISE, &phyval); - nllvdbg(" ADVERTISE: %04x\n", phyval); + ninfo(" ADVERTISE: %04x\n", phyval); sam_phyread(priv, priv->phyaddr, MII_LPA, &phyval); - nllvdbg(" LPR: %04x\n", phyval); + ninfo(" LPR: %04x\n", phyval); sam_phyread(priv, priv->phyaddr, CONFIG_SAMA5_EMAC_PHYSR, &phyval); - nllvdbg(" PHYSR: %04x\n", phyval); + ninfo(" PHYSR: %04x\n", phyval); /* Disable management port */ @@ -2410,7 +2410,7 @@ static int sam_phyreset(struct sam_emac_s *priv) int timeout; int ret; - nllvdbg(" sam_phyreset\n"); + ninfo(" sam_phyreset\n"); /* Enable management port */ @@ -2423,7 +2423,7 @@ static int sam_phyreset(struct sam_emac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, MII_MCR, MII_MCR_RESET); if (ret < 0) { - nlldbg("ERROR: sam_phywrite failed: %d\n", ret); + nerr("ERROR: sam_phywrite failed: %d\n", ret); } /* Wait for the PHY reset to complete */ @@ -2435,7 +2435,7 @@ static int sam_phyreset(struct sam_emac_s *priv) int result = sam_phyread(priv, priv->phyaddr, MII_MCR, &mcr); if (result < 0) { - nlldbg("ERROR: Failed to read the MCR register: %d\n", ret); + nerr("ERROR: Failed to read the MCR register: %d\n", ret); ret = result; } else if ((mcr & MII_MCR_RESET) == 0) @@ -2477,7 +2477,7 @@ static int sam_phyfind(struct sam_emac_s *priv, uint8_t *phyaddr) unsigned int offset; int ret = -ESRCH; - nllvdbg("Find a valid PHY address\n"); + ninfo("Find a valid PHY address\n"); /* Enable management port */ @@ -2500,8 +2500,8 @@ static int sam_phyfind(struct sam_emac_s *priv, uint8_t *phyaddr) else { - nlldbg("ERROR: sam_phyread failed for PHY address %02x: %d\n", - candidate, ret); + nerr("ERROR: sam_phyread failed for PHY address %02x: %d\n", + candidate, ret); for (offset = 0; offset < 32; offset++) { @@ -2522,10 +2522,10 @@ static int sam_phyfind(struct sam_emac_s *priv, uint8_t *phyaddr) if (ret == OK) { - nllvdbg(" PHYID1: %04x PHY addr: %d\n", phyval, candidate); + ninfo(" PHYID1: %04x PHY addr: %d\n", phyval, candidate); *phyaddr = candidate; sam_phyread(priv, candidate, CONFIG_SAMA5_EMAC_PHYSR, &phyval); - nllvdbg(" PHYSR: %04x PHY addr: %d\n", phyval, candidate); + ninfo(" PHYSR: %04x PHY addr: %d\n", phyval, candidate); } /* Disable management port */ @@ -2566,7 +2566,7 @@ static int sam_phyread(struct sam_emac_s *priv, uint8_t phyaddr, ret = sam_phywait(priv); if (ret < 0) { - nlldbg("ERROR: sam_phywait failed: %d\n", ret); + nerr("ERROR: sam_phywait failed: %d\n", ret); return ret; } @@ -2581,7 +2581,7 @@ static int sam_phyread(struct sam_emac_s *priv, uint8_t phyaddr, ret = sam_phywait(priv); if (ret < 0) { - nlldbg("ERROR: sam_phywait failed: %d\n", ret); + nerr("ERROR: sam_phywait failed: %d\n", ret); return ret; } @@ -2621,7 +2621,7 @@ static int sam_phywrite(struct sam_emac_s *priv, uint8_t phyaddr, ret = sam_phywait(priv); if (ret < 0) { - nlldbg("ERROR: sam_phywait failed: %d\n", ret); + nerr("ERROR: sam_phywait failed: %d\n", ret); return ret; } @@ -2636,7 +2636,7 @@ static int sam_phywrite(struct sam_emac_s *priv, uint8_t phyaddr, ret = sam_phywait(priv); if (ret < 0) { - nlldbg("ERROR: sam_phywait failed: %d\n", ret); + nerr("ERROR: sam_phywait failed: %d\n", ret); return ret; } @@ -2680,32 +2680,32 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_PHYID1, &phyid1); if (ret < 0) { - nlldbg("ERROR: Failed to read PHYID1\n"); + nerr("ERROR: Failed to read PHYID1\n"); goto errout; } - nllvdbg("PHYID1: %04x PHY address: %02x\n", phyid1, priv->phyaddr); + ninfo("PHYID1: %04x PHY address: %02x\n", phyid1, priv->phyaddr); ret = sam_phyread(priv, priv->phyaddr, MII_PHYID2, &phyid2); if (ret < 0) { - nlldbg("ERROR: Failed to read PHYID2\n"); + nerr("ERROR: Failed to read PHYID2\n"); goto errout; } - nllvdbg("PHYID2: %04x PHY address: %02x\n", phyid2, priv->phyaddr); + ninfo("PHYID2: %04x PHY address: %02x\n", phyid2, priv->phyaddr); if (phyid1 == MII_OUI_MSB && ((phyid2 & MII_PHYID2_OUI_MASK) >> MII_PHYID2_OUI_SHIFT) == MII_OUI_LSB) { - nllvdbg(" Vendor Model Number: %04x\n", - (phyid2 & MII_PHYID2_MODEL_MASK) >> MII_PHYID2_MODEL_SHIFT); - nllvdbg(" Model Revision Number: %04x\n", - (phyid2 & MII_PHYID2_REV_MASK) >> MII_PHYID2_REV_SHIFT); + ninfo(" Vendor Model Number: %04x\n", + (phyid2 & MII_PHYID2_MODEL_MASK) >> MII_PHYID2_MODEL_SHIFT); + ninfo(" Model Revision Number: %04x\n", + (phyid2 & MII_PHYID2_REV_MASK) >> MII_PHYID2_REV_SHIFT); } else { - nlldbg("ERROR: PHY not recognized\n"); + nerr("ERROR: PHY not recognized\n"); } /* Setup control register */ @@ -2713,7 +2713,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_MCR, &mcr); if (ret < 0) { - nlldbg("ERROR: Failed to read MCR\n"); + nerr("ERROR: Failed to read MCR\n"); goto errout; } @@ -2724,7 +2724,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, MII_MCR, mcr); if (ret < 0) { - nlldbg("ERROR: Failed to write MCR\n"); + nerr("ERROR: Failed to write MCR\n"); goto errout; } @@ -2739,7 +2739,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, MII_ADVERTISE, advertise); if (ret < 0) { - nlldbg("ERROR: Failed to write ANAR\n"); + nerr("ERROR: Failed to write ANAR\n"); goto errout; } @@ -2748,7 +2748,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_MCR, &mcr); if (ret < 0) { - nlldbg("ERROR: Failed to read MCR\n"); + nerr("ERROR: Failed to read MCR\n"); goto errout; } @@ -2756,7 +2756,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, MII_MCR, mcr); if (ret < 0) { - nlldbg("ERROR: Failed to write MCR\n"); + nerr("ERROR: Failed to write MCR\n"); goto errout; } @@ -2768,11 +2768,11 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, MII_MCR, mcr); if (ret < 0) { - nlldbg("ERROR: Failed to write MCR\n"); + nerr("ERROR: Failed to write MCR\n"); goto errout; } - nllvdbg(" MCR: %04x\n", mcr); + ninfo(" MCR: %04x\n", mcr); /* Check AutoNegotiate complete */ @@ -2782,7 +2782,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_MSR, &msr); if (ret < 0) { - nlldbg("ERROR: Failed to read MSR\n"); + nerr("ERROR: Failed to read MSR\n"); goto errout; } @@ -2792,7 +2792,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) { /* Yes.. break out of the loop */ - nllvdbg("AutoNegotiate complete\n"); + ninfo("AutoNegotiate complete\n"); break; } @@ -2800,7 +2800,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) if (++timeout >= PHY_RETRY_MAX) { - nlldbg("ERROR: TimeOut\n"); + nerr("ERROR: TimeOut\n"); sam_phydump(priv); ret = -ETIMEDOUT; goto errout; @@ -2812,7 +2812,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_LPA, &lpa); if (ret < 0) { - nlldbg("ERROR: Failed to read ANLPAR\n"); + nerr("ERROR: Failed to read ANLPAR\n"); goto errout; } @@ -2902,13 +2902,13 @@ static bool sam_linkup(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_MSR, &msr); if (ret < 0) { - nlldbg("ERROR: Failed to read MSR: %d\n", ret); + nerr("ERROR: Failed to read MSR: %d\n", ret); goto errout; } if ((msr & MII_MSR_LINKSTATUS) == 0) { - nlldbg("ERROR: MSR LinkStatus: %04x\n", msr); + nerr("ERROR: MSR LinkStatus: %04x\n", msr); goto errout; } @@ -2917,7 +2917,7 @@ static bool sam_linkup(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, CONFIG_SAMA5_EMAC_PHYSR, &physr); if (ret < 0) { - nlldbg("ERROR: Failed to read PHYSR: %d\n", ret); + nerr("ERROR: Failed to read PHYSR: %d\n", ret); goto errout; } @@ -2955,7 +2955,7 @@ static bool sam_linkup(struct sam_emac_s *priv) /* Start the EMAC transfers */ - nllvdbg("Link is up\n"); + ninfo("Link is up\n"); linkup = true; errout: @@ -2996,7 +2996,7 @@ static int sam_phyinit(struct sam_emac_s *priv) mck = BOARD_MCK_FREQUENCY; if (mck > (160*1000*1000)) { - ndbg("ERROR: Cannot realize PHY clock\n"); + nerr("ERROR: Cannot realize PHY clock\n"); return -EINVAL; } else if (mck > (80*1000*1000)) @@ -3024,7 +3024,7 @@ static int sam_phyinit(struct sam_emac_s *priv) ret = sam_phyfind(priv, &priv->phyaddr); if (ret < 0) { - nlldbg("ERROR: sam_phyfind failed: %d\n", ret); + nerr("ERROR: sam_phyfind failed: %d\n", ret); return ret; } @@ -3276,11 +3276,11 @@ static void sam_macaddress(struct sam_emac_s *priv) struct net_driver_s *dev = &priv->dev; uint32_t regval; - nllvdbg("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - dev->d_ifname, - dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], - dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], - dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5]); + ninfo("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + dev->d_ifname, + dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], + dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], + dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5]); /* Set the MAC address */ @@ -3342,7 +3342,7 @@ static void sam_ipv6multicast(struct sam_emac_s *priv) mac[4] = tmp16 & 0xff; mac[5] = tmp16 >> 8; - nvdbg("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", + ninfo("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); (void)sam_addmac(dev, mac); @@ -3388,7 +3388,7 @@ static int sam_emac_configure(struct sam_emac_s *priv) { uint32_t regval; - nllvdbg("Entry\n"); + ninfo("Entry\n"); /* Enable clocking to the EMAC peripheral */ @@ -3501,7 +3501,7 @@ int sam_emac_initialize(void) priv->txpoll = wd_create(); if (!priv->txpoll) { - ndbg("ERROR: Failed to create periodic poll timer\n"); + nerr("ERROR: Failed to create periodic poll timer\n"); ret = -EAGAIN; goto errout; } @@ -3509,7 +3509,7 @@ int sam_emac_initialize(void) priv->txtimeout = wd_create(); /* Create TX timeout timer */ if (!priv->txtimeout) { - ndbg("ERROR: Failed to create periodic poll timer\n"); + nerr("ERROR: Failed to create periodic poll timer\n"); ret = -EAGAIN; goto errout_with_txpoll; } @@ -3523,7 +3523,7 @@ int sam_emac_initialize(void) ret = sam_buffer_initialize(priv); if (ret < 0) { - ndbg("ERROR: sam_buffer_initialize failed: %d\n", ret); + nerr("ERROR: sam_buffer_initialize failed: %d\n", ret); goto errout_with_txtimeout; } @@ -3534,7 +3534,7 @@ int sam_emac_initialize(void) ret = irq_attach(SAM_IRQ_EMAC, sam_emac_interrupt); if (ret < 0) { - ndbg("ERROR: Failed to attach the handler to the IRQ%d\n", SAM_IRQ_EMAC); + nerr("ERROR: Failed to attach the handler to the IRQ%d\n", SAM_IRQ_EMAC); goto errout_with_buffers; } @@ -3547,7 +3547,7 @@ int sam_emac_initialize(void) ret = sam_ifdown(&priv->dev); if (ret < 0) { - ndbg("ERROR: Failed to put the interface in the down state: %d\n", ret); + nerr("ERROR: Failed to put the interface in the down state: %d\n", ret); goto errout_with_buffers; } @@ -3559,7 +3559,7 @@ int sam_emac_initialize(void) return ret; } - ndbg("ERROR: netdev_register() failed: %d\n", ret); + nerr("ERROR: netdev_register() failed: %d\n", ret); errout_with_buffers: sam_buffer_free(priv); diff --git a/arch/arm/src/sama5/sam_emacb.c b/arch/arm/src/sama5/sam_emacb.c index fccc2d51f035b440985fd94dd491cf5aa38095b2..9b64fbc5ab9e5557136b9877990667a91d63522f 100644 --- a/arch/arm/src/sama5/sam_emacb.c +++ b/arch/arm/src/sama5/sam_emacb.c @@ -58,7 +58,7 @@ #include -#if defined(CONFIG_DEBUG) && defined(CONFIG_SAMA5_EMACB_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_SAMA5_EMACB_DEBUG) /* Force debug output (from this file only) */ # undef CONFIG_DEBUG_NET @@ -295,7 +295,7 @@ * enabled. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_NET_INFO # undef CONFIG_SAMA5_EMACB_REGDEBUG #endif @@ -421,9 +421,9 @@ struct sam_emac_s struct work_s work; /* For deferring work to the work queue */ #endif - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ - struct net_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by the network */ /* Constant and configured attributes of the EMAC */ @@ -459,7 +459,7 @@ struct sam_emac_s ****************************************************************************/ /* Register operations ******************************************************/ -#if defined(CONFIG_SAMA5_EMACB_REGDEBUG) && defined(CONFIG_DEBUG) +#if defined(CONFIG_SAMA5_EMACB_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES) static bool sam_checkreg(struct sam_emac_s *priv, bool wr, uint32_t regval, uintptr_t address); #endif @@ -536,7 +536,7 @@ static int sam_ioctl(struct net_driver_s *dev, int cmd, long arg); /* PHY Initialization */ -#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_INFO) static void sam_phydump(struct sam_emac_s *priv); #else # define sam_phydump(priv) @@ -820,7 +820,7 @@ static bool sam_checkreg(struct sam_emac_s *priv, bool wr, uint32_t regval, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", priv->ntimes); + ninfo("...[Repeats %d times]...\n", priv->ntimes); } /* Save information about the new access */ @@ -853,7 +853,7 @@ static uint32_t sam_getreg(struct sam_emac_s *priv, uint16_t offset) #ifdef CONFIG_SAMA5_EMACB_REGDEBUG if (sam_checkreg(priv, false, regval, regaddr)) { - lldbg("%08x->%08x\n", regaddr, regval); + ninfo("%08x->%08x\n", regaddr, regval); } #endif @@ -877,7 +877,7 @@ static void sam_putreg(struct sam_emac_s *priv, uint16_t offset, #ifdef CONFIG_SAMA5_EMACB_REGDEBUG if (sam_checkreg(priv, true, regval, regaddr)) { - lldbg("%08x<-%08x\n", regaddr, regval); + ninfo("%08x<-%08x\n", regaddr, regval); } #endif @@ -970,7 +970,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv) priv->txdesc = (struct emac_txdesc_s *)kmm_memalign(8, allocsize); if (!priv->txdesc) { - nlldbg("ERROR: Failed to allocate TX descriptors\n"); + nerr("ERROR: Failed to allocate TX descriptors\n"); return -ENOMEM; } @@ -980,7 +980,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv) priv->rxdesc = (struct emac_rxdesc_s *)kmm_memalign(8, allocsize); if (!priv->rxdesc) { - nlldbg("ERROR: Failed to allocate RX descriptors\n"); + nerr("ERROR: Failed to allocate RX descriptors\n"); sam_buffer_free(priv); return -ENOMEM; } @@ -991,7 +991,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv) priv->txbuffer = (uint8_t *)kmm_memalign(8, allocsize); if (!priv->txbuffer) { - nlldbg("ERROR: Failed to allocate TX buffer\n"); + nerr("ERROR: Failed to allocate TX buffer\n"); sam_buffer_free(priv); return -ENOMEM; } @@ -1000,7 +1000,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv) priv->rxbuffer = (uint8_t *)kmm_memalign(8, allocsize); if (!priv->rxbuffer) { - nlldbg("ERROR: Failed to allocate RX buffer\n"); + nerr("ERROR: Failed to allocate RX buffer\n"); sam_buffer_free(priv); return -ENOMEM; } @@ -1088,14 +1088,14 @@ static int sam_transmit(struct sam_emac_s *priv) uint32_t regval; uint32_t status; - nllvdbg("d_len: %d txhead: %d\n", dev->d_len, priv->txhead); + ninfo("d_len: %d txhead: %d\n", dev->d_len, priv->txhead); sam_dumppacket("Transmit packet", dev->d_buf, dev->d_len); /* Check parameter */ if (dev->d_len > EMAC_TX_UNITSIZE) { - nlldbg("ERROR: Packet too big: %d\n", dev->d_len); + nerr("ERROR: Packet too big: %d\n", dev->d_len); return -EINVAL; } @@ -1107,7 +1107,7 @@ static int sam_transmit(struct sam_emac_s *priv) if (sam_txfree(priv) < 1) { - nlldbg("ERROR: No free TX descriptors\n"); + nerr("ERROR: No free TX descriptors\n"); return -EBUSY; } @@ -1169,7 +1169,7 @@ static int sam_transmit(struct sam_emac_s *priv) if (sam_txfree(priv) < 1) { - nllvdbg("Disabling RX interrupts\n"); + ninfo("Disabling RX interrupts\n"); sam_putreg(priv, SAM_EMAC_IDR_OFFSET, EMAC_INT_RCOMP); } @@ -1180,7 +1180,7 @@ static int sam_transmit(struct sam_emac_s *priv) * Function: sam_txpoll * * Description: - * The transmitter is available, check if uIP has any outgoing packets ready + * The transmitter is available, check if the network has any outgoing packets ready * to send. This is a callback from devif_poll(). devif_poll() may be called: * * 1. When the preceding TX packet send is complete, @@ -1290,7 +1290,7 @@ static void sam_dopoll(struct sam_emac_s *priv) if (sam_txfree(priv) > 0) { - /* If we have the descriptor, then poll uIP for new XMIT data. */ + /* If we have the descriptor, then poll the network for new XMIT data. */ (void)devif_poll(dev, sam_txpoll); } @@ -1349,7 +1349,7 @@ static int sam_recvframe(struct sam_emac_s *priv) arch_invalidate_dcache((uintptr_t)rxdesc, (uintptr_t)rxdesc + sizeof(struct emac_rxdesc_s)); - nllvdbg("rxndx: %d\n", rxndx); + ninfo("rxndx: %d\n", rxndx); while ((rxdesc->addr & EMACRXD_ADDR_OWNER) != 0) { @@ -1405,7 +1405,7 @@ static int sam_recvframe(struct sam_emac_s *priv) { if (rxndx == priv->rxndx) { - nllvdbg("ERROR: No EOF (Invalid of buffers too small)\n"); + nerr("ERROR: No EOF (Invalid of buffers too small)\n"); do { /* Give ownership back to the EMAC */ @@ -1460,7 +1460,7 @@ static int sam_recvframe(struct sam_emac_s *priv) /* Frame size from the EMAC */ dev->d_len = (rxdesc->status & EMACRXD_STA_FRLEN_MASK); - nllvdbg("packet %d-%d (%d)\n", priv->rxndx, rxndx, dev->d_len); + ninfo("packet %d-%d (%d)\n", priv->rxndx, rxndx, dev->d_len); /* All data have been copied in the application frame buffer, * release the RX descriptor @@ -1491,11 +1491,11 @@ static int sam_recvframe(struct sam_emac_s *priv) * all of the data. */ - nllvdbg("rxndx: %d d_len: %d\n", priv->rxndx, dev->d_len); + ninfo("rxndx: %d d_len: %d\n", priv->rxndx, dev->d_len); if (pktlen < dev->d_len) { - nlldbg("ERROR: Buffer size %d; frame size %d\n", - dev->d_len, pktlen); + nerr("ERROR: Buffer size %d; frame size %d\n", + dev->d_len, pktlen); return -E2BIG; } @@ -1535,7 +1535,7 @@ static int sam_recvframe(struct sam_emac_s *priv) /* No packet was found */ priv->rxndx = rxndx; - nllvdbg("rxndx: %d\n", priv->rxndx); + ninfo("rxndx: %d\n", priv->rxndx); return -EAGAIN; } @@ -1569,13 +1569,13 @@ static void sam_receive(struct sam_emac_s *priv) { sam_dumppacket("Received packet", dev->d_buf, dev->d_len); - /* Check if the packet is a valid size for the uIP buffer configuration + /* Check if the packet is a valid size for the network buffer configuration * (this should not happen) */ if (dev->d_len > CONFIG_NET_ETH_MTU) { - nlldbg("DROPPED: Too big: %d\n", dev->d_len); + nwarn("WARNING: Dropped, Too big: %d\n", dev->d_len); continue; } @@ -1590,7 +1590,7 @@ static void sam_receive(struct sam_emac_s *priv) #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); /* Handle ARP on input then give the IPv4 packet to the network * layer @@ -1630,7 +1630,7 @@ static void sam_receive(struct sam_emac_s *priv) #ifdef CONFIG_NET_IPv6 if (BUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); /* Give the IPv6 packet to the network layer */ @@ -1667,7 +1667,7 @@ static void sam_receive(struct sam_emac_s *priv) #ifdef CONFIG_NET_ARP if (BUF->type == htons(ETHTYPE_ARP)) { - nllvdbg("ARP frame\n"); + ninfo("ARP frame\n"); /* Handle ARP packet */ @@ -1685,7 +1685,7 @@ static void sam_receive(struct sam_emac_s *priv) else #endif { - nlldbg("DROPPED: Unknown type: %04x\n", BUF->type); + nwarn("WARNING: Dropped, Unknown type: %04x\n", BUF->type); } } } @@ -1797,7 +1797,7 @@ static void sam_txdone(struct sam_emac_s *priv) sam_putreg(priv, SAM_EMAC_IER_OFFSET, EMAC_INT_RCOMP); } - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ sam_dopoll(priv); } @@ -1836,7 +1836,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv) imr = sam_getreg(priv, SAM_EMAC_IMR_OFFSET); pending = isr & ~(imr | EMAC_INT_UNUSED); - nllvdbg("isr: %08x pending: %08x\n", isr, pending); + ninfo("isr: %08x pending: %08x\n", isr, pending); /* Check for the completion of a transmission. This should be done before * checking for received data (because receiving can cause another transmission @@ -1862,7 +1862,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv) clrbits = EMAC_TSR_RLE | sam_txinuse(priv); sam_txreset(priv); - nlldbg("ERROR: Retry Limit Exceeded TSR: %08x\n", tsr); + nerr("ERROR: Retry Limit Exceeded TSR: %08x\n", tsr); regval = sam_getreg(priv, SAM_EMAC_NCR_OFFSET); regval |= EMAC_NCR_TXEN; @@ -1873,7 +1873,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv) if ((tsr & EMAC_TSR_COL) != 0) { - nlldbg("ERROR: Collision occurred TSR: %08x\n", tsr); + nerr("ERROR: Collision occurred TSR: %08x\n", tsr); clrbits |= EMAC_TSR_COL; } @@ -1881,7 +1881,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv) if ((tsr & EMAC_TSR_TFC) != 0) { - nlldbg("ERROR: Transmit Frame Corruption due to AHB error: %08x\n", tsr); + nerr("ERROR: Transmit Frame Corruption due to AHB error: %08x\n", tsr); clrbits |= EMAC_TSR_TFC; } @@ -1896,7 +1896,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv) if ((tsr & EMAC_TSR_UND) != 0) { - nlldbg("ERROR: Transmit Underrun TSR: %08x\n", tsr); + nerr("ERROR: Transmit Underrun TSR: %08x\n", tsr); clrbits |= EMAC_TSR_UND; } @@ -1933,7 +1933,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv) if ((rsr & EMAC_RSR_RXOVR) != 0) { - nlldbg("ERROR: Receiver overrun RSR: %08x\n", rsr); + nerr("ERROR: Receiver overrun RSR: %08x\n", rsr); clrbits |= EMAC_RSR_RXOVR; } @@ -1950,7 +1950,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv) if ((rsr & EMAC_RSR_BNA) != 0) { - nlldbg("ERROR: Buffer not available RSR: %08x\n", rsr); + nerr("ERROR: Buffer not available RSR: %08x\n", rsr); clrbits |= EMAC_RSR_BNA; } @@ -1972,7 +1972,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv) if ((pending & EMAC_INT_PFNZ) != 0) { - nlldbg("Pause frame received\n"); + nwarn("WARNING: Pause frame received\n"); } /* Check for Pause Time Zero (PTZ) @@ -1982,7 +1982,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv) if ((pending & EMAC_INT_PTZ) != 0) { - nlldbg("Pause TO!\n"); + nwarn("WARNING: Pause TO!\n"); } #endif } @@ -2147,14 +2147,14 @@ static int sam_emac1_interrupt(int irq, void *context) static inline void sam_txtimeout_process(FAR struct sam_emac_s *priv) { - nlldbg("Timeout!\n"); + nerr("ERROR: Timeout!\n"); /* Reset the hardware. Just take the interface down, then back up again. */ sam_ifdown(&priv->dev); sam_ifup(&priv->dev); - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ sam_dopoll(priv); } @@ -2264,7 +2264,7 @@ static inline void sam_poll_process(FAR struct sam_emac_s *priv) if (sam_txfree(priv) > 0) { - /* Update TCP timing states and poll uIP for new XMIT data. */ + /* Update TCP timing states and poll the network for new XMIT data. */ (void)devif_timer(dev, sam_txpoll); } @@ -2377,20 +2377,20 @@ static int sam_ifup(struct net_driver_s *dev) int ret; #ifdef CONFIG_NET_IPv4 - ndbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); #endif #ifdef CONFIG_NET_IPv6 - ndbg("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", - dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2], - dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5], - dev->d_ipv6addr[6], dev->d_ipv6addr[7]); + ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", + dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2], + dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5], + dev->d_ipv6addr[6], dev->d_ipv6addr[7]); #endif /* Configure the EMAC interface for normal operation. */ - nllvdbg("Initialize the EMAC\n"); + ninfo("Initialize the EMAC\n"); sam_emac_configure(priv); /* Set the MAC address (should have been configured while we were down) */ @@ -2408,7 +2408,7 @@ static int sam_ifup(struct net_driver_s *dev) ret = sam_phyinit(priv); if (ret < 0) { - nlldbg("ERROR: sam_phyinit failed: %d\n", ret); + nerr("ERROR: sam_phyinit failed: %d\n", ret); return ret; } @@ -2417,16 +2417,16 @@ static int sam_ifup(struct net_driver_s *dev) ret = sam_autonegotiate(priv); if (ret < 0) { - nlldbg("ERROR: sam_autonegotiate failed: %d\n", ret); + nerr("ERROR: sam_autonegotiate failed: %d\n", ret); return ret; } while (sam_linkup(priv) == 0); - nllvdbg("Link detected \n"); + ninfo("Link detected \n"); /* Enable normal MAC operation */ - nllvdbg("Enable normal operation\n"); + ninfo("Enable normal operation\n"); /* Set and activate a timer process */ @@ -2460,7 +2460,7 @@ static int sam_ifdown(struct net_driver_s *dev) struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; irqstate_t flags; - nlldbg("Taking the network down\n"); + ninfo("Taking the network down\n"); /* Disable the EMAC interrupt */ @@ -2505,13 +2505,13 @@ static int sam_ifdown(struct net_driver_s *dev) static inline void sam_txavail_process(FAR struct sam_emac_s *priv) { - nllvdbg("ifup: %d\n", priv->ifup); + ninfo("ifup: %d\n", priv->ifup); /* Ignore the notification if the interface is not yet up */ if (priv->ifup) { - /* Poll uIP for new XMIT data */ + /* Poll the network for new XMIT data */ sam_dopoll(priv); } @@ -2758,8 +2758,8 @@ static int sam_addmac(struct net_driver_s *dev, const uint8_t *mac) unsigned int ndx; unsigned int bit; - nllvdbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); /* Calculate the 6-bit has table index */ @@ -2831,8 +2831,8 @@ static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac) unsigned int ndx; unsigned int bit; - nllvdbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); /* Calculate the 6-bit has table index */ @@ -3014,7 +3014,7 @@ static int sam_ioctl(struct net_driver_s *dev, int cmd, long arg) * ****************************************************************************/ -#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_INFO) static void sam_phydump(struct sam_emac_s *priv) { uint32_t regval; @@ -3026,19 +3026,19 @@ static void sam_phydump(struct sam_emac_s *priv) regval |= EMAC_NCR_MPE; sam_putreg(priv, SAM_EMAC_NCR_OFFSET, regval); - nllvdbg("%s Registers (Address %02x)\n", - priv->attr->rmii ? "RMII" : "MII", priv->phyaddr); + ninfo("%s Registers (Address %02x)\n", + priv->attr->rmii ? "RMII" : "MII", priv->phyaddr); sam_phyread(priv, priv->phyaddr, MII_MCR, &phyval); - nllvdbg(" MCR: %04x\n", phyval); + ninfo(" MCR: %04x\n", phyval); sam_phyread(priv, priv->phyaddr, MII_MSR, &phyval); - nllvdbg(" MSR: %04x\n", phyval); + ninfo(" MSR: %04x\n", phyval); sam_phyread(priv, priv->phyaddr, MII_ADVERTISE, &phyval); - nllvdbg(" ADVERTISE: %04x\n", phyval); + ninfo(" ADVERTISE: %04x\n", phyval); sam_phyread(priv, priv->phyaddr, MII_LPA, &phyval); - nllvdbg(" LPR: %04x\n", phyval); + ninfo(" LPR: %04x\n", phyval); sam_phyread(priv, priv->phyaddr, priv->attr->physr, &phyval); - nllvdbg(" PHYSR: %04x\n", phyval); + ninfo(" PHYSR: %04x\n", phyval); /* Disable management port */ @@ -3198,7 +3198,7 @@ static int sam_phyintenable(struct sam_emac_s *priv) else #endif { - ndbg("ERROR: Unsupported PHY type: %d\n", priv->phytype); + nerr("ERROR: Unsupported PHY type: %d\n", priv->phytype); ret = -ENOSYS; } @@ -3262,7 +3262,7 @@ static int sam_phyreset(struct sam_emac_s *priv) int timeout; int ret; - nllvdbg(" sam_phyreset\n"); + ninfo(" sam_phyreset\n"); /* Enable management port */ @@ -3275,7 +3275,7 @@ static int sam_phyreset(struct sam_emac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, MII_MCR, MII_MCR_RESET); if (ret < 0) { - nlldbg("ERROR: sam_phywrite failed: %d\n", ret); + nerr("ERROR: sam_phywrite failed: %d\n", ret); } /* Wait for the PHY reset to complete */ @@ -3287,7 +3287,7 @@ static int sam_phyreset(struct sam_emac_s *priv) int result = sam_phyread(priv, priv->phyaddr, MII_MCR, &mcr); if (result < 0) { - nlldbg("ERROR: Failed to read the MCR register: %d\n", ret); + nerr("ERROR: Failed to read the MCR register: %d\n", ret); ret = result; } else if ((mcr & MII_MCR_RESET) == 0) @@ -3329,7 +3329,7 @@ static int sam_phyfind(struct sam_emac_s *priv, uint8_t *phyaddr) unsigned int offset; int ret = -ESRCH; - nllvdbg("Find a valid PHY address\n"); + ninfo("Find a valid PHY address\n"); /* Enable management port */ @@ -3352,8 +3352,8 @@ static int sam_phyfind(struct sam_emac_s *priv, uint8_t *phyaddr) else { - nlldbg("ERROR: sam_phyread failed for PHY address %02x: %d\n", - candidate, ret); + nerr("ERROR: sam_phyread failed for PHY address %02x: %d\n", + candidate, ret); for (offset = 0; offset < 32; offset++) { @@ -3374,10 +3374,10 @@ static int sam_phyfind(struct sam_emac_s *priv, uint8_t *phyaddr) if (ret == OK) { - nllvdbg(" PHYID1: %04x PHY addr: %d\n", phyval, candidate); + ninfo(" PHYID1: %04x PHY addr: %d\n", phyval, candidate); *phyaddr = candidate; sam_phyread(priv, candidate, priv->attr->physr, &phyval); - nllvdbg(" PHYSR: %04x PHY addr: %d\n", phyval, candidate); + ninfo(" PHYSR: %04x PHY addr: %d\n", phyval, candidate); } /* Disable management port */ @@ -3418,7 +3418,7 @@ static int sam_phyread(struct sam_emac_s *priv, uint8_t phyaddr, ret = sam_phywait(priv); if (ret < 0) { - nlldbg("ERROR: sam_phywait failed: %d\n", ret); + nerr("ERROR: sam_phywait failed: %d\n", ret); return ret; } @@ -3443,7 +3443,7 @@ static int sam_phyread(struct sam_emac_s *priv, uint8_t phyaddr, ret = sam_phywait(priv); if (ret < 0) { - nlldbg("ERROR: sam_phywait failed: %d\n", ret); + nerr("ERROR: sam_phywait failed: %d\n", ret); return ret; } @@ -3483,7 +3483,7 @@ static int sam_phywrite(struct sam_emac_s *priv, uint8_t phyaddr, ret = sam_phywait(priv); if (ret < 0) { - nlldbg("ERROR: sam_phywait failed: %d\n", ret); + nerr("ERROR: sam_phywait failed: %d\n", ret); return ret; } @@ -3508,7 +3508,7 @@ static int sam_phywrite(struct sam_emac_s *priv, uint8_t phyaddr, ret = sam_phywait(priv); if (ret < 0) { - nlldbg("ERROR: sam_phywait failed: %d\n", ret); + nerr("ERROR: sam_phywait failed: %d\n", ret); return ret; } @@ -3552,33 +3552,33 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_PHYID1, &phyid1); if (ret < 0) { - nlldbg("ERROR: Failed to read PHYID1\n"); + nerr("ERROR: Failed to read PHYID1\n"); goto errout; } - nllvdbg("PHYID1: %04x PHY address: %02x\n", phyid1, priv->phyaddr); + ninfo("PHYID1: %04x PHY address: %02x\n", phyid1, priv->phyaddr); ret = sam_phyread(priv, priv->phyaddr, MII_PHYID2, &phyid2); if (ret < 0) { - nlldbg("ERROR: Failed to read PHYID2\n"); + nerr("ERROR: Failed to read PHYID2\n"); goto errout; } - nllvdbg("PHYID2: %04x PHY address: %02x\n", phyid2, priv->phyaddr); + ninfo("PHYID2: %04x PHY address: %02x\n", phyid2, priv->phyaddr); if (phyid1 == priv->attr->msoui && ((phyid2 & MII_PHYID2_OUI_MASK) >> MII_PHYID2_OUI_SHIFT) == (uint16_t)priv->attr->lsoui) { - nllvdbg(" Vendor Model Number: %04x\n", - (phyid2 & MII_PHYID2_MODEL_MASK) >> MII_PHYID2_MODEL_SHIFT); - nllvdbg(" Model Revision Number: %04x\n", - (phyid2 & MII_PHYID2_REV_MASK) >> MII_PHYID2_REV_SHIFT); + ninfo(" Vendor Model Number: %04x\n", + (phyid2 & MII_PHYID2_MODEL_MASK) >> MII_PHYID2_MODEL_SHIFT); + ninfo(" Model Revision Number: %04x\n", + (phyid2 & MII_PHYID2_REV_MASK) >> MII_PHYID2_REV_SHIFT); } else { - nlldbg("ERROR: PHY not recognized\n"); + nerr("ERROR: PHY not recognized\n"); } /* Setup control register */ @@ -3586,7 +3586,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_MCR, &mcr); if (ret < 0) { - nlldbg("ERROR: Failed to read MCR\n"); + nerr("ERROR: Failed to read MCR\n"); goto errout; } @@ -3597,7 +3597,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, MII_MCR, mcr); if (ret < 0) { - nlldbg("ERROR: Failed to write MCR\n"); + nerr("ERROR: Failed to write MCR\n"); goto errout; } @@ -3612,7 +3612,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, MII_ADVERTISE, advertise); if (ret < 0) { - nlldbg("ERROR: Failed to write ANAR\n"); + nerr("ERROR: Failed to write ANAR\n"); goto errout; } @@ -3621,7 +3621,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_MCR, &mcr); if (ret < 0) { - nlldbg("ERROR: Failed to read MCR\n"); + nerr("ERROR: Failed to read MCR\n"); goto errout; } @@ -3629,7 +3629,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, MII_MCR, mcr); if (ret < 0) { - nlldbg("ERROR: Failed to write MCR\n"); + nerr("ERROR: Failed to write MCR\n"); goto errout; } @@ -3641,11 +3641,11 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, MII_MCR, mcr); if (ret < 0) { - nlldbg("ERROR: Failed to write MCR\n"); + nerr("ERROR: Failed to write MCR\n"); goto errout; } - nllvdbg(" MCR: %04x\n", mcr); + ninfo(" MCR: %04x\n", mcr); /* Check AutoNegotiate complete */ @@ -3655,7 +3655,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_MSR, &msr); if (ret < 0) { - nlldbg("ERROR: Failed to read MSR\n"); + nerr("ERROR: Failed to read MSR\n"); goto errout; } @@ -3665,7 +3665,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) { /* Yes.. break out of the loop */ - nllvdbg("AutoNegotiate complete\n"); + ninfo("AutoNegotiate complete\n"); break; } @@ -3673,7 +3673,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) if (++timeout >= PHY_RETRY_MAX) { - nlldbg("ERROR: TimeOut\n"); + nerr("ERROR: TimeOut\n"); sam_phydump(priv); ret = -ETIMEDOUT; goto errout; @@ -3685,7 +3685,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_LPA, &lpa); if (ret < 0) { - nlldbg("ERROR: Failed to read ANLPAR\n"); + nerr("ERROR: Failed to read ANLPAR\n"); goto errout; } @@ -3775,13 +3775,13 @@ static bool sam_linkup(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_MSR, &msr); if (ret < 0) { - nlldbg("ERROR: Failed to read MSR: %d\n", ret); + nerr("ERROR: Failed to read MSR: %d\n", ret); goto errout; } if ((msr & MII_MSR_LINKSTATUS) == 0) { - nlldbg("ERROR: MSR LinkStatus: %04x\n", msr); + nerr("ERROR: MSR LinkStatus: %04x\n", msr); goto errout; } @@ -3790,7 +3790,7 @@ static bool sam_linkup(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, priv->attr->physr, &physr); if (ret < 0) { - nlldbg("ERROR: Failed to read PHYSR: %d\n", ret); + nerr("ERROR: Failed to read PHYSR: %d\n", ret); goto errout; } @@ -3828,7 +3828,7 @@ static bool sam_linkup(struct sam_emac_s *priv) /* Start the EMAC transfers */ - nllvdbg("Link is up\n"); + ninfo("Link is up\n"); linkup = true; errout: @@ -3869,7 +3869,7 @@ static int sam_phyinit(struct sam_emac_s *priv) mck = BOARD_MCK_FREQUENCY; if (mck > (160*1000*1000)) { - ndbg("ERROR: Cannot realize PHY clock\n"); + nerr("ERROR: Cannot realize PHY clock\n"); return -EINVAL; } else if (mck > (80*1000*1000)) @@ -3897,7 +3897,7 @@ static int sam_phyinit(struct sam_emac_s *priv) ret = sam_phyfind(priv, &priv->phyaddr); if (ret < 0) { - nlldbg("ERROR: sam_phyfind failed: %d\n", ret); + nerr("ERROR: sam_phyfind failed: %d\n", ret); return ret; } @@ -4012,7 +4012,7 @@ static inline void sam_ethgpioconfig(struct sam_emac_s *priv) else #endif { - nvdbg("ERROR: emac=%d\n", priv->attr->emac); + nerr("ERROR: emac=%d\n", priv->attr->emac); } } @@ -4311,11 +4311,11 @@ static void sam_macaddress(struct sam_emac_s *priv) struct net_driver_s *dev = &priv->dev; uint32_t regval; - nllvdbg("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - dev->d_ifname, - dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], - dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], - dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5]); + ninfo("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + dev->d_ifname, + dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], + dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], + dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5]); /* Set the MAC address */ @@ -4377,7 +4377,7 @@ static void sam_ipv6multicast(struct sam_emac_s *priv) mac[4] = tmp16 & 0xff; mac[5] = tmp16 >> 8; - nvdbg("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", + ninfo("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); (void)sam_addmac(dev, mac); @@ -4423,7 +4423,7 @@ static int sam_emac_configure(struct sam_emac_s *priv) { uint32_t regval; - nllvdbg("Entry\n"); + ninfo("Entry\n"); /* Enable clocking to the EMAC peripheral */ @@ -4545,7 +4545,7 @@ int sam_emac_initialize(int intf) else #endif { - ndbg("ERROR: Interface %d not supported\n", intf); + nerr("ERROR: Interface %d not supported\n", intf); return -EINVAL; } @@ -4574,7 +4574,7 @@ int sam_emac_initialize(int intf) priv->txpoll = wd_create(); if (!priv->txpoll) { - ndbg("ERROR: Failed to create periodic poll timer\n"); + nerr("ERROR: Failed to create periodic poll timer\n"); ret = -EAGAIN; goto errout; } @@ -4582,7 +4582,7 @@ int sam_emac_initialize(int intf) priv->txtimeout = wd_create(); /* Create TX timeout timer */ if (!priv->txtimeout) { - ndbg("ERROR: Failed to create periodic poll timer\n"); + nerr("ERROR: Failed to create periodic poll timer\n"); ret = -EAGAIN; goto errout_with_txpoll; } @@ -4596,7 +4596,7 @@ int sam_emac_initialize(int intf) ret = sam_buffer_initialize(priv); if (ret < 0) { - ndbg("ERROR: sam_buffer_initialize failed: %d\n", ret); + nerr("ERROR: sam_buffer_initialize failed: %d\n", ret); goto errout_with_txtimeout; } @@ -4607,7 +4607,7 @@ int sam_emac_initialize(int intf) ret = irq_attach(priv->attr->irq, priv->attr->handler); if (ret < 0) { - ndbg("ERROR: Failed to attach the handler to the IRQ%d\n", priv->attr->irq); + nerr("ERROR: Failed to attach the handler to the IRQ%d\n", priv->attr->irq); goto errout_with_buffers; } @@ -4620,7 +4620,7 @@ int sam_emac_initialize(int intf) ret = sam_ifdown(&priv->dev); if (ret < 0) { - ndbg("ERROR: Failed to put the interface in the down state: %d\n", ret); + nerr("ERROR: Failed to put the interface in the down state: %d\n", ret); goto errout_with_buffers; } @@ -4632,7 +4632,7 @@ int sam_emac_initialize(int intf) return ret; } - ndbg("ERROR: netdev_register() failed: %d\n", ret); + nerr("ERROR: netdev_register() failed: %d\n", ret); errout_with_buffers: sam_buffer_free(priv); diff --git a/arch/arm/src/sama5/sam_ethernet.c b/arch/arm/src/sama5/sam_ethernet.c index 409db45535d2c4867b6fbea900d5e82f64ea1d1c..206af9fc6724e29217516bb54d12c4d3ce0a0f73 100644 --- a/arch/arm/src/sama5/sam_ethernet.c +++ b/arch/arm/src/sama5/sam_ethernet.c @@ -88,7 +88,7 @@ static inline void up_gmac_initialize(void) ret = sam_gmac_initialize(); if (ret < 0) { - nlldbg("ERROR: sam_gmac_initialize failed: %d\n", ret); + nerr("ERROR: sam_gmac_initialize failed: %d\n", ret); } } #else @@ -119,7 +119,7 @@ static inline void up_emac_initialize(void) ret = sam_emac_initialize(); if (ret < 0) { - nlldbg("ERROR: up_emac_initialize failed: %d\n", ret); + nerr("ERROR: up_emac_initialize failed: %d\n", ret); } } #elif defined(CONFIG_SAMA5_EMACB) @@ -133,7 +133,7 @@ static inline void up_emac_initialize(void) ret = sam_emac_initialize(EMAC0_INTF); if (ret < 0) { - nlldbg("ERROR: up_emac_initialize(EMAC0) failed: %d\n", ret); + nerr("ERROR: up_emac_initialize(EMAC0) failed: %d\n", ret); } #endif @@ -143,7 +143,7 @@ static inline void up_emac_initialize(void) ret = sam_emac_initialize(EMAC1_INTF); if (ret < 0) { - nlldbg("ERROR: up_emac_initialize(EMAC1) failed: %d\n", ret); + nerr("ERROR: up_emac_initialize(EMAC1) failed: %d\n", ret); } #endif } diff --git a/arch/arm/src/sama5/sam_freerun.c b/arch/arm/src/sama5/sam_freerun.c index 18d2556bbf5d07e8c27833ac9f6af1c4fa1064da..8870988ce608e5d6997378a99ba7e71e06253761 100644 --- a/arch/arm/src/sama5/sam_freerun.c +++ b/arch/arm/src/sama5/sam_freerun.c @@ -138,7 +138,7 @@ int sam_freerun_initialize(struct sam_freerun_s *freerun, int chan, uint32_t cmr; int ret; - tcvdbg("chan=%d resolution=%d usec\n", chan, resolution); + tmrinfo("chan=%d resolution=%d usec\n", chan, resolution); DEBUGASSERT(freerun && resolution > 0); /* Get the TC frequency the corresponds to the requested resolution */ @@ -150,13 +150,13 @@ int sam_freerun_initialize(struct sam_freerun_s *freerun, int chan, ret = sam_tc_divisor(frequency, &divisor, &cmr); if (ret < 0) { - tcdbg("ERROR: sam_tc_divisor failed: %d\n", ret); + tmrerr("ERROR: sam_tc_divisor failed: %d\n", ret); return ret; } - tcvdbg("frequency=%lu, divisor=%u, cmr=%08lx\n", - (unsigned long)frequency, (unsigned long)divisor, - (unsigned long)cmr); + tmrinfo("frequency=%lu, divisor=%u, cmr=%08lx\n", + (unsigned long)frequency, (unsigned long)divisor, + (unsigned long)cmr); /* Allocate the timer/counter and select its mode of operation * @@ -189,7 +189,7 @@ int sam_freerun_initialize(struct sam_freerun_s *freerun, int chan, freerun->tch = sam_tc_allocate(chan, cmr); if (!freerun->tch) { - tcdbg("ERROR: Failed to allocate timer channel %d\n", chan); + tmrerr("ERROR: Failed to allocate timer channel %d\n", chan); return -EBUSY; } @@ -274,9 +274,9 @@ int sam_freerun_counter(struct sam_freerun_s *freerun, struct timespec *ts) leave_critical_section(flags); - tcvdbg("counter=%lu (%lu) overflow=%lu, sr=%08lx\n", - (unsigned long)counter, (unsigned long)verify, - (unsigned long)overflow, (unsigned long)sr); + tmrinfo("counter=%lu (%lu) overflow=%lu, sr=%08lx\n", + (unsigned long)counter, (unsigned long)verify, + (unsigned long)overflow, (unsigned long)sr); /* Convert the whole thing to units of microseconds. * @@ -294,7 +294,7 @@ int sam_freerun_counter(struct sam_freerun_s *freerun, struct timespec *ts) ts->tv_sec = sec; ts->tv_nsec = (usec - (sec * USEC_PER_SEC)) * NSEC_PER_USEC; - tcvdbg("usec=%llu ts=(%lu, %lu)\n", + tmrinfo("usec=%llu ts=(%lu, %lu)\n", usec, (unsigned long)ts->tv_sec, (unsigned long)ts->tv_nsec); return OK; diff --git a/arch/arm/src/sama5/sam_gmac.c b/arch/arm/src/sama5/sam_gmac.c index 8426e7dcb3b36929fd8d5e45f285c6e556f8add7..75a383655400cc01354c81948b7d2a0b45434969 100644 --- a/arch/arm/src/sama5/sam_gmac.c +++ b/arch/arm/src/sama5/sam_gmac.c @@ -149,7 +149,7 @@ * enabled. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_NET_INFO # undef CONFIG_SAMA5_GMAC_REGDEBUG #endif @@ -193,9 +193,9 @@ struct sam_gmac_s WDOG_ID txpoll; /* TX poll timer */ WDOG_ID txtimeout; /* TX timeout timer */ - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ - struct net_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by the network */ /* Used to track transmit and receive descriptors */ @@ -260,7 +260,7 @@ static uint8_t g_rxbuffer[CONFIG_SAMA5_GMAC_NRXBUFFERS * GMAC_RX_UNITSIZE] ****************************************************************************/ /* Register operations ******************************************************/ -#if defined(CONFIG_SAMA5_GMAC_REGDEBUG) && defined(CONFIG_DEBUG) +#if defined(CONFIG_SAMA5_GMAC_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES) static bool sam_checkreg(struct sam_gmac_s *priv, bool wr, uint32_t regval, uintptr_t address); static uint32_t sam_getreg(struct sam_gmac_s *priv, uintptr_t addr); @@ -315,7 +315,7 @@ static int sam_ioctl(struct net_driver_s *dev, int cmd, long arg); /* PHY Initialization */ -#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_INFO) static void sam_phydump(struct sam_gmac_s *priv); #else # define sam_phydump(priv) @@ -392,7 +392,7 @@ static bool sam_checkreg(struct sam_gmac_s *priv, bool wr, uint32_t regval, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", priv->ntimes); + ninfo("...[Repeats %d times]...\n", priv->ntimes); } /* Save information about the new access */ @@ -424,7 +424,7 @@ static uint32_t sam_getreg(struct sam_gmac_s *priv, uintptr_t address) if (sam_checkreg(priv, false, regval, address)) { - lldbg("%08x->%08x\n", address, regval); + ninfo("%08x->%08x\n", address, regval); } return regval; @@ -445,7 +445,7 @@ static void sam_putreg(struct sam_gmac_s *priv, uintptr_t address, { if (sam_checkreg(priv, true, regval, address)) { - lldbg("%08x<-%08x\n", address, regval); + ninfo("%08x<-%08x\n", address, regval); } putreg32(regval, address); @@ -538,7 +538,7 @@ static int sam_buffer_initialize(struct sam_gmac_s *priv) priv->txdesc = (struct gmac_txdesc_s *)kmm_memalign(8, allocsize); if (!priv->txdesc) { - nlldbg("ERROR: Failed to allocate TX descriptors\n"); + nerr("ERROR: Failed to allocate TX descriptors\n"); return -ENOMEM; } @@ -548,7 +548,7 @@ static int sam_buffer_initialize(struct sam_gmac_s *priv) priv->rxdesc = (struct gmac_rxdesc_s *)kmm_memalign(8, allocsize); if (!priv->rxdesc) { - nlldbg("ERROR: Failed to allocate RX descriptors\n"); + nerr("ERROR: Failed to allocate RX descriptors\n"); sam_buffer_free(priv); return -ENOMEM; } @@ -559,7 +559,7 @@ static int sam_buffer_initialize(struct sam_gmac_s *priv) priv->txbuffer = (uint8_t *)kmm_memalign(8, allocsize); if (!priv->txbuffer) { - nlldbg("ERROR: Failed to allocate TX buffer\n"); + nerr("ERROR: Failed to allocate TX buffer\n"); sam_buffer_free(priv); return -ENOMEM; } @@ -568,7 +568,7 @@ static int sam_buffer_initialize(struct sam_gmac_s *priv) priv->rxbuffer = (uint8_t *)kmm_memalign(8, allocsize); if (!priv->rxbuffer) { - nlldbg("ERROR: Failed to allocate RX buffer\n"); + nerr("ERROR: Failed to allocate RX buffer\n"); sam_buffer_free(priv); return -ENOMEM; } @@ -656,15 +656,15 @@ static int sam_transmit(struct sam_gmac_s *priv) uint32_t regval; uint32_t status; - nllvdbg("d_len: %d txhead: %d txtail: %d\n", - dev->d_len, priv->txhead, priv->txtail); + ninfo("d_len: %d txhead: %d txtail: %d\n", + dev->d_len, priv->txhead, priv->txtail); sam_dumppacket("Transmit packet", dev->d_buf, dev->d_len); /* Check parameter */ if (dev->d_len > GMAC_TX_UNITSIZE) { - nlldbg("ERROR: Packet too big: %d\n", dev->d_len); + nerr("ERROR: Packet too big: %d\n", dev->d_len); return -EINVAL; } @@ -676,7 +676,7 @@ static int sam_transmit(struct sam_gmac_s *priv) if (sam_txfree(priv) < 1) { - nlldbg("ERROR: No free TX descriptors\n"); + nerr("ERROR: No free TX descriptors\n"); return -EBUSY; } @@ -738,7 +738,7 @@ static int sam_transmit(struct sam_gmac_s *priv) if (sam_txfree(priv) < 1) { - nllvdbg("Disabling RX interrupts\n"); + ninfo("Disabling RX interrupts\n"); sam_putreg(priv, SAM_GMAC_IDR, GMAC_INT_RCOMP); } @@ -749,7 +749,7 @@ static int sam_transmit(struct sam_gmac_s *priv) * Function: sam_txpoll * * Description: - * The transmitter is available, check if uIP has any outgoing packets ready + * The transmitter is available, check if the network has any outgoing packets ready * to send. This is a callback from devif_poll(). devif_poll() may be called: * * 1. When the preceding TX packet send is complete, @@ -858,7 +858,7 @@ static void sam_dopoll(struct sam_gmac_s *priv) if (sam_txfree(priv) > 0) { - /* If we have the descriptor, then poll uIP for new XMIT data. */ + /* If we have the descriptor, then poll the network for new XMIT data. */ (void)devif_poll(dev, sam_txpoll); } @@ -918,7 +918,7 @@ static int sam_recvframe(struct sam_gmac_s *priv) arch_invalidate_dcache((uintptr_t)rxdesc, (uintptr_t)rxdesc + sizeof(struct gmac_rxdesc_s)); - nllvdbg("rxndx: %d\n", rxndx); + ninfo("rxndx: %d\n", rxndx); while ((rxdesc->addr & GMACRXD_ADDR_OWNER) != 0) { @@ -974,7 +974,7 @@ static int sam_recvframe(struct sam_gmac_s *priv) { if (rxndx == priv->rxndx) { - nllvdbg("ERROR: No EOF (Invalid of buffers too small)\n"); + nerr("ERROR: No EOF (Invalid of buffers too small)\n"); do { /* Give ownership back to the GMAC */ @@ -1029,7 +1029,7 @@ static int sam_recvframe(struct sam_gmac_s *priv) /* Frame size from the GMAC */ dev->d_len = (rxdesc->status & GMACRXD_STA_FRLEN_MASK); - nllvdbg("packet %d-%d (%d)\n", priv->rxndx, rxndx, dev->d_len); + ninfo("packet %d-%d (%d)\n", priv->rxndx, rxndx, dev->d_len); /* All data have been copied in the application frame buffer, * release the RX descriptor @@ -1060,11 +1060,11 @@ static int sam_recvframe(struct sam_gmac_s *priv) * all of the data. */ - nllvdbg("rxndx: %d d_len: %d\n", priv->rxndx, dev->d_len); + ninfo("rxndx: %d d_len: %d\n", priv->rxndx, dev->d_len); if (pktlen < dev->d_len) { - nlldbg("ERROR: Buffer size %d; frame size %d\n", dev->d_len, pktlen); + nerr("ERROR: Buffer size %d; frame size %d\n", dev->d_len, pktlen); return -E2BIG; } @@ -1102,7 +1102,7 @@ static int sam_recvframe(struct sam_gmac_s *priv) /* No packet was found */ priv->rxndx = rxndx; - nllvdbg("rxndx: %d\n", priv->rxndx); + ninfo("rxndx: %d\n", priv->rxndx); return -EAGAIN; } @@ -1136,13 +1136,13 @@ static void sam_receive(struct sam_gmac_s *priv) { sam_dumppacket("Received packet", dev->d_buf, dev->d_len); - /* Check if the packet is a valid size for the uIP buffer configuration + /* Check if the packet is a valid size for the network buffer configuration * (this should not happen) */ if (dev->d_len > CONFIG_NET_ETH_MTU) { - nlldbg("DROPPED: Too big: %d\n", dev->d_len); + nwarn("WARNING: Dropped, Too big: %d\n", dev->d_len); continue; } @@ -1157,7 +1157,7 @@ static void sam_receive(struct sam_gmac_s *priv) #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); /* Handle ARP on input then give the IPv4 packet to the network * layer @@ -1197,7 +1197,7 @@ static void sam_receive(struct sam_gmac_s *priv) #ifdef CONFIG_NET_IPv6 if (BUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); /* Give the IPv6 packet to the network layer */ @@ -1234,7 +1234,7 @@ static void sam_receive(struct sam_gmac_s *priv) #ifdef CONFIG_NET_ARP if (BUF->type == htons(ETHTYPE_ARP)) { - nllvdbg("ARP frame\n"); + ninfo("ARP frame\n"); /* Handle ARP packet */ @@ -1252,7 +1252,7 @@ static void sam_receive(struct sam_gmac_s *priv) else #endif { - nlldbg("DROPPED: Unknown type: %04x\n", BUF->type); + nwarn("WARNING: Dropped, Unknown type: %04x\n", BUF->type); } } } @@ -1338,7 +1338,7 @@ static void sam_txdone(struct sam_gmac_s *priv) sam_putreg(priv, SAM_GMAC_IER, GMAC_INT_RCOMP); } - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ sam_dopoll(priv); } @@ -1377,7 +1377,7 @@ static int sam_gmac_interrupt(int irq, void *context) imr = sam_getreg(priv, SAM_GMAC_IMR); pending = isr & ~(imr | GMAC_INT_UNUSED); - nllvdbg("isr: %08x pending: %08x\n", isr, pending); + ninfo("isr: %08x pending: %08x\n", isr, pending); /* Check for the completion of a transmission. This should be done before * checking for received data (because receiving can cause another transmission @@ -1403,7 +1403,7 @@ static int sam_gmac_interrupt(int irq, void *context) clrbits = GMAC_TSR_RLE | sam_txinuse(priv); sam_txreset(priv); - nlldbg("ERROR: Retry Limit Exceeded TSR: %08x\n", tsr); + nerr("ERROR: Retry Limit Exceeded TSR: %08x\n", tsr); regval = sam_getreg(priv, SAM_GMAC_NCR); regval |= GMAC_NCR_TXEN; @@ -1414,7 +1414,7 @@ static int sam_gmac_interrupt(int irq, void *context) if ((tsr & GMAC_TSR_COL) != 0) { - nlldbg("ERROR: Collision occurred TSR: %08x\n", tsr); + nerr("ERROR: Collision occurred TSR: %08x\n", tsr); clrbits |= GMAC_TSR_COL; } @@ -1422,7 +1422,7 @@ static int sam_gmac_interrupt(int irq, void *context) if ((tsr & GMAC_TSR_TFC) != 0) { - nlldbg("ERROR: Buffers exhausted mid-frame TSR: %08x\n", tsr); + nerr("ERROR: Buffers exhausted mid-frame TSR: %08x\n", tsr); clrbits |= GMAC_TSR_TFC; } @@ -1437,7 +1437,7 @@ static int sam_gmac_interrupt(int irq, void *context) if ((tsr & GMAC_TSR_UND) != 0) { - nlldbg("ERROR: Transmit Underrun TSR: %08x\n", tsr); + nerr("ERROR: Transmit Underrun TSR: %08x\n", tsr); clrbits |= GMAC_TSR_UND; } @@ -1445,7 +1445,7 @@ static int sam_gmac_interrupt(int irq, void *context) if ((tsr & GMAC_TSR_HRESP) != 0) { - nlldbg("ERROR: HRESP not OK: %08x\n", tsr); + nerr("ERROR: HRESP not OK: %08x\n", tsr); clrbits |= GMAC_TSR_HRESP; } @@ -1453,7 +1453,7 @@ static int sam_gmac_interrupt(int irq, void *context) if ((tsr & GMAC_TSR_LCO) != 0) { - nlldbg("ERROR: Late collision: %08x\n", tsr); + nerr("ERROR: Late collision: %08x\n", tsr); clrbits |= GMAC_TSR_LCO; } @@ -1490,7 +1490,7 @@ static int sam_gmac_interrupt(int irq, void *context) if ((rsr & GMAC_RSR_RXOVR) != 0) { - nlldbg("ERROR: Receiver overrun RSR: %08x\n", rsr); + nerr("ERROR: Receiver overrun RSR: %08x\n", rsr); clrbits |= GMAC_RSR_RXOVR; } @@ -1507,7 +1507,7 @@ static int sam_gmac_interrupt(int irq, void *context) if ((rsr & GMAC_RSR_BNA) != 0) { - nlldbg("ERROR: Buffer not available RSR: %08x\n", rsr); + nerr("ERROR: Buffer not available RSR: %08x\n", rsr); clrbits |= GMAC_RSR_BNA; } @@ -1515,7 +1515,7 @@ static int sam_gmac_interrupt(int irq, void *context) if ((rsr & GMAC_RSR_HNO) != 0) { - nlldbg("ERROR: HRESP not OK: %08x\n", rsr); + nerr("ERROR: HRESP not OK: %08x\n", rsr); clrbits |= GMAC_RSR_HNO; } @@ -1536,7 +1536,7 @@ static int sam_gmac_interrupt(int irq, void *context) if ((pending & GMAC_INT_PFNZ) != 0) { - nlldbg("Pause frame received\n"); + nwarn("WARNING: Pause frame received\n"); } /* Check for Pause Time Zero (PTZ) @@ -1546,7 +1546,7 @@ static int sam_gmac_interrupt(int irq, void *context) if ((pending & GMAC_INT_PTZ) != 0) { - nlldbg("Pause TO!\n"); + nwarn("WARNING: Pause TO!\n"); } #endif @@ -1576,7 +1576,7 @@ static void sam_txtimeout(int argc, uint32_t arg, ...) { struct sam_gmac_s *priv = (struct sam_gmac_s *)arg; - nlldbg("Timeout!\n"); + nerr("ERROR: Timeout!\n"); /* Then reset the hardware. Just take the interface down, then back * up again. @@ -1585,7 +1585,7 @@ static void sam_txtimeout(int argc, uint32_t arg, ...) sam_ifdown(&priv->dev); sam_ifup(&priv->dev); - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ sam_dopoll(priv); } @@ -1619,7 +1619,7 @@ static void sam_polltimer(int argc, uint32_t arg, ...) if (sam_txfree(priv) > 0) { - /* Update TCP timing states and poll uIP for new XMIT data. */ + /* Update TCP timing states and poll the network for new XMIT data. */ (void)devif_timer(dev, sam_txpoll); } @@ -1651,13 +1651,13 @@ static int sam_ifup(struct net_driver_s *dev) struct sam_gmac_s *priv = (struct sam_gmac_s *)dev->d_private; int ret; - nlldbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); /* Configure the GMAC interface for normal operation. */ - nllvdbg("Initialize the GMAC\n"); + ninfo("Initialize the GMAC\n"); sam_gmac_configure(priv); /* Set the MAC address (should have been configured while we were down) */ @@ -1675,7 +1675,7 @@ static int sam_ifup(struct net_driver_s *dev) ret = sam_phyinit(priv); if (ret < 0) { - nlldbg("ERROR: sam_phyinit failed: %d\n", ret); + nerr("ERROR: sam_phyinit failed: %d\n", ret); return ret; } @@ -1685,7 +1685,7 @@ static int sam_ifup(struct net_driver_s *dev) ret = sam_autonegotiate(priv); if (ret < 0) { - nlldbg("ERROR: sam_autonegotiate failed: %d\n", ret); + nerr("ERROR: sam_autonegotiate failed: %d\n", ret); return ret; } #else @@ -1696,7 +1696,7 @@ static int sam_ifup(struct net_driver_s *dev) /* Enable normal MAC operation */ - nllvdbg("Enable normal operation\n"); + ninfo("Enable normal operation\n"); /* Set and activate a timer process */ @@ -1730,7 +1730,7 @@ static int sam_ifdown(struct net_driver_s *dev) struct sam_gmac_s *priv = (struct sam_gmac_s *)dev->d_private; irqstate_t flags; - nlldbg("Taking the network down\n"); + ninfo("Taking the network down\n"); /* Disable the GMAC interrupt */ @@ -1780,7 +1780,7 @@ static int sam_txavail(struct net_driver_s *dev) struct sam_gmac_s *priv = (struct sam_gmac_s *)dev->d_private; irqstate_t flags; - nllvdbg("ifup: %d\n", priv->ifup); + ninfo("ifup: %d\n", priv->ifup); /* Disable interrupts because this function may be called from interrupt * level processing. @@ -1792,7 +1792,7 @@ static int sam_txavail(struct net_driver_s *dev) if (priv->ifup) { - /* Poll uIP for new XMIT data */ + /* Poll the network for new XMIT data */ sam_dopoll(priv); } @@ -1958,8 +1958,8 @@ static int sam_addmac(struct net_driver_s *dev, const uint8_t *mac) unsigned int bit; UNUSED(priv); - nllvdbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); /* Calculate the 6-bit has table index */ @@ -2032,8 +2032,8 @@ static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac) unsigned int bit; UNUSED(priv); - nllvdbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); /* Calculate the 6-bit has table index */ @@ -2211,7 +2211,7 @@ static int sam_ioctl(struct net_driver_s *dev, int cmd, long arg) * ****************************************************************************/ -#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_INFO) static void sam_phydump(struct sam_gmac_s *priv) { uint16_t phyval; @@ -2220,21 +2220,21 @@ static void sam_phydump(struct sam_gmac_s *priv) sam_enablemdio(priv); - nllvdbg("GMII Registers (Address %02x)\n", priv->phyaddr); + ninfo("GMII Registers (Address %02x)\n", priv->phyaddr); sam_phyread(priv, priv->phyaddr, GMII_MCR, &phyval); - nllvdbg(" MCR: %04x\n", phyval); + ninfo(" MCR: %04x\n", phyval); sam_phyread(priv, priv->phyaddr, GMII_MSR, &phyval); - nllvdbg(" MSR: %04x\n", phyval); + ninfo(" MSR: %04x\n", phyval); sam_phyread(priv, priv->phyaddr, GMII_ADVERTISE, &phyval); - nllvdbg(" ADVERTISE: %04x\n", phyval); + ninfo(" ADVERTISE: %04x\n", phyval); sam_phyread(priv, priv->phyaddr, GMII_LPA, &phyval); - nllvdbg(" LPR: %04x\n", phyval); + ninfo(" LPR: %04x\n", phyval); sam_phyread(priv, priv->phyaddr, GMII_1000BTCR, &phyval); - nllvdbg(" 1000BTCR: %04x\n", phyval); + ninfo(" 1000BTCR: %04x\n", phyval); sam_phyread(priv, priv->phyaddr, GMII_1000BTSR, &phyval); - nllvdbg(" 1000BTSR: %04x\n", phyval); + ninfo(" 1000BTSR: %04x\n", phyval); sam_phyread(priv, priv->phyaddr, GMII_ESTATUS, &phyval); - nllvdbg(" ESTATUS: %04x\n", phyval); + ninfo(" ESTATUS: %04x\n", phyval); /* Disable management port */ @@ -2418,7 +2418,7 @@ static int sam_phyreset(struct sam_gmac_s *priv) int timeout; int ret; - nllvdbg(" sam_phyreset\n"); + ninfo(" sam_phyreset\n"); /* Enable management port */ @@ -2429,7 +2429,7 @@ static int sam_phyreset(struct sam_gmac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, GMII_MCR, GMII_MCR_RESET); if (ret < 0) { - nlldbg("ERROR: sam_phywrite failed: %d\n", ret); + nerr("ERROR: sam_phywrite failed: %d\n", ret); } /* Wait for the PHY reset to complete */ @@ -2441,7 +2441,7 @@ static int sam_phyreset(struct sam_gmac_s *priv) int result = sam_phyread(priv, priv->phyaddr, GMII_MCR, &mcr); if (result < 0) { - nlldbg("ERROR: Failed to read the MCR register: %d\n", ret); + nerr("ERROR: Failed to read the MCR register: %d\n", ret); ret = result; } else if ((mcr & GMII_MCR_RESET) == 0) @@ -2480,7 +2480,7 @@ static int sam_phyfind(struct sam_gmac_s *priv, uint8_t *phyaddr) unsigned int offset; int ret = -ESRCH; - nllvdbg("Find a valid PHY address\n"); + ninfo("Find a valid PHY address\n"); /* Enable management port */ @@ -2501,8 +2501,8 @@ static int sam_phyfind(struct sam_gmac_s *priv, uint8_t *phyaddr) else { - nlldbg("ERROR: sam_phyread failed for PHY address %02x: %d\n", - candidate, ret); + nerr("ERROR: sam_phyread failed for PHY address %02x: %d\n", + candidate, ret); for (offset = 0; offset < 32; offset++) { @@ -2523,7 +2523,7 @@ static int sam_phyfind(struct sam_gmac_s *priv, uint8_t *phyaddr) if (ret == OK) { - nllvdbg(" PHYID1: %04x PHY addr: %d\n", phyval, candidate); + ninfo(" PHYID1: %04x PHY addr: %d\n", phyval, candidate); *phyaddr = candidate; } @@ -2563,7 +2563,7 @@ static int sam_phyread(struct sam_gmac_s *priv, uint8_t phyaddr, ret = sam_phywait(priv); if (ret < 0) { - nlldbg("ERROR: sam_phywait failed: %d\n", ret); + nerr("ERROR: sam_phywait failed: %d\n", ret); return ret; } @@ -2578,7 +2578,7 @@ static int sam_phyread(struct sam_gmac_s *priv, uint8_t phyaddr, ret = sam_phywait(priv); if (ret < 0) { - nlldbg("ERROR: sam_phywait failed: %d\n", ret); + nerr("ERROR: sam_phywait failed: %d\n", ret); return ret; } @@ -2618,7 +2618,7 @@ static int sam_phywrite(struct sam_gmac_s *priv, uint8_t phyaddr, ret = sam_phywait(priv); if (ret < 0) { - nlldbg("ERROR: sam_phywait failed: %d\n", ret); + nerr("ERROR: sam_phywait failed: %d\n", ret); return ret; } @@ -2633,7 +2633,7 @@ static int sam_phywrite(struct sam_gmac_s *priv, uint8_t phyaddr, ret = sam_phywait(priv); if (ret < 0) { - nlldbg("ERROR: sam_phywait failed: %d\n", ret); + nerr("ERROR: sam_phywait failed: %d\n", ret); return ret; } @@ -2679,35 +2679,35 @@ static int sam_autonegotiate(struct sam_gmac_s *priv) ret = sam_phyread(priv, priv->phyaddr, GMII_PHYID1, &phyid1); if (ret < 0) { - nlldbg("ERROR: Failed to read PHYID1 register\n"); + nerr("ERROR: Failed to read PHYID1 register\n"); goto errout; } - nllvdbg("PHYID1: %04x PHY address: %02x\n", phyid1, priv->phyaddr); + ninfo("PHYID1: %04x PHY address: %02x\n", phyid1, priv->phyaddr); /* Read the LS bits of the OUI from Pthe PHYID2 register */ ret = sam_phyread(priv, priv->phyaddr, GMII_PHYID2, &phyid2); if (ret < 0) { - nlldbg("ERROR: Failed to read PHYID2 register\n"); + nerr("ERROR: Failed to read PHYID2 register\n"); goto errout; } - nllvdbg("PHYID2: %04x PHY address: %02x\n", phyid2, priv->phyaddr); + ninfo("PHYID2: %04x PHY address: %02x\n", phyid2, priv->phyaddr); if (phyid1 == GMII_OUI_MSB && (phyid2 & GMII_PHYID2_OUI_MASK) == GMII_OUI_LSB) { - nllvdbg(" Vendor Model Number: %04x\n", - (phyid2 & GMII_PHYID2_MODEL_MASK) >> GMII_PHYID2_MODEL_SHIFT); - nllvdbg(" Model Revision Number: %04x\n", - (phyid2 & GMII_PHYID2_REV_MASK) >> GMII_PHYID2_REV_SHIFT); + ninfo(" Vendor Model Number: %04x\n", + (phyid2 & GMII_PHYID2_MODEL_MASK) >> GMII_PHYID2_MODEL_SHIFT); + ninfo(" Model Revision Number: %04x\n", + (phyid2 & GMII_PHYID2_REV_MASK) >> GMII_PHYID2_REV_SHIFT); } else { - nlldbg("ERROR: PHY not recognized: PHYID1=%04x PHYID2=%04x\n", - phyid1, phyid2); + nerr("ERROR: PHY not recognized: PHYID1=%04x PHYID2=%04x\n", + phyid1, phyid2); } #ifdef SAMA5_GMAC_PHY_KSZ90x1 @@ -2735,7 +2735,7 @@ static int sam_autonegotiate(struct sam_gmac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, GMII_ADVERTISE, advertise); if (ret < 0) { - nlldbg("ERROR: Failed to write ADVERTISE register\n"); + nerr("ERROR: Failed to write ADVERTISE register\n"); goto errout; } @@ -2746,7 +2746,7 @@ static int sam_autonegotiate(struct sam_gmac_s *priv) ret = sam_phyread(priv, priv->phyaddr, GMII_1000BTCR, &btcr); if (ret < 0) { - nlldbg("ERROR: Failed to read 1000BTCR register: %d\n", ret); + nerr("ERROR: Failed to read 1000BTCR register: %d\n", ret); goto errout; } @@ -2755,7 +2755,7 @@ static int sam_autonegotiate(struct sam_gmac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, GMII_1000BTCR, btcr); if (ret < 0) { - nlldbg("ERROR: Failed to write 1000BTCR register: %d\n", ret); + nerr("ERROR: Failed to write 1000BTCR register: %d\n", ret); goto errout; } @@ -2764,7 +2764,7 @@ static int sam_autonegotiate(struct sam_gmac_s *priv) ret = sam_phyread(priv, priv->phyaddr, GMII_MCR, &phyval); if (ret < 0) { - nlldbg("ERROR: Failed to read MCR register: %d\n", ret); + nerr("ERROR: Failed to read MCR register: %d\n", ret); goto errout; } @@ -2773,11 +2773,11 @@ static int sam_autonegotiate(struct sam_gmac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, GMII_MCR, phyval); if (ret < 0) { - nlldbg("ERROR: Failed to write MCR register: %d\n", ret); + nerr("ERROR: Failed to write MCR register: %d\n", ret); goto errout; } - nllvdbg(" MCR: 0x%X\n", phyval); + ninfo(" MCR: 0x%X\n", phyval); /* Wait for autonegotion to complete */ @@ -2787,7 +2787,7 @@ static int sam_autonegotiate(struct sam_gmac_s *priv) ret = sam_phyread(priv, priv->phyaddr, GMII_MSR, &phyval); if (ret < 0) { - nlldbg("ERROR: Failed to read MSR register: %d\n", ret); + nerr("ERROR: Failed to read MSR register: %d\n", ret); goto errout; } @@ -2797,7 +2797,7 @@ static int sam_autonegotiate(struct sam_gmac_s *priv) { /* Yes.. break out of the loop */ - nllvdbg("AutoNegotiate complete\n"); + ninfo("AutoNegotiate complete\n"); break; } @@ -2805,7 +2805,7 @@ static int sam_autonegotiate(struct sam_gmac_s *priv) if (++timeout >= PHY_RETRY_MAX) { - nlldbg("ERROR: TimeOut\n"); + nerr("ERROR: TimeOut\n"); sam_phydump(priv); ret = -ETIMEDOUT; goto errout; @@ -2822,7 +2822,7 @@ static int sam_autonegotiate(struct sam_gmac_s *priv) ret = sam_phyread(priv, priv->phyaddr, GMII_1000BTSR, &btsr); if (ret < 0) { - nlldbg("ERROR: Failed to read 1000BTSR register: %d\n", ret); + nerr("ERROR: Failed to read 1000BTSR register: %d\n", ret); goto errout; } @@ -2850,7 +2850,7 @@ static int sam_autonegotiate(struct sam_gmac_s *priv) ret = sam_phyread(priv, priv->phyaddr, GMII_LPA, &lpa); if (ret < 0) { - nlldbg("ERROR: Failed to read LPA register: %d\n", ret); + nerr("ERROR: Failed to read LPA register: %d\n", ret); goto errout; } @@ -2892,7 +2892,7 @@ static int sam_autonegotiate(struct sam_gmac_s *priv) if (++timeout >= PHY_RETRY_MAX) { - nlldbg("ERROR: TimeOut\n"); + nerr("ERROR: TimeOut\n"); sam_phydump(priv); ret = -ETIMEDOUT; goto errout; @@ -3065,7 +3065,7 @@ static int sam_phyinit(struct sam_gmac_s *priv) ret = sam_phyfind(priv, &priv->phyaddr); if (ret < 0) { - nlldbg("ERROR: sam_phyfind failed: %d\n", ret); + nerr("ERROR: sam_phyfind failed: %d\n", ret); return ret; } @@ -3324,11 +3324,11 @@ static void sam_macaddress(struct sam_gmac_s *priv) struct net_driver_s *dev = &priv->dev; uint32_t regval; - nllvdbg("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - dev->d_ifname, - dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], - dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], - dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5]); + ninfo("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + dev->d_ifname, + dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], + dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], + dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5]); /* Set the MAC address */ @@ -3390,7 +3390,7 @@ static void sam_ipv6multicast(struct sam_gmac_s *priv) mac[4] = tmp16 & 0xff; mac[5] = tmp16 >> 8; - nvdbg("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", + ninfo("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); (void)sam_addmac(dev, mac); @@ -3436,7 +3436,7 @@ static int sam_gmac_configure(struct sam_gmac_s *priv) { uint32_t regval; - nllvdbg("Entry\n"); + ninfo("Entry\n"); /* Enable clocking to the GMAC peripheral */ @@ -3573,7 +3573,7 @@ int sam_gmac_initialize(void) priv->txpoll = wd_create(); if (!priv->txpoll) { - nlldbg("ERROR: Failed to create periodic poll timer\n"); + nerr("ERROR: Failed to create periodic poll timer\n"); ret = -EAGAIN; goto errout; } @@ -3581,7 +3581,7 @@ int sam_gmac_initialize(void) priv->txtimeout = wd_create(); /* Create TX timeout timer */ if (!priv->txtimeout) { - nlldbg("ERROR: Failed to create periodic poll timer\n"); + nerr("ERROR: Failed to create periodic poll timer\n"); ret = -EAGAIN; goto errout_with_txpoll; } @@ -3595,7 +3595,7 @@ int sam_gmac_initialize(void) ret = sam_buffer_initialize(priv); if (ret < 0) { - nlldbg("ERROR: sam_buffer_initialize failed: %d\n", ret); + nerr("ERROR: sam_buffer_initialize failed: %d\n", ret); goto errout_with_txtimeout; } @@ -3606,7 +3606,7 @@ int sam_gmac_initialize(void) ret = irq_attach(SAM_IRQ_GMAC, sam_gmac_interrupt); if (ret < 0) { - nlldbg("ERROR: Failed to attach the handler to the IRQ%d\n", SAM_IRQ_GMAC); + nerr("ERROR: Failed to attach the handler to the IRQ%d\n", SAM_IRQ_GMAC); goto errout_with_buffers; } @@ -3619,7 +3619,7 @@ int sam_gmac_initialize(void) ret = sam_ifdown(&priv->dev); if (ret < 0) { - nlldbg("ERROR: Failed to put the interface in the down state: %d\n", ret); + nerr("ERROR: Failed to put the interface in the down state: %d\n", ret); goto errout_with_buffers; } @@ -3631,7 +3631,7 @@ int sam_gmac_initialize(void) return ret; } - nlldbg("ERROR: netdev_register() failed: %d\n", ret); + nerr("ERROR: netdev_register() failed: %d\n", ret); errout_with_buffers: sam_buffer_free(priv); diff --git a/arch/arm/src/sama5/sam_hsmci.c b/arch/arm/src/sama5/sam_hsmci.c index 54a7e34d9a5cc1ea69bf190ad6d3f65f6dae6431..2b4eb8361a31665ca2aff3c186d90ae3275139f3 100644 --- a/arch/arm/src/sama5/sam_hsmci.c +++ b/arch/arm/src/sama5/sam_hsmci.c @@ -79,6 +79,10 @@ /* Configuration ************************************************************/ +#ifndef CONFIG_DEBUG_MEMCARD_INFO +# undef CONFIG_SAMA5_HSMCI_REGDEBUG +#endif + #if defined(ATSAMA5D3) /* The SAMA5D3 has three HSMCI blocks: HSMCI0-2. HSMCI0 requires DMAC0 * support, HSMCI1-2 require DMAC1 support. @@ -162,7 +166,7 @@ # error "This driver requires CONFIG_SDIO_BLOCKSETUP" #endif -#if !defined(CONFIG_DEBUG_FS) || !defined(CONFIG_DEBUG_VERBOSE) +#if !defined(CONFIG_DEBUG_FS) || !defined(CONFIG_DEBUG_INFO) # undef CONFIG_SAMA5_HSMCI_CMDDEBUG # undef CONFIG_SAMA5_HSMCI_XFRDEBUG #endif @@ -725,7 +729,7 @@ static bool sam_checkreg(struct sam_dev_s *priv, bool wr, uint32_t value, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", priv->ntimes); + mcinfo("...[Repeats %d times]...\n", priv->ntimes); } /* Save information about the new access */ @@ -758,7 +762,7 @@ static inline uint32_t sam_getreg(struct sam_dev_s *priv, unsigned int offset) #ifdef CONFIG_SAMA5_HSMCI_REGDEBUG if (sam_checkreg(priv, false, value, address)) { - lldbg("%08x->%08x\n", address, value); + mcinfo("%08x->%08x\n", address, value); } #endif @@ -781,7 +785,7 @@ static inline void sam_putreg(struct sam_dev_s *priv, uint32_t value, #ifdef CONFIG_SAMA5_HSMCI_REGDEBUG if (sam_checkreg(priv, true, value, address)) { - lldbg("%08x<-%08x\n", address, value); + mcinfo("%08x<-%08x\n", address, value); } #endif @@ -1003,23 +1007,23 @@ static void sam_hsmcisample(struct sam_dev_s *priv, static void sam_hsmcidump(struct sam_dev_s *priv, struct sam_hsmciregs_s *regs, const char *msg) { - fdbg("HSMCI Registers: %s\n", msg); - fdbg(" MR[%08x]: %08x\n", priv->base + SAM_HSMCI_MR_OFFSET, regs->mr); - fdbg(" DTOR[%08x]: %08x\n", priv->base + SAM_HSMCI_DTOR_OFFSET, regs->dtor); - fdbg(" SDCR[%08x]: %08x\n", priv->base + SAM_HSMCI_SDCR_OFFSET, regs->sdcr); - fdbg(" ARGR[%08x]: %08x\n", priv->base + SAM_HSMCI_ARGR_OFFSET, regs->argr); - fdbg(" BLKR[%08x]: %08x\n", priv->base + SAM_HSMCI_BLKR_OFFSET, regs->blkr); - fdbg(" CSTOR[%08x]: %08x\n", priv->base + SAM_HSMCI_CSTOR_OFFSET, regs->cstor); - fdbg(" RSPR0[%08x]: %08x\n", priv->base + SAM_HSMCI_RSPR0_OFFSET, regs->rsp0); - fdbg(" RSPR1[%08x]: %08x\n", priv->base + SAM_HSMCI_RSPR1_OFFSET, regs->rsp1); - fdbg(" RSPR2[%08x]: %08x\n", priv->base + SAM_HSMCI_RSPR2_OFFSET, regs->rsp2); - fdbg(" RSPR3[%08x]: %08x\n", priv->base + SAM_HSMCI_RSPR3_OFFSET, regs->rsp3); - fdbg(" SR[%08x]: %08x\n", priv->base + SAM_HSMCI_SR_OFFSET, regs->sr); - fdbg(" IMR[%08x]: %08x\n", priv->base + SAM_HSMCI_IMR_OFFSET, regs->imr); - fdbg(" DMA[%08x]: %08x\n", priv->base + SAM_HSMCI_DMA_OFFSET, regs->dma); - fdbg(" CFG[%08x]: %08x\n", priv->base + SAM_HSMCI_CFG_OFFSET, regs->cfg); - fdbg(" WPMR[%08x]: %08x\n", priv->base + SAM_HSMCI_WPMR_OFFSET, regs->wpmr); - fdbg(" WPSR[%08x]: %08x\n", priv->base + SAM_HSMCI_WPSR_OFFSET, regs->wpsr); + lcdinfo("HSMCI Registers: %s\n", msg); + lcdinfo(" MR[%08x]: %08x\n", priv->base + SAM_HSMCI_MR_OFFSET, regs->mr); + lcdinfo(" DTOR[%08x]: %08x\n", priv->base + SAM_HSMCI_DTOR_OFFSET, regs->dtor); + lcdinfo(" SDCR[%08x]: %08x\n", priv->base + SAM_HSMCI_SDCR_OFFSET, regs->sdcr); + lcdinfo(" ARGR[%08x]: %08x\n", priv->base + SAM_HSMCI_ARGR_OFFSET, regs->argr); + lcdinfo(" BLKR[%08x]: %08x\n", priv->base + SAM_HSMCI_BLKR_OFFSET, regs->blkr); + lcdinfo(" CSTOR[%08x]: %08x\n", priv->base + SAM_HSMCI_CSTOR_OFFSET, regs->cstor); + lcdinfo(" RSPR0[%08x]: %08x\n", priv->base + SAM_HSMCI_RSPR0_OFFSET, regs->rsp0); + lcdinfo(" RSPR1[%08x]: %08x\n", priv->base + SAM_HSMCI_RSPR1_OFFSET, regs->rsp1); + lcdinfo(" RSPR2[%08x]: %08x\n", priv->base + SAM_HSMCI_RSPR2_OFFSET, regs->rsp2); + lcdinfo(" RSPR3[%08x]: %08x\n", priv->base + SAM_HSMCI_RSPR3_OFFSET, regs->rsp3); + lcdinfo(" SR[%08x]: %08x\n", priv->base + SAM_HSMCI_SR_OFFSET, regs->sr); + lcdinfo(" IMR[%08x]: %08x\n", priv->base + SAM_HSMCI_IMR_OFFSET, regs->imr); + lcdinfo(" DMA[%08x]: %08x\n", priv->base + SAM_HSMCI_DMA_OFFSET, regs->dma); + lcdinfo(" CFG[%08x]: %08x\n", priv->base + SAM_HSMCI_CFG_OFFSET, regs->cfg); + lcdinfo(" WPMR[%08x]: %08x\n", priv->base + SAM_HSMCI_WPMR_OFFSET, regs->wpmr); + lcdinfo(" WPSR[%08x]: %08x\n", priv->base + SAM_HSMCI_WPSR_OFFSET, regs->wpsr); } #endif @@ -1093,7 +1097,7 @@ static void sam_xfrdumpone(struct sam_dev_s *priv, int index, } else { - fdbg("%s: Not collected\n", msg); + lcdinfo("%s: Not collected\n", msg); } } #endif @@ -1237,7 +1241,7 @@ static void sam_dmacallback(DMA_HANDLE handle, void *arg, int result) if (result < 0) { wkupevent = (result == -ETIMEDOUT ? SDIOWAIT_TIMEOUT : SDIOWAIT_ERROR); - flldbg("ERROR: DMA failed: result=%d wkupevent=%04x\n", result, wkupevent); + mcerr("ERROR: DMA failed: result=%d wkupevent=%04x\n", result, wkupevent); /* sam_endtransfer will terminate the transfer and wait up the waiting * client in this case. @@ -1337,7 +1341,7 @@ static void sam_eventtimeout(int argc, uint32_t arg) /* Yes.. wake up any waiting threads */ sam_endwait(priv, SDIOWAIT_TIMEOUT); - flldbg("ERROR: Timeout\n"); + mcerr("ERROR: Timeout\n"); } } @@ -1537,7 +1541,7 @@ static int sam_hsmci_interrupt(struct sam_dev_s *priv) { /* Yes.. Was it some kind of timeout error? */ - flldbg("ERROR: enabled: %08x pending: %08x\n", enabled, pending); + mcerr("ERROR: enabled: %08x pending: %08x\n", enabled, pending); if ((pending & HSMCI_DATA_TIMEOUT_ERRORS) != 0) { /* Yes.. Terminate with a timeout. */ @@ -1609,8 +1613,8 @@ static int sam_hsmci_interrupt(struct sam_dev_s *priv) { /* Yes.. Was the error some kind of timeout? */ - fllvdbg("ERROR: events: %08x SR: %08x\n", - priv->cmdrmask, enabled); + mcerr("ERROR: events: %08x SR: %08x\n", + priv->cmdrmask, enabled); if ((pending & HSMCI_RESPONSE_TIMEOUT_ERRORS) != 0) { @@ -2090,7 +2094,7 @@ static int sam_sendcmd(FAR struct sdio_dev_s *dev, /* Write the fully decorated command to CMDR */ - fvdbg("cmd: %08x arg: %08x regval: %08x\n", cmd, arg, regval); + mcinfo("cmd: %08x arg: %08x regval: %08x\n", cmd, arg, regval); sam_putreg(priv, regval, SAM_HSMCI_CMDR_OFFSET); sam_cmdsample1(priv, SAMPLENDX_AFTER_CMDR); return OK; @@ -2253,7 +2257,7 @@ static int sam_sendsetup(FAR struct sdio_dev_s *dev, FAR const uint8_t *buffer, { /* Some fatal error has occurred */ - fdbg("ERROR: sr %08x\n", sr); + lcderr("ERROR: sr %08x\n", sr); return -EIO; } else if ((sr & HSMCI_INT_TXRDY) != 0) @@ -2388,7 +2392,7 @@ static int sam_waitresponse(FAR struct sdio_dev_s *dev, uint32_t cmd) { /* Yes.. Was the error some kind of timeout? */ - fdbg("ERROR: cmd: %08x events: %08x SR: %08x\n", + lcderr("ERROR: cmd: %08x events: %08x SR: %08x\n", cmd, priv->cmdrmask, sr); if ((pending & HSMCI_RESPONSE_TIMEOUT_ERRORS) != 0) @@ -2418,8 +2422,8 @@ static int sam_waitresponse(FAR struct sdio_dev_s *dev, uint32_t cmd) } else if (--timeout <= 0) { - fdbg("ERROR: Timeout cmd: %08x events: %08x SR: %08x\n", - cmd, priv->cmdrmask, sr); + lcderr("ERROR: Timeout cmd: %08x events: %08x SR: %08x\n", + cmd, priv->cmdrmask, sr); priv->wkupevent = SDIOWAIT_TIMEOUT; return -ETIMEDOUT; @@ -2490,10 +2494,10 @@ static int sam_recvshort(FAR struct sdio_dev_s *dev, * 0 1 End bit */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!rshort) { - fdbg("ERROR: rshort=NULL\n"); + lcderr("ERROR: rshort=NULL\n"); ret = -EINVAL; } @@ -2505,7 +2509,7 @@ static int sam_recvshort(FAR struct sdio_dev_s *dev, (cmd & MMCSD_RESPONSE_MASK) != MMCSD_R3_RESPONSE && (cmd & MMCSD_RESPONSE_MASK) != MMCSD_R7_RESPONSE) { - fdbg("ERROR: Wrong response CMD=%08x\n", cmd); + lcderr("ERROR: Wrong response CMD=%08x\n", cmd); ret = -EINVAL; } else @@ -2550,12 +2554,12 @@ static int sam_recvlong(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t rlong * 0 1 End bit */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Check that R1 is the correct response to this command */ if ((cmd & MMCSD_RESPONSE_MASK) != MMCSD_R2_RESPONSE) { - fdbg("ERROR: Wrong response CMD=%08x\n", cmd); + lcderr("ERROR: Wrong response CMD=%08x\n", cmd); ret = -EINVAL; } else @@ -2746,7 +2750,7 @@ static sdio_eventset_t sam_eventwait(FAR struct sdio_dev_s *dev, 1, (uint32_t)priv); if (ret != OK) { - fdbg("ERROR: wd_start failed: %d\n", ret); + lcderr("ERROR: wd_start failed: %d\n", ret); } } @@ -2812,7 +2816,7 @@ static void sam_callbackenable(FAR struct sdio_dev_s *dev, { struct sam_dev_s *priv = (struct sam_dev_s *)dev; - fvdbg("eventset: %02x\n", eventset); + mcinfo("eventset: %02x\n", eventset); DEBUGASSERT(priv != NULL); priv->cbevents = eventset; @@ -2848,7 +2852,7 @@ static int sam_registercallback(FAR struct sdio_dev_s *dev, /* Disable callbacks and register this callback and is argument */ - fvdbg("Register %p(%p)\n", callback, arg); + mcinfo("Register %p(%p)\n", callback, arg); DEBUGASSERT(priv != NULL); priv->cbevents = 0; @@ -3095,8 +3099,8 @@ static void sam_callback(void *arg) /* Is a callback registered? */ DEBUGASSERT(priv != NULL); - fvdbg("Callback %p(%p) cbevents: %02x cdstatus: %02x\n", - priv->callback, priv->cbarg, priv->cbevents, priv->cdstatus); + mcinfo("Callback %p(%p) cbevents: %02x cdstatus: %02x\n", + priv->callback, priv->cbarg, priv->cbevents, priv->cdstatus); flags = enter_critical_section(); if (priv->callback) @@ -3150,17 +3154,17 @@ static void sam_callback(void *arg) { /* NOTE: Currently, work_cancel only returns success */ - fdbg("ERROR: Failed to cancel work: %d\n", ret); + lcderr("ERROR: Failed to cancel work: %d\n", ret); } - fllvdbg("Queuing callback to %p(%p)\n", priv->callback, priv->cbarg); + mcinfo("Queuing callback to %p(%p)\n", priv->callback, priv->cbarg); ret = work_queue(LPWORK, &priv->cbwork, (worker_t)priv->callback, priv->cbarg, 0); if (ret < 0) { /* NOTE: Currently, work_queue only returns success */ - fdbg("ERROR: Failed to schedule work: %d\n", ret); + lcderr("ERROR: Failed to schedule work: %d\n", ret); } } @@ -3199,7 +3203,7 @@ FAR struct sdio_dev_s *sdio_initialize(int slotno) * for now, an* HSMCI peripheral does correspond to a slot. */ - fdbg("slotno: %d\n", slotno); + lcdinfo("slotno: %d\n", slotno); #ifdef CONFIG_SAMA5_HSMCI0 if (slotno == 0) @@ -3323,8 +3327,8 @@ FAR struct sdio_dev_s *sdio_initialize(int slotno) return NULL; } - fvdbg("priv: %p base: %08x hsmci: %d dmac: %d pid: %d\n", - priv, priv->base, priv->hsmci, dmac, pid); + mcinfo("priv: %p base: %08x hsmci: %d dmac: %d pid: %d\n", + priv, priv->base, priv->hsmci, dmac, pid); /* Initialize the HSMCI slot structure */ @@ -3393,7 +3397,7 @@ void sdio_mediachange(FAR struct sdio_dev_s *dev, bool cardinslot) priv->cdstatus &= ~SDIO_STATUS_PRESENT; } - fllvdbg("cdstatus OLD: %02x NEW: %02x\n", cdstatus, priv->cdstatus); + mcinfo("cdstatus OLD: %02x NEW: %02x\n", cdstatus, priv->cdstatus); /* Perform any requested callback if the status has changed */ @@ -3438,7 +3442,7 @@ void sdio_wrprotect(FAR struct sdio_dev_s *dev, bool wrprotect) priv->cdstatus &= ~SDIO_STATUS_WRPROTECTED; } - fvdbg("cdstatus: %02x\n", priv->cdstatus); + mcinfo("cdstatus: %02x\n", priv->cdstatus); leave_critical_section(flags); } diff --git a/arch/arm/src/sama5/sam_irq.c b/arch/arm/src/sama5/sam_irq.c index 21ce68ff236dbe29458a80cc8d4ba9fde796d940..c8cf1f5cd5495f50c47b3c76605a7414c68b6f25 100644 --- a/arch/arm/src/sama5/sam_irq.c +++ b/arch/arm/src/sama5/sam_irq.c @@ -125,13 +125,13 @@ static const uint32_t g_h64mxpids[3] = * ****************************************************************************/ -#if defined(CONFIG_DEBUG_IRQ) +#if defined(CONFIG_DEBUG_IRQ_INFO) static void sam_dumpaic(const char *msg, uintptr_t base, int irq) { irqstate_t flags; flags = enter_critical_section(); - lldbg("AIC (%s, base=%08x irq=%d):\n", msg, base, irq); + irqinfo("AIC (%s, base=%08x irq=%d):\n", msg, base, irq); /* Select the register set associated with this irq */ @@ -139,39 +139,39 @@ static void sam_dumpaic(const char *msg, uintptr_t base, int irq) /* Then dump all of the (readable) register contents */ - lldbg(" SSR: %08x SMR: %08x SVR: %08x IVR: %08x\n", - getreg32(base + SAM_AIC_SSR_OFFSET), - getreg32(base + SAM_AIC_SMR_OFFSET), - getreg32(base + SAM_AIC_SVR_OFFSET), - getreg32(base + SAM_AIC_IVR_OFFSET)); - lldbg(" FVR: %08x ISR: %08x\n", - getreg32(base + SAM_AIC_FVR_OFFSET), - getreg32(base + SAM_AIC_ISR_OFFSET)); - lldbg(" IPR: %08x %08x %08x %08x\n", - getreg32(base + SAM_AIC_IPR0_OFFSET), - getreg32(base + SAM_AIC_IPR1_OFFSET), - getreg32(base + SAM_AIC_IPR2_OFFSET), - getreg32(base + SAM_AIC_IPR3_OFFSET)); + irqinfo(" SSR: %08x SMR: %08x SVR: %08x IVR: %08x\n", + getreg32(base + SAM_AIC_SSR_OFFSET), + getreg32(base + SAM_AIC_SMR_OFFSET), + getreg32(base + SAM_AIC_SVR_OFFSET), + getreg32(base + SAM_AIC_IVR_OFFSET)); + irqinfo(" FVR: %08x ISR: %08x\n", + getreg32(base + SAM_AIC_FVR_OFFSET), + getreg32(base + SAM_AIC_ISR_OFFSET)); + irqinfo(" IPR: %08x %08x %08x %08x\n", + getreg32(base + SAM_AIC_IPR0_OFFSET), + getreg32(base + SAM_AIC_IPR1_OFFSET), + getreg32(base + SAM_AIC_IPR2_OFFSET), + getreg32(base + SAM_AIC_IPR3_OFFSET)); /* SAMA5D4 does not have the FFSR register */ #if defined(SAM_AIC_FFSR) - lldbg(" IMR: %08x CISR: %08x SPU: %08x FFSR: %08x\n", - getreg32(base + SAM_AIC_IMR_OFFSET), - getreg32(base + SAM_AIC_CISR_OFFSET), - getreg32(base + SAM_AIC_SPU_OFFSET), - getreg32(base + SAM_AIC_FFSR_OFFSET)); + irqinfo(" IMR: %08x CISR: %08x SPU: %08x FFSR: %08x\n", + getreg32(base + SAM_AIC_IMR_OFFSET), + getreg32(base + SAM_AIC_CISR_OFFSET), + getreg32(base + SAM_AIC_SPU_OFFSET), + getreg32(base + SAM_AIC_FFSR_OFFSET)); #else - lldbg(" IMR: %08x CISR: %08x SPU: %08x\n", - getreg32(base + SAM_AIC_IMR_OFFSET), - getreg32(base + SAM_AIC_CISR_OFFSET), - getreg32(base + SAM_AIC_SPU_OFFSET)); + irqinfo(" IMR: %08x CISR: %08x SPU: %08x\n", + getreg32(base + SAM_AIC_IMR_OFFSET), + getreg32(base + SAM_AIC_CISR_OFFSET), + getreg32(base + SAM_AIC_SPU_OFFSET)); #endif - lldbg(" DCR: %08x WPMR: %08x WPSR: %08x\n", - getreg32(base + SAM_AIC_DCR_OFFSET), - getreg32(base + SAM_AIC_WPMR_OFFSET), - getreg32(base + SAM_AIC_WPSR_OFFSET)); + irqinfo(" DCR: %08x WPMR: %08x WPSR: %08x\n", + getreg32(base + SAM_AIC_DCR_OFFSET), + getreg32(base + SAM_AIC_WPMR_OFFSET), + getreg32(base + SAM_AIC_WPSR_OFFSET)); leave_critical_section(flags); } @@ -234,8 +234,8 @@ static uint32_t *sam_spurious(int irq, uint32_t *regs) * in this implementation. The value of AIC_IVR is ignored. */ -#if defined(CONFIG_DEBUG_IRQ) - lldbg("Spurious interrupt: IRQ %d\n", irq); +#if defined(CONFIG_DEBUG_IRQ_INFO) + irqinfo("Spurious interrupt: IRQ %d\n", irq); #endif return regs; } @@ -327,12 +327,12 @@ static void sam_aic_redirection(void) regval |= SFR_AICREDIR_ENABLE; putreg32(regval, SAM_SFR_AICREDIR); -#if defined(CONFIG_DEBUG_IRQ) +#if defined(CONFIG_DEBUG_IRQ_INFO) /* Check if redirection was successfully enabled */ regval = getreg32(SAM_SFR_AICREDIR); - lldbg("Interrupts %s redirected to the AIC\n", - (regval & SFR_AICREDIR_ENABLE) != 0 ? "ARE" : "NOT"); + irqinfo("Interrupts %s redirected to the AIC\n", + (regval & SFR_AICREDIR_ENABLE) != 0 ? "ARE" : "NOT"); #endif } } diff --git a/arch/arm/src/sama5/sam_isi.c b/arch/arm/src/sama5/sam_isi.c index 124734a416cc389bcd6b6871659a14512b41d5b2..86fa8e0dad8d7393a0f32735577d25117b27657f 100644 --- a/arch/arm/src/sama5/sam_isi.c +++ b/arch/arm/src/sama5/sam_isi.c @@ -160,7 +160,7 @@ int sam_isi_initialize(void) */ g_isi.actual = sam_pck_configure(ISI_PCKID, PCKSRC_MCK, CONFIG_ISI_MCKFREQ); - gvdbg("PCK%d frequency=%d actual=%d\n", + ginfo("PCK%d frequency=%d actual=%d\n", ISI_PCKID, CONFIG_ISI_MCKFREQ, g_isi.actual); /* Enable the MCK (output) */ diff --git a/arch/arm/src/sama5/sam_lcd.c b/arch/arm/src/sama5/sam_lcd.c index 8032bb04f46620ecca0d016172e76035870e1046..3befc8fec63fa02f620af99e424a71674826a461 100644 --- a/arch/arm/src/sama5/sam_lcd.c +++ b/arch/arm/src/sama5/sam_lcd.c @@ -492,7 +492,7 @@ /* Debug */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_LCD_INFO # undef CONFIG_SAMA5_LCDC_REGDEBUG #endif @@ -666,7 +666,7 @@ struct sam_lcdc_s ****************************************************************************/ /* Register operations ******************************************************/ -#if defined(CONFIG_SAMA5_LCDC_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_SAMA5_LCDC_REGDEBUG static bool sam_checkreg(bool wr, uint32_t regval, uintptr_t address); static uint32_t sam_getreg(uintptr_t addr); static void sam_putreg(uintptr_t addr, uint32_t val); @@ -977,10 +977,6 @@ static const uintptr_t g_layerclut[LCDC_NLAYERS] = }; #endif -/**************************************************************************** - * Public Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -1021,7 +1017,7 @@ static bool sam_checkreg(bool wr, uint32_t regval, uintptr_t address) { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", g_lcdc.ntimes); + lcdinfo("...[Repeats %d times]...\n", g_lcdc.ntimes); } /* Save information about the new access */ @@ -1053,7 +1049,7 @@ static uint32_t sam_getreg(uintptr_t address) if (sam_checkreg(false, regval, address)) { - lldbg("%08x->%08x\n", address, regval); + lcdinfo("%08x->%08x\n", address, regval); } return regval; @@ -1073,7 +1069,7 @@ static void sam_putreg(uintptr_t address, uint32_t regval) { if (sam_checkreg(true, regval, address)) { - lldbg("%08x<-%08x\n", address, regval); + lcdinfo("%08x<-%08x\n", address, regval); } putreg32(regval, address); @@ -1101,14 +1097,14 @@ static void sam_wait_lcdstatus(uint32_t mask, uint32_t value) static int sam_base_getvideoinfo(struct fb_vtable_s *vtable, struct fb_videoinfo_s *vinfo) { - gvdbg("vtable=%p vinfo=%p\n", vtable, vinfo); + lcdinfo("vtable=%p vinfo=%p\n", vtable, vinfo); if (vtable && vinfo) { memcpy(vinfo, &g_base_videoinfo, sizeof(struct fb_videoinfo_s)); return OK; } - gdbg("ERROR: Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -1119,7 +1115,7 @@ static int sam_base_getvideoinfo(struct fb_vtable_s *vtable, static int sam_base_getplaneinfo(struct fb_vtable_s *vtable, int planeno, struct fb_planeinfo_s *pinfo) { - gvdbg("vtable=%p planeno=%d pinfo=%p\n", vtable, planeno, pinfo); + lcdinfo("vtable=%p planeno=%d pinfo=%p\n", vtable, planeno, pinfo); if (vtable && planeno == 0 && pinfo) { pinfo->fbmem = (void *)LAYER_BASE.framebuffer; @@ -1130,7 +1126,7 @@ static int sam_base_getplaneinfo(struct fb_vtable_s *vtable, int planeno, return OK; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -1166,27 +1162,27 @@ static int sam_base_putcmap(struct fb_vtable_s *vtable, static int sam_hcr_getcursor(struct fb_vtable_s *vtable, struct fb_cursorattrib_s *attrib) { - gvdbg("vtable=%p attrib=%p\n", vtable, attrib); + lcdinfo("vtable=%p attrib=%p\n", vtable, attrib); if (vtable && attrib) { #ifdef CONFIG_FB_HWCURSORIMAGE attrib->fmt = SAMA5_HCR_COLOR_FMT; #endif - gvdbg("pos: (x=%d, y=%d)\n", g_lcdc.cpos.x, g_lcdc.cpos.y); + lcdinfo("pos: (x=%d, y=%d)\n", g_lcdc.cpos.x, g_lcdc.cpos.y); attrib->pos = g_lcdc.cpos; #ifdef CONFIG_FB_HWCURSORSIZE attrib->mxsize.h = CONFIG_SAMA5_LCDC_HCR_HEIGHT; attrib->mxsize.w = CONFIG_SAMA5_LCDC_HCR_WIDTH; - gvdbg("size: (h=%d, w=%d)\n", g_lcdc.csize.h, g_lcdc.csize.w); + lcdinfo("size: (h=%d, w=%d)\n", g_lcdc.csize.h, g_lcdc.csize.w); attrib->size = g_lcdc.csize; #endif return OK; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } #endif @@ -1199,26 +1195,26 @@ static int sam_hcr_getcursor(struct fb_vtable_s *vtable, static int sam_hcr_setcursor(struct fb_vtable_s *vtable, struct fb_setcursor_s *setttings) { - gvdbg("vtable=%p setttings=%p\n", vtable, setttings); + lcdinfo("vtable=%p setttings=%p\n", vtable, setttings); if (vtable && setttings) { - gvdbg("flags: %02x\n", settings->flags); + lcdinfo("flags: %02x\n", settings->flags); if ((flags & FB_CUR_SETPOSITION) != 0) { g_lcdc.cpos = settings->pos; - gvdbg("pos: (h:%d, w:%d)\n", g_lcdc.cpos.x, g_lcdc.cpos.y); + lcdinfo("pos: (h:%d, w:%d)\n", g_lcdc.cpos.x, g_lcdc.cpos.y); } #ifdef CONFIG_FB_HWCURSORSIZE if ((flags & FB_CUR_SETSIZE) != 0) { g_lcdc.csize = settings->size; - gvdbg("size: (h:%d, w:%d)\n", g_lcdc.csize.h, g_lcdc.csize.w); + lcdinfo("size: (h:%d, w:%d)\n", g_lcdc.csize.h, g_lcdc.csize.w); } #endif #ifdef CONFIG_FB_HWCURSORIMAGE if ((flags & FB_CUR_SETIMAGE) != 0) { - gvdbg("image: (h:%d, w:%d) @ %p\n", + lcdinfo("image: (h:%d, w:%d) @ %p\n", settings->img.height, settings->img.width, settings->img.image); } @@ -1226,7 +1222,7 @@ static int sam_hcr_setcursor(struct fb_vtable_s *vtable, return OK; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } #endif @@ -1291,14 +1287,14 @@ static void sam_dmasetup(int lid, struct sam_dscr_s *dscr, uint8_t *buffer) sam_putreg(g_layernext[lid], physdscr); } -#if defined(CONFIG_DEBUG_GRAPHICS) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_GRAPHICS) && defined(CONFIG_DEBUG_INFO) /* Dump the DMA setup */ - gvdbg("DMA descriptor: addr=%08x ctrl=%08x next=%08x\n", - dscr->addr, dscr->ctrl, dscr->next); - gvdbg("DMA registers[%d]: head=%08x addr=%08x ctrl=%08x next=%08x\n", - lid, sam_getreg(g_layerhead[lid]), sam_getreg(g_layeraddr[lid]), - sam_getreg(g_layerctrl[lid]), sam_getreg(g_layernext[lid])); + lcdinfo("DMA descriptor: addr=%08x ctrl=%08x next=%08x\n", + dscr->addr, dscr->ctrl, dscr->next); + lcdinfo("DMA registers[%d]: head=%08x addr=%08x ctrl=%08x next=%08x\n", + lid, sam_getreg(g_layerhead[lid]), sam_getreg(g_layeraddr[lid]), + sam_getreg(g_layerctrl[lid]), sam_getreg(g_layernext[lid])); #endif } @@ -1379,8 +1375,8 @@ static int sam_setclut(struct sam_layer_s *layer, unsigned int end; int i; - gvdbg("layer=%d cmap=%p first=%d len=%d\n", - layer->lid, cmap, cmap->first, cmap->len); + lcdinfo("layer=%d cmap=%p first=%d len=%d\n", + layer->lid, cmap, cmap->first, cmap->len); DEBUGASSERT(layer && cmap); @@ -1391,7 +1387,7 @@ static int sam_setclut(struct sam_layer_s *layer, if (offset >= SAM_LCDC_NCLUT) { - gdbg("ERROR: CLUT offset is out of range: %d\n", offset); + lcderr("ERROR: CLUT offset is out of range: %d\n", offset); return -EINVAL; } @@ -1460,7 +1456,7 @@ static int sam_getclut(struct sam_layer_s *layer, uintptr_t regval; int i; - gvdbg("layer=%d cmap=%p first=%d len=%d\n", + lcdinfo("layer=%d cmap=%p first=%d len=%d\n", layer->lid, cmap, layer->offset, layer->nclut); DEBUGASSERT(layer && cmap); @@ -1514,7 +1510,7 @@ static void sam_pio_config(void) { int i; - gvdbg("Configuring pins\n"); + lcdinfo("Configuring pins\n"); /* Configure each pin */ @@ -2915,7 +2911,7 @@ int up_fbinitialize(int display) uint32_t regval; #endif - gvdbg("Entry\n"); + lcdinfo("Entry\n"); /* Configure layer layer structures, DMA descriptor memory, and * framebuffers @@ -2931,7 +2927,7 @@ int up_fbinitialize(int display) sam_pio_config(); - gvdbg("Configuring the LCD controller\n"); + lcdinfo("Configuring the LCD controller\n"); /* Enable the LCD peripheral clock */ @@ -2959,7 +2955,7 @@ int up_fbinitialize(int display) /* And turn the LCD on */ - gvdbg("Enabling the display\n"); + lcdinfo("Enabling the display\n"); sam_lcd_enable(); /* Display base layer */ @@ -3012,7 +3008,7 @@ int up_fbinitialize(int display) FAR struct fb_vtable_s *up_fbgetvplane(int display, int vplane) { - gvdbg("vplane: %d\n", vplane); + lcdinfo("vplane: %d\n", vplane); if (vplane == 0) { return (struct fb_vtable_s *)&g_base_vtable; @@ -3062,8 +3058,8 @@ void sam_lcdclear(nxgl_mxpixel_t color) uint16_t *dest = (uint16_t *)LAYER_BASE.framebuffer; int i; - gvdbg("Clearing display: BPP=16 color=%04x framebuffer=%08x size=%d\n", - color, LAYER_BASE.framebuffer, SAMA5_BASE_FBSIZE); + lcdinfo("Clearing display: BPP=16 color=%04x framebuffer=%08x size=%d\n", + color, LAYER_BASE.framebuffer, SAMA5_BASE_FBSIZE); for (i = 0; i < SAMA5_BASE_FBSIZE; i += sizeof(uint16_t)) { @@ -3076,8 +3072,8 @@ void sam_lcdclear(nxgl_mxpixel_t color) uint8_t b; int i; - gvdbg("Clearing display: BPP=24 color=%06x framebuffer=%08x size=%d\n", - color, LAYER_BASE.framebuffer, SAMA5_BASE_FBSIZE); + lcdinfo("Clearing display: BPP=24 color=%06x framebuffer=%08x size=%d\n", + color, LAYER_BASE.framebuffer, SAMA5_BASE_FBSIZE); b = color & 0xff; g = (color >> 8) & 0xff; @@ -3093,8 +3089,8 @@ void sam_lcdclear(nxgl_mxpixel_t color) uint32_t *dest = (uint32_t *)LAYER_BASE.framebuffer; int i; - gvdbg("Clearing display: BPP=32 color=%08x framebuffer=%08x size=%d\n", - color, LAYER_BASE.framebuffer, SAMA5_BASE_FBSIZE); + lcdinfo("Clearing display: BPP=32 color=%08x framebuffer=%08x size=%d\n", + color, LAYER_BASE.framebuffer, SAMA5_BASE_FBSIZE); for (i = 0; i < SAMA5_BASE_FBSIZE; i += sizeof(uint32_t)) { diff --git a/arch/arm/src/sama5/sam_memories.c b/arch/arm/src/sama5/sam_memories.c index 231545ed55928a05a83286315d8c69ebcb21805f..54c8e65b5616e9d2c8d904caafd46685cc541af3 100644 --- a/arch/arm/src/sama5/sam_memories.c +++ b/arch/arm/src/sama5/sam_memories.c @@ -766,7 +766,7 @@ uintptr_t sam_physregaddr(uintptr_t virtregaddr) * address */ - dbg("Bad virtual address: %08lx\n", virtregaddr); + serr("ERROR: Bad virtual address: %08lx\n", virtregaddr); DEBUGPANIC(); return virtregaddr; } @@ -925,7 +925,7 @@ uintptr_t sam_physramaddr(uintptr_t virtramaddr) if (virtramaddr != 0) { - dbg("Bad virtual address: %08lx\n", virtramaddr); + serr("ERROR: Bad virtual address: %08lx\n", virtramaddr); DEBUGPANIC(); } @@ -1058,7 +1058,7 @@ uintptr_t sam_virtramaddr(uintptr_t physramaddr) if (physramaddr != 0) { - dbg("Bad physical address: %08lx\n|", physramaddr); + serr("ERROR: Bad physical address: %08lx\n|", physramaddr); DEBUGPANIC(); } diff --git a/arch/arm/src/sama5/sam_nand.c b/arch/arm/src/sama5/sam_nand.c index d5d235d21685c828b942afc4098d483a6a9dec6a..0e6757c073e4eb8a3c37610da101e13fcad48f24 100644 --- a/arch/arm/src/sama5/sam_nand.c +++ b/arch/arm/src/sama5/sam_nand.c @@ -999,7 +999,7 @@ static uint32_t nand_nfc_poll(void) sr = nand_getreg(SAM_HSMC_SR); #ifndef CONFIG_SAMA5_NAND_REGDEBUG - // fllvdbg("sr=%08x\n", sr); + // finfo("sr=%08x\n", sr); #endif /* When set to one, this XFRDONE indicates that the NFC has terminated @@ -1065,7 +1065,7 @@ static int hsmc_interrupt(int irq, void *context) uint32_t pending = sr & imr; #ifndef CONFIG_SAMA5_NAND_REGDEBUG - fllvdbg("sr=%08x imr=%08x\n", sr, imr); + finfo("sr=%08x imr=%08x\n", sr, imr); #endif /* When set to one, this XFRDONE indicates that the NFC has terminated @@ -1163,7 +1163,7 @@ static void nand_dma_sampleinit(struct sam_nandcs_s *priv) #ifdef CONFIG_SAMA5_NAND_DMADEBUG static void nand_dma_sampledone(struct sam_nandcs_s *priv, int result) { - lldbg("result: %d\n", result); + finfo("result: %d\n", result); /* Sample the final registers */ @@ -1233,7 +1233,7 @@ static int nand_wait_dma(struct sam_nandcs_s *priv) } } - fvdbg("Awakened: result=%d\n", priv->result); + finfo("Awakened: result=%d\n", priv->result); priv->dmadone = false; return priv->result; } @@ -1293,7 +1293,7 @@ static int nand_dma_read(struct sam_nandcs_s *priv, DEBUGASSERT(priv->dma); - fvdbg("vsrc=%08x vdest=%08x nbytes=%d\n", + finfo("vsrc=%08x vdest=%08x nbytes=%d\n", (int)vsrc, (int)vdest, (int)nbytes); /* Initialize sampling */ @@ -1325,7 +1325,7 @@ static int nand_dma_read(struct sam_nandcs_s *priv, ret = sam_dmarxsetup(priv->dma, psrc, pdest, nbytes); if (ret < 0) { - fdbg("ERROR: sam_dmarxsetup failed: %d\n", ret); + ferr("ERROR: sam_dmarxsetup failed: %d\n", ret); return ret; } @@ -1344,7 +1344,7 @@ static int nand_dma_read(struct sam_nandcs_s *priv, ret = nand_wait_dma(priv); if (ret < 0) { - fdbg("ERROR: DMA failed: %d\n", ret); + ferr("ERROR: DMA failed: %d\n", ret); } nand_dma_sample(priv, DMA_END_TRANSFER); @@ -1410,7 +1410,7 @@ static int nand_dma_write(struct sam_nandcs_s *priv, ret = sam_dmatxsetup(priv->dma, pdest, psrc, nbytes); if (ret < 0) { - fdbg("ERROR: sam_dmatxsetup failed: %d\n", ret); + ferr("ERROR: sam_dmatxsetup failed: %d\n", ret); return ret; } @@ -1429,7 +1429,7 @@ static int nand_dma_write(struct sam_nandcs_s *priv, ret = nand_wait_dma(priv); if (ret < 0) { - fdbg("ERROR: DMA failed: %d\n", ret); + ferr("ERROR: DMA failed: %d\n", ret); } nand_dma_sample(priv, DMA_END_TRANSFER); @@ -1463,7 +1463,7 @@ static int nand_nfcsram_read(struct sam_nandcs_s *priv, uint8_t *buffer, int remaining; int ret; - fvdbg("buffer=%p buflen=%d\n", buffer, buflen); + finfo("buffer=%p buflen=%d\n", buffer, buflen); /* Get the offset data source address */ @@ -1530,7 +1530,7 @@ static int nand_read(struct sam_nandcs_s *priv, uint8_t *buffer, int buswidth; int ret; - fvdbg("buffer=%p buflen=%d\n", buffer, (int)buflen); + finfo("buffer=%p buflen=%d\n", buffer, (int)buflen); /* Get the buswidth */ @@ -1622,7 +1622,7 @@ static int nand_read_pmecc(struct sam_nandcs_s *priv, off_t block, uint16_t sparesize; int ret; - fvdbg("block=%d page=%d data=%p\n", (int)block, page, data); + finfo("block=%d page=%d data=%p\n", (int)block, page, data); DEBUGASSERT(priv && data); /* Get page and spare sizes */ @@ -1655,7 +1655,7 @@ static int nand_read_pmecc(struct sam_nandcs_s *priv, off_t block, break; default: - fdbg("ERROR: Unsupported page size: %d\n", pagesize); + ferr("ERROR: Unsupported page size: %d\n", pagesize); return -EINVAL; } @@ -1719,7 +1719,7 @@ static int nand_read_pmecc(struct sam_nandcs_s *priv, off_t block, #endif if (ret < 0) { - fdbg("ERROR: nand_read for data region failed: %d\n", ret); + ferr("ERROR: nand_read for data region failed: %d\n", ret); return ret; } @@ -1732,7 +1732,7 @@ static int nand_read_pmecc(struct sam_nandcs_s *priv, off_t block, #endif if (ret < 0) { - fdbg("ERROR: nand_read for spare region failed: %d\n", ret); + ferr("ERROR: nand_read for spare region failed: %d\n", ret); return ret; } @@ -1765,7 +1765,7 @@ static int nand_nfcsram_write(struct sam_nandcs_s *priv, uint8_t *buffer, uintptr_t dest; int ret; - fvdbg("buffer=%p buflen=%d offset=%d\n", buffer, buflen, offset); + finfo("buffer=%p buflen=%d offset=%d\n", buffer, buflen, offset); nand_dump("NFC SRAM Write", buffer, buflen); /* Apply the offset to the destination address */ @@ -1829,7 +1829,7 @@ static int nand_write(struct sam_nandcs_s *priv, uint8_t *buffer, int buswidth; int ret; - fvdbg("buffer=%p buflen=%d offset=%d\n", buffer, buflen, offset); + finfo("buffer=%p buflen=%d offset=%d\n", buffer, buflen, offset); nand_dump("NAND Write", buffer, buflen); /* Apply the offset to the destination address */ @@ -1924,7 +1924,7 @@ static int nand_readpage_noecc(struct sam_nandcs_s *priv, off_t block, off_t coladdr; int ret; - fvdbg("block=%d page=%d data=%p spare=%p\n", (int)block, page, data, spare); + finfo("block=%d page=%d data=%p spare=%p\n", (int)block, page, data, spare); DEBUGASSERT(priv && (data || spare)); /* Get page and spare sizes */ @@ -1957,7 +1957,7 @@ static int nand_readpage_noecc(struct sam_nandcs_s *priv, off_t block, break; default: - fdbg("ERROR: Unsupported page size: %d\n", pagesize); + ferr("ERROR: Unsupported page size: %d\n", pagesize); return -EINVAL; } @@ -1987,7 +1987,7 @@ static int nand_readpage_noecc(struct sam_nandcs_s *priv, off_t block, ret = nand_nfcsram_read(priv, (uint8_t *)data, pagesize, 0); if (ret < 0) { - fdbg("ERROR: nand_nfcsram_read for data region failed: %d\n", ret); + ferr("ERROR: nand_nfcsram_read for data region failed: %d\n", ret); return ret; } } @@ -2003,7 +2003,7 @@ static int nand_readpage_noecc(struct sam_nandcs_s *priv, off_t block, ret = nand_nfcsram_read(priv, (uint8_t *)spare, sparesize, offset); if (ret < 0) { - fdbg("ERROR: nand_nfcsram_read for spare region failed: %d\n", ret); + ferr("ERROR: nand_nfcsram_read for spare region failed: %d\n", ret); return ret; } } @@ -2038,7 +2038,7 @@ static int nand_readpage_pmecc(struct sam_nandcs_s *priv, off_t block, int ret; int i; - fvdbg("block=%d page=%d data=%p\n", (int)block, page, data); + finfo("block=%d page=%d data=%p\n", (int)block, page, data); DEBUGASSERT(priv && data); /* Make sure that we have exclusive access to the PMECC and that the PMECC @@ -2049,7 +2049,7 @@ static int nand_readpage_pmecc(struct sam_nandcs_s *priv, off_t block, ret = pmecc_configure(priv, false); if (ret < 0) { - fdbg("ERROR: pmecc_configure failed: %d\n", ret); + ferr("ERROR: pmecc_configure failed: %d\n", ret); goto errout; } @@ -2060,7 +2060,7 @@ static int nand_readpage_pmecc(struct sam_nandcs_s *priv, off_t block, ret = nand_read_pmecc(priv, block, page, data); if (ret < 0) { - fdbg("ERROR: Block %d page %d Failed to read page\n", + ferr("ERROR: Block %d page %d Failed to read page\n", block, page, ret); goto errout; } @@ -2076,7 +2076,7 @@ static int nand_readpage_pmecc(struct sam_nandcs_s *priv, off_t block, ret = nand_readpage_noecc(priv, block, page, NULL, priv->raw.spare); if (ret < 0) { - fdbg("ERROR: Block %d page %d Failed to re-read spare area: %d\n", + ferr("ERROR: Block %d page %d Failed to re-read spare area: %d\n", block, page, ret); goto errout; } @@ -2098,13 +2098,13 @@ static int nand_readpage_pmecc(struct sam_nandcs_s *priv, off_t block, { /* Yes.. clear sector errors */ - fdbg("Block=%d page=%d has been erased: %08x\n", + finfo("Block=%d page=%d has been erased: %08x\n", block, page, regval); regval = 0; } else { - fdbg("ERROR: block=%d page=%d Corrupted sectors: %08x\n", + ferr("ERROR: block=%d page=%d Corrupted sectors: %08x\n", block, page, regval); } } @@ -2114,7 +2114,7 @@ static int nand_readpage_pmecc(struct sam_nandcs_s *priv, off_t block, ret = pmecc_correction(regval, (uintptr_t)data); if (ret < 0) { - fdbg("ERROR: block=%d page=%d Unrecoverable data error: %d\n", + ferr("ERROR: block=%d page=%d Unrecoverable data error: %d\n", block, page, ret); } @@ -2159,7 +2159,7 @@ static int nand_writepage_noecc(struct sam_nandcs_s *priv, off_t block, off_t rowaddr; int ret = OK; - fvdbg("block=%d page=%d data=%p spare=%p\n", (int)block, page, data, spare); + finfo("block=%d page=%d data=%p spare=%p\n", (int)block, page, data, spare); /* Get page and spare sizes */ @@ -2191,7 +2191,7 @@ static int nand_writepage_noecc(struct sam_nandcs_s *priv, off_t block, break; default: - fdbg("ERROR: Unsupported page size: %d\n", pagesize); + ferr("ERROR: Unsupported page size: %d\n", pagesize); return -EINVAL; } @@ -2220,7 +2220,7 @@ static int nand_writepage_noecc(struct sam_nandcs_s *priv, off_t block, ret = nand_nfcsram_write(priv, (uint8_t *)data, pagesize, 0); if (ret < 0) { - fdbg("ERROR: nand_nfcsram_write for data region failed: %d\n", ret); + ferr("ERROR: nand_nfcsram_write for data region failed: %d\n", ret); return ret; } @@ -2229,7 +2229,7 @@ static int nand_writepage_noecc(struct sam_nandcs_s *priv, off_t block, ret = nand_nfcsram_write(priv, (uint8_t *)spare, sparesize, pagesize); if (ret < 0) { - fdbg("ERROR: nand_nfcsram_write for data region failed: %d\n", ret); + ferr("ERROR: nand_nfcsram_write for data region failed: %d\n", ret); return ret; } } @@ -2257,7 +2257,7 @@ static int nand_writepage_noecc(struct sam_nandcs_s *priv, off_t block, ret = nand_operation_complete(priv); if (ret < 0) { - fdbg("ERROR: Failed writing data area: %d\n", ret); + ferr("ERROR: Failed writing data area: %d\n", ret); } } @@ -2272,7 +2272,7 @@ static int nand_writepage_noecc(struct sam_nandcs_s *priv, off_t block, ret = nand_write(priv, (uint8_t *)spare, sparesize, 0); if (ret < 0) { - fdbg("ERROR: nand_write for spare region failed: %d\n", ret); + ferr("ERROR: nand_write for spare region failed: %d\n", ret); ret = -EPERM; } @@ -2320,7 +2320,7 @@ static int nand_writepage_pmecc(struct sam_nandcs_s *priv, off_t block, unsigned int i; int ret = 0; - fvdbg("block=%d page=%d data=%p\n", (int)block, page, data); + finfo("block=%d page=%d data=%p\n", (int)block, page, data); DEBUGASSERT(priv && data); /* Make sure that we have exclusive access to the PMECC and that the PMECC @@ -2331,7 +2331,7 @@ static int nand_writepage_pmecc(struct sam_nandcs_s *priv, off_t block, ret = pmecc_configure(priv, false); if (ret < 0) { - fdbg("ERROR: pmecc_configure failed: %d\n", ret); + ferr("ERROR: pmecc_configure failed: %d\n", ret); goto errout; } @@ -2344,7 +2344,7 @@ static int nand_writepage_pmecc(struct sam_nandcs_s *priv, off_t block, /* Calculate physical address of the page */ rowaddr = block * nandmodel_pagesperblock(&priv->raw.model) + page; - fvdbg("pagesize=%d eccsaddr=%d rowaddr=%d\n", pagesize, eccsaddr, rowaddr); + finfo("pagesize=%d eccsaddr=%d rowaddr=%d\n", pagesize, eccsaddr, rowaddr); #if 1 /* Use NFC SRAM */ /* Write the data area to NFC SRAM */ @@ -2352,7 +2352,7 @@ static int nand_writepage_pmecc(struct sam_nandcs_s *priv, off_t block, ret = nand_nfcsram_write(priv, (uint8_t *)data, pagesize, 0); if (ret < 0) { - fdbg("ERROR: Block %d page %d nand_nfcsram_write for data region failed: %d\n", + ferr("ERROR: Block %d page %d nand_nfcsram_write for data region failed: %d\n", block, page, ret); goto errout; } @@ -2417,7 +2417,7 @@ static int nand_writepage_pmecc(struct sam_nandcs_s *priv, off_t block, ret = nand_write(priv, (uint8_t *)data, pagesize, 0); if (ret < 0) { - fdbg("ERROR: Block %d page %d nand_write for data region failed: %d\n", + ferr("ERROR: Block %d page %d nand_write for data region failed: %d\n", block, page, ret); goto errout; } @@ -2437,7 +2437,7 @@ static int nand_writepage_pmecc(struct sam_nandcs_s *priv, off_t block, eccpersector = (pmecc_get_eccsize()) / sectersperpage; eccsize = sectersperpage * eccpersector; - fvdbg("sectersperpage=%d eccpersector=%d eccsize=%d\n", + finfo("sectersperpage=%d eccpersector=%d eccsize=%d\n", sectersperpage, eccpersector, eccsize); #ifdef CONFIG_SAMA5_PMECC_TRIMPAGE @@ -2474,7 +2474,7 @@ static int nand_writepage_pmecc(struct sam_nandcs_s *priv, off_t block, ret = nand_write(priv, (uint8_t *)g_nand.ecctab, eccsize, 0); if (ret < 0) { - fdbg("ERROR: Block %d page %d nand_write for spare region failed: %d\n", + ferr("ERROR: Block %d page %d nand_write for spare region failed: %d\n", block, page, ret); goto errout; } @@ -2487,7 +2487,7 @@ static int nand_writepage_pmecc(struct sam_nandcs_s *priv, off_t block, ret = nand_operation_complete(priv); if (ret < 0) { - fdbg("ERROR: Block %d page %d Failed writing data area: %d\n", + ferr("ERROR: Block %d page %d Failed writing data area: %d\n", block, page, ret); } @@ -2536,7 +2536,7 @@ static inline int nand_tryeraseblock(struct sam_nandcs_s *priv, off_t block) ret = nand_operation_complete(priv); if (ret < 0) { - fdbg("ERROR: Block %d Could not erase: %d\n", block, ret); + ferr("ERROR: Block %d Could not erase: %d\n", block, ret); } return ret; @@ -2550,7 +2550,7 @@ static int nand_eraseblock(struct nand_raw_s *raw, off_t block) DEBUGASSERT(priv); - fvdbg("block=%d\n", (int)block); + finfo("block=%d\n", (int)block); /* Get exclusvie access to the HSMC hardware. * REVISIT: The scope of this exclusivity is just NAND. @@ -2572,7 +2572,7 @@ static int nand_eraseblock(struct nand_raw_s *raw, off_t block) retries--; } - fdbg("ERROR: Block %d Failed to erase after %d tries\n", + ferr("ERROR: Block %d Failed to erase after %d tries\n", (int)block, NAND_ERASE_NRETRIES); nand_unlock(); @@ -2796,7 +2796,7 @@ static int nand_writepage(struct nand_raw_s *raw, off_t block, static void nand_reset(struct sam_nandcs_s *priv) { - fvdbg("Resetting\n"); + finfo("Resetting\n"); nand_nfc_cleale(priv, 0, COMMAND_RESET, 0, 0, 0); nand_wait_ready(priv); } @@ -2834,7 +2834,7 @@ struct mtd_dev_s *sam_nand_initialize(int cs) uint8_t ecctype; int ret; - fvdbg("CS%d\n", cs); + finfo("CS%d\n", cs); /* Select the device structure (In SAMA5D3, NAND is only supported on CS3). */ @@ -2923,7 +2923,7 @@ struct mtd_dev_s *sam_nand_initialize(int cs) else #endif { - fdbg("ERROR: CS%d unsupported or invalid\n", cs); + ferr("ERROR: CS%d unsupported or invalid\n", cs); return NULL; } @@ -2983,7 +2983,7 @@ struct mtd_dev_s *sam_nand_initialize(int cs) ret = irq_attach(SAM_IRQ_HSMC, hsmc_interrupt); if (ret < 0) { - fdbg("Failed to attach HSMC IRQ (%d)", SAM_IRQ_HSMC); + ferr("ERROR: Failed to attach HSMC IRQ (%d)", SAM_IRQ_HSMC); return NULL; } #endif @@ -3013,7 +3013,7 @@ struct mtd_dev_s *sam_nand_initialize(int cs) ret = board_nandflash_config(cs); if (ret < 0) { - fdbg("ERROR: board_nandflash_config failed for CS%d: %d\n", + ferr("ERROR: board_nandflash_config failed for CS%d: %d\n", cs, ret); return NULL; } @@ -3029,7 +3029,7 @@ struct mtd_dev_s *sam_nand_initialize(int cs) mtd = nand_initialize(&priv->raw); if (!mtd) { - fdbg("ERROR: CS%d nand_initialize failed %d\n", cs); + ferr("ERROR: CS%d nand_initialize failed %d\n", cs); return NULL; } @@ -3043,7 +3043,7 @@ struct mtd_dev_s *sam_nand_initialize(int cs) priv->dma = sam_dmachannel(NAND_DMAC, 0); if (!priv->dma) { - fdbg("ERROR: Failed to allocate the DMA channel for CS%d\n", cs); + ferr("ERROR: Failed to allocate the DMA channel for CS%d\n", cs); } #endif @@ -3088,7 +3088,7 @@ bool nand_checkreg(bool wr, uintptr_t regaddr, uint32_t regval) { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", g_nand.ntimes); + finfo("...[Repeats %d times]...\n", g_nand.ntimes); } /* Save information about the new access */ diff --git a/arch/arm/src/sama5/sam_nand.h b/arch/arm/src/sama5/sam_nand.h index f4229b8d6c0f4075e183cd8b038b632452bd4b9f..808b719aa52d3a94462fb81a64b8a56afec7e64f 100644 --- a/arch/arm/src/sama5/sam_nand.h +++ b/arch/arm/src/sama5/sam_nand.h @@ -259,14 +259,13 @@ /* Debug */ -#if !defined(CONFIG_DEBUG) || !defined(CONFIG_DEBUG_FS) -# undef CONFIG_DEBUG_FS +#ifndef defined(CONFIG_DEBUG_FS_INFO # undef CONFIG_SAMA5_NAND_DMADEBUG # undef CONFIG_SAMA5_NAND_REGDEBUG # undef CONFIG_SAMA5_NAND_DUMP #endif -#if !defined(CONFIG_SAMA5_NAND_DMA) || !defined(CONFIG_DEBUG_DMA) +#if !defined(CONFIG_SAMA5_NAND_DMA) || !defined(CONFIG_DEBUG_DMA_INFO) # undef CONFIG_SAMA5_NAND_DMADEBUG #endif @@ -518,7 +517,7 @@ static inline uint32_t nand_getreg(uintptr_t regaddr) #ifdef CONFIG_SAMA5_NAND_REGDEBUG if (nand_checkreg(false, regaddr, regval)) { - lldbg("%08x->%08x\n", regaddr, regval); + sinfo("%08x->%08x\n", regaddr, regval); } #endif @@ -538,7 +537,7 @@ static inline void nand_putreg(uintptr_t regaddr, uint32_t regval) #ifdef CONFIG_SAMA5_NAND_REGDEBUG if (nand_checkreg(true, regaddr, regval)) { - lldbg("%08x<-%08x\n", regaddr, regval); + sinfo("%08x<-%08x\n", regaddr, regval); } #endif diff --git a/arch/arm/src/sama5/sam_ohci.c b/arch/arm/src/sama5/sam_ohci.c index 5dbad089e961cb9040a5e5cf9ec72db4a0a66404..7d4533dca68907b26077edb006d0954b5f6526ac 100644 --- a/arch/arm/src/sama5/sam_ohci.c +++ b/arch/arm/src/sama5/sam_ohci.c @@ -151,7 +151,7 @@ /* Debug */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_USB_INFO # undef CONFIG_SAMA5_OHCI_REGDEBUG #endif @@ -505,10 +505,6 @@ static struct sam_gtd_s g_tdalloc[SAMA5_OHCI_NTDS] static uint8_t g_bufalloc[SAM_BUFALLOC] __attribute__ ((aligned (SAMA5_DMA_ALIGN))); -/**************************************************************************** - * Public Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -524,7 +520,7 @@ static uint8_t g_bufalloc[SAM_BUFALLOC] #ifdef CONFIG_SAMA5_OHCI_REGDEBUG static void sam_printreg(uint32_t addr, uint32_t val, bool iswrite) { - lldbg("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val); + uinfo("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val); } #endif @@ -574,7 +570,7 @@ static void sam_checkreg(uint32_t addr, uint32_t val, bool iswrite) { /* No.. More than one. */ - lldbg("[repeats %d more times]\n", count); + uinfo("[repeats %d more times]\n", count); } } @@ -1318,7 +1314,7 @@ static inline int sam_reminted(struct sam_ed_s *ed) #ifdef CONFIG_USBHOST_TRACE usbhost_vtrace1(OHCI_VTRACE1_VIRTED, (uintptr_t)ed); #else - uvdbg("ed: %08x head: %08x next: %08x offset: %d\n", + uinfo("ed: %08x head: %08x next: %08x offset: %d\n", ed, physhead, head ? head->hw.nexted : 0, offset); #endif @@ -1358,7 +1354,7 @@ static inline int sam_reminted(struct sam_ed_s *ed) #ifdef CONFIG_USBHOST_TRACE usbhost_vtrace1(OHCI_VTRACE1_VIRTED, (uintptr_t)ed); #else - uvdbg("ed: %08x head: %08x next: %08x\n", + uinfo("ed: %08x head: %08x next: %08x\n", ed, physhead, head ? head->hw.nexted : 0); #endif @@ -2835,7 +2831,7 @@ errout: static int sam_epfree(struct usbhost_driver_s *drvr, usbhost_ep_t ep) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_ASSERTIONS struct sam_rhport_s *rhport = (struct sam_rhport_s *)drvr; #endif struct sam_eplist_s *eplist = (struct sam_eplist_s *)ep; @@ -3103,7 +3099,7 @@ static int sam_ctrlin(struct usbhost_driver_s *drvr, usbhost_ep_t ep0, #ifdef CONFIG_USBHOST_TRACE usbhost_vtrace2(OHCI_VTRACE2_CTRLIN, RHPORT(rhport), req->req); #else - uvdbg("RHPort%d type: %02x req: %02x value: %02x%02x index: %02x%02x len: %02x%02x\n", + uinfo("RHPort%d type: %02x req: %02x value: %02x%02x index: %02x%02x len: %02x%02x\n", RHPORT(rhport), req->type, req->req, req->value[1], req->value[0], req->index[1], req->index[0], req->len[1], req->len[0]); @@ -3152,7 +3148,7 @@ static int sam_ctrlout(struct usbhost_driver_s *drvr, usbhost_ep_t ep0, #ifdef CONFIG_USBHOST_TRACE usbhost_vtrace2(OHCI_VTRACE2_CTRLOUT, RHPORT(rhport), req->req); #else - uvdbg("RHPort%d type: %02x req: %02x value: %02x%02x index: %02x%02x len: %02x%02x\n", + uinfo("RHPort%d type: %02x req: %02x value: %02x%02x index: %02x%02x len: %02x%02x\n", RHPORT(rhport), req->type, req->req, req->value[1], req->value[0], req->index[1], req->index[0], req->len[1], req->len[0]); @@ -3227,7 +3223,7 @@ static int sam_transfer_common(struct sam_rhport_s *rhport, (ed->hw.ctrl & ED_CONTROL_EN_MASK) >> ED_CONTROL_EN_SHIFT, (uint16_t)buflen); #else - uvdbg("EP%d %s toggle: %d maxpacket: %d buflen: %d\n", + uinfo("EP%d %s toggle: %d maxpacket: %d buflen: %d\n", (ed->hw.ctrl & ED_CONTROL_EN_MASK) >> ED_CONTROL_EN_SHIFT, in ? "IN" : "OUT", (ed->hw.headp & ED_HEADP_C) != 0 ? 1 : 0, @@ -3342,7 +3338,7 @@ static ssize_t sam_transfer(struct usbhost_driver_s *drvr, usbhost_ep_t ep, ret = sam_transfer_common(rhport, eplist, buffer, buflen); if (ret < 0) { - udbg("ERROR: sam_transfer_common failed: %d\n", ret); + uerr("ERROR: sam_transfer_common failed: %d\n", ret); goto errout; } @@ -3593,7 +3589,7 @@ static int sam_asynch(struct usbhost_driver_s *drvr, usbhost_ep_t ep, ret = sam_transfer_common(rhport, eplist, buffer, buflen); if (ret < 0) { - udbg("ERROR: sam_transfer_common failed: %d\n", ret); + uerr("ERROR: sam_transfer_common failed: %d\n", ret); goto errout; } @@ -3788,7 +3784,7 @@ static int sam_connect(struct usbhost_driver_s *drvr, /* Set the connected/disconnected flag */ hport->connected = connected; - ullvdbg("Hub port %d connected: %s\n", hport->port, connected ? "YES" : "NO"); + uinfo("Hub port %d connected: %s\n", hport->port, connected ? "YES" : "NO"); /* Report the connection event */ diff --git a/arch/arm/src/sama5/sam_oneshot.c b/arch/arm/src/sama5/sam_oneshot.c index c6d0a79ef58ea3575941fbfc5084a9685c1d4959..5f011ea28745d652f96aa0d458540fd66d9ed722 100644 --- a/arch/arm/src/sama5/sam_oneshot.c +++ b/arch/arm/src/sama5/sam_oneshot.c @@ -108,7 +108,7 @@ static void sam_oneshot_handler(TC_HANDLE tch, void *arg, uint32_t sr) oneshot_handler_t oneshot_handler; void *oneshot_arg; - tcllvdbg("Expired...\n"); + tmrinfo("Expired...\n"); DEBUGASSERT(oneshot && oneshot->handler); /* The clock was stopped, but not disabled when the RC match occurred. @@ -165,7 +165,7 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, uint32_t cmr; int ret; - tcvdbg("chan=%d resolution=%d usec\n", chan, resolution); + tmrinfo("chan=%d resolution=%d usec\n", chan, resolution); DEBUGASSERT(oneshot && resolution > 0); /* Get the TC frequency the corresponds to the requested resolution */ @@ -177,13 +177,13 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, ret = sam_tc_divisor(frequency, &divisor, &cmr); if (ret < 0) { - tcdbg("ERROR: sam_tc_divisor failed: %d\n", ret); + tmrerr("ERROR: sam_tc_divisor failed: %d\n", ret); return ret; } - tcvdbg("frequency=%lu, divisor=%lu, cmr=%08lx\n", - (unsigned long)frequency, (unsigned long)divisor, - (unsigned long)cmr); + tmrinfo("frequency=%lu, divisor=%lu, cmr=%08lx\n", + (unsigned long)frequency, (unsigned long)divisor, + (unsigned long)cmr); /* Allocate the timer/counter and select its mode of operation * @@ -217,7 +217,7 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, oneshot->tch = sam_tc_allocate(chan, cmr); if (!oneshot->tch) { - tcdbg("ERROR: Failed to allocate timer channel %d\n", chan); + tmrerr("ERROR: Failed to allocate timer channel %d\n", chan); return -EBUSY; } @@ -260,8 +260,8 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer uint64_t regval; irqstate_t flags; - tcvdbg("handler=%p arg=%p, ts=(%lu, %lu)\n", - handler, arg, (unsigned long)ts->tv_sec, (unsigned long)ts->tv_nsec); + tmrinfo("handler=%p arg=%p, ts=(%lu, %lu)\n", + handler, arg, (unsigned long)ts->tv_sec, (unsigned long)ts->tv_nsec); DEBUGASSERT(oneshot && handler && ts); /* Was the oneshot already running? */ @@ -271,7 +271,7 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer { /* Yes.. then cancel it */ - tcvdbg("Already running... cancelling\n"); + tmrinfo("Already running... cancelling\n"); (void)sam_oneshot_cancel(oneshot, freerun, NULL); } @@ -293,7 +293,7 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer regval = (usec * (uint64_t)sam_tc_divfreq(oneshot->tch)) / USEC_PER_SEC; - tcvdbg("usec=%llu regval=%08llx\n", usec, regval); + tmrinfo("usec=%llu regval=%08llx\n", usec, regval); DEBUGASSERT(regval <= UINT32_MAX); /* Set up to receive the callback when the interrupt occurs */ @@ -402,7 +402,7 @@ int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *free * REVISIT: This does not appear to be the case. */ - tcvdbg("Cancelling...\n"); + tmrinfo("Cancelling...\n"); count = sam_tc_getcounter(oneshot->tch); rc = sam_tc_getregister(oneshot->tch, TC_REGC); @@ -438,8 +438,8 @@ int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *free * oneshot timer. */ - tcvdbg("rc=%lu count=%lu usec=%lu\n", - (unsigned long)rc, (unsigned long)count, (unsigned long)usec); + tmrinfo("rc=%lu count=%lu usec=%lu\n", + (unsigned long)rc, (unsigned long)count, (unsigned long)usec); /* REVISIT: I am not certain why the timer counter value sometimes * exceeds RC. Might be a bug, or perhaps the counter does not stop @@ -483,8 +483,8 @@ int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *free ts->tv_nsec = (unsigned long)nsec; } - tcvdbg("remaining (%lu, %lu)\n", - (unsigned long)ts->tv_sec, (unsigned long)ts->tv_nsec); + tmrinfo("remaining (%lu, %lu)\n", + (unsigned long)ts->tv_sec, (unsigned long)ts->tv_nsec); } return OK; diff --git a/arch/arm/src/sama5/sam_pck.c b/arch/arm/src/sama5/sam_pck.c index 11202c5d5653709afcfd613443c222ea493b554a..dc96ab678c7df7e2970d369f2abce55bbbefc610 100644 --- a/arch/arm/src/sama5/sam_pck.c +++ b/arch/arm/src/sama5/sam_pck.c @@ -151,7 +151,7 @@ uint32_t sam_pck_configure(enum pckid_e pckid, enum pckid_clksrc_e clksrc, break; default: - dbg("ERROR: Unknown clock source\n"); + _err("ERROR: Unknown clock source\n"); return 0; } @@ -213,8 +213,8 @@ uint32_t sam_pck_configure(enum pckid_e pckid, enum pckid_clksrc_e clksrc, } else { - sdbg("ERROR: frequency cannot be realized.\n"); - sdbg(" frequency=%lu clkin=%lu\n", + serr("ERROR: frequency cannot be realized.\n"); + serr(" frequency=%lu clkin=%lu\n", (unsigned long)frequency, (unsigned long)clkin); return 0; } diff --git a/arch/arm/src/sama5/sam_pio.h b/arch/arm/src/sama5/sam_pio.h index 2b867ea05a9748339b5b43e0e07a7947cc6b7b24..fbcf94d034085072b163c6fb241248befbc16972 100644 --- a/arch/arm/src/sama5/sam_pio.h +++ b/arch/arm/src/sama5/sam_pio.h @@ -214,7 +214,7 @@ void sam_pio_forceclk(pio_pinset_t pinset, bool enable); * ************************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO int sam_dumppio(uint32_t pinset, const char *msg); #else # define sam_dumppio(p,m) diff --git a/arch/arm/src/sama5/sam_pmecc.c b/arch/arm/src/sama5/sam_pmecc.c index 8dfee40e3a6286472294bc37162ac0b5ba84093d..0339068c4fc0729b3ccab1dd6a4da7b52c1f8ec6 100644 --- a/arch/arm/src/sama5/sam_pmecc.c +++ b/arch/arm/src/sama5/sam_pmecc.c @@ -632,7 +632,7 @@ static uint32_t pmecc_errorcorrection(uintptr_t sectorbase, if (bytepos < sectorsz + nand_getreg(SAM_HSMC_PMECCSADDR)) { - fdbg("Correct error bit @[Byte %d, Bit %d]\n", + fwarn("WARNING: Correct error bit @[Byte %d, Bit %d]\n", (int)bytepos, (int)bitpos); if (*(uint8_t *)(sectorbase + bytepos) & (1 << bitpos)) @@ -858,7 +858,7 @@ static int pmecc_pagelayout(uint16_t datasize, uint16_t eccsize) int bcherr1k; int selector; - fvdbg("datasize=%d eccsize=%d\n", datasize, eccsize); + finfo("datasize=%d eccsize=%d\n", datasize, eccsize); DEBUGASSERT(datasize > 0 && eccsize > 0); /* Try for 512 byte sectors */ @@ -870,14 +870,14 @@ static int pmecc_pagelayout(uint16_t datasize, uint16_t eccsize) bcherr512 = pmecc_bcherr512(nsectors512, eccsize); if (bcherr512 < 0) { - fdbg("WARNING: Cannot realize 512B sectors\n"); + fwarn("WARNING: Cannot realize 512B sectors\n"); } else { selector = 1; } - fvdbg("nsectors512=%d bcherr512=%d selector=%d\n", + finfo("nsectors512=%d bcherr512=%d selector=%d\n", nsectors512, bcherr512, selector); /* Try for 1024 byte sectors */ @@ -895,14 +895,14 @@ static int pmecc_pagelayout(uint16_t datasize, uint16_t eccsize) if (bcherr1k < 0) { - fdbg("WARNING: Cannot realize 1KB sectors\n"); + fwarn("WARNING: Cannot realize 1KB sectors\n"); } else { selector |= 2; } - fvdbg("nsectors1k=%d bcherr1k=%d selector=%d\n", + finfo("nsectors1k=%d bcherr1k=%d selector=%d\n", nsectors1k, bcherr1k, selector); /* Now pick the best (most likely 1024) */ @@ -960,7 +960,7 @@ static int pmecc_pagelayout(uint16_t datasize, uint16_t eccsize) g_pmecc.desc.bcherr = ((uint32_t)bcherr << HSMC_PMECCFG_BCHERR_SHIFT); - fvdbg("sector1k=%d nsectors=%d bcherr=%d correctability=%d\n", + finfo("sector1k=%d nsectors=%d bcherr=%d correctability=%d\n", g_pmecc.sector1k, g_pmecc.nsectors, bcherr, g_pmecc.correctability); return OK; @@ -1018,7 +1018,7 @@ int pmecc_configure(struct sam_nandcs_s *priv, bool protected) uint32_t regval; int ret; - fvdbg("protected=%d configured=%d\n", protected, g_pmecc.configured); + finfo("protected=%d configured=%d\n", protected, g_pmecc.configured); /* Check if we need to re-configure */ @@ -1030,7 +1030,7 @@ int pmecc_configure(struct sam_nandcs_s *priv, bool protected) { /* No, we are already configured */ - fvdbg("Already configured\n"); + finfo("Already configured\n"); return OK; } @@ -1059,7 +1059,7 @@ int pmecc_configure(struct sam_nandcs_s *priv, bool protected) ret = pmecc_pagelayout(priv->raw.model.pagesize, eccsize); if (ret < 0) { - fdbg("ERROR: pmecc_pagelayout failed: %d\n", ret); + ferr("ERROR: pmecc_pagelayout failed: %d\n", ret); return ret; } @@ -1096,7 +1096,7 @@ int pmecc_configure(struct sam_nandcs_s *priv, bool protected) #endif } - fvdbg("sectorsz=%08x sectorsperpage=%d mm=%d\n", + finfo("sectorsz=%08x sectorsperpage=%d mm=%d\n", g_pmecc.desc.sectorsz, sectorsperpage, g_pmecc.desc.mm); switch (sectorsperpage) @@ -1114,13 +1114,13 @@ int pmecc_configure(struct sam_nandcs_s *priv, bool protected) g_pmecc.desc.pagesize = HSMC_PMECCFG_PAGESIZE_8SEC; break; default: - fdbg("ERROR: Unsupported sectors per page: %d\n", sectorsperpage); + ferr("ERROR: Unsupported sectors per page: %d\n", sectorsperpage); return -EINVAL; } g_pmecc.desc.nn = (1 << g_pmecc.desc.mm) - 1; - fvdbg("pagesize=%08x nn=%d\n", g_pmecc.desc.pagesize, g_pmecc.desc.nn); + finfo("pagesize=%08x nn=%d\n", g_pmecc.desc.pagesize, g_pmecc.desc.nn); /* Real value of ECC bit number correction (2, 4, 8, 12, 24) */ @@ -1136,19 +1136,19 @@ int pmecc_configure(struct sam_nandcs_s *priv, bool protected) (((g_pmecc.desc.mm * g_pmecc.correctability) >> 3) + 1) * sectorsperpage; } - fvdbg("mm=%d correctability=%d eccsize=%d\n", + finfo("mm=%d correctability=%d eccsize=%d\n", g_pmecc.desc.mm, g_pmecc.correctability, g_pmecc.desc.eccsize); g_pmecc.desc.eccstart = eccoffset; g_pmecc.desc.eccend = eccoffset + g_pmecc.desc.eccsize; - fvdbg("eccstart=%d eccend=%d sparesize=%d\n", + finfo("eccstart=%d eccend=%d sparesize=%d\n", g_pmecc.desc.eccstart, g_pmecc.desc.eccend, priv->raw.model.sparesize); if (g_pmecc.desc.eccend > priv->raw.model.sparesize) { - fdbg("ERROR: No room for ECC in spare bytes %d > %d\n", + ferr("ERROR: No room for ECC in spare bytes %d > %d\n", g_pmecc.desc.eccend, priv->raw.model.sparesize); return -ENOSPC; diff --git a/arch/arm/src/sama5/sam_pwm.c b/arch/arm/src/sama5/sam_pwm.c index c83764d50c5df86d708db534fa566bf2f9f853d1..0de1d91dea0b7ac80bd3b585bcc2d7b7e8c206f4 100644 --- a/arch/arm/src/sama5/sam_pwm.c +++ b/arch/arm/src/sama5/sam_pwm.c @@ -65,6 +65,11 @@ * Pre-processor Definitions ****************************************************************************/ /* Configuration ************************************************************/ + +#ifndef CONFIG_DEBUG_PWM_INFO +# undef CONFIG_SAMA5_PWM_REGDEBUG +#endif + /* Currently, we support only a single PWM peripheral. However, the hooks * are in place to support multiple PWM peripherals. */ @@ -393,30 +398,6 @@ #define PWM_PINMASK (PIO_PORT_MASK | PIO_PIN_MASK) #define PWM_MKINPUT(cfg) (((cfg) & PWM_PINMASK) | PWM_INPUTCFG) -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing PWM */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_PWM -#endif - -#ifdef CONFIG_DEBUG_PWM -# define pwmdbg dbg -# define pwmlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define pwmvdbg vdbg -# define pwmllvdbg llvdbg -# else -# define pwmlldbg(x...) -# define pwmllvdbg(x...) -# endif -#else -# define pwmdbg(x...) -# define pwmlldbg(x...) -# define pwmvdbg(x...) -# define pwmllvdbg(x...) -#endif - /**************************************************************************** * Private Types ****************************************************************************/ @@ -480,7 +461,7 @@ static bool pwm_checkreg(FAR struct sam_pwm_s *chan, bool wr, uint32_t regval, static uint32_t pwm_getreg(FAR struct sam_pwm_chan_s *chan, int offset); static void pwm_putreg(FAR struct sam_pwm_chan_s *chan, int offset, uint32_t regval); -#if defined(CONFIG_DEBUG_PWM) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_PWM_INFO static void pwm_dumpregs(FAR struct sam_pwm_chan_s *chan, FAR const char *msg); #else # define pwm_dumpregs(chan,msg) @@ -713,7 +694,7 @@ static bool pwm_checkreg(FAR struct sam_pwm_s *pwm, bool wr, uint32_t regval, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", pwm->count); + pwminfo("...[Repeats %d times]...\n", pwm->count); } /* Save information about the new access */ @@ -757,7 +738,7 @@ static uint32_t pwm_getreg(struct sam_pwm_chan_s *chan, int offset) #ifdef CONFIG_SAMA5_PWM_REGDEBUG if (pwm_checkreg(&g_pwm, false, regval, regaddr)) { - lldbg("%08x->%08x\n", regaddr, regval); + pwminfo("%08x->%08x\n", regaddr, regval); } #endif @@ -774,7 +755,7 @@ static uint32_t pwm_getreg(struct sam_pwm_chan_s *chan, int offset) #ifdef CONFIG_SAMA5_PWM_REGDEBUG if (pwm_checkreg(pwm, false, regval, regaddr)) { - lldbg("%08x->%08x\n", regaddr, regval); + pwminfo("%08x->%08x\n", regaddr, regval); } #endif @@ -813,7 +794,7 @@ static uint32_t pwm_chan_getreg(struct sam_pwm_chan_s *chan, int offset) if (pwm_checkreg(chan->pwm, false, regval, regaddr)) #endif { - lldbg("%08x->%08x\n", regaddr, regval); + pwminfo("%08x->%08x\n", regaddr, regval); } #endif @@ -844,7 +825,7 @@ static void pwm_putreg(struct sam_pwm_chan_s *chan, int offset, #ifdef CONFIG_SAMA5_PWM_REGDEBUG if (pwm_checkreg(&g_pwm, true, regval, regaddr)) { - lldbg("%08x<-%08x\n", regaddr, regval); + pwminfo("%08x<-%08x\n", regaddr, regval); } #endif @@ -857,7 +838,7 @@ static void pwm_putreg(struct sam_pwm_chan_s *chan, int offset, #ifdef CONFIG_SAMA5_PWM_REGDEBUG if (pwm_checkreg(pwm, true, regval, regaddr)) { - lldbg("%08x<-%08x\n", regaddr, regval); + pwminfo("%08x<-%08x\n", regaddr, regval); } #endif @@ -893,7 +874,7 @@ static void pwm_chan_putreg(struct sam_pwm_chan_s *chan, int offset, if (pwm_checkreg(chan->pwm, true, regval, regaddr)) #endif { - lldbg("%08x<-%08x\n", regaddr, regval); + pwminfo("%08x<-%08x\n", regaddr, regval); } #endif @@ -914,61 +895,61 @@ static void pwm_chan_putreg(struct sam_pwm_chan_s *chan, int offset, * ****************************************************************************/ -#if defined(CONFIG_DEBUG_PWM) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_PWM_INFO static void pwm_dumpregs(struct sam_pwm_chan_s *chan, FAR const char *msg) { - pwmvdbg("PWM: %s\n", msg); - pwmvdbg(" CLK: %08x SR: %08x IMR1: %08x ISR1: %08x\n", + pwminfo("PWM: %s\n", msg); + pwminfo(" CLK: %08x SR: %08x IMR1: %08x ISR1: %08x\n", pwm_getreg(chan, SAM_PWM_CLK_OFFSET), pwm_getreg(chan, SAM_PWM_SR_OFFSET), pwm_getreg(chan, SAM_PWM_IMR1_OFFSET), pwm_getreg(chan, SAM_PWM_ISR1_OFFSET)); - pwmvdbg(" SCM: %08x SCUC: %08x SCUP: %08x IMR2: %08x\n", + pwminfo(" SCM: %08x SCUC: %08x SCUP: %08x IMR2: %08x\n", pwm_getreg(chan, SAM_PWM_SCM_OFFSET), pwm_getreg(chan, SAM_PWM_SCUC_OFFSET), pwm_getreg(chan, SAM_PWM_SCUP_OFFSET), pwm_getreg(chan, SAM_PWM_IMR2_OFFSET)); - pwmvdbg(" ISR2: %08x OOV: %08x OS: %08x FMR: %08x\n", + pwminfo(" ISR2: %08x OOV: %08x OS: %08x FMR: %08x\n", pwm_getreg(chan, SAM_PWM_ISR2_OFFSET), pwm_getreg(chan, SAM_PWM_OOV_OFFSET), pwm_getreg(chan, SAM_PWM_OS_OFFSET), pwm_getreg(chan, SAM_PWM_FMR_OFFSET)); - pwmvdbg(" FSR: %08x FPV: %08x FPE: %08x ELMR0: %08x\n", + pwminfo(" FSR: %08x FPV: %08x FPE: %08x ELMR0: %08x\n", pwm_getreg(chan, SAM_PWM_FSR_OFFSET), pwm_getreg(chan, SAM_PWM_FPV_OFFSET), pwm_getreg(chan, SAM_PWM_FPE_OFFSET), pwm_getreg(chan, SAM_PWM_ELMR0_OFFSET)); - pwmvdbg(" ELMR1: %08x SMMR: %08x WPSR: %08x\n", + pwminfo(" ELMR1: %08x SMMR: %08x WPSR: %08x\n", pwm_getreg(chan, SAM_PWM_ELMR1_OFFSET), pwm_getreg(chan, SAM_PWM_SMMR_OFFSET), pwm_getreg(chan, SAM_PWM_WPSR_OFFSET)); - pwmvdbg(" CMPV0: %08x CMPM0: %08x CMPV1: %08x CMPM1: %08x\n", + pwminfo(" CMPV0: %08x CMPM0: %08x CMPV1: %08x CMPM1: %08x\n", pwm_getreg(chan, SAM_PWM_CMPV0_OFFSET), pwm_getreg(chan, SAM_PWM_CMPM0_OFFSET), pwm_getreg(chan, SAM_PWM_CMPV1_OFFSET), pwm_getreg(chan, SAM_PWM_CMPM1_OFFSET)); - pwmvdbg(" CMPV2: %08x CMPM2: %08x CMPV3: %08x CMPM3: %08x\n", + pwminfo(" CMPV2: %08x CMPM2: %08x CMPV3: %08x CMPM3: %08x\n", pwm_getreg(chan, SAM_PWM_CMPV2_OFFSET), pwm_getreg(chan, SAM_PWM_CMPM2_OFFSET), pwm_getreg(chan, SAM_PWM_CMPV3_OFFSET), pwm_getreg(chan, SAM_PWM_CMPM3_OFFSET)); - pwmvdbg(" CMPV4: %08x CMPM4: %08x CMPV5: %08x CMPM5: %08x\n", + pwminfo(" CMPV4: %08x CMPM4: %08x CMPV5: %08x CMPM5: %08x\n", pwm_getreg(chan, SAM_PWM_CMPV4_OFFSET), pwm_getreg(chan, SAM_PWM_CMPM4_OFFSET), pwm_getreg(chan, SAM_PWM_CMPV5_OFFSET), pwm_getreg(chan, SAM_PWM_CMPM5_OFFSET)); - pwmvdbg(" CMPV6: %08x CMPM6: %08x CMPV7: %08x CMPM7: %08x\n", + pwminfo(" CMPV6: %08x CMPM6: %08x CMPV7: %08x CMPM7: %08x\n", pwm_getreg(chan, SAM_PWM_CMPV6_OFFSET), pwm_getreg(chan, SAM_PWM_CMPM6_OFFSET), pwm_getreg(chan, SAM_PWM_CMPV7_OFFSET), pwm_getreg(chan, SAM_PWM_CMPM7_OFFSET)); - pwmvdbg("Channel %d: %s\n", chan->channel, msg); - pwmvdbg(" CMR: %08x CDTY: %08x CPRD: %08x CCNT: %08x\n", + pwminfo("Channel %d: %s\n", chan->channel, msg); + pwminfo(" CMR: %08x CDTY: %08x CPRD: %08x CCNT: %08x\n", pwm_chan_getreg(chan, SAM_PWM_CMR_OFFSET), pwm_chan_getreg(chan, SAM_PWM_CDTY_OFFSET), pwm_chan_getreg(chan, SAM_PWM_CPRD_OFFSET), pwm_chan_getreg(chan, SAM_PWM_CCNT_OFFSET)); - pwmvdbg(" CT: %08x\n", + pwminfo(" CT: %08x\n", pwm_chan_getreg(chan, SAM_PWM_DT_OFFSET)); } #endif @@ -1018,7 +999,7 @@ static int pwm_setup(FAR struct pwm_lowerhalf_s *dev) { FAR struct sam_pwm_chan_s *chan = (FAR struct sam_pwm_chan_s *)dev; - pwmvdbg("Channel %d: H=%08x L=%08x FI=%08x\n", + pwminfo("Channel %d: H=%08x L=%08x FI=%08x\n", chan->channel, chan->ohpincfg, chan->olpincfg, chan->fipincfg); /* Configure selected PWM pins */ @@ -1061,7 +1042,7 @@ static int pwm_shutdown(FAR struct pwm_lowerhalf_s *dev) { FAR struct sam_pwm_chan_s *chan = (FAR struct sam_pwm_chan_s *)dev; - pwmvdbg("Channel %d\n", chan->channel); + pwminfo("Channel %d\n", chan->channel); /* Make sure that the output has been stopped */ @@ -1124,7 +1105,7 @@ static int pwm_start(FAR struct pwm_lowerhalf_s *dev, #endif default: - pwmdbg("ERROR: Invalid or unsupported clock source value: %d\n", chan->clksrc); + pwmerr("ERROR: Invalid or unsupported clock source value: %d\n", chan->clksrc); return -EINVAL; } @@ -1167,7 +1148,7 @@ static int pwm_start(FAR struct pwm_lowerhalf_s *dev, } pwm_chan_putreg(chan, SAM_PWM_CDTY_OFFSET, regval); - pwmvdbg("Fsrc=%d cprd=%d cdty=%d\n", fsrc, cprd, regval); + pwminfo("Fsrc=%d cprd=%d cdty=%d\n", fsrc, cprd, regval); /* Enable the channel */ @@ -1199,7 +1180,7 @@ static int pwm_stop(FAR struct pwm_lowerhalf_s *dev) { FAR struct sam_pwm_chan_s *chan = (FAR struct sam_pwm_chan_s *)dev; - pwmvdbg("Channel %d\n", chan->channel); + pwminfo("Channel %d\n", chan->channel); /* Disable further PWM interrupts from this channel */ @@ -1231,12 +1212,12 @@ static int pwm_stop(FAR struct pwm_lowerhalf_s *dev) static int pwm_ioctl(FAR struct pwm_lowerhalf_s *dev, int cmd, unsigned long arg) { -#ifdef CONFIG_DEBUG_PWM +#ifdef CONFIG_DEBUG_PWM_INFO FAR struct sam_pwm_chan_s *chan = (FAR struct sam_pwm_chan_s *)dev; /* There are no platform-specific ioctl commands */ - pwmvdbg("Channel %d\n", chan->channel); + pwminfo("Channel %d\n", chan->channel); #endif return -ENOTTY; } @@ -1299,7 +1280,7 @@ FAR struct pwm_lowerhalf_s *sam_pwminitialize(int channel) FAR struct sam_pwm_chan_s *chan; uint32_t regval; - pwmvdbg("Channel %d\n", channel); + pwminfo("Channel %d\n", channel); switch (channel) { @@ -1336,7 +1317,7 @@ FAR struct pwm_lowerhalf_s *sam_pwminitialize(int channel) #endif default: - pwmdbg("ERROR: Channel invalid or not configured: %d\n", channel); + pwmerr("ERROR: Channel invalid or not configured: %d\n", channel); return NULL; } @@ -1366,7 +1347,7 @@ FAR struct pwm_lowerhalf_s *sam_pwminitialize(int channel) ret = irq_attach(SAM_IRQ_PWM, pwm_interrupt); if (ret < 0) { - pwmdbg("ERROR: Failed to attach IRQ%d\n", channel); + pwmerr("ERROR: Failed to attach IRQ%d\n", channel); return NULL; } diff --git a/arch/arm/src/sama5/sam_rtc.c b/arch/arm/src/sama5/sam_rtc.c index 94bca9114246b1a0f894c4de41712667bb7aab86..e73e473b706a7f8e25676f08da7e994d883c4b37 100644 --- a/arch/arm/src/sama5/sam_rtc.c +++ b/arch/arm/src/sama5/sam_rtc.c @@ -77,30 +77,6 @@ #define RTC_MAGIC 0xdeadbeef -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_RTC -#endif - -/* Constants ************************************************************************/ - -/* Debug ****************************************************************************/ - -#ifdef CONFIG_DEBUG_RTC -# define rtcdbg dbg -# define rtcvdbg vdbg -# define rtclldbg lldbg -# define rtcllvdbg llvdbg -#else -# define rtcdbg(x...) -# define rtcvdbg(x...) -# define rtclldbg(x...) -# define rtcllvdbg(x...) -#endif - -/************************************************************************************ - * Private Types - ************************************************************************************/ - /************************************************************************************ * Private Data ************************************************************************************/ @@ -137,19 +113,19 @@ volatile bool g_rtc_enabled = false; * ************************************************************************************/ -#ifdef CONFIG_DEBUG_RTC +#ifdef CONFIG_DEBUG_RTC_INFO static void rtc_dumpregs(FAR const char *msg) { - rtclldbg("%s:\n", msg); - rtclldbg(" CR: %08x\n", getreg32(SAM_RTC_CR)); - rtclldbg(" MR: %08x\n", getreg32(SAM_RTC_MR)); - rtclldbg(" TIMR: %08x\n", getreg32(SAM_RTC_TIMR)); - rtclldbg(" CALR: %08x\n", getreg32(SAM_RTC_CALR)); - rtclldbg(" TIMALR: %08x\n", getreg32(SAM_RTC_TIMALR)); - rtclldbg(" CALALR: %08x\n", getreg32(SAM_RTC_CALALR)); - rtclldbg(" SR: %08x\n", getreg32(SAM_RTC_SR)); - rtclldbg(" IMR: %08x\n", getreg32(SAM_RTC_IMR)); - rtclldbg(" VER: %08x\n", getreg32(SAM_RTC_VER)); + rtcinfo("%s:\n", msg); + rtcinfo(" CR: %08x\n", getreg32(SAM_RTC_CR)); + rtcinfo(" MR: %08x\n", getreg32(SAM_RTC_MR)); + rtcinfo(" TIMR: %08x\n", getreg32(SAM_RTC_TIMR)); + rtcinfo(" CALR: %08x\n", getreg32(SAM_RTC_CALR)); + rtcinfo(" TIMALR: %08x\n", getreg32(SAM_RTC_TIMALR)); + rtcinfo(" CALALR: %08x\n", getreg32(SAM_RTC_CALALR)); + rtcinfo(" SR: %08x\n", getreg32(SAM_RTC_SR)); + rtcinfo(" IMR: %08x\n", getreg32(SAM_RTC_IMR)); + rtcinfo(" VER: %08x\n", getreg32(SAM_RTC_VER)); } #else # define rtc_dumpregs(msg) @@ -169,16 +145,16 @@ static void rtc_dumpregs(FAR const char *msg) * ************************************************************************************/ -#ifdef CONFIG_DEBUG_RTC +#ifdef CONFIG_DEBUG_RTC_INFO static void rtc_dumptime(FAR struct tm *tp, FAR const char *msg) { - rtclldbg("%s:\n", msg); - rtclldbg(" tm_sec: %08x\n", tp->tm_sec); - rtclldbg(" tm_min: %08x\n", tp->tm_min); - rtclldbg(" tm_hour: %08x\n", tp->tm_hour); - rtclldbg(" tm_mday: %08x\n", tp->tm_mday); - rtclldbg(" tm_mon: %08x\n", tp->tm_mon); - rtclldbg(" tm_year: %08x\n", tp->tm_year); + rtcinfo("%s:\n", msg); + rtcinfo(" tm_sec: %08x\n", tp->tm_sec); + rtcinfo(" tm_min: %08x\n", tp->tm_min); + rtcinfo(" tm_hour: %08x\n", tp->tm_hour); + rtcinfo(" tm_mday: %08x\n", tp->tm_mday); + rtcinfo(" tm_mon: %08x\n", tp->tm_mon); + rtcinfo(" tm_year: %08x\n", tp->tm_year); } #else # define rtc_dumptime(tp, msg) @@ -289,7 +265,7 @@ static int rtc_interrupt(int irq, void *context) ret = work_queue(LPWORK, &g_alarmwork, rtc_worker, NULL, 0); if (ret < 0) { - rtclldbg("ERRPR: work_queue failed: %d\n", ret); + rtcerr("ERROR: work_queue failed: %d\n", ret); } /* Disable any further alarm interrupts */ diff --git a/arch/arm/src/sama5/sam_spi.c b/arch/arm/src/sama5/sam_spi.c index 2d370fe7a94175451a6f61cf4d598c9e92d360ab..0386fcc6818c28c65642be08bd5f8e69e07cadad 100644 --- a/arch/arm/src/sama5/sam_spi.c +++ b/arch/arm/src/sama5/sam_spi.c @@ -90,6 +90,10 @@ # define CONFIG_SAMA5_SPI_DMATHRESHOLD 4 #endif +#ifndef CONFIG_DEBUG_SPI_INFO +# undef CONFIG_SAMA5_SPI_REGDEBUG +#endif + #ifdef CONFIG_SAMA5_SPI_DMA # if defined(CONFIG_SAMA5_SPI0) && defined(CONFIG_SAMA5_DMAC0) @@ -125,33 +129,12 @@ #define DMA_TIMEOUT_TICKS MSEC2TICK(DMA_TIMEOUT_MS) /* Debug *******************************************************************/ -/* Check if SPI debut is enabled (non-standard.. no support in - * include/debug.h - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_SPI -# undef CONFIG_SAMA5_SPI_DMADEBUG -# undef CONFIG_SAMA5_SPI_REGDEBUG -#endif +/* Check if SPI debug is enabled */ #ifndef CONFIG_DEBUG_DMA # undef CONFIG_SAMA5_SPI_DMADEBUG #endif -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - #define DMA_INITIAL 0 #define DMA_AFTER_SETUP 1 #define DMA_AFTER_START 2 @@ -243,7 +226,7 @@ static inline void spi_putreg(struct sam_spidev_s *spi, uint32_t value, unsigned int offset); static inline struct sam_spidev_s *spi_device(struct sam_spics_s *spics); -#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_SPI_INFO static void spi_dumpregs(struct sam_spidev_s *spi, const char *msg); #else # define spi_dumpregs(spi,msg) @@ -430,7 +413,7 @@ static bool spi_checkreg(struct sam_spidev_s *spi, bool wr, uint32_t value, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", spi->ntimes); + spiinfo("...[Repeats %d times]...\n", spi->ntimes); } /* Save information about the new access */ @@ -464,7 +447,7 @@ static inline uint32_t spi_getreg(struct sam_spidev_s *spi, #ifdef CONFIG_SAMA5_SPI_REGDEBUG if (spi_checkreg(spi, false, value, address)) { - lldbg("%08x->%08x\n", address, value); + spiinfo("%08x->%08x\n", address, value); } #endif @@ -487,7 +470,7 @@ static inline void spi_putreg(struct sam_spidev_s *spi, uint32_t value, #ifdef CONFIG_SAMA5_SPI_REGDEBUG if (spi_checkreg(spi, true, value, address)) { - lldbg("%08x<-%08x\n", address, value); + spiinfo("%08x<-%08x\n", address, value); } #endif @@ -509,20 +492,20 @@ static inline void spi_putreg(struct sam_spidev_s *spi, uint32_t value, * ****************************************************************************/ -#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_SPI_INFO static void spi_dumpregs(struct sam_spidev_s *spi, const char *msg) { - spivdbg("%s:\n", msg); - spivdbg(" MR:%08x SR:%08x IMR:%08x\n", + spiinfo("%s:\n", msg); + spiinfo(" MR:%08x SR:%08x IMR:%08x\n", getreg32(spi->base + SAM_SPI_MR_OFFSET), getreg32(spi->base + SAM_SPI_SR_OFFSET), getreg32(spi->base + SAM_SPI_IMR_OFFSET)); - spivdbg(" CSR0:%08x CSR1:%08x CSR2:%08x CSR3:%08x\n", + spiinfo(" CSR0:%08x CSR1:%08x CSR2:%08x CSR3:%08x\n", getreg32(spi->base + SAM_SPI_CSR0_OFFSET), getreg32(spi->base + SAM_SPI_CSR1_OFFSET), getreg32(spi->base + SAM_SPI_CSR2_OFFSET), getreg32(spi->base + SAM_SPI_CSR3_OFFSET)); - spivdbg(" WPCR:%08x WPSR:%08x\n", + spiinfo(" WPCR:%08x WPSR:%08x\n", getreg32(spi->base + SAM_SPI_WPCR_OFFSET), getreg32(spi->base + SAM_SPI_WPSR_OFFSET)); } @@ -882,7 +865,7 @@ static int spi_lock(struct spi_dev_s *dev, bool lock) struct sam_spics_s *spics = (struct sam_spics_s *)dev; struct sam_spidev_s *spi = spi_device(spics); - spivdbg("lock=%d\n", lock); + spiinfo("lock=%d\n", lock); if (lock) { /* Take the semaphore (perhaps waiting) */ @@ -930,10 +913,10 @@ static void spi_select(struct spi_dev_s *dev, enum spi_dev_e devid, /* Are we selecting or de-selecting the device? */ - spivdbg("selected=%d\n", selected); + spiinfo("selected=%d\n", selected); if (selected) { - spivdbg("cs=%d\n", spics->cs); + spiinfo("cs=%d\n", spics->cs); /* Before writing the TDR, the PCS field in the SPI_MR register must be set * in order to select a slave. @@ -988,7 +971,7 @@ static uint32_t spi_setfrequency(struct spi_dev_s *dev, uint32_t frequency) uint32_t regval; unsigned int offset; - spivdbg("cs=%d frequency=%d\n", spics->cs, frequency); + spiinfo("cs=%d frequency=%d\n", spics->cs, frequency); /* Check if the requested frequency is the same as the frequency selection */ @@ -1058,14 +1041,14 @@ static uint32_t spi_setfrequency(struct spi_dev_s *dev, uint32_t frequency) /* Calculate the new actual frequency */ actual = SAM_SPI_CLOCK / scbr; - spivdbg("csr[offset=%02x]=%08x actual=%d\n", offset, regval, actual); + spiinfo("csr[offset=%02x]=%08x actual=%d\n", offset, regval, actual); /* Save the frequency setting */ spics->frequency = frequency; spics->actual = actual; - spidbg("Frequency %d->%d\n", frequency, actual); + spiinfo("Frequency %d->%d\n", frequency, actual); return actual; } @@ -1091,7 +1074,7 @@ static void spi_setmode(struct spi_dev_s *dev, enum spi_mode_e mode) uint32_t regval; unsigned int offset; - spivdbg("cs=%d mode=%d\n", spics->cs, mode); + spiinfo("cs=%d mode=%d\n", spics->cs, mode); /* Has the mode changed? */ @@ -1134,7 +1117,7 @@ static void spi_setmode(struct spi_dev_s *dev, enum spi_mode_e mode) } spi_putreg(spi, regval, offset); - spivdbg("csr[offset=%02x]=%08x\n", offset, regval); + spiinfo("csr[offset=%02x]=%08x\n", offset, regval); /* Save the mode so that subsequent re-configurations will be faster */ @@ -1164,7 +1147,7 @@ static void spi_setbits(struct spi_dev_s *dev, int nbits) uint32_t regval; unsigned int offset; - spivdbg("cs=%d nbits=%d\n", spics->cs, nbits); + spiinfo("cs=%d nbits=%d\n", spics->cs, nbits); DEBUGASSERT(spics && nbits > 7 && nbits < 17); /* NOTE: The logic in spi_send and in spi_exchange only handles 8-bit @@ -1186,7 +1169,7 @@ static void spi_setbits(struct spi_dev_s *dev, int nbits) regval |= SPI_CSR_BITS(nbits); spi_putreg(spi, regval, offset); - spivdbg("csr[offset=%02x]=%08x\n", offset, regval); + spiinfo("csr[offset=%02x]=%08x\n", offset, regval); /* Save the selection so the subsequence re-configurations will be faster */ @@ -1224,7 +1207,7 @@ static uint16_t spi_send(struct spi_dev_s *dev, uint16_t wd) rxbyte = (uint8_t)0; spi_exchange(dev, &txbyte, &rxbyte, 1); - spivdbg("Sent %02x received %02x\n", txbyte, rxbyte); + spiinfo("Sent %02x received %02x\n", txbyte, rxbyte); return (uint16_t)rxbyte; } @@ -1270,7 +1253,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, uint32_t pcs; uint32_t data; - spivdbg("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); + spiinfo("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); /* Set up PCS bits */ @@ -1390,7 +1373,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, return; } - spivdbg("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); + spiinfo("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); spics = (struct sam_spics_s *)dev; spi = spi_device(spics); @@ -1476,7 +1459,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, ret = sam_dmarxsetup(spics->rxdma, paddr, maddr, nwords); if (ret < 0) { - dmadbg("ERROR: sam_dmarxsetup failed: %d\n", ret); + dmaerr("ERROR: sam_dmarxsetup failed: %d\n", ret); return; } @@ -1488,7 +1471,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, ret = sam_dmatxsetup(spics->txdma, paddr, maddr, nwords); if (ret < 0) { - dmadbg("ERROR: sam_dmatxsetup failed: %d\n", ret); + dmaerr("ERROR: sam_dmatxsetup failed: %d\n", ret); return; } @@ -1500,7 +1483,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, ret = sam_dmastart(spics->rxdma, spi_rxcallback, (void *)spics); if (ret < 0) { - dmadbg("ERROR: RX sam_dmastart failed: %d\n", ret); + dmaerr("ERROR: RX sam_dmastart failed: %d\n", ret); return; } @@ -1509,7 +1492,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, ret = sam_dmastart(spics->txdma, spi_txcallback, (void *)spics); if (ret < 0) { - dmadbg("ERROR: RX sam_dmastart failed: %d\n", ret); + dmaerr("ERROR: RX sam_dmastart failed: %d\n", ret); sam_dmastop(spics->rxdma); return; } @@ -1531,7 +1514,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, (wdentry_t)spi_dmatimeout, 1, (uint32_t)spics); if (ret != OK) { - spidbg("ERROR: wd_start failed: %d\n", ret); + spierr("ERROR: wd_start failed: %d\n", ret); } /* Wait for the DMA complete */ @@ -1582,7 +1565,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, if (spics->result) { - spidbg("ERROR: DMA failed with result: %d\n", spics->result); + spierr("ERROR: DMA failed with result: %d\n", spics->result); } } #endif /* CONFIG_SAMA5_SPI_DMA */ @@ -1673,7 +1656,7 @@ struct spi_dev_s *sam_spibus_initialize(int port) /* The support SAM parts have only a single SPI port */ - spivdbg("port: %d csno: %d spino: %d\n", port, csno, spino); + spiinfo("port: %d csno: %d spino: %d\n", port, csno, spino); DEBUGASSERT(csno >= 0 && csno <= SAM_SPI_NCS); #if defined(CONFIG_SAMA5_SPI0) && defined(CONFIG_SAMA5_SPI1) @@ -1692,7 +1675,7 @@ struct spi_dev_s *sam_spibus_initialize(int port) spics = (struct sam_spics_s *)zalloc(sizeof(struct sam_spics_s)); if (!spics) { - spidbg("ERROR: Failed to allocate a chip select structure\n"); + spierr("ERROR: Failed to allocate a chip select structure\n"); return NULL; } @@ -1715,7 +1698,7 @@ struct spi_dev_s *sam_spibus_initialize(int port) spics->rxdma = sam_dmachannel(spino, 0); if (!spics->rxdma) { - spidbg("ERROR: Failed to allocate the RX DMA channel\n"); + spierr("ERROR: Failed to allocate the RX DMA channel\n"); spics->candma = false; } } @@ -1725,7 +1708,7 @@ struct spi_dev_s *sam_spibus_initialize(int port) spics->txdma = sam_dmachannel(spino, 0); if (!spics->txdma) { - spidbg("ERROR: Failed to allocate the TX DMA channel\n"); + spierr("ERROR: Failed to allocate the TX DMA channel\n"); sam_dmafree(spics->rxdma); spics->rxdma = NULL; spics->candma = false; @@ -1852,7 +1835,7 @@ struct spi_dev_s *sam_spibus_initialize(int port) spi_putreg(spi, regval, offset); spics->nbits = 8; - spivdbg("csr[offset=%02x]=%08x\n", offset, regval); + spiinfo("csr[offset=%02x]=%08x\n", offset, regval); return &spics->spidev; } diff --git a/arch/arm/src/sama5/sam_ssc.c b/arch/arm/src/sama5/sam_ssc.c index 52aac74b17d7d96efb53a35814c04000b94527d8..8e4e66a03272ccbd8b076de16787f4f286b75cba 100644 --- a/arch/arm/src/sama5/sam_ssc.c +++ b/arch/arm/src/sama5/sam_ssc.c @@ -397,12 +397,7 @@ * include/debug.h */ -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_I2S -#endif - -#ifndef CONFIG_DEBUG_I2S +#ifndef CONFIG_DEBUG_I2S_INFO # undef CONFIG_SAMA5_SSC_DMADEBUG # undef CONFIG_SAMA5_SSC_REGDEBUG # undef CONFIG_SAMA5_SSC_QDEBUG @@ -413,22 +408,6 @@ # undef CONFIG_SAMA5_SSC_DMADEBUG #endif -#ifdef CONFIG_DEBUG_I2S -# define i2sdbg dbg -# define i2slldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define i2svdbg dbg -# define i2sllvdbg lldbg -# else -# define i2svdbg(x...) -# endif -#else -# define i2sdbg(x...) -# define i2slldbg(x...) -# define i2svdbg(x...) -# define i2sllvdbg(x...) -#endif - #define DMA_INITIAL 0 #define DMA_AFTER_SETUP 1 #define DMA_AFTER_START 2 @@ -476,7 +455,7 @@ struct sam_ssc_s uintptr_t base; /* SSC controller register base address */ sem_t exclsem; /* Assures mutually exclusive acess to SSC */ uint8_t datalen; /* Data width (8, 16, or 32) */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES uint8_t align; /* Log2 of data width (0, 1, or 3) */ #endif uint8_t pid; /* Peripheral ID */ @@ -539,7 +518,7 @@ static inline void ssc_putreg(struct sam_ssc_s *priv, unsigned int offset, static inline uintptr_t ssc_physregaddr(struct sam_ssc_s *priv, unsigned int offset); -#if defined(CONFIG_DEBUG_I2S) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_I2S_INFO static void scc_dump_regs(struct sam_ssc_s *priv, const char *msg); #else # define scc_dump_regs(s,m) @@ -724,7 +703,7 @@ static bool ssc_checkreg(struct sam_ssc_s *priv, bool wr, uint32_t regval, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", priv->count); + i2sinfo("...[Repeats %d times]...\n", priv->count); } /* Save information about the new access */ @@ -758,7 +737,7 @@ static inline uint32_t ssc_getreg(struct sam_ssc_s *priv, #ifdef CONFIG_SAMA5_SSC_REGDEBUG if (ssc_checkreg(priv, false, regval, regaddr)) { - lldbg("%08x->%08x\n", regaddr, regval); + i2sinfo("%08x->%08x\n", regaddr, regval); } #endif @@ -781,7 +760,7 @@ static inline void ssc_putreg(struct sam_ssc_s *priv, unsigned int offset, #ifdef CONFIG_SAMA5_SSC_REGDEBUG if (ssc_checkreg(priv, true, regval, regaddr)) { - lldbg("%08x<-%08x\n", regaddr, regval); + i2sinfo("%08x<-%08x\n", regaddr, regval); } #endif @@ -817,21 +796,21 @@ static inline uintptr_t ssc_physregaddr(struct sam_ssc_s *priv, * ****************************************************************************/ -#if defined(CONFIG_DEBUG_I2S) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_I2S_INFO static void scc_dump_regs(struct sam_ssc_s *priv, const char *msg) { - i2svdbg("SSC%d: %s\n", priv->sscno, msg); - i2svdbg(" CMR:%08x RCMR:%08x RFMR:%08x TCMR:%08x\n", + i2sinfo("SSC%d: %s\n", priv->sscno, msg); + i2sinfo(" CMR:%08x RCMR:%08x RFMR:%08x TCMR:%08x\n", getreg32(priv->base + SAM_SSC_CMR_OFFSET), getreg32(priv->base + SAM_SSC_RCMR_OFFSET), getreg32(priv->base + SAM_SSC_RFMR_OFFSET), getreg32(priv->base + SAM_SSC_TCMR_OFFSET)); - i2svdbg(" TFMR:%08x RC0R:%08x RC1R:%08x SR:%08x\n", + i2sinfo(" TFMR:%08x RC0R:%08x RC1R:%08x SR:%08x\n", getreg32(priv->base + SAM_SSC_TFMR_OFFSET), getreg32(priv->base + SAM_SSC_RC0R_OFFSET), getreg32(priv->base + SAM_SSC_RC1R_OFFSET), getreg32(priv->base + SAM_SSC_SR_OFFSET)); - i2svdbg(" IMR:%08x WPMR:%08x WPSR:%08x\n", + i2sinfo(" IMR:%08x WPMR:%08x WPSR:%08x\n", getreg32(priv->base + SAM_SSC_IMR_OFFSET), getreg32(priv->base + SAM_SSC_WPMR_OFFSET), getreg32(priv->base + SAM_SSC_WPSR_OFFSET)); @@ -868,12 +847,12 @@ static void ssc_dump_queue(sq_queue_t *queue) if (!apb) { - i2sllvdbg(" %p: No buffer\n", bfcontainer); + i2sinfo(" %p: No buffer\n", bfcontainer); } else { - i2sllvdbg(" %p: buffer=%p nmaxbytes=%d nbytes=%d\n", - bfcontainer, apb, apb->nmaxbytes, apb->nbytes); + i2sinfo(" %p: buffer=%p nmaxbytes=%d nbytes=%d\n", + bfcontainer, apb, apb->nmaxbytes, apb->nbytes); } } } @@ -883,12 +862,12 @@ static void ssc_dump_queues(struct sam_transport_s *xpt, const char *msg) irqstate_t flags; flags = enter_critical_section(); - i2sllvdbg("%s\n", msg); - i2sllvdbg(" Pending:\n"); + i2sinfo("%s\n", msg); + i2sinfo(" Pending:\n"); ssc_dump_queue(&xpt->pend); - i2sllvdbg(" Active:\n"); + i2sinfo(" Active:\n"); ssc_dump_queue(&xpt->act); - i2sllvdbg(" Done:\n"); + i2sinfo(" Done:\n"); ssc_dump_queue(&xpt->done); leave_critical_section(flags); } @@ -1111,7 +1090,7 @@ static void ssc_dma_sampleinit(struct sam_ssc_s *priv, #if defined(CONFIG_SAMA5_SSC_DMADEBUG) && defined(SSC_HAVE_RX) static void ssc_rxdma_sampledone(struct sam_ssc_s *priv, int result) { - lldbg("result: %d\n", result); + i2sinfo("result: %d\n", result); /* Sample the final registers */ @@ -1176,7 +1155,7 @@ static void ssc_rxdma_sampledone(struct sam_ssc_s *priv, int result) #if defined(CONFIG_SAMA5_SSC_DMADEBUG) && defined(SSC_HAVE_TX) static void ssc_txdma_sampledone(struct sam_ssc_s *priv, int result) { - lldbg("result: %d\n", result); + i2sinfo("result: %d\n", result); /* Sample the final registers */ @@ -1398,7 +1377,7 @@ static int ssc_rxdma_setup(struct sam_ssc_s *priv) if (ret < 0) { - i2slldbg("ERROR: wd_start failed: %d\n", errno); + i2serr("ERROR: wd_start failed: %d\n", errno); } } @@ -1447,7 +1426,7 @@ static void ssc_rx_worker(void *arg) * So we have to start the next DMA here. */ - i2svdbg("rx.act.head=%p rx.done.head=%p\n", + i2sinfo("rx.act.head=%p rx.done.head=%p\n", priv->rx.act.head, priv->rx.done.head); ssc_dump_rxqueues(priv, "RX worker start"); @@ -1586,7 +1565,7 @@ static void ssc_rx_schedule(struct sam_ssc_s *priv, int result) ret = work_queue(HPWORK, &priv->rx.work, ssc_rx_worker, priv, 0); if (ret != 0) { - i2slldbg("ERROR: Failed to queue RX work: %d\n", ret); + i2serr("ERROR: Failed to queue RX work: %d\n", ret); } } } @@ -1811,7 +1790,7 @@ static int ssc_txdma_setup(struct sam_ssc_s *priv) if (ret < 0) { - i2slldbg("ERROR: wd_start failed: %d\n", errno); + i2serr("ERROR: wd_start failed: %d\n", errno); } } @@ -1859,7 +1838,7 @@ static void ssc_tx_worker(void *arg) * So we have to start the next DMA here. */ - i2svdbg("tx.act.head=%p tx.done.head=%p\n", + i2sinfo("tx.act.head=%p tx.done.head=%p\n", priv->tx.act.head, priv->tx.done.head); ssc_dump_txqueues(priv, "TX worker start"); @@ -1986,7 +1965,7 @@ static void ssc_tx_schedule(struct sam_ssc_s *priv, int result) ret = work_queue(HPWORK, &priv->tx.work, ssc_tx_worker, priv, 0); if (ret != 0) { - i2slldbg("ERROR: Failed to queue TX work: %d\n", ret); + i2serr("ERROR: Failed to queue TX work: %d\n", ret); } } } @@ -2059,25 +2038,25 @@ static int ssc_checkwidth(struct sam_ssc_s *priv, int bits) switch (bits) { case 8: -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES priv->align = 0; #endif break; case 16: -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES priv->align = 1; #endif break; case 32: -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES priv->align = 3; #endif break; default: - i2sdbg("ERROR: Unsupported or invalid data width: %d\n", bits); + i2serr("ERROR: Unsupported or invalid data width: %d\n", bits); return (bits < 2 || bits > 32) ? -EINVAL : -ENOSYS; } @@ -2155,7 +2134,7 @@ static uint32_t ssc_rxdatawidth(struct i2s_dev_s *dev, int bits) ret = ssc_checkwidth(priv, bits); if (ret < 0) { - i2sdbg("ERROR: ssc_checkwidth failed: %d\n", ret); + i2serr("ERROR: ssc_checkwidth failed: %d\n", ret); return 0; } @@ -2164,7 +2143,7 @@ static uint32_t ssc_rxdatawidth(struct i2s_dev_s *dev, int bits) ret = ssc_dma_flags(priv, &dmaflags); if (ret < 0) { - i2sdbg("ERROR: ssc_dma_flags failed: %d\n", ret); + i2serr("ERROR: ssc_dma_flags failed: %d\n", ret); return 0; } @@ -2234,7 +2213,7 @@ static int ssc_receive(struct i2s_dev_s *dev, struct ap_buffer_s *apb, #endif DEBUGASSERT(priv && apb && ((uintptr_t)apb->samp & priv->align) == 0); - i2svdbg("apb=%p nmaxbytes=%d arg=%p timeout=%d\n", + i2sinfo("apb=%p nmaxbytes=%d arg=%p timeout=%d\n", apb, apb->nmaxbytes, arg, timeout); ssc_init_buffer(apb->samp, apb->nmaxbytes); @@ -2253,7 +2232,7 @@ static int ssc_receive(struct i2s_dev_s *dev, struct ap_buffer_s *apb, if (!priv->rxenab) { - i2sdbg("ERROR: SSC%d has no receiver\n", priv->sscno); + i2serr("ERROR: SSC%d has no receiver\n", priv->sscno); ret = -EAGAIN; goto errout_with_exclsem; } @@ -2292,7 +2271,7 @@ errout_with_exclsem: return ret; #else - i2sdbg("ERROR: SSC%d has no receiver\n", priv->sscno); + i2serr("ERROR: SSC%d has no receiver\n", priv->sscno); UNUSED(priv); return -ENOSYS; #endif @@ -2366,7 +2345,7 @@ static uint32_t ssc_txdatawidth(struct i2s_dev_s *dev, int bits) ret = ssc_checkwidth(priv, bits); if (ret < 0) { - i2sdbg("ERROR: ssc_checkwidth failed: %d\n", ret); + i2serr("ERROR: ssc_checkwidth failed: %d\n", ret); return 0; } @@ -2375,7 +2354,7 @@ static uint32_t ssc_txdatawidth(struct i2s_dev_s *dev, int bits) ret = ssc_dma_flags(priv, &dmaflags); if (ret < 0) { - i2sdbg("ERROR: ssc_dma_flags failed: %d\n", ret); + i2serr("ERROR: ssc_dma_flags failed: %d\n", ret); return 0; } @@ -2449,7 +2428,7 @@ static int ssc_send(struct i2s_dev_s *dev, struct ap_buffer_s *apb, */ DEBUGASSERT(priv && apb); - i2svdbg("apb=%p nbytes=%d arg=%p timeout=%d\n", + i2sinfo("apb=%p nbytes=%d arg=%p timeout=%d\n", apb, apb->nbytes - apb->curbyte, arg, timeout); ssc_dump_buffer("Sending", &apb->samp[apb->curbyte], @@ -2470,7 +2449,7 @@ static int ssc_send(struct i2s_dev_s *dev, struct ap_buffer_s *apb, if (!priv->txenab) { - i2sdbg("ERROR: SSC%d has no transmitter\n", priv->sscno); + i2serr("ERROR: SSC%d has no transmitter\n", priv->sscno); ret = -EAGAIN; goto errout_with_exclsem; } @@ -2509,7 +2488,7 @@ errout_with_exclsem: return ret; #else - i2sdbg("ERROR: SSC%d has no transmitter\n", priv->sscno); + i2serr("ERROR: SSC%d has no transmitter\n", priv->sscno); UNUSED(priv); return -ENOSYS; #endif @@ -2563,7 +2542,7 @@ static int ssc_rx_configure(struct sam_ssc_s *priv) case SSC_CLKSRC_NONE: /* No clock */ default: - i2sdbg("ERROR: No receiver clock\n"); + i2serr("ERROR: No receiver clock\n"); return -EINVAL; } @@ -2584,7 +2563,7 @@ static int ssc_rx_configure(struct sam_ssc_s *priv) break; default: - i2sdbg("ERROR: Invalid clock output selection\n"); + i2serr("ERROR: Invalid clock output selection\n"); return -EINVAL; } @@ -2688,7 +2667,7 @@ static int ssc_tx_configure(struct sam_ssc_s *priv) case SSC_CLKSRC_NONE: /* No clock */ default: - i2sdbg("ERROR: No transmitter clock\n"); + i2serr("ERROR: No transmitter clock\n"); return -EINVAL; } @@ -2709,7 +2688,7 @@ static int ssc_tx_configure(struct sam_ssc_s *priv) break; default: - i2sdbg("ERROR: Invalid clock output selection\n"); + i2serr("ERROR: Invalid clock output selection\n"); return -EINVAL; } @@ -2929,7 +2908,7 @@ static void ssc_clocking(struct sam_ssc_s *priv) sam_enableperiph1(priv->pid); - i2svdbg("PCSR1=%08x PCR=%08x CMR=%08x\n", + i2sinfo("PCSR1=%08x PCR=%08x CMR=%08x\n", getreg32(SAM_PMC_PCSR1), regval, ssc_getreg(priv, SAM_SSC_CMR_OFFSET)); } @@ -2968,7 +2947,7 @@ static int ssc_dma_flags(struct sam_ssc_s *priv, uint32_t *dmaflags) break; default: - i2sdbg("ERROR: Unsupported data width: %d\n", priv->datalen); + i2serr("ERROR: Unsupported data width: %d\n", priv->datalen); return -ENOSYS; } @@ -3001,7 +2980,7 @@ static int ssc_dma_allocate(struct sam_ssc_s *priv) ret = ssc_dma_flags(priv, &dmaflags); if (ret < 0) { - i2sdbg("ERROR: ssc_dma_flags failed: %d\n", ret); + i2serr("ERROR: ssc_dma_flags failed: %d\n", ret); return ret; } @@ -3018,7 +2997,7 @@ static int ssc_dma_allocate(struct sam_ssc_s *priv) priv->rx.dma = sam_dmachannel(priv->sscno, dmaflags); if (!priv->rx.dma) { - i2sdbg("ERROR: Failed to allocate the RX DMA channel\n"); + i2serr("ERROR: Failed to allocate the RX DMA channel\n"); goto errout; } @@ -3027,7 +3006,7 @@ static int ssc_dma_allocate(struct sam_ssc_s *priv) priv->rx.dog = wd_create(); if (!priv->rx.dog) { - i2sdbg("ERROR: Failed to create the RX DMA watchdog\n"); + i2serr("ERROR: Failed to create the RX DMA watchdog\n"); goto errout; } } @@ -3041,7 +3020,7 @@ static int ssc_dma_allocate(struct sam_ssc_s *priv) priv->tx.dma = sam_dmachannel(priv->sscno, dmaflags); if (!priv->tx.dma) { - i2sdbg("ERROR: Failed to allocate the TX DMA channel\n"); + i2serr("ERROR: Failed to allocate the TX DMA channel\n"); goto errout; } @@ -3050,7 +3029,7 @@ static int ssc_dma_allocate(struct sam_ssc_s *priv) priv->tx.dog = wd_create(); if (!priv->tx.dog) { - i2sdbg("ERROR: Failed to create the TX DMA watchdog\n"); + i2serr("ERROR: Failed to create the TX DMA watchdog\n"); goto errout; } } @@ -3257,7 +3236,7 @@ static void ssc0_configure(struct sam_ssc_s *priv) priv->base = SAM_SSC0_VBASE; priv->datalen = CONFIG_SAMA5_SSC0_DATALEN; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES priv->align = SAMA5_SSC0_DATAMASK; #endif priv->pid = SAM_PID_SSC0; @@ -3398,7 +3377,7 @@ static void ssc1_configure(struct sam_ssc_s *priv) priv->base = SAM_SSC1_VBASE; priv->datalen = CONFIG_SAMA5_SSC1_DATALEN; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES priv->align = SAMA5_SSC1_DATAMASK; #endif priv->pid = SAM_PID_SSC1; @@ -3431,7 +3410,7 @@ struct i2s_dev_s *sam_ssc_initialize(int port) /* The support SAM parts have only a single SSC port */ - i2svdbg("port: %d\n", port); + i2sinfo("port: %d\n", port); /* Allocate a new state structure for this chip select. NOTE that there * is no protection if the same chip select is used in two different @@ -3441,7 +3420,7 @@ struct i2s_dev_s *sam_ssc_initialize(int port) priv = (struct sam_ssc_s *)zalloc(sizeof(struct sam_ssc_s)); if (!priv) { - i2sdbg("ERROR: Failed to allocate a chip select structure\n"); + i2serr("ERROR: Failed to allocate a chip select structure\n"); return NULL; } @@ -3475,7 +3454,7 @@ struct i2s_dev_s *sam_ssc_initialize(int port) else #endif /* CONFIG_SAMA5_SSC1 */ { - i2sdbg("ERROR: Unsupported I2S port: %d\n", port); + i2serr("ERROR: Unsupported I2S port: %d\n", port); goto errout_with_alloc; } @@ -3496,7 +3475,7 @@ struct i2s_dev_s *sam_ssc_initialize(int port) ret = ssc_rx_configure(priv); if (ret < 0) { - i2sdbg("ERROR: Failed to configure the receiver: %d\n", ret); + i2serr("ERROR: Failed to configure the receiver: %d\n", ret); goto errout_with_clocking; } @@ -3505,7 +3484,7 @@ struct i2s_dev_s *sam_ssc_initialize(int port) ret = ssc_tx_configure(priv); if (ret < 0) { - i2sdbg("ERROR: Failed to configure the transmitter: %d\n", ret); + i2serr("ERROR: Failed to configure the transmitter: %d\n", ret); goto errout_with_clocking; } diff --git a/arch/arm/src/sama5/sam_tc.c b/arch/arm/src/sama5/sam_tc.c index 54cf71242c3205afb57c264d3779d9cf94fb3cfe..7d8e19370cc64d87d4d653ade7d888d60055ffcd 100644 --- a/arch/arm/src/sama5/sam_tc.c +++ b/arch/arm/src/sama5/sam_tc.c @@ -75,6 +75,10 @@ * Pre-processor Definitions ****************************************************************************/ +#ifndef CONFIG_DEBUG_TIMER_INFO +# undef CONFIG_SAMA5_TC_REGDEBUG +#endif + /**************************************************************************** * Private Types ****************************************************************************/ @@ -501,20 +505,20 @@ static void sam_regdump(struct sam_chan_s *chan, const char *msg) uintptr_t base; base = tc->base; - lldbg("TC%d [%08x]: %s\n", tc->tc, (int)base, msg); - lldbg(" BMR: %08x QIMR: %08x QISR: %08x WPMR: %08x\n", + tminfo("TC%d [%08x]: %s\n", tc->tc, (int)base, msg); + tminfo(" BMR: %08x QIMR: %08x QISR: %08x WPMR: %08x\n", getreg32(base+SAM_TC_BMR_OFFSET), getreg32(base+SAM_TC_QIMR_OFFSET), getreg32(base+SAM_TC_QISR_OFFSET), getreg32(base+SAM_TC_WPMR_OFFSET)); base = chan->base; - lldbg("TC%d Channel %d [%08x]: %s\n", tc->tc, chan->chan, (int)base, msg); - lldbg(" CMR: %08x SSMR: %08x RAB: %08x CV: %08x\n", + tminfo("TC%d Channel %d [%08x]: %s\n", tc->tc, chan->chan, (int)base, msg); + tminfo(" CMR: %08x SSMR: %08x RAB: %08x CV: %08x\n", getreg32(base+SAM_TC_CMR_OFFSET), getreg32(base+SAM_TC_SMMR_OFFSET), getreg32(base+SAM_TC_RAB_OFFSET), getreg32(base+SAM_TC_CV_OFFSET)); - lldbg(" RA: %08x RB: %08x RC: %08x SR: %08x\n", + tminfo(" RA: %08x RB: %08x RC: %08x SR: %08x\n", getreg32(base+SAM_TC_RA_OFFSET), getreg32(base+SAM_TC_RB_OFFSET), getreg32(base+SAM_TC_RC_OFFSET), getreg32(base+SAM_TC_SR_OFFSET)); - lldbg(" IMR: %08x\n", + tminfo(" IMR: %08x\n", getreg32(base+SAM_TC_IMR_OFFSET)); } #endif @@ -558,7 +562,7 @@ static bool sam_checkreg(struct sam_tc_s *tc, bool wr, uint32_t regaddr, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", tc->ntimes); + tmrinfo("...[Repeats %d times]...\n", tc->ntimes); } /* Save information about the new access */ @@ -593,7 +597,7 @@ static inline uint32_t sam_tc_getreg(struct sam_chan_s *chan, #ifdef CONFIG_SAMA5_TC_REGDEBUG if (sam_checkreg(tc, false, regaddr, regval)) { - lldbg("%08x->%08x\n", regaddr, regval); + tmrinfo("%08x->%08x\n", regaddr, regval); } #endif @@ -617,7 +621,7 @@ static inline void sam_tc_putreg(struct sam_chan_s *chan, uint32_t regval, #ifdef CONFIG_SAMA5_TC_REGDEBUG if (sam_checkreg(tc, true, regaddr, regval)) { - lldbg("%08x<-%08x\n", regaddr, regval); + tmrinfo("%08x<-%08x\n", regaddr, regval); } #endif @@ -641,7 +645,7 @@ static inline uint32_t sam_chan_getreg(struct sam_chan_s *chan, #ifdef CONFIG_SAMA5_TC_REGDEBUG if (sam_checkreg(chan->tc, false, regaddr, regval)) { - lldbg("%08x->%08x\n", regaddr, regval); + tmrinfo("%08x->%08x\n", regaddr, regval); } #endif @@ -664,7 +668,7 @@ static inline void sam_chan_putreg(struct sam_chan_s *chan, unsigned int offset, #ifdef CONFIG_SAMA5_TC_REGDEBUG if (sam_checkreg(chan->tc, true, regaddr, regval)) { - lldbg("%08x<-%08x\n", regaddr, regval); + tmrinfo("%08x<-%08x\n", regaddr, regval); } #endif @@ -953,7 +957,7 @@ static inline struct sam_chan_s *sam_tc_initialize(int channel) { /* Timer/counter is not invalid or not enabled */ - tcdbg("ERROR: Bad channel number: %d\n", channel); + tmrerr("ERROR: Bad channel number: %d\n", channel); return NULL; } @@ -976,7 +980,7 @@ static inline struct sam_chan_s *sam_tc_initialize(int channel) for (i = 0, ch = tcconfig->chfirst; i < SAM_TC_NCHANNELS; i++) { - tcdbg("Initializing TC%d channel %d\n", tcconfig->tc, ch); + tmrerr("ERROR: Initializing TC%d channel %d\n", tcconfig->tc, ch); /* Initialize the channel data structure */ @@ -1057,7 +1061,7 @@ static inline struct sam_chan_s *sam_tc_initialize(int channel) { /* No.. return a failure */ - tcdbg("Channel %d is in-used\n", channel); + tmrerr("ERROR: Channel %d is in-use\n", channel); sam_givesem(tc); return NULL; } @@ -1102,7 +1106,7 @@ TC_HANDLE sam_tc_allocate(int channel, int mode) * access to the requested channel. */ - tcvdbg("channel=%d mode=%08x\n", channel, mode); + tmrinfo("channel=%d mode=%08x\n", channel, mode); chan = sam_tc_initialize(channel); if (chan) @@ -1128,7 +1132,7 @@ TC_HANDLE sam_tc_allocate(int channel, int mode) /* Return an opaque reference to the channel */ - tcvdbg("Returning %p\n", chan); + tmrinfo("Returning %p\n", chan); return (TC_HANDLE)chan; } @@ -1150,7 +1154,7 @@ void sam_tc_free(TC_HANDLE handle) { struct sam_chan_s *chan = (struct sam_chan_s *)handle; - tcvdbg("Freeing %p channel=%d inuse=%d\n", chan, chan->chan, chan->inuse); + tmrinfo("Freeing %p channel=%d inuse=%d\n", chan, chan->chan, chan->inuse); DEBUGASSERT(chan && chan->inuse); /* Make sure that interrupts are detached and disabled and that the channel @@ -1183,7 +1187,7 @@ void sam_tc_start(TC_HANDLE handle) { struct sam_chan_s *chan = (struct sam_chan_s *)handle; - tcvdbg("Starting channel %d inuse=%d\n", chan->chan, chan->inuse); + tmrinfo("Starting channel %d inuse=%d\n", chan->chan, chan->inuse); DEBUGASSERT(chan && chan->inuse); /* Read the SR to clear any pending interrupts on this channel */ @@ -1215,7 +1219,7 @@ void sam_tc_stop(TC_HANDLE handle) { struct sam_chan_s *chan = (struct sam_chan_s *)handle; - tcvdbg("Stopping channel %d inuse=%d\n", chan->chan, chan->inuse); + tmrinfo("Stopping channel %d inuse=%d\n", chan->chan, chan->inuse); DEBUGASSERT(chan && chan->inuse); sam_chan_putreg(chan, SAM_TC_CCR_OFFSET, TC_CCR_CLKDIS); @@ -1322,8 +1326,8 @@ void sam_tc_setregister(TC_HANDLE handle, int regid, uint32_t regval) DEBUGASSERT(chan && regid < TC_NREGISTERS); - tcvdbg("Channel %d: Set register RC%d to %08lx\n", - chan->chan, regid, (unsigned long)regval); + tmrinfo("Channel %d: Set register RC%d to %08lx\n", + chan->chan, regid, (unsigned long)regval); sam_chan_putreg(chan, g_regoffset[regid], regval); sam_regdump(chan, "Set register"); @@ -1465,7 +1469,7 @@ int sam_tc_divisor(uint32_t frequency, uint32_t *div, uint32_t *tcclks) uint32_t ftcin = sam_tc_infreq(); int ndx = 0; - tcvdbg("frequency=%d\n", frequency); + tmrinfo("frequency=%d\n", frequency); /* Satisfy lower bound. That is, the value of the divider such that: * @@ -1478,7 +1482,7 @@ int sam_tc_divisor(uint32_t frequency, uint32_t *div, uint32_t *tcclks) { /* If no divisor can be found, return -ERANGE */ - tcdbg("Lower bound search failed\n"); + tmrerr("ERROR: Lower bound search failed\n"); return -ERANGE; } } @@ -1502,7 +1506,7 @@ int sam_tc_divisor(uint32_t frequency, uint32_t *div, uint32_t *tcclks) if (div) { uint32_t value = sam_tc_freqdiv_lookup(ftcin, ndx); - tcvdbg("return div=%lu\n", (unsigned long)value); + tmrinfo("return div=%lu\n", (unsigned long)value); *div = value; } @@ -1510,7 +1514,7 @@ int sam_tc_divisor(uint32_t frequency, uint32_t *div, uint32_t *tcclks) if (tcclks) { - tcvdbg("return tcclks=%08lx\n", (unsigned long)TC_CMR_TCCLKS(ndx)); + tmrinfo("return tcclks=%08lx\n", (unsigned long)TC_CMR_TCCLKS(ndx)); *tcclks = TC_CMR_TCCLKS(ndx); } diff --git a/arch/arm/src/sama5/sam_tc.h b/arch/arm/src/sama5/sam_tc.h index 311f6d329f2d459a15c7e69c4764bc758bbc3fbf..4cf53f9cc801fb86d767bf1c127948a538cd8c79 100644 --- a/arch/arm/src/sama5/sam_tc.h +++ b/arch/arm/src/sama5/sam_tc.h @@ -74,8 +74,7 @@ /* Timer debug is enabled if any timer client is enabled */ -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_ANALOG +#ifndef CONFIG_DEBUG_TIMER_INFO # undef CONFIG_SAMA5_TC_REGDEBUG #endif @@ -83,20 +82,6 @@ # define CONFIG_SAMA5_TC_DEBUG 1 #endif -/* Timer/counter debug output */ - -#ifdef CONFIG_SAMA5_TC_DEBUG -# define tcdbg dbg -# define tcvdbg vdbg -# define tclldbg lldbg -# define tcllvdbg llvdbg -#else -# define tcdbg(x...) -# define tcvdbg(x...) -# define tclldbg(x...) -# define tcllvdbg(x...) -#endif - /**************************************************************************** * Public Types ****************************************************************************/ diff --git a/arch/arm/src/sama5/sam_tickless.c b/arch/arm/src/sama5/sam_tickless.c index 70cecb1217a24f80f2c51579f16b1d9c6518663c..4ae30bf7185d09d66a9fac4afa4fd437b1f4637c 100644 --- a/arch/arm/src/sama5/sam_tickless.c +++ b/arch/arm/src/sama5/sam_tickless.c @@ -209,7 +209,7 @@ static struct sam_tickless_s g_tickless; static void sam_oneshot_handler(void *arg) { - tcllvdbg("Expired...\n"); + tmrinfo("Expired...\n"); sched_timer_expiration(); } @@ -256,7 +256,7 @@ void up_timer_initialize(void) CONFIG_USEC_PER_TICK); if (ret < 0) { - tclldbg("ERROR: sam_oneshot_initialize failed\n"); + tmrerr("ERROR: sam_oneshot_initialize failed\n"); PANIC(); } @@ -268,7 +268,7 @@ void up_timer_initialize(void) ret = sam_oneshot_max_delay(&g_tickless.oneshot, &max_delay); if (ret < 0) { - tclldbg("ERROR: sam_oneshot_max_delay failed\n"); + tmrerr("ERROR: sam_oneshot_max_delay failed\n"); PANIC(); } @@ -292,7 +292,7 @@ void up_timer_initialize(void) CONFIG_USEC_PER_TICK); if (ret < 0) { - tclldbg("ERROR: sam_freerun_initialize failed\n"); + tmrerr("ERROR: sam_freerun_initialize failed\n"); PANIC(); } diff --git a/arch/arm/src/sama5/sam_trng.c b/arch/arm/src/sama5/sam_trng.c index 1be5585bc4ba8f2eb22a1c90a58c59edb5e61f0e..a3eb102640e8fa881e727640623deaa61bc5884a 100644 --- a/arch/arm/src/sama5/sam_trng.c +++ b/arch/arm/src/sama5/sam_trng.c @@ -243,7 +243,7 @@ static ssize_t sam_read(struct file *filep, char *buffer, size_t buflen) ssize_t retval; int ret; - fvdbg("buffer=%p buflen=%d\n", buffer, (int)buflen); + finfo("buffer=%p buflen=%d\n", buffer, (int)buflen); /* Get exclusive access to the TRNG harware */ @@ -283,7 +283,7 @@ static ssize_t sam_read(struct file *filep, char *buffer, size_t buflen) { ret = sem_wait(&g_trngdev.waitsem); - fvdbg("Awakened: nsamples=%d maxsamples=%d ret=%d\n", + finfo("Awakened: nsamples=%d maxsamples=%d ret=%d\n", g_trngdev.nsamples, g_trngdev.maxsamples, ret); if (ret < 0) @@ -320,7 +320,7 @@ errout: sem_post(&g_trngdev.exclsem); - fvdbg("Return %d\n", (int)retval); + finfo("Return %d\n", (int)retval); return retval; } @@ -346,7 +346,7 @@ void up_rnginitialize(void) { int ret; - fvdbg("Initializing TRNG hardware\n"); + finfo("Initializing TRNG hardware\n"); /* Initialize the device structure */ @@ -362,7 +362,7 @@ void up_rnginitialize(void) if (irq_attach(SAM_IRQ_TRNG, sam_interrupt)) { - fdbg("ERROR: Failed to attach to IRQ%d\n", SAM_IRQ_TRNG); + ferr("ERROR: Failed to attach to IRQ%d\n", SAM_IRQ_TRNG); return; } @@ -379,7 +379,7 @@ void up_rnginitialize(void) ret = register_driver("/dev/random", &g_trngops, 0644, NULL); if (ret < 0) { - fdbg("ERROR: Failed to register /dev/random\n"); + ferr("ERROR: Failed to register /dev/random\n"); return; } diff --git a/arch/arm/src/sama5/sam_tsd.c b/arch/arm/src/sama5/sam_tsd.c index 3bed567508bc02d54d2d4394da586eb8c1988697..edb2199f36ce063615c19bad421beb9d89a390ce 100644 --- a/arch/arm/src/sama5/sam_tsd.c +++ b/arch/arm/src/sama5/sam_tsd.c @@ -285,7 +285,7 @@ static void sam_tsd_notify(struct sam_tsd_s *priv) if (fds) { fds->revents |= POLLIN; - ivdbg("Report events: %02x\n", fds->revents); + iinfo("Report events: %02x\n", fds->revents); sem_post(fds->sem); } } @@ -380,7 +380,7 @@ static int sam_tsd_waitsample(struct sam_tsd_s *priv, struct sam_sample_s *sampl { /* Wait for a sample data */ - ivdbg("Waiting..\n"); + iinfo("Waiting..\n"); priv->nwaiters++; ret = sem_wait(&priv->waitsem); priv->nwaiters--; @@ -391,14 +391,14 @@ static int sam_tsd_waitsample(struct sam_tsd_s *priv, struct sam_sample_s *sampl * the failure now. */ - idbg("ERROR: sem_wait: %d\n", errno); + ierr("ERROR: sem_wait: %d\n", errno); DEBUGASSERT(errno == EINTR); ret = -EINTR; goto errout; } } - ivdbg("Sampled\n"); + iinfo("Sampled\n"); /* Re-acquire the semaphore that manages mutually exclusive access to * the device structure. We may have to wait here. But we have our sample. @@ -538,7 +538,7 @@ static void sam_tsd_bottomhalf(void *arg) /* Handle the change from pen down to pen up */ - ivdbg("pending: %08x pendown: %d contact: %d\n", + iinfo("pending: %08x pendown: %d contact: %d\n", pending, pendown, priv->sample.contact); if (!pendown) @@ -644,7 +644,7 @@ static void sam_tsd_bottomhalf(void *arg) if (xraw == 0 || xraw >= xscale || yraw == 0 || yraw > yscale) { - idbg("Discarding: x %d:%d y %d:%d\n", xraw, xscale); + iwarn("WARNING: Discarding: x %d:%d y %d:%d\n", xraw, xscale); goto ignored; } @@ -799,7 +799,7 @@ static int sam_tsd_schedule(struct sam_tsd_s *priv) ret = work_queue(HPWORK, &priv->work, sam_tsd_bottomhalf, priv, 0); if (ret != 0) { - illdbg("Failed to queue work: %d\n", ret); + ierr("ERROR: Failed to queue work: %d\n", ret); } return OK; @@ -834,7 +834,7 @@ static int sam_tsd_open(struct file *filep) uint8_t tmp; int ret; - ivdbg("crefs: %d\n", priv->crefs); + iinfo("crefs: %d\n", priv->crefs); /* Get exclusive access to the device structures */ @@ -883,7 +883,7 @@ static int sam_tsd_close(struct file *filep) FAR struct inode *inode = filep->f_inode; FAR struct sam_tsd_s *priv = inode->i_private; - ivdbg("crefs: %d\n", priv->crefs); + iinfo("crefs: %d\n", priv->crefs); /* Get exclusive access to the ADC device */ @@ -919,7 +919,7 @@ static ssize_t sam_tsd_read(struct file *filep, char *buffer, size_t len) struct sam_sample_s sample; int ret; - ivdbg("buffer:%p len:%d\n", buffer, len); + iinfo("buffer:%p len:%d\n", buffer, len); DEBUGASSERT(filep); inode = filep->f_inode; @@ -936,7 +936,7 @@ static ssize_t sam_tsd_read(struct file *filep, char *buffer, size_t len) * handle smaller reads... but why? */ - idbg("ERROR: Unsupported read size: %d\n", len); + ierr("ERROR: Unsupported read size: %d\n", len); return -ENOSYS; } @@ -954,7 +954,7 @@ static ssize_t sam_tsd_read(struct file *filep, char *buffer, size_t len) * option, then just return an error. */ - ivdbg("Sample data is not available\n"); + iinfo("Sample data is not available\n"); if (filep->f_oflags & O_NONBLOCK) { ret = -EAGAIN; @@ -968,7 +968,7 @@ static ssize_t sam_tsd_read(struct file *filep, char *buffer, size_t len) { /* We might have been awakened by a signal */ - idbg("ERROR: sam_tsd_waitsample: %d\n", ret); + ierr("ERROR: sam_tsd_waitsample: %d\n", ret); goto errout; } } @@ -1018,16 +1018,16 @@ static ssize_t sam_tsd_read(struct file *filep, char *buffer, size_t len) report->point[0].flags = TSD_PENMOVE; } - ivdbg(" id: %d\n", report->point[0].id); - ivdbg(" flags: %02x\n", report->point[0].flags); - ivdbg(" x: %d\n", report->point[0].x); - ivdbg(" y: %d\n", report->point[0].y); + iinfo(" id: %d\n", report->point[0].id); + iinfo(" flags: %02x\n", report->point[0].flags); + iinfo(" x: %d\n", report->point[0].x); + iinfo(" y: %d\n", report->point[0].y); ret = SIZEOF_TOUCH_SAMPLE_S(1); errout: sam_adc_unlock(priv->adc); - ivdbg("Returning: %d\n", ret); + iinfo("Returning: %d\n", ret); return (ssize_t)ret; } @@ -1041,7 +1041,7 @@ static int sam_tsd_ioctl(struct file *filep, int cmd, unsigned long arg) struct sam_tsd_s *priv; int ret; - ivdbg("cmd: %d arg: %ld\n", cmd, arg); + iinfo("cmd: %d arg: %ld\n", cmd, arg); DEBUGASSERT(filep); inode = filep->f_inode; @@ -1077,7 +1077,7 @@ static int sam_tsd_poll(struct file *filep, struct pollfd *fds, bool setup) int ret = OK; int i; - ivdbg("setup: %d\n", (int)setup); + iinfo("setup: %d\n", (int)setup); DEBUGASSERT(filep && fds); inode = filep->f_inode; @@ -1655,7 +1655,7 @@ int sam_tsd_register(struct sam_adc_s *adc, int minor) char devname[DEV_NAMELEN]; int ret; - ivdbg("minor: %d\n", minor); + iinfo("minor: %d\n", minor); /* Debug-only sanity checks */ @@ -1674,12 +1674,12 @@ int sam_tsd_register(struct sam_adc_s *adc, int minor) /* Register the device as an input device */ (void)snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor); - ivdbg("Registering %s\n", devname); + iinfo("Registering %s\n", devname); ret = register_driver(devname, &g_tsdops, 0666, priv); if (ret < 0) { - idbg("ERROR: register_driver() failed: %d\n", ret); + ierr("ERROR: register_driver() failed: %d\n", ret); goto errout_with_priv; } @@ -1724,7 +1724,7 @@ void sam_tsd_interrupt(uint32_t pending) ret = sam_tsd_schedule(priv); if (ret < 0) { - idbg("ERROR: sam_tsd_schedule failed: %d\n", ret); + ierr("ERROR: sam_tsd_schedule failed: %d\n", ret); } } } diff --git a/arch/arm/src/sama5/sam_twi.c b/arch/arm/src/sama5/sam_twi.c index 14df0f62a4219d3256436e87d7e80bd7eef11761..4af5f702b0b9dd0e6cd73ccd40d530387e582c8f 100644 --- a/arch/arm/src/sama5/sam_twi.c +++ b/arch/arm/src/sama5/sam_twi.c @@ -95,15 +95,19 @@ # define CONFIG_SAMA5_TWI3_FREQUENCY 100000 #endif +#ifndef CONFIG_DEBUG_I2C_INFO +# undef CONFIG_SAMA5_TWI_REGDEBUG +#endif + /* Driver internal definitions *************************************************/ -/* If verbose I2C debug output is enable, then allow more time before we declare +/* If verbose I2C debug output is enabled, then allow more time before we declare * a timeout. The debug output from twi_interrupt will really slow things down! * * With a very slow clock (say 100,000 Hz), less than 100 usec would be required * to transfer on byte. So these define a "long" timeout. */ -#if defined(CONFIG_DEBUG_I2C) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_I2C_INFO # define TWI_TIMEOUT_MSPB (50) /* 50 msec/byte */ #else # define TWI_TIMEOUT_MSPB (5) /* 5 msec/byte */ @@ -123,21 +127,6 @@ #define MKI2C_INPUT(p) (((p) & (PIO_PORT_MASK | PIO_PIN_MASK)) | I2C_INPUT) #define MKI2C_OUTPUT(p) (((p) & (PIO_PORT_MASK | PIO_PIN_MASK)) | I2C_OUTPUT) -/* Debug ***********************************************************************/ -/* CONFIG_DEBUG_I2C + CONFIG_DEBUG enables general I2C debug output. */ - -#ifdef CONFIG_DEBUG_I2C -# define i2cdbg dbg -# define i2cvdbg vdbg -# define i2clldbg lldbg -# define i2cllvdbg llvdbg -#else -# define i2cdbg(x...) -# define i2cvdbg(x...) -# define i2clldbg(x...) -# define i2cllvdbg(x...) -#endif - /**************************************************************************** * Private Types ****************************************************************************/ @@ -384,7 +373,7 @@ static bool twi_checkreg(struct twi_dev_s *priv, bool wr, uint32_t value, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", priv->ntimes); + i2cinfo("...[Repeats %d times]...\n", priv->ntimes); } /* Save information about the new access */ @@ -416,7 +405,7 @@ static uint32_t twi_getabs(struct twi_dev_s *priv, uintptr_t address) if (twi_checkreg(priv, false, value, address)) { - lldbg("%08x->%08x\n", address, value); + i2cinfo("%08x->%08x\n", address, value); } return value; @@ -437,7 +426,7 @@ static void twi_putabs(struct twi_dev_s *priv, uintptr_t address, { if (twi_checkreg(priv, true, value, address)) { - lldbg("%08x<-%08x\n", address, value); + i2cinfo("%08x<-%08x\n", address, value); } putreg32(value, address); @@ -514,9 +503,9 @@ static int twi_wait(struct twi_dev_s *priv, unsigned int size) do { - i2cvdbg("TWI%d Waiting...\n", priv->attr->twi); + i2cinfo("TWI%d Waiting...\n", priv->attr->twi); twi_takesem(&priv->waitsem); - i2cvdbg("TWI%d Awakened with result: %d\n", + i2cinfo("TWI%d Awakened with result: %d\n", priv->attr->twi, priv->result); } while (priv->result == -EBUSY); @@ -574,7 +563,7 @@ static int twi_interrupt(struct twi_dev_s *priv) imr = twi_getrel(priv, SAM_TWI_IMR_OFFSET); pending = sr & imr; - i2cllvdbg("TWI%d pending: %08x\n", priv->attr->twi, pending); + i2cinfo("TWI%d pending: %08x\n", priv->attr->twi, pending); /* Byte received */ @@ -670,7 +659,7 @@ static int twi_interrupt(struct twi_dev_s *priv) { /* Wake up the thread with an I/O error indication */ - i2clldbg("ERROR: TWI%d pending: %08x\n", priv->attr->twi, pending); + i2cerr("ERROR: TWI%d pending: %08x\n", priv->attr->twi, pending); twi_wakeup(priv, -EIO); } @@ -720,7 +709,7 @@ static void twi_timeout(int argc, uint32_t arg, ...) { struct twi_dev_s *priv = (struct twi_dev_s *)arg; - i2clldbg("ERROR: TWI%d Timeout!\n", priv->attr->twi); + i2cerr("ERROR: TWI%d Timeout!\n", priv->attr->twi); twi_wakeup(priv, -ETIMEDOUT); } @@ -841,7 +830,7 @@ static int twi_transfer(FAR struct i2c_master_s *dev, int ret; DEBUGASSERT(dev != NULL && msgs != NULL && count > 0); - i2cvdbg("TWI%d count: %d\n", priv->attr->twi, count); + i2cinfo("TWI%d count: %d\n", priv->attr->twi, count); /* Calculate the total transfer size so that we can calculate a reasonable * timeout value. @@ -887,7 +876,7 @@ static int twi_transfer(FAR struct i2c_master_s *dev, ret = twi_wait(priv, size); if (ret < 0) { - i2cdbg("ERROR: Transfer failed: %d\n", ret); + i2cerr("ERROR: Transfer failed: %d\n", ret); } leave_critical_section(flags); @@ -1127,7 +1116,7 @@ static void twi_hw_initialize(struct twi_dev_s *priv, uint32_t frequency) uint32_t regval; uint32_t mck; - i2cvdbg("TWI%d Initializing\n", priv->attr->twi); + i2cinfo("TWI%d Initializing\n", priv->attr->twi); /* Configure PIO pins */ @@ -1228,7 +1217,7 @@ struct i2c_master_s *sam_i2cbus_initialize(int bus) irqstate_t flags; int ret; - i2cvdbg("Initializing TWI%d\n", bus); + i2cinfo("Initializing TWI%d\n", bus); #ifdef CONFIG_SAMA5_TWI0 if (bus == 0) @@ -1287,7 +1276,7 @@ struct i2c_master_s *sam_i2cbus_initialize(int bus) else #endif { - i2cdbg("ERROR: Unsupported bus: TWI%d\n", bus); + i2cerr("ERROR: Unsupported bus: TWI%d\n", bus); return NULL; } @@ -1300,7 +1289,7 @@ struct i2c_master_s *sam_i2cbus_initialize(int bus) priv->timeout = wd_create(); if (priv->timeout == NULL) { - idbg("ERROR: Failed to allocate a timer\n"); + ierr("ERROR: Failed to allocate a timer\n"); goto errout_with_irq; } @@ -1309,7 +1298,7 @@ struct i2c_master_s *sam_i2cbus_initialize(int bus) ret = irq_attach(priv->attr->irq, priv->attr->handler); if (ret < 0) { - idbg("ERROR: Failed to attach irq %d\n", priv->attr->irq); + ierr("ERROR: Failed to attach irq %d\n", priv->attr->irq); goto errout_with_wdog; } @@ -1347,7 +1336,7 @@ int sam_i2cbus_uninitialize(FAR struct i2c_master_s *dev) { struct twi_dev_s *priv = (struct twi_dev_s *) dev; - i2cvdbg("TWI%d Un-initializing\n", priv->attr->twi); + i2cinfo("TWI%d Un-initializing\n", priv->attr->twi); /* Disable TWI interrupts */ diff --git a/arch/arm/src/sama5/sam_udphs.c b/arch/arm/src/sama5/sam_udphs.c index 06c2cf2fed41d8f79cf8df99275d26d87b62238e..76f704d1f690b19d19a416430f02a59ddf9ac6c1 100644 --- a/arch/arm/src/sama5/sam_udphs.c +++ b/arch/arm/src/sama5/sam_udphs.c @@ -91,11 +91,7 @@ # define CONFIG_SAMA5_UDPHS_NDTDS 8 #endif -/* Extremely detailed register debug that you would normally never want - * enabled. - */ - -#ifndef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB_INFO # undef CONFIG_SAMA5_UDPHS_REGDEBUG #endif @@ -671,7 +667,7 @@ const struct trace_msg_t g_usb_trace_strings_intdecode[] = #ifdef CONFIG_SAMA5_UDPHS_REGDEBUG static void sam_printreg(uintptr_t regaddr, uint32_t regval, bool iswrite) { - lldbg("%p%s%08x\n", regaddr, iswrite ? "<-" : "->", regval); + uinfo("%p%s%08x\n", regaddr, iswrite ? "<-" : "->", regval); } #endif @@ -722,7 +718,7 @@ static void sam_checkreg(uintptr_t regaddr, uint32_t regval, bool iswrite) { /* No.. More than one. */ - lldbg("[repeats %d more times]\n", count); + uinfo("[repeats %d more times]\n", count); } } @@ -797,36 +793,36 @@ static inline void sam_putreg(uint32_t regval, uint32_t regaddr) * Name: sam_dumpep ****************************************************************************/ -#if defined(CONFIG_SAMA5_UDPHS_REGDEBUG) && defined(CONFIG_DEBUG) +#if defined(CONFIG_SAMA5_UDPHS_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES) static void sam_dumpep(struct sam_usbdev_s *priv, int epno) { /* Global Registers */ - lldbg("Global Register:\n"); - lldbg(" CTRL: %04x\n", sam_getreg(SAM_UDPHS_CTRL)); - lldbg(" FNUM: %04x\n", sam_getreg(SAM_UDPHS_FNUM)); - lldbg(" IEN: %04x\n", sam_getreg(SAM_UDPHS_IEN)); - lldbg(" INSTA: %04x\n", sam_getreg(SAM_UDPHS_INTSTA)); - lldbg(" TST: %04x\n", sam_getreg(SAM_UDPHS_TST)); + uinfo("Global Register:\n"); + uinfo(" CTRL: %04x\n", sam_getreg(SAM_UDPHS_CTRL)); + uinfo(" FNUM: %04x\n", sam_getreg(SAM_UDPHS_FNUM)); + uinfo(" IEN: %04x\n", sam_getreg(SAM_UDPHS_IEN)); + uinfo(" INSTA: %04x\n", sam_getreg(SAM_UDPHS_INTSTA)); + uinfo(" TST: %04x\n", sam_getreg(SAM_UDPHS_TST)); /* Endpoint registers */ - lldbg("Endpoint %d Register:\n", epno); - lldbg(" CFG: %04x\n", sam_getreg(SAM_UDPHS_EPTCFG(epno))); - lldbg(" CTL: %04x\n", sam_getreg(SAM_UDPHS_EPTCTL(epno))); - lldbg(" STA: %04x\n", sam_getreg(SAM_UDPHS_EPTSTA(epno))); + uinfo("Endpoint %d Register:\n", epno); + uinfo(" CFG: %04x\n", sam_getreg(SAM_UDPHS_EPTCFG(epno))); + uinfo(" CTL: %04x\n", sam_getreg(SAM_UDPHS_EPTCTL(epno))); + uinfo(" STA: %04x\n", sam_getreg(SAM_UDPHS_EPTSTA(epno))); - lldbg("DMA %d Register:\n", epno); + uinfo("DMA %d Register:\n", epno); if ((SAM_EPSET_DMA & SAM_EP_BIT(epno)) != 0) { - lldbg(" NXTDSC: %04x\n", sam_getreg(SAM_UDPHS_DMANXTDSC(epno))); - lldbg(" ADDRESS: %04x\n", sam_getreg(SAM_UDPHS_DMAADDRESS(epno))); - lldbg(" CONTROL: %04x\n", sam_getreg(SAM_UDPHS_DMACONTROL(epno))); - lldbg(" STATUS: %04x\n", sam_getreg(SAM_UDPHS_DMASTATUS(epno))); + uinfo(" NXTDSC: %04x\n", sam_getreg(SAM_UDPHS_DMANXTDSC(epno))); + uinfo(" ADDRESS: %04x\n", sam_getreg(SAM_UDPHS_DMAADDRESS(epno))); + uinfo(" CONTROL: %04x\n", sam_getreg(SAM_UDPHS_DMACONTROL(epno))); + uinfo(" STATUS: %04x\n", sam_getreg(SAM_UDPHS_DMASTATUS(epno))); } else { - lldbg(" None\n"); + uinfo(" None\n"); } } #endif @@ -1357,9 +1353,9 @@ static int sam_req_write(struct sam_usbdev_s *priv, struct sam_ep_s *privep) return -ENOENT; } - ullvdbg("epno=%d req=%p: len=%d xfrd=%d inflight=%d zlpneeded=%d\n", - epno, privreq, privreq->req.len, privreq->req.xfrd, - privreq->inflight, privep->zlpneeded); + uinfo("epno=%d req=%p: len=%d xfrd=%d inflight=%d zlpneeded=%d\n", + epno, privreq, privreq->req.len, privreq->req.xfrd, + privreq->inflight, privep->zlpneeded); /* Handle any bytes in flight. */ @@ -1600,8 +1596,8 @@ static int sam_req_read(struct sam_usbdev_s *priv, struct sam_ep_s *privep, return -ENOENT; } - ullvdbg("EP%d: len=%d xfrd=%d\n", - epno, privreq->req.len, privreq->req.xfrd); + uinfo("EP%d: len=%d xfrd=%d\n", + epno, privreq->req.len, privreq->req.xfrd); /* Ignore any attempt to receive a zero length packet */ @@ -1885,8 +1881,8 @@ static void sam_ep0_setup(struct sam_usbdev_s *priv) index.w = GETUINT16(priv->ctrl.index); len.w = GETUINT16(priv->ctrl.len); - ullvdbg("SETUP: type=%02x req=%02x value=%04x index=%04x len=%04x\n", - priv->ctrl.type, priv->ctrl.req, value.w, index.w, len.w); + uinfo("SETUP: type=%02x req=%02x value=%04x index=%04x len=%04x\n", + priv->ctrl.type, priv->ctrl.req, value.w, index.w, len.w); /* Dispatch any non-standard requests */ @@ -2049,7 +2045,7 @@ static void sam_ep0_setup(struct sam_usbdev_s *priv) { /* Special case recipient=device test mode */ - ullvdbg("test mode: %d\n", index.w); + uinfo("test mode: %d\n", index.w); } else if ((priv->ctrl.type & USB_REQ_RECIPIENT_MASK) != USB_REQ_RECIPIENT_ENDPOINT) { @@ -2349,7 +2345,7 @@ static void sam_dma_interrupt(struct sam_usbdev_s *priv, int epno) /* Get the result of the DMA operation */ dmastatus = sam_getreg(SAM_UDPHS_DMASTATUS(epno)); - uvdbg("DMA%d DMASTATUS: %08x\n", epno, dmastatus); + uinfo("DMA%d DMASTATUS: %08x\n", epno, dmastatus); /* Disable DMA interrupt to avoid receiving 2 (B_EN and TR_EN) */ @@ -3220,7 +3216,7 @@ static int sam_ep_configure_internal(struct sam_ep_s *privep, uint8_t nbtrans; bool dirin; - uvdbg("len: %02x type: %02x addr: %02x attr: %02x " + uinfo("len: %02x type: %02x addr: %02x attr: %02x " "maxpacketsize: %02x %02x interval: %02x\n", desc->len, desc->type, desc->addr, desc->attr, desc->mxpacketsize[0], desc->mxpacketsize[1], @@ -3397,7 +3393,7 @@ static int sam_ep_configure(struct usbdev_ep_s *ep, /* Verify parameters. Endpoint 0 is not available at this interface */ -#if defined(CONFIG_DEBUG) || defined(CONFIG_USBDEV_TRACE) +#if defined(CONFIG_DEBUG_FEATURES) || defined(CONFIG_USBDEV_TRACE) uint8_t epno = USB_EPNO(desc->addr); usbtrace(TRACE_EPCONFIGURE, (uint16_t)epno); @@ -3436,11 +3432,11 @@ static int sam_ep_disable(struct usbdev_ep_s *ep) irqstate_t flags; uint8_t epno; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); - ulldbg("ERROR: ep=%p\n", ep); + uerr("ERROR: ep=%p\n", ep); return -EINVAL; } #endif @@ -3473,7 +3469,7 @@ static struct usbdev_req_s *sam_ep_allocreq(struct usbdev_ep_s *ep) { struct sam_req_s *privreq; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); @@ -3505,7 +3501,7 @@ static void sam_ep_freereq(struct usbdev_ep_s *ep, struct usbdev_req_s *req) { struct sam_req_s *privreq = (struct sam_req_s *)req; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !req) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); @@ -3568,11 +3564,12 @@ static int sam_ep_submit(struct usbdev_ep_s *ep, struct usbdev_req_s *req) uint8_t epno; int ret = OK; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!req || !req->callback || !req->buf || !ep) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); - ulldbg("ERROR: req=%p callback=%p buf=%p ep=%p\n", req, req->callback, req->buf, ep); + uerr("ERROR: req=%p callback=%p buf=%p ep=%p\n", + req, req->callback, req->buf, ep); return -EINVAL; } #endif @@ -3580,11 +3577,11 @@ static int sam_ep_submit(struct usbdev_ep_s *ep, struct usbdev_req_s *req) usbtrace(TRACE_EPSUBMIT, USB_EPNO(ep->eplog)); priv = privep->dev; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv->driver) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_NOTCONFIGURED), priv->usbdev.speed); - ulldbg("ERROR: driver=%p\n", priv->driver); + uerr("ERROR: driver=%p\n", priv->driver); return -ESHUTDOWN; } #endif @@ -3611,7 +3608,7 @@ static int sam_ep_submit(struct usbdev_ep_s *ep, struct usbdev_req_s *req) if (privep->stalled) { sam_req_abort(privep, privreq, -EBUSY); - ulldbg("ERROR: stalled\n"); + uerr("ERROR: stalled\n"); ret = -EPERM; } else @@ -3660,7 +3657,7 @@ static int sam_ep_cancel(struct usbdev_ep_s *ep, struct usbdev_req_s *req) struct sam_ep_s *privep = (struct sam_ep_s *)ep; irqstate_t flags; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !req) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); @@ -3687,7 +3684,7 @@ static int sam_ep_stall(struct usbdev_ep_s *ep, bool resume) uint32_t regval; irqstate_t flags; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); @@ -3826,7 +3823,7 @@ static struct usbdev_ep_s *sam_allocep(struct usbdev_s *dev, uint8_t epno, uint16_t epset = SAM_EPSET_NOTEP0; usbtrace(TRACE_DEVALLOCEP, (uint16_t)epno); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); @@ -3888,7 +3885,7 @@ static void sam_freeep(struct usbdev_s *dev, struct usbdev_ep_s *ep) struct sam_usbdev_s *priv; struct sam_ep_s *privep; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev || !ep) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); @@ -3920,7 +3917,7 @@ static int sam_getframe(struct usbdev_s *dev) uint32_t regval; uint16_t frameno; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); @@ -3952,7 +3949,7 @@ static int sam_wakeup(struct usbdev_s *dev) uint32_t regval; usbtrace(TRACE_DEVWAKEUP, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); @@ -3998,7 +3995,7 @@ static int sam_selfpowered(struct usbdev_s *dev, bool selfpowered) usbtrace(TRACE_DEVSELFPOWERED, (uint16_t)selfpowered); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); @@ -4300,7 +4297,7 @@ static void sam_sw_setup(struct sam_usbdev_s *priv) kmm_memalign(16, CONFIG_SAMA5_UDPHS_NDTDS * sizeof(struct sam_dtd_s)); if (!priv->dtdpool) { - udbg("ERROR: Failed to allocate the DMA transfer descriptor pool\n"); + uerr("ERROR: Failed to allocate the DMA transfer descriptor pool\n"); return NULL; } @@ -4517,7 +4514,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) usbtrace(TRACE_DEVREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !driver->ops->bind || !driver->ops->unbind || !driver->ops->disconnect || !driver->ops->setup) { @@ -4591,7 +4588,7 @@ int usbdev_unregister(struct usbdevclass_driver_s *driver) usbtrace(TRACE_DEVUNREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (driver != priv->driver) { usbtrace(TRACE_DEVERROR(SAM_TRACEERR_INVALIDPARMS), 0); diff --git a/arch/arm/src/sama5/sam_wdt.c b/arch/arm/src/sama5/sam_wdt.c index d14f45c1983e1786b94ca680d4948577bb65c1a6..26f40860b7c503c0b98108209471f96500a69325 100644 --- a/arch/arm/src/sama5/sam_wdt.c +++ b/arch/arm/src/sama5/sam_wdt.c @@ -57,6 +57,11 @@ * Pre-processor Definitions ****************************************************************************/ /* Configuration ************************************************************/ + +#ifndef CONFIG_DEBUG_WATCHDOG_INFO +# undef CONFIG_SAMA5_WDT_REGDEBUG +#endif + /* The Watchdog Timer uses the Slow Clock divided by 128 to establish the * maximum Watchdog period to be 16 seconds (with a typical Slow Clock of * 32768 kHz). @@ -80,20 +85,6 @@ #define WDT_MINTIMEOUT ((1000 + WDT_FREQUENCY - 1) / WDT_FREQUENCY) #define WDT_MAXTIMEOUT ((4096 * 1000) / WDT_FREQUENCY) -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the watchdog - * driver. NOTE: that only lldbg types are used so that the output is - * immediately available. - */ - -#ifdef CONFIG_DEBUG_WATCHDOG -# define wddbg lldbg -# define wdvdbg llvdbg -#else -# define wddbg(x...) -# define wdvdbg(x...) -#endif - /**************************************************************************** * Private Types ****************************************************************************/ @@ -118,7 +109,7 @@ struct sam_lowerhalf_s ****************************************************************************/ /* Register operations ******************************************************/ -#if defined(CONFIG_SAMA5_WDT_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_SAMA5_WDT_REGDEBUG static uint32_t sam_getreg(uintptr_t regaddr); static void sam_putreg(uint32_t regval, uintptr_t regaddr); #else @@ -178,7 +169,7 @@ static struct sam_lowerhalf_s g_wdtdev; * ****************************************************************************/ -#if defined(CONFIG_SAMA5_WDT_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_SAMA5_WDT_REGDEBUG static uint32_t sam_getreg(uintptr_t regaddr) { static uint32_t prevaddr = 0; @@ -199,7 +190,7 @@ static uint32_t sam_getreg(uintptr_t regaddr) { if (count == 4) { - lldbg("...\n"); + wdinfo("...\n"); } return regval; @@ -216,7 +207,7 @@ static uint32_t sam_getreg(uintptr_t regaddr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + wdinfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -228,7 +219,7 @@ static uint32_t sam_getreg(uintptr_t regaddr) /* Show the register value read */ - lldbg("%08x->%048\n", regaddr, regval); + wdinfo("%08x->%048\n", regaddr, regval); return regval; } #endif @@ -241,12 +232,12 @@ static uint32_t sam_getreg(uintptr_t regaddr) * ****************************************************************************/ -#if defined(CONFIG_SAMA5_WDT_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_SAMA5_WDT_REGDEBUG static void sam_putreg(uint32_t regval, uintptr_t regaddr) { /* Show the register value being written */ - lldbg("%08x<-%08x\n", regaddr, regval); + wdinfo("%08x<-%08x\n", regaddr, regval); /* Write the value */ @@ -315,7 +306,7 @@ static int sam_start(FAR struct watchdog_lowerhalf_s *lower) * timer with the newly programmed mode parameters. */ - wdvdbg("Entry\n"); + wdinfo("Entry\n"); return priv->started ? OK : -ENOSYS; } @@ -343,7 +334,7 @@ static int sam_stop(FAR struct watchdog_lowerhalf_s *lower) * timer with the newly programmed mode parameters. */ - wdvdbg("Entry\n"); + wdinfo("Entry\n"); return -ENOSYS; } @@ -366,7 +357,7 @@ static int sam_stop(FAR struct watchdog_lowerhalf_s *lower) static int sam_keepalive(FAR struct watchdog_lowerhalf_s *lower) { - wdvdbg("Entry\n"); + wdinfo("Entry\n"); /* Write WDT_CR_WDRSTT to the WDT CR regiser (along with the KEY value) * will restart the watchdog timer. @@ -397,7 +388,7 @@ static int sam_getstatus(FAR struct watchdog_lowerhalf_s *lower, { FAR struct sam_lowerhalf_s *priv = (FAR struct sam_lowerhalf_s *)lower; - wdvdbg("Entry\n"); + wdinfo("Entry\n"); DEBUGASSERT(priv); /* Return the status bit */ @@ -426,10 +417,10 @@ static int sam_getstatus(FAR struct watchdog_lowerhalf_s *lower, status->timeleft = 0; - wdvdbg("Status :\n"); - wdvdbg(" flags : %08x\n", status->flags); - wdvdbg(" timeout : %d\n", status->timeout); - wdvdbg(" timeleft : %d\n", status->timeleft); + wdinfo("Status :\n"); + wdinfo(" flags : %08x\n", status->flags); + wdinfo(" timeout : %d\n", status->timeout); + wdinfo(" timeleft : %d\n", status->timeleft); return OK; } @@ -457,13 +448,13 @@ static int sam_settimeout(FAR struct watchdog_lowerhalf_s *lower, uint32_t regval; DEBUGASSERT(priv); - wdvdbg("Entry: timeout=%d\n", timeout); + wdinfo("Entry: timeout=%d\n", timeout); /* Can this timeout be represented? */ if (timeout < WDT_MINTIMEOUT || timeout >= WDT_MAXTIMEOUT) { - wddbg("Cannot represent timeout: %d < %d > %d\n", + wderr("ERROR: Cannot represent timeout: %d < %d > %d\n", WDT_MINTIMEOUT, timeout, WDT_MAXTIMEOUT); return -ERANGE; } @@ -496,7 +487,7 @@ static int sam_settimeout(FAR struct watchdog_lowerhalf_s *lower, priv->reload = reload; - wdvdbg("reload=%d timout: %d->%d\n", + wdinfo("reload=%d timout: %d->%d\n", reload, timeout, priv->timeout); /* Set the WDT_MR according to calculated value @@ -541,7 +532,7 @@ static int sam_settimeout(FAR struct watchdog_lowerhalf_s *lower, priv->started = true; - wdvdbg("Setup: CR: %08x MR: %08x SR: %08x\n", + wdinfo("Setup: CR: %08x MR: %08x SR: %08x\n", sam_getreg(SAM_WDT_CR), sam_getreg(SAM_WDT_MR), sam_getreg(SAM_WDT_SR)); @@ -574,7 +565,7 @@ static xcpt_t sam_capture(FAR struct watchdog_lowerhalf_s *lower, xcpt_t handler) { #ifndef CONFIG_SAMA5_WDT_INTERRUPT - wddbg("ERROR: Not configured for this mode\n"); + wderr("ERROR: Not configured for this mode\n"); return NULL; #else FAR struct sam_lowerhalf_s *priv = (FAR struct sam_lowerhalf_s *)lower; @@ -582,7 +573,7 @@ static xcpt_t sam_capture(FAR struct watchdog_lowerhalf_s *lower, xcpt_t oldhandler; DEBUGASSERT(priv); - wdvdbg("Entry: handler=%p\n", handler); + wdinfo("Entry: handler=%p\n", handler); /* Get the old handler return value */ @@ -636,7 +627,7 @@ static xcpt_t sam_capture(FAR struct watchdog_lowerhalf_s *lower, static int sam_ioctl(FAR struct watchdog_lowerhalf_s *lower, int cmd, unsigned long arg) { - wdvdbg("cmd=%d arg=%ld\n", cmd, arg); + wdinfo("cmd=%d arg=%ld\n", cmd, arg); /* No ioctls are supported */ @@ -667,7 +658,7 @@ int sam_wdt_initialize(void) { FAR struct sam_lowerhalf_s *priv = &g_wdtdev; - wdvdbg("Entry: CR: %08x MR: %08x SR: %08x\n", + wdinfo("Entry: CR: %08x MR: %08x SR: %08x\n", sam_getreg(SAM_WDT_CR), sam_getreg(SAM_WDT_MR), sam_getreg(SAM_WDT_SR)); diff --git a/arch/arm/src/sama5/sam_xdmac.c b/arch/arm/src/sama5/sam_xdmac.c index bb4ce4e1ddcb54165a3fede40c35bdc35981a657..9b819555569e3079c1fcc3fed55cd10542da9d36 100644 --- a/arch/arm/src/sama5/sam_xdmac.c +++ b/arch/arm/src/sama5/sam_xdmac.c @@ -807,7 +807,7 @@ static uint8_t sam_channel(uint8_t pid, const struct sam_pidmap_s *table, } } - dmadbg("No channel found for pid %d\n", pid); + dmaerr("ERROR: No channel found for pid %d\n", pid); DEBUGPANIC(); return 0x3f; } @@ -1330,7 +1330,7 @@ sam_allocdesc(struct sam_xdmach_s *xdmach, struct chnext_view1_s *prev, * Obviously setting it to zero would break that usage. */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (csa != 0) #endif { @@ -1650,7 +1650,7 @@ static inline int sam_single(struct sam_xdmach_s *xdmach) static inline int sam_multiple(struct sam_xdmach_s *xdmach) { struct sam_xdmac_s *xdmac = sam_controller(xdmach); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_ASSERTIONS struct chnext_view1_s *llhead = xdmach->llhead; #endif uintptr_t paddr; @@ -1860,7 +1860,7 @@ static int sam_xdmac_interrupt(struct sam_xdmac_s *xdmac) { /* Yes... Terminate the transfer with an error? */ - dmalldbg("ERROR: DMA failed: %08x\n", chpending); + dmaerr("ERROR: DMA failed: %08x\n", chpending); sam_dmaterminate(xdmach, -EIO); } @@ -1877,7 +1877,7 @@ static int sam_xdmac_interrupt(struct sam_xdmac_s *xdmac) else { - dmalldbg("ERROR: Unexpected interrupt: %08x\n", chpending); + dmaerr("ERROR: Unexpected interrupt: %08x\n", chpending); DEBUGPANIC(); } @@ -1957,7 +1957,7 @@ void sam_dmainitialize(struct sam_xdmac_s *xdmac) void weak_function up_dmainitialize(void) { #ifdef CONFIG_SAMA5_XDMAC0 - dmallvdbg("Initialize XDMAC0\n"); + dmainfo("Initialize XDMAC0\n"); /* Enable peripheral clock */ @@ -1977,7 +1977,7 @@ void weak_function up_dmainitialize(void) #endif #ifdef CONFIG_SAMA5_XDMAC1 - dmallvdbg("Initialize XDMAC1\n"); + dmainfo("Initialize XDMAC1\n"); /* Enable peripheral clock */ @@ -2039,7 +2039,7 @@ DMA_HANDLE sam_dmachannel(uint8_t dmacno, uint32_t chflags) #endif { - dmadbg("ERROR: Bad XDMAC number: %d\n", dmacno); + dmaerr("ERROR: Bad XDMAC number: %d\n", dmacno); DEBUGPANIC(); return (DMA_HANDLE)NULL; } @@ -2083,12 +2083,12 @@ DMA_HANDLE sam_dmachannel(uint8_t dmacno, uint32_t chflags) if (xdmach) { - dmavdbg("XDMAC%d CH%d: chflags: %08x returning xdmach: %p\n", + dmainfo("XDMAC%d CH%d: chflags: %08x returning xdmach: %p\n", (int)dmacno, xdmach->chan, (int)chflags, xdmach); } else { - dmadbg("ERROR: Failed allocate XDMAC%d channel\n", (int)dmacno); + dmaerr("ERROR: Failed allocate XDMAC%d channel\n", (int)dmacno); } return (DMA_HANDLE)xdmach; @@ -2119,13 +2119,13 @@ void sam_dmaconfig(DMA_HANDLE handle, uint32_t chflags) xdmach->flags = chflags; #if defined(CONFIG_SAMA5_XDMAC0) && defined(CONFIG_SAMA5_XDMAC1) - dmavdbg("XDMAC%d CH%d: chflags: %08x\n", + dmainfo("XDMAC%d CH%d: chflags: %08x\n", xdmach->xdmac, xdmach->chan, (int)chflags); #elif defined(CONFIG_SAMA5_XDMAC0) - dmavdbg("XDMAC0 CH%d: chflags: %08x\n", + dmainfo("XDMAC0 CH%d: chflags: %08x\n", xdmach->chan, (int)chflags); #else - dmavdbg("XDMAC1 CH%d: chflags: %08x\n", + dmainfo("XDMAC1 CH%d: chflags: %08x\n", xdmach->chan, (int)chflags); #endif } @@ -2148,7 +2148,7 @@ void sam_dmafree(DMA_HANDLE handle) struct sam_xdmach_s *xdmach = (struct sam_xdmach_s *)handle; struct sam_xdmac_s *xdmac; - dmavdbg("xdmach: %p\n", xdmach); + dmainfo("xdmach: %p\n", xdmach); DEBUGASSERT((xdmach != NULL) && (xdmach->inuse)); xdmac = sam_controller(xdmach); @@ -2186,10 +2186,10 @@ int sam_dmatxsetup(DMA_HANDLE handle, uint32_t paddr, uint32_t maddr, size_t remaining; int ret = OK; - dmavdbg("xdmach: %p paddr: %08x maddr: %08x nbytes: %d\n", + dmainfo("xdmach: %p paddr: %08x maddr: %08x nbytes: %d\n", xdmach, (int)paddr, (int)maddr, (int)nbytes); DEBUGASSERT(xdmach); - dmavdbg("llhead: %p lltail: %p\n", xdmach->llhead, xdmach->lltail); + dmainfo("llhead: %p lltail: %p\n", xdmach->llhead, xdmach->lltail); /* The maximum transfer size in bytes depends upon the maximum number of * transfers and the number of bytes per transfer. @@ -2265,10 +2265,10 @@ int sam_dmarxsetup(DMA_HANDLE handle, uint32_t paddr, uint32_t maddr, size_t remaining; int ret = OK; - dmavdbg("xdmach: %p paddr: %08x maddr: %08x nbytes: %d\n", + dmainfo("xdmach: %p paddr: %08x maddr: %08x nbytes: %d\n", xdmach, (int)paddr, (int)maddr, (int)nbytes); DEBUGASSERT(xdmach); - dmavdbg("llhead: %p lltail: %p\n", xdmach->llhead, xdmach->lltail); + dmainfo("llhead: %p lltail: %p\n", xdmach->llhead, xdmach->lltail); /* The maximum transfer size in bytes depends upon the maximum number of * transfers and the number of bytes per transfer. @@ -2340,7 +2340,7 @@ int sam_dmastart(DMA_HANDLE handle, dma_callback_t callback, void *arg) struct sam_xdmach_s *xdmach = (struct sam_xdmach_s *)handle; int ret = -EINVAL; - dmavdbg("xdmach: %p callback: %p arg: %p\n", xdmach, callback, arg); + dmainfo("xdmach: %p callback: %p arg: %p\n", xdmach, callback, arg); DEBUGASSERT(xdmach != NULL); /* Verify that the DMA has been setup (i.e., at least one entry in the @@ -2384,7 +2384,7 @@ void sam_dmastop(DMA_HANDLE handle) struct sam_xdmach_s *xdmach = (struct sam_xdmach_s *)handle; irqstate_t flags; - dmavdbg("xdmach: %p\n", xdmach); + dmainfo("xdmach: %p\n", xdmach); DEBUGASSERT(xdmach != NULL); flags = enter_critical_section(); @@ -2403,7 +2403,7 @@ void sam_dmastop(DMA_HANDLE handle) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void sam_dmasample(DMA_HANDLE handle, struct sam_dmaregs_s *regs) { struct sam_xdmach_s *xdmach = (struct sam_xdmach_s *)handle; @@ -2445,7 +2445,7 @@ void sam_dmasample(DMA_HANDLE handle, struct sam_dmaregs_s *regs) leave_critical_section(flags); } -#endif /* CONFIG_DEBUG_DMA */ +#endif /* CONFIG_DEBUG_DMA_INFO */ /**************************************************************************** * Name: sam_dmadump @@ -2458,37 +2458,37 @@ void sam_dmasample(DMA_HANDLE handle, struct sam_dmaregs_s *regs) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void sam_dmadump(DMA_HANDLE handle, const struct sam_dmaregs_s *regs, const char *msg) { struct sam_xdmach_s *xdmach = (struct sam_xdmach_s *)handle; struct sam_xdmac_s *xdmac = sam_controller(xdmach); - dmadbg("%s\n", msg); - dmadbg(" DMA Global Registers:\n"); - dmadbg(" GTYPE[%08x]: %08x\n", xdmac->base + SAM_XDMAC_GTYPE_OFFSET, regs->gtype); - dmadbg(" GCFG[%08x]: %08x\n", xdmac->base + SAM_XDMAC_GCFG_OFFSET, regs->gcfg); - dmadbg(" GWAC[%08x]: %08x\n", xdmac->base + SAM_XDMAC_GWAC_OFFSET, regs->gwac); - dmadbg(" GIM[%08x]: %08x\n", xdmac->base + SAM_XDMAC_GIM_OFFSET, regs->gim); - dmadbg(" GIS[%08x]: %08x\n", xdmac->base + SAM_XDMAC_GIS_OFFSET, regs->gis); - dmadbg(" GS[%08x]: %08x\n", xdmac->base + SAM_XDMAC_GS_OFFSET, regs->gs); - dmadbg(" GRS[%08x]: %08x\n", xdmac->base + SAM_XDMAC_GRS_OFFSET, regs->grs); - dmadbg(" GWS[%08x]: %08x\n", xdmac->base + SAM_XDMAC_GWS_OFFSET, regs->gws); - dmadbg(" GSWS[%08x]: %08x\n", xdmac->base + SAM_XDMAC_GSWS_OFFSET, regs->gsws); - dmadbg(" DMA Channel Registers:\n"); - dmadbg(" CIM[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CIM_OFFSET, regs->cim); - dmadbg(" CIS[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CIS_OFFSET, regs->cis); - dmadbg(" CSA[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CSA_OFFSET, regs->csa); - dmadbg(" CDA[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CDA_OFFSET, regs->cda); - dmadbg(" CNDA[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CNDA_OFFSET, regs->cnda); - dmadbg(" CNDC[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CNDC_OFFSET, regs->cndc); - dmadbg(" CUBC[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CUBC_OFFSET, regs->cubc); - dmadbg(" CBC[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CBC_OFFSET, regs->cbc); - dmadbg(" CC[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CC_OFFSET, regs->cc); - dmadbg(" CDSMSP[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CDSMSP_OFFSET, regs->cdsmsp); - dmadbg(" CSUS[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CSUS_OFFSET, regs->csus); - dmadbg(" CDUS[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CDUS_OFFSET, regs->cdus); + dmainfo("%s\n", msg); + dmainfo(" DMA Global Registers:\n"); + dmainfo(" GTYPE[%08x]: %08x\n", xdmac->base + SAM_XDMAC_GTYPE_OFFSET, regs->gtype); + dmainfo(" GCFG[%08x]: %08x\n", xdmac->base + SAM_XDMAC_GCFG_OFFSET, regs->gcfg); + dmainfo(" GWAC[%08x]: %08x\n", xdmac->base + SAM_XDMAC_GWAC_OFFSET, regs->gwac); + dmainfo(" GIM[%08x]: %08x\n", xdmac->base + SAM_XDMAC_GIM_OFFSET, regs->gim); + dmainfo(" GIS[%08x]: %08x\n", xdmac->base + SAM_XDMAC_GIS_OFFSET, regs->gis); + dmainfo(" GS[%08x]: %08x\n", xdmac->base + SAM_XDMAC_GS_OFFSET, regs->gs); + dmainfo(" GRS[%08x]: %08x\n", xdmac->base + SAM_XDMAC_GRS_OFFSET, regs->grs); + dmainfo(" GWS[%08x]: %08x\n", xdmac->base + SAM_XDMAC_GWS_OFFSET, regs->gws); + dmainfo(" GSWS[%08x]: %08x\n", xdmac->base + SAM_XDMAC_GSWS_OFFSET, regs->gsws); + dmainfo(" DMA Channel Registers:\n"); + dmainfo(" CIM[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CIM_OFFSET, regs->cim); + dmainfo(" CIS[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CIS_OFFSET, regs->cis); + dmainfo(" CSA[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CSA_OFFSET, regs->csa); + dmainfo(" CDA[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CDA_OFFSET, regs->cda); + dmainfo(" CNDA[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CNDA_OFFSET, regs->cnda); + dmainfo(" CNDC[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CNDC_OFFSET, regs->cndc); + dmainfo(" CUBC[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CUBC_OFFSET, regs->cubc); + dmainfo(" CBC[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CBC_OFFSET, regs->cbc); + dmainfo(" CC[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CC_OFFSET, regs->cc); + dmainfo(" CDSMSP[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CDSMSP_OFFSET, regs->cdsmsp); + dmainfo(" CSUS[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CSUS_OFFSET, regs->csus); + dmainfo(" CDUS[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CDUS_OFFSET, regs->cdus); } -#endif /* CONFIG_DEBUG_DMA */ +#endif /* CONFIG_DEBUG_DMA_INFO */ #endif /* CONFIG_SAMA5_XDMAC0 || CONFIG_SAMA5_XDMAC1 */ diff --git a/arch/arm/src/sama5/sama5d2x_pio.c b/arch/arm/src/sama5/sama5d2x_pio.c index d6daf15a82003fb57987c21d863e362e8988481d..3a87d3da666e42ca6ee64ef1f0ce96cf0420254b 100644 --- a/arch/arm/src/sama5/sama5d2x_pio.c +++ b/arch/arm/src/sama5/sama5d2x_pio.c @@ -118,7 +118,7 @@ const uintptr_t g_spiobase[SAM_NPIO] = ****************************************************************************/ /* Maps a port number to the standard port character */ -#if defined(CONFIG_DEBUG_GPIO) && SAM_NPIO > 0 +#if defined(CONFIG_DEBUG_GPIO_INFO) && SAM_NPIO > 0 static const char g_portchar[SAM_NPIO] = { 'A' @@ -610,7 +610,7 @@ void sam_pio_forceclk(pio_pinset_t pinset, bool enable) * ************************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO int sam_dumppio(uint32_t pinset, const char *msg) { irqstate_t flags; @@ -630,32 +630,32 @@ int sam_dumppio(uint32_t pinset, const char *msg) if (secure) { - lldbg("SPIO%c pinset: %08x base: %08x -- %s\n", + gpioinfo("SPIO%c pinset: %08x base: %08x -- %s\n", g_portchar[port], pinset, base, msg); } else { - lldbg("PIO%c pinset: %08x base: %08x -- %s\n", + gpioinfo("PIO%c pinset: %08x base: %08x -- %s\n", g_portchar[port], pinset, base, msg); } - lldbg(" MSKR: %08x CFGR: %08x PDSR: %08x LOCKSR: %08x\n", - getreg32(base + SAM_PIO_MSKR_OFFSET), getreg32(base + SAM_PIO_CFGR_OFFSET), - getreg32(base + SAM_PIO_PDSR_OFFSET), getreg32(base + SAM_PIO_LOCKSR_OFFSET)); - lldbg(" ODSR: %08x IMR: %08x ISR: %08x\n", - getreg32(base + SAM_PIO_ODSR_OFFSET), getreg32(base + SAM_PIO_IMR_OFFSET), - getreg32(base + SAM_PIO_ISR_OFFSET)); + gpioinfo(" MSKR: %08x CFGR: %08x PDSR: %08x LOCKSR: %08x\n", + getreg32(base + SAM_PIO_MSKR_OFFSET), getreg32(base + SAM_PIO_CFGR_OFFSET), + getreg32(base + SAM_PIO_PDSR_OFFSET), getreg32(base + SAM_PIO_LOCKSR_OFFSET)); + gpioinfo(" ODSR: %08x IMR: %08x ISR: %08x\n", + getreg32(base + SAM_PIO_ODSR_OFFSET), getreg32(base + SAM_PIO_IMR_OFFSET), + getreg32(base + SAM_PIO_ISR_OFFSET)); if (secure) { - lldbg(" SCDR: %08x WPMR: %08x WPSR: %08x IOSSR: %08x\n", - getreg32(SAM_SPIO_SCDR), getreg32(SAM_SPIO_WPMR), - getreg32(SAM_SPIO_WPSR), getreg32(base + SAM_SPIO_IOSSR_OFFSET)); + gpioinfo(" SCDR: %08x WPMR: %08x WPSR: %08x IOSSR: %08x\n", + getreg32(SAM_SPIO_SCDR), getreg32(SAM_SPIO_WPMR), + getreg32(SAM_SPIO_WPSR), getreg32(base + SAM_SPIO_IOSSR_OFFSET)); } else { - lldbg(" WPMR: %08x WPSR: %08x\n", - getreg32(SAM_PIO_WPMR), getreg32(SAM_PIO_WPSR)); + gpioinfo(" WPMR: %08x WPSR: %08x\n", + getreg32(SAM_PIO_WPMR), getreg32(SAM_PIO_WPSR)); } leave_critical_section(flags); diff --git a/arch/arm/src/sama5/sama5d2x_pio.h b/arch/arm/src/sama5/sama5d2x_pio.h index 4b37166d4b3f0a65870dfe31a7eaea17835f8cd7..4b0324dc96317b3c7c7ffa9a52b7c5645ba2660b 100644 --- a/arch/arm/src/sama5/sama5d2x_pio.h +++ b/arch/arm/src/sama5/sama5d2x_pio.h @@ -58,10 +58,6 @@ # undef CONFIG_SAMA5_PIO_IRQ #endif -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_GPIO -#endif - #define PIO_HAVE_PULLDOWN 1 #define PIO_HAVE_PERIPHCD 1 #define PIO_HAVE_SCHMITT 1 diff --git a/arch/arm/src/sama5/sama5d3x4x_pio.c b/arch/arm/src/sama5/sama5d3x4x_pio.c index b9379ad868c734f96e427f7711c0ae5c11d69e7b..0165a382acfef968893243d0c090309c43bc58e9 100644 --- a/arch/arm/src/sama5/sama5d3x4x_pio.c +++ b/arch/arm/src/sama5/sama5d3x4x_pio.c @@ -67,10 +67,6 @@ #define PIO_INPUT_BITS (PIO_INPUT | PIO_CFG_DEFAULT) #define MK_INPUT(p) (((p) & (PIO_PORT_MASK | PIO_PIN_MASK)) | PIO_INPUT_BITS) -/**************************************************************************** - * Private Types - ****************************************************************************/ - /**************************************************************************** * Public Data ****************************************************************************/ @@ -99,7 +95,7 @@ const uintptr_t g_piobase[SAM_NPIO] = ****************************************************************************/ /* Maps a port number to the standard port character */ -#if defined(CONFIG_DEBUG_GPIO) && SAM_NPIO > 0 +#if defined(CONFIG_DEBUG_GPIO_INFO) && SAM_NPIO > 0 static const char g_portchar[SAM_NPIO] = { 'A' @@ -854,7 +850,7 @@ void sam_pio_forceclk(pio_pinset_t pinset, bool enable) * ************************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO int sam_dumppio(uint32_t pinset, const char *msg) { irqstate_t flags; @@ -869,41 +865,42 @@ int sam_dumppio(uint32_t pinset, const char *msg) /* The following requires exclusive access to the PIO registers */ flags = enter_critical_section(); - lldbg("PIO%c pinset: %08x base: %08x -- %s\n", - g_portchar[port], pinset, base, msg); + + gpioinfo("PIO%c pinset: %08x base: %08x -- %s\n", + g_portchar[port], pinset, base, msg); #ifdef SAM_PIO_ISLR_OFFSET - lldbg(" PSR: %08x ISLR: %08x OSR: %08x IFSR: %08x\n", - getreg32(base + SAM_PIO_PSR_OFFSET), getreg32(base + SAM_PIO_ISLR_OFFSET), - getreg32(base + SAM_PIO_OSR_OFFSET), getreg32(base + SAM_PIO_IFSR_OFFSET)); + gpioinfo(" PSR: %08x ISLR: %08x OSR: %08x IFSR: %08x\n", + getreg32(base + SAM_PIO_PSR_OFFSET), getreg32(base + SAM_PIO_ISLR_OFFSET), + getreg32(base + SAM_PIO_OSR_OFFSET), getreg32(base + SAM_PIO_IFSR_OFFSET)); #else - lldbg(" PSR: %08x OSR: %08x IFSR: %08x\n", - getreg32(base + SAM_PIO_PSR_OFFSET), getreg32(base + SAM_PIO_OSR_OFFSET), - getreg32(base + SAM_PIO_IFSR_OFFSET)); -#endif - lldbg(" ODSR: %08x PDSR: %08x IMR: %08x ISR: %08x\n", - getreg32(base + SAM_PIO_ODSR_OFFSET), getreg32(base + SAM_PIO_PDSR_OFFSET), - getreg32(base + SAM_PIO_IMR_OFFSET), getreg32(base + SAM_PIO_ISR_OFFSET)); - lldbg(" MDSR: %08x PUSR: %08x ABDCSR: %08x %08x\n", - getreg32(base + SAM_PIO_MDSR_OFFSET), getreg32(base + SAM_PIO_PUSR_OFFSET), - getreg32(base + SAM_PIO_ABCDSR1_OFFSET), getreg32(base + SAM_PIO_ABCDSR2_OFFSET)); - lldbg(" IFSCSR: %08x SCDR: %08x PPDSR: %08x OWSR: %08x\n", - getreg32(base + SAM_PIO_IFSCSR_OFFSET), getreg32(base + SAM_PIO_SCDR_OFFSET), - getreg32(base + SAM_PIO_PPDSR_OFFSET), getreg32(base + SAM_PIO_OWSR_OFFSET)); + gpioinfo(" PSR: %08x OSR: %08x IFSR: %08x\n", + getreg32(base + SAM_PIO_PSR_OFFSET), getreg32(base + SAM_PIO_OSR_OFFSET), + getreg32(base + SAM_PIO_IFSR_OFFSET)); +#endif + gpioinfo(" ODSR: %08x PDSR: %08x IMR: %08x ISR: %08x\n", + getreg32(base + SAM_PIO_ODSR_OFFSET), getreg32(base + SAM_PIO_PDSR_OFFSET), + getreg32(base + SAM_PIO_IMR_OFFSET), getreg32(base + SAM_PIO_ISR_OFFSET)); + gpioinfo(" MDSR: %08x PUSR: %08x ABDCSR: %08x %08x\n", + getreg32(base + SAM_PIO_MDSR_OFFSET), getreg32(base + SAM_PIO_PUSR_OFFSET), + getreg32(base + SAM_PIO_ABCDSR1_OFFSET), getreg32(base + SAM_PIO_ABCDSR2_OFFSET)); + gpioinfo(" IFSCSR: %08x SCDR: %08x PPDSR: %08x OWSR: %08x\n", + getreg32(base + SAM_PIO_IFSCSR_OFFSET), getreg32(base + SAM_PIO_SCDR_OFFSET), + getreg32(base + SAM_PIO_PPDSR_OFFSET), getreg32(base + SAM_PIO_OWSR_OFFSET)); #ifdef SAM_PIO_LOCKSR_OFFSET - lldbg(" AIMMR: %08x ELSR: %08x FRLHSR: %08x LOCKSR: %08x\n", - getreg32(base + SAM_PIO_AIMMR_OFFSET), getreg32(base + SAM_PIO_ELSR_OFFSET), - getreg32(base + SAM_PIO_FRLHSR_OFFSET), getreg32(base + SAM_PIO_LOCKSR_OFFSET)); + gpioinfo(" AIMMR: %08x ELSR: %08x FRLHSR: %08x LOCKSR: %08x\n", + getreg32(base + SAM_PIO_AIMMR_OFFSET), getreg32(base + SAM_PIO_ELSR_OFFSET), + getreg32(base + SAM_PIO_FRLHSR_OFFSET), getreg32(base + SAM_PIO_LOCKSR_OFFSET)); #else - lldbg(" AIMMR: %08x ELSR: %08x FRLHSR: %08x\n", - getreg32(base + SAM_PIO_AIMMR_OFFSET), getreg32(base + SAM_PIO_ELSR_OFFSET), - getreg32(base + SAM_PIO_FRLHSR_OFFSET)); -#endif - lldbg("SCHMITT: %08x DRIVER: %08x %08x\n", - getreg32(base + SAM_PIO_SCHMITT_OFFSET), getreg32(base + SAM_PIO_DRIVER1_OFFSET), - getreg32(base + SAM_PIO_DRIVER2_OFFSET)); - lldbg(" WPMR: %08x WPSR: %08x\n", - getreg32(base + SAM_PIO_WPMR_OFFSET), getreg32(base + SAM_PIO_WPSR_OFFSET)); + gpioinfo(" AIMMR: %08x ELSR: %08x FRLHSR: %08x\n", + getreg32(base + SAM_PIO_AIMMR_OFFSET), getreg32(base + SAM_PIO_ELSR_OFFSET), + getreg32(base + SAM_PIO_FRLHSR_OFFSET)); +#endif + gpioinfo("SCHMITT: %08x DRIVER: %08x %08x\n", + getreg32(base + SAM_PIO_SCHMITT_OFFSET), getreg32(base + SAM_PIO_DRIVER1_OFFSET), + getreg32(base + SAM_PIO_DRIVER2_OFFSET)); + gpioinfo(" WPMR: %08x WPSR: %08x\n", + getreg32(base + SAM_PIO_WPMR_OFFSET), getreg32(base + SAM_PIO_WPSR_OFFSET)); leave_critical_section(flags); return OK; diff --git a/arch/arm/src/sama5/sama5d3x4x_pio.h b/arch/arm/src/sama5/sama5d3x4x_pio.h index 63b6615b556955465ba7f093342c3fb3e7fa4b13..cd5f1d3a59816ac04ba1be6535c980062485e520 100644 --- a/arch/arm/src/sama5/sama5d3x4x_pio.h +++ b/arch/arm/src/sama5/sama5d3x4x_pio.h @@ -52,10 +52,6 @@ # undef CONFIG_SAMA5_PIO_IRQ #endif -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_GPIO -#endif - #define PIO_HAVE_PULLDOWN 1 #define PIO_HAVE_PERIPHCD 1 #define PIO_HAVE_SCHMITT 1 diff --git a/arch/arm/src/samdl/Kconfig b/arch/arm/src/samdl/Kconfig index a890db6a0fdd8dcbc14ac478ebe8bf8ad2febefc..28ca29c90c342f2b9ecb851bbfd635554d768c20 100644 --- a/arch/arm/src/samdl/Kconfig +++ b/arch/arm/src/samdl/Kconfig @@ -711,7 +711,7 @@ if SAMDL_HAVE_SPI config SAMDL_SPI_REGDEBUG bool "SPI register-Level Debug" default n - depends on DEBUG_SPI + depends on DEBUG_SPI_INFO ---help--- Enable very low-level register access debug. Depends on DEBUG_SPI. diff --git a/arch/arm/src/samdl/Make.defs b/arch/arm/src/samdl/Make.defs index d9a82f959e592953e0732a5e8c066feda4e9fc7c..7ef0105780becf9555c51205ae426c66680edf1d 100644 --- a/arch/arm/src/samdl/Make.defs +++ b/arch/arm/src/samdl/Make.defs @@ -65,7 +65,7 @@ else ifeq ($(CONFIG_MODULE),y) CMN_CSRCS += up_elf.c endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) CMN_CSRCS += up_dumpnvic.c endif diff --git a/arch/arm/src/samdl/sam_dmac.c b/arch/arm/src/samdl/sam_dmac.c index de5004f2d74a5c5195076e76ae3616b16c1a3997..d465d4d5f87c89e14e1607d8befee060f5d68572 100644 --- a/arch/arm/src/samdl/sam_dmac.c +++ b/arch/arm/src/samdl/sam_dmac.c @@ -769,7 +769,7 @@ static int sam_rxbuffer(struct sam_dmach_s *dmach, uint32_t paddr, void weak_function up_dmainitialize(void) { - dmallvdbg("Initialize DMAC\n"); + dmainfo("Initialize DMAC\n"); int i; /* Initialize global semaphores */ @@ -888,7 +888,7 @@ DMA_HANDLE sam_dmachannel(uint32_t chflags) sam_givechsem(); - dmavdbg("chflags: %08x returning dmach: %p\n", (int)chflags, dmach); + dmainfo("chflags: %08x returning dmach: %p\n", (int)chflags, dmach); return (DMA_HANDLE)dmach; } @@ -914,7 +914,7 @@ void sam_dmaconfig(DMA_HANDLE handle, uint32_t chflags) /* Set the new DMA channel flags. */ - dmavdbg("chflags: %08x\n", (int)chflags); + dmainfo("chflags: %08x\n", (int)chflags); dmach->dc_flags = chflags; } @@ -935,7 +935,7 @@ void sam_dmafree(DMA_HANDLE handle) { struct sam_dmach_s *dmach = (struct sam_dmach_s *)handle; - dmavdbg("dmach: %p\n", dmach); + dmainfo("dmach: %p\n", dmach); DEBUGASSERT((dmach != NULL) && (dmach->dc_inuse)); /* Mark the channel no longer in use. Clearing the inuse flag is an atomic @@ -965,12 +965,12 @@ int sam_dmatxsetup(DMA_HANDLE handle, uint32_t paddr, uint32_t maddr, size_t maxtransfer; int ret = OK; - dmavdbg("dmach: %p paddr: %08x maddr: %08x nbytes: %d\n", + dmainfo("dmach: %p paddr: %08x maddr: %08x nbytes: %d\n", dmach, (int)paddr, (int)maddr, (int)nbytes); DEBUGASSERT(dmach); #if CONFIG_SAMDL_DMAC_NDESC > 0 - dmavdbg("dc_head: %p dc_tail: %p\n", dmach->dc_head, dmach->dc_tail); + dmainfo("dc_head: %p dc_tail: %p\n", dmach->dc_head, dmach->dc_tail); #endif /* The maximum transfer size in bytes depends upon the maximum number of @@ -1039,12 +1039,12 @@ int sam_dmarxsetup(DMA_HANDLE handle, uint32_t paddr, uint32_t maddr, size_t maxtransfer; int ret = OK; - dmavdbg("dmach: %p paddr: %08x maddr: %08x nbytes: %d\n", + dmainfo("dmach: %p paddr: %08x maddr: %08x nbytes: %d\n", dmach, (int)paddr, (int)maddr, (int)nbytes); DEBUGASSERT(dmach); #if CONFIG_SAMDL_DMAC_NDESC > 0 - dmavdbg("dc_head: %p dc_tail: %p\n", dmach->dc_head, dmach->dc_tail); + dmainfo("dc_head: %p dc_tail: %p\n", dmach->dc_head, dmach->dc_tail); #endif /* The maximum transfer size in bytes depends upon the maximum number of @@ -1115,7 +1115,7 @@ int sam_dmastart(DMA_HANDLE handle, dma_callback_t callback, void *arg) uint8_t memqos; int ret = -EINVAL; - dmavdbg("dmach: %p callback: %p arg: %p\n", dmach, callback, arg); + dmainfo("dmach: %p callback: %p arg: %p\n", dmach, callback, arg); DEBUGASSERT(dmach != NULL && dmach->dc_chan < SAMDL_NDMACHAN); head = &g_base_desc[dmach->dc_chan]; @@ -1240,7 +1240,7 @@ void sam_dmastop(DMA_HANDLE handle) struct sam_dmach_s *dmach = (struct sam_dmach_s *)handle; irqstate_t flags; - dmavdbg("dmach: %p\n", dmach); + dmainfo("dmach: %p\n", dmach); DEBUGASSERT(dmach != NULL); flags = enter_critical_section(); @@ -1259,7 +1259,7 @@ void sam_dmastop(DMA_HANDLE handle) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void sam_dmasample(DMA_HANDLE handle, struct sam_dmaregs_s *regs) { struct sam_dmach_s *dmach = (struct sam_dmach_s *)handle; @@ -1274,7 +1274,7 @@ void sam_dmasample(DMA_HANDLE handle, struct sam_dmaregs_s *regs) regs->crcdatain = getreg32(SAM_DMAC_CRCDATAIN); /* CRC Data Input Register */ regs->crcchksum = getreg32(SAM_DMAC_CRCCHKSUM); /* CRC Checksum Register */ regs->crcstatus = getreg8(SAM_DMAC_CRCSTATUS); /* CRC Status Register */ - regs->dbgctrl = getreg8(SAM_DMAC_DBGCTRL); /* Debug Control Register */ + regs->errctrl = getreg8(SAM_DMAC_DBGCTRL); /* Debug Control Register */ regs->qosctrl = getreg8(SAM_DMAC_QOSCTRL); /* Quality of Service Control Register */ regs->swtrigctrl = getreg32(SAM_DMAC_SWTRIGCTRL); /* Software Trigger Control Register */ regs->prictrl0 = getreg32(SAM_DMAC_PRICTRL0); /* Priority Control 0 Register */ @@ -1291,7 +1291,7 @@ void sam_dmasample(DMA_HANDLE handle, struct sam_dmaregs_s *regs) regs->chintflag = getreg8(SAM_DMAC_CHINTFLAG); /* Channel Interrupt Flag Status and Clear Register */ regs->chstatus = getreg8(SAM_DMAC_CHSTATUS); /* Channel Status Register */ } -#endif /* CONFIG_DEBUG_DMA */ +#endif /* CONFIG_DEBUG_DMA_INFO */ /**************************************************************************** * Name: sam_dmadump @@ -1304,26 +1304,26 @@ void sam_dmasample(DMA_HANDLE handle, struct sam_dmaregs_s *regs) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void sam_dmadump(DMA_HANDLE handle, const struct sam_dmaregs_s *regs, const char *msg) { struct sam_dmach_s *dmach = (struct sam_dmach_s *)handle; - dmadbg("%s\n", msg); - dmadbg(" DMAC Registers:\n"); - dmadbg(" CTRL: %04x CRCCTRL: %04x CRCDATAIN: %08x CRCCHKSUM: %08x\n", - regs->ctrl, regs->crcctrl, regs->crcdatain, regs->crcchksum); - dmadbg(" CRCSTATUS: %02x DBGCTRL: %02x QOSCTRL: %02x SWTRIGCTRL: %08x\n", - regs->crcstatus, regs->dbgctrl, regs->qosctrl, regs->swtrigctrl); - dmadbg(" PRICTRL0: %08x INTPEND: %04x INSTSTATUS: %08x BUSYCH: %08x\n", - regs->prictrl0, regs->intpend, regs->intstatus, regs->busych); - dmadbg(" PENDCH: %08x ACTIVE: %08x BASEADDR: %08x WRBADDR: %08x\n", - regs->pendch, regs->active, regs->baseaddr, regs->wrbaddr); - dmadbg(" CHID: %02x CHCRTRLA: %02x CHCRTRLB: %08x CHINFLAG: %02x\n", - regs->chid, regs->chctrla, regs->chctrlb, regs->chintflag, - dmadbg(" CHSTATUS: %02x\n", - regs->chstatus); + dmainfo("%s\n", msg); + dmainfo(" DMAC Registers:\n"); + dmainfo(" CTRL: %04x CRCCTRL: %04x CRCDATAIN: %08x CRCCHKSUM: %08x\n", + regs->ctrl, regs->crcctrl, regs->crcdatain, regs->crcchksum); + dmainfo(" CRCSTATUS: %02x DBGCTRL: %02x QOSCTRL: %02x SWTRIGCTRL: %08x\n", + regs->crcstatus, regs->errctrl, regs->qosctrl, regs->swtrigctrl); + dmainfo(" PRICTRL0: %08x INTPEND: %04x INSTSTATUS: %08x BUSYCH: %08x\n", + regs->prictrl0, regs->intpend, regs->intstatus, regs->busych); + dmainfo(" PENDCH: %08x ACTIVE: %08x BASEADDR: %08x WRBADDR: %08x\n", + regs->pendch, regs->active, regs->baseaddr, regs->wrbaddr); + dmainfo(" CHID: %02x CHCRTRLA: %02x CHCRTRLB: %08x CHINFLAG: %02x\n", + regs->chid, regs->chctrla, regs->chctrlb, regs->chintflag, + dmainfo(" CHSTATUS: %02x\n", + regs->chstatus); } -#endif /* CONFIG_DEBUG_DMA */ +#endif /* CONFIG_DEBUG_DMA_INFO */ #endif /* CONFIG_SAMDL_DMAC */ diff --git a/arch/arm/src/samdl/sam_dmac.h b/arch/arm/src/samdl/sam_dmac.h index cc1c60e7a0cd781d2d37aed06b533b53428ccd0b..2a6937dd6820014c626c3a88d8c86b2655b26471 100644 --- a/arch/arm/src/samdl/sam_dmac.h +++ b/arch/arm/src/samdl/sam_dmac.h @@ -62,12 +62,6 @@ * Pre-processor Definitions ************************************************************************************/ -/* Configuration ********************************************************************/ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_DMA -#endif - /* DMA ******************************************************************************/ /* Flags used to characterize the desired DMA channel. The naming convention is that @@ -157,7 +151,7 @@ typedef void (*dma_callback_t)(DMA_HANDLE handle, void *arg, int result); /* The following is used for sampling DMA registers when CONFIG DEBUG_DMA is selected */ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO struct sam_dmaregs_s { /* DMAC Registers */ @@ -321,7 +315,7 @@ void sam_dmastop(DMA_HANDLE handle); * ************************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void sam_dmasample(DMA_HANDLE handle, struct sam_dmaregs_s *regs); #else # define sam_dmasample(handle,regs) @@ -335,7 +329,7 @@ void sam_dmasample(DMA_HANDLE handle, struct sam_dmaregs_s *regs); * ************************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void sam_dmadump(DMA_HANDLE handle, const struct sam_dmaregs_s *regs, const char *msg); #else diff --git a/arch/arm/src/samdl/sam_idle.c b/arch/arm/src/samdl/sam_idle.c index be58de12be6351cf9b21f970441e583dcb33a8f0..b791f991191802b2f40b21a88efa6d431d23476c 100644 --- a/arch/arm/src/samdl/sam_idle.c +++ b/arch/arm/src/samdl/sam_idle.c @@ -99,7 +99,7 @@ static void up_idlepm(void) /* Perform board-specific, state-dependent logic here */ - llvdbg("newstate= %d oldstate=%d\n", newstate, oldstate); + _info("newstate= %d oldstate=%d\n", newstate, oldstate); /* Then force the global state change */ diff --git a/arch/arm/src/samdl/sam_irq.c b/arch/arm/src/samdl/sam_irq.c index 3f12b9943ac58f79823e36f3b285fd8f5b8c9834..025c20081825d7b0736386a1c346ac9ed1cbf419 100644 --- a/arch/arm/src/samdl/sam_irq.c +++ b/arch/arm/src/samdl/sam_irq.c @@ -93,11 +93,11 @@ volatile uint32_t *g_current_regs[1]; * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES static int sam_nmi(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! NMI received\n"); + _err("PANIC!!! NMI received\n"); PANIC(); return 0; } @@ -105,7 +105,7 @@ static int sam_nmi(int irq, FAR void *context) static int sam_pendsv(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! PendSV received\n"); + _err("PANIC!!! PendSV received\n"); PANIC(); return 0; } @@ -113,7 +113,7 @@ static int sam_pendsv(int irq, FAR void *context) static int sam_reserved(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Reserved interrupt\n"); + _err("PANIC!!! Reserved interrupt\n"); PANIC(); return 0; } @@ -192,7 +192,7 @@ void up_irqinitialize(void) /* Attach all other processor exceptions (except reset and sys tick) */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES irq_attach(SAM_IRQ_NMI, sam_nmi); irq_attach(SAM_IRQ_PENDSV, sam_pendsv); irq_attach(SAM_IRQ_RESERVED, sam_reserved); @@ -299,34 +299,34 @@ void up_ack_irq(int irq) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_IRQ +#ifdef CONFIG_DEBUG_IRQ_INFO void sam_dumpnvic(const char *msg, int irq) { irqstate_t flags; flags = enter_critical_section(); - lldbg("NVIC (%s, irq=%d):\n", msg, irq); - lldbg(" ISER: %08x ICER: %08x\n", - getreg32(ARMV6M_NVIC_ISER), getreg32(ARMV6M_NVIC_ICER)); - lldbg(" ISPR: %08x ICPR: %08x\n", - getreg32(ARMV6M_NVIC_ISPR), getreg32(ARMV6M_NVIC_ICPR)); - lldbg(" IRQ PRIO: %08x %08x %08x %08x\n", - getreg32(ARMV6M_NVIC_IPR0), getreg32(ARMV6M_NVIC_IPR1), - getreg32(ARMV6M_NVIC_IPR2), getreg32(ARMV6M_NVIC_IPR3)); - lldbg(" %08x %08x %08x %08x\n", - getreg32(ARMV6M_NVIC_IPR4), getreg32(ARMV6M_NVIC_IPR5), - getreg32(ARMV6M_NVIC_IPR6), getreg32(ARMV6M_NVIC_IPR7)); - - lldbg("SYSCON:\n"); - lldbg(" CPUID: %08x\n", - getreg32(ARMV6M_SYSCON_CPUID)); - lldbg(" ICSR: %08x AIRCR: %08x\n", - getreg32(ARMV6M_SYSCON_ICSR), getreg32(ARMV6M_SYSCON_AIRCR)); - lldbg(" SCR: %08x CCR: %08x\n", - getreg32(ARMV6M_SYSCON_SCR), getreg32(ARMV6M_SYSCON_CCR)); - lldbg(" SHPR2: %08x SHPR3: %08x\n", - getreg32(ARMV6M_SYSCON_SHPR2), getreg32(ARMV6M_SYSCON_SHPR3)); + irqinfo("NVIC (%s, irq=%d):\n", msg, irq); + irqinfo(" ISER: %08x ICER: %08x\n", + getreg32(ARMV6M_NVIC_ISER), getreg32(ARMV6M_NVIC_ICER)); + irqinfo(" ISPR: %08x ICPR: %08x\n", + getreg32(ARMV6M_NVIC_ISPR), getreg32(ARMV6M_NVIC_ICPR)); + irqinfo(" IRQ PRIO: %08x %08x %08x %08x\n", + getreg32(ARMV6M_NVIC_IPR0), getreg32(ARMV6M_NVIC_IPR1), + getreg32(ARMV6M_NVIC_IPR2), getreg32(ARMV6M_NVIC_IPR3)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(ARMV6M_NVIC_IPR4), getreg32(ARMV6M_NVIC_IPR5), + getreg32(ARMV6M_NVIC_IPR6), getreg32(ARMV6M_NVIC_IPR7)); + + irqinfo("SYSCON:\n"); + irqinfo(" CPUID: %08x\n", + getreg32(ARMV6M_SYSCON_CPUID)); + irqinfo(" ICSR: %08x AIRCR: %08x\n", + getreg32(ARMV6M_SYSCON_ICSR), getreg32(ARMV6M_SYSCON_AIRCR)); + irqinfo(" SCR: %08x CCR: %08x\n", + getreg32(ARMV6M_SYSCON_SCR), getreg32(ARMV6M_SYSCON_CCR)); + irqinfo(" SHPR2: %08x SHPR3: %08x\n", + getreg32(ARMV6M_SYSCON_SHPR2), getreg32(ARMV6M_SYSCON_SHPR3)); leave_critical_section(flags); } diff --git a/arch/arm/src/samdl/sam_irq.h b/arch/arm/src/samdl/sam_irq.h index ddc5a7ada5204f9a5a3bd116b68f513aaf567f3a..ea26cbd159364058cf0582e2a614b279bb0e7b1f 100644 --- a/arch/arm/src/samdl/sam_irq.h +++ b/arch/arm/src/samdl/sam_irq.h @@ -43,23 +43,7 @@ #include /************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/************************************************************************************ - * Public Types - ************************************************************************************/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Inline Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions + * Public Function Prototypes ************************************************************************************/ /**************************************************************************** @@ -70,7 +54,7 @@ * ****************************************************************************/ -#ifdef CONFIG_DEBUG_IRQ +#ifdef CONFIG_DEBUG_IRQ_INFO void sam_dumpnvic(const char *msg, int irq); #else # define sam_dumpnvic(msg, irq) diff --git a/arch/arm/src/samdl/sam_port.c b/arch/arm/src/samdl/sam_port.c index 53c8664efdf97d96710f7312521b6c14b2cfb472..8ba1e1f88cb94bdb5fa1ff81b79dcf034c9abe91 100644 --- a/arch/arm/src/samdl/sam_port.c +++ b/arch/arm/src/samdl/sam_port.c @@ -62,7 +62,7 @@ * Private Data ****************************************************************************/ -#ifdef CONFIG_DEBUG_PORT +#ifdef CONFIG_DEBUG_GPIO_INFO static const char g_portchar[2] = { 'A', 'B' }; #endif @@ -521,7 +521,7 @@ bool sam_portread(port_pinset_t pinset) * ************************************************************************************/ -#ifdef CONFIG_DEBUG_PORT +#ifdef CONFIG_DEBUG_GPIO_INFO int sam_dumpport(uint32_t pinset, const char *msg) { irqstate_t flags; @@ -538,20 +538,20 @@ int sam_dumpport(uint32_t pinset, const char *msg) /* The following requires exclusive access to the PORT registers */ flags = enter_critical_section(); - lldbg("PORT%c pin: %d pinset: %08x base: %08x -- %s\n", - g_portchar[port], pin, pinset, base, msg); - lldbg(" DIR: %08x OUT: %08x IN: %08x\n", - getreg32(base + SAM_PORT_DIR_OFFSET), - getreg32(base + SAM_PORT_OUT_OFFSET), - getreg32(base + SAM_PORT_IN_OFFSET)); - lldbg(" CTRL: %08x WRCONFIG: %08x\n", - getreg32(base + SAM_PORT_CTRL_OFFSET), - getreg32(base + SAM_PORT_WRCONFIG_OFFSET)); - lldbg(" PMUX[%08x]: %02x PINCFG[%08x]: %02x\n", - base + SAM_PORT_PMUX_OFFSET(pin), - getreg8(base + SAM_PORT_PMUX_OFFSET(pin)), - base + SAM_PORT_PINCFG_OFFSET(pin), - getreg8(base + SAM_PORT_PINCFG_OFFSET(pin))); + gpioinfo("PORT%c pin: %d pinset: %08x base: %08x -- %s\n", + g_portchar[port], pin, pinset, base, msg); + gpioinfo(" DIR: %08x OUT: %08x IN: %08x\n", + getreg32(base + SAM_PORT_DIR_OFFSET), + getreg32(base + SAM_PORT_OUT_OFFSET), + getreg32(base + SAM_PORT_IN_OFFSET)); + gpioinfo(" CTRL: %08x WRCONFIG: %08x\n", + getreg32(base + SAM_PORT_CTRL_OFFSET), + getreg32(base + SAM_PORT_WRCONFIG_OFFSET)); + gpioinfo(" PMUX[%08x]: %02x PINCFG[%08x]: %02x\n", + base + SAM_PORT_PMUX_OFFSET(pin), + getreg8(base + SAM_PORT_PMUX_OFFSET(pin)), + base + SAM_PORT_PINCFG_OFFSET(pin), + getreg8(base + SAM_PORT_PINCFG_OFFSET(pin))); leave_critical_section(flags); return OK; diff --git a/arch/arm/src/samdl/sam_port.h b/arch/arm/src/samdl/sam_port.h index 26ba8bcb5d3562617a54ab2552d2cc20cba4a2f1..3e9704cd141fe23b4c71e1c76e90b1a336b9c78b 100644 --- a/arch/arm/src/samdl/sam_port.h +++ b/arch/arm/src/samdl/sam_port.h @@ -379,7 +379,7 @@ bool sam_portread(port_pinset_t pinset); * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES int sam_dumpport(port_pinset_t pinset, const char *msg); #else # define sam_dumpport(p,m) diff --git a/arch/arm/src/samdl/sam_sercom.c b/arch/arm/src/samdl/sam_sercom.c index ae50ca39c1e3a779a2d481782f713a60517951ea..779db03738fff4175e4f97ba20d3277d9a41859c 100644 --- a/arch/arm/src/samdl/sam_sercom.c +++ b/arch/arm/src/samdl/sam_sercom.c @@ -68,14 +68,6 @@ # define HAVE_SERCOM0_4 #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -162,9 +154,9 @@ void sercom_slowclk_configure(int sercom, int gclkgen) #ifdef CONFIG_SAMDL_SERCOM5 static bool configured5 = false; #endif -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_ASSERTIONS #ifdef HAVE_SERCOM0_4 - static uint8_t slowgen = 0xff; + static uint8_t slowgen04 = 0xff; #endif #ifdef CONFIG_SAMDL_SERCOM5 static uint8_t slowgen5 = 0xff; @@ -205,19 +197,19 @@ void sercom_slowclk_configure(int sercom, int gclkgen) */ configured = true; -#ifdef CONFIG_DEBUG - slowgen = (uint8_t)gclkgen; +#ifdef CONFIG_DEBUG_ASSERTIONS + slowgen04 = (uint8_t)gclkgen; #endif } -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_ASSERTIONS /* Already configured. This is okay provided that the same GCLK * generator is being used. Otherwise, there is a problem. */ else { - DEBUGASSERT((int)slowgen == gclkgen); + DEBUGASSERT((int)slowgen04 == gclkgen); } #endif break; @@ -236,12 +228,12 @@ void sercom_slowclk_configure(int sercom, int gclkgen) */ configured5 = true; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_ASSERTIONS slowgen5 = (uint8_t)gclkgen; #endif } -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_ASSERTIONS /* Already configured. This is okay provided that the same GCLK * generator is being used. Otherwise, there is a problem. */ diff --git a/arch/arm/src/samdl/sam_spi.c b/arch/arm/src/samdl/sam_spi.c index 2a7df796bac1498d4ada4b8e47f25eb67f556605..ac7ea3d2cc2cf1e30d219a5490e4ed2eaea3e774 100644 --- a/arch/arm/src/samdl/sam_spi.c +++ b/arch/arm/src/samdl/sam_spi.c @@ -74,34 +74,13 @@ #ifdef SAMDL_HAVE_SPI /**************************************************************************** - * Pre-processor Definitions + * Pre-process Definitions ****************************************************************************/ -/* Clocking *****************************************************************/ - -/* Debug *******************************************************************/ -/* Check if SPI debug is enabled (non-standard.. no support in - * include/debug.h - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_SPI +#ifndef CONFIG_DEBUG_SPI_INFO # undef CONFIG_SAMDL_SPI_REGDEBUG #endif -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - /**************************************************************************** * Private Types ****************************************************************************/ @@ -175,7 +154,7 @@ static uint32_t spi_getreg32(struct sam_spidev_s *priv, static void spi_putreg32(struct sam_spidev_s *priv, uint32_t regval, unsigned int offset); -#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_SPI_INFO static void spi_dumpregs(struct sam_spidev_s *priv, const char *msg); #else # define spi_dumpregs(priv,msg) @@ -569,7 +548,7 @@ static bool spi_checkreg(struct sam_spidev_s *priv, bool wr, uint32_t regval, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", priv->ntimes); + spiinfo("...[Repeats %d times]...\n", priv->ntimes); } /* Save information about the new access */ @@ -602,7 +581,7 @@ static uint8_t spi_getreg8(struct sam_spidev_s *priv, unsigned int offset) #ifdef CONFIG_SAMDL_SPI_REGDEBUG if (spi_checkreg(priv, false, (uint32_t)regval, regaddr)) { - lldbg("%08x->%02x\n", regaddr, regval); + spiinfo("%08x->%02x\n", regaddr, regval); } #endif @@ -625,7 +604,7 @@ static void spi_putreg8(struct sam_spidev_s *priv, uint8_t regval, #ifdef CONFIG_SAMDL_SPI_REGDEBUG if (spi_checkreg(priv, true, (uint32_t)regval, regaddr)) { - lldbg("%08x<-%02x\n", regaddr, regval); + spiinfo("%08x<-%02x\n", regaddr, regval); } #endif @@ -648,7 +627,7 @@ static uint16_t spi_getreg16(struct sam_spidev_s *priv, unsigned int offset) #ifdef CONFIG_SAMDL_SPI_REGDEBUG if (spi_checkreg(priv, false, (uint32_t)regval, regaddr)) { - lldbg("%08x->%04x\n", regaddr, regval); + spiinfo("%08x->%04x\n", regaddr, regval); } #endif @@ -671,7 +650,7 @@ static void spi_putreg16(struct sam_spidev_s *priv, uint16_t regval, #ifdef CONFIG_SAMDL_SPI_REGDEBUG if (spi_checkreg(priv, true, (uint32_t)regval, regaddr)) { - lldbg("%08x<-%04x\n", regaddr, regval); + spiinfo("%08x<-%04x\n", regaddr, regval); } #endif @@ -694,7 +673,7 @@ static uint32_t spi_getreg32(struct sam_spidev_s *priv, unsigned int offset) #ifdef CONFIG_SAMDL_SPI_REGDEBUG if (spi_checkreg(priv, false, regval, regaddr)) { - lldbg("%08x->%08x\n", regaddr, regval); + spiinfo("%08x->%08x\n", regaddr, regval); } #endif @@ -717,7 +696,7 @@ static void spi_putreg32(struct sam_spidev_s *priv, uint32_t regval, #ifdef CONFIG_SAMDL_SPI_REGDEBUG if (spi_checkreg(priv, true, regval, regaddr)) { - lldbg("%08x<-%08x\n", regaddr, regval); + spiinfo("%08x<-%08x\n", regaddr, regval); } #endif @@ -739,19 +718,19 @@ static void spi_putreg32(struct sam_spidev_s *priv, uint32_t regval, * ****************************************************************************/ -#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_SPI_INFO static void spi_dumpregs(struct sam_spidev_s *priv, const char *msg) { - spivdbg("%s:\n", msg); - spivdbg(" CTRLA:%08x CTRLB:%08x DBGCTRL:%02x\n", + spiinfo("%s:\n", msg); + spiinfo(" CTRLA:%08x CTRLB:%08x DBGCTRL:%02x\n", getreg32(priv->base + SAM_SPI_CTRLA_OFFSET), getreg32(priv->base + SAM_SPI_CTRLB_OFFSET), getreg8(priv->base + SAM_SPI_DBGCTRL_OFFSET)); - spivdbg(" BAUD:%02x INTEN:%02x INTFLAG:%02x\n", + spiinfo(" BAUD:%02x INTEN:%02x INTFLAG:%02x\n", getreg8(priv->base + SAM_SPI_BAUD_OFFSET), getreg8(priv->base + SAM_SPI_INTENCLR_OFFSET), getreg8(priv->base + SAM_SPI_INTFLAG_OFFSET)); - spivdbg(" STATUS:%04x ADDR:%08x\n", + spiinfo(" STATUS:%04x ADDR:%08x\n", getreg16(priv->base + SAM_SPI_STATUS_OFFSET), getreg32(priv->base + SAM_SPI_ADDR_OFFSET)); } @@ -890,7 +869,7 @@ static int spi_lock(struct spi_dev_s *dev, bool lock) { struct sam_spidev_s *priv = (struct sam_spidev_s *)dev; - spivdbg("lock=%d\n", lock); + spiinfo("lock=%d\n", lock); if (lock) { /* Take the semaphore (perhaps waiting) */ @@ -935,7 +914,7 @@ static uint32_t spi_setfrequency(struct spi_dev_s *dev, uint32_t frequency) uint32_t baud; uint32_t ctrla; - spivdbg("sercom=%d frequency=%d\n", priv->sercom, frequency); + spiinfo("sercom=%d frequency=%d\n", priv->sercom, frequency); /* Check if the configured BAUD is within the valid range */ @@ -944,7 +923,7 @@ static uint32_t spi_setfrequency(struct spi_dev_s *dev, uint32_t frequency) { /* Set the frequency to the maximum */ - spidbg("ERROR: Cannot realize frequency: %ld\n", (long)frequency); + spierr("ERROR: Cannot realize frequency: %ld\n", (long)frequency); frequency = maxfreq; } @@ -975,7 +954,7 @@ static uint32_t spi_setfrequency(struct spi_dev_s *dev, uint32_t frequency) if (baud > 255) { - spidbg("ERROR: BAUD is out of range: %ld\n", (long)baud); + spierr("ERROR: BAUD is out of range: %ld\n", (long)baud); baud = 255; } @@ -1016,7 +995,7 @@ static uint32_t spi_setfrequency(struct spi_dev_s *dev, uint32_t frequency) priv->frequency = frequency; priv->actual = actual; - spivdbg("Frequency %d->%d\n", frequency, actual); + spiinfo("Frequency %d->%d\n", frequency, actual); return actual; } @@ -1040,7 +1019,7 @@ static void spi_setmode(struct spi_dev_s *dev, enum spi_mode_e mode) struct sam_spidev_s *priv = (struct sam_spidev_s *)dev; uint32_t regval; - spivdbg("sercom=%d mode=%d\n", priv->sercom, mode); + spiinfo("sercom=%d mode=%d\n", priv->sercom, mode); /* Has the mode changed? */ @@ -1101,7 +1080,7 @@ static void spi_setbits(struct spi_dev_s *dev, int nbits) struct sam_spidev_s *priv = (struct sam_spidev_s *)dev; uint32_t regval; - spivdbg("sercom=%d nbits=%d\n", priv->sercom, nbits); + spiinfo("sercom=%d nbits=%d\n", priv->sercom, nbits); DEBUGASSERT(priv && nbits > 7 && nbits < 10); /* Has the number of bits changed? */ @@ -1156,7 +1135,7 @@ static uint16_t spi_send(struct spi_dev_s *dev, uint16_t wd) rxbyte = (uint8_t)0; spi_exchange(dev, &txbyte, &rxbyte, 1); - spivdbg("Sent %02x received %02x\n", txbyte, rxbyte); + spiinfo("Sent %02x received %02x\n", txbyte, rxbyte); return (uint16_t)rxbyte; } @@ -1194,7 +1173,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, uint8_t *prx8; uint16_t data; - spivdbg("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); + spiinfo("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); /* Set up data receive and transmit pointers */ @@ -1281,7 +1260,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, data = spi_getreg16(priv, SAM_SPI_STATUS_OFFSET); if ((data & SPI_STATUS_BUFOVF) != 0) { - spidbg("ERROR: Buffer overflow!\n"); + spierr("ERROR: Buffer overflow!\n"); /* Clear the buffer overflow flag */ @@ -1438,7 +1417,7 @@ struct spi_dev_s *sam_spibus_initialize(int port) /* Get the port state structure */ - spivdbg("port: %d \n", port); + spiinfo("port: %d \n", port); #ifdef SAMDL_HAVE_SPI0 if (port == 0) @@ -1488,7 +1467,7 @@ struct spi_dev_s *sam_spibus_initialize(int port) else #endif { - spidbg("ERROR: Unsupported port: %d\n", port); + spierr("ERROR: Unsupported port: %d\n", port); return NULL; } @@ -1570,7 +1549,7 @@ struct spi_dev_s *sam_spibus_initialize(int port) ret = irq_attach(priv->irq, priv->handler); if (ret < 0) { - spidbg("ERROR: Failed to attach interrupt: %d\n", irq); + spierr("ERROR: Failed to attach interrupt: %d\n", irq); return NULL; } diff --git a/arch/arm/src/samdl/sam_start.c b/arch/arm/src/samdl/sam_start.c index e31a1b274df320404f28896d39d68c8dc8ddd299..f46e114fd66e41b78858a7151ca856d5ae723a27 100644 --- a/arch/arm/src/samdl/sam_start.c +++ b/arch/arm/src/samdl/sam_start.c @@ -91,7 +91,7 @@ const uint32_t g_idle_topstack = IDLE_STACK; * ****************************************************************************/ -#if defined(CONFIG_DEBUG) && defined(HAVE_SERIAL_CONSOLE) +#if defined(CONFIG_DEBUG_FEATURES) && defined(HAVE_SERIAL_CONSOLE) # define showprogress(c) sam_lowputc((uint32_t)c) #else # define showprogress(c) diff --git a/arch/arm/src/samv7/Kconfig b/arch/arm/src/samv7/Kconfig index 7a7d75c840844a32a17dbd895af281686e6834ab..9507e0c59c842e4897254f332795f2124e8edb14 100644 --- a/arch/arm/src/samv7/Kconfig +++ b/arch/arm/src/samv7/Kconfig @@ -687,8 +687,8 @@ config SAMV7_WDT_INTERRUPT config SAMV7_WDT_DEBUGHALT bool "Halt on DEBUG" - default y if DEBUG - default n if !DEBUG + default y if DEBUG_FEATURES + default n if !DEBUG_FEATURES ---help--- Halt the watchdog timer in the debug state @@ -701,7 +701,7 @@ config SAMV7_WDT_IDLEHALT config SAMV7_WDT_REGDEBUG bool "Register level debug" default n - depends on DEBUG + depends on DEBUG_WATCHDOG_INFO ---help--- Enable low-level register debug output @@ -721,8 +721,8 @@ config SAMV7_RSWDT_INTERRUPT config SAMV7_RSWDT_DEBUGHALT bool "Halt on DEBUG" - default y if DEBUG - default n if !DEBUG + default y if DEBUG_FEATURES + default n if !DEBUG_FEATURES ---help--- Halt the watchdog timer in the debug state @@ -735,7 +735,7 @@ config SAMV7_RSWDT_IDLEHALT config SAMV7_RSWDT_REGDEBUG bool "Register level debug" default n - depends on DEBUG + depends on DEBUG_WATCHDOG_INFO ---help--- Enable low-level register debug output @@ -835,6 +835,23 @@ config SAMV7_SPI_CS_DECODING ---help--- Use Peripheral Chip Select Decoding on SPI Master +config SAMV7_SPI_VARSELECT + bool "SPI Variable Peripheral Select Mode" + default n + ---help--- + When enabled, the spi device is working in the "Variable Peripheral + Select Mode" (VARMODE) instead of the "Fixed Peripheral Select Mode" + (FIXEDMODE). + + In FIXEDMODE the ChipSelect is set (once) with a call to spi_select and + stays the same value all the time. In addition an eventually signaled + LASTXFER has to be written to the global control register (SPI_CR). + Within the VARMODE, the ChipSelect can be changed with each datablock + transferred via spi_exchange because it is encoded by the driver + within the data. + + The same behavior applies for the LASTXFER bit. + config SAMV7_SPI_DMA bool "SPI DMA" default n @@ -853,7 +870,7 @@ config SAMV7_SPI_DMATHRESHOLD config SAMV7_SPI_DMADEBUG bool "SPI DMA transfer debug" - depends on SAMV7_SPI_DMA && DEBUG && DEBUG_DMA + depends on SAMV7_SPI_DMA && DEBUG_FEATURES && DEBUG_DMA default n ---help--- Enable special debug instrumentation analyze SPI DMA data transfers. @@ -877,11 +894,11 @@ endif # SAMV7_SPI_SLAVE config SAMV7_SPI_REGDEBUG bool "SPI Register level debug" - depends on DEBUG + depends on DEBUG_SPI_INFO default n ---help--- Output detailed register-level SPI device debug information. - Requires also DEBUG. + Requires also CONFIG_DEBUG_SPI_INFO. endmenu # SPI device driver options @@ -914,7 +931,7 @@ config SAMV7_QSPI_DMATHRESHOLD config SAMV7_QSPI_DMADEBUG bool "QSPI DMA transfer debug" - depends on SAMV7_QSPI_DMA && DEBUG && DEBUG_DMA + depends on SAMV7_QSPI_DMA && DEBUG_FEATURES && DEBUG_DMA default n ---help--- Enable special debug instrumentation analyze QSPI DMA data transfers. @@ -924,11 +941,11 @@ config SAMV7_QSPI_DMADEBUG config SAMV7_QSPI_REGDEBUG bool "QSPI Register level debug" - depends on DEBUG + depends on DEBUG_SPI_INFO default n ---help--- Output detailed register-level QSPI device debug information. - Requires also DEBUG. + Requires also CONFIG_DEBUG_SPI_INFO. endmenu # QSPI device driver options @@ -940,23 +957,92 @@ config SAMV7_TWIHS0_FREQUENCY default 100000 depends on SAMV7_TWIHS0 +config SAMV7_TWIHS0_GLITCH_FILTER + int "TWIHS0 Glitch Filter Time" + default 1 + range 0 7 + depends on SAMV7_TWIHS0 + ---help--- + Apply filtering on TWIHS Inputs. Given number is the maximum pulse width + (defined in peripheral CLKs) of spikes to be suppressed by the input filter. + Setting this value to zero will disable glitch filtering. + +config SAMV7_TWIHS0_SINGLE_MASTER + bool "TWIHS0 Single Master Mode" + default y + depends on SAMV7_TWIHS0 + depends on I2C_RESET + ---help--- + Enables a mode, where errors on the I2C-Bus (e.g. by EMC or + stuck slaves) are automatically handled by the driver. + In an error-case the I2C-Bus is reset so further communication + on the bus can take place. + This option is default on because the TWI-Driver can't handle + Multi-Master I2C anyways. + config SAMV7_TWIHS1_FREQUENCY int "TWIHS1 Frequency" default 100000 depends on SAMV7_TWIHS1 +config SAMV7_TWIHS1_GLITCH_FILTER + int "TWIHS1 Glitch Filter Time" + default 1 + range 0 7 + depends on SAMV7_TWIHS1 + ---help--- + Apply filtering on TWIHS Inputs. Given number is the maximum pulse width + (defined in peripheral CLKs) of spikes to be suppressed by the input filter. + Setting this value to zero will disable glitch filtering. + +config SAMV7_TWIHS1_SINGLE_MASTER + bool "TWIHS1 Single Master Mode" + default y + depends on SAMV7_TWIHS1 + depends on I2C_RESET + ---help--- + Enables a mode, where errors on the I2C-Bus (e.g. by EMC or + stuck slaves) are automatically handled by the driver. + In an error-case the I2C-Bus is reset so further communication + on the bus can take place. + This option is default on because the TWI-Driver can't handle + Multi-Master I2C anyways. + config SAMV7_TWIHS2_FREQUENCY int "TWIHS2 Frequency" default 100000 depends on SAMV7_TWIHS2 +config SAMV7_TWIHS2_GLITCH_FILTER + int "TWIHS2 Glitch Filter Time" + default 1 + range 0 7 + depends on SAMV7_TWIHS2 + ---help--- + Apply filtering on TWIHS Inputs. Given number is the maximum pulse width + (defined in peripheral CLKs) of spikes to be suppressed by the input filter. + Setting this value to zero will disable glitch filtering. + +config SAMV7_TWIHS2_SINGLE_MASTER + bool "TWIHS2 Single Master Mode" + default y + depends on SAMV7_TWIHS2 + depends on I2C_RESET + ---help--- + Enables a mode, where errors on the I2C-Bus (e.g. by EMC or + stuck slaves) are automatically handled by the driver. + In an error-case the I2C-Bus is reset so further communication + on the bus can take place. + This option is default on because the TWI-Driver can't handle + Multi-Master I2C anyways. + config SAMV7_TWIHS_REGDEBUG bool "TWIHS register level debug" - depends on DEBUG + depends on DEBUG_I2C_INFO default n ---help--- Output detailed register-level TWIHS device debug information. - Very invasive! Requires also DEBUG. + Very invasive! Requires also CONFIG_DEBUG_I2C_INFO. endmenu # TWIHS device driver options @@ -1318,7 +1404,7 @@ endif # SAMV7_SSC1 config SAMV7_SSC_DMADEBUG bool "SSC DMA transfer debug" - depends on DEBUG && DEBUG_DMA + depends on DEBUG_FEATURES && DEBUG_DMA default n ---help--- Enable special debug instrumentation analyze SSC DMA data transfers. @@ -1328,11 +1414,11 @@ config SAMV7_SSC_DMADEBUG config SAMV7_SSC_REGDEBUG bool "SSC Register level debug" - depends on DEBUG + depends on DEBUG_I2S_INFO default n ---help--- Output detailed register-level SSC device debug information. - Very invasive! Requires also DEBUG. + Very invasive! Requires also CONFIG_DEBUG_I2S_INFO. config SAMV7_SSC_QDEBUG bool "SSC Queue debug" @@ -1551,23 +1637,23 @@ endif config SAMV7_TC_DEBUG bool "TC debug" - depends on DEBUG + depends on DEBUG_FEATURES default n ---help--- Output high level Timer/Counter device debug information. - Requires also DEBUG. If this option AND DEBUG_VERBOSE are + Requires also CONFIG_DEBUG_FEATURES. If this option AND CONFIG_DEBUG_INFO are enabled, then the system will be overwhelmed the timer debug - output. If DEBUG_VERBOSE is disabled, then debug output will + output. If CONFIG_DEBUG_INFO is disabled, then debug output will only indicate if/when timer-related errors occur. This latter mode is completely usable. config SAMV7_TC_REGDEBUG bool "TC register level debug" - depends on DEBUG + depends on DEBUG_TIMER_INFO default n ---help--- Output detailed register-level Timer/Counter device debug - information. Very invasive! Requires also DEBUG. + information. Very invasive! Requires also CONFIG_DEBUG_TIMER_INFO. endmenu # Timer/counter Configuration endif # SAMV7_HAVE_TC @@ -1617,7 +1703,7 @@ config SAMV7_HSMCI_UNALIGNED config SAMV7_HSMCI_XFRDEBUG bool "HSMCI transfer debug" - depends on DEBUG_FS && DEBUG_VERBOSE + depends on DEBUG_FS_INFO default n ---help--- Enable special debug instrumentation analyze HSMCI data transfers. @@ -1625,11 +1711,11 @@ config SAMV7_HSMCI_XFRDEBUG registers at key points in the data transfer and then dumps all of the registers at the end of the transfer. If DEBUG_DMA is also enabled, then DMA register will be collected as well. Requires also - DEBUG_FS and DEBUG_VERBOSE. + DEBUG_FS and CONFIG_DEBUG_INFO. config SAMV7_HSMCI_CMDDEBUG bool "HSMCI command debug" - depends on DEBUG_FS && DEBUG_VERBOSE + depends on DEBUG_FS_INFO default n ---help--- Enable special debug instrumentation analyze HSMCI commands. This @@ -1637,15 +1723,15 @@ config SAMV7_HSMCI_CMDDEBUG key points in the data transfer and then dumps all of the registers at the end of the transfer. If DEBUG_DMA is also enabled, then DMA register will be collected as well. Requires also DEBUG_FS and - DEBUG_VERBOSE. + CONFIG_DEBUG_INFO. config SAMV7_HSMCI_REGDEBUG bool "HSMCI Register level debug" - depends on DEBUG + depends on DEBUG_MEMCARD_INFO default n ---help--- Output detailed register-level HSCMI device debug information. - Very invasive! Requires also DEBUG. + Very invasive! Requires also DEBUG_MEMCARD_INFO. endmenu # HSMCI device driver options @@ -1854,7 +1940,7 @@ config SAMV7_EMAC_NBC config SAMV7_EMAC_DEBUG bool "Force EMAC0/1 DEBUG" default n - depends on DEBUG && !DEBUG_NET + depends on DEBUG_FEATURES && !DEBUG_NET ---help--- This option will force debug output from EMAC driver even without network debug output enabled. This is not normally something @@ -1865,9 +1951,9 @@ config SAMV7_EMAC_DEBUG config SAMV7_EMAC_REGDEBUG bool "Register-Level Debug" default n - depends on DEBUG + depends on DEBUG_NET_INFO ---help--- - Enable very low-level register access debug. Depends on DEBUG. + Enable very low-level register access debug. Depends on CONFIG_DEBUG_NET_INFO. endmenu # EMAC0 device driver options @@ -1923,7 +2009,7 @@ config SAMV7_USBHS_EP7DMA_WAR config SAMV7_USBHS_REGDEBUG bool "Enable low-level USBHS register debug" default n - depends on DEBUG + depends on DEBUG_USB_INFO endmenu # USB High Speed Device Controller driver (DCD) options @@ -2598,11 +2684,11 @@ endmenu # MCAN1 device driver options config SAMV7_MCAN_REGDEBUG bool "CAN Register level debug" - depends on DEBUG + depends on DEBUG_CAN_INFO default n ---help--- Output detailed register-level CAN device debug information. - Requires also DEBUG. + Requires also CONFIG_DEBUG_CAN_INFO. endmenu # CAN device driver options endif # SAMV7_MCAN diff --git a/arch/arm/src/samv7/sam_emac.c b/arch/arm/src/samv7/sam_emac.c index 39e14457dd4c56da3f2a6519b33ce04bf83e94dc..7fcedd857167a2495ada2fe44664475403cbb9fb 100644 --- a/arch/arm/src/samv7/sam_emac.c +++ b/arch/arm/src/samv7/sam_emac.c @@ -48,7 +48,7 @@ #include -#if defined(CONFIG_DEBUG) && defined(CONFIG_SAMV7_EMAC_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_SAMV7_EMAC_DEBUG) /* Force debug output (from this file only) */ # undef CONFIG_DEBUG_NET @@ -307,16 +307,16 @@ * enabled. */ -#ifndef CONFIG_DEBUG -# undef CONFIG_SAMV7_EMAC_REGDEBUG -#endif - #ifdef CONFIG_NET_DUMPPACKET # define sam_dumppacket(m,a,n) lib_dumpbuffer(m,a,n) #else # define sam_dumppacket(m,a,n) #endif +#ifndef CONFIG_NET_INFO +# undef CONFIG_SAMV7_EMAC_REGDEBUG +#endif + /* EMAC buffer sizes, number of buffers, and number of descriptors *********** * * REVISIT: The CONFIG_NET_MULTIBUFFER might be useful. It might be possible @@ -560,7 +560,7 @@ struct sam_emac_s ****************************************************************************/ /* Register operations ******************************************************/ -#if defined(CONFIG_SAMV7_EMAC_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_SAMV7_EMAC_REGDEBUG static bool sam_checkreg(struct sam_emac_s *priv, bool wr, uint32_t regval, uintptr_t address); #endif @@ -639,7 +639,7 @@ static int sam_ioctl(struct net_driver_s *dev, int cmd, long arg); /* PHY Initialization */ -#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_INFO) static void sam_phydump(struct sam_emac_s *priv); #else # define sam_phydump(priv) @@ -966,7 +966,7 @@ static bool sam_checkreg(struct sam_emac_s *priv, bool wr, uint32_t regval, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", priv->ntimes); + ninfo("...[Repeats %d times]...\n", priv->ntimes); } /* Save information about the new access */ @@ -999,7 +999,7 @@ static uint32_t sam_getreg(struct sam_emac_s *priv, uint16_t offset) #ifdef CONFIG_SAMV7_EMAC_REGDEBUG if (sam_checkreg(priv, false, regval, regaddr)) { - lldbg("%08x->%08x\n", regaddr, regval); + ninfo("%08x->%08x\n", regaddr, regval); } #endif @@ -1023,7 +1023,7 @@ static void sam_putreg(struct sam_emac_s *priv, uint16_t offset, #ifdef CONFIG_SAMV7_EMAC_REGDEBUG if (sam_checkreg(priv, true, regval, regaddr)) { - lldbg("%08x<-%08x\n", regaddr, regval); + ninfo("%08x<-%08x\n", regaddr, regval); } #endif @@ -1147,7 +1147,7 @@ static int sam_buffer_allocate(struct sam_emac_s *priv) priv->xfrq[0].txdesc = (struct emac_txdesc_s *)kmm_memalign(EMAC_ALIGN, allocsize); if (!priv->xfrq[0].txdesc) { - nlldbg("ERROR: Failed to allocate TX descriptors\n"); + nerr("ERROR: Failed to allocate TX descriptors\n"); return -ENOMEM; } @@ -1158,7 +1158,7 @@ static int sam_buffer_allocate(struct sam_emac_s *priv) priv->xfrq[0].rxdesc = (struct emac_rxdesc_s *)kmm_memalign(EMAC_ALIGN, allocsize); if (!priv->xfrq[0].rxdesc) { - nlldbg("ERROR: Failed to allocate RX descriptors\n"); + nerr("ERROR: Failed to allocate RX descriptors\n"); sam_buffer_free(priv); return -ENOMEM; } @@ -1170,7 +1170,7 @@ static int sam_buffer_allocate(struct sam_emac_s *priv) priv->xfrq[0].txbuffer = (uint8_t *)kmm_memalign(EMAC_ALIGN, allocsize); if (!priv->xfrq[0].txbuffer) { - nlldbg("ERROR: Failed to allocate TX buffer\n"); + nerr("ERROR: Failed to allocate TX buffer\n"); sam_buffer_free(priv); return -ENOMEM; } @@ -1181,7 +1181,7 @@ static int sam_buffer_allocate(struct sam_emac_s *priv) priv->xfrq[0].rxbuffer = (uint8_t *)kmm_memalign(EMAC_ALIGN, allocsize); if (!priv->xfrq[0].rxbuffer) { - nlldbg("ERROR: Failed to allocate RX buffer\n"); + nerr("ERROR: Failed to allocate RX buffer\n"); sam_buffer_free(priv); return -ENOMEM; } @@ -1194,7 +1194,7 @@ static int sam_buffer_allocate(struct sam_emac_s *priv) priv->xfrq[1].txdesc = (struct emac_txdesc_s *)kmm_memalign(EMAC_ALIGN, allocsize); if (!priv->xfrq[1].txdesc) { - nlldbg("ERROR: Failed to allocate TX descriptors\n"); + nerr("ERROR: Failed to allocate TX descriptors\n"); return -ENOMEM; } @@ -1205,7 +1205,7 @@ static int sam_buffer_allocate(struct sam_emac_s *priv) priv->xfrq[1].rxdesc = (struct emac_rxdesc_s *)kmm_memalign(EMAC_ALIGN, allocsize); if (!priv->xfrq[1].rxdesc) { - nlldbg("ERROR: Failed to allocate RX descriptors\n"); + nerr("ERROR: Failed to allocate RX descriptors\n"); sam_buffer_free(priv); return -ENOMEM; } @@ -1217,7 +1217,7 @@ static int sam_buffer_allocate(struct sam_emac_s *priv) priv->xfrq[1].txbuffer = (uint8_t *)kmm_memalign(EMAC_ALIGN, allocsize); if (!priv->xfrq[1].txbuffer) { - nlldbg("ERROR: Failed to allocate TX buffer\n"); + nerr("ERROR: Failed to allocate TX buffer\n"); sam_buffer_free(priv); return -ENOMEM; } @@ -1228,7 +1228,7 @@ static int sam_buffer_allocate(struct sam_emac_s *priv) priv->xfrq[1].rxbuffer = (uint8_t *)kmm_memalign(EMAC_ALIGN, allocsize); if (!priv->xfrq[1].rxbuffer) { - nlldbg("ERROR: Failed to allocate RX buffer\n"); + nerr("ERROR: Failed to allocate RX buffer\n"); sam_buffer_free(priv); return -ENOMEM; } @@ -1369,7 +1369,7 @@ static int sam_transmit(struct sam_emac_s *priv, int qid) if (dev->d_len > EMAC_TX_UNITSIZE) { - nlldbg("ERROR: Packet too big: %d\n", dev->d_len); + nerr("ERROR: Packet too big: %d\n", dev->d_len); return -EINVAL; } @@ -1379,14 +1379,14 @@ static int sam_transmit(struct sam_emac_s *priv, int qid) txhead = xfrq->txhead; txdesc = &xfrq->txdesc[txhead]; - nllvdbg("d_len: %d txhead[%d]: %d\n", dev->d_len, qid, xfrq->txhead); + ninfo("d_len: %d txhead[%d]: %d\n", dev->d_len, qid, xfrq->txhead); sam_dumppacket("Transmit packet", dev->d_buf, dev->d_len); /* If no free TX descriptor, buffer can't be sent */ if (sam_txfree(priv, qid) < 1) { - nlldbg("ERROR: No free TX descriptors\n"); + nerr("ERROR: No free TX descriptors\n"); return -EBUSY; } @@ -1460,7 +1460,7 @@ static int sam_transmit(struct sam_emac_s *priv, int qid) if (sam_txfree(priv, qid) < 1) { - nllvdbg("Disabling RX interrupts\n"); + ninfo("Disabling RX interrupts\n"); sam_putreg(priv, SAM_EMAC_IDR_OFFSET, EMAC_INT_RCOMP); } @@ -1646,7 +1646,7 @@ static int sam_recvframe(struct sam_emac_s *priv, int qid) arch_invalidate_dcache((uintptr_t)rxdesc, (uintptr_t)rxdesc + sizeof(struct emac_rxdesc_s)); - nllvdbg("Entry rxndx[%d]: %d\n", qid, rxndx); + ninfo("Entry rxndx[%d]: %d\n", qid, rxndx); while ((rxdesc->addr & EMACRXD_ADDR_OWNER) != 0) { @@ -1709,7 +1709,7 @@ static int sam_recvframe(struct sam_emac_s *priv, int qid) { if (rxndx == xfrq->rxndx) { - nllvdbg("ERROR: No EOF (Invalid or buffers too small)\n"); + nerr("ERROR: No EOF (Invalid or buffers too small)\n"); do { /* Give ownership back to the EMAC */ @@ -1767,7 +1767,7 @@ static int sam_recvframe(struct sam_emac_s *priv, int qid) /* Frame size from the EMAC */ dev->d_len = (rxdesc->status & EMACRXD_STA_FRLEN_MASK); - nllvdbg("packet %d-%d (%d)\n", xfrq->rxndx, rxndx, dev->d_len); + ninfo("packet %d-%d (%d)\n", xfrq->rxndx, rxndx, dev->d_len); /* All data have been copied in the application frame buffer, * release the RX descriptor(s). Loop until all descriptors @@ -1801,12 +1801,12 @@ static int sam_recvframe(struct sam_emac_s *priv, int qid) * all of the data. */ - nllvdbg("rxndx: %d d_len: %d\n", - xfrq->rxndx, dev->d_len); + ninfo("rxndx: %d d_len: %d\n", + xfrq->rxndx, dev->d_len); if (pktlen < dev->d_len) { - nlldbg("ERROR: Buffer size %d; frame size %d\n", - dev->d_len, pktlen); + nerr("ERROR: Buffer size %d; frame size %d\n", + dev->d_len, pktlen); NETDEV_RXERRORS(&priv->dev); return -E2BIG; } @@ -1854,7 +1854,7 @@ static int sam_recvframe(struct sam_emac_s *priv, int qid) /* No packet was found */ xfrq->rxndx = rxndx; - nllvdbg("Exit rxndx[%d]: %d\n", qid, xfrq->rxndx); + ninfo("Exit rxndx[%d]: %d\n", qid, xfrq->rxndx); return -EAGAIN; } @@ -1896,7 +1896,7 @@ static void sam_receive(struct sam_emac_s *priv, int qid) if (dev->d_len > CONFIG_NET_ETH_MTU) { - nlldbg("DROPPED: Too big: %d\n", dev->d_len); + nwarn("WARNING: Dropped, Too big: %d\n", dev->d_len); NETDEV_RXERRORS(&priv->dev); continue; } @@ -1912,7 +1912,7 @@ static void sam_receive(struct sam_emac_s *priv, int qid) #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); NETDEV_RXIPV4(&priv->dev); /* Handle ARP on input then give the IPv4 packet to the network @@ -1953,7 +1953,7 @@ static void sam_receive(struct sam_emac_s *priv, int qid) #ifdef CONFIG_NET_IPv6 if (BUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); NETDEV_RXIPV6(&priv->dev); /* Give the IPv6 packet to the network layer */ @@ -1991,7 +1991,7 @@ static void sam_receive(struct sam_emac_s *priv, int qid) #ifdef CONFIG_NET_ARP if (BUF->type == htons(ETHTYPE_ARP)) { - nllvdbg("ARP frame\n"); + ninfo("ARP frame\n"); NETDEV_RXARP(&priv->dev); /* Handle ARP packet */ @@ -2010,7 +2010,7 @@ static void sam_receive(struct sam_emac_s *priv, int qid) else #endif { - nlldbg("DROPPED: Unknown type: %04x\n", BUF->type); + nwarn("WARNING: Dropped, Unknown type: %04x\n", BUF->type); NETDEV_RXDROPPED(&priv->dev); } } @@ -2286,7 +2286,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv, int qid) imr = sam_getreg(priv, SAM_EMAC_IMR_OFFSET); pending = isr & ~(imr | EMAC_INT_UNUSED); - nllvdbg("isr: %08x pending: %08x\n", isr, pending); + ninfo("isr: %08x pending: %08x\n", isr, pending); /* Check for the receipt of an RX packet. * @@ -2312,7 +2312,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv, int qid) if ((rsr & EMAC_RSR_RXOVR) != 0) { - nlldbg("ERROR: Receiver overrun RSR: %08x\n", rsr); + nerr("ERROR: Receiver overrun RSR: %08x\n", rsr); clrbits |= EMAC_RSR_RXOVR; } @@ -2329,7 +2329,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv, int qid) if ((rsr & EMAC_RSR_BNA) != 0) { - nlldbg("ERROR: Buffer not available RSR: %08x\n", rsr); + nerr("ERROR: Buffer not available RSR: %08x\n", rsr); clrbits |= EMAC_RSR_BNA; } @@ -2370,7 +2370,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv, int qid) clrbits = EMAC_TSR_RLE | sam_txinuse(priv, qid); sam_txreset(priv, qid); - nlldbg("ERROR: Retry Limit Exceeded TSR: %08x\n", tsr); + nerr("ERROR: Retry Limit Exceeded TSR: %08x\n", tsr); regval = sam_getreg(priv, SAM_EMAC_NCR_OFFSET); regval |= EMAC_NCR_TXEN; @@ -2381,7 +2381,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv, int qid) if ((tsr & EMAC_TSR_COL) != 0) { - nlldbg("ERROR: Collision occurred TSR: %08x\n", tsr); + nerr("ERROR: Collision occurred TSR: %08x\n", tsr); NETDEV_TXERRORS(&priv->dev); } @@ -2389,7 +2389,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv, int qid) if ((tsr & EMAC_TSR_TFC) != 0) { - nlldbg("ERROR: Transmit Frame Corruption due to AHB error: %08x\n", tsr); + nerr("ERROR: Transmit Frame Corruption due to AHB error: %08x\n", tsr); NETDEV_TXERRORS(&priv->dev); } @@ -2407,7 +2407,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv, int qid) if ((pending & EMAC_INT_HRESP) != 0) { - nlldbg("ERROR: Hresp not OK\n"); + nerr("ERROR: Hresp not OK\n"); } /* Check for PAUSE Frame received (PFRE). @@ -2418,7 +2418,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv, int qid) if ((pending & EMAC_INT_PFNZ) != 0) { - nlldbg("Pause frame received\n"); + ninfo("Pause frame received\n"); } /* Check for Pause Time Zero (PTZ) @@ -2428,7 +2428,7 @@ static inline void sam_interrupt_process(FAR struct sam_emac_s *priv, int qid) if ((pending & EMAC_INT_PTZ) != 0) { - nlldbg("Pause TO!\n"); + ninfo("Pause TO!\n"); } #endif } @@ -2593,7 +2593,7 @@ static int sam_emac1_interrupt(int irq, void *context) static inline void sam_txtimeout_process(FAR struct sam_emac_s *priv) { - nlldbg("Timeout!\n"); + nerr("ERROR: Timeout!\n"); NETDEV_TXTIMEOUTS(&priv->dev); /* Reset the hardware. Just take the interface down, then back up again. */ @@ -2824,20 +2824,20 @@ static int sam_ifup(struct net_driver_s *dev) int ret; #ifdef CONFIG_NET_IPv4 - ndbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); #endif #ifdef CONFIG_NET_IPv6 - ndbg("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", - dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2], - dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5], - dev->d_ipv6addr[6], dev->d_ipv6addr[7]); + ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", + dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2], + dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5], + dev->d_ipv6addr[6], dev->d_ipv6addr[7]); #endif /* Configure the EMAC interface for normal operation. */ - nllvdbg("Initialize the EMAC\n"); + ninfo("Initialize the EMAC\n"); sam_emac_configure(priv); sam_queue_configure(priv, EMAC_QUEUE_1); sam_queue_configure(priv, EMAC_QUEUE_2); @@ -2858,7 +2858,7 @@ static int sam_ifup(struct net_driver_s *dev) ret = sam_phyinit(priv); if (ret < 0) { - nlldbg("ERROR: sam_phyinit failed: %d\n", ret); + nerr("ERROR: sam_phyinit failed: %d\n", ret); return ret; } @@ -2867,16 +2867,16 @@ static int sam_ifup(struct net_driver_s *dev) ret = sam_autonegotiate(priv); if (ret < 0) { - nlldbg("ERROR: sam_autonegotiate failed: %d\n", ret); + nerr("ERROR: sam_autonegotiate failed: %d\n", ret); return ret; } while (sam_linkup(priv) == 0); - nllvdbg("Link detected \n"); + ninfo("Link detected \n"); /* Enable normal MAC operation */ - nllvdbg("Enable normal operation\n"); + ninfo("Enable normal operation\n"); /* Set and activate a timer process */ @@ -2910,7 +2910,7 @@ static int sam_ifdown(struct net_driver_s *dev) struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; irqstate_t flags; - nlldbg("Taking the network down\n"); + ninfo("Taking the network down\n"); /* Disable the EMAC interrupt */ @@ -2955,7 +2955,7 @@ static int sam_ifdown(struct net_driver_s *dev) static inline void sam_txavail_process(FAR struct sam_emac_s *priv) { - nllvdbg("ifup: %d\n", priv->ifup); + ninfo("ifup: %d\n", priv->ifup); /* Ignore the notification if the interface is not yet up */ @@ -3208,8 +3208,8 @@ static int sam_addmac(struct net_driver_s *dev, const uint8_t *mac) unsigned int ndx; unsigned int bit; - nllvdbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); /* Calculate the 6-bit has table index */ @@ -3281,8 +3281,8 @@ static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac) unsigned int ndx; unsigned int bit; - nllvdbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); /* Calculate the 6-bit has table index */ @@ -3464,7 +3464,7 @@ static int sam_ioctl(struct net_driver_s *dev, int cmd, long arg) * ****************************************************************************/ -#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_INFO) static void sam_phydump(struct sam_emac_s *priv) { uint32_t regval; @@ -3476,19 +3476,19 @@ static void sam_phydump(struct sam_emac_s *priv) regval |= EMAC_NCR_MPE; sam_putreg(priv, SAM_EMAC_NCR_OFFSET, regval); - nllvdbg("%s Registers (Address %02x)\n", - priv->attr->rmii ? "RMII" : "MII", priv->phyaddr); + ninfo("%s Registers (Address %02x)\n", + priv->attr->rmii ? "RMII" : "MII", priv->phyaddr); sam_phyread(priv, priv->phyaddr, MII_MCR, &phyval); - nllvdbg(" MCR: %04x\n", phyval); + ninfo(" MCR: %04x\n", phyval); sam_phyread(priv, priv->phyaddr, MII_MSR, &phyval); - nllvdbg(" MSR: %04x\n", phyval); + ninfo(" MSR: %04x\n", phyval); sam_phyread(priv, priv->phyaddr, MII_ADVERTISE, &phyval); - nllvdbg(" ADVERTISE: %04x\n", phyval); + ninfo(" ADVERTISE: %04x\n", phyval); sam_phyread(priv, priv->phyaddr, MII_LPA, &phyval); - nllvdbg(" LPR: %04x\n", phyval); + ninfo(" LPR: %04x\n", phyval); sam_phyread(priv, priv->phyaddr, priv->attr->physr, &phyval); - nllvdbg(" PHYSR: %04x\n", phyval); + ninfo(" PHYSR: %04x\n", phyval); /* Disable management port */ @@ -3652,7 +3652,7 @@ static int sam_phyintenable(struct sam_emac_s *priv) else #endif { - ndbg("ERROR: Unsupported PHY type: %d\n", priv->phytype); + nerr("ERROR: Unsupported PHY type: %d\n", priv->phytype); ret = -ENOSYS; } @@ -3716,7 +3716,7 @@ static int sam_phyreset(struct sam_emac_s *priv) int timeout; int ret; - nllvdbg(" sam_phyreset\n"); + ninfo(" sam_phyreset\n"); /* Enable management port */ @@ -3729,7 +3729,7 @@ static int sam_phyreset(struct sam_emac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, MII_MCR, MII_MCR_RESET); if (ret < 0) { - nlldbg("ERROR: sam_phywrite failed: %d\n", ret); + nerr("ERROR: sam_phywrite failed: %d\n", ret); } /* Wait for the PHY reset to complete */ @@ -3741,7 +3741,7 @@ static int sam_phyreset(struct sam_emac_s *priv) int result = sam_phyread(priv, priv->phyaddr, MII_MCR, &mcr); if (result < 0) { - nlldbg("ERROR: Failed to read the MCR register: %d\n", ret); + nerr("ERROR: Failed to read the MCR register: %d\n", ret); ret = result; } else if ((mcr & MII_MCR_RESET) == 0) @@ -3783,7 +3783,7 @@ static int sam_phyfind(struct sam_emac_s *priv, uint8_t *phyaddr) unsigned int offset; int ret = -ESRCH; - nllvdbg("Find a valid PHY address\n"); + ninfo("Find a valid PHY address\n"); /* Enable management port */ @@ -3806,8 +3806,8 @@ static int sam_phyfind(struct sam_emac_s *priv, uint8_t *phyaddr) else { - nlldbg("ERROR: sam_phyread failed for PHY address %02x: %d\n", - candidate, ret); + nerr("ERROR: sam_phyread failed for PHY address %02x: %d\n", + candidate, ret); for (offset = 0; offset < 32; offset++) { @@ -3828,10 +3828,10 @@ static int sam_phyfind(struct sam_emac_s *priv, uint8_t *phyaddr) if (ret == OK) { - nllvdbg(" PHYID1: %04x PHY addr: %d\n", phyval, candidate); + ninfo(" PHYID1: %04x PHY addr: %d\n", phyval, candidate); *phyaddr = candidate; sam_phyread(priv, candidate, priv->attr->physr, &phyval); - nllvdbg(" PHYSR: %04x PHY addr: %d\n", phyval, candidate); + ninfo(" PHYSR: %04x PHY addr: %d\n", phyval, candidate); } /* Disable management port */ @@ -3872,7 +3872,7 @@ static int sam_phyread(struct sam_emac_s *priv, uint8_t phyaddr, ret = sam_phywait(priv); if (ret < 0) { - nlldbg("ERROR: sam_phywait failed: %d\n", ret); + nerr("ERROR: sam_phywait failed: %d\n", ret); return ret; } @@ -3897,7 +3897,7 @@ static int sam_phyread(struct sam_emac_s *priv, uint8_t phyaddr, ret = sam_phywait(priv); if (ret < 0) { - nlldbg("ERROR: sam_phywait failed: %d\n", ret); + nerr("ERROR: sam_phywait failed: %d\n", ret); return ret; } @@ -3937,7 +3937,7 @@ static int sam_phywrite(struct sam_emac_s *priv, uint8_t phyaddr, ret = sam_phywait(priv); if (ret < 0) { - nlldbg("ERROR: sam_phywait failed: %d\n", ret); + nerr("ERROR: sam_phywait failed: %d\n", ret); return ret; } @@ -3962,7 +3962,7 @@ static int sam_phywrite(struct sam_emac_s *priv, uint8_t phyaddr, ret = sam_phywait(priv); if (ret < 0) { - nlldbg("ERROR: sam_phywait failed: %d\n", ret); + nerr("ERROR: sam_phywait failed: %d\n", ret); return ret; } @@ -4007,33 +4007,33 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_PHYID1, &phyid1); if (ret < 0) { - nlldbg("ERROR: Failed to read PHYID1\n"); + nerr("ERROR: Failed to read PHYID1\n"); goto errout; } - nllvdbg("PHYID1: %04x PHY address: %02x\n", phyid1, priv->phyaddr); + ninfo("PHYID1: %04x PHY address: %02x\n", phyid1, priv->phyaddr); ret = sam_phyread(priv, priv->phyaddr, MII_PHYID2, &phyid2); if (ret < 0) { - nlldbg("ERROR: Failed to read PHYID2\n"); + nerr("ERROR: Failed to read PHYID2\n"); goto errout; } - nllvdbg("PHYID2: %04x PHY address: %02x\n", phyid2, priv->phyaddr); + ninfo("PHYID2: %04x PHY address: %02x\n", phyid2, priv->phyaddr); if (phyid1 == priv->attr->msoui && ((phyid2 & MII_PHYID2_OUI_MASK) >> MII_PHYID2_OUI_SHIFT) == (uint16_t)priv->attr->lsoui) { - nllvdbg(" Vendor Model Number: %04x\n", - (phyid2 & MII_PHYID2_MODEL_MASK) >> MII_PHYID2_MODEL_SHIFT); - nllvdbg(" Model Revision Number: %04x\n", - (phyid2 & MII_PHYID2_REV_MASK) >> MII_PHYID2_REV_SHIFT); + ninfo(" Vendor Model Number: %04x\n", + (phyid2 & MII_PHYID2_MODEL_MASK) >> MII_PHYID2_MODEL_SHIFT); + ninfo(" Model Revision Number: %04x\n", + (phyid2 & MII_PHYID2_REV_MASK) >> MII_PHYID2_REV_SHIFT); } else { - nlldbg("ERROR: PHY not recognized\n"); + nerr("ERROR: PHY not recognized\n"); } /* Setup control register */ @@ -4041,7 +4041,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_MCR, &mcr); if (ret < 0) { - nlldbg("ERROR: Failed to read MCR\n"); + nerr("ERROR: Failed to read MCR\n"); goto errout; } @@ -4052,7 +4052,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, MII_MCR, mcr); if (ret < 0) { - nlldbg("ERROR: Failed to write MCR\n"); + nerr("ERROR: Failed to write MCR\n"); goto errout; } @@ -4067,7 +4067,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, MII_ADVERTISE, advertise); if (ret < 0) { - nlldbg("ERROR: Failed to write ANAR\n"); + nerr("ERROR: Failed to write ANAR\n"); goto errout; } @@ -4076,7 +4076,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_MCR, &mcr); if (ret < 0) { - nlldbg("ERROR: Failed to read MCR\n"); + nerr("ERROR: Failed to read MCR\n"); goto errout; } @@ -4084,7 +4084,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, MII_MCR, mcr); if (ret < 0) { - nlldbg("ERROR: Failed to write MCR\n"); + nerr("ERROR: Failed to write MCR\n"); goto errout; } @@ -4096,11 +4096,11 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phywrite(priv, priv->phyaddr, MII_MCR, mcr); if (ret < 0) { - nlldbg("ERROR: Failed to write MCR\n"); + nerr("ERROR: Failed to write MCR\n"); goto errout; } - nllvdbg(" MCR: %04x\n", mcr); + ninfo(" MCR: %04x\n", mcr); /* Check AutoNegotiate complete */ @@ -4110,7 +4110,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_MSR, &msr); if (ret < 0) { - nlldbg("ERROR: Failed to read MSR\n"); + nerr("ERROR: Failed to read MSR\n"); goto errout; } @@ -4120,7 +4120,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) { /* Yes.. break out of the loop */ - nllvdbg("AutoNegotiate complete\n"); + ninfo("AutoNegotiate complete\n"); break; } @@ -4128,7 +4128,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) if (++timeout >= PHY_RETRY_MAX) { - nlldbg("ERROR: TimeOut\n"); + nerr("ERROR: TimeOut\n"); sam_phydump(priv); ret = -ETIMEDOUT; goto errout; @@ -4140,7 +4140,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_LPA, &lpa); if (ret < 0) { - nlldbg("ERROR: Failed to read ANLPAR\n"); + nerr("ERROR: Failed to read ANLPAR\n"); goto errout; } @@ -4235,13 +4235,13 @@ static bool sam_linkup(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, MII_MSR, &msr); if (ret < 0) { - nlldbg("ERROR: Failed to read MSR: %d\n", ret); + nerr("ERROR: Failed to read MSR: %d\n", ret); goto errout; } if ((msr & MII_MSR_LINKSTATUS) == 0) { - nlldbg("ERROR: MSR LinkStatus: %04x\n", msr); + nerr("ERROR: MSR LinkStatus: %04x\n", msr); goto errout; } @@ -4250,7 +4250,7 @@ static bool sam_linkup(struct sam_emac_s *priv) ret = sam_phyread(priv, priv->phyaddr, priv->attr->physr, &physr); if (ret < 0) { - nlldbg("ERROR: Failed to read PHYSR: %d\n", ret); + nerr("ERROR: Failed to read PHYSR: %d\n", ret); goto errout; } @@ -4288,7 +4288,7 @@ static bool sam_linkup(struct sam_emac_s *priv) /* Start the EMAC transfers */ - nllvdbg("Link is up\n"); + ninfo("Link is up\n"); linkup = true; errout: @@ -4329,7 +4329,7 @@ static int sam_phyinit(struct sam_emac_s *priv) mck = BOARD_MCK_FREQUENCY; if (mck > (240*1000*1000)) { - ndbg("ERROR: Cannot realize PHY clock\n"); + nerr("ERROR: Cannot realize PHY clock\n"); return -EINVAL; } else if (mck > (160*1000*1000)) @@ -4365,7 +4365,7 @@ static int sam_phyinit(struct sam_emac_s *priv) ret = sam_phyfind(priv, &priv->phyaddr); if (ret < 0) { - nlldbg("ERROR: sam_phyfind failed: %d\n", ret); + nerr("ERROR: sam_phyfind failed: %d\n", ret); return ret; } @@ -4480,7 +4480,7 @@ static inline void sam_ethgpioconfig(struct sam_emac_s *priv) else #endif { - nvdbg("ERROR: emac=%d\n", priv->attr->emac); + nerr("ERROR: emac=%d\n", priv->attr->emac); } } @@ -4803,11 +4803,11 @@ static void sam_macaddress(struct sam_emac_s *priv) struct net_driver_s *dev = &priv->dev; uint32_t regval; - nllvdbg("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - dev->d_ifname, - dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], - dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], - dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5]); + ninfo("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + dev->d_ifname, + dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], + dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], + dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5]); /* Set the MAC address */ @@ -4869,7 +4869,7 @@ static void sam_ipv6multicast(struct sam_emac_s *priv) mac[4] = tmp16 & 0xff; mac[5] = tmp16 >> 8; - nvdbg("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", + ninfo("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); (void)sam_addmac(dev, mac); @@ -5006,7 +5006,7 @@ static int sam_emac_configure(struct sam_emac_s *priv) { uint32_t regval; - nllvdbg("Entry\n"); + ninfo("Entry\n"); /* Enable clocking to the EMAC peripheral */ @@ -5111,7 +5111,7 @@ int sam_emac_initialize(int intf) else #endif { - ndbg("ERROR: Interface %d not supported\n", intf); + nerr("ERROR: Interface %d not supported\n", intf); return -EINVAL; } @@ -5140,7 +5140,7 @@ int sam_emac_initialize(int intf) priv->txpoll = wd_create(); if (!priv->txpoll) { - ndbg("ERROR: Failed to create periodic poll timer\n"); + nerr("ERROR: Failed to create periodic poll timer\n"); ret = -EAGAIN; goto errout; } @@ -5148,7 +5148,7 @@ int sam_emac_initialize(int intf) priv->txtimeout = wd_create(); /* Create TX timeout timer */ if (!priv->txtimeout) { - ndbg("ERROR: Failed to create periodic poll timer\n"); + nerr("ERROR: Failed to create periodic poll timer\n"); ret = -EAGAIN; goto errout_with_txpoll; } @@ -5162,7 +5162,7 @@ int sam_emac_initialize(int intf) ret = sam_buffer_allocate(priv); if (ret < 0) { - ndbg("ERROR: sam_buffer_allocate failed: %d\n", ret); + nerr("ERROR: sam_buffer_allocate failed: %d\n", ret); goto errout_with_txtimeout; } @@ -5173,7 +5173,7 @@ int sam_emac_initialize(int intf) ret = irq_attach(priv->attr->irq, priv->attr->handler); if (ret < 0) { - ndbg("ERROR: Failed to attach the handler to the IRQ%d\n", priv->attr->irq); + nerr("ERROR: Failed to attach the handler to the IRQ%d\n", priv->attr->irq); goto errout_with_buffers; } @@ -5186,7 +5186,7 @@ int sam_emac_initialize(int intf) ret = sam_ifdown(&priv->dev); if (ret < 0) { - ndbg("ERROR: Failed to put the interface in the down state: %d\n", ret); + nerr("ERROR: Failed to put the interface in the down state: %d\n", ret); goto errout_with_buffers; } @@ -5198,7 +5198,7 @@ int sam_emac_initialize(int intf) return ret; } - ndbg("ERROR: netdev_register() failed: %d\n", ret); + nerr("ERROR: netdev_register() failed: %d\n", ret); errout_with_buffers: sam_buffer_free(priv); @@ -5261,7 +5261,7 @@ int sam_emac_setmacaddr(int intf, uint8_t mac[6]) else #endif { - ndbg("ERROR: Interface %d not supported\n", intf); + nerr("ERROR: Interface %d not supported\n", intf); return -EINVAL; } @@ -5270,7 +5270,7 @@ int sam_emac_setmacaddr(int intf, uint8_t mac[6]) dev = &priv->dev; memcpy(dev->d_mac.ether_addr_octet, mac, 6); - nvdbg("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + ninfo("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", dev->d_ifname, dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], diff --git a/arch/arm/src/samv7/sam_ethernet.c b/arch/arm/src/samv7/sam_ethernet.c index 3e19d958738ce3d441328cd799771cf6636f34c1..0137b16115304119f7b2b924dde03cd887bfb757 100644 --- a/arch/arm/src/samv7/sam_ethernet.c +++ b/arch/arm/src/samv7/sam_ethernet.c @@ -99,7 +99,7 @@ void up_netinitialize(void) ret = sam_emac_initialize(EMAC0_INTF); if (ret < 0) { - nlldbg("ERROR: up_emac_initialize(EMAC0) failed: %d\n", ret); + nerr("ERROR: up_emac_initialize(EMAC0) failed: %d\n", ret); } #endif @@ -109,7 +109,7 @@ void up_netinitialize(void) ret = sam_emac_initialize(EMAC1_INTF); if (ret < 0) { - nlldbg("ERROR: up_emac_initialize(EMAC1) failed: %d\n", ret); + nerr("ERROR: up_emac_initialize(EMAC1) failed: %d\n", ret); } #endif #endif diff --git a/arch/arm/src/samv7/sam_freerun.c b/arch/arm/src/samv7/sam_freerun.c index c5eec516ddf7be1a4ede26d1a053f900258dc95b..b3fbfbf6dfc6eb114edfab61a9baed79986d6426 100644 --- a/arch/arm/src/samv7/sam_freerun.c +++ b/arch/arm/src/samv7/sam_freerun.c @@ -124,7 +124,7 @@ int sam_freerun_initialize(struct sam_freerun_s *freerun, int chan, uint32_t cmr; int ret; - tcvdbg("chan=%d resolution=%d usec\n", chan, resolution); + tmrinfo("chan=%d resolution=%d usec\n", chan, resolution); DEBUGASSERT(freerun && resolution > 0); /* Get the TC frequency the corresponds to the requested resolution */ @@ -136,13 +136,13 @@ int sam_freerun_initialize(struct sam_freerun_s *freerun, int chan, ret = sam_tc_clockselect(frequency, &cmr, &actual); if (ret < 0) { - tcdbg("ERROR: sam_tc_clockselect failed: %d\n", ret); + tmrerr("ERROR: sam_tc_clockselect failed: %d\n", ret); return ret; } - tcvdbg("frequency=%lu, actual=%lu, cmr=%08lx\n", - (unsigned long)frequency, (unsigned long)actual, - (unsigned long)cmr); + tmrinfo("frequency=%lu, actual=%lu, cmr=%08lx\n", + (unsigned long)frequency, (unsigned long)actual, + (unsigned long)cmr); /* Allocate the timer/counter and select its mode of operation * @@ -175,7 +175,7 @@ int sam_freerun_initialize(struct sam_freerun_s *freerun, int chan, freerun->tch = sam_tc_allocate(chan, cmr); if (!freerun->tch) { - tcdbg("ERROR: Failed to allocate timer channel %d\n", chan); + tmrerr("ERROR: Failed to allocate timer channel %d\n", chan); return -EBUSY; } @@ -260,9 +260,9 @@ int sam_freerun_counter(struct sam_freerun_s *freerun, struct timespec *ts) leave_critical_section(flags); - tcvdbg("counter=%lu (%lu) overflow=%lu, sr=%08lx\n", - (unsigned long)counter, (unsigned long)verify, - (unsigned long)overflow, (unsigned long)sr); + tmrinfo("counter=%lu (%lu) overflow=%lu, sr=%08lx\n", + (unsigned long)counter, (unsigned long)verify, + (unsigned long)overflow, (unsigned long)sr); /* Convert the whole thing to units of microseconds. * @@ -280,7 +280,7 @@ int sam_freerun_counter(struct sam_freerun_s *freerun, struct timespec *ts) ts->tv_sec = sec; ts->tv_nsec = (usec - (sec * USEC_PER_SEC)) * NSEC_PER_USEC; - tcvdbg("usec=%llu ts=(%lu, %lu)\n", + tmrinfo("usec=%llu ts=(%lu, %lu)\n", usec, (unsigned long)ts->tv_sec, (unsigned long)ts->tv_nsec); return OK; diff --git a/arch/arm/src/samv7/sam_gpio.c b/arch/arm/src/samv7/sam_gpio.c index 32547ff1a3b060a876c3cbf0f7ce8c1c1b61e917..cf681e766207c252f92d0e5969b5d275ebf3d3a3 100644 --- a/arch/arm/src/samv7/sam_gpio.c +++ b/arch/arm/src/samv7/sam_gpio.c @@ -86,7 +86,7 @@ * Private Data ****************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO static const char g_portchar[SAMV7_NPIO] = { 'A' @@ -543,15 +543,11 @@ bool sam_gpioread(gpio_pinset_t pinset) uint32_t pin = sam_gpio_pinmask(pinset); uint32_t regval; - if ((pinset & GPIO_MODE_MASK) == GPIO_OUTPUT) - { - regval = getreg32(base + SAM_PIO_ODSR_OFFSET); - } - else - { - regval = getreg32(base + SAM_PIO_PDSR_OFFSET); - } + /* Always read the Pin Data Status Register. Otherwise an Open-Drain + * Output pin will not be read back correctly. + */ + regval = getreg32(base + SAM_PIO_PDSR_OFFSET); return (regval & pin) != 0; } @@ -563,7 +559,7 @@ bool sam_gpioread(gpio_pinset_t pinset) * ************************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO int sam_dumpgpio(uint32_t pinset, const char *msg) { irqstate_t flags; @@ -578,40 +574,42 @@ int sam_dumpgpio(uint32_t pinset, const char *msg) /* The following requires exclusive access to the GPIO registers */ flags = enter_critical_section(); - lldbg("PIO%c pinset: %08x base: %08x -- %s\n", - g_portchar[port], pinset, base, msg); - lldbg(" PSR: %08x OSR: %08x IFSR: %08x ODSR: %08x\n", - getreg32(base + SAM_PIO_PSR_OFFSET), getreg32(base + SAM_PIO_OSR_OFFSET), - getreg32(base + SAM_PIO_IFSR_OFFSET), getreg32(base + SAM_PIO_ODSR_OFFSET)); - lldbg(" PDSR: %08x IMR: %08x ISR: %08x MDSR: %08x\n", - getreg32(base + SAM_PIO_PDSR_OFFSET), getreg32(base + SAM_PIO_IMR_OFFSET), - getreg32(base + SAM_PIO_ISR_OFFSET), getreg32(base + SAM_PIO_MDSR_OFFSET)); - lldbg(" ABCDSR: %08x %08x IFSCSR: %08x PPDSR: %08x\n", - getreg32(base + SAM_PIO_ABCDSR1_OFFSET), getreg32(base + SAM_PIO_ABCDSR2_OFFSET), - getreg32(base + SAM_PIO_IFSCSR_OFFSET), getreg32(base + SAM_PIO_PPDSR_OFFSET)); - lldbg(" PUSR: %08x SCDR: %08x OWSR: %08x AIMMR: %08x\n", - getreg32(base + SAM_PIO_PUSR_OFFSET), getreg32(base + SAM_PIO_SCDR_OFFSET), - getreg32(base + SAM_PIO_OWSR_OFFSET), getreg32(base + SAM_PIO_AIMMR_OFFSET)); - lldbg(" ESR: %08x LSR: %08x ELSR: %08x FELLSR: %08x\n", - getreg32(base + SAM_PIO_ESR_OFFSET), getreg32(base + SAM_PIO_LSR_OFFSET), - getreg32(base + SAM_PIO_ELSR_OFFSET), getreg32(base + SAM_PIO_FELLSR_OFFSET)); - lldbg(" FRLHSR: %08x LOCKSR: %08x WPMR: %08x WPSR: %08x\n", - getreg32(base + SAM_PIO_FRLHSR_OFFSET), getreg32(base + SAM_PIO_LOCKSR_OFFSET), - getreg32(base + SAM_PIO_WPMR_OFFSET), getreg32(base + SAM_PIO_WPSR_OFFSET)); - lldbg(" PCMR: %08x PCIMR: %08x PCISR: %08x PCRHR: %08x\n", - getreg32(base + SAM_PIO_PCMR_OFFSET), getreg32(base + SAM_PIO_PCIMR_OFFSET), - getreg32(base + SAM_PIO_PCISR_OFFSET), getreg32(base + SAM_PIO_PCRHR_OFFSET)); - lldbg("SCHMITT: %08x DRIVER:%08x\n", - getreg32(base + SAM_PIO_SCHMITT_OFFSET), getreg32(base + SAM_PIO_DRIVER_OFFSET)); - lldbg(" KER: %08x KRCR: %08x KDR: %08x KIMR: %08x\n", - getreg32(base + SAM_PIO_KER_OFFSET), getreg32(base + SAM_PIO_KRCR_OFFSET), - getreg32(base + SAM_PIO_KDR_OFFSET), getreg32(base + SAM_PIO_KIMR_OFFSET)); - lldbg(" KSR: %08x KKPR: %08x KKRR: %08x\n", - getreg32(base + SAM_PIO_KSR_OFFSET), getreg32(base + SAM_PIO_KKPR_OFFSET), - getreg32(base + SAM_PIO_KKRR_OFFSET)); - lldbg(" PCMR: %08x PCIMR: %08x PCISR: %08x PCRHR: %08x\n", - getreg32(base + SAM_PIO_PCMR_OFFSET), getreg32(base + SAM_PIO_PCIMR_OFFSET), - getreg32(base + SAM_PIO_PCISR_OFFSET), getreg32(base + SAM_PIO_PCRHR_OFFSET)); + + gpioinfo("PIO%c pinset: %08x base: %08x -- %s\n", + g_portchar[port], pinset, base, msg); + gpioinfo(" PSR: %08x OSR: %08x IFSR: %08x ODSR: %08x\n", + getreg32(base + SAM_PIO_PSR_OFFSET), getreg32(base + SAM_PIO_OSR_OFFSET), + getreg32(base + SAM_PIO_IFSR_OFFSET), getreg32(base + SAM_PIO_ODSR_OFFSET)); + gpioinfo(" PDSR: %08x IMR: %08x ISR: %08x MDSR: %08x\n", + getreg32(base + SAM_PIO_PDSR_OFFSET), getreg32(base + SAM_PIO_IMR_OFFSET), + getreg32(base + SAM_PIO_ISR_OFFSET), getreg32(base + SAM_PIO_MDSR_OFFSET)); + gpioinfo(" ABCDSR: %08x %08x IFSCSR: %08x PPDSR: %08x\n", + getreg32(base + SAM_PIO_ABCDSR1_OFFSET), getreg32(base + SAM_PIO_ABCDSR2_OFFSET), + getreg32(base + SAM_PIO_IFSCSR_OFFSET), getreg32(base + SAM_PIO_PPDSR_OFFSET)); + gpioinfo(" PUSR: %08x SCDR: %08x OWSR: %08x AIMMR: %08x\n", + getreg32(base + SAM_PIO_PUSR_OFFSET), getreg32(base + SAM_PIO_SCDR_OFFSET), + getreg32(base + SAM_PIO_OWSR_OFFSET), getreg32(base + SAM_PIO_AIMMR_OFFSET)); + gpioinfo(" ESR: %08x LSR: %08x ELSR: %08x FELLSR: %08x\n", + getreg32(base + SAM_PIO_ESR_OFFSET), getreg32(base + SAM_PIO_LSR_OFFSET), + getreg32(base + SAM_PIO_ELSR_OFFSET), getreg32(base + SAM_PIO_FELLSR_OFFSET)); + gpioinfo(" FRLHSR: %08x LOCKSR: %08x WPMR: %08x WPSR: %08x\n", + getreg32(base + SAM_PIO_FRLHSR_OFFSET), getreg32(base + SAM_PIO_LOCKSR_OFFSET), + getreg32(base + SAM_PIO_WPMR_OFFSET), getreg32(base + SAM_PIO_WPSR_OFFSET)); + gpioinfo(" PCMR: %08x PCIMR: %08x PCISR: %08x PCRHR: %08x\n", + getreg32(base + SAM_PIO_PCMR_OFFSET), getreg32(base + SAM_PIO_PCIMR_OFFSET), + getreg32(base + SAM_PIO_PCISR_OFFSET), getreg32(base + SAM_PIO_PCRHR_OFFSET)); + gpioinfo("SCHMITT: %08x DRIVER:%08x\n", + getreg32(base + SAM_PIO_SCHMITT_OFFSET), getreg32(base + SAM_PIO_DRIVER_OFFSET)); + gpioinfo(" KER: %08x KRCR: %08x KDR: %08x KIMR: %08x\n", + getreg32(base + SAM_PIO_KER_OFFSET), getreg32(base + SAM_PIO_KRCR_OFFSET), + getreg32(base + SAM_PIO_KDR_OFFSET), getreg32(base + SAM_PIO_KIMR_OFFSET)); + gpioinfo(" KSR: %08x KKPR: %08x KKRR: %08x\n", + getreg32(base + SAM_PIO_KSR_OFFSET), getreg32(base + SAM_PIO_KKPR_OFFSET), + getreg32(base + SAM_PIO_KKRR_OFFSET)); + gpioinfo(" PCMR: %08x PCIMR: %08x PCISR: %08x PCRHR: %08x\n", + getreg32(base + SAM_PIO_PCMR_OFFSET), getreg32(base + SAM_PIO_PCIMR_OFFSET), + getreg32(base + SAM_PIO_PCISR_OFFSET), getreg32(base + SAM_PIO_PCRHR_OFFSET)); + leave_critical_section(flags); return OK; } diff --git a/arch/arm/src/samv7/sam_gpio.h b/arch/arm/src/samv7/sam_gpio.h index 2e564ec787ddfe80124e6f5484df0f82936e9308..e6746da3978174158ea053b53f0bdf0faf7b4ed3 100644 --- a/arch/arm/src/samv7/sam_gpio.h +++ b/arch/arm/src/samv7/sam_gpio.h @@ -377,7 +377,7 @@ void sam_gpioirqdisable(int irq); * ************************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO int sam_dumpgpio(uint32_t pinset, const char *msg); #else # define sam_dumpgpio(p,m) diff --git a/arch/arm/src/samv7/sam_hsmci.c b/arch/arm/src/samv7/sam_hsmci.c index 89d16b37928882b6ca1639d970f18ba3dbc79a7f..cffada9e47014828b795cd6756f87689a771b166 100644 --- a/arch/arm/src/samv7/sam_hsmci.c +++ b/arch/arm/src/samv7/sam_hsmci.c @@ -81,6 +81,10 @@ # error "HSMCI support requires CONFIG_SAMV7_XDMAC" #endif +#ifndef CONFIG_DEBUG_MEMCARD_INFO +# undef CONFIG_SAMV7_HSMCI_REGDEBUG +#endif + /* System Bus Interfaces */ #if defined(CONFIG_ARCH_CHIP_SAMV71) || defined(CONFIG_ARCH_CHIP_SAME70) @@ -98,7 +102,7 @@ # error "This driver requires CONFIG_SDIO_BLOCKSETUP" #endif -#if !defined(CONFIG_DEBUG_FS) || !defined(CONFIG_DEBUG_VERBOSE) +#if !defined(CONFIG_DEBUG_FS) || !defined(CONFIG_DEBUG_INFO) # undef CONFIG_SAMV7_HSMCI_CMDDEBUG # undef CONFIG_SAMV7_HSMCI_XFRDEBUG #endif @@ -653,7 +657,7 @@ static bool sam_checkreg(struct sam_dev_s *priv, bool wr, uint32_t value, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", priv->ntimes); + mcinfo("...[Repeats %d times]...\n", priv->ntimes); } /* Save information about the new access */ @@ -686,7 +690,7 @@ static inline uint32_t sam_getreg(struct sam_dev_s *priv, unsigned int offset) #ifdef CONFIG_SAMV7_HSMCI_REGDEBUG if (sam_checkreg(priv, false, value, address)) { - lldbg("%08x->%08x\n", address, value); + mcinfo("%08x->%08x\n", address, value); } #endif @@ -709,7 +713,7 @@ static inline void sam_putreg(struct sam_dev_s *priv, uint32_t value, #ifdef CONFIG_SAMV7_HSMCI_REGDEBUG if (sam_checkreg(priv, true, value, address)) { - lldbg("%08x<-%08x\n", address, value); + mcinfo("%08x<-%08x\n", address, value); } #endif @@ -933,25 +937,25 @@ static void sam_hsmcisample(struct sam_dev_s *priv, static void sam_hsmcidump(struct sam_dev_s *priv, struct sam_hsmciregs_s *regs, const char *msg) { - fdbg("HSMCI Registers: %s\n", msg); - fdbg(" MR[%08x]: %08x\n", priv->base + SAM_HSMCI_MR_OFFSET, regs->mr); - fdbg(" DTOR[%08x]: %08x\n", priv->base + SAM_HSMCI_DTOR_OFFSET, regs->dtor); - fdbg(" SDCR[%08x]: %08x\n", priv->base + SAM_HSMCI_SDCR_OFFSET, regs->sdcr); - fdbg(" ARGR[%08x]: %08x\n", priv->base + SAM_HSMCI_ARGR_OFFSET, regs->argr); - fdbg(" BLKR[%08x]: %08x\n", priv->base + SAM_HSMCI_BLKR_OFFSET, regs->blkr); - fdbg(" CSTOR[%08x]: %08x\n", priv->base + SAM_HSMCI_CSTOR_OFFSET, regs->cstor); + mcinfo("HSMCI Registers: %s\n", msg); + mcinfo(" MR[%08x]: %08x\n", priv->base + SAM_HSMCI_MR_OFFSET, regs->mr); + mcinfo(" DTOR[%08x]: %08x\n", priv->base + SAM_HSMCI_DTOR_OFFSET, regs->dtor); + mcinfo(" SDCR[%08x]: %08x\n", priv->base + SAM_HSMCI_SDCR_OFFSET, regs->sdcr); + mcinfo(" ARGR[%08x]: %08x\n", priv->base + SAM_HSMCI_ARGR_OFFSET, regs->argr); + mcinfo(" BLKR[%08x]: %08x\n", priv->base + SAM_HSMCI_BLKR_OFFSET, regs->blkr); + mcinfo(" CSTOR[%08x]: %08x\n", priv->base + SAM_HSMCI_CSTOR_OFFSET, regs->cstor); #if 0 /* Reading these can cause loss of response data */ - fdbg(" RSPR0[%08x]: %08x\n", priv->base + SAM_HSMCI_RSPR0_OFFSET, regs->rsp0); - fdbg(" RSPR1[%08x]: %08x\n", priv->base + SAM_HSMCI_RSPR1_OFFSET, regs->rsp1); - fdbg(" RSPR2[%08x]: %08x\n", priv->base + SAM_HSMCI_RSPR2_OFFSET, regs->rsp2); - fdbg(" RSPR3[%08x]: %08x\n", priv->base + SAM_HSMCI_RSPR3_OFFSET, regs->rsp3); -#endif - fdbg(" SR[%08x]: %08x\n", priv->base + SAM_HSMCI_SR_OFFSET, regs->sr); - fdbg(" IMR[%08x]: %08x\n", priv->base + SAM_HSMCI_IMR_OFFSET, regs->imr); - fdbg(" DMA[%08x]: %08x\n", priv->base + SAM_HSMCI_DMA_OFFSET, regs->dma); - fdbg(" CFG[%08x]: %08x\n", priv->base + SAM_HSMCI_CFG_OFFSET, regs->cfg); - fdbg(" WPMR[%08x]: %08x\n", priv->base + SAM_HSMCI_WPMR_OFFSET, regs->wpmr); - fdbg(" WPSR[%08x]: %08x\n", priv->base + SAM_HSMCI_WPSR_OFFSET, regs->wpsr); + mcinfo(" RSPR0[%08x]: %08x\n", priv->base + SAM_HSMCI_RSPR0_OFFSET, regs->rsp0); + mcinfo(" RSPR1[%08x]: %08x\n", priv->base + SAM_HSMCI_RSPR1_OFFSET, regs->rsp1); + mcinfo(" RSPR2[%08x]: %08x\n", priv->base + SAM_HSMCI_RSPR2_OFFSET, regs->rsp2); + mcinfo(" RSPR3[%08x]: %08x\n", priv->base + SAM_HSMCI_RSPR3_OFFSET, regs->rsp3); +#endif + mcinfo(" SR[%08x]: %08x\n", priv->base + SAM_HSMCI_SR_OFFSET, regs->sr); + mcinfo(" IMR[%08x]: %08x\n", priv->base + SAM_HSMCI_IMR_OFFSET, regs->imr); + mcinfo(" DMA[%08x]: %08x\n", priv->base + SAM_HSMCI_DMA_OFFSET, regs->dma); + mcinfo(" CFG[%08x]: %08x\n", priv->base + SAM_HSMCI_CFG_OFFSET, regs->cfg); + mcinfo(" WPMR[%08x]: %08x\n", priv->base + SAM_HSMCI_WPMR_OFFSET, regs->wpmr); + mcinfo(" WPSR[%08x]: %08x\n", priv->base + SAM_HSMCI_WPSR_OFFSET, regs->wpsr); } #endif @@ -1025,7 +1029,7 @@ static void sam_xfrdumpone(struct sam_dev_s *priv, int index, } else { - fdbg("%s: Not collected\n", msg); + mcerr("ERROR: %s: Not collected\n", msg); } } #endif @@ -1169,7 +1173,7 @@ static void sam_dmacallback(DMA_HANDLE handle, void *arg, int result) if (result < 0) { wkupevent = (result == -ETIMEDOUT ? SDIOWAIT_TIMEOUT : SDIOWAIT_ERROR); - flldbg("ERROR: DMA failed: result=%d wkupevent=%04x\n", result, wkupevent); + mcerr("ERROR: DMA failed: result=%d wkupevent=%04x\n", result, wkupevent); /* sam_endtransfer will terminate the transfer and wait up the waiting * client in this case. @@ -1269,7 +1273,7 @@ static void sam_eventtimeout(int argc, uint32_t arg) /* Yes.. wake up any waiting threads */ sam_endwait(priv, SDIOWAIT_TIMEOUT); - flldbg("ERROR: Timeout\n"); + mcerr("ERROR: Timeout\n"); } } @@ -1469,7 +1473,7 @@ static int sam_hsmci_interrupt(struct sam_dev_s *priv) { /* Yes.. Was it some kind of timeout error? */ - flldbg("ERROR: enabled: %08x pending: %08x\n", enabled, pending); + mcerr("ERROR: enabled: %08x pending: %08x\n", enabled, pending); if ((pending & HSMCI_DATA_TIMEOUT_ERRORS) != 0) { /* Yes.. Terminate with a timeout. */ @@ -1590,8 +1594,8 @@ static int sam_hsmci_interrupt(struct sam_dev_s *priv) { /* Yes.. Was the error some kind of timeout? */ - fllvdbg("ERROR: events: %08x SR: %08x\n", - priv->cmdrmask, enabled); + mcerr("ERROR: events: %08x SR: %08x\n", + priv->cmdrmask, enabled); if ((pending & HSMCI_RESPONSE_TIMEOUT_ERRORS) != 0) { @@ -2056,7 +2060,7 @@ static int sam_sendcmd(FAR struct sdio_dev_s *dev, /* Write the fully decorated command to CMDR */ - fvdbg("cmd: %08x arg: %08x regval: %08x\n", cmd, arg, regval); + mcinfo("cmd: %08x arg: %08x regval: %08x\n", cmd, arg, regval); sam_putreg(priv, regval, SAM_HSMCI_CMDR_OFFSET); sam_cmdsample1(priv, SAMPLENDX_AFTER_CMDR); return OK; @@ -2239,7 +2243,7 @@ static int sam_sendsetup(FAR struct sdio_dev_s *dev, FAR const uint8_t *buffer, { /* Some fatal error has occurred */ - fdbg("ERROR: sr %08x\n", sr); + mcerr("ERROR: sr %08x\n", sr); return -EIO; } else if ((sr & HSMCI_INT_TXRDY) != 0) @@ -2419,7 +2423,7 @@ static int sam_waitresponse(FAR struct sdio_dev_s *dev, uint32_t cmd) { /* Yes.. Was the error some kind of timeout? */ - fdbg("ERROR: cmd: %08x events: %08x SR: %08x\n", + mcerr("ERROR: cmd: %08x events: %08x SR: %08x\n", cmd, priv->cmdrmask, sr); if ((pending & HSMCI_RESPONSE_TIMEOUT_ERRORS) != 0) @@ -2449,7 +2453,7 @@ static int sam_waitresponse(FAR struct sdio_dev_s *dev, uint32_t cmd) } else if (--timeout <= 0) { - fdbg("ERROR: Timeout cmd: %08x events: %08x SR: %08x\n", + mcerr("ERROR: Timeout cmd: %08x events: %08x SR: %08x\n", cmd, priv->cmdrmask, sr); priv->wkupevent = SDIOWAIT_TIMEOUT; @@ -2521,10 +2525,10 @@ static int sam_recvshort(FAR struct sdio_dev_s *dev, * 0 1 End bit */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!rshort) { - fdbg("ERROR: rshort=NULL\n"); + mcerr("ERROR: rshort=NULL\n"); ret = -EINVAL; } @@ -2536,7 +2540,7 @@ static int sam_recvshort(FAR struct sdio_dev_s *dev, (cmd & MMCSD_RESPONSE_MASK) != MMCSD_R3_RESPONSE && (cmd & MMCSD_RESPONSE_MASK) != MMCSD_R7_RESPONSE) { - fdbg("ERROR: Wrong response CMD=%08x\n", cmd); + mcerr("ERROR: Wrong response CMD=%08x\n", cmd); ret = -EINVAL; } else @@ -2582,12 +2586,12 @@ static int sam_recvlong(FAR struct sdio_dev_s *dev, uint32_t cmd, * 0 1 End bit */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Check that R1 is the correct response to this command */ if ((cmd & MMCSD_RESPONSE_MASK) != MMCSD_R2_RESPONSE) { - fdbg("ERROR: Wrong response CMD=%08x\n", cmd); + mcerr("ERROR: Wrong response CMD=%08x\n", cmd); ret = -EINVAL; } else @@ -2597,7 +2601,7 @@ static int sam_recvlong(FAR struct sdio_dev_s *dev, uint32_t cmd, if ((priv->wkupevent & SDIOWAIT_TIMEOUT) != 0) { - fdbg("ERROR: timeout\n"); + mcerr("ERROR: timeout\n"); ret = -EINVAL; } @@ -2605,7 +2609,7 @@ static int sam_recvlong(FAR struct sdio_dev_s *dev, uint32_t cmd, else if ((priv->wkupevent & SDIOWAIT_ERROR) != 0) { - fdbg("ERROR: Other error\n"); + mcerr("ERROR: Other error\n"); ret = -EIO; } @@ -2781,7 +2785,7 @@ static sdio_eventset_t sam_eventwait(FAR struct sdio_dev_s *dev, 1, (uint32_t)priv); if (ret != OK) { - fdbg("ERROR: wd_start failed: %d\n", ret); + mcerr("ERROR: wd_start failed: %d\n", ret); } } @@ -2847,7 +2851,7 @@ static void sam_callbackenable(FAR struct sdio_dev_s *dev, { struct sam_dev_s *priv = (struct sam_dev_s *)dev; - fvdbg("eventset: %02x\n", eventset); + mcinfo("eventset: %02x\n", eventset); DEBUGASSERT(priv != NULL); priv->cbevents = eventset; @@ -2883,7 +2887,7 @@ static int sam_registercallback(FAR struct sdio_dev_s *dev, /* Disable callbacks and register this callback and is argument */ - fvdbg("Register %p(%p)\n", callback, arg); + mcinfo("Register %p(%p)\n", callback, arg); DEBUGASSERT(priv != NULL); priv->cbevents = 0; @@ -3158,7 +3162,7 @@ static void sam_callback(void *arg) /* Is a callback registered? */ DEBUGASSERT(priv != NULL); - fvdbg("Callback %p(%p) cbevents: %02x cdstatus: %02x\n", + mcinfo("Callback %p(%p) cbevents: %02x cdstatus: %02x\n", priv->callback, priv->cbarg, priv->cbevents, priv->cdstatus); flags = enter_critical_section(); @@ -3213,17 +3217,17 @@ static void sam_callback(void *arg) { /* NOTE: Currently, work_cancel only returns success */ - fdbg("ERROR: Failed to cancel work: %d\n", ret); + mcerr("ERROR: Failed to cancel work: %d\n", ret); } - fllvdbg("Queuing callback to %p(%p)\n", priv->callback, priv->cbarg); + mcinfo("Queuing callback to %p(%p)\n", priv->callback, priv->cbarg); ret = work_queue(LPWORK, &priv->cbwork, (worker_t)priv->callback, priv->cbarg, 0); if (ret < 0) { /* NOTE: Currently, work_queue only returns success */ - fdbg("ERROR: Failed to schedule work: %d\n", ret); + mcerr("ERROR: Failed to schedule work: %d\n", ret); } } @@ -3261,7 +3265,7 @@ FAR struct sdio_dev_s *sdio_initialize(int slotno) * for now, an* HSMCI peripheral does correspond to a slot. */ - fvdbg("slotno: %d\n", slotno); + mcinfo("slotno: %d\n", slotno); #ifdef CONFIG_SAMV7_HSMCI0 if (slotno == 0) @@ -3344,7 +3348,7 @@ FAR struct sdio_dev_s *sdio_initialize(int slotno) return NULL; } - fvdbg("priv: %p base: %08x hsmci: %d pid: %d\n", + mcinfo("priv: %p base: %08x hsmci: %d pid: %d\n", priv, priv->base, priv->hsmci, pid); /* Initialize the HSMCI slot structure */ @@ -3414,7 +3418,7 @@ void sdio_mediachange(FAR struct sdio_dev_s *dev, bool cardinslot) priv->cdstatus &= ~SDIO_STATUS_PRESENT; } - fllvdbg("cdstatus OLD: %02x NEW: %02x\n", cdstatus, priv->cdstatus); + mcinfo("cdstatus OLD: %02x NEW: %02x\n", cdstatus, priv->cdstatus); /* Perform any requested callback if the status has changed */ @@ -3459,7 +3463,7 @@ void sdio_wrprotect(FAR struct sdio_dev_s *dev, bool wrprotect) priv->cdstatus &= ~SDIO_STATUS_WRPROTECTED; } - fvdbg("cdstatus: %02x\n", priv->cdstatus); + mcinfo("cdstatus: %02x\n", priv->cdstatus); leave_critical_section(flags); } diff --git a/arch/arm/src/samv7/sam_irq.c b/arch/arm/src/samv7/sam_irq.c index 963b87db1daec5e15a714b763fb355068426c2e1..08537f65970950d13d58aa5c1a0c299a6c22323a 100644 --- a/arch/arm/src/samv7/sam_irq.c +++ b/arch/arm/src/samv7/sam_irq.c @@ -108,52 +108,54 @@ extern uint32_t _vectors[]; * ****************************************************************************/ -#if defined(CONFIG_DEBUG_IRQ) +#if defined(CONFIG_DEBUG_IRQ_INFO) static void sam_dumpnvic(const char *msg, int irq) { irqstate_t flags; flags = enter_critical_section(); - lldbg("NVIC (%s, irq=%d):\n", msg, irq); - lldbg(" INTCTRL: %08x VECTAB: %08x\n", + + irqinfo("NVIC (%s, irq=%d):\n", msg, irq); + irqinfo(" INTCTRL: %08x VECTAB: %08x\n", getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB)); #if 0 - lldbg(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n", - getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA), - getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE)); + irqinfo(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n", + getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA), + getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE)); #endif - lldbg(" IRQ ENABLE: %08x %08x %08x\n", - getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE), - getreg32(NVIC_IRQ64_95_ENABLE)); - lldbg(" SYSH_PRIO: %08x %08x %08x\n", - getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY), - getreg32(NVIC_SYSH12_15_PRIORITY)); - lldbg(" IRQ PRIO: %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY), - getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY)); + irqinfo(" IRQ ENABLE: %08x %08x %08x\n", + getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE), + getreg32(NVIC_IRQ64_95_ENABLE)); + irqinfo(" SYSH_PRIO: %08x %08x %08x\n", + getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY), + getreg32(NVIC_SYSH12_15_PRIORITY)); + irqinfo(" IRQ PRIO: %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY), + getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY)); #if SAM_IRQ_NEXTINT > 15 - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY), - getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY), + getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY)); #endif #if SAM_IRQ_NEXTINT > 31 - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY), - getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY), + getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY)); #endif #if SAM_IRQ_NEXTINT > 47 - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ48_51_PRIORITY), getreg32(NVIC_IRQ52_55_PRIORITY), - getreg32(NVIC_IRQ56_59_PRIORITY), getreg32(NVIC_IRQ60_63_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ48_51_PRIORITY), getreg32(NVIC_IRQ52_55_PRIORITY), + getreg32(NVIC_IRQ56_59_PRIORITY), getreg32(NVIC_IRQ60_63_PRIORITY)); #endif #if SAM_IRQ_NEXTINT > 63 - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ64_67_PRIORITY), getreg32(NVIC_IRQ68_71_PRIORITY), - getreg32(NVIC_IRQ72_75_PRIORITY), getreg32(NVIC_IRQ76_79_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ64_67_PRIORITY), getreg32(NVIC_IRQ68_71_PRIORITY), + getreg32(NVIC_IRQ72_75_PRIORITY), getreg32(NVIC_IRQ76_79_PRIORITY)); #endif #if SAM_IRQ_NEXTINT > 79 # warning Missing logic #endif + leave_critical_section(flags); } #else @@ -171,11 +173,11 @@ static void sam_dumpnvic(const char *msg, int irq) * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES static int sam_nmi(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! NMI received\n"); + _err("PANIC!!! NMI received\n"); PANIC(); return 0; } @@ -183,7 +185,7 @@ static int sam_nmi(int irq, FAR void *context) static int sam_busfault(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS)); + _err("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS)); PANIC(); return 0; } @@ -191,7 +193,7 @@ static int sam_busfault(int irq, FAR void *context) static int sam_usagefault(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS)); + _err("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS)); PANIC(); return 0; } @@ -199,7 +201,7 @@ static int sam_usagefault(int irq, FAR void *context) static int sam_pendsv(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! PendSV received\n"); + _err("PANIC!!! PendSV received\n"); PANIC(); return 0; } @@ -207,7 +209,7 @@ static int sam_pendsv(int irq, FAR void *context) static int sam_dbgmonitor(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Debug Monitor received\n"); + _err("PANIC!!! Debug Monitor received\n"); PANIC(); return 0; } @@ -215,7 +217,7 @@ static int sam_dbgmonitor(int irq, FAR void *context) static int sam_reserved(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Reserved interrupt\n"); + _err("PANIC!!! Reserved interrupt\n"); PANIC(); return 0; } @@ -456,7 +458,7 @@ void up_irqinitialize(void) /* Attach all other processor exceptions (except reset and sys tick) */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES irq_attach(SAM_IRQ_NMI, sam_nmi); #ifndef CONFIG_ARM_MPU irq_attach(SAM_IRQ_MEMFAULT, up_memfault); diff --git a/arch/arm/src/samv7/sam_mcan.c b/arch/arm/src/samv7/sam_mcan.c index f1f8f788a2f3107cb946d7f666d8a8b1b1d2414c..2091390cab257f0bdd125995525bd9da35316e72 100644 --- a/arch/arm/src/samv7/sam_mcan.c +++ b/arch/arm/src/samv7/sam_mcan.c @@ -789,28 +789,14 @@ /* Debug ********************************************************************/ /* Debug configurations that may be enabled just for testing MCAN */ -#if !defined(CONFIG_DEBUG) || !defined(CONFIG_DEBUG_CAN) +#ifndef CONFIG_DEBUG_CAN_INFO # undef CONFIG_SAMV7_MCAN_REGDEBUG #endif -#ifdef CONFIG_DEBUG_CAN -# define candbg dbg -# define canvdbg vdbg -# define canlldbg lldbg -# define canllvdbg llvdbg - -# ifdef CONFIG_SAMV7_MCAN_REGDEBUG -# define canregdbg lldbg -# else -# define canregdbg(x...) -# endif - +#ifdef CONFIG_SAMV7_MCAN_REGDEBUG +# define reginfo caninfo #else -# define candbg(x...) -# define canvdbg(x...) -# define canlldbg(x...) -# define canllvdbg(x...) -# define canregdbg(x...) +# define reginfo(x...) #endif /**************************************************************************** @@ -1209,7 +1195,7 @@ static uint32_t mcan_getreg(FAR struct sam_mcan_s *priv, int offset) { if (priv->count == 4) { - lldbg("...\n"); + caninfo("...\n"); } return regval; @@ -1226,7 +1212,7 @@ static uint32_t mcan_getreg(FAR struct sam_mcan_s *priv, int offset) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", priv->count - 3); + caninfo("[repeats %d more times]\n", priv->count - 3); } /* Save the new address, value, and count */ @@ -1238,7 +1224,7 @@ static uint32_t mcan_getreg(FAR struct sam_mcan_s *priv, int offset) /* Show the register value read */ - lldbg("%08x->%08x\n", regaddr, regval); + caninfo("%08x->%08x\n", regaddr, regval); return regval; } @@ -1275,7 +1261,7 @@ static void mcan_putreg(FAR struct sam_mcan_s *priv, int offset, uint32_t regval /* Show the register value being written */ - lldbg("%08x<-%08x\n", regaddr, regval); + caninfo("%08x<-%08x\n", regaddr, regval); /* Write the value */ @@ -1310,74 +1296,74 @@ static void mcan_dumpregs(FAR struct sam_mcan_s *priv, FAR const char *msg) { FAR const struct sam_config_s *config = priv->config; - lldbg("MCAN%d Registers: %s\n", config->port, msg); - lldbg(" Base: %08x\n", config->base); - - lldbg(" CUST: %08x FBTP: %08x TEST: %08x RWD: %08x\n", - getreg32(config->base + SAM_MCAN_CUST_OFFSET), - getreg32(config->base + SAM_MCAN_FBTP_OFFSET), - getreg32(config->base + SAM_MCAN_TEST_OFFSET), - getreg32(config->base + SAM_MCAN_RWD_OFFSET)); - - lldbg(" CCCR: %08x BTP: %08x TSCC: %08x TSCV: %08x\n", - getreg32(config->base + SAM_MCAN_CCCR_OFFSET), - getreg32(config->base + SAM_MCAN_BTP_OFFSET), - getreg32(config->base + SAM_MCAN_TSCC_OFFSET), - getreg32(config->base + SAM_MCAN_TSCV_OFFSET)); - - lldbg(" TOCC: %08x TOCV: %08x ECR: %08x PSR: %08x\n", - getreg32(config->base + SAM_MCAN_TOCC_OFFSET), - getreg32(config->base + SAM_MCAN_TOCV_OFFSET), - getreg32(config->base + SAM_MCAN_ECR_OFFSET), - getreg32(config->base + SAM_MCAN_PSR_OFFSET)); - - lldbg(" IR: %08x IE: %08x ILS: %08x ILE: %08x\n", - getreg32(config->base + SAM_MCAN_IR_OFFSET), - getreg32(config->base + SAM_MCAN_IE_OFFSET), - getreg32(config->base + SAM_MCAN_ILS_OFFSET), - getreg32(config->base + SAM_MCAN_ILE_OFFSET)); - - lldbg(" GFC: %08x SIDFC: %08x XIDFC: %08x XIDAM: %08x\n", - getreg32(config->base + SAM_MCAN_GFC_OFFSET), - getreg32(config->base + SAM_MCAN_SIDFC_OFFSET), - getreg32(config->base + SAM_MCAN_XIDFC_OFFSET), - getreg32(config->base + SAM_MCAN_XIDAM_OFFSET)); - - lldbg(" HPMS: %08x NDAT1: %08x NDAT2: %08x RXF0C: %08x\n", - getreg32(config->base + SAM_MCAN_HPMS_OFFSET), - getreg32(config->base + SAM_MCAN_NDAT1_OFFSET), - getreg32(config->base + SAM_MCAN_NDAT2_OFFSET), - getreg32(config->base + SAM_MCAN_RXF0C_OFFSET)); - - lldbg(" RXF0S: %08x FXF0A: %08x RXBC: %08x RXF1C: %08x\n", - getreg32(config->base + SAM_MCAN_RXF0S_OFFSET), - getreg32(config->base + SAM_MCAN_RXF0A_OFFSET), - getreg32(config->base + SAM_MCAN_RXBC_OFFSET), - getreg32(config->base + SAM_MCAN_RXF1C_OFFSET)); - - lldbg(" RXF1S: %08x FXF1A: %08x RXESC: %08x TXBC: %08x\n", - getreg32(config->base + SAM_MCAN_RXF1S_OFFSET), - getreg32(config->base + SAM_MCAN_RXF1A_OFFSET), - getreg32(config->base + SAM_MCAN_RXESC_OFFSET), - getreg32(config->base + SAM_MCAN_TXBC_OFFSET)); - - lldbg(" TXFQS: %08x TXESC: %08x TXBRP: %08x TXBAR: %08x\n", - getreg32(config->base + SAM_MCAN_TXFQS_OFFSET), - getreg32(config->base + SAM_MCAN_TXESC_OFFSET), - getreg32(config->base + SAM_MCAN_TXBRP_OFFSET), - getreg32(config->base + SAM_MCAN_TXBAR_OFFSET)); - - lldbg(" TXBCR: %08x TXBTO: %08x TXBCF: %08x TXBTIE: %08x\n", - getreg32(config->base + SAM_MCAN_TXBCR_OFFSET), - getreg32(config->base + SAM_MCAN_TXBTO_OFFSET), - getreg32(config->base + SAM_MCAN_TXBCF_OFFSET), - getreg32(config->base + SAM_MCAN_TXBTIE_OFFSET)); - - lldbg("TXBCIE: %08x TXEFC: %08x TXEFS: %08x TXEFA: %08x\n", - getreg32(config->base + SAM_MCAN_TXBCIE_OFFSET), - getreg32(config->base + SAM_MCAN_TXEFC_OFFSET), - getreg32(config->base + SAM_MCAN_TXEFS_OFFSET), - getreg32(config->base + SAM_MCAN_TXEFA_OFFSET)); + caninfo("MCAN%d Registers: %s\n", config->port, msg); + caninfo(" Base: %08x\n", config->base); + + caninfo(" CUST: %08x FBTP: %08x TEST: %08x RWD: %08x\n", + getreg32(config->base + SAM_MCAN_CUST_OFFSET), + getreg32(config->base + SAM_MCAN_FBTP_OFFSET), + getreg32(config->base + SAM_MCAN_TEST_OFFSET), + getreg32(config->base + SAM_MCAN_RWD_OFFSET)); + + caninfo(" CCCR: %08x BTP: %08x TSCC: %08x TSCV: %08x\n", + getreg32(config->base + SAM_MCAN_CCCR_OFFSET), + getreg32(config->base + SAM_MCAN_BTP_OFFSET), + getreg32(config->base + SAM_MCAN_TSCC_OFFSET), + getreg32(config->base + SAM_MCAN_TSCV_OFFSET)); + + caninfo(" TOCC: %08x TOCV: %08x ECR: %08x PSR: %08x\n", + getreg32(config->base + SAM_MCAN_TOCC_OFFSET), + getreg32(config->base + SAM_MCAN_TOCV_OFFSET), + getreg32(config->base + SAM_MCAN_ECR_OFFSET), + getreg32(config->base + SAM_MCAN_PSR_OFFSET)); + + caninfo(" IR: %08x IE: %08x ILS: %08x ILE: %08x\n", + getreg32(config->base + SAM_MCAN_IR_OFFSET), + getreg32(config->base + SAM_MCAN_IE_OFFSET), + getreg32(config->base + SAM_MCAN_ILS_OFFSET), + getreg32(config->base + SAM_MCAN_ILE_OFFSET)); + + caninfo(" GFC: %08x SIDFC: %08x XIDFC: %08x XIDAM: %08x\n", + getreg32(config->base + SAM_MCAN_GFC_OFFSET), + getreg32(config->base + SAM_MCAN_SIDFC_OFFSET), + getreg32(config->base + SAM_MCAN_XIDFC_OFFSET), + getreg32(config->base + SAM_MCAN_XIDAM_OFFSET)); + + caninfo(" HPMS: %08x NDAT1: %08x NDAT2: %08x RXF0C: %08x\n", + getreg32(config->base + SAM_MCAN_HPMS_OFFSET), + getreg32(config->base + SAM_MCAN_NDAT1_OFFSET), + getreg32(config->base + SAM_MCAN_NDAT2_OFFSET), + getreg32(config->base + SAM_MCAN_RXF0C_OFFSET)); + + caninfo(" RXF0S: %08x FXF0A: %08x RXBC: %08x RXF1C: %08x\n", + getreg32(config->base + SAM_MCAN_RXF0S_OFFSET), + getreg32(config->base + SAM_MCAN_RXF0A_OFFSET), + getreg32(config->base + SAM_MCAN_RXBC_OFFSET), + getreg32(config->base + SAM_MCAN_RXF1C_OFFSET)); + + caninfo(" RXF1S: %08x FXF1A: %08x RXESC: %08x TXBC: %08x\n", + getreg32(config->base + SAM_MCAN_RXF1S_OFFSET), + getreg32(config->base + SAM_MCAN_RXF1A_OFFSET), + getreg32(config->base + SAM_MCAN_RXESC_OFFSET), + getreg32(config->base + SAM_MCAN_TXBC_OFFSET)); + + caninfo(" TXFQS: %08x TXESC: %08x TXBRP: %08x TXBAR: %08x\n", + getreg32(config->base + SAM_MCAN_TXFQS_OFFSET), + getreg32(config->base + SAM_MCAN_TXESC_OFFSET), + getreg32(config->base + SAM_MCAN_TXBRP_OFFSET), + getreg32(config->base + SAM_MCAN_TXBAR_OFFSET)); + + caninfo(" TXBCR: %08x TXBTO: %08x TXBCF: %08x TXBTIE: %08x\n", + getreg32(config->base + SAM_MCAN_TXBCR_OFFSET), + getreg32(config->base + SAM_MCAN_TXBTO_OFFSET), + getreg32(config->base + SAM_MCAN_TXBCF_OFFSET), + getreg32(config->base + SAM_MCAN_TXBTIE_OFFSET)); + + caninfo("TXBCIE: %08x TXEFC: %08x TXEFS: %08x TXEFA: %08x\n", + getreg32(config->base + SAM_MCAN_TXBCIE_OFFSET), + getreg32(config->base + SAM_MCAN_TXEFC_OFFSET), + getreg32(config->base + SAM_MCAN_TXEFS_OFFSET), + getreg32(config->base + SAM_MCAN_TXEFA_OFFSET)); } #endif @@ -1502,7 +1488,7 @@ static void mcan_buffer_reserve(FAR struct sam_mcan_s *priv) if (sval > 0) { - candbg("ERROR: TX FIFOQ full but txfsem is %d\n", sval); + canerr("ERROR: TX FIFOQ full but txfsem is %d\n", sval); sem_reset(&priv->txfsem, 0); } } @@ -1520,7 +1506,7 @@ static void mcan_buffer_reserve(FAR struct sam_mcan_s *priv) else if (sval <= 0) { - candbg("ERROR: TX FIFOQ not full but txfsem is %d\n", sval); + canerr("ERROR: TX FIFOQ not full but txfsem is %d\n", sval); /* Less than zero means that another thread is waiting */ @@ -1551,7 +1537,7 @@ static void mcan_buffer_reserve(FAR struct sam_mcan_s *priv) if (tffl > priv->config->ntxfifoq) { - candbg("ERROR: TX FIFO reports %d but max is %d\n", + canerr("ERROR: TX FIFO reports %d but max is %d\n", tffl, priv->config->ntxfifoq); tffl = priv->config->ntxfifoq; } @@ -1564,7 +1550,7 @@ static void mcan_buffer_reserve(FAR struct sam_mcan_s *priv) if (sval != tffl) { - candbg("ERROR: TX FIFO reports %d but txfsem is %d\n", tffl, sval); + canerr("ERROR: TX FIFO reports %d but txfsem is %d\n", tffl, sval); /* Reset the semaphore count to the Tx FIFO free level. */ @@ -1620,7 +1606,7 @@ static void mcan_buffer_release(FAR struct sam_mcan_s *priv) } else { - candbg("ERROR: txfsem would increment beyond %d\n", + canerr("ERROR: txfsem would increment beyond %d\n", priv->config->ntxfifoq); } } @@ -2151,7 +2137,7 @@ static void mcan_reset(FAR struct can_dev_s *dev) config = priv->config; DEBUGASSERT(config); - canllvdbg("MCAN%d\n", config->port); + caninfo("MCAN%d\n", config->port); UNUSED(config); /* Get exclusive access to the MCAN peripheral */ @@ -2208,7 +2194,7 @@ static int mcan_setup(FAR struct can_dev_s *dev) config = priv->config; DEBUGASSERT(config); - canllvdbg("MCAN%d pid: %d\n", config->port, config->pid); + caninfo("MCAN%d pid: %d\n", config->port, config->pid); /* Get exclusive access to the MCAN peripheral */ @@ -2219,7 +2205,7 @@ static int mcan_setup(FAR struct can_dev_s *dev) ret = mcan_hw_initialize(priv); if (ret < 0) { - canlldbg("MCAN%d H/W initialization failed: %d\n", config->port, ret); + canerr("ERROR: MCAN%d H/W initialization failed: %d\n", config->port, ret); return ret; } @@ -2230,7 +2216,7 @@ static int mcan_setup(FAR struct can_dev_s *dev) ret = irq_attach(config->irq0, config->handler); if (ret < 0) { - canlldbg("Failed to attach MCAN%d line 0 IRQ (%d)", + canerr("ERROR: Failed to attach MCAN%d line 0 IRQ (%d)", config->port, config->irq0); return ret; } @@ -2238,7 +2224,7 @@ static int mcan_setup(FAR struct can_dev_s *dev) ret = irq_attach(config->irq1, config->handler); if (ret < 0) { - canlldbg("Failed to attach MCAN%d line 1 IRQ (%d)", + canerr("ERROR: Failed to attach MCAN%d line 1 IRQ (%d)", config->port, config->irq1); return ret; } @@ -2285,7 +2271,7 @@ static void mcan_shutdown(FAR struct can_dev_s *dev) config = priv->config; DEBUGASSERT(config); - canllvdbg("MCAN%d\n", config->port); + caninfo("MCAN%d\n", config->port); /* Get exclusive access to the MCAN peripheral */ @@ -2334,7 +2320,7 @@ static void mcan_rxint(FAR struct can_dev_s *dev, bool enable) DEBUGASSERT(priv && priv->config); - canllvdbg("MCAN%d enable: %d\n", priv->config->port, enable); + caninfo("MCAN%d enable: %d\n", priv->config->port, enable); /* Enable/disable the receive interrupts */ @@ -2376,7 +2362,7 @@ static void mcan_txint(FAR struct can_dev_s *dev, bool enable) DEBUGASSERT(priv && priv->config); - canllvdbg("MCAN%d enable: %d\n", priv->config->port, enable); + caninfo("MCAN%d enable: %d\n", priv->config->port, enable); /* Enable/disable the receive interrupts */ @@ -2415,7 +2401,7 @@ static int mcan_ioctl(FAR struct can_dev_s *dev, int cmd, unsigned long arg) FAR struct sam_mcan_s *priv; int ret = -ENOTTY; - canvdbg("cmd=%04x arg=%lu\n", cmd, arg); + caninfo("cmd=%04x arg=%lu\n", cmd, arg); DEBUGASSERT(dev && dev->cd_priv); priv = dev->cd_priv; @@ -2612,12 +2598,10 @@ static int mcan_ioctl(FAR struct can_dev_s *dev, int cmd, unsigned long arg) /* Unsupported/unrecognized command */ default: - candbg("ERROR: Unrecognized command: %04x\n", cmd); + canerr("ERROR: Unrecognized command: %04x\n", cmd); break; } - /* No CAN ioctls are supported */ - return ret; } @@ -2683,9 +2667,9 @@ static int mcan_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg) DEBUGASSERT(priv && priv->config); config = priv->config; - canllvdbg("MCAN%d\n", config->port); - canllvdbg("MCAN%d ID: %d DLC: %d\n", - config->port, msg->cm_hdr.ch_id, msg->cm_hdr.ch_dlc); + caninfo("MCAN%d\n", config->port); + caninfo("MCAN%d ID: %d DLC: %d\n", + config->port, msg->cm_hdr.ch_id, msg->cm_hdr.ch_dlc); /* That that FIFO elements were configured. * @@ -2756,7 +2740,7 @@ static int mcan_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg) } txbuffer[0] = regval; - canregdbg("T0: %08x\n", regval); + reginfo("T0: %08x\n", regval); /* Format word T1: * Data Length Code (DLC) - Value from message structure @@ -2765,7 +2749,7 @@ static int mcan_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg) */ txbuffer[1] = BUFFER_R1_DLC(msg->cm_hdr.ch_dlc); - canregdbg("T1: %08x\n", txbuffer[1]); + reginfo("T1: %08x\n", txbuffer[1]); /* Followed by the amount of data corresponding to the DLC (T2..) */ @@ -2829,7 +2813,7 @@ static bool mcan_txready(FAR struct can_dev_s *dev) FAR struct sam_mcan_s *priv = dev->cd_priv; uint32_t regval; bool notfull; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES int sval; #endif @@ -2846,7 +2830,7 @@ static bool mcan_txready(FAR struct can_dev_s *dev) regval = mcan_getreg(priv, SAM_MCAN_TXFQS_OFFSET); notfull = ((regval & MCAN_TXFQS_TFQF) == 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* As a sanity check, the txfsem should also track the number of elements * the TX FIFO/queue. Make sure that they are consistent. */ @@ -2905,6 +2889,7 @@ static bool mcan_txempty(FAR struct can_dev_s *dev) regval = mcan_getreg(priv, SAM_MCAN_TXFQS_OFFSET); if (((regval & MCAN_TXFQS_TFQF) != 0)) { + mcan_dev_unlock(priv); return false; } @@ -3154,7 +3139,7 @@ static void mcan_error(FAR struct can_dev_s *dev, uint32_t status, ret = can_receive(dev, &hdr, data); if (ret < 0) { - canlldbg("ERROR: can_receive failed: %d\n", ret); + canerr("ERROR: can_receive failed: %d\n", ret); } } } @@ -3193,7 +3178,7 @@ static void mcan_receive(FAR struct can_dev_s *dev, FAR uint32_t *rxbuffer, /* Work R0 contains the CAN ID */ regval = *rxbuffer++; - canregdbg("R0: %08x\n", regval); + reginfo("R0: %08x\n", regval); #ifdef CONFIG_CAN_ERRORS hdr.ch_error = 0; @@ -3239,7 +3224,7 @@ static void mcan_receive(FAR struct can_dev_s *dev, FAR uint32_t *rxbuffer, /* Word R1 contains the DLC and timestamp */ regval = *rxbuffer++; - canregdbg("R1: %08x\n", regval); + reginfo("R1: %08x\n", regval); hdr.ch_dlc = (regval & BUFFER_R1_DLC_MASK) >> BUFFER_R1_DLC_SHIFT; @@ -3248,7 +3233,7 @@ static void mcan_receive(FAR struct can_dev_s *dev, FAR uint32_t *rxbuffer, ret = can_receive(dev, &hdr, (FAR uint8_t *)rxbuffer); if (ret < 0) { - canlldbg("ERROR: can_receive failed: %d\n", ret); + canerr("ERROR: can_receive failed: %d\n", ret); } } @@ -3301,7 +3286,7 @@ static void mcan_interrupt(FAR struct can_dev_s *dev) if ((pending & MCAN_CMNERR_INTS) != 0) { - canlldbg("ERROR: Common %08x\n", pending & MCAN_CMNERR_INTS); + canerr("ERROR: Common %08x\n", pending & MCAN_CMNERR_INTS); /* Clear the error indications */ @@ -3312,7 +3297,7 @@ static void mcan_interrupt(FAR struct can_dev_s *dev) if ((pending & MCAN_TXERR_INTS) != 0) { - canlldbg("ERROR: TX %08x\n", pending & MCAN_TXERR_INTS); + canerr("ERROR: TX %08x\n", pending & MCAN_TXERR_INTS); /* Clear the error indications */ @@ -3333,7 +3318,7 @@ static void mcan_interrupt(FAR struct can_dev_s *dev) if ((pending & MCAN_RXERR_INTS) != 0) { - canlldbg("ERROR: RX %08x\n", pending & MCAN_RXERR_INTS); + canerr("ERROR: RX %08x\n", pending & MCAN_RXERR_INTS); /* Clear the error indications */ @@ -3354,7 +3339,7 @@ static void mcan_interrupt(FAR struct can_dev_s *dev) { /* All (old) errors cleared */ - canlldbg("ERROR: CLEARED\n"); + canerr("ERROR: CLEARED\n"); mcan_error(dev, 0, priv->olderrors); @@ -3479,7 +3464,7 @@ static void mcan_interrupt(FAR struct can_dev_s *dev) if ((regval & MCAN_RXF0S_RF0L) != 0) { - canlldbg("ERROR: Message lost: %08x\n", regval); + canerr("ERROR: Message lost: %08x\n", regval); } else { @@ -3513,7 +3498,7 @@ static void mcan_interrupt(FAR struct can_dev_s *dev) if ((regval & MCAN_RXF0S_RF0L) != 0) { - canlldbg("ERROR: Message lost: %08x\n", regval); + canerr("ERROR: Message lost: %08x\n", regval); } else { @@ -3607,7 +3592,7 @@ static int mcan_hw_initialize(struct sam_mcan_s *priv) uint32_t cntr; uint32_t cmr; - canllvdbg("MCAN%d\n", config->port); + caninfo("MCAN%d\n", config->port); /* Configure MCAN pins */ @@ -3882,7 +3867,7 @@ FAR struct can_dev_s *sam_mcan_initialize(int port) FAR const struct sam_config_s *config; uint32_t regval; - canvdbg("MCAN%d\n", port); + caninfo("MCAN%d\n", port); /* Select PCK5 clock source and pre-scaler value. Both MCAN controllers * use PCK5 to derive bit rate. @@ -3934,7 +3919,7 @@ FAR struct can_dev_s *sam_mcan_initialize(int port) else #endif { - candbg("ERROR: Unsupported port %d\n", port); + canerr("ERROR: Unsupported port %d\n", port); return NULL; } diff --git a/arch/arm/src/samv7/sam_oneshot.c b/arch/arm/src/samv7/sam_oneshot.c index 76c4ee1a41b418c310ba3df047ba2413c29f9b3a..4ee2467a61ed967fa3abe15f5720792392c1f458 100644 --- a/arch/arm/src/samv7/sam_oneshot.c +++ b/arch/arm/src/samv7/sam_oneshot.c @@ -109,7 +109,7 @@ static void sam_oneshot_handler(TC_HANDLE tch, void *arg, uint32_t sr) oneshot_handler_t oneshot_handler; void *oneshot_arg; - tcllvdbg("Expired...\n"); + tmrinfo("Expired...\n"); DEBUGASSERT(oneshot && oneshot->handler); /* The clock was stopped, but not disabled when the RC match occurred. @@ -166,7 +166,7 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, uint32_t cmr; int ret; - tcvdbg("chan=%d resolution=%d usec\n", chan, resolution); + tmrinfo("chan=%d resolution=%d usec\n", chan, resolution); DEBUGASSERT(oneshot && resolution > 0); /* Get the TC frequency the corresponds to the requested resolution */ @@ -178,13 +178,13 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, ret = sam_tc_clockselect(frequency, &cmr, &actual); if (ret < 0) { - tcdbg("ERROR: sam_tc_clockselect failed: %d\n", ret); + tmrerr("ERROR: sam_tc_clockselect failed: %d\n", ret); return ret; } - tcvdbg("frequency=%lu, actual=%lu, cmr=%08lx\n", - (unsigned long)frequency, (unsigned long)actual, - (unsigned long)cmr); + tmrinfo("frequency=%lu, actual=%lu, cmr=%08lx\n", + (unsigned long)frequency, (unsigned long)actual, + (unsigned long)cmr); /* Allocate the timer/counter and select its mode of operation * @@ -218,7 +218,7 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, oneshot->tch = sam_tc_allocate(chan, cmr); if (!oneshot->tch) { - tcdbg("ERROR: Failed to allocate timer channel %d\n", chan); + tmrerr("ERROR: Failed to allocate timer channel %d\n", chan); return -EBUSY; } @@ -261,8 +261,8 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer uint64_t regval; irqstate_t flags; - tcvdbg("handler=%p arg=%p, ts=(%lu, %lu)\n", - handler, arg, (unsigned long)ts->tv_sec, (unsigned long)ts->tv_nsec); + tmrinfo("handler=%p arg=%p, ts=(%lu, %lu)\n", + handler, arg, (unsigned long)ts->tv_sec, (unsigned long)ts->tv_nsec); DEBUGASSERT(oneshot && handler && ts); /* Was the oneshot already running? */ @@ -272,7 +272,7 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer { /* Yes.. then cancel it */ - tcvdbg("Already running... cancelling\n"); + tmrinfo("Already running... cancelling\n"); (void)sam_oneshot_cancel(oneshot, freerun, NULL); } @@ -294,7 +294,7 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer regval = (usec * (uint64_t)sam_tc_divfreq(oneshot->tch)) / USEC_PER_SEC; - tcvdbg("usec=%llu regval=%08llx\n", usec, regval); + tmrinfo("usec=%llu regval=%08llx\n", usec, regval); DEBUGASSERT(regval <= UINT16_MAX); /* Set up to receive the callback when the interrupt occurs */ @@ -403,7 +403,7 @@ int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *free * REVISIT: This does not appear to be the case. */ - tcvdbg("Cancelling...\n"); + tmrinfo("Cancelling...\n"); count = sam_tc_getcounter(oneshot->tch); rc = sam_tc_getregister(oneshot->tch, TC_REGC); @@ -439,8 +439,8 @@ int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *free * oneshot timer. */ - tcvdbg("rc=%lu count=%lu usec=%lu\n", - (unsigned long)rc, (unsigned long)count, (unsigned long)usec); + tmrinfo("rc=%lu count=%lu usec=%lu\n", + (unsigned long)rc, (unsigned long)count, (unsigned long)usec); /* REVISIT: I am not certain why the timer counter value sometimes * exceeds RC. Might be a bug, or perhaps the counter does not stop @@ -484,8 +484,8 @@ int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *free ts->tv_nsec = (unsigned long)nsec; } - tcvdbg("remaining (%lu, %lu)\n", - (unsigned long)ts->tv_sec, (unsigned long)ts->tv_nsec); + tmrinfo("remaining (%lu, %lu)\n", + (unsigned long)ts->tv_sec, (unsigned long)ts->tv_nsec); } return OK; diff --git a/arch/arm/src/samv7/sam_pck.c b/arch/arm/src/samv7/sam_pck.c index c4dc27d0295f051496b6ffe238810cfce2e636a4..3511d0d9ce9c2ad7a24e9f637ab18ae5ae3e5c10 100644 --- a/arch/arm/src/samv7/sam_pck.c +++ b/arch/arm/src/samv7/sam_pck.c @@ -128,7 +128,7 @@ uint32_t sam_pck_configure(enum pckid_e pckid, enum pckid_clksrc_e clksrc, break; default: - dbg("ERROR: Unknown clock source\n"); + _err("ERROR: Unknown clock source\n"); return 0; } @@ -272,7 +272,7 @@ uint32_t sam_pck_frequency(enum pckid_e pckid) break; default: - dbg("ERROR: Unknown clock source\n"); + _err("ERROR: Unknown clock source\n"); return 0; } diff --git a/arch/arm/src/samv7/sam_qspi.c b/arch/arm/src/samv7/sam_qspi.c index e63a6ce22b16a6419c1e71181d49e465bb260caf..b90a515d8b00efb6f645a5010076e2d0317b33b3 100644 --- a/arch/arm/src/samv7/sam_qspi.c +++ b/arch/arm/src/samv7/sam_qspi.c @@ -85,6 +85,10 @@ # define CONFIG_SAMV7_QSPI_DLYBCT 0 #endif +#ifndef CONFIG_DEBUG_SPI_INFO +# undef CONFIG_SAMV7_QSPI_REGDEBUG +#endif + /* When QSPI DMA is enabled, small DMA transfers will still be performed by * polling logic. But we need a threshold value to determine what is small. * That value is provided by CONFIG_SAMV7_QSPI_DMATHRESHOLD. @@ -138,33 +142,12 @@ #define IS_ALIGNED(n) (((uint32_t)(n) & ALIGN_MASK) == 0) /* Debug *******************************************************************/ -/* Check if QSPI debug is enabled (non-standard.. no support in - * include/debug.h - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_SPI -# undef CONFIG_SAMV7_QSPI_DMADEBUG -# undef CONFIG_SAMV7_QSPI_REGDEBUG -#endif +/* Check if QSPI debug is enabled */ #ifndef CONFIG_DEBUG_DMA # undef CONFIG_SAMV7_QSPI_DMADEBUG #endif -#ifdef CONFIG_DEBUG_SPI -# define qspidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define qspivdbg lldbg -# else -# define qspivdbg(x...) -# endif -#else -# define qspidbg(x...) -# define qspivdbg(x...) -#endif - #define DMA_INITIAL 0 #define DMA_AFTER_SETUP 1 #define DMA_AFTER_START 2 @@ -243,7 +226,7 @@ static inline uint32_t qspi_getreg(struct sam_qspidev_s *priv, static inline void qspi_putreg(struct sam_qspidev_s *priv, uint32_t value, unsigned int offset); -#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_SPI_INFO static void qspi_dumpregs(struct sam_qspidev_s *priv, const char *msg); #else # define qspi_dumpregs(priv,msg) @@ -395,7 +378,7 @@ static bool qspi_checkreg(struct sam_qspidev_s *priv, bool wr, uint32_t value, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", priv->ntimes); + spiinfo("...[Repeats %d times]...\n", priv->ntimes); } /* Save information about the new access */ @@ -429,7 +412,7 @@ static inline uint32_t qspi_getreg(struct sam_qspidev_s *priv, #ifdef CONFIG_SAMV7_QSPI_REGDEBUG if (qspi_checkreg(priv, false, value, address)) { - lldbg("%08x->%08x\n", address, value); + spiinfo("%08x->%08x\n", address, value); } #endif @@ -452,7 +435,7 @@ static inline void qspi_putreg(struct sam_qspidev_s *priv, uint32_t value, #ifdef CONFIG_SAMV7_QSPI_REGDEBUG if (qspi_checkreg(priv, true, value, address)) { - lldbg("%08x<-%08x\n", address, value); + spiinfo("%08x<-%08x\n", address, value); } #endif @@ -474,23 +457,23 @@ static inline void qspi_putreg(struct sam_qspidev_s *priv, uint32_t value, * ****************************************************************************/ -#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_SPI_INFO static void qspi_dumpregs(struct sam_qspidev_s *priv, const char *msg) { - qspivdbg("%s:\n", msg); - qspivdbg(" MR:%08x SR:%08x IMR:%08x SCR:%08x\n", - getreg32(priv->base + SAM_QSPI_MR_OFFSET), - getreg32(priv->base + SAM_QSPI_SR_OFFSET), - getreg32(priv->base + SAM_QSPI_IMR_OFFSET), - getreg32(priv->base + SAM_QSPI_SCR_OFFSET)); - qspivdbg(" IAR:%08x ICR:%08x IFR:%08x SMR:%08x\n", - getreg32(priv->base + SAM_QSPI_IAR_OFFSET), - getreg32(priv->base + SAM_QSPI_ICR_OFFSET), - getreg32(priv->base + SAM_QSPI_IFR_OFFSET), - getreg32(priv->base + SAM_QSPI_SMR_OFFSET)); - qspivdbg(" WPCR:%08x WPSR:%08x\n", - getreg32(priv->base + SAM_QSPI_WPCR_OFFSET), - getreg32(priv->base + SAM_QSPI_WPSR_OFFSET)); + spiinfo("%s:\n", msg); + spiinfo(" MR:%08x SR:%08x IMR:%08x SCR:%08x\n", + getreg32(priv->base + SAM_QSPI_MR_OFFSET), + getreg32(priv->base + SAM_QSPI_SR_OFFSET), + getreg32(priv->base + SAM_QSPI_IMR_OFFSET), + getreg32(priv->base + SAM_QSPI_SCR_OFFSET)); + spiinfo(" IAR:%08x ICR:%08x IFR:%08x SMR:%08x\n", + getreg32(priv->base + SAM_QSPI_IAR_OFFSET), + getreg32(priv->base + SAM_QSPI_ICR_OFFSET), + getreg32(priv->base + SAM_QSPI_IFR_OFFSET), + getreg32(priv->base + SAM_QSPI_SMR_OFFSET)); + spiinfo(" WPCR:%08x WPSR:%08x\n", + getreg32(priv->base + SAM_QSPI_WPCR_OFFSET), + getreg32(priv->base + SAM_QSPI_WPSR_OFFSET)); } #endif @@ -866,7 +849,7 @@ static int qspi_memory_dma(struct sam_qspidev_s *priv, if (ret < 0) { - qspidbg("ERROR: DMA setup failed: %d\n", ret); + spierr("ERROR: DMA setup failed: %d\n", ret); return ret; } @@ -882,7 +865,7 @@ static int qspi_memory_dma(struct sam_qspidev_s *priv, ret = sam_dmastart(priv->dmach, qspi_dma_callback, (void *)priv); if (ret < 0) { - qspidbg("ERROR: sam_dmastart failed: %d\n", ret); + spierr("ERROR: sam_dmastart failed: %d\n", ret); return ret; } @@ -903,7 +886,7 @@ static int qspi_memory_dma(struct sam_qspidev_s *priv, (wdentry_t)qspi_dma_timeout, 1, (uint32_t)priv); if (ret != OK) { - qspidbg("ERROR: wd_start failed: %d\n", ret); + spierr("ERROR: wd_start failed: %d\n", ret); } /* Wait for the DMA complete */ @@ -961,7 +944,7 @@ static int qspi_memory_dma(struct sam_qspidev_s *priv, if (priv->result) { - qspidbg("ERROR: DMA failed with result: %d\n", priv->result); + spierr("ERROR: DMA failed with result: %d\n", priv->result); } return priv->result; @@ -1078,7 +1061,7 @@ static int qspi_lock(struct qspi_dev_s *dev, bool lock) { struct sam_qspidev_s *priv = (struct sam_qspidev_s *)dev; - qspivdbg("lock=%d\n", lock); + spiinfo("lock=%d\n", lock); if (lock) { /* Take the semaphore (perhaps waiting) */ @@ -1128,7 +1111,7 @@ static uint32_t qspi_setfrequency(struct qspi_dev_s *dev, uint32_t frequency) #endif uint32_t regval; - qspivdbg("frequency=%d\n", frequency); + spiinfo("frequency=%d\n", frequency); DEBUGASSERT(priv); /* Check if the requested frequency is the same as the frequency selection */ @@ -1215,14 +1198,14 @@ static uint32_t qspi_setfrequency(struct qspi_dev_s *dev, uint32_t frequency) /* Calculate the new actual frequency */ actual = SAM_QSPI_CLOCK / scbr; - qspivdbg("SCBR=%d actual=%d\n", scbr, actual); + spiinfo("SCBR=%d actual=%d\n", scbr, actual); /* Save the frequency setting */ priv->frequency = frequency; priv->actual = actual; - qspivdbg("Frequency %d->%d\n", frequency, actual); + spiinfo("Frequency %d->%d\n", frequency, actual); return actual; } @@ -1246,7 +1229,7 @@ static void qspi_setmode(struct qspi_dev_s *dev, enum qspi_mode_e mode) struct sam_qspidev_s *priv = (struct sam_qspidev_s *)dev; uint32_t regval; - qspivdbg("mode=%d\n", mode); + spiinfo("mode=%d\n", mode); /* Has the mode changed? */ @@ -1288,7 +1271,7 @@ static void qspi_setmode(struct qspi_dev_s *dev, enum qspi_mode_e mode) } qspi_putreg(priv, regval, SAM_QSPI_SCR_OFFSET); - qspivdbg("SCR=%08x\n", regval); + spiinfo("SCR=%08x\n", regval); /* Save the mode so that subsequent re-configurations will be faster */ @@ -1316,7 +1299,7 @@ static void qspi_setbits(struct qspi_dev_s *dev, int nbits) struct sam_qspidev_s *priv = (struct sam_qspidev_s *)dev; uint32_t regval; - qspivdbg("nbits=%d\n", nbits); + spiinfo("nbits=%d\n", nbits); DEBUGASSERT(priv != NULL); DEBUGASSERT(nbits >= SAM_QSPI_MINBITS && nbits <= SAM_QSPI_MAXBITS); @@ -1331,7 +1314,7 @@ static void qspi_setbits(struct qspi_dev_s *dev, int nbits) regval |= QSPI_MR_NBBITS(nbits); qspi_putreg(priv, regval, SAM_QSPI_MR_OFFSET); - qspivdbg("MR=%08x\n", regval); + spiinfo("MR=%08x\n", regval); /* Save the selection so the subsequence re-configurations will be faster */ @@ -1363,21 +1346,21 @@ static int qspi_command(struct qspi_dev_s *dev, DEBUGASSERT(priv != NULL && cmdinfo != NULL); -#ifdef CONFIG_DEBUG_SPI - qspivdbg("Transfer:\n"); - qspivdbg(" flags: %02x\n", cmdinfo->flags); - qspivdbg(" cmd: %04x\n", cmdinfo->cmd); +#ifdef CONFIG_DEBUG_SPI_INFO + spiinfo("Transfer:\n"); + spiinfo(" flags: %02x\n", cmdinfo->flags); + spiinfo(" cmd: %04x\n", cmdinfo->cmd); if (QSPICMD_ISADDRESS(cmdinfo->flags)) { - qspivdbg(" address/length: %08lx/%d\n", + spiinfo(" address/length: %08lx/%d\n", (unsigned long)cmdinfo->addr, cmdinfo->addrlen); } if (QSPICMD_ISDATA(cmdinfo->flags)) { - qspivdbg(" %s Data:\n", QSPICMD_ISWRITE(cmdinfo->flags) ? "Write" : "Read"); - qspivdbg(" buffer/length: %p/%d\n", cmdinfo->buffer, cmdinfo->buflen); + spiinfo(" %s Data:\n", QSPICMD_ISWRITE(cmdinfo->flags) ? "Write" : "Read"); + spiinfo(" buffer/length: %p/%d\n", cmdinfo->buffer, cmdinfo->buflen); } #endif @@ -1572,13 +1555,13 @@ static int qspi_memory(struct qspi_dev_s *dev, DEBUGASSERT(priv != NULL && meminfo != NULL); - qspivdbg("Transfer:\n"); - qspivdbg(" flags: %02x\n", meminfo->flags); - qspivdbg(" cmd: %04x\n", meminfo->cmd); - qspivdbg(" address/length: %08lx/%d\n", - (unsigned long)meminfo->addr, meminfo->addrlen); - qspivdbg(" %s Data:\n", QSPIMEM_ISWRITE(meminfo->flags) ? "Write" : "Read"); - qspivdbg(" buffer/length: %p/%d\n", meminfo->buffer, meminfo->buflen); + spiinfo("Transfer:\n"); + spiinfo(" flags: %02x\n", meminfo->flags); + spiinfo(" cmd: %04x\n", meminfo->cmd); + spiinfo(" address/length: %08lx/%d\n", + (unsigned long)meminfo->addr, meminfo->addrlen); + spiinfo(" %s Data:\n", QSPIMEM_ISWRITE(meminfo->flags) ? "Write" : "Read"); + spiinfo(" buffer/length: %p/%d\n", meminfo->buffer, meminfo->buflen); #ifdef CONFIG_SAMV7_QSPI_DMA /* Can we perform DMA? Should we perform DMA? */ @@ -1746,7 +1729,7 @@ struct qspi_dev_s *sam_qspi_initialize(int intf) /* The supported SAM parts have only a single QSPI port */ - qspivdbg("intf: %d\n", intf); + spiinfo("intf: %d\n", intf); DEBUGASSERT(intf >= 0 && intf < SAMV7_NQSPI); /* Select the QSPI interface */ @@ -1778,7 +1761,7 @@ struct qspi_dev_s *sam_qspi_initialize(int intf) else #endif { - qspidbg("ERROR: QSPI%d not supported\n", intf); + spierr("ERROR: QSPI%d not supported\n", intf); return NULL; } @@ -1801,7 +1784,7 @@ struct qspi_dev_s *sam_qspi_initialize(int intf) priv->dmach = sam_dmachannel(0, 0); if (!priv->dmach) { - qspidbg("ERROR: Failed to allocate the DMA channel\n"); + spierr("ERROR: Failed to allocate the DMA channel\n"); priv->candma = false; } } @@ -1817,7 +1800,7 @@ struct qspi_dev_s *sam_qspi_initialize(int intf) priv->dmadog = wd_create(); if (priv->dmadog == NULL) { - qspidbg("ERROR: Failed to create wdog\n"); + spierr("ERROR: Failed to create wdog\n"); goto errout_with_dmahandles; } #endif @@ -1828,7 +1811,7 @@ struct qspi_dev_s *sam_qspi_initialize(int intf) ret = irq_attach(priv->irq, priv->handler); if (ret < 0) { - qspidbg("ERROR: Failed to attach irq %d\n", priv->irq); + spierr("ERROR: Failed to attach irq %d\n", priv->irq); goto errout_with_dmadog; } #endif @@ -1840,7 +1823,7 @@ struct qspi_dev_s *sam_qspi_initialize(int intf) ret = qspi_hw_initialize(priv); if (ret < 0) { - qspidbg("ERROR: Failed to initialize QSPI hardware\n"); + spierr("ERROR: Failed to initialize QSPI hardware\n"); goto errout_with_irq; } diff --git a/arch/arm/src/samv7/sam_rswdt.c b/arch/arm/src/samv7/sam_rswdt.c index 20ea3c2183402877cfabd7f1d8c22ebeb0481381..980ecd5b037369ea1f511434a08fb3ed45ce0d08 100644 --- a/arch/arm/src/samv7/sam_rswdt.c +++ b/arch/arm/src/samv7/sam_rswdt.c @@ -57,6 +57,11 @@ * Pre-processor Definitions ****************************************************************************/ /* Configuration ************************************************************/ + +#ifndef CONFIG_DEBUG_WATCHDOG_INFO +# undef CONFIG_SAMV7_RSWDT_REGDEBUG +#endif + /* The Watchdog Timer uses the Slow Clock divided by 128 to establish the * maximum Watchdog period to be 16 seconds (with a typical Slow Clock of * 32768 kHz). @@ -80,20 +85,6 @@ #define RSWDT_MINTIMEOUT ((1000 + RSWDT_FREQUENCY - 1) / RSWDT_FREQUENCY) #define RSWDT_MAXTIMEOUT ((4096 * 1000) / RSWDT_FREQUENCY) -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the watchdog - * driver. NOTE: that only lldbg types are used so that the output is - * immediately available. - */ - -#ifdef CONFIG_DEBUG_WATCHDOG -# define wddbg lldbg -# define wdvdbg llvdbg -#else -# define wddbg(x...) -# define wdvdbg(x...) -#endif - /**************************************************************************** * Private Types ****************************************************************************/ @@ -118,7 +109,7 @@ struct sam_lowerhalf_s ****************************************************************************/ /* Register operations ******************************************************/ -#if defined(CONFIG_SAMV7_RSWDT_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_SAMV7_RSWDT_REGDEBUG static uint32_t sam_getreg(uintptr_t regaddr); static void sam_putreg(uint32_t regval, uintptr_t regaddr); #else @@ -178,7 +169,7 @@ static struct sam_lowerhalf_s g_wdtdev; * ****************************************************************************/ -#if defined(CONFIG_SAMV7_RSWDT_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_SAMV7_RSWDT_REGDEBUG static uint32_t sam_getreg(uintptr_t regaddr) { static uint32_t prevaddr = 0; @@ -199,7 +190,7 @@ static uint32_t sam_getreg(uintptr_t regaddr) { if (count == 4) { - lldbg("...\n"); + wdinfo("...\n"); } return regval; @@ -216,7 +207,7 @@ static uint32_t sam_getreg(uintptr_t regaddr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + wdinfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -228,7 +219,7 @@ static uint32_t sam_getreg(uintptr_t regaddr) /* Show the register value read */ - lldbg("%08x->%048\n", regaddr, regval); + wdinfo("%08x->%048\n", regaddr, regval); return regval; } #endif @@ -241,12 +232,12 @@ static uint32_t sam_getreg(uintptr_t regaddr) * ****************************************************************************/ -#if defined(CONFIG_SAMV7_RSWDT_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_SAMV7_RSWDT_REGDEBUG static void sam_putreg(uint32_t regval, uintptr_t regaddr) { /* Show the register value being written */ - lldbg("%08x<-%08x\n", regaddr, regval); + wdinfo("%08x<-%08x\n", regaddr, regval); /* Write the value */ @@ -315,7 +306,7 @@ static int sam_start(FAR struct watchdog_lowerhalf_s *lower) * timer with the newly programmed mode parameters. */ - wdvdbg("Entry\n"); + wdinfo("Entry\n"); return priv->started ? OK : -ENOSYS; } @@ -343,7 +334,7 @@ static int sam_stop(FAR struct watchdog_lowerhalf_s *lower) * timer with the newly programmed mode parameters. */ - wdvdbg("Entry\n"); + wdinfo("Entry\n"); return -ENOSYS; } @@ -366,7 +357,7 @@ static int sam_stop(FAR struct watchdog_lowerhalf_s *lower) static int sam_keepalive(FAR struct watchdog_lowerhalf_s *lower) { - wdvdbg("Entry\n"); + wdinfo("Entry\n"); /* Write RSWDT_CR_WDRSTT to the RSWDT CR regiser (along with the KEY value) * will restart the watchdog timer. @@ -397,7 +388,7 @@ static int sam_getstatus(FAR struct watchdog_lowerhalf_s *lower, { FAR struct sam_lowerhalf_s *priv = (FAR struct sam_lowerhalf_s *)lower; - wdvdbg("Entry\n"); + wdinfo("Entry\n"); DEBUGASSERT(priv); /* Return the status bit */ @@ -426,10 +417,10 @@ static int sam_getstatus(FAR struct watchdog_lowerhalf_s *lower, status->timeleft = 0; - wdvdbg("Status :\n"); - wdvdbg(" flags : %08x\n", status->flags); - wdvdbg(" timeout : %d\n", status->timeout); - wdvdbg(" timeleft : %d\n", status->timeleft); + wdinfo("Status :\n"); + wdinfo(" flags : %08x\n", status->flags); + wdinfo(" timeout : %d\n", status->timeout); + wdinfo(" timeleft : %d\n", status->timeleft); return OK; } @@ -457,13 +448,13 @@ static int sam_settimeout(FAR struct watchdog_lowerhalf_s *lower, uint32_t regval; DEBUGASSERT(priv); - wdvdbg("Entry: timeout=%d\n", timeout); + wdinfo("Entry: timeout=%d\n", timeout); /* Can this timeout be represented? */ if (timeout < RSWDT_MINTIMEOUT || timeout >= RSWDT_MAXTIMEOUT) { - wddbg("Cannot represent timeout: %d < %d > %d\n", + wderr("ERROR: Cannot represent timeout: %d < %d > %d\n", RSWDT_MINTIMEOUT, timeout, RSWDT_MAXTIMEOUT); return -ERANGE; } @@ -496,7 +487,7 @@ static int sam_settimeout(FAR struct watchdog_lowerhalf_s *lower, priv->reload = reload; - wdvdbg("reload=%d timout: %d->%d\n", + wdinfo("reload=%d timout: %d->%d\n", reload, timeout, priv->timeout); /* Set the RSWDT_MR according to calculated value @@ -541,7 +532,7 @@ static int sam_settimeout(FAR struct watchdog_lowerhalf_s *lower, priv->started = true; - wdvdbg("Setup: CR: %08x MR: %08x SR: %08x\n", + wdinfo("Setup: CR: %08x MR: %08x SR: %08x\n", sam_getreg(SAM_RSWDT_CR), sam_getreg(SAM_RSWDT_MR), sam_getreg(SAM_RSWDT_SR)); @@ -574,7 +565,7 @@ static xcpt_t sam_capture(FAR struct watchdog_lowerhalf_s *lower, xcpt_t handler) { #ifndef CONFIG_SAMV7_RSWDT_INTERRUPT - wddbg("ERROR: Not configured for this mode\n"); + wderr("ERROR: Not configured for this mode\n"); return NULL; #else FAR struct sam_lowerhalf_s *priv = (FAR struct sam_lowerhalf_s *)lower; @@ -582,7 +573,7 @@ static xcpt_t sam_capture(FAR struct watchdog_lowerhalf_s *lower, xcpt_t oldhandler; DEBUGASSERT(priv); - wdvdbg("Entry: handler=%p\n", handler); + wdinfo("Entry: handler=%p\n", handler); /* Get the old handler return value */ @@ -636,7 +627,7 @@ static xcpt_t sam_capture(FAR struct watchdog_lowerhalf_s *lower, static int sam_ioctl(FAR struct watchdog_lowerhalf_s *lower, int cmd, unsigned long arg) { - wdvdbg("cmd=%d arg=%ld\n", cmd, arg); + wdinfo("cmd=%d arg=%ld\n", cmd, arg); /* No ioctls are supported */ @@ -667,7 +658,7 @@ int sam_rswdt_initialize(void) { FAR struct sam_lowerhalf_s *priv = &g_wdtdev; - wdvdbg("Entry: CR: %08x MR: %08x SR: %08x\n", + wdinfo("Entry: CR: %08x MR: %08x SR: %08x\n", sam_getreg(SAM_RSWDT_CR), sam_getreg(SAM_RSWDT_MR), sam_getreg(SAM_RSWDT_SR)); diff --git a/arch/arm/src/samv7/sam_spi.c b/arch/arm/src/samv7/sam_spi.c index 0d9f1ec32a114158e17c99b619a4323b251d4b2f..df176330991389ad75ddc58dd80f418e2ce05d71 100644 --- a/arch/arm/src/samv7/sam_spi.c +++ b/arch/arm/src/samv7/sam_spi.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/samv7/sam_spi.c * - * Copyright (C) 2015=2016 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Authors: Gregory Nutt * Diego Sanchez * @@ -105,6 +105,14 @@ # undef CONFIG_SAMV7_SPI_DMADEBUG #endif +#ifndef CONFIG_DEBUG_DMA_INFO +# undef CONFIG_SAMV7_SPI_DMADEBUG +#endif + +#ifndef CONFIG_DEBUG_SPI_INFO +# undef CONFIG_SAMV7_SPI_REGDEBUG +#endif + /* Clocking *****************************************************************/ /* The SPI Baud rate clock is generated by dividing the peripheral clock by * a value between 1 and 255 @@ -120,33 +128,12 @@ #define DMA_TIMEOUT_TICKS MSEC2TICK(DMA_TIMEOUT_MS) /* Debug *******************************************************************/ -/* Check if SPI debug is enabled (non-standard.. no support in - * include/debug.h - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_SPI -# undef CONFIG_SAMV7_SPI_DMADEBUG -# undef CONFIG_SAMV7_SPI_REGDEBUG -#endif +/* Check if SPI debug is enabled */ #ifndef CONFIG_DEBUG_DMA # undef CONFIG_SAMV7_SPI_DMADEBUG #endif -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - #define DMA_INITIAL 0 #define DMA_AFTER_SETUP 1 #define DMA_AFTER_START 2 @@ -205,6 +192,7 @@ struct sam_spidev_s sem_t spisem; /* Assures mutually exclusive access to SPI */ select_t select; /* SPI select call-out */ bool initialized; /* TRUE: Controller has been initialized */ + bool escape_lastxfer; /* Dont set LASTXFER-Bit in the next transfer */ #ifdef CONFIG_SAMV7_SPI_DMA uint8_t pid; /* SPI peripheral ID */ #endif @@ -238,7 +226,7 @@ static inline void spi_putreg(struct sam_spidev_s *spi, uint32_t value, unsigned int offset); static inline struct sam_spidev_s *spi_device(struct sam_spics_s *spics); -#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_SPI_INFO static void spi_dumpregs(struct sam_spidev_s *spi, const char *msg); #else # define spi_dumpregs(spi,msg) @@ -277,6 +265,12 @@ static int spi_lock(struct spi_dev_s *dev, bool lock); static void spi_select(struct spi_dev_s *dev, enum spi_dev_e devid, bool selected); static uint32_t spi_setfrequency(struct spi_dev_s *dev, uint32_t frequency); +#ifdef CONFIG_SPI_CS_DELAY_CONTROL +static int spi_setdelay(struct spi_dev_s *dev, uint32_t a, uint32_t b, uint32_t c); +#endif +#ifdef CONFIG_SPI_HWFEATURES +static int spi_hwfeatures(struct spi_dev_s *dev, uint8_t features); +#endif static void spi_setmode(struct spi_dev_s *dev, enum spi_mode_e mode); static void spi_setbits(struct spi_dev_s *dev, int nbits); static uint16_t spi_send(struct spi_dev_s *dev, uint16_t ch); @@ -324,10 +318,13 @@ static const struct spi_ops_s g_spi0ops = .lock = spi_lock, .select = spi_select, .setfrequency = spi_setfrequency, +#ifdef CONFIG_SPI_CS_DELAY_CONTROL + .setdelay = spi_setdelay, +#endif .setmode = spi_setmode, .setbits = spi_setbits, #ifdef CONFIG_SPI_HWFEATURES - .hwfeatures = 0, /* Not supported */ + .hwfeatures = spi_hwfeatures, #endif .status = sam_spi0status, #ifdef CONFIG_SPI_CMDDATA @@ -363,6 +360,9 @@ static const struct spi_ops_s g_spi1ops = .lock = spi_lock, .select = spi_select, .setfrequency = spi_setfrequency, +#ifdef CONFIG_SPI_CS_DELAY_CONTROL + .setdelay = spi_setdelay, +#endif .setmode = spi_setmode, .setbits = spi_setbits, .status = sam_spi1status, @@ -436,7 +436,7 @@ static bool spi_checkreg(struct sam_spidev_s *spi, bool wr, uint32_t value, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", spi->ntimes); + spiinfo("...[Repeats %d times]...\n", spi->ntimes); } /* Save information about the new access */ @@ -470,7 +470,7 @@ static inline uint32_t spi_getreg(struct sam_spidev_s *spi, #ifdef CONFIG_SAMV7_SPI_REGDEBUG if (spi_checkreg(spi, false, value, address)) { - lldbg("%08x->%08x\n", address, value); + spiinfo("%08x->%08x\n", address, value); } #endif @@ -493,7 +493,7 @@ static inline void spi_putreg(struct sam_spidev_s *spi, uint32_t value, #ifdef CONFIG_SAMV7_SPI_REGDEBUG if (spi_checkreg(spi, true, value, address)) { - lldbg("%08x<-%08x\n", address, value); + spiinfo("%08x<-%08x\n", address, value); } #endif @@ -515,20 +515,20 @@ static inline void spi_putreg(struct sam_spidev_s *spi, uint32_t value, * ****************************************************************************/ -#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_SPI_INFO static void spi_dumpregs(struct sam_spidev_s *spi, const char *msg) { - spivdbg("%s:\n", msg); - spivdbg(" MR:%08x SR:%08x IMR:%08x\n", + spiinfo("%s:\n", msg); + spiinfo(" MR:%08x SR:%08x IMR:%08x\n", getreg32(spi->base + SAM_SPI_MR_OFFSET), getreg32(spi->base + SAM_SPI_SR_OFFSET), getreg32(spi->base + SAM_SPI_IMR_OFFSET)); - spivdbg(" CSR0:%08x CSR1:%08x CSR2:%08x CSR3:%08x\n", + spiinfo(" CSR0:%08x CSR1:%08x CSR2:%08x CSR3:%08x\n", getreg32(spi->base + SAM_SPI_CSR0_OFFSET), getreg32(spi->base + SAM_SPI_CSR1_OFFSET), getreg32(spi->base + SAM_SPI_CSR2_OFFSET), getreg32(spi->base + SAM_SPI_CSR3_OFFSET)); - spivdbg(" WPCR:%08x WPSR:%08x\n", + spiinfo(" WPCR:%08x WPSR:%08x\n", getreg32(spi->base + SAM_SPI_WPCR_OFFSET), getreg32(spi->base + SAM_SPI_WPSR_OFFSET)); } @@ -903,7 +903,7 @@ static int spi_lock(struct spi_dev_s *dev, bool lock) struct sam_spics_s *spics = (struct sam_spics_s *)dev; struct sam_spidev_s *spi = spi_device(spics); - spivdbg("lock=%d\n", lock); + spiinfo("lock=%d\n", lock); if (lock) { /* Take the semaphore (perhaps waiting) */ @@ -951,10 +951,10 @@ static void spi_select(struct spi_dev_s *dev, enum spi_dev_e devid, /* Are we selecting or de-selecting the device? */ - spivdbg("selected=%d\n", selected); + spiinfo("selected=%d\n", selected); if (selected) { - spivdbg("cs=%d\n", spics->cs); + spiinfo("cs=%d\n", spics->cs); /* Before writing the TDR, the PCS field in the SPI_MR register must be set * in order to select a slave. @@ -962,7 +962,18 @@ static void spi_select(struct spi_dev_s *dev, enum spi_dev_e devid, regval = spi_getreg(spi, SAM_SPI_MR_OFFSET); regval &= ~SPI_MR_PCS_MASK; + + /* SPI_VARSELECT means, that the ChipSelect for each device is set within + * the transferred data (SAM_SPI_TDR) instead inside the mode register + * (SAM_SPI_MR). + * In addition, the LASTXFER flag is also set within the transferred data + * (SAM_SPI_TDR) instead inside the control register (SAM_SPI_CR). + * (see spi_exchange) + */ + +#ifndef CONFIG_SAMV7_SPI_VARSELECT regval |= (spi_cs2pcs(spics) << SPI_MR_PCS_SHIFT); +#endif spi_putreg(spi, regval, SAM_SPI_MR_OFFSET); } @@ -1009,7 +1020,7 @@ static uint32_t spi_setfrequency(struct spi_dev_s *dev, uint32_t frequency) uint32_t regval; unsigned int offset; - spivdbg("cs=%d frequency=%d\n", spics->cs, frequency); + spiinfo("cs=%d frequency=%d\n", spics->cs, frequency); /* Check if the requested frequency is the same as the frequency selection */ @@ -1027,9 +1038,9 @@ static uint32_t spi_setfrequency(struct spi_dev_s *dev, uint32_t frequency) scbr = SAM_SPI_CLOCK / frequency; - if (scbr < 8) + if (scbr < 2) { - scbr = 8; + scbr = 2; } else if (scbr > 254) { @@ -1079,17 +1090,200 @@ static uint32_t spi_setfrequency(struct spi_dev_s *dev, uint32_t frequency) /* Calculate the new actual frequency */ actual = SAM_SPI_CLOCK / scbr; - spivdbg("csr[offset=%02x]=%08x actual=%d\n", offset, regval, actual); + spiinfo("csr[offset=%02x]=%08x actual=%d\n", offset, regval, actual); /* Save the frequency setting */ spics->frequency = frequency; spics->actual = actual; - spidbg("Frequency %d->%d\n", frequency, actual); + spiinfo("Frequency %d->%d\n", frequency, actual); return actual; } +/**************************************************************************** + * Name: spi_setdelay + * + * Description: + * Set the SPI Delays in nanoseconds. Optional. + * + * Input Parameters: + * dev - Device-specific state data + * startdelay - The delay between CS active and first CLK + * stopdelay - The delay between last CLK and CS inactive + * csdelay - The delay between CS inactive and CS active again + * + * Returned Value: + * Returns 0 if ok + * + ****************************************************************************/ + +#ifdef CONFIG_SPI_CS_DELAY_CONTROL +static int spi_setdelay(struct spi_dev_s *dev, uint32_t startdelay, + uint32_t stopdelay, uint32_t csdelay) +{ + struct sam_spics_s *spics = (struct sam_spics_s *)dev; + struct sam_spidev_s *spi = spi_device(spics); + uint64_t dlybs; + uint64_t dlybct; + uint64_t dlybcs; + uint32_t regval; + unsigned int offset; + + spiinfo("cs=%d startdelay=%d\n", spics->cs, startdelay); + spiinfo("cs=%d stopdelay=%d\n", spics->cs, stopdelay); + spiinfo("cs=%d csdelay=%d\n", spics->cs, csdelay); + + offset = (unsigned int)g_csroffset[spics->cs]; + + /* startdelay = DLYBS: Delay Before SPCK. + * This field defines the delay from NPCS valid to the first valid SPCK + * transition. When DLYBS equals zero, the NPCS valid to SPCK transition is + * 1/2 the SPCK clock period. + * Otherwise, the following equations determine the delay: + * + * Delay Before SPCK = DLYBS / SPI_CLK + * + * For a 2uS delay + * + * DLYBS = SPI_CLK * 0.000002 = SPI_CLK / 500000 + * + * TODO: Check for boundaries! + */ + + dlybs = SAM_SPI_CLOCK; + dlybs *= startdelay; + dlybs /= 1000000000; + regval = spi_getreg(spi, offset); + regval &= ~SPI_CSR_DLYBS_MASK; + regval |= (uint32_t) dlybs << SPI_CSR_DLYBS_SHIFT; + + /* stopdelay = DLYBCT: Delay Between Consecutive Transfers. + * This field defines the delay between two consecutive transfers with the + * same peripheral without removing the chip select. The delay is always + * inserted after each transfer and before removing the chip select if + * needed. + * + * Delay Between Consecutive Transfers = (32 x DLYBCT) / SPI_CLK + * + * For a 5uS delay: + * + * DLYBCT = SPI_CLK * 0.000005 / 32 = SPI_CLK / 200000 / 32 + */ + + dlybct = SAM_SPI_CLOCK; + dlybct *= stopdelay; + dlybct /= 1000000000; + dlybct /= 32; + regval = spi_getreg(spi, offset); + regval &= ~SPI_CSR_DLYBCT_MASK; + regval |= (uint32_t) dlybct << SPI_CSR_DLYBCT_SHIFT; + spi_putreg(spi, regval, offset); + + /* csdelay = DLYBCS: Delay Between Chip Selects. + * This field defines the delay between the inactivation and the activation + * of NPCS. The DLYBCS time guarantees non-overlapping chip selects and + * solves bus contentions in case of peripherals having long data float + * times. If DLYBCS is lower than 6, six peripheral clock periods are + * inserted by default. + * + * Delay Between Chip Selects = DLYBCS / SPI_CLK + * + * DLYBCS = SPI_CLK * Delay + */ + dlybcs = SAM_SPI_CLOCK; + dlybcs *= csdelay; + dlybcs /= 1000000000; + regval = spi_getreg(spi, SAM_SPI_MR_OFFSET); + regval &= ~SPI_MR_DLYBCS_MASK; + regval |= dlybcs << SPI_MR_DLYBCS_SHIFT; + spi_putreg(spi, regval, SAM_SPI_MR_OFFSET); + + return 0; +} +#endif + +/**************************************************************************** + * Name: spi_hwfeatures + * + * Description: + * Use some super-special hardware Features. Optional. + * + * Input Parameters: + * dev - Device-specific state data + * features - Bitmask of the activated features + * + * Returned Value: + * Returns 0 if ok + * + ****************************************************************************/ + +#ifdef CONFIG_SPI_HWFEATURES +static int spi_hwfeatures(struct spi_dev_s *dev, uint8_t features) +{ + struct sam_spics_s *spics = (struct sam_spics_s *)dev; + struct sam_spidev_s *spi = spi_device(spics); + uint32_t regval; + unsigned int offset; + + /* CS rises after every Transmission, also if we provide new data + * immediately. + */ + + if (features & HWFEAT_FORCE_CS_INACTIVE_AFTER_TRANSFER) + { + offset = (unsigned int)g_csroffset[spics->cs]; + regval = spi_getreg(spi, offset); + regval |= SPI_CSR_CSNAAT; /* Chip Select Not Active After Transfer */ + regval &= ~SPI_CSR_CSAAT; /* Chip Select Active After Transfer */ + spi_putreg(spi, regval, offset); + } + else + { + offset = (unsigned int)g_csroffset[spics->cs]; + regval = spi_getreg(spi, offset); + regval &= ~SPI_CSR_CSNAAT; /* Chip Select Not Active After Transfer */ + spi_putreg(spi, regval, offset); + } + + /* CS does not rise automatically after a transmission, also if the spi runs + * out of data (for a long time) + */ + + if ((features & HWFEAT_FORCE_CS_ACTIVE_AFTER_TRANSFER) != 0) + { + offset = (unsigned int)g_csroffset[spics->cs]; + regval = spi_getreg(spi, offset); + regval &= ~SPI_CSR_CSNAAT; /* Chip Select Not Active After Transfer */ + regval |= SPI_CSR_CSAAT; /* Chip Select Active After Transfer */ + spi_putreg(spi, regval, offset); + } + else + { + offset = (unsigned int)g_csroffset[spics->cs]; + regval = spi_getreg(spi, offset); + regval &= ~SPI_CSR_CSAAT; /* Chip Select Not Active After Transfer */ + spi_putreg(spi, regval, offset); + } + + /* Do not set the LASTXFER-Bit at the last word of the next exchange, + * Flag is auto-resetting after the next LASTXFER condition. + * (see spi_exchange) + */ + + if ((features & HWFEAT_ESCAPE_LASTXFER) != 0) + { + spi->escape_lastxfer = true; + } + else + { + spi->escape_lastxfer = false; + } + + return 0; +} +#endif + /**************************************************************************** * Name: spi_setmode * @@ -1112,7 +1306,7 @@ static void spi_setmode(struct spi_dev_s *dev, enum spi_mode_e mode) uint32_t regval; unsigned int offset; - spivdbg("cs=%d mode=%d\n", spics->cs, mode); + spiinfo("cs=%d mode=%d\n", spics->cs, mode); /* Has the mode changed? */ @@ -1155,7 +1349,7 @@ static void spi_setmode(struct spi_dev_s *dev, enum spi_mode_e mode) } spi_putreg(spi, regval, offset); - spivdbg("csr[offset=%02x]=%08x\n", offset, regval); + spiinfo("csr[offset=%02x]=%08x\n", offset, regval); /* Save the mode so that subsequent re-configurations will be faster */ @@ -1185,7 +1379,7 @@ static void spi_setbits(struct spi_dev_s *dev, int nbits) uint32_t regval; unsigned int offset; - spivdbg("cs=%d nbits=%d\n", spics->cs, nbits); + spiinfo("cs=%d nbits=%d\n", spics->cs, nbits); DEBUGASSERT(spics && nbits > 7 && nbits < 17); /* Has the number of bits changed? */ @@ -1200,9 +1394,11 @@ static void spi_setbits(struct spi_dev_s *dev, int nbits) regval |= SPI_CSR_BITS(nbits); spi_putreg(spi, regval, offset); - spivdbg("csr[offset=%02x]=%08x\n", offset, regval); + spiinfo("csr[offset=%02x]=%08x\n", offset, regval); - /* Save the selection so the subsequence re-configurations will be faster */ + /* Save the selection so the subsequence re-configurations will be + * faster. + */ spics->nbits = nbits; } @@ -1238,7 +1434,7 @@ static uint16_t spi_send(struct spi_dev_s *dev, uint16_t wd) rxbyte = (uint8_t)0; spi_exchange(dev, &txbyte, &rxbyte, 1); - spivdbg("Sent %02x received %02x\n", txbyte, rxbyte); + spiinfo("Sent %02x received %02x\n", txbyte, rxbyte); return (uint16_t)rxbyte; } @@ -1286,7 +1482,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, uint8_t *rxptr8; uint8_t *txptr8; - spivdbg("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); + spiinfo("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); /* Set up PCS bits */ @@ -1358,16 +1554,37 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, data = 0xffff; } + /* SPI_VARSELECT means, that the ChipSelect for each device is set within + * the transferred data (SAM_SPI_TDR) instead inside the mode register + * (SAM_SPI_MR). + * In addition, the LASTXFER flag is also set within the transferred data + * (SAM_SPI_TDR) instead inside the control register (SAM_SPI_CR). + */ + +#ifdef CONFIG_SAMV7_SPI_VARSELECT /* Set the PCS field in the value written to the TDR */ data |= pcs; /* Do we need to set the LASTXFER bit in the TDR value too? */ -#ifdef CONFIG_SPI_VARSELECT if (nwords == 1) { - data |= SPI_TDR_LASTXFER; + if (spi->escape_lastxfer == false) + { + /* According the data sheet (SAME70 Rev. 2016-01) this LASTXFER + * bit has no effect without also setting CSAAT. + * (see HWFEAT_FORCE_CS_ACTIVE_AFTER_TRANSFER) + */ + + data |= SPI_TDR_LASTXFER; + } + else + { + /* the escaping should only prevent ONE last-xfer */ + + spi->escape_lastxfer = false; + } } #endif @@ -1381,6 +1598,32 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, spi_putreg(spi, data, SAM_SPI_TDR_OFFSET); +#ifndef CONFIG_SAMV7_SPI_VARSELECT + /* To de-assert the chip select line at the end of the transfer, the + * Last Transfer (LASTXFER) bit in SPI_CR must be set after writing the + * last data to transmit into SPI_TDR. + */ + + if (nwords == 1) + { + if (spi->escape_lastxfer == false) + { + /* According the datasheet (SAME70 Rev. 2016-01) this LASTXFER + * bit has no effect without also setting CSAAT. + * (see HWFEAT_FORCE_CS_ACTIVE_AFTER_TRANSFER) + */ + + spi_putreg(spi, SPI_CR_LASTXFER, SAM_SPI_CR_OFFSET); + } + else + { + /* the escaping should only prevent ONE last-xfer */ + + spi->escape_lastxfer = false; + } + } +#endif + /* Wait for the read data to be available in the RDR. * TODO: Data transfer rates would be improved using the RX FIFO * (and also DMA) @@ -1432,7 +1675,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, return; } - spivdbg("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); + spiinfo("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); spics = (struct sam_spics_s *)dev; spi = spi_device(spics); @@ -1549,7 +1792,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, ret = sam_dmarxsetup(spics->rxdma, regaddr, memaddr, nwords); if (ret < 0) { - dmadbg("ERROR: sam_dmarxsetup failed: %d\n", ret); + dmaerr("ERROR: sam_dmarxsetup failed: %d\n", ret); return; } @@ -1563,7 +1806,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, ret = sam_dmatxsetup(spics->txdma, regaddr, memaddr, nwords); if (ret < 0) { - dmadbg("ERROR: sam_dmatxsetup failed: %d\n", ret); + dmaerr("ERROR: sam_dmatxsetup failed: %d\n", ret); return; } @@ -1575,7 +1818,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, ret = sam_dmastart(spics->rxdma, spi_rxcallback, (void *)spics); if (ret < 0) { - dmadbg("ERROR: RX sam_dmastart failed: %d\n", ret); + dmaerr("ERROR: RX sam_dmastart failed: %d\n", ret); return; } @@ -1584,7 +1827,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, ret = sam_dmastart(spics->txdma, spi_txcallback, (void *)spics); if (ret < 0) { - dmadbg("ERROR: RX sam_dmastart failed: %d\n", ret); + dmaerr("ERROR: RX sam_dmastart failed: %d\n", ret); sam_dmastop(spics->rxdma); return; } @@ -1606,7 +1849,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, (wdentry_t)spi_dmatimeout, 1, (uint32_t)spics); if (ret != OK) { - spidbg("ERROR: wd_start failed: %d\n", ret); + spierr("ERROR: wd_start failed: %d\n", ret); } /* Wait for the DMA complete */ @@ -1657,7 +1900,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer, if (spics->result) { - spidbg("ERROR: DMA failed with result: %d\n", spics->result); + spierr("ERROR: DMA failed with result: %d\n", spics->result); } } #endif /* CONFIG_SAMV7_SPI_DMA */ @@ -1751,7 +1994,7 @@ FAR struct spi_dev_s *sam_spibus_initialize(int port) /* The support SAM parts have only a single SPI port */ - spivdbg("port: %d csno: %d spino: %d\n", port, csno, spino); + spiinfo("port: %d csno: %d spino: %d\n", port, csno, spino); DEBUGASSERT(csno >= 0 && csno <= SAM_SPI_NCS); #if defined(CONFIG_SAMV7_SPI0_MASTER) && defined(CONFIG_SAMV7_SPI1_MASTER) @@ -1770,7 +2013,7 @@ FAR struct spi_dev_s *sam_spibus_initialize(int port) spics = (struct sam_spics_s *)zalloc(sizeof(struct sam_spics_s)); if (!spics) { - spidbg("ERROR: Failed to allocate a chip select structure\n"); + spierr("ERROR: Failed to allocate a chip select structure\n"); return NULL; } @@ -1790,7 +2033,7 @@ FAR struct spi_dev_s *sam_spibus_initialize(int port) spics->rxdma = sam_dmachannel(0, 0); if (!spics->rxdma) { - spidbg("ERROR: Failed to allocate the RX DMA channel\n"); + spierr("ERROR: Failed to allocate the RX DMA channel\n"); spics->candma = false; } } @@ -1800,7 +2043,7 @@ FAR struct spi_dev_s *sam_spibus_initialize(int port) spics->txdma = sam_dmachannel(0, 0); if (!spics->txdma) { - spidbg("ERROR: Failed to allocate the TX DMA channel\n"); + spierr("ERROR: Failed to allocate the TX DMA channel\n"); sam_dmafree(spics->rxdma); spics->rxdma = NULL; spics->candma = false; @@ -1881,15 +2124,22 @@ FAR struct spi_dev_s *sam_spibus_initialize(int port) /* Configure the SPI mode register */ + regval = SPI_MR_MSTR | SPI_MR_MODFDIS; + #if defined(CONFIG_SAMV7_SPI_CS_DECODING) /* Enable Peripheral Chip Select Decoding? */ - spi_putreg(spi, SPI_MR_MSTR | SPI_MR_MODFDIS | SPI_MR_PCSDEC, - SAM_SPI_MR_OFFSET); -#else - spi_putreg(spi, SPI_MR_MSTR | SPI_MR_MODFDIS, SAM_SPI_MR_OFFSET); + regval |= SPI_MR_PCSDEC; #endif +# ifdef CONFIG_SAMV7_SPI_VARSELECT + /* Enable Variable Peripheral Selection? */ + + regval |= SPI_MR_PS; +#endif + + spi_putreg(spi, regval, SAM_SPI_MR_OFFSET); + /* And enable the SPI */ spi_putreg(spi, SPI_CR_SPIEN, SAM_SPI_CR_OFFSET); @@ -1905,6 +2155,7 @@ FAR struct spi_dev_s *sam_spibus_initialize(int port) */ sem_init(&spi->spisem, 0, 1); + spi->escape_lastxfer = false; spi->initialized = true; #ifdef CONFIG_SAMV7_SPI_DMA @@ -1934,7 +2185,7 @@ FAR struct spi_dev_s *sam_spibus_initialize(int port) spi_putreg(spi, regval, offset); spics->nbits = 8; - spivdbg("csr[offset=%02x]=%08x\n", offset, regval); + spiinfo("csr[offset=%02x]=%08x\n", offset, regval); return &spics->spidev; } diff --git a/arch/arm/src/samv7/sam_spi_slave.c b/arch/arm/src/samv7/sam_spi_slave.c index a210541ce695f19126de993a8660928f42752629..d2856cd2e998e13a2ab9a6ef9465ab4224f62cf9 100644 --- a/arch/arm/src/samv7/sam_spi_slave.c +++ b/arch/arm/src/samv7/sam_spi_slave.c @@ -74,26 +74,8 @@ # define CONFIG_SAMV7_SPI_SLAVE_QSIZE 8 #endif -/* Debug *******************************************************************/ -/* Check if SPI debug is enabled (non-standard.. no support in - * include/debug.h - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_SPI -#endif - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) +#ifndef CONFIG_DEBUG_SPI_INFO +# undef CONFIG_SAMV7_SPI_REGDEBUG #endif /**************************************************************************** @@ -153,7 +135,7 @@ static uint32_t spi_getreg(struct sam_spidev_s *priv, static void spi_putreg(struct sam_spidev_s *priv, uint32_t value, unsigned int offset); -#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_SPI_INFO static void spi_dumpregs(struct sam_spidev_s *priv, const char *msg); #else # define spi_dumpregs(priv,msg) @@ -270,7 +252,7 @@ static bool spi_checkreg(struct sam_spidev_s *priv, bool wr, uint32_t value, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", priv->ntimes); + spiinfo("...[Repeats %d times]...\n", priv->ntimes); } /* Save information about the new access */ @@ -303,7 +285,7 @@ static uint32_t spi_getreg(struct sam_spidev_s *priv, unsigned int offset) #ifdef CONFIG_SAMV7_SPI_REGDEBUG if (spi_checkreg(priv, false, value, address)) { - lldbg("%08x->%08x\n", address, value); + spiinfo("%08x->%08x\n", address, value); } #endif @@ -326,7 +308,7 @@ static void spi_putreg(struct sam_spidev_s *priv, uint32_t value, #ifdef CONFIG_SAMV7_SPI_REGDEBUG if (spi_checkreg(priv, true, value, address)) { - lldbg("%08x<-%08x\n", address, value); + spiinfo("%08x<-%08x\n", address, value); } #endif @@ -348,20 +330,20 @@ static void spi_putreg(struct sam_spidev_s *priv, uint32_t value, * ****************************************************************************/ -#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_SPI_INFO static void spi_dumpregs(struct sam_spidev_s *priv, const char *msg) { - spivdbg("%s:\n", msg); - spivdbg(" MR:%08x SR:%08x IMR:%08x\n", + spiinfo("%s:\n", msg); + spiinfo(" MR:%08x SR:%08x IMR:%08x\n", getreg32(priv->base + SAM_SPI_MR_OFFSET), getreg32(priv->base + SAM_SPI_SR_OFFSET), getreg32(priv->base + SAM_SPI_IMR_OFFSET)); - spivdbg(" CSR0:%08x CSR1:%08x CSR2:%08x CSR3:%08x\n", + spiinfo(" CSR0:%08x CSR1:%08x CSR2:%08x CSR3:%08x\n", getreg32(priv->base + SAM_SPI_CSR0_OFFSET), getreg32(priv->base + SAM_SPI_CSR1_OFFSET), getreg32(priv->base + SAM_SPI_CSR2_OFFSET), getreg32(priv->base + SAM_SPI_CSR3_OFFSET)); - spivdbg(" WPCR:%08x WPSR:%08x\n", + spiinfo(" WPCR:%08x WPSR:%08x\n", getreg32(priv->base + SAM_SPI_WPCR_OFFSET), getreg32(priv->base + SAM_SPI_WPSR_OFFSET)); } @@ -457,14 +439,14 @@ static int spi_interrupt(struct sam_spidev_s *priv) * bit. */ -#ifdef CONFIG_DEBUG_SPI +#ifdef CONFIG_DEBUG_SPI_ERROR /* Check the RX data overflow condition */ if ((pending & SPI_INT_OVRES) != 0) { /* If debug is enabled, report any overrun errors */ - spidbg("Error: Overrun (OVRES): %08x\n", pending); + spierr("ERROR: Overrun (OVRES): %08x\n", pending); /* OVRES was cleared by the status read. */ } @@ -524,14 +506,14 @@ static int spi_interrupt(struct sam_spidev_s *priv) * Underrun Error Status Flag (UNDES) is set in the SPI_SR. */ -#ifdef CONFIG_DEBUG_SPI +#ifdef CONFIG_DEBUG_SPI_ERROR /* Check the TX data underflow condition */ if ((pending & SPI_INT_UNDES) != 0) { /* If debug is enabled, report any overrun errors */ - spidbg("Error: Underrun (UNDEX): %08x\n", pending); + spierr("ERROR: Underrun (UNDEX): %08x\n", pending); /* UNDES was cleared by the status read. */ } @@ -699,7 +681,7 @@ static void spi_setmode(struct sam_spidev_s *priv, enum spi_smode_e mode) { uint32_t regval; - spivdbg("mode=%d\n", mode); + spiinfo("mode=%d\n", mode); /* Has the mode changed? */ @@ -741,7 +723,7 @@ static void spi_setmode(struct sam_spidev_s *priv, enum spi_smode_e mode) } spi_putreg(priv, regval, SAM_SPI_CSR0_OFFSET); - spivdbg("csr0=%08x\n", regval); + spiinfo("csr0=%08x\n", regval); /* Save the mode so that subsequent re-configurations will be faster */ @@ -768,7 +750,7 @@ static void spi_setbits(struct sam_spidev_s *priv, int nbits) { uint32_t regval; - spivdbg("nbits=%d\n", nbits); + spiinfo("nbits=%d\n", nbits); DEBUGASSERT(priv && nbits > 7 && nbits < 17); /* Has the number of bits changed? */ @@ -782,7 +764,7 @@ static void spi_setbits(struct sam_spidev_s *priv, int nbits) regval |= SPI_CSR_BITS(nbits); spi_putreg(priv, regval, SAM_SPI_CSR0_OFFSET); - spivdbg("csr0=%08x\n", regval); + spiinfo("csr0=%08x\n", regval); /* Save the selection so the subsequence re-configurations will be faster */ @@ -819,7 +801,7 @@ static void spi_bind(struct spi_sctrlr_s *sctrlr, struct sam_spidev_s *priv = (struct sam_spidev_s *)sctrlr; uint32_t regval; - spivdbg("sdev=%p mode=%d nbits=%d\n", sdv, mode, nbits); + spiinfo("sdev=%p mode=%d nbits=%d\n", sdv, mode, nbits); DEBUGASSERT(priv != NULL && priv->sdev == NULL && sdev != NULL); @@ -891,7 +873,7 @@ static void spi_bind(struct spi_sctrlr_s *sctrlr, */ regval = (SPI_INT_RDRF | SPI_INT_NSSR); -#ifdef CONFIG_DEBUG_SPI +#ifdef CONFIG_DEBUG_SPI_ERROR regval |= SPI_INT_OVRES; #endif @@ -921,7 +903,7 @@ static void spi_unbind(struct spi_sctrlr_s *sctrlr) struct sam_spidev_s *priv = (struct sam_spidev_s *)sctrlr; DEBUGASSERT(priv != NULL); - spivdbg("Unbinding %p\n", priv->sdev); + spiinfo("Unbinding %p\n", priv->sdev); DEBUGASSERT(priv->sdev != NULL); @@ -978,7 +960,7 @@ static int spi_enqueue(struct spi_sctrlr_s *sctrlr, uint16_t data) int next; int ret; - spivdbg("data=%04x\n", data); + spiinfo("data=%04x\n", data); DEBUGASSERT(priv != NULL && priv->sdev != NULL); /* Get exclusive access to the SPI device */ @@ -1095,7 +1077,7 @@ static void spi_qflush(struct spi_sctrlr_s *sctrlr) struct sam_spidev_s *priv = (struct sam_spidev_s *)sctrlr; irqstate_t flags; - spivdbg("data=%04x\n", data); + spiinfo("data=%04x\n", data); DEBUGASSERT(priv != NULL && priv->sdev != NULL); @@ -1140,7 +1122,7 @@ struct spi_sctrlr_s *sam_spi_slave_initialize(int port) /* The support SAM parts have only a single SPI port */ - spivdbg("port: %d spino: %d\n", port, spino); + spiinfo("port: %d spino: %d\n", port, spino); #if defined(CONFIG_SAMV7_SPI0_SLAVE) && defined(CONFIG_SAMV7_SPI1_SLAVE) DEBUGASSERT(spino >= 0 && spino <= 1); @@ -1287,7 +1269,7 @@ struct spi_sctrlr_s *sam_spi_slave_initialize(int port) spi_putreg(priv, regval, SAM_SPI_CSR0_OFFSET); priv->nbits = 8; - spivdbg("csr[offset=%02x]=%08x\n", offset, regval); + spiinfo("csr[offset=%02x]=%08x\n", offset, regval); return &priv->sctrlr; } diff --git a/arch/arm/src/samv7/sam_ssc.c b/arch/arm/src/samv7/sam_ssc.c index 107d120de7a35f462f369aacc0031033b2ad31e4..11ae76c9f07bbaa678d542874ce75fa704c87a41 100644 --- a/arch/arm/src/samv7/sam_ssc.c +++ b/arch/arm/src/samv7/sam_ssc.c @@ -91,6 +91,10 @@ # define CONFIG_SAMV7_SSC_MAXINFLIGHT 16 #endif +#ifndef CONFIG_DEBUG_I2S_INFO +# undef CONFIG_SAMV7_SSC_REGDEBUG +#endif + /* Assume no RX/TX support until we learn better */ #undef SSC_HAVE_RX @@ -366,16 +370,9 @@ #define DMA_TIMEOUT_TICKS MSEC2TICK(DMA_TIMEOUT_MS) /* Debug *******************************************************************/ -/* Check if SSC debug is enabled (non-standard.. no support in - * include/debug.h - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_I2S -#endif +/* Check if SSC debug is enabled */ -#ifndef CONFIG_DEBUG_I2S +#ifndef CONFIG_DEBUG_I2S_INFO # undef CONFIG_SAMV7_SSC_DMADEBUG # undef CONFIG_SAMV7_SSC_REGDEBUG # undef CONFIG_SAMV7_SSC_QDEBUG @@ -386,22 +383,6 @@ # undef CONFIG_SAMV7_SSC_DMADEBUG #endif -#ifdef CONFIG_DEBUG_I2S -# define i2sdbg dbg -# define i2slldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define i2svdbg dbg -# define i2sllvdbg lldbg -# else -# define i2svdbg(x...) -# endif -#else -# define i2sdbg(x...) -# define i2slldbg(x...) -# define i2svdbg(x...) -# define i2sllvdbg(x...) -#endif - #define DMA_INITIAL 0 #define DMA_AFTER_SETUP 1 #define DMA_AFTER_START 2 @@ -449,7 +430,7 @@ struct sam_ssc_s uintptr_t base; /* SSC controller register base address */ sem_t exclsem; /* Assures mutually exclusive acess to SSC */ uint8_t datalen; /* Data width (8, 16, or 32) */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES uint8_t align; /* Log2 of data width (0, 1, or 3) */ #endif uint8_t pid; /* Peripheral ID */ @@ -512,7 +493,7 @@ static inline void ssc_putreg(struct sam_ssc_s *priv, unsigned int offset, static inline uintptr_t ssc_regaddr(struct sam_ssc_s *priv, unsigned int offset); -#if defined(CONFIG_DEBUG_I2S) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_I2S_INFO static void scc_dump_regs(struct sam_ssc_s *priv, const char *msg); #else # define scc_dump_regs(s,m) @@ -697,7 +678,7 @@ static bool ssc_checkreg(struct sam_ssc_s *priv, bool wr, uint32_t regval, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", priv->count); + i2sinfo("...[Repeats %d times]...\n", priv->count); } /* Save information about the new access */ @@ -731,7 +712,7 @@ static inline uint32_t ssc_getreg(struct sam_ssc_s *priv, #ifdef CONFIG_SAMV7_SSC_REGDEBUG if (ssc_checkreg(priv, false, regval, regaddr)) { - lldbg("%08x->%08x\n", regaddr, regval); + i2sinfo("%08x->%08x\n", regaddr, regval); } #endif @@ -754,7 +735,7 @@ static inline void ssc_putreg(struct sam_ssc_s *priv, unsigned int offset, #ifdef CONFIG_SAMV7_SSC_REGDEBUG if (ssc_checkreg(priv, true, regval, regaddr)) { - lldbg("%08x<-%08x\n", regaddr, regval); + i2sinfo("%08x<-%08x\n", regaddr, regval); } #endif @@ -789,21 +770,21 @@ static inline uintptr_t ssc_regaddr(struct sam_ssc_s *priv, unsigned int offset) * ****************************************************************************/ -#if defined(CONFIG_DEBUG_I2S) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_I2S_INFO static void scc_dump_regs(struct sam_ssc_s *priv, const char *msg) { - i2svdbg("SSC%d: %s\n", priv->sscno, msg); - i2svdbg(" CMR:%08x RCMR:%08x RFMR:%08x TCMR:%08x\n", + i2sinfo("SSC%d: %s\n", priv->sscno, msg); + i2sinfo(" CMR:%08x RCMR:%08x RFMR:%08x TCMR:%08x\n", getreg32(priv->base + SAM_SSC_CMR_OFFSET), getreg32(priv->base + SAM_SSC_RCMR_OFFSET), getreg32(priv->base + SAM_SSC_RFMR_OFFSET), getreg32(priv->base + SAM_SSC_TCMR_OFFSET)); - i2svdbg(" TFMR:%08x RC0R:%08x RC1R:%08x SR:%08x\n", + i2sinfo(" TFMR:%08x RC0R:%08x RC1R:%08x SR:%08x\n", getreg32(priv->base + SAM_SSC_TFMR_OFFSET), getreg32(priv->base + SAM_SSC_RC0R_OFFSET), getreg32(priv->base + SAM_SSC_RC1R_OFFSET), getreg32(priv->base + SAM_SSC_SR_OFFSET)); - i2svdbg(" IMR:%08x WPMR:%08x WPSR:%08x\n", + i2sinfo(" IMR:%08x WPMR:%08x WPSR:%08x\n", getreg32(priv->base + SAM_SSC_IMR_OFFSET), getreg32(priv->base + SAM_SSC_WPMR_OFFSET), getreg32(priv->base + SAM_SSC_WPSR_OFFSET)); @@ -840,12 +821,12 @@ static void ssc_dump_queue(sq_queue_t *queue) if (!apb) { - i2sllvdbg(" %p: No buffer\n", bfcontainer); + i2sinfo(" %p: No buffer\n", bfcontainer); } else { - i2sllvdbg(" %p: buffer=%p nmaxbytes=%d nbytes=%d\n", - bfcontainer, apb, apb->nmaxbytes, apb->nbytes); + i2sinfo(" %p: buffer=%p nmaxbytes=%d nbytes=%d\n", + bfcontainer, apb, apb->nmaxbytes, apb->nbytes); } } } @@ -855,12 +836,12 @@ static void ssc_dump_queues(struct sam_transport_s *xpt, const char *msg) irqstate_t flags; flags = enter_critical_section(); - i2sllvdbg("%s\n", msg); - i2sllvdbg(" Pending:\n"); + i2sinfo("%s\n", msg); + i2sinfo(" Pending:\n"); ssc_dump_queue(&xpt->pend); - i2sllvdbg(" Active:\n"); + i2sinfo(" Active:\n"); ssc_dump_queue(&xpt->act); - i2sllvdbg(" Done:\n"); + i2sinfo(" Done:\n"); ssc_dump_queue(&xpt->done); leave_critical_section(flags); } @@ -1083,7 +1064,7 @@ static void ssc_dma_sampleinit(struct sam_ssc_s *priv, #if defined(CONFIG_SAMV7_SSC_DMADEBUG) && defined(SSC_HAVE_RX) static void ssc_rxdma_sampledone(struct sam_ssc_s *priv, int result) { - lldbg("result: %d\n", result); + i2llsinfo("result: %d\n", result); /* Sample the final registers */ @@ -1148,7 +1129,7 @@ static void ssc_rxdma_sampledone(struct sam_ssc_s *priv, int result) #if defined(CONFIG_SAMV7_SSC_DMADEBUG) && defined(SSC_HAVE_TX) static void ssc_txdma_sampledone(struct sam_ssc_s *priv, int result) { - lldbg("result: %d\n", result); + i2sinfo("result: %d\n", result); /* Sample the final registers */ @@ -1371,7 +1352,7 @@ static int ssc_rxdma_setup(struct sam_ssc_s *priv) if (ret < 0) { - i2slldbg("ERROR: wd_start failed: %d\n", errno); + i2serr("ERROR: wd_start failed: %d\n", errno); } } @@ -1420,7 +1401,7 @@ static void ssc_rx_worker(void *arg) * So we have to start the next DMA here. */ - i2svdbg("rx.act.head=%p rx.done.head=%p\n", + i2sinfo("rx.act.head=%p rx.done.head=%p\n", priv->rx.act.head, priv->rx.done.head); ssc_dump_rxqueues(priv, "RX worker start"); @@ -1559,7 +1540,7 @@ static void ssc_rx_schedule(struct sam_ssc_s *priv, int result) ret = work_queue(HPWORK, &priv->rx.work, ssc_rx_worker, priv, 0); if (ret != 0) { - i2slldbg("ERROR: Failed to queue RX work: %d\n", ret); + i2serr("ERROR: Failed to queue RX work: %d\n", ret); } } } @@ -1788,7 +1769,7 @@ static int ssc_txdma_setup(struct sam_ssc_s *priv) if (ret < 0) { - i2slldbg("ERROR: wd_start failed: %d\n", errno); + i2serr("ERROR: wd_start failed: %d\n", errno); } } @@ -1836,7 +1817,7 @@ static void ssc_tx_worker(void *arg) * So we have to start the next DMA here. */ - i2svdbg("tx.act.head=%p tx.done.head=%p\n", + i2sinfo("tx.act.head=%p tx.done.head=%p\n", priv->tx.act.head, priv->tx.done.head); ssc_dump_txqueues(priv, "TX worker start"); @@ -1963,7 +1944,7 @@ static void ssc_tx_schedule(struct sam_ssc_s *priv, int result) ret = work_queue(HPWORK, &priv->tx.work, ssc_tx_worker, priv, 0); if (ret != 0) { - i2slldbg("ERROR: Failed to queue TX work: %d\n", ret); + i2serr("ERROR: Failed to queue TX work: %d\n", ret); } } } @@ -2036,25 +2017,25 @@ static int ssc_checkwidth(struct sam_ssc_s *priv, int bits) switch (bits) { case 8: -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES priv->align = 0; #endif break; case 16: -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES priv->align = 1; #endif break; case 32: -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES priv->align = 3; #endif break; default: - i2sdbg("ERROR: Unsupported or invalid data width: %d\n", bits); + i2serr("ERROR: Unsupported or invalid data width: %d\n", bits); return (bits < 2 || bits > 32) ? -EINVAL : -ENOSYS; } @@ -2132,7 +2113,7 @@ static uint32_t ssc_rxdatawidth(struct i2s_dev_s *dev, int bits) ret = ssc_checkwidth(priv, bits); if (ret < 0) { - i2sdbg("ERROR: ssc_checkwidth failed: %d\n", ret); + i2serr("ERROR: ssc_checkwidth failed: %d\n", ret); return 0; } @@ -2141,7 +2122,7 @@ static uint32_t ssc_rxdatawidth(struct i2s_dev_s *dev, int bits) ret = ssc_dma_flags(priv, &dmaflags); if (ret < 0) { - i2sdbg("ERROR: ssc_dma_flags failed: %d\n", ret); + i2serr("ERROR: ssc_dma_flags failed: %d\n", ret); return 0; } @@ -2211,7 +2192,7 @@ static int ssc_receive(struct i2s_dev_s *dev, struct ap_buffer_s *apb, #endif DEBUGASSERT(priv && apb && ((uintptr_t)apb->samp & priv->align) == 0); - i2svdbg("apb=%p nmaxbytes=%d arg=%p timeout=%d\n", + i2sinfo("apb=%p nmaxbytes=%d arg=%p timeout=%d\n", apb, apb->nmaxbytes, arg, timeout); ssc_init_buffer(apb->samp, apb->nmaxbytes); @@ -2230,7 +2211,7 @@ static int ssc_receive(struct i2s_dev_s *dev, struct ap_buffer_s *apb, if (!priv->rxenab) { - i2sdbg("ERROR: SSC%d has no receiver\n", priv->sscno); + i2serr("ERROR: SSC%d has no receiver\n", priv->sscno); ret = -EAGAIN; goto errout_with_exclsem; } @@ -2269,7 +2250,7 @@ errout_with_exclsem: return ret; #else - i2sdbg("ERROR: SSC%d has no receiver\n", priv->sscno); + i2serr("ERROR: SSC%d has no receiver\n", priv->sscno); UNUSED(priv); return -ENOSYS; #endif @@ -2343,7 +2324,7 @@ static uint32_t ssc_txdatawidth(struct i2s_dev_s *dev, int bits) ret = ssc_checkwidth(priv, bits); if (ret < 0) { - i2sdbg("ERROR: ssc_checkwidth failed: %d\n", ret); + i2serr("ERROR: ssc_checkwidth failed: %d\n", ret); return 0; } @@ -2352,7 +2333,7 @@ static uint32_t ssc_txdatawidth(struct i2s_dev_s *dev, int bits) ret = ssc_dma_flags(priv, &dmaflags); if (ret < 0) { - i2sdbg("ERROR: ssc_dma_flags failed: %d\n", ret); + i2serr("ERROR: ssc_dma_flags failed: %d\n", ret); return 0; } @@ -2426,7 +2407,7 @@ static int ssc_send(struct i2s_dev_s *dev, struct ap_buffer_s *apb, */ DEBUGASSERT(priv && apb); - i2svdbg("apb=%p nbytes=%d arg=%p timeout=%d\n", + i2sinfo("apb=%p nbytes=%d arg=%p timeout=%d\n", apb, apb->nbytes - apb->curbyte, arg, timeout); ssc_dump_buffer("Sending", &apb->samp[apb->curbyte], @@ -2447,7 +2428,7 @@ static int ssc_send(struct i2s_dev_s *dev, struct ap_buffer_s *apb, if (!priv->txenab) { - i2sdbg("ERROR: SSC%d has no transmitter\n", priv->sscno); + i2serr("ERROR: SSC%d has no transmitter\n", priv->sscno); ret = -EAGAIN; goto errout_with_exclsem; } @@ -2486,7 +2467,7 @@ errout_with_exclsem: return ret; #else - i2sdbg("ERROR: SSC%d has no transmitter\n", priv->sscno); + i2serr("ERROR: SSC%d has no transmitter\n", priv->sscno); UNUSED(priv); return -ENOSYS; #endif @@ -2540,7 +2521,7 @@ static int ssc_rx_configure(struct sam_ssc_s *priv) case SSC_CLKSRC_NONE: /* No clock */ default: - i2sdbg("ERROR: No receiver clock\n"); + i2serr("ERROR: No receiver clock\n"); return -EINVAL; } @@ -2561,7 +2542,7 @@ static int ssc_rx_configure(struct sam_ssc_s *priv) break; default: - i2sdbg("ERROR: Invalid clock output selection\n"); + i2serr("ERROR: Invalid clock output selection\n"); return -EINVAL; } @@ -2665,7 +2646,7 @@ static int ssc_tx_configure(struct sam_ssc_s *priv) case SSC_CLKSRC_NONE: /* No clock */ default: - i2sdbg("ERROR: No transmitter clock\n"); + i2serr("ERROR: No transmitter clock\n"); return -EINVAL; } @@ -2686,7 +2667,7 @@ static int ssc_tx_configure(struct sam_ssc_s *priv) break; default: - i2sdbg("ERROR: Invalid clock output selection\n"); + i2serr("ERROR: Invalid clock output selection\n"); return -EINVAL; } @@ -2906,7 +2887,7 @@ static void ssc_clocking(struct sam_ssc_s *priv) sam_enableperiph1(priv->pid); - i2svdbg("PCSR1=%08x PCR=%08x CMR=%08x\n", + i2sinfo("PCSR1=%08x PCR=%08x CMR=%08x\n", getreg32(SAM_PMC_PCSR1), regval, ssc_getreg(priv, SAM_SSC_CMR_OFFSET)); } @@ -2945,7 +2926,7 @@ static int ssc_dma_flags(struct sam_ssc_s *priv, uint32_t *dmaflags) break; default: - i2sdbg("ERROR: Unsupported data width: %d\n", priv->datalen); + i2serr("ERROR: Unsupported data width: %d\n", priv->datalen); return -ENOSYS; } @@ -2978,7 +2959,7 @@ static int ssc_dma_allocate(struct sam_ssc_s *priv) ret = ssc_dma_flags(priv, &dmaflags); if (ret < 0) { - i2sdbg("ERROR: ssc_dma_flags failed: %d\n", ret); + i2serr("ERROR: ssc_dma_flags failed: %d\n", ret); return ret; } @@ -2992,7 +2973,7 @@ static int ssc_dma_allocate(struct sam_ssc_s *priv) priv->rx.dma = sam_dmachannel(0, dmaflags); if (!priv->rx.dma) { - i2sdbg("ERROR: Failed to allocate the RX DMA channel\n"); + i2serr("ERROR: Failed to allocate the RX DMA channel\n"); goto errout; } @@ -3001,7 +2982,7 @@ static int ssc_dma_allocate(struct sam_ssc_s *priv) priv->rx.dog = wd_create(); if (!priv->rx.dog) { - i2sdbg("ERROR: Failed to create the RX DMA watchdog\n"); + i2serr("ERROR: Failed to create the RX DMA watchdog\n"); goto errout; } } @@ -3015,7 +2996,7 @@ static int ssc_dma_allocate(struct sam_ssc_s *priv) priv->tx.dma = sam_dmachannel(0, dmaflags); if (!priv->tx.dma) { - i2sdbg("ERROR: Failed to allocate the TX DMA channel\n"); + i2serr("ERROR: Failed to allocate the TX DMA channel\n"); goto errout; } @@ -3024,7 +3005,7 @@ static int ssc_dma_allocate(struct sam_ssc_s *priv) priv->tx.dog = wd_create(); if (!priv->tx.dog) { - i2sdbg("ERROR: Failed to create the TX DMA watchdog\n"); + i2serr("ERROR: Failed to create the TX DMA watchdog\n"); goto errout; } } @@ -3231,7 +3212,7 @@ static void ssc0_configure(struct sam_ssc_s *priv) priv->base = SAM_SSC0_BASE; priv->datalen = CONFIG_SAMV7_SSC0_DATALEN; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES priv->align = SAMV7_SSC0_DATAMASK; #endif priv->pid = SAM_PID_SSC0; @@ -3372,7 +3353,7 @@ static void ssc1_configure(struct sam_ssc_s *priv) priv->base = SAM_SSC1_BASE; priv->datalen = CONFIG_SAMV7_SSC1_DATALEN; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES priv->align = SAMV7_SSC1_DATAMASK; #endif priv->pid = SAM_PID_SSC1; @@ -3405,7 +3386,7 @@ struct i2s_dev_s *sam_ssc_initialize(int port) /* The support SAM parts have only a single SSC port */ - i2svdbg("port: %d\n", port); + i2sinfo("port: %d\n", port); /* Allocate a new state structure for this chip select. NOTE that there * is no protection if the same chip select is used in two different @@ -3415,7 +3396,7 @@ struct i2s_dev_s *sam_ssc_initialize(int port) priv = (struct sam_ssc_s *)zalloc(sizeof(struct sam_ssc_s)); if (!priv) { - i2sdbg("ERROR: Failed to allocate a chip select structure\n"); + i2serr("ERROR: Failed to allocate a chip select structure\n"); return NULL; } @@ -3449,7 +3430,7 @@ struct i2s_dev_s *sam_ssc_initialize(int port) else #endif /* CONFIG_SAMV7_SSC1 */ { - i2sdbg("ERROR: Unsupported I2S port: %d\n", port); + i2serr("ERROR: Unsupported I2S port: %d\n", port); goto errout_with_alloc; } @@ -3470,7 +3451,7 @@ struct i2s_dev_s *sam_ssc_initialize(int port) ret = ssc_rx_configure(priv); if (ret < 0) { - i2sdbg("ERROR: Failed to configure the receiver: %d\n", ret); + i2serr("ERROR: Failed to configure the receiver: %d\n", ret); goto errout_with_clocking; } @@ -3479,7 +3460,7 @@ struct i2s_dev_s *sam_ssc_initialize(int port) ret = ssc_tx_configure(priv); if (ret < 0) { - i2sdbg("ERROR: Failed to configure the transmitter: %d\n", ret); + i2serr("ERROR: Failed to configure the transmitter: %d\n", ret); goto errout_with_clocking; } diff --git a/arch/arm/src/samv7/sam_tc.c b/arch/arm/src/samv7/sam_tc.c index 03569857765ab3d2f74d711f04e53c02384a0940..691366af8f8a9224024efe6155daa3f3e02c5307 100644 --- a/arch/arm/src/samv7/sam_tc.c +++ b/arch/arm/src/samv7/sam_tc.c @@ -77,6 +77,10 @@ * Pre-processor Definitions ****************************************************************************/ +#ifndef CONFIG_DEBUG_TIMER_INFO +# undef CONFIG_SAMV7_TC_REGDEBUG +#endif + /**************************************************************************** * Private Types ****************************************************************************/ @@ -643,19 +647,19 @@ static void sam_regdump(struct sam_chan_s *chan, const char *msg) uintptr_t base; base = tc->base; - lldbg("TC%d [%08x]: %s\n", tc->tc, (int)base, msg); - lldbg(" BMR: %08x QIMR: %08x QISR: %08x WPMR: %08x\n", - getreg32(base+SAM_TC_BMR_OFFSET), getreg32(base+SAM_TC_QIMR_OFFSET), - getreg32(base+SAM_TC_QISR_OFFSET), getreg32(base+SAM_TC_WPMR_OFFSET)); + tmrinfo("TC%d [%08x]: %s\n", tc->tc, (int)base, msg); + tmrinfo(" BMR: %08x QIMR: %08x QISR: %08x WPMR: %08x\n", + getreg32(base+SAM_TC_BMR_OFFSET), getreg32(base+SAM_TC_QIMR_OFFSET), + getreg32(base+SAM_TC_QISR_OFFSET), getreg32(base+SAM_TC_WPMR_OFFSET)); base = chan->base; - lldbg("TC%d Channel %d [%08x]: %s\n", tc->tc, chan->chan, (int)base, msg); - lldbg(" CMR: %08x SSMR: %08x RAB: %08x CV: %08x\n", - getreg32(base+SAM_TC_CMR_OFFSET), getreg32(base+SAM_TC_SMMR_OFFSET), - getreg32(base+SAM_TC_RAB_OFFSET), getreg32(base+SAM_TC_CV_OFFSET)); - lldbg(" RA: %08x RB: %08x RC: %08x IMR: %08x\n", - getreg32(base+SAM_TC_RA_OFFSET), getreg32(base+SAM_TC_RB_OFFSET), - getreg32(base+SAM_TC_RC_OFFSET), getreg32(base+SAM_TC_IMR_OFFSET)); + tmrinfo("TC%d Channel %d [%08x]: %s\n", tc->tc, chan->chan, (int)base, msg); + tmrinfo(" CMR: %08x SSMR: %08x RAB: %08x CV: %08x\n", + getreg32(base+SAM_TC_CMR_OFFSET), getreg32(base+SAM_TC_SMMR_OFFSET), + getreg32(base+SAM_TC_RAB_OFFSET), getreg32(base+SAM_TC_CV_OFFSET)); + tmrinfo(" RA: %08x RB: %08x RC: %08x IMR: %08x\n", + getreg32(base+SAM_TC_RA_OFFSET), getreg32(base+SAM_TC_RB_OFFSET), + getreg32(base+SAM_TC_RC_OFFSET), getreg32(base+SAM_TC_IMR_OFFSET)); } #endif @@ -698,7 +702,7 @@ static bool sam_checkreg(struct sam_tc_s *tc, bool wr, uint32_t regaddr, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", tc->ntimes); + tmrinfo("...[Repeats %d times]...\n", tc->ntimes); } /* Save information about the new access */ @@ -733,7 +737,7 @@ static inline uint32_t sam_tc_getreg(struct sam_chan_s *chan, #ifdef CONFIG_SAMV7_TC_REGDEBUG if (sam_checkreg(tc, false, regaddr, regval)) { - lldbg("%08x->%08x\n", regaddr, regval); + tmrinfo("%08x->%08x\n", regaddr, regval); } #endif @@ -757,7 +761,7 @@ static inline void sam_tc_putreg(struct sam_chan_s *chan, uint32_t regval, #ifdef CONFIG_SAMV7_TC_REGDEBUG if (sam_checkreg(tc, true, regaddr, regval)) { - lldbg("%08x<-%08x\n", regaddr, regval); + tmrinfo("%08x<-%08x\n", regaddr, regval); } #endif @@ -781,7 +785,7 @@ static inline uint32_t sam_chan_getreg(struct sam_chan_s *chan, #ifdef CONFIG_SAMV7_TC_REGDEBUG if (sam_checkreg(chan->tc, false, regaddr, regval)) { - lldbg("%08x->%08x\n", regaddr, regval); + tmrinfo("%08x->%08x\n", regaddr, regval); } #endif @@ -804,7 +808,7 @@ static inline void sam_chan_putreg(struct sam_chan_s *chan, unsigned int offset, #ifdef CONFIG_SAMV7_TC_REGDEBUG if (sam_checkreg(chan->tc, true, regaddr, regval)) { - lldbg("%08x<-%08x\n", regaddr, regval); + tmrinfo("%08x<-%08x\n", regaddr, regval); } #endif @@ -841,8 +845,8 @@ static int sam_tc_interrupt(struct sam_tc_s *tc, struct sam_chan_s *chan) imr = sam_chan_getreg(chan, SAM_TC_IMR_OFFSET); pending = sr & imr; - tcllvdbg("TC%d Channel %d: pending=%08lx\n", - tc->tc, chan->chan, (unsigned long)pending); + tmrinfo("TC%d Channel %d: pending=%08lx\n", + tc->tc, chan->chan, (unsigned long)pending); /* Are there any pending interrupts for this channel? */ @@ -1046,7 +1050,7 @@ static int sam_tc_mcksrc(uint32_t frequency, uint32_t *tcclks, uint32_t fnext; int ndx = 0; - tcvdbg("frequency=%d\n", frequency); + tmrinfo("frequency=%d\n", frequency); /* Satisfy lower bound. That is, the value of the divider such that: * @@ -1066,7 +1070,7 @@ static int sam_tc_mcksrc(uint32_t frequency, uint32_t *tcclks, { /* If no divisor can be found, return -ERANGE */ - tcdbg("Lower bound search failed\n"); + tmrerr("ERROR: Lower bound search failed\n"); return -ERANGE; } @@ -1169,7 +1173,7 @@ static inline struct sam_chan_s *sam_tc_initialize(int channel) { /* Timer/counter is not invalid or not enabled */ - tcdbg("ERROR: Bad channel number: %d\n", channel); + tmrerr("ERROR: Bad channel number: %d\n", channel); return NULL; } @@ -1225,7 +1229,7 @@ static inline struct sam_chan_s *sam_tc_initialize(int channel) { /* Yes.. return a failure */ - tcdbg("Channel %d is in-use\n", channel); + tmrerr("ERROR: Channel %d is in-use\n", channel); sam_givesem(tc); return NULL; } @@ -1318,7 +1322,7 @@ TC_HANDLE sam_tc_allocate(int channel, int mode) * access to the requested channel. */ - tcvdbg("channel=%d mode=%08x\n", channel, mode); + tmrinfo("channel=%d mode=%08x\n", channel, mode); chan = sam_tc_initialize(channel); if (chan) @@ -1344,7 +1348,7 @@ TC_HANDLE sam_tc_allocate(int channel, int mode) /* Return an opaque reference to the channel */ - tcvdbg("Returning %p\n", chan); + tmrinfo("Returning %p\n", chan); return (TC_HANDLE)chan; } @@ -1366,7 +1370,7 @@ void sam_tc_free(TC_HANDLE handle) { struct sam_chan_s *chan = (struct sam_chan_s *)handle; - tcvdbg("Freeing %p channel=%d inuse=%d\n", chan, chan->chan, chan->inuse); + tmrinfo("Freeing %p channel=%d inuse=%d\n", chan, chan->chan, chan->inuse); DEBUGASSERT(chan && chan->inuse); /* Make sure that interrupts are detached and disabled and that the channel @@ -1399,7 +1403,7 @@ void sam_tc_start(TC_HANDLE handle) { struct sam_chan_s *chan = (struct sam_chan_s *)handle; - tcvdbg("Starting channel %d inuse=%d\n", chan->chan, chan->inuse); + tmrinfo("Starting channel %d inuse=%d\n", chan->chan, chan->inuse); DEBUGASSERT(chan && chan->inuse); /* Read the SR to clear any pending interrupts on this channel */ @@ -1431,7 +1435,7 @@ void sam_tc_stop(TC_HANDLE handle) { struct sam_chan_s *chan = (struct sam_chan_s *)handle; - tcvdbg("Stopping channel %d inuse=%d\n", chan->chan, chan->inuse); + tmrinfo("Stopping channel %d inuse=%d\n", chan->chan, chan->inuse); DEBUGASSERT(chan && chan->inuse); sam_chan_putreg(chan, SAM_TC_CCR_OFFSET, TC_CCR_CLKDIS); @@ -1538,8 +1542,8 @@ void sam_tc_setregister(TC_HANDLE handle, int regid, uint32_t regval) DEBUGASSERT(chan && regid < TC_NREGISTERS); - tcvdbg("Channel %d: Set register RC%d to %08lx\n", - chan->chan, regid, (unsigned long)regval); + tmrinfo("Channel %d: Set register RC%d to %08lx\n", + chan->chan, regid, (unsigned long)regval); sam_chan_putreg(chan, g_regoffset[regid], regval); sam_regdump(chan, "Set register"); @@ -1717,7 +1721,7 @@ int sam_tc_clockselect(uint32_t frequency, uint32_t *tcclks, if (actual) { - tcvdbg("return actual=%lu\n", (unsigned long)fselect); + tmrinfo("return actual=%lu\n", (unsigned long)fselect); *actual = pck6_actual; } @@ -1725,7 +1729,7 @@ int sam_tc_clockselect(uint32_t frequency, uint32_t *tcclks, if (tcclks) { - tcvdbg("return tcclks=%08lx\n", (unsigned long)TC_CMR_TCCLKS_PCK6); + tmrinfo("return tcclks=%08lx\n", (unsigned long)TC_CMR_TCCLKS_PCK6); *tcclks = TC_CMR_TCCLKS_PCK6; } @@ -1739,7 +1743,7 @@ int sam_tc_clockselect(uint32_t frequency, uint32_t *tcclks, if (actual) { - tcvdbg("return actual=%lu\n", (unsigned long)mck_actual); + tmrinfo("return actual=%lu\n", (unsigned long)mck_actual); *actual = mck_actual; } @@ -1747,7 +1751,7 @@ int sam_tc_clockselect(uint32_t frequency, uint32_t *tcclks, if (tcclks) { - tcvdbg("return tcclks=%08lx\n", (unsigned long)mck_tcclks); + tmrinfo("return tcclks=%08lx\n", (unsigned long)mck_tcclks); *tcclks = mck_tcclks; } diff --git a/arch/arm/src/samv7/sam_tc.h b/arch/arm/src/samv7/sam_tc.h index 5dda45ece993f7e0f17d4b7ea323ee55b701c5b3..d62ac212520d39e890db7bf6b5d3f1fcbae31ff2 100644 --- a/arch/arm/src/samv7/sam_tc.h +++ b/arch/arm/src/samv7/sam_tc.h @@ -75,8 +75,7 @@ /* Timer debug is enabled if any timer client is enabled */ -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_ANALOG +#ifndef CONFIG_DEBUG_TIMER_INFO # undef CONFIG_SAMV7_TC_REGDEBUG #endif @@ -84,20 +83,6 @@ # define CONFIG_SAMV7_TC_DEBUG 1 #endif -/* Timer/counter debug output */ - -#ifdef CONFIG_SAMV7_TC_DEBUG -# define tcdbg dbg -# define tcvdbg vdbg -# define tclldbg lldbg -# define tcllvdbg llvdbg -#else -# define tcdbg(x...) -# define tcvdbg(x...) -# define tclldbg(x...) -# define tcllvdbg(x...) -#endif - /**************************************************************************** * Public Types ****************************************************************************/ diff --git a/arch/arm/src/samv7/sam_tickless.c b/arch/arm/src/samv7/sam_tickless.c index 3d1a7ad95ac40d32986c5593dfb1d1c37715ab9b..95f4b8754f30a92986629ae3e2d4b911dbd529e3 100644 --- a/arch/arm/src/samv7/sam_tickless.c +++ b/arch/arm/src/samv7/sam_tickless.c @@ -221,7 +221,7 @@ static struct sam_tickless_s g_tickless; static void sam_oneshot_handler(void *arg) { - tcllvdbg("Expired...\n"); + tmrinfo("Expired...\n"); sched_timer_expiration(); } @@ -265,7 +265,7 @@ void up_timer_initialize(void) CONFIG_USEC_PER_TICK); if (ret < 0) { - tclldbg("ERROR: sam_oneshot_initialize failed\n"); + tmrerr("ERROR: sam_oneshot_initialize failed\n"); PANIC(); } @@ -278,7 +278,7 @@ void up_timer_initialize(void) CONFIG_USEC_PER_TICK); if (ret < 0) { - tclldbg("ERROR: sam_freerun_initialize failed\n"); + tmrerr("ERROR: sam_freerun_initialize failed\n"); PANIC(); } diff --git a/arch/arm/src/samv7/sam_trng.c b/arch/arm/src/samv7/sam_trng.c index 3a76b924e1fac122c4a213f013aabdaaabe02729..7dc29a77d83626b591250ddb5f8f2ceba56eb710 100644 --- a/arch/arm/src/samv7/sam_trng.c +++ b/arch/arm/src/samv7/sam_trng.c @@ -244,7 +244,7 @@ static ssize_t sam_read(struct file *filep, char *buffer, size_t buflen) ssize_t retval; int ret; - fvdbg("buffer=%p buflen=%d\n", buffer, (int)buflen); + finfo("buffer=%p buflen=%d\n", buffer, (int)buflen); /* Get exclusive access to the TRNG harware */ @@ -284,7 +284,7 @@ static ssize_t sam_read(struct file *filep, char *buffer, size_t buflen) { ret = sem_wait(&g_trngdev.waitsem); - fvdbg("Awakened: nsamples=%d maxsamples=%d ret=%d\n", + finfo("Awakened: nsamples=%d maxsamples=%d ret=%d\n", g_trngdev.nsamples, g_trngdev.maxsamples, ret); if (ret < 0) @@ -321,7 +321,7 @@ errout: sem_post(&g_trngdev.exclsem); - fvdbg("Return %d\n", (int)retval); + finfo("Return %d\n", (int)retval); return retval; } @@ -347,7 +347,7 @@ void up_rnginitialize(void) { int ret; - fvdbg("Initializing TRNG hardware\n"); + finfo("Initializing TRNG hardware\n"); /* Initialize the device structure */ @@ -363,7 +363,7 @@ void up_rnginitialize(void) if (irq_attach(SAM_IRQ_TRNG, sam_interrupt)) { - fdbg("ERROR: Failed to attach to IRQ%d\n", SAM_IRQ_TRNG); + ferr("ERROR: Failed to attach to IRQ%d\n", SAM_IRQ_TRNG); return; } @@ -380,7 +380,7 @@ void up_rnginitialize(void) ret = register_driver("/dev/random", &g_trngops, 0644, NULL); if (ret < 0) { - fdbg("ERROR: Failed to register /dev/random\n"); + ferr("ERROR: Failed to register /dev/random\n"); return; } diff --git a/arch/arm/src/samv7/sam_twihs.c b/arch/arm/src/samv7/sam_twihs.c index fa5a8b2a525665ec7b354eb8b56781c3f66c5e2b..032d2eaa4a4b3361e015b45b8387d2d1031efc0d 100644 --- a/arch/arm/src/samv7/sam_twihs.c +++ b/arch/arm/src/samv7/sam_twihs.c @@ -91,6 +91,10 @@ # define CONFIG_SAMV7_TWIHS2_FREQUENCY 100000 #endif +#ifndef CONFIG_DEBUG_I2C_INFO +# undef CONFIG_SAMV7_TWIHSHS_REGDEBUG +#endif + /* Driver internal definitions *************************************************/ /* If verbose I2C debug output is enable, then allow more time before we declare * a timeout. The debug output from twi_interrupt will really slow things down! @@ -99,7 +103,7 @@ * to transfer on byte. So these define a "long" timeout. */ -#if defined(CONFIG_DEBUG_I2C) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_I2C_INFO # define TWIHS_TIMEOUT_MSPB (50) /* 50 msec/byte */ #else # define TWIHS_TIMEOUT_MSPB (5) /* 5 msec/byte */ @@ -112,28 +116,13 @@ #define TWIHS_MAX_FREQUENCY 66000000 /* Maximum TWIHS frequency */ -/* Macros to convert a I2C pin to a PIO open-drain output */ +/* Macros to convert a I2C pin to a GPIO open-drain output */ -#define I2C_INPUT (PIO_INPUT | PIO_CFG_PULLUP) -#define I2C_OUTPUT (PIO_OUTPUT | PIO_CFG_OPENDRAIN | PIO_OUTPUT_SET) +#define I2C_INPUT (GPIO_INPUT | GPIO_CFG_PULLUP) +#define I2C_OUTPUT (GPIO_OUTPUT | GPIO_CFG_OPENDRAIN | GPIO_OUTPUT_SET) -#define MKI2C_INPUT(p) (((p) & (PIO_PORT_MASK | PIO_PIN_MASK)) | I2C_INPUT) -#define MKI2C_OUTPUT(p) (((p) & (PIO_PORT_MASK | PIO_PIN_MASK)) | I2C_OUTPUT) - -/* Debug ***********************************************************************/ -/* CONFIG_DEBUG_I2C + CONFIG_DEBUG enables general I2C debug output. */ - -#ifdef CONFIG_DEBUG_I2C -# define i2cdbg dbg -# define i2cvdbg vdbg -# define i2clldbg lldbg -# define i2cllvdbg llvdbg -#else -# define i2cdbg(x...) -# define i2cvdbg(x...) -# define i2clldbg(x...) -# define i2cllvdbg(x...) -#endif +#define MKI2C_INPUT(p) (((p) & (GPIO_PORT_MASK | GPIO_PIN_MASK)) | I2C_INPUT) +#define MKI2C_OUTPUT(p) (((p) & (GPIO_PORT_MASK | GPIO_PIN_MASK)) | I2C_OUTPUT) /**************************************************************************** * Private Types @@ -145,6 +134,8 @@ struct twi_attr_s uint8_t twi; /* TWIHS device number (for debug output) */ uint8_t pid; /* TWIHS peripheral ID */ uint16_t irq; /* IRQ number for this TWIHS bus */ + uint8_t glitchfltr; /* Pulse width of a glich to be suppressed by the filter */ + uint8_t s_master; /* Single-Master Mode active */ gpio_pinset_t sclcfg; /* TWIHS CK pin configuration (SCL in I2C-ese) */ gpio_pinset_t sdacfg; /* TWIHS D pin configuration (SDA in I2C-ese) */ uintptr_t base; /* Base address of TWIHS registers */ @@ -230,6 +221,7 @@ static void twi_startmessage(struct twi_dev_s *priv, struct i2c_msg_s *msg); static int twi_transfer(FAR struct i2c_master_s *dev, FAR struct i2c_msg_s *msgs, int count); #ifdef CONFIG_I2C_RESET +static int twi_reset_internal(FAR struct i2c_master_s *dev); static int twi_reset(FAR struct i2c_master_s * dev); #endif @@ -248,6 +240,12 @@ static const struct twi_attr_s g_twi0attr = .twi = 0, .pid = SAM_PID_TWIHS0, .irq = SAM_IRQ_TWIHS0, + .glitchfltr = CONFIG_SAMV7_TWIHS0_GLITCH_FILTER, +#ifdef CONFIG_SAMV7_TWIHS0_SINGLE_MASTER + .s_master = 1, +#else + .s_master = 0, +#endif .sclcfg = GPIO_TWIHS0_CK, .sdacfg = GPIO_TWIHS0_D, .base = SAM_TWIHS0_BASE, @@ -263,6 +261,12 @@ static const struct twi_attr_s g_twi1attr = .twi = 1, .pid = SAM_PID_TWIHS1, .irq = SAM_IRQ_TWIHS1, + .glitchfltr = CONFIG_SAMV7_TWIHS1_GLITCH_FILTER, +#ifdef CONFIG_SAMV7_TWIHS1_SINGLE_MASTER + .s_master = 1, +#else + .s_master = 0, +#endif .sclcfg = GPIO_TWIHS1_CK, .sdacfg = GPIO_TWIHS1_D, .base = SAM_TWIHS1_BASE, @@ -278,6 +282,12 @@ static const struct twi_attr_s g_twi2attr = .twi = 2, .pid = SAM_PID_TWIHS2, .irq = SAM_IRQ_TWIHS2, + .glitchfltr = CONFIG_SAMV7_TWIHS2_GLITCH_FILTER, +#ifdef CONFIG_SAMV7_TWIHS0_SINGLE_MASTER + .s_master = 1, +#else + .s_master = 0, +#endif .sclcfg = GPIO_TWIHS2_CK, .sdacfg = GPIO_TWIHS2_D, .base = SAM_TWIHS2_BASE, @@ -323,7 +333,7 @@ static void twi_takesem(sem_t *sem) * awakened by a signal. */ - ASSERT(errno == EINTR); + DEBUGASSERT(errno == EINTR); } } @@ -364,7 +374,7 @@ static bool twi_checkreg(struct twi_dev_s *priv, bool wr, uint32_t value, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", priv->ntimes); + i2cinfo("...[Repeats %d times]...\n", priv->ntimes); } /* Save information about the new access */ @@ -396,7 +406,7 @@ static uint32_t twi_getabs(struct twi_dev_s *priv, uintptr_t address) if (twi_checkreg(priv, false, value, address)) { - lldbg("%08x->%08x\n", address, value); + i2cinfo("%08x->%08x\n", address, value); } return value; @@ -417,7 +427,7 @@ static void twi_putabs(struct twi_dev_s *priv, uintptr_t address, { if (twi_checkreg(priv, true, value, address)) { - lldbg("%08x<-%08x\n", address, value); + i2cinfo("%08x<-%08x\n", address, value); } putreg32(value, address); @@ -494,9 +504,9 @@ static int twi_wait(struct twi_dev_s *priv, unsigned int size) do { - i2cvdbg("TWIHS%d Waiting...\n", priv->attr->twi); + i2cinfo("TWIHS%d Waiting...\n", priv->attr->twi); twi_takesem(&priv->waitsem); - i2cvdbg("TWIHS%d Awakened with result: %d\n", + i2cinfo("TWIHS%d Awakened with result: %d\n", priv->attr->twi, priv->result); } while (priv->result == -EBUSY); @@ -505,6 +515,24 @@ static int twi_wait(struct twi_dev_s *priv, unsigned int size) * all further interrupts for the TWIHS have been disabled. */ + /* Check if an Arbitration Lost has occured */ + + if (priv->result == -EUSERS) + { + /* Something bad happened on the bus so force a reset */ + + priv->result = twi_reset_internal(&priv->dev); + + /* Although the reset was successful tell the higher driver that it's + * transfer has failed and should be repeated. + */ + + if (priv->result == OK) + { + priv->result = -EIO; + } + } + return priv->result; } @@ -554,7 +582,7 @@ static int twi_interrupt(struct twi_dev_s *priv) imr = twi_getrel(priv, SAM_TWIHS_IMR_OFFSET); pending = sr & imr; - i2cllvdbg("TWIHS%d pending: %08x\n", priv->attr->twi, pending); + i2cinfo("TWIHS%d pending: %08x\n", priv->attr->twi, pending); /* Byte received */ @@ -618,6 +646,20 @@ static int twi_interrupt(struct twi_dev_s *priv) } } + /* If Single-Master Mode is enabled and we lost arbitration (someone else or + * an EMC-Pulse did something on the bus) something went very wrong. So we end + * the current transfer with an EUSERS. The wait function will then reset + * the bus so further communication can take place. + */ + + else if ((priv->attr->s_master) && ((pending & TWIHS_INT_ARBLST) != 0)) + { + /* Wake up the thread with an Arbitration Lost error indication */ + + i2cllerr("ERROR: TWIHS%d Arbitration Lost\n"); + twi_wakeup(priv, -EUSERS); + } + /* Check for errors. We must check for errors *before* checking TXRDY or * TXCMP because the error can be signaled in combination with TXRDY or * TXCOMP. @@ -627,7 +669,7 @@ static int twi_interrupt(struct twi_dev_s *priv) { /* Wake up the thread with an I/O error indication */ - i2clldbg("ERROR: TWIHS%d pending: %08x\n", priv->attr->twi, pending); + i2cerr("ERROR: TWIHS%d pending: %08x\n", priv->attr->twi, pending); twi_wakeup(priv, -EIO); } @@ -750,7 +792,7 @@ static void twi_timeout(int argc, uint32_t arg, ...) { struct twi_dev_s *priv = (struct twi_dev_s *)arg; - i2clldbg("ERROR: TWIHS%d Timeout!\n", priv->attr->twi); + i2cerr("ERROR: TWIHS%d Timeout!\n", priv->attr->twi); twi_wakeup(priv, -ETIMEDOUT); } @@ -867,11 +909,12 @@ static int twi_transfer(FAR struct i2c_master_s *dev, struct twi_dev_s *priv = (struct twi_dev_s *)dev; irqstate_t flags; unsigned int size; + uint32_t sr; int i; int ret; DEBUGASSERT(dev != NULL && msgs != NULL && count > 0); - i2cvdbg("TWIHS%d count: %d\n", priv->attr->twi, count); + i2cinfo("TWIHS%d count: %d\n", priv->attr->twi, count); /* Calculate the total transfer size so that we can calculate a reasonable * timeout value. @@ -902,6 +945,22 @@ static int twi_transfer(FAR struct i2c_master_s *dev, twi_setfrequency(priv, msgs->frequency); + /* When we are in Single Master Mode check if the bus is ready (no stuck + * DATA or CLK line). + * Otherwise initiate a bus reset. + */ + + if (priv->attr->s_master) + { + sr = twi_getrel(priv, SAM_TWIHS_SR_OFFSET); + if (((sr & TWIHS_INT_SDA) == 0) || ((sr & TWIHS_INT_SCL) == 0)) + { + ret = twi_reset_internal(&priv->dev); + if (ret != OK) + goto errout; + } + } + /* Initiate the transfer. The rest will be handled from interrupt * logic. Interrupts must be disabled to prevent re-entrance from the * interrupt level. @@ -915,46 +974,46 @@ static int twi_transfer(FAR struct i2c_master_s *dev, */ ret = twi_wait(priv, size); + leave_critical_section(flags); + +errout: if (ret < 0) { - i2cdbg("ERROR: Transfer failed: %d\n", ret); + i2cerr("ERROR: Transfer failed: %d\n", ret); } - leave_critical_section(flags); twi_givesem(&priv->exclsem); return ret; } /************************************************************************************ - * Name: twi_reset - * - * Description: - * Perform an I2C bus reset in an attempt to break loose stuck I2C devices. - * - * Input Parameters: - * dev - Device-specific state data - * - * Returned Value: - * Zero (OK) on success; a negated errno value on failure. - * - ************************************************************************************/ +* Name: twi_reset_internal +* +* Description: +* Perform an I2C bus reset in an attempt to break loose stuck I2C devices. +* This function can be called from inside the driver while the TWIHS device is +* already locked, so we must not handle any semapores inside. +* To initiate a bus reset from outside the driver use twi_reset(dev). +* +* Input Parameters: +* dev - Device-specific state data +* +* Returned Value: +* Zero (OK) on success; a negated errno value on failure. +* +************************************************************************************/ #ifdef CONFIG_I2C_RESET -static int twi_reset(FAR struct i2c_master_s *dev) +static int twi_reset_internal(FAR struct i2c_master_s *dev) { struct twi_dev_s *priv = (struct twi_dev_s *)dev; unsigned int clockcnt; unsigned int stretchcnt; uint32_t sclpin; uint32_t sdapin; + uint8_t wait_us; int ret; - ASSERT(priv); - - /* Get exclusive access to the TWIHS device */ - - twi_takesem(&priv->exclsem); - /* Disable TWIHS interrupts */ up_disable_irq(priv->attr->irq); @@ -971,28 +1030,31 @@ static int twi_reset(FAR struct i2c_master_s *dev) sam_configgpio(sclpin); sam_configgpio(sdapin); - /* Peripheral clocking must be enabled in order to read valid data from - * the output pin (clocking is enabled automatically for pins configured - * as inputs). - */ - - sam_pio_forceclk(sclpin, true); - sam_pio_forceclk(sdapin, true); - /* Clock the bus until any slaves currently driving it low let it float. * Reading from the output will return the actual sensed level on the * SDA pin (not the level that we wrote). */ + /* Set the wait-time according to the TWI-Bus-Frequency */ + + if (priv->frequency >= 330000) + { + wait_us = 3; + } + else + { + wait_us = 10; + } + clockcnt = 0; - while (sam_pioread(sdapin) == false) + while (sam_gpioread(sdapin) == false) { /* Give up if we have tried too hard */ if (clockcnt++ > 10) { ret = -ETIMEDOUT; - goto errout_with_lock; + goto errout; } /* Sniff to make sure that clock stretching has finished. SCL should @@ -1002,55 +1064,85 @@ static int twi_reset(FAR struct i2c_master_s *dev) */ stretchcnt = 0; - while (sam_pioread(sclpin) == false) + while (sam_gpioread(sclpin) == false) { /* Give up if we have tried too hard */ if (stretchcnt++ > 10) { ret = -EAGAIN; - goto errout_with_lock; + goto errout; } - up_udelay(10); + up_udelay(wait_us); } /* Drive SCL low */ - sam_piowrite(sclpin, false); - up_udelay(10); + sam_gpiowrite(sclpin, false); + up_udelay(wait_us); /* Drive SCL high (floating) again */ - sam_piowrite(sclpin, true); - up_udelay(10); + sam_gpiowrite(sclpin, true); + up_udelay(wait_us); } /* Generate a start followed by a stop to reset slave * state machines. */ - sam_piowrite(sdapin, false); - up_udelay(10); - sam_piowrite(sclpin, false); - up_udelay(10); - - sam_piowrite(sclpin, true); - up_udelay(10); - sam_piowrite(sdapin, true); - up_udelay(10); + sam_gpiowrite(sdapin, false); + up_udelay(wait_us); + sam_gpiowrite(sclpin, false); + up_udelay(wait_us); - /* Clocking is no longer forced */ - - sam_pio_forceclk(sclpin, false); - sam_pio_forceclk(sdapin, false); + sam_gpiowrite(sclpin, true); + up_udelay(wait_us); + sam_gpiowrite(sdapin, true); + up_udelay(wait_us); /* Re-initialize the port hardware */ twi_hw_initialize(priv, priv->frequency); ret = OK; -errout_with_lock: +errout: + return ret; +} +#endif /* CONFIG_I2C_RESET */ + +/************************************************************************************ + * Name: twi_reset + * + * Description: + * Perform an I2C bus reset in an attempt to break loose stuck I2C devices. + * This function can be called from outside the driver, so lock the TWIHS Device + * and then let the internal reset function do the work. + * + * Input Parameters: + * dev - Device-specific state data + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ************************************************************************************/ + +#ifdef CONFIG_I2C_RESET +static int twi_reset(FAR struct i2c_master_s *dev) +{ + struct twi_dev_s *priv = (struct twi_dev_s *)dev; + int ret; + + DEBUGASSERT(priv != NULL); + + /* Get exclusive access to the TWIHS device */ + + twi_takesem(&priv->exclsem); + + /* Do the reset-procedure */ + + ret = twi_reset_internal(dev); /* Release our lock on the bus */ @@ -1157,7 +1249,7 @@ static void twi_hw_initialize(struct twi_dev_s *priv, uint32_t frequency) uint32_t regval; uint32_t mck; - i2cvdbg("TWIHS%d Initializing\n", priv->attr->twi); + i2cinfo("TWIHS%d Initializing\n", priv->attr->twi); /* Configure PIO pins */ @@ -1228,6 +1320,19 @@ static void twi_hw_initialize(struct twi_dev_s *priv, uint32_t frequency) regval |= PMC_PCR_PID(priv->attr->pid) | PMC_PCR_CMD | PMC_PCR_EN; twi_putabs(priv, SAM_PMC_PCR, regval); + /* Set the TWIHS Input Filters */ + + if (priv->attr->glitchfltr) + { + regval = TWIHS_FILTR_FILT | TWIHS_FILTR_THRES(priv->attr->glitchfltr); + } + else + { + regval = 0; + } + + twi_putrel(priv, SAM_TWIHS_FILTR_OFFSET, regval); + /* Set the initial TWIHS data transfer frequency */ priv->frequency = 0; @@ -1258,7 +1363,7 @@ struct i2c_master_s *sam_i2cbus_initialize(int bus) irqstate_t flags; int ret; - i2cvdbg("Initializing TWIHS%d\n", bus); + i2cinfo("Initializing TWIHS%d\n", bus); #ifdef CONFIG_SAMV7_TWIHS0 if (bus == 0) @@ -1303,7 +1408,7 @@ struct i2c_master_s *sam_i2cbus_initialize(int bus) else #endif { - i2cdbg("ERROR: Unsupported bus: TWIHS%d\n", bus); + i2cerr("ERROR: Unsupported bus: TWIHS%d\n", bus); return NULL; } @@ -1320,7 +1425,7 @@ struct i2c_master_s *sam_i2cbus_initialize(int bus) priv->timeout = wd_create(); if (priv->timeout == NULL) { - idbg("ERROR: Failed to allocate a timer\n"); + ierr("ERROR: Failed to allocate a timer\n"); goto errout_with_irq; } @@ -1329,7 +1434,7 @@ struct i2c_master_s *sam_i2cbus_initialize(int bus) ret = irq_attach(priv->attr->irq, priv->attr->handler); if (ret < 0) { - idbg("ERROR: Failed to attach irq %d\n", priv->attr->irq); + ierr("ERROR: Failed to attach irq %d\n", priv->attr->irq); goto errout_with_wdog; } @@ -1374,7 +1479,7 @@ int sam_i2cbus_uninitialize(FAR struct i2c_master_s *dev) struct twi_dev_s *priv = (struct twi_dev_s *) dev; irqstate_t flags; - i2cvdbg("TWIHS%d Un-initializing\n", priv->attr->twi); + i2cinfo("TWIHS%d Un-initializing\n", priv->attr->twi); /* Disable TWIHS interrupts */ diff --git a/arch/arm/src/samv7/sam_usbdevhs.c b/arch/arm/src/samv7/sam_usbdevhs.c index de6872e92ee45eae79663d37cd3e4e4d391a5154..07bfe1d2d4bf20a2d14998fd3bbf5ab97ae4dc7d 100644 --- a/arch/arm/src/samv7/sam_usbdevhs.c +++ b/arch/arm/src/samv7/sam_usbdevhs.c @@ -90,6 +90,10 @@ # define CONFIG_USBDEV_EP0_MAXSIZE 64 #endif +#ifndef CONFIG_DEBUG_USB_INFO +# undef CONFIG_SAMV7_USBHS_REGDEBUG +#endif + /* Number of DMA transfer descriptors. Default: 8 */ #ifndef CONFIG_SAMV7_USBDEVHS_NDTDS @@ -108,14 +112,6 @@ # warning CONFIG_USBDEV_DUALSPEED should be defined for high speed support #endif -/* Extremely detailed register debug that you would normally never want - * enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_SAMV7_USBHS_REGDEBUG -#endif - /* Not yet supported */ #undef CONFIG_SAMV7_USBDEVHS_SCATTERGATHER @@ -721,10 +717,6 @@ const struct trace_msg_t g_usb_trace_strings_intdecode[] = }; #endif -/**************************************************************************** - * Public Data - ****************************************************************************/ - /**************************************************************************** * Private Private Functions ****************************************************************************/ @@ -732,6 +724,7 @@ const struct trace_msg_t g_usb_trace_strings_intdecode[] = /**************************************************************************** * Register Operations ****************************************************************************/ + /**************************************************************************** * Name: sam_printreg * @@ -743,7 +736,7 @@ const struct trace_msg_t g_usb_trace_strings_intdecode[] = #ifdef CONFIG_SAMV7_USBHS_REGDEBUG static void sam_printreg(uintptr_t regaddr, uint32_t regval, bool iswrite) { - lldbg("%p%s%08x\n", regaddr, iswrite ? "<-" : "->", regval); + uinfo("%p%s%08x\n", regaddr, iswrite ? "<-" : "->", regval); } #endif @@ -794,7 +787,7 @@ static void sam_checkreg(uintptr_t regaddr, uint32_t regval, bool iswrite) { /* No.. More than one. */ - lldbg("[repeats %d more times]\n", count); + uinfo("[repeats %d more times]\n", count); } } @@ -869,36 +862,36 @@ static inline void sam_putreg(uint32_t regval, uint32_t regaddr) * Name: sam_dumpep ****************************************************************************/ -#if defined(CONFIG_SAMV7_USBHS_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_SAMV7_USBHS_REGDEBUG static void sam_dumpep(struct sam_usbdev_s *priv, int epno) { /* Global Registers */ - lldbg("Global Register:\n"); - lldbg(" CTRL: %08x\n", sam_getreg(SAM_USBHS_DEVCTRL)); - lldbg(" ISR: %08x\n", sam_getreg(SAM_USBHS_DEVISR)); - lldbg(" IMR: %08x\n", sam_getreg(SAM_USBHS_DEVIMR)); - lldbg(" EPT: %08x\n", sam_getreg(SAM_USBHS_DEVEPT)); - lldbg(" FNUM: %08x\n", sam_getreg(SAM_USBHS_DEVFNUM)); + uinfo("Global Register:\n"); + uinfo(" CTRL: %08x\n", sam_getreg(SAM_USBHS_DEVCTRL)); + uinfo(" ISR: %08x\n", sam_getreg(SAM_USBHS_DEVISR)); + uinfo(" IMR: %08x\n", sam_getreg(SAM_USBHS_DEVIMR)); + uinfo(" EPT: %08x\n", sam_getreg(SAM_USBHS_DEVEPT)); + uinfo(" FNUM: %08x\n", sam_getreg(SAM_USBHS_DEVFNUM)); /* Endpoint registers */ - lldbg("Endpoint %d Register:\n", epno); - lldbg(" CFG: %08x\n", sam_getreg(SAM_USBHS_DEVEPTCFG(epno))); - lldbg(" ISR: %08x\n", sam_getreg(SAM_USBHS_DEVEPTISR(epno))); - lldbg(" IMR: %08x\n", sam_getreg(SAM_USBHS_DEVEPTIMR(epno))); + uinfo("Endpoint %d Register:\n", epno); + uinfo(" CFG: %08x\n", sam_getreg(SAM_USBHS_DEVEPTCFG(epno))); + uinfo(" ISR: %08x\n", sam_getreg(SAM_USBHS_DEVEPTISR(epno))); + uinfo(" IMR: %08x\n", sam_getreg(SAM_USBHS_DEVEPTIMR(epno))); - lldbg("DMA %d Register:\n", epno); + uinfo("DMA %d Register:\n", epno); if ((SAM_EPSET_DMA & SAM_EP_BIT(epno)) != 0) { - lldbg(" NXTDSC: %08x\n", sam_getreg(SAM_USBHS_DEVDMANXTDSC(epno))); - lldbg(" ADDRESS: %08x\n", sam_getreg(SAM_USBHS_DEVDMAADDR(epno))); - lldbg(" CONTROL: %08x\n", sam_getreg(SAM_USBHS_DEVDMACTRL(epno))); - lldbg(" STATUS: %08x\n", sam_getreg(SAM_USBHS_DEVDMASTA(epno))); + uinfo(" NXTDSC: %08x\n", sam_getreg(SAM_USBHS_DEVDMANXTDSC(epno))); + uinfo(" ADDRESS: %08x\n", sam_getreg(SAM_USBHS_DEVDMAADDR(epno))); + uinfo(" CONTROL: %08x\n", sam_getreg(SAM_USBHS_DEVDMACTRL(epno))); + uinfo(" STATUS: %08x\n", sam_getreg(SAM_USBHS_DEVDMASTA(epno))); } else { - lldbg(" None\n"); + uinfo(" None\n"); } } #endif @@ -1412,9 +1405,9 @@ static int sam_req_write(struct sam_usbdev_s *priv, struct sam_ep_s *privep) return -ENOENT; } - ullvdbg("epno=%d req=%p: len=%d xfrd=%d inflight=%d zlpneeded=%d\n", - epno, privreq, privreq->req.len, privreq->req.xfrd, - privreq->inflight, privep->zlpneeded); + uinfo("epno=%d req=%p: len=%d xfrd=%d inflight=%d zlpneeded=%d\n", + epno, privreq, privreq->req.len, privreq->req.xfrd, + privreq->inflight, privep->zlpneeded); /* Handle any bytes in flight. */ @@ -1647,8 +1640,8 @@ static int sam_req_read(struct sam_usbdev_s *priv, struct sam_ep_s *privep, return -ENOENT; } - ullvdbg("EP%d: len=%d xfrd=%d\n", - epno, privreq->req.len, privreq->req.xfrd); + uinfo("EP%d: len=%d xfrd=%d\n", + epno, privreq->req.len, privreq->req.xfrd); /* Ignore any attempt to receive a zero length packet */ @@ -1982,8 +1975,8 @@ static void sam_ep0_setup(struct sam_usbdev_s *priv) index.w = GETUINT16(priv->ctrl.index); len.w = GETUINT16(priv->ctrl.len); - ullvdbg("SETUP: type=%02x req=%02x value=%04x index=%04x len=%04x\n", - priv->ctrl.type, priv->ctrl.req, value.w, index.w, len.w); + uinfo("SETUP: type=%02x req=%02x value=%04x index=%04x len=%04x\n", + priv->ctrl.type, priv->ctrl.req, value.w, index.w, len.w); /* Dispatch any non-standard requests */ @@ -2146,7 +2139,7 @@ static void sam_ep0_setup(struct sam_usbdev_s *priv) { /* Special case recipient=device test mode */ - ullvdbg("test mode: %d\n", index.w); + uinfo("test mode: %d\n", index.w); } else if ((priv->ctrl.type & USB_REQ_RECIPIENT_MASK) != USB_REQ_RECIPIENT_ENDPOINT) { @@ -3489,7 +3482,7 @@ static int sam_ep_configure_internal(struct sam_ep_s *privep, uint8_t nbtrans; bool dirin; - uvdbg("len: %02x type: %02x addr: %02x attr: %02x " + uinfo("len: %02x type: %02x addr: %02x attr: %02x " "maxpacketsize: %02x %02x interval: %02x\n", desc->len, desc->type, desc->addr, desc->attr, desc->mxpacketsize[0], desc->mxpacketsize[1], @@ -3730,7 +3723,7 @@ static int sam_ep_configure(struct usbdev_ep_s *ep, /* Verify parameters. Endpoint 0 is not available at this interface */ -#if defined(CONFIG_DEBUG) || defined(CONFIG_USBDEV_TRACE) +#if defined(CONFIG_DEBUG_FEATURES) || defined(CONFIG_USBDEV_TRACE) uint8_t epno = USB_EPNO(desc->addr); usbtrace(TRACE_EPCONFIGURE, (uint16_t)epno); @@ -3909,7 +3902,7 @@ static int sam_ep_submit(struct usbdev_ep_s *ep, struct usbdev_req_s *req) if (privep->stalled) { sam_req_abort(privep, privreq, -EBUSY); - ulldbg("ERROR: stalled\n"); + uerr("ERROR: stalled\n"); ret = -EPERM; } else @@ -4692,7 +4685,7 @@ static void sam_sw_setup(struct sam_usbdev_s *priv) kmm_memalign(16, CONFIG_SAMV7_USBDEVHS_NDTDS * sizeof(struct sam_dtd_s)); if (!priv->dtdpool) { - udbg("ERROR: Failed to allocate the DMA transfer descriptor pool\n"); + uerr("ERROR: Failed to allocate the DMA transfer descriptor pool\n"); return NULL; } diff --git a/arch/arm/src/samv7/sam_wdt.c b/arch/arm/src/samv7/sam_wdt.c index 8d638066820678e6a7bdff2ee2cf068502926975..d317bbd74d34e8d21c45a3c4dcd8f6967337ad99 100644 --- a/arch/arm/src/samv7/sam_wdt.c +++ b/arch/arm/src/samv7/sam_wdt.c @@ -57,6 +57,11 @@ * Pre-processor Definitions ****************************************************************************/ /* Configuration ************************************************************/ + +#ifndef CONFIG_DEBUG_WATCHDOG_INFO +# undef CONFIG_SAMV7_WDT_REGDEBUG +#endif + /* The Watchdog Timer uses the Slow Clock divided by 128 to establish the * maximum Watchdog period to be 16 seconds (with a typical Slow Clock of * 32768 kHz). @@ -80,20 +85,6 @@ #define WDT_MINTIMEOUT ((1000 + WDT_FREQUENCY - 1) / WDT_FREQUENCY) #define WDT_MAXTIMEOUT ((4096 * 1000) / WDT_FREQUENCY) -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the watchdog - * driver. NOTE: that only lldbg types are used so that the output is - * immediately available. - */ - -#ifdef CONFIG_DEBUG_WATCHDOG -# define wddbg lldbg -# define wdvdbg llvdbg -#else -# define wddbg(x...) -# define wdvdbg(x...) -#endif - /**************************************************************************** * Private Types ****************************************************************************/ @@ -118,7 +109,7 @@ struct sam_lowerhalf_s ****************************************************************************/ /* Register operations ******************************************************/ -#if defined(CONFIG_SAMV7_WDT_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_SAMV7_WDT_REGDEBUG static uint32_t sam_getreg(uintptr_t regaddr); static void sam_putreg(uint32_t regval, uintptr_t regaddr); #else @@ -178,7 +169,7 @@ static struct sam_lowerhalf_s g_wdtdev; * ****************************************************************************/ -#if defined(CONFIG_SAMV7_WDT_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_SAMV7_WDT_REGDEBUG static uint32_t sam_getreg(uintptr_t regaddr) { static uint32_t prevaddr = 0; @@ -199,7 +190,7 @@ static uint32_t sam_getreg(uintptr_t regaddr) { if (count == 4) { - lldbg("...\n"); + wdinfo("...\n"); } return regval; @@ -216,7 +207,7 @@ static uint32_t sam_getreg(uintptr_t regaddr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + wdinfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -228,7 +219,7 @@ static uint32_t sam_getreg(uintptr_t regaddr) /* Show the register value read */ - lldbg("%08x->%048\n", regaddr, regval); + wdinfo("%08x->%048\n", regaddr, regval); return regval; } #endif @@ -241,12 +232,12 @@ static uint32_t sam_getreg(uintptr_t regaddr) * ****************************************************************************/ -#if defined(CONFIG_SAMV7_WDT_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_SAMV7_WDT_REGDEBUG static void sam_putreg(uint32_t regval, uintptr_t regaddr) { /* Show the register value being written */ - lldbg("%08x<-%08x\n", regaddr, regval); + wdinfo("%08x<-%08x\n", regaddr, regval); /* Write the value */ @@ -315,7 +306,7 @@ static int sam_start(FAR struct watchdog_lowerhalf_s *lower) * timer with the newly programmed mode parameters. */ - wdvdbg("Entry\n"); + wdinfo("Entry\n"); return priv->started ? OK : -ENOSYS; } @@ -343,7 +334,7 @@ static int sam_stop(FAR struct watchdog_lowerhalf_s *lower) * timer with the newly programmed mode parameters. */ - wdvdbg("Entry\n"); + wdinfo("Entry\n"); return -ENOSYS; } @@ -366,7 +357,7 @@ static int sam_stop(FAR struct watchdog_lowerhalf_s *lower) static int sam_keepalive(FAR struct watchdog_lowerhalf_s *lower) { - wdvdbg("Entry\n"); + wdinfo("Entry\n"); /* Write WDT_CR_WDRSTT to the WDT CR regiser (along with the KEY value) * will restart the watchdog timer. @@ -397,7 +388,7 @@ static int sam_getstatus(FAR struct watchdog_lowerhalf_s *lower, { FAR struct sam_lowerhalf_s *priv = (FAR struct sam_lowerhalf_s *)lower; - wdvdbg("Entry\n"); + wdinfo("Entry\n"); DEBUGASSERT(priv); /* Return the status bit */ @@ -426,10 +417,10 @@ static int sam_getstatus(FAR struct watchdog_lowerhalf_s *lower, status->timeleft = 0; - wdvdbg("Status :\n"); - wdvdbg(" flags : %08x\n", status->flags); - wdvdbg(" timeout : %d\n", status->timeout); - wdvdbg(" timeleft : %d\n", status->timeleft); + wdinfo("Status :\n"); + wdinfo(" flags : %08x\n", status->flags); + wdinfo(" timeout : %d\n", status->timeout); + wdinfo(" timeleft : %d\n", status->timeleft); return OK; } @@ -457,13 +448,13 @@ static int sam_settimeout(FAR struct watchdog_lowerhalf_s *lower, uint32_t regval; DEBUGASSERT(priv); - wdvdbg("Entry: timeout=%d\n", timeout); + wdinfo("Entry: timeout=%d\n", timeout); /* Can this timeout be represented? */ if (timeout < WDT_MINTIMEOUT || timeout >= WDT_MAXTIMEOUT) { - wddbg("Cannot represent timeout: %d < %d > %d\n", + wderr("ERROR: Cannot represent timeout: %d < %d > %d\n", WDT_MINTIMEOUT, timeout, WDT_MAXTIMEOUT); return -ERANGE; } @@ -496,7 +487,7 @@ static int sam_settimeout(FAR struct watchdog_lowerhalf_s *lower, priv->reload = reload; - wdvdbg("reload=%d timout: %d->%d\n", + wdinfo("reload=%d timout: %d->%d\n", reload, timeout, priv->timeout); /* Set the WDT_MR according to calculated value @@ -541,7 +532,7 @@ static int sam_settimeout(FAR struct watchdog_lowerhalf_s *lower, priv->started = true; - wdvdbg("Setup: CR: %08x MR: %08x SR: %08x\n", + wdinfo("Setup: CR: %08x MR: %08x SR: %08x\n", sam_getreg(SAM_WDT_CR), sam_getreg(SAM_WDT_MR), sam_getreg(SAM_WDT_SR)); @@ -574,7 +565,7 @@ static xcpt_t sam_capture(FAR struct watchdog_lowerhalf_s *lower, xcpt_t handler) { #ifndef CONFIG_SAMV7_WDT_INTERRUPT - wddbg("ERROR: Not configured for this mode\n"); + wderr("ERROR: Not configured for this mode\n"); return NULL; #else FAR struct sam_lowerhalf_s *priv = (FAR struct sam_lowerhalf_s *)lower; @@ -582,7 +573,7 @@ static xcpt_t sam_capture(FAR struct watchdog_lowerhalf_s *lower, xcpt_t oldhandler; DEBUGASSERT(priv); - wdvdbg("Entry: handler=%p\n", handler); + wdinfo("Entry: handler=%p\n", handler); /* Get the old handler return value */ @@ -636,7 +627,7 @@ static xcpt_t sam_capture(FAR struct watchdog_lowerhalf_s *lower, static int sam_ioctl(FAR struct watchdog_lowerhalf_s *lower, int cmd, unsigned long arg) { - wdvdbg("cmd=%d arg=%ld\n", cmd, arg); + wdinfo("cmd=%d arg=%ld\n", cmd, arg); /* No ioctls are supported */ @@ -667,7 +658,7 @@ int sam_wdt_initialize(void) { FAR struct sam_lowerhalf_s *priv = &g_wdtdev; - wdvdbg("Entry: CR: %08x MR: %08x SR: %08x\n", + wdinfo("Entry: CR: %08x MR: %08x SR: %08x\n", sam_getreg(SAM_WDT_CR), sam_getreg(SAM_WDT_MR), sam_getreg(SAM_WDT_SR)); diff --git a/arch/arm/src/samv7/sam_xdmac.c b/arch/arm/src/samv7/sam_xdmac.c index 886de898fe428b8a2bdabe852861a2d887931cd0..206ecb5d0f14ef53ef3be0dc96c0f7e0b0131d7a 100644 --- a/arch/arm/src/samv7/sam_xdmac.c +++ b/arch/arm/src/samv7/sam_xdmac.c @@ -551,7 +551,7 @@ static uint8_t sam_channel(uint8_t pid, const struct sam_pidmap_s *table, } } - dmadbg("No channel found for pid %d\n", pid); + dmaerr("ERROR: No channel found for pid %d\n", pid); DEBUGPANIC(); return 0x3f; } @@ -1020,7 +1020,7 @@ sam_allocdesc(struct sam_xdmach_s *xdmach, struct chnext_view1_s *prev, * Obviously setting it to zero would break that usage. */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (csa != 0) #endif { @@ -1340,7 +1340,7 @@ static inline int sam_single(struct sam_xdmach_s *xdmach) static inline int sam_multiple(struct sam_xdmach_s *xdmach) { struct sam_xdmac_s *xdmac = sam_controller(xdmach); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_ASSERTIONS struct chnext_view1_s *llhead = xdmach->llhead; #endif uintptr_t paddr; @@ -1542,7 +1542,7 @@ static int sam_xdmac_interrupt(int irq, void *context) { /* Yes... Terminate the transfer with an error? */ - dmalldbg("ERROR: DMA failed: %08x\n", chpending); + dmaerr("ERROR: DMA failed: %08x\n", chpending); sam_dmaterminate(xdmach, -EIO); } @@ -1559,7 +1559,7 @@ static int sam_xdmac_interrupt(int irq, void *context) else { - dmalldbg("ERROR: Unexpected interrupt: %08x\n", chpending); + dmaerr("ERROR: Unexpected interrupt: %08x\n", chpending); DEBUGPANIC(); } @@ -1616,7 +1616,7 @@ void sam_dmainitialize(struct sam_xdmac_s *xdmac) void weak_function up_dmainitialize(void) { - dmallvdbg("Initialize XDMAC\n"); + dmainfo("Initialize XDMAC\n"); /* Enable peripheral clock */ @@ -1697,12 +1697,12 @@ DMA_HANDLE sam_dmachannel(uint8_t dmacno, uint32_t chflags) if (xdmach) { - dmavdbg("XDMAC%d CH%d: chflags: %08x returning xdmach: %p\n", + dmainfo("XDMAC%d CH%d: chflags: %08x returning xdmach: %p\n", (int)dmacno, xdmach->chan, (int)chflags, xdmach); } else { - dmadbg("ERROR: Failed allocate XDMAC%d channel\n", (int)dmacno); + dmaerr("ERROR: Failed allocate XDMAC%d channel\n", (int)dmacno); } return (DMA_HANDLE)xdmach; @@ -1731,7 +1731,7 @@ void sam_dmaconfig(DMA_HANDLE handle, uint32_t chflags) /* Set the new DMA channel flags. */ xdmach->flags = chflags; - dmavdbg("XDMAC CH%d: chflags: %08x\n", xdmach->chan, (int)chflags); + dmainfo("XDMAC CH%d: chflags: %08x\n", xdmach->chan, (int)chflags); } /**************************************************************************** @@ -1752,7 +1752,7 @@ void sam_dmafree(DMA_HANDLE handle) struct sam_xdmach_s *xdmach = (struct sam_xdmach_s *)handle; struct sam_xdmac_s *xdmac; - dmavdbg("xdmach: %p\n", xdmach); + dmainfo("xdmach: %p\n", xdmach); DEBUGASSERT((xdmach != NULL) && (xdmach->inuse)); xdmac = sam_controller(xdmach); @@ -1790,10 +1790,10 @@ int sam_dmatxsetup(DMA_HANDLE handle, uint32_t paddr, uint32_t maddr, size_t remaining; int ret = OK; - dmavdbg("xdmach: %p paddr: %08x maddr: %08x nbytes: %d\n", + dmainfo("xdmach: %p paddr: %08x maddr: %08x nbytes: %d\n", xdmach, (int)paddr, (int)maddr, (int)nbytes); DEBUGASSERT(xdmach); - dmavdbg("llhead: %p lltail: %p\n", xdmach->llhead, xdmach->lltail); + dmainfo("llhead: %p lltail: %p\n", xdmach->llhead, xdmach->lltail); /* The maximum transfer size in bytes depends upon the maximum number of * transfers and the number of bytes per transfer. @@ -1869,10 +1869,10 @@ int sam_dmarxsetup(DMA_HANDLE handle, uint32_t paddr, uint32_t maddr, size_t remaining; int ret = OK; - dmavdbg("xdmach: %p paddr: %08x maddr: %08x nbytes: %d\n", + dmainfo("xdmach: %p paddr: %08x maddr: %08x nbytes: %d\n", xdmach, (int)paddr, (int)maddr, (int)nbytes); DEBUGASSERT(xdmach); - dmavdbg("llhead: %p lltail: %p\n", xdmach->llhead, xdmach->lltail); + dmainfo("llhead: %p lltail: %p\n", xdmach->llhead, xdmach->lltail); /* The maximum transfer size in bytes depends upon the maximum number of * transfers and the number of bytes per transfer. @@ -1944,7 +1944,7 @@ int sam_dmastart(DMA_HANDLE handle, dma_callback_t callback, void *arg) struct sam_xdmach_s *xdmach = (struct sam_xdmach_s *)handle; int ret = -EINVAL; - dmavdbg("xdmach: %p callback: %p arg: %p\n", xdmach, callback, arg); + dmainfo("xdmach: %p callback: %p arg: %p\n", xdmach, callback, arg); DEBUGASSERT(xdmach != NULL); /* Verify that the DMA has been setup (i.e., at least one entry in the @@ -1998,7 +1998,7 @@ void sam_dmastop(DMA_HANDLE handle) struct sam_xdmach_s *xdmach = (struct sam_xdmach_s *)handle; irqstate_t flags; - dmavdbg("xdmach: %p\n", xdmach); + dmainfo("xdmach: %p\n", xdmach); DEBUGASSERT(xdmach != NULL); flags = enter_critical_section(); @@ -2017,7 +2017,7 @@ void sam_dmastop(DMA_HANDLE handle) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void sam_dmasample(DMA_HANDLE handle, struct sam_dmaregs_s *regs) { struct sam_xdmach_s *xdmach = (struct sam_xdmach_s *)handle; @@ -2057,7 +2057,7 @@ void sam_dmasample(DMA_HANDLE handle, struct sam_dmaregs_s *regs) leave_critical_section(flags); } -#endif /* CONFIG_DEBUG_DMA */ +#endif /* CONFIG_DEBUG_DMA_INFO */ /**************************************************************************** * Name: sam_dmadump @@ -2070,34 +2070,34 @@ void sam_dmasample(DMA_HANDLE handle, struct sam_dmaregs_s *regs) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void sam_dmadump(DMA_HANDLE handle, const struct sam_dmaregs_s *regs, const char *msg) { struct sam_xdmach_s *xdmach = (struct sam_xdmach_s *)handle; - dmadbg("%s\n", msg); - dmadbg(" DMA Global Registers:\n"); - dmadbg(" GTYPE[%08x]: %08x\n", SAM_XDMAC_GTYPE, regs->gtype); - dmadbg(" GCFG[%08x]: %08x\n", SAM_XDMAC_GCFG, regs->gcfg); - dmadbg(" GWAC[%08x]: %08x\n", SAM_XDMAC_GWAC, regs->gwac); - dmadbg(" GIM[%08x]: %08x\n", SAM_XDMAC_GIM, regs->gim); - dmadbg(" GS[%08x]: %08x\n", SAM_XDMAC_GS, regs->gs); - dmadbg(" GRS[%08x]: %08x\n", SAM_XDMAC_GRS, regs->grs); - dmadbg(" GWS[%08x]: %08x\n", SAM_XDMAC_GWS, regs->gws); - dmadbg(" GSWS[%08x]: %08x\n", SAM_XDMAC_GSWS, regs->gsws); - dmadbg(" DMA Channel Registers:\n"); - dmadbg(" CIM[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CIM_OFFSET, regs->cim); - dmadbg(" CSA[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CSA_OFFSET, regs->csa); - dmadbg(" CDA[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CDA_OFFSET, regs->cda); - dmadbg(" CNDA[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CNDA_OFFSET, regs->cnda); - dmadbg(" CNDC[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CNDC_OFFSET, regs->cndc); - dmadbg(" CUBC[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CUBC_OFFSET, regs->cubc); - dmadbg(" CBC[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CBC_OFFSET, regs->cbc); - dmadbg(" CC[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CC_OFFSET, regs->cc); - dmadbg(" CDSMSP[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CDSMSP_OFFSET, regs->cdsmsp); - dmadbg(" CSUS[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CSUS_OFFSET, regs->csus); - dmadbg(" CDUS[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CDUS_OFFSET, regs->cdus); + dmainfo("%s\n", msg); + dmainfo(" DMA Global Registers:\n"); + dmainfo(" GTYPE[%08x]: %08x\n", SAM_XDMAC_GTYPE, regs->gtype); + dmainfo(" GCFG[%08x]: %08x\n", SAM_XDMAC_GCFG, regs->gcfg); + dmainfo(" GWAC[%08x]: %08x\n", SAM_XDMAC_GWAC, regs->gwac); + dmainfo(" GIM[%08x]: %08x\n", SAM_XDMAC_GIM, regs->gim); + dmainfo(" GS[%08x]: %08x\n", SAM_XDMAC_GS, regs->gs); + dmainfo(" GRS[%08x]: %08x\n", SAM_XDMAC_GRS, regs->grs); + dmainfo(" GWS[%08x]: %08x\n", SAM_XDMAC_GWS, regs->gws); + dmainfo(" GSWS[%08x]: %08x\n", SAM_XDMAC_GSWS, regs->gsws); + dmainfo(" DMA Channel Registers:\n"); + dmainfo(" CIM[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CIM_OFFSET, regs->cim); + dmainfo(" CSA[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CSA_OFFSET, regs->csa); + dmainfo(" CDA[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CDA_OFFSET, regs->cda); + dmainfo(" CNDA[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CNDA_OFFSET, regs->cnda); + dmainfo(" CNDC[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CNDC_OFFSET, regs->cndc); + dmainfo(" CUBC[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CUBC_OFFSET, regs->cubc); + dmainfo(" CBC[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CBC_OFFSET, regs->cbc); + dmainfo(" CC[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CC_OFFSET, regs->cc); + dmainfo(" CDSMSP[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CDSMSP_OFFSET, regs->cdsmsp); + dmainfo(" CSUS[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CSUS_OFFSET, regs->csus); + dmainfo(" CDUS[%08x]: %08x\n", xdmach->base + SAM_XDMACH_CDUS_OFFSET, regs->cdus); } -#endif /* CONFIG_DEBUG_DMA */ +#endif /* CONFIG_DEBUG_DMA_INFO */ #endif /* CONFIG_SAMV7_XDMAC */ diff --git a/arch/arm/src/samv7/sam_xdmac.h b/arch/arm/src/samv7/sam_xdmac.h index fe98581d08b7ecad25863eafbd2a630f483b7456..cfbf14fe0dd002ca98cbace12f9a11d534f520eb 100644 --- a/arch/arm/src/samv7/sam_xdmac.h +++ b/arch/arm/src/samv7/sam_xdmac.h @@ -50,12 +50,6 @@ * Pre-processor Definitions ************************************************************************************/ -/* Configuration ********************************************************************/ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_DMA -#endif - /* DMA ******************************************************************************/ /* Flags used to characterize the DMA channel. The naming convention is that one @@ -172,7 +166,7 @@ typedef void (*dma_callback_t)(DMA_HANDLE handle, void *arg, int result); /* The following is used for sampling DMA registers when CONFIG DEBUG_DMA is selected */ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO struct sam_dmaregs_s { /* Global Registers. @@ -210,7 +204,7 @@ struct sam_dmaregs_s uint32_t csus; /* Channel Source Microblock Stride */ uint32_t cdus; /* Channel Destination Microblock Stride */ }; -#endif /* CONFIG_DEBUG_DMA */ +#endif /* CONFIG_DEBUG_DMA_INFO */ /************************************************************************************ * Inline Functions @@ -342,7 +336,7 @@ void sam_dmastop(DMA_HANDLE handle); * ************************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void sam_dmasample(DMA_HANDLE handle, struct sam_dmaregs_s *regs); #else # define sam_dmasample(handle,regs) @@ -356,7 +350,7 @@ void sam_dmasample(DMA_HANDLE handle, struct sam_dmaregs_s *regs); * ************************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void sam_dmadump(DMA_HANDLE handle, const struct sam_dmaregs_s *regs, const char *msg); #else # define sam_dmadump(handle,regs,msg) diff --git a/arch/arm/src/stm32/Kconfig b/arch/arm/src/stm32/Kconfig index 1da3821f825b2227c481faed883114121a353b7c..4a838eb07d6a3cef477984d896e5b04f5e905cfc 100644 --- a/arch/arm/src/stm32/Kconfig +++ b/arch/arm/src/stm32/Kconfig @@ -484,6 +484,16 @@ config ARCH_CHIP_STM32F105VB select STM32_HAVE_I2C2 select STM32_HAVE_TIM4 +config ARCH_CHIP_STM32F105RB + bool "STM32F105RB" + select ARCH_CORTEXM3 + select STM32_STM32F10XX + select STM32_CONNECTIVITYLINE + select STM32_HAVE_DAC1 + select STM32_HAVE_DAC2 + select STM32_HAVE_I2C2 + select STM32_HAVE_TIM4 + config ARCH_CHIP_STM32F107VC bool "STM32F107VC" select ARCH_CORTEXM3 @@ -1182,7 +1192,6 @@ config STM32_VALUELINE select STM32_HAVE_TIM15 select STM32_HAVE_TIM16 select STM32_HAVE_TIM17 - select STM32_HAVE_ADC2 select STM32_HAVE_SPI2 if STM32_HIGHDENSITY select STM32_HAVE_SPI3 if STM32_HIGHDENSITY @@ -2533,6 +2542,8 @@ config STM32_FSMC_SRAM ---help--- In addition to internal SRAM, SRAM may also be available through the FSMC. +menu "Timer Configuration" + config STM32_TIM1_PWM bool "TIM1 PWM" default n @@ -5300,6 +5311,8 @@ config STM32_TIM14_CAP Timer devices may be used for different purposes. One special purpose is to capture input. +endmenu # Timer Configuration + menu "ADC Configuration" depends on STM32_ADC @@ -6202,9 +6215,9 @@ endchoice config STM32_ETHMAC_REGDEBUG bool "Register-Level Debug" default n - depends on DEBUG + depends on DEBUG_NET_INFO ---help--- - Enable very low-level register access debug. Depends on DEBUG. + Enable very low-level register access debug. Depends on CONFIG_DEBUG_FEATURES. endmenu endif @@ -6292,16 +6305,16 @@ menu "USB Host Debug Configuration" config STM32_USBHOST_REGDEBUG bool "Register-Level Debug" default n - depends on USBHOST && (STM32_OTGFS || STM32_OTGHS) + depends on USBHOST && DEBUG_USB_INFO && (STM32_OTGFS || STM32_OTGHS) ---help--- - Enable very low-level register access debug. Depends on DEBUG. + Enable very low-level register access debug. config STM32_USBHOST_PKTDUMP bool "Packet Dump Debug" default n - depends on USBHOST && (STM32_OTGFS || STM32_OTGHS) + depends on USBHOST && DEBUG_USB_INFO && (STM32_OTGFS || STM32_OTGHS) ---help--- - Dump all incoming and outgoing USB packets. Depends on DEBUG. + Dump all incoming and outgoing USB packets. endmenu @@ -6320,21 +6333,21 @@ config STM32_USB_ITRMP F3 family and selects the use of the dedicated USB interrupts. menu "CAN driver configuration" - depends on STM32_CAN1 || STM32_CAN2 + depends on STM32_CAN config CAN1_BAUD int "CAN1 BAUD" default 250000 depends on STM32_CAN1 ---help--- - CAN1 BAUD rate. Required if STM32_CAN1 is defined. + CAN1 BAUD rate. Required if CONFIG_STM32_CAN1 is defined. config CAN2_BAUD int "CAN2 BAUD" default 250000 depends on STM32_CAN2 ---help--- - CAN2 BAUD rate. Required if STM32_CAN2 is defined. + CAN2 BAUD rate. Required if CONFIG_STM32_CAN2 is defined. config CAN_TSEG1 int "TSEG1 quanta" @@ -6347,6 +6360,15 @@ config CAN_TSEG2 default 7 ---help--- The number of CAN time quanta in segment 2. Default: 7 + +config STM32_CAN_REGDEBUG + bool "CAN Register level debug" + depends on DEBUG_CAN_INFO + default n + ---help--- + Output detailed register-level CAN device debug information. + Requires also CONFIG_DEBUG_CAN_INFO. + endmenu if STM32_LTDC diff --git a/arch/arm/src/stm32/Make.defs b/arch/arm/src/stm32/Make.defs index 98c1bad6463b166be2c28848399bb40c8b297d09..1a3355d24d446ddf1b0e7e5c0d3c096207cdc355 100644 --- a/arch/arm/src/stm32/Make.defs +++ b/arch/arm/src/stm32/Make.defs @@ -109,10 +109,10 @@ endif CHIP_ASRCS = CHIP_CSRCS = stm32_allocateheap.c stm32_start.c stm32_rcc.c stm32_lse.c -CHIP_CSRCS += stm32_lsi.c stm32_gpio.c stm32_exti_gpio.c stm32_flash.c stm32_irq.c -CHIP_CSRCS += stm32_dma.c stm32_lowputc.c stm32_serial.c stm32_spi.c -CHIP_CSRCS += stm32_sdio.c stm32_tim.c stm32_waste.c stm32_ccm.c stm32_uid.c -CHIP_CSRCS += stm32_capture.c +CHIP_CSRCS += stm32_lsi.c stm32_gpio.c stm32_exti_gpio.c stm32_flash.c +CHIP_CSRCS += stm32_irq.c stm32_dma.c stm32_lowputc.c stm32_getc.c +CHIP_CSRCS += stm32_serial.c stm32_spi.c stm32_sdio.c stm32_tim.c +CHIP_CSRCS += stm32_waste.c stm32_ccm.c stm32_uid.c stm32_capture.c ifeq ($(CONFIG_TIMER),y) CHIP_CSRCS += stm32_tim_lowerhalf.c @@ -247,7 +247,7 @@ ifeq ($(CONFIG_STM32_WWDG),y) CHIP_CSRCS += stm32_wwdg.c endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) CHIP_CSRCS += stm32_dumpgpio.c endif diff --git a/arch/arm/src/stm32/chip.h b/arch/arm/src/stm32/chip.h index bba330edfaf7741f1a4d150cbefa3e63f2c1dc8f..4542a3885f02a6fee8f26ca3df9318b006ba30c4 100644 --- a/arch/arm/src/stm32/chip.h +++ b/arch/arm/src/stm32/chip.h @@ -109,6 +109,9 @@ # elif defined(CONFIG_ARCH_CHIP_STM32F105VB) # include "chip/stm32f105v_pinmap.h" +# elif defined(CONFIG_ARCH_CHIP_STM32F105RB) +# include "chip/stm32f105r_pinmap.h" + # elif defined(CONFIG_ARCH_CHIP_STM32F107VC) # include "chip/stm32f107v_pinmap.h" # else diff --git a/arch/arm/src/stm32/chip/stm32_adc.h b/arch/arm/src/stm32/chip/stm32_adc.h index 3a59ba25a8879f260bc86a38cb35f96e6dc27ba6..8a9eb956b673056b324dacac856b3f0c8315a0e7 100644 --- a/arch/arm/src/stm32/chip/stm32_adc.h +++ b/arch/arm/src/stm32/chip/stm32_adc.h @@ -1,7 +1,7 @@ /**************************************************************************************************** * arch/arm/src/stm32/chip/stm32_adc.h * - * 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 @@ -261,6 +261,7 @@ # define ADC_CR1_RES_8BIT (2 << ADC_CR1_RES_SHIFT) /* 11 ADCCLK cycles. For STM32L15XX: 9 ADCCLK cycles */ # define ADC_CR1_RES_6BIT (3 << ADC_CR1_RES_SHIFT) /* 9 ADCCLK cycles. For STM32L15XX: 7 ADCCLK cycles */ # define ADC_CR1_OVRIE (1 << 26) /* Bit 26: Overrun interrupt enable */ +# define ADC_CR1_RESERVED (0xfb3f0000) #endif /* ADC control register 2 */ @@ -391,7 +392,7 @@ # define ADC_CR2_EXTEN_BOTH (3 << ADC_CR2_EXTEN_SHIFT) /* 11: Trigger detection on both the rising and falling edges */ # define ADC_CR2_SWSTART (1 << 30) /* Bit 30: Start Conversion of regular channels */ - +# define ADC_CR2_RESERVED (0x8080f0fc) #else # define ADC_CR2_JEXTSEL_SHIFT (12) /* Bits 12-14: External event select for injected group */ # define ADC_CR2_JEXTSEL_MASK (7 << ADC_CR2_JEXTSEL_SHIFT) @@ -477,7 +478,7 @@ # define ADC_SMPR1_SMP17_SHIFT (21) /* Bits 21-23: Channel 17 Sample time selection */ # define ADC_SMPR1_SMP17_MASK (7 << ADC_SMPR1_SMP17_SHIFT) # if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F40XX) -# define ADC_SMPR1_SMP18_SHIFT (21) /* Bits 24-26: Channel 18 Sample time selection */ +# define ADC_SMPR1_SMP18_SHIFT (24) /* Bits 24-26: Channel 18 Sample time selection */ # define ADC_SMPR1_SMP18_MASK (7 << ADC_SMPR1_SMP17_SHIFT) # endif #else diff --git a/arch/arm/src/stm32/chip/stm32_flash.h b/arch/arm/src/stm32/chip/stm32_flash.h index c031492752724b6b63f0fa54a58d77ab14923135..70e6d62d97607717a3baa12d6c1ed198feaaef4d 100644 --- a/arch/arm/src/stm32/chip/stm32_flash.h +++ b/arch/arm/src/stm32/chip/stm32_flash.h @@ -3,7 +3,7 @@ * * Copyright (C) 2009, 2011, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt - * David Sidrane + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/arch/arm/src/stm32/chip/stm32f105r_pinmap.h b/arch/arm/src/stm32/chip/stm32f105r_pinmap.h new file mode 100644 index 0000000000000000000000000000000000000000..ffd3ef35c45d11703629bfafd295d7efc4373586 --- /dev/null +++ b/arch/arm/src/stm32/chip/stm32f105r_pinmap.h @@ -0,0 +1,328 @@ +/************************************************************************************ + * arch/arm/src/stm32/chip/stm32f105r_pinmap.h + * + * Copyright (C) 2009, 2011, 2014, 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_STM32_CHIP_STM32F105R_PINMAP_H +#define __ARCH_ARM_SRC_STM32_CHIP_STM32F105R_PINMAP_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "stm32_gpio.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Alternate Pin Functions: */ + +#define GPIO_ADC12_IN0 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN0) +#define GPIO_ADC12_IN1 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN1) +#define GPIO_ADC12_IN10 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN0) +#define GPIO_ADC12_IN11 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN1) +#define GPIO_ADC12_IN12 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN2) +#define GPIO_ADC12_IN13 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN3) +#define GPIO_ADC12_IN14 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN4) +#define GPIO_ADC12_IN15 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN5) +#define GPIO_ADC12_IN2 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN2) +#define GPIO_ADC12_IN3 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN3) +#define GPIO_ADC12_IN4 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN4) +#define GPIO_ADC12_IN5 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN5) +#define GPIO_ADC12_IN6 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN6) +#define GPIO_ADC12_IN7 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN7) +#define GPIO_ADC12_IN8 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN0) +#define GPIO_ADC12_IN9 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN1) + +#if defined(CONFIG_STM32_CAN1_REMAP1) +# define GPIO_CAN1_RX (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN8) +# define GPIO_CAN1_TX (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN9) +#else +# define GPIO_CAN1_RX (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN11) +# define GPIO_CAN1_TX (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN12) +#endif + +#if defined(CONFIG_STM32_CAN2_REMAP) +# define GPIO_CAN2_RX (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN5) +# define GPIO_CAN2_TX (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN6) +#else +# define GPIO_CAN2_RX (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN12) +# define GPIO_CAN2_TX (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN13) +#endif + +#if 0 /* Needs further investigation */ +#define GPIO_DAC_OUT1 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN4) +#define GPIO_DAC_OUT2 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN5) +#endif + +#if defined(CONFIG_STM32_I2C1_REMAP) +# define GPIO_I2C1_SCL (GPIO_ALT|GPIO_CNF_AFOD|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN8) +# define GPIO_I2C1_SDA (GPIO_ALT|GPIO_CNF_AFOD|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN9) +#else +# define GPIO_I2C1_SCL (GPIO_ALT|GPIO_CNF_AFOD|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN6) +# define GPIO_I2C1_SDA (GPIO_ALT|GPIO_CNF_AFOD|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN7) +#endif +#define GPIO_I2C1_SMBA (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN5) + +#define GPIO_I2C2_SCL (GPIO_ALT|GPIO_CNF_AFOD|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN10) +#define GPIO_I2C2_SDA (GPIO_ALT|GPIO_CNF_AFOD|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN11) +#define GPIO_I2C2_SMBA (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN12) +#define GPIO_I2S2_CK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN13) +#define GPIO_I2S2_MCK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN6) +#define GPIO_I2S2_WS (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN12) + +#define GPIO_I2S3_CK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN3) +#define GPIO_I2S3_MCK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN7) +#define GPIO_I2S3_SD (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN5) +#define GPIO_I2S3_WS (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN15) + +#define GPIO_MCO (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN8) + +#define GPIO_OTGFS_DM (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN11) +#define GPIO_OTGFS_DP (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN12) +#define GPIO_OTGFS_ID (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN10) +#define GPIO_OTGFS_SOF (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN8) +#define GPIO_OTGFS_VBUS (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN9) + +#if defined(CONFIG_STM32_SPI1_REMAP) +# define GPIO_SPI1_NSS (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN15) +# define GPIO_SPI1_SCK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN3) +# define GPIO_SPI1_MISO (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN4) +# define GPIO_SPI1_MOSI (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN5) +#else +# define GPIO_SPI1_NSS (GPIO_INPUT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN4) +# define GPIO_SPI1_SCK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN5) +# define GPIO_SPI1_MISO (GPIO_INPUT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN6) +# define GPIO_SPI1_MOSI (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN7) +#endif + +#define GPIO_SPI2_NSS (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN12) +#define GPIO_SPI2_SCK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN13) +#define GPIO_SPI2_MISO (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN14) +#define GPIO_SPI2_MOSI (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN15) + +#if defined(CONFIG_STM32_SPI3_REMAP) +# define GPIO_SPI3_NSS (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN4) +# define GPIO_SPI3_SCK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN10) +# define GPIO_SPI3_MISO (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN11) +# define GPIO_SPI3_MOSI (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN12) +#else +# define GPIO_SPI3_NSS (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN15) +# define GPIO_SPI3_SCK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN3) +# define GPIO_SPI3_MISO (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN4) +# define GPIO_SPI3_MOSI (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN5) +#endif + +#if 0 /* Needs further investigation */ +#define GPIO_TAMPER_RTC (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN13) +#endif + +#if defined(CONFIG_STM32_TIM1_PARTIAL_REMAP) +# define GPIO_TIM1_ETR (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN12) +# define GPIO_TIM1_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN8) +# define GPIO_TIM1_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN8) +# define GPIO_TIM1_CH2IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN9) +# define GPIO_TIM1_CH2OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN9) +# define GPIO_TIM1_CH3IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN10) +# define GPIO_TIM1_CH3OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN10) +# define GPIO_TIM1_CH4IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN11) +# define GPIO_TIM1_CH4OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN11) +# define GPIO_TIM1_BKIN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN6) +# define GPIO_TIM1_CH1N (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN7) +# define GPIO_TIM1_CH2N (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN0) +# define GPIO_TIM1_CH3N (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN1) +#else +# define GPIO_TIM1_ETR (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN12) +# define GPIO_TIM1_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN8) +# define GPIO_TIM1_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN8) +# define GPIO_TIM1_CH2IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN9) +# define GPIO_TIM1_CH2OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN9) +# define GPIO_TIM1_CH3IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN10) +# define GPIO_TIM1_CH3OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN10) +# define GPIO_TIM1_CH4IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN11) +# define GPIO_TIM1_CH4OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN11) +# define GPIO_TIM1_BKIN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN12) +# define GPIO_TIM1_CH1N (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN13) +# define GPIO_TIM1_CH2N (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN14) +# define GPIO_TIM1_CH3N (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN15) +#endif + +#if defined(CONFIG_STM32_TIM2_FULL_REMAP) +# define GPIO_TIM2_ETR (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN15) +# define GPIO_TIM2_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN15) +# define GPIO_TIM2_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN15) +# define GPIO_TIM2_CH2IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN3) +# define GPIO_TIM2_CH2OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN3) +# define GPIO_TIM2_CH3IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN10) +# define GPIO_TIM2_CH3OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN10) +# define GPIO_TIM2_CH4IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN11) +# define GPIO_TIM2_CH4OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN11) +#elif defined(CONFIG_STM32_TIM2_PARTIAL_REMAP_1) +# define GPIO_TIM2_ETR (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN15) +# define GPIO_TIM2_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN15) +# define GPIO_TIM2_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN15) +# define GPIO_TIM2_CH2IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN3) +# define GPIO_TIM2_CH2OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN3) +# define GPIO_TIM2_CH3IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN2) +# define GPIO_TIM2_CH3OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN2) +# define GPIO_TIM2_CH4IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN3) +# define GPIO_TIM2_CH4OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN3) +#elif defined(CONFIG_STM32_TIM2_PARTIAL_REMAP_2) +# define GPIO_TIM2_ETR (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN0) +# define GPIO_TIM2_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN0) +# define GPIO_TIM2_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN0) +# define GPIO_TIM2_CH2IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN1) +# define GPIO_TIM2_CH2OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN1) +# define GPIO_TIM2_CH3IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN10) +# define GPIO_TIM2_CH3OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN10) +# define GPIO_TIM2_CH4IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN11) +# define GPIO_TIM2_CH4OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN11) +#else +# define GPIO_TIM2_ETR (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN0) +# define GPIO_TIM2_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN0) +# define GPIO_TIM2_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN0) +# define GPIO_TIM2_CH2IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN1) +# define GPIO_TIM2_CH2OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN1) +# define GPIO_TIM2_CH3IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN2) +# define GPIO_TIM2_CH3OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN2) +# define GPIO_TIM2_CH4IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN3) +# define GPIO_TIM2_CH4OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN3) +#endif + +#if defined(CONFIG_STM32_TIM3_FULL_REMAP) +# define GPIO_TIM3_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN6) +# define GPIO_TIM3_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN6) +# define GPIO_TIM3_CH2IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN7) +# define GPIO_TIM3_CH2OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN7) +# define GPIO_TIM3_CH3IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN8) +# define GPIO_TIM3_CH3OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN8) +# define GPIO_TIM3_CH4IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN9) +# define GPIO_TIM3_CH4OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN9) +#elif defined(CONFIG_STM32_TIM3_PARTIAL_REMAP) +# define GPIO_TIM3_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN4) +# define GPIO_TIM3_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN4) +# define GPIO_TIM3_CH2IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN5) +# define GPIO_TIM3_CH2OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN5) +# define GPIO_TIM3_CH3IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN0) +# define GPIO_TIM3_CH3OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN0) +# define GPIO_TIM3_CH4IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN1) +# define GPIO_TIM3_CH4OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN1) +#else +# define GPIO_TIM3_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN6) +# define GPIO_TIM3_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN6) +# define GPIO_TIM3_CH2IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN7) +# define GPIO_TIM3_CH2OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN7) +# define GPIO_TIM3_CH3IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN0) +# define GPIO_TIM3_CH3OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN0) +# define GPIO_TIM3_CH4IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN1) +# define GPIO_TIM3_CH4OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN1) +#endif +#define GPIO_TIM3_ETR (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTD|GPIO_PIN2) + +#define GPIO_TIM4_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN6) +#define GPIO_TIM4_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN6) +#define GPIO_TIM4_CH2IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN7) +#define GPIO_TIM4_CH2OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN7) +#define GPIO_TIM4_CH3IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN8) +#define GPIO_TIM4_CH3OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN8) +#define GPIO_TIM4_CH4IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN9) +#define GPIO_TIM4_CH4OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN9) + +#define GPIO_TIM5_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN0) +#define GPIO_TIM5_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN0) +#define GPIO_TIM5_CH2IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN1) +#define GPIO_TIM5_CH2OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN1) +#define GPIO_TIM5_CH3IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN2) +#define GPIO_TIM5_CH3OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN2) +#define GPIO_TIM5_CH4IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN3) +#define GPIO_TIM5_CH4OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN3) + +#if 0 /* Needs further investigation */ +#if defined(CONFIG_STM32_TRACESWO_REMAP) +# define GPIO_TRACESWO (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN3) +#endif +#endif + +#define GPIO_USART1_CTS (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN11) +#define GPIO_USART1_RTS (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN12) +#define GPIO_USART1_CK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN8) +#if defined(CONFIG_STM32_USART1_REMAP) +# define GPIO_USART1_TX (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN9) +# define GPIO_USART1_RX (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN10) +#else +# define GPIO_USART1_TX (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN9) +# define GPIO_USART1_RX (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN10) +#endif + +#define GPIO_USART2_CTS (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN0) +#define GPIO_USART2_RTS (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN1) +#define GPIO_USART2_TX (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN2) +#define GPIO_USART2_RX (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN3) +#define GPIO_USART2_CK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN4) + +#if defined(CONFIG_STM32_USART3_PARTIAL_REMAP) +# define GPIO_USART3_TX (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN10) +# define GPIO_USART3_RX (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN11) +# define GPIO_USART3_CK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN12) +# define GPIO_USART3_CTS (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN13) +# define GPIO_USART3_RTS (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN14) +#else +# define GPIO_USART3_TX (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN10) +# define GPIO_USART3_RX (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN11) +# define GPIO_USART3_CK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN12) +# define GPIO_USART3_CTS (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN13) +# define GPIO_USART3_RTS (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN14) +#endif + +#define GPIO_UART4_RX (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN11) +#define GPIO_UART4_TX (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN10) + +#define GPIO_UART5_RX (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTD|GPIO_PIN2) +#define GPIO_UART5_TX (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN12) + +#define GPIO_WKUP (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN0) + +/* Some GPIOs are accessible only as remapped, alternate functions */ + +#if 0 /* Needs further investigation */ +#define GPIO_PA13 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN13) +#define GPIO_PA14 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN14) +#define GPIO_PA15 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN15) +#define GPIO_PB3 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN3) +#define GPIO_PB4 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN4) +#endif + +#endif /* __ARCH_ARM_SRC_STM32_CHIP_STM32F105R_PINMAP_H */ diff --git a/arch/arm/src/stm32/chip/stm32f105v_pinmap.h b/arch/arm/src/stm32/chip/stm32f105v_pinmap.h index 71ffe846487cb26032143e1d9ae69ff2cc282caa..5fd7029e2c1b096f7cb5b7f13a5aa1592c6426f1 100644 --- a/arch/arm/src/stm32/chip/stm32f105v_pinmap.h +++ b/arch/arm/src/stm32/chip/stm32f105v_pinmap.h @@ -91,44 +91,6 @@ #define GPIO_DAC_OUT2 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN5) #endif -#if 0 /* Needs further investigation */ -#define GPIO_ETH_MDC (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN1) -#define GPIO_ETH_MDIO (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN2) -#define GPIO_ETH_MIICOL (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN3) -#define GPIO_ETH_MIICRSWKUP (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN0) -#define GPIO_ETH_MIIRXCLK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN1) - -#if defined(CONFIG_STM32_ETH_REMAP) -# define GPIO_ETH_MIIRXD0 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN9) -# define GPIO_ETH_MIIRXD1 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN10) -# define GPIO_ETH_MIIRXD2 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN11) -# define GPIO_ETH_MIIRXD3 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN12) -# define GPIO_ETH_MIIRXDV (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTD|GPIO_PIN8) -#else -# define GPIO_ETH_MIIRXD0 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN4) -# define GPIO_ETH_MIIRXD1 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN5) -# define GPIO_ETH_MIIRXD2 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN0) -# define GPIO_ETH_MIIRXD3 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN1) -# define GPIO_ETH_MIIRXDV (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN7) -#endif - -#define GPIO_ETH_MIIRXER (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN10) -#define GPIO_ETH_MIITXCLK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN3) -#define GPIO_ETH_MIITXD0 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN12) -#define GPIO_ETH_MIITXD1 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN13) -#define GPIO_ETH_MIITXD2 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN2) -#define GPIO_ETH_MIITXD3 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN8) -#define GPIO_ETH_MIITXEN (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN11) -#define GPIO_ETH_PPSOUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN5) -#define GPIO_ETH_RMIICRSDV (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN7) -#define GPIO_ETH_RMIIREFCLK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN1) -#define GPIO_ETH_RMIIRXD0 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN4) -#define GPIO_ETH_RMIIRXD1 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN5) -#define GPIO_ETH_RMIITXD0 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN12) -#define GPIO_ETH_RMIITXD1 (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN13) -#define GPIO_ETH_RMIITXEN (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN11) -#endif - #if defined(CONFIG_STM32_I2C1_REMAP) # define GPIO_I2C1_SCL (GPIO_ALT|GPIO_CNF_AFOD|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN8) # define GPIO_I2C1_SDA (GPIO_ALT|GPIO_CNF_AFOD|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN9) diff --git a/arch/arm/src/stm32/chip/stm32f40xxx_pinmap.h b/arch/arm/src/stm32/chip/stm32f40xxx_pinmap.h index c0f675aa023438995441c15d895ba3b0b6fa2da9..ff75a5d0ad9edc07851b66e97516d33462a74197 100644 --- a/arch/arm/src/stm32/chip/stm32f40xxx_pinmap.h +++ b/arch/arm/src/stm32/chip/stm32f40xxx_pinmap.h @@ -413,8 +413,10 @@ #define GPIO_I2C2_SMBA_1 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN12) #define GPIO_I2C2_SMBA_2 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN2) #define GPIO_I2C2_SMBA_3 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN6) -#if defined(CONFIG_STM32_STM32F446) +#if defined(CONFIG_STM32_STM32F446) || defined(CONFIG_STM32_STM32F411) # define GPIO_I2C2_SDA_4 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN3) +#endif +#if defined(CONFIG_STM32_STM32F446) # define GPIO_I2C2_SDA_5 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTC|GPIO_PIN12) #endif diff --git a/arch/arm/src/stm32/stm32.h b/arch/arm/src/stm32/stm32.h index ee5a6497f80424894ead8d26249269bd600409e9..af91ea4ea60368069646936440981a6531c95d0c 100644 --- a/arch/arm/src/stm32/stm32.h +++ b/arch/arm/src/stm32/stm32.h @@ -53,21 +53,6 @@ * Pre-processor Definitions ************************************************************************************/ -/* Additional Configuration *********************************************************/ -/* Custom debug settings used in the STM32 port. These are managed by STM32-specific - * logic and not the common logic in include/debug.h. NOTE: Some of these also - * depend on CONFIG_DEBUG_VERBOSE - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_DMA -# undef CONFIG_DEBUG_RTC -# undef CONFIG_DEBUG_I2C -# undef CONFIG_DEBUG_CAN -# undef CONFIG_DEBUG_PWM -# undef CONFIG_DEBUG_SENSORS -#endif - /* Peripherals **********************************************************************/ #include "chip.h" @@ -92,6 +77,7 @@ #include "stm32_usbdev.h" #include "stm32_wdg.h" #include "stm32_lowputc.h" +#include "stm32_getc.h" #include "stm32_eth.h" #endif /* __ARCH_ARM_SRC_STM32_STM32_H */ diff --git a/arch/arm/src/stm32/stm32_adc.c b/arch/arm/src/stm32/stm32_adc.c index c24a98dbc75b0d6b02356a66b79ac8d6ab780dcb..31109fd8f50aa28d706cbc8f7770894b9b38e052 100644 --- a/arch/arm/src/stm32/stm32_adc.c +++ b/arch/arm/src/stm32/stm32_adc.c @@ -344,22 +344,20 @@ static void adc_rccreset(FAR struct stm32_dev_s *priv, bool reset); /* ADC Interrupt Handler */ static int adc_interrupt(FAR struct adc_dev_s *dev); -#ifdef CONFIG_STM32_STM32L15XX +#if defined(STM32_IRQ_ADC1) && defined(CONFIG_STM32_ADC1) static int adc1_interrupt(int irq, FAR void *context); #endif -#if (defined(CONFIG_STM32_STM32F10XX) || \ - defined(CONFIG_STM32_STM32F30XX)) && \ - (defined(CONFIG_STM32_ADC1) || defined(CONFIG_STM32_ADC2)) +#if defined(STM32_IRQ_ADC12) && (defined(CONFIG_STM32_ADC1) || \ + defined(CONFIG_STM32_ADC2)) static int adc12_interrupt(int irq, FAR void *context); #endif -#if (defined(CONFIG_STM32_STM32F10XX) || \ - defined(CONFIG_STM32_STM32F30XX)) && defined(CONFIG_STM32_ADC3) +#if (defined(STM32_IRQ_ADC3) && defined(CONFIG_STM32_ADC3)) static int adc3_interrupt(int irq, FAR void *context); #endif -#if defined(CONFIG_STM32_STM32F30XX) && defined(CONFIG_STM32_ADC4) +#if defined(STM32_IRQ_ADC4) && defined(CONFIG_STM32_ADC4) static int adc4_interrupt(int irq, FAR void *context); #endif -#if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F40XX) +#if defined(STM32_IRQ_ADC) static int adc123_interrupt(int irq, FAR void *context); #endif @@ -433,15 +431,17 @@ static const struct adc_ops_s g_adcops = #ifdef CONFIG_STM32_ADC1 static struct stm32_dev_s g_adcpriv1 = { -#if defined(CONFIG_STM32_STM32F10XX) || defined(CONFIG_STM32_STM32F30XX) - .irq = STM32_IRQ_ADC12, - .isr = adc12_interrupt, -#elif defined(CONFIG_STM32_STM32L15XX) +#if defined(STM32_IRQ_ADC1) .irq = STM32_IRQ_ADC1, .isr = adc1_interrupt, -#else +#elif defined(STM32_IRQ_ADC12) + .irq = STM32_IRQ_ADC12, + .isr = adc12_interrupt, +#elif defined(STM32_IRQ_ADC) .irq = STM32_IRQ_ADC, .isr = adc123_interrupt, +#else +# error "No STM32_IRQ_ADC1 STM32_IRQ_ADC12 or STM32_IRQ_ADC defined for CONFIG_STM32_ADC1" #endif .intf = 1, .base = STM32_ADC1_BASE, @@ -470,12 +470,14 @@ static struct adc_dev_s g_adcdev1 = #ifdef CONFIG_STM32_ADC2 static struct stm32_dev_s g_adcpriv2 = { -#if defined(CONFIG_STM32_STM32F10XX) || defined(CONFIG_STM32_STM32F30XX) +#if defined(STM32_IRQ_ADC12) .irq = STM32_IRQ_ADC12, .isr = adc12_interrupt, -#else +#elif defined(STM32_IRQ_ADC) .irq = STM32_IRQ_ADC, .isr = adc123_interrupt, +#else +# error "No STM32_IRQ_ADC12 or STM32_IRQ_ADC defined for CONFIG_STM32_ADC2" #endif .intf = 2, .base = STM32_ADC2_BASE, @@ -504,12 +506,14 @@ static struct adc_dev_s g_adcdev2 = #ifdef CONFIG_STM32_ADC3 static struct stm32_dev_s g_adcpriv3 = { -#if defined(CONFIG_STM32_STM32F10XX) || defined(CONFIG_STM32_STM32F30XX) +#if defined(STM32_IRQ_ADC3) .irq = STM32_IRQ_ADC3, .isr = adc3_interrupt, -#else +#elif defined(STM32_IRQ_ADC) .irq = STM32_IRQ_ADC, .isr = adc123_interrupt, +#else +# error "No STM32_IRQ_ADC3 or STM32_IRQ_ADC defined for CONFIG_STM32_ADC3" #endif .intf = 3, .base = STM32_ADC3_BASE, @@ -744,22 +748,22 @@ static void tim_modifyreg(FAR struct stm32_dev_s *priv, int offset, #ifdef ADC_HAVE_TIMER static void tim_dumpregs(FAR struct stm32_dev_s *priv, FAR const char *msg) { - avdbg("%s:\n", msg); - avdbg(" CR1: %04x CR2: %04x SMCR: %04x DIER: %04x\n", + ainfo("%s:\n", msg); + ainfo(" CR1: %04x CR2: %04x SMCR: %04x DIER: %04x\n", tim_getreg(priv, STM32_GTIM_CR1_OFFSET), tim_getreg(priv, STM32_GTIM_CR2_OFFSET), tim_getreg(priv, STM32_GTIM_SMCR_OFFSET), tim_getreg(priv, STM32_GTIM_DIER_OFFSET)); - avdbg(" SR: %04x EGR: 0000 CCMR1: %04x CCMR2: %04x\n", + ainfo(" SR: %04x EGR: 0000 CCMR1: %04x CCMR2: %04x\n", tim_getreg(priv, STM32_GTIM_SR_OFFSET), tim_getreg(priv, STM32_GTIM_CCMR1_OFFSET), tim_getreg(priv, STM32_GTIM_CCMR2_OFFSET)); - avdbg(" CCER: %04x CNT: %04x PSC: %04x ARR: %04x\n", + ainfo(" CCER: %04x CNT: %04x PSC: %04x ARR: %04x\n", tim_getreg(priv, STM32_GTIM_CCER_OFFSET), tim_getreg(priv, STM32_GTIM_CNT_OFFSET), tim_getreg(priv, STM32_GTIM_PSC_OFFSET), tim_getreg(priv, STM32_GTIM_ARR_OFFSET)); - avdbg(" CCR1: %04x CCR2: %04x CCR3: %04x CCR4: %04x\n", + ainfo(" CCR1: %04x CCR2: %04x CCR3: %04x CCR4: %04x\n", tim_getreg(priv, STM32_GTIM_CCR1_OFFSET), tim_getreg(priv, STM32_GTIM_CCR2_OFFSET), tim_getreg(priv, STM32_GTIM_CCR3_OFFSET), @@ -767,7 +771,7 @@ static void tim_dumpregs(FAR struct stm32_dev_s *priv, FAR const char *msg) #ifndef CONFIG_STM32_STM32L15XX if (priv->tbase == STM32_TIM1_BASE || priv->tbase == STM32_TIM8_BASE) { - avdbg(" RCR: %04x BDTR: %04x DCR: %04x DMAR: %04x\n", + ainfo(" RCR: %04x BDTR: %04x DCR: %04x DMAR: %04x\n", tim_getreg(priv, STM32_ATIM_RCR_OFFSET), tim_getreg(priv, STM32_ATIM_BDTR_OFFSET), tim_getreg(priv, STM32_ATIM_DCR_OFFSET), @@ -775,7 +779,7 @@ static void tim_dumpregs(FAR struct stm32_dev_s *priv, FAR const char *msg) } else { - avdbg(" DCR: %04x DMAR: %04x\n", + ainfo(" DCR: %04x DMAR: %04x\n", tim_getreg(priv, STM32_GTIM_DCR_OFFSET), tim_getreg(priv, STM32_GTIM_DMAR_OFFSET)); } @@ -800,7 +804,7 @@ static void tim_dumpregs(FAR struct stm32_dev_s *priv, FAR const char *msg) #ifdef ADC_HAVE_TIMER static void adc_timstart(FAR struct stm32_dev_s *priv, bool enable) { - avdbg("enable: %d\n", enable ? 1 : 0); + ainfo("enable: %d\n", enable ? 1 : 0); if (enable) { @@ -869,7 +873,7 @@ static int adc_timinit(FAR struct stm32_dev_s *priv) * position. */ - avdbg("Initializing timers extsel = 0x%08x\n", priv->extsel); + ainfo("Initializing timers extsel = 0x%08x\n", priv->extsel); adc_modifyreg(priv, STM32_ADC_EXTREG_OFFSET, ADC_EXTREG_EXTEN_MASK | ADC_EXTREG_EXTSEL_MASK, @@ -902,7 +906,7 @@ static int adc_timinit(FAR struct stm32_dev_s *priv) if (prescaler < 1) { - adbg("WARNING: Prescaler underflowed.\n"); + awarn("WARNING: Prescaler underflowed.\n"); prescaler = 1; } @@ -910,7 +914,7 @@ static int adc_timinit(FAR struct stm32_dev_s *priv) else if (prescaler > 65536) { - adbg("WARNING: Prescaler overflowed.\n"); + awarn("WARNING: Prescaler overflowed.\n"); prescaler = 65536; } @@ -919,12 +923,12 @@ static int adc_timinit(FAR struct stm32_dev_s *priv) reload = timclk / priv->freq; if (reload < 1) { - adbg("WARNING: Reload value underflowed.\n"); + awarn("WARNING: Reload value underflowed.\n"); reload = 1; } else if (reload > 65535) { - adbg("WARNING: Reload value overflowed.\n"); + awarn("WARNING: Reload value overflowed.\n"); reload = 65535; } @@ -1066,7 +1070,7 @@ static int adc_timinit(FAR struct stm32_dev_s *priv) break; default: - adbg("No such trigger: %d\n", priv->trigger); + aerr("ERROR: No such trigger: %d\n", priv->trigger); return -EINVAL; } @@ -1201,7 +1205,7 @@ static int adc_timinit(FAR struct stm32_dev_s *priv) #if defined(CONFIG_STM32_STM32F10XX) static void adc_startconv(FAR struct stm32_dev_s *priv, bool enable) { - avdbg("enable: %d\n", enable ? 1 : 0); + ainfo("enable: %d\n", enable ? 1 : 0); if (!enable) { @@ -1223,7 +1227,7 @@ static void adc_startconv(FAR struct stm32_dev_s *priv, bool enable) { uint32_t regval; - avdbg("enable: %d\n", enable ? 1 : 0); + ainfo("enable: %d\n", enable ? 1 : 0); if (enable) { @@ -1252,7 +1256,7 @@ static void adc_startconv(FAR struct stm32_dev_s *priv, bool enable) #else static void adc_startconv(FAR struct stm32_dev_s *priv, bool enable) { - avdbg("enable: %d\n", enable ? 1 : 0); + ainfo("enable: %d\n", enable ? 1 : 0); if (enable) { @@ -1360,7 +1364,7 @@ static void adc_power_down_idle(FAR struct stm32_dev_s *priv, bool pdi_high) { uint32_t regval; - avdbg("PDI: %d\n", pdi_high ? 1 : 0); + ainfo("PDI: %d\n", pdi_high ? 1 : 0); regval = adc_getreg(priv, STM32_ADC_CR1_OFFSET); @@ -1401,7 +1405,7 @@ static void adc_power_down_delay(FAR struct stm32_dev_s *priv, bool pdd_high) { uint32_t regval; - avdbg("PDD: %d\n", pdd_high ? 1 : 0); + ainfo("PDD: %d\n", pdd_high ? 1 : 0); regval = adc_getreg(priv, STM32_ADC_CR1_OFFSET); @@ -1441,7 +1445,7 @@ static void adc_power_down_delay(FAR struct stm32_dev_s *priv, bool pdd_high) static void adc_dels_after_conversion(FAR struct stm32_dev_s *priv, uint32_t delay) { - avdbg("Delay selected: 0x%08x\n", delay); + ainfo("Delay selected: 0x%08x\n", delay); adc_modifyreg(priv, STM32_ADC_CR2_OFFSET, ADC_CR2_DELS_MASK, delay); } @@ -1467,7 +1471,7 @@ static void adc_dels_after_conversion(FAR struct stm32_dev_s *priv, static void adc_select_ch_bank(FAR struct stm32_dev_s *priv, bool chb_selected) { - avdbg("Bank of channels selected: %c\n", chb_selected ? 'B' : 'A'); + ainfo("Bank of channels selected: %c\n", chb_selected ? 'B' : 'A'); if (chb_selected) { @@ -1501,7 +1505,7 @@ static void adc_enable(FAR struct stm32_dev_s *priv, bool enable) { uint32_t regval; - avdbg("enable: %d\n", enable ? 1 : 0); + ainfo("enable: %d\n", enable ? 1 : 0); regval = adc_getreg(priv, STM32_ADC_CR_OFFSET); @@ -1539,7 +1543,7 @@ static void adc_enable(FAR struct stm32_dev_s *priv, bool enable) bool enabled = false; #endif - avdbg("enable: %d\n", enable ? 1 : 0); + ainfo("enable: %d\n", enable ? 1 : 0); if (!enabled && enable) { @@ -1713,7 +1717,7 @@ static void adc_reset(FAR struct adc_dev_s *dev) int ret; #endif - allvdbg("intf: %d\n", priv->intf); + ainfo("intf: %d\n", priv->intf); flags = enter_critical_section(); #if defined(CONFIG_STM32_STM32L15XX) && \ @@ -1998,7 +2002,7 @@ static void adc_reset(FAR struct adc_dev_s *dev) ret = adc_timinit(priv); if (ret < 0) { - adbg("adc_timinit failed: %d\n", ret); + aerr("ERROR: adc_timinit failed: %d\n", ret); } } #ifndef CONFIG_ADC_NO_STARTUP_CONV @@ -2014,26 +2018,26 @@ static void adc_reset(FAR struct adc_dev_s *dev) leave_critical_section(flags); #ifdef CONFIG_STM32_STM32F30XX - avdbg("ISR: 0x%08x CR: 0x%08x CFGR: 0x%08x\n", + ainfo("ISR: 0x%08x CR: 0x%08x CFGR: 0x%08x\n", adc_getreg(priv, STM32_ADC_ISR_OFFSET), adc_getreg(priv, STM32_ADC_CR_OFFSET), adc_getreg(priv, STM32_ADC_CFGR_OFFSET)); #else - avdbg("SR: 0x%08x CR1: 0x%08x CR2: 0x%08x\n", + ainfo("SR: 0x%08x CR1: 0x%08x CR2: 0x%08x\n", adc_getreg(priv, STM32_ADC_SR_OFFSET), adc_getreg(priv, STM32_ADC_CR1_OFFSET), adc_getreg(priv, STM32_ADC_CR2_OFFSET)); #endif - avdbg("SQR1: 0x%08x SQR2: 0x%08x SQR3: 0x%08x\n", + ainfo("SQR1: 0x%08x SQR2: 0x%08x SQR3: 0x%08x\n", adc_getreg(priv, STM32_ADC_SQR1_OFFSET), adc_getreg(priv, STM32_ADC_SQR2_OFFSET), adc_getreg(priv, STM32_ADC_SQR3_OFFSET)); #if defined(CONFIG_STM32_STM32F30XX) - avdbg("SQR4: 0x%08x\n", adc_getreg(priv, STM32_ADC_SQR4_OFFSET)); + ainfo("SQR4: 0x%08x\n", adc_getreg(priv, STM32_ADC_SQR4_OFFSET)); #elif defined(CONFIG_STM32_STM32L15XX) - avdbg("SQR4: 0x%08x SQR5: 0x%08x\n", + ainfo("SQR4: 0x%08x SQR5: 0x%08x\n", adc_getreg(priv, STM32_ADC_SQR4_OFFSET) adc_getreg(priv, STM32_ADC_SQR5_OFFSET)); #endif @@ -2041,16 +2045,16 @@ static void adc_reset(FAR struct adc_dev_s *dev) #if defined(CONFIG_STM32_STM32F30XX) if (priv->base == STM32_ADC1_BASE || priv->base == STM32_ADC2_BASE) { - avdbg("CCR: 0x%08x\n", getreg32(STM32_ADC12_CCR)); + ainfo("CCR: 0x%08x\n", getreg32(STM32_ADC12_CCR)); } else { - avdbg("CCR: 0x%08x\n", getreg32(STM32_ADC34_CCR)); + ainfo("CCR: 0x%08x\n", getreg32(STM32_ADC34_CCR)); } #elif defined(CONFIG_STM32_STM32F20XX) || \ defined(CONFIG_STM32_STM32F40XX) || \ defined(CONFIG_STM32_STM32L15XX) - avdbg("CCR: 0x%08x\n", getreg32(STM32_ADC_CCR)); + ainfo("CCR: 0x%08x\n", getreg32(STM32_ADC_CCR)); #endif } @@ -2103,7 +2107,7 @@ static int adc_setup(FAR struct adc_dev_s *dev) ret = irq_attach(priv->irq, priv->isr); if (ret < 0) { - avdbg("irq_attach failed: %d\n", ret); + ainfo("irq_attach failed: %d\n", ret); return ret; } @@ -2113,7 +2117,7 @@ static int adc_setup(FAR struct adc_dev_s *dev) /* Enable the ADC interrupt */ - avdbg("Enable the ADC interrupt: irq=%d\n", priv->irq); + ainfo("Enable the ADC interrupt: irq=%d\n", priv->irq); up_enable_irq(priv->irq); return ret; @@ -2168,7 +2172,7 @@ static void adc_rxint(FAR struct adc_dev_s *dev, bool enable) { FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev->ad_priv; - avdbg("intf: %d enable: %d\n", priv->intf, enable ? 1 : 0); + ainfo("intf: %d enable: %d\n", priv->intf, enable ? 1 : 0); if (enable) { @@ -2215,7 +2219,7 @@ static void adc_ioc_enable_tvref_register(FAR struct adc_dev_s *dev, stm32_modifyreg32(STM32_ADC_CCR, ADC_CCR_TSVREFE, 0); } - avdbg("STM32_ADC_CCR value: 0x%08x\n", getreg32(STM32_ADC_CCR)); + ainfo("STM32_ADC_CCR value: 0x%08x\n", getreg32(STM32_ADC_CCR)); } #endif @@ -2259,7 +2263,7 @@ static int adc_ioc_change_sleep_between_opers(FAR struct adc_dev_s *dev, break; default: - avdbg("unknown cmd: %d\n", cmd); + ainfo("unknown cmd: %d\n", cmd); break; } @@ -2432,7 +2436,7 @@ static int adc_ioc_change_ints(FAR struct adc_dev_s *dev, int cmd, bool arg) break; default: - avdbg("unknown cmd: %d\n", cmd); + ainfo("unknown cmd: %d\n", cmd); break; } @@ -2676,7 +2680,7 @@ static int adc_ioctl(FAR struct adc_dev_s *dev, int cmd, unsigned long arg) #endif /* CONFIG_STM32_STM32L15XX */ default: - adbg("ERROR: Unknown cmd: %d\n", cmd); + aerr("ERROR: Unknown cmd: %d\n", cmd); ret = -ENOTTY; break; } @@ -2714,12 +2718,12 @@ static int adc_interrupt(FAR struct adc_dev_s *dev) if ((regval & ADC_ISR_AWD) != 0) { - alldbg("WARNING: Analog Watchdog, Value converted out of range!\n"); + awarn("WARNING: Analog Watchdog, Value converted out of range!\n"); } if ((regval & ADC_ISR_OVR) != 0) { - alldbg("WARNING: Overrun has occurred!\n"); + awarn("WARNING: Overrun has occurred!\n"); } /* EOC: End of conversion */ @@ -2781,7 +2785,7 @@ static int adc_interrupt(FAR struct adc_dev_s *dev) * ****************************************************************************/ -#ifdef CONFIG_STM32_STM32L15XX +#if defined(STM32_IRQ_ADC1) static int adc1_interrupt(int irq, FAR void *context) { adc_interrupt(&g_adcdev1); @@ -2802,8 +2806,7 @@ static int adc1_interrupt(int irq, FAR void *context) * ****************************************************************************/ -#if (defined(CONFIG_STM32_STM32F10XX) || \ - defined(CONFIG_STM32_STM32F30XX)) && \ +#if defined(STM32_IRQ_ADC12) && \ (defined(CONFIG_STM32_ADC1) || defined(CONFIG_STM32_ADC2)) static int adc12_interrupt(int irq, FAR void *context) { @@ -2831,8 +2834,7 @@ static int adc12_interrupt(int irq, FAR void *context) * ****************************************************************************/ -#if (defined(CONFIG_STM32_STM32F10XX) || \ - defined(CONFIG_STM32_STM32F30XX)) && defined(CONFIG_STM32_ADC3) +#if defined(STM32_IRQ_ADC3) && defined(CONFIG_STM32_ADC3) static int adc3_interrupt(int irq, FAR void *context) { adc_interrupt(&g_adcdev3); @@ -2853,13 +2855,10 @@ static int adc3_interrupt(int irq, FAR void *context) * ****************************************************************************/ -#if defined(CONFIG_STM32_STM32F30XX) && defined(CONFIG_STM32_ADC4) +#if defined(STM32_IRQ_ADC4) && defined(CONFIG_STM32_ADC4) static int adc4_interrupt(int irq, FAR void *context) { -#ifdef CONFIG_STM32_ADC4 adc_interrupt(&g_adcdev4); -#endif - return OK; } #endif @@ -2876,7 +2875,7 @@ static int adc4_interrupt(int irq, FAR void *context) * ****************************************************************************/ -#if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F40XX) +#if defined(STM32_IRQ_ADC) static int adc123_interrupt(int irq, FAR void *context) { #ifdef CONFIG_STM32_ADC1 @@ -2984,36 +2983,36 @@ struct adc_dev_s *stm32_adcinitialize(int intf, FAR const uint8_t *chanlist, FAR struct adc_dev_s *dev; FAR struct stm32_dev_s *priv; - avdbg("intf: %d cchannels: %d\n", intf, cchannels); + ainfo("intf: %d cchannels: %d\n", intf, cchannels); switch (intf) { #ifdef CONFIG_STM32_ADC1 case 1: - avdbg("ADC1 selected\n"); + ainfo("ADC1 selected\n"); dev = &g_adcdev1; break; #endif #ifdef CONFIG_STM32_ADC2 case 2: - avdbg("ADC2 selected\n"); + ainfo("ADC2 selected\n"); dev = &g_adcdev2; break; #endif #ifdef CONFIG_STM32_ADC3 case 3: - avdbg("ADC3 selected\n"); + ainfo("ADC3 selected\n"); dev = &g_adcdev3; break; #endif #ifdef CONFIG_STM32_ADC4 case 4: - avdbg("ADC4 selected\n"); + ainfo("ADC4 selected\n"); dev = &g_adcdev4; break; #endif default: - adbg("No ADC interface defined\n"); + aerr("ERROR: No ADC interface defined\n"); return NULL; } diff --git a/arch/arm/src/stm32/stm32_allocateheap.c b/arch/arm/src/stm32/stm32_allocateheap.c index 8a844b6d22d21f7fc357f921d2bbd202ef0ade2c..a222253af5e04379f842657f6d5587c969a9c2d6 100644 --- a/arch/arm/src/stm32/stm32_allocateheap.c +++ b/arch/arm/src/stm32/stm32_allocateheap.c @@ -41,6 +41,7 @@ #include #include +#include #include #include @@ -438,7 +439,7 @@ * ****************************************************************************/ -#ifdef CONFIG_DEBUG_HEAP +#ifdef CONFIG_HEAP_COLORATION static inline void up_heap_color(FAR void *start, size_t size) { memset(start, HEAP_COLOR, size); diff --git a/arch/arm/src/stm32/stm32_bbsram.c b/arch/arm/src/stm32/stm32_bbsram.c index 507f5a4d4a22b5e136fd1f3b7b1f5980b9da843d..e35f5e05a7ec83189cc95f5554a1dc7291d558c4 100644 --- a/arch/arm/src/stm32/stm32_bbsram.c +++ b/arch/arm/src/stm32/stm32_bbsram.c @@ -75,6 +75,10 @@ #define MAX_OPENCNT (255) /* Limit of uint8_t */ +#ifndef CONFIG_DEBUG_INFO +# undef CONFIG_BBSRAM_DEBUG +#endif + #if defined(CONFIG_BBSRAM_DEBUG) # define BBSRAM_DEBUG_READ() stm32_bbsram_rd() # define BBSRAM_DUMP(p,s) stm32_bbsram_dump(p,s) @@ -183,15 +187,15 @@ static void stm32_bbsram_rd(void) static void stm32_bbsram_dump(FAR struct bbsramfh_s *bbf, char *op) { BBSRAM_DEBUG_READ(); - lldbg("%s:\n", op); - lldbg(" File Address:0x%8x\n", bbf); - lldbg(" crc:0x%8x\n", bbf->crc); - lldbg(" fileno:%d\n", (int) bbf->fileno); - lldbg(" dirty:%d\n", (int) bbf->dirty); - lldbg(" length:%d\n", (int) bbf->len); - lldbg(" time:%ld:%ld\n", bbf->lastwrite.tv_sec, bbf->lastwrite.tv_nsec); - lldbg(" data: 0x%2x 0x%2x 0x%2x 0x%2x 0x%2x\n", - bbf->data[0], bbf->data[1], bbf->data[2], bbf->data[3], bbf->data[4]); + _info("%s:\n", op); + _info(" File Address:0x%8x\n", bbf); + _info(" crc:0x%8x\n", bbf->crc); + _info(" fileno:%d\n", (int) bbf->fileno); + _info(" dirty:%d\n", (int) bbf->dirty); + _info(" length:%d\n", (int) bbf->len); + _info(" time:%ld:%ld\n", bbf->lastwrite.tv_sec, bbf->lastwrite.tv_nsec); + _info(" data: 0x%2x 0x%2x 0x%2x 0x%2x 0x%2x\n", + bbf->data[0], bbf->data[1], bbf->data[2], bbf->data[3], bbf->data[4]); } #endif diff --git a/arch/arm/src/stm32/stm32_can.c b/arch/arm/src/stm32/stm32_can.c index 8cb61decf14778fad1de5dd64b0803defa42196a..c8193f65f4048b96f54c9e4dd2382d5e305c3519 100644 --- a/arch/arm/src/stm32/stm32_can.c +++ b/arch/arm/src/stm32/stm32_can.c @@ -1,4 +1,4 @@ -/************************************************************************************ +/**************************************************************************** * arch/arm/src/stm32/stm32_can.c * * Copyright (C) 2011, 2016 Gregory Nutt. All rights reserved. @@ -34,7 +34,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************************************/ + ****************************************************************************/ /**************************************************************************** * Included Files @@ -81,23 +81,8 @@ #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 +#ifndef CONFIG_DEBUG_CAN_INFO +# undef CONFIG_STM32_CAN_REGDEBUG #endif /**************************************************************************** @@ -121,50 +106,63 @@ struct stm32_can_s /* CAN Register access */ -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(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); +static uint32_t stm32can_getreg(FAR struct stm32_can_s *priv, int offset); +static uint32_t stm32can_getfreg(FAR struct stm32_can_s *priv, int offset); +static void stm32can_putreg(FAR struct stm32_can_s *priv, int offset, + uint32_t value); +static void stm32can_putfreg(FAR struct stm32_can_s *priv, int offset, + uint32_t value); +#ifdef CONFIG_STM32_CAN_REGDEBUG +static void stm32can_dumpctrlregs(FAR struct stm32_can_s *priv, + FAR const char *msg); +static void stm32can_dumpmbregs(FAR struct stm32_can_s *priv, + FAR const char *msg); +static void stm32can_dumpfiltregs(FAR struct stm32_can_s *priv, + FAR const char *msg); #else -# define can_dumpctrlregs(priv,msg) -# define can_dumpmbregs(priv,msg) -# define can_dumpfiltregs(priv,msg) +# define stm32can_dumpctrlregs(priv,msg) +# define stm32can_dumpmbregs(priv,msg) +# define stm32can_dumpfiltregs(priv,msg) #endif +/* Filtering (todo) */ + +static int stm32l4can_addextfilter(FAR struct stm32l4_can_s *priv, + FAR struct canioc_extfilter_s *arg); +static int stm32l4can_delextfilter(FAR struct stm32l4_can_s *priv, + int arg); +static int stm32l4can_addstdfilter(FAR struct stm32l4_can_s *priv, + FAR struct canioc_stdfilter_s *arg); +static int stm32l4can_delstdfilter(FAR struct stm32l4_can_s *priv, + int arg); + /* 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); +static void stm32can_reset(FAR struct can_dev_s *dev); +static int stm32can_setup(FAR struct can_dev_s *dev); +static void stm32can_shutdown(FAR struct can_dev_s *dev); +static void stm32can_rxint(FAR struct can_dev_s *dev, bool enable); +static void stm32can_txint(FAR struct can_dev_s *dev, bool enable); +static int stm32can_ioctl(FAR struct can_dev_s *dev, int cmd, + unsigned long arg); +static int stm32can_remoterequest(FAR struct can_dev_s *dev, uint16_t id); +static int stm32can_send(FAR struct can_dev_s *dev, + FAR struct can_msg_s *msg); +static bool stm32can_txready(FAR struct can_dev_s *dev); +static bool stm32can_txempty(FAR struct can_dev_s *dev); /* CAN interrupt handling */ -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); +static int stm32can_rxinterrupt(int irq, FAR void *context, int rxmb); +static int stm32can_rx0interrupt(int irq, FAR void *context); +static int stm32can_rx1interrupt(int irq, FAR void *context); +static int stm32can_txinterrupt(int irq, FAR void *context); /* Initialization */ -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); +static int stm32can_bittiming(FAR struct stm32_can_s *priv); +static int stm32can_cellinit(FAR struct stm32_can_s *priv); +static int stm32can_filterinit(FAR struct stm32_can_s *priv); /**************************************************************************** * Private Data @@ -172,16 +170,16 @@ static int can_filterinit(FAR struct stm32_can_s *priv); 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, + .co_reset = stm32can_reset, + .co_setup = stm32can_setup, + .co_shutdown = stm32can_shutdown, + .co_rxint = stm32can_rxint, + .co_txint = stm32can_txint, + .co_ioctl = stm32can_ioctl, + .co_remoterequest = stm32can_remoterequest, + .co_send = stm32can_send, + .co_txready = stm32can_txready, + .co_txempty = stm32can_txempty, }; #ifdef CONFIG_STM32_CAN1 @@ -235,8 +233,8 @@ static struct can_dev_s g_can2dev = ****************************************************************************/ /**************************************************************************** - * Name: can_getreg - * Name: can_getfreg + * Name: stm32can_getreg + * Name: stm32can_getfreg * * Description: * Read the value of a CAN register or filter block register. @@ -249,8 +247,8 @@ static struct can_dev_s g_can2dev = * ****************************************************************************/ -#ifdef CONFIG_CAN_REGDEBUG -static uint32_t can_vgetreg(uint32_t addr) +#ifdef CONFIG_STM32_CAN_REGDEBUG +static uint32_t stm32can_vgetreg(uint32_t addr) { static uint32_t prevaddr = 0; static uint32_t preval = 0; @@ -270,7 +268,7 @@ static uint32_t can_vgetreg(uint32_t addr) { if (count == 4) { - lldbg("...\n"); + caninfo("...\n"); } return val; @@ -287,7 +285,7 @@ static uint32_t can_vgetreg(uint32_t addr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + caninfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -299,27 +297,27 @@ static uint32_t can_vgetreg(uint32_t addr) /* Show the register value read */ - lldbg("%08x->%08x\n", addr, val); + caninfo("%08x->%08x\n", addr, val); return val; } -static uint32_t can_getreg(FAR struct stm32_can_s *priv, int offset) +static uint32_t stm32can_getreg(FAR struct stm32_can_s *priv, int offset) { - return can_vgetreg(priv->base + offset); + return stm32can_vgetreg(priv->base + offset); } -static uint32_t can_getfreg(FAR struct stm32_can_s *priv, int offset) +static uint32_t stm32can_getfreg(FAR struct stm32_can_s *priv, int offset) { - return can_vgetreg(priv->fbase + offset); + return stm32can_vgetreg(priv->fbase + offset); } #else -static uint32_t can_getreg(FAR struct stm32_can_s *priv, int offset) +static uint32_t stm32can_getreg(FAR struct stm32_can_s *priv, int offset) { return getreg32(priv->base + offset); } -static uint32_t can_getfreg(FAR struct stm32_can_s *priv, int offset) +static uint32_t stm32can_getfreg(FAR struct stm32_can_s *priv, int offset) { return getreg32(priv->fbase + offset); } @@ -327,8 +325,8 @@ static uint32_t can_getfreg(FAR struct stm32_can_s *priv, int offset) #endif /**************************************************************************** - * Name: can_putreg - * Name: can_putfreg + * Name: stm32can_putreg + * Name: stm32can_putfreg * * Description: * Set the value of a CAN register or filter block register. @@ -343,47 +341,47 @@ static uint32_t can_getfreg(FAR struct stm32_can_s *priv, int offset) * ****************************************************************************/ -#ifdef CONFIG_CAN_REGDEBUG -static void can_vputreg(uint32_t addr, uint32_t value) +#ifdef CONFIG_STM32_CAN_REGDEBUG +static void stm32can_vputreg(uint32_t addr, uint32_t value) { /* Show the register value being written */ - lldbg("%08x<-%08x\n", addr, value); + caninfo("%08x<-%08x\n", addr, value); /* Write the value */ putreg32(value, addr); } -static void can_putreg(FAR struct stm32_can_s *priv, int offset, - uint32_t value) +static void stm32can_putreg(FAR struct stm32_can_s *priv, int offset, + uint32_t value) { - can_vputreg(priv->base + offset, value); + stm32can_vputreg(priv->base + offset, value); } -static void can_putfreg(FAR struct stm32_can_s *priv, int offset, - uint32_t value) +static void stm32can_putfreg(FAR struct stm32_can_s *priv, int offset, + uint32_t value) { - can_vputreg(priv->fbase + offset, value); + stm32can_vputreg(priv->fbase + offset, value); } #else -static void can_putreg(FAR struct stm32_can_s *priv, int offset, - uint32_t value) +static void stm32can_putreg(FAR struct stm32_can_s *priv, int offset, + uint32_t value) { putreg32(value, priv->base + offset); } -static void can_putfreg(FAR struct stm32_can_s *priv, int offset, - uint32_t value) +static void stm32can_putfreg(FAR struct stm32_can_s *priv, int offset, + uint32_t value) { putreg32(value, priv->fbase + offset); } #endif /**************************************************************************** - * Name: can_dumpctrlregs + * Name: stm32can_dumpctrlregs * * Description: * Dump the contents of all CAN control registers @@ -396,39 +394,39 @@ static void can_putfreg(FAR struct stm32_can_s *priv, int offset, * ****************************************************************************/ -#ifdef CONFIG_CAN_REGDEBUG -static void can_dumpctrlregs(FAR struct stm32_can_s *priv, +#ifdef CONFIG_STM32_CAN_REGDEBUG +static void stm32can_dumpctrlregs(FAR struct stm32_can_s *priv, FAR const char *msg) { if (msg) { - canlldbg("Control Registers: %s\n", msg); + caninfo("Control Registers: %s\n", msg); } else { - canlldbg("Control Registers:\n"); + caninfo("Control Registers:\n"); } /* CAN control and status registers */ - lldbg(" MCR: %08x MSR: %08x TSR: %08x\n", - getreg32(priv->base + STM32_CAN_MCR_OFFSET), - getreg32(priv->base + STM32_CAN_MSR_OFFSET), - getreg32(priv->base + STM32_CAN_TSR_OFFSET)); + caninfo(" MCR: %08x MSR: %08x TSR: %08x\n", + getreg32(priv->base + STM32_CAN_MCR_OFFSET), + getreg32(priv->base + STM32_CAN_MSR_OFFSET), + getreg32(priv->base + STM32_CAN_TSR_OFFSET)); - lldbg(" RF0R: %08x RF1R: %08x\n", - getreg32(priv->base + STM32_CAN_RF0R_OFFSET), - getreg32(priv->base + STM32_CAN_RF1R_OFFSET)); + caninfo(" RF0R: %08x RF1R: %08x\n", + getreg32(priv->base + STM32_CAN_RF0R_OFFSET), + getreg32(priv->base + STM32_CAN_RF1R_OFFSET)); - lldbg(" IER: %08x ESR: %08x BTR: %08x\n", - getreg32(priv->base + STM32_CAN_IER_OFFSET), - getreg32(priv->base + STM32_CAN_ESR_OFFSET), - getreg32(priv->base + STM32_CAN_BTR_OFFSET)); + caninfo(" IER: %08x ESR: %08x BTR: %08x\n", + getreg32(priv->base + STM32_CAN_IER_OFFSET), + getreg32(priv->base + STM32_CAN_ESR_OFFSET), + getreg32(priv->base + STM32_CAN_BTR_OFFSET)); } #endif /**************************************************************************** - * Name: can_dumpmbregs + * Name: stm32can_dumpmbregs * * Description: * Dump the contents of all CAN mailbox registers @@ -441,55 +439,55 @@ static void can_dumpctrlregs(FAR struct stm32_can_s *priv, * ****************************************************************************/ -#ifdef CONFIG_CAN_REGDEBUG -static void can_dumpmbregs(FAR struct stm32_can_s *priv, +#ifdef CONFIG_STM32_CAN_REGDEBUG +static void stm32can_dumpmbregs(FAR struct stm32_can_s *priv, FAR const char *msg) { if (msg) { - canlldbg("Mailbox Registers: %s\n", msg); + caninfo("Mailbox Registers: %s\n", msg); } else { - canlldbg("Mailbox Registers:\n"); + caninfo("Mailbox Registers:\n"); } /* CAN mailbox registers (3 TX and 2 RX) */ - lldbg(" TI0R: %08x TDT0R: %08x TDL0R: %08x TDH0R: %08x\n", - getreg32(priv->base + STM32_CAN_TI0R_OFFSET), - getreg32(priv->base + STM32_CAN_TDT0R_OFFSET), - getreg32(priv->base + STM32_CAN_TDL0R_OFFSET), - getreg32(priv->base + STM32_CAN_TDH0R_OFFSET)); - - lldbg(" TI1R: %08x TDT1R: %08x TDL1R: %08x TDH1R: %08x\n", - getreg32(priv->base + STM32_CAN_TI1R_OFFSET), - getreg32(priv->base + STM32_CAN_TDT1R_OFFSET), - getreg32(priv->base + STM32_CAN_TDL1R_OFFSET), - getreg32(priv->base + STM32_CAN_TDH1R_OFFSET)); - - lldbg(" TI2R: %08x TDT2R: %08x TDL2R: %08x TDH2R: %08x\n", - getreg32(priv->base + STM32_CAN_TI2R_OFFSET), - getreg32(priv->base + STM32_CAN_TDT2R_OFFSET), - getreg32(priv->base + STM32_CAN_TDL2R_OFFSET), - getreg32(priv->base + STM32_CAN_TDH2R_OFFSET)); - - lldbg(" RI0R: %08x RDT0R: %08x RDL0R: %08x RDH0R: %08x\n", - getreg32(priv->base + STM32_CAN_RI0R_OFFSET), - getreg32(priv->base + STM32_CAN_RDT0R_OFFSET), - getreg32(priv->base + STM32_CAN_RDL0R_OFFSET), - getreg32(priv->base + STM32_CAN_RDH0R_OFFSET)); - - lldbg(" RI1R: %08x RDT1R: %08x RDL1R: %08x RDH1R: %08x\n", - getreg32(priv->base + STM32_CAN_RI1R_OFFSET), - getreg32(priv->base + STM32_CAN_RDT1R_OFFSET), - getreg32(priv->base + STM32_CAN_RDL1R_OFFSET), - getreg32(priv->base + STM32_CAN_RDH1R_OFFSET)); + caninfo(" TI0R: %08x TDT0R: %08x TDL0R: %08x TDH0R: %08x\n", + getreg32(priv->base + STM32_CAN_TI0R_OFFSET), + getreg32(priv->base + STM32_CAN_TDT0R_OFFSET), + getreg32(priv->base + STM32_CAN_TDL0R_OFFSET), + getreg32(priv->base + STM32_CAN_TDH0R_OFFSET)); + + caninfo(" TI1R: %08x TDT1R: %08x TDL1R: %08x TDH1R: %08x\n", + getreg32(priv->base + STM32_CAN_TI1R_OFFSET), + getreg32(priv->base + STM32_CAN_TDT1R_OFFSET), + getreg32(priv->base + STM32_CAN_TDL1R_OFFSET), + getreg32(priv->base + STM32_CAN_TDH1R_OFFSET)); + + caninfo(" TI2R: %08x TDT2R: %08x TDL2R: %08x TDH2R: %08x\n", + getreg32(priv->base + STM32_CAN_TI2R_OFFSET), + getreg32(priv->base + STM32_CAN_TDT2R_OFFSET), + getreg32(priv->base + STM32_CAN_TDL2R_OFFSET), + getreg32(priv->base + STM32_CAN_TDH2R_OFFSET)); + + caninfo(" RI0R: %08x RDT0R: %08x RDL0R: %08x RDH0R: %08x\n", + getreg32(priv->base + STM32_CAN_RI0R_OFFSET), + getreg32(priv->base + STM32_CAN_RDT0R_OFFSET), + getreg32(priv->base + STM32_CAN_RDL0R_OFFSET), + getreg32(priv->base + STM32_CAN_RDH0R_OFFSET)); + + caninfo(" RI1R: %08x RDT1R: %08x RDL1R: %08x RDH1R: %08x\n", + getreg32(priv->base + STM32_CAN_RI1R_OFFSET), + getreg32(priv->base + STM32_CAN_RDT1R_OFFSET), + getreg32(priv->base + STM32_CAN_RDL1R_OFFSET), + getreg32(priv->base + STM32_CAN_RDH1R_OFFSET)); } #endif /**************************************************************************** - * Name: can_dumpfiltregs + * Name: stm32can_dumpfiltregs * * Description: * Dump the contents of all CAN filter registers @@ -502,43 +500,43 @@ static void can_dumpmbregs(FAR struct stm32_can_s *priv, * ****************************************************************************/ -#ifdef CONFIG_CAN_REGDEBUG -static void can_dumpfiltregs(FAR struct stm32_can_s *priv, +#ifdef CONFIG_STM32_CAN_REGDEBUG +static void stm32can_dumpfiltregs(FAR struct stm32_can_s *priv, FAR const char *msg) { int i; if (msg) { - canlldbg("Filter Registers: %s\n", msg); + caninfo("Filter Registers: %s\n", msg); } else { - canlldbg("Filter Registers:\n"); + caninfo("Filter Registers:\n"); } - lldbg(" FMR: %08x FM1R: %08x FS1R: %08x FFA1R: %08x FA1R: %08x\n", - getreg32(priv->base + STM32_CAN_FMR_OFFSET), - getreg32(priv->base + STM32_CAN_FM1R_OFFSET), - getreg32(priv->base + STM32_CAN_FS1R_OFFSET), - getreg32(priv->base + STM32_CAN_FFA1R_OFFSET), - getreg32(priv->base + STM32_CAN_FA1R_OFFSET)); + caninfo(" FMR: %08x FM1R: %08x FS1R: %08x FFA1R: %08x FA1R: %08x\n", + getreg32(priv->base + STM32_CAN_FMR_OFFSET), + getreg32(priv->base + STM32_CAN_FM1R_OFFSET), + getreg32(priv->base + STM32_CAN_FS1R_OFFSET), + getreg32(priv->base + STM32_CAN_FFA1R_OFFSET), + getreg32(priv->base + STM32_CAN_FA1R_OFFSET)); for (i = 0; i < CAN_NFILTERS; i++) { - lldbg(" F%dR1: %08x F%dR2: %08x\n", - i, getreg32(priv->base + STM32_CAN_FIR_OFFSET(i, 1)), - i, getreg32(priv->base + STM32_CAN_FIR_OFFSET(i, 2))); + caninfo(" F%dR1: %08x F%dR2: %08x\n", + i, getreg32(priv->base + STM32_CAN_FIR_OFFSET(i, 1)), + i, getreg32(priv->base + STM32_CAN_FIR_OFFSET(i, 2))); } } #endif /**************************************************************************** - * Name: can_reset + * Name: stm32can_reset * * Description: * Reset the CAN device. Called early to initialize the hardware. This - * function is called, before can_setup() and on error conditions. + * function is called, before stm32can_setup() and on error conditions. * * Input Parameters: * dev - An instance of the "upper half" can driver state structure. @@ -548,14 +546,14 @@ static void can_dumpfiltregs(FAR struct stm32_can_s *priv, * ****************************************************************************/ -static void can_reset(FAR struct can_dev_s *dev) +static void stm32can_reset(FAR struct can_dev_s *dev) { FAR struct stm32_can_s *priv = dev->cd_priv; uint32_t regval; uint32_t regbit = 0; irqstate_t flags; - canllvdbg("CAN%d\n", priv->port); + caninfo("CAN%d\n", priv->port); /* Get the bits in the AHB1RSTR register needed to reset this CAN device */ @@ -574,7 +572,7 @@ static void can_reset(FAR struct can_dev_s *dev) else #endif { - canlldbg("Unsupported port %d\n", priv->port); + canerr("ERROR: Unsupported port %d\n", priv->port); return; } @@ -596,7 +594,7 @@ static void can_reset(FAR struct can_dev_s *dev) } /**************************************************************************** - * Name: can_setup + * Name: stm32can_setup * * Description: * Configure the CAN. This method is called the first time that the CAN @@ -612,61 +610,62 @@ static void can_reset(FAR struct can_dev_s *dev) * ****************************************************************************/ -static int can_setup(FAR struct can_dev_s *dev) +static int stm32can_setup(FAR struct can_dev_s *dev) { FAR struct stm32_can_s *priv = dev->cd_priv; int ret; - canllvdbg("CAN%d RX0 irq: %d RX1 irq: %d TX irq: %d\n", - priv->port, priv->canrx[0], priv->canrx[1], priv->cantx); + caninfo("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 */ - ret = can_cellinit(priv); + ret = stm32can_cellinit(priv); if (ret < 0) { - canlldbg("CAN%d cell initialization failed: %d\n", priv->port, ret); + canerr("ERROR: CAN%d cell initialization failed: %d\n", priv->port, ret); return ret; } - can_dumpctrlregs(priv, "After cell initialization"); - can_dumpmbregs(priv, NULL); + stm32can_dumpctrlregs(priv, "After cell initialization"); + stm32can_dumpmbregs(priv, NULL); /* CAN filter initialization */ - ret = can_filterinit(priv); + ret = stm32can_filterinit(priv); if (ret < 0) { - canlldbg("CAN%d filter initialization failed: %d\n", priv->port, ret); + canerr("ERROR: CAN%d filter initialization failed: %d\n", priv->port, ret); return ret; } - can_dumpfiltregs(priv, "After filter initialization"); + + stm32can_dumpfiltregs(priv, "After filter initialization"); /* Attach the CAN RX FIFO 0/1 interrupts and TX interrupts. * The others are not used. */ - ret = irq_attach(priv->canrx[0], can_rx0interrupt); + ret = irq_attach(priv->canrx[0], stm32can_rx0interrupt); if (ret < 0) { - canlldbg("Failed to attach CAN%d RX0 IRQ (%d)", - priv->port, priv->canrx[0]); + canerr(ERROR: "Failed to attach CAN%d RX0 IRQ (%d)", + priv->port, priv->canrx[0]); return ret; } - ret = irq_attach(priv->canrx[1], can_rx1interrupt); + ret = irq_attach(priv->canrx[1], stm32can_rx1interrupt); if (ret < 0) { - canlldbg("Failed to attach CAN%d RX1 IRQ (%d)", - priv->port, priv->canrx[1]); + canerr("ERROR: Failed to attach CAN%d RX1 IRQ (%d)", + priv->port, priv->canrx[1]); return ret; } - ret = irq_attach(priv->cantx, can_txinterrupt); + ret = irq_attach(priv->cantx, stm32can_txinterrupt); if (ret < 0) { - canlldbg("Failed to attach CAN%d TX IRQ (%d)", - priv->port, priv->cantx); + canerr("ERROR: Failed to attach CAN%d TX IRQ (%d)", + priv->port, priv->cantx); return ret; } @@ -682,7 +681,7 @@ static int can_setup(FAR struct can_dev_s *dev) } /**************************************************************************** - * Name: can_shutdown + * Name: stm32can_shutdown * * Description: * Disable the CAN. This method is called when the CAN device is closed. @@ -696,11 +695,11 @@ static int can_setup(FAR struct can_dev_s *dev) * ****************************************************************************/ -static void can_shutdown(FAR struct can_dev_s *dev) +static void stm32can_shutdown(FAR struct can_dev_s *dev) { FAR struct stm32_can_s *priv = dev->cd_priv; - canllvdbg("CAN%d\n", priv->port); + caninfo("CAN%d\n", priv->port); /* Disable the RX FIFO 0/1 and TX interrupts */ @@ -716,11 +715,11 @@ static void can_shutdown(FAR struct can_dev_s *dev) /* And reset the hardware */ - can_reset(dev); + stm32can_reset(dev); } /**************************************************************************** - * Name: can_rxint + * Name: stm32can_rxint * * Description: * Call to enable or disable RX interrupts. @@ -733,16 +732,16 @@ static void can_shutdown(FAR struct can_dev_s *dev) * ****************************************************************************/ -static void can_rxint(FAR struct can_dev_s *dev, bool enable) +static void stm32can_rxint(FAR struct can_dev_s *dev, bool enable) { FAR struct stm32_can_s *priv = dev->cd_priv; uint32_t regval; - canllvdbg("CAN%d enable: %d\n", priv->port, enable); + caninfo("CAN%d enable: %d\n", priv->port, enable); /* Enable/disable the FIFO 0/1 message pending interrupt */ - regval = can_getreg(priv, STM32_CAN_IER_OFFSET); + regval = stm32can_getreg(priv, STM32_CAN_IER_OFFSET); if (enable) { regval |= CAN_IER_FMPIE0 | CAN_IER_FMPIE1; @@ -751,11 +750,11 @@ static void can_rxint(FAR struct can_dev_s *dev, bool enable) { regval &= ~(CAN_IER_FMPIE0 | CAN_IER_FMPIE1); } - can_putreg(priv, STM32_CAN_IER_OFFSET, regval); + stm32can_putreg(priv, STM32_CAN_IER_OFFSET, regval); } /**************************************************************************** - * Name: can_txint + * Name: stm32can_txint * * Description: * Call to enable or disable TX interrupts. @@ -768,25 +767,25 @@ 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 void stm32can_txint(FAR struct can_dev_s *dev, bool enable) { FAR struct stm32_can_s *priv = dev->cd_priv; uint32_t regval; - canllvdbg("CAN%d enable: %d\n", priv->port, enable); + caninfo("CAN%d enable: %d\n", priv->port, enable); /* Support only disabling the transmit mailbox interrupt */ if (!enable) { - regval = can_getreg(priv, STM32_CAN_IER_OFFSET); + regval = stm32can_getreg(priv, STM32_CAN_IER_OFFSET); regval &= ~CAN_IER_TMEIE; - can_putreg(priv, STM32_CAN_IER_OFFSET, regval); + stm32can_putreg(priv, STM32_CAN_IER_OFFSET, regval); } } /**************************************************************************** - * Name: can_ioctl + * Name: stm32can_ioctl * * Description: * All ioctl calls will be routed through this method @@ -799,15 +798,302 @@ 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 stm32can_ioctl(FAR struct can_dev_s *dev, int cmd, + unsigned long arg) { - /* No CAN ioctls are supported */ + FAR struct stm32_can_s *priv; + int ret = -ENOTTY; - return -ENOTTY; + caninfo("cmd=%04x arg=%lu\n", cmd, arg); + + DEBUGASSERT(dev && dev->cd_priv); + priv = dev->cd_priv; + + /* Handle the command */ + + switch (cmd) + { + /* CANIOC_GET_BITTIMING: + * Description: Return the current bit timing settings + * Argument: A pointer to a write-able instance of struct + * canioc_bittiming_s in which current bit timing + * values will be returned. + * Returned Value: Zero (OK) is returned on success. Otherwise -1 + * (ERROR) is returned with the errno variable set + * to indicate the nature of the error. + * Dependencies: None + */ + + case CANIOC_GET_BITTIMING: + { + FAR struct canioc_bittiming_s *bt = + (FAR struct canioc_bittiming_s *)arg; + uint32_t regval; + uint32_t brp; + + DEBUGASSERT(bt != NULL); + regval = stm32can_getreg(priv, STM32_CAN_BTR_OFFSET); + bt->bt_sjw = ((regval & CAN_BTR_SJW_MASK) >> CAN_BTR_SJW_SHIFT) + 1; + bt->bt_tseg1 = ((regval & CAN_BTR_TS1_MASK) >> CAN_BTR_TS1_SHIFT) + 1; + bt->bt_tseg2 = ((regval & CAN_BTR_TS2_MASK) >> CAN_BTR_TS2_SHIFT) + 1; + + brp = ((regval & CAN_BTR_BRP_MASK) >> CAN_BTR_BRP_SHIFT) + 1; + bt->bt_baud = STM32_PCLK1_FREQUENCY / + (brp * (bt->bt_tseg1 + bt->bt_tseg2 + 1)); + ret = OK; + } + break; + + /* CANIOC_SET_BITTIMING: + * Description: Set new current bit timing values + * Argument: A pointer to a read-able instance of struct + * canioc_bittiming_s in which the new bit timing + * values are provided. + * Returned Value: Zero (OK) is returned on success. Otherwise -1 + * (ERROR)is returned with the errno variable set + * to indicate thenature of the error. + * Dependencies: None + * + * REVISIT: There is probably a limitation here: If there are multiple + * threads trying to send CAN packets, when one of these threads + * reconfigures the bitrate, the MCAN hardware will be reset and the + * context of operation will be lost. Hence, this IOCTL can only safely + * be executed in quiescent time periods. + */ + + case CANIOC_SET_BITTIMING: + { + FAR const struct canioc_bittiming_s *bt = + (FAR const struct canioc_bittiming_s *)arg; + uint32_t brp; + uint32_t can_bit_quanta; + uint32_t tmp; + uint32_t regval; + + DEBUGASSERT(bt != NULL); + DEBUGASSERT(bt->bt_baud < STM32_PCLK1_FREQUENCY); + DEBUGASSERT(bt->bt_sjw > 0 && bt->bt_sjw <= 4); + DEBUGASSERT(bt->bt_tseg1 > 0 && bt->bt_tseg1 <= 16); + DEBUGASSERT(bt->bt_tseg2 > 0 && bt->bt_tseg2 <= 8); + + regval = stm32can_getreg(priv, STM32_CAN_BTR_OFFSET); + + /* Extract bit timing data */ + /* tmp is in clocks per bit time */ + + tmp = STM32_PCLK1_FREQUENCY / bt->bt_baud; + + /* This value is dynamic as requested by user */ + + can_bit_quanta = bt->bt_tseg1 + bt->bt_tseg2 + 1; + + if (tmp < can_bit_quanta) + { + /* This timing is not possible */ + + ret = -EINVAL; + } + + /* Otherwise, nquanta is can_bit_quanta, ts1 and ts2 are + * provided by the user and we calculate brp to achieve + * can_bit_quanta quanta in the bit times + */ + + else + { + brp = (tmp + (can_bit_quanta/2)) / can_bit_quanta; + DEBUGASSERT(brp >= 1 && brp <= CAN_BTR_BRP_MAX); + } + + caninfo("TS1: %d TS2: %d BRP: %d\n", bt->bt_tseg1, bt->bt_tseg2, brp); + + /* Configure bit timing. */ + + regval &= ~(CAN_BTR_BRP_MASK | CAN_BTR_TS1_MASK | CAN_BTR_TS2_MASK | CAN_BTR_SJW_MASK); + regval |= ((brp - 1) << CAN_BTR_BRP_SHIFT) | + ((bt->bt_tseg1 - 1) << CAN_BTR_TS1_SHIFT) | + ((bt->bt_tseg2 - 1) << CAN_BTR_TS2_SHIFT) | + ((bt->bt_sjw - 1) << CAN_BTR_SJW_SHIFT); + + /* Bit timing can only be configured in init mode. */ + + ret = stm32can_enterinitmode(priv); + if (ret != 0) + { + break; + } + + stm32can_putreg(priv, STM32_CAN_BTR_OFFSET, regval); + + ret = stm32can_exitinitmode(priv); + + if (ret == 0) + { + priv->baud = STM32_PCLK1_FREQUENCY / (brp * (bt->bt_tseg1 + bt->bt_tseg2 + 1)); + } + } + break; + + /* CANIOC_GET_CONNMODES: + * Description: Get the current bus connection modes + * Argument: A pointer to a write-able instance of struct + * canioc_connmodes_s in which the new bus modes will + * be returned. + * Returned Value: Zero (OK) is returned on success. Otherwise -1 + * (ERROR)is returned with the errno variable set + * to indicate the nature of the error. + * Dependencies: None + */ + + case CANIOC_GET_CONNMODES: + { + FAR struct canioc_connmodes_s *bm = + (FAR struct canioc_connmodes_s *)arg; + uint32_t regval; + + DEBUGASSERT(bm != NULL); + + regval = stm32can_getreg(priv, STM32_CAN_BTR_OFFSET); + + bm->bm_loopback = ((regval & CAN_BTR_LBKM) == CAN_BTR_LBKM); + bm->bm_silent = ((regval & CAN_BTR_SILM) == CAN_BTR_SILM); + ret = OK; + break; + } + + /* CANIOC_SET_CONNMODES: + * Description: Set new bus connection modes values + * Argument: A pointer to a read-able instance of struct + * canioc_connmodes_s in which the new bus modes + * are provided. + * Returned Value: Zero (OK) is returned on success. Otherwise -1 + * (ERROR) is returned with the errno variable set + * to indicate the nature of the error. + * Dependencies: None + */ + + case CANIOC_SET_CONNMODES: + { + FAR struct canioc_connmodes_s *bm = + (FAR struct canioc_connmodes_s *)arg; + uint32_t regval; + + DEBUGASSERT(bm != NULL); + + regval = stm32can_getreg(priv, STM32_CAN_BTR_OFFSET); + + if (bm->bm_loopback) + { + regval |= CAN_BTR_LBKM; + } + else + { + regval &= ~CAN_BTR_LBKM; + } + + if (bm->bm_silent) + { + regval |= CAN_BTR_SILM; + } + else + { + regval &= ~CAN_BTR_SILM; + } + + /* This register can only be configured in init mode. */ + + ret = stm32can_enterinitmode(priv); + if (ret != 0) + { + break; + } + + stm32can_putreg(priv, STM32_CAN_BTR_OFFSET, regval); + + ret = stm32can_exitinitmode(priv); + } + break; + +#ifdef CONFIG_CAN_EXTID + /* CANIOC_ADD_EXTFILTER: + * Description: Add an address filter for a extended 29 bit + * address. + * Argument: A reference to struct canioc_extfilter_s + * Returned Value: A non-negative filter ID is returned on success. + * Otherwise -1 (ERROR) is returned with the errno + * variable set to indicate the nature of the error. + */ + + case CANIOC_ADD_EXTFILTER: + { + DEBUGASSERT(arg != 0); + ret = stm32can_addextfilter(priv, (FAR struct canioc_extfilter_s *)arg); + } + break; + + /* CANIOC_DEL_EXTFILTER: + * Description: Remove an address filter for a standard 29 bit + * address. + * Argument: The filter index previously returned by the + * CANIOC_ADD_EXTFILTER command + * Returned Value: Zero (OK) is returned on success. Otherwise -1 + * (ERROR)is returned with the errno variable set + * to indicate the nature of the error. + */ + + case CANIOC_DEL_EXTFILTER: + { + DEBUGASSERT(arg <= priv->config->nextfilters); + ret = stm32can_delextfilter(priv, (int)arg); + } + break; +#endif + + /* CANIOC_ADD_STDFILTER: + * Description: Add an address filter for a standard 11 bit + * address. + * Argument: A reference to struct canioc_stdfilter_s + * Returned Value: A non-negative filter ID is returned on success. + * Otherwise -1 (ERROR) is returned with the errno + * variable set to indicate the nature of the error. + */ + + case CANIOC_ADD_STDFILTER: + { + DEBUGASSERT(arg != 0); + ret = stm32can_addstdfilter(priv, (FAR struct canioc_stdfilter_s *)arg); + } + break; + + /* CANIOC_DEL_STDFILTER: + * Description: Remove an address filter for a standard 11 bit + * address. + * Argument: The filter index previously returned by the + * CANIOC_ADD_STDFILTER command + * Returned Value: Zero (OK) is returned on success. Otherwise -1 + * (ERROR) is returned with the errno variable set + * to indicate the nature of the error. + */ + + case CANIOC_DEL_STDFILTER: + { + DEBUGASSERT(arg <= priv->config->nstdfilters); + ret = stm32can_delstdfilter(priv, (int)arg); + } + break; + + /* Unsupported/unrecognized command */ + + default: + canerr("ERROR: Unrecognized command: %04x\n", cmd); + break; + } + + return ret; } /**************************************************************************** - * Name: can_remoterequest + * Name: stm32can_remoterequest * * Description: * Send a remote request @@ -820,14 +1106,14 @@ 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 stm32can_remoterequest(FAR struct can_dev_s *dev, uint16_t id) { #warning "Remote request not implemented" return -ENOSYS; } /**************************************************************************** - * Name: can_send + * Name: stm32can_send * * Description: * Send one can message. @@ -849,7 +1135,7 @@ 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 int stm32can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg) { FAR struct stm32_can_s *priv = dev->cd_priv; FAR uint8_t *ptr; @@ -858,12 +1144,12 @@ 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); + caninfo("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, STM32_CAN_TSR_OFFSET); + regval = stm32can_getreg(priv, STM32_CAN_TSR_OFFSET); if ((regval & CAN_TSR_TME0) != 0 && (regval & CAN_TSR_RQCP0) == 0) { txmb = 0; @@ -878,16 +1164,16 @@ static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg) } else { - canlldbg("ERROR: No available mailbox\n"); + canerr("ERROR: No available mailbox\n"); return -EBUSY; } /* Clear TXRQ, RTR, IDE, EXID, and STID fields */ - regval = can_getreg(priv, STM32_CAN_TIR_OFFSET(txmb)); + regval = stm32can_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); - can_putreg(priv, STM32_CAN_TIR_OFFSET(txmb), regval); + stm32can_putreg(priv, STM32_CAN_TIR_OFFSET(txmb), regval); /* Set up the ID, standard 11-bit or extended 29-bit. */ @@ -907,15 +1193,15 @@ static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg) regval &= ~CAN_TIR_STID_MASK; regval |= (uint32_t)msg->cm_hdr.ch_id << CAN_TIR_STID_SHIFT; #endif - can_putreg(priv, STM32_CAN_TIR_OFFSET(txmb), regval); + stm32can_putreg(priv, STM32_CAN_TIR_OFFSET(txmb), regval); /* Set up the DLC */ dlc = msg->cm_hdr.ch_dlc; - regval = can_getreg(priv, STM32_CAN_TDTR_OFFSET(txmb)); + regval = stm32can_getreg(priv, STM32_CAN_TDTR_OFFSET(txmb)); regval &= ~(CAN_TDTR_DLC_MASK | CAN_TDTR_TGT); regval |= (uint32_t)dlc << CAN_TDTR_DLC_SHIFT; - can_putreg(priv, STM32_CAN_TDTR_OFFSET(txmb), regval); + stm32can_putreg(priv, STM32_CAN_TDTR_OFFSET(txmb), regval); /* Set up the data fields */ @@ -945,7 +1231,7 @@ static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg) } } } - can_putreg(priv, STM32_CAN_TDLR_OFFSET(txmb), regval); + stm32can_putreg(priv, STM32_CAN_TDLR_OFFSET(txmb), regval); regval = 0; if (dlc > 4) @@ -971,26 +1257,26 @@ static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg) } } } - can_putreg(priv, STM32_CAN_TDHR_OFFSET(txmb), regval); + stm32can_putreg(priv, STM32_CAN_TDHR_OFFSET(txmb), regval); /* Enable the transmit mailbox empty interrupt (may already be enabled) */ - regval = can_getreg(priv, STM32_CAN_IER_OFFSET); + regval = stm32can_getreg(priv, STM32_CAN_IER_OFFSET); regval |= CAN_IER_TMEIE; - can_putreg(priv, STM32_CAN_IER_OFFSET, regval); + stm32can_putreg(priv, STM32_CAN_IER_OFFSET, regval); /* Request transmission */ - regval = can_getreg(priv, STM32_CAN_TIR_OFFSET(txmb)); + regval = stm32can_getreg(priv, STM32_CAN_TIR_OFFSET(txmb)); regval |= CAN_TIR_TXRQ; /* Transmit Mailbox Request */ - can_putreg(priv, STM32_CAN_TIR_OFFSET(txmb), regval); + stm32can_putreg(priv, STM32_CAN_TIR_OFFSET(txmb), regval); - can_dumpmbregs(priv, "After send"); + stm32can_dumpmbregs(priv, "After send"); return OK; } /**************************************************************************** - * Name: can_txready + * Name: stm32can_txready * * Description: * Return true if the CAN hardware can accept another TX message. @@ -1003,21 +1289,21 @@ 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 stm32can_txready(FAR struct can_dev_s *dev) { FAR struct stm32_can_s *priv = dev->cd_priv; uint32_t regval; /* Return true if any mailbox is available */ - regval = can_getreg(priv, STM32_CAN_TSR_OFFSET); - canllvdbg("CAN%d TSR: %08x\n", priv->port, regval); + regval = stm32can_getreg(priv, STM32_CAN_TSR_OFFSET); + caninfo("CAN%d TSR: %08x\n", priv->port, regval); return (regval & CAN_ALL_MAILBOXES) != 0; } /**************************************************************************** - * Name: can_txempty + * Name: stm32can_txempty * * Description: * Return true if all message have been sent. If for example, the CAN @@ -1034,21 +1320,21 @@ static bool can_txready(FAR struct can_dev_s *dev) * ****************************************************************************/ -static bool can_txempty(FAR struct can_dev_s *dev) +static bool stm32can_txempty(FAR struct can_dev_s *dev) { FAR struct stm32_can_s *priv = dev->cd_priv; uint32_t regval; /* Return true if all mailboxes are available */ - regval = can_getreg(priv, STM32_CAN_TSR_OFFSET); - canllvdbg("CAN%d TSR: %08x\n", priv->port, regval); + regval = stm32can_getreg(priv, STM32_CAN_TSR_OFFSET); + caninfo("CAN%d TSR: %08x\n", priv->port, regval); return (regval & CAN_ALL_MAILBOXES) == CAN_ALL_MAILBOXES; } /**************************************************************************** - * Name: can_rxinterrupt + * Name: stm32can_rxinterrupt * * Description: * CAN RX FIFO 0/1 interrupt handler @@ -1063,7 +1349,7 @@ static bool can_txempty(FAR struct can_dev_s *dev) * ****************************************************************************/ -static int can_rxinterrupt(int irq, FAR void *context, int rxmb) +static int stm32can_rxinterrupt(int irq, FAR void *context, int rxmb) { FAR struct can_dev_s *dev = NULL; FAR struct stm32_can_s *priv; @@ -1095,26 +1381,26 @@ static int can_rxinterrupt(int irq, FAR void *context, int rxmb) /* Verify that a message is pending in the FIFO */ - regval = can_getreg(priv, STM32_CAN_RFR_OFFSET(rxmb)); + regval = stm32can_getreg(priv, STM32_CAN_RFR_OFFSET(rxmb)); npending = (regval & CAN_RFR_FMP_MASK) >> CAN_RFR_FMP_SHIFT; if (npending < 1) { - canlldbg("WARNING: No messages pending\n"); + canwarn("WARNING: No messages pending\n"); return OK; } if (rxmb == 0) { - can_dumpmbregs(priv, "RX0 interrupt"); + stm32can_dumpmbregs(priv, "RX0 interrupt"); } else { - can_dumpmbregs(priv, "RX1 interrupt"); + stm32can_dumpmbregs(priv, "RX1 interrupt"); } /* Get the CAN identifier. */ - regval = can_getreg(priv, STM32_CAN_RIR_OFFSET(rxmb)); + regval = stm32can_getreg(priv, STM32_CAN_RIR_OFFSET(rxmb)); #ifdef CONFIG_CAN_EXTID if ((regval & CAN_RIR_IDE) != 0) @@ -1130,7 +1416,7 @@ static int can_rxinterrupt(int irq, FAR void *context, int rxmb) #else if ((regval & CAN_RIR_IDE) != 0) { - canlldbg("ERROR: Received message with extended identifier. Dropped\n"); + canerr("ERROR: Received message with extended identifier. Dropped\n"); ret = -ENOSYS; goto errout; } @@ -1151,18 +1437,18 @@ static int can_rxinterrupt(int irq, FAR void *context, int rxmb) /* Get the DLC */ - regval = can_getreg(priv, STM32_CAN_RDTR_OFFSET(rxmb)); + regval = stm32can_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_RDLR_OFFSET(rxmb)); + regval = stm32can_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_RDHR_OFFSET(rxmb)); + regval = stm32can_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; @@ -1177,14 +1463,14 @@ static int can_rxinterrupt(int irq, FAR void *context, int rxmb) #ifndef CONFIG_CAN_EXTID errout: #endif - regval = can_getreg(priv, STM32_CAN_RFR_OFFSET(rxmb)); + regval = stm32can_getreg(priv, STM32_CAN_RFR_OFFSET(rxmb)); regval |= CAN_RFR_RFOM; - can_putreg(priv, STM32_CAN_RFR_OFFSET(rxmb), regval); + stm32can_putreg(priv, STM32_CAN_RFR_OFFSET(rxmb), regval); return ret; } /**************************************************************************** - * Name: can_rx0interrupt + * Name: stm32can_rx0interrupt * * Description: * CAN RX FIFO 0 interrupt handler @@ -1198,13 +1484,13 @@ errout: * ****************************************************************************/ -static int can_rx0interrupt(int irq, FAR void *context) +static int stm32can_rx0interrupt(int irq, FAR void *context) { - return can_rxinterrupt(irq, context, 0); + return stm32can_rxinterrupt(irq, context, 0); } /**************************************************************************** - * Name: can_rx1interrupt + * Name: stm32can_rx1interrupt * * Description: * CAN RX FIFO 1 interrupt handler @@ -1218,13 +1504,13 @@ static int can_rx0interrupt(int irq, FAR void *context) * ****************************************************************************/ -static int can_rx1interrupt(int irq, FAR void *context) +static int stm32can_rx1interrupt(int irq, FAR void *context) { - return can_rxinterrupt(irq, context, 1); + return stm32can_rxinterrupt(irq, context, 1); } /**************************************************************************** - * Name: can_txinterrupt + * Name: stm32can_txinterrupt * * Description: * CAN TX mailbox complete interrupt handler @@ -1238,7 +1524,7 @@ static int can_rx1interrupt(int irq, FAR void *context) * ****************************************************************************/ -static int can_txinterrupt(int irq, FAR void *context) +static int stm32can_txinterrupt(int irq, FAR void *context) { FAR struct can_dev_s *dev = NULL; FAR struct stm32_can_s *priv; @@ -1266,7 +1552,7 @@ static int can_txinterrupt(int irq, FAR void *context) /* Get the transmit status */ - regval = can_getreg(priv, STM32_CAN_TSR_OFFSET); + regval = stm32can_getreg(priv, STM32_CAN_TSR_OFFSET); /* Check for RQCP0: Request completed mailbox 0 */ @@ -1276,7 +1562,7 @@ static int can_txinterrupt(int irq, FAR void *context) * ALST0 and TERR0) for Mailbox 0. */ - can_putreg(priv, STM32_CAN_TSR_OFFSET, CAN_TSR_RQCP0); + stm32can_putreg(priv, STM32_CAN_TSR_OFFSET, CAN_TSR_RQCP0); /* Check for errors */ @@ -1296,7 +1582,7 @@ static int can_txinterrupt(int irq, FAR void *context) * ALST1 and TERR1) for Mailbox 1. */ - can_putreg(priv, STM32_CAN_TSR_OFFSET, CAN_TSR_RQCP1); + stm32can_putreg(priv, STM32_CAN_TSR_OFFSET, CAN_TSR_RQCP1); /* Check for errors */ @@ -1316,7 +1602,7 @@ static int can_txinterrupt(int irq, FAR void *context) * ALST2 and TERR2) for Mailbox 2. */ - can_putreg(priv, STM32_CAN_TSR_OFFSET, CAN_TSR_RQCP2); + stm32can_putreg(priv, STM32_CAN_TSR_OFFSET, CAN_TSR_RQCP2); /* Check for errors */ @@ -1332,7 +1618,7 @@ static int can_txinterrupt(int irq, FAR void *context) } /**************************************************************************** - * Name: can_bittiming + * Name: stm32can_bittiming * * Description: * Set the CAN bit timing register (BTR) based on the configured BAUD. @@ -1387,15 +1673,15 @@ static int can_txinterrupt(int irq, FAR void *context) * ****************************************************************************/ -static int can_bittiming(FAR struct stm32_can_s *priv) +static int stm32can_bittiming(FAR struct stm32_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, STM32_PCLK1_FREQUENCY, priv->baud); + caninfo("CAN%d PCLK1: %d baud: %d\n", + priv->port, STM32_PCLK1_FREQUENCY, priv->baud); /* Try to get CAN_BIT_QUANTA quanta in one bit_time. * @@ -1447,7 +1733,7 @@ static int can_bittiming(FAR struct stm32_can_s *priv) DEBUGASSERT(brp >= 1 && brp <= CAN_BTR_BRP_MAX); } - canllvdbg("TS1: %d TS2: %d BRP: %d\n", ts1, ts2, brp); + caninfo("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: @@ -1466,12 +1752,12 @@ static int can_bittiming(FAR struct stm32_can_s *priv) tmp |= CAN_BTR_LBKM; #endif - can_putreg(priv, STM32_CAN_BTR_OFFSET, tmp); + stm32can_putreg(priv, STM32_CAN_BTR_OFFSET, tmp); return OK; } /**************************************************************************** - * Name: can_cellinit + * Name: stm32can_cellinit * * Description: * CAN cell initialization @@ -1484,30 +1770,30 @@ static int can_bittiming(FAR struct stm32_can_s *priv) * ****************************************************************************/ -static int can_cellinit(FAR struct stm32_can_s *priv) +static int stm32can_cellinit(FAR struct stm32_can_s *priv) { volatile uint32_t timeout; uint32_t regval; int ret; - canllvdbg("CAN%d\n", priv->port); + caninfo("CAN%d\n", priv->port); /* Exit from sleep mode */ - regval = can_getreg(priv, STM32_CAN_MCR_OFFSET); + regval = stm32can_getreg(priv, STM32_CAN_MCR_OFFSET); regval &= ~CAN_MCR_SLEEP; - can_putreg(priv, STM32_CAN_MCR_OFFSET, regval); + stm32can_putreg(priv, STM32_CAN_MCR_OFFSET, regval); /* Enter initialization mode */ regval |= CAN_MCR_INRQ; - can_putreg(priv, STM32_CAN_MCR_OFFSET, regval); + stm32can_putreg(priv, STM32_CAN_MCR_OFFSET, regval); /* Wait until initialization mode is acknowledged */ for (timeout = INAK_TIMEOUT; timeout > 0; timeout--) { - regval = can_getreg(priv, STM32_CAN_MSR_OFFSET); + regval = stm32can_getreg(priv, STM32_CAN_MSR_OFFSET); if ((regval & CAN_MSR_INAK) != 0) { /* We are in initialization mode */ @@ -1520,7 +1806,7 @@ static int can_cellinit(FAR struct stm32_can_s *priv) if (timeout < 1) { - canlldbg("ERROR: Timed out waiting to enter initialization mode\n"); + canerr("ERROR: Timed out waiting to enter initialization mode\n"); return -ETIMEDOUT; } @@ -1534,31 +1820,31 @@ static int can_cellinit(FAR struct stm32_can_s *priv) * - Transmit FIFO priority */ - regval = can_getreg(priv, STM32_CAN_MCR_OFFSET); + regval = stm32can_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); - can_putreg(priv, STM32_CAN_MCR_OFFSET, regval); + stm32can_putreg(priv, STM32_CAN_MCR_OFFSET, regval); /* Configure bit timing. */ - ret = can_bittiming(priv); + ret = stm32can_bittiming(priv); if (ret < 0) { - canlldbg("ERROR: Failed to set bit timing: %d\n", ret); + canerr("ERROR: Failed to set bit timing: %d\n", ret); return ret; } /* Exit initialization mode */ - regval = can_getreg(priv, STM32_CAN_MCR_OFFSET); + regval = stm32can_getreg(priv, STM32_CAN_MCR_OFFSET); regval &= ~CAN_MCR_INRQ; - can_putreg(priv, STM32_CAN_MCR_OFFSET, regval); + stm32can_putreg(priv, STM32_CAN_MCR_OFFSET, regval); /* Wait until the initialization mode exit is acknowledged */ for (timeout = INAK_TIMEOUT; timeout > 0; timeout--) { - regval = can_getreg(priv, STM32_CAN_MSR_OFFSET); + regval = stm32can_getreg(priv, STM32_CAN_MSR_OFFSET); if ((regval & CAN_MSR_INAK) == 0) { /* We are out of initialization mode */ @@ -1571,15 +1857,15 @@ static int can_cellinit(FAR struct stm32_can_s *priv) if (timeout < 1) { - canlldbg("ERROR: Timed out waiting to exit initialization mode: %08x\n", - regval); + canerr("ERROR: Timed out waiting to exit initialization mode: %08x\n", + regval); return -ETIMEDOUT; } return OK; } /**************************************************************************** - * Name: can_filterinit + * Name: stm32can_filterinit * * Description: * CAN filter initialization. CAN filters are not currently used by this @@ -1611,12 +1897,12 @@ static int can_cellinit(FAR struct stm32_can_s *priv) * ****************************************************************************/ -static int can_filterinit(FAR struct stm32_can_s *priv) +static int stm32can_filterinit(FAR struct stm32_can_s *priv) { uint32_t regval; uint32_t bitmask; - canllvdbg("CAN%d filter: %d\n", priv->port, priv->filter); + caninfo("CAN%d filter: %d\n", priv->port, priv->filter); /* Get the bitmask associated with the filter used by this CAN block */ @@ -1624,66 +1910,158 @@ static int can_filterinit(FAR struct stm32_can_s *priv) /* Enter filter initialization mode */ - regval = can_getfreg(priv, STM32_CAN_FMR_OFFSET); + regval = stm32can_getfreg(priv, STM32_CAN_FMR_OFFSET); regval |= CAN_FMR_FINIT; - can_putfreg(priv, STM32_CAN_FMR_OFFSET, regval); + stm32can_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 = stm32can_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); + stm32can_putfreg(priv, STM32_CAN_FMR_OFFSET, regval); #endif /* Disable the filter */ - regval = can_getfreg(priv, STM32_CAN_FA1R_OFFSET); + regval = stm32can_getfreg(priv, STM32_CAN_FA1R_OFFSET); regval &= ~bitmask; - can_putfreg(priv, STM32_CAN_FA1R_OFFSET, regval); + stm32can_putfreg(priv, STM32_CAN_FA1R_OFFSET, regval); /* Select the 32-bit scale for the filter */ - regval = can_getfreg(priv, STM32_CAN_FS1R_OFFSET); + regval = stm32can_getfreg(priv, STM32_CAN_FS1R_OFFSET); regval |= bitmask; - can_putfreg(priv, STM32_CAN_FS1R_OFFSET, regval); + stm32can_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: */ - can_putfreg(priv, STM32_CAN_FIR_OFFSET(priv->filter, 1), 0); - can_putfreg(priv, STM32_CAN_FIR_OFFSET(priv->filter, 2), 0); + stm32can_putfreg(priv, STM32_CAN_FIR_OFFSET(priv->filter, 1), 0); + stm32can_putfreg(priv, STM32_CAN_FIR_OFFSET(priv->filter, 2), 0); /* Set Id/Mask mode for the filter */ - regval = can_getfreg(priv, STM32_CAN_FM1R_OFFSET); + regval = stm32can_getfreg(priv, STM32_CAN_FM1R_OFFSET); regval &= ~bitmask; - can_putfreg(priv, STM32_CAN_FM1R_OFFSET, regval); + stm32can_putfreg(priv, STM32_CAN_FM1R_OFFSET, regval); /* Assign FIFO 0 for the filter */ - regval = can_getfreg(priv, STM32_CAN_FFA1R_OFFSET); + regval = stm32can_getfreg(priv, STM32_CAN_FFA1R_OFFSET); regval &= ~bitmask; - can_putfreg(priv, STM32_CAN_FFA1R_OFFSET, regval); + stm32can_putfreg(priv, STM32_CAN_FFA1R_OFFSET, regval); /* Enable the filter */ - regval = can_getfreg(priv, STM32_CAN_FA1R_OFFSET); + regval = stm32can_getfreg(priv, STM32_CAN_FA1R_OFFSET); regval |= bitmask; - can_putfreg(priv, STM32_CAN_FA1R_OFFSET, regval); + stm32can_putfreg(priv, STM32_CAN_FA1R_OFFSET, regval); /* Exit filter initialization mode */ - regval = can_getfreg(priv, STM32_CAN_FMR_OFFSET); + regval = stm32can_getfreg(priv, STM32_CAN_FMR_OFFSET); regval &= ~CAN_FMR_FINIT; - can_putfreg(priv, STM32_CAN_FMR_OFFSET, regval); + stm32can_putfreg(priv, STM32_CAN_FMR_OFFSET, regval); return OK; } +/**************************************************************************** + * Name: stm32can_addextfilter + * + * Description: + * Add a filter for extended CAN IDs + * + * Input Parameter: + * priv - A pointer to the private data structure for this CAN block + * arg - A pointer to a structure describing the filter + * + * Returned Value: + * A non-negative filter ID is returned on success. + * Otherwise -1 (ERROR) is returned with the errno + * set to indicate the nature of the error. + * + ****************************************************************************/ + +static int stm32can_addextfilter(FAR struct stm32_can_s *priv, + FAR struct canioc_extfilter_s *arg) +{ + return -ENOTTY; +} + +/**************************************************************************** + * Name: stm32can_delextfilter + * + * Description: + * Remove a filter for extended CAN IDs + * + * Input Parameter: + * priv - A pointer to the private data structure for this CAN block + * arg - The filter index previously returned by the + * CANIOC_ADD_EXTFILTER command + * + * Returned Value: + * Zero (OK) is returned on success. Otherwise -1 (ERROR) + * returned with the errno variable set to indicate the + * of the error. + * + ****************************************************************************/ + +static int stm32can_delextfilter(FAR struct stm32_can_s *priv, int arg) +{ + return -ENOTTY; +} + +/**************************************************************************** + * Name: stm32can_addextfilter + * + * Description: + * Add a filter for standard CAN IDs + * + * Input Parameter: + * priv - A pointer to the private data structure for this CAN block + * arg - A pointer to a structure describing the filter + * + * Returned Value: + * A non-negative filter ID is returned on success. + * Otherwise -1 (ERROR) is returned with the errno + * set to indicate the nature of the error. + * + ****************************************************************************/ + +static int stm32can_addstdfilter(FAR struct stm32_can_s *priv, + FAR struct canioc_stdfilter_s *arg) +{ + return -ENOTTY; +} + +/**************************************************************************** + * Name: stm32can_delstdfilter + * + * Description: + * Remove a filter for standard CAN IDs + * + * Input Parameter: + * priv - A pointer to the private data structure for this CAN block + * arg - The filter index previously returned by the + * CANIOC_ADD_STDFILTER command + * + * Returned Value: + * Zero (OK) is returned on success. Otherwise -1 (ERROR) + * returned with the errno variable set to indicate the + * of the error. + * + ****************************************************************************/ + +static int stm32can_delstdfilter(FAR struct stm32_can_s *priv, int arg) +{ + return -ENOTTY; +} + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -1706,7 +2084,7 @@ FAR struct can_dev_s *stm32_caninitialize(int port) { FAR struct can_dev_s *dev = NULL; - canvdbg("CAN%d\n", port); + caninfo("CAN%d\n", port); /* NOTE: Peripherical clocking for CAN1 and/or CAN2 was already provided * by stm32_clockconfig() early in the reset sequence. @@ -1745,7 +2123,7 @@ FAR struct can_dev_s *stm32_caninitialize(int port) else #endif { - candbg("ERROR: Unsupported port %d\n", port); + canerr("ERROR: Unsupported port %d\n", port); return NULL; } diff --git a/arch/arm/src/stm32/stm32_capture.c b/arch/arm/src/stm32/stm32_capture.c index 55864281a9ccb17a1c1ecb9d7c0e7876bd1677c5..e5fefa74cfc27a2fbb93a735df4d4c6ab6379731 100644 --- a/arch/arm/src/stm32/stm32_capture.c +++ b/arch/arm/src/stm32/stm32_capture.c @@ -185,7 +185,7 @@ static inline uint32_t stm32_cap_gpio(FAR const struct stm32_cap_priv_s *priv, { switch(priv->base) { -#ifdef CONFIG_STM32_TIM1 +#ifdef CONFIG_STM32_TIM1_CAP case STM32_TIM1_BASE: switch (channel) { @@ -212,7 +212,7 @@ static inline uint32_t stm32_cap_gpio(FAR const struct stm32_cap_priv_s *priv, } break; #endif -#ifdef CONFIG_STM32_TIM2 +#ifdef CONFIG_STM32_TIM2_CAP case STM32_TIM2_BASE: switch (channel) { @@ -239,7 +239,7 @@ static inline uint32_t stm32_cap_gpio(FAR const struct stm32_cap_priv_s *priv, } break; #endif -#ifdef CONFIG_STM32_TIM3 +#ifdef CONFIG_STM32_TIM3_CAP case STM32_TIM3_BASE: switch (channel) { @@ -266,7 +266,7 @@ static inline uint32_t stm32_cap_gpio(FAR const struct stm32_cap_priv_s *priv, } break; #endif -#ifdef CONFIG_STM32_TIM4 +#ifdef CONFIG_STM32_TIM4_CAP case STM32_TIM4_BASE: switch (channel) { @@ -293,7 +293,7 @@ static inline uint32_t stm32_cap_gpio(FAR const struct stm32_cap_priv_s *priv, } break; #endif -#ifdef CONFIG_STM32_TIM5 +#ifdef CONFIG_STM32_TIM5_CAP case STM32_TIM5_BASE: switch (channel) { @@ -323,7 +323,7 @@ static inline uint32_t stm32_cap_gpio(FAR const struct stm32_cap_priv_s *priv, /* TIM6 and TIM7 cannot be used in capture */ -#ifdef CONFIG_STM32_TIM8 +#ifdef CONFIG_STM32_TIM8_CAP case STM32_TIM8_BASE: switch (channel) { @@ -351,7 +351,7 @@ static inline uint32_t stm32_cap_gpio(FAR const struct stm32_cap_priv_s *priv, break; #endif -#ifdef CONFIG_STM32_TIM9 +#ifdef CONFIG_STM32_TIM9_CAP case STM32_TIM9_BASE: switch (channel) { @@ -379,7 +379,7 @@ static inline uint32_t stm32_cap_gpio(FAR const struct stm32_cap_priv_s *priv, break; #endif -#ifdef CONFIG_STM32_TIM10 +#ifdef CONFIG_STM32_TIM10_CAP case STM32_TIM10_BASE: switch (channel) { @@ -407,7 +407,7 @@ static inline uint32_t stm32_cap_gpio(FAR const struct stm32_cap_priv_s *priv, break; #endif -#ifdef CONFIG_STM32_TIM11 +#ifdef CONFIG_STM32_TIM11_CAP case STM32_TIM11_BASE: switch (channel) { @@ -435,7 +435,7 @@ static inline uint32_t stm32_cap_gpio(FAR const struct stm32_cap_priv_s *priv, break; #endif -#ifdef CONFIG_STM32_TIM12 +#ifdef CONFIG_STM32_TIM12_CAP case STM32_TIM12_BASE: switch (channel) { @@ -463,7 +463,7 @@ static inline uint32_t stm32_cap_gpio(FAR const struct stm32_cap_priv_s *priv, break; #endif -#ifdef CONFIG_STM32_TIM13 +#ifdef CONFIG_STM32_TIM13_CAP case STM32_TIM13_BASE: switch (channel) { @@ -491,7 +491,7 @@ static inline uint32_t stm32_cap_gpio(FAR const struct stm32_cap_priv_s *priv, break; #endif -#ifdef CONFIG_STM32_TIM14 +#ifdef CONFIG_STM32_TIM14_CAP case STM32_TIM14_BASE: switch (channel) { @@ -531,31 +531,31 @@ static inline int stm32_cap_set_rcc(FAR const struct stm32_cap_priv_s *priv, switch (priv->base) { #ifdef CONFIG_STM32_TIM1_CAP - case 1: + case STM32_TIM1_BASE: offset = STM32_RCC_APB2ENR; mask = RCC_APB2ENR_TIM1EN; break; #endif #ifdef CONFIG_STM32_TIM2_CAP - case 2: + case STM32_TIM2_BASE: offset = STM32_RCC_APB1ENR; mask = RCC_APB1ENR_TIM2EN; break; #endif #ifdef CONFIG_STM32_TIM3_CAP - case 3: + case STM32_TIM3_BASE: offset = STM32_RCC_APB1ENR; mask = RCC_APB1ENR_TIM3EN; break; #endif #ifdef CONFIG_STM32_TIM4_CAP - case 4: + case STM32_TIM4_BASE: offset = STM32_RCC_APB1ENR; mask = RCC_APB1ENR_TIM4EN; break; #endif #ifdef CONFIG_STM32_TIM5_CAP - case 5: + case STM32_TIM5_BASE: offset = STM32_RCC_APB1ENR; mask = RCC_APB1ENR_TIM5EN; break; @@ -564,43 +564,43 @@ static inline int stm32_cap_set_rcc(FAR const struct stm32_cap_priv_s *priv, /* TIM6 and TIM7 cannot be used in capture */ #ifdef CONFIG_STM32_TIM8_CAP - case 8: + case STM32_TIM8_BASE: offset = STM32_RCC_APB2ENR; mask = RCC_APB2ENR_TIM8EN; break; #endif #ifdef CONFIG_STM32_TIM9_CAP - case 9: + case STM32_TIM9_BASE: offset = STM32_RCC_APB2ENR; mask = RCC_APB2ENR_TIM9EN; break; #endif #ifdef CONFIG_STM32_TIM10_CAP - case 10: + case STM32_TIM10_BASE: offset = STM32_RCC_APB2ENR; mask = RCC_APB2ENR_TIM10EN; break; #endif #ifdef CONFIG_STM32_TIM11_CAP - case 11: + case STM32_TIM11_BASE: offset = STM32_RCC_APB2ENR; mask = RCC_APB2ENR_TIM11EN; break; #endif #ifdef CONFIG_STM32_TIM12_CAP - case 12: + case STM32_TIM12_BASE: offset = STM32_RCC_APB1ENR; mask = RCC_APB2ENR_TIM12EN; break; #endif #ifdef CONFIG_STM32_TIM13_CAP - case 13: + case STM32_TIM13_BASE: offset = STM32_RCC_APB1ENR; mask = RCC_APB2ENR_TIM13EN; break; #endif #ifdef CONFIG_STM32_TIM14_CAP - case 14: + case STM32_TIM14_BASE: offset = STM32_RCC_APB1ENR; mask = RCC_APB2ENR_TIM14EN; break; @@ -1097,9 +1097,9 @@ const struct stm32_cap_priv_s stm32_tim1_priv = { .ops = &stm32_cap_ops, .base = STM32_TIM1_BASE, - .irq = STM32_IRQ_TIM1, + .irq = STM32_IRQ_TIM1CC, #ifdef USE_ADVENCED_TIM - .irg_of = STM32_IRQ_TIM1UP, + .irq_of = STM32_IRQ_TIM1UP, #endif }; #endif @@ -1111,7 +1111,7 @@ const struct stm32_cap_priv_s stm32_tim2_priv = .base = STM32_TIM2_BASE, .irq = STM32_IRQ_TIM2, #ifdef USE_ADVENCED_TIM - .irg_of = 0, + .irq_of = 0, #endif }; #endif @@ -1123,7 +1123,7 @@ const struct stm32_cap_priv_s stm32_tim3_priv = .base = STM32_TIM3_BASE, .irq = STM32_IRQ_TIM3, #ifdef USE_ADVENCED_TIM - .irg_of = 0, + .irq_of = 0, #endif }; #endif @@ -1135,7 +1135,7 @@ const struct stm32_cap_priv_s stm32_tim4_priv = .base = STM32_TIM4_BASE, .irq = STM32_IRQ_TIM4, #ifdef USE_ADVENCED_TIM - .irg_of = 0, + .irq_of = 0, #endif }; #endif @@ -1147,7 +1147,7 @@ const struct stm32_cap_priv_s stm32_tim5_priv = .base = STM32_TIM5_BASE, .irq = STM32_IRQ_TIM5, #ifdef USE_ADVENCED_TIM - .irg_of = 0, + .irq_of = 0, #endif }; #endif @@ -1159,9 +1159,9 @@ const struct stm32_cap_priv_s stm32_tim8_priv = { .ops = &stm32_cap_ops, .base = STM32_TIM8_BASE, - .irq = STM32_IRQ_TIM8, + .irq = STM32_IRQ_TIM8CC, #ifdef USE_ADVENCED_TIM - .irg_of = STM32_IRQ_TIM8UP, + .irq_of = STM32_IRQ_TIM8UP, #endif }; #endif @@ -1173,7 +1173,7 @@ const struct stm32_cap_priv_s stm32_tim9_priv = .base = STM32_TIM9_BASE, .irq = STM32_IRQ_TIM9, #ifdef USE_ADVENCED_TIM - .irg_of = 0, + .irq_of = 0, #endif }; #endif @@ -1185,7 +1185,7 @@ const struct stm32_cap_priv_s stm32_tim10_priv = .base = STM32_TIM10_BASE, .irq = STM32_IRQ_TIM10, #ifdef USE_ADVENCED_TIM - .irg_of = 0, + .irq_of = 0, #endif }; #endif @@ -1197,7 +1197,7 @@ const struct stm32_cap_priv_s stm32_tim11_priv = .base = STM32_TIM11_BASE, .irq = STM32_IRQ_TIM11, #ifdef USE_ADVENCED_TIM - .irg_of = 0, + .irq_of = 0, #endif }; #endif @@ -1209,7 +1209,7 @@ const struct stm32_cap_priv_s stm32_tim12_priv = .base = STM32_TIM12_BASE, .irq = STM32_IRQ_TIM12, #ifdef USE_ADVENCED_TIM - .irg_of = 0, + .irq_of = 0, #endif }; #endif @@ -1221,7 +1221,7 @@ const struct stm32_cap_priv_s stm32_tim13_priv = .base = STM32_TIM13_BASE, .irq = STM32_IRQ_TIM13, #ifdef USE_ADVENCED_TIM - .irg_of = 0, + .irq_of = 0, #endif }; #endif @@ -1233,7 +1233,7 @@ const struct stm32_cap_priv_s stm32_tim14_priv = .base = STM32_TIM14_BASE, .irq = STM32_IRQ_TIM14, #ifdef USE_ADVENCED_TIM - .irg_of = 0, + .irq_of = 0, #endif }; #endif diff --git a/arch/arm/src/stm32/stm32_dac.c b/arch/arm/src/stm32/stm32_dac.c index 77213af264971e7cc0b98e923e11f3ba3bad1634..528faf1786c90821ea60005ff5cca22d6e5f40ea 100644 --- a/arch/arm/src/stm32/stm32_dac.c +++ b/arch/arm/src/stm32/stm32_dac.c @@ -848,11 +848,11 @@ static int dac_timinit(FAR struct stm32_chan_s *chan) case 8: regaddr = STM32_RCC_APB2ENR; setbits = RCC_APB2ENR_TIM8EN; - pclk = STM32_TIM18_FREQUENCY; + pclk = BOARD_TIM8_FREQUENCY; break; #endif default: - adbg("Could not enable timer\n"); + aerr("ERROR: Could not enable timer\n"); break; } @@ -1016,7 +1016,7 @@ static int dac_chaninit(FAR struct stm32_chan_s *chan) chan->dma = stm32_dmachannel(chan->dmachan); if (!chan->dma) { - adbg("Failed to allocate a DMA channel\n"); + aerr("ERROR: Failed to allocate a DMA channel\n"); return -EBUSY; } @@ -1025,7 +1025,7 @@ static int dac_chaninit(FAR struct stm32_chan_s *chan) ret = dac_timinit(chan); if (ret < 0) { - adbg("Failed to initialize the DMA timer: %d\n", ret); + aerr("ERROR: Failed to initialize the DMA timer: %d\n", ret); return ret; } } @@ -1114,7 +1114,7 @@ FAR struct dac_dev_s *stm32_dacinitialize(int intf) #ifdef CONFIG_STM32_DAC1 if (intf == 1) { - avdbg("DAC1 Selected\n"); + ainfo("DAC1 Selected\n"); dev = &g_dac1dev; } else @@ -1122,13 +1122,13 @@ FAR struct dac_dev_s *stm32_dacinitialize(int intf) #ifdef CONFIG_STM32_DAC2 if (intf == 2) { - avdbg("DAC2 Selected\n"); + ainfo("DAC2 Selected\n"); dev = &g_dac2dev; } else #endif { - adbg("No such DAC interface: %d\n", intf); + aerr("ERROR: No such DAC interface: %d\n", intf); errno = ENODEV; return NULL; } @@ -1138,7 +1138,7 @@ FAR struct dac_dev_s *stm32_dacinitialize(int intf) ret = dac_blockinit(); if (ret < 0) { - adbg("Failed to initialize the DAC block: %d\n", ret); + aerr("ERROR: Failed to initialize the DAC block: %d\n", ret); errno = -ret; return NULL; } @@ -1149,7 +1149,7 @@ FAR struct dac_dev_s *stm32_dacinitialize(int intf) ret = dac_chaninit(chan); if (ret < 0) { - adbg("Failed to initialize DAC channel %d: %d\n", intf, ret); + aerr("ERROR: Failed to initialize DAC channel %d: %d\n", intf, ret); errno = -ret; return NULL; } diff --git a/arch/arm/src/stm32/stm32_dma.c b/arch/arm/src/stm32/stm32_dma.c index ff7135840e414814c0776f2bbd761fc0974c9ea0..4b694e7ccb9de6ddbf582e2e848c631e7da1ef58 100644 --- a/arch/arm/src/stm32/stm32_dma.c +++ b/arch/arm/src/stm32/stm32_dma.c @@ -56,7 +56,7 @@ */ #if defined(CONFIG_STM32_STM32L15XX) || defined(CONFIG_STM32_STM32F10XX) || \ - defined(CONFIG_STM32_STM32F30XX) + defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) # include "stm32f10xxx_dma.c" #elif defined(CONFIG_STM32_STM32F20XX) # include "stm32f20xxx_dma.c" diff --git a/arch/arm/src/stm32/stm32_dma.h b/arch/arm/src/stm32/stm32_dma.h index b2f968fe1f7c0e6110b1d60cf43f342c17d14d0a..d26428c35bbc758d714345ed998aff76f7614a51 100644 --- a/arch/arm/src/stm32/stm32_dma.h +++ b/arch/arm/src/stm32/stm32_dma.h @@ -104,7 +104,7 @@ typedef FAR void *DMA_HANDLE; typedef void (*dma_callback_t)(DMA_HANDLE handle, uint8_t status, void *arg); -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO #if defined(CONFIG_STM32_STM32L15XX) || defined(CONFIG_STM32_STM32F10XX) || \ defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) struct stm32_dmaregs_s @@ -299,7 +299,7 @@ bool stm32_dmacapable(uintptr_t maddr, uint32_t count, uint32_t ccr); * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void stm32_dmasample(DMA_HANDLE handle, struct stm32_dmaregs_s *regs); #else # define stm32_dmasample(handle,regs) @@ -316,7 +316,7 @@ void stm32_dmasample(DMA_HANDLE handle, struct stm32_dmaregs_s *regs); * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void stm32_dmadump(DMA_HANDLE handle, const struct stm32_dmaregs_s *regs, const char *msg); #else diff --git a/arch/arm/src/stm32/stm32_dma2d.c b/arch/arm/src/stm32/stm32_dma2d.c index e951e8916dbeb36546b098a793d07b564ab5af4b..5e5740e27b8438e1c33edbea037c9119309cae42 100644 --- a/arch/arm/src/stm32/stm32_dma2d.c +++ b/arch/arm/src/stm32/stm32_dma2d.c @@ -137,11 +137,11 @@ /* Debug option */ #ifdef CONFIG_STM32_DMA2D_REGDEBUG -# define regdbg dbg -# define regvdbg vdbg +# define regerr lcderr +# define reginfo lcdinfo #else -# define regdbg(x...) -# define regvdbg(x...) +# define regerr(x...) +# define reginfo(x...) #endif /* check clut support */ @@ -408,7 +408,7 @@ static void stm32_dma2d_control(uint32_t setbits, uint32_t clrbits) { uint32_t cr; - gvdbg("setbits=%08x, clrbits=%08x\n", setbits, clrbits); + lcdinfo("setbits=%08x, clrbits=%08x\n", setbits, clrbits); cr = getreg32(STM32_DMA2D_CR); cr &= ~clrbits; @@ -429,7 +429,7 @@ static int stm32_dma2dirq(int irq, void *context) uint32_t regval = getreg32(STM32_DMA2D_ISR); FAR struct stm32_interrupt_s *priv = &g_interrupt; - regvdbg("irq = %d, regval = %08x\n", irq, regval); + reginfo("irq = %d, regval = %08x\n", irq, regval); if (regval & DMA2D_ISR_TCIF) { @@ -469,7 +469,7 @@ static int stm32_dma2dirq(int irq, void *context) if (ret != OK) { - dbg("sem_post() failed\n"); + lcderr("ERROR: sem_post() failed\n"); return ret; } } @@ -512,7 +512,7 @@ static int stm32_dma2d_waitforirq(void) if (ret != OK) { - dbg("sem_wait() failed\n"); + lcderr("ERROR: sem_wait() failed\n"); return ret; } } @@ -558,9 +558,9 @@ static int stm32_dma2d_loadclut(uintptr_t pfcreg) regval = getreg32(pfcreg); regval |= DMA2D_xGPFCCR_START; - regvdbg("set regval=%08x\n", regval); + reginfo("set regval=%08x\n", regval); putreg32(regval, pfcreg); - regvdbg("configured regval=%08x\n", getreg32(pfcreg)); + reginfo("configured regval=%08x\n", getreg32(pfcreg)); } leave_critical_section(flags); @@ -632,7 +632,7 @@ static uint32_t stm32_dma2d_memaddress(FAR const struct stm32_dma2d_s *layer, offset = xpos * DMA2D_PF_BYPP(layer->pinfo.bpp) + layer->pinfo.stride * ypos; - gvdbg("%p\n", ((uint32_t) pinfo->fbmem) + offset); + lcdinfo("%p\n", ((uint32_t) pinfo->fbmem) + offset); return ((uint32_t) pinfo->fbmem) + offset; } @@ -655,7 +655,7 @@ static fb_coord_t stm32_dma2d_lineoffset(FAR const struct stm32_dma2d_s *layer, { /* offset at the end of each line in the context to the area layer */ - gvdbg("%d\n", layer->vinfo.xres - area->xres); + lcdinfo("%d\n", layer->vinfo.xres - area->xres); return layer->vinfo.xres - area->xres; } @@ -677,7 +677,7 @@ static fb_coord_t stm32_dma2d_lineoffset(FAR const struct stm32_dma2d_s *layer, static int stm32_dma2d_pixelformat(uint8_t fmt, uint8_t *fmtmap) { - gvdbg("fmt=%d, fmtmap=%p\n", fmt, fmtmap); + lcdinfo("fmt=%d, fmtmap=%p\n", fmt, fmtmap); /* Map to the controller known format * @@ -711,7 +711,7 @@ static int stm32_dma2d_pixelformat(uint8_t fmt, uint8_t *fmtmap) break; #endif default: - gdbg("ERROR: Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -736,7 +736,7 @@ static int stm32_dma2d_pixelformat(uint8_t fmt, uint8_t *fmtmap) static int stm32_dma2d_bpp(uint8_t fmt, uint8_t *bpp) { - gvdbg("fmt=%d, bpp=%p\n", fmt, bpp); + lcdinfo("fmt=%d, bpp=%p\n", fmt, bpp); switch (fmt) { @@ -756,7 +756,7 @@ static int stm32_dma2d_bpp(uint8_t fmt, uint8_t *bpp) break; #endif default: - gdbg("ERROR: Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -937,7 +937,7 @@ static void stm32_dma2d_linit(FAR struct stm32_dma2d_s *layer, { FAR struct dma2d_layer_s *priv = &layer->dma2d; - gvdbg("layer=%p, lid=%d, fmt=%02x\n", layer, lid, fmt); + lcdinfo("layer=%p, lid=%d, fmt=%02x\n", layer, lid, fmt); /* initialize the layer interface */ @@ -985,8 +985,8 @@ static void stm32_dma2d_lfifo(FAR const struct stm32_dma2d_s *layer, int lid, fb_coord_t xpos, fb_coord_t ypos, FAR const struct ltdc_area_s *area) { - gvdbg("layer=%p, lid=%d, xpos=%d, ypos=%d, area=%p\n", - layer, lid, xpos, ypos, area); + lcdinfo("layer=%p, lid=%d, xpos=%d, ypos=%d, area=%p\n", + layer, lid, xpos, ypos, area); putreg32(stm32_dma2d_memaddress(layer, xpos, ypos), stm32_mar_layer_t[lid]); putreg32(stm32_dma2d_lineoffset(layer, area), stm32_or_layer_t[lid]); @@ -1006,7 +1006,7 @@ static void stm32_dma2d_lfifo(FAR const struct stm32_dma2d_s *layer, int lid, static void stm32_dma2d_lcolor(FAR const struct stm32_dma2d_s *layer, int lid, uint32_t color) { - gvdbg("layer=%p, lid=%d, color=%08x\n", layer, lid, color); + lcdinfo("layer=%p, lid=%d, color=%08x\n", layer, lid, color); putreg32(color, stm32_color_layer_t[lid]); } @@ -1027,7 +1027,7 @@ static void stm32_dma2d_llnr(FAR struct stm32_dma2d_s *layer, { uint32_t nlrreg; - gvdbg("pixel per line: %d, number of lines: %d\n", area->xres, area->yres); + lcdinfo("pixel per line: %d, number of lines: %d\n", area->xres, area->yres); nlrreg = getreg32(STM32_DMA2D_NLR); nlrreg = (DMA2D_NLR_PL(area->xres) | DMA2D_NLR_NL(area->yres)); @@ -1047,7 +1047,7 @@ static void stm32_dma2d_llnr(FAR struct stm32_dma2d_s *layer, static int stm32_dma2d_loutpfc(FAR const struct stm32_dma2d_s *layer) { - gvdbg("layer=%p\n", layer); + lcdinfo("layer=%p\n", layer); /* CLUT format isn't supported by the dma2d controller */ @@ -1055,8 +1055,8 @@ static int stm32_dma2d_loutpfc(FAR const struct stm32_dma2d_s *layer) { /* Destination layer doesn't support CLUT output */ - gdbg("ERROR: Returning ENOSYS, " - "output to layer with CLUT format not supported.\n"); + lcderr("ERROR: Returning ENOSYS, " + "output to layer with CLUT format not supported.\n"); return -ENOSYS; } @@ -1083,7 +1083,7 @@ static void stm32_dma2d_lpfc(FAR const struct stm32_dma2d_s *layer, { uint32_t pfccrreg; - gvdbg("layer=%p, lid=%d, blendmode=%08x\n", layer, lid, blendmode); + lcdinfo("layer=%p, lid=%d, blendmode=%08x\n", layer, lid, blendmode); /* Set color format */ @@ -1172,7 +1172,7 @@ static int stm32_dma2dgetvideoinfo(FAR struct dma2d_layer_s *layer, { FAR struct stm32_dma2d_s *priv = (FAR struct stm32_dma2d_s *)layer; - gvdbg("layer=%p, vinfo=%p\n", layer, vinfo); + lcdinfo("layer=%p, vinfo=%p\n", layer, vinfo); if (stm32_dma2d_lvalidate(priv) && vinfo) { @@ -1183,7 +1183,7 @@ static int stm32_dma2dgetvideoinfo(FAR struct dma2d_layer_s *layer, return OK; } - gdbg("ERROR: Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -ENOSYS; } @@ -1209,7 +1209,7 @@ static int stm32_dma2dgetplaneinfo(FAR struct dma2d_layer_s *layer, int planeno, { FAR struct stm32_dma2d_s *priv = (FAR struct stm32_dma2d_s *)layer; - gvdbg("layer=%p, planeno=%d, pinfo=%p\n", layer, planeno, pinfo); + lcdinfo("layer=%p, planeno=%d, pinfo=%p\n", layer, planeno, pinfo); if (stm32_dma2d_lvalidate(priv) && pinfo && planeno == 0) { @@ -1220,7 +1220,7 @@ static int stm32_dma2dgetplaneinfo(FAR struct dma2d_layer_s *layer, int planeno, return OK; } - gdbg("ERROR: Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -1244,7 +1244,7 @@ static int stm32_dma2dgetlid(FAR struct dma2d_layer_s *layer, int *lid) { FAR struct stm32_dma2d_s *priv = (FAR struct stm32_dma2d_s *)layer; - gvdbg("layer=%p, lid=%p\n", layer, lid); + lcdinfo("layer=%p, lid=%p\n", layer, lid); if (stm32_dma2d_lvalidate(priv) && lid) { @@ -1254,7 +1254,7 @@ static int stm32_dma2dgetlid(FAR struct dma2d_layer_s *layer, int *lid) return OK; } - gdbg("ERROR: Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -1282,7 +1282,7 @@ static int stm32_dma2dsetclut(FAR struct dma2d_layer_s *layer, int ret; FAR struct stm32_dma2d_s *priv = (FAR struct stm32_dma2d_s *)layer; - gvdbg("layer=%p, cmap=%p\n", layer, cmap); + lcdinfo("layer=%p, cmap=%p\n", layer, cmap); if (stm32_dma2d_lvalidate(priv) && cmap) { @@ -1320,14 +1320,14 @@ static int stm32_dma2dsetclut(FAR struct dma2d_layer_s *layer, if (priv->fmt != DMA2D_PF_L8) { - gdbg("Error: CLUT is not supported for the pixel format: %d\n", - priv->vinfo.fmt); + lcderr("ERROR: CLUT is not supported for the pixel format: %d\n", + priv->vinfo.fmt); ret = -EINVAL; } else if (cmap->first >= STM32_DMA2D_NCLUT) { - gdbg("Error: only %d color table entries supported\n", - STM32_DMA2D_NCLUT); + lcderr("ERROR: only %d color table entries supported\n", + STM32_DMA2D_NCLUT); ret = -EINVAL; } else @@ -1349,7 +1349,7 @@ static int stm32_dma2dsetclut(FAR struct dma2d_layer_s *layer, clut888[offset + 1] = cmap->green[n]; clut888[offset + 2] = cmap->red[n]; - regvdbg("n=%d, red=%02x, green=%02x, blue=%02x\n", n, + reginfo("n=%d, red=%02x, green=%02x, blue=%02x\n", n, clut888[offset], clut888[offset + 1], clut888[offset + 2]); #else @@ -1358,7 +1358,7 @@ static int stm32_dma2dsetclut(FAR struct dma2d_layer_s *layer, (uint32_t)DMA2D_CLUT_GREEN(cmap->green[n]) | (uint32_t)DMA2D_CLUT_BLUE(cmap->blue[n]); - regvdbg("n=%d, alpha=%02x, red=%02x, green=%02x, blue=%02x\n", n, + reginfo("n=%d, alpha=%02x, red=%02x, green=%02x, blue=%02x\n", n, DMA2D_CLUT_ALPHA(cmap->alpha[n]), DMA2D_CLUT_RED(cmap->red[n]), DMA2D_CLUT_GREEN(cmap->green[n]), @@ -1374,7 +1374,7 @@ static int stm32_dma2dsetclut(FAR struct dma2d_layer_s *layer, return ret; } - gdbg("ERROR: Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -1401,7 +1401,7 @@ static int stm32_dma2dgetclut(FAR struct dma2d_layer_s *layer, int ret; FAR struct stm32_dma2d_s *priv = (FAR struct stm32_dma2d_s *)layer; - gvdbg("layer=%p, cmap=%p\n", layer, cmap); + lcdinfo("layer=%p, cmap=%p\n", layer, cmap); if (stm32_dma2d_lvalidate(priv) && cmap) { @@ -1409,14 +1409,14 @@ static int stm32_dma2dgetclut(FAR struct dma2d_layer_s *layer, if (priv->fmt != DMA2D_PF_L8) { - gdbg("Error: CLUT is not supported for the pixel format: %d\n", - priv->vinfo.fmt); + lcderr("ERROR: CLUT is not supported for the pixel format: %d\n", + priv->vinfo.fmt); ret = -EINVAL; } else if (cmap->first >= STM32_DMA2D_NCLUT) { - gdbg("Error: only %d color table entries supported\n", - STM32_DMA2D_NCLUT); + lcderr("ERROR: only %d color table entries supported\n", + STM32_DMA2D_NCLUT); ret = -EINVAL; } else @@ -1438,7 +1438,7 @@ static int stm32_dma2dgetclut(FAR struct dma2d_layer_s *layer, cmap->green[n] = clut888[offset + 1]; cmap->red[n] = clut888[offset + 2]; - regvdbg("n=%d, red=%02x, green=%02x, blue=%02x\n", n, + reginfo("n=%d, red=%02x, green=%02x, blue=%02x\n", n, clut888[offset], clut888[offset + 1], clut888[offset + 2]); #else @@ -1447,7 +1447,7 @@ static int stm32_dma2dgetclut(FAR struct dma2d_layer_s *layer, cmap->green[n] = (uint8_t)DMA2D_CMAP_GREEN(clut[n]); cmap->blue[n] = (uint8_t)DMA2D_CMAP_BLUE(clut[n]); - regvdbg("n=%d, alpha=%02x, red=%02x, green=%02x, blue=%02x\n", n, + reginfo("n=%d, alpha=%02x, red=%02x, green=%02x, blue=%02x\n", n, DMA2D_CMAP_ALPHA(clut[n]), DMA2D_CMAP_RED(clut[n]), DMA2D_CMAP_GREEN(clut[n]), DMA2D_CMAP_BLUE(clut[n])); #endif @@ -1461,7 +1461,7 @@ static int stm32_dma2dgetclut(FAR struct dma2d_layer_s *layer, return ret; } - gdbg("ERROR: Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } #endif @@ -1491,7 +1491,7 @@ static int stm32_dma2dsetalpha(FAR struct dma2d_layer_s *layer, uint8_t alpha) { FAR struct stm32_dma2d_s *priv = (FAR struct stm32_dma2d_s *)layer; - gvdbg("layer=%p, alpha=%02x\n", layer, alpha); + lcdinfo("layer=%p, alpha=%02x\n", layer, alpha); if (stm32_dma2d_lvalidate(priv)) { @@ -1502,7 +1502,7 @@ static int stm32_dma2dsetalpha(FAR struct dma2d_layer_s *layer, uint8_t alpha) return OK; } - gdbg("ERROR: Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -1526,7 +1526,7 @@ static int stm32_dma2dgetalpha(FAR struct dma2d_layer_s *layer, uint8_t *alpha) { FAR struct stm32_dma2d_s *priv = (FAR struct stm32_dma2d_s *)layer; - gvdbg("layer=%p, alpha=%p\n", layer, alpha); + lcdinfo("layer=%p, alpha=%p\n", layer, alpha); if (stm32_dma2d_lvalidate(priv)) { @@ -1537,7 +1537,7 @@ static int stm32_dma2dgetalpha(FAR struct dma2d_layer_s *layer, uint8_t *alpha) return OK; } - gdbg("ERROR: Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -1577,7 +1577,7 @@ static int stm32_dma2dsetblendmode(FAR struct dma2d_layer_s *layer, { FAR struct stm32_dma2d_s *priv = (FAR struct stm32_dma2d_s *)layer; - gvdbg("layer=%p, mode=%08x\n", layer, mode); + lcdinfo("layer=%p, mode=%08x\n", layer, mode); if (stm32_dma2d_lvalidate(priv)) { @@ -1588,7 +1588,7 @@ static int stm32_dma2dsetblendmode(FAR struct dma2d_layer_s *layer, return OK; } - gdbg("ERROR: Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -1613,7 +1613,7 @@ static int stm32_dma2dgetblendmode(FAR struct dma2d_layer_s *layer, { FAR struct stm32_dma2d_s *priv = (FAR struct stm32_dma2d_s *)layer; - gvdbg("layer=%p, mode=%p\n", layer, mode); + lcdinfo("layer=%p, mode=%p\n", layer, mode); if (stm32_dma2d_lvalidate(priv) && mode) { @@ -1624,7 +1624,7 @@ static int stm32_dma2dgetblendmode(FAR struct dma2d_layer_s *layer, return OK; } - gdbg("ERROR: Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -1661,8 +1661,8 @@ static int stm32_dma2dblit(FAR struct dma2d_layer_s *dest, FAR struct stm32_dma2d_s * destlayer = (FAR struct stm32_dma2d_s *)dest; FAR struct stm32_dma2d_s * srclayer = (FAR struct stm32_dma2d_s *)src; - gvdbg("dest=%p, destxpos=%d, destypos=%d, src=%p, srcarea=%p\n", - dest, destxpos, destypos, src, srcarea); + lcdinfo("dest=%p, destxpos=%d, destypos=%d, src=%p, srcarea=%p\n", + dest, destxpos, destypos, src, srcarea); if (stm32_dma2d_lvalidatesize(destlayer, destxpos, destypos, srcarea) && stm32_dma2d_lvalidatesize(srclayer, srcarea->xpos, @@ -1718,7 +1718,7 @@ static int stm32_dma2dblit(FAR struct dma2d_layer_s *dest, if (ret != OK) { ret = -ECANCELED; - gdbg("ERROR: Returning ECANCELED\n"); + lcderr("ERROR: Returning ECANCELED\n"); } } @@ -1727,7 +1727,7 @@ static int stm32_dma2dblit(FAR struct dma2d_layer_s *dest, else { ret = -EINVAL; - gdbg("ERROR: Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); } return ret; @@ -1772,10 +1772,10 @@ static int stm32_dma2dblend(FAR struct dma2d_layer_s *dest, FAR struct stm32_dma2d_s * forelayer = (FAR struct stm32_dma2d_s *)fore; FAR struct stm32_dma2d_s * backlayer = (FAR struct stm32_dma2d_s *)back; - gvdbg("dest=%p, destxpos=%d, destypos=%d, " - "fore=%p, forexpos=%d, foreypos=%d, " - "back=%p, backarea=%p\n", - dest, destxpos, destypos, fore, forexpos, foreypos, back, backarea); + lcdinfo("dest=%p, destxpos=%d, destypos=%d, " + "fore=%p, forexpos=%d, foreypos=%d, " + "back=%p, backarea=%p\n", + dest, destxpos, destypos, fore, forexpos, foreypos, back, backarea); if (stm32_dma2d_lvalidatesize(destlayer, destxpos, destypos, backarea) && stm32_dma2d_lvalidatesize(forelayer, forexpos, foreypos, backarea) && @@ -1832,7 +1832,7 @@ static int stm32_dma2dblend(FAR struct dma2d_layer_s *dest, if (ret != OK) { ret = -ECANCELED; - gdbg("ERROR: Returning ECANCELED\n"); + lcderr("ERROR: Returning ECANCELED\n"); } } @@ -1841,7 +1841,7 @@ static int stm32_dma2dblend(FAR struct dma2d_layer_s *dest, else { ret = -EINVAL; - gdbg("ERROR: Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); } return ret; @@ -1874,7 +1874,7 @@ static int stm32_dma2dfillarea(FAR struct dma2d_layer_s *layer, int ret; FAR struct stm32_dma2d_s *priv = (FAR struct stm32_dma2d_s *)layer; - gvdbg("layer=%p, area=%p, color=%08x\n", layer, area, color); + lcdinfo("layer=%p, area=%p, color=%08x\n", layer, area, color); if (stm32_dma2d_lvalidatesize(priv, area->xpos, area->ypos, area)) { @@ -1912,7 +1912,7 @@ static int stm32_dma2dfillarea(FAR struct dma2d_layer_s *layer, if (ret != OK) { ret = -ECANCELED; - gdbg("ERROR: Returning ECANCELED\n"); + lcderr("ERROR: Returning ECANCELED\n"); } } @@ -1921,7 +1921,7 @@ static int stm32_dma2dfillarea(FAR struct dma2d_layer_s *layer, else { ret = -EINVAL; - gdbg("ERROR: Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); } return ret; @@ -1954,7 +1954,7 @@ FAR struct dma2d_layer_s * up_dma2dgetlayer(int lid) return &priv->dma2d; } - gdbg("ERROR: EINVAL, Unknown layer identifier\n"); + lcderr("ERROR: EINVAL, Unknown layer identifier\n"); errno = EINVAL; return NULL; } @@ -1989,7 +1989,7 @@ FAR struct dma2d_layer_s *up_dma2dcreatelayer(fb_coord_t width, uint8_t bpp = 0; FAR struct stm32_dma2d_s *layer = NULL; - gvdbg("width=%d, height=%d, fmt=%02x \n", width, height, fmt); + lcdinfo("width=%d, height=%d, fmt=%02x \n", width, height, fmt); /* Validate if pixel format supported */ @@ -2069,19 +2069,19 @@ FAR struct dma2d_layer_s *up_dma2dcreatelayer(fb_coord_t width, /* free the layer struture */ kmm_free(layer); - gdbg("ERROR: ENOMEM, Unable to allocate layer buffer\n"); + lcderr("ERROR: ENOMEM, Unable to allocate layer buffer\n"); errno = ENOMEM; } } else { - gdbg("ERROR: ENOMEM, unable to allocate layer structure\n"); + lcderr("ERROR: ENOMEM, unable to allocate layer structure\n"); errno = ENOMEM; } } else { - gdbg("ERROR: EINVAL, no free layer available\n"); + lcderr("ERROR: EINVAL, no free layer available\n"); errno = EINVAL; } @@ -2148,7 +2148,7 @@ int up_dma2dremovelayer(FAR struct dma2d_layer_s *layer) int up_dma2dinitialize(void) { - dbg("Initialize DMA2D driver\n"); + lcdinfo("Initialize DMA2D driver\n"); if (g_initialized == false) { @@ -2265,15 +2265,15 @@ FAR struct dma2d_layer_s * stm32_dma2dinitltdc(FAR struct stm32_ltdc_s *layer) uint8_t fmt = 0; FAR struct stm32_ltdc_dma2d_s *priv; - gvdbg("layer=%p\n", layer); + lcdinfo("layer=%p\n", layer); DEBUGASSERT(layer && layer->lid >= 0 && layer->lid < DMA2D_SHADOW_LAYER); ret = stm32_dma2d_pixelformat(layer->vinfo.fmt, &fmt); if (ret != OK) { - dbg("Returning -EINVAL, unsupported pixel format: %d\n", - layer->vinfo.fmt); + lcderr("ERROR: Returning -EINVAL, unsupported pixel format: %d\n", + layer->vinfo.fmt); errno = -EINVAL; return NULL; } diff --git a/arch/arm/src/stm32/stm32_dumpgpio.c b/arch/arm/src/stm32/stm32_dumpgpio.c index 77d49ffa084d67a2ce431536d5ca47d79883e39d..a8da3160d1950403a3bd50ba19b2539e6fad5a47 100644 --- a/arch/arm/src/stm32/stm32_dumpgpio.c +++ b/arch/arm/src/stm32/stm32_dumpgpio.c @@ -39,6 +39,11 @@ #include +/* Output debug info even if debug output is not selected. */ + +#undef CONFIG_DEBUG_INFO +#define CONFIG_DEBUG_INFO 1 + #include #include @@ -49,14 +54,13 @@ #include "stm32_gpio.h" #include "stm32_rcc.h" -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /**************************************************************************** * Private Data ****************************************************************************/ /* Port letters for prettier debug output */ -#ifdef CONFIG_DEBUG static const char g_portchar[STM32_NGPIO_PORTS] = { #if STM32_NGPIO_PORTS > 11 @@ -87,15 +91,6 @@ static const char g_portchar[STM32_NGPIO_PORTS] = # error "Bad number of GPIOs" #endif }; -#endif - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ /**************************************************************************** * Public Functions @@ -125,110 +120,106 @@ int stm32_dumpgpio(uint32_t pinset, const char *msg) flags = enter_critical_section(); #if defined(CONFIG_STM32_STM32F10XX) - - lldbg("GPIO%c pinset: %08x base: %08x -- %s\n", - g_portchar[port], pinset, base, msg); + _info("GPIO%c pinset: %08x base: %08x -- %s\n", + g_portchar[port], pinset, base, msg); if ((getreg32(STM32_RCC_APB2ENR) & RCC_APB2ENR_IOPEN(port)) != 0) { - lldbg(" CR: %08x %08x IDR: %04x ODR: %04x LCKR: %04x\n", - getreg32(base + STM32_GPIO_CRH_OFFSET), - getreg32(base + STM32_GPIO_CRL_OFFSET), - getreg32(base + STM32_GPIO_IDR_OFFSET), - getreg32(base + STM32_GPIO_ODR_OFFSET), - getreg32(base + STM32_GPIO_LCKR_OFFSET)); - lldbg(" EVCR: %02x MAPR: %08x CR: %04x %04x %04x %04x\n", - getreg32(STM32_AFIO_EVCR), getreg32(STM32_AFIO_MAPR), - getreg32(STM32_AFIO_EXTICR1), - getreg32(STM32_AFIO_EXTICR2), - getreg32(STM32_AFIO_EXTICR3), - getreg32(STM32_AFIO_EXTICR4)); + _info(" CR: %08x %08x IDR: %04x ODR: %04x LCKR: %04x\n", + getreg32(base + STM32_GPIO_CRH_OFFSET), + getreg32(base + STM32_GPIO_CRL_OFFSET), + getreg32(base + STM32_GPIO_IDR_OFFSET), + getreg32(base + STM32_GPIO_ODR_OFFSET), + getreg32(base + STM32_GPIO_LCKR_OFFSET)); + _info(" EVCR: %02x MAPR: %08x CR: %04x %04x %04x %04x\n", + getreg32(STM32_AFIO_EVCR), getreg32(STM32_AFIO_MAPR), + getreg32(STM32_AFIO_EXTICR1), + getreg32(STM32_AFIO_EXTICR2), + getreg32(STM32_AFIO_EXTICR3), + getreg32(STM32_AFIO_EXTICR4)); } else { - lldbg(" GPIO%c not enabled: APB2ENR: %08x\n", - g_portchar[port], getreg32(STM32_RCC_APB2ENR)); + _info(" GPIO%c not enabled: APB2ENR: %08x\n", + g_portchar[port], getreg32(STM32_RCC_APB2ENR)); } #elif defined(CONFIG_STM32_STM32L15XX) - DEBUGASSERT(port < STM32_NGPIO_PORTS); - lldbg("GPIO%c pinset: %08x base: %08x -- %s\n", + _info("GPIO%c pinset: %08x base: %08x -- %s\n", g_portchar[port], pinset, base, msg); if ((getreg32(STM32_RCC_AHBENR) & RCC_AHBENR_GPIOEN(port)) != 0) { - lldbg(" MODE: %08x OTYPE: %04x OSPEED: %08x PUPDR: %08x\n", - getreg32(base + STM32_GPIO_MODER_OFFSET), - getreg32(base + STM32_GPIO_OTYPER_OFFSET), - getreg32(base + STM32_GPIO_OSPEED_OFFSET), - getreg32(base + STM32_GPIO_PUPDR_OFFSET)); - lldbg(" IDR: %04x ODR: %04x BSRR: %08x LCKR: %04x\n", - getreg32(base + STM32_GPIO_IDR_OFFSET), - getreg32(base + STM32_GPIO_ODR_OFFSET), - getreg32(base + STM32_GPIO_BSRR_OFFSET), - getreg32(base + STM32_GPIO_LCKR_OFFSET)); - lldbg(" AFRH: %08x AFRL: %08x\n", - getreg32(base + STM32_GPIO_AFRH_OFFSET), - getreg32(base + STM32_GPIO_AFRL_OFFSET)); + _info(" MODE: %08x OTYPE: %04x OSPEED: %08x PUPDR: %08x\n", + getreg32(base + STM32_GPIO_MODER_OFFSET), + getreg32(base + STM32_GPIO_OTYPER_OFFSET), + getreg32(base + STM32_GPIO_OSPEED_OFFSET), + getreg32(base + STM32_GPIO_PUPDR_OFFSET)); + _info(" IDR: %04x ODR: %04x BSRR: %08x LCKR: %04x\n", + getreg32(base + STM32_GPIO_IDR_OFFSET), + getreg32(base + STM32_GPIO_ODR_OFFSET), + getreg32(base + STM32_GPIO_BSRR_OFFSET), + getreg32(base + STM32_GPIO_LCKR_OFFSET)); + _info(" AFRH: %08x AFRL: %08x\n", + getreg32(base + STM32_GPIO_AFRH_OFFSET), + getreg32(base + STM32_GPIO_AFRL_OFFSET)); } else { - lldbg(" GPIO%c not enabled: AHBENR: %08x\n", + _info(" GPIO%c not enabled: AHBENR: %08x\n", g_portchar[port], getreg32(STM32_RCC_AHBENR)); } #elif defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) - DEBUGASSERT(port < STM32_NGPIO_PORTS); - lldbg("GPIO%c pinset: %08x base: %08x -- %s\n", + _info("GPIO%c pinset: %08x base: %08x -- %s\n", g_portchar[port], pinset, base, msg); /* GPIOs are always enabled */ - lldbg(" MODE: %08x OTYPE: %04x OSPEED: %08x PUPDR: %08x\n", + _info(" MODE: %08x OTYPE: %04x OSPEED: %08x PUPDR: %08x\n", getreg32(base + STM32_GPIO_MODER_OFFSET), getreg32(base + STM32_GPIO_OTYPER_OFFSET), getreg32(base + STM32_GPIO_OSPEED_OFFSET), getreg32(base + STM32_GPIO_PUPDR_OFFSET)); - lldbg(" IDR: %04x ODR: %04x BSRR: %08x LCKR: %04x\n", + _info(" IDR: %04x ODR: %04x BSRR: %08x LCKR: %04x\n", getreg32(base + STM32_GPIO_IDR_OFFSET), getreg32(base + STM32_GPIO_ODR_OFFSET), getreg32(base + STM32_GPIO_BSRR_OFFSET), getreg32(base + STM32_GPIO_LCKR_OFFSET)); - lldbg(" AFRH: %08x AFRL: %08x BRR: %04x\n", + _info(" AFRH: %08x AFRL: %08x BRR: %04x\n", getreg32(base + STM32_GPIO_AFRH_OFFSET), getreg32(base + STM32_GPIO_AFRL_OFFSET), getreg32(base + STM32_GPIO_BRR_OFFSET)); #elif defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F40XX) - DEBUGASSERT(port < STM32_NGPIO_PORTS); - lldbg("GPIO%c pinset: %08x base: %08x -- %s\n", + _info("GPIO%c pinset: %08x base: %08x -- %s\n", g_portchar[port], pinset, base, msg); if ((getreg32(STM32_RCC_AHB1ENR) & RCC_AHB1ENR_GPIOEN(port)) != 0) { - lldbg(" MODE: %08x OTYPE: %04x OSPEED: %08x PUPDR: %08x\n", + _info(" MODE: %08x OTYPE: %04x OSPEED: %08x PUPDR: %08x\n", getreg32(base + STM32_GPIO_MODER_OFFSET), getreg32(base + STM32_GPIO_OTYPER_OFFSET), getreg32(base + STM32_GPIO_OSPEED_OFFSET), getreg32(base + STM32_GPIO_PUPDR_OFFSET)); - lldbg(" IDR: %04x ODR: %04x BSRR: %08x LCKR: %04x\n", + _info(" IDR: %04x ODR: %04x BSRR: %08x LCKR: %04x\n", getreg32(base + STM32_GPIO_IDR_OFFSET), getreg32(base + STM32_GPIO_ODR_OFFSET), getreg32(base + STM32_GPIO_BSRR_OFFSET), getreg32(base + STM32_GPIO_LCKR_OFFSET)); - lldbg(" AFRH: %08x AFRL: %08x\n", + _info(" AFRH: %08x AFRL: %08x\n", getreg32(base + STM32_GPIO_AFRH_OFFSET), getreg32(base + STM32_GPIO_AFRL_OFFSET)); } else { - lldbg(" GPIO%c not enabled: AHB1ENR: %08x\n", + _info(" GPIO%c not enabled: AHB1ENR: %08x\n", g_portchar[port], getreg32(STM32_RCC_AHB1ENR)); } #else @@ -238,4 +229,4 @@ int stm32_dumpgpio(uint32_t pinset, const char *msg) return OK; } -#endif /* CONFIG_DEBUG */ +#endif /* CONFIG_DEBUG_FEATURES */ diff --git a/arch/arm/src/stm32/stm32_eth.c b/arch/arm/src/stm32/stm32_eth.c index 7b06b9a3680d296a6e3d254d3aa2d02bcdf320e8..bced5def66102aadb0b09c1545e518e2fd27681c 100644 --- a/arch/arm/src/stm32/stm32_eth.c +++ b/arch/arm/src/stm32/stm32_eth.c @@ -240,7 +240,7 @@ * enabled. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_NET_INFO # undef CONFIG_STM32_ETHMAC_REGDEBUG #endif @@ -585,9 +585,9 @@ struct stm32_ethmac_s struct work_s work; /* For deferring work to the work queue */ #endif - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ - struct net_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by the network */ /* Used to track transmit and receive descriptors */ @@ -622,7 +622,7 @@ static struct stm32_ethmac_s g_stm32ethmac[STM32_NETHERNET]; ****************************************************************************/ /* Register operations ******************************************************/ -#if defined(CONFIG_STM32_ETHMAC_REGDEBUG) && defined(CONFIG_DEBUG) +#if defined(CONFIG_STM32_ETHMAC_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES) static uint32_t stm32_getreg(uint32_t addr); static void stm32_putreg(uint32_t val, uint32_t addr); static void stm32_checksetup(void); @@ -748,7 +748,7 @@ static int stm32_ethconfig(FAR struct stm32_ethmac_s *priv); * ****************************************************************************/ -#if defined(CONFIG_STM32_ETHMAC_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_STM32_ETHMAC_REGDEBUG static uint32_t stm32_getreg(uint32_t addr) { static uint32_t prevaddr = 0; @@ -769,7 +769,7 @@ static uint32_t stm32_getreg(uint32_t addr) { if (count == 4) { - lldbg("...\n"); + ninfo("...\n"); } return val; @@ -786,7 +786,7 @@ static uint32_t stm32_getreg(uint32_t addr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + ninfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -798,7 +798,7 @@ static uint32_t stm32_getreg(uint32_t addr) /* Show the register value read */ - lldbg("%08x->%08x\n", addr, val); + ninfo("%08x->%08x\n", addr, val); return val; } #endif @@ -820,12 +820,12 @@ static uint32_t stm32_getreg(uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_STM32_ETHMAC_REGDEBUG) && defined(CONFIG_DEBUG) +#if defined(CONFIG_STM32_ETHMAC_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES) static void stm32_putreg(uint32_t val, uint32_t addr) { /* Show the register value being written */ - lldbg("%08x<-%08x\n", addr, val); + ninfo("%08x<-%08x\n", addr, val); /* Write the value */ @@ -847,7 +847,7 @@ static void stm32_putreg(uint32_t val, uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_STM32_ETHMAC_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_STM32_ETHMAC_REGDEBUG static void stm32_checksetup(void) { } @@ -993,7 +993,7 @@ static int stm32_transmit(FAR struct stm32_ethmac_s *priv) struct eth_txdesc_s *txdesc; struct eth_txdesc_s *txfirst; - /* The internal (optimal) uIP buffer size may be configured to be larger + /* The internal (optimal) network buffer size may be configured to be larger * than the Ethernet buffer size. */ @@ -1012,8 +1012,8 @@ static int stm32_transmit(FAR struct stm32_ethmac_s *priv) txdesc = priv->txhead; txfirst = txdesc; - nllvdbg("d_len: %d d_buf: %p txhead: %p tdes0: %08x\n", - priv->dev.d_len, priv->dev.d_buf, txdesc, txdesc->tdes0); + ninfo("d_len: %d d_buf: %p txhead: %p tdes0: %08x\n", + priv->dev.d_len, priv->dev.d_buf, txdesc, txdesc->tdes0); DEBUGASSERT(txdesc && (txdesc->tdes0 & ETH_TDES0_OWN) == 0); @@ -1029,7 +1029,7 @@ static int stm32_transmit(FAR struct stm32_ethmac_s *priv) bufcount = (priv->dev.d_len + (CONFIG_STM32_ETH_BUFSIZE-1)) / CONFIG_STM32_ETH_BUFSIZE; lastsize = priv->dev.d_len - (bufcount - 1) * CONFIG_STM32_ETH_BUFSIZE; - nllvdbg("bufcount: %d lastsize: %d\n", bufcount, lastsize); + ninfo("bufcount: %d lastsize: %d\n", bufcount, lastsize); /* Set the first segment bit in the first TX descriptor */ @@ -1139,8 +1139,8 @@ static int stm32_transmit(FAR struct stm32_ethmac_s *priv) priv->inflight++; - nllvdbg("txhead: %p txtail: %p inflight: %d\n", - priv->txhead, priv->txtail, priv->inflight); + ninfo("txhead: %p txtail: %p inflight: %d\n", + priv->txhead, priv->txtail, priv->inflight); /* If all TX descriptors are in-flight, then we have to disable receive interrupts * too. This is because receive events can trigger more un-stoppable transmit @@ -1179,7 +1179,7 @@ static int stm32_transmit(FAR struct stm32_ethmac_s *priv) * Function: stm32_txpoll * * Description: - * The transmitter is available, check if uIP has any outgoing packets ready + * The transmitter is available, check if the network has any outgoing packets ready * to send. This is a callback from devif_poll(). devif_poll() may be called: * * 1. When the preceding TX packet send is complete, @@ -1321,7 +1321,7 @@ static void stm32_dopoll(FAR struct stm32_ethmac_s *priv) if ((priv->txhead->tdes0 & ETH_TDES0_OWN) == 0 && priv->txhead->tdes2 == 0) { - /* If we have the descriptor, then poll uIP for new XMIT data. + /* If we have the descriptor, then poll the network for new XMIT data. * Allocate a buffer for the poll. */ @@ -1438,7 +1438,7 @@ static void stm32_freesegment(FAR struct stm32_ethmac_s *priv, struct eth_rxdesc_s *rxdesc; int i; - nllvdbg("rxfirst: %p segments: %d\n", rxfirst, segments); + ninfo("rxfirst: %p segments: %d\n", rxfirst, segments); /* Set OWN bit in RX descriptors. This gives the buffers back to DMA */ @@ -1496,8 +1496,8 @@ static int stm32_recvframe(FAR struct stm32_ethmac_s *priv) uint8_t *buffer; int i; - nllvdbg("rxhead: %p rxcurr: %p segments: %d\n", - priv->rxhead, priv->rxcurr, priv->segments); + ninfo("rxhead: %p rxcurr: %p segments: %d\n", + priv->rxhead, priv->rxcurr, priv->segments); /* Check if there are free buffers. We cannot receive new frames in this * design unless there is at least one free buffer. @@ -1505,7 +1505,7 @@ static int stm32_recvframe(FAR struct stm32_ethmac_s *priv) if (!stm32_isfreebuffer(priv)) { - nlldbg("No free buffers\n"); + nerr("ERROR: No free buffers\n"); return -ENOMEM; } @@ -1562,7 +1562,7 @@ static int stm32_recvframe(FAR struct stm32_ethmac_s *priv) rxcurr = priv->rxcurr; } - nllvdbg("rxhead: %p rxcurr: %p segments: %d\n", + ninfo("rxhead: %p rxcurr: %p segments: %d\n", priv->rxhead, priv->rxcurr, priv->segments); /* Check if any errors are reported in the frame */ @@ -1585,7 +1585,7 @@ static int stm32_recvframe(FAR struct stm32_ethmac_s *priv) buffer = stm32_allocbuffer(priv); /* Take the buffer from the RX descriptor of the first free - * segment, put it into the uIP device structure, then replace + * segment, put it into the network device structure, then replace * the buffer in the RX descriptor with the newly allocated * buffer. */ @@ -1601,8 +1601,8 @@ static int stm32_recvframe(FAR struct stm32_ethmac_s *priv) priv->rxhead = (struct eth_rxdesc_s *)rxdesc->rdes3; stm32_freesegment(priv, rxcurr, priv->segments); - nllvdbg("rxhead: %p d_buf: %p d_len: %d\n", - priv->rxhead, dev->d_buf, dev->d_len); + ninfo("rxhead: %p d_buf: %p d_len: %d\n", + priv->rxhead, dev->d_buf, dev->d_len); return OK; } @@ -1612,7 +1612,7 @@ static int stm32_recvframe(FAR struct stm32_ethmac_s *priv) * scanning logic, and continue scanning with the next frame. */ - nlldbg("DROPPED: RX descriptor errors: %08x\n", rxdesc->rdes0); + nerr("ERROR: Dropped, RX descriptor errors: %08x\n", rxdesc->rdes0); stm32_freesegment(priv, rxcurr, priv->segments); } } @@ -1628,8 +1628,8 @@ static int stm32_recvframe(FAR struct stm32_ethmac_s *priv) priv->rxhead = rxdesc; - nllvdbg("rxhead: %p rxcurr: %p segments: %d\n", - priv->rxhead, priv->rxcurr, priv->segments); + ninfo("rxhead: %p rxcurr: %p segments: %d\n", + priv->rxhead, priv->rxcurr, priv->segments); return -EAGAIN; } @@ -1667,13 +1667,13 @@ static void stm32_receive(FAR struct stm32_ethmac_s *priv) pkt_input(&priv->dev); #endif - /* Check if the packet is a valid size for the uIP buffer configuration + /* Check if the packet is a valid size for the network buffer configuration * (this should not happen) */ if (dev->d_len > CONFIG_NET_ETH_MTU) { - nlldbg("DROPPED: Too big: %d\n", dev->d_len); + nerr("ERROR: Dropped, Too big: %d\n", dev->d_len); /* Free dropped packet buffer */ @@ -1698,7 +1698,7 @@ static void stm32_receive(FAR struct stm32_ethmac_s *priv) #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); /* Handle ARP on input then give the IPv4 packet to the network * layer @@ -1738,7 +1738,7 @@ static void stm32_receive(FAR struct stm32_ethmac_s *priv) #ifdef CONFIG_NET_IPv6 if (BUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); /* Give the IPv6 packet to the network layer */ @@ -1775,7 +1775,7 @@ static void stm32_receive(FAR struct stm32_ethmac_s *priv) #ifdef CONFIG_NET_ARP if (BUF->type == htons(ETHTYPE_ARP)) { - nllvdbg("ARP frame\n"); + ninfo("ARP frame\n"); /* Handle ARP packet */ @@ -1793,7 +1793,7 @@ static void stm32_receive(FAR struct stm32_ethmac_s *priv) else #endif { - nlldbg("DROPPED: Unknown type: %04x\n", BUF->type); + nerr("ERROR: Dropped, Unknown type: %04x\n", BUF->type); } /* We are finished with the RX buffer. NOTE: If the buffer is @@ -1834,8 +1834,8 @@ static void stm32_freeframe(FAR struct stm32_ethmac_s *priv) struct eth_txdesc_s *txdesc; int i; - nllvdbg("txhead: %p txtail: %p inflight: %d\n", - priv->txhead, priv->txtail, priv->inflight); + ninfo("txhead: %p txtail: %p inflight: %d\n", + priv->txhead, priv->txtail, priv->inflight); /* Scan for "in-flight" descriptors owned by the CPU */ @@ -1850,8 +1850,8 @@ static void stm32_freeframe(FAR struct stm32_ethmac_s *priv) * TX descriptors. */ - nllvdbg("txtail: %p tdes0: %08x tdes2: %08x tdes3: %08x\n", - txdesc, txdesc->tdes0, txdesc->tdes2, txdesc->tdes3); + ninfo("txtail: %p tdes0: %08x tdes2: %08x tdes3: %08x\n", + txdesc, txdesc->tdes0, txdesc->tdes2, txdesc->tdes3); DEBUGASSERT(txdesc->tdes2 != 0); @@ -1903,8 +1903,8 @@ static void stm32_freeframe(FAR struct stm32_ethmac_s *priv) priv->txtail = txdesc; - nllvdbg("txhead: %p txtail: %p inflight: %d\n", - priv->txhead, priv->txtail, priv->inflight); + ninfo("txhead: %p txtail: %p inflight: %d\n", + priv->txhead, priv->txtail, priv->inflight); } } @@ -1955,7 +1955,7 @@ static void stm32_txdone(FAR struct stm32_ethmac_s *priv) stm32_disableint(priv, ETH_DMAINT_TI); } - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ stm32_dopoll(priv); } @@ -2042,7 +2042,7 @@ static inline void stm32_interrupt_process(FAR struct stm32_ethmac_s *priv) { /* Just let the user know what happened */ - nlldbg("Abormal event(s): %08x\n", dmasr); + nerr("ERROR: Abormal event(s): %08x\n", dmasr); /* Clear all pending abnormal events */ @@ -2246,7 +2246,7 @@ static void stm32_txtimeout_expiry(int argc, uint32_t arg, ...) { FAR struct stm32_ethmac_s *priv = (FAR struct stm32_ethmac_s *)arg; - nlldbg("Timeout!\n"); + nerr("ERROR: Timeout!\n"); #ifdef CONFIG_NET_NOINTS /* Disable further Ethernet interrupts. This will prevent some race @@ -2321,7 +2321,7 @@ static inline void stm32_poll_process(FAR struct stm32_ethmac_s *priv) if (dev->d_buf) { - /* Update TCP timing states and poll uIP for new XMIT data. + /* Update TCP timing states and poll the network for new XMIT data. */ (void)devif_timer(dev, stm32_txpoll); @@ -2447,15 +2447,15 @@ static int stm32_ifup(struct net_driver_s *dev) int ret; #ifdef CONFIG_NET_IPv4 - ndbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); #endif #ifdef CONFIG_NET_IPv6 - ndbg("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", - dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2], - dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5], - dev->d_ipv6addr[6], dev->d_ipv6addr[7]); + ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", + dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2], + dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5], + dev->d_ipv6addr[6], dev->d_ipv6addr[7]); #endif /* Configure the Ethernet interface for DMA operation. */ @@ -2500,7 +2500,7 @@ static int stm32_ifdown(struct net_driver_s *dev) FAR struct stm32_ethmac_s *priv = (FAR struct stm32_ethmac_s *)dev->d_private; irqstate_t flags; - ndbg("Taking the network down\n"); + ninfo("Taking the network down\n"); /* Disable the Ethernet interrupt */ @@ -2545,13 +2545,13 @@ static int stm32_ifdown(struct net_driver_s *dev) static inline void stm32_txavail_process(FAR struct stm32_ethmac_s *priv) { - nvdbg("ifup: %d\n", priv->ifup); + ninfo("ifup: %d\n", priv->ifup); /* Ignore the notification if the interface is not yet up */ if (priv->ifup) { - /* Poll uIP for new XMIT data */ + /* Poll the network for new XMIT data */ stm32_dopoll(priv); } @@ -2712,8 +2712,8 @@ static int stm32_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) uint32_t temp; uint32_t registeraddress; - nllvdbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); /* Add the MAC address to the hardware multicast hash table */ @@ -2769,8 +2769,8 @@ static int stm32_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) uint32_t temp; uint32_t registeraddress; - nllvdbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); /* Remove the MAC address to the hardware multicast hash table */ @@ -3129,7 +3129,7 @@ static int stm32_phyread(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t *val } } - ndbg("MII transfer timed out: phydevaddr: %04x phyregaddr: %04x\n", + nerr("ERROR: MII transfer timed out: phydevaddr: %04x phyregaddr: %04x\n", phydevaddr, phyregaddr); return -ETIMEDOUT; @@ -3188,7 +3188,7 @@ static int stm32_phywrite(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t val } } - ndbg("MII transfer timed out: phydevaddr: %04x phyregaddr: %04x value: %04x\n", + nerr("ERROR: MII transfer timed out: phydevaddr: %04x phyregaddr: %04x value: %04x\n", phydevaddr, phyregaddr, value); return -ETIMEDOUT; @@ -3225,7 +3225,7 @@ static inline int stm32_dm9161(FAR struct stm32_ethmac_s *priv) ret = stm32_phyread(CONFIG_STM32_PHYADDR, MII_PHYID1, &phyval); if (ret < 0) { - ndbg("Failed to read the PHY ID1: %d\n", ret); + nerr("ERROR: Failed to read the PHY ID1: %d\n", ret); return ret; } @@ -3236,14 +3236,14 @@ static inline int stm32_dm9161(FAR struct stm32_ethmac_s *priv) up_systemreset(); } - nvdbg("PHY ID1: 0x%04X\n", phyval); + ninfo("PHY ID1: 0x%04X\n", phyval); /* Now check the "DAVICOM Specified Configuration Register (DSCR)", Register 16 */ ret = stm32_phyread(CONFIG_STM32_PHYADDR, 16, &phyval); if (ret < 0) { - ndbg("Failed to read the PHY Register 0x10: %d\n", ret); + nerr("ERROR: Failed to read the PHY Register 0x10: %d\n", ret); return ret; } @@ -3300,7 +3300,7 @@ static int stm32_phyinit(FAR struct stm32_ethmac_s *priv) ret = stm32_phywrite(CONFIG_STM32_PHYADDR, MII_MCR, MII_MCR_RESET); if (ret < 0) { - ndbg("Failed to reset the PHY: %d\n", ret); + nerr("ERROR: Failed to reset the PHY: %d\n", ret); return ret; } up_mdelay(PHY_RESET_DELAY); @@ -3311,7 +3311,7 @@ static int stm32_phyinit(FAR struct stm32_ethmac_s *priv) ret = stm32_phy_boardinitialize(0); if (ret < 0) { - ndbg("Failed to initialize the PHY: %d\n", ret); + nerr("ERROR: Failed to initialize the PHY: %d\n", ret); return ret; } #endif @@ -3336,7 +3336,7 @@ static int stm32_phyinit(FAR struct stm32_ethmac_s *priv) ret = stm32_phyread(CONFIG_STM32_PHYADDR, MII_MSR, &phyval); if (ret < 0) { - ndbg("Failed to read the PHY MSR: %d\n", ret); + nerr("ERROR: Failed to read the PHY MSR: %d\n", ret); return ret; } else if ((phyval & MII_MSR_LINKSTATUS) != 0) @@ -3347,7 +3347,7 @@ static int stm32_phyinit(FAR struct stm32_ethmac_s *priv) if (timeout >= PHY_RETRY_TIMEOUT) { - ndbg("Timed out waiting for link status: %04x\n", phyval); + nerr("ERROR: Timed out waiting for link status: %04x\n", phyval); return -ETIMEDOUT; } @@ -3356,7 +3356,7 @@ static int stm32_phyinit(FAR struct stm32_ethmac_s *priv) ret = stm32_phywrite(CONFIG_STM32_PHYADDR, MII_MCR, MII_MCR_ANENABLE); if (ret < 0) { - ndbg("Failed to enable auto-negotiation: %d\n", ret); + nerr("ERROR: Failed to enable auto-negotiation: %d\n", ret); return ret; } @@ -3367,7 +3367,7 @@ static int stm32_phyinit(FAR struct stm32_ethmac_s *priv) ret = stm32_phyread(CONFIG_STM32_PHYADDR, MII_MSR, &phyval); if (ret < 0) { - ndbg("Failed to read the PHY MSR: %d\n", ret); + nerr("ERROR: Failed to read the PHY MSR: %d\n", ret); return ret; } else if ((phyval & MII_MSR_ANEGCOMPLETE) != 0) @@ -3378,7 +3378,7 @@ static int stm32_phyinit(FAR struct stm32_ethmac_s *priv) if (timeout >= PHY_RETRY_TIMEOUT) { - ndbg("Timed out waiting for auto-negotiation\n"); + nerr("ERROR: Timed out waiting for auto-negotiation\n"); return -ETIMEDOUT; } @@ -3387,13 +3387,13 @@ static int stm32_phyinit(FAR struct stm32_ethmac_s *priv) ret = stm32_phyread(CONFIG_STM32_PHYADDR, CONFIG_STM32_PHYSR, &phyval); if (ret < 0) { - ndbg("Failed to read PHY status register\n"); + nerr("ERROR: Failed to read PHY status register\n"); return ret; } /* Remember the selected speed and duplex modes */ - nvdbg("PHYSR[%d]: %04x\n", CONFIG_STM32_PHYSR, phyval); + ninfo("PHYSR[%d]: %04x\n", CONFIG_STM32_PHYSR, phyval); /* Different PHYs present speed and mode information in different ways. IF * This CONFIG_STM32_PHYSR_ALTCONFIG is selected, this indicates that the PHY @@ -3457,7 +3457,7 @@ static int stm32_phyinit(FAR struct stm32_ethmac_s *priv) ret = stm32_phywrite(CONFIG_STM32_PHYADDR, MII_MCR, phyval); if (ret < 0) { - ndbg("Failed to write the PHY MCR: %d\n", ret); + nerr("ERROR: Failed to write the PHY MCR: %d\n", ret); return ret; } up_mdelay(PHY_CONFIG_DELAY); @@ -3472,9 +3472,9 @@ static int stm32_phyinit(FAR struct stm32_ethmac_s *priv) #endif #endif - ndbg("Duplex: %s Speed: %d MBps\n", - priv->fduplex ? "FULL" : "HALF", - priv->mbps100 ? 100 : 10); + ninfo("Duplex: %s Speed: %d MBps\n", + priv->fduplex ? "FULL" : "HALF", + priv->mbps100 ? 100 : 10); return OK; } @@ -3853,11 +3853,11 @@ static void stm32_macaddress(FAR struct stm32_ethmac_s *priv) FAR struct net_driver_s *dev = &priv->dev; uint32_t regval; - nllvdbg("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - dev->d_ifname, - dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], - dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], - dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5]); + ninfo("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + dev->d_ifname, + dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], + dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], + dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5]); /* Set the MAC address high register */ @@ -3921,7 +3921,7 @@ static void stm32_ipv6multicast(FAR struct stm32_ethmac_s *priv) mac[4] = tmp16 & 0xff; mac[5] = tmp16 >> 8; - nvdbg("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", + ninfo("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); (void)stm32_addmac(dev, mac); @@ -4059,12 +4059,12 @@ static int stm32_ethconfig(FAR struct stm32_ethmac_s *priv) /* Reset the Ethernet block */ - nllvdbg("Reset the Ethernet block\n"); + ninfo("Reset the Ethernet block\n"); stm32_ethreset(priv); /* Initialize the PHY */ - nllvdbg("Initialize the PHY\n"); + ninfo("Initialize the PHY\n"); ret = stm32_phyinit(priv); if (ret < 0) { @@ -4073,7 +4073,7 @@ static int stm32_ethconfig(FAR struct stm32_ethmac_s *priv) /* Initialize the MAC and DMA */ - nllvdbg("Initialize the MAC and DMA\n"); + ninfo("Initialize the MAC and DMA\n"); ret = stm32_macconfig(priv); if (ret < 0) { @@ -4094,7 +4094,7 @@ static int stm32_ethconfig(FAR struct stm32_ethmac_s *priv) /* Enable normal MAC operation */ - nllvdbg("Enable normal operation\n"); + ninfo("Enable normal operation\n"); return stm32_macenable(priv); } @@ -4130,7 +4130,7 @@ int stm32_ethinitialize(int intf) { struct stm32_ethmac_s *priv; - nvdbg("intf: %d\n", intf); + ninfo("intf: %d\n", intf); /* Get the interface structure associated with this interface number. */ diff --git a/arch/arm/src/stm32/stm32_getc.c b/arch/arm/src/stm32/stm32_getc.c new file mode 100644 index 0000000000000000000000000000000000000000..de9020bab40cab8fd0a06dcaba3011ed72d7c847 --- /dev/null +++ b/arch/arm/src/stm32/stm32_getc.c @@ -0,0 +1,121 @@ +/**************************************************************************** + * arch/arm/src/stm32/stm32_getc.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 "up_internal.h" +#include "up_arch.h" + +#include "chip.h" + +#include "stm32.h" +#include "stm32_rcc.h" +#include "stm32_gpio.h" +#include "stm32_uart.h" + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Select U[S]ART console base address */ + +#ifdef HAVE_CONSOLE +# if defined(CONFIG_USART1_SERIAL_CONSOLE) +# define STM32_CONSOLE_BASE STM32_USART1_BASE +# elif defined(CONFIG_USART2_SERIAL_CONSOLE) +# define STM32_CONSOLE_BASE STM32_USART2_BASE +# elif defined(CONFIG_USART3_SERIAL_CONSOLE) +# define STM32_CONSOLE_BASE STM32_USART3_BASE +# elif defined(CONFIG_UART4_SERIAL_CONSOLE) +# define STM32_CONSOLE_BASE STM32_UART4_BASE +# elif defined(CONFIG_UART5_SERIAL_CONSOLE) +# define STM32_CONSOLE_BASE STM32_UART5_BASE +# elif defined(CONFIG_USART6_SERIAL_CONSOLE) +# define STM32_CONSOLE_BASE STM32_USART6_BASE +# elif defined(CONFIG_UART7_SERIAL_CONSOLE) +# define STM32_CONSOLE_BASE STM32_UART7_BASE +# elif defined(CONFIG_UART8_SERIAL_CONSOLE) +# define STM32_CONSOLE_BASE STM32_UART8_BASE +# endif +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: up_getc + * + * Description: + * Read one byte from the serial console + * + * REVIST: If used with the serial driver enabled, then this could + * interfere with the serial driver operations. Serial interrupts should + * be disabled when this function executes in that case. + * + ****************************************************************************/ + +int up_getc(void) +{ + uint32_t ch = 0; + +#ifdef HAVE_CONSOLE + /* While there is any error, read and discard bytes to clear the errors */ + + while ((getreg32(STM32_CONSOLE_BASE + STM32_USART_SR_OFFSET) & + (USART_SR_ORE | USART_SR_NE | USART_SR_FE | USART_SR_PE)) != 0) + { + (void)getreg32(STM32_CONSOLE_BASE + STM32_USART_RDR_OFFSET); + } + + /* Wait until the RX data register has a character to be read */ + + while ((getreg32(STM32_CONSOLE_BASE + STM32_USART_SR_OFFSET) & USART_SR_RXNE) == 0); + + /* Then read the character */ + + ch = getreg32(STM32_CONSOLE_BASE + STM32_USART_RDR_OFFSET); +#endif /* HAVE_CONSOLE */ + + return (int)ch; +} diff --git a/arch/arm/src/stm32/stm32_getc.h b/arch/arm/src/stm32/stm32_getc.h new file mode 100644 index 0000000000000000000000000000000000000000..651165fba5ed562dcb856275ff70482068bb5750 --- /dev/null +++ b/arch/arm/src/stm32/stm32_getc.h @@ -0,0 +1,47 @@ +/************************************************************************************ + * arch/arm/src/stm32/stm32_getc.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_STM32_STM32_GETC_H +#define __ARCH_ARM_SRC_STM32_STM32_GETC_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "chip.h" + +#endif /* __ARCH_ARM_SRC_STM32_STM32_GETC_H */ diff --git a/arch/arm/src/stm32/stm32_gpio.c b/arch/arm/src/stm32/stm32_gpio.c index 6426107b3b490130526aa6cc525e9ece4114a2d8..63d09e982e48ddafb33674c357827e3238fa39fb 100644 --- a/arch/arm/src/stm32/stm32_gpio.c +++ b/arch/arm/src/stm32/stm32_gpio.c @@ -469,6 +469,7 @@ int stm32_configgpio(uint32_t cfgset) break; case GPIO_OUTPUT: /* General purpose output mode */ + stm32_gpiowrite(cfgset, (cfgset & GPIO_OUTPUT_SET) != 0); /* Set the initial output value */ pinmode = GPIO_MODER_OUTPUT; break; @@ -619,17 +620,9 @@ int stm32_configgpio(uint32_t cfgset) putreg32(regval, base + STM32_GPIO_OTYPER_OFFSET); - /* If it is an output... set the pin to the correct initial state. */ - - if (pinmode == GPIO_MODER_OUTPUT) - { - bool value = ((cfgset & GPIO_OUTPUT_SET) != 0); - stm32_gpiowrite(cfgset, value); - } - /* Otherwise, it is an input pin. Should it configured as an EXTI interrupt? */ - else if ((cfgset & GPIO_EXTI) != 0) + if (pinmode != GPIO_MODER_OUTPUT && (cfgset & GPIO_EXTI) != 0) { /* "In STM32 F1 the selection of the EXTI line source is performed through * the EXTIx bits in the AFIO_EXTICRx registers, while in F2 series this diff --git a/arch/arm/src/stm32/stm32_gpio.h b/arch/arm/src/stm32/stm32_gpio.h index c1790eaaaa3f8693950edbbb1a1cc68a89bb273a..34b49bf0d6da1d2dc9e2f5b31f167de6ca18114d 100644 --- a/arch/arm/src/stm32/stm32_gpio.h +++ b/arch/arm/src/stm32/stm32_gpio.h @@ -510,7 +510,7 @@ xcpt_t stm32_gpiosetevent(uint32_t pinset, bool risingedge, bool fallingedge, * ************************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES int stm32_dumpgpio(uint32_t pinset, const char *msg); #else # define stm32_dumpgpio(p,m) diff --git a/arch/arm/src/stm32/stm32_i2c.c b/arch/arm/src/stm32/stm32_i2c.c index 6d06098b018b18db0785a0004d8677ac3ce499ee..9f41597f04d4340806ff5341af9869b8a0c27f9c 100644 --- a/arch/arm/src/stm32/stm32_i2c.c +++ b/arch/arm/src/stm32/stm32_i2c.c @@ -162,15 +162,6 @@ #define MKI2C_OUTPUT(p) (((p) & (GPIO_PORT_MASK | GPIO_PIN_MASK)) | I2C_OUTPUT) /* Debug ****************************************************************************/ -/* CONFIG_DEBUG_I2C + CONFIG_DEBUG enables general I2C debug output. */ - -#ifdef CONFIG_DEBUG_I2C -# define i2cdbg dbg -# define i2cvdbg vdbg -#else -# define i2cdbg(x...) -# define i2cvdbg(x...) -#endif /* I2C event trace logic. NOTE: trace uses the internal, non-standard, low-level * debug interface syslog() but does not require that any other debug @@ -693,7 +684,7 @@ static inline int stm32_i2c_sem_waitdone(FAR struct stm32_i2c_priv_s *priv) while (priv->intstate != INTSTATE_DONE && elapsed < timeout); - i2cvdbg("intstate: %d elapsed: %ld threshold: %ld status: %08x\n", + i2cinfo("intstate: %d elapsed: %ld threshold: %ld status: %08x\n", priv->intstate, (long)elapsed, (long)timeout, priv->status); /* Set the interrupt state back to IDLE */ @@ -766,7 +757,7 @@ static inline void stm32_i2c_sem_waitstop(FAR struct stm32_i2c_priv_s *priv) * still pending. */ - i2cvdbg("Timeout with CR1: %04x SR1: %04x\n", cr1, sr1); + i2cinfo("Timeout with CR1: %04x SR1: %04x\n", cr1, sr1); } /************************************************************************************ @@ -859,7 +850,7 @@ static void stm32_i2c_tracenew(FAR struct stm32_i2c_priv_s *priv, uint32_t statu if (priv->tndx >= (CONFIG_I2C_NTRACE-1)) { - i2cdbg("Trace table overflow\n"); + i2cerr("ERROR: Trace table overflow\n"); return; } @@ -900,7 +891,7 @@ static void stm32_i2c_traceevent(FAR struct stm32_i2c_priv_s *priv, if (priv->tndx >= (CONFIG_I2C_NTRACE-1)) { - i2cdbg("Trace table overflow\n"); + i2cerr("ERROR: Trace table overflow\n"); return; } @@ -1695,7 +1686,7 @@ static int stm32_i2c_transfer(FAR struct i2c_master_s *dev, FAR struct i2c_msg_s status = stm32_i2c_getstatus(priv); ret = -ETIMEDOUT; - i2cdbg("Timed out: CR1: 0x%04x status: 0x%08x\n", + i2cerr("ERROR: Timed out: CR1: 0x%04x status: 0x%08x\n", stm32_i2c_getreg(priv, STM32_I2C_CR1_OFFSET), status); /* "Note: When the STOP, START or PEC bit is set, the software must diff --git a/arch/arm/src/stm32/stm32_i2c_alt.c b/arch/arm/src/stm32/stm32_i2c_alt.c index da50a9c263508f6aa96817462596fe2e88ba2c7b..ac2ea5f6071174095d67621a837a235850e3993a 100644 --- a/arch/arm/src/stm32/stm32_i2c_alt.c +++ b/arch/arm/src/stm32/stm32_i2c_alt.c @@ -169,15 +169,6 @@ #define MKI2C_OUTPUT(p) (((p) & (GPIO_PORT_MASK | GPIO_PIN_MASK)) | I2C_OUTPUT) /* Debug ****************************************************************************/ -/* CONFIG_DEBUG_I2C + CONFIG_DEBUG enables general I2C debug output. */ - -#ifdef CONFIG_DEBUG_I2C -# define i2cdbg dbg -# define i2cvdbg vdbg -#else -# define i2cdbg(x...) -# define i2cvdbg(x...) -#endif /* I2C event trace logic. NOTE: trace uses the internal, non-standard, low-level * debug interface syslog() but does not require that any other debug @@ -701,7 +692,7 @@ static int stm32_i2c_sem_waitdone(FAR struct stm32_i2c_priv_s *priv) while (priv->intstate != INTSTATE_DONE && elapsed < timeout); - i2cvdbg("intstate: %d elapsed: %ld threshold: %ld status: %08x\n", + i2cinfo("intstate: %d elapsed: %ld threshold: %ld status: %08x\n", priv->intstate, (long)elapsed, (long)timeout, priv->status); /* Set the interrupt state back to IDLE */ @@ -774,7 +765,7 @@ static inline void stm32_i2c_sem_waitstop(FAR struct stm32_i2c_priv_s *priv) * still pending. */ - i2cvdbg("Timeout with CR1: %04x SR1: %04x\n", cr1, sr1); + i2cinfo("Timeout with CR1: %04x SR1: %04x\n", cr1, sr1); } /************************************************************************************ @@ -867,7 +858,7 @@ static void stm32_i2c_tracenew(FAR struct stm32_i2c_priv_s *priv, uint16_t statu if (priv->tndx >= (CONFIG_I2C_NTRACE-1)) { - i2cdbg("Trace table overflow\n"); + i2cerr("ERROR: Trace table overflow\n"); return; } @@ -908,7 +899,7 @@ static void stm32_i2c_traceevent(FAR struct stm32_i2c_priv_s *priv, if (priv->tndx >= (CONFIG_I2C_NTRACE-1)) { - i2cdbg("Trace table overflow\n"); + i2cerr("ERROR: Trace table overflow\n"); return; } @@ -1208,7 +1199,7 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) { uint32_t status; - i2cvdbg("I2C ISR called\n"); + i2cinfo("I2C ISR called\n"); /* Get state of the I2C controller (register SR1 only) * @@ -1252,7 +1243,7 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) if (priv->dcnt == -1 && priv->msgc > 0) { - i2cvdbg("Switch to new message\n"); + i2cinfo("Switch to new message\n"); /* Get current message to process data and copy to private structure */ @@ -1261,7 +1252,7 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) priv->total_msg_len = priv->msgv->length; /* Set total msg length */ priv->flags = priv->msgv->flags; /* Copy flags to private struct */ - i2cvdbg("Current flags %i\n", priv->flags); + i2cinfo("Current flags %i\n", priv->flags); /* Decrease counter to indicate the number of messages left to process */ @@ -1314,7 +1305,7 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) { /* Start bit is set */ - i2cvdbg("Entering address handling, status = %i\n", status); + i2cinfo("Entering address handling, status = %i\n", status); /* Check for empty message (for robustness) */ @@ -1326,7 +1317,7 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) if (priv->total_msg_len == 1 && (priv->flags & I2C_M_READ)) { - i2cvdbg("short read N=1: setting NACK\n"); + i2cinfo("short read N=1: setting NACK\n"); /* Set POS bit to zero (can be up from a previous 2 byte receive) */ @@ -1339,7 +1330,7 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) } else if (priv->total_msg_len == 2 && (priv->flags & I2C_M_READ)) { - i2cvdbg("short read N=2: setting POS and ACK bits\n"); + i2cinfo("short read N=2: setting POS and ACK bits\n"); stm32_i2c_modifyreg(priv, STM32_I2C_CR1_OFFSET, 0, I2C_CR1_POS); stm32_i2c_modifyreg(priv, STM32_I2C_CR1_OFFSET, 0, I2C_CR1_ACK); @@ -1349,7 +1340,7 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) { /* Enable ACK after address byte */ - i2cvdbg("setting ACK\n"); + i2cinfo("setting ACK\n"); /* Set POS bit to zero (can be up from a previous 2 byte receive) */ @@ -1369,7 +1360,7 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) (priv->flags & I2C_M_TEN) ? 0 :((priv->msgv->addr << 1) | (priv->flags & I2C_M_READ))); - i2cvdbg("Address sent. Addr=%#02x Write/Read bit=%i\n", + i2cinfo("Address sent. Addr=%#02x Write/Read bit=%i\n", priv->msgv->addr, (priv->flags & I2C_M_READ)); /* Flag that address has just been sent */ @@ -1382,7 +1373,7 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) { /* TODO: untested!! */ - i2cdbg(" An empty message has been detected, ignoring and passing to next message.\n"); + i2cwarn("WARNING: An empty message has been detected, ignoring and passing to next message.\n"); /* Trace event */ @@ -1428,15 +1419,15 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) else if ((status & I2C_SR1_ADDR) == 0 && priv->check_addr_ACK) { - i2cvdbg("Invalid Address. Setting stop bit and clearing message\n"); - i2cvdbg("status %i\n", status); + i2cinfo("Invalid Address. Setting stop bit and clearing message\n"); + i2cinfo("status %i\n", status); /* Set condition to terminate msg chain transmission as address is invalid. */ priv->dcnt = -1; priv->msgc = 0; - i2cvdbg("dcnt %i , msgc %i\n", priv->dcnt, priv->msgc); + i2cinfo("dcnt %i , msgc %i\n", priv->dcnt, priv->msgc); /* Reset flag to check for valid address */ @@ -1482,8 +1473,8 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) stm32_i2c_modifyreg(priv, STM32_I2C_CR2_OFFSET, 0, I2C_CR2_ITBUFEN); stm32_i2c_sendstop(priv); - i2cvdbg("Address ACKed beginning data reception\n"); - i2cvdbg("short read N=1: programming stop bit\n"); + i2cinfo("Address ACKed beginning data reception\n"); + i2cinfo("short read N=1: programming stop bit\n"); priv->dcnt--; /* Trace */ @@ -1498,8 +1489,8 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) stm32_i2c_modifyreg(priv, STM32_I2C_CR1_OFFSET, I2C_CR1_ACK, 0); - i2cvdbg("Address ACKed beginning data reception\n"); - i2cvdbg("short read N=2: programming NACK\n"); + i2cinfo("Address ACKed beginning data reception\n"); + i2cinfo("short read N=2: programming NACK\n"); /* Trace */ @@ -1507,7 +1498,7 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) } else { - i2cvdbg("Address ACKed beginning data reception\n"); + i2cinfo("Address ACKed beginning data reception\n"); /* Trace */ @@ -1530,7 +1521,7 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) * transmit the next byte. */ - i2cvdbg("Entering write mode dcnt = %i msgc = %i\n", + i2cinfo("Entering write mode dcnt = %i msgc = %i\n", priv->dcnt, priv->msgc); /* Clear ADDR flag by reading SR2 and adding it to status */ @@ -1567,12 +1558,12 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) /* If last message send stop bit */ stm32_i2c_sendstop(priv); - i2cvdbg("Stop sent dcnt = %i msgc = %i\n", priv->dcnt, priv->msgc); + i2cinfo("Stop sent dcnt = %i msgc = %i\n", priv->dcnt, priv->msgc); /* Decrease counter to get to next message */ priv->dcnt--; - i2cvdbg("dcnt %i\n", priv->dcnt); + i2cinfo("dcnt %i\n", priv->dcnt); stm32_i2c_traceevent(priv, I2CEVENT_WRITE_STOP, priv->dcnt); } @@ -1586,13 +1577,13 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) { stm32_i2c_sendstart(priv); - i2cvdbg("Restart detected!\n"); - i2cvdbg("Nextflag %i\n", priv->msgv[0].flags); + i2cinfo("Restart detected!\n"); + i2cinfo("Nextflag %i\n", priv->msgv[0].flags); /* Decrease counter to get to next message */ priv->dcnt--; - i2cvdbg("dcnt %i\n", priv->dcnt); + i2cinfo("dcnt %i\n", priv->dcnt); stm32_i2c_traceevent(priv, I2CEVENT_WRITE_RESTART, priv->dcnt); } @@ -1609,14 +1600,14 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) } else { - i2cdbg("Write mode: next message has an unrecognized flag.\n"); + i2cerr("ERROR: Write mode: next message has an unrecognized flag.\n"); stm32_i2c_traceevent(priv, I2CEVENT_WRITE_FLAG_ERROR, priv->msgv->flags); } } else { - i2cdbg("Write mode error.\n"); + i2cerr("ERROR: Write mode error.\n"); stm32_i2c_traceevent(priv, I2CEVENT_WRITE_ERROR, 0); } } @@ -1654,7 +1645,7 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) * (RXNE is set) then the driver can read from the data register. */ - i2cvdbg("Entering read mode dcnt = %i msgc = %i, status %i\n", + i2cinfo("Entering read mode dcnt = %i msgc = %i, status %i\n", priv->dcnt, priv->msgc, status); /* Implementation of method 2 for receiving data following @@ -1665,7 +1656,7 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) if (priv->dcnt == 0 && priv->total_msg_len == 1) { - i2cvdbg("short read N=1: Read data from data register(DR)\n"); + i2cinfo("short read N=1: Read data from data register(DR)\n"); *priv->ptr++ = stm32_i2c_getreg(priv, STM32_I2C_DR_OFFSET); priv->dcnt--; @@ -1676,12 +1667,12 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) else if (priv->dcnt == 2 && priv->total_msg_len == 2 && !(status & I2C_SR1_BTF)) { - i2cvdbg("short read N=2: DR full, SR empty. Waiting for more bytes.\n"); + i2cinfo("short read N=2: DR full, SR empty. Waiting for more bytes.\n"); stm32_i2c_traceevent(priv, I2CEVENT_READ_SR_EMPTY, 0); } else if (priv->dcnt == 2 && priv->total_msg_len == 2 && (status & I2C_SR1_BTF)) { - i2cvdbg("short read N=2: DR and SR full setting stop bit and reading twice\n"); + i2cinfo("short read N=2: DR and SR full setting stop bit and reading twice\n"); stm32_i2c_sendstop(priv); *priv->ptr++ = stm32_i2c_getreg(priv, STM32_I2C_DR_OFFSET); @@ -1708,7 +1699,7 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) * this should be able to handle it). */ - i2cvdbg("DR full, SR empty. Waiting for more bytes.\n"); + i2cinfo("DR full, SR empty. Waiting for more bytes.\n"); stm32_i2c_traceevent(priv, I2CEVENT_READ_SR_EMPTY, 0); } else if (priv->dcnt >= 4 && priv->total_msg_len >= 3 && (status & I2C_SR1_BTF)) @@ -1717,7 +1708,7 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) * RXNE(receive buffer not empty) flag. */ - i2cvdbg("Read data from data register(DR)\n"); + i2cinfo("Read data from data register(DR)\n"); *priv->ptr++ = stm32_i2c_getreg(priv, STM32_I2C_DR_OFFSET); /* Decrease current message length */ @@ -1732,8 +1723,8 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) * This coincides with EV7_2 in the reference manual. */ - i2cvdbg("Program NACK\n"); - i2cvdbg("Read data from data register(DR) dcnt=3\n"); + i2cinfo("Program NACK\n"); + i2cinfo("Read data from data register(DR) dcnt=3\n"); stm32_i2c_traceevent(priv, I2CEVENT_READ_3, priv->dcnt); @@ -1753,10 +1744,10 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) } else if (priv->dcnt == 2 && (status & I2C_SR1_BTF) && priv->total_msg_len >= 3) { - i2cvdbg("Program stop\n"); - i2cvdbg("Read data from data register(DR) dcnt=2\n"); - i2cvdbg("Read data from data register(SR) dcnt=1\n"); - i2cvdbg("Setting condition to stop ISR dcnt = -1\n"); + i2cinfo("Program stop\n"); + i2cinfo("Read data from data register(DR) dcnt=2\n"); + i2cinfo("Read data from data register(SR) dcnt=1\n"); + i2cinfo("Setting condition to stop ISR dcnt = -1\n"); stm32_i2c_traceevent(priv, I2CEVENT_READ_3, priv->dcnt); @@ -1783,8 +1774,8 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) else { - i2cdbg("I2C read mode no correct state detected\n"); - i2cdbg(" state %i, dcnt=%i\n", status, priv->dcnt); + i2cerr("ERROR: I2C read mode no correct state detected\n"); + i2cerr(" state %i, dcnt=%i\n", status, priv->dcnt); /* set condition to terminate ISR and wake waiting thread */ @@ -1809,7 +1800,7 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) /* Read rest of the state */ status |= (stm32_i2c_getreg(priv, STM32_I2C_SR2_OFFSET) << 16); - i2cdbg("Empty call to ISR: Stopping ISR\n"); + i2cwarn("WARNING: Empty call to ISR: Stopping ISR\n"); stm32_i2c_traceevent(priv, I2CEVENT_ISR_EMPTY_CALL, 0); } @@ -1833,8 +1824,8 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) status |= (stm32_i2c_getreg(priv, STM32_I2C_SR2_OFFSET) << 16); - i2cdbg(" No correct state detected(start bit, read or write) \n"); - i2cdbg(" state %i\n", status); + i2cerr("ERROR: No correct state detected(start bit, read or write) \n"); + i2cerr(" state %i\n", status); /* set condition to terminate ISR and wake waiting thread */ @@ -1853,7 +1844,7 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) if (priv->dcnt == -1 && priv->msgc == 0) { - i2cvdbg("Shutting down I2C ISR\n"); + i2cinfo("Shutting down I2C ISR\n"); stm32_i2c_traceevent(priv, I2CEVENT_ISR_SHUTDOWN, 0); @@ -2126,7 +2117,7 @@ static int stm32_i2c_transfer(FAR struct i2c_master_s *dev, FAR struct i2c_msg_s status = stm32_i2c_getstatus(priv); ret = -ETIMEDOUT; - i2cdbg("Timed out: CR1: 0x%04x status: 0x%08x\n", + i2cerr("ERROR: Timed out: CR1: 0x%04x status: 0x%08x\n", stm32_i2c_getreg(priv, STM32_I2C_CR1_OFFSET), status); /* "Note: When the STOP, START or PEC bit is set, the software must @@ -2156,7 +2147,8 @@ static int stm32_i2c_transfer(FAR struct i2c_master_s *dev, FAR struct i2c_msg_s * Note: this commentary is found in both places. * */ - i2cdbg("Check if the address was valid\n"); + + i2cinfo("Check if the address was valid\n"); stm32_i2c_sendstop(priv); #endif /* Clear busy flag in case of timeout */ diff --git a/arch/arm/src/stm32/stm32_idle.c b/arch/arm/src/stm32/stm32_idle.c index 0786f2ac99cb917bc10c9f6d7ee70a9545effb6f..648c0c1521f4576841e90dbc168a420f4eb60374 100644 --- a/arch/arm/src/stm32/stm32_idle.c +++ b/arch/arm/src/stm32/stm32_idle.c @@ -101,7 +101,7 @@ static void up_idlepm(void) /* Perform board-specific, state-dependent logic here */ - llvdbg("newstate= %d oldstate=%d\n", newstate, oldstate); + _info("newstate= %d oldstate=%d\n", newstate, oldstate); /* Then force the global state change */ diff --git a/arch/arm/src/stm32/stm32_irq.c b/arch/arm/src/stm32/stm32_irq.c index e6a347c00ac3e26e11c2571e81b2bd308a08769e..062d63fb7499afddac41d1dfac7f9b0b31f45e7e 100644 --- a/arch/arm/src/stm32/stm32_irq.c +++ b/arch/arm/src/stm32/stm32_irq.c @@ -107,40 +107,42 @@ extern uint32_t _vectors[]; * ****************************************************************************/ -#if defined(CONFIG_DEBUG_IRQ) +#if defined(CONFIG_DEBUG_IRQ_INFO) static void stm32_dumpnvic(const char *msg, int irq) { irqstate_t flags; flags = enter_critical_section(); - lldbg("NVIC (%s, irq=%d):\n", msg, irq); - lldbg(" INTCTRL: %08x VECTAB: %08x\n", - getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB)); + + irqinfo("NVIC (%s, irq=%d):\n", msg, irq); + irqinfo(" INTCTRL: %08x VECTAB: %08x\n", + getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB)); #if 0 - lldbg(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n", - getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA), - getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE)); + irqinfo(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n", + getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA), + getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE)); #endif - lldbg(" IRQ ENABLE: %08x %08x %08x\n", - getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE), - getreg32(NVIC_IRQ64_95_ENABLE)); - lldbg(" SYSH_PRIO: %08x %08x %08x\n", - getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY), - getreg32(NVIC_SYSH12_15_PRIORITY)); - lldbg(" IRQ PRIO: %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY), - getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY)); - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY), - getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY)); - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY), - getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY)); - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ48_51_PRIORITY), getreg32(NVIC_IRQ52_55_PRIORITY), - getreg32(NVIC_IRQ56_59_PRIORITY), getreg32(NVIC_IRQ60_63_PRIORITY)); - lldbg(" %08x\n", - getreg32(NVIC_IRQ64_67_PRIORITY)); + irqinfo(" IRQ ENABLE: %08x %08x %08x\n", + getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE), + getreg32(NVIC_IRQ64_95_ENABLE)); + irqinfo(" SYSH_PRIO: %08x %08x %08x\n", + getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY), + getreg32(NVIC_SYSH12_15_PRIORITY)); + irqinfo(" IRQ PRIO: %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY), + getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY), + getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY), + getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ48_51_PRIORITY), getreg32(NVIC_IRQ52_55_PRIORITY), + getreg32(NVIC_IRQ56_59_PRIORITY), getreg32(NVIC_IRQ60_63_PRIORITY)); + irqinfo(" %08x\n", + getreg32(NVIC_IRQ64_67_PRIORITY)); + leave_critical_section(flags); } #else @@ -158,11 +160,11 @@ static void stm32_dumpnvic(const char *msg, int irq) * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES static int stm32_nmi(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! NMI received\n"); + _err("PANIC!!! NMI received\n"); PANIC(); return 0; } @@ -170,7 +172,7 @@ static int stm32_nmi(int irq, FAR void *context) static int stm32_busfault(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS)); + _err("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS)); PANIC(); return 0; } @@ -178,7 +180,7 @@ static int stm32_busfault(int irq, FAR void *context) static int stm32_usagefault(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS)); + _err("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS)); PANIC(); return 0; } @@ -186,7 +188,7 @@ static int stm32_usagefault(int irq, FAR void *context) static int stm32_pendsv(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! PendSV received\n"); + _err("PANIC!!! PendSV received\n"); PANIC(); return 0; } @@ -194,7 +196,7 @@ static int stm32_pendsv(int irq, FAR void *context) static int stm32_dbgmonitor(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Debug Monitor received\n"); + _err("PANIC!!! Debug Monitor received\n"); PANIC(); return 0; } @@ -202,7 +204,7 @@ static int stm32_dbgmonitor(int irq, FAR void *context) static int stm32_reserved(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Reserved interrupt\n"); + _err("PANIC!!! Reserved interrupt\n"); PANIC(); return 0; } @@ -408,7 +410,7 @@ void up_irqinitialize(void) /* Attach all other processor exceptions (except reset and sys tick) */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES irq_attach(STM32_IRQ_NMI, stm32_nmi); #ifndef CONFIG_ARM_MPU irq_attach(STM32_IRQ_MEMFAULT, up_memfault); diff --git a/arch/arm/src/stm32/stm32_iwdg.c b/arch/arm/src/stm32/stm32_iwdg.c index 80d45be7292a4a8e9c111f6dd5ac49da2f786690..1cdf8e47bc07fc5fd68c88ae9b2917e57c6e0267 100644 --- a/arch/arm/src/stm32/stm32_iwdg.c +++ b/arch/arm/src/stm32/stm32_iwdg.c @@ -84,6 +84,10 @@ # define CONFIG_STM32_IWDG_DEFTIMOUT IWDG_MAXTIMEOUT #endif +#ifndef CONFIG_DEBUG_WATCHDOG_INFO +# undef CONFIG_STM32_IWDG_REGDEBUG +#endif + /* REVISIT: It appears that you can only setup the prescaler and reload * registers once. After that, the SR register's PVU and RVU bits never go * to zero. So we defer setting up these registers until the watchdog @@ -105,20 +109,6 @@ # error "Both CONFIG_STM32_IWDG_ONETIMESETUP and CONFIG_STM32_IWDG_DEFERREDSETUP are defined" #endif -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the watchdog - * driver. NOTE: that only lldbg types are used so that the output is - * immediately available. - */ - -#ifdef CONFIG_DEBUG_WATCHDOG -# define wddbg lldbg -# define wdvdbg llvdbg -#else -# define wddbg(x...) -# define wdvdbg(x...) -#endif - /**************************************************************************** * Private Types ****************************************************************************/ @@ -143,7 +133,7 @@ struct stm32_lowerhalf_s ****************************************************************************/ /* Register operations ******************************************************/ -#if defined(CONFIG_STM32_IWDG_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_STM32_IWDG_REGDEBUG static uint16_t stm32_getreg(uint32_t addr); static void stm32_putreg(uint16_t val, uint32_t addr); #else @@ -195,7 +185,7 @@ static struct stm32_lowerhalf_s g_wdgdev; * ****************************************************************************/ -#if defined(CONFIG_STM32_IWDG_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_STM32_IWDG_REGDEBUG static uint16_t stm32_getreg(uint32_t addr) { static uint32_t prevaddr = 0; @@ -216,7 +206,7 @@ static uint16_t stm32_getreg(uint32_t addr) { if (count == 4) { - lldbg("...\n"); + wdinfo("...\n"); } return val; @@ -233,7 +223,7 @@ static uint16_t stm32_getreg(uint32_t addr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + wdinfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -245,7 +235,7 @@ static uint16_t stm32_getreg(uint32_t addr) /* Show the register value read */ - lldbg("%08x->%04x\n", addr, val); + wdinfo("%08x->%04x\n", addr, val); return val; } #endif @@ -258,12 +248,12 @@ static uint16_t stm32_getreg(uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_STM32_IWDG_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_STM32_IWDG_REGDEBUG static void stm32_putreg(uint16_t val, uint32_t addr) { /* Show the register value being written */ - lldbg("%08x<-%04x\n", addr, val); + wdinfo("%08x<-%04x\n", addr, val); /* Write the value */ @@ -339,7 +329,7 @@ static int stm32_start(FAR struct watchdog_lowerhalf_s *lower) FAR struct stm32_lowerhalf_s *priv = (FAR struct stm32_lowerhalf_s *)lower; irqstate_t flags; - wdvdbg("Entry: started=%d\n"); + wdinfo("Entry: started=%d\n"); DEBUGASSERT(priv); /* Have we already been started? */ @@ -394,7 +384,7 @@ static int stm32_stop(FAR struct watchdog_lowerhalf_s *lower) { /* There is no way to disable the IDWG timer once it has been started */ - wdvdbg("Entry\n"); + wdinfo("Entry\n"); return -ENOSYS; } @@ -420,7 +410,7 @@ static int stm32_keepalive(FAR struct watchdog_lowerhalf_s *lower) FAR struct stm32_lowerhalf_s *priv = (FAR struct stm32_lowerhalf_s *)lower; irqstate_t flags; - wdvdbg("Entry\n"); + wdinfo("Entry\n"); /* Reload the IWDG timer */ @@ -455,7 +445,7 @@ static int stm32_getstatus(FAR struct watchdog_lowerhalf_s *lower, uint32_t ticks; uint32_t elapsed; - wdvdbg("Entry\n"); + wdinfo("Entry\n"); DEBUGASSERT(priv); /* Return the status bit */ @@ -484,10 +474,10 @@ static int stm32_getstatus(FAR struct watchdog_lowerhalf_s *lower, status->timeleft = priv->timeout - elapsed; - wdvdbg("Status :\n"); - wdvdbg(" flags : %08x\n", status->flags); - wdvdbg(" timeout : %d\n", status->timeout); - wdvdbg(" timeleft : %d\n", status->timeleft); + wdinfo("Status :\n"); + wdinfo(" flags : %08x\n", status->flags); + wdinfo(" timeout : %d\n", status->timeout); + wdinfo(" timeleft : %d\n", status->timeleft); return OK; } @@ -516,14 +506,14 @@ static int stm32_settimeout(FAR struct watchdog_lowerhalf_s *lower, int prescaler; int shift; - wdvdbg("Entry: timeout=%d\n", timeout); + wdinfo("Entry: timeout=%d\n", timeout); DEBUGASSERT(priv); /* Can this timeout be represented? */ if (timeout < 1 || timeout > IWDG_MAXTIMEOUT) { - wddbg("Cannot represent timeout=%d > %d\n", + wderr("ERROR: Cannot represent timeout=%d > %d\n", timeout, IWDG_MAXTIMEOUT); return -ERANGE; } @@ -536,7 +526,7 @@ static int stm32_settimeout(FAR struct watchdog_lowerhalf_s *lower, #ifdef CONFIG_STM32_IWDG_ONETIMESETUP if (priv->started) { - wddbg("Timer is already started\n"); + wdwarn("WARNING: Timer is already started\n"); return -EBUSY; } #endif @@ -631,7 +621,7 @@ static int stm32_settimeout(FAR struct watchdog_lowerhalf_s *lower, } #endif - wdvdbg("prescaler=%d fiwdg=%d reload=%d\n", prescaler, fiwdg, reload); + wdinfo("prescaler=%d fiwdg=%d reload=%d\n", prescaler, fiwdg, reload); return OK; } @@ -662,7 +652,7 @@ void stm32_iwdginitialize(FAR const char *devpath, uint32_t lsifreq) { FAR struct stm32_lowerhalf_s *priv = &g_wdgdev; - wdvdbg("Entry: devpath=%s lsifreq=%d\n", devpath, lsifreq); + wdinfo("Entry: devpath=%s lsifreq=%d\n", devpath, lsifreq); /* NOTE we assume that clocking to the IWDG has already been provided by * the RCC initialization logic. @@ -682,7 +672,7 @@ void stm32_iwdginitialize(FAR const char *devpath, uint32_t lsifreq) */ stm32_rcc_enablelsi(); - wdvdbg("RCC CSR: %08x\n", getreg32(STM32_RCC_CSR)); + wdinfo("RCC CSR: %08x\n", getreg32(STM32_RCC_CSR)); /* Select an arbitrary initial timeout value. But don't start the watchdog * yet. NOTE: If the "Hardware watchdog" feature is enabled through the diff --git a/arch/arm/src/stm32/stm32_ltdc.c b/arch/arm/src/stm32/stm32_ltdc.c index 8ae8e890fdb99fe1fedfeb73f20c874e4f30b6f2..442af257dd4d7dda0a72edb60e5f5f9f79778e10 100644 --- a/arch/arm/src/stm32/stm32_ltdc.c +++ b/arch/arm/src/stm32/stm32_ltdc.c @@ -283,11 +283,11 @@ /* Debug option */ #ifdef CONFIG_STM32_LTDC_REGDEBUG -# define regdbg dbg -# define regvdbg vdbg +# define regerr lcderr +# define reginfo lcdinfo #else -# define regdbg(x...) -# define regvdbg(x...) +# define regerr(x...) +# define reginfo(x...) #endif /* Preallocated LTDC framebuffers */ @@ -942,13 +942,13 @@ static void stm32_ltdc_gpioconfig(void) { int i; - gvdbg("Configuring pins\n"); + lcdinfo("Configuring pins\n"); /* Configure each pin */ for (i = 0; i < STM32_LTDC_NPINCONFIGS; i++) { - regvdbg("set gpio%d = %08x\n", i, g_ltdcpins[i]); + reginfo("set gpio%d = %08x\n", i, g_ltdcpins[i]); stm32_configgpio(g_ltdcpins[i]); } } @@ -972,51 +972,51 @@ static void stm32_ltdc_periphconfig(void) /* Configure APB2 LTDC clock external */ - regvdbg("configured RCC_APB2ENR=%08x\n", getreg32(STM32_RCC_APB2ENR)); + reginfo("configured RCC_APB2ENR=%08x\n", getreg32(STM32_RCC_APB2ENR)); /* Configure the SAI PLL external to provide the LCD_CLK */ - regvdbg("configured RCC_PLLSAI=%08x\n", getreg32(STM32_RCC_PLLSAICFGR)); + reginfo("configured RCC_PLLSAI=%08x\n", getreg32(STM32_RCC_PLLSAICFGR)); /* Configure dedicated clock external */ - regvdbg("configured RCC_DCKCFGR=%08x\n", getreg32(STM32_RCC_DCKCFGR)); + reginfo("configured RCC_DCKCFGR=%08x\n", getreg32(STM32_RCC_DCKCFGR)); /* Configure LTDC_SSCR */ regval = (STM32_LTDC_SSCR_VSH | STM32_LTDC_SSCR_HSW); - regvdbg("set LTDC_SSCR=%08x\n", regval); + reginfo("set LTDC_SSCR=%08x\n", regval); putreg32(regval, STM32_LTDC_SSCR); - regvdbg("configured LTDC_SSCR=%08x\n", getreg32(STM32_LTDC_SSCR)); + reginfo("configured LTDC_SSCR=%08x\n", getreg32(STM32_LTDC_SSCR)); /* Configure LTDC_BPCR */ regval = (STM32_LTDC_BPCR_AVBP | STM32_LTDC_BPCR_AHBP); - regvdbg("set LTDC_BPCR=%08x\n", regval); + reginfo("set LTDC_BPCR=%08x\n", regval); putreg32(regval, STM32_LTDC_BPCR); - regvdbg("configured LTDC_BPCR=%08x\n", getreg32(STM32_LTDC_BPCR)); + reginfo("configured LTDC_BPCR=%08x\n", getreg32(STM32_LTDC_BPCR)); /* Configure LTDC_AWCR */ regval = (STM32_LTDC_AWCR_AAH | STM32_LTDC_AWCR_AAW); - regvdbg("set LTDC_AWCR=%08x\n", regval); + reginfo("set LTDC_AWCR=%08x\n", regval); putreg32(regval, STM32_LTDC_AWCR); - regvdbg("configured LTDC_AWCR=%08x\n", getreg32(STM32_LTDC_AWCR)); + reginfo("configured LTDC_AWCR=%08x\n", getreg32(STM32_LTDC_AWCR)); /* Configure LTDC_TWCR */ regval = (STM32_LTDC_TWCR_TOTALH | STM32_LTDC_TWCR_TOTALW); - regvdbg("set LTDC_TWCR=%08x\n", regval); + reginfo("set LTDC_TWCR=%08x\n", regval); putreg32(regval, STM32_LTDC_TWCR); - regvdbg("configured LTDC_TWCR=%08x\n", getreg32(STM32_LTDC_TWCR)); + reginfo("configured LTDC_TWCR=%08x\n", getreg32(STM32_LTDC_TWCR)); /* Configure LTDC_GCR */ regval = (STM32_LTDC_GCR_PCPOL | STM32_LTDC_GCR_DEPOL | STM32_LTDC_GCR_VSPOL | STM32_LTDC_GCR_HSPOL); - regvdbg("set LTDC_GCR=%08x\n", regval); + reginfo("set LTDC_GCR=%08x\n", regval); putreg32(regval, STM32_LTDC_GCR); - regvdbg("configured LTDC_GCR=%08x\n", getreg32(STM32_LTDC_GCR)); + reginfo("configured LTDC_GCR=%08x\n", getreg32(STM32_LTDC_GCR)); } /**************************************************************************** @@ -1032,9 +1032,9 @@ static void stm32_ltdc_periphconfig(void) static void stm32_ltdc_bgcolor(uint32_t rgb) { - regvdbg("set LTDC_BCCR=%08x\n", rgb); + reginfo("set LTDC_BCCR=%08x\n", rgb); putreg32(rgb, STM32_LTDC_BCCR); - regvdbg("configured LTDC_BCCR=%08x\n", getreg32(STM32_LTDC_BCCR)); + reginfo("configured LTDC_BCCR=%08x\n", getreg32(STM32_LTDC_BCCR)); } /**************************************************************************** @@ -1073,9 +1073,9 @@ static void stm32_ltdc_dither(bool enable, LTDC_GCR_DGW(0) | LTDC_GCR_DBW(0)); regval |= (LTDC_GCR_DRW(red) | LTDC_GCR_DGW(green) | LTDC_GCR_DBW(blue)); - regvdbg("set LTDC_GCR=%08x\n", regval); + reginfo("set LTDC_GCR=%08x\n", regval); putreg32(regval, STM32_LTDC_GCR); - regvdbg("configured LTDC_GCR=%08x\n", getreg32(STM32_LTDC_GCR)); + reginfo("configured LTDC_GCR=%08x\n", getreg32(STM32_LTDC_GCR)); } /**************************************************************************** @@ -1090,9 +1090,9 @@ static void stm32_ltdc_linepos(void) { /* Configure LTDC_LIPCR */ - regvdbg("set LTDC_LIPCR=%08x\n", STM32_LTDC_LIPCR_LIPOS); + reginfo("set LTDC_LIPCR=%08x\n", STM32_LTDC_LIPCR_LIPOS); putreg32(STM32_LTDC_LIPCR_LIPOS, STM32_LTDC_LIPCR); - regvdbg("configured LTDC_LIPCR=%08x\n", getreg32(STM32_LTDC_LIPCR)); + reginfo("configured LTDC_LIPCR=%08x\n", getreg32(STM32_LTDC_LIPCR)); } /**************************************************************************** @@ -1114,9 +1114,9 @@ static void stm32_ltdc_irqctrl(uint32_t setirqs, uint32_t clrirqs) regval = getreg32(STM32_LTDC_IER); regval &= ~clrirqs; regval |= setirqs; - regvdbg("set LTDC_IER=%08x\n", regval); + reginfo("set LTDC_IER=%08x\n", regval); putreg32(regval, STM32_LTDC_IER); - regvdbg("configured LTDC_IER=%08x\n", getreg32(STM32_LTDC_IER)); + reginfo("configured LTDC_IER=%08x\n", getreg32(STM32_LTDC_IER)); } /**************************************************************************** @@ -1133,7 +1133,7 @@ static int stm32_ltdcirq(int irq, void *context) uint32_t regval = getreg32(STM32_LTDC_ISR); - regvdbg("irq = %d, regval = %08x\n", irq, regval); + reginfo("irq = %d, regval = %08x\n", irq, regval); if (regval & LTDC_ISR_RRIF) { @@ -1155,7 +1155,7 @@ static int stm32_ltdcirq(int irq, void *context) if (ret != OK) { - dbg("sem_post() failed\n"); + lcderr("ERROR: sem_post() failed\n"); return ret; } } @@ -1202,7 +1202,7 @@ static int stm32_ltdc_waitforirq(void) if (ret != OK) { - dbg("sem_wait() failed\n"); + lcderr("ERROR: sem_wait() failed\n"); } } @@ -1255,9 +1255,9 @@ static int stm32_ltdc_reload(uint8_t value, bool waitvblank) * immediately reload is set. */ - regvdbg("set LTDC_SRCR=%08x\n", value); + reginfo("set LTDC_SRCR=%08x\n", value); putreg32(value, STM32_LTDC_SRCR); - regvdbg("configured LTDC_SRCR=%08x\n", getreg32(STM32_LTDC_SRCR)); + reginfo("configured LTDC_SRCR=%08x\n", getreg32(STM32_LTDC_SRCR)); if (waitvblank & (value == LTDC_SRCR_VBR)) { @@ -1354,7 +1354,7 @@ static void stm32_lcd_enable(bool enable) uint32_t regval; regval = getreg32(STM32_LTDC_GCR); - regvdbg("get LTDC_GCR=%08x\n", regval); + reginfo("get LTDC_GCR=%08x\n", regval); if (enable == true) { @@ -1365,9 +1365,9 @@ static void stm32_lcd_enable(bool enable) regval &= ~LTDC_GCR_LTDCEN; } - regvdbg("set LTDC_GCR=%08x\n", regval); + reginfo("set LTDC_GCR=%08x\n", regval); putreg32(regval, STM32_LTDC_GCR); - regvdbg("configured LTDC_GCR=%08x\n", getreg32(STM32_LTDC_GCR)); + reginfo("configured LTDC_GCR=%08x\n", getreg32(STM32_LTDC_GCR)); } /**************************************************************************** @@ -1392,7 +1392,7 @@ static void stm32_ltdc_lclutenable(FAR struct stm32_layer_s *layer, bool enable) uint32_t regval; regval = getreg32(stm32_cr_layer_t[layer->state.lid]); - regvdbg("get LTDC_L%dCR=%08x\n", layer->state.lid + 1, regval); + reginfo("get LTDC_L%dCR=%08x\n", layer->state.lid + 1, regval); /* Disable the clut support during update the color table */ @@ -1405,7 +1405,7 @@ static void stm32_ltdc_lclutenable(FAR struct stm32_layer_s *layer, bool enable) regval &= ~LTDC_LxCR_CLUTEN; } - regvdbg("set LTDC_L%dCR=%08x\n", layer->state.lid + 1, regval); + reginfo("set LTDC_L%dCR=%08x\n", layer->state.lid + 1, regval); putreg32(regval, stm32_cr_layer_t[layer->state.lid]); } #endif @@ -1519,17 +1519,17 @@ static int stm32_ltdc_lvalidatearea(FAR struct stm32_layer_s *layer, (srcypos > ypos + yres - 1)) { - gdbg("layer coordinates out of valid area: xpos = %d > %d, \ - ypos = %d > %d, width = %d > %d, height = %d > %d, \ - srcxpos = %d > %d, srcypos = %d > %d", - xpos, vinfo->xres - 1, - ypos, vinfo->yres - 1, - xres, vinfo->xres - xpos, - yres, vinfo->yres - ypos, - srcxpos, xpos + xres - 1, - srcypos, ypos + yres - 1); - - gdbg("Returning EINVAL\n"); + lcderr("ERROR: layer coordinates out of valid area: xpos = %d > %d, \ + ypos = %d > %d, width = %d > %d, height = %d > %d, \ + srcxpos = %d > %d, srcypos = %d > %d", + xpos, vinfo->xres - 1, + ypos, vinfo->yres - 1, + xres, vinfo->xres - xpos, + yres, vinfo->yres - ypos, + srcxpos, xpos + xres - 1, + srcypos, ypos + yres - 1); + + lcderr(" Returning EINVAL\n"); return -EINVAL; } @@ -1615,7 +1615,7 @@ static void stm32_ltdc_larea(struct stm32_layer_s *layer) FAR struct stm32_ltdc_s *priv = &layer->state; FAR struct ltdc_area_s *area = &priv->area; - regvdbg("xpos = %d, ypos = %d, xres = %d, yres = %d\n", + reginfo("xpos = %d, ypos = %d, xres = %d, yres = %d\n", area->xpos, area->ypos, area->xres, area->yres); lxpos = area->xpos + (STM32_LTDC_LxWHPCR_WHSTPOS + 1); @@ -1633,9 +1633,9 @@ static void stm32_ltdc_larea(struct stm32_layer_s *layer) /* Configure LxWHPCR / LxWVPCR register */ - regvdbg("set LTDC_L%dWHPCR=%08x\n", priv->lid + 1, whpcr); + reginfo("set LTDC_L%dWHPCR=%08x\n", priv->lid + 1, whpcr); putreg32(whpcr, stm32_whpcr_layer_t[priv->lid]); - regvdbg("set LTDC_L%dWVPCR=%08x\n", priv->lid + 1, wvpcr); + reginfo("set LTDC_L%dWVPCR=%08x\n", priv->lid + 1, wvpcr); putreg32(wvpcr, stm32_wvpcr_layer_t[priv->lid]); /* Configure framebuffer */ @@ -1664,7 +1664,7 @@ static void stm32_ltdc_lpixelformat(FAR struct stm32_layer_s *layer) { /* Configure PFCR register */ - regvdbg("set LTDC_L%dPFCR=%08x\n", layer->state.lid + 1, + reginfo("set LTDC_L%dPFCR=%08x\n", layer->state.lid + 1, stm32_fmt_layer_t[layer->state.lid]); putreg32(stm32_fmt_layer_t[layer->state.lid], stm32_pfcr_layer_t[layer->state.lid]); @@ -1698,7 +1698,7 @@ static inline void stm32_ltdc_lframebuffer(FAR struct stm32_layer_s *layer) offset = priv->xpos * STM32_LTDC_Lx_BYPP(pinfo->bpp) + pinfo->stride * priv->ypos; - regvdbg("set LTDC_L%dCFBAR=%08x\n", priv->lid + 1, pinfo->fbmem + offset); + reginfo("set LTDC_L%dCFBAR=%08x\n", priv->lid + 1, pinfo->fbmem + offset); putreg32((uint32_t)pinfo->fbmem + offset, stm32_cfbar_layer_t[priv->lid]); /* Configure LxCFBLR register */ @@ -1708,12 +1708,12 @@ static inline void stm32_ltdc_lframebuffer(FAR struct stm32_layer_s *layer) cfblr = LTDC_LxCFBLR_CFBP(pinfo->stride) | LTDC_LxCFBLR_CFBLL(area->xres * STM32_LTDC_Lx_BYPP(pinfo->bpp) + 3); - regvdbg("set LTDC_L%dCFBLR=%08x\n", priv->lid + 1, cfblr); + reginfo("set LTDC_L%dCFBLR=%08x\n", priv->lid + 1, cfblr); putreg32(cfblr, stm32_cfblr_layer_t[priv->lid]); /* Configure LxCFBLNR register */ - regvdbg("set LTDC_L%dCFBLNR=%08x\n", priv->lid + 1, area->yres); + reginfo("set LTDC_L%dCFBLNR=%08x\n", priv->lid + 1, area->yres); putreg32(area->yres, stm32_cfblnr_layer_t[priv->lid]); } @@ -1733,7 +1733,7 @@ static inline void stm32_ltdc_lframebuffer(FAR struct stm32_layer_s *layer) static void stm32_ltdc_lalpha(FAR struct stm32_layer_s *layer) { uint8_t opac = stm32_ltdc_lgetopac(layer); - regvdbg("set LTDC_L%dCACR=%02x\n", layer->state.lid + 1, opac); + reginfo("set LTDC_L%dCACR=%02x\n", layer->state.lid + 1, opac); putreg32(opac, stm32_cacr_layer_t[layer->state.lid]); /* Clear the constant alpha operation flag */ @@ -1760,7 +1760,7 @@ static void stm32_ltdc_lalpha(FAR struct stm32_layer_s *layer) static void stm32_ltdc_lblendmode(FAR struct stm32_layer_s *layer, uint8_t bf1, uint8_t bf2) { - regvdbg("set LTDC_L%dBFCR=%08x\n", layer->state.lid + 1, + reginfo("set LTDC_L%dBFCR=%08x\n", layer->state.lid + 1, (LTDC_LxBFCR_BF1(bf1) | LTDC_LxBFCR_BF2(bf2))); putreg32((LTDC_LxBFCR_BF1(bf1) | LTDC_LxBFCR_BF2(bf2)), stm32_bfcr_layer_t[layer->state.lid]); @@ -1785,7 +1785,7 @@ static void stm32_ltdc_lblendmode(FAR struct stm32_layer_s *layer, static void stm32_ltdc_lcolor(FAR struct stm32_layer_s *layer, uint32_t argb) { - regvdbg("set LTDC_L%dDCCR=%08x\n", layer->state.lid + 1, argb); + reginfo("set LTDC_L%dDCCR=%08x\n", layer->state.lid + 1, argb); putreg32(argb, stm32_dccr_layer_t[layer->state.lid]); /* Clear the color operation flag */ @@ -1816,7 +1816,7 @@ static void stm32_ltdc_lcolorkey(FAR struct stm32_layer_s *layer) { /* Set colorkey */ - regvdbg("set LTDC_L%dCKCR=%08x\n", + reginfo("set LTDC_L%dCKCR=%08x\n", layer->state.lid + 1, layer->state.colorkey); putreg32(layer->state.colorkey, stm32_ckcr_layer_t[layer->state.lid]); @@ -1831,7 +1831,7 @@ static void stm32_ltdc_lcolorkey(FAR struct stm32_layer_s *layer) regval &= ~LTDC_LxCR_COLKEN; } - regvdbg("set LTDC_L%dCR=%08x\n", layer->state.lid + 1, regval); + reginfo("set LTDC_L%dCR=%08x\n", layer->state.lid + 1, regval); putreg32(regval, stm32_cr_layer_t[layer->state.lid]); /* Clear the colorkey operation flag */ @@ -1903,7 +1903,7 @@ static void stm32_ltdc_lclut(FAR struct stm32_layer_s *layer, #endif - regvdbg("set LTDC_L%dCLUTWR = %08x, cmap->first = %d, cmap->len = %d\n", + reginfo("set LTDC_L%dCLUTWR = %08x, cmap->first = %d, cmap->len = %d\n", layer->state.lid + 1, regval, cmap->first, cmap->len); putreg32(regval, stm32_clutwr_layer_t[layer->state.lid]); } @@ -1950,7 +1950,7 @@ static void stm32_ltdc_lenable(FAR struct stm32_layer_s *layer) regval &= ~LTDC_LxCR_LEN; } - regvdbg("set LTDC_L%dCR=%08x\n", layer->state.lid + 1, regval); + reginfo("set LTDC_L%dCR=%08x\n", layer->state.lid + 1, regval); putreg32(regval, stm32_cr_layer_t[layer->state.lid]); /* Clear the enable operation flag */ @@ -1985,8 +1985,8 @@ static void stm32_ltdc_lclear(FAR struct stm32_layer_s *layer, uint8_t *dest = (uint8_t *)priv->pinfo.fbmem; int i; - gvdbg("Clearing display: BPP=%d color=%04x framebuffer=%08x size=%d\n", - priv->pinfo.bpp, color, dest, priv->pinfo.fblen); + lcdinfo("Clearing display: BPP=%d color=%04x framebuffer=%08x size=%d\n", + priv->pinfo.bpp, color, dest, priv->pinfo.fblen); for (i = 0; i < priv->pinfo.fblen; i += sizeof(uint8_t)) { @@ -2003,8 +2003,8 @@ static void stm32_ltdc_lclear(FAR struct stm32_layer_s *layer, uint16_t *dest = (uint16_t *)priv->pinfo.fbmem; int i; - gvdbg("Clearing display: BPP=%d color=%04x framebuffer=%08x size=%d\n", - priv->pinfo.bpp, color, dest, priv->pinfo.fblen); + lcdinfo("Clearing display: BPP=%d color=%04x framebuffer=%08x size=%d\n", + priv->pinfo.bpp, color, dest, priv->pinfo.fblen); for (i = 0; i < priv->pinfo.fblen; i += sizeof(uint16_t)) { @@ -2024,8 +2024,8 @@ static void stm32_ltdc_lclear(FAR struct stm32_layer_s *layer, uint8_t b; int i; - gvdbg("Clearing display: BPP=%d color=%04x framebuffer=%08x size=%d\n", - priv->pinfo.bpp, color, dest, priv->pinfo.fblen); + lcdinfo("Clearing display: BPP=%d color=%04x framebuffer=%08x size=%d\n", + priv->pinfo.bpp, color, dest, priv->pinfo.fblen); r = (uint8_t) color; g = (uint8_t) (color >> 8); @@ -2048,8 +2048,8 @@ static void stm32_ltdc_lclear(FAR struct stm32_layer_s *layer, uint32_t *dest = (uint32_t *)priv->pinfo.fbmem; int i; - gvdbg("Clearing display: BPP=%d color=%04x framebuffer=%08x size=%d\n", - priv->pinfo.bpp, color, dest, priv->pinfo.fblen); + lcdinfo("Clearing display: BPP=%d color=%04x framebuffer=%08x size=%d\n", + priv->pinfo.bpp, color, dest, priv->pinfo.fblen); for (i = 0; i < priv->pinfo.fblen; i += sizeof(uint32_t)) { @@ -2191,7 +2191,7 @@ static void stm32_ltdc_linit(int lid) static int stm32_getvideoinfo(struct fb_vtable_s *vtable, struct fb_videoinfo_s *vinfo) { - gvdbg("vtable=%p vinfo=%p\n", vtable, vinfo); + lcdinfo("vtable=%p vinfo=%p\n", vtable, vinfo); if (vtable) { FAR struct ltdc_layer_s *ltdc; @@ -2203,7 +2203,7 @@ static int stm32_getvideoinfo(struct fb_vtable_s *vtable, return stm32_lgetvideoinfo(ltdc, vinfo); } - gdbg("ERROR: Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -2226,7 +2226,7 @@ static int stm32_getvideoinfo(struct fb_vtable_s *vtable, static int stm32_getplaneinfo(struct fb_vtable_s *vtable, int planeno, struct fb_planeinfo_s *pinfo) { - gvdbg("vtable=%p planeno=%d pinfo=%p\n", vtable, planeno, pinfo); + lcdinfo("vtable=%p planeno=%d pinfo=%p\n", vtable, planeno, pinfo); if (vtable) { FAR struct ltdc_layer_s *ltdc; @@ -2238,7 +2238,7 @@ static int stm32_getplaneinfo(struct fb_vtable_s *vtable, int planeno, return stm32_lgetplaneinfo(ltdc, planeno, pinfo); } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -2315,7 +2315,7 @@ static int stm32_putcmap(struct fb_vtable_s *vtable, static int stm32_lgetvideoinfo(struct ltdc_layer_s *layer, struct fb_videoinfo_s *vinfo) { - gvdbg("layer=%p vinfo=%p\n", layer, vinfo); + lcdinfo("layer=%p vinfo=%p\n", layer, vinfo); FAR struct stm32_layer_s *priv = (FAR struct stm32_layer_s *)layer; if (stm32_ltdc_lvalidate(priv)) @@ -2325,7 +2325,7 @@ static int stm32_lgetvideoinfo(struct ltdc_layer_s *layer, return OK; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -2349,16 +2349,16 @@ static int stm32_lgetvideoinfo(struct ltdc_layer_s *layer, static int stm32_lgetplaneinfo(struct ltdc_layer_s *layer, int planeno, struct fb_planeinfo_s *pinfo) { - gvdbg("layer=%p planeno=%d pinfo=%p\n", layer, planeno, pinfo); FAR struct stm32_layer_s *priv = (FAR struct stm32_layer_s *)layer; + lcdinfo("layer=%p planeno=%d pinfo=%p\n", layer, planeno, pinfo); if (stm32_ltdc_lvalidate(priv) && planeno == 0) { memcpy(pinfo, &priv->state.pinfo, sizeof(struct fb_planeinfo_s)); return OK; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -2384,9 +2384,10 @@ static int stm32_lgetplaneinfo(struct ltdc_layer_s *layer, int planeno, static int stm32_setclut(struct ltdc_layer_s *layer, const struct fb_cmap_s *cmap) { - int ret; FAR struct stm32_layer_s *priv = (FAR struct stm32_layer_s *)layer; - gvdbg("layer=%p cmap=%p\n", layer, cmap); + int ret; + + lcdinfo("layer=%p cmap=%p\n", layer, cmap); if (stm32_ltdc_lvalidate(priv) && cmap) { @@ -2394,14 +2395,14 @@ static int stm32_setclut(struct ltdc_layer_s *layer, if (priv->state.vinfo.fmt != FB_FMT_RGB8) { - gdbg("Error: CLUT is not supported for the pixel format: %d\n", - priv->state.vinfo.fmt); + lcderr("ERROR: CLUT is not supported for the pixel format: %d\n", + priv->state.vinfo.fmt); ret = -EINVAL; } else if (cmap->first >= STM32_LTDC_NCLUT) { - gdbg("Error: only %d color table entries supported\n", - STM32_LTDC_NCLUT); + lcderr("ERROR: only %d color table entries supported\n", + STM32_LTDC_NCLUT); ret = -EINVAL; } else @@ -2418,7 +2419,7 @@ static int stm32_setclut(struct ltdc_layer_s *layer, return ret; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -2442,9 +2443,10 @@ static int stm32_setclut(struct ltdc_layer_s *layer, static int stm32_getclut(struct ltdc_layer_s *layer, struct fb_cmap_s *cmap) { - int ret; FAR struct stm32_layer_s *priv = (FAR struct stm32_layer_s *)layer; - gvdbg("layer=%p cmap=%p\n", layer, cmap); + int ret; + + lcdinfo("layer=%p cmap=%p\n", layer, cmap); if (priv == &LAYER_L1 || priv == &LAYER_L2) { @@ -2460,14 +2462,14 @@ static int stm32_getclut(struct ltdc_layer_s *layer, #else if (priv->state.vinfo.fmt != FB_FMT_RGB8) { - gdbg("Error: CLUT is not supported for the pixel format: %d\n", - priv->state.vinfo.fmt); + lcderr("ERROR: CLUT is not supported for the pixel format: %d\n", + priv->state.vinfo.fmt); ret = -EINVAL; } else if (cmap->first >= STM32_LTDC_NCLUT) { - gdbg("Error: only %d color table entries supported\n", - STM32_LTDC_NCLUT); + lcderr("ERROR: only %d color table entries supported\n", + STM32_LTDC_NCLUT); ret = -EINVAL; } else @@ -2489,7 +2491,7 @@ static int stm32_getclut(struct ltdc_layer_s *layer, cmap->green[n] = clut888[offset + 1]; cmap->red[n] = clut888[offset + 2]; - regvdbg("n=%d, red=%02x, green=%02x, blue=%02x\n", n, + reginfo("n=%d, red=%02x, green=%02x, blue=%02x\n", n, clut888[offset], clut888[offset + 1], clut888[offset + 2]); # else @@ -2498,7 +2500,7 @@ static int stm32_getclut(struct ltdc_layer_s *layer, cmap->green[n] = (uint8_t)LTDC_CMAP_GREEN(clut[n]); cmap->blue[n] = (uint8_t)LTDC_CMAP_BLUE(clut[n]); - regvdbg("n=%d, alpha=%02x, red=%02x, green=%02x, blue=%02x\n", n, + reginfo("n=%d, alpha=%02x, red=%02x, green=%02x, blue=%02x\n", n, DMA2D_CMAP_ALPHA(clut[n]), DMA2D_CMAP_RED(clut[n]), DMA2D_CMAP_GREEN(clut[n]), DMA2D_CMAP_BLUE(clut[n])); # endif @@ -2512,7 +2514,7 @@ static int stm32_getclut(struct ltdc_layer_s *layer, return ret; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } #endif /* STM32_LAYER_CLUT_SIZE */ @@ -2542,7 +2544,7 @@ static int stm32_getlid(FAR struct ltdc_layer_s *layer, int *lid, { FAR struct stm32_layer_s *priv = (FAR struct stm32_layer_s *)layer; - gvdbg("flag = %08x\n", flag); + lcdinfo("flag = %08x\n", flag); if (stm32_ltdc_lvalidate(priv)) { @@ -2583,7 +2585,7 @@ static int stm32_getlid(FAR struct ltdc_layer_s *layer, int *lid, #endif default: ret = EINVAL; - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); break; } @@ -2592,7 +2594,7 @@ static int stm32_getlid(FAR struct ltdc_layer_s *layer, int *lid, return ret; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -2617,7 +2619,8 @@ static int stm32_getlid(FAR struct ltdc_layer_s *layer, int *lid, static int stm32_setcolor(FAR struct ltdc_layer_s *layer, uint32_t argb) { FAR struct stm32_layer_s *priv = (FAR struct stm32_layer_s *)layer; - gvdbg("layer = %p, argb = %08x\n", layer, argb); + + lcdinfo("layer = %p, argb = %08x\n", layer, argb); if (stm32_ltdc_lvalidate(priv)) { @@ -2629,7 +2632,7 @@ static int stm32_setcolor(FAR struct ltdc_layer_s *layer, uint32_t argb) return OK; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -2652,7 +2655,8 @@ static int stm32_setcolor(FAR struct ltdc_layer_s *layer, uint32_t argb) static int stm32_getcolor(FAR struct ltdc_layer_s *layer, uint32_t *argb) { FAR struct stm32_layer_s *priv = (FAR struct stm32_layer_s *)layer; - gvdbg("layer = %p, argb = %p\n", layer, argb); + + lcdinfo("layer = %p, argb = %p\n", layer, argb); if (stm32_ltdc_lvalidate(priv)) { @@ -2663,7 +2667,7 @@ static int stm32_getcolor(FAR struct ltdc_layer_s *layer, uint32_t *argb) return OK; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -2688,7 +2692,8 @@ static int stm32_getcolor(FAR struct ltdc_layer_s *layer, uint32_t *argb) static int stm32_setcolorkey(FAR struct ltdc_layer_s *layer, uint32_t rgb) { FAR struct stm32_layer_s *priv = (FAR struct stm32_layer_s *)layer; - gvdbg("layer = %p, argb = %08x\n", layer, rgb); + + lcdinfo("layer = %p, argb = %08x\n", layer, rgb); if (stm32_ltdc_lvalidate(priv)) { @@ -2700,7 +2705,7 @@ static int stm32_setcolorkey(FAR struct ltdc_layer_s *layer, uint32_t rgb) return OK; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -2723,7 +2728,8 @@ static int stm32_setcolorkey(FAR struct ltdc_layer_s *layer, uint32_t rgb) static int stm32_getcolorkey(FAR struct ltdc_layer_s *layer, uint32_t *rgb) { FAR struct stm32_layer_s *priv = (FAR struct stm32_layer_s *)layer; - gvdbg("layer = %p, argb = %p\n", layer, rgb); + + lcdinfo("layer = %p, argb = %p\n", layer, rgb); if (stm32_ltdc_lvalidate(priv)) { @@ -2734,7 +2740,7 @@ static int stm32_getcolorkey(FAR struct ltdc_layer_s *layer, uint32_t *rgb) return OK; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -2763,7 +2769,8 @@ static int stm32_getcolorkey(FAR struct ltdc_layer_s *layer, uint32_t *rgb) static int stm32_setalpha(FAR struct ltdc_layer_s *layer, uint8_t alpha) { FAR struct stm32_layer_s *priv = (FAR struct stm32_layer_s *)layer; - gvdbg("layer = %p, alpha = %02x\n", layer, alpha); + + lcdinfo("layer = %p, alpha = %02x\n", layer, alpha); if (stm32_ltdc_lvalidate(priv)) { @@ -2775,7 +2782,7 @@ static int stm32_setalpha(FAR struct ltdc_layer_s *layer, uint8_t alpha) return OK; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -2798,7 +2805,8 @@ static int stm32_setalpha(FAR struct ltdc_layer_s *layer, uint8_t alpha) static int stm32_getalpha(FAR struct ltdc_layer_s *layer, uint8_t *alpha) { FAR struct stm32_layer_s *priv = (FAR struct stm32_layer_s *)layer; - gvdbg("layer = %p, alpha = %p\n", layer, alpha); + + lcdinfo("layer = %p, alpha = %p\n", layer, alpha); if (stm32_ltdc_lvalidate(priv)) { @@ -2809,7 +2817,7 @@ static int stm32_getalpha(FAR struct ltdc_layer_s *layer, uint8_t *alpha) return OK; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -2856,8 +2864,9 @@ static int stm32_getalpha(FAR struct ltdc_layer_s *layer, uint8_t *alpha) static int stm32_setblendmode(FAR struct ltdc_layer_s *layer, uint32_t mode) { FAR struct stm32_layer_s *priv = (FAR struct stm32_layer_s *)layer; - uint32_t blendmode = mode; - gvdbg("layer = %p, mode = %08x\n", layer, mode); + uint32_t blendmode = mode; + + lcdinfo("layer = %p, mode = %08x\n", layer, mode); if (stm32_ltdc_lvalidate(priv)) { @@ -2926,7 +2935,7 @@ static int stm32_setblendmode(FAR struct ltdc_layer_s *layer, uint32_t mode) } if (blendmode) { - gdbg("Unknown blendmode %02x\n", blendmode); + lcderr("ERROR: Unknown blendmode %02x\n", blendmode); ret = -EINVAL; } @@ -2942,7 +2951,7 @@ static int stm32_setblendmode(FAR struct ltdc_layer_s *layer, uint32_t mode) return ret; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -2964,7 +2973,8 @@ static int stm32_setblendmode(FAR struct ltdc_layer_s *layer, uint32_t mode) static int stm32_getblendmode(FAR struct ltdc_layer_s *layer, uint32_t *mode) { FAR struct stm32_layer_s *priv = (FAR struct stm32_layer_s *)layer; - gvdbg("layer = %p, mode = %p\n", layer, mode); + + lcdinfo("layer = %p, mode = %p\n", layer, mode); if (stm32_ltdc_lvalidate(priv)) { @@ -2975,7 +2985,7 @@ static int stm32_getblendmode(FAR struct ltdc_layer_s *layer, uint32_t *mode) return OK; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -3011,8 +3021,9 @@ static int stm32_setarea(FAR struct ltdc_layer_s *layer, fb_coord_t srcypos) { FAR struct stm32_layer_s *priv = (FAR struct stm32_layer_s *)layer; - gvdbg("layer = %p, area = %p, srcxpos = %d, srcypos = %d\n", - layer, area, srcxpos, srcypos); + + lcdinfo("layer = %p, area = %p, srcxpos = %d, srcypos = %d\n", + layer, area, srcxpos, srcypos); if (stm32_ltdc_lvalidate(priv)) { @@ -3039,7 +3050,7 @@ static int stm32_setarea(FAR struct ltdc_layer_s *layer, return ret; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -3066,8 +3077,9 @@ static int stm32_getarea(FAR struct ltdc_layer_s *layer, fb_coord_t *srcxpos, fb_coord_t *srcypos) { FAR struct stm32_layer_s *priv = (FAR struct stm32_layer_s *)layer; - gvdbg("layer = %p, area = %p, srcxpos = %p, srcypos = %p\n", - layer, area, srcxpos, srcypos); + + lcdinfo("layer = %p, area = %p, srcxpos = %p, srcypos = %p\n", + layer, area, srcxpos, srcypos); if (stm32_ltdc_lvalidate(priv)) { @@ -3080,7 +3092,7 @@ static int stm32_getarea(FAR struct ltdc_layer_s *layer, return OK; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -3131,7 +3143,7 @@ static int stm32_update(FAR struct ltdc_layer_s *layer, uint32_t mode) FAR struct stm32_layer_s *inactive = &LAYER(!g_lactive); #endif - gvdbg("layer = %p, mode = %08x\n", layer, mode); + lcdinfo("layer = %p, mode = %08x\n", layer, mode); if (stm32_ltdc_lvalidate(priv)) { @@ -3156,7 +3168,7 @@ static int stm32_update(FAR struct ltdc_layer_s *layer, uint32_t mode) if (stm32_ltdc_waitforirq() != OK) { - gdbg("Returning ECANCELED\n"); + lcderr("ERROR: Returning ECANCELED\n"); return -ECANCELED; } @@ -3238,7 +3250,7 @@ static int stm32_update(FAR struct ltdc_layer_s *layer, uint32_t mode) return OK; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -3272,8 +3284,8 @@ static int stm32_blit(FAR struct ltdc_layer_s *dest, { FAR struct stm32_layer_s *priv = (FAR struct stm32_layer_s *)dest; - gvdbg("dest = %p, destxpos = %d, destypos = %d, src = %p, srcarea = %p\n", - dest, destxpos, destypos, src, srcarea); + lcdinfo("dest = %p, destxpos = %d, destypos = %d, src = %p, srcarea = %p\n", + dest, destxpos, destypos, src, srcarea); if (stm32_ltdc_lvalidate(priv)) { @@ -3286,7 +3298,7 @@ static int stm32_blit(FAR struct ltdc_layer_s *dest, return ret; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -3325,10 +3337,10 @@ static int stm32_blend(FAR struct ltdc_layer_s *dest, { FAR struct stm32_layer_s *priv = (FAR struct stm32_layer_s *)dest; - gvdbg("dest=%p, destxpos=%d, destypos=%d, " - "fore=%p, forexpos=%d foreypos=%d, " - "back=%p, backarea=%p\n", - dest, destxpos, destypos, fore, forexpos, foreypos, back, backarea); + lcdinfo("dest=%p, destxpos=%d, destypos=%d, " + "fore=%p, forexpos=%d foreypos=%d, " + "back=%p, backarea=%p\n", + dest, destxpos, destypos, fore, forexpos, foreypos, back, backarea); if (stm32_ltdc_lvalidate(priv)) { @@ -3342,7 +3354,7 @@ static int stm32_blend(FAR struct ltdc_layer_s *dest, return ret; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -3370,7 +3382,8 @@ static int stm32_fillarea(FAR struct ltdc_layer_s *layer, uint32_t color) { FAR struct stm32_layer_s *priv = (FAR struct stm32_layer_s *)layer; - gvdbg("layer = %p, area = %p, color = %08x\n", layer, area, color); + + lcdinfo("layer = %p, area = %p, color = %08x\n", layer, area, color); if (stm32_ltdc_lvalidate(priv)) { @@ -3383,7 +3396,7 @@ static int stm32_fillarea(FAR struct ltdc_layer_s *layer, return ret; } - gdbg("Returning EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); return -EINVAL; } #endif @@ -3407,13 +3420,14 @@ static int stm32_fillarea(FAR struct ltdc_layer_s *layer, FAR struct ltdc_layer_s *stm32_ltdcgetlayer(int lid) { - gvdbg("lid: %d\n", lid); + lcdinfo("lid: %d\n", lid); + if (lid == LTDC_LAYER_L1 || lid == LTDC_LAYER_L2) { return (FAR struct ltdc_layer_s *) &LAYER(lid); } - gdbg("EINVAL\n"); + lcderr("ERROR: Returning EINVAL\n"); errno = EINVAL; return NULL; } @@ -3436,7 +3450,7 @@ int stm32_ltdcinitialize(void) int ret; #endif - dbg("Initialize LTDC driver\n"); + lcdinfo("Initialize LTDC driver\n"); if (g_initialized == true) { @@ -3447,16 +3461,16 @@ int stm32_ltdcinitialize(void) stm32_lcd_enable(false); - gvdbg("Configuring the LCD controller\n"); + lcdinfo("Configuring the LCD controller\n"); /* Configure LCD periphery */ - gvdbg("Configure lcd periphery\n"); + lcdinfo("Configure lcd periphery\n"); stm32_ltdc_periphconfig(); /* Configure global ltdc register */ - gvdbg("Configure global register\n"); + lcdinfo("Configure global register\n"); stm32_global_configure(); #ifdef CONFIG_STM32_DMA2D @@ -3472,7 +3486,7 @@ int stm32_ltdcinitialize(void) /* Initialize ltdc layer */ - gvdbg("Initialize ltdc layer\n"); + lcdinfo("Initialize ltdc layer\n"); stm32_ltdc_linit(LTDC_LAYER_L1); #ifdef CONFIG_STM32_LTDC_L2 stm32_ltdc_linit(LTDC_LAYER_L2); @@ -3493,12 +3507,12 @@ int stm32_ltdcinitialize(void) /* Reload shadow register */ - gvdbg("Reload shadow register\n"); + lcdinfo("Reload shadow register\n"); stm32_ltdc_reload(LTDC_SRCR_IMR, false); /* Turn the LCD on */ - gvdbg("Enabling the display\n"); + lcdinfo("Enabling the display\n"); stm32_lcd_enable(true); /* Set initialized state */ @@ -3524,7 +3538,7 @@ int stm32_ltdcinitialize(void) struct fb_vtable_s *stm32_ltdcgetvplane(int vplane) { - gvdbg("vplane: %d\n", vplane); + lcdinfo("vplane: %d\n", vplane); if (vplane == 0) { @@ -3600,6 +3614,6 @@ void stm32_backlight(bool blon) { /* Set default backlight level CONFIG_STM32_LTDC_DEFBACKLIGHT */ - gdbg("Not supported\n"); + lcderr("ERROR: Not supported\n"); } #endif diff --git a/arch/arm/src/stm32/stm32_otgfsdev.c b/arch/arm/src/stm32/stm32_otgfsdev.c index 81fb004fbce49ee81cbc050ead8cbdfba63fad59..231d091a0cc8bbaedb1ce40af8638d31e9de05b7 100644 --- a/arch/arm/src/stm32/stm32_otgfsdev.c +++ b/arch/arm/src/stm32/stm32_otgfsdev.c @@ -81,6 +81,10 @@ # define CONFIG_USBDEV_MAXPOWER 100 /* mA */ #endif +#ifndef CONFIG_DEBUG_USB_INFO +# undef CONFIG_STM32_USBDEV_REGDEBUG +#endif + /* There is 1.25Kb of FIFO memory. The default partitions this memory * so that there is a TxFIFO allocated for each endpoint and with more * memory provided for the common RxFIFO. A more knowledge-able @@ -472,7 +476,7 @@ struct stm32_usbdev_s /* Register operations ********************************************************/ -#if defined(CONFIG_STM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_STM32_USBDEV_REGDEBUG static uint32_t stm32_getreg(uint32_t addr); static void stm32_putreg(uint32_t val, uint32_t addr); #else @@ -792,7 +796,7 @@ const struct trace_msg_t g_usb_trace_strings_intdecode[] = * ****************************************************************************/ -#if defined(CONFIG_STM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_STM32_USBDEV_REGDEBUG static uint32_t stm32_getreg(uint32_t addr) { static uint32_t prevaddr = 0; @@ -813,7 +817,7 @@ static uint32_t stm32_getreg(uint32_t addr) { if (count == 4) { - lldbg("...\n"); + uinfo("...\n"); } return val; @@ -830,7 +834,7 @@ static uint32_t stm32_getreg(uint32_t addr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + uinfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -842,7 +846,7 @@ static uint32_t stm32_getreg(uint32_t addr) /* Show the register value read */ - lldbg("%08x->%08x\n", addr, val); + uinfo("%08x->%08x\n", addr, val); return val; } #endif @@ -855,12 +859,12 @@ static uint32_t stm32_getreg(uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_STM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_STM32_USBDEV_REGDEBUG static void stm32_putreg(uint32_t val, uint32_t addr) { /* Show the register value being written */ - lldbg("%08x<-%08x\n", addr, val); + uinfo("%08x<-%08x\n", addr, val); /* Write the value */ @@ -1218,9 +1222,9 @@ static void stm32_epin_request(FAR struct stm32_usbdev_s *priv, return; } - ullvdbg("EP%d req=%p: len=%d xfrd=%d zlp=%d\n", - privep->epphy, privreq, privreq->req.len, - privreq->req.xfrd, privep->zlp); + uinfo("EP%d req=%p: len=%d xfrd=%d zlp=%d\n", + privep->epphy, privreq, privreq->req.len, + privreq->req.xfrd, privep->zlp); /* Check for a special case: If we are just starting a request (xfrd==0) and * the class driver is trying to send a zero-length packet (len==0). Then set @@ -1484,8 +1488,8 @@ static void stm32_epout_complete(FAR struct stm32_usbdev_s *priv, return; } - ullvdbg("EP%d: len=%d xfrd=%d\n", - privep->epphy, privreq->req.len, privreq->req.xfrd); + uinfo("EP%d: len=%d xfrd=%d\n", + privep->epphy, privreq->req.len, privreq->req.xfrd); /* Return the completed read request to the class driver and mark the state * IDLE. @@ -1519,7 +1523,7 @@ static inline void stm32_ep0out_receive(FAR struct stm32_ep_s *privep, int bcnt) DEBUGASSERT(privep && privep->ep.priv); priv = (FAR struct stm32_usbdev_s *)privep->ep.priv; - ullvdbg("EP0: bcnt=%d\n", bcnt); + uinfo("EP0: bcnt=%d\n", bcnt); usbtrace(TRACE_READ(EP0), bcnt); /* Verify that an OUT SETUP request as received before this data was @@ -1612,7 +1616,8 @@ static inline void stm32_epout_receive(FAR struct stm32_ep_s *privep, int bcnt) return; } - ullvdbg("EP%d: len=%d xfrd=%d\n", privep->epphy, privreq->req.len, privreq->req.xfrd); + uinfo("EP%d: len=%d xfrd=%d\n", + privep->epphy, privreq->req.len, privreq->req.xfrd); usbtrace(TRACE_READ(privep->epphy), bcnt); /* Get the number of bytes to transfer from the RxFIFO */ @@ -1696,7 +1701,7 @@ static void stm32_epout_request(FAR struct stm32_usbdev_s *priv, return; } - ullvdbg("EP%d: len=%d\n", privep->epphy, privreq->req.len); + uinfo("EP%d: len=%d\n", privep->epphy, privreq->req.len); /* Ignore any attempt to receive a zero length packet (this really * should not happen. @@ -2490,8 +2495,8 @@ static inline void stm32_ep0out_setup(struct stm32_usbdev_s *priv) ctrlreq.index = GETUINT16(priv->ctrlreq.index); ctrlreq.len = GETUINT16(priv->ctrlreq.len); - ullvdbg("type=%02x req=%02x value=%04x index=%04x len=%04x\n", - ctrlreq.type, ctrlreq.req, ctrlreq.value, ctrlreq.index, ctrlreq.len); + uinfo("type=%02x req=%02x value=%04x index=%04x len=%04x\n", + ctrlreq.type, ctrlreq.req, ctrlreq.value, ctrlreq.index, ctrlreq.len); /* Check for a standard request */ @@ -2625,7 +2630,7 @@ static inline void stm32_epout_interrupt(FAR struct stm32_usbdev_s *priv) if ((daint & 1) != 0) { regval = stm32_getreg(STM32_OTGFS_DOEPINT(epno)); - ulldbg("DOEPINT(%d) = %08x\n", epno, regval); + uinfo("DOEPINT(%d) = %08x\n", epno, regval); stm32_putreg(0xFF, STM32_OTGFS_DOEPINT(epno)); } @@ -2855,8 +2860,8 @@ static inline void stm32_epin_interrupt(FAR struct stm32_usbdev_s *priv) { if ((daint & 1) != 0) { - ulldbg("DIEPINT(%d) = %08x\n", - epno, stm32_getreg(STM32_OTGFS_DIEPINT(epno))); + uinfo("DIEPINT(%d) = %08x\n", + epno, stm32_getreg(STM32_OTGFS_DIEPINT(epno))); stm32_putreg(0xFF, STM32_OTGFS_DIEPINT(epno)); } @@ -3801,7 +3806,7 @@ static int stm32_epout_configure(FAR struct stm32_ep_s *privep, uint8_t eptype, break; default: - udbg("Unsupported maxpacket: %d\n", maxpacket); + uerr("ERROR: Unsupported maxpacket: %d\n", maxpacket); return -EINVAL; } } @@ -3896,7 +3901,7 @@ static int stm32_epin_configure(FAR struct stm32_ep_s *privep, uint8_t eptype, break; default: - udbg("Unsupported maxpacket: %d\n", maxpacket); + uerr("ERROR: Unsupported maxpacket: %d\n", maxpacket); return -EINVAL; } } @@ -4185,7 +4190,7 @@ static int stm32_ep_disable(FAR struct usbdev_ep_s *ep) { FAR struct stm32_ep_s *privep = (FAR struct stm32_ep_s *)ep; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); @@ -4225,7 +4230,7 @@ static FAR struct usbdev_req_s *stm32_ep_allocreq(FAR struct usbdev_ep_s *ep) { FAR struct stm32_req_s *privreq; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); @@ -4258,7 +4263,7 @@ static void stm32_ep_freereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s { FAR struct stm32_req_s *privreq = (FAR struct stm32_req_s *)req; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !req) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); @@ -4330,11 +4335,11 @@ static int stm32_ep_submit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s * /* Some sanity checking */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!req || !req->callback || !req->buf || !ep) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); - ullvdbg("req=%p callback=%p buf=%p ep=%p\n", req, req->callback, req->buf, ep); + uinfo("req=%p callback=%p buf=%p ep=%p\n", req, req->callback, req->buf, ep); return -EINVAL; } #endif @@ -4342,7 +4347,7 @@ static int stm32_ep_submit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s * usbtrace(TRACE_EPSUBMIT, privep->epphy); priv = privep->dev; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv->driver) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_NOTCONFIGURED), priv->usbdev.speed); @@ -4419,7 +4424,7 @@ static int stm32_ep_cancel(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s * FAR struct stm32_ep_s *privep = (FAR struct stm32_ep_s *)ep; irqstate_t flags; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !req) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); @@ -4877,7 +4882,7 @@ static int stm32_selfpowered(struct usbdev_s *dev, bool selfpowered) usbtrace(TRACE_DEVSELFPOWERED, (uint16_t)selfpowered); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); @@ -5447,7 +5452,7 @@ void up_usbinitialize(void) ret = irq_attach(STM32_IRQ_OTGFS, stm32_usbinterrupt); if (ret < 0) { - udbg("irq_attach failed\n", ret); + uerr("ERROR: irq_attach failed\n", ret); goto errout; } @@ -5560,7 +5565,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) usbtrace(TRACE_DEVREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !driver->ops->bind || !driver->ops->unbind || !driver->ops->disconnect || !driver->ops->setup) { @@ -5631,7 +5636,7 @@ int usbdev_unregister(struct usbdevclass_driver_s *driver) usbtrace(TRACE_DEVUNREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (driver != priv->driver) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); diff --git a/arch/arm/src/stm32/stm32_otgfshost.c b/arch/arm/src/stm32/stm32_otgfshost.c index 81f6ded2697d4c576038b7bc699d319771118fb8..6c340c81fb10511aaa1bdf7544b624d2332f0e34 100644 --- a/arch/arm/src/stm32/stm32_otgfshost.c +++ b/arch/arm/src/stm32/stm32_otgfshost.c @@ -93,9 +93,9 @@ * CONFIG_STM32_OTGFS_SOFINTR - Enable SOF interrupts. Why would you ever * want to do that? * CONFIG_STM32_USBHOST_REGDEBUG - Enable very low-level register access - * debug. Depends on CONFIG_DEBUG. + * debug. Depends on CONFIG_DEBUG_FEATURES. * CONFIG_STM32_USBHOST_PKTDUMP - Dump all incoming and outgoing USB - * packets. Depends on CONFIG_DEBUG. + * packets. Depends on CONFIG_DEBUG_FEATURES. */ /* Pre-requisites (partial) */ @@ -128,9 +128,9 @@ # define CONFIG_STM32_OTGFS_DESCSIZE 128 #endif -/* Register/packet debug depends on CONFIG_DEBUG */ +/* Register/packet debug depends on CONFIG_DEBUG_FEATURES */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_USB_INFO # undef CONFIG_STM32_USBHOST_REGDEBUG # undef CONFIG_STM32_USBHOST_PKTDUMP #endif @@ -506,7 +506,7 @@ static struct usbhost_connection_s g_usbconn = #ifdef CONFIG_STM32_USBHOST_REGDEBUG static void stm32_printreg(uint32_t addr, uint32_t val, bool iswrite) { - lldbg("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val); + uinfo("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val); } #endif @@ -556,7 +556,7 @@ static void stm32_checkreg(uint32_t addr, uint32_t val, bool iswrite) { /* No.. More than one. */ - lldbg("[repeats %d more times]\n", count); + uinfo("[repeats %d more times]\n", count); } } @@ -1284,7 +1284,7 @@ static int stm32_ctrlep_alloc(FAR struct stm32_usbhost_s *priv, ctrlep = (FAR struct stm32_ctrlinfo_s *)kmm_malloc(sizeof(struct stm32_ctrlinfo_s)); if (ctrlep == NULL) { - udbg("ERROR: Failed to allocate control endpoint container\n"); + uerr("ERROR: Failed to allocate control endpoint container\n"); return -ENOMEM; } @@ -1294,7 +1294,7 @@ static int stm32_ctrlep_alloc(FAR struct stm32_usbhost_s *priv, hport->funcaddr, hport->speed, ctrlep); if (ret < 0) { - udbg("ERROR: stm32_ctrlchan_alloc failed: %d\n", ret); + uerr("ERROR: stm32_ctrlchan_alloc failed: %d\n", ret); kmm_free(ctrlep); return ret; } @@ -1346,7 +1346,7 @@ static int stm32_xfrep_alloc(FAR struct stm32_usbhost_s *priv, chidx = stm32_chan_alloc(priv); if (chidx < 0) { - udbg("ERROR: Failed to allocate a host channel\n"); + uerr("ERROR: Failed to allocate a host channel\n"); return -ENOMEM; } @@ -1856,7 +1856,7 @@ static ssize_t stm32_in_transfer(FAR struct stm32_usbhost_s *priv, int chidx, ret = stm32_in_setup(priv, chidx); if (ret < 0) { - udbg("ERROR: stm32_in_setup failed: %d\n", ret); + uerr("ERROR: stm32_in_setup failed: %d\n", ret); return (ssize_t)ret; } @@ -1887,7 +1887,7 @@ static ssize_t stm32_in_transfer(FAR struct stm32_usbhost_s *priv, int chidx, { /* Break out and return the error */ - udbg("ERROR: stm32_chan_wait failed: %d\n", ret); + uerr("ERROR: stm32_chan_wait failed: %d\n", ret); return (ssize_t)ret; } } @@ -1932,13 +1932,13 @@ static void stm32_in_next(FAR struct stm32_usbhost_s *priv, return; } - udbg("ERROR: stm32_in_setup failed: %d\n", ret); + uerr("ERROR: stm32_in_setup failed: %d\n", ret); result = ret; } /* The transfer is complete, with or without an error */ - uvdbg("Transfer complete: %d\n", result); + uinfo("Transfer complete: %d\n", result); /* Extract the callback information */ @@ -1990,7 +1990,7 @@ static int stm32_in_asynch(FAR struct stm32_usbhost_s *priv, int chidx, ret = stm32_chan_asynchsetup(priv, chan, callback, arg); if (ret < 0) { - udbg("ERROR: stm32_chan_asynchsetup failed: %d\n", ret); + uerr("ERROR: stm32_chan_asynchsetup failed: %d\n", ret); return ret; } @@ -1999,7 +1999,7 @@ static int stm32_in_asynch(FAR struct stm32_usbhost_s *priv, int chidx, ret = stm32_in_setup(priv, chidx); if (ret < 0) { - udbg("ERROR: stm32_in_setup failed: %d\n", ret); + uerr("ERROR: stm32_in_setup failed: %d\n", ret); } /* And return with the transfer pending */ @@ -2125,7 +2125,7 @@ static ssize_t stm32_out_transfer(FAR struct stm32_usbhost_s *priv, int chidx, ret = stm32_out_setup(priv, chidx); if (ret < 0) { - udbg("ERROR: stm32_out_setup failed: %d\n", ret); + uerr("ERROR: stm32_out_setup failed: %d\n", ret); return (ssize_t)ret; } @@ -2153,7 +2153,7 @@ static ssize_t stm32_out_transfer(FAR struct stm32_usbhost_s *priv, int chidx, { /* Break out and return the error */ - udbg("ERROR: stm32_chan_wait failed: %d\n", ret); + uerr("ERROR: stm32_chan_wait failed: %d\n", ret); return (ssize_t)ret; } @@ -2218,13 +2218,13 @@ static void stm32_out_next(FAR struct stm32_usbhost_s *priv, return; } - udbg("ERROR: stm32_out_setup failed: %d\n", ret); + uerr("ERROR: stm32_out_setup failed: %d\n", ret); result = ret; } /* The transfer is complete, with or without an error */ - uvdbg("Transfer complete: %d\n", result); + uinfo("Transfer complete: %d\n", result); /* Extract the callback information */ @@ -2276,7 +2276,7 @@ static int stm32_out_asynch(FAR struct stm32_usbhost_s *priv, int chidx, ret = stm32_chan_asynchsetup(priv, chan, callback, arg); if (ret < 0) { - udbg("ERROR: stm32_chan_asynchsetup failed: %d\n", ret); + uerr("ERROR: stm32_chan_asynchsetup failed: %d\n", ret); return ret; } @@ -2285,7 +2285,7 @@ static int stm32_out_asynch(FAR struct stm32_usbhost_s *priv, int chidx, ret = stm32_out_setup(priv, chidx); if (ret < 0) { - udbg("ERROR: stm32_out_setup failed: %d\n", ret); + uerr("ERROR: stm32_out_setup failed: %d\n", ret); } /* And return with the transfer pending */ @@ -2370,7 +2370,7 @@ static inline void stm32_gint_hcinisr(FAR struct stm32_usbhost_s *priv, /* AND the two to get the set of enabled, pending HC interrupts */ pending &= regval; - ullvdbg("HCINTMSK%d: %08x pending: %08x\n", chidx, regval, pending); + uinfo("HCINTMSK%d: %08x pending: %08x\n", chidx, regval, pending); /* Check for a pending ACK response received/transmitted (ACK) interrupt */ @@ -2631,7 +2631,7 @@ static inline void stm32_gint_hcoutisr(FAR struct stm32_usbhost_s *priv, /* AND the two to get the set of enabled, pending HC interrupts */ pending &= regval; - ullvdbg("HCINTMSK%d: %08x pending: %08x\n", chidx, regval, pending); + uinfo("HCINTMSK%d: %08x pending: %08x\n", chidx, regval, pending); /* Check for a pending ACK response received/transmitted (ACK) interrupt */ @@ -2949,7 +2949,7 @@ static inline void stm32_gint_rxflvlisr(FAR struct stm32_usbhost_s *priv) /* Read and pop the next status from the Rx FIFO */ grxsts = stm32_getreg(STM32_OTGFS_GRXSTSP); - ullvdbg("GRXSTS: %08x\n", grxsts); + uinfo("GRXSTS: %08x\n", grxsts); /* Isolate the channel number/index in the status word */ @@ -3102,8 +3102,8 @@ static inline void stm32_gint_nptxfeisr(FAR struct stm32_usbhost_s *priv) /* Write the next group of packets into the Tx FIFO */ - ullvdbg("HNPTXSTS: %08x chidx: %d avail: %d buflen: %d xfrd: %d wrsize: %d\n", - regval, chidx, avail, chan->buflen, chan->xfrd, wrsize); + uinfo("HNPTXSTS: %08x chidx: %d avail: %d buflen: %d xfrd: %d wrsize: %d\n", + regval, chidx, avail, chan->buflen, chan->xfrd, wrsize); stm32_gint_wrpacket(priv, chan->buffer, chidx, wrsize); } @@ -3190,8 +3190,8 @@ static inline void stm32_gint_ptxfeisr(FAR struct stm32_usbhost_s *priv) /* Write the next group of packets into the Tx FIFO */ - ullvdbg("HPTXSTS: %08x chidx: %d avail: %d buflen: %d xfrd: %d wrsize: %d\n", - regval, chidx, avail, chan->buflen, chan->xfrd, wrsize); + uinfo("HPTXSTS: %08x chidx: %d avail: %d buflen: %d xfrd: %d wrsize: %d\n", + regval, chidx, avail, chan->buflen, chan->xfrd, wrsize); stm32_gint_wrpacket(priv, chan->buffer, chidx, wrsize); } @@ -3760,7 +3760,7 @@ static int stm32_wait(FAR struct usbhost_connection_s *conn, *hport = connport; leave_critical_section(flags); - uvdbg("RHport Connected: %s\n", connport->connected ? "YES" : "NO"); + uinfo("RHport Connected: %s\n", connport->connected ? "YES" : "NO"); return OK; } @@ -3777,7 +3777,7 @@ static int stm32_wait(FAR struct usbhost_connection_s *conn, *hport = connport; leave_critical_section(flags); - uvdbg("Hub port Connected: %s\n", connport->connected ? "YES" : "NO"); + uinfo("Hub port Connected: %s\n", connport->connected ? "YES" : "NO"); return OK; } #endif @@ -3865,7 +3865,7 @@ static int stm32_rh_enumerate(FAR struct stm32_usbhost_s *priv, ret = stm32_ctrlchan_alloc(priv, 0, 0, priv->rhport.hport.speed, &priv->ep0); if (ret < 0) { - udbg("ERROR: Failed to allocate a control endpoint: %d\n", ret); + uerr("ERROR: Failed to allocate a control endpoint: %d\n", ret); } return ret; @@ -3897,7 +3897,7 @@ static int stm32_enumerate(FAR struct usbhost_connection_s *conn, /* Then let the common usbhost_enumerate do the real enumeration. */ - uvdbg("Enumerate the device\n"); + uinfo("Enumerate the device\n"); priv->smstate = SMSTATE_ENUM; ret = usbhost_enumerate(hport, &hport->devclass); @@ -3911,7 +3911,7 @@ static int stm32_enumerate(FAR struct usbhost_connection_s *conn, { /* Return to the disconnected state */ - udbg("ERROR: Enumeration failed: %d\n", ret); + uerr("ERROR: Enumeration failed: %d\n", ret); stm32_gint_disconnected(priv); } @@ -4312,7 +4312,7 @@ static int stm32_ctrlin(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, DEBUGASSERT(priv != NULL && ep0info != NULL && req != NULL); usbhost_vtrace2(OTGFS_VTRACE2_CTRLIN, req->type, req->req); - uvdbg("type:%02x req:%02x value:%02x%02x index:%02x%02x len:%02x%02x\n", + uinfo("type:%02x req:%02x value:%02x%02x index:%02x%02x len:%02x%02x\n", req->type, req->req, req->value[1], req->value[0], req->index[1], req->index[0], req->len[1], req->len[0]); @@ -4397,7 +4397,7 @@ static int stm32_ctrlout(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, DEBUGASSERT(priv != NULL && ep0info != NULL && req != NULL); usbhost_vtrace2(OTGFS_VTRACE2_CTRLOUT, req->type, req->req); - uvdbg("type:%02x req:%02x value:%02x%02x index:%02x%02x len:%02x%02x\n", + uinfo("type:%02x req:%02x value:%02x%02x index:%02x%02x len:%02x%02x\n", req->type, req->req, req->value[1], req->value[0], req->index[1], req->index[0], req->len[1], req->len[0]); @@ -4515,7 +4515,7 @@ static ssize_t stm32_transfer(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep unsigned int chidx = (unsigned int)ep; ssize_t nbytes; - uvdbg("chidx: %d buflen: %d\n", (unsigned int)ep, buflen); + uinfo("chidx: %d buflen: %d\n", (unsigned int)ep, buflen); DEBUGASSERT(priv && buffer && chidx < STM32_MAX_TX_FIFOS && buflen > 0); @@ -4582,7 +4582,7 @@ static int stm32_asynch(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep, unsigned int chidx = (unsigned int)ep; int ret; - uvdbg("chidx: %d buflen: %d\n", (unsigned int)ep, buflen); + uinfo("chidx: %d buflen: %d\n", (unsigned int)ep, buflen); DEBUGASSERT(priv && buffer && chidx < STM32_MAX_TX_FIFOS && buflen > 0); @@ -4632,7 +4632,7 @@ static int stm32_cancel(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep) unsigned int chidx = (unsigned int)ep; irqstate_t flags; - uvdbg("chidx: %u: %d\n", chidx); + uinfo("chidx: %u: %d\n", chidx); DEBUGASSERT(priv && chidx < STM32_MAX_TX_FIFOS); chan = &priv->chan[chidx]; @@ -4727,7 +4727,7 @@ static int stm32_connect(FAR struct usbhost_driver_s *drvr, /* Set the connected/disconnected flag */ hport->connected = connected; - ullvdbg("Hub port %d connected: %s\n", hport->port, connected ? "YES" : "NO"); + uinfo("Hub port %d connected: %s\n", hport->port, connected ? "YES" : "NO"); /* Report the connection event */ diff --git a/arch/arm/src/stm32/stm32_otghsdev.c b/arch/arm/src/stm32/stm32_otghsdev.c index 07e9f0af1ca694661d14f28d6947f6dde2ce3628..97d71aa0aa900daa6243fc78d40ea1c87e079a13 100644 --- a/arch/arm/src/stm32/stm32_otghsdev.c +++ b/arch/arm/src/stm32/stm32_otghsdev.c @@ -81,6 +81,10 @@ # define CONFIG_USBDEV_MAXPOWER 100 /* mA */ #endif +#ifndef CONFIG_DEBUG_USB_INFO +# undef CONFIG_STM32_USBDEV_REGDEBUG +#endif + /* There is 1.25Kb of FIFO memory. The default partitions this memory * so that there is a TxFIFO allocated for each endpoint and with more * memory provided for the common RxFIFO. A more knowledge-able @@ -472,7 +476,7 @@ struct stm32_usbdev_s /* Register operations ********************************************************/ -#if defined(CONFIG_STM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_STM32_USBDEV_REGDEBUG static uint32_t stm32_getreg(uint32_t addr); static void stm32_putreg(uint32_t val, uint32_t addr); #else @@ -792,7 +796,7 @@ const struct trace_msg_t g_usb_trace_strings_intdecode[] = * ****************************************************************************/ -#if defined(CONFIG_STM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_STM32_USBDEV_REGDEBUG static uint32_t stm32_getreg(uint32_t addr) { static uint32_t prevaddr = 0; @@ -813,7 +817,7 @@ static uint32_t stm32_getreg(uint32_t addr) { if (count == 4) { - lldbg("...\n"); + uinfo("...\n"); } return val; @@ -830,7 +834,7 @@ static uint32_t stm32_getreg(uint32_t addr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + uinfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -842,7 +846,7 @@ static uint32_t stm32_getreg(uint32_t addr) /* Show the register value read */ - lldbg("%08x->%08x\n", addr, val); + uinfo("%08x->%08x\n", addr, val); return val; } #endif @@ -855,12 +859,12 @@ static uint32_t stm32_getreg(uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_STM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_STM32_USBDEV_REGDEBUG static void stm32_putreg(uint32_t val, uint32_t addr) { /* Show the register value being written */ - lldbg("%08x<-%08x\n", addr, val); + uinfo("%08x<-%08x\n", addr, val); /* Write the value */ @@ -1218,9 +1222,9 @@ static void stm32_epin_request(FAR struct stm32_usbdev_s *priv, return; } - ullvdbg("EP%d req=%p: len=%d xfrd=%d zlp=%d\n", - privep->epphy, privreq, privreq->req.len, - privreq->req.xfrd, privep->zlp); + uinfo("EP%d req=%p: len=%d xfrd=%d zlp=%d\n", + privep->epphy, privreq, privreq->req.len, + privreq->req.xfrd, privep->zlp); /* Check for a special case: If we are just starting a request (xfrd==0) and * the class driver is trying to send a zero-length packet (len==0). Then set @@ -1484,8 +1488,8 @@ static void stm32_epout_complete(FAR struct stm32_usbdev_s *priv, return; } - ullvdbg("EP%d: len=%d xfrd=%d\n", - privep->epphy, privreq->req.len, privreq->req.xfrd); + uinfo("EP%d: len=%d xfrd=%d\n", + privep->epphy, privreq->req.len, privreq->req.xfrd); /* Return the completed read request to the class driver and mark the state * IDLE. @@ -1519,7 +1523,7 @@ static inline void stm32_ep0out_receive(FAR struct stm32_ep_s *privep, int bcnt) DEBUGASSERT(privep && privep->ep.priv); priv = (FAR struct stm32_usbdev_s *)privep->ep.priv; - ullvdbg("EP0: bcnt=%d\n", bcnt); + uinfo("EP0: bcnt=%d\n", bcnt); usbtrace(TRACE_READ(EP0), bcnt); /* Verify that an OUT SETUP request as received before this data was @@ -1612,7 +1616,8 @@ static inline void stm32_epout_receive(FAR struct stm32_ep_s *privep, int bcnt) return; } - ullvdbg("EP%d: len=%d xfrd=%d\n", privep->epphy, privreq->req.len, privreq->req.xfrd); + uinfo("EP%d: len=%d xfrd=%d\n", + privep->epphy, privreq->req.len, privreq->req.xfrd); usbtrace(TRACE_READ(privep->epphy), bcnt); /* Get the number of bytes to transfer from the RxFIFO */ @@ -1696,7 +1701,7 @@ static void stm32_epout_request(FAR struct stm32_usbdev_s *priv, return; } - ullvdbg("EP%d: len=%d\n", privep->epphy, privreq->req.len); + uinfo("EP%d: len=%d\n", privep->epphy, privreq->req.len); /* Ignore any attempt to receive a zero length packet (this really * should not happen. @@ -2490,8 +2495,8 @@ static inline void stm32_ep0out_setup(struct stm32_usbdev_s *priv) ctrlreq.index = GETUINT16(priv->ctrlreq.index); ctrlreq.len = GETUINT16(priv->ctrlreq.len); - ullvdbg("type=%02x req=%02x value=%04x index=%04x len=%04x\n", - ctrlreq.type, ctrlreq.req, ctrlreq.value, ctrlreq.index, ctrlreq.len); + uinfo("type=%02x req=%02x value=%04x index=%04x len=%04x\n", + ctrlreq.type, ctrlreq.req, ctrlreq.value, ctrlreq.index, ctrlreq.len); /* Check for a standard request */ @@ -2625,7 +2630,7 @@ static inline void stm32_epout_interrupt(FAR struct stm32_usbdev_s *priv) if ((daint & 1) != 0) { regval = stm32_getreg(STM32_OTGHS_DOEPINT(epno)); - ulldbg("DOEPINT(%d) = %08x\n", epno, regval); + uinfo("DOEPINT(%d) = %08x\n", epno, regval); stm32_putreg(0xFF, STM32_OTGHS_DOEPINT(epno)); } @@ -2855,8 +2860,8 @@ static inline void stm32_epin_interrupt(FAR struct stm32_usbdev_s *priv) { if ((daint & 1) != 0) { - ulldbg("DIEPINT(%d) = %08x\n", - epno, stm32_getreg(STM32_OTGHS_DIEPINT(epno))); + uinfo("DIEPINT(%d) = %08x\n", + epno, stm32_getreg(STM32_OTGHS_DIEPINT(epno))); stm32_putreg(0xFF, STM32_OTGHS_DIEPINT(epno)); } @@ -3801,7 +3806,7 @@ static int stm32_epout_configure(FAR struct stm32_ep_s *privep, uint8_t eptype, break; default: - udbg("Unsupported maxpacket: %d\n", maxpacket); + uerr("ERROR: Unsupported maxpacket: %d\n", maxpacket); return -EINVAL; } } @@ -3896,7 +3901,7 @@ static int stm32_epin_configure(FAR struct stm32_ep_s *privep, uint8_t eptype, break; default: - udbg("Unsupported maxpacket: %d\n", maxpacket); + uerr("ERROR: Unsupported maxpacket: %d\n", maxpacket); return -EINVAL; } } @@ -4185,7 +4190,7 @@ static int stm32_ep_disable(FAR struct usbdev_ep_s *ep) { FAR struct stm32_ep_s *privep = (FAR struct stm32_ep_s *)ep; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); @@ -4225,7 +4230,7 @@ static FAR struct usbdev_req_s *stm32_ep_allocreq(FAR struct usbdev_ep_s *ep) { FAR struct stm32_req_s *privreq; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); @@ -4258,7 +4263,7 @@ static void stm32_ep_freereq(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s { FAR struct stm32_req_s *privreq = (FAR struct stm32_req_s *)req; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !req) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); @@ -4330,11 +4335,11 @@ static int stm32_ep_submit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s * /* Some sanity checking */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!req || !req->callback || !req->buf || !ep) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); - ullvdbg("req=%p callback=%p buf=%p ep=%p\n", req, req->callback, req->buf, ep); + uinfo("req=%p callback=%p buf=%p ep=%p\n", req, req->callback, req->buf, ep); return -EINVAL; } #endif @@ -4342,7 +4347,7 @@ static int stm32_ep_submit(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s * usbtrace(TRACE_EPSUBMIT, privep->epphy); priv = privep->dev; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv->driver) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_NOTCONFIGURED), priv->usbdev.speed); @@ -4419,7 +4424,7 @@ static int stm32_ep_cancel(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s * FAR struct stm32_ep_s *privep = (FAR struct stm32_ep_s *)ep; irqstate_t flags; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !req) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); @@ -4877,7 +4882,7 @@ static int stm32_selfpowered(struct usbdev_s *dev, bool selfpowered) usbtrace(TRACE_DEVSELFPOWERED, (uint16_t)selfpowered); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); @@ -5436,7 +5441,7 @@ void up_usbinitialize(void) ret = irq_attach(STM32_IRQ_OTGHS, stm32_usbinterrupt); if (ret < 0) { - udbg("irq_attach failed\n", ret); + uerr("ERROR: irq_attach failed\n", ret); goto errout; } @@ -5549,7 +5554,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) usbtrace(TRACE_DEVREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !driver->ops->bind || !driver->ops->unbind || !driver->ops->disconnect || !driver->ops->setup) { @@ -5620,7 +5625,7 @@ int usbdev_unregister(struct usbdevclass_driver_s *driver) usbtrace(TRACE_DEVUNREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (driver != priv->driver) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); diff --git a/arch/arm/src/stm32/stm32_otghshost.c b/arch/arm/src/stm32/stm32_otghshost.c index 4c6252a0291e9d5b05404c052bbaca26b15e2862..12a511415bde8bde6d3bf4b9c97ba80f78d4efdb 100644 --- a/arch/arm/src/stm32/stm32_otghshost.c +++ b/arch/arm/src/stm32/stm32_otghshost.c @@ -93,9 +93,9 @@ * CONFIG_STM32_OTGHS_SOFINTR - Enable SOF interrupts. Why would you ever * want to do that? * CONFIG_STM32_USBHOST_REGDEBUG - Enable very low-level register access - * debug. Depends on CONFIG_DEBUG. + * debug. Depends on CONFIG_DEBUG_FEATURES. * CONFIG_STM32_USBHOST_PKTDUMP - Dump all incoming and outgoing USB - * packets. Depends on CONFIG_DEBUG. + * packets. Depends on CONFIG_DEBUG_FEATURES. */ /* Pre-requisites (partial) */ @@ -128,9 +128,9 @@ # define CONFIG_STM32_OTGHS_DESCSIZE 128 #endif -/* Register/packet debug depends on CONFIG_DEBUG */ +/* Register/packet debug depends on CONFIG_DEBUG_FEATURES */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_USB_INFO # undef CONFIG_STM32_USBHOST_REGDEBUG # undef CONFIG_STM32_USBHOST_PKTDUMP #endif @@ -506,7 +506,7 @@ static struct usbhost_connection_s g_usbconn = #ifdef CONFIG_STM32_USBHOST_REGDEBUG static void stm32_printreg(uint32_t addr, uint32_t val, bool iswrite) { - lldbg("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val); + uinfo("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val); } #endif @@ -556,7 +556,7 @@ static void stm32_checkreg(uint32_t addr, uint32_t val, bool iswrite) { /* No.. More than one. */ - lldbg("[repeats %d more times]\n", count); + uinfo("[repeats %d more times]\n", count); } } @@ -1284,7 +1284,7 @@ static int stm32_ctrlep_alloc(FAR struct stm32_usbhost_s *priv, ctrlep = (FAR struct stm32_ctrlinfo_s *)kmm_malloc(sizeof(struct stm32_ctrlinfo_s)); if (ctrlep == NULL) { - udbg("ERROR: Failed to allocate control endpoint container\n"); + uerr("ERROR: Failed to allocate control endpoint container\n"); return -ENOMEM; } @@ -1294,7 +1294,7 @@ static int stm32_ctrlep_alloc(FAR struct stm32_usbhost_s *priv, hport->funcaddr, hport->speed, ctrlep); if (ret < 0) { - udbg("ERROR: stm32_ctrlchan_alloc failed: %d\n", ret); + uerr("ERROR: stm32_ctrlchan_alloc failed: %d\n", ret); kmm_free(ctrlep); return ret; } @@ -1346,7 +1346,7 @@ static int stm32_xfrep_alloc(FAR struct stm32_usbhost_s *priv, chidx = stm32_chan_alloc(priv); if (chidx < 0) { - udbg("ERROR: Failed to allocate a host channel\n"); + uerr("ERROR: Failed to allocate a host channel\n"); return -ENOMEM; } @@ -1856,7 +1856,7 @@ static ssize_t stm32_in_transfer(FAR struct stm32_usbhost_s *priv, int chidx, ret = stm32_in_setup(priv, chidx); if (ret < 0) { - udbg("ERROR: stm32_in_setup failed: %d\n", ret); + uerr("ERROR: stm32_in_setup failed: %d\n", ret); return (ssize_t)ret; } @@ -1887,7 +1887,7 @@ static ssize_t stm32_in_transfer(FAR struct stm32_usbhost_s *priv, int chidx, { /* Break out and return the error */ - udbg("ERROR: stm32_chan_wait failed: %d\n", ret); + uerr("ERROR: stm32_chan_wait failed: %d\n", ret); return (ssize_t)ret; } } @@ -1932,13 +1932,13 @@ static void stm32_in_next(FAR struct stm32_usbhost_s *priv, return; } - udbg("ERROR: stm32_in_setup failed: %d\n", ret); + uerr("ERROR: stm32_in_setup failed: %d\n", ret); result = ret; } /* The transfer is complete, with or without an error */ - uvdbg("Transfer complete: %d\n", result); + uinfo("Transfer complete: %d\n", result); /* Extract the callback information */ @@ -1990,7 +1990,7 @@ static int stm32_in_asynch(FAR struct stm32_usbhost_s *priv, int chidx, ret = stm32_chan_asynchsetup(priv, chan, callback, arg); if (ret < 0) { - udbg("ERROR: stm32_chan_asynchsetup failed: %d\n", ret); + uerr("ERROR: stm32_chan_asynchsetup failed: %d\n", ret); return ret; } @@ -1999,7 +1999,7 @@ static int stm32_in_asynch(FAR struct stm32_usbhost_s *priv, int chidx, ret = stm32_in_setup(priv, chidx); if (ret < 0) { - udbg("ERROR: stm32_in_setup failed: %d\n", ret); + uerr("ERROR: stm32_in_setup failed: %d\n", ret); } /* And return with the transfer pending */ @@ -2125,7 +2125,7 @@ static ssize_t stm32_out_transfer(FAR struct stm32_usbhost_s *priv, int chidx, ret = stm32_out_setup(priv, chidx); if (ret < 0) { - udbg("ERROR: stm32_out_setup failed: %d\n", ret); + uerr("ERROR: stm32_out_setup failed: %d\n", ret); return (ssize_t)ret; } @@ -2153,7 +2153,7 @@ static ssize_t stm32_out_transfer(FAR struct stm32_usbhost_s *priv, int chidx, { /* Break out and return the error */ - udbg("ERROR: stm32_chan_wait failed: %d\n", ret); + uerr("ERROR: stm32_chan_wait failed: %d\n", ret); return (ssize_t)ret; } @@ -2218,13 +2218,13 @@ static void stm32_out_next(FAR struct stm32_usbhost_s *priv, return; } - udbg("ERROR: stm32_out_setup failed: %d\n", ret); + uerr("ERROR: stm32_out_setup failed: %d\n", ret); result = ret; } /* The transfer is complete, with or without an error */ - uvdbg("Transfer complete: %d\n", result); + uinfo("Transfer complete: %d\n", result); /* Extract the callback information */ @@ -2276,7 +2276,7 @@ static int stm32_out_asynch(FAR struct stm32_usbhost_s *priv, int chidx, ret = stm32_chan_asynchsetup(priv, chan, callback, arg); if (ret < 0) { - udbg("ERROR: stm32_chan_asynchsetup failed: %d\n", ret); + uerr("ERROR: stm32_chan_asynchsetup failed: %d\n", ret); return ret; } @@ -2285,7 +2285,7 @@ static int stm32_out_asynch(FAR struct stm32_usbhost_s *priv, int chidx, ret = stm32_out_setup(priv, chidx); if (ret < 0) { - udbg("ERROR: stm32_out_setup failed: %d\n", ret); + uerr("ERROR: stm32_out_setup failed: %d\n", ret); } /* And return with the transfer pending */ @@ -2370,7 +2370,7 @@ static inline void stm32_gint_hcinisr(FAR struct stm32_usbhost_s *priv, /* AND the two to get the set of enabled, pending HC interrupts */ pending &= regval; - ullvdbg("HCINTMSK%d: %08x pending: %08x\n", chidx, regval, pending); + uinfo("HCINTMSK%d: %08x pending: %08x\n", chidx, regval, pending); /* Check for a pending ACK response received/transmitted (ACK) interrupt */ @@ -2631,7 +2631,7 @@ static inline void stm32_gint_hcoutisr(FAR struct stm32_usbhost_s *priv, /* AND the two to get the set of enabled, pending HC interrupts */ pending &= regval; - ullvdbg("HCINTMSK%d: %08x pending: %08x\n", chidx, regval, pending); + uinfo("HCINTMSK%d: %08x pending: %08x\n", chidx, regval, pending); /* Check for a pending ACK response received/transmitted (ACK) interrupt */ @@ -2949,7 +2949,7 @@ static inline void stm32_gint_rxflvlisr(FAR struct stm32_usbhost_s *priv) /* Read and pop the next status from the Rx FIFO */ grxsts = stm32_getreg(STM32_OTGHS_GRXSTSP); - ullvdbg("GRXSTS: %08x\n", grxsts); + uinfo("GRXSTS: %08x\n", grxsts); /* Isolate the channel number/index in the status word */ @@ -3102,8 +3102,8 @@ static inline void stm32_gint_nptxfeisr(FAR struct stm32_usbhost_s *priv) /* Write the next group of packets into the Tx FIFO */ - ullvdbg("HNPTXSTS: %08x chidx: %d avail: %d buflen: %d xfrd: %dwrsize: %d\n", - regval, chidx, avail, chan->buflen, chan->xfrd, wrsize); + uinfo("HNPTXSTS: %08x chidx: %d avail: %d buflen: %d xfrd: %dwrsize: %d\n", + regval, chidx, avail, chan->buflen, chan->xfrd, wrsize); stm32_gint_wrpacket(priv, chan->buffer, chidx, wrsize); } @@ -3190,8 +3190,8 @@ static inline void stm32_gint_ptxfeisr(FAR struct stm32_usbhost_s *priv) /* Write the next group of packets into the Tx FIFO */ - ullvdbg("HPTXSTS: %08x chidx: %d avail: %d buflen: %d xfrd: %d wrsize: %d\n", - regval, chidx, avail, chan->buflen, chan->xfrd, wrsize); + uinfo("HPTXSTS: %08x chidx: %d avail: %d buflen: %d xfrd: %d wrsize: %d\n", + regval, chidx, avail, chan->buflen, chan->xfrd, wrsize); stm32_gint_wrpacket(priv, chan->buffer, chidx, wrsize); } @@ -3760,7 +3760,7 @@ static int stm32_wait(FAR struct usbhost_connection_s *conn, *hport = connport; leave_critical_section(flags); - uvdbg("RHport Connected: %s\n", connport->connected ? "YES" : "NO"); + uinfo("RHport Connected: %s\n", connport->connected ? "YES" : "NO"); return OK; } @@ -3777,7 +3777,7 @@ static int stm32_wait(FAR struct usbhost_connection_s *conn, *hport = connport; leave_critical_section(flags); - uvdbg("Hub port Connected: %s\n", connport->connected ? "YES" : "NO"); + uinfo("Hub port Connected: %s\n", connport->connected ? "YES" : "NO"); return OK; } #endif @@ -3865,7 +3865,7 @@ static int stm32_rh_enumerate(FAR struct stm32_usbhost_s *priv, ret = stm32_ctrlchan_alloc(priv, 0, 0, priv->rhport.hport.speed, &priv->ep0); if (ret < 0) { - udbg("ERROR: Failed to allocate a control endpoint: %d\n", ret); + uerr("ERROR: Failed to allocate a control endpoint: %d\n", ret); } return ret; @@ -3897,7 +3897,7 @@ static int stm32_enumerate(FAR struct usbhost_connection_s *conn, /* Then let the common usbhost_enumerate do the real enumeration. */ - uvdbg("Enumerate the device\n"); + uinfo("Enumerate the device\n"); priv->smstate = SMSTATE_ENUM; ret = usbhost_enumerate(hport, &hport->devclass); @@ -3911,7 +3911,7 @@ static int stm32_enumerate(FAR struct usbhost_connection_s *conn, { /* Return to the disconnected state */ - udbg("ERROR: Enumeration failed: %d\n", ret); + uerr("ERROR: Enumeration failed: %d\n", ret); stm32_gint_disconnected(priv); } @@ -4312,7 +4312,7 @@ static int stm32_ctrlin(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, DEBUGASSERT(priv != NULL && ep0info != NULL && req != NULL); usbhost_vtrace2(OTGHS_VTRACE2_CTRLIN, req->type, req->req); - uvdbg("type:%02x req:%02x value:%02x%02x index:%02x%02x len:%02x%02x\n", + uinfo("type:%02x req:%02x value:%02x%02x index:%02x%02x len:%02x%02x\n", req->type, req->req, req->value[1], req->value[0], req->index[1], req->index[0], req->len[1], req->len[0]); @@ -4397,7 +4397,7 @@ static int stm32_ctrlout(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0, DEBUGASSERT(priv != NULL && ep0info != NULL && req != NULL); usbhost_vtrace2(OTGHS_VTRACE2_CTRLOUT, req->type, req->req); - uvdbg("type:%02x req:%02x value:%02x%02x index:%02x%02x len:%02x%02x\n", + uinfo("type:%02x req:%02x value:%02x%02x index:%02x%02x len:%02x%02x\n", req->type, req->req, req->value[1], req->value[0], req->index[1], req->index[0], req->len[1], req->len[0]); @@ -4515,7 +4515,7 @@ static ssize_t stm32_transfer(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep unsigned int chidx = (unsigned int)ep; ssize_t nbytes; - uvdbg("chidx: %d buflen: %d\n", (unsigned int)ep, buflen); + uinfo("chidx: %d buflen: %d\n", (unsigned int)ep, buflen); DEBUGASSERT(priv && buffer && chidx < STM32_MAX_TX_FIFOS && buflen > 0); @@ -4582,7 +4582,7 @@ static int stm32_asynch(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep, unsigned int chidx = (unsigned int)ep; int ret; - uvdbg("chidx: %d buflen: %d\n", (unsigned int)ep, buflen); + uinfo("chidx: %d buflen: %d\n", (unsigned int)ep, buflen); DEBUGASSERT(priv && buffer && chidx < STM32_MAX_TX_FIFOS && buflen > 0); @@ -4632,7 +4632,7 @@ static int stm32_cancel(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep) unsigned int chidx = (unsigned int)ep; irqstate_t flags; - uvdbg("chidx: %u: %d\n", chidx); + uinfo("chidx: %u: %d\n", chidx); DEBUGASSERT(priv && chidx < STM32_MAX_TX_FIFOS); chan = &priv->chan[chidx]; @@ -4727,7 +4727,7 @@ static int stm32_connect(FAR struct usbhost_driver_s *drvr, /* Set the connected/disconnected flag */ hport->connected = connected; - ullvdbg("Hub port %d connected: %s\n", hport->port, connected ? "YES" : "NO"); + uinfo("Hub port %d connected: %s\n", hport->port, connected ? "YES" : "NO"); /* Report the connection event */ diff --git a/arch/arm/src/stm32/stm32_procfs_ccm.c b/arch/arm/src/stm32/stm32_procfs_ccm.c index 231f37dd9c4c7fe7c9108edf9d3e3cfd364f1089..51d1022146dce79d7246673ec378d5ee82dc5abd 100644 --- a/arch/arm/src/stm32/stm32_procfs_ccm.c +++ b/arch/arm/src/stm32/stm32_procfs_ccm.c @@ -142,7 +142,7 @@ static int ccm_open(FAR struct file *filep, FAR const char *relpath, { FAR struct ccm_file_s *priv; - fvdbg("Open '%s'\n", relpath); + finfo("Open '%s'\n", relpath); /* PROCFS is read-only. Any attempt to open with any kind of write * access is not permitted. @@ -152,7 +152,7 @@ static int ccm_open(FAR struct file *filep, FAR const char *relpath, if ((oflags & O_WRONLY) != 0 || (oflags & O_RDONLY) == 0) { - fdbg("ERROR: Only O_RDONLY supported\n"); + ferr("ERROR: Only O_RDONLY supported\n"); return -EACCES; } @@ -160,7 +160,7 @@ static int ccm_open(FAR struct file *filep, FAR const char *relpath, if (strcmp(relpath, "ccm") != 0) { - fdbg("ERROR: relpath is '%s'\n", relpath); + ferr("ERROR: relpath is '%s'\n", relpath); return -ENOENT; } @@ -169,7 +169,7 @@ static int ccm_open(FAR struct file *filep, FAR const char *relpath, priv = (FAR struct ccm_file_s *)kmm_zalloc(sizeof(struct ccm_file_s)); if (!priv) { - fdbg("ERROR: Failed to allocate file attributes\n"); + ferr("ERROR: Failed to allocate file attributes\n"); return -ENOMEM; } @@ -214,7 +214,7 @@ static ssize_t ccm_read(FAR struct file *filep, FAR char *buffer, struct mallinfo mem; off_t offset = filep->f_pos; - fvdbg("buffer=%p buflen=%d\n", buffer, (int)buflen); + finfo("buffer=%p buflen=%d\n", buffer, (int)buflen); /* Recover our private data from the struct file instance */ @@ -273,7 +273,7 @@ static int ccm_dup(FAR const struct file *oldp, FAR struct file *newp) FAR struct ccm_file_s *oldpriv; FAR struct ccm_file_s *newpriv; - fvdbg("Dup %p->%p\n", oldp, newp); + finfo("Dup %p->%p\n", oldp, newp); /* Recover our private data from the old struct file instance */ @@ -285,7 +285,7 @@ static int ccm_dup(FAR const struct file *oldp, FAR struct file *newp) newpriv = (FAR struct ccm_file_s *)kmm_zalloc(sizeof(struct ccm_file_s)); if (!newpriv) { - fdbg("ERROR: Failed to allocate file attributes\n"); + ferr("ERROR: Failed to allocate file attributes\n"); return -ENOMEM; } @@ -303,7 +303,7 @@ static int ccm_stat(const char *relpath, struct stat *buf) { if (strcmp(relpath, "ccm") != 0) { - fdbg("ERROR: relpath is '%s'\n", relpath); + ferr("ERROR: relpath is '%s'\n", relpath); return -ENOENT; } diff --git a/arch/arm/src/stm32/stm32_pwm.c b/arch/arm/src/stm32/stm32_pwm.c index 8779d18692fa9108f2cb09ee314747d513463951..7b8f4224e0889b29ca6d412ed7f2097970607023 100644 --- a/arch/arm/src/stm32/stm32_pwm.c +++ b/arch/arm/src/stm32/stm32_pwm.c @@ -115,29 +115,10 @@ #define TIMTYPE_TIM17 TIMTYPE_COUNTUP16 /* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing PWM */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_PWM -#endif - -#ifdef CONFIG_DEBUG_PWM -# define pwmdbg dbg -# define pwmlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define pwmvdbg vdbg -# define pwmllvdbg llvdbg -# define pwm_dumpgpio(p,m) stm32_dumpgpio(p,m) -# else -# define pwmlldbg(x...) -# define pwmllvdbg(x...) -# define pwm_dumpgpio(p,m) -# endif + +#ifdef CONFIG_DEBUG_PWM_INFO +# define pwm_dumpgpio(p,m) stm32_dumpgpio(p,m) #else -# define pwmdbg(x...) -# define pwmlldbg(x...) -# define pwmvdbg(x...) -# define pwmllvdbg(x...) # define pwm_dumpgpio(p,m) #endif @@ -166,8 +147,8 @@ enum stm32_chanmode_e struct stm32_pwmchan_s { - uint8_t channel; /* Timer output channel: {1,..4} */ - uint32_t pincfg; /* Output pin configuration */ + uint8_t channel; /* Timer output channel: {1,..4} */ + uint32_t pincfg; /* Output pin configuration */ enum stm32_chanmode_e mode; }; @@ -176,21 +157,23 @@ struct stm32_pwmchan_s struct stm32_pwmtimer_s { FAR const struct pwm_ops_s *ops; /* PWM operations */ - uint8_t timid; /* Timer ID {1,...,17} */ - struct stm32_pwmchan_s channels[PWM_NCHANNELS]; - uint8_t timtype; /* See the TIMTYPE_* definitions */ - enum stm32_timmode_e mode; + uint8_t timid; /* Timer ID {1,...,17} */ + struct stm32_pwmchan_s channels[PWM_NCHANNELS]; + uint8_t timtype; /* See the TIMTYPE_* definitions */ + enum stm32_timmode_e mode; #ifdef CONFIG_PWM_PULSECOUNT - uint8_t irq; /* Timer update IRQ */ - uint8_t prev; /* The previous value of the RCR (pre-loaded) */ - uint8_t curr; /* The current value of the RCR (pre-loaded) */ - uint32_t count; /* Remaining pluse count */ + uint8_t irq; /* Timer update IRQ */ + uint8_t prev; /* The previous value of the RCR (pre-loaded) */ + uint8_t curr; /* The current value of the RCR (pre-loaded) */ + uint32_t count; /* Remaining pluse count */ +#else + uint32_t frequency; /* Current frequency setting */ #endif - uint32_t base; /* The base address of the timer */ - uint32_t pclk; /* The frequency of the peripheral clock + uint32_t base; /* The base address of the timer */ + uint32_t pclk; /* The frequency of the peripheral clock * that drives the timer module. */ #ifdef CONFIG_PWM_PULSECOUNT - FAR void *handle; /* Handle used for upper-half callback */ + FAR void *handle; /* Handle used for upper-half callback */ #endif }; @@ -202,7 +185,7 @@ struct stm32_pwmtimer_s static uint16_t pwm_getreg(struct stm32_pwmtimer_s *priv, int offset); static void pwm_putreg(struct stm32_pwmtimer_s *priv, int offset, uint16_t value); -#if defined(CONFIG_DEBUG_PWM) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_PWM_INFO static void pwm_dumpregs(struct stm32_pwmtimer_s *priv, FAR const char *msg); #else # define pwm_dumpregs(priv,msg) @@ -758,7 +741,7 @@ static struct stm32_pwmtimer_s g_pwm13dev = .irq = STM32_IRQ_TIM13, #endif .base = STM32_TIM13_BASE, - .pclk = STM32_APB1_TIM13_CLKIN, + .pclk = STM32_APB1_TIM13_CLKIN, }; #endif @@ -967,26 +950,26 @@ static void pwm_putreg(struct stm32_pwmtimer_s *priv, int offset, uint16_t value * ****************************************************************************/ -#if defined(CONFIG_DEBUG_PWM) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_PWM_INFO static void pwm_dumpregs(struct stm32_pwmtimer_s *priv, FAR const char *msg) { - pwmvdbg("%s:\n", msg); - pwmvdbg(" CR1: %04x CR2: %04x SMCR: %04x DIER: %04x\n", + pwminfo("%s:\n", msg); + pwminfo(" CR1: %04x CR2: %04x SMCR: %04x DIER: %04x\n", pwm_getreg(priv, STM32_GTIM_CR1_OFFSET), pwm_getreg(priv, STM32_GTIM_CR2_OFFSET), pwm_getreg(priv, STM32_GTIM_SMCR_OFFSET), pwm_getreg(priv, STM32_GTIM_DIER_OFFSET)); - pwmvdbg(" SR: %04x EGR: %04x CCMR1: %04x CCMR2: %04x\n", + pwminfo(" SR: %04x EGR: %04x CCMR1: %04x CCMR2: %04x\n", pwm_getreg(priv, STM32_GTIM_SR_OFFSET), pwm_getreg(priv, STM32_GTIM_EGR_OFFSET), pwm_getreg(priv, STM32_GTIM_CCMR1_OFFSET), pwm_getreg(priv, STM32_GTIM_CCMR2_OFFSET)); - pwmvdbg(" CCER: %04x CNT: %04x PSC: %04x ARR: %04x\n", + pwminfo(" CCER: %04x CNT: %04x PSC: %04x ARR: %04x\n", pwm_getreg(priv, STM32_GTIM_CCER_OFFSET), pwm_getreg(priv, STM32_GTIM_CNT_OFFSET), pwm_getreg(priv, STM32_GTIM_PSC_OFFSET), pwm_getreg(priv, STM32_GTIM_ARR_OFFSET)); - pwmvdbg(" CCR1: %04x CCR2: %04x CCR3: %04x CCR4: %04x\n", + pwminfo(" CCR1: %04x CCR2: %04x CCR3: %04x CCR4: %04x\n", pwm_getreg(priv, STM32_GTIM_CCR1_OFFSET), pwm_getreg(priv, STM32_GTIM_CCR2_OFFSET), pwm_getreg(priv, STM32_GTIM_CCR3_OFFSET), @@ -994,7 +977,7 @@ static void pwm_dumpregs(struct stm32_pwmtimer_s *priv, FAR const char *msg) #if defined(CONFIG_STM32_TIM1_PWM) || defined(CONFIG_STM32_TIM8_PWM) if (priv->timtype == TIMTYPE_ADVANCED) { - pwmvdbg(" RCR: %04x BDTR: %04x DCR: %04x DMAR: %04x\n", + pwminfo(" RCR: %04x BDTR: %04x DCR: %04x DMAR: %04x\n", pwm_getreg(priv, STM32_ATIM_RCR_OFFSET), pwm_getreg(priv, STM32_ATIM_BDTR_OFFSET), pwm_getreg(priv, STM32_ATIM_DCR_OFFSET), @@ -1003,7 +986,7 @@ static void pwm_dumpregs(struct stm32_pwmtimer_s *priv, FAR const char *msg) else #endif { - pwmvdbg(" DCR: %04x DMAR: %04x\n", + pwminfo(" DCR: %04x DMAR: %04x\n", pwm_getreg(priv, STM32_GTIM_DCR_OFFSET), pwm_getreg(priv, STM32_GTIM_DMAR_OFFSET)); } @@ -1066,15 +1049,15 @@ static int pwm_timer(FAR struct stm32_pwmtimer_s *priv, DEBUGASSERT(priv != NULL && info != NULL); #if defined(CONFIG_PWM_MULTICHAN) - pwmvdbg("TIM%d frequency: %d\n", + pwminfo("TIM%u frequency: %u\n", priv->timid, info->frequency); #elif defined(CONFIG_PWM_PULSECOUNT) - pwmvdbg("TIM%d channel: %d frequency: %d duty: %08x count: %d\n", - priv->timid, priv->channel, info->frequency, + pwminfo("TIM%u channel: %u frequency: %u duty: %08x count: %u\n", + priv->timid, priv->channels[0].channel, info->frequency, info->duty, info->count); #else - pwmvdbg("TIM%d channel: %d frequency: %d duty: %08x\n", - priv->timid, priv->channel, info->frequency, info->duty); + pwminfo("TIM%u channel: %u frequency: %u duty: %08x\n", + priv->timid, priv->channels[0].channel, info->frequency, info->duty); #endif DEBUGASSERT(info->frequency > 0); @@ -1144,7 +1127,7 @@ static int pwm_timer(FAR struct stm32_pwmtimer_s *priv, reload = 65535; } - pwmvdbg("TIM%d PCLK: %d frequency: %d TIMCLK: %d prescaler: %d reload: %d\n", + pwminfo("TIM%u PCLK: %u frequency: %u TIMCLK: %u prescaler: %u reload: %u\n", priv->timid, priv->pclk, info->frequency, timclk, prescaler, reload); /* Set up the timer CR1 register: @@ -1207,7 +1190,7 @@ static int pwm_timer(FAR struct stm32_pwmtimer_s *priv, break; default: - pwmdbg("No such timer mode: %d\n", (int)priv->mode); + pwmerr("ERROR: No such timer mode: %u\n", (unsigned int)priv->mode); return -EINVAL; } } @@ -1314,6 +1297,15 @@ static int pwm_timer(FAR struct stm32_pwmtimer_s *priv, duty = info->channels[i].duty; channel = info->channels[i].channel; + /* A value of zero means to skip this channel */ + + if (channel == 0) + { + continue; + } + + /* Find the channel */ + for (j = 0; j < PWM_NCHANNELS; j++) { if (priv->channels[j].channel == channel) @@ -1325,7 +1317,7 @@ static int pwm_timer(FAR struct stm32_pwmtimer_s *priv, if (j >= PWM_NCHANNELS) { - pwmdbg("No such channel: %d\n", channel); + pwmerr("ERROR: No such channel: %u\n", channel); return -EINVAL; } #else @@ -1341,7 +1333,7 @@ static int pwm_timer(FAR struct stm32_pwmtimer_s *priv, ccr = b16toi(duty * reload + b16HALF); - pwmvdbg("ccr: %d\n", ccr); + pwminfo("ccr: %u\n", ccr); switch (mode) { @@ -1376,7 +1368,7 @@ static int pwm_timer(FAR struct stm32_pwmtimer_s *priv, #endif default: - pwmdbg("No such mode: %d\n", (int)mode); + pwmerr("ERROR: No such mode: %u\n", (unsigned int)mode); return -EINVAL; } @@ -1483,7 +1475,7 @@ static int pwm_timer(FAR struct stm32_pwmtimer_s *priv, break; default: - pwmdbg("No such channel: %d\n", channel); + pwmerr("ERROR: No such channel: %u\n", channel); return -EINVAL; } } @@ -1625,6 +1617,89 @@ static int pwm_timer(FAR struct stm32_pwmtimer_s *priv, return OK; } +#ifndef CONFIG_PWM_PULSECOUNT +/**************************************************************************** + * Name: pwm_update_duty + * + * Description: + * Try to change only channel duty. + * + * Input parameters: + * priv - A reference to the lower half PWM driver state structure + * channel - Channel to by updated + * duty - New duty. + * + * Returned Value: + * Zero on success; a negated errno value on failure + * + ****************************************************************************/ + +static int pwm_update_duty(FAR struct stm32_pwmtimer_s *priv, uint8_t channel, + ub16_t duty) +{ + /* Register offset */ + + int ccr_offset; + + /* Calculated values */ + + uint32_t reload; + uint32_t ccr; + + DEBUGASSERT(priv != NULL); + + pwminfo("TIM%u channel: %u duty: %08x\n", + priv->timid, channel, duty); + +#ifndef CONFIG_PWM_MULTICHAN + DEBUGASSERT(channel == priv->channels[0].channel); + DEBUGASSERT(duty >= 0 && duty < uitoub16(100)); +#endif + + /* Get the reload values */ + + reload = pwm_getreg(priv, STM32_GTIM_ARR_OFFSET); + + /* Duty cycle: + * + * duty cycle = ccr / reload (fractional value) + */ + + ccr = b16toi(duty * reload + b16HALF); + + pwminfo("ccr: %u\n", ccr); + + switch (channel) + { + case 1: /* Register offset for Channel 1 */ + ccr_offset = STM32_GTIM_CCR1_OFFSET; + break; + + case 2: /* Register offset for Channel 2 */ + ccr_offset = STM32_GTIM_CCR2_OFFSET; + break; + + case 3: /* Register offset for Channel 3 */ + ccr_offset = STM32_GTIM_CCR3_OFFSET; + break; + + case 4: /* Register offset for Channel 4 */ + ccr_offset = STM32_GTIM_CCR4_OFFSET; + break; + + default: + pwmerr("ERROR: No such channel: %u\n", channel); + return -EINVAL; + } + + /* Set the duty cycle by writing to the CCR register for this channel */ + + pwm_putreg(priv, ccr_offset, (uint16_t)ccr); + + return OK; +} +#endif + /**************************************************************************** * Name: pwm_interrupt * @@ -1701,8 +1776,8 @@ static int pwm_interrupt(struct stm32_pwmtimer_s *priv) /* Now all of the time critical stuff is done so we can do some debug output */ - pwmllvdbg("Update interrupt SR: %04x prev: %d curr: %d count: %d\n", - regval, priv->prev, priv->curr, priv->count); + pwminfo("Update interrupt SR: %04x prev: %u curr: %u count: %u\n", + regval, priv->prev, priv->curr, priv->count); return OK; } @@ -1894,6 +1969,8 @@ static void pwm_set_apb_clock(FAR struct stm32_pwmtimer_s *priv, bool on) en_bit = RCC_APB2ENR_TIM17EN; break; #endif + default: + return; } /* Enable/disable APB 1/2 clock for timer */ @@ -1934,7 +2011,7 @@ static int pwm_setup(FAR struct pwm_lowerhalf_s *dev) uint32_t pincfg; int i; - pwmvdbg("TIM%d\n", priv->timid); + pwminfo("TIM%u\n", priv->timid); pwm_dumpregs(priv, "Initially"); /* Enable APB1/2 clocking for timer. */ @@ -1951,7 +2028,7 @@ static int pwm_setup(FAR struct pwm_lowerhalf_s *dev) continue; } - pwmvdbg("pincfg: %08x\n", pincfg); + pwminfo("pincfg: %08x\n", pincfg); stm32_configgpio(pincfg); pwm_dumpgpio(pincfg, "PWM setup"); @@ -1982,7 +2059,7 @@ static int pwm_shutdown(FAR struct pwm_lowerhalf_s *dev) uint32_t pincfg; int i; - pwmvdbg("TIM%d\n", priv->timid); + pwminfo("TIM%u\n", priv->timid); /* Make sure that the output has been stopped */ @@ -2002,7 +2079,7 @@ static int pwm_shutdown(FAR struct pwm_lowerhalf_s *dev) continue; } - pwmvdbg("pincfg: %08x\n", pincfg); + pwminfo("pincfg: %08x\n", pincfg); pincfg &= (GPIO_PORT_MASK | GPIO_PIN_MASK); @@ -2053,7 +2130,7 @@ static int pwm_start(FAR struct pwm_lowerhalf_s *dev, if (priv->timtype != TIMTYPE_ADVANCED) { - pwmdbg("ERROR: TIM%d cannot support pulse count: %d\n", + pwmerr("ERROR: TIM%u cannot support pulse count: %u\n", priv->timid, info->count); return -EPERM; } @@ -2071,8 +2148,42 @@ static int pwm_start(FAR struct pwm_lowerhalf_s *dev, static int pwm_start(FAR struct pwm_lowerhalf_s *dev, FAR const struct pwm_info_s *info) { + int ret = OK; FAR struct stm32_pwmtimer_s *priv = (FAR struct stm32_pwmtimer_s *)dev; - return pwm_timer(priv, info); + +#ifndef CONFIG_PWM_PULSECOUNT + /* if frequency has not changed we just update duty */ + + if (info->frequency == priv->frequency) + { +#ifdef CONFIG_PWM_MULTICHAN + int i; + + for (i = 0; ret == OK && i < CONFIG_PWM_NCHANNELS; i++) + { + ret = pwm_update_duty(priv,info->channels[i].channel, + info->channels[i].duty); + } +#else + ret = pwm_update_duty(priv,priv->channels[0].channel,info->duty); +#endif + } + else +#endif + { + ret = pwm_timer(priv, info); + +#ifndef CONFIG_PWM_PULSECOUNT + /* Save current frequency */ + + if (ret == OK) + { + priv->frequency = info->frequency; + } +#endif + } + + return ret; } #endif @@ -2103,7 +2214,7 @@ static int pwm_stop(FAR struct pwm_lowerhalf_s *dev) uint32_t regval; irqstate_t flags; - pwmvdbg("TIM%d\n", priv->timid); + pwminfo("TIM%u\n", priv->timid); /* Disable interrupts momentary to stop any ongoing timer processing and * to prevent any concurrent access to the reset register. @@ -2111,6 +2222,10 @@ static int pwm_stop(FAR struct pwm_lowerhalf_s *dev) flags = enter_critical_section(); + /* Stopped so frequency is zero */ + + priv->frequency = 0; + /* Disable further interrupts and stop the timer */ pwm_putreg(priv, STM32_GTIM_DIER_OFFSET, 0); @@ -2210,6 +2325,8 @@ static int pwm_stop(FAR struct pwm_lowerhalf_s *dev) resetbit = RCC_APB2RSTR_TIM17RST; break; #endif + default: + return -EINVAL; } /* Reset the timer - stopping the output and putting the timer back @@ -2224,7 +2341,7 @@ static int pwm_stop(FAR struct pwm_lowerhalf_s *dev) putreg32(regval, regaddr); leave_critical_section(flags); - pwmvdbg("regaddr: %08x resetbit: %08x\n", regaddr, resetbit); + pwminfo("regaddr: %08x resetbit: %08x\n", regaddr, resetbit); pwm_dumpregs(priv, "After stop"); return OK; } @@ -2247,12 +2364,12 @@ static int pwm_stop(FAR struct pwm_lowerhalf_s *dev) static int pwm_ioctl(FAR struct pwm_lowerhalf_s *dev, int cmd, unsigned long arg) { -#ifdef CONFIG_DEBUG_PWM +#ifdef CONFIG_DEBUG_PWM_INFO FAR struct stm32_pwmtimer_s *priv = (FAR struct stm32_pwmtimer_s *)dev; /* There are no platform-specific ioctl commands */ - pwmvdbg("TIM%d\n", priv->timid); + pwminfo("TIM%u\n", priv->timid); #endif return -ENOTTY; } @@ -2282,7 +2399,7 @@ FAR struct pwm_lowerhalf_s *stm32_pwminitialize(int timer) { FAR struct stm32_pwmtimer_s *lower; - pwmvdbg("TIM%d\n", timer); + pwminfo("TIM%u\n", timer); switch (timer) { @@ -2391,7 +2508,7 @@ FAR struct pwm_lowerhalf_s *stm32_pwminitialize(int timer) #endif default: - pwmdbg("No such timer configured\n"); + pwmerr("ERROR: No such timer configured\n"); return NULL; } diff --git a/arch/arm/src/stm32/stm32_qencoder.c b/arch/arm/src/stm32/stm32_qencoder.c index 5cec5e0874d2fdac8bb23999a7173059e3197853..7d87debe334c9b1c324c6000aba5dfca637e1916 100644 --- a/arch/arm/src/stm32/stm32_qencoder.c +++ b/arch/arm/src/stm32/stm32_qencoder.c @@ -247,12 +247,12 @@ /* Debug ****************************************************************************/ /* Non-standard debug that may be enabled just for testing the quadrature encoder */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_SENSORS #endif #ifdef CONFIG_DEBUG_SENSORS -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define qe_dumpgpio(p,m) stm32_dumpgpio(p,m) # else # define qe_dumpgpio(p,m) @@ -317,7 +317,7 @@ static void stm32_putreg16(FAR struct stm32_lowerhalf_s *priv, int offset, uint1 static uint32_t stm32_getreg32(FAR struct stm32_lowerhalf_s *priv, int offset); static void stm32_putreg32(FAR struct stm32_lowerhalf_s *priv, int offset, uint32_t value); -#if defined(CONFIG_DEBUG_SENSORS) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_SENSORS) && defined(CONFIG_DEBUG_INFO) static void stm32_dumpregs(FAR struct stm32_lowerhalf_s *priv, FAR const char *msg); #else # define stm32_dumpregs(priv,msg) @@ -631,26 +631,26 @@ static void stm32_putreg32(FAR struct stm32_lowerhalf_s *priv, int offset, uint3 * ****************************************************************************/ -#if defined(CONFIG_DEBUG_SENSORS) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_SENSORS) && defined(CONFIG_DEBUG_INFO) static void stm32_dumpregs(FAR struct stm32_lowerhalf_s *priv, FAR const char *msg) { - snvdbg("%s:\n", msg); - snvdbg(" CR1: %04x CR2: %04x SMCR: %04x DIER: %04x\n", + sninfo("%s:\n", msg); + sninfo(" CR1: %04x CR2: %04x SMCR: %04x DIER: %04x\n", stm32_getreg16(priv, STM32_GTIM_CR1_OFFSET), stm32_getreg16(priv, STM32_GTIM_CR2_OFFSET), stm32_getreg16(priv, STM32_GTIM_SMCR_OFFSET), stm32_getreg16(priv, STM32_GTIM_DIER_OFFSET)); - snvdbg(" SR: %04x EGR: %04x CCMR1: %04x CCMR2: %04x\n", + sninfo(" SR: %04x EGR: %04x CCMR1: %04x CCMR2: %04x\n", stm32_getreg16(priv, STM32_GTIM_SR_OFFSET), stm32_getreg16(priv, STM32_GTIM_EGR_OFFSET), stm32_getreg16(priv, STM32_GTIM_CCMR1_OFFSET), stm32_getreg16(priv, STM32_GTIM_CCMR2_OFFSET)); - snvdbg(" CCER: %04x CNT: %04x PSC: %04x ARR: %04x\n", + sninfo(" CCER: %04x CNT: %04x PSC: %04x ARR: %04x\n", stm32_getreg16(priv, STM32_GTIM_CCER_OFFSET), stm32_getreg16(priv, STM32_GTIM_CNT_OFFSET), stm32_getreg16(priv, STM32_GTIM_PSC_OFFSET), stm32_getreg16(priv, STM32_GTIM_ARR_OFFSET)); - snvdbg(" CCR1: %04x CCR2: %04x CCR3: %04x CCR4: %04x\n", + sninfo(" CCR1: %04x CCR2: %04x CCR3: %04x CCR4: %04x\n", stm32_getreg16(priv, STM32_GTIM_CCR1_OFFSET), stm32_getreg16(priv, STM32_GTIM_CCR2_OFFSET), stm32_getreg16(priv, STM32_GTIM_CCR3_OFFSET), @@ -658,7 +658,7 @@ static void stm32_dumpregs(FAR struct stm32_lowerhalf_s *priv, FAR const char *m #if defined(CONFIG_STM32_TIM1_QE) || defined(CONFIG_STM32_TIM8_QE) if (priv->config->timid == 1 || priv->config->timid == 8) { - snvdbg(" RCR: %04x BDTR: %04x DCR: %04x DMAR: %04x\n", + sninfo(" RCR: %04x BDTR: %04x DCR: %04x DMAR: %04x\n", stm32_getreg16(priv, STM32_ATIM_RCR_OFFSET), stm32_getreg16(priv, STM32_ATIM_BDTR_OFFSET), stm32_getreg16(priv, STM32_ATIM_DCR_OFFSET), @@ -667,7 +667,7 @@ static void stm32_dumpregs(FAR struct stm32_lowerhalf_s *priv, FAR const char *m else #endif { - snvdbg(" DCR: %04x DMAR: %04x\n", + sninfo(" DCR: %04x DMAR: %04x\n", stm32_getreg16(priv, STM32_GTIM_DCR_OFFSET), stm32_getreg16(priv, STM32_GTIM_DMAR_OFFSET)); } @@ -1125,7 +1125,7 @@ static int stm32_shutdown(FAR struct qe_lowerhalf_s *lower) putreg32(regval, regaddr); leave_critical_section(flags); - snvdbg("regaddr: %08x resetbit: %08x\n", regaddr, resetbit); + sninfo("regaddr: %08x resetbit: %08x\n", regaddr, resetbit); stm32_dumpregs(priv, "After stop"); /* Put the TI1 GPIO pin back to its default state */ @@ -1203,7 +1203,7 @@ static int stm32_reset(FAR struct qe_lowerhalf_s *lower) #ifdef HAVE_16BIT_TIMERS irqstate_t flags; - snvdbg("Resetting position to zero\n"); + sninfo("Resetting position to zero\n"); DEBUGASSERT(lower && priv->inuse); /* Reset the timer and the counter. Interrupts are disabled to make this atomic @@ -1215,7 +1215,7 @@ static int stm32_reset(FAR struct qe_lowerhalf_s *lower) priv->position = 0; leave_critical_section(flags); #else - snvdbg("Resetting position to zero\n"); + sninfo("Resetting position to zero\n"); DEBUGASSERT(lower && priv->inuse); /* Reset the counter to zero */ @@ -1270,7 +1270,7 @@ int stm32_qeinitialize(FAR const char *devpath, int tim) priv = stm32_tim2lower(tim); if (!priv) { - sndbg("TIM%d support not configured\n", tim); + snerr("ERROR: TIM%d support not configured\n", tim); return -ENXIO; } @@ -1278,7 +1278,7 @@ int stm32_qeinitialize(FAR const char *devpath, int tim) if (priv->inuse) { - sndbg("TIM%d is in-used\n", tim); + snerr("ERROR: TIM%d is in-use\n", tim); return -EBUSY; } @@ -1287,7 +1287,7 @@ int stm32_qeinitialize(FAR const char *devpath, int tim) ret = qe_register(devpath, (FAR struct qe_lowerhalf_s *)priv); if (ret < 0) { - sndbg("qe_register failed: %d\n", ret); + snerr("ERROR: qe_register failed: %d\n", ret); return ret; } diff --git a/arch/arm/src/stm32/stm32_rcc.c b/arch/arm/src/stm32/stm32_rcc.c index 8040af9e1e6b0b1ff04a19637ce2f888c31d66cc..553f76e73df675c7615f740abc47ff39d57813f5 100644 --- a/arch/arm/src/stm32/stm32_rcc.c +++ b/arch/arm/src/stm32/stm32_rcc.c @@ -51,6 +51,7 @@ #include "chip.h" #include "stm32_rcc.h" +#include "stm32_rtc.h" #include "stm32_flash.h" #include "stm32.h" #include "stm32_waste.h" @@ -66,10 +67,6 @@ #define HSERDY_TIMEOUT (100 * CONFIG_BOARD_LOOPSPERMSEC) -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -92,21 +89,76 @@ # error "Unsupported STM32 chip" #endif +#if defined(CONFIG_STM32_STM32L15XX) +# define STM32_RCC_XXX STM32_RCC_CSR +# define RCC_XXX_YYYRST RCC_CSR_RTCRST +#else +# define STM32_RCC_XXX STM32_RCC_BDCR +# define RCC_XXX_YYYRST RCC_BDCR_BDRST +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ -/************************************************************************************ +/**************************************************************************** + * Name: rcc_resetbkp + * + * Description: + * The RTC needs to reset the Backup Domain to change RTCSEL and resetting + * the Backup Domain renders to disabling the LSE as consequence. In order + * to avoid resetting the Backup Domain when we already configured LSE we + * will reset the Backup Domain early (here). + * + * Input Parameters: + * None + * + * Returned Value: + * None + * + ****************************************************************************/ + +#if defined(CONFIG_RTC) && defined(CONFIG_STM32_PWR) && !defined(CONFIG_STM32_STM32F10XX) +static inline void rcc_resetbkp(void) +{ + uint32_t regval; + + /* Check if the RTC is already configured */ + + regval = getreg32(RTC_MAGIC_REG); + if (regval != RTC_MAGIC) + { + (void)stm32_pwr_enablebkp(true); + + /* We might be changing RTCSEL - to ensure such changes work, we must + * reset the backup domain (having backed up the RTC_MAGIC token) + */ + + modifyreg32(STM32_RCC_XXX, 0, RCC_XXX_YYYRST); + modifyreg32(STM32_RCC_XXX, RCC_XXX_YYYRST, 0); + + (void)stm32_pwr_enablebkp(false); + } +} +#else +# define rcc_resetbkp() +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** * Name: stm32_clockconfig * * Description: - * Called to establish the clock settings based on the values in board.h. This - * function (by default) will reset most everything, enable the PLL, and enable - * peripheral clocking for all periperipherals enabled in the NuttX configuration - * file. + * Called to establish the clock settings based on the values in board.h. + * This function (by default) will reset most everything, enable the PLL, + * and enable peripheral clocking for all peripherals enabled in the NuttX + * configuration file. * - * If CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is defined, then clocking will - * be enabled by an externally provided, board-specific function called + * If CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is defined, then clocking + * will be enabled by an externally provided, board-specific function called * stm32_board_clockconfig(). * * Input Parameters: @@ -115,7 +167,7 @@ * Returned Value: * None * - ************************************************************************************/ + ****************************************************************************/ void stm32_clockconfig(void) { @@ -123,6 +175,10 @@ void stm32_clockconfig(void) rcc_reset(); + /* Reset backup domain if appropriate */ + + rcc_resetbkp(); + #if defined(CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG) /* Invoke Board Custom Clock Configuration */ @@ -185,4 +241,3 @@ void stm32_clockenable(void) #endif } #endif - diff --git a/arch/arm/src/stm32/stm32_rng.c b/arch/arm/src/stm32/stm32_rng.c index 5726f43ef9c83dd3b0e10dd886e92ae40518e369..fce55ebf0a3aecd6ed826a86a6465f2509452af2 100644 --- a/arch/arm/src/stm32/stm32_rng.c +++ b/arch/arm/src/stm32/stm32_rng.c @@ -102,7 +102,7 @@ static int stm32_rnginitialize() { uint32_t regval; - vdbg("Initializing RNG\n"); + _info("Initializing RNG\n"); memset(&g_rngdev, 0, sizeof(struct rng_dev_s)); @@ -112,7 +112,7 @@ static int stm32_rnginitialize() { /* We could not attach the ISR to the interrupt */ - vdbg("Could not attach IRQ.\n"); + _info("Could not attach IRQ.\n"); return -EAGAIN; } diff --git a/arch/arm/src/stm32/stm32_rtc.c b/arch/arm/src/stm32/stm32_rtc.c index 0080b78cd24e869bce115ee4ddb3e590c5d7d989..3e8dc0b0d78a7307ef170d810670cd6eb13cbda6 100644 --- a/arch/arm/src/stm32/stm32_rtc.c +++ b/arch/arm/src/stm32/stm32_rtc.c @@ -41,22 +41,6 @@ #include "chip.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/stm32/stm32_rtc.h b/arch/arm/src/stm32/stm32_rtc.h index 731cc2d3b8410b33b1bb67ccf664139535696456..119e5e54dfce5466d294e4a30e108faf69ebae1b 100644 --- a/arch/arm/src/stm32/stm32_rtc.h +++ b/arch/arm/src/stm32/stm32_rtc.h @@ -79,6 +79,17 @@ #define STM32_RTC_PRESCALER_SECOND 32767 /* Default prescaler to get a second base */ #define STM32_RTC_PRESCALER_MIN 1 /* Maximum speed of 16384 Hz */ +#if !defined(CONFIG_RTC_MAGIC) +# define CONFIG_RTC_MAGIC (0xfacefeee) +#endif + +#if !defined(CONFIG_RTC_MAGIC_REG) +# define CONFIG_RTC_MAGIC_REG (0) +#endif + +#define RTC_MAGIC CONFIG_RTC_MAGIC +#define RTC_MAGIC_REG STM32_RTC_BKR(CONFIG_RTC_MAGIC_REG) + /**************************************************************************** * Public Types ****************************************************************************/ diff --git a/arch/arm/src/stm32/stm32_rtc_lowerhalf.c b/arch/arm/src/stm32/stm32_rtc_lowerhalf.c index 20275ee92169f720a5b4e554940f9f1e0586be3c..feaa3f53951a1605cc53df3b3015bfdca6aec437 100644 --- a/arch/arm/src/stm32/stm32_rtc_lowerhalf.c +++ b/arch/arm/src/stm32/stm32_rtc_lowerhalf.c @@ -178,7 +178,6 @@ static void stm32_alarm_callback(FAR void *arg, unsigned int alarmid) rtc_alarm_callback_t cb; FAR void *priv; - DEBUGASSERT(priv != NULL); DEBUGASSERT(alarmid == RTC_ALARMA || alarmid == RTC_ALARMB); lower = (struct stm32_lowerhalf_s *)arg; @@ -190,6 +189,7 @@ static void stm32_alarm_callback(FAR void *arg, unsigned int alarmid) cb = (rtc_alarm_callback_t)cbinfo->cb; priv = (FAR void *)cbinfo->priv; + DEBUGASSERT(priv != NULL); cbinfo->cb = NULL; cbinfo->priv = NULL; diff --git a/arch/arm/src/stm32/stm32_rtcc.c b/arch/arm/src/stm32/stm32_rtcc.c index 7d403ba50415f10e1c1081030fabb645b5558372..da8f57db592cb12dfef09d4bafef0f512bd9cb41 100644 --- a/arch/arm/src/stm32/stm32_rtcc.c +++ b/arch/arm/src/stm32/stm32_rtcc.c @@ -76,10 +76,6 @@ # error "CONFIG_STM32_PWR must selected to use this driver" #endif -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_RTC -#endif - #ifdef CONFIG_STM32_STM32L15XX # if defined(CONFIG_RTC_HSECLOCK) # error "RTC with HSE clock not yet implemented for STM32L15XXX" @@ -88,20 +84,10 @@ # endif #endif -#if !defined(CONFIG_RTC_MAGIC) -# define CONFIG_RTC_MAGIC (0xfacefeee) -#endif - -#if !defined(CONFIG_RTC_MAGIC_REG) -# define CONFIG_RTC_MAGIC_REG (0) -#endif - /* Constants ************************************************************************/ #define SYNCHRO_TIMEOUT (0x00020000) #define INITMODE_TIMEOUT (0x00010000) -#define RTC_MAGIC CONFIG_RTC_MAGIC -#define RTC_MAGIC_REG STM32_RTC_BKR(CONFIG_RTC_MAGIC_REG) /* Proxy definitions to make the same code work for all the STM32 series ************/ @@ -123,24 +109,6 @@ # define RCC_XXX_RTCSEL_HSE RCC_BDCR_RTCSEL_HSE #endif -/* Debug ****************************************************************************/ - -#ifdef CONFIG_DEBUG_RTC -# define rtcdbg dbg -# define rtcvdbg vdbg -# define rtclldbg lldbg -# define rtcllvdbg llvdbg -#else -# define rtcdbg(x...) -# define rtcvdbg(x...) -# define rtclldbg(x...) -# define rtcllvdbg(x...) -#endif - -/************************************************************************************ - * Private Types - ************************************************************************************/ - /************************************************************************************ * Private Data ************************************************************************************/ @@ -176,30 +144,30 @@ volatile bool g_rtc_enabled = false; * ************************************************************************************/ -#ifdef CONFIG_DEBUG_RTC +#ifdef CONFIG_DEBUG_RTC_INFO static void rtc_dumpregs(FAR const char *msg) { - rtclldbg("%s:\n", msg); - rtclldbg(" TR: %08x\n", getreg32(STM32_RTC_TR)); - rtclldbg(" DR: %08x\n", getreg32(STM32_RTC_DR)); - rtclldbg(" CR: %08x\n", getreg32(STM32_RTC_CR)); - rtclldbg(" ISR: %08x\n", getreg32(STM32_RTC_ISR)); - rtclldbg(" PRER: %08x\n", getreg32(STM32_RTC_PRER)); - rtclldbg(" WUTR: %08x\n", getreg32(STM32_RTC_WUTR)); + rtcinfo("%s:\n", msg); + rtcinfo(" TR: %08x\n", getreg32(STM32_RTC_TR)); + rtcinfo(" DR: %08x\n", getreg32(STM32_RTC_DR)); + rtcinfo(" CR: %08x\n", getreg32(STM32_RTC_CR)); + rtcinfo(" ISR: %08x\n", getreg32(STM32_RTC_ISR)); + rtcinfo(" PRER: %08x\n", getreg32(STM32_RTC_PRER)); + rtcinfo(" WUTR: %08x\n", getreg32(STM32_RTC_WUTR)); #ifndef CONFIG_STM32_STM32F30XX - rtclldbg(" CALIBR: %08x\n", getreg32(STM32_RTC_CALIBR)); + rtcinfo(" CALIBR: %08x\n", getreg32(STM32_RTC_CALIBR)); #endif - rtclldbg(" ALRMAR: %08x\n", getreg32(STM32_RTC_ALRMAR)); - rtclldbg(" ALRMBR: %08x\n", getreg32(STM32_RTC_ALRMBR)); - rtclldbg(" SHIFTR: %08x\n", getreg32(STM32_RTC_SHIFTR)); - rtclldbg(" TSTR: %08x\n", getreg32(STM32_RTC_TSTR)); - rtclldbg(" TSDR: %08x\n", getreg32(STM32_RTC_TSDR)); - rtclldbg(" TSSSR: %08x\n", getreg32(STM32_RTC_TSSSR)); - rtclldbg(" CALR: %08x\n", getreg32(STM32_RTC_CALR)); - rtclldbg(" TAFCR: %08x\n", getreg32(STM32_RTC_TAFCR)); - rtclldbg("ALRMASSR: %08x\n", getreg32(STM32_RTC_ALRMASSR)); - rtclldbg("ALRMBSSR: %08x\n", getreg32(STM32_RTC_ALRMBSSR)); - rtclldbg("MAGICREG: %08x\n", getreg32(RTC_MAGIC_REG)); + rtcinfo(" ALRMAR: %08x\n", getreg32(STM32_RTC_ALRMAR)); + rtcinfo(" ALRMBR: %08x\n", getreg32(STM32_RTC_ALRMBR)); + rtcinfo(" SHIFTR: %08x\n", getreg32(STM32_RTC_SHIFTR)); + rtcinfo(" TSTR: %08x\n", getreg32(STM32_RTC_TSTR)); + rtcinfo(" TSDR: %08x\n", getreg32(STM32_RTC_TSDR)); + rtcinfo(" TSSSR: %08x\n", getreg32(STM32_RTC_TSSSR)); + rtcinfo(" CALR: %08x\n", getreg32(STM32_RTC_CALR)); + rtcinfo(" TAFCR: %08x\n", getreg32(STM32_RTC_TAFCR)); + rtcinfo("ALRMASSR: %08x\n", getreg32(STM32_RTC_ALRMASSR)); + rtcinfo("ALRMBSSR: %08x\n", getreg32(STM32_RTC_ALRMBSSR)); + rtcinfo("MAGICREG: %08x\n", getreg32(RTC_MAGIC_REG)); } #else # define rtc_dumpregs(msg) @@ -219,16 +187,16 @@ static void rtc_dumpregs(FAR const char *msg) * ************************************************************************************/ -#ifdef CONFIG_DEBUG_RTC +#ifdef CONFIG_DEBUG_RTC_INFO static void rtc_dumptime(FAR struct tm *tp, FAR const char *msg) { - rtclldbg("%s:\n", msg); - rtclldbg(" tm_sec: %08x\n", tp->tm_sec); - rtclldbg(" tm_min: %08x\n", tp->tm_min); - rtclldbg(" tm_hour: %08x\n", tp->tm_hour); - rtclldbg(" tm_mday: %08x\n", tp->tm_mday); - rtclldbg(" tm_mon: %08x\n", tp->tm_mon); - rtclldbg(" tm_year: %08x\n", tp->tm_year); + rtcinfo("%s:\n", msg); + rtcinfo(" tm_sec: %08x\n", tp->tm_sec); + rtcinfo(" tm_min: %08x\n", tp->tm_min); + rtcinfo(" tm_hour: %08x\n", tp->tm_hour); + rtcinfo(" tm_mday: %08x\n", tp->tm_mday); + rtcinfo(" tm_mon: %08x\n", tp->tm_mon); + rtcinfo(" tm_year: %08x\n", tp->tm_year); } #else # define rtc_dumptime(tp, msg) @@ -634,13 +602,6 @@ int up_rtc_initialize(void) if (regval != RTC_MAGIC) { - /* We might be changing RTCSEL - to ensure such changes work, we must reset the - * backup domain (having backed up the RTC_MAGIC token) - */ - - modifyreg32(STM32_RCC_XXX, 0, RCC_XXX_YYYRST); - modifyreg32(STM32_RCC_XXX, RCC_XXX_YYYRST, 0); - /* Some boards do not have the external 32khz oscillator installed, for those * boards we must fallback to the crummy internal RC clock or the external high * rate clock @@ -733,13 +694,13 @@ int up_rtc_initialize(void) { case OK: { - rtclldbg("rtc_syncwait() okay\n"); + rtcinfo("rtc_syncwait() okay\n"); break; } default: { - rtclldbg("rtc_syncwait() failed (%d)\n", ret); + rtcerr("ERROR: rtc_syncwait() failed (%d)\n", ret); break; } } @@ -753,7 +714,7 @@ int up_rtc_initialize(void) if (regval != RTC_MAGIC) { - rtclldbg("Do setup\n"); + rtcinfo("Do setup\n"); /* Perform the one-time setup of the LSE clocking to the RTC */ @@ -771,7 +732,7 @@ int up_rtc_initialize(void) } else { - rtclldbg("Do resume\n"); + rtcinfo("Do resume\n"); /* RTC already set-up, just resume normal operation */ @@ -787,8 +748,8 @@ int up_rtc_initialize(void) if (ret != OK && nretry > 0) { - rtclldbg("setup/resume ran %d times and failed with %d\n", - nretry, ret); + rtcinfo("setup/resume ran %d times and failed with %d\n", + nretry, ret); return -ETIMEDOUT; } diff --git a/arch/arm/src/stm32/stm32_sdio.c b/arch/arm/src/stm32/stm32_sdio.c index b9bea99351fb203f29aae8544a454fcc3434a7fa..6cd372b7fd2be7277aa72be1ce19645873160598 100644 --- a/arch/arm/src/stm32/stm32_sdio.c +++ b/arch/arm/src/stm32/stm32_sdio.c @@ -95,7 +95,7 @@ * CONFIG_SDM_DMAPRIO - SDIO DMA priority. This can be selecte if * CONFIG_SDIO_DMA is enabled. * CONFIG_SDIO_XFRDEBUG - Enables some very low-level debug output - * This also requires CONFIG_DEBUG_FS and CONFIG_DEBUG_VERBOSE + * This also requires CONFIG_DEBUG_FS and CONFIG_DEBUG_INFO */ #if defined(CONFIG_SDIO_DMA) && !defined(CONFIG_STM32_DMA2) @@ -139,7 +139,7 @@ # undef CONFIG_SDIO_DMAPRIO #endif -#if !defined(CONFIG_DEBUG_FS) || !defined(CONFIG_DEBUG) +#ifndef CONFIG_DEBUG_MEMCARD_INFO # undef CONFIG_SDIO_XFRDEBUG #endif @@ -345,7 +345,7 @@ struct stm32_sdioregs_s struct stm32_sampleregs_s { struct stm32_sdioregs_s sdio; -#if defined(CONFIG_DEBUG_DMA) && defined(CONFIG_SDIO_DMA) +#if defined(CONFIG_DEBUG_DMA_INFO) && defined(CONFIG_SDIO_DMA) struct stm32_dmaregs_s dma; #endif }; @@ -596,7 +596,7 @@ static inline void stm32_setclkcr(uint32_t clkcr) regval |= clkcr; putreg32(regval, STM32_SDIO_CLKCR); - fvdbg("CLKCR: %08x PWR: %08x\n", + mcinfo("CLKCR: %08x PWR: %08x\n", getreg32(STM32_SDIO_CLKCR), getreg32(STM32_SDIO_POWER)); } @@ -789,12 +789,14 @@ static void stm32_sdiosample(struct stm32_sdioregs_s *regs) static void stm32_sample(struct stm32_dev_s *priv, int index) { struct stm32_sampleregs_s *regs = &g_sampleregs[index]; -#if defined(CONFIG_DEBUG_DMA) && defined(CONFIG_SDIO_DMA) + +#if defined(CONFIG_DEBUG_DMA_INFO) && defined(CONFIG_SDIO_DMA) if (priv->dmamode) { stm32_dmasample(priv->dma, ®s->dma); } #endif + stm32_sdiosample(®s->sdio); } #endif @@ -810,16 +812,16 @@ static void stm32_sample(struct stm32_dev_s *priv, int index) #ifdef CONFIG_SDIO_XFRDEBUG static void stm32_sdiodump(struct stm32_sdioregs_s *regs, const char *msg) { - fdbg("SDIO Registers: %s\n", msg); - fdbg(" POWER[%08x]: %08x\n", STM32_SDIO_POWER, regs->power); - fdbg(" CLKCR[%08x]: %08x\n", STM32_SDIO_CLKCR, regs->clkcr); - fdbg(" DCTRL[%08x]: %08x\n", STM32_SDIO_DCTRL, regs->dctrl); - fdbg(" DTIMER[%08x]: %08x\n", STM32_SDIO_DTIMER, regs->dtimer); - fdbg(" DLEN[%08x]: %08x\n", STM32_SDIO_DLEN, regs->dlen); - fdbg(" DCOUNT[%08x]: %08x\n", STM32_SDIO_DCOUNT, regs->dcount); - fdbg(" STA[%08x]: %08x\n", STM32_SDIO_STA, regs->sta); - fdbg(" MASK[%08x]: %08x\n", STM32_SDIO_MASK, regs->mask); - fdbg("FIFOCNT[%08x]: %08x\n", STM32_SDIO_FIFOCNT, regs->fifocnt); + mcinfo("SDIO Registers: %s\n", msg); + mcinfo(" POWER[%08x]: %08x\n", STM32_SDIO_POWER, regs->power); + mcinfo(" CLKCR[%08x]: %08x\n", STM32_SDIO_CLKCR, regs->clkcr); + mcinfo(" DCTRL[%08x]: %08x\n", STM32_SDIO_DCTRL, regs->dctrl); + mcinfo(" DTIMER[%08x]: %08x\n", STM32_SDIO_DTIMER, regs->dtimer); + mcinfo(" DLEN[%08x]: %08x\n", STM32_SDIO_DLEN, regs->dlen); + mcinfo(" DCOUNT[%08x]: %08x\n", STM32_SDIO_DCOUNT, regs->dcount); + mcinfo(" STA[%08x]: %08x\n", STM32_SDIO_STA, regs->sta); + mcinfo(" MASK[%08x]: %08x\n", STM32_SDIO_MASK, regs->mask); + mcinfo("FIFOCNT[%08x]: %08x\n", STM32_SDIO_FIFOCNT, regs->fifocnt); } #endif @@ -835,12 +837,13 @@ static void stm32_sdiodump(struct stm32_sdioregs_s *regs, const char *msg) static void stm32_dumpsample(struct stm32_dev_s *priv, struct stm32_sampleregs_s *regs, const char *msg) { -#if defined(CONFIG_DEBUG_DMA) && defined(CONFIG_SDIO_DMA) +#if defined(CONFIG_DEBUG_DMA_INFO) && defined(CONFIG_SDIO_DMA) if (priv->dmamode) { stm32_dmadump(priv->dma, ®s->dma, msg); } #endif + stm32_sdiodump(®s->sdio, msg); } #endif @@ -857,15 +860,18 @@ static void stm32_dumpsample(struct stm32_dev_s *priv, static void stm32_dumpsamples(struct stm32_dev_s *priv) { stm32_dumpsample(priv, &g_sampleregs[SAMPLENDX_BEFORE_SETUP], "Before setup"); -#if defined(CONFIG_DEBUG_DMA) && defined(CONFIG_SDIO_DMA) + +#if defined(CONFIG_DEBUG_DMA_INFO) && defined(CONFIG_SDIO_DMA) if (priv->dmamode) { stm32_dumpsample(priv, &g_sampleregs[SAMPLENDX_BEFORE_ENABLE], "Before DMA enable"); } #endif + stm32_dumpsample(priv, &g_sampleregs[SAMPLENDX_AFTER_SETUP], "After setup"); stm32_dumpsample(priv, &g_sampleregs[SAMPLENDX_END_TRANSFER], "End of transfer"); -#if defined(CONFIG_DEBUG_DMA) && defined(CONFIG_SDIO_DMA) + +#if defined(CONFIG_DEBUG_DMA_INFO) && defined(CONFIG_SDIO_DMA) if (priv->dmamode) { stm32_dumpsample(priv, &g_sampleregs[SAMPLENDX_DMA_CALLBACK], "DMA Callback"); @@ -901,7 +907,7 @@ static void stm32_dmacallback(DMA_HANDLE handle, uint8_t status, void *arg) if ((status & DMA_STATUS_ERROR) != 0) { - flldbg("DMA error %02x, remaining: %d\n", status, priv->remaining); + mcerr("ERROR: DMA error %02x, remaining: %d\n", status, priv->remaining); result = SDIOWAIT_ERROR; } else @@ -1166,7 +1172,7 @@ static void stm32_eventtimeout(int argc, uint32_t arg) /* Yes.. wake up any waiting threads */ stm32_endwait(priv, SDIOWAIT_TIMEOUT); - flldbg("Timeout: remaining: %d\n", priv->remaining); + mcerr("ERROR: Timeout, remaining: %d\n", priv->remaining); } } @@ -1406,7 +1412,7 @@ static int stm32_interrupt(int irq, void *context) { /* Terminate the transfer with an error */ - flldbg("ERROR: Data block CRC failure, remaining: %d\n", priv->remaining); + mcerr("ERROR: Data block CRC failure, remaining: %d\n", priv->remaining); stm32_endtransfer(priv, SDIOWAIT_TRANSFERDONE | SDIOWAIT_ERROR); } @@ -1416,7 +1422,7 @@ static int stm32_interrupt(int irq, void *context) { /* Terminate the transfer with an error */ - flldbg("ERROR: Data timeout, remaining: %d\n", priv->remaining); + mcerr("ERROR: Data timeout, remaining: %d\n", priv->remaining); stm32_endtransfer(priv, SDIOWAIT_TRANSFERDONE | SDIOWAIT_TIMEOUT); } @@ -1426,7 +1432,7 @@ static int stm32_interrupt(int irq, void *context) { /* Terminate the transfer with an error */ - flldbg("ERROR: RX FIFO overrun, remaining: %d\n", priv->remaining); + mcerr("ERROR: RX FIFO overrun, remaining: %d\n", priv->remaining); stm32_endtransfer(priv, SDIOWAIT_TRANSFERDONE | SDIOWAIT_ERROR); } @@ -1436,7 +1442,7 @@ static int stm32_interrupt(int irq, void *context) { /* Terminate the transfer with an error */ - flldbg("ERROR: TX FIFO underrun, remaining: %d\n", priv->remaining); + mcerr("ERROR: TX FIFO underrun, remaining: %d\n", priv->remaining); stm32_endtransfer(priv, SDIOWAIT_TRANSFERDONE | SDIOWAIT_ERROR); } @@ -1446,7 +1452,7 @@ static int stm32_interrupt(int irq, void *context) { /* Terminate the transfer with an error */ - flldbg("ERROR: Start bit, remaining: %d\n", priv->remaining); + mcerr("ERROR: Start bit, remaining: %d\n", priv->remaining); stm32_endtransfer(priv, SDIOWAIT_TRANSFERDONE | SDIOWAIT_ERROR); } } @@ -1582,8 +1588,8 @@ static void stm32_reset(FAR struct sdio_dev_s *dev) stm32_setpwrctrl(SDIO_POWER_PWRCTRL_ON); leave_critical_section(flags); - fvdbg("CLCKR: %08x POWER: %08x\n", - getreg32(STM32_SDIO_CLKCR), getreg32(STM32_SDIO_POWER)); + mcinfo("CLCKR: %08x POWER: %08x\n", + getreg32(STM32_SDIO_CLKCR), getreg32(STM32_SDIO_POWER)); } /**************************************************************************** @@ -1795,7 +1801,7 @@ static int stm32_sendcmd(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t arg) cmdidx = (cmd & MMCSD_CMDIDX_MASK) >> MMCSD_CMDIDX_SHIFT; regval |= cmdidx | SDIO_CMD_CPSMEN; - fvdbg("cmd: %08x arg: %08x regval: %08x\n", cmd, arg, regval); + mcinfo("cmd: %08x arg: %08x regval: %08x\n", cmd, arg, regval); /* Write the SDIO CMD */ @@ -2025,7 +2031,7 @@ static int stm32_waitresponse(FAR struct sdio_dev_s *dev, uint32_t cmd) { if (--timeout <= 0) { - fdbg("ERROR: Timeout cmd: %08x events: %08x STA: %08x\n", + mcerr("ERROR: Timeout cmd: %08x events: %08x STA: %08x\n", cmd, events, getreg32(STM32_SDIO_STA)); return -ETIMEDOUT; @@ -2060,7 +2066,7 @@ static int stm32_waitresponse(FAR struct sdio_dev_s *dev, uint32_t cmd) static int stm32_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t *rshort) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_MEMCARD_INFO uint32_t respcmd; #endif uint32_t regval; @@ -2089,10 +2095,10 @@ static int stm32_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_MEMCARD_INFO if (!rshort) { - fdbg("ERROR: rshort=NULL\n"); + mcerr("ERROR: rshort=NULL\n"); ret = -EINVAL; } @@ -2102,7 +2108,7 @@ static int stm32_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t (cmd & MMCSD_RESPONSE_MASK) != MMCSD_R1B_RESPONSE && (cmd & MMCSD_RESPONSE_MASK) != MMCSD_R6_RESPONSE) { - fdbg("ERROR: Wrong response CMD=%08x\n", cmd); + mcerr("ERROR: Wrong response CMD=%08x\n", cmd); ret = -EINVAL; } else @@ -2113,15 +2119,15 @@ static int stm32_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t regval = getreg32(STM32_SDIO_STA); if ((regval & SDIO_STA_CTIMEOUT) != 0) { - fdbg("ERROR: Command timeout: %08x\n", regval); + mcerr("ERROR: Command timeout: %08x\n", regval); ret = -ETIMEDOUT; } else if ((regval & SDIO_STA_CCRCFAIL) != 0) { - fdbg("ERROR: CRC failure: %08x\n", regval); + mcerr("ERROR: CRC failure: %08x\n", regval); ret = -EIO; } -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_MEMCARD_INFO else { /* Check response received is of desired command */ @@ -2129,7 +2135,7 @@ static int stm32_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t respcmd = getreg32(STM32_SDIO_RESPCMD); if ((uint8_t)(respcmd & SDIO_RESPCMD_MASK) != (cmd & MMCSD_CMDIDX_MASK)) { - fdbg("ERROR: RESCMD=%02x CMD=%08x\n", respcmd, cmd); + mcerr("ERROR: RESCMD=%02x CMD=%08x\n", respcmd, cmd); ret = -EINVAL; } } @@ -2157,12 +2163,12 @@ static int stm32_recvlong(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t rlo * 0 1 End bit */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_MEMCARD_INFO /* Check that R1 is the correct response to this command */ if ((cmd & MMCSD_RESPONSE_MASK) != MMCSD_R2_RESPONSE) { - fdbg("ERROR: Wrong response CMD=%08x\n", cmd); + mcerr("ERROR: Wrong response CMD=%08x\n", cmd); ret = -EINVAL; } else @@ -2173,12 +2179,12 @@ static int stm32_recvlong(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t rlo regval = getreg32(STM32_SDIO_STA); if (regval & SDIO_STA_CTIMEOUT) { - fdbg("ERROR: Timeout STA: %08x\n", regval); + mcerr("ERROR: Timeout STA: %08x\n", regval); ret = -ETIMEDOUT; } else if (regval & SDIO_STA_CCRCFAIL) { - fdbg("ERROR: CRC fail STA: %08x\n", regval); + mcerr("ERROR: CRC fail STA: %08x\n", regval); ret = -EIO; } } @@ -2212,11 +2218,11 @@ static int stm32_recvshort(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t *r /* Check that this is the correct response to this command */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_MEMCARD_INFO if ((cmd & MMCSD_RESPONSE_MASK) != MMCSD_R3_RESPONSE && (cmd & MMCSD_RESPONSE_MASK) != MMCSD_R7_RESPONSE) { - fdbg("ERROR: Wrong response CMD=%08x\n", cmd); + mcerr("ERROR: Wrong response CMD=%08x\n", cmd); ret = -EINVAL; } else @@ -2229,7 +2235,7 @@ static int stm32_recvshort(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t *r regval = getreg32(STM32_SDIO_STA); if (regval & SDIO_STA_CTIMEOUT) { - fdbg("ERROR: Timeout STA: %08x\n", regval); + mcerr("ERROR: Timeout STA: %08x\n", regval); ret = -ETIMEDOUT; } } @@ -2384,7 +2390,7 @@ static sdio_eventset_t stm32_eventwait(FAR struct sdio_dev_s *dev, 1, (uint32_t)priv); if (ret != OK) { - fdbg("ERROR: wd_start failed: %d\n", ret); + mcerr("ERROR: wd_start failed: %d\n", ret); } } @@ -2471,7 +2477,7 @@ static void stm32_callbackenable(FAR struct sdio_dev_s *dev, { struct stm32_dev_s *priv = (struct stm32_dev_s *)dev; - fvdbg("eventset: %02x\n", eventset); + mcinfo("eventset: %02x\n", eventset); DEBUGASSERT(priv != NULL); priv->cbevents = eventset; @@ -2507,7 +2513,7 @@ static int stm32_registercallback(FAR struct sdio_dev_s *dev, /* Disable callbacks and register this callback and is argument */ - fvdbg("Register %p(%p)\n", callback, arg); + mcinfo("Register %p(%p)\n", callback, arg); DEBUGASSERT(priv != NULL); priv->cbevents = 0; @@ -2743,8 +2749,8 @@ static void stm32_callback(void *arg) /* Is a callback registered? */ DEBUGASSERT(priv != NULL); - fvdbg("Callback %p(%p) cbevents: %02x cdstatus: %02x\n", - priv->callback, priv->cbarg, priv->cbevents, priv->cdstatus); + mcinfo("Callback %p(%p) cbevents: %02x cdstatus: %02x\n", + priv->callback, priv->cbarg, priv->cbevents, priv->cdstatus); if (priv->callback) { @@ -2788,14 +2794,14 @@ static void stm32_callback(void *arg) { /* Yes.. queue it */ - fvdbg("Queuing callback to %p(%p)\n", priv->callback, priv->cbarg); + mcinfo("Queuing callback to %p(%p)\n", priv->callback, priv->cbarg); (void)work_queue(HPWORK, &priv->cbwork, (worker_t)priv->callback, priv->cbarg, 0); } else { /* No.. then just call the callback here */ - fvdbg("Callback to %p(%p)\n", priv->callback, priv->cbarg); + mcinfo("Callback to %p(%p)\n", priv->callback, priv->cbarg); priv->callback(priv->cbarg); } } @@ -2925,7 +2931,7 @@ void sdio_mediachange(FAR struct sdio_dev_s *dev, bool cardinslot) leave_critical_section(flags); - fvdbg("cdstatus OLD: %02x NEW: %02x\n", cdstatus, priv->cdstatus); + mcinfo("cdstatus OLD: %02x NEW: %02x\n", cdstatus, priv->cdstatus); /* Perform any requested callback if the status has changed */ @@ -2967,7 +2973,8 @@ void sdio_wrprotect(FAR struct sdio_dev_s *dev, bool wrprotect) { priv->cdstatus &= ~SDIO_STATUS_WRPROTECTED; } - fvdbg("cdstatus: %02x\n", priv->cdstatus); + + mcinfo("cdstatus: %02x\n", priv->cdstatus); leave_critical_section(flags); } #endif /* CONFIG_STM32_SDIO */ diff --git a/arch/arm/src/stm32/stm32_spi.c b/arch/arm/src/stm32/stm32_spi.c index eed9ea9845b58d849bee1db75454ebed984b1e52..807a13127f2243fe10cab221831db3c11bda55a5 100644 --- a/arch/arm/src/stm32/stm32_spi.c +++ b/arch/arm/src/stm32/stm32_spi.c @@ -155,27 +155,6 @@ # error "Unknown STM32 DMA" #endif - -/* Debug ****************************************************************************/ -/* Check if (non-standard) SPI debug is enabled */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_SPI -#endif - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - /************************************************************************************ * Private Types ************************************************************************************/ @@ -1052,7 +1031,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) * faster. */ - spivdbg("Frequency %d->%d\n", frequency, actual); + spiinfo("Frequency %d->%d\n", frequency, actual); priv->frequency = frequency; priv->actual = actual; @@ -1082,7 +1061,7 @@ static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode) uint16_t setbits; uint16_t clrbits; - spivdbg("mode=%d\n", mode); + spiinfo("mode=%d\n", mode); /* Has the mode changed? */ @@ -1147,7 +1126,7 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) uint16_t setbits; uint16_t clrbits; - spivdbg("nbits=%d\n", nbits); + spiinfo("nbits=%d\n", nbits); /* Has the number of bits changed? */ @@ -1222,7 +1201,7 @@ static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd) regval = spi_getreg(priv, STM32_SPI_SR_OFFSET); - spivdbg("Sent: %04x Return: %04x Status: %02x\n", wd, ret, regval); + spiinfo("Sent: %04x Return: %04x Status: %02x\n", wd, ret, regval); UNUSED(regval); return ret; @@ -1260,7 +1239,7 @@ static void spi_exchange_nodma(FAR struct spi_dev_s *dev, FAR const void *txbuff FAR struct stm32_spidev_s *priv = (FAR struct stm32_spidev_s *)dev; DEBUGASSERT(priv && priv->spibase); - spivdbg("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); + spiinfo("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); /* 8- or 16-bit mode? */ @@ -1373,7 +1352,7 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, static uint16_t rxdummy = 0xffff; static const uint16_t txdummy = 0xffff; - spivdbg("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); + spiinfo("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); DEBUGASSERT(priv && priv->spibase); /* Setup DMAs */ @@ -1416,7 +1395,7 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, #ifndef CONFIG_SPI_EXCHANGE static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *txbuffer, size_t nwords) { - spivdbg("txbuffer=%p nwords=%d\n", txbuffer, nwords); + spiinfo("txbuffer=%p nwords=%d\n", txbuffer, nwords); return spi_exchange(dev, txbuffer, NULL, nwords); } #endif @@ -1443,7 +1422,7 @@ static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *txbuffer, si #ifndef CONFIG_SPI_EXCHANGE static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *rxbuffer, size_t nwords) { - spivdbg("rxbuffer=%p nwords=%d\n", rxbuffer, nwords); + spiinfo("rxbuffer=%p nwords=%d\n", rxbuffer, nwords); return spi_exchange(dev, NULL, rxbuffer, nwords); } #endif @@ -1692,7 +1671,7 @@ FAR struct spi_dev_s *stm32_spibus_initialize(int bus) else #endif { - spidbg("ERROR: Unsupbused SPI bus: %d\n", bus); + spierr("ERROR: Unsupbused SPI bus: %d\n", bus); return NULL; } diff --git a/arch/arm/src/stm32/stm32_start.c b/arch/arm/src/stm32/stm32_start.c index 8e58e862a9ed94ad48523be4c9cf8cbfa5ca0b96..480d5f58b46811e4bbd7320e0854c75bb7894d88 100644 --- a/arch/arm/src/stm32/stm32_start.c +++ b/arch/arm/src/stm32/stm32_start.c @@ -81,7 +81,7 @@ static void go_os_start(void *pv, unsigned int nbytes) * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES # define showprogress(c) up_lowputc(c) #else # define showprogress(c) diff --git a/arch/arm/src/stm32/stm32_tim.c b/arch/arm/src/stm32/stm32_tim.c index 14359625f888805236ba74b06c6beb21850c226c..62e2783e3a8ff1281fad5e58e35f2259a7ff0128 100644 --- a/arch/arm/src/stm32/stm32_tim.c +++ b/arch/arm/src/stm32/stm32_tim.c @@ -144,57 +144,137 @@ defined(CONFIG_STM32_TIM14_DAC) || defined(CONFIG_STM32_TIM14_QE) # undef CONFIG_STM32_TIM14 #endif +#if defined(CONFIG_STM32_TIM15_PWM) || defined (CONFIG_STM32_TIM15_ADC) || \ + defined(CONFIG_STM32_TIM15_DAC) || defined(CONFIG_STM32_TIM15_QE) +# undef CONFIG_STM32_TIM15 +#endif +#if defined(CONFIG_STM32_TIM16_PWM) || defined (CONFIG_STM32_TIM16_ADC) || \ + defined(CONFIG_STM32_TIM16_DAC) || defined(CONFIG_STM32_TIM16_QE) +# undef CONFIG_STM32_TIM16 +#endif +#if defined(CONFIG_STM32_TIM17_PWM) || defined (CONFIG_STM32_TIM17_ADC) || \ + defined(CONFIG_STM32_TIM17_DAC) || defined(CONFIG_STM32_TIM17_QE) +# undef CONFIG_STM32_TIM17 +#endif -#if defined(CONFIG_STM32_TIM1) +#if defined(CONFIG_STM32_TIM1) # if defined(GPIO_TIM1_CH1OUT) ||defined(GPIO_TIM1_CH2OUT)||\ defined(GPIO_TIM1_CH3OUT) ||defined(GPIO_TIM1_CH4OUT) # define HAVE_TIM1_GPIOCONFIG 1 #endif #endif -#if defined(CONFIG_STM32_TIM2) +#if defined(CONFIG_STM32_TIM2) # if defined(GPIO_TIM2_CH1OUT) ||defined(GPIO_TIM2_CH2OUT)||\ defined(GPIO_TIM2_CH3OUT) ||defined(GPIO_TIM2_CH4OUT) # define HAVE_TIM2_GPIOCONFIG 1 #endif #endif -#if defined(CONFIG_STM32_TIM3) +#if defined(CONFIG_STM32_TIM3) # if defined(GPIO_TIM3_CH1OUT) ||defined(GPIO_TIM3_CH2OUT)||\ defined(GPIO_TIM3_CH3OUT) ||defined(GPIO_TIM3_CH4OUT) # define HAVE_TIM3_GPIOCONFIG 1 #endif #endif -#if defined(CONFIG_STM32_TIM4) +#if defined(CONFIG_STM32_TIM4) # if defined(GPIO_TIM4_CH1OUT) ||defined(GPIO_TIM4_CH2OUT)||\ defined(GPIO_TIM4_CH3OUT) ||defined(GPIO_TIM4_CH4OUT) # define HAVE_TIM4_GPIOCONFIG 1 #endif #endif -#if defined(CONFIG_STM32_TIM5) +#if defined(CONFIG_STM32_TIM5) # if defined(GPIO_TIM5_CH1OUT) ||defined(GPIO_TIM5_CH2OUT)||\ defined(GPIO_TIM5_CH3OUT) ||defined(GPIO_TIM5_CH4OUT) # define HAVE_TIM5_GPIOCONFIG 1 #endif #endif -#if defined(CONFIG_STM32_TIM8) +#if defined(CONFIG_STM32_TIM8) # if defined(GPIO_TIM8_CH1OUT) ||defined(GPIO_TIM8_CH2OUT)||\ defined(GPIO_TIM8_CH3OUT) ||defined(GPIO_TIM8_CH4OUT) # define HAVE_TIM8_GPIOCONFIG 1 #endif #endif +#if defined(CONFIG_STM32_TIM9) +# if defined(GPIO_TIM9_CH1OUT) ||defined(GPIO_TIM9_CH2OUT)||\ + defined(GPIO_TIM9_CH3OUT) ||defined(GPIO_TIM9_CH4OUT) +# define HAVE_TIM9_GPIOCONFIG 1 +#endif +#endif + +#if defined(CONFIG_STM32_TIM10) +# if defined(GPIO_TIM10_CH1OUT) ||defined(GPIO_TIM10_CH2OUT)||\ + defined(GPIO_TIM10_CH3OUT) ||defined(GPIO_TIM10_CH4OUT) +# define HAVE_TIM10_GPIOCONFIG 1 +#endif +#endif + +#if defined(CONFIG_STM32_TIM11) +# if defined(GPIO_TIM11_CH1OUT) ||defined(GPIO_TIM11_CH2OUT)||\ + defined(GPIO_TIM11_CH3OUT) ||defined(GPIO_TIM11_CH4OUT) +# define HAVE_TIM11_GPIOCONFIG 1 +#endif +#endif + +#if defined(CONFIG_STM32_TIM12) +# if defined(GPIO_TIM12_CH1OUT) ||defined(GPIO_TIM12_CH2OUT)||\ + defined(GPIO_TIM12_CH3OUT) ||defined(GPIO_TIM12_CH4OUT) +# define HAVE_TIM12_GPIOCONFIG 1 +#endif +#endif + +#if defined(CONFIG_STM32_TIM13) +# if defined(GPIO_TIM13_CH1OUT) ||defined(GPIO_TIM13_CH2OUT)||\ + defined(GPIO_TIM13_CH3OUT) ||defined(GPIO_TIM13_CH4OUT) +# define HAVE_TIM13_GPIOCONFIG 1 +#endif +#endif + +#if defined(CONFIG_STM32_TIM14) +# if defined(GPIO_TIM14_CH1OUT) ||defined(GPIO_TIM14_CH2OUT)||\ + defined(GPIO_TIM14_CH3OUT) ||defined(GPIO_TIM14_CH4OUT) +# define HAVE_TIM14_GPIOCONFIG 1 +#endif +#endif + +#if defined(CONFIG_STM32_TIM15) +# if defined(GPIO_TIM15_CH1OUT) ||defined(GPIO_TIM15_CH2OUT)||\ + defined(GPIO_TIM15_CH3OUT) ||defined(GPIO_TIM15_CH4OUT) +# define HAVE_TIM15_GPIOCONFIG 1 +#endif +#endif + +#if defined(CONFIG_STM32_TIM16) +# if defined(GPIO_TIM16_CH1OUT) ||defined(GPIO_TIM16_CH2OUT)||\ + defined(GPIO_TIM16_CH3OUT) ||defined(GPIO_TIM16_CH4OUT) +# define HAVE_TIM16_GPIOCONFIG 1 +#endif +#endif + +#if defined(CONFIG_STM32_TIM17) +# if defined(GPIO_TIM17_CH1OUT) ||defined(GPIO_TIM17_CH2OUT)||\ + defined(GPIO_TIM17_CH3OUT) ||defined(GPIO_TIM17_CH4OUT) +# define HAVE_TIM17_GPIOCONFIG 1 +#endif +#endif /* This module then only compiles if there are enabled timers that are not intended for * some other purpose. */ -#if defined(CONFIG_STM32_TIM1) || defined(CONFIG_STM32_TIM2) || defined(CONFIG_STM32_TIM3) || \ - defined(CONFIG_STM32_TIM4) || defined(CONFIG_STM32_TIM5) || defined(CONFIG_STM32_TIM6) || \ - defined(CONFIG_STM32_TIM7) || defined(CONFIG_STM32_TIM8) +#if defined(CONFIG_STM32_TIM1) || defined(CONFIG_STM32_TIM2) || \ + defined(CONFIG_STM32_TIM3) || defined(CONFIG_STM32_TIM4) || \ + defined(CONFIG_STM32_TIM5) || defined(CONFIG_STM32_TIM6) || \ + defined(CONFIG_STM32_TIM7) || defined(CONFIG_STM32_TIM8) || \ + defined(CONFIG_STM32_TIM9) || defined(CONFIG_STM32_TIM10) || \ + defined(CONFIG_STM32_TIM11) || defined(CONFIG_STM32_TIM12) || \ + defined(CONFIG_STM32_TIM13) || defined(CONFIG_STM32_TIM14) || \ + defined(CONFIG_STM32_TIM15) || defined(CONFIG_STM32_TIM16) || \ + defined(CONFIG_STM32_TIM17) /************************************************************************************ * Private Types @@ -312,9 +392,10 @@ static void stm32_tim_gpioconfig(uint32_t cfg, stm32_tim_channel_t mode) static int stm32_tim_setclock(FAR struct stm32_tim_dev_s *dev, uint32_t freq) { + uint32_t freqin; int prescaler; - ASSERT(dev); + DEBUGASSERT(dev != NULL); /* Disable Timer? */ @@ -324,20 +405,112 @@ static int stm32_tim_setclock(FAR struct stm32_tim_dev_s *dev, uint32_t freq) return 0; } -#if STM32_NATIM > 0 - if (((struct stm32_tim_priv_s *)dev)->base == STM32_TIM1_BASE || - ((struct stm32_tim_priv_s *)dev)->base == STM32_TIM8_BASE) + /* Get the input clock frequency for this timer. These vary with + * different timer clock sources, MCU-specific timer configuration, and + * board-specific clock configuration. The correct input clock frequency + * must be defined in the board.h header file. + */ + + switch (((struct stm32_tim_priv_s *)dev)->base) { - prescaler = STM32_TIM18_FREQUENCY / freq; - } - else +#ifdef CONFIG_STM32_TIM1 + case STM32_TIM1_BASE: + freqin = BOARD_TIM1_FREQUENCY; + break; #endif - { - prescaler = STM32_TIM27_FREQUENCY / freq; +#ifdef CONFIG_STM32_TIM2 + case STM32_TIM2_BASE: + freqin = BOARD_TIM2_FREQUENCY; + break; +#endif +#ifdef CONFIG_STM32_TIM3 + case STM32_TIM3_BASE: + freqin = BOARD_TIM3_FREQUENCY; + break; +#endif +#ifdef CONFIG_STM32_TIM4 + case STM32_TIM4_BASE: + freqin = BOARD_TIM4_FREQUENCY; + break; +#endif +#ifdef CONFIG_STM32_TIM5 + case STM32_TIM5_BASE: + freqin = BOARD_TIM5_FREQUENCY; + break; +#endif +#ifdef CONFIG_STM32_TIM6 + case STM32_TIM6_BASE: + freqin = BOARD_TIM6_FREQUENCY; + break; +#endif +#ifdef CONFIG_STM32_TIM7 + case STM32_TIM7_BASE: + freqin = BOARD_TIM7_FREQUENCY; + break; +#endif +#ifdef CONFIG_STM32_TIM8 + case STM32_TIM8_BASE: + freqin = BOARD_TIM8_FREQUENCY; + break; +#endif +#ifdef CONFIG_STM32_TIM9 + case STM32_TIM9_BASE: + freqin = BOARD_TIM9_FREQUENCY; + break; +#endif +#ifdef CONFIG_STM32_TIM10 + case STM32_TIM10_BASE: + freqin = BOARD_TIM10_FREQUENCY; + break; +#endif +#ifdef CONFIG_STM32_TIM11 + case STM32_TIM11_BASE: + freqin = BOARD_TIM11_FREQUENCY; + break; +#endif +#ifdef CONFIG_STM32_TIM12 + case STM32_TIM12_BASE: + freqin = BOARD_TIM12_FREQUENCY; + break; +#endif +#ifdef CONFIG_STM32_TIM13 + case STM32_TIM13_BASE: + freqin = BOARD_TIM13_FREQUENCY; + break; +#endif +#ifdef CONFIG_STM32_TIM14 + case STM32_TIM14_BASE: + freqin = BOARD_TIM14_FREQUENCY; + break; +#endif +#ifdef CONFIG_STM32_TIM15 + case STM32_TIM15_BASE: + freqin = BOARD_TIM15_FREQUENCY; + break; +#endif +#ifdef CONFIG_STM32_TIM16 + case STM32_TIM16_BASE: + freqin = BOARD_TIM16_FREQUENCY; + break; +#endif +#ifdef CONFIG_STM32_TIM17 + case STM32_TIM17_BASE: + freqin = BOARD_TIM17_FREQUENCY; + break; +#endif + + default: + return -EINVAL; } - /* We need to decrement value for '1', but only, if we are allowed to - * not to cause underflow. Check for overflow. + /* Select a pre-scaler value for this timer using the input clock + * frequency. + */ + + prescaler = freqin / freq; + + /* We need to decrement value for '1', but only, if that will not to + * cause underflow. */ if (prescaler > 0) @@ -345,6 +518,8 @@ static int stm32_tim_setclock(FAR struct stm32_tim_dev_s *dev, uint32_t freq) prescaler--; } + /* Check for overflow as well. */ + if (prescaler > 0xffff) { prescaler = 0xffff; @@ -359,7 +534,7 @@ static int stm32_tim_setclock(FAR struct stm32_tim_dev_s *dev, uint32_t freq) static void stm32_tim_setperiod(FAR struct stm32_tim_dev_s *dev, uint32_t period) { - ASSERT(dev); + DEBUGASSERT(dev != NULL); stm32_putreg32(dev, STM32_BTIM_ARR_OFFSET, period); } @@ -369,11 +544,16 @@ static int stm32_tim_setisr(FAR struct stm32_tim_dev_s *dev, { int vectorno; - ASSERT(dev); - ASSERT(source == 0); + DEBUGASSERT(dev != NULL); + DEBUGASSERT(source == 0); switch (((struct stm32_tim_priv_s *)dev)->base) { +#ifdef CONFIG_STM32_TIM1 + case STM32_TIM1_BASE: + vectorno = STM32_IRQ_TIM1UP; + break; +#endif #ifdef CONFIG_STM32_TIM2 case STM32_TIM2_BASE: vectorno = STM32_IRQ_TIM2; @@ -394,36 +574,69 @@ static int stm32_tim_setisr(FAR struct stm32_tim_dev_s *dev, vectorno = STM32_IRQ_TIM5; break; #endif -#if STM32_NBTIM > 0 #ifdef CONFIG_STM32_TIM6 case STM32_TIM6_BASE: vectorno = STM32_IRQ_TIM6; break; #endif -#endif -#if STM32_NBTIM > 1 #ifdef CONFIG_STM32_TIM7 case STM32_TIM7_BASE: vectorno = STM32_IRQ_TIM7; break; #endif -#endif -#if STM32_NATIM > 0 - /* TODO: add support for multiple sources and callbacks */ - -#ifdef CONFIG_STM32_TIM1 - case STM32_TIM1_BASE: - vectorno = STM32_IRQ_TIM1UP; - break; -#endif #ifdef CONFIG_STM32_TIM8 case STM32_TIM8_BASE: vectorno = STM32_IRQ_TIM8UP; break; #endif +#ifdef CONFIG_STM32_TIM9 + case STM32_TIM9_BASE: + vectorno = STM32_IRQ_TIM9; + break; +#endif +#ifdef CONFIG_STM32_TIM10 + case STM32_TIM10_BASE: + vectorno = STM32_IRQ_TIM10; + break; +#endif +#ifdef CONFIG_STM32_TIM11 + case STM32_TIM11_BASE: + vectorno = STM32_IRQ_TIM11; + break; +#endif +#ifdef CONFIG_STM32_TIM12 + case STM32_TIM12_BASE: + vectorno = STM32_IRQ_TIM12; + break; +#endif +#ifdef CONFIG_STM32_TIM13 + case STM32_TIM13_BASE: + vectorno = STM32_IRQ_TIM13; + break; #endif +#ifdef CONFIG_STM32_TIM14 + case STM32_TIM14_BASE: + vectorno = STM32_IRQ_TIM14; + break; +#endif +#ifdef CONFIG_STM32_TIM15 + case STM32_TIM15_BASE: + vectorno = STM32_IRQ_TIM15; + break; +#endif +#ifdef CONFIG_STM32_TIM16 + case STM32_TIM16_BASE: + vectorno = STM32_IRQ_TIM16; + break; +#endif +#ifdef CONFIG_STM32_TIM17 + case STM32_TIM17_BASE: + vectorno = STM32_IRQ_TIM17; + break; +#endif + default: - return ERROR; + return -EINVAL; } /* Disable interrupt when callback is removed */ @@ -451,13 +664,13 @@ static int stm32_tim_setisr(FAR struct stm32_tim_dev_s *dev, static void stm32_tim_enableint(FAR struct stm32_tim_dev_s *dev, int source) { - ASSERT(dev); + DEBUGASSERT(dev != NULL); stm32_modifyreg16(dev, STM32_BTIM_DIER_OFFSET, 0, ATIM_DIER_UIE); } static void stm32_tim_disableint(FAR struct stm32_tim_dev_s *dev, int source) { - ASSERT(dev); + DEBUGASSERT(dev != NULL); stm32_modifyreg16(dev, STM32_BTIM_DIER_OFFSET, ATIM_DIER_UIE, 0); } @@ -474,7 +687,7 @@ static int stm32_tim_setmode(FAR struct stm32_tim_dev_s *dev, stm32_tim_mode_t m { uint16_t val = ATIM_CR1_CEN | ATIM_CR1_ARPE; - ASSERT(dev); + DEBUGASSERT(dev != NULL); /* This function is not supported on basic timers. To enable or * disable it, simply set its clock to valid frequency or zero. @@ -489,7 +702,7 @@ static int stm32_tim_setmode(FAR struct stm32_tim_dev_s *dev, stm32_tim_mode_t m #if STM32_NBTIM > 0 ) { - return ERROR; + return -EINVAL; } #endif @@ -517,7 +730,7 @@ static int stm32_tim_setmode(FAR struct stm32_tim_dev_s *dev, stm32_tim_mode_t m break; default: - return ERROR; + return -EINVAL; } stm32_tim_reload_counter(dev); @@ -545,13 +758,13 @@ static int stm32_tim_setchannel(FAR struct stm32_tim_dev_s *dev, uint8_t channel uint16_t ccer_val = stm32_getreg16(dev, STM32_GTIM_CCER_OFFSET); uint8_t ccmr_offset = STM32_GTIM_CCMR1_OFFSET; - ASSERT(dev); + DEBUGASSERT(dev != NULL); /* Further we use range as 0..3; if channel=0 it will also overflow here */ if (--channel > 4) { - return ERROR; + return -EINVAL; } /* Assume that channel is disabled and polarity is active high */ @@ -571,7 +784,7 @@ static int stm32_tim_setchannel(FAR struct stm32_tim_dev_s *dev, uint8_t channel #if STM32_NBTIM > 0 ) { - return ERROR; + return -EINVAL; } #endif @@ -588,7 +801,7 @@ static int stm32_tim_setchannel(FAR struct stm32_tim_dev_s *dev, uint8_t channel break; default: - return ERROR; + return -EINVAL; } /* Set polarity */ @@ -621,6 +834,31 @@ static int stm32_tim_setchannel(FAR struct stm32_tim_dev_s *dev, uint8_t channel switch (((struct stm32_tim_priv_s *)dev)->base) { +#ifdef CONFIG_STM32_TIM1 + case STM32_TIM1_BASE: + switch (channel) + { +#if defined(GPIO_TIM1_CH1OUT) + case 0: + stm32_tim_gpioconfig(GPIO_TIM1_CH1OUT, mode); break; +#endif +#if defined(GPIO_TIM1_CH2OUT) + case 1: + stm32_tim_gpioconfig(GPIO_TIM1_CH2OUT, mode); break; +#endif +#if defined(GPIO_TIM1_CH3OUT) + case 2: + stm32_tim_gpioconfig(GPIO_TIM1_CH3OUT, mode); break; +#endif +#if defined(GPIO_TIM1_CH4OUT) + case 3: + stm32_tim_gpioconfig(GPIO_TIM1_CH4OUT, mode); break; +#endif + default: + return -EINVAL; + } + break; +#endif #ifdef CONFIG_STM32_TIM2 case STM32_TIM2_BASE: switch (channel) @@ -646,7 +884,7 @@ static int stm32_tim_setchannel(FAR struct stm32_tim_dev_s *dev, uint8_t channel break; #endif default: - return ERROR; + return -EINVAL; } break; #endif @@ -675,7 +913,7 @@ static int stm32_tim_setchannel(FAR struct stm32_tim_dev_s *dev, uint8_t channel break; #endif default: - return ERROR; + return -EINVAL; } break; #endif @@ -704,7 +942,7 @@ static int stm32_tim_setchannel(FAR struct stm32_tim_dev_s *dev, uint8_t channel break; #endif default: - return ERROR; + return -EINVAL; } break; #endif @@ -733,65 +971,298 @@ static int stm32_tim_setchannel(FAR struct stm32_tim_dev_s *dev, uint8_t channel break; #endif default: - return ERROR; + return -EINVAL; } break; #endif - -#if STM32_NATIM > 0 -#ifdef CONFIG_STM32_TIM1 - case STM32_TIM1_BASE: +#ifdef CONFIG_STM32_TIM8 + case STM32_TIM8_BASE: switch (channel) { -#if defined(GPIO_TIM1_CH1OUT) +#if defined(GPIO_TIM8_CH1OUT) case 0: - stm32_tim_gpioconfig(GPIO_TIM1_CH1OUT, mode); break; + stm32_tim_gpioconfig(GPIO_TIM8_CH1OUT, mode); break; #endif -#if defined(GPIO_TIM1_CH2OUT) +#if defined(GPIO_TIM8_CH2OUT) case 1: - stm32_tim_gpioconfig(GPIO_TIM1_CH2OUT, mode); break; + stm32_tim_gpioconfig(GPIO_TIM8_CH2OUT, mode); break; #endif -#if defined(GPIO_TIM1_CH3OUT) +#if defined(GPIO_TIM8_CH3OUT) case 2: - stm32_tim_gpioconfig(GPIO_TIM1_CH3OUT, mode); break; + stm32_tim_gpioconfig(GPIO_TIM8_CH3OUT, mode); break; #endif -#if defined(GPIO_TIM1_CH4OUT) +#if defined(GPIO_TIM8_CH4OUT) case 3: - stm32_tim_gpioconfig(GPIO_TIM1_CH4OUT, mode); break; + stm32_tim_gpioconfig(GPIO_TIM8_CH4OUT, mode); break; #endif default: - return ERROR; + return -EINVAL; } break; #endif -#ifdef CONFIG_STM32_TIM8 - case STM32_TIM8_BASE: +#ifdef CONFIG_STM32_TIM9 + case STM32_TIM9_BASE: switch (channel) { -#if defined(GPIO_TIM8_CH1OUT) +#if defined(GPIO_TIM9_CH1OUT) case 0: - stm32_tim_gpioconfig(GPIO_TIM8_CH1OUT, mode); break; + stm32_tim_gpioconfig(GPIO_TIM9_CH1OUT, mode); + break; #endif -#if defined(GPIO_TIM8_CH2OUT) +#if defined(GPIO_TIM9_CH2OUT) case 1: - stm32_tim_gpioconfig(GPIO_TIM8_CH2OUT, mode); break; + stm32_tim_gpioconfig(GPIO_TIM9_CH2OUT, mode); + break; #endif -#if defined(GPIO_TIM8_CH3OUT) +#if defined(GPIO_TIM9_CH3OUT) case 2: - stm32_tim_gpioconfig(GPIO_TIM8_CH3OUT, mode); break; + stm32_tim_gpioconfig(GPIO_TIM9_CH3OUT, mode); + break; #endif -#if defined(GPIO_TIM8_CH4OUT) +#if defined(GPIO_TIM9_CH4OUT) case 3: - stm32_tim_gpioconfig(GPIO_TIM8_CH4OUT, mode); break; + stm32_tim_gpioconfig(GPIO_TIM9_CH4OUT, mode); + break; +#endif + default: + return -EINVAL; + } + break; +#endif +#ifdef CONFIG_STM32_TIM10 + case STM32_TIM10_BASE: + switch (channel) + { +#if defined(GPIO_TIM10_CH1OUT) + case 0: + stm32_tim_gpioconfig(GPIO_TIM10_CH1OUT, mode); + break; +#endif +#if defined(GPIO_TIM10_CH2OUT) + case 1: + stm32_tim_gpioconfig(GPIO_TIM10_CH2OUT, mode); + break; +#endif +#if defined(GPIO_TIM10_CH3OUT) + case 2: + stm32_tim_gpioconfig(GPIO_TIM10_CH3OUT, mode); + break; +#endif +#if defined(GPIO_TIM10_CH4OUT) + case 3: + stm32_tim_gpioconfig(GPIO_TIM10_CH4OUT, mode); + break; +#endif + default: + return -EINVAL; + } + break; +#endif +#ifdef CONFIG_STM32_TIM11 + case STM32_TIM11_BASE: + switch (channel) + { +#if defined(GPIO_TIM11_CH1OUT) + case 0: + stm32_tim_gpioconfig(GPIO_TIM11_CH1OUT, mode); + break; +#endif +#if defined(GPIO_TIM11_CH2OUT) + case 1: + stm32_tim_gpioconfig(GPIO_TIM11_CH2OUT, mode); + break; +#endif +#if defined(GPIO_TIM11_CH3OUT) + case 2: + stm32_tim_gpioconfig(GPIO_TIM11_CH3OUT, mode); + break; +#endif +#if defined(GPIO_TIM11_CH4OUT) + case 3: + stm32_tim_gpioconfig(GPIO_TIM11_CH4OUT, mode); + break; +#endif + default: + return -EINVAL; + } + break; +#endif +#ifdef CONFIG_STM32_TIM12 + case STM32_TIM12_BASE: + switch (channel) + { +#if defined(GPIO_TIM12_CH1OUT) + case 0: + stm32_tim_gpioconfig(GPIO_TIM12_CH1OUT, mode); + break; +#endif +#if defined(GPIO_TIM12_CH2OUT) + case 1: + stm32_tim_gpioconfig(GPIO_TIM12_CH2OUT, mode); + break; +#endif +#if defined(GPIO_TIM12_CH3OUT) + case 2: + stm32_tim_gpioconfig(GPIO_TIM12_CH3OUT, mode); + break; +#endif +#if defined(GPIO_TIM12_CH4OUT) + case 3: + stm32_tim_gpioconfig(GPIO_TIM12_CH4OUT, mode); + break; +#endif + default: + return -EINVAL; + } + break; +#endif +#ifdef CONFIG_STM32_TIM13 + case STM32_TIM13_BASE: + switch (channel) + { +#if defined(GPIO_TIM13_CH1OUT) + case 0: + stm32_tim_gpioconfig(GPIO_TIM13_CH1OUT, mode); + break; +#endif +#if defined(GPIO_TIM13_CH2OUT) + case 1: + stm32_tim_gpioconfig(GPIO_TIM13_CH2OUT, mode); + break; +#endif +#if defined(GPIO_TIM13_CH3OUT) + case 2: + stm32_tim_gpioconfig(GPIO_TIM13_CH3OUT, mode); + break; +#endif +#if defined(GPIO_TIM13_CH4OUT) + case 3: + stm32_tim_gpioconfig(GPIO_TIM13_CH4OUT, mode); + break; +#endif + default: + return -EINVAL; + } + break; +#endif +#ifdef CONFIG_STM32_TIM14 + case STM32_TIM14_BASE: + switch (channel) + { +#if defined(GPIO_TIM14_CH1OUT) + case 0: + stm32_tim_gpioconfig(GPIO_TIM14_CH1OUT, mode); + break; +#endif +#if defined(GPIO_TIM14_CH2OUT) + case 1: + stm32_tim_gpioconfig(GPIO_TIM14_CH2OUT, mode); + break; +#endif +#if defined(GPIO_TIM14_CH3OUT) + case 2: + stm32_tim_gpioconfig(GPIO_TIM14_CH3OUT, mode); + break; +#endif +#if defined(GPIO_TIM14_CH4OUT) + case 3: + stm32_tim_gpioconfig(GPIO_TIM14_CH4OUT, mode); + break; +#endif + default: + return -EINVAL; + } + break; +#endif +#ifdef CONFIG_STM32_TIM15 + case STM32_TIM15_BASE: + switch (channel) + { +#if defined(GPIO_TIM15_CH1OUT) + case 0: + stm32_tim_gpioconfig(GPIO_TIM15_CH1OUT, mode); + break; +#endif +#if defined(GPIO_TIM15_CH2OUT) + case 1: + stm32_tim_gpioconfig(GPIO_TIM15_CH2OUT, mode); + break; +#endif +#if defined(GPIO_TIM15_CH3OUT) + case 2: + stm32_tim_gpioconfig(GPIO_TIM15_CH3OUT, mode); + break; +#endif +#if defined(GPIO_TIM15_CH4OUT) + case 3: + stm32_tim_gpioconfig(GPIO_TIM15_CH4OUT, mode); + break; #endif default: - return ERROR; + return -EINVAL; } break; #endif +#ifdef CONFIG_STM32_TIM16 + case STM32_TIM16_BASE: + switch (channel) + { +#if defined(GPIO_TIM16_CH1OUT) + case 0: + stm32_tim_gpioconfig(GPIO_TIM16_CH1OUT, mode); + break; +#endif +#if defined(GPIO_TIM16_CH2OUT) + case 1: + stm32_tim_gpioconfig(GPIO_TIM16_CH2OUT, mode); + break; +#endif +#if defined(GPIO_TIM16_CH3OUT) + case 2: + stm32_tim_gpioconfig(GPIO_TIM16_CH3OUT, mode); + break; +#endif +#if defined(GPIO_TIM16_CH4OUT) + case 3: + stm32_tim_gpioconfig(GPIO_TIM16_CH4OUT, mode); + break; +#endif + default: + return -EINVAL; + } + break; +#endif +#ifdef CONFIG_STM32_TIM17 + case STM32_TIM17_BASE: + switch (channel) + { +#if defined(GPIO_TIM17_CH1OUT) + case 0: + stm32_tim_gpioconfig(GPIO_TIM17_CH1OUT, mode); + break; +#endif +#if defined(GPIO_TIM17_CH2OUT) + case 1: + stm32_tim_gpioconfig(GPIO_TIM17_CH2OUT, mode); + break; +#endif +#if defined(GPIO_TIM17_CH3OUT) + case 2: + stm32_tim_gpioconfig(GPIO_TIM17_CH3OUT, mode); + break; +#endif +#if defined(GPIO_TIM17_CH4OUT) + case 3: + stm32_tim_gpioconfig(GPIO_TIM17_CH4OUT, mode); + break; +#endif + default: + return -EINVAL; + } + break; #endif default: - return ERROR; + return -EINVAL; } return OK; @@ -800,7 +1271,7 @@ static int stm32_tim_setchannel(FAR struct stm32_tim_dev_s *dev, uint8_t channel static int stm32_tim_setcompare(FAR struct stm32_tim_dev_s *dev, uint8_t channel, uint32_t compare) { - ASSERT(dev); + DEBUGASSERT(dev != NULL); switch (channel) { @@ -817,14 +1288,14 @@ static int stm32_tim_setcompare(FAR struct stm32_tim_dev_s *dev, uint8_t channel stm32_putreg32(dev, STM32_GTIM_CCR4_OFFSET, compare); break; default: - return ERROR; + return -EINVAL; } return OK; } static int stm32_tim_getcapture(FAR struct stm32_tim_dev_s *dev, uint8_t channel) { - ASSERT(dev); + DEBUGASSERT(dev != NULL); switch (channel) { @@ -838,7 +1309,7 @@ static int stm32_tim_getcapture(FAR struct stm32_tim_dev_s *dev, uint8_t channel return stm32_getreg32(dev, STM32_GTIM_CCR4_OFFSET); } - return ERROR; + return -EINVAL; } /************************************************************************************ @@ -865,6 +1336,14 @@ struct stm32_tim_ops_s stm32_tim_ops = .ackint = &stm32_tim_ackint }; +#ifdef CONFIG_STM32_TIM1 +struct stm32_tim_priv_s stm32_tim1_priv = +{ + .ops = &stm32_tim_ops, + .mode = STM32_TIM_MODE_UNUSED, + .base = STM32_TIM1_BASE, +}; +#endif #ifdef CONFIG_STM32_TIM2 struct stm32_tim_priv_s stm32_tim2_priv = { @@ -901,7 +1380,6 @@ struct stm32_tim_priv_s stm32_tim5_priv = }; #endif -#if STM32_NBTIM > 0 #ifdef CONFIG_STM32_TIM6 struct stm32_tim_priv_s stm32_tim6_priv = { @@ -910,9 +1388,7 @@ struct stm32_tim_priv_s stm32_tim6_priv = .base = STM32_TIM6_BASE, }; #endif -#endif -#if STM32_NBTIM > 1 #ifdef CONFIG_STM32_TIM7 struct stm32_tim_priv_s stm32_tim7_priv = { @@ -921,28 +1397,95 @@ struct stm32_tim_priv_s stm32_tim7_priv = .base = STM32_TIM7_BASE, }; #endif + +#ifdef CONFIG_STM32_TIM8 +struct stm32_tim_priv_s stm32_tim8_priv = +{ + .ops = &stm32_tim_ops, + .mode = STM32_TIM_MODE_UNUSED, + .base = STM32_TIM8_BASE, +}; #endif -#if STM32_NATIM > 0 +#ifdef CONFIG_STM32_TIM9 +struct stm32_tim_priv_s stm32_tim9_priv = +{ + .ops = &stm32_tim_ops, + .mode = STM32_TIM_MODE_UNUSED, + .base = STM32_TIM9_BASE, +}; +#endif -#ifdef CONFIG_STM32_TIM1 -struct stm32_tim_priv_s stm32_tim1_priv = +#ifdef CONFIG_STM32_TIM10 +struct stm32_tim_priv_s stm32_tim10_priv = { .ops = &stm32_tim_ops, .mode = STM32_TIM_MODE_UNUSED, - .base = STM32_TIM1_BASE, + .base = STM32_TIM10_BASE, }; #endif -#ifdef CONFIG_STM32_TIM8 -struct stm32_tim_priv_s stm32_tim8_priv = +#ifdef CONFIG_STM32_TIM11 +struct stm32_tim_priv_s stm32_tim11_priv = { .ops = &stm32_tim_ops, .mode = STM32_TIM_MODE_UNUSED, - .base = STM32_TIM8_BASE, + .base = STM32_TIM11_BASE, +}; +#endif + +#ifdef CONFIG_STM32_TIM12 +struct stm32_tim_priv_s stm32_tim12_priv = +{ + .ops = &stm32_tim_ops, + .mode = STM32_TIM_MODE_UNUSED, + .base = STM32_TIM12_BASE, +}; +#endif + +#ifdef CONFIG_STM32_TIM13 +struct stm32_tim_priv_s stm32_tim13_priv = +{ + .ops = &stm32_tim_ops, + .mode = STM32_TIM_MODE_UNUSED, + .base = STM32_TIM13_BASE, +}; +#endif + +#ifdef CONFIG_STM32_TIM14 +struct stm32_tim_priv_s stm32_tim14_priv = +{ + .ops = &stm32_tim_ops, + .mode = STM32_TIM_MODE_UNUSED, + .base = STM32_TIM14_BASE, }; #endif +#ifdef CONFIG_STM32_TIM15 +struct stm32_tim_priv_s stm32_tim15_priv = +{ + .ops = &stm32_tim_ops, + .mode = STM32_TIM_MODE_UNUSED, + .base = STM32_TIM15_BASE, +}; +#endif + +#ifdef CONFIG_STM32_TIM16 +struct stm32_tim_priv_s stm32_tim16_priv = +{ + .ops = &stm32_tim_ops, + .mode = STM32_TIM_MODE_UNUSED, + .base = STM32_TIM16_BASE, +}; +#endif + +#ifdef CONFIG_STM32_TIM17 +struct stm32_tim_priv_s stm32_tim17_priv = +{ + .ops = &stm32_tim_ops, + .mode = STM32_TIM_MODE_UNUSED, + .base = STM32_TIM17_BASE, +}; #endif /************************************************************************************ @@ -957,6 +1500,12 @@ FAR struct stm32_tim_dev_s *stm32_tim_init(int timer) switch (timer) { +#ifdef CONFIG_STM32_TIM1 + case 1: + dev = (struct stm32_tim_dev_s *)&stm32_tim1_priv; + modifyreg32(STM32_RCC_APB2ENR, 0, RCC_APB2ENR_TIM1EN); + break; +#endif #ifdef CONFIG_STM32_TIM2 case 2: dev = (struct stm32_tim_dev_s *)&stm32_tim2_priv; @@ -981,37 +1530,77 @@ FAR struct stm32_tim_dev_s *stm32_tim_init(int timer) modifyreg32(STM32_RCC_APB1ENR, 0, RCC_APB1ENR_TIM5EN); break; #endif - -#if STM32_NBTIM > 0 #ifdef CONFIG_STM32_TIM6 case 6: dev = (struct stm32_tim_dev_s *)&stm32_tim6_priv; modifyreg32(STM32_RCC_APB1ENR, 0, RCC_APB1ENR_TIM6EN); break; #endif -#endif -#if STM32_NBTIM > 1 #ifdef CONFIG_STM32_TIM7 case 7: dev = (struct stm32_tim_dev_s *)&stm32_tim7_priv; modifyreg32(STM32_RCC_APB1ENR, 0, RCC_APB1ENR_TIM7EN); break; #endif -#endif - -#if STM32_NATIM > 0 -#ifdef CONFIG_STM32_TIM1 - case 1: - dev = (struct stm32_tim_dev_s *)&stm32_tim1_priv; - modifyreg32(STM32_RCC_APB2ENR, 0, RCC_APB2ENR_TIM1EN); - break; -#endif #ifdef CONFIG_STM32_TIM8 case 8: dev = (struct stm32_tim_dev_s *)&stm32_tim8_priv; modifyreg32(STM32_RCC_APB2ENR, 0, RCC_APB2ENR_TIM8EN); break; #endif +#ifdef CONFIG_STM32_TIM9 + case 9: + dev = (struct stm32_tim_dev_s *)&stm32_tim9_priv; + modifyreg32(STM32_RCC_APB2ENR, 0, RCC_APB2ENR_TIM9EN); + break; +#endif +#ifdef CONFIG_STM32_TIM10 + case 10: + dev = (struct stm32_tim_dev_s *)&stm32_tim10_priv; + modifyreg32(STM32_RCC_APB2ENR, 0, RCC_APB2ENR_TIM10EN); + break; +#endif +#ifdef CONFIG_STM32_TIM11 + case 11: + dev = (struct stm32_tim_dev_s *)&stm32_tim11_priv; + modifyreg32(STM32_RCC_APB2ENR, 0, RCC_APB2ENR_TIM11EN); + break; +#endif +#ifdef CONFIG_STM32_TIM12 + case 12: + dev = (struct stm32_tim_dev_s *)&stm32_tim12_priv; + modifyreg32(STM32_RCC_APB1ENR, 0, RCC_APB1ENR_TIM12EN); + break; +#endif +#ifdef CONFIG_STM32_TIM13 + case 13: + dev = (struct stm32_tim_dev_s *)&stm32_tim13_priv; + modifyreg32(STM32_RCC_APB1ENR, 0, RCC_APB1ENR_TIM13EN); + break; +#endif +#ifdef CONFIG_STM32_TIM14 + case 14: + dev = (struct stm32_tim_dev_s *)&stm32_tim14_priv; + modifyreg32(STM32_RCC_APB1ENR, 0, RCC_APB1ENR_TIM14EN); + break; +#endif +#ifdef CONFIG_STM32_TIM15 + case 15: + dev = (struct stm32_tim_dev_s *)&stm32_tim15_priv; + modifyreg32(STM32_RCC_APB2ENR, 0, RCC_APB2ENR_TIM15EN); + break; +#endif +#ifdef CONFIG_STM32_TIM16 + case 16: + dev = (struct stm32_tim_dev_s *)&stm32_tim16_priv; + modifyreg32(STM32_RCC_APB2ENR, 0, RCC_APB2ENR_TIM16EN); + break; +#endif +#ifdef CONFIG_STM32_TIM17 + case 17: + dev = (struct stm32_tim_dev_s *)&stm32_tim17_priv; + modifyreg32(STM32_RCC_APB2ENR, 0, RCC_APB2ENR_TIM17EN); + break; #endif default: return NULL; @@ -1033,12 +1622,17 @@ FAR struct stm32_tim_dev_s *stm32_tim_init(int timer) int stm32_tim_deinit(FAR struct stm32_tim_dev_s * dev) { - ASSERT(dev); + DEBUGASSERT(dev != NULL); /* Disable power */ switch (((struct stm32_tim_priv_s *)dev)->base) { +#ifdef CONFIG_STM32_TIM1 + case STM32_TIM1_BASE: + modifyreg32(STM32_RCC_APB2ENR, RCC_APB2ENR_TIM1EN, 0); + break; +#endif #ifdef CONFIG_STM32_TIM2 case STM32_TIM2_BASE: modifyreg32(STM32_RCC_APB1ENR, RCC_APB1ENR_TIM2EN, 0); @@ -1059,35 +1653,68 @@ int stm32_tim_deinit(FAR struct stm32_tim_dev_s * dev) modifyreg32(STM32_RCC_APB1ENR, RCC_APB1ENR_TIM5EN, 0); break; #endif -#if STM32_NBTIM > 0 #ifdef CONFIG_STM32_TIM6 case STM32_TIM6_BASE: modifyreg32(STM32_RCC_APB1ENR, RCC_APB1ENR_TIM6EN, 0); break; #endif -#endif -#if STM32_NBTIM > 1 #ifdef CONFIG_STM32_TIM7 case STM32_TIM7_BASE: modifyreg32(STM32_RCC_APB1ENR, RCC_APB1ENR_TIM7EN, 0); break; #endif -#endif - -#if STM32_NATIM > 0 -#ifdef CONFIG_STM32_TIM1 - case STM32_TIM1_BASE: - modifyreg32(STM32_RCC_APB2ENR, RCC_APB2ENR_TIM1EN, 0); - break; -#endif #ifdef CONFIG_STM32_TIM8 case STM32_TIM8_BASE: modifyreg32(STM32_RCC_APB2ENR, RCC_APB2ENR_TIM8EN, 0); break; #endif +#ifdef CONFIG_STM32_TIM9 + case STM32_TIM9_BASE: + modifyreg32(STM32_RCC_APB2ENR, RCC_APB2ENR_TIM9EN, 0); + break; +#endif +#ifdef CONFIG_STM32_TIM10 + case STM32_TIM10_BASE: + modifyreg32(STM32_RCC_APB2ENR, RCC_APB2ENR_TIM10EN, 0); + break; +#endif +#ifdef CONFIG_STM32_TIM11 + case STM32_TIM11_BASE: + modifyreg32(STM32_RCC_APB2ENR, RCC_APB2ENR_TIM11EN, 0); + break; +#endif +#ifdef CONFIG_STM32_TIM12 + case STM32_TIM12_BASE: + modifyreg32(STM32_RCC_APB1ENR, RCC_APB1ENR_TIM12EN, 0); + break; +#endif +#ifdef CONFIG_STM32_TIM13 + case STM32_TIM13_BASE: + modifyreg32(STM32_RCC_APB1ENR, RCC_APB1ENR_TIM13EN, 0); + break; +#endif +#ifdef CONFIG_STM32_TIM14 + case STM32_TIM14_BASE: + modifyreg32(STM32_RCC_APB1ENR, RCC_APB1ENR_TIM14EN, 0); + break; +#endif +#ifdef CONFIG_STM32_TIM15 + case STM32_TIM15_BASE: + modifyreg32(STM32_RCC_APB2ENR, RCC_APB2ENR_TIM15EN, 0); + break; +#endif +#ifdef CONFIG_STM32_TIM16 + case STM32_TIM16_BASE: + modifyreg32(STM32_RCC_APB2ENR, RCC_APB2ENR_TIM16EN, 0); + break; +#endif +#ifdef CONFIG_STM32_TIM17 + case STM32_TIM17_BASE: + modifyreg32(STM32_RCC_APB2ENR, RCC_APB2ENR_TIM17EN, 0); + break; #endif default: - return ERROR; + return -EINVAL; } /* Mark it as free */ @@ -1097,4 +1724,4 @@ int stm32_tim_deinit(FAR struct stm32_tim_dev_s * dev) return OK; } -#endif /* defined(CONFIG_STM32_TIM1 || ... || TIM8) */ +#endif /* defined(CONFIG_STM32_TIM1 || ... || TIM17) */ diff --git a/arch/arm/src/stm32/stm32_usbdev.c b/arch/arm/src/stm32/stm32_usbdev.c index 27f75be899a0c0deba68a77eb30a55a2c33e37cb..9c69a86b8fecb5cd75be5c7764ef4d4fceb00cf1 100644 --- a/arch/arm/src/stm32/stm32_usbdev.c +++ b/arch/arm/src/stm32/stm32_usbdev.c @@ -103,7 +103,7 @@ * enabled. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_USB_INFO # undef CONFIG_STM32_USBDEV_REGDEBUG #endif @@ -388,7 +388,7 @@ struct stm32_usbdev_s /* Register operations ******************************************************/ -#if defined(CONFIG_STM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_STM32_USBDEV_REGDEBUG static uint16_t stm32_getreg(uint32_t addr); static void stm32_putreg(uint16_t val, uint32_t addr); static void stm32_checksetup(void); @@ -648,11 +648,12 @@ const struct trace_msg_t g_usb_trace_strings_deverror[] = /**************************************************************************** * Register Operations ****************************************************************************/ + /**************************************************************************** * Name: stm32_getreg ****************************************************************************/ -#if defined(CONFIG_STM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_STM32_USBDEV_REGDEBUG static uint16_t stm32_getreg(uint32_t addr) { static uint32_t prevaddr = 0; @@ -673,7 +674,7 @@ static uint16_t stm32_getreg(uint32_t addr) { if (count == 4) { - lldbg("...\n"); + uinfo("...\n"); } return val; } @@ -689,7 +690,7 @@ static uint16_t stm32_getreg(uint32_t addr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + uinfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -701,7 +702,7 @@ static uint16_t stm32_getreg(uint32_t addr) /* Show the register value read */ - lldbg("%08x->%04x\n", addr, val); + uinfo("%08x->%04x\n", addr, val); return val; } #endif @@ -710,12 +711,12 @@ static uint16_t stm32_getreg(uint32_t addr) * Name: stm32_putreg ****************************************************************************/ -#if defined(CONFIG_STM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_STM32_USBDEV_REGDEBUG static void stm32_putreg(uint16_t val, uint32_t addr) { /* Show the register value being written */ - lldbg("%08x<-%04x\n", addr, val); + uinfo("%08x<-%04x\n", addr, val); /* Write the value */ @@ -727,42 +728,42 @@ static void stm32_putreg(uint16_t val, uint32_t addr) * Name: stm32_dumpep ****************************************************************************/ -#if defined(CONFIG_STM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_STM32_USBDEV_REGDEBUG static void stm32_dumpep(int epno) { uint32_t addr; /* Common registers */ - lldbg("CNTR: %04x\n", getreg16(STM32_USB_CNTR)); - lldbg("ISTR: %04x\n", getreg16(STM32_USB_ISTR)); - lldbg("FNR: %04x\n", getreg16(STM32_USB_FNR)); - lldbg("DADDR: %04x\n", getreg16(STM32_USB_DADDR)); - lldbg("BTABLE: %04x\n", getreg16(STM32_USB_BTABLE)); + uinfo("CNTR: %04x\n", getreg16(STM32_USB_CNTR)); + uinfo("ISTR: %04x\n", getreg16(STM32_USB_ISTR)); + uinfo("FNR: %04x\n", getreg16(STM32_USB_FNR)); + uinfo("DADDR: %04x\n", getreg16(STM32_USB_DADDR)); + uinfo("BTABLE: %04x\n", getreg16(STM32_USB_BTABLE)); /* Endpoint register */ addr = STM32_USB_EPR(epno); - lldbg("EPR%d: [%08x] %04x\n", epno, addr, getreg16(addr)); + uinfo("EPR%d: [%08x] %04x\n", epno, addr, getreg16(addr)); /* Endpoint descriptor */ addr = STM32_USB_BTABLE_ADDR(epno, 0); - lldbg("DESC: %08x\n", addr); + uinfo("DESC: %08x\n", addr); /* Endpoint buffer descriptor */ addr = STM32_USB_ADDR_TX(epno); - lldbg(" TX ADDR: [%08x] %04x\n", addr, getreg16(addr)); + uinfo(" TX ADDR: [%08x] %04x\n", addr, getreg16(addr)); addr = STM32_USB_COUNT_TX(epno); - lldbg(" COUNT: [%08x] %04x\n", addr, getreg16(addr)); + uinfo(" COUNT: [%08x] %04x\n", addr, getreg16(addr)); addr = STM32_USB_ADDR_RX(epno); - lldbg(" RX ADDR: [%08x] %04x\n", addr, getreg16(addr)); + uinfo(" RX ADDR: [%08x] %04x\n", addr, getreg16(addr)); addr = STM32_USB_COUNT_RX(epno); - lldbg(" COUNT: [%08x] %04x\n", addr, getreg16(addr)); + uinfo(" COUNT: [%08x] %04x\n", addr, getreg16(addr)); } #endif @@ -770,19 +771,19 @@ static void stm32_dumpep(int epno) * Name: stm32_checksetup ****************************************************************************/ -#if defined(CONFIG_STM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_STM32_USBDEV_REGDEBUG static void stm32_checksetup(void) { uint32_t cfgr = getreg32(STM32_RCC_CFGR); uint32_t apb1rstr = getreg32(STM32_RCC_APB1RSTR); uint32_t apb1enr = getreg32(STM32_RCC_APB1ENR); - lldbg("CFGR: %08x APB1RSTR: %08x APB1ENR: %08x\n", cfgr, apb1rstr, apb1enr); + uinfo("CFGR: %08x APB1RSTR: %08x APB1ENR: %08x\n", cfgr, apb1rstr, apb1enr); if ((apb1rstr & RCC_APB1RSTR_USBRST) != 0 || (apb1enr & RCC_APB1ENR_USBEN) == 0) { - lldbg("ERROR: USB is NOT setup correctly\n"); + uerr("ERROR: USB is NOT setup correctly\n"); } } #endif @@ -1367,8 +1368,8 @@ static int stm32_wrrequest(struct stm32_usbdev_s *priv, struct stm32_ep_s *prive } epno = USB_EPNO(privep->ep.eplog); - ullvdbg("epno=%d req=%p: len=%d xfrd=%d nullpkt=%d\n", - epno, privreq, privreq->req.len, privreq->req.xfrd, privep->txnullpkt); + uinfo("epno=%d req=%p: len=%d xfrd=%d nullpkt=%d\n", + epno, privreq, privreq->req.len, privreq->req.xfrd, privep->txnullpkt); UNUSED(epno); /* Get the number of bytes left to be sent in the packet */ @@ -1458,7 +1459,7 @@ static inline int stm32_ep0_rdrequest(struct stm32_usbdev_s *priv) pmalen = stm32_geteprxcount(EP0); - ullvdbg("EP0: pmalen=%d\n", pmalen); + uinfo("EP0: pmalen=%d\n", pmalen); usbtrace(TRACE_READ(EP0), pmalen); /* Read the data into our special buffer for SETUP data */ @@ -1510,7 +1511,7 @@ static int stm32_rdrequest(struct stm32_usbdev_s *priv, struct stm32_ep_s *prive return -ENOENT; } - ullvdbg("EP%d: len=%d xfrd=%d\n", epno, privreq->req.len, privreq->req.xfrd); + uinfo("EP%d: len=%d xfrd=%d\n", epno, privreq->req.len, privreq->req.xfrd); /* Ignore any attempt to receive a zero length packet */ @@ -1768,8 +1769,8 @@ static void stm32_ep0setup(struct stm32_usbdev_s *priv) index.w = GETUINT16(priv->ctrl.index); len.w = GETUINT16(priv->ctrl.len); - ullvdbg("SETUP: type=%02x req=%02x value=%04x index=%04x len=%04x\n", - priv->ctrl.type, priv->ctrl.req, value.w, index.w, len.w); + uinfo("SETUP: type=%02x req=%02x value=%04x index=%04x len=%04x\n", + priv->ctrl.type, priv->ctrl.req, value.w, index.w, len.w); /* Is this an setup with OUT and data of length > 0 */ @@ -1959,7 +1960,7 @@ static void stm32_ep0setup(struct stm32_usbdev_s *priv) { /* Special case recipient=device test mode */ - ullvdbg("test mode: %d\n", index.w); + uinfo("test mode: %d\n", index.w); } else if ((priv->ctrl.type & USB_REQ_RECIPIENT_MASK) != USB_REQ_RECIPIENT_ENDPOINT) { @@ -2840,11 +2841,11 @@ static int stm32_epconfigure(struct usbdev_ep_s *ep, uint16_t maxpacket; uint8_t epno; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !desc) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); - ulldbg("ERROR: ep=%p desc=%p\n"); + uerr("ERROR: ep=%p desc=%p\n"); return -EINVAL; } #endif @@ -2936,11 +2937,11 @@ static int stm32_epdisable(struct usbdev_ep_s *ep) irqstate_t flags; uint8_t epno; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); - ulldbg("ERROR: ep=%p\n", ep); + uerr("ERROR: ep=%p\n", ep); return -EINVAL; } #endif @@ -2971,7 +2972,7 @@ static struct usbdev_req_s *stm32_epallocreq(struct usbdev_ep_s *ep) { struct stm32_req_s *privreq; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); @@ -2999,7 +3000,7 @@ static void stm32_epfreereq(struct usbdev_ep_s *ep, struct usbdev_req_s *req) { struct stm32_req_s *privreq = (struct stm32_req_s *)req; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !req) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); @@ -3024,11 +3025,12 @@ static int stm32_epsubmit(struct usbdev_ep_s *ep, struct usbdev_req_s *req) uint8_t epno; int ret = OK; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!req || !req->callback || !req->buf || !ep) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); - ulldbg("ERROR: req=%p callback=%p buf=%p ep=%p\n", req, req->callback, req->buf, ep); + uerr("ERROR: req=%p callback=%p buf=%p ep=%p\n", + req, req->callback, req->buf, ep); return -EINVAL; } #endif @@ -3036,11 +3038,11 @@ static int stm32_epsubmit(struct usbdev_ep_s *ep, struct usbdev_req_s *req) usbtrace(TRACE_EPSUBMIT, USB_EPNO(ep->eplog)); priv = privep->dev; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv->driver) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_NOTCONFIGURED), priv->usbdev.speed); - ulldbg("ERROR: driver=%p\n", priv->driver); + uerr("ERROR: driver=%p\n", priv->driver); return -ESHUTDOWN; } #endif @@ -3057,7 +3059,7 @@ static int stm32_epsubmit(struct usbdev_ep_s *ep, struct usbdev_req_s *req) if (privep->stalled) { stm32_abortrequest(privep, privreq, -EBUSY); - ulldbg("ERROR: stalled\n"); + uerr("ERROR: stalled\n"); ret = -EBUSY; } @@ -3136,7 +3138,7 @@ static int stm32_epcancel(struct usbdev_ep_s *ep, struct usbdev_req_s *req) struct stm32_ep_s *privep = (struct stm32_ep_s *)ep; irqstate_t flags; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!ep || !req) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); @@ -3163,7 +3165,7 @@ static int stm32_epstall(struct usbdev_ep_s *ep, bool resume) uint16_t status; irqstate_t flags; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!ep) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); @@ -3305,7 +3307,7 @@ static struct usbdev_ep_s *stm32_allocep(struct usbdev_s *dev, uint8_t epno, int bufno; usbtrace(TRACE_DEVALLOCEP, (uint16_t)epno); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!dev) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); @@ -3379,7 +3381,7 @@ static void stm32_freeep(struct usbdev_s *dev, struct usbdev_ep_s *ep) struct stm32_usbdev_s *priv; struct stm32_ep_s *privep; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!dev || !ep) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); @@ -3410,7 +3412,7 @@ static int stm32_getframe(struct usbdev_s *dev) { uint16_t fnr; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!dev) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); @@ -3435,7 +3437,7 @@ static int stm32_wakeup(struct usbdev_s *dev) irqstate_t flags; usbtrace(TRACE_DEVWAKEUP, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!dev) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); @@ -3473,7 +3475,7 @@ static int stm32_selfpowered(struct usbdev_s *dev, bool selfpowered) usbtrace(TRACE_DEVSELFPOWERED, (uint16_t)selfpowered); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!dev) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); @@ -3834,7 +3836,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) usbtrace(TRACE_DEVREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (!driver || !driver->ops->bind || !driver->ops->unbind || !driver->ops->disconnect || !driver->ops->setup) { @@ -3912,7 +3914,7 @@ int usbdev_unregister(struct usbdevclass_driver_s *driver) usbtrace(TRACE_DEVUNREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_USB if (driver != priv->driver) { usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), 0); diff --git a/arch/arm/src/stm32/stm32_usbhost.h b/arch/arm/src/stm32/stm32_usbhost.h index 2a6a7335446fe83bcd1ecd59f0952667f3cc6fed..7c036a8fa614babbc9c93ba3fa0f7e101e45029f 100644 --- a/arch/arm/src/stm32/stm32_usbhost.h +++ b/arch/arm/src/stm32/stm32_usbhost.h @@ -236,7 +236,7 @@ enum usbhost_trace1codes_e * want to do that? * * CONFIG_STM32_USBHOST_REGDEBUG - Enable very low-level register access - * debug. Depends on CONFIG_DEBUG. + * debug. Depends on CONFIG_DEBUG_FEATURES. */ /************************************************************************************ diff --git a/arch/arm/src/stm32/stm32_wwdg.c b/arch/arm/src/stm32/stm32_wwdg.c index 5cab6ce92b6db5030869ce6ef0cb5e6010fcb4ec..6c9829974377e2ad222a5cee5804af63d3deb48f 100644 --- a/arch/arm/src/stm32/stm32_wwdg.c +++ b/arch/arm/src/stm32/stm32_wwdg.c @@ -81,18 +81,8 @@ # define CONFIG_STM32_WWDG_DEFTIMOUT WWDG_MAXTIMEOUT #endif -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the watchdog - * driver. NOTE: that only lldbg types are used so that the output is - * immediately available. - */ - -#ifdef CONFIG_DEBUG_WATCHDOG -# define wddbg lldbg -# define wdvdbg llvdbg -#else -# define wddbg(x...) -# define wdvdbg(x...) +#ifndef CONFIG_DEBUG_WATCHDOG_INFO +# undef CONFIG_STM32_WWDG_REGDEBUG #endif /**************************************************************************** @@ -119,7 +109,7 @@ struct stm32_lowerhalf_s ****************************************************************************/ /* Register operations ******************************************************/ -#if defined(CONFIG_STM32_WWDG_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_STM32_WWDG_REGDEBUG static uint16_t stm32_getreg(uint32_t addr); static void stm32_putreg(uint16_t val, uint32_t addr); #else @@ -179,7 +169,7 @@ static struct stm32_lowerhalf_s g_wdgdev; * ****************************************************************************/ -#if defined(CONFIG_STM32_WWDG_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_STM32_WWDG_REGDEBUG static uint16_t stm32_getreg(uint32_t addr) { static uint32_t prevaddr = 0; @@ -200,7 +190,7 @@ static uint16_t stm32_getreg(uint32_t addr) { if (count == 4) { - lldbg("...\n"); + wdinfo("...\n"); } return val; @@ -217,7 +207,7 @@ static uint16_t stm32_getreg(uint32_t addr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + wdinfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -229,7 +219,7 @@ static uint16_t stm32_getreg(uint32_t addr) /* Show the register value read */ - lldbg("%08x->%04x\n", addr, val); + wdinfo("%08x->%04x\n", addr, val); return val; } #endif @@ -242,12 +232,12 @@ static uint16_t stm32_getreg(uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_STM32_WWDG_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_STM32_WWDG_REGDEBUG static void stm32_putreg(uint16_t val, uint32_t addr) { /* Show the register value being written */ - lldbg("%08x<-%04x\n", addr, val); + wdinfo("%08x<-%04x\n", addr, val); /* Write the value */ @@ -348,7 +338,7 @@ static int stm32_start(FAR struct watchdog_lowerhalf_s *lower) { FAR struct stm32_lowerhalf_s *priv = (FAR struct stm32_lowerhalf_s *)lower; - wdvdbg("Entry\n"); + wdinfo("Entry\n"); DEBUGASSERT(priv); /* The watchdog is always disabled after a reset. It is enabled by setting @@ -383,7 +373,7 @@ static int stm32_stop(FAR struct watchdog_lowerhalf_s *lower) * except by a reset. */ - wdvdbg("Entry\n"); + wdinfo("Entry\n"); return -ENOSYS; } @@ -414,7 +404,7 @@ static int stm32_keepalive(FAR struct watchdog_lowerhalf_s *lower) { FAR struct stm32_lowerhalf_s *priv = (FAR struct stm32_lowerhalf_s *)lower; - wdvdbg("Entry\n"); + wdinfo("Entry\n"); DEBUGASSERT(priv); /* Write to T[6:0] bits to configure the counter value, no need to do @@ -448,7 +438,7 @@ static int stm32_getstatus(FAR struct watchdog_lowerhalf_s *lower, uint32_t elapsed; uint16_t reload; - wdvdbg("Entry\n"); + wdinfo("Entry\n"); DEBUGASSERT(priv); /* Return the status bit */ @@ -474,10 +464,10 @@ static int stm32_getstatus(FAR struct watchdog_lowerhalf_s *lower, elapsed = priv->reload - reload; status->timeleft = (priv->timeout * elapsed) / (priv->reload + 1); - wdvdbg("Status :\n"); - wdvdbg(" flags : %08x\n", status->flags); - wdvdbg(" timeout : %d\n", status->timeout); - wdvdbg(" timeleft : %d\n", status->flags); + wdinfo("Status :\n"); + wdinfo(" flags : %08x\n", status->flags); + wdinfo(" timeout : %d\n", status->timeout); + wdinfo(" timeleft : %d\n", status->flags); return OK; } @@ -507,13 +497,13 @@ static int stm32_settimeout(FAR struct watchdog_lowerhalf_s *lower, int wdgtb; DEBUGASSERT(priv); - wdvdbg("Entry: timeout=%d\n", timeout); + wdinfo("Entry: timeout=%d\n", timeout); /* Can this timeout be represented? */ if (timeout < 1 || timeout > WWDG_MAXTIMEOUT) { - wddbg("Cannot represent timeout=%d > %d\n", + wderr("ERROR: Cannot represent timeout=%d > %d\n", timeout, WWDG_MAXTIMEOUT); return -ERANGE; } @@ -562,7 +552,7 @@ static int stm32_settimeout(FAR struct watchdog_lowerhalf_s *lower, */ #if 0 - wdvdbg("wdgtb=%d fwwdg=%d reload=%d timout=%d\n", + wdinfo("wdgtb=%d fwwdg=%d reload=%d timout=%d\n", wdgtb, fwwdg, reload, 1000 * (reload + 1) / fwwdg); #endif if (reload <= WWDG_CR_T_MAX || wdgtb == 3) @@ -595,7 +585,7 @@ static int stm32_settimeout(FAR struct watchdog_lowerhalf_s *lower, priv->fwwdg = fwwdg; priv->reload = reload; - wdvdbg("wdgtb=%d fwwdg=%d reload=%d timout=%d\n", + wdinfo("wdgtb=%d fwwdg=%d reload=%d timout=%d\n", wdgtb, fwwdg, reload, priv->timeout); /* Set WDGTB[1:0] bits according to calculated value */ @@ -644,7 +634,7 @@ static xcpt_t stm32_capture(FAR struct watchdog_lowerhalf_s *lower, uint16_t regval; DEBUGASSERT(priv); - wdvdbg("Entry: handler=%p\n", handler); + wdinfo("Entry: handler=%p\n", handler); /* Get the old handler return value */ @@ -708,7 +698,7 @@ static int stm32_ioctl(FAR struct watchdog_lowerhalf_s *lower, int cmd, int ret = -ENOTTY; DEBUGASSERT(priv); - wdvdbg("Entry: cmd=%d arg=%ld\n", cmd, arg); + wdinfo("Entry: cmd=%d arg=%ld\n", cmd, arg); /* WDIOC_MINTIME: Set the minimum ping time. If two keepalive ioctls * are received within this time, a reset event will be generated. @@ -761,7 +751,7 @@ void stm32_wwdginitialize(FAR const char *devpath) { FAR struct stm32_lowerhalf_s *priv = &g_wdgdev; - wdvdbg("Entry: devpath=%s\n", devpath); + wdinfo("Entry: devpath=%s\n", devpath); /* NOTE we assume that clocking to the IWDG has already been provided by * the RCC initialization logic. diff --git a/arch/arm/src/stm32/stm32f10xxx_dma.c b/arch/arm/src/stm32/stm32f10xxx_dma.c index 8c5bf161e6ae4fcd734e9d19dc38e93e7f05b17a..8a7782773e268a1b025fffcd5c2d7b68cad76a24 100644 --- a/arch/arm/src/stm32/stm32f10xxx_dma.c +++ b/arch/arm/src/stm32/stm32f10xxx_dma.c @@ -57,7 +57,7 @@ #if defined(CONFIG_STM32_STM32F10XX) || defined(CONFIG_STM32_STM32F30XX) || \ - defined(CONFIG_STM32_STM32L15XX) + defined(CONFIG_STM32_STM32F37XX) || defined(CONFIG_STM32_STM32L15XX) /**************************************************************************** * Pre-processor Definitions @@ -157,7 +157,7 @@ static struct stm32_dma_s g_dma[DMA_NCHANNELS] = { .chan = 3, #if defined(CONFIG_STM32_CONNECTIVITYLINE) || defined(CONFIG_STM32_STM32F30XX) || \ - defined(CONFIG_STM32_STM32L15XX) + defined(CONFIG_STM32_STM32F37XX) || defined(CONFIG_STM32_STM32L15XX) .irq = STM32_IRQ_DMA2CH4, #else .irq = STM32_IRQ_DMA2CH45, @@ -167,7 +167,7 @@ static struct stm32_dma_s g_dma[DMA_NCHANNELS] = { .chan = 4, #if defined(CONFIG_STM32_CONNECTIVITYLINE) || defined(CONFIG_STM32_STM32F30XX) || \ - defined(CONFIG_STM32_STM32L15XX) + defined(CONFIG_STM32_STM32F37XX) || defined(CONFIG_STM32_STM32L15XX) .irq = STM32_IRQ_DMA2CH5, #else .irq = STM32_IRQ_DMA2CH45, @@ -290,7 +290,7 @@ static int stm32_dmainterrupt(int irq, void *context) else #if STM32_NDMA > 1 #if defined(CONFIG_STM32_CONNECTIVITYLINE) || defined(CONFIG_STM32_STM32F30XX) || \ - defined(CONFIG_STM32_STM32L15XX) + defined(CONFIG_STM32_STM32F37XX) || defined(CONFIG_STM32_STM32L15XX) if (irq >= STM32_IRQ_DMA2CH1 && irq <= STM32_IRQ_DMA2CH5) #else if (irq >= STM32_IRQ_DMA2CH1 && irq <= STM32_IRQ_DMA2CH45) @@ -707,7 +707,7 @@ bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void stm32_dmasample(DMA_HANDLE handle, struct stm32_dmaregs_s *regs) { struct stm32_dma_s *dmach = (struct stm32_dma_s *)handle; @@ -734,19 +734,19 @@ void stm32_dmasample(DMA_HANDLE handle, struct stm32_dmaregs_s *regs) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void stm32_dmadump(DMA_HANDLE handle, const struct stm32_dmaregs_s *regs, const char *msg) { struct stm32_dma_s *dmach = (struct stm32_dma_s *)handle; uint32_t dmabase = DMA_BASE(dmach->base); - dmadbg("DMA Registers: %s\n", msg); - dmadbg(" ISRC[%08x]: %08x\n", dmabase + STM32_DMA_ISR_OFFSET, regs->isr); - dmadbg(" CCR[%08x]: %08x\n", dmach->base + STM32_DMACHAN_CCR_OFFSET, regs->ccr); - dmadbg(" CNDTR[%08x]: %08x\n", dmach->base + STM32_DMACHAN_CNDTR_OFFSET, regs->cndtr); - dmadbg(" CPAR[%08x]: %08x\n", dmach->base + STM32_DMACHAN_CPAR_OFFSET, regs->cpar); - dmadbg(" CMAR[%08x]: %08x\n", dmach->base + STM32_DMACHAN_CMAR_OFFSET, regs->cmar); + dmainfo("DMA Registers: %s\n", msg); + dmainfo(" ISRC[%08x]: %08x\n", dmabase + STM32_DMA_ISR_OFFSET, regs->isr); + dmainfo(" CCR[%08x]: %08x\n", dmach->base + STM32_DMACHAN_CCR_OFFSET, regs->ccr); + dmainfo(" CNDTR[%08x]: %08x\n", dmach->base + STM32_DMACHAN_CNDTR_OFFSET, regs->cndtr); + dmainfo(" CPAR[%08x]: %08x\n", dmach->base + STM32_DMACHAN_CPAR_OFFSET, regs->cpar); + dmainfo(" CMAR[%08x]: %08x\n", dmach->base + STM32_DMACHAN_CMAR_OFFSET, regs->cmar); } #endif diff --git a/arch/arm/src/stm32/stm32f20xxx_dma.c b/arch/arm/src/stm32/stm32f20xxx_dma.c index 39c40f59f65115ae6cb37b36d1bbfc04359eb0a0..8edd31db2cb98aced83bc7b24e0caee1d8252674 100644 --- a/arch/arm/src/stm32/stm32f20xxx_dma.c +++ b/arch/arm/src/stm32/stm32f20xxx_dma.c @@ -606,8 +606,8 @@ void stm32_dmasetup(DMA_HANDLE handle, uint32_t paddr, uint32_t maddr, uint32_t regoffset; uint32_t regval; - dmadbg("paddr: %08x maddr: %08x ntransfers: %d scr: %08x\n", - paddr, maddr, ntransfers, scr); + dmainfo("paddr: %08x maddr: %08x ntransfers: %d scr: %08x\n", + paddr, maddr, ntransfers, scr); /* "If the stream is enabled, disable it by resetting the EN bit in the * DMA_SxCR register, then read this bit in order to confirm that there is no @@ -973,7 +973,7 @@ bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void stm32_dmasample(DMA_HANDLE handle, struct stm32_dmaregs_s *regs) { struct stm32_dma_s *dmast = (struct stm32_dma_s *)handle; @@ -1003,22 +1003,22 @@ void stm32_dmasample(DMA_HANDLE handle, struct stm32_dmaregs_s *regs) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void stm32_dmadump(DMA_HANDLE handle, const struct stm32_dmaregs_s *regs, const char *msg) { struct stm32_dma_s *dmast = (struct stm32_dma_s *)handle; uint32_t dmabase = DMA_BASE(dmast->base); - dmadbg("DMA Registers: %s\n", msg); - dmadbg(" LISR[%08x]: %08x\n", dmabase + STM32_DMA_LISR_OFFSET, regs->lisr); - dmadbg(" HISR[%08x]: %08x\n", dmabase + STM32_DMA_HISR_OFFSET, regs->hisr); - dmadbg(" SCR[%08x]: %08x\n", dmast->base + STM32_DMA_SCR_OFFSET, regs->scr); - dmadbg(" SNDTR[%08x]: %08x\n", dmast->base + STM32_DMA_SNDTR_OFFSET, regs->sndtr); - dmadbg(" SPAR[%08x]: %08x\n", dmast->base + STM32_DMA_SPAR_OFFSET, regs->spar); - dmadbg(" SM0AR[%08x]: %08x\n", dmast->base + STM32_DMA_SM0AR_OFFSET, regs->sm0ar); - dmadbg(" SM1AR[%08x]: %08x\n", dmast->base + STM32_DMA_SM1AR_OFFSET, regs->sm1ar); - dmadbg(" SFCR[%08x]: %08x\n", dmast->base + STM32_DMA_SFCR_OFFSET, regs->sfcr); + dmainfo("DMA Registers: %s\n", msg); + dmainfo(" LISR[%08x]: %08x\n", dmabase + STM32_DMA_LISR_OFFSET, regs->lisr); + dmainfo(" HISR[%08x]: %08x\n", dmabase + STM32_DMA_HISR_OFFSET, regs->hisr); + dmainfo(" SCR[%08x]: %08x\n", dmast->base + STM32_DMA_SCR_OFFSET, regs->scr); + dmainfo(" SNDTR[%08x]: %08x\n", dmast->base + STM32_DMA_SNDTR_OFFSET, regs->sndtr); + dmainfo(" SPAR[%08x]: %08x\n", dmast->base + STM32_DMA_SPAR_OFFSET, regs->spar); + dmainfo(" SM0AR[%08x]: %08x\n", dmast->base + STM32_DMA_SM0AR_OFFSET, regs->sm0ar); + dmainfo(" SM1AR[%08x]: %08x\n", dmast->base + STM32_DMA_SM1AR_OFFSET, regs->sm1ar); + dmainfo(" SFCR[%08x]: %08x\n", dmast->base + STM32_DMA_SFCR_OFFSET, regs->sfcr); } #endif diff --git a/arch/arm/src/stm32/stm32f30xxx_i2c.c b/arch/arm/src/stm32/stm32f30xxx_i2c.c index 15b0cb63bb4f65700ac46def29585f5e6d011aaf..141b0deb75c64f2a1d3102c7acef54bba81bb106 100644 --- a/arch/arm/src/stm32/stm32f30xxx_i2c.c +++ b/arch/arm/src/stm32/stm32f30xxx_i2c.c @@ -154,15 +154,6 @@ #define STATUS_BUSY(status) (status & I2C_ISR_BUSY) /* Debug ****************************************************************************/ -/* CONFIG_DEBUG_I2C + CONFIG_DEBUG enables general I2C debug output. */ - -#ifdef CONFIG_DEBUG_I2C -# define i2cdbg dbg -# define i2cvdbg vdbg -#else -# define i2cdbg(x...) -# define i2cvdbg(x...) -#endif /* I2C event trace logic. NOTE: trace uses the internal, non-standard, low-level * debug interface syslog() but does not require that any other debug @@ -727,7 +718,7 @@ static inline int stm32_i2c_sem_waitdone(FAR struct stm32_i2c_priv_s *priv) while (priv->intstate != INTSTATE_DONE && elapsed < timeout); - i2cvdbg("intstate: %d elapsed: %ld threshold: %ld status: %08x\n", + i2cinfo("intstate: %d elapsed: %ld threshold: %ld status: %08x\n", priv->intstate, (long)elapsed, (long)timeout, priv->status); /* Set the interrupt state back to IDLE */ @@ -881,7 +872,7 @@ static inline void stm32_i2c_sem_waitstop(FAR struct stm32_i2c_priv_s *priv) * still pending. */ - i2cvdbg("Timeout with CR: %04x SR: %04x\n", cr, sr); + i2cinfo("Timeout with CR: %04x SR: %04x\n", cr, sr); } /************************************************************************************ @@ -975,7 +966,7 @@ static void stm32_i2c_tracenew(FAR struct stm32_i2c_priv_s *priv, if (priv->tndx >= (CONFIG_I2C_NTRACE-1)) { - i2cdbg("Trace table overflow\n"); + i2cerr("ERROR: Trace table overflow\n"); return; } @@ -1016,7 +1007,7 @@ static void stm32_i2c_traceevent(FAR struct stm32_i2c_priv_s *priv, if (priv->tndx >= (CONFIG_I2C_NTRACE-1)) { - i2cdbg("Trace table overflow\n"); + i2cerr("ERROR: Trace table overflow\n"); return; } @@ -1709,7 +1700,7 @@ static int stm32_i2c_transfer(FAR struct i2c_master_s *dev, FAR struct i2c_msg_s status = stm32_i2c_getstatus(priv); ret = -ETIMEDOUT; - i2cdbg("Timed out: CR1: %04x status: %08x\n", + i2cerr("ERROR: Timed out: CR1: %04x status: %08x\n", stm32_i2c_getreg(priv, STM32_I2C_CR1_OFFSET), status); /* "Note: When the STOP, START or PEC bit is set, the software must diff --git a/arch/arm/src/stm32/stm32f40xxx_dma.c b/arch/arm/src/stm32/stm32f40xxx_dma.c index 41d243685957832fc2581aa9c62c13174fb33e07..f631c6ea4a6aa5ff19a2422cc7eb596dc7f0c0bf 100644 --- a/arch/arm/src/stm32/stm32f40xxx_dma.c +++ b/arch/arm/src/stm32/stm32f40xxx_dma.c @@ -605,8 +605,8 @@ void stm32_dmasetup(DMA_HANDLE handle, uint32_t paddr, uint32_t maddr, uint32_t regoffset; uint32_t regval; - dmadbg("paddr: %08x maddr: %08x ntransfers: %d scr: %08x\n", - paddr, maddr, ntransfers, scr); + dmainfo("paddr: %08x maddr: %08x ntransfers: %d scr: %08x\n", + paddr, maddr, ntransfers, scr); #ifdef CONFIG_STM32_DMACAPABLE DEBUGASSERT(stm32_dmacapable(maddr, ntransfers, scr)); @@ -869,7 +869,7 @@ bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr) uint32_t transfer_size, burst_length; uint32_t mend; - dmavdbg("stm32_dmacapable: 0x%08x/%u 0x%08x\n", maddr, count, ccr); + dmainfo("stm32_dmacapable: 0x%08x/%u 0x%08x\n", maddr, count, ccr); /* Verify that the address conforms to the memory transfer size. * Transfers to/from memory performed by the DMA controller are @@ -899,13 +899,13 @@ bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr) break; default: - dmavdbg("stm32_dmacapable: bad transfer size in CCR\n"); + dmainfo("stm32_dmacapable: bad transfer size in CCR\n"); return false; } if ((maddr & (transfer_size - 1)) != 0) { - dmavdbg("stm32_dmacapable: transfer unaligned\n"); + dmainfo("stm32_dmacapable: transfer unaligned\n"); return false; } @@ -937,13 +937,13 @@ bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr) break; default: - dmavdbg("stm32_dmacapable: bad burst size in CCR\n"); + dmainfo("stm32_dmacapable: bad burst size in CCR\n"); return false; } if ((maddr & (burst_length - 1)) != 0) { - dmavdbg("stm32_dmacapable: burst crosses 1KiB\n"); + dmainfo("stm32_dmacapable: burst crosses 1KiB\n"); return false; } } @@ -952,7 +952,7 @@ bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr) if ((maddr & STM32_REGION_MASK) != (mend & STM32_REGION_MASK)) { - dmavdbg("stm32_dmacapable: transfer crosses memory region\n"); + dmainfo("stm32_dmacapable: transfer crosses memory region\n"); return false; } @@ -973,7 +973,7 @@ bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr) if (maddr >= STM32_CCMRAM_BASE && (maddr - STM32_CCMRAM_BASE) < 65536) { - dmavdbg("stm32_dmacapable: transfer targets CCMRAM\n"); + dmainfo("stm32_dmacapable: transfer targets CCMRAM\n"); return false; } break; @@ -981,11 +981,11 @@ bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr) default: /* Everything else is unsupported by DMA */ - dmavdbg("stm32_dmacapable: transfer targets unknown/unsupported region\n"); + dmainfo("stm32_dmacapable: transfer targets unknown/unsupported region\n"); return false; } - dmavdbg("stm32_dmacapable: transfer OK\n"); + dmainfo("stm32_dmacapable: transfer OK\n"); return true; } #endif @@ -1001,7 +1001,7 @@ bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void stm32_dmasample(DMA_HANDLE handle, struct stm32_dmaregs_s *regs) { struct stm32_dma_s *dmast = (struct stm32_dma_s *)handle; @@ -1031,22 +1031,22 @@ void stm32_dmasample(DMA_HANDLE handle, struct stm32_dmaregs_s *regs) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void stm32_dmadump(DMA_HANDLE handle, const struct stm32_dmaregs_s *regs, const char *msg) { struct stm32_dma_s *dmast = (struct stm32_dma_s *)handle; uint32_t dmabase = DMA_BASE(dmast->base); - dmadbg("DMA Registers: %s\n", msg); - dmadbg(" LISR[%08x]: %08x\n", dmabase + STM32_DMA_LISR_OFFSET, regs->lisr); - dmadbg(" HISR[%08x]: %08x\n", dmabase + STM32_DMA_HISR_OFFSET, regs->hisr); - dmadbg(" SCR[%08x]: %08x\n", dmast->base + STM32_DMA_SCR_OFFSET, regs->scr); - dmadbg(" SNDTR[%08x]: %08x\n", dmast->base + STM32_DMA_SNDTR_OFFSET, regs->sndtr); - dmadbg(" SPAR[%08x]: %08x\n", dmast->base + STM32_DMA_SPAR_OFFSET, regs->spar); - dmadbg(" SM0AR[%08x]: %08x\n", dmast->base + STM32_DMA_SM0AR_OFFSET, regs->sm0ar); - dmadbg(" SM1AR[%08x]: %08x\n", dmast->base + STM32_DMA_SM1AR_OFFSET, regs->sm1ar); - dmadbg(" SFCR[%08x]: %08x\n", dmast->base + STM32_DMA_SFCR_OFFSET, regs->sfcr); + dmainfo("DMA Registers: %s\n", msg); + dmainfo(" LISR[%08x]: %08x\n", dmabase + STM32_DMA_LISR_OFFSET, regs->lisr); + dmainfo(" HISR[%08x]: %08x\n", dmabase + STM32_DMA_HISR_OFFSET, regs->hisr); + dmainfo(" SCR[%08x]: %08x\n", dmast->base + STM32_DMA_SCR_OFFSET, regs->scr); + dmainfo(" SNDTR[%08x]: %08x\n", dmast->base + STM32_DMA_SNDTR_OFFSET, regs->sndtr); + dmainfo(" SPAR[%08x]: %08x\n", dmast->base + STM32_DMA_SPAR_OFFSET, regs->spar); + dmainfo(" SM0AR[%08x]: %08x\n", dmast->base + STM32_DMA_SM0AR_OFFSET, regs->sm0ar); + dmainfo(" SM1AR[%08x]: %08x\n", dmast->base + STM32_DMA_SM1AR_OFFSET, regs->sm1ar); + dmainfo(" SFCR[%08x]: %08x\n", dmast->base + STM32_DMA_SFCR_OFFSET, regs->sfcr); } #endif diff --git a/arch/arm/src/stm32/stm32f40xxx_rcc.c b/arch/arm/src/stm32/stm32f40xxx_rcc.c index d431ce6df7a886fb4465328d22b185fe6cd2642b..3d259ec5c39dbd1e15e50daf8bb51dbc5b2fd336 100644 --- a/arch/arm/src/stm32/stm32f40xxx_rcc.c +++ b/arch/arm/src/stm32/stm32f40xxx_rcc.c @@ -911,7 +911,7 @@ static void stm32_stdclockconfig(void) * ****************************************************************************/ -#if defined(CONFIG_SYSLOG) && defined(CONFIG_ARMV7M_ITMSYSLOG) +#ifdef CONFIG_ARMV7M_ITMSYSLOG static inline void rcc_itm_syslog(void) { /* Enable SWO output */ diff --git a/arch/arm/src/stm32/stm32f40xxx_rtcc.c b/arch/arm/src/stm32/stm32f40xxx_rtcc.c index ece81269c6698513f1c9ef42cf7d9b3d1f494c4f..0e55a4ad7dd7976f86c674028b66b8f10da74fb0 100644 --- a/arch/arm/src/stm32/stm32f40xxx_rtcc.c +++ b/arch/arm/src/stm32/stm32f40xxx_rtcc.c @@ -38,6 +38,8 @@ * Included Files ************************************************************************************/ +#include + #include #include #include @@ -79,24 +81,10 @@ # error "CONFIG_STM32_PWR must selected to use this driver" #endif -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_RTC -#endif - -#if !defined(CONFIG_RTC_MAGIC) -# define CONFIG_RTC_MAGIC (0xfacefeee) -#endif - -#if !defined(CONFIG_RTC_MAGIC_REG) -# define CONFIG_RTC_MAGIC_REG (0) -#endif - /* Constants ************************************************************************/ #define SYNCHRO_TIMEOUT (0x00020000) #define INITMODE_TIMEOUT (0x00010000) -#define RTC_MAGIC CONFIG_RTC_MAGIC -#define RTC_MAGIC_REG STM32_RTC_BKR(CONFIG_RTC_MAGIC_REG) /* Proxy definitions to make the same code work for all the STM32 series ************/ @@ -108,18 +96,6 @@ # define RCC_XXX_RTCSEL_LSI RCC_BDCR_RTCSEL_LSI # define RCC_XXX_RTCSEL_HSE RCC_BDCR_RTCSEL_HSE -/* BCD conversions */ - -#define rtc_reg_tr_bin2bcd(tp) \ - ((rtc_bin2bcd((tp)->tm_sec) << RTC_TR_SU_SHIFT) | \ - (rtc_bin2bcd((tp)->tm_min) << RTC_TR_MNU_SHIFT) | \ - (rtc_bin2bcd((tp)->tm_hour) << RTC_TR_HU_SHIFT)) - -#define rtc_reg_alrmr_bin2bcd(tm) \ - ((rtc_bin2bcd((tm)->tm_sec) << RTC_ALRMR_SU_SHIFT) | \ - (rtc_bin2bcd((tm)->tm_min) << RTC_ALRMR_MNU_SHIFT) | \ - (rtc_bin2bcd((tm)->tm_hour) << RTC_ALRMR_HU_SHIFT)) - /* Time conversions */ #define MINUTES_IN_HOUR 60 @@ -141,20 +117,6 @@ #define RTC_ALRMR_DIS_DATE_MASK (RTC_ALRMR_MSK4) #define RTC_ALRMR_ENABLE (0) -/* Debug ****************************************************************************/ - -#ifdef CONFIG_DEBUG_RTC -# define rtcdbg dbg -# define rtcvdbg vdbg -# define rtclldbg lldbg -# define rtcllvdbg llvdbg -#else -# define rtcdbg(x...) -# define rtcvdbg(x...) -# define rtclldbg(x...) -# define rtcllvdbg(x...) -#endif - /************************************************************************************ * Private Types ************************************************************************************/ @@ -193,10 +155,12 @@ volatile bool g_rtc_enabled = false; #ifdef CONFIG_RTC_ALARM static int rtchw_check_alrawf(void); -static int rtchw_check_alrbwf(void); static int rtchw_set_alrmar(rtc_alarmreg_t alarmreg); +#if CONFIG_RTC_NALARMS > 1 +static int rtchw_check_alrbwf(void); static int rtchw_set_alrmbr(rtc_alarmreg_t alarmreg); #endif +#endif /************************************************************************************ * Private Functions @@ -216,30 +180,36 @@ static int rtchw_set_alrmbr(rtc_alarmreg_t alarmreg); * ************************************************************************************/ -#ifdef CONFIG_DEBUG_RTC +#ifdef CONFIG_DEBUG_RTC_INFO static void rtc_dumpregs(FAR const char *msg) { - rtclldbg("%s:\n", msg); - rtclldbg(" TR: %08x\n", getreg32(STM32_RTC_TR)); - rtclldbg(" DR: %08x\n", getreg32(STM32_RTC_DR)); - rtclldbg(" CR: %08x\n", getreg32(STM32_RTC_CR)); - rtclldbg(" ISR: %08x\n", getreg32(STM32_RTC_ISR)); - rtclldbg(" PRER: %08x\n", getreg32(STM32_RTC_PRER)); - rtclldbg(" WUTR: %08x\n", getreg32(STM32_RTC_WUTR)); -#ifndef CONFIG_STM32_STM32F30XX - rtclldbg(" CALIBR: %08x\n", getreg32(STM32_RTC_CALIBR)); -#endif - rtclldbg(" ALRMAR: %08x\n", getreg32(STM32_RTC_ALRMAR)); - rtclldbg(" ALRMBR: %08x\n", getreg32(STM32_RTC_ALRMBR)); - rtclldbg(" SHIFTR: %08x\n", getreg32(STM32_RTC_SHIFTR)); - rtclldbg(" TSTR: %08x\n", getreg32(STM32_RTC_TSTR)); - rtclldbg(" TSDR: %08x\n", getreg32(STM32_RTC_TSDR)); - rtclldbg(" TSSSR: %08x\n", getreg32(STM32_RTC_TSSSR)); - rtclldbg(" CALR: %08x\n", getreg32(STM32_RTC_CALR)); - rtclldbg(" TAFCR: %08x\n", getreg32(STM32_RTC_TAFCR)); - rtclldbg("ALRMASSR: %08x\n", getreg32(STM32_RTC_ALRMASSR)); - rtclldbg("ALRMBSSR: %08x\n", getreg32(STM32_RTC_ALRMBSSR)); - rtclldbg("MAGICREG: %08x\n", getreg32(RTC_MAGIC_REG)); + int rtc_state; + + rtcinfo("%s:\n", msg); + rtcinfo(" TR: %08x\n", getreg32(STM32_RTC_TR)); + rtcinfo(" DR: %08x\n", getreg32(STM32_RTC_DR)); + rtcinfo(" CR: %08x\n", getreg32(STM32_RTC_CR)); + rtcinfo(" ISR: %08x\n", getreg32(STM32_RTC_ISR)); + rtcinfo(" PRER: %08x\n", getreg32(STM32_RTC_PRER)); + rtcinfo(" WUTR: %08x\n", getreg32(STM32_RTC_WUTR)); + rtcinfo(" ALRMAR: %08x\n", getreg32(STM32_RTC_ALRMAR)); + rtcinfo(" ALRMBR: %08x\n", getreg32(STM32_RTC_ALRMBR)); + rtcinfo(" SHIFTR: %08x\n", getreg32(STM32_RTC_SHIFTR)); + rtcinfo(" TSTR: %08x\n", getreg32(STM32_RTC_TSTR)); + rtcinfo(" TSDR: %08x\n", getreg32(STM32_RTC_TSDR)); + rtcinfo(" TSSSR: %08x\n", getreg32(STM32_RTC_TSSSR)); + rtcinfo(" CALR: %08x\n", getreg32(STM32_RTC_CALR)); + rtcinfo(" TAFCR: %08x\n", getreg32(STM32_RTC_TAFCR)); + rtcinfo("ALRMASSR: %08x\n", getreg32(STM32_RTC_ALRMASSR)); + rtcinfo("ALRMBSSR: %08x\n", getreg32(STM32_RTC_ALRMBSSR)); + rtcinfo("MAGICREG: %08x\n", getreg32(RTC_MAGIC_REG)); + + rtc_state = + ((getreg32(STM32_EXTI_RTSR) & EXTI_RTC_ALARM) ? 0x1000 : 0) | + ((getreg32(STM32_EXTI_FTSR) & EXTI_RTC_ALARM) ? 0x0100 : 0) | + ((getreg32(STM32_EXTI_IMR) & EXTI_RTC_ALARM) ? 0x0010 : 0) | + ((getreg32(STM32_EXTI_EMR) & EXTI_RTC_ALARM) ? 0x0001 : 0); + rtcinfo("EXTI (RTSR FTSR ISR EVT): %01x\n",rtc_state); } #else # define rtc_dumpregs(msg) @@ -259,16 +229,16 @@ static void rtc_dumpregs(FAR const char *msg) * ************************************************************************************/ -#ifdef CONFIG_DEBUG_RTC +#ifdef CONFIG_DEBUG_RTC_INFO static void rtc_dumptime(FAR const struct tm *tp, FAR const char *msg) { - rtclldbg("%s:\n", msg); - rtclldbg(" tm_sec: %08x\n", tp->tm_sec); - rtclldbg(" tm_min: %08x\n", tp->tm_min); - rtclldbg(" tm_hour: %08x\n", tp->tm_hour); - rtclldbg(" tm_mday: %08x\n", tp->tm_mday); - rtclldbg(" tm_mon: %08x\n", tp->tm_mon); - rtclldbg(" tm_year: %08x\n", tp->tm_year); + rtcinfo("%s:\n", msg); + rtcinfo(" tm_sec: %08x\n", tp->tm_sec); + rtcinfo(" tm_min: %08x\n", tp->tm_min); + rtcinfo(" tm_hour: %08x\n", tp->tm_hour); + rtcinfo(" tm_mday: %08x\n", tp->tm_mday); + rtcinfo(" tm_mon: %08x\n", tp->tm_mon); + rtcinfo(" tm_year: %08x\n", tp->tm_year); } #else # define rtc_dumptime(tp, msg) @@ -600,9 +570,9 @@ static void rtc_resume(void) regval &= ~(RTC_ISR_ALRAF | RTC_ISR_ALRBF); putreg32(regval, STM32_RTC_ISR); - /* Clear the EXTI Line 17 Pending bit (Connected internally to RTC Alarm) */ + /* Clear the RTC Alarm Pending bit */ - putreg32((1 << 17), STM32_EXTI_PR); + putreg32(EXTI_RTC_ALARM, STM32_EXTI_PR); #endif } @@ -659,6 +629,7 @@ static int stm32_rtc_alarm_handler(int irq, void *context) } } +#if CONFIG_RTC_NALARMS > 1 if ((isr & RTC_ISR_ALRBF) != 0) { cr = getreg32(STM32_RTC_CR); @@ -682,6 +653,7 @@ static int stm32_rtc_alarm_handler(int irq, void *context) putreg32(isr, STM32_RTC_CR); } } +#endif return ret; } @@ -727,7 +699,7 @@ static int rtchw_check_alrawf(void) } #endif -#ifdef CONFIG_RTC_ALARM +#if defined(CONFIG_RTC_ALARM) && CONFIG_RTC_NALARMS > 1 static int rtchw_check_alrbwf(void) { volatile uint32_t timeout; @@ -792,7 +764,7 @@ static int rtchw_set_alrmar(rtc_alarmreg_t alarmreg) /* Set the RTC Alarm register */ putreg32(alarmreg, STM32_RTC_ALRMAR); - rtcvdbg(" TR: %08x ALRMAR: %08x\n", + rtcinfo(" TR: %08x ALRMAR: %08x\n", getreg32(STM32_RTC_TR), getreg32(STM32_RTC_ALRMAR)); /* Enable RTC alarm */ @@ -805,7 +777,7 @@ errout_with_wprunlock: } #endif -#ifdef CONFIG_RTC_ALARM +#if defined(CONFIG_RTC_ALARM) && CONFIG_RTC_NALARMS > 1 static int rtchw_set_alrmbr(rtc_alarmreg_t alarmreg) { int ret = -EBUSY; @@ -829,7 +801,7 @@ static int rtchw_set_alrmbr(rtc_alarmreg_t alarmreg) /* Set the RTC Alarm register */ putreg32(alarmreg, STM32_RTC_ALRMBR); - rtcvdbg(" TR: %08x ALRMBR: %08x\n", + rtcinfo(" TR: %08x ALRMBR: %08x\n", getreg32(STM32_RTC_TR), getreg32(STM32_RTC_ALRMBR)); /* Enable RTC alarm B */ @@ -876,8 +848,6 @@ int up_rtc_initialize(void) * maximum performance. */ - rtc_dumpregs("On reset"); - /* Select the clock source */ /* Save the token before losing it when resetting */ @@ -887,13 +857,6 @@ int up_rtc_initialize(void) if (regval != RTC_MAGIC) { - /* We might be changing RTCSEL - to ensure such changes work, we must reset the - * backup domain (having backed up the RTC_MAGIC token) - */ - - modifyreg32(STM32_RCC_XXX, 0, RCC_XXX_YYYRST); - modifyreg32(STM32_RCC_XXX, RCC_XXX_YYYRST, 0); - /* Some boards do not have the external 32khz oscillator installed, for those * boards we must fallback to the crummy internal RC clock or the external high * rate clock @@ -902,16 +865,19 @@ int up_rtc_initialize(void) #ifdef CONFIG_RTC_HSECLOCK /* Use the HSE clock as the input to the RTC block */ + rtc_dumpregs("On reset HSE"); modifyreg32(STM32_RCC_XXX, RCC_XXX_RTCSEL_MASK, RCC_XXX_RTCSEL_HSE); #elif defined(CONFIG_RTC_LSICLOCK) /* Use the LSI clock as the input to the RTC block */ + rtc_dumpregs("On reset LSI"); modifyreg32(STM32_RCC_XXX, RCC_XXX_RTCSEL_MASK, RCC_XXX_RTCSEL_LSI); #elif defined(CONFIG_RTC_LSECLOCK) /* Use the LSE clock as the input to the RTC block */ + rtc_dumpregs("On reset LSE"); modifyreg32(STM32_RCC_XXX, RCC_XXX_RTCSEL_MASK, RCC_XXX_RTCSEL_LSE); #endif @@ -926,6 +892,8 @@ int up_rtc_initialize(void) uint32_t clksrc = getreg32(STM32_RCC_XXX); + rtc_dumpregs("On reset warm"); + #if defined(CONFIG_RTC_HSECLOCK) if ((clksrc & RCC_XXX_RTCSEL_MASK) != RCC_XXX_RTCSEL_HSE) #elif defined(CONFIG_RTC_LSICLOCK) @@ -986,13 +954,13 @@ int up_rtc_initialize(void) { case OK: { - rtclldbg("rtc_syncwait() okay\n"); + rtcinfo("rtc_syncwait() okay\n"); break; } default: { - rtclldbg("rtc_syncwait() failed (%d)\n", ret); + rtcerr("ERROR: rtc_syncwait() failed (%d)\n", ret); break; } } @@ -1006,7 +974,7 @@ int up_rtc_initialize(void) if (regval != RTC_MAGIC) { - rtclldbg("Do setup\n"); + rtcinfo("Do setup\n"); /* Perform the one-time setup of the LSE clocking to the RTC */ @@ -1024,7 +992,7 @@ int up_rtc_initialize(void) } else { - rtclldbg("Do resume\n"); + rtcinfo("Do resume\n"); /* RTC already set-up, just resume normal operation */ @@ -1040,8 +1008,8 @@ int up_rtc_initialize(void) if (ret != OK && nretry > 0) { - rtclldbg("setup/resume ran %d times and failed with %d\n", - nretry, ret); + rtcinfo("setup/resume ran %d times and failed with %d\n", + nretry, ret); return -ETIMEDOUT; } @@ -1060,10 +1028,12 @@ int up_rtc_initialize(void) */ stm32_exti_alarm(true, false, true, stm32_rtc_alarm_handler); + rtc_dumpregs("After InitExtiAlarm"); +#else + rtc_dumpregs("After Initialization"); #endif g_rtc_enabled = true; - rtc_dumpregs("After Initialization"); return OK; } @@ -1249,7 +1219,9 @@ int stm32_rtc_setdatetime(FAR const struct tm *tp) * register. */ - tr = (rtc_reg_tr_bin2bcd(tp) & ~RTC_TR_RESERVED_BITS); + tr = (rtc_bin2bcd(tp->tm_sec) << RTC_TR_SU_SHIFT) | + (rtc_bin2bcd(tp->tm_min) << RTC_TR_MNU_SHIFT) | + (rtc_bin2bcd(tp->tm_hour) << RTC_TR_HU_SHIFT); /* Now convert the fields in struct tm format to the RTC date register fields: * Days: 1-31 match in both cases. @@ -1351,10 +1323,16 @@ int stm32_rtc_setalarm(FAR struct alm_setalarm_s *alminfo) rtc_dumptime(&alminfo->as_time, "New alarm time"); - /* Break out the values to the HW alarm register format */ - - alarmreg = rtc_reg_alrmr_bin2bcd(&alminfo->as_time); + /* Break out the values to the HW alarm register format. The values in + * all STM32 fields match the fields of struct tm in this case. Notice + * that the alarm is limited to one month. + */ + alarmreg = (rtc_bin2bcd(alminfo->as_time.tm_sec) << RTC_ALRMR_SU_SHIFT) | + (rtc_bin2bcd(alminfo->as_time.tm_min) << RTC_ALRMR_MNU_SHIFT) | + (rtc_bin2bcd(alminfo->as_time.tm_hour) << RTC_ALRMR_HU_SHIFT) | + (rtc_bin2bcd(alminfo->as_time.tm_mday) << RTC_ALRMR_DU_SHIFT); + /* Set the alarm in hardware and enable interrupts */ switch (alminfo->as_id) @@ -1371,9 +1349,12 @@ int stm32_rtc_setalarm(FAR struct alm_setalarm_s *alminfo) cbinfo->ac_cb = NULL; cbinfo->ac_arg = NULL; } + + rtc_dumpregs("Set AlarmA"); } break; +#if CONFIG_RTC_NALARMS > 1 case RTC_ALARMB: { cbinfo = &g_alarmcb[RTC_ALARMB]; @@ -1386,11 +1367,14 @@ int stm32_rtc_setalarm(FAR struct alm_setalarm_s *alminfo) cbinfo->ac_cb = NULL; cbinfo->ac_arg = NULL; } + + rtc_dumpregs("Set AlarmB"); } break; +#endif default: - rtcvdbg("ERROR: Invalid ALARM%d\n", alminfo->as_id); + rtcerr("ERROR: Invalid ALARM%d\n", alminfo->as_id); break; } @@ -1454,6 +1438,7 @@ int stm32_rtc_cancelalarm(enum alm_id_e alarmid) } break; +#if CONFIG_RTC_NALARMS > 1 case RTC_ALARMB: { /* Cancel the global callback function */ @@ -1484,9 +1469,10 @@ int stm32_rtc_cancelalarm(enum alm_id_e alarmid) ret = OK; } break; +#endif default: - rtcvdbg("ERROR: Invalid ALARM%d\n", alminfo->as_id); + rtcerr("ERROR: Invalid ALARM%d\n", alarmid); break; } diff --git a/arch/arm/src/stm32f7/Kconfig b/arch/arm/src/stm32f7/Kconfig index e3a8d2b42cdedb30750d7f51f637e8197662b3b6..0f2f65f84a2a973aa45634b99ccf7f66359525e5 100644 --- a/arch/arm/src/stm32f7/Kconfig +++ b/arch/arm/src/stm32f7/Kconfig @@ -12,692 +12,4472 @@ choice default ARCH_CHIP_STM32F746 depends on ARCH_CHIP_STM32F7 -config ARCH_CHIP_STM32F745 - bool "STM32F745xx" - select STM32F7_STM32F74XX +config ARCH_CHIP_STM32F745VG + bool "STM32F745VG" + select STM32F7_STM32F745XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_V ---help--- - STM32 F7 Cortex M7, 512 or 1024Kb FLASH, 335 (240++16+54) Kb SRAM + STM32 F7 Cortex M7, 1024 FLASH, 320K (240+16+64) Kb SRAM -config ARCH_CHIP_STM32F746 - bool "STM32F746xx" - select STM32F7_STM32F74XX - select STM32F7_HAVE_LTDC +config ARCH_CHIP_STM32F745VE + bool "STM32F745VE" + select STM32F7_STM32F745XX + select STM32F7_FLASH_CONFIG_E + select STM32F7_IO_CONFIG_V ---help--- - STM32 F7 Cortex M7, 512 or 1024Kb FLASH, 335 (240++16+54) Kb SRAM + STM32 F7 Cortex M7, 512 320K FLASH, 320K (240+16+64) Kb SRAM -config ARCH_CHIP_STM32F756 - bool "STM32F756xx" - select STM32F7_STM32F75XX - select STM32F7_HAVE_LTDC +config ARCH_CHIP_STM32F745IG + bool "STM32F745IG" + select STM32F7_STM32F745XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_I ---help--- - STM32 F7 Cortex M7, 512 or 1024Kb FLASH, 335 (240++16+54) Kb SRAM + STM32 F7 Cortex M7, 1024 FLASH, 320K (240+16+64) Kb SRAM -endchoice # STM32 F7 Chip Selection +config ARCH_CHIP_STM32F745IE + bool "STM32F745IE" + select STM32F7_STM32F745XX + select STM32F7_FLASH_CONFIG_E + select STM32F7_IO_CONFIG_I + ---help--- + STM32 F7 Cortex M7, 512 FLASH, 320K (240+16+64) Kb SRAM -config STM32F7_STM32F74XX - bool - default n - select ARCH_HAVE_FPU - select ARCH_HAVE_DPFPU # REVISIT - select ARMV7M_HAVE_ICACHE - select ARMV7M_HAVE_DCACHE - select ARMV7M_HAVE_ITCM - select ARMV7M_HAVE_DTCM +config ARCH_CHIP_STM32F745ZE + bool "STM32F745ZE" + select STM32F7_STM32F745XX + select STM32F7_FLASH_CONFIG_E + select STM32F7_IO_CONFIG_Z + ---help--- + STM32 F7 Cortex M7, 512 FLASH, 320K (240+16+64) Kb SRAM -config STM32F7_STM32F75XX - bool - default n - select ARCH_HAVE_FPU - select ARCH_HAVE_DPFPU # REVISIT - select ARMV7M_HAVE_ICACHE - select ARMV7M_HAVE_DCACHE - select ARMV7M_HAVE_ITCM - select ARMV7M_HAVE_DTCM +config ARCH_CHIP_STM32F745ZG + bool "STM32F745ZG" + select STM32F7_STM32F745XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_Z + ---help--- + STM32 F7 Cortex M7, 1024 FLASH, 320K (240+16+64) Kb SRAM -choice - prompt "Embedded FLASH size" - default STM32F7_FLASH_1024KB +config ARCH_CHIP_STM32F746BG + bool "STM32F746BG" + select STM32F7_STM32F746XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_B + ---help--- + STM32 F7 Cortex M7, 1024 FLASH, 320K (240+16+64) Kb SRAM -config STM32F7_FLASH_512KB - bool "512 KB" +config ARCH_CHIP_STM32F746VG + bool "STM32F746VG" + select STM32F7_STM32F746XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_V + ---help--- + STM32 F7 Cortex M7, 1024 FLASH, 320K (240+16+64) Kb SRAM -config STM32F7_FLASH_1024KB - bool "1024 KB" +config ARCH_CHIP_STM32F746VE + bool "STM32F746VE" + select STM32F7_STM32F746XX + select STM32F7_FLASH_CONFIG_E + select STM32F7_IO_CONFIG_V + ---help--- + STM32 F7 Cortex M7, 512 FLASH, 320K (240+16+64) Kb SRAM -endchoice # Embedded FLASH size +config ARCH_CHIP_STM32F746BE + bool "STM32F746BE" + select STM32F7_STM32F746XX + select STM32F7_FLASH_CONFIG_E + select STM32F7_IO_CONFIG_B + ---help--- + STM32 F7 Cortex M7, 512 FLASH, 320K (240+16+64) Kb SRAM -menu "STM32 Peripheral Support" +config ARCH_CHIP_STM32F746ZG + bool "STM32F746ZG" + select STM32F7_STM32F746XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_Z + ---help--- + STM32 F7 Cortex M7, 1024 FLASH, 320K (240+16+64) Kb SRAM -# These "hidden" settings determine is a peripheral option is available for the -# selection MCU +config ARCH_CHIP_STM32F746IE + bool "STM32F746IE" + select STM32F7_STM32F746XX + select STM32F7_FLASH_CONFIG_E + select STM32F7_IO_CONFIG_I + ---help--- + STM32 F7 Cortex M7, 512 FLASH, 320K (240+16+64) Kb SRAM -config STM32F7_HAVE_LTDC - bool - default n +config ARCH_CHIP_STM32F746NG + bool "STM32F746NG" + select STM32F7_STM32F746XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_N + ---help--- + STM32 F7 Cortex M7, 1024 FLASH, 320K (240+16+64) Kb SRAM -# These "hidden" settings are the OR of individual peripheral selections -# indicating that the general capabilitiy is required. +config ARCH_CHIP_STM32F746NE + bool "STM32F746NE" + select STM32F7_STM32F746XX + select STM32F7_FLASH_CONFIG_E + select STM32F7_IO_CONFIG_N + ---help--- + STM32 F7 Cortex M7, 512 FLASH, 320K (240+16+64) Kb SRAM -config STM32F7_ADC - bool - default n +config ARCH_CHIP_STM32F746ZE + bool "STM32F746ZE" + select STM32F7_STM32F746XX + select STM32F7_FLASH_CONFIG_E + select STM32F7_IO_CONFIG_Z + ---help--- + STM32 F7 Cortex M7, 512 FLASH, 320K (240+16+64) Kb SRAM -config STM32F7_CAN - bool - default n +config ARCH_CHIP_STM32F746IG + bool "STM32F746IG" + select STM32F7_STM32F746XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_I + ---help--- + STM32 F7 Cortex M7, 1024 FLASH, 320K (240+16+64) Kb SRAM -config STM32F7_DAC - bool - default n +config ARCH_CHIP_STM32F756NG + bool "STM32F756NG" + select STM32F7_STM32F756XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_N + ---help--- + STM32 F7 Cortex M7, 1024 FLASH, 320K (240+16+64) Kb SRAM -config STM32F7_DMA - bool - default n +config ARCH_CHIP_STM32F756BG + bool "STM32F756BG" + select STM32F7_STM32F756XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_B + ---help--- + STM32 F7 Cortex M7, 1024 FLASH, 320K (240+16+64) Kb SRAM -config STM32F7_I2C - bool - default n +config ARCH_CHIP_STM32F756IG + bool "STM32F756IG" + select STM32F7_STM32F756XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_I + ---help--- + STM32 F7 Cortex M7, 1024 FLASH, 320K (240+16+64) Kb SRAM -config STM32F7_SAI - bool - default n +config ARCH_CHIP_STM32F756VG + bool "STM32F756VG" + select STM32F7_STM32F756XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_V + ---help--- + STM32 F7 Cortex M7, 1024 FLASH, 320K (240+16+64) Kb SRAM -config STM32F7_SPI - bool - default n +config ARCH_CHIP_STM32F756ZG + bool "STM32F756ZG" + select STM32F7_STM32F756XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_Z + ---help--- + STM32 F7 Cortex M7, 1024 FLASH, 320K (240+16+64) Kb SRAM -config STM32F7_USART - bool - default n +config ARCH_CHIP_STM32F765NI + bool "STM32F765NI" + select STM32F7_STM32F765XX + select STM32F7_FLASH_CONFIG_I + select STM32F7_IO_CONFIG_N + ---help--- + STM32 F7 Cortex M7, 2048 FLASH, 512K (368+16+128) Kb SRAM -# These are the peripheral selections proper +config ARCH_CHIP_STM32F765VI + bool "STM32F765VI" + select STM32F7_STM32F765XX + select STM32F7_FLASH_CONFIG_I + select STM32F7_IO_CONFIG_V + ---help--- + STM32 F7 Cortex M7, 2048 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_ADC1 - bool "ADC1" - default n - select STM32F7_ADC +config ARCH_CHIP_STM32F765VG + bool "STM32F765VG" + select STM32F7_STM32F765XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_V + ---help--- + STM32 F7 Cortex M7, 1024 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_ADC2 - bool "ADC2" - default n - select STM32F7_ADC +config ARCH_CHIP_STM32F765BI + bool "STM32F765BI" + select STM32F7_STM32F765XX + select STM32F7_FLASH_CONFIG_I + select STM32F7_IO_CONFIG_B + ---help--- + STM32 F7 Cortex M7, 2048 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_ADC3 - bool "ADC3" - default n - select STM32F7_ADC +config ARCH_CHIP_STM32F765NG + bool "STM32F765NG" + select STM32F7_STM32F765XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_N + ---help--- + STM32 F7 Cortex M7, 1024 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_BKPSRAM - bool "Enable BKP RAM Domain" - default n +config ARCH_CHIP_STM32F765ZG + bool "STM32F765ZG" + select STM32F7_STM32F765XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_Z + ---help--- + STM32 F7 Cortex M7, 1024 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_CAN1 - bool "CAN1" - default n - select CAN - select STM32F7_CAN +config ARCH_CHIP_STM32F765ZI + bool "STM32F765ZI" + select STM32F7_STM32F765XX + select STM32F7_FLASH_CONFIG_I + select STM32F7_IO_CONFIG_Z + ---help--- + STM32 F7 Cortex M7, 2048 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_CAN2 - bool "CAN2" - default n - select CAN - select STM32F7_CAN +config ARCH_CHIP_STM32F765IG + bool "STM32F765IG" + select STM32F7_STM32F765XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_I + ---help--- + STM32 F7 Cortex M7, 1024 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_CEC - bool "CEC" - default n - depends on STM32F7_VALUELINE +config ARCH_CHIP_STM32F765BG + bool "STM32F765BG" + select STM32F7_STM32F765XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_B + ---help--- + STM32 F7 Cortex M7, 1024 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_CRC - bool "CRC" - default n +config ARCH_CHIP_STM32F765II + bool "STM32F765II" + select STM32F7_STM32F765XX + select STM32F7_FLASH_CONFIG_I + select STM32F7_IO_CONFIG_I + ---help--- + STM32 F7 Cortex M7, 2048 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_CRYP - bool "CRYP" - default n +config ARCH_CHIP_STM32F767NG + bool "STM32F767NG" + select STM32F7_STM32F767XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_N + ---help--- + STM32 F7 Cortex M7, 1024 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_DMA1 - bool "DMA1" - default n - select STM32F7_DMA - select ARCH_DMA +config ARCH_CHIP_STM32F767IG + bool "STM32F767IG" + select STM32F7_STM32F767XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_I + ---help--- + STM32 F7 Cortex M7, 1024 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_DMA2 - bool "DMA2" - default n - select STM32F7_DMA - select ARCH_DMA +config ARCH_CHIP_STM32F767VG + bool "STM32F767VG" + select STM32F7_STM32F767XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_V + ---help--- + STM32 F7 Cortex M7, 1024 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_DAC1 - bool "DAC1" - default n - select STM32F7_DAC +config ARCH_CHIP_STM32F767ZG + bool "STM32F767ZG" + select STM32F7_STM32F767XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_Z + ---help--- + STM32 F7 Cortex M7, 1024 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_DAC2 - bool "DAC2" - default n - select STM32F7_DAC +config ARCH_CHIP_STM32F767NI + bool "STM32F767NI" + select STM32F7_STM32F767XX + select STM32F7_FLASH_CONFIG_I + select STM32F7_IO_CONFIG_N + ---help--- + STM32 F7 Cortex M7, 2048 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_DCMI - bool "DCMI" - default n +config ARCH_CHIP_STM32F767VI + bool "STM32F767VI" + select STM32F7_STM32F767XX + select STM32F7_FLASH_CONFIG_I + select STM32F7_IO_CONFIG_V + ---help--- + STM32 F7 Cortex M7, 2048 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_ETHMAC - bool "Ethernet MAC" - default n - select NETDEVICES - select ARCH_HAVE_PHY +config ARCH_CHIP_STM32F767BG + bool "STM32F767BG" + select STM32F7_STM32F767XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_B + ---help--- + STM32 F7 Cortex M7, 1024 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_FSMC - bool "FSMC" - default n +config ARCH_CHIP_STM32F767ZI + bool "STM32F767ZI" + select STM32F7_STM32F767XX + select STM32F7_FLASH_CONFIG_I + select STM32F7_IO_CONFIG_Z + ---help--- + STM32 F7 Cortex M7, 2048 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_I2C1 - bool "I2C1" - default n - select STM32F7_I2C +config ARCH_CHIP_STM32F767II + bool "STM32F767II" + select STM32F7_STM32F767XX + select STM32F7_FLASH_CONFIG_I + select STM32F7_IO_CONFIG_I + ---help--- + STM32 F7 Cortex M7, 2048 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_CEC - bool "HDMI-CEC" - default n +config ARCH_CHIP_STM32F769BI + bool "STM32F769BI" + select STM32F7_STM32F769XX + select STM32F7_FLASH_CONFIG_I + select STM32F7_IO_CONFIG_B + ---help--- + STM32 F7 Cortex M7, 2048 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_I2C2 - bool "I2C2" - default n - select STM32F7_I2C +config ARCH_CHIP_STM32F769II + bool "STM32F769II" + select STM32F7_STM32F769XX + select STM32F7_FLASH_CONFIG_I + select STM32F7_IO_CONFIG_I + ---help--- + STM32 F7 Cortex M7, 2048 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_I2C3 - bool "I2C3" - default n - select STM32F7_I2C +config ARCH_CHIP_STM32F769BG + bool "STM32F769BG" + select STM32F7_STM32F769XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_B + ---help--- + STM32 F7 Cortex M7, 1024 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_LPTIM1 - bool "Low-power timer 1" - default n +config ARCH_CHIP_STM32F769NI + bool "STM32F769NI" + select STM32F7_STM32F769XX + select STM32F7_FLASH_CONFIG_I + select STM32F7_IO_CONFIG_N + ---help--- + STM32 F7 Cortex M7, 2048 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_LTDC - bool "LTDC" - default n - depends on STM32F7_HAVE_LTDC +config ARCH_CHIP_STM32F769AI + bool "STM32F769AI" + select STM32F7_STM32F769AX + select STM32F7_FLASH_CONFIG_I + select STM32F7_IO_CONFIG_A ---help--- - The STM32 LTDC is an LCD-TFT Display Controller available on - the STM32F429 and STM32F439 devices. It is a standard parallel - video interface (HSYNC, VSYNC, etc.) for controlling TFT - LCD displays. + STM32 F7 Cortex M7, 2048 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_DMA2D - bool "DMA2D" - default n +config ARCH_CHIP_STM32F769NG + bool "STM32F769NG" + select STM32F7_STM32F769XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_N ---help--- - The STM32 DMA2D is an Chrom-Art Accelerator for image manipulation - available on the STM32 F7 devices. + STM32 F7 Cortex M7, 1024 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_OTGFS - bool "OTG FS" - default n - select USBHOST_HAVE_ASYNCH if USBHOST +config ARCH_CHIP_STM32F769IG + bool "STM32F769IG" + select STM32F7_STM32F769XX + select STM32F7_FLASH_CONFIG_G + select STM32F7_IO_CONFIG_I + ---help--- + STM32 F7 Cortex M7, 1024 FLASH, 512K (368+16+128) Kb SRAM -config STM32F7_OTGHS - bool "OTG HS" +config ARCH_CHIP_STM32F777ZI + bool "STM32F777ZI" + select STM32F7_STM32F777XX + select STM32F7_FLASH_CONFIG_I + select STM32F7_IO_CONFIG_Z + ---help--- + STM32 F7 Cortex M7, 2048 FLASH, 512K (368+16+128) Kb SRAM + +config ARCH_CHIP_STM32F777VI + bool "STM32F777VI" + select STM32F7_STM32F777XX + select STM32F7_FLASH_CONFIG_I + select STM32F7_IO_CONFIG_V + ---help--- + STM32 F7 Cortex M7, 2048 FLASH, 512K (368+16+128) Kb SRAM + +config ARCH_CHIP_STM32F777NI + bool "STM32F777NI" + select STM32F7_STM32F777XX + select STM32F7_FLASH_CONFIG_I + select STM32F7_IO_CONFIG_N + ---help--- + STM32 F7 Cortex M7, 2048 FLASH, 512K (368+16+128) Kb SRAM + +config ARCH_CHIP_STM32F777BI + bool "STM32F777BI" + select STM32F7_STM32F777XX + select STM32F7_FLASH_CONFIG_I + select STM32F7_IO_CONFIG_B + ---help--- + STM32 F7 Cortex M7, 2048 FLASH, 512K (368+16+128) Kb SRAM + +config ARCH_CHIP_STM32F777II + bool "STM32F777II" + select STM32F7_STM32F777XX + select STM32F7_FLASH_CONFIG_I + select STM32F7_IO_CONFIG_I + ---help--- + STM32 F7 Cortex M7, 2048 FLASH, 512K (368+16+128) Kb SRAM + +config ARCH_CHIP_STM32F778AI + bool "STM32F778AI" + select STM32F7_STM32F778AX + select STM32F7_FLASH_CONFIG_I + select STM32F7_IO_CONFIG_A + ---help--- + STM32 F7 Cortex M7, 2048 FLASH, 512K (368+16+128) Kb SRAM + +config ARCH_CHIP_STM32F779II + bool "STM32F779II" + select STM32F7_STM32F779XX + select STM32F7_FLASH_CONFIG_I + select STM32F7_IO_CONFIG_I + ---help--- + STM32 F7 Cortex M7, 2048 FLASH, 512K (368+16+128) Kb SRAM + +config ARCH_CHIP_STM32F779NI + bool "STM32F779NI" + select STM32F7_STM32F779XX + select STM32F7_FLASH_CONFIG_I + select STM32F7_IO_CONFIG_N + ---help--- + STM32 F7 Cortex M7, 2048 FLASH, 512K (368+16+128) Kb SRAM + +config ARCH_CHIP_STM32F779BI + bool "STM32F779BI" + select STM32F7_STM32F779XX + select STM32F7_FLASH_CONFIG_I + select STM32F7_IO_CONFIG_B + ---help--- + STM32 F7 Cortex M7, 2048 FLASH, 512K (368+16+128) Kb SRAM + +config ARCH_CHIP_STM32F779AI + bool "STM32F779AI" + select STM32F7_STM32F779XX + select STM32F7_FLASH_CONFIG_I + select STM32F7_IO_CONFIG_A + ---help--- + STM32 F7 Cortex M7, 2048 FLASH, 512K (368+16+128) Kb SRAM + +endchoice # STM32 F7 Chip Selection + +config STM32F7_STM32F74XX + bool default n - select USBHOST_HAVE_ASYNCH if USBHOST -config STM32F7_QUADSPI - bool "QuadSPI" +config STM32F7_STM32F75XX + bool default n -config STM32F7_SAI1 -config STM32F7_RNG - bool "RNG" +config STM32F7_STM32F76XX + bool default n - select ARCH_HAVE_RNG -config STM32F7_SAI1 - bool "SAI1" +config STM32F7_STM32F77XX + bool default n - select STM32F7_SAI -config STM32F7_SAI2 - bool "SAI2" +config STM32F7_IO_CONFIG_V + bool default n - select STM32F7_SAI -config STM32F7_SDMMC1 - bool "SDMMC1" +config STM32F7_IO_CONFIG_I + bool default n - select ARCH_HAVE_SDIO -config STM32F7_SPDIFRX - bool "SPDIFRX" +config STM32F7_IO_CONFIG_Z + bool default n -config STM32F7_SPI1 - bool "SPI1" +config STM32F7_IO_CONFIG_N + bool default n - select SPI - select STM32F7_SPI -config STM32F7_SPI2 - bool "SPI2" +config STM32F7_IO_CONFIG_B + bool default n - select SPI - select STM32F7_SPI -config STM32F7_SPI3 - bool "SPI3" +config STM32F7_IO_CONFIG_A + bool default n - select SPI - select STM32F7_SPI -config STM32F7_SPI4 - bool "SPI4" +config STM32F7_STM32F745XX + bool default n - select SPI - select STM32F7_SPI + select STM32F7_STM32F74XX + select ARCH_HAVE_FPU + select ARMV7M_HAVE_ICACHE + select ARMV7M_HAVE_DCACHE + select ARMV7M_HAVE_ITCM + select ARMV7M_HAVE_DTCM + select STM32F7_HAVE_FSMC + select STM32F7_HAVE_ETHRNET + select STM32F7_HAVE_RNG + select STM32F7_HAVE_SPI5 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_SPI6 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_DCMI + select STM32F7_HAVE_DMA2D + +config STM32F7_STM32F746XX + bool + default n + select STM32F7_STM32F74XX + select ARCH_HAVE_FPU + select ARMV7M_HAVE_ICACHE + select ARMV7M_HAVE_DCACHE + select ARMV7M_HAVE_ITCM + select ARMV7M_HAVE_DTCM + select STM32F7_HAVE_FSMC + select STM32F7_HAVE_ETHRNET + select STM32F7_HAVE_RNG + select STM32F7_HAVE_SPI5 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_SPI6 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_DCMI + select STM32F7_HAVE_LTDC + select STM32F7_HAVE_DMA2D -config STM32F7_SPI5 - bool "SPI5" +config STM32F7_STM32F756XX + bool default n - select SPI - select STM32F7_SPI + select STM32F7_STM32F75XX + select ARCH_HAVE_FPU + select ARMV7M_HAVE_ICACHE + select ARMV7M_HAVE_DCACHE + select ARMV7M_HAVE_ITCM + select ARMV7M_HAVE_DTCM + select STM32F7_HAVE_FSMC + select STM32F7_HAVE_ETHRNET + select STM32F7_HAVE_RNG + select STM32F7_HAVE_SPI5 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_SPI6 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_LTDC + select STM32F7_HAVE_DMA2D + select STM32F7_HAVE_CRYP + select STM32F7_HAVE_HASH -config STM32F7_SPI6 - bool "SPI6" +config STM32F7_STM32F765XX + bool default n - select SPI - select STM32F7_SPI + select STM32F7_STM32F76XX + select ARCH_HAVE_FPU + select ARCH_HAVE_DPFPU + select ARMV7M_HAVE_ICACHE + select ARMV7M_HAVE_DCACHE + select ARMV7M_HAVE_ITCM + select ARMV7M_HAVE_DTCM + select STM32F7_HAVE_FSMC + select STM32F7_HAVE_ETHRNET + select STM32F7_HAVE_RNG # data sheet says yes, Product matix says no + select STM32F7_HAVE_SPI5 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_SPI6 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_SDMMC2 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_CAN3 + select STM32F7_HAVE_DCMI + select STM32F7_HAVE_DMA2D + select STM32F7_HAVE_DFSDM1 + +config STM32F7_STM32F767XX + bool + default n + select STM32F7_STM32F76XX + select ARCH_HAVE_FPU + select ARCH_HAVE_DPFPU + select ARMV7M_HAVE_ICACHE + select ARMV7M_HAVE_DCACHE + select ARMV7M_HAVE_ITCM + select ARMV7M_HAVE_DTCM + select STM32F7_HAVE_FSMC + select STM32F7_HAVE_ETHRNET + select STM32F7_HAVE_RNG + select STM32F7_HAVE_SPI5 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_SPI6 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_SDMMC2 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_CAN3 + select STM32F7_HAVE_DCMI + select STM32F7_HAVE_DSIHOST if !(STM32F7_IO_CONFIG_V || STM32F7_IO_CONFIG_Z) + select STM32F7_HAVE_LTDC + select STM32F7_HAVE_DMA2D + select STM32F7_HAVE_JPEG + select STM32F7_HAVE_DFSDM1 -config STM32F7_TIM1 - bool "TIM1" +config STM32F7_STM32F768XX # Revisit Wehn parts released + bool default n + select STM32F7_STM32F76XX + select ARCH_HAVE_FPU + select ARCH_HAVE_DPFPU + select ARMV7M_HAVE_ICACHE + select ARMV7M_HAVE_DCACHE + select ARMV7M_HAVE_ITCM + select ARMV7M_HAVE_DTCM + select STM32F7_HAVE_FSMC + select STM32F7_HAVE_ETHRNET + select STM32F7_HAVE_RNG + select STM32F7_HAVE_SPI5 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_SPI6 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_SDMMC2 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_CAN3 + select STM32F7_HAVE_DCMI + select STM32F7_HAVE_DSIHOST if !(STM32F7_IO_CONFIG_V || STM32F7_IO_CONFIG_Z) + select STM32F7_HAVE_LTDC + select STM32F7_HAVE_DMA2D + select STM32F7_HAVE_JPEG + select STM32F7_HAVE_DFSDM1 -config STM32F7_TIM2 - bool "TIM2" +config STM32F7_STM32F768AX # Revisit When parts released + bool default n + select STM32F7_STM32F76XX + select ARCH_HAVE_FPU + select ARCH_HAVE_DPFPU + select ARMV7M_HAVE_ICACHE + select ARMV7M_HAVE_DCACHE + select ARMV7M_HAVE_ITCM + select ARMV7M_HAVE_DTCM + select STM32F7_HAVE_FSMC + select STM32F7_HAVE_RNG + select STM32F7_HAVE_SPI5 + select STM32F7_HAVE_SPI6 + select STM32F7_HAVE_SDMMC2 + select STM32F7_HAVE_CAN3 + select STM32F7_HAVE_DCMI + select STM32F7_HAVE_DSIHOST + select STM32F7_HAVE_LTDC + select STM32F7_HAVE_DMA2D + select STM32F7_HAVE_JPEG + select STM32F7_HAVE_DFSDM1 -config STM32F7_TIM3 - bool "TIM3" +config STM32F7_STM32F769XX + bool default n + select STM32F7_STM32F76XX + select ARCH_HAVE_FPU + select ARCH_HAVE_DPFPU + select ARMV7M_HAVE_ICACHE + select ARMV7M_HAVE_DCACHE + select ARMV7M_HAVE_ITCM + select ARMV7M_HAVE_DTCM + select STM32F7_HAVE_FSMC + select STM32F7_HAVE_ETHRNET + select STM32F7_HAVE_RNG + select STM32F7_HAVE_SPI5 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_SPI6 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_SDMMC2 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_CAN3 + select STM32F7_HAVE_DCMI + select STM32F7_HAVE_DSIHOST if !(STM32F7_IO_CONFIG_V || STM32F7_IO_CONFIG_Z) + select STM32F7_HAVE_LTDC + select STM32F7_HAVE_DMA2D + select STM32F7_HAVE_JPEG + select STM32F7_HAVE_DFSDM1 -config STM32F7_TIM4 - bool "TIM4" +config STM32F7_STM32F769AX # Revisit When parts released + bool default n + select STM32F7_STM32F76XX + select ARCH_HAVE_FPU + select ARCH_HAVE_DPFPU + select ARMV7M_HAVE_ICACHE + select ARMV7M_HAVE_DCACHE + select ARMV7M_HAVE_ITCM + select ARMV7M_HAVE_DTCM + select STM32F7_HAVE_FSMC + select STM32F7_HAVE_RNG + select STM32F7_HAVE_SPI5 + select STM32F7_HAVE_SPI6 + select STM32F7_HAVE_SDMMC2 + select STM32F7_HAVE_CAN3 + select STM32F7_HAVE_DCMI + select STM32F7_HAVE_DSIHOST + select STM32F7_HAVE_LTDC + select STM32F7_HAVE_DMA2D + select STM32F7_HAVE_JPEG + select STM32F7_HAVE_DFSDM1 -config STM32F7_TIM5 - bool "TIM5" +config STM32F7_STM32F777XX + bool default n + select STM32F7_STM32F77XX + select ARCH_HAVE_FPU + select ARCH_HAVE_DPFPU + select ARMV7M_HAVE_ICACHE + select ARMV7M_HAVE_DCACHE + select ARMV7M_HAVE_ITCM + select ARMV7M_HAVE_DTCM + select STM32F7_HAVE_FSMC + select STM32F7_HAVE_ETHRNET + select STM32F7_HAVE_RNG + select STM32F7_HAVE_SPI5 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_SPI6 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_SDMMC2 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_CAN3 + select STM32F7_HAVE_DCMI + select STM32F7_HAVE_DSIHOST if !(STM32F7_IO_CONFIG_V || STM32F7_IO_CONFIG_Z) + select STM32F7_HAVE_LTDC + select STM32F7_HAVE_DMA2D + select STM32F7_HAVE_JPEG + select STM32F7_HAVE_CRYP + select STM32F7_HAVE_HASH + select STM32F7_HAVE_DFSDM1 -config STM32F7_TIM6 - bool "TIM6" +config STM32F7_STM32F778XX # Revisit when parts released + bool default n + select STM32F7_STM32F77XX + select ARCH_HAVE_FPU + select ARCH_HAVE_DPFPU + select ARMV7M_HAVE_ICACHE + select ARMV7M_HAVE_DCACHE + select ARMV7M_HAVE_ITCM + select ARMV7M_HAVE_DTCM + select STM32F7_HAVE_FSMC + select STM32F7_HAVE_ETHRNET + select STM32F7_HAVE_RNG + select STM32F7_HAVE_SPI5 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_SPI6 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_SDMMC2 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_CAN3 + select STM32F7_HAVE_DCMI + select STM32F7_HAVE_DSIHOST + select STM32F7_HAVE_LTDC + select STM32F7_HAVE_DMA2D + select STM32F7_HAVE_JPEG + select STM32F7_HAVE_CRYP + select STM32F7_HAVE_HASH + select STM32F7_HAVE_DFSDM1 -config STM32F7_TIM7 - bool "TIM7" +config STM32F7_STM32F778AX + bool default n + select STM32F7_STM32F77XX + select ARCH_HAVE_FPU + select ARCH_HAVE_DPFPU + select ARMV7M_HAVE_ICACHE + select ARMV7M_HAVE_DCACHE + select ARMV7M_HAVE_ITCM + select ARMV7M_HAVE_DTCM + select STM32F7_HAVE_FSMC + select STM32F7_HAVE_RNG + select STM32F7_HAVE_SPI5 + select STM32F7_HAVE_SPI6 + select STM32F7_HAVE_SDMMC2 + select STM32F7_HAVE_CAN3 + select STM32F7_HAVE_DCMI + select STM32F7_HAVE_DSIHOST + select STM32F7_HAVE_LTDC + select STM32F7_HAVE_DMA2D + select STM32F7_HAVE_JPEG + select STM32F7_HAVE_CRYP + select STM32F7_HAVE_HASH + select STM32F7_HAVE_DFSDM1 -config STM32F7_TIM8 - bool "TIM8" +config STM32F7_STM32F779XX + bool + default n + select STM32F7_STM32F77XX + select ARCH_HAVE_FPU + select ARCH_HAVE_DPFPU + select ARMV7M_HAVE_ICACHE + select ARMV7M_HAVE_DCACHE + select ARMV7M_HAVE_ITCM + select ARMV7M_HAVE_DTCM + select STM32F7_HAVE_FSMC + select STM32F7_HAVE_ETHRNET + select STM32F7_HAVE_RNG + select STM32F7_HAVE_SPI5 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_SPI6 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_SDMMC2 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_CAN3 + select STM32F7_HAVE_DCMI + select STM32F7_HAVE_DSIHOST if !(STM32F7_IO_CONFIG_V || STM32F7_IO_CONFIG_Z) + select STM32F7_HAVE_LTDC + select STM32F7_HAVE_DMA2D + select STM32F7_HAVE_JPEG + select STM32F7_HAVE_CRYP + select STM32F7_HAVE_HASH + select STM32F7_HAVE_DFSDM1 + +config STM32F7_STM32F779AX + bool default n + select STM32F7_STM32F77XX + select ARCH_HAVE_FPU + select ARCH_HAVE_DPFPU + select ARMV7M_HAVE_ICACHE + select ARMV7M_HAVE_DCACHE + select ARMV7M_HAVE_ITCM + select ARMV7M_HAVE_DTCM + select STM32F7_HAVE_FSMC + select STM32F7_HAVE_RNG + select STM32F7_HAVE_SPI5 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_SPI6 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_SDMMC2 if !STM32F7_IO_CONFIG_V + select STM32F7_HAVE_CAN3 + select STM32F7_HAVE_DCMI + select STM32F7_HAVE_DSIHOST if !(STM32F7_IO_CONFIG_V || STM32F7_IO_CONFIG_Z) + select STM32F7_HAVE_LTDC + select STM32F7_HAVE_DMA2D + select STM32F7_HAVE_JPEG + select STM32F7_HAVE_CRYP + select STM32F7_HAVE_HASH + select STM32F7_HAVE_DFSDM1 -config STM32F7_TIM9 - bool "TIM9" +config STM32F7_FLASH_CONFIG_E + bool default n -config STM32F7_TIM10 - bool "TIM10" +config STM32F7_FLASH_CONFIG_I + bool default n -config STM32F7_TIM11 - bool "TIM11" +config STM32F7_FLASH_CONFIG_I + bool default n -config STM32F7_TIM12 - bool "TIM12" +choice + prompt "Overrdide Flash Size Designator" + depends on ARCH_CHIP_STM32F7 + default STM32F7_FLASH_OVERRIDE_DEFAULT + ---help--- + STM32F7 series parts numbering (sans the package type) ends with a letter + that designates the FLASH size. + + Designator Size in KiB + E 512 + G 1024 + I 2048 + + This configuration option defaults to using the configuration based on that designator + or the default smaller size if there is no last character designator is present in the + STM32 Chip Selection. + + Examples: + If the STM32F745VE is chosen, the Flash configuration would be 'E', if a variant of + the part with a 2048 KiB Flash is released in the future one could simply select + the 'I' designator here. + + If an STM32F7xxx Series parts is chosen the default Flash configuration will be set + herein and can be changed. + +config STM32F7_FLASH_OVERRIDE_DEFAULT + bool "Default" + +config STM32F7_FLASH_OVERRIDE_E + bool "E 512KiB" + +config STM32F7_FLASH_OVERRIDE_G + bool "G 1024KiB" + +config STM32F7_FLASH_OVERRIDE_I + bool "I 2048KiB" + +endchoice # "Overrdide Flash Size Designator" + +menu "STM32 Peripheral Support" + +# These "hidden" settings determine is a peripheral option is available for the +# selection MCU + +config STM32F7_HAVE_LTDC + bool default n -config STM32F7_TIM13 - bool "TIM13" +config STM32F7_HAVE_FSMC + bool default n -config STM32F7_TIM14 - bool "TIM14" + +config STM32F7_HAVE_ETHRNET + bool default n -config STM32F7_TIM15 - bool "TIM15" +config STM32F7_HAVE_RNG + bool default n -config STM32F7_USART1 - bool "USART1" +config STM32F7_HAVE_SPI5 + bool default n - select USART1_SERIALDRIVER - select ARCH_HAVE_SERIAL_TERMIOS - select STM32F7_USART -config STM32F7_USART2 - bool "USART2" +config STM32F7_HAVE_SPI6 + bool default n - select USART2_SERIALDRIVER - select ARCH_HAVE_SERIAL_TERMIOS - select STM32F7_USART -config STM32F7_USART3 - bool "USART3" +config STM32F7_HAVE_SDMMC2 + bool default n - select ARCH_HAVE_SERIAL_TERMIOS - select USART3_SERIALDRIVER - select STM32F7_USART -config STM32F7_UART4 - bool "UART4" +config STM32F7_HAVE_ADC1_DMA + bool default n - select ARCH_HAVE_SERIAL_TERMIOS - select UART4_SERIALDRIVER - select STM32F7_USART -config STM32F7_UART5 - bool "UART5" +config STM32F7_HAVE_ADC2_DMA + bool default n - select ARCH_HAVE_SERIAL_TERMIOS - select UART5_SERIALDRIVER - select STM32F7_USART -config STM32F7_USART6 - bool "USART6" +config STM32F7_HAVE_ADC3_DMA + bool default n - select ARCH_HAVE_SERIAL_TERMIOS - select USART6_SERIALDRIVER - select STM32F7_USART -config STM32F7_UART7 - bool "UART7" - default n - select ARCH_HAVE_SERIAL_TERMIOS - select UART7_SERIALDRIVER - select STM32F7_USART -config STM32F7_UART8 - bool "UART8" +config STM32F7_HAVE_CAN3 + bool + default n + +config STM32F7_HAVE_DCMI + bool + default n + +config STM32F7_HAVE_DSIHOST + bool + default n + +config STM32F7_HAVE_LTDC + bool + default n + +config STM32F7_HAVE_DMA2D + bool + default n + +config STM32F7_HAVE_JPEG + bool + default n + +config STM32F7_HAVE_CRYP + bool + default n + +config STM32F7_HAVE_HASH + bool + default n + +config STM32F7_HAVE_DFSDM1 + bool + default n + +# These "hidden" settings are the OR of individual peripheral selections +# indicating that the general capabilitiy is required. + +config STM32F7_ADC + bool + default n + +config STM32F7_CAN + bool + default n + +config STM32F7_DAC + bool + default n + +config STM32F7_DMA + bool + default n + +config STM32F7_I2C + bool + default n + +config STM32F7_SAI + bool + default n + +config STM32F7_SPI + bool + default n + +config STM32F7_TIM + bool + default n + +config STM32F7_USART + bool + default n + +# These are the peripheral selections proper + + +config STM32F7_ADC1 + bool "ADC1" + default n + select STM32F7_ADC + select STM32F7_HAVE_ADC1_DMA if STM32F7_DMA1 + select STM32F7_HAVE_ADC1_DMA if STM32F7_DMA2 + +config STM32F7_ADC2 + bool "ADC2" + default n + select STM32F7_ADC + select STM32F7_HAVE_ADC2_DMA if STM32F7_DMA2 + +config STM32F7_ADC3 + bool "ADC3" + default n + select STM32F7_ADC + select STM32F7_HAVE_ADC1_DMA if STM32F7_DMA1 + select STM32F7_HAVE_ADC1_DMA if STM32F7_DMA2 + +config STM32F7_BKPSRAM + bool "Enable BKP RAM Domain" + default n + +config STM32F7_CAN1 + bool "CAN1" + default n + select CAN + select STM32F7_CAN + +config STM32F7_CAN2 + bool "CAN2" + default n + select CAN + select STM32F7_CAN + +config STM32F7_CAN3 + bool "CAN3" + default n + select CAN + select STM32F7_CAN + depends on STM32F7_HAVE_CAN3 + +config STM32F7_CEC + bool "CEC" + default n + depends on STM32F7_VALUELINE + +config STM32F7_CRC + bool "CRC" + default n + +config STM32F7_CRYP + bool "CRYP" + depends on STM32F7_HAVE_CRYP + default n + +config STM32F7_DFSDM1 + bool "DFSDM1" + default n + depends on STM32F7_HAVE_DFSDM1 + select ARCH_HAVE_DFSDM1 + +config STM32F7_DMA1 + bool "DMA1" + default n + select STM32F7_DMA + select ARCH_DMA + +config STM32F7_DMA2 + bool "DMA2" + default n + select STM32F7_DMA + select ARCH_DMA + +config STM32F7_DAC1 + bool "DAC1" + default n + select STM32F7_DAC + +config STM32F7_DAC2 + bool "DAC2" + default n + select STM32F7_DAC + +config STM32F7_DCMI + bool "DCMI" + default n + depends on STM32F7_HAVE_DCMI + ---help--- + The devices embed a camera interface that can connect with camera + modules and CMOS sensors through an 8-bit to 14-bit parallel interface, + to receive video data. + +config STM32F7_DSIHOST + bool "DSIHOST" + default n + depends on STM32F7_HAVE_DSIHOST + ---help--- + The DSI Host is a dedicated peripheral for interfacing with MIPI® DSI + compliant displays. + +config STM32F7_DMA2D + bool "DMA2D" + default n + depends on STM32F7_HAVE_DMA2D + ---help--- + The STM32 DMA2D is an Chrom-Art Accelerator for image manipulation + available on the STM32 F7 devices. + +config STM32F7_JPEG + bool "JPEG" + default n + depends on STM32F7_HAVE_JPEG + ---help--- + The JPEG codec provides an fast and simple hardware compressor and + decompressor of JPEG images with full management of JPEG headers. + +config STM32F7_ETHMAC + bool "Ethernet MAC" + default n + depends on STM32F7_HAVE_ETHRNET + select NETDEVICES + select ARCH_HAVE_PHY + +config STM32F7_FSMC + bool "FSMC" + depends on STM32F7_HAVE_FSMC + default n + +config STM32F7_HASH + bool "HASH" + default n + depends on STM32F7_HAVE_HASH + select ARCH_HAVE_HASH + +config STM32F7_CEC + bool "HDMI-CEC" + default n + +config STM32F7_I2C1 + bool "I2C1" + default n + select STM32F7_I2C + +config STM32F7_I2C2 + bool "I2C2" + default n + select STM32F7_I2C + +config STM32F7_I2C3 + bool "I2C3" + default n + select STM32F7_I2C + +config STM32F7_I2C4 + bool "I2C4" + default n + select STM32F7_I2C + +config STM32F7_LPTIM1 + bool "Low-power timer 1" + default n + +config STM32F7_LTDC + bool "LTDC" + default n + depends on STM32F7_HAVE_LTDC + ---help--- + The STM32 LTDC is an LCD-TFT Display Controller available on + the STM32F429 and STM32F439 devices. It is a standard parallel + video interface (HSYNC, VSYNC, etc.) for controlling TFT + LCD displays. + +config STM32F7_OTGFS + bool "OTG FS" + default n + select USBHOST_HAVE_ASYNCH if USBHOST + +config STM32F7_OTGHS + bool "OTG HS" + default n + select USBHOST_HAVE_ASYNCH if USBHOST + +config STM32F7_QUADSPI + bool "QuadSPI" + default n + +config STM32F7_RNG + bool "RNG" + default n + depends on STM32F7_HAVE_RNG + select ARCH_HAVE_RNG + +config STM32F7_SAI1 + bool "SAI1" + default n + select STM32F7_SAI + +config STM32F7_SAI2 + bool "SAI2" + default n + select STM32F7_SAI + +config STM32F7_SDMMC1 + bool "SDMMC1" + default n + select ARCH_HAVE_SDIO + +config STM32F7_SDMMC2 + bool "SDMMC2" + default n + depends on STM32F7_HAVE_SDMMC2 + select ARCH_HAVE_SDIO + +config STM32F7_SPDIFRX + bool "SPDIFRX" + default n + +config STM32F7_SPI1 + bool "SPI1" + default n + select SPI + select STM32F7_SPI + +config STM32F7_SPI2 + bool "SPI2" + default n + select SPI + select STM32F7_SPI + +config STM32F7_SPI3 + bool "SPI3" + default n + select SPI + select STM32F7_SPI + +config STM32F7_SPI4 + bool "SPI4" + default n + select SPI + select STM32F7_SPI + +config STM32F7_SPI5 + bool "SPI5" + default n + depends on STM32F7_HAVE_SPI5 + select SPI + select STM32F7_SPI + +config STM32F7_SPI6 + bool "SPI6" + default n + depends on STM32F7_HAVE_SPI6 + select SPI + select STM32F7_SPI + +config STM32F7_TIM1 + bool "TIM1" + default n + select STM32F7_TIM + +config STM32F7_TIM2 + bool "TIM2" + default n + select STM32F7_TIM + +config STM32F7_TIM3 + bool "TIM3" + default n + select STM32F7_TIM + +config STM32F7_TIM4 + bool "TIM4" + default n + select STM32F7_TIM + +config STM32F7_TIM5 + bool "TIM5" + default n + select STM32F7_TIM + +config STM32F7_TIM6 + bool "TIM6" + default n + select STM32F7_TIM + +config STM32F7_TIM7 + bool "TIM7" + default n + select STM32F7_TIM + +config STM32F7_TIM8 + bool "TIM8" + default n + select STM32F7_TIM + +config STM32F7_TIM9 + bool "TIM9" + default n + select STM32F7_TIM + +config STM32F7_TIM10 + bool "TIM10" + default n + select STM32F7_TIM + +config STM32F7_TIM11 + bool "TIM11" + default n + select STM32F7_TIM + +config STM32F7_TIM12 + bool "TIM12" + default n + select STM32F7_TIM + +config STM32F7_TIM13 + bool "TIM13" + default n + select STM32F7_TIM + +config STM32F7_TIM14 + bool "TIM14" + default n + select STM32F7_TIM + +config STM32F7_USART1 + bool "USART1" + default n + select USART1_SERIALDRIVER + select ARCH_HAVE_SERIAL_TERMIOS + select STM32F7_USART + +config STM32F7_USART2 + bool "USART2" + default n + select USART2_SERIALDRIVER + select ARCH_HAVE_SERIAL_TERMIOS + select STM32F7_USART + +config STM32F7_USART3 + bool "USART3" + default n + select ARCH_HAVE_SERIAL_TERMIOS + select USART3_SERIALDRIVER + select STM32F7_USART + +config STM32F7_UART4 + bool "UART4" + default n + select ARCH_HAVE_SERIAL_TERMIOS + select UART4_SERIALDRIVER + select STM32F7_USART + +config STM32F7_UART5 + bool "UART5" + default n + select ARCH_HAVE_SERIAL_TERMIOS + select UART5_SERIALDRIVER + select STM32F7_USART + +config STM32F7_USART6 + bool "USART6" + default n + select ARCH_HAVE_SERIAL_TERMIOS + select USART6_SERIALDRIVER + select STM32F7_USART + +config STM32F7_UART7 + bool "UART7" + default n + select ARCH_HAVE_SERIAL_TERMIOS + select UART7_SERIALDRIVER + select STM32F7_USART + +config STM32F7_UART8 + bool "UART8" + default n + select ARCH_HAVE_SERIAL_TERMIOS + select UART8_SERIALDRIVER + select STM32F7_USART + +config STM32F7_IWDG + bool "IWDG" + default n + select WATCHDOG + +config STM32F7_WWDG + bool "WWDG" + default n + select WATCHDOG + +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 + +menu "SPI Configuration" + depends on STM32F7_SPI + +config STM32F7_SPI_INTERRUPTS + bool "Interrupt driver SPI" + default n + ---help--- + 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 STM32F7_SPI_DMA + bool "SPI DMA" + default n + ---help--- + Use DMA to improve SPI transfer performance. Cannot be used with STM32F7_SPI_INTERRUPT. + +endmenu # "SPI Configuration" + +menu "I2C Configuration" + depends on STM32F7_I2C + +config STM32F7_I2C_DYNTIMEO + bool "Use dynamic timeouts" + default n + depends on STM32F7_I2C + +config STM32F7_I2C_DYNTIMEO_USECPERBYTE + int "Timeout Microseconds per Byte" + default 500 + depends on STM32F7_I2C_DYNTIMEO + +config STM32F7_I2C_DYNTIMEO_STARTSTOP + int "Timeout for Start/Stop (Milliseconds)" + default 1000 + depends on STM32F7_I2C_DYNTIMEO + +config STM32F7_I2CTIMEOSEC + int "Timeout seconds" + default 0 + depends on STM32F7_I2C + +config STM32F7_I2CTIMEOMS + int "Timeout Milliseconds" + default 500 + depends on STM32F7_I2C && !STM32F7_I2C_DYNTIMEO + +config STM32F7_I2CTIMEOTICKS + int "Timeout for Done and Stop (ticks)" + default 500 + depends on STM32F7_I2C && !STM32F7_I2C_DYNTIMEO + +config STM32F7_I2C_DUTY16_9 + bool "Frequency with Tlow/Thigh = 16/9 " + default n + depends on STM32F7_I2C + +endmenu # "I2C Configuration" + +config STM32F7_CUSTOM_CLOCKCONFIG + bool "Custom clock configuration" + default n + ---help--- + Enables special, board-specific STM32 clock configuration. + +config STM32F7_DTCM_PROCFS + bool "DTCM SRAM PROCFS support" + default n + depends on ARMV7M_DTCM && FS_PROCFS + ---help--- + Select to build in support for /proc/dtcm. Reading from /proc/dtcm + will provide statistics about DTCM memory use similar to what you + would get from mallinfo() for the user heap. + +config STM32F7_DMACAPABLE + bool "Workaround non-DMA capable memory" + depends on ARCH_DMA + default y if !STM32F7_CCMEXCLUDE + default n if STM32F7_CCMEXCLUDE + ---help--- + This option enables the DMA interface stm32_dmacapable that can be + used to check if it is possible to do DMA from the selected address. + Drivers then may use this information to determine if they should + attempt the DMA or fall back to a different transfer method. + +menu "Timer Configuration" + +config STM32F7_TIM1_PWM + bool "TIM1 PWM" + default n + depends on STM32F7_TIM1 + select ARCH_HAVE_PWM_PULSECOUNT + ---help--- + Reserve timer 1 for use by PWM + + Timer devices may be used for different purposes. One special purpose is + to generate modulated outputs for such things as motor control. If STM32F7_TIM1 + is defined then THIS following may also be defined to indicate that + the timer is intended to be used for pulsed output modulation. + +if STM32F7_TIM1_PWM + +config STM32F7_TIM1_MODE + int "TIM1 Mode" + default 0 + range 0 4 + ---help--- + Specifies the timer mode. + +if STM32F7_PWM_MULTICHAN + +config STM32F7_TIM1_CHANNEL1 + bool "TIM1 Channel 1" + default n + ---help--- + Enables channel 1. + +if STM32F7_TIM1_CHANNEL1 + +config STM32F7_TIM1_CH1MODE + int "TIM1 Channel 1 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM1_CH1OUT + bool "TIM1 Channel 1 Output" + default n + ---help--- + Enables channel 1 output. + +endif # STM32F7_TIM1_CHANNEL1 + +config STM32F7_TIM1_CHANNEL2 + bool "TIM1 Channel 2" + default n + ---help--- + Enables channel 2. + +if STM32F7_TIM1_CHANNEL2 + +config STM32F7_TIM1_CH2MODE + int "TIM1 Channel 2 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM1_CH2OUT + bool "TIM1 Channel 2 Output" + default n + ---help--- + Enables channel 2 output. + +endif # STM32F7_TIM1_CHANNEL2 + +config STM32F7_TIM1_CHANNEL3 + bool "TIM1 Channel 3" + default n + ---help--- + Enables channel 3. + +if STM32F7_TIM1_CHANNEL3 + +config STM32F7_TIM1_CH3MODE + int "TIM1 Channel 3 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM1_CH3OUT + bool "TIM1 Channel 3 Output" + default n + ---help--- + Enables channel 3 output. + +endif # STM32F7_TIM1_CHANNEL3 + +config STM32F7_TIM1_CHANNEL4 + bool "TIM1 Channel 4" + default n + ---help--- + Enables channel 4. + +if STM32F7_TIM1_CHANNEL4 + +config STM32F7_TIM1_CH4MODE + int "TIM1 Channel 4 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM1_CH4OUT + bool "TIM1 Channel 4 Output" + default n + ---help--- + Enables channel 4 output. + +endif # STM32F7_TIM1_CHANNEL4 + +endif # STM32F7_PWM_MULTICHAN + +if !STM32F7_PWM_MULTICHAN + +config STM32F7_TIM1_CHANNEL + int "TIM1 PWM Output Channel" + default 1 + range 1 4 + ---help--- + If TIM1 is enabled for PWM usage, you also need specifies the timer output + channel {1,..,4} + +config STM32F7_TIM1_CHMODE + int "TIM1 Channel Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +endif # !STM32F7_PWM_MULTICHAN + +endif # STM32F7_TIM1_PWM + +config STM32F7_TIM2_PWM + bool "TIM2 PWM" + default n + depends on STM32F7_TIM2 + select ARCH_HAVE_PWM_PULSECOUNT + ---help--- + Reserve timer 2 for use by PWM + + Timer devices may be used for different purposes. One special purpose is + to generate modulated outputs for such things as motor control. If STM32F7_TIM2 + is defined then THIS following may also be defined to indicate that + the timer is intended to be used for pulsed output modulation. + +if STM32F7_TIM2_PWM + +config STM32F7_TIM2_MODE + int "TIM2 Mode" + default 0 + range 0 4 + ---help--- + Specifies the timer mode. + +if STM32F7_PWM_MULTICHAN + +config STM32F7_TIM2_CHANNEL1 + bool "TIM2 Channel 1" + default n + ---help--- + Enables channel 1. + +if STM32F7_TIM2_CHANNEL1 + +config STM32F7_TIM2_CH1MODE + int "TIM2 Channel 1 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM2_CH1OUT + bool "TIM2 Channel 1 Output" + default n + ---help--- + Enables channel 1 output. + +endif # STM32F7_TIM2_CHANNEL1 + +config STM32F7_TIM2_CHANNEL2 + bool "TIM2 Channel 2" + default n + ---help--- + Enables channel 2. + +if STM32F7_TIM2_CHANNEL2 + +config STM32F7_TIM2_CH2MODE + int "TIM2 Channel 2 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM2_CH2OUT + bool "TIM2 Channel 2 Output" + default n + ---help--- + Enables channel 2 output. + +endif # STM32F7_TIM2_CHANNEL2 + +config STM32F7_TIM2_CHANNEL3 + bool "TIM2 Channel 3" + default n + ---help--- + Enables channel 3. + +if STM32F7_TIM2_CHANNEL3 + +config STM32F7_TIM2_CH3MODE + int "TIM2 Channel 3 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM2_CH3OUT + bool "TIM2 Channel 3 Output" + default n + ---help--- + Enables channel 3 output. + +endif # STM32F7_TIM2_CHANNEL3 + +config STM32F7_TIM2_CHANNEL4 + bool "TIM2 Channel 4" + default n + ---help--- + Enables channel 4. + +if STM32F7_TIM2_CHANNEL4 + +config STM32F7_TIM2_CH4MODE + int "TIM2 Channel 4 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM2_CH4OUT + bool "TIM2 Channel 4 Output" + default n + ---help--- + Enables channel 4 output. + +endif # STM32F7_TIM2_CHANNEL4 + +endif # STM32F7_PWM_MULTICHAN + +if !STM32F7_PWM_MULTICHAN + +config STM32F7_TIM2_CHANNEL + int "TIM2 PWM Output Channel" + default 1 + range 1 4 + ---help--- + If TIM2 is enabled for PWM usage, you also need specifies the timer output + channel {1,..,4} + +config STM32F7_TIM2_CHMODE + int "TIM2 Channel Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +endif # !STM32F7_PWM_MULTICHAN + +endif # STM32F7_TIM2_PWM + +config STM32F7_TIM3_PWM + bool "TIM3 PWM" + default n + depends on STM32F7_TIM3 + select ARCH_HAVE_PWM_PULSECOUNT + ---help--- + Reserve timer 3 for use by PWM + + Timer devices may be used for different purposes. One special purpose is + to generate modulated outputs for such things as motor control. If STM32F7_TIM3 + is defined then THIS following may also be defined to indicate that + the timer is intended to be used for pulsed output modulation. + +if STM32F7_TIM3_PWM + +config STM32F7_TIM3_MODE + int "TIM3 Mode" + default 0 + range 0 4 + ---help--- + Specifies the timer mode. + +if STM32F7_PWM_MULTICHAN + +config STM32F7_TIM3_CHANNEL1 + bool "TIM3 Channel 1" + default n + ---help--- + Enables channel 1. + +if STM32F7_TIM3_CHANNEL1 + +config STM32F7_TIM3_CH1MODE + int "TIM3 Channel 1 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM3_CH1OUT + bool "TIM3 Channel 1 Output" + default n + ---help--- + Enables channel 1 output. + +endif # STM32F7_TIM3_CHANNEL1 + +config STM32F7_TIM3_CHANNEL2 + bool "TIM3 Channel 2" + default n + ---help--- + Enables channel 2. + +if STM32F7_TIM3_CHANNEL2 + +config STM32F7_TIM3_CH2MODE + int "TIM3 Channel 2 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM3_CH2OUT + bool "TIM3 Channel 2 Output" + default n + ---help--- + Enables channel 2 output. + +endif # STM32F7_TIM3_CHANNEL2 + +config STM32F7_TIM3_CHANNEL3 + bool "TIM3 Channel 3" + default n + ---help--- + Enables channel 3. + +if STM32F7_TIM3_CHANNEL3 + +config STM32F7_TIM3_CH3MODE + int "TIM3 Channel 3 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM3_CH3OUT + bool "TIM3 Channel 3 Output" + default n + ---help--- + Enables channel 3 output. + +endif # STM32F7_TIM3_CHANNEL3 + +config STM32F7_TIM3_CHANNEL4 + bool "TIM3 Channel 4" + default n + ---help--- + Enables channel 4. + +if STM32F7_TIM3_CHANNEL4 + +config STM32F7_TIM3_CH4MODE + int "TIM3 Channel 4 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM3_CH4OUT + bool "TIM3 Channel 4 Output" + default n + ---help--- + Enables channel 4 output. + +endif # STM32F7_TIM3_CHANNEL4 + +endif # STM32F7_PWM_MULTICHAN + +if !STM32F7_PWM_MULTICHAN + +config STM32F7_TIM3_CHANNEL + int "TIM3 PWM Output Channel" + default 1 + range 1 4 + ---help--- + If TIM3 is enabled for PWM usage, you also need specifies the timer output + channel {1,..,4} + +config STM32F7_TIM3_CHMODE + int "TIM3 Channel Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +endif # !STM32F7_PWM_MULTICHAN + +endif # STM32F7_TIM3_PWM + +config STM32F7_TIM4_PWM + bool "TIM4 PWM" + default n + depends on STM32F7_TIM4 + select ARCH_HAVE_PWM_PULSECOUNT + ---help--- + Reserve timer 4 for use by PWM + + Timer devices may be used for different purposes. One special purpose is + to generate modulated outputs for such things as motor control. If STM32F7_TIM4 + is defined then THIS following may also be defined to indicate that + the timer is intended to be used for pulsed output modulation. + +if STM32F7_TIM4_PWM + +config STM32F7_TIM4_MODE + int "TIM4 Mode" + default 0 + range 0 4 + ---help--- + Specifies the timer mode. + +if STM32F7_PWM_MULTICHAN + +config STM32F7_TIM4_CHANNEL1 + bool "TIM4 Channel 1" + default n + ---help--- + Enables channel 1. + +if STM32F7_TIM4_CHANNEL1 + +config STM32F7_TIM4_CH1MODE + int "TIM4 Channel 1 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM4_CH1OUT + bool "TIM4 Channel 1 Output" + default n + ---help--- + Enables channel 1 output. + +endif # STM32F7_TIM4_CHANNEL1 + +config STM32F7_TIM4_CHANNEL2 + bool "TIM4 Channel 2" + default n + ---help--- + Enables channel 2. + +if STM32F7_TIM4_CHANNEL2 + +config STM32F7_TIM4_CH2MODE + int "TIM4 Channel 2 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM4_CH2OUT + bool "TIM4 Channel 2 Output" + default n + ---help--- + Enables channel 2 output. + +endif # STM32F7_TIM4_CHANNEL2 + +config STM32F7_TIM4_CHANNEL3 + bool "TIM4 Channel 3" + default n + ---help--- + Enables channel 3. + +if STM32F7_TIM4_CHANNEL3 + +config STM32F7_TIM4_CH3MODE + int "TIM4 Channel 3 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM4_CH3OUT + bool "TIM4 Channel 3 Output" + default n + ---help--- + Enables channel 3 output. + +endif # STM32F7_TIM4_CHANNEL3 + +config STM32F7_TIM4_CHANNEL4 + bool "TIM4 Channel 4" + default n + ---help--- + Enables channel 4. + +if STM32F7_TIM4_CHANNEL4 + +config STM32F7_TIM4_CH4MODE + int "TIM4 Channel 4 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM4_CH4OUT + bool "TIM4 Channel 4 Output" + default n + ---help--- + Enables channel 4 output. + +endif # STM32F7_TIM4_CHANNEL4 + +endif # STM32F7_PWM_MULTICHAN + +if !STM32F7_PWM_MULTICHAN + +config STM32F7_TIM4_CHANNEL + int "TIM4 PWM Output Channel" + default 1 + range 1 4 + ---help--- + If TIM4 is enabled for PWM usage, you also need specifies the timer output + channel {1,..,4} + +config STM32F7_TIM4_CHMODE + int "TIM4 Channel Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +endif # !STM32F7_PWM_MULTICHAN + +endif # STM32F7_TIM4_PWM + +config STM32F7_TIM5_PWM + bool "TIM5 PWM" + default n + depends on STM32F7_TIM5 + select ARCH_HAVE_PWM_PULSECOUNT + ---help--- + Reserve timer 5 for use by PWM + + Timer devices may be used for different purposes. One special purpose is + to generate modulated outputs for such things as motor control. If STM32F7_TIM5 + is defined then THIS following may also be defined to indicate that + the timer is intended to be used for pulsed output modulation. + +if STM32F7_TIM5_PWM + +config STM32F7_TIM5_MODE + int "TIM5 Mode" + default 0 + range 0 4 + ---help--- + Specifies the timer mode. + +if STM32F7_PWM_MULTICHAN + +config STM32F7_TIM5_CHANNEL1 + bool "TIM5 Channel 1" + default n + ---help--- + Enables channel 1. + +if STM32F7_TIM5_CHANNEL1 + +config STM32F7_TIM5_CH1MODE + int "TIM5 Channel 1 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM5_CH1OUT + bool "TIM5 Channel 1 Output" + default n + ---help--- + Enables channel 1 output. + +endif # STM32F7_TIM5_CHANNEL1 + +config STM32F7_TIM5_CHANNEL2 + bool "TIM5 Channel 2" + default n + ---help--- + Enables channel 2. + +if STM32F7_TIM5_CHANNEL2 + +config STM32F7_TIM5_CH2MODE + int "TIM5 Channel 2 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM5_CH2OUT + bool "TIM5 Channel 2 Output" + default n + ---help--- + Enables channel 2 output. + +endif # STM32F7_TIM5_CHANNEL2 + +config STM32F7_TIM5_CHANNEL3 + bool "TIM5 Channel 3" + default n + ---help--- + Enables channel 3. + +if STM32F7_TIM5_CHANNEL3 + +config STM32F7_TIM5_CH3MODE + int "TIM5 Channel 3 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM5_CH3OUT + bool "TIM5 Channel 3 Output" + default n + ---help--- + Enables channel 3 output. + +endif # STM32F7_TIM5_CHANNEL3 + +config STM32F7_TIM5_CHANNEL4 + bool "TIM5 Channel 4" + default n + ---help--- + Enables channel 4. + +if STM32F7_TIM5_CHANNEL4 + +config STM32F7_TIM5_CH4MODE + int "TIM5 Channel 4 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM5_CH4OUT + bool "TIM5 Channel 4 Output" + default n + ---help--- + Enables channel 4 output. + +endif # STM32F7_TIM5_CHANNEL4 + +endif # STM32F7_PWM_MULTICHAN + +if !STM32F7_PWM_MULTICHAN + +config STM32F7_TIM5_CHANNEL + int "TIM5 PWM Output Channel" + default 1 + range 1 4 + ---help--- + If TIM5 is enabled for PWM usage, you also need specifies the timer output + channel {1,..,4} + +config STM32F7_TIM5_CHMODE + int "TIM5 Channel Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +endif # !STM32F7_PWM_MULTICHAN + +endif # STM32F7_TIM5_PWM + +config STM32F7_TIM8_PWM + bool "TIM8 PWM" + default n + depends on STM32F7_TIM8 + select ARCH_HAVE_PWM_PULSECOUNT + ---help--- + Reserve timer 8 for use by PWM + + Timer devices may be used for different purposes. One special purpose is + to generate modulated outputs for such things as motor control. If STM32F7_TIM8 + is defined then THIS following may also be defined to indicate that + the timer is intended to be used for pulsed output modulation. + +if STM32F7_TIM8_PWM + +config STM32F7_TIM8_MODE + int "TIM8 Mode" + default 0 + range 0 4 + ---help--- + Specifies the timer mode. + +if STM32F7_PWM_MULTICHAN + +config STM32F7_TIM8_CHANNEL1 + bool "TIM8 Channel 1" + default n + ---help--- + Enables channel 1. + +if STM32F7_TIM8_CHANNEL1 + +config STM32F7_TIM8_CH1MODE + int "TIM8 Channel 1 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM8_CH1OUT + bool "TIM8 Channel 1 Output" + default n + ---help--- + Enables channel 1 output. + +endif # STM32F7_TIM8_CHANNEL1 + +config STM32F7_TIM8_CHANNEL2 + bool "TIM8 Channel 2" + default n + ---help--- + Enables channel 2. + +if STM32F7_TIM8_CHANNEL2 + +config STM32F7_TIM8_CH2MODE + int "TIM8 Channel 2 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM8_CH2OUT + bool "TIM8 Channel 2 Output" + default n + ---help--- + Enables channel 2 output. + +endif # STM32F7_TIM8_CHANNEL2 + +config STM32F7_TIM8_CHANNEL3 + bool "TIM8 Channel 3" + default n + ---help--- + Enables channel 3. + +if STM32F7_TIM8_CHANNEL3 + +config STM32F7_TIM8_CH3MODE + int "TIM8 Channel 3 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM8_CH3OUT + bool "TIM8 Channel 3 Output" + default n + ---help--- + Enables channel 3 output. + +endif # STM32F7_TIM8_CHANNEL3 + +config STM32F7_TIM8_CHANNEL4 + bool "TIM8 Channel 4" + default n + ---help--- + Enables channel 4. + +if STM32F7_TIM8_CHANNEL4 + +config STM32F7_TIM8_CH4MODE + int "TIM8 Channel 4 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM8_CH4OUT + bool "TIM8 Channel 4 Output" + default n + ---help--- + Enables channel 4 output. + +endif # STM32F7_TIM8_CHANNEL4 + +endif # STM32F7_PWM_MULTICHAN + +if !STM32F7_PWM_MULTICHAN + +config STM32F7_TIM8_CHANNEL + int "TIM8 PWM Output Channel" + default 1 + range 1 4 + ---help--- + If TIM8 is enabled for PWM usage, you also need specifies the timer output + channel {1,..,4} + +config STM32F7_TIM8_CHMODE + int "TIM8 Channel Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +endif # !STM32F7_PWM_MULTICHAN + +endif # STM32F7_TIM8_PWM + +config STM32F7_TIM9_PWM + bool "TIM9 PWM" + default n + depends on STM32F7_TIM9 + select ARCH_HAVE_PWM_PULSECOUNT + ---help--- + Reserve timer 9 for use by PWM + + Timer devices may be used for different purposes. One special purpose is + to generate modulated outputs for such things as motor control. If STM32F7_TIM9 + is defined then THIS following may also be defined to indicate that + the timer is intended to be used for pulsed output modulation. + +if STM32F7_TIM9_PWM + +if STM32F7_PWM_MULTICHAN + +config STM32F7_TIM9_CHANNEL1 + bool "TIM9 Channel 1" + default n + ---help--- + Enables channel 1. + +if STM32F7_TIM9_CHANNEL1 + +config STM32F7_TIM9_CH1MODE + int "TIM9 Channel 1 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM9_CH1OUT + bool "TIM9 Channel 1 Output" + default n + ---help--- + Enables channel 1 output. + +endif # STM32F7_TIM9_CHANNEL1 + +config STM32F7_TIM9_CHANNEL2 + bool "TIM9 Channel 2" + default n + ---help--- + Enables channel 2. + +if STM32F7_TIM9_CHANNEL2 + +config STM32F7_TIM9_CH2MODE + int "TIM9 Channel 2 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM9_CH2OUT + bool "TIM9 Channel 2 Output" + default n + ---help--- + Enables channel 2 output. + +endif # STM32F7_TIM9_CHANNEL2 + +config STM32F7_TIM9_CHANNEL3 + bool "TIM9 Channel 3" + default n + ---help--- + Enables channel 3. + +if STM32F7_TIM9_CHANNEL3 + +config STM32F7_TIM9_CH3MODE + int "TIM9 Channel 3 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM9_CH3OUT + bool "TIM9 Channel 3 Output" + default n + ---help--- + Enables channel 3 output. + +endif # STM32F7_TIM9_CHANNEL3 + +config STM32F7_TIM9_CHANNEL4 + bool "TIM9 Channel 4" + default n + ---help--- + Enables channel 4. + +if STM32F7_TIM9_CHANNEL4 + +config STM32F7_TIM9_CH4MODE + int "TIM9 Channel 4 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM9_CH4OUT + bool "TIM9 Channel 4 Output" + default n + ---help--- + Enables channel 4 output. + +endif # STM32F7_TIM9_CHANNEL4 + +endif # STM32F7_PWM_MULTICHAN + +if !STM32F7_PWM_MULTICHAN + +config STM32F7_TIM9_CHANNEL + int "TIM9 PWM Output Channel" + default 1 + range 1 4 + ---help--- + If TIM9 is enabled for PWM usage, you also need specifies the timer output + channel {1,..,4} + +config STM32F7_TIM9_CHMODE + int "TIM9 Channel Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +endif # !STM32F7_PWM_MULTICHAN + +endif # STM32F7_TIM9_PWM + +config STM32F7_TIM10_PWM + bool "TIM10 PWM" + default n + depends on STM32F7_TIM10 + select ARCH_HAVE_PWM_PULSECOUNT + ---help--- + Reserve timer 10 for use by PWM + + Timer devices may be used for different purposes. One special purpose is + to generate modulated outputs for such things as motor control. If STM32F7_TIM10 + is defined then THIS following may also be defined to indicate that + the timer is intended to be used for pulsed output modulation. + +if STM32F7_TIM10_PWM + +if STM32F7_PWM_MULTICHAN + +config STM32F7_TIM10_CHANNEL1 + bool "TIM10 Channel 1" + default n + ---help--- + Enables channel 1. + +if STM32F7_TIM10_CHANNEL1 + +config STM32F7_TIM10_CH1MODE + int "TIM10 Channel 1 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM10_CH1OUT + bool "TIM10 Channel 1 Output" + default n + ---help--- + Enables channel 1 output. + +endif # STM32F7_TIM10_CHANNEL1 + +config STM32F7_TIM10_CHANNEL2 + bool "TIM10 Channel 2" + default n + ---help--- + Enables channel 2. + +if STM32F7_TIM10_CHANNEL2 + +config STM32F7_TIM10_CH2MODE + int "TIM10 Channel 2 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM10_CH2OUT + bool "TIM10 Channel 2 Output" + default n + ---help--- + Enables channel 2 output. + +endif # STM32F7_TIM10_CHANNEL2 + +config STM32F7_TIM10_CHANNEL3 + bool "TIM10 Channel 3" + default n + ---help--- + Enables channel 3. + +if STM32F7_TIM10_CHANNEL3 + +config STM32F7_TIM10_CH3MODE + int "TIM10 Channel 3 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM10_CH3OUT + bool "TIM10 Channel 3 Output" + default n + ---help--- + Enables channel 3 output. + +endif # STM32F7_TIM10_CHANNEL3 + +config STM32F7_TIM10_CHANNEL4 + bool "TIM10 Channel 4" + default n + ---help--- + Enables channel 4. + +if STM32F7_TIM10_CHANNEL4 + +config STM32F7_TIM10_CH4MODE + int "TIM10 Channel 4 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM10_CH4OUT + bool "TIM10 Channel 4 Output" + default n + ---help--- + Enables channel 4 output. + +endif # STM32F7_TIM10_CHANNEL4 + +endif # STM32F7_PWM_MULTICHAN + +if !STM32F7_PWM_MULTICHAN + +config STM32F7_TIM10_CHANNEL + int "TIM10 PWM Output Channel" + default 1 + range 1 4 + ---help--- + If TIM10 is enabled for PWM usage, you also need specifies the timer output + channel {1,..,4} + +config STM32F7_TIM10_CHMODE + int "TIM10 Channel Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +endif # !STM32F7_PWM_MULTICHAN + +endif # STM32F7_TIM10_PWM + +config STM32F7_TIM11_PWM + bool "TIM11 PWM" + default n + depends on STM32F7_TIM11 + select ARCH_HAVE_PWM_PULSECOUNT + ---help--- + Reserve timer 11 for use by PWM + + Timer devices may be used for different purposes. One special purpose is + to generate modulated outputs for such things as motor control. If STM32F7_TIM11 + is defined then THIS following may also be defined to indicate that + the timer is intended to be used for pulsed output modulation. + +if STM32F7_TIM11_PWM + +if STM32F7_PWM_MULTICHAN + +config STM32F7_TIM11_CHANNEL1 + bool "TIM11 Channel 1" + default n + ---help--- + Enables channel 1. + +if STM32F7_TIM11_CHANNEL1 + +config STM32F7_TIM11_CH1MODE + int "TIM11 Channel 1 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM11_CH1OUT + bool "TIM11 Channel 1 Output" + default n + ---help--- + Enables channel 1 output. + +endif # STM32F7_TIM11_CHANNEL1 + +config STM32F7_TIM11_CHANNEL2 + bool "TIM11 Channel 2" + default n + ---help--- + Enables channel 2. + +if STM32F7_TIM11_CHANNEL2 + +config STM32F7_TIM11_CH2MODE + int "TIM11 Channel 2 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM11_CH2OUT + bool "TIM11 Channel 2 Output" + default n + ---help--- + Enables channel 2 output. + +endif # STM32F7_TIM11_CHANNEL2 + +config STM32F7_TIM11_CHANNEL3 + bool "TIM11 Channel 3" + default n + ---help--- + Enables channel 3. + +if STM32F7_TIM11_CHANNEL3 + +config STM32F7_TIM11_CH3MODE + int "TIM11 Channel 3 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM11_CH3OUT + bool "TIM11 Channel 3 Output" + default n + ---help--- + Enables channel 3 output. + +endif # STM32F7_TIM11_CHANNEL3 + +config STM32F7_TIM11_CHANNEL4 + bool "TIM11 Channel 4" + default n + ---help--- + Enables channel 4. + +if STM32F7_TIM11_CHANNEL4 + +config STM32F7_TIM11_CH4MODE + int "TIM11 Channel 4 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM11_CH4OUT + bool "TIM11 Channel 4 Output" + default n + ---help--- + Enables channel 4 output. + +endif # STM32F7_TIM11_CHANNEL4 + +endif # STM32F7_PWM_MULTICHAN + +if !STM32F7_PWM_MULTICHAN + +config STM32F7_TIM11_CHANNEL + int "TIM11 PWM Output Channel" + default 1 + range 1 4 + ---help--- + If TIM11 is enabled for PWM usage, you also need specifies the timer output + channel {1,..,4} + +config STM32F7_TIM11_CHMODE + int "TIM11 Channel Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +endif # !STM32F7_PWM_MULTICHAN + +endif # STM32F7_TIM11_PWM + +config STM32F7_TIM12_PWM + bool "TIM12 PWM" + default n + depends on STM32F7_TIM12 + select ARCH_HAVE_PWM_PULSECOUNT + ---help--- + Reserve timer 12 for use by PWM + + Timer devices may be used for different purposes. One special purpose is + to generate modulated outputs for such things as motor control. If STM32F7_TIM12 + is defined then THIS following may also be defined to indicate that + the timer is intended to be used for pulsed output modulation. + +if STM32F7_TIM12_PWM + +if STM32F7_PWM_MULTICHAN + +config STM32F7_TIM12_CHANNEL1 + bool "TIM12 Channel 1" + default n + ---help--- + Enables channel 1. + +if STM32F7_TIM12_CHANNEL1 + +config STM32F7_TIM12_CH1MODE + int "TIM12 Channel 1 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM12_CH1OUT + bool "TIM12 Channel 1 Output" + default n + ---help--- + Enables channel 1 output. + +endif # STM32F7_TIM12_CHANNEL1 + +config STM32F7_TIM12_CHANNEL2 + bool "TIM12 Channel 2" + default n + ---help--- + Enables channel 2. + +if STM32F7_TIM12_CHANNEL2 + +config STM32F7_TIM12_CH2MODE + int "TIM12 Channel 2 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM12_CH2OUT + bool "TIM12 Channel 2 Output" + default n + ---help--- + Enables channel 2 output. + +endif # STM32F7_TIM12_CHANNEL2 + +config STM32F7_TIM12_CHANNEL3 + bool "TIM12 Channel 3" + default n + ---help--- + Enables channel 3. + +if STM32F7_TIM12_CHANNEL3 + +config STM32F7_TIM12_CH3MODE + int "TIM12 Channel 3 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM12_CH3OUT + bool "TIM12 Channel 3 Output" + default n + ---help--- + Enables channel 3 output. + +endif # STM32F7_TIM12_CHANNEL3 + +config STM32F7_TIM12_CHANNEL4 + bool "TIM12 Channel 4" + default n + ---help--- + Enables channel 4. + +if STM32F7_TIM12_CHANNEL4 + +config STM32F7_TIM12_CH4MODE + int "TIM12 Channel 4 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM12_CH4OUT + bool "TIM12 Channel 4 Output" + default n + ---help--- + Enables channel 4 output. + +endif # STM32F7_TIM12_CHANNEL4 + +endif # STM32F7_PWM_MULTICHAN + +if !STM32F7_PWM_MULTICHAN + +config STM32F7_TIM12_CHANNEL + int "TIM12 PWM Output Channel" + default 1 + range 1 4 + ---help--- + If TIM12 is enabled for PWM usage, you also need specifies the timer output + channel {1,..,4} + +config STM32F7_TIM12_CHMODE + int "TIM12 Channel Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +endif # !STM32F7_PWM_MULTICHAN + +endif # STM32F7_TIM12_PWM + +config STM32F7_TIM13_PWM + bool "TIM13 PWM" + default n + depends on STM32F7_TIM13 + select ARCH_HAVE_PWM_PULSECOUNT + ---help--- + Reserve timer 13 for use by PWM + + Timer devices may be used for different purposes. One special purpose is + to generate modulated outputs for such things as motor control. If STM32F7_TIM13 + is defined then THIS following may also be defined to indicate that + the timer is intended to be used for pulsed output modulation. + +if STM32F7_TIM13_PWM + +if STM32F7_PWM_MULTICHAN + +config STM32F7_TIM13_CHANNEL1 + bool "TIM13 Channel 1" + default n + ---help--- + Enables channel 1. + +if STM32F7_TIM13_CHANNEL1 + +config STM32F7_TIM13_CH1MODE + int "TIM13 Channel 1 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM13_CH1OUT + bool "TIM13 Channel 1 Output" + default n + ---help--- + Enables channel 1 output. + +endif # STM32F7_TIM13_CHANNEL1 + +config STM32F7_TIM13_CHANNEL2 + bool "TIM13 Channel 2" + default n + ---help--- + Enables channel 2. + +if STM32F7_TIM13_CHANNEL2 + +config STM32F7_TIM13_CH2MODE + int "TIM13 Channel 2 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM13_CH2OUT + bool "TIM13 Channel 2 Output" + default n + ---help--- + Enables channel 2 output. + +endif # STM32F7_TIM13_CHANNEL2 + +config STM32F7_TIM13_CHANNEL3 + bool "TIM13 Channel 3" + default n + ---help--- + Enables channel 3. + +if STM32F7_TIM13_CHANNEL3 + +config STM32F7_TIM13_CH3MODE + int "TIM13 Channel 3 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM13_CH3OUT + bool "TIM13 Channel 3 Output" + default n + ---help--- + Enables channel 3 output. + +endif # STM32F7_TIM13_CHANNEL3 + +config STM32F7_TIM13_CHANNEL4 + bool "TIM13 Channel 4" + default n + ---help--- + Enables channel 4. + +if STM32F7_TIM13_CHANNEL4 + +config STM32F7_TIM13_CH4MODE + int "TIM13 Channel 4 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM13_CH4OUT + bool "TIM13 Channel 4 Output" + default n + ---help--- + Enables channel 4 output. + +endif # STM32F7_TIM13_CHANNEL4 + +endif # STM32F7_PWM_MULTICHAN + +if !STM32F7_PWM_MULTICHAN + +config STM32F7_TIM13_CHANNEL + int "TIM13 PWM Output Channel" + default 1 + range 1 4 + ---help--- + If TIM13 is enabled for PWM usage, you also need specifies the timer output + channel {1,..,4} + +config STM32F7_TIM13_CHMODE + int "TIM13 Channel Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +endif # !STM32F7_PWM_MULTICHAN + +endif # STM32F7_TIM13_PWM + +config STM32F7_TIM14_PWM + bool "TIM14 PWM" + default n + depends on STM32F7_TIM14 + select ARCH_HAVE_PWM_PULSECOUNT + ---help--- + Reserve timer 14 for use by PWM + + Timer devices may be used for different purposes. One special purpose is + to generate modulated outputs for such things as motor control. If STM32F7_TIM14 + is defined then THIS following may also be defined to indicate that + the timer is intended to be used for pulsed output modulation. + +if STM32F7_TIM14_PWM + +if STM32F7_PWM_MULTICHAN + +config STM32F7_TIM14_CHANNEL1 + bool "TIM14 Channel 1" + default n + ---help--- + Enables channel 1. + +if STM32F7_TIM14_CHANNEL1 + +config STM32F7_TIM14_CH1MODE + int "TIM14 Channel 1 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM14_CH1OUT + bool "TIM14 Channel 1 Output" + default n + ---help--- + Enables channel 1 output. + +endif # STM32F7_TIM14_CHANNEL1 + +config STM32F7_TIM14_CHANNEL2 + bool "TIM14 Channel 2" + default n + ---help--- + Enables channel 2. + +if STM32F7_TIM14_CHANNEL2 + +config STM32F7_TIM14_CH2MODE + int "TIM14 Channel 2 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM14_CH2OUT + bool "TIM14 Channel 2 Output" + default n + ---help--- + Enables channel 2 output. + +endif # STM32F7_TIM14_CHANNEL2 + +config STM32F7_TIM14_CHANNEL3 + bool "TIM14 Channel 3" + default n + ---help--- + Enables channel 3. + +if STM32F7_TIM14_CHANNEL3 + +config STM32F7_TIM14_CH3MODE + int "TIM14 Channel 3 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM14_CH3OUT + bool "TIM14 Channel 3 Output" + default n + ---help--- + Enables channel 3 output. + +endif # STM32F7_TIM14_CHANNEL3 + +config STM32F7_TIM14_CHANNEL4 + bool "TIM14 Channel 4" + default n + ---help--- + Enables channel 4. + +if STM32F7_TIM14_CHANNEL4 + +config STM32F7_TIM14_CH4MODE + int "TIM14 Channel 4 Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM14_CH4OUT + bool "TIM14 Channel 4 Output" + default n + ---help--- + Enables channel 4 output. + +endif # STM32F7_TIM14_CHANNEL4 + +endif # STM32F7_PWM_MULTICHAN + +if !STM32F7_PWM_MULTICHAN + +config STM32F7_TIM14_CHANNEL + int "TIM14 PWM Output Channel" + default 1 + range 1 4 + ---help--- + If TIM14 is enabled for PWM usage, you also need specifies the timer output + channel {1,..,4} + +config STM32F7_TIM14_CHMODE + int "TIM14 Channel Mode" + default 0 + range 0 5 + ---help--- + Specifies the channel mode. + +endif # !STM32F7_PWM_MULTICHAN + +endif # STM32F7_TIM14_PWM + +config STM32F7_TIM15_PWM + bool "TIM15 PWM" + default n + depends on STM32F7_TIM15 + ---help--- + Reserve timer 15 for use by PWM + + Timer devices may be used for different purposes. One special purpose is + to generate modulated outputs for such things as motor control. If STM32F7_TIM15 + is defined then THIS following may also be defined to indicate that + the timer is intended to be used for pulsed output modulation. + +if STM32F7_TIM15_PWM + +if STM32F7_PWM_MULTICHAN + +config STM32F7_TIM15_CHANNEL1 + bool "TIM15 Channel 1" + default n + ---help--- + Enables channel 1. + +if STM32F7_TIM15_CHANNEL1 + +config STM32F7_TIM15_CH1MODE + int "TIM15 Channel 1 Mode" + default 0 + range 0 3 if STM32F7_STM32F30XX + range 0 1 if !STM32F7_STM32F30XX + ---help--- + Specifies the channel mode. + +config STM32F7_TIM15_CH1OUT + bool "TIM15 Channel 1 Output" + default n + ---help--- + Enables channel 1 output. + +endif # STM32F7_TIM15_CHANNEL1 + +config STM32F7_TIM15_CHANNEL2 + bool "TIM15 Channel 2" + default n + ---help--- + Enables channel 2. + +if STM32F7_TIM15_CHANNEL2 + +config STM32F7_TIM15_CH2MODE + int "TIM15 Channel 2 Mode" + default 0 + range 0 3 if STM32F7_STM32F30XX + range 0 1 if !STM32F7_STM32F30XX + ---help--- + Specifies the channel mode. + +config STM32F7_TIM15_CH2OUT + bool "TIM15 Channel 2 Output" + default n + ---help--- + Enables channel 2 output. + +endif # STM32F7_TIM15_CHANNEL2 + +endif # STM32F7_PWM_MULTICHAN + +if !STM32F7_PWM_MULTICHAN + +config STM32F7_TIM15_CHANNEL + int "TIM15 PWM Output Channel" + default 1 + range 1 2 + ---help--- + If TIM15 is enabled for PWM usage, you also need specifies the timer output + channel {1,2} + +config STM32F7_TIM15_CHMODE + int "TIM15 Channel Mode" + default 0 + range 0 3 if STM32F7_STM32F30XX + range 0 1 if !STM32F7_STM32F30XX + ---help--- + Specifies the channel mode. + +endif # !STM32F7_PWM_MULTICHAN + +endif # STM32F7_TIM15_PWM + +config STM32F7_TIM16_PWM + bool "TIM16 PWM" + default n + depends on STM32F7_TIM16 + ---help--- + Reserve timer 16 for use by PWM + + Timer devices may be used for different purposes. One special purpose is + to generate modulated outputs for such things as motor control. If STM32F7_TIM16 + is defined then THIS following may also be defined to indicate that + the timer is intended to be used for pulsed output modulation. + +if STM32F7_TIM16_PWM + +if STM32F7_PWM_MULTICHAN + +config STM32F7_TIM16_CHANNEL1 + bool "TIM16 Channel 1" + default n + ---help--- + Enables channel 1. + +if STM32F7_TIM16_CHANNEL1 + +config STM32F7_TIM16_CH1MODE + int "TIM16 Channel 1 Mode" + default 0 + range 0 1 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM16_CH1OUT + bool "TIM16 Channel 1 Output" + default n + ---help--- + Enables channel 1 output. + +endif # STM32F7_TIM16_CHANNEL1 + +endif # STM32F7_PWM_MULTICHAN + +if !STM32F7_PWM_MULTICHAN + +config STM32F7_TIM16_CHANNEL + int "TIM16 PWM Output Channel" + default 1 + range 1 1 + ---help--- + If TIM16 is enabled for PWM usage, you also need specifies the timer output + channel {1} + +config STM32F7_TIM16_CHMODE + int "TIM16 Channel Mode" + default 0 + range 0 1 + ---help--- + Specifies the channel mode. + +endif # !STM32F7_PWM_MULTICHAN + +endif # STM32F7_TIM16_PWM + +config STM32F7_TIM17_PWM + bool "TIM17 PWM" + default n + depends on STM32F7_TIM17 + ---help--- + Reserve timer 17 for use by PWM + + Timer devices may be used for different purposes. One special purpose is + to generate modulated outputs for such things as motor control. If STM32F7_TIM17 + is defined then THIS following may also be defined to indicate that + the timer is intended to be used for pulsed output modulation. + +if STM32F7_TIM17_PWM + +if STM32F7_PWM_MULTICHAN + +config STM32F7_TIM17_CHANNEL1 + bool "TIM17 Channel 1" + default n + ---help--- + Enables channel 1. + +if STM32F7_TIM17_CHANNEL1 + +config STM32F7_TIM17_CH1MODE + int "TIM17 Channel 1 Mode" + default 0 + range 0 1 + ---help--- + Specifies the channel mode. + +config STM32F7_TIM17_CH1OUT + bool "TIM17 Channel 1 Output" + default n + ---help--- + Enables channel 1 output. + +endif # STM32F7_TIM17_CHANNEL1 + +endif # STM32F7_PWM_MULTICHAN + +if !STM32F7_PWM_MULTICHAN + +config STM32F7_TIM17_CHANNEL + int "TIM17 PWM Output Channel" + default 1 + range 1 1 + ---help--- + If TIM17 is enabled for PWM usage, you also need specifies the timer output + channel {1} + +config STM32F7_TIM17_CHMODE + int "TIM17 Channel Mode" + default 0 + range 0 1 + ---help--- + Specifies the channel mode. + +endif # !STM32F7_PWM_MULTICHAN + +endif # STM32F7_TIM17_PWM + +config STM32F7_PWM_MULTICHAN + bool "PWM Multiple Output Channels" + default n + depends on STM32F7_TIM1_PWM || STM32F7_TIM2_PWM || STM32F7_TIM3_PWM || STM32F7_TIM4_PWM || STM32F7_TIM5_PWM || STM32F7_TIM8_PWM || STM32F7_TIM9_PWM || STM32F7_TIM10_PWM || STM32F7_TIM11_PWM || STM32F7_TIM12_PWM || STM32F7_TIM13_PWM || STM32F7_TIM14_PWM || STM32F7_TIM15_PWM || STM32F7_TIM16_PWM || STM32F7_TIM17_PWM + select ARCH_HAVE_PWM_MULTICHAN + ---help--- + Specifies that the PWM driver supports multiple output + channels per timer. + +config STM32F7_TIM1_ADC + bool "TIM1 ADC" + default n + depends on STM32F7_TIM1 && STM32F7_ADC + ---help--- + Reserve timer 1 for use by ADC + + Timer devices may be used for different purposes. If STM32F7_TIM1 is + defined then the following may also be defined to indicate that the + timer is intended to be used for ADC conversion. Note that ADC usage + requires two definition: Not only do you have to assign the timer + for used by the ADC, but then you also have to configure which ADC + channel it is assigned to. + +choice + prompt "Select TIM1 ADC channel" + default STM32F7_TIM1_ADC1 + depends on STM32F7_TIM1_ADC + +config STM32F7_TIM1_ADC1 + bool "TIM1 ADC channel 1" + depends on STM32F7_ADC1 + select HAVE_ADC1_TIMER + ---help--- + Reserve TIM1 to trigger ADC1 + +config STM32F7_TIM1_ADC2 + bool "TIM1 ADC channel 2" + depends on STM32F7_ADC2 + select HAVE_ADC2_TIMER + ---help--- + Reserve TIM1 to trigger ADC2 + +config STM32F7_TIM1_ADC3 + bool "TIM1 ADC channel 3" + depends on STM32F7_ADC3 + select HAVE_ADC3_TIMER + ---help--- + Reserve TIM1 to trigger ADC3 + +endchoice + +config STM32F7_TIM2_ADC + bool "TIM2 ADC" + default n + depends on STM32F7_TIM2 && STM32F7_ADC + ---help--- + Reserve timer 1 for use by ADC + + Timer devices may be used for different purposes. If STM32F7_TIM2 is + defined then the following may also be defined to indicate that the + timer is intended to be used for ADC conversion. Note that ADC usage + requires two definition: Not only do you have to assign the timer + for used by the ADC, but then you also have to configure which ADC + channel it is assigned to. + +choice + prompt "Select TIM2 ADC channel" + default STM32F7_TIM2_ADC1 + depends on STM32F7_TIM2_ADC + +config STM32F7_TIM2_ADC1 + bool "TIM2 ADC channel 1" + depends on STM32F7_ADC1 + select HAVE_ADC1_TIMER + ---help--- + Reserve TIM2 to trigger ADC1 + +config STM32F7_TIM2_ADC2 + bool "TIM2 ADC channel 2" + depends on STM32F7_ADC2 + select HAVE_ADC2_TIMER + ---help--- + Reserve TIM2 to trigger ADC2 + +config STM32F7_TIM2_ADC3 + bool "TIM2 ADC channel 3" + depends on STM32F7_ADC3 + select HAVE_ADC3_TIMER + ---help--- + Reserve TIM2 to trigger ADC3 + +endchoice + +config STM32F7_TIM3_ADC + bool "TIM3 ADC" + default n + depends on STM32F7_TIM3 && STM32F7_ADC + ---help--- + Reserve timer 1 for use by ADC + + Timer devices may be used for different purposes. If STM32F7_TIM3 is + defined then the following may also be defined to indicate that the + timer is intended to be used for ADC conversion. Note that ADC usage + requires two definition: Not only do you have to assign the timer + for used by the ADC, but then you also have to configure which ADC + channel it is assigned to. + +choice + prompt "Select TIM3 ADC channel" + default STM32F7_TIM3_ADC1 + depends on STM32F7_TIM3_ADC + +config STM32F7_TIM3_ADC1 + bool "TIM3 ADC channel 1" + depends on STM32F7_ADC1 + select HAVE_ADC1_TIMER + ---help--- + Reserve TIM3 to trigger ADC1 + +config STM32F7_TIM3_ADC2 + bool "TIM3 ADC channel 2" + depends on STM32F7_ADC2 + select HAVE_ADC2_TIMER + ---help--- + Reserve TIM3 to trigger ADC2 + +config STM32F7_TIM3_ADC3 + bool "TIM3 ADC channel 3" + depends on STM32F7_ADC3 + select HAVE_ADC3_TIMER + ---help--- + Reserve TIM3 to trigger ADC3 + +endchoice + +config STM32F7_TIM4_ADC + bool "TIM4 ADC" + default n + depends on STM32F7_TIM4 && STM32F7_ADC + ---help--- + Reserve timer 1 for use by ADC + + Timer devices may be used for different purposes. If STM32F7_TIM4 is + defined then the following may also be defined to indicate that the + timer is intended to be used for ADC conversion. Note that ADC usage + requires two definition: Not only do you have to assign the timer + for used by the ADC, but then you also have to configure which ADC + channel it is assigned to. + +choice + prompt "Select TIM4 ADC channel" + default STM32F7_TIM4_ADC1 + depends on STM32F7_TIM4_ADC + +config STM32F7_TIM4_ADC1 + bool "TIM4 ADC channel 1" + depends on STM32F7_ADC1 + select HAVE_ADC1_TIMER + ---help--- + Reserve TIM4 to trigger ADC1 + +config STM32F7_TIM4_ADC2 + bool "TIM4 ADC channel 2" + depends on STM32F7_ADC2 + select HAVE_ADC2_TIMER + ---help--- + Reserve TIM4 to trigger ADC2 + +config STM32F7_TIM4_ADC3 + bool "TIM4 ADC channel 3" + depends on STM32F7_ADC3 + select HAVE_ADC3_TIMER + ---help--- + Reserve TIM4 to trigger ADC3 + +endchoice + +config STM32F7_TIM5_ADC + bool "TIM5 ADC" + default n + depends on STM32F7_TIM5 && STM32F7_ADC + ---help--- + Reserve timer 1 for use by ADC + + Timer devices may be used for different purposes. If STM32F7_TIM5 is + defined then the following may also be defined to indicate that the + timer is intended to be used for ADC conversion. Note that ADC usage + requires two definition: Not only do you have to assign the timer + for used by the ADC, but then you also have to configure which ADC + channel it is assigned to. + +choice + prompt "Select TIM5 ADC channel" + default STM32F7_TIM5_ADC1 + depends on STM32F7_TIM5_ADC + +config STM32F7_TIM5_ADC1 + bool "TIM5 ADC channel 1" + depends on STM32F7_ADC1 + select HAVE_ADC1_TIMER + ---help--- + Reserve TIM5 to trigger ADC1 + +config STM32F7_TIM5_ADC2 + bool "TIM5 ADC channel 2" + depends on STM32F7_ADC2 + select HAVE_ADC2_TIMER + ---help--- + Reserve TIM5 to trigger ADC2 + +config STM32F7_TIM5_ADC3 + bool "TIM5 ADC channel 3" + depends on STM32F7_ADC3 + select HAVE_ADC3_TIMER + ---help--- + Reserve TIM5 to trigger ADC3 + +endchoice + +config STM32F7_TIM8_ADC + bool "TIM8 ADC" + default n + depends on STM32F7_TIM8 && STM32F7_ADC + ---help--- + Reserve timer 1 for use by ADC + + Timer devices may be used for different purposes. If STM32F7_TIM8 is + defined then the following may also be defined to indicate that the + timer is intended to be used for ADC conversion. Note that ADC usage + requires two definition: Not only do you have to assign the timer + for used by the ADC, but then you also have to configure which ADC + channel it is assigned to. + +choice + prompt "Select TIM8 ADC channel" + default STM32F7_TIM8_ADC1 + depends on STM32F7_TIM8_ADC + +config STM32F7_TIM8_ADC1 + bool "TIM8 ADC channel 1" + depends on STM32F7_ADC1 + select HAVE_ADC1_TIMER + ---help--- + Reserve TIM8 to trigger ADC1 + +config STM32F7_TIM8_ADC2 + bool "TIM8 ADC channel 2" + depends on STM32F7_ADC2 + select HAVE_ADC2_TIMER + ---help--- + Reserve TIM8 to trigger ADC2 + +config STM32F7_TIM8_ADC3 + bool "TIM8 ADC channel 3" + depends on STM32F7_ADC3 + select HAVE_ADC3_TIMER + ---help--- + Reserve TIM8 to trigger ADC3 + +endchoice + +config HAVE_ADC1_TIMER + bool + +config HAVE_ADC2_TIMER + bool + +config HAVE_ADC3_TIMER + bool + +config STM32F7_ADC1_SAMPLE_FREQUENCY + int "ADC1 Sampling Frequency" + default 100 + depends on HAVE_ADC1_TIMER + ---help--- + ADC1 sampling frequency. Default: 100Hz + +config STM32F7_ADC1_TIMTRIG + int "ADC1 Timer Trigger" + default 0 + range 0 4 + depends on HAVE_ADC1_TIMER + ---help--- + Values 0:CC1 1:CC2 2:CC3 3:CC4 4:TRGO + +config STM32F7_ADC2_SAMPLE_FREQUENCY + int "ADC2 Sampling Frequency" + default 100 + depends on HAVE_ADC2_TIMER + ---help--- + ADC2 sampling frequency. Default: 100Hz + +config STM32F7_ADC2_TIMTRIG + int "ADC2 Timer Trigger" + default 0 + range 0 4 + depends on HAVE_ADC2_TIMER + ---help--- + Values 0:CC1 1:CC2 2:CC3 3:CC4 4:TRGO + +config STM32F7_ADC3_SAMPLE_FREQUENCY + int "ADC3 Sampling Frequency" + default 100 + depends on HAVE_ADC3_TIMER + ---help--- + ADC3 sampling frequency. Default: 100Hz + +config STM32F7_ADC3_TIMTRIG + int "ADC3 Timer Trigger" + default 0 + range 0 4 + depends on HAVE_ADC3_TIMER + ---help--- + Values 0:CC1 1:CC2 2:CC3 3:CC4 4:TRGO + +config STM32F7_TIM1_DAC + bool "TIM1 DAC" + default n + depends on STM32F7_TIM1 && STM32F7_DAC + ---help--- + Reserve timer 1 for use by DAC + + Timer devices may be used for different purposes. If STM32F7_TIM1 is + defined then the following may also be defined to indicate that the + timer is intended to be used for DAC conversion. Note that DAC usage + requires two definition: Not only do you have to assign the timer + for used by the DAC, but then you also have to configure which DAC + channel it is assigned to. + +choice + prompt "Select TIM1 DAC channel" + default STM32F7_TIM1_DAC1 + depends on STM32F7_TIM1_DAC + +config STM32F7_TIM1_DAC1 + bool "TIM1 DAC channel 1" + ---help--- + Reserve TIM1 to trigger DAC1 + +config STM32F7_TIM1_DAC2 + bool "TIM1 DAC channel 2" + ---help--- + Reserve TIM1 to trigger DAC2 + +endchoice + +config STM32F7_TIM2_DAC + bool "TIM2 DAC" + default n + depends on STM32F7_TIM2 && STM32F7_DAC + ---help--- + Reserve timer 2 for use by DAC + + Timer devices may be used for different purposes. If STM32F7_TIM2 is + defined then the following may also be defined to indicate that the + timer is intended to be used for DAC conversion. Note that DAC usage + requires two definition: Not only do you have to assign the timer + for used by the DAC, but then you also have to configure which DAC + channel it is assigned to. + +choice + prompt "Select TIM2 DAC channel" + default STM32F7_TIM2_DAC1 + depends on STM32F7_TIM2_DAC + +config STM32F7_TIM2_DAC1 + bool "TIM2 DAC channel 1" + ---help--- + Reserve TIM2 to trigger DAC1 + +config STM32F7_TIM2_DAC2 + bool "TIM2 DAC channel 2" + ---help--- + Reserve TIM2 to trigger DAC2 + +endchoice + +config STM32F7_TIM3_DAC + bool "TIM3 DAC" + default n + depends on STM32F7_TIM3 && STM32F7_DAC + ---help--- + Reserve timer 3 for use by DAC + + Timer devices may be used for different purposes. If STM32F7_TIM3 is + defined then the following may also be defined to indicate that the + timer is intended to be used for DAC conversion. Note that DAC usage + requires two definition: Not only do you have to assign the timer + for used by the DAC, but then you also have to configure which DAC + channel it is assigned to. + +choice + prompt "Select TIM3 DAC channel" + default STM32F7_TIM3_DAC1 + depends on STM32F7_TIM3_DAC + +config STM32F7_TIM3_DAC1 + bool "TIM3 DAC channel 1" + ---help--- + Reserve TIM3 to trigger DAC1 + +config STM32F7_TIM3_DAC2 + bool "TIM3 DAC channel 2" + ---help--- + Reserve TIM3 to trigger DAC2 + +endchoice + +config STM32F7_TIM4_DAC + bool "TIM4 DAC" + default n + depends on STM32F7_TIM4 && STM32F7_DAC + ---help--- + Reserve timer 4 for use by DAC + + Timer devices may be used for different purposes. If STM32F7_TIM4 is + defined then the following may also be defined to indicate that the + timer is intended to be used for DAC conversion. Note that DAC usage + requires two definition: Not only do you have to assign the timer + for used by the DAC, but then you also have to configure which DAC + channel it is assigned to. + +choice + prompt "Select TIM4 DAC channel" + default STM32F7_TIM4_DAC1 + depends on STM32F7_TIM4_DAC + +config STM32F7_TIM4_DAC1 + bool "TIM4 DAC channel 1" + ---help--- + Reserve TIM4 to trigger DAC1 + +config STM32F7_TIM4_DAC2 + bool "TIM4 DAC channel 2" + ---help--- + Reserve TIM4 to trigger DAC2 + +endchoice + +config STM32F7_TIM5_DAC + bool "TIM5 DAC" + default n + depends on STM32F7_TIM5 && STM32F7_DAC + ---help--- + Reserve timer 5 for use by DAC + + Timer devices may be used for different purposes. If STM32F7_TIM5 is + defined then the following may also be defined to indicate that the + timer is intended to be used for DAC conversion. Note that DAC usage + requires two definition: Not only do you have to assign the timer + for used by the DAC, but then you also have to configure which DAC + channel it is assigned to. + +choice + prompt "Select TIM5 DAC channel" + default STM32F7_TIM5_DAC1 + depends on STM32F7_TIM5_DAC + +config STM32F7_TIM5_DAC1 + bool "TIM5 DAC channel 1" + ---help--- + Reserve TIM5 to trigger DAC1 + +config STM32F7_TIM5_DAC2 + bool "TIM5 DAC channel 2" + ---help--- + Reserve TIM5 to trigger DAC2 + +endchoice + +config STM32F7_TIM6_DAC + bool "TIM6 DAC" + default n + depends on STM32F7_TIM6 && STM32F7_DAC + ---help--- + Reserve timer 6 for use by DAC + + Timer devices may be used for different purposes. If STM32F7_TIM6 is + defined then the following may also be defined to indicate that the + timer is intended to be used for DAC conversion. Note that DAC usage + requires two definition: Not only do you have to assign the timer + for used by the DAC, but then you also have to configure which DAC + channel it is assigned to. + +choice + prompt "Select TIM6 DAC channel" + default STM32F7_TIM6_DAC1 + depends on STM32F7_TIM6_DAC + +config STM32F7_TIM6_DAC1 + bool "TIM6 DAC channel 1" + ---help--- + Reserve TIM6 to trigger DAC1 + +config STM32F7_TIM6_DAC2 + bool "TIM6 DAC channel 2" + ---help--- + Reserve TIM6 to trigger DAC2 + +endchoice + +config STM32F7_TIM7_DAC + bool "TIM7 DAC" + default n + depends on STM32F7_TIM7 && STM32F7_DAC + ---help--- + Reserve timer 7 for use by DAC + + Timer devices may be used for different purposes. If STM32F7_TIM7 is + defined then the following may also be defined to indicate that the + timer is intended to be used for DAC conversion. Note that DAC usage + requires two definition: Not only do you have to assign the timer + for used by the DAC, but then you also have to configure which DAC + channel it is assigned to. + +choice + prompt "Select TIM7 DAC channel" + default STM32F7_TIM7_DAC1 + depends on STM32F7_TIM7_DAC + +config STM32F7_TIM7_DAC1 + bool "TIM7 DAC channel 1" + ---help--- + Reserve TIM7 to trigger DAC1 + +config STM32F7_TIM7_DAC2 + bool "TIM7 DAC channel 2" + ---help--- + Reserve TIM7 to trigger DAC2 + +endchoice + +config STM32F7_TIM8_DAC + bool "TIM8 DAC" + default n + depends on STM32F7_TIM8 && STM32F7_DAC + ---help--- + Reserve timer 8 for use by DAC + + Timer devices may be used for different purposes. If STM32F7_TIM8 is + defined then the following may also be defined to indicate that the + timer is intended to be used for DAC conversion. Note that DAC usage + requires two definition: Not only do you have to assign the timer + for used by the DAC, but then you also have to configure which DAC + channel it is assigned to. + +choice + prompt "Select TIM8 DAC channel" + default STM32F7_TIM8_DAC1 + depends on STM32F7_TIM8_DAC + +config STM32F7_TIM8_DAC1 + bool "TIM8 DAC channel 1" + ---help--- + Reserve TIM8 to trigger DAC1 + +config STM32F7_TIM8_DAC2 + bool "TIM8 DAC channel 2" + ---help--- + Reserve TIM8 to trigger DAC2 + +endchoice + +config STM32F7_TIM9_DAC + bool "TIM9 DAC" default n - select ARCH_HAVE_SERIAL_TERMIOS - select UART8_SERIALDRIVER - select STM32F7_USART + depends on STM32F7_TIM9 && STM32F7_DAC + ---help--- + Reserve timer 9 for use by DAC -config STM32F7_IWDG - bool "IWDG" - default n - select WATCHDOG + Timer devices may be used for different purposes. If STM32F7_TIM9 is + defined then the following may also be defined to indicate that the + timer is intended to be used for DAC conversion. Note that DAC usage + requires two definition: Not only do you have to assign the timer + for used by the DAC, but then you also have to configure which DAC + channel it is assigned to. -config STM32F7_WWDG - bool "WWDG" - default n - select WATCHDOG +choice + prompt "Select TIM9 DAC channel" + default STM32F7_TIM9_DAC1 + depends on STM32F7_TIM9_DAC -endmenu +config STM32F7_TIM9_DAC1 + bool "TIM9 DAC channel 1" + ---help--- + Reserve TIM9 to trigger DAC1 -menu "U[S]ART Configuration" - depends on STM32F7_USART +config STM32F7_TIM9_DAC2 + bool "TIM9 DAC channel 2" + ---help--- + Reserve TIM9 to trigger DAC2 -config USART1_RS485 - bool "RS-485 on USART1" +endchoice + +config STM32F7_TIM10_DAC + bool "TIM10 DAC" default n - depends on STM32F7_USART1 + depends on STM32F7_TIM10 && STM32F7_DAC ---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. + Reserve timer 10 for use by DAC -config USART1_RS485_DIR_POLARITY - int "USART1 RS-485 DIR pin polarity" - default 1 - range 0 1 - depends on USART1_RS485 + Timer devices may be used for different purposes. If STM32F7_TIM10 is + defined then the following may also be defined to indicate that the + timer is intended to be used for DAC conversion. Note that DAC usage + requires two definition: Not only do you have to assign the timer + for used by the DAC, but then you also have to configure which DAC + channel it is assigned to. + +choice + prompt "Select TIM10 DAC channel" + default STM32F7_TIM10_DAC1 + depends on STM32F7_TIM10_DAC + +config STM32F7_TIM10_DAC1 + bool "TIM10 DAC channel 1" ---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). + Reserve TIM10 to trigger DAC1 -config USART1_RXDMA - bool "USART1 Rx DMA" - default n - depends on STM32F7_USART1 && STM32F7_DMA1 +config STM32F7_TIM10_DAC2 + bool "TIM10 DAC channel 2" ---help--- - In high data rate usage, Rx DMA may eliminate Rx overrun errors + Reserve TIM10 to trigger DAC2 -config USART2_RS485 - bool "RS-485 on USART2" +endchoice + +config STM32F7_TIM11_DAC + bool "TIM11 DAC" default n - depends on STM32F7_USART2 + depends on STM32F7_TIM11 && STM32F7_DAC ---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. + Reserve timer 11 for use by DAC -config USART2_RS485_DIR_POLARITY - int "USART2 RS-485 DIR pin polarity" - default 1 - range 0 1 - depends on USART2_RS485 + Timer devices may be used for different purposes. If STM32F7_TIM11 is + defined then the following may also be defined to indicate that the + timer is intended to be used for DAC conversion. Note that DAC usage + requires two definition: Not only do you have to assign the timer + for used by the DAC, but then you also have to configure which DAC + channel it is assigned to. + +choice + prompt "Select TIM11 DAC channel" + default STM32F7_TIM11_DAC1 + depends on STM32F7_TIM11_DAC + +config STM32F7_TIM11_DAC1 + bool "TIM11 DAC channel 1" ---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). + Reserve TIM11 to trigger DAC1 -config USART2_RXDMA - bool "USART2 Rx DMA" - default n - depends on STM32F7_USART2 && STM32F7_DMA1 +config STM32F7_TIM11_DAC2 + bool "TIM11 DAC channel 2" ---help--- - In high data rate usage, Rx DMA may eliminate Rx overrun errors + Reserve TIM11 to trigger DAC2 -config USART3_RS485 - bool "RS-485 on USART3" +endchoice + +config STM32F7_TIM12_DAC + bool "TIM12 DAC" default n - depends on STM32F7_USART3 + depends on STM32F7_TIM12 && STM32F7_DAC ---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. + Reserve timer 12 for use by DAC -config USART3_RS485_DIR_POLARITY - int "USART3 RS-485 DIR pin polarity" - default 1 - range 0 1 - depends on USART3_RS485 + Timer devices may be used for different purposes. If STM32F7_TIM12 is + defined then the following may also be defined to indicate that the + timer is intended to be used for DAC conversion. Note that DAC usage + requires two definition: Not only do you have to assign the timer + for used by the DAC, but then you also have to configure which DAC + channel it is assigned to. + +choice + prompt "Select TIM12 DAC channel" + default STM32F7_TIM12_DAC1 + depends on STM32F7_TIM12_DAC + +config STM32F7_TIM12_DAC1 + bool "TIM12 DAC channel 1" ---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). + Reserve TIM12 to trigger DAC1 -config USART3_RXDMA - bool "USART3 Rx DMA" - default n - depends on STM32F7_USART3 && STM32F7_DMA1 +config STM32F7_TIM12_DAC2 + bool "TIM12 DAC channel 2" ---help--- - In high data rate usage, Rx DMA may eliminate Rx overrun errors + Reserve TIM12 to trigger DAC2 -config UART4_RS485 - bool "RS-485 on UART4" +endchoice + +config STM32F7_TIM13_DAC + bool "TIM13 DAC" default n - depends on STM32F7_UART4 + depends on STM32F7_TIM13 && STM32F7_DAC ---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. + Reserve timer 13 for use by DAC -config UART4_RS485_DIR_POLARITY - int "UART4 RS-485 DIR pin polarity" - default 1 - range 0 1 - depends on UART4_RS485 + Timer devices may be used for different purposes. If STM32F7_TIM13 is + defined then the following may also be defined to indicate that the + timer is intended to be used for DAC conversion. Note that DAC usage + requires two definition: Not only do you have to assign the timer + for used by the DAC, but then you also have to configure which DAC + channel it is assigned to. + +choice + prompt "Select TIM13 DAC channel" + default STM32F7_TIM13_DAC1 + depends on STM32F7_TIM13_DAC + +config STM32F7_TIM13_DAC1 + bool "TIM13 DAC channel 1" ---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). + Reserve TIM13 to trigger DAC1 -config UART4_RXDMA - bool "UART4 Rx DMA" - default n - depends on STM32F7_UART4 && STM32F7_DMA1 +config STM32F7_TIM13_DAC2 + bool "TIM13 DAC channel 2" ---help--- - In high data rate usage, Rx DMA may eliminate Rx overrun errors + Reserve TIM13 to trigger DAC2 -config UART5_RS485 - bool "RS-485 on UART5" +endchoice + +config STM32F7_TIM14_DAC + bool "TIM14 DAC" default n - depends on STM32F7_UART5 + depends on STM32F7_TIM14 && STM32F7_DAC ---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. + Reserve timer 14 for use by DAC -config UART5_RS485_DIR_POLARITY - int "UART5 RS-485 DIR pin polarity" - default 1 - range 0 1 - depends on UART5_RS485 + Timer devices may be used for different purposes. If STM32F7_TIM14 is + defined then the following may also be defined to indicate that the + timer is intended to be used for DAC conversion. Note that DAC usage + requires two definition: Not only do you have to assign the timer + for used by the DAC, but then you also have to configure which DAC + channel it is assigned to. + +choice + prompt "Select TIM14 DAC channel" + default STM32F7_TIM14_DAC1 + depends on STM32F7_TIM14_DAC + +config STM32F7_TIM14_DAC1 + bool "TIM14 DAC channel 1" ---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). + Reserve TIM14 to trigger DAC1 -config UART5_RXDMA - bool "UART5 Rx DMA" - default n - depends on STM32F7_UART5 && STM32F7_DMA1 +config STM32F7_TIM14_DAC2 + bool "TIM14 DAC channel 2" ---help--- - In high data rate usage, Rx DMA may eliminate Rx overrun errors + Reserve TIM14 to trigger DAC2 -config USART6_RS485 - bool "RS-485 on USART6" +endchoice + +config STM32F7_TIM1_CAP + bool "TIM1 Capture" default n - depends on STM32F7_USART6 + depends on STM32F7_HAVE_TIM1 ---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. + Reserve timer 1 for use by Capture -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). + Timer devices may be used for different purposes. One special purpose is + to capture input. -config USART6_RXDMA - bool "USART6 Rx DMA" +config STM32F7_TIM2_CAP + bool "TIM2 Capture" default n - depends on STM32F7_USART6 && STM32F7_DMA2 + depends on STM32F7_HAVE_TIM2 ---help--- - In high data rate usage, Rx DMA may eliminate Rx overrun errors + Reserve timer 2 for use by Capture -config UART7_RS485 - bool "RS-485 on UART7" + Timer devices may be used for different purposes. One special purpose is + to capture input. + +config STM32F7_TIM3_CAP + bool "TIM3 Capture" default n - depends on STM32F7_UART7 + depends on STM32F7_HAVE_TIM3 ---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. + Reserve timer 3 for use by Capture -config UART7_RS485_DIR_POLARITY - int "UART7 RS-485 DIR pin polarity" - default 1 - range 0 1 - depends on UART7_RS485 + Timer devices may be used for different purposes. One special purpose is + to capture input. + +config STM32F7_TIM4_CAP + bool "TIM4 Capture" + default n + depends on STM32F7_HAVE_TIM4 ---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). + Reserve timer 4 for use by Capture -config UART7_RXDMA - bool "UART7 Rx DMA" + Timer devices may be used for different purposes. One special purpose is + to capture input. + +config STM32F7_TIM5_CAP + bool "TIM5 Capture" default n - depends on STM32F7_UART7 && STM32F7_DMA2 + depends on STM32F7_HAVE_TIM5 ---help--- - In high data rate usage, Rx DMA may eliminate Rx overrun errors + Reserve timer 5 for use by Capture -config UART8_RS485 - bool "RS-485 on UART8" + Timer devices may be used for different purposes. One special purpose is + to capture input. + +config STM32F7_TIM8_CAP + bool "TIM8 Capture" default n - depends on STM32F7_UART8 + depends on STM32F7_HAVE_TIM8 ---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. + Reserve timer 8 for use by Capture -config UART8_RS485_DIR_POLARITY - int "UART8 RS-485 DIR pin polarity" - default 1 - range 0 1 - depends on UART8_RS485 + Timer devices may be used for different purposes. One special purpose is + to capture input. + +config STM32F7_TIM9_CAP + bool "TIM9 Capture" + default n + depends on STM32F7_HAVE_TIM9 ---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). + Reserve timer 9 for use by Capture -config UART8_RXDMA - bool "UART8 Rx DMA" + Timer devices may be used for different purposes. One special purpose is + to capture input. + +config STM32F7_TIM10_CAP + bool "TIM10 Capture" default n - depends on STM32F7_UART8 && STM32F7_DMA2 + depends on STM32F7_HAVE_TIM10 ---help--- - In high data rate usage, Rx DMA may eliminate Rx overrun errors + Reserve timer 10 for use by Capture -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 + Timer devices may be used for different purposes. One special purpose is + to capture input. + +config STM32F7_TIM11_CAP + bool "TIM11 Capture" default n + depends on STM32F7_HAVE_TIM11 ---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. + Reserve timer 11 for use by Capture -config STM32F7_FLOWCONTROL_BROKEN - bool "Use Software UART RTS flow control" - depends on STM32F7_USART + Timer devices may be used for different purposes. One special purpose is + to capture input. + +config STM32F7_TIM12_CAP + bool "TIM12 Capture" default n + depends on STM32F7_HAVE_TIM12 ---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 + Reserve timer 12 for use by Capture -config STM32F7_USART_BREAKS - bool "Add TIOxSBRK to support sending Breaks" - depends on STM32F7_USART + Timer devices may be used for different purposes. One special purpose is + to capture input. + +config STM32F7_TIM13_CAP + bool "TIM13 Capture" default n + depends on STM32F7_HAVE_TIM13 ---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. + Reserve timer 13 for use by Capture -config STM32F7_SERIALBRK_BSDCOMPAT - bool "Use GPIO To send Break" - depends on STM32F7_USART && STM32F7_USART_BREAKS + Timer devices may be used for different purposes. One special purpose is + to capture input. + +config STM32F7_TIM14_CAP + bool "TIM14 Capture" default n + depends on STM32F7_HAVE_TIM14 ---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. + Reserve timer 14 for use by Capture -endmenu # U[S]ART Configuration + Timer devices may be used for different purposes. One special purpose is + to capture input. -config STM32F7_CUSTOM_CLOCKCONFIG - bool "Custom clock configuration" +endmenu # Timer Configuration + +menu "ADC Configuration" + depends on STM32F7_ADC + +config STM32F7_ADC1_DMA + bool "ADC1 DMA" + depends on STM32F7_ADC1 && STM32F7_HAVE_ADC1_DMA default n ---help--- - Enables special, board-specific STM32 clock configuration. + If DMA is selected, then the ADC may be configured to support + DMA transfer, which is necessary if multiple channels are read + or if very high trigger frequencies are used. -config STM32F7_DTCM_PROCFS - bool "DTCM SRAM PROCFS support" +config STM32F7_ADC2_DMA + bool "ADC2 DMA" + depends on STM32F7_ADC2 && STM32F7_HAVE_ADC2_DMA default n - depends on ARMV7M_DTCM && FS_PROCFS ---help--- - Select to build in support for /proc/dtcm. Reading from /proc/dtcm - will provide statistics about DTCM memory use similar to what you - would get from mallinfo() for the user heap. + If DMA is selected, then the ADC may be configured to support + DMA transfer, which is necessary if multiple channels are read + or if very high trigger frequencies are used. + +config STM32F7_ADC3_DMA + bool "ADC3 DMA" + depends on STM32F7_ADC3 && STM32F7_HAVE_ADC3_DMA + default n + ---help--- + If DMA is selected, then the ADC may be configured to support + DMA transfer, which is necessary if multiple channels are read + or if very high trigger frequencies are used. + +endmenu # "ADC Configuration" if STM32F7_ETHMAC menu "Ethernet MAC configuration" @@ -887,9 +4667,9 @@ endchoice config STM32F7_ETHMAC_REGDEBUG bool "Register-Level Debug" default n - depends on DEBUG + depends on DEBUG_NET_INFO ---help--- - Enable very low-level register access debug. Depends on DEBUG. + Enable very low-level register access debug. Depends on CONFIG_DEBUG_FEATURES. endmenu endif # STM32F7_ETHMAC diff --git a/arch/arm/src/stm32f7/Make.defs b/arch/arm/src/stm32f7/Make.defs index 2f4b7b251346b339b59bece843d3292169b8f3e7..ba56b9aea41eb1736cdab5f69378f1b21f02d49a 100644 --- a/arch/arm/src/stm32f7/Make.defs +++ b/arch/arm/src/stm32f7/Make.defs @@ -51,7 +51,7 @@ CMN_CSRCS += up_mdelay.c up_udelay.c up_exit.c up_idle.c up_initialize.c CMN_CSRCS += up_initialstate.c up_interruptcontext.c up_memfault.c up_modifyreg8.c CMN_CSRCS += up_modifyreg16.c up_modifyreg32.c up_releasepending.c CMN_CSRCS += up_releasestack.c up_reprioritizertr.c up_schedulesigaction.c -CMN_CSRCS += up_sigdeliver.c up_stackframe.c up_unblocktask.c up_usestack.c +CMN_CSRCS += up_sigdeliver.c up_stackframe.c up_systemreset.c up_unblocktask.c up_usestack.c CMN_CSRCS += up_doirq.c up_hardfault.c up_svcall.c up_vfork.c # Configuration-dependent common files @@ -139,7 +139,27 @@ ifeq ($(CONFIG_STM32_PWR),y) CHIP_CSRCS += stm32_exti_pwr.c endif -ifeq ($(CONFIG_RTC),y) +ifeq ($(CONFIG_STM32F7_I2C),y) +CHIP_CSRCS += stm32_i2c.c +endif + +ifeq ($(CONFIG_STM32F7_SPI),y) +CHIP_CSRCS += stm32_spi.c +endif + +ifeq ($(CONFIG_STM32F7_SDMMC1),y) +CHIP_CSRCS += stm32_sdmmc.c +endif + +ifeq ($(CONFIG_STM32F7_TIM),y) +CHIP_CSRCS += stm32_tim.c +endif + +ifeq ($(CONFIG_STM32F7_ADC),y) +CHIP_CSRCS += stm32_adc.c +endif + +ifeq ($(CONFIG_STM32F7_RTC),y) ifeq ($(CONFIG_RTC_ALARM),y) CHIP_CSRCS += stm32_exti_alarm.c endif @@ -149,6 +169,6 @@ ifeq ($(CONFIG_STM32F7_ETHMAC),y) CHIP_CSRCS += stm32_ethernet.c endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) CHIP_CSRCS += stm32_dumpgpio.c endif diff --git a/arch/arm/src/stm32f7/chip.h b/arch/arm/src/stm32f7/chip.h index 536b8e001071e25e8cbe4654faa9eac4baabfbef..6a8e21995f5d2c506c33ccfe87d7bda477cc473b 100644 --- a/arch/arm/src/stm32f7/chip.h +++ b/arch/arm/src/stm32f7/chip.h @@ -48,6 +48,7 @@ #include #include +#include "chip/stm32_pinmap.h" #include "chip/stm32_memorymap.h" /* If the common ARMv7-M vector handling logic is used, then it expects the diff --git a/arch/arm/src/stm32f7/chip/stm32_adc.h b/arch/arm/src/stm32f7/chip/stm32_adc.h new file mode 100644 index 0000000000000000000000000000000000000000..7b0861d77efbba26a6672482a8fd92e9374d93d9 --- /dev/null +++ b/arch/arm/src/stm32f7/chip/stm32_adc.h @@ -0,0 +1,58 @@ +/**************************************************************************************************** + * arch/arm/src/stm32f7/chip/stm32_adc.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: 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. + * + ****************************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32F7_CHIP_STM32_ADC_H +#define __ARCH_ARM_SRC_STM32F7_CHIP_STM32_ADC_H + +/**************************************************************************************************** + * Included Files + ****************************************************************************************************/ + +#include + +#include "chip.h" + +#include +#include "chip.h" + +#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) || \ + defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) +# include "chip/stm32f74xx77xx_adc.h" +#else +# error "Unsupported STM32 F7 sub family" +#endif + +#endif /* __ARCH_ARM_SRC_STM32F7_CHIP_STM32_ADC_H */ diff --git a/arch/arm/src/stm32f7/chip/stm32_dma.h b/arch/arm/src/stm32f7/chip/stm32_dma.h index 63db15ec9f3e32119711fb5586788ee74ec6e134..64fa967bca6e423f9d7e6dfb43687d6e558ff1bb 100644 --- a/arch/arm/src/stm32f7/chip/stm32_dma.h +++ b/arch/arm/src/stm32f7/chip/stm32_dma.h @@ -2,7 +2,8 @@ * arch/arm/src/stm32f7/chip/stm32_dma.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -45,6 +46,8 @@ #if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) # include "chip/stm32f74xx75xx_dma.h" +#elif defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) +# include "chip/stm32f76xx77xx_dma.h" #else # error "Unsupported STM32 F7 part" #endif diff --git a/arch/arm/src/stm32f7/chip/stm32_ethernet.h b/arch/arm/src/stm32f7/chip/stm32_ethernet.h index e5fc6982d2859f9ada3083f35f53fcc484e11962..962cb6d92205d7785f32bc5effff1336a9ccdd65 100644 --- a/arch/arm/src/stm32f7/chip/stm32_ethernet.h +++ b/arch/arm/src/stm32f7/chip/stm32_ethernet.h @@ -2,7 +2,8 @@ * arch/arm/src/stm32f7/chip/stm32_ethernet.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -46,7 +47,8 @@ * families */ -#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) +#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) \ + defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) /**************************************************************************************************** * Pre-processor Definitions @@ -805,6 +807,6 @@ struct eth_rxdesc_s ****************************************************************************************************/ #endif /* __ASSEMBLY__ */ -#endif /* CONFIG_STM32F7_STM32F74XX || CONFIG_STM32F7_STM32F75XX */ +#endif /* CONFIG_STM32F7_STM32F74XX || CONFIG_STM32F7_STM32F75XX || CONFIG_STM32F7_STM32F76XX || CONFIG_STM32F7_STM32F77XX */ #endif /* __ARCH_ARM_SRC_STM32F7_CHIP_STM32_ETHERNET_H */ diff --git a/arch/arm/src/stm32f7/chip/stm32_exti.h b/arch/arm/src/stm32f7/chip/stm32_exti.h index 1bf43de7931ea7eb3c4604533d51b2ac0ed60970..288f51b228c1e15e84422dd07e303ecd35e76603 100644 --- a/arch/arm/src/stm32f7/chip/stm32_exti.h +++ b/arch/arm/src/stm32f7/chip/stm32_exti.h @@ -2,7 +2,8 @@ * arch/arm/src/stm32f7/chip/stm32_exti.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -47,7 +48,8 @@ * families */ -#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) +#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) || \ + defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) /************************************************************************************ * Pre-processor Definitions @@ -127,5 +129,5 @@ #define EXTI_IMR_SHIFT (0) /* Bits 0-X: Pending bit for all lines */ #define EXTI_IMR_MASK STM32_EXTI_MASK -#endif /* CONFIG_STM32F7_STM32F74XX || CONFIG_STM32F7_STM32F75XX */ +#endif /* CONFIG_STM32F7_STM32F74XX || CONFIG_STM32F7_STM32F75XX || CONFIG_STM32F7_STM32F76XX || CONFIG_STM32F7_STM32F77XX */ #endif /* __ARCH_ARM_SRC_STM32F7_CHIP_STM32_EXTI_H */ diff --git a/arch/arm/src/stm32f7/chip/stm32_flash.h b/arch/arm/src/stm32f7/chip/stm32_flash.h index 965191bdcfbb70b94ca73f0b7776931a2b0972a8..d20bdfe4d33ef60da4151d1b4e9ebab0ad90c49d 100644 --- a/arch/arm/src/stm32f7/chip/stm32_flash.h +++ b/arch/arm/src/stm32f7/chip/stm32_flash.h @@ -2,7 +2,8 @@ * arch/arm/src/stm32f7/chip/stm32_flash.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -45,6 +46,8 @@ #if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) # include "chip/stm32f74xx75xx_flash.h" +#elif defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) +# include "chip/stm32f76xx77xx_flash.h" #else # error "Unsupported STM32 F7 part" #endif diff --git a/arch/arm/src/stm32f7/chip/stm32_gpio.h b/arch/arm/src/stm32f7/chip/stm32_gpio.h index 5b89574b0f29130da07c0bc8093a635f7edc666d..06431bb787dd4c73008fbf41490209d064e209e6 100644 --- a/arch/arm/src/stm32f7/chip/stm32_gpio.h +++ b/arch/arm/src/stm32f7/chip/stm32_gpio.h @@ -2,7 +2,8 @@ * arch/arm/src/stm32f7/chip/stm32_gpio.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -45,6 +46,8 @@ #if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) # include "chip/stm32f74xx75xx_gpio.h" +#elif defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) +# include "chip/stm32f76xx77xx_gpio.h" #else # error "Unsupported STM32 F7 part" #endif diff --git a/arch/arm/src/stm32f7/chip/stm32_i2c.h b/arch/arm/src/stm32f7/chip/stm32_i2c.h new file mode 100644 index 0000000000000000000000000000000000000000..f615eb6ec18f0e9df6fda4901be642696a23d012 --- /dev/null +++ b/arch/arm/src/stm32f7/chip/stm32_i2c.h @@ -0,0 +1,54 @@ +/************************************************************************************ + * arch/arm/src/stm32f7/chip/stm32_i2c.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: 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. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32F7_CHIP_STM32_I2C_H +#define __ARCH_ARM_SRC_STM32F7_CHIP_STM32_I2C_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include "chip.h" + +#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) || \ + defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) +# include "chip/stm32f74xx77xx_i2c.h" +#else +# error "Unsupported STM32 F7 sub family" +#endif + +#endif /* __ARCH_ARM_SRC_STM32F7_CHIP_STM32_I2C_H */ diff --git a/arch/arm/src/stm32f7/chip/stm32_memorymap.h b/arch/arm/src/stm32f7/chip/stm32_memorymap.h index f3ef8a1d53b83e38b989b9d342e45977440751fa..eba94016fd1e7202f3888e0040ad3d2f9632ee1c 100644 --- a/arch/arm/src/stm32f7/chip/stm32_memorymap.h +++ b/arch/arm/src/stm32f7/chip/stm32_memorymap.h @@ -2,7 +2,8 @@ * arch/arm/src/stm32f7/chip/stm32_memorymap.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -45,6 +46,8 @@ #if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) # include "chip/stm32f74xx75xx_memorymap.h" +#elif defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) +# include "chip/stm32f76xx77xx_memorymap.h" #else # error "Unsupported STM32 F7 memory map" #endif diff --git a/arch/arm/src/stm32f7/chip/stm32_pinmap.h b/arch/arm/src/stm32f7/chip/stm32_pinmap.h index 59903d8d03e21ebf156de17b75476bc3dad7b5e2..034e32166eb229ed25ca0467f989ac741aa4778d 100644 --- a/arch/arm/src/stm32f7/chip/stm32_pinmap.h +++ b/arch/arm/src/stm32f7/chip/stm32_pinmap.h @@ -2,7 +2,8 @@ * arch/arm/src/stm32f7/chip/stm32_pinmap.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -45,8 +46,10 @@ #if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) # include "chip/stm32f74xx75xx_pinmap.h" +#elif defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) +# include "chip/stm32f76xx77xx_pinmap.h" #else -# error "Unsupported STM32 F7 memory map" +# error "Unsupported STM32 F7 Pin map" #endif #endif /* __ARCH_ARM_SRC_STM32F7_CHIP_STM32_PINMAP_H */ diff --git a/arch/arm/src/stm32f7/chip/stm32_pwr.h b/arch/arm/src/stm32f7/chip/stm32_pwr.h index 427fab1f3fcfdfcd3364469c3c92a3180033773e..e9415d800a7c78766d29ade47bf8865b598f9dae 100644 --- a/arch/arm/src/stm32f7/chip/stm32_pwr.h +++ b/arch/arm/src/stm32f7/chip/stm32_pwr.h @@ -2,7 +2,8 @@ * arch/arm/src/stm32f7/chip/stm32_pwr.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -45,6 +46,8 @@ #if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) # include "chip/stm32f74xx75xx_pwr.h" +#elif defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) +# include "chip/stm32f76xx77xx_pwr.h" #else # error "Unsupported STM32 F7 part" #endif diff --git a/arch/arm/src/stm32f7/chip/stm32_rcc.h b/arch/arm/src/stm32f7/chip/stm32_rcc.h index 13468a55601d8427c96c4a5f020c417b3eb35923..e2dfc8380f987400cf5130ff1cf5a0a1472a0fae 100644 --- a/arch/arm/src/stm32f7/chip/stm32_rcc.h +++ b/arch/arm/src/stm32f7/chip/stm32_rcc.h @@ -1,8 +1,8 @@ /************************************************************************************ * arch/arm/src/stm32f7/chip/stm32_rcc.h * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -45,6 +45,8 @@ #if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) # include "chip/stm32f74xx75xx_rcc.h" +#elif defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) +# include "chip/stm32f76xx77xx_rcc.h" #else # error "Unsupported STM32 F7 part" #endif diff --git a/arch/arm/src/stm32f7/chip/stm32_sdmmc.h b/arch/arm/src/stm32f7/chip/stm32_sdmmc.h new file mode 100644 index 0000000000000000000000000000000000000000..10ed29f2384d09e12473a5140e538e44148e31cb --- /dev/null +++ b/arch/arm/src/stm32f7/chip/stm32_sdmmc.h @@ -0,0 +1,52 @@ +/************************************************************************************ + * arch/arm/src/stm32f7/chip/stm32_sdmmc.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_STM32F7_CHIP_STM32_SDMMC_H +#define __ARCH_ARM_SRC_STM32F7_CHIP_STM32_SDMMC_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include "chip.h" + +#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) +# include "stm32f74xx75xx_sdmmc.h" +#else +# error "Unsupported STM32 F7 part" +#endif + +#endif /* __ARCH_ARM_SRC_STM32F7_CHIP_STM32_SDMMC_H */ diff --git a/arch/arm/src/stm32f7/chip/stm32_spi.h b/arch/arm/src/stm32f7/chip/stm32_spi.h new file mode 100644 index 0000000000000000000000000000000000000000..1874d88bca62f4b3c662db89cfd3f211cceedf75 --- /dev/null +++ b/arch/arm/src/stm32f7/chip/stm32_spi.h @@ -0,0 +1,53 @@ +/************************************************************************************ + * arch/arm/src/stm32f7/chip/stm32_spi.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: 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. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32F7_CHIP_STM32_SPI_H +#define __ARCH_ARM_SRC_STM32F7_CHIP_STM32_SPI_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include "chip.h" + +#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) || \ + defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) +# include "chip/stm32f74xx77xx_spi.h" +#else +# error "Unsupported STM32 F7 sub family" +#endif +#endif /* __ARCH_ARM_SRC_STM32F7_CHIP_STM32_SPI_H */ diff --git a/arch/arm/src/stm32f7/chip/stm32_syscfg.h b/arch/arm/src/stm32f7/chip/stm32_syscfg.h index 37c82ec50cf4b6c87316f352cc8cacb4d33759d9..b17bc518aa2cce7ce9ba6ece9adc10b6051c14e1 100644 --- a/arch/arm/src/stm32f7/chip/stm32_syscfg.h +++ b/arch/arm/src/stm32f7/chip/stm32_syscfg.h @@ -2,7 +2,8 @@ * arch/arm/src/stm32f7/chip/stm32_syscfg.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -45,6 +46,8 @@ #if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) # include "chip/stm32f74xx75xx_syscfg.h" +#elif defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) +# include "chip/stm32f76xx77xx_syscfg.h" #else # error "Unsupported STM32 F7 part" #endif diff --git a/arch/arm/src/stm32f7/chip/stm32_tim.h b/arch/arm/src/stm32f7/chip/stm32_tim.h new file mode 100644 index 0000000000000000000000000000000000000000..77204d861d813fc912d22e7ada7516ac2beb213b --- /dev/null +++ b/arch/arm/src/stm32f7/chip/stm32_tim.h @@ -0,0 +1,55 @@ +/**************************************************************************************************** + * arch/arm/src/stm32f7/chip/stm32_tim.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: 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. + * + ****************************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32F7_CHIP_STM32_TIM_H +#define __ARCH_ARM_SRC_STM32F7_CHIP_STM32_TIM_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include "chip.h" + +#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) +# include "chip/stm32f74xx75xx_tim.h" +#elif defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) +# include "chip/stm32f76xx77xx_tim.h" +#else +# error "Unsupported STM32 F7 sub family" +#endif + +#endif /* __ARCH_ARM_SRC_STM32F7_CHIP_STM32_TIM_H */ diff --git a/arch/arm/src/stm32f7/chip/stm32_uart.h b/arch/arm/src/stm32f7/chip/stm32_uart.h index 0d48eaa399a94ae741256cb8cd20327af9624fdc..7669c675cc39162f66ccbf78492dd8c52b6ac005 100644 --- a/arch/arm/src/stm32f7/chip/stm32_uart.h +++ b/arch/arm/src/stm32f7/chip/stm32_uart.h @@ -1,8 +1,9 @@ /************************************************************************************ * arch/arm/src/stm32f7/chip/stm32_uart.h * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -43,8 +44,9 @@ #include #include "chip.h" -#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) -# include "chip/stm32f74xx75xx_uart.h" +#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) || \ + defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) +# include "chip/stm32f74xx77xx_uart.h" #else # error "Unsupported STM32 F7 part" #endif diff --git a/arch/arm/src/stm32f7/chip/stm32f74xx75xx_dma.h b/arch/arm/src/stm32f7/chip/stm32f74xx75xx_dma.h index a9acb05787178b750c099a549fb0845602706c7c..6b7fed23c16a6121b368e839f72fe2f7f51bd563 100644 --- a/arch/arm/src/stm32f7/chip/stm32f74xx75xx_dma.h +++ b/arch/arm/src/stm32f7/chip/stm32f74xx75xx_dma.h @@ -412,16 +412,16 @@ #define DMAMAP_SPDIFRX_CS STM32_DMA_MAP(DMA1,DMA_STREAM6,DMA_CHAN0) #define DMAMAP_SPI3_TX_2 STM32_DMA_MAP(DMA1,DMA_STREAM7,DMA_CHAN0) -#define DMAMAP_I2C1_RX_1 STM32_DMA_MAP(DMA1,DMA_STREAM0,DMA_CHAN1) -#define DMAMAP_I2C3_RX_1 STM32_DMA_MAP(DMA1,DMA_STREAM1,DMA_CHAN1) +#define DMAMAP_I2C1_RX STM32_DMA_MAP(DMA1,DMA_STREAM0,DMA_CHAN1) +#define DMAMAP_I2C3_RX STM32_DMA_MAP(DMA1,DMA_STREAM1,DMA_CHAN1) #define DMAMAP_TIM7_UP_1 STM32_DMA_MAP(DMA1,DMA_STREAM2,DMA_CHAN1) #define DMAMAP_TIM7_UP_2 STM32_DMA_MAP(DMA1,DMA_STREAM4,DMA_CHAN1) -#define DMAMAP_I2C1_RX_2 STM32_DMA_MAP(DMA1,DMA_STREAM5,DMA_CHAN1) -#define DMAMAP_I2C1_TX_1 STM32_DMA_MAP(DMA1,DMA_STREAM6,DMA_CHAN1) -#define DMAMAP_I2C1_TX_2 STM32_DMA_MAP(DMA1,DMA_STREAM7,DMA_CHAN1) +#define DMAMAP_I2C1_RX_1 STM32_DMA_MAP(DMA1,DMA_STREAM5,DMA_CHAN1) +#define DMAMAP_I2C1_TX STM32_DMA_MAP(DMA1,DMA_STREAM6,DMA_CHAN1) +#define DMAMAP_I2C1_TX_1 STM32_DMA_MAP(DMA1,DMA_STREAM7,DMA_CHAN1) #define DMAMAP_TIM4_CH1 STM32_DMA_MAP(DMA1,DMA_STREAM0,DMA_CHAN2) -#define DMAMAP_I2C_RX STM32_DMA_MAP(DMA1,DMA_STREAM2,DMA_CHAN2) +#define DMAMAP_I2C4_RX STM32_DMA_MAP(DMA1,DMA_STREAM2,DMA_CHAN2) #define DMAMAP_TIM4_CH2 STM32_DMA_MAP(DMA1,DMA_STREAM3,DMA_CHAN2) #define DMAMAP_I2C4_TX STM32_DMA_MAP(DMA1,DMA_STREAM5,DMA_CHAN2) #define DMAMAP_TIM4_UP STM32_DMA_MAP(DMA1,DMA_STREAM6,DMA_CHAN2) @@ -429,7 +429,7 @@ #define DMAMAP_TIM2_UP_1 STM32_DMA_MAP(DMA1,DMA_STREAM1,DMA_CHAN3) #define DMAMAP_TIM2_CH3 STM32_DMA_MAP(DMA1,DMA_STREAM1,DMA_CHAN3) -#define DMAMAP_I2C3_RX_2 STM32_DMA_MAP(DMA1,DMA_STREAM2,DMA_CHAN3) +#define DMAMAP_I2C3_RX_1 STM32_DMA_MAP(DMA1,DMA_STREAM2,DMA_CHAN3) #define DMAMAP_I2C3_TX STM32_DMA_MAP(DMA1,DMA_STREAM4,DMA_CHAN3) #define DMAMAP_TIM2_CH1 STM32_DMA_MAP(DMA1,DMA_STREAM5,DMA_CHAN3) #define DMAMAP_TIM2_CH2 STM32_DMA_MAP(DMA1,DMA_STREAM6,DMA_CHAN3) @@ -468,8 +468,8 @@ #define DMAMAP_TIM5_UP_2 STM32_DMA_MAP(DMA1,DMA_STREAM6,DMA_CHAN6) #define DMAMAP_TIM6_UP STM32_DMA_MAP(DMA1,DMA_STREAM1,DMA_CHAN7) -#define DMAMAP_I2C2_RX_1 STM32_DMA_MAP(DMA1,DMA_STREAM2,DMA_CHAN7) -#define DMAMAP_I2C2_RX_2 STM32_DMA_MAP(DMA1,DMA_STREAM3,DMA_CHAN7) +#define DMAMAP_I2C2_RX STM32_DMA_MAP(DMA1,DMA_STREAM2,DMA_CHAN7) +#define DMAMAP_I2C2_RX_1 STM32_DMA_MAP(DMA1,DMA_STREAM3,DMA_CHAN7) #define DMAMAP_USART3_TX_2 STM32_DMA_MAP(DMA1,DMA_STREAM4,DMA_CHAN7) #define DMAMAP_DAC1 STM32_DMA_MAP(DMA1,DMA_STREAM5,DMA_CHAN7) #define DMAMAP_DAC2 STM32_DMA_MAP(DMA1,DMA_STREAM6,DMA_CHAN7) diff --git a/arch/arm/src/stm32f7/chip/stm32f74xx75xx_flash.h b/arch/arm/src/stm32f7/chip/stm32f74xx75xx_flash.h index 69f4e217fca1a7d573cc9fc5da53acaca69eb7b1..74c2759fc94226c9ed3fb3da722d49339e9ca4cd 100644 --- a/arch/arm/src/stm32f7/chip/stm32f74xx75xx_flash.h +++ b/arch/arm/src/stm32f7/chip/stm32f74xx75xx_flash.h @@ -2,7 +2,8 @@ * arch/arm/src/stm32f7/chip/stm32f74xx75xx_flash.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -40,44 +41,62 @@ * Pre-processor Definitions ************************************************************************************/ -/* Flash size is not known from the chip configuration: +/* Flash size is known from the chip selection: + * + * When CONFIG_STM32F7_FLASH_OVERRIDE_DEFAULT is set the + * CONFIG_STM32F7_FLASH_CONFIG_x selects the default FLASH size based on the chip + * part number. This value can be overridden with CONFIG_STM32F7_FLASH_OVERRIDE_x * * Parts STM32F74xxE have 512Kb of FLASH * Parts STM32F74xxG have 1024Kb of FLASH * - * The user has to tell us the FLASH size by setting CONFIG_STM32F7_FLASH_SIZE + * N.B. Only Single bank mode is supported */ -#if defined(CONFIG_STM32F7_FLASH_512KB) +#define _K(x) ((x)*1024) + +#if !defined(CONFIG_STM32F7_FLASH_OVERRIDE_DEFAULT) && \ + !defined(CONFIG_STM32_FLASH_OVERRIDE_E) && \ + !defined(CONFIG_STM32_FLASH_OVERRIDE_F) && \ + !defined(CONFIG_STM32_FLASH_OVERRIDE_G) && \ + !defined(CONFIG_STM32_FLASH_CONFIG_E) && \ + !defined(CONFIG_STM32_FLASH_CONFIG_F) && \ + !defined(CONFIG_STM32_FLASH_CONFIG_G) +# define CONFIG_STM32_FLASH_OVERRIDE_E +# warning "Flash size not defined defaulting to 512KiB (E)" +#endif + +#if !defined(CONFIG_STM32F7_FLASH_OVERRIDE_DEFAULT) -# define STM32_FLASH_NPAGES 2 -# define STM32_FLASH_SIZE (512*1024) +# undef CONFIG_STM32F7_FLASH_CONFIG_E +# undef CONFIG_STM32F7_FLASH_CONFIG_G -#elif defined(CONFIG_STM32F7_FLASH_1024KB) +# if defined(CONFIG_STM32F7_FLASH_OVERRIDE_E) -# define STM32_FLASH_NPAGES 4 -# define STM32_FLASH_SIZE (1024*1024) +# define CONFIG_STM32F7_FLASH_CONFIG_E -#else -# warning Assuming FLASH size 1024KB +# elif defined(CONFIG_STM32F7_FLASH_OVERRIDE_G) -# define STM32_FLASH_NPAGES 4 -# define STM32_FLASH_SIZE (1024*1024) +# define CONFIG_STM32F7_FLASH_CONFIG_G +# endif #endif -/* The STM32F745xx/46xx have mixed page sizes: - * - * Sectors: 0-3: 32 KB - * Sector 4 128 KB - * Sectors: 5-7: 256 KB - * - * We use the largest page size and set the number of pages equal to the - * FLASH size assuming that fixed, largest pages size. - */ +#if defined(CONFIG_STM32_FLASH_CONFIG_E) + +# define STM32_FLASH_NPAGES 6 +# define STM32_FLASH_SIZE _K((4 * 32) + (1 * 128) + (1 * 256)) +# define STM32_FLASH_SIZES {_K(32), _K(32), _K(32), _K(32), \ + _K(128), _K(256)} -#define STM32_FLASH_PAGESIZE (256*1024) +#elif defined(CONFIG_STM32_FLASH_CONFIG_G) +# define STM32_FLASH_NPAGES 8 +# define STM32_FLASH_SIZE _K((4 * 32) + (1 * 128) + (3 * 256)) +# define STM32_FLASH_SIZES {_K(32), _K(32), _K(32), _K(32), \ + _K(128), _K(256), _K(256), _K(256)} + +#endif /* Register Offsets *****************************************************************/ @@ -133,8 +152,8 @@ #define FLASH_CR_SER (1 << 1) /* Bit 1: Sector Erase */ #define FLASH_CR_MER (1 << 2) /* Bit 2: Mass Erase sectors 0..11 */ #define FLASH_CR_SNB_SHIFT (3) /* Bits 3-6: Sector number */ -#define FLASH_CR_SNB_MASK (15 << FLASH_CR_SNB_SHIFT) -# define FLASH_CR_SNB(n) ((uint32_t)(n) << FLASH_CR_SNB_SHIFT) | ((n / 12) << 7)) /* Sector n, n=0..23 */ +#define FLASH_CR_SNB_MASK (0xf << FLASH_CR_SNB_SHIFT) +# define FLASH_CR_SNB(n) ((uint32_t)((n) % 8) << FLASH_CR_SNB_SHIFT) | ((n / 8) << 6)) /* Sector n, n=0..23 */ #define FLASH_CR_PSIZE_SHIFT (8) /* Bits 8-9: Program size */ #define FLASH_CR_PSIZE_MASK (3 << FLASH_CR_PSIZE_SHIFT) # define FLASH_CR_PSIZE_X8 (0 << FLASH_CR_PSIZE_SHIFT) /* Program x8 */ @@ -145,7 +164,6 @@ #define FLASH_CR_EOPIE (1 << 24) /* Bit 24: End of operation interrupt enable */ #define FLASH_CR_ERRIE (1 << 25) /* Bit 25: Error interrupt enable */ #define FLASH_CR_LOCK (1 << 31) /* Bit 31: Lock */ -#define FLASH_CR_MER1 (1 << 15) /* Bit 15: Mass Erase sectors 12..23 */ /* Flash Option Control Register (OPTCR) */ @@ -159,15 +177,15 @@ # define FLASH_OPTCR_VBOR0 (3 << FLASH_OPTCR_BORLEV_SHIFT) /* BOR off */ #define FLASH_OPTCR_USER_SHIFT (4) /* Bits 5-7: User option bytes */ #define FLASH_OPTCR_USER_MASK (15 << FLASH_OPTCR_USER_SHIFT) -# define FLASH_OPTCR_WWDG_SW (1 << 4) /* Bit 5: WWDG_SW */ +# define FLASH_OPTCR_WWDG_SW (1 << 4) /* Bit 4: WWDG_SW */ # define FLASH_OPTCR_IWDG_SW (1 << 5) /* Bit 5: IWDG_SW */ # define FLASH_OPTCR_NRST_STOP (1 << 6) /* Bit 6: nRST_STOP */ # define FLASH_OPTCR_NRST_STDBY (1 << 7) /* Bit 7: nRST_STDBY */ #define FLASH_OPTCR_RDP_SHIFT (8) /* Bits 8-15: Read protect */ #define FLASH_OPTCR_RDP_MASK (0xff << FLASH_OPTCR_RDP_SHIFT) # define FLASH_OPTCR_RDP(n) ((uint32_t)(n) << FLASH_OPTCR_RDP_SHIFT) -#define FLASH_OPTCR_NWRP_SHIFT (16) /* Bits 16-27: Not write protect */ -#define FLASH_OPTCR_NWRP_MASK (0xfff << FLASH_OPTCR_NWRP_SHIFT) +#define FLASH_OPTCR_NWRP_SHIFT (16) /* Bits 16-23: Not write protect */ +#define FLASH_OPTCR_NWRP_MASK (0xff << FLASH_OPTCR_NWRP_SHIFT) # define FLASH_OPTCR_NWRP(n) ((uint32_t)(n) << FLASH_OPTCR_NWRP_SHIFT) #define FLASH_OPTCR_IWDG_STDBY (1 << 30) /* Bit 30: IWDG freeze in stop mode */ #define FLASH_OPTCR_IWDG_STOP (1 << 31) /* Bit 31: IWDG freeze in standby mode */ diff --git a/arch/arm/src/stm32f7/chip/stm32f74xx75xx_gpio.h b/arch/arm/src/stm32f7/chip/stm32f74xx75xx_gpio.h index c996f7d1052226b065fc39140333050598ae890d..b8818f6e49b83ebe43e105c0732e3f1f86a947d6 100644 --- a/arch/arm/src/stm32f7/chip/stm32f74xx75xx_gpio.h +++ b/arch/arm/src/stm32f7/chip/stm32f74xx75xx_gpio.h @@ -61,7 +61,6 @@ #define STM32_GPIO_LCKR_OFFSET 0x001c /* GPIO port configuration lock register */ #define STM32_GPIO_AFRL_OFFSET 0x0020 /* GPIO alternate function low register */ #define STM32_GPIO_AFRH_OFFSET 0x0024 /* GPIO alternate function high register */ -#define STM32_GPIO_BRR_OFFSET 0x0028 /* GPIO port bit reset register */ /* Register Addresses ***************************************************************/ @@ -76,7 +75,6 @@ # define STM32_GPIOA_LCKR (STM32_GPIOA_BASE+STM32_GPIO_LCKR_OFFSET) # define STM32_GPIOA_AFRL (STM32_GPIOA_BASE+STM32_GPIO_AFRL_OFFSET) # define STM32_GPIOA_AFRH (STM32_GPIOA_BASE+STM32_GPIO_AFRH_OFFSET) -# define STM32_GPIOA_BRR (STM32_GPIOA_BASE+STM32_GPIO_BRR_OFFSET) #endif #if STM32F7_NGPIO > 1 @@ -90,7 +88,6 @@ # define STM32_GPIOB_LCKR (STM32_GPIOB_BASE+STM32_GPIO_LCKR_OFFSET) # define STM32_GPIOB_AFRL (STM32_GPIOB_BASE+STM32_GPIO_AFRL_OFFSET) # define STM32_GPIOB_AFRH (STM32_GPIOB_BASE+STM32_GPIO_AFRH_OFFSET) -# define STM32_GPIOB_BRR (STM32_GPIOB_BASE+STM32_GPIO_BRR_OFFSET) #endif #if STM32F7_NGPIO > 2 @@ -104,7 +101,6 @@ # define STM32_GPIOC_LCKR (STM32_GPIOC_BASE+STM32_GPIO_LCKR_OFFSET) # define STM32_GPIOC_AFRL (STM32_GPIOC_BASE+STM32_GPIO_AFRL_OFFSET) # define STM32_GPIOC_AFRH (STM32_GPIOC_BASE+STM32_GPIO_AFRH_OFFSET) -# define STM32_GPIOC_BRR (STM32_GPIOC_BASE+STM32_GPIO_BRR_OFFSET) #endif #if STM32F7_NGPIO > 3 @@ -118,7 +114,6 @@ # define STM32_GPIOD_LCKR (STM32_GPIOD_BASE+STM32_GPIO_LCKR_OFFSET) # define STM32_GPIOD_AFRL (STM32_GPIOD_BASE+STM32_GPIO_AFRL_OFFSET) # define STM32_GPIOD_AFRH (STM32_GPIOD_BASE+STM32_GPIO_AFRH_OFFSET) -# define STM32_GPIOD_BRR (STM32_GPIOD_BASE+STM32_GPIO_BRR_OFFSET) #endif #if STM32F7_NGPIO > 4 @@ -132,7 +127,6 @@ # define STM32_GPIOE_LCKR (STM32_GPIOE_BASE+STM32_GPIO_LCKR_OFFSET) # define STM32_GPIOE_AFRL (STM32_GPIOE_BASE+STM32_GPIO_AFRL_OFFSET) # define STM32_GPIOE_AFRH (STM32_GPIOE_BASE+STM32_GPIO_AFRH_OFFSET) -# define STM32_GPIOE_BRR (STM32_GPIOE_BASE+STM32_GPIO_BRR_OFFSET) #endif #if STM32F7_NGPIO > 5 @@ -146,7 +140,6 @@ # define STM32_GPIOF_LCKR (STM32_GPIOF_BASE+STM32_GPIO_LCKR_OFFSET) # define STM32_GPIOF_AFRL (STM32_GPIOF_BASE+STM32_GPIO_AFRL_OFFSET) # define STM32_GPIOF_AFRH (STM32_GPIOF_BASE+STM32_GPIO_AFRH_OFFSET) -# define STM32_GPIOF_BRR (STM32_GPIOF_BASE+STM32_GPIO_BRR_OFFSET) #endif #if STM32F7_NGPIO > 6 @@ -160,7 +153,6 @@ # define STM32_GPIOG_LCKR (STM32_GPIOG_BASE+STM32_GPIO_LCKR_OFFSET) # define STM32_GPIOG_AFRL (STM32_GPIOG_BASE+STM32_GPIO_AFRL_OFFSET) # define STM32_GPIOG_AFRH (STM32_GPIOG_BASE+STM32_GPIO_AFRH_OFFSET) -# define STM32_GPIOG_BRR (STM32_GPIOG_BASE+STM32_GPIO_BRR_OFFSET) #endif #if STM32F7_NGPIO > 7 @@ -174,7 +166,6 @@ # define STM32_GPIOH_LCKR (STM32_GPIOH_BASE+STM32_GPIO_LCKR_OFFSET) # define STM32_GPIOH_AFRL (STM32_GPIOH_BASE+STM32_GPIO_AFRL_OFFSET) # define STM32_GPIOH_AFRH (STM32_GPIOH_BASE+STM32_GPIO_AFRH_OFFSET) -# define STM32_GPIOH_BRR (STM32_GPIOH_BASE+STM32_GPIO_BRR_OFFSET) #endif #if STM32F7_NGPIO > 8 @@ -188,7 +179,6 @@ # define STM32_GPIOI_LCKR (STM32_GPIOI_BASE+STM32_GPIO_LCKR_OFFSET) # define STM32_GPIOI_AFRL (STM32_GPIOI_BASE+STM32_GPIO_AFRL_OFFSET) # define STM32_GPIOI_AFRH (STM32_GPIOI_BASE+STM32_GPIO_AFRH_OFFSET) -# define STM32_GPIOI_BRR (STM32_GPIOI_BASE+STM32_GPIO_BRR_OFFSET) #endif #if STM32F7_NGPIO > 9 @@ -202,7 +192,6 @@ # define STM32_GPIOJ_LCKR (STM32_GPIOJ_BASE+STM32_GPIO_LCKR_OFFSET) # define STM32_GPIOJ_AFRL (STM32_GPIOJ_BASE+STM32_GPIO_AFRL_OFFSET) # define STM32_GPIOJ_AFRH (STM32_GPIOJ_BASE+STM32_GPIO_AFRH_OFFSET) -# define STM32_GPIOJ_BRR (STM32_GPIOJ_BASE+STM32_GPIO_BRR_OFFSET) #endif #if STM32F7_NGPIO > 10 @@ -216,7 +205,6 @@ # define STM32_GPIOK_LCKR (STM32_GPIOK_BASE+STM32_GPIO_LCKR_OFFSET) # define STM32_GPIOK_AFRL (STM32_GPIOK_BASE+STM32_GPIO_AFRL_OFFSET) # define STM32_GPIOK_AFRH (STM32_GPIOK_BASE+STM32_GPIO_AFRH_OFFSET) -# define STM32_GPIOK_BRR (STM32_GPIOK_BASE+STM32_GPIO_BRR_OFFSET) #endif /* Register Bitfield Definitions ****************************************************/ @@ -411,9 +399,5 @@ #define GPIO_AFRH15_SHIFT (28) #define GPIO_AFRH15_MASK (15 << GPIO_AFRH15_SHIFT) -/* GPIO port bit reset register */ - -#define GPIO_BRR(n) (1 << (n)) - #endif /* CONFIG_STM32F7_STM32F74XX || CONFIG_STM32F7_STM32F75XX */ #endif /* __ARCH_ARM_SRC_STM32F7_CHIP_STM32F74XX75XX_GPIO_H */ diff --git a/arch/arm/src/stm32f7/chip/stm32f74xx75xx_memorymap.h b/arch/arm/src/stm32f7/chip/stm32f74xx75xx_memorymap.h index 82a5d2242bc036c54485630992d9c2dc3745a972..b68797d00683ec158816aa976e805924e256bdb5 100644 --- a/arch/arm/src/stm32f7/chip/stm32f74xx75xx_memorymap.h +++ b/arch/arm/src/stm32f7/chip/stm32f74xx75xx_memorymap.h @@ -2,7 +2,8 @@ * arch/arm/src/stm3fr2/chip/stm32f74xxx75xxx_memorymap.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -59,9 +60,8 @@ #define STM32_FSMC_BASE34 0x80000000 /* 0x80000000-0x8fffffff: 512Mb FSMC bank3&4 block */ # define STM32_FSMC_BANK3 0x80000000 /* 0x80000000-0x8fffffff: 256Mb NAND FLASH */ # define STM32_FSMC_BANK4 0x90000000 /* 0x90000000-0x9fffffff: 256Mb PC CARD */ -#define STM32_AHB3_BASE 0xa0000000 /* 0xa0000000-0xa0001fff: 256Mb AHB3 peripheral block */ #define STM32_FSMC_BASE5 0xc0000000 /* 0xc0000000-0xcfffffff: 256Mb FSMC */ -#define STM32_FSMC_BASE6 0xc0000000 /* 0xd0000000-0xdfffffff: 256Mb FSMC */ +#define STM32_FSMC_BASE6 0xd0000000 /* 0xd0000000-0xdfffffff: 256Mb FSMC */ #define STM32_CORTEX_BASE 0xe0000000 /* 0xe0000000-0xffffffff: 512Mb Cortex-M7 block */ #define STM32_REGION_MASK 0xf0000000 @@ -82,6 +82,7 @@ #define STM32_SYSMEM_AXIM 0x1ff00000 /* 0x1ff00000-0x1ff0edbf: System memory (AXIM) */ +#define STM32_SYSMEM_UID 0x1ff0f420 /* The 96-bit unique device identifier */ #define STM32_OTP_ICTM 0x0010f000 /* 0x0010f000-0x0010edbf: OTP (ITCM) */ #define STM32_OTP_AXIM 0x1ff0f000 /* 0x1ff00000-0x1ff0f41f: OTP (AXIM) */ @@ -97,6 +98,7 @@ #define STM32_APB2_BASE 0x40010000 /* 0x40010000-0x40016bff: APB2 */ #define STM32_AHB1_BASE 0x40020000 /* 0x40020000-0x4007ffff: APB1 */ #define STM32_AHB2_BASE 0x50000000 /* 0x50000000-0x5003ffff: AHB2 */ +#define STM32_AHB3_BASE 0x60000000 /* 0x60000000-0xdfffffff: AHB3 */ /* APB1 Base Addresses **************************************************************/ @@ -142,6 +144,10 @@ #define STM32_USART1_BASE 0x40011000 /* 0x40011000-0x400113ff: USART1 */ #define STM32_USART6_BASE 0x40011400 /* 0x40011400-0x400117ff: USART6 */ #define STM32_ADC_BASE 0x40012000 /* 0x40012000-0x400123ff: ADC1 - ADC2 - ADC3 */ +# define STM32_ADC1_BASE 0x40012000 /* ADC1 */ +# define STM32_ADC2_BASE 0x40012100 /* ADC2 */ +# define STM32_ADC3_BASE 0x40012200 /* ADC3 */ +# define STM32_ADCCMN_BASE 0x40012300 /* Common */ #define STM32_SDMMC1_BASE 0x40012c00 /* 0x40012c00-0x40012fff: SDMMC1 */ #define STM32_SPI1_BASE 0x40013000 /* 0x40013000-0x400133ff: SPI1 */ #define STM32_SPI4_BASE 0x40013400 /* 0x40013400-0x400137ff: SPI4 */ @@ -203,5 +209,7 @@ * address range */ +#define STM32_DEBUGMCU_BASE 0xe0042000 + #endif /* CONFIG_STM32F7_STM32F74XX || CONFIG_STM32F7_STM32F75XX */ #endif /* __ARCH_ARM_SRC_STM32F7_CHIP_STM32F74XXX75XXX_MEMORYMAP_H */ diff --git a/arch/arm/src/stm32f7/chip/stm32f74xx75xx_pinmap.h b/arch/arm/src/stm32f7/chip/stm32f74xx75xx_pinmap.h index 64b68653d188a853236f8107287e0e6c4b904f98..4e0410bc16fa60793b40f03a36677c8d881cd814 100644 --- a/arch/arm/src/stm32f7/chip/stm32f74xx75xx_pinmap.h +++ b/arch/arm/src/stm32f7/chip/stm32f74xx75xx_pinmap.h @@ -2,7 +2,8 @@ * arch/arm/src/stm32f7/chip/stm32f74xx75xx_pinmap.h * * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -50,7 +51,7 @@ * Pre-processor Definitions ************************************************************************************/ -/* Alternate Pin Functions. All members of the STM32F40xxx family share the same +/* Alternate Pin Functions. All members of the STM32F74|5xxx family share the same * pin multiplexing (although they may differ in the pins physically available). * * Alternative pin selections are provided with a numeric suffix like _1, _2, etc. diff --git a/arch/arm/src/stm32f7/chip/stm32f74xx75xx_pwr.h b/arch/arm/src/stm32f7/chip/stm32f74xx75xx_pwr.h index e7c58b19ff57c720cad80b2dc006a79df8750aaa..547b555a92b61946bcec54eb3ec3e6824b5de7d2 100644 --- a/arch/arm/src/stm32f7/chip/stm32f74xx75xx_pwr.h +++ b/arch/arm/src/stm32f7/chip/stm32f74xx75xx_pwr.h @@ -1,8 +1,9 @@ /************************************************************************************ - * arch/arm/src/stm32f7/chip/stm32_pwr.h + * arch/arm/src/stm32f7/chip/stm32f74xx75xx_pwr.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -103,6 +104,7 @@ #define PWR_CSR1_SBF (1 << 1) /* Bit 1: Standby flag */ #define PWR_CSR1_PVDO (1 << 2) /* Bit 2: PVD Output */ #define PWR_CSR1_BRR (1 << 3) /* Bit 3: Backup regulator ready */ +#define PWR_CSR1_EIWUP (1 << 8) /* Bit 8: Enable internal wakeup */ #define PWR_CSR1_BRE (1 << 9) /* Bit 9: Backup regulator enable */ #define PWR_CSR1_VOSRDY (1 << 14) /* Bit 14: Regulator voltage scaling output selection ready bite */ #define PWR_CSR1_ODRDY (1 << 16) /* Bit 16: Over Drive generator ready */ diff --git a/arch/arm/src/stm32f7/chip/stm32f74xx75xx_rcc.h b/arch/arm/src/stm32f7/chip/stm32f74xx75xx_rcc.h index 0cdc92c7276b5aa3a080d3aea0bbfaeab91a26a1..881f17dc560a47e47ac32e9dbdcaa8204d8d63b3 100644 --- a/arch/arm/src/stm32f7/chip/stm32f74xx75xx_rcc.h +++ b/arch/arm/src/stm32f7/chip/stm32f74xx75xx_rcc.h @@ -1,8 +1,9 @@ /**************************************************************************************************** * arch/arm/src/stm32f7/chip/stm32f74xx75xx_rcc.h * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -616,7 +617,7 @@ #define RCC_DCKCFGR1_SAI2SEL_SHIFT (22) /* Bits 22-23: SAI 2 clock source selection */ #define RCC_DCKCFGR1_SAI2SEL_MASK (0x3 << RCC_DCKCFGR1_SAI2SEL_SHIFT) # define RCC_DCKCFGR1_SAI2SEL(n) ((n) << RCC_DCKCFGR1_SAI2SEL_SHIFT) -#define RCC_DCKCFGR1_TIMPRE (1 << 24) /* Bit 24: Timer clock prescaler selection */ +#define RCC_DCKCFGR1_TIMPRESEL (1 << 24) /* Bit 24: Timer clock prescaler selection */ /* Dedicated clocks configuration register 2 */ diff --git a/arch/arm/src/stm32f7/chip/stm32f74xx75xx_sdmmc.h b/arch/arm/src/stm32f7/chip/stm32f74xx75xx_sdmmc.h new file mode 100644 index 0000000000000000000000000000000000000000..117c4da2faf7782ce2e33c4cf9056bc8b33c4f34 --- /dev/null +++ b/arch/arm/src/stm32f7/chip/stm32f74xx75xx_sdmmc.h @@ -0,0 +1,268 @@ +/************************************************************************************ + * arch/arm/src/stm32f7/chip/stm32_sdmmc.h + * + * Copyright (C) 2009, 2011-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_STM32F7_CHIP_STM32F74XX75XX_SDMMC_H +#define __ARCH_ARM_SRC_STM32F7_CHIP_STM32F74XX75XX_SDMMC_H + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Register Offsets *****************************************************************/ + +#define STM32_SDMMC1_POWER_OFFSET 0x0000 /* SDIO power control register */ +#define STM32_SDMMC1_CLKCR_OFFSET 0x0004 /* SDI clock control register */ +#define STM32_SDMMC1_ARG_OFFSET 0x0008 /* SDIO argument register */ +#define STM32_SDMMC1_CMD_OFFSET 0x000c /* SDIO command register */ +#define STM32_SDMMC1_RESPCMD_OFFSET 0x0010 /* SDIO command response register */ +#define STM32_SDMMC1_RESP_OFFSET(n) (0x0010+4*(n)) +#define STM32_SDMMC1_RESP1_OFFSET 0x0014 /* SDIO response 1 register */ +#define STM32_SDMMC1_RESP2_OFFSET 0x0018 /* SDIO response 2 register */ +#define STM32_SDMMC1_RESP3_OFFSET 0x001c /* SDIO response 3 register */ +#define STM32_SDMMC1_RESP4_OFFSET 0x0020 /* SDIO response 4 register */ +#define STM32_SDMMC1_DTIMER_OFFSET 0x0024 /* SDIO data timer register */ +#define STM32_SDMMC1_DLEN_OFFSET 0x0028 /* SDIO data length register */ +#define STM32_SDMMC1_DCTRL_OFFSET 0x002c /* SDIO data control register */ +#define STM32_SDMMC1_DCOUNT_OFFSET 0x0030 /* SDIO data counter register */ +#define STM32_SDMMC1_STA_OFFSET 0x0034 /* SDIO status register */ +#define STM32_SDMMC1_ICR_OFFSET 0x0038 /* SDIO interrupt clear register */ +#define STM32_SDMMC1_MASK_OFFSET 0x003c /* SDIO mask register */ +#define STM32_SDMMC1_FIFOCNT_OFFSET 0x0048 /* SDIO FIFO counter register */ +#define STM32_SDMMC1_FIFO_OFFSET 0x0080 /* SDIO data FIFO register */ + +/* Register Addresses ***************************************************************/ + +#define STM32_SDMMC1_POWER (STM32_SDMMC1_BASE+STM32_SDMMC1_POWER_OFFSET) +#define STM32_SDMMC1_CLKCR (STM32_SDMMC1_BASE+STM32_SDMMC1_CLKCR_OFFSET) +#define STM32_SDMMC1_ARG (STM32_SDMMC1_BASE+STM32_SDMMC1_ARG_OFFSET) +#define STM32_SDMMC1_CMD (STM32_SDMMC1_BASE+STM32_SDMMC1_CMD_OFFSET) +#define STM32_SDMMC1_RESPCMD (STM32_SDMMC1_BASE+STM32_SDMMC1_RESPCMD_OFFSET) +#define STM32_SDMMC1_RESP(n) (STM32_SDMMC1_BASE+STM32_SDMMC1_RESP_OFFSET(n)) +#define STM32_SDMMC1_RESP1 (STM32_SDMMC1_BASE+STM32_SDMMC1_RESP1_OFFSET) +#define STM32_SDMMC1_RESP2 (STM32_SDMMC1_BASE+STM32_SDMMC1_RESP2_OFFSET) +#define STM32_SDMMC1_RESP3 (STM32_SDMMC1_BASE+STM32_SDMMC1_RESP3_OFFSET) +#define STM32_SDMMC1_RESP4 (STM32_SDMMC1_BASE+STM32_SDMMC1_RESP4_OFFSET) +#define STM32_SDMMC1_DTIMER (STM32_SDMMC1_BASE+STM32_SDMMC1_DTIMER_OFFSET) +#define STM32_SDMMC1_DLEN (STM32_SDMMC1_BASE+STM32_SDMMC1_DLEN_OFFSET) +#define STM32_SDMMC1_DCTRL (STM32_SDMMC1_BASE+STM32_SDMMC1_DCTRL_OFFSET) +#define STM32_SDMMC1_DCOUNT (STM32_SDMMC1_BASE+STM32_SDMMC1_DCOUNT_OFFSET) +#define STM32_SDMMC1_STA (STM32_SDMMC1_BASE+STM32_SDMMC1_STA_OFFSET) +#define STM32_SDMMC1_ICR (STM32_SDMMC1_BASE+STM32_SDMMC1_ICR_OFFSET) +#define STM32_SDMMC1_MASK (STM32_SDMMC1_BASE+STM32_SDMMC1_MASK_OFFSET) +#define STM32_SDMMC1_FIFOCNT (STM32_SDMMC1_BASE+STM32_SDMMC1_FIFOCNT_OFFSET) +#define STM32_SDMMC1_FIFO (STM32_SDMMC1_BASE+STM32_SDMMC1_FIFO_OFFSET) + + +/* Register Bitfield Definitions ****************************************************/ + +#define SDIO_POWER_PWRCTRL_SHIFT (0) /* Bits 0-1: Power supply control bits */ +#define SDIO_POWER_PWRCTRL_MASK (3 << SDIO_POWER_PWRCTRL_SHIFT) +# define SDIO_POWER_PWRCTRL_OFF (0 << SDIO_POWER_PWRCTRL_SHIFT) /* 00: Power-off: card clock stopped */ +# define SDIO_POWER_PWRCTRL_PWRUP (2 << SDIO_POWER_PWRCTRL_SHIFT) /* 10: Reserved power-up */ +# define SDIO_POWER_PWRCTRL_ON (3 << SDIO_POWER_PWRCTRL_SHIFT) /* 11: Power-on: card is clocked */ + +#define SDIO_POWER_RESET (0) /* Reset value */ + +#define SDIO_CLKCR_CLKDIV_SHIFT (0) /* Bits 7-0: Clock divide factor */ +#define SDIO_CLKCR_CLKDIV_MASK (0xff << SDIO_CLKCR_CLKDIV_SHIFT) +#define SDIO_CLKCR_CLKEN (1 << 8) /* Bit 8: Clock enable bit */ +#define SDIO_CLKCR_PWRSAV (1 << 9) /* Bit 9: Power saving configuration bit */ +#define SDIO_CLKCR_BYPASS (1 << 10) /* Bit 10: Clock divider bypass enable bit */ +#define SDIO_CLKCR_WIDBUS_SHIFT (11) /* Bits 12-11: Wide bus mode enable bits */ +#define SDIO_CLKCR_WIDBUS_MASK (3 << SDIO_CLKCR_WIDBUS_SHIFT) +# define SDIO_CLKCR_WIDBUS_D1 (0 << SDIO_CLKCR_WIDBUS_SHIFT) /* 00: Default (SDIO_D0) */ +# define SDIO_CLKCR_WIDBUS_D4 (1 << SDIO_CLKCR_WIDBUS_SHIFT) /* 01: 4-wide (SDIO_D[3:0]) */ +# define SDIO_CLKCR_WIDBUS_D8 (2 << SDIO_CLKCR_WIDBUS_SHIFT) /* 10: 8-wide (SDIO_D[7:0]) */ +#define SDIO_CLKCR_NEGEDGE (1 << 13) /* Bit 13: SDIO_CK dephasing selection bit */ +#define SDIO_CLKCR_HWFC_EN (1 << 14) /* Bit 14: HW Flow Control enable */ + +#define SDIO_CLKCR_RESET (0) /* Reset value */ +#define SDIO_ARG_RESET (0) /* Reset value */ + +#define SDIO_CLKCR_CLKEN_BB (STM32_SDMMC1_CLKCR_BB + (8 * 4)) +#define SDIO_CLKCR_PWRSAV_BB (STM32_SDMMC1_CLKCR_BB + (9 * 4)) +#define SDIO_CLKCR_BYPASS_BB (STM32_SDMMC1_CLKCR_BB + (10 * 4)) +#define SDIO_CLKCR_NEGEDGE_BB (STM32_SDMMC1_CLKCR_BB + (13 * 4)) +#define SDIO_CLKCR_HWFC_EN_BB (STM32_SDMMC1_CLKCR_BB + (14 * 4)) + +#define SDIO_CMD_CMDINDEX_SHIFT (0) +#define SDIO_CMD_CMDINDEX_MASK (0x3f << SDIO_CMD_CMDINDEX_SHIFT) +#define SDIO_CMD_WAITRESP_SHIFT (6) /* Bits 7-6: Wait for response bits */ +#define SDIO_CMD_WAITRESP_MASK (3 << SDIO_CMD_WAITRESP_SHIFT) +# define SDIO_CMD_NORESPONSE (0 << SDIO_CMD_WAITRESP_SHIFT) /* 00/10: No response */ +# define SDIO_CMD_SHORTRESPONSE (1 << SDIO_CMD_WAITRESP_SHIFT) /* 01: Short response */ +# define SDIO_CMD_LONGRESPONSE (3 << SDIO_CMD_WAITRESP_SHIFT) /* 11: Long response */ +#define SDIO_CMD_WAITINT (1 << 8) /* Bit 8: CPSM waits for interrupt request */ +#define SDIO_CMD_WAITPEND (1 << 9) /* Bit 9: CPSM Waits for ends of data transfer */ +#define SDIO_CMD_CPSMEN (1 << 10) /* Bit 10: Command path state machine enable */ +#define SDIO_CMD_SUSPEND (1 << 11) /* Bit 11: SD I/O suspend command */ +#define SDIO_CMD_ENDCMD (1 << 12) /* Bit 12: Enable CMD completion */ +#define SDIO_CMD_NIEN (1 << 13) /* Bit 13: not Interrupt Enable */ +#define SDIO_CMD_ATACMD (1 << 14) /* Bit 14: CE-ATA command */ + +#define SDIO_CMD_RESET (0) /* Reset value */ + +#define SDIO_CMD_WAITINT_BB (STM32_SDMMC1_CMD_BB + (8 * 4)) +#define SDIO_CMD_WAITPEND_BB (STM32_SDMMC1_CMD_BB + (9 * 4)) +#define SDIO_CMD_CPSMEN_BB (STM32_SDMMC1_CMD_BB + (10 * 4)) +#define SDIO_CMD_SUSPEND_BB (STM32_SDMMC1_CMD_BB + (11 * 4)) +#define SDIO_CMD_ENCMD_BB (STM32_SDMMC1_CMD_BB + (12 * 4)) +#define SDIO_CMD_NIEN_BB (STM32_SDMMC1_CMD_BB + (13 * 4)) +#define SDIO_CMD_ATACMD_BB (STM32_SDMMC1_CMD_BB + (14 * 4)) + +#define SDIO_RESPCMD_SHIFT (0) +#define SDIO_RESPCMD_MASK (0x3f << SDIO_RESPCMD_SHIFT) + +#define SDIO_DTIMER_RESET (0) /* Reset value */ + +#define SDIO_DLEN_SHIFT (0) +#define SDIO_DLEN_MASK (0x01ffffff << SDIO_DLEN_SHIFT) + +#define SDIO_DLEN_RESET (0) /* Reset value */ + +#define SDIO_DCTRL_DTEN (1 << 0) /* Bit 0: Data transfer enabled bit */ +#define SDIO_DCTRL_DTDIR (1 << 1) /* Bit 1: Data transfer direction */ +#define SDIO_DCTRL_DTMODE (1 << 2) /* Bit 2: Data transfer mode */ +#define SDIO_DCTRL_DMAEN (1 << 3) /* Bit 3: DMA enable bit */ +#define SDIO_DCTRL_DBLOCKSIZE_SHIFT (4) /* Bits 7-4: Data block size */ +#define SDIO_DCTRL_DBLOCKSIZE_MASK (15 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) +# define SDIO_DCTRL_1BYTE (0 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) +# define SDIO_DCTRL_2BYTES (1 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) +# define SDIO_DCTRL_4BYTES (2 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) +# define SDIO_DCTRL_8BYTES (3 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) +# define SDIO_DCTRL_16BYTES (4 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) +# define SDIO_DCTRL_32BYTES (5 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) +# define SDIO_DCTRL_64BYTES (6 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) +# define SDIO_DCTRL_128BYTES (7 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) +# define SDIO_DCTRL_256BYTES (8 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) +# define SDIO_DCTRL_512BYTES (9 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) +# define SDIO_DCTRL_1KBYTE (10 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) +# define SDIO_DCTRL_2KBYTES (11 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) +# define SDIO_DCTRL_4KBYTES (12 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) +# define SDIO_DCTRL_8KBYTES (13 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) +# define SDIO_DCTRL_16KBYTES (14 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) +#define SDIO_DCTRL_RWSTART (1 << 8) /* Bit 8: Read wait start */ +#define SDIO_DCTRL_RWSTOP (1 << 9) /* Bit 9: Read wait stop */ +#define SDIO_DCTRL_RWMOD (1 << 10) /* Bit 10: Read wait mode */ +#define SDIO_DCTRL_SDIOEN (1 << 11) /* Bit 11: SD I/O enable functions */ + +#define SDIO_DCTRL_RESET (0) /* Reset value */ + +#define SDIO_DCTRL_DTEN_BB (STM32_SDMMC1_DCTRL_BB + (0 * 4)) +#define SDIO_DCTRL_DTDIR_BB (STM32_SDMMC1_DCTRL_BB + (1 * 4)) +#define SDIO_DCTRL_DTMODE_BB (STM32_SDMMC1_DCTRL_BB + (2 * 4)) +#define SDIO_DCTRL_DMAEN_BB (STM32_SDMMC1_DCTRL_BB + (3 * 4)) +#define SDIO_DCTRL_RWSTART_BB (STM32_SDMMC1_DCTRL_BB + (8 * 4)) +#define SDIO_DCTRL_RWSTOP_BB (STM32_SDMMC1_DCTRL_BB + (9 * 4)) +#define SDIO_DCTRL_RWMOD_BB (STM32_SDMMC1_DCTRL_BB + (10 * 4)) +#define SDIO_DCTRL_SDIOEN_BB (STM32_SDMMC1_DCTRL_BB + (11 * 4)) + +#define SDIO_DATACOUNT_SHIFT (0) +#define SDIO_DATACOUNT_MASK (0x01ffffff << SDIO_DATACOUNT_SHIFT) + +#define SDIO_STA_CCRCFAIL (1 << 0) /* Bit 0: Command response CRC fail */ +#define SDIO_STA_DCRCFAIL (1 << 1) /* Bit 1: Data block CRC fail */ +#define SDIO_STA_CTIMEOUT (1 << 2) /* Bit 2: Command response timeout */ +#define SDIO_STA_DTIMEOUT (1 << 3) /* Bit 3: Data timeout */ +#define SDIO_STA_TXUNDERR (1 << 4) /* Bit 4: Transmit FIFO underrun error */ +#define SDIO_STA_RXOVERR (1 << 5) /* Bit 5: Received FIFO overrun error */ +#define SDIO_STA_CMDREND (1 << 6) /* Bit 6: Command response received */ +#define SDIO_STA_CMDSENT (1 << 7) /* Bit 7: Command sent */ +#define SDIO_STA_DATAEND (1 << 8) /* Bit 8: Data end */ +#define SDIO_STA_STBITERR (1 << 9) /* Bit 9: Start bit not detected */ +#define SDIO_STA_DBCKEND (1 << 10) /* Bit 10: Data block sent/received */ +#define SDIO_STA_CMDACT (1 << 11) /* Bit 11: Command transfer in progress */ +#define SDIO_STA_TXACT (1 << 12) /* Bit 12: Data transmit in progress */ +#define SDIO_STA_RXACT (1 << 13) /* Bit 13: Data receive in progress */ +#define SDIO_STA_TXFIFOHE (1 << 14) /* Bit 14: Transmit FIFO half empty */ +#define SDIO_STA_RXFIFOHF (1 << 15) /* Bit 15: Receive FIFO half full */ +#define SDIO_STA_TXFIFOF (1 << 16) /* Bit 16: Transmit FIFO full */ +#define SDIO_STA_RXFIFOF (1 << 17) /* Bit 17: Receive FIFO full */ +#define SDIO_STA_TXFIFOE (1 << 18) /* Bit 18: Transmit FIFO empty */ +#define SDIO_STA_RXFIFOE (1 << 19) /* Bit 19: Receive FIFO empty */ +#define SDIO_STA_TXDAVL (1 << 20) /* Bit 20: Data available in transmit FIFO */ +#define SDIO_STA_RXDAVL (1 << 21) /* Bit 21: Data available in receive FIFO */ +#define SDIO_STA_SDIOIT (1 << 22) /* Bit 22: SDIO interrupt received */ +#define SDIO_STA_CEATAEND (1 << 23) /* Bit 23: CMD6 CE-ATA command completion */ + +#define SDIO_ICR_CCRCFAILC (1 << 0) /* Bit 0: CCRCFAIL flag clear bit */ +#define SDIO_ICR_DCRCFAILC (1 << 1) /* Bit 1: DCRCFAIL flag clear bit */ +#define SDIO_ICR_CTIMEOUTC (1 << 2) /* Bit 2: CTIMEOUT flag clear bit */ +#define SDIO_ICR_DTIMEOUTC (1 << 3) /* Bit 3: DTIMEOUT flag clear bit */ +#define SDIO_ICR_TXUNDERRC (1 << 4) /* Bit 4: TXUNDERR flag clear bit */ +#define SDIO_ICR_RXOVERRC (1 << 5) /* Bit 5: RXOVERR flag clear bit */ +#define SDIO_ICR_CMDRENDC (1 << 6) /* Bit 6: CMDREND flag clear bit */ +#define SDIO_ICR_CMDSENTC (1 << 7) /* Bit 7: CMDSENT flag clear bit */ +#define SDIO_ICR_DATAENDC (1 << 8) /* Bit 8: DATAEND flag clear bit */ +#define SDIO_ICR_STBITERRC (1 << 9) /* Bit 9: STBITERR flag clear bit */ +#define SDIO_ICR_DBCKENDC (1 << 10) /* Bit 10: DBCKEND flag clear bit */ +#define SDIO_ICR_SDIOITC (1 << 22) /* Bit 22: SDIOIT flag clear bit */ +#define SDIO_ICR_CEATAENDC (1 << 23) /* Bit 23: CEATAEND flag clear bit */ + +#define SDIO_ICR_RESET 0x00c007ff +#define SDIO_ICR_STATICFLAGS 0x000005ff + +#define SDIO_MASK_CCRCFAILIE (1 << 0) /* Bit 0: Command CRC fail interrupt enable */ +#define SDIO_MASK_DCRCFAILIE (1 << 1) /* Bit 1: Data CRC fail interrupt enable */ +#define SDIO_MASK_CTIMEOUTIE (1 << 2) /* Bit 2: Command timeout interrupt enable */ +#define SDIO_MASK_DTIMEOUTIE (1 << 3) /* Bit 3: Data timeout interrupt enable */ +#define SDIO_MASK_TXUNDERRIE (1 << 4) /* Bit 4: Tx FIFO underrun error interrupt enable */ +#define SDIO_MASK_RXOVERRIE (1 << 5) /* Bit 5: Rx FIFO overrun error interrupt enable */ +#define SDIO_MASK_CMDRENDIE (1 << 6) /* Bit 6: Command response received interrupt enable */ +#define SDIO_MASK_CMDSENTIE (1 << 7) /* Bit 7: Command sent interrupt enable */ +#define SDIO_MASK_DATAENDIE (1 << 8) /* Bit 8: Data end interrupt enable */ +#define SDIO_MASK_STBITERRIE (1 << 9) /* Bit 9: Start bit error interrupt enable */ +#define SDIO_MASK_DBCKENDIE (1 << 10) /* Bit 10: Data block end interrupt enable */ +#define SDIO_MASK_CMDACTIE (1 << 11) /* Bit 11: Command acting interrupt enable */ +#define SDIO_MASK_TXACTIE (1 << 12) /* Bit 12: Data transmit acting interrupt enable */ +#define SDIO_MASK_RXACTIE (1 << 13) /* Bit 13: Data receive acting interrupt enable */ +#define SDIO_MASK_TXFIFOHEIE (1 << 14) /* Bit 14: Tx FIFO half empty interrupt enable */ +#define SDIO_MASK_RXFIFOHFIE (1 << 15) /* Bit 15: Rx FIFO half full interrupt enable */ +#define SDIO_MASK_TXFIFOFIE (1 << 16) /* Bit 16: Tx FIFO full interrupt enable */ +#define SDIO_MASK_RXFIFOFIE (1 << 17) /* Bit 17: Rx FIFO full interrupt enable */ +#define SDIO_MASK_TXFIFOEIE (1 << 18) /* Bit 18: Tx FIFO empty interrupt enable */ +#define SDIO_MASK_RXFIFOEIE (1 << 19) /* Bit 19: Rx FIFO empty interrupt enable */ +#define SDIO_MASK_TXDAVLIE (1 << 20) /* Bit 20: Data available in Tx FIFO interrupt enable */ +#define SDIO_MASK_RXDAVLIE (1 << 21) /* Bit 21: Data available in Rx FIFO interrupt enable */ +#define SDIO_MASK_SDIOITIE (1 << 22) /* Bit 22: SDIO mode interrupt received interrupt enable */ +#define SDIO_MASK_CEATAENDIE (1 << 23) /* Bit 23: CE-ATA command completion interrupt enable */ + +#define SDIO_MASK_RESET (0) + +#define SDIO_FIFOCNT_SHIFT (0) +#define SDIO_FIFOCNT_MASK (0x01ffffff << SDIO_FIFOCNT_SHIFT) + +#endif /* __ARCH_ARM_SRC_STM32F7_CHIP_STM32F74XX75XX_SDMMC_H */ + diff --git a/arch/arm/src/stm32f7/chip/stm32f74xx75xx_tim.h b/arch/arm/src/stm32f7/chip/stm32f74xx75xx_tim.h new file mode 100644 index 0000000000000000000000000000000000000000..eca76e95aaebad7f58717a1feedf673466b07417 --- /dev/null +++ b/arch/arm/src/stm32f7/chip/stm32f74xx75xx_tim.h @@ -0,0 +1,1129 @@ +/**************************************************************************************************** + * arch/arm/src/stm32f7/chip/stm32f74xx75xx_tim.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: 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. + * + ****************************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32F7_CHIP_STM32F74XX75XX_TIM_H +#define __ARCH_ARM_SRC_STM32F7_CHIP_STM32F74XX75XX_TIM_H + +/**************************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************************/ + +/* Register Offsets *********************************************************************************/ + +/* Basic Timers - TIM6 and TIM7 */ + +#define STM32_BTIM_CR1_OFFSET 0x0000 /* Control register 1 (16-bit) */ +#define STM32_BTIM_CR2_OFFSET 0x0004 /* Control register 2 (16-bit) */ +#define STM32_BTIM_DIER_OFFSET 0x000c /* DMA/Interrupt enable register (16-bit) */ +#define STM32_BTIM_SR_OFFSET 0x0010 /* Status register (16-bit) */ +#define STM32_BTIM_EGR_OFFSET 0x0014 /* Event generation register (16-bit) */ +#define STM32_BTIM_CNT_OFFSET 0x0024 /* Counter (16-bit) */ +#define STM32_BTIM_PSC_OFFSET 0x0028 /* Prescaler (16-bit) */ +#define STM32_BTIM_ARR_OFFSET 0x002c /* Auto-reload register (16-bit) */ + +/* 16-/32-bit General Timers with DMA: TIM2, TM3, TIM4, and TIM5 + * 16-bit General Timers without DMA: TIM9, TIM10, TIM11, TIM12, TIM13, and TIM14 + * timers are 16-bit except for TIM2 and 5 are 32-bit + * timers TIM9 and 12 are different then TIM10, TIM11, TIM13, and TIM14 + */ + +#define STM32_GTIM_CR1_OFFSET 0x0000 /* Control register 1 (16-bit) */ +#define STM32_GTIM_CR2_OFFSET 0x0004 /* Control register 2 (16-bit, TIM2, 5 only) */ +#define STM32_GTIM_SMCR_OFFSET 0x0008 /* Slave mode control register (32-bit, TIM2, 5, 9, 12 only) */ +#define STM32_GTIM_DIER_OFFSET 0x000c /* DMA/Interrupt enable register (16-bit) */ +#define STM32_GTIM_SR_OFFSET 0x0010 /* Status register (16-bit) */ +#define STM32_GTIM_EGR_OFFSET 0x0014 /* Event generation register (16-bit) */ +#define STM32_GTIM_CCMR1_OFFSET 0x0018 /* Capture/compare mode register 1 (32-bit) */ +#define STM32_GTIM_CCMR2_OFFSET 0x001c /* Capture/compare mode register 2 (32-bit on TIM2,5 only) */ +#define STM32_GTIM_CCER_OFFSET 0x0020 /* Capture/compare enable register (16-bit) */ +#define STM32_GTIM_CNT_OFFSET 0x0024 /* Counter (16 bit and 32-bit on TIM2, 5 only) */ +#define STM32_GTIM_PSC_OFFSET 0x0028 /* Prescaler (16-bit) */ +#define STM32_GTIM_ARR_OFFSET 0x002c /* Auto-reload register (16 bit and 32-bit on TIM2, 5 only) */ +#define STM32_GTIM_CCR1_OFFSET 0x0034 /* Capture/compare register 1 (16-bit on all TIMx and 32-bit on TIM2,5 only) */ +#define STM32_GTIM_CCR2_OFFSET 0x0038 /* Capture/compare register 2 (16-bit TIM 3-4, 9, 12 and 32-bit on TIM2,5 only) */ +#define STM32_GTIM_CCR3_OFFSET 0x003c /* Capture/compare register 3 (16-bit TIM 3-4 and 32-bit on TIM2,5 only) */ +#define STM32_GTIM_CCR4_OFFSET 0x0040 /* Capture/compare register 4 (16-bit TIM 3-4 and 32-bit on TIM2,5 only) */ +#define STM32_GTIM_DCR_OFFSET 0x0048 /* DMA control register (16-bit, TIM2-5 only) */ +#define STM32_GTIM_DMAR_OFFSET 0x004c /* DMA address for burst mode (16-bit, TIM2-5 only) */ +#define STM32_GTIM_OR_OFFSET 0x0050 /* Timer 2/5/11 option register */ + +/* Advanced Timers - TIM1 and TIM8 */ + +#define STM32_ATIM_CR1_OFFSET 0x0000 /* Control register 1 (16-bit) */ +#define STM32_ATIM_CR2_OFFSET 0x0004 /* Control register 2 (32-bit*) */ +#define STM32_ATIM_SMCR_OFFSET 0x0008 /* Slave mode control register (32 -bit) */ +#define STM32_ATIM_DIER_OFFSET 0x000c /* DMA/Interrupt enable register (16-bit) */ +#define STM32_ATIM_SR_OFFSET 0x0010 /* Status register (32-bit*) */ +#define STM32_ATIM_EGR_OFFSET 0x0014 /* Event generation register (16-bit) */ +#define STM32_ATIM_CCMR1_OFFSET 0x0018 /* Capture/compare mode register 1 (32-bit*) */ +#define STM32_ATIM_CCMR2_OFFSET 0x001c /* Capture/compare mode register 2 (32-bit*) */ +#define STM32_ATIM_CCER_OFFSET 0x0020 /* Capture/compare enable register (32-bit*) */ +#define STM32_ATIM_CNT_OFFSET 0x0024 /* Counter (32-bit cnt in lower 16 bit ) */ +#define STM32_ATIM_PSC_OFFSET 0x0028 /* Prescaler (16-bit) */ +#define STM32_ATIM_ARR_OFFSET 0x002c /* Auto-reload register (16-bit) */ +#define STM32_ATIM_RCR_OFFSET 0x0030 /* Repetition counter register (16-bit) */ +#define STM32_ATIM_CCR1_OFFSET 0x0034 /* Capture/compare register 1 (16-bit) */ +#define STM32_ATIM_CCR2_OFFSET 0x0038 /* Capture/compare register 2 (16-bit) */ +#define STM32_ATIM_CCR3_OFFSET 0x003c /* Capture/compare register 3 (16-bit) */ +#define STM32_ATIM_CCR4_OFFSET 0x0040 /* Capture/compare register 4 (16-bit) */ +#define STM32_ATIM_BDTR_OFFSET 0x0044 /* Break and dead-time register (32-bit*) */ +#define STM32_ATIM_DCR_OFFSET 0x0048 /* DMA control register (16-bit) */ +#define STM32_ATIM_DMAR_OFFSET 0x004c /* DMA address for burst mode (16-bit) */ +#define STM32_ATIM_CCMR3_OFFSET 0x0054 /* Capture/compare mode register 3 (32-bit) */ +#define STM32_ATIM_CCR5_OFFSET 0x0058 /* Capture/compare register 5 (32-bit) */ +#define STM32_ATIM_CCR6_OFFSET 0x005c /* Capture/compare register 6 (16-bit) */ + +/* Register Addresses *******************************************************************************/ + +/* Advanced Timers - TIM1 and TIM8 */ + +#if STM32F7_NATIM > 0 +# define STM32_TIM1_CR1 (STM32_TIM1_BASE+STM32_ATIM_CR1_OFFSET) +# define STM32_TIM1_CR2 (STM32_TIM1_BASE+STM32_ATIM_CR2_OFFSET) +# define STM32_TIM1_SMCR (STM32_TIM1_BASE+STM32_ATIM_SMCR_OFFSET) +# define STM32_TIM1_DIER (STM32_TIM1_BASE+STM32_ATIM_DIER_OFFSET) +# define STM32_TIM1_SR (STM32_TIM1_BASE+STM32_ATIM_SR_OFFSET) +# define STM32_TIM1_EGR (STM32_TIM1_BASE+STM32_ATIM_EGR_OFFSET) +# define STM32_TIM1_CCMR1 (STM32_TIM1_BASE+STM32_ATIM_CCMR1_OFFSET) +# define STM32_TIM1_CCMR2 (STM32_TIM1_BASE+STM32_ATIM_CCMR2_OFFSET) +# define STM32_TIM1_CCER (STM32_TIM1_BASE+STM32_ATIM_CCER_OFFSET) +# define STM32_TIM1_CNT (STM32_TIM1_BASE+STM32_ATIM_CNT_OFFSET) +# define STM32_TIM1_PSC (STM32_TIM1_BASE+STM32_ATIM_PSC_OFFSET) +# define STM32_TIM1_ARR (STM32_TIM1_BASE+STM32_ATIM_ARR_OFFSET) +# define STM32_TIM1_RCR (STM32_TIM1_BASE+STM32_ATIM_RCR_OFFSET) +# define STM32_TIM1_CCR1 (STM32_TIM1_BASE+STM32_ATIM_CCR1_OFFSET) +# define STM32_TIM1_CCR2 (STM32_TIM1_BASE+STM32_ATIM_CCR2_OFFSET) +# define STM32_TIM1_CCR3 (STM32_TIM1_BASE+STM32_ATIM_CCR3_OFFSET) +# define STM32_TIM1_CCR4 (STM32_TIM1_BASE+STM32_ATIM_CCR4_OFFSET) +# define STM32_TIM1_BDTR (STM32_TIM1_BASE+STM32_ATIM_BDTR_OFFSET) +# define STM32_TIM1_DCR (STM32_TIM1_BASE+STM32_ATIM_DCR_OFFSET) +# define STM32_TIM1_DMAR (STM32_TIM1_BASE+STM32_ATIM_DMAR_OFFSET) +# define STM32_TIM1_CCMR3 (STM32_TIM1_BASE+STM32_ATIM_CCMR3_OFFSET) +# define STM32_TIM1_CCR5 (STM32_TIM1_BASE+STM32_ATIM_CCR5_OFFSET) +# define STM32_TIM1_CCR6 (STM32_TIM1_BASE+STM32_ATIM_CCR6_OFFSET) +#endif + +#if STM32F7_NATIM > 1 +# define STM32_TIM8_CR1 (STM32_TIM8_BASE+STM32_ATIM_CR1_OFFSET) +# define STM32_TIM8_CR2 (STM32_TIM8_BASE+STM32_ATIM_CR2_OFFSET) +# define STM32_TIM8_SMCR (STM32_TIM8_BASE+STM32_ATIM_SMCR_OFFSET) +# define STM32_TIM8_DIER (STM32_TIM8_BASE+STM32_ATIM_DIER_OFFSET) +# define STM32_TIM8_SR (STM32_TIM8_BASE+STM32_ATIM_SR_OFFSET) +# define STM32_TIM8_EGR (STM32_TIM8_BASE+STM32_ATIM_EGR_OFFSET) +# define STM32_TIM8_CCMR1 (STM32_TIM8_BASE+STM32_ATIM_CCMR1_OFFSET) +# define STM32_TIM8_CCMR2 (STM32_TIM8_BASE+STM32_ATIM_CCMR2_OFFSET) +# define STM32_TIM8_CCER (STM32_TIM8_BASE+STM32_ATIM_CCER_OFFSET) +# define STM32_TIM8_CNT (STM32_TIM8_BASE+STM32_ATIM_CNT_OFFSET) +# define STM32_TIM8_PSC (STM32_TIM8_BASE+STM32_ATIM_PSC_OFFSET) +# define STM32_TIM8_ARR (STM32_TIM8_BASE+STM32_ATIM_ARR_OFFSET) +# define STM32_TIM8_RCR (STM32_TIM8_BASE+STM32_ATIM_RCR_OFFSET) +# define STM32_TIM8_CCR1 (STM32_TIM8_BASE+STM32_ATIM_CCR1_OFFSET) +# define STM32_TIM8_CCR2 (STM32_TIM8_BASE+STM32_ATIM_CCR2_OFFSET) +# define STM32_TIM8_CCR3 (STM32_TIM8_BASE+STM32_ATIM_CCR3_OFFSET) +# define STM32_TIM8_CCR4 (STM32_TIM8_BASE+STM32_ATIM_CCR4_OFFSET) +# define STM32_TIM8_BDTR (STM32_TIM8_BASE+STM32_ATIM_BDTR_OFFSET) +# define STM32_TIM8_DCR (STM32_TIM8_BASE+STM32_ATIM_DCR_OFFSET) +# define STM32_TIM8_DMAR (STM32_TIM8_BASE+STM32_ATIM_DMAR_OFFSET) +# define STM32_TIM8_CCMR3 (STM32_TIM8_BASE+STM32_ATIM_CCMR3_OFFSET) +# define STM32_TIM8_CCR5 (STM32_TIM8_BASE+STM32_ATIM_CCR5_OFFSET) +# define STM32_TIM8_CCR6 (STM32_TIM8_BASE+STM32_ATIM_CCR6_OFFSET) +#endif + +/* 16-/32-bit General Timers - TIM2, TIM3, TIM4, and TIM5 with DMA. + * All timers are 16-bit except for TIM2 and 5 are 32-bit + */ + +#if (STM32F7_NGTIM16+STM32F7_NGTIM32) > 0 +# define STM32_TIM2_CR1 (STM32_TIM2_BASE+STM32_GTIM_CR1_OFFSET) +# define STM32_TIM2_CR2 (STM32_TIM2_BASE+STM32_GTIM_CR2_OFFSET) +# define STM32_TIM2_SMCR (STM32_TIM2_BASE+STM32_GTIM_SMCR_OFFSET) +# define STM32_TIM2_DIER (STM32_TIM2_BASE+STM32_GTIM_DIER_OFFSET) +# define STM32_TIM2_SR (STM32_TIM2_BASE+STM32_GTIM_SR_OFFSET) +# define STM32_TIM2_EGR (STM32_TIM2_BASE+STM32_GTIM_EGR_OFFSET) +# define STM32_TIM2_CCMR1 (STM32_TIM2_BASE+STM32_GTIM_CCMR1_OFFSET) +# define STM32_TIM2_CCMR2 (STM32_TIM2_BASE+STM32_GTIM_CCMR2_OFFSET) +# define STM32_TIM2_CCER (STM32_TIM2_BASE+STM32_GTIM_CCER_OFFSET) +# define STM32_TIM2_CNT (STM32_TIM2_BASE+STM32_GTIM_CNT_OFFSET) +# define STM32_TIM2_PSC (STM32_TIM2_BASE+STM32_GTIM_PSC_OFFSET) +# define STM32_TIM2_ARR (STM32_TIM2_BASE+STM32_GTIM_ARR_OFFSET) +# define STM32_TIM2_CCR1 (STM32_TIM2_BASE+STM32_GTIM_CCR1_OFFSET) +# define STM32_TIM2_CCR2 (STM32_TIM2_BASE+STM32_GTIM_CCR2_OFFSET) +# define STM32_TIM2_CCR3 (STM32_TIM2_BASE+STM32_GTIM_CCR3_OFFSET) +# define STM32_TIM2_CCR4 (STM32_TIM2_BASE+STM32_GTIM_CCR4_OFFSET) +# define STM32_TIM2_DCR (STM32_TIM2_BASE+STM32_GTIM_DCR_OFFSET) +# define STM32_TIM2_DMAR (STM32_TIM2_BASE+STM32_GTIM_DMAR_OFFSET) +# define STM32_TIM2_OR (STM32_TIM2_BASE+STM32_GTIM_OR_OFFSET) +#endif + +#if (STM32F7_NGTIM16+STM32F7_NGTIM32) > 1 +# define STM32_TIM3_CR1 (STM32_TIM3_BASE+STM32_GTIM_CR1_OFFSET) +# define STM32_TIM3_CR2 (STM32_TIM3_BASE+STM32_GTIM_CR2_OFFSET) +# define STM32_TIM3_SMCR (STM32_TIM3_BASE+STM32_GTIM_SMCR_OFFSET) +# define STM32_TIM3_DIER (STM32_TIM3_BASE+STM32_GTIM_DIER_OFFSET) +# define STM32_TIM3_SR (STM32_TIM3_BASE+STM32_GTIM_SR_OFFSET) +# define STM32_TIM3_EGR (STM32_TIM3_BASE+STM32_GTIM_EGR_OFFSET) +# define STM32_TIM3_CCMR1 (STM32_TIM3_BASE+STM32_GTIM_CCMR1_OFFSET) +# define STM32_TIM3_CCMR2 (STM32_TIM3_BASE+STM32_GTIM_CCMR2_OFFSET) +# define STM32_TIM3_CCER (STM32_TIM3_BASE+STM32_GTIM_CCER_OFFSET) +# define STM32_TIM3_CNT (STM32_TIM3_BASE+STM32_GTIM_CNT_OFFSET) +# define STM32_TIM3_PSC (STM32_TIM3_BASE+STM32_GTIM_PSC_OFFSET) +# define STM32_TIM3_ARR (STM32_TIM3_BASE+STM32_GTIM_ARR_OFFSET) +# define STM32_TIM3_CCR1 (STM32_TIM3_BASE+STM32_GTIM_CCR1_OFFSET) +# define STM32_TIM3_CCR2 (STM32_TIM3_BASE+STM32_GTIM_CCR2_OFFSET) +# define STM32_TIM3_CCR3 (STM32_TIM3_BASE+STM32_GTIM_CCR3_OFFSET) +# define STM32_TIM3_CCR4 (STM32_TIM3_BASE+STM32_GTIM_CCR4_OFFSET) +# define STM32_TIM3_DCR (STM32_TIM3_BASE+STM32_GTIM_DCR_OFFSET) +# define STM32_TIM3_DMAR (STM32_TIM3_BASE+STM32_GTIM_DMAR_OFFSET) +#endif + +#if (STM32F7_NGTIM16+STM32F7_NGTIM32) > 2 +# define STM32_TIM4_CR1 (STM32_TIM4_BASE+STM32_GTIM_CR1_OFFSET) +# define STM32_TIM4_CR2 (STM32_TIM4_BASE+STM32_GTIM_CR2_OFFSET) +# define STM32_TIM4_SMCR (STM32_TIM4_BASE+STM32_GTIM_SMCR_OFFSET) +# define STM32_TIM4_DIER (STM32_TIM4_BASE+STM32_GTIM_DIER_OFFSET) +# define STM32_TIM4_SR (STM32_TIM4_BASE+STM32_GTIM_SR_OFFSET) +# define STM32_TIM4_EGR (STM32_TIM4_BASE+STM32_GTIM_EGR_OFFSET) +# define STM32_TIM4_CCMR1 (STM32_TIM4_BASE+STM32_GTIM_CCMR1_OFFSET) +# define STM32_TIM4_CCMR2 (STM32_TIM4_BASE+STM32_GTIM_CCMR2_OFFSET) +# define STM32_TIM4_CCER (STM32_TIM4_BASE+STM32_GTIM_CCER_OFFSET) +# define STM32_TIM4_CNT (STM32_TIM4_BASE+STM32_GTIM_CNT_OFFSET) +# define STM32_TIM4_PSC (STM32_TIM4_BASE+STM32_GTIM_PSC_OFFSET) +# define STM32_TIM4_ARR (STM32_TIM4_BASE+STM32_GTIM_ARR_OFFSET) +# define STM32_TIM4_CCR1 (STM32_TIM4_BASE+STM32_GTIM_CCR1_OFFSET) +# define STM32_TIM4_CCR2 (STM32_TIM4_BASE+STM32_GTIM_CCR2_OFFSET) +# define STM32_TIM4_CCR3 (STM32_TIM4_BASE+STM32_GTIM_CCR3_OFFSET) +# define STM32_TIM4_CCR4 (STM32_TIM4_BASE+STM32_GTIM_CCR4_OFFSET) +# define STM32_TIM4_DCR (STM32_TIM4_BASE+STM32_GTIM_DCR_OFFSET) +# define STM32_TIM4_DMAR (STM32_TIM4_BASE+STM32_GTIM_DMAR_OFFSET) +#endif + +#if (STM32F7_NGTIM16+STM32F7_NGTIM32) > 3 +# define STM32_TIM5_CR1 (STM32_TIM5_BASE+STM32_GTIM_CR1_OFFSET) +# define STM32_TIM5_CR2 (STM32_TIM5_BASE+STM32_GTIM_CR2_OFFSET) +# define STM32_TIM5_SMCR (STM32_TIM5_BASE+STM32_GTIM_SMCR_OFFSET) +# define STM32_TIM5_DIER (STM32_TIM5_BASE+STM32_GTIM_DIER_OFFSET) +# define STM32_TIM5_SR (STM32_TIM5_BASE+STM32_GTIM_SR_OFFSET) +# define STM32_TIM5_EGR (STM32_TIM5_BASE+STM32_GTIM_EGR_OFFSET) +# define STM32_TIM5_CCMR1 (STM32_TIM5_BASE+STM32_GTIM_CCMR1_OFFSET) +# define STM32_TIM5_CCMR2 (STM32_TIM5_BASE+STM32_GTIM_CCMR2_OFFSET) +# define STM32_TIM5_CCER (STM32_TIM5_BASE+STM32_GTIM_CCER_OFFSET) +# define STM32_TIM5_CNT (STM32_TIM5_BASE+STM32_GTIM_CNT_OFFSET) +# define STM32_TIM5_PSC (STM32_TIM5_BASE+STM32_GTIM_PSC_OFFSET) +# define STM32_TIM5_ARR (STM32_TIM5_BASE+STM32_GTIM_ARR_OFFSET) +# define STM32_TIM5_CCR1 (STM32_TIM5_BASE+STM32_GTIM_CCR1_OFFSET) +# define STM32_TIM5_CCR2 (STM32_TIM5_BASE+STM32_GTIM_CCR2_OFFSET) +# define STM32_TIM5_CCR3 (STM32_TIM5_BASE+STM32_GTIM_CCR3_OFFSET) +# define STM32_TIM5_CCR4 (STM32_TIM5_BASE+STM32_GTIM_CCR4_OFFSET) +# define STM32_TIM5_DCR (STM32_TIM5_BASE+STM32_GTIM_DCR_OFFSET) +# define STM32_TIM5_DMAR (STM32_TIM5_BASE+STM32_GTIM_DMAR_OFFSET) +# define STM32_TIM5_OR (STM32_TIM5_BASE+STM32_GTIM_OR_OFFSET) +#endif + + +/* 16-bit General Timers - TIM9-14 without DMA. Note that (1) these timers + * support only a subset of the general timer registers are supported, and + * (2) TIM9 and TIM12 differ from the others. + */ + +#if STM32F7_NGTIMNDMA > 0 +# define STM32_TIM9_CR1 (STM32_TIM9_BASE+STM32_GTIM_CR1_OFFSET) +# define STM32_TIM9_CR2 (STM32_TIM9_BASE+STM32_GTIM_CR2_OFFSET) +# define STM32_TIM9_DIER (STM32_TIM9_BASE+STM32_GTIM_DIER_OFFSET) +# define STM32_TIM9_SR (STM32_TIM9_BASE+STM32_GTIM_SR_OFFSET) +# define STM32_TIM9_EGR (STM32_TIM9_BASE+STM32_GTIM_EGR_OFFSET) +# define STM32_TIM9_CCMR1 (STM32_TIM9_BASE+STM32_GTIM_CCMR1_OFFSET) +# define STM32_TIM9_CCER (STM32_TIM9_BASE+STM32_GTIM_CCER_OFFSET) +# define STM32_TIM9_CNT (STM32_TIM9_BASE+STM32_GTIM_CNT_OFFSET) +# define STM32_TIM9_PSC (STM32_TIM9_BASE+STM32_GTIM_PSC_OFFSET) +# define STM32_TIM9_ARR (STM32_TIM9_BASE+STM32_GTIM_ARR_OFFSET) +# define STM32_TIM9_CCR1 (STM32_TIM9_BASE+STM32_GTIM_CCR1_OFFSET) +# define STM32_TIM9_CCR2 (STM32_TIM9_BASE+STM32_GTIM_CCR2_OFFSET) +#endif + +#if STM32F7_NGTIMNDMA > 1 +# define STM32_TIM10_CR1 (STM32_TIM10_BASE+STM32_GTIM_CR1_OFFSET) +# define STM32_TIM10_DIER (STM32_TIM10_BASE+STM32_GTIM_DIER_OFFSET) +# define STM32_TIM10_SR (STM32_TIM10_BASE+STM32_GTIM_SR_OFFSET) +# define STM32_TIM10_EGR (STM32_TIM10_BASE+STM32_GTIM_EGR_OFFSET) +# define STM32_TIM10_CCMR1 (STM32_TIM10_BASE+STM32_GTIM_CCMR1_OFFSET) +# define STM32_TIM10_CCER (STM32_TIM10_BASE+STM32_GTIM_CCER_OFFSET) +# define STM32_TIM10_CNT (STM32_TIM10_BASE+STM32_GTIM_CNT_OFFSET) +# define STM32_TIM10_PSC (STM32_TIM10_BASE+STM32_GTIM_PSC_OFFSET) +# define STM32_TIM10_ARR (STM32_TIM10_BASE+STM32_GTIM_ARR_OFFSET) +# define STM32_TIM10_CCR1 (STM32_TIM10_BASE+STM32_GTIM_CCR1_OFFSET) +#endif + +#if STM32F7_NGTIMNDMA > 2 +# define STM32_TIM11_CR1 (STM32_TIM11_BASE+STM32_GTIM_CR1_OFFSET) +# define STM32_TIM11_DIER (STM32_TIM11_BASE+STM32_GTIM_DIER_OFFSET) +# define STM32_TIM11_SR (STM32_TIM11_BASE+STM32_GTIM_SR_OFFSET) +# define STM32_TIM11_EGR (STM32_TIM11_BASE+STM32_GTIM_EGR_OFFSET) +# define STM32_TIM11_CCMR1 (STM32_TIM11_BASE+STM32_GTIM_CCMR1_OFFSET) +# define STM32_TIM11_CCER (STM32_TIM11_BASE+STM32_GTIM_CCER_OFFSET) +# define STM32_TIM11_CNT (STM32_TIM11_BASE+STM32_GTIM_CNT_OFFSET) +# define STM32_TIM11_PSC (STM32_TIM11_BASE+STM32_GTIM_PSC_OFFSET) +# define STM32_TIM11_ARR (STM32_TIM11_BASE+STM32_GTIM_ARR_OFFSET) +# define STM32_TIM11_CCR1 (STM32_TIM11_BASE+STM32_GTIM_CCR1_OFFSET) +# define STM32_TIM11_OR (STM32_TIM11_BASE+STM32_GTIM_OR_OFFSET) +#endif + +#if STM32F7_NGTIMNDMA > 3 +# define STM32_TIM12_CR1 (STM32_TIM12_BASE+STM32_GTIM_CR1_OFFSET) +# define STM32_TIM12_CR2 (STM32_TIM9_BASE+STM32_GTIM_CR2_OFFSET) +# define STM32_TIM12_DIER (STM32_TIM12_BASE+STM32_GTIM_DIER_OFFSET) +# define STM32_TIM12_SR (STM32_TIM12_BASE+STM32_GTIM_SR_OFFSET) +# define STM32_TIM12_EGR (STM32_TIM12_BASE+STM32_GTIM_EGR_OFFSET) +# define STM32_TIM12_CCMR1 (STM32_TIM12_BASE+STM32_GTIM_CCMR1_OFFSET) +# define STM32_TIM12_CCER (STM32_TIM12_BASE+STM32_GTIM_CCER_OFFSET) +# define STM32_TIM12_CNT (STM32_TIM12_BASE+STM32_GTIM_CNT_OFFSET) +# define STM32_TIM12_PSC (STM32_TIM12_BASE+STM32_GTIM_PSC_OFFSET) +# define STM32_TIM12_ARR (STM32_TIM12_BASE+STM32_GTIM_ARR_OFFSET) +# define STM32_TIM12_CCR1 (STM32_TIM12_BASE+STM32_GTIM_CCR1_OFFSET) +# define STM32_TIM12_CCR2 (STM32_TIM12_BASE+STM32_GTIM_CCR2_OFFSET) +#endif + +#if STM32F7_NGTIMNDMA > 4 +# define STM32_TIM13_CR1 (STM32_TIM13_BASE+STM32_GTIM_CR1_OFFSET) +# define STM32_TIM13_DIER (STM32_TIM13_BASE+STM32_GTIM_DIER_OFFSET) +# define STM32_TIM13_SR (STM32_TIM13_BASE+STM32_GTIM_SR_OFFSET) +# define STM32_TIM13_EGR (STM32_TIM13_BASE+STM32_GTIM_EGR_OFFSET) +# define STM32_TIM13_CCMR1 (STM32_TIM13_BASE+STM32_GTIM_CCMR1_OFFSET) +# define STM32_TIM13_CCER (STM32_TIM13_BASE+STM32_GTIM_CCER_OFFSET) +# define STM32_TIM13_CNT (STM32_TIM13_BASE+STM32_GTIM_CNT_OFFSET) +# define STM32_TIM13_PSC (STM32_TIM13_BASE+STM32_GTIM_PSC_OFFSET) +# define STM32_TIM13_ARR (STM32_TIM13_BASE+STM32_GTIM_ARR_OFFSET) +# define STM32_TIM13_CCR1 (STM32_TIM13_BASE+STM32_GTIM_CCR1_OFFSET) +#endif + +#if STM32F7_NGTIMNDMA > 5 +# define STM32_TIM14_CR1 (STM32_TIM14_BASE+STM32_GTIM_CR1_OFFSET) +# define STM32_TIM14_DIER (STM32_TIM14_BASE+STM32_GTIM_DIER_OFFSET) +# define STM32_TIM14_SR (STM32_TIM14_BASE+STM32_GTIM_SR_OFFSET) +# define STM32_TIM14_EGR (STM32_TIM14_BASE+STM32_GTIM_EGR_OFFSET) +# define STM32_TIM14_CCMR1 (STM32_TIM14_BASE+STM32_GTIM_CCMR1_OFFSET) +# define STM32_TIM14_CCER (STM32_TIM14_BASE+STM32_GTIM_CCER_OFFSET) +# define STM32_TIM14_CNT (STM32_TIM14_BASE+STM32_GTIM_CNT_OFFSET) +# define STM32_TIM14_PSC (STM32_TIM14_BASE+STM32_GTIM_PSC_OFFSET) +# define STM32_TIM14_ARR (STM32_TIM14_BASE+STM32_GTIM_ARR_OFFSET) +# define STM32_TIM14_CCR1 (STM32_TIM14_BASE+STM32_GTIM_CCR1_OFFSET) +#endif + +/* Basic Timers - TIM6 and TIM7 */ + +#if STM32F7_NBTIM > 0 +# define STM32_TIM6_CR1 (STM32_TIM6_BASE+STM32_BTIM_CR1_OFFSET) +# define STM32_TIM6_CR2 (STM32_TIM6_BASE+STM32_BTIM_CR2_OFFSET) +# define STM32_TIM6_DIER (STM32_TIM6_BASE+STM32_BTIM_DIER_OFFSET) +# define STM32_TIM6_SR (STM32_TIM6_BASE+STM32_BTIM_SR_OFFSET) +# define STM32_TIM6_EGR (STM32_TIM6_BASE+STM32_BTIM_EGR_OFFSET) +# define STM32_TIM6_CNT (STM32_TIM6_BASE+STM32_BTIM_CNT_OFFSET) +# define STM32_TIM6_PSC (STM32_TIM6_BASE+STM32_BTIM_PSC_OFFSET) +# define STM32_TIM6_ARR (STM32_TIM6_BASE+STM32_BTIM_ARR_OFFSET) +#endif + +#if STM32F7_NBTIM > 1 +# define STM32_TIM7_CR1 (STM32_TIM7_BASE+STM32_BTIM_CR1_OFFSET) +# define STM32_TIM7_CR2 (STM32_TIM7_BASE+STM32_BTIM_CR2_OFFSET) +# define STM32_TIM7_DIER (STM32_TIM7_BASE+STM32_BTIM_DIER_OFFSET) +# define STM32_TIM7_SR (STM32_TIM7_BASE+STM32_BTIM_SR_OFFSET) +# define STM32_TIM7_EGR (STM32_TIM7_BASE+STM32_BTIM_EGR_OFFSET) +# define STM32_TIM7_CNT (STM32_TIM7_BASE+STM32_BTIM_CNT_OFFSET) +# define STM32_TIM7_PSC (STM32_TIM7_BASE+STM32_BTIM_PSC_OFFSET) +# define STM32_TIM7_ARR (STM32_TIM7_BASE+STM32_BTIM_ARR_OFFSET) +#endif + +/* Register Bitfield Definitions ********************************************************************/ + +/* Control register 1 */ + +#define ATIM_CR1_CEN (1 << 0) /* Bit 0: Counter enable */ +#define ATIM_CR1_UDIS (1 << 1) /* Bit 1: Update disable */ +#define ATIM_CR1_URS (1 << 2) /* Bit 2: Update request source */ +#define ATIM_CR1_OPM (1 << 3) /* Bit 3: One pulse mode */ +#define ATIM_CR1_DIR (1 << 4) /* Bit 4: Direction */ +#define ATIM_CR1_CMS_SHIFT (5) /* Bits 6-5: Center-aligned mode selection */ +#define ATIM_CR1_CMS_MASK (3 << ATIM_CR1_CMS_SHIFT) +# define ATIM_CR1_EDGE (0 << ATIM_CR1_CMS_SHIFT) /* 00: Edge-aligned mode */ +# define ATIM_CR1_CENTER1 (1 << ATIM_CR1_CMS_SHIFT) /* 01: Center-aligned mode 1 */ +# define ATIM_CR1_CENTER2 (2 << ATIM_CR1_CMS_SHIFT) /* 10: Center-aligned mode 2 */ +# define ATIM_CR1_CENTER3 (3 << ATIM_CR1_CMS_SHIFT) /* 11: Center-aligned mode 3 */ +#define ATIM_CR1_ARPE (1 << 7) /* Bit 7: Auto-reload preload enable */ +#define ATIM_CR1_CKD_SHIFT (8) /* Bits 9-8: Clock division */ +#define ATIM_CR1_CKD_MASK (3 << ATIM_CR1_CKD_SHIFT) +# define ATIM_CR1_TCKINT (0 << ATIM_CR1_CKD_SHIFT) /* 00: tDTS=tCK_INT */ +# define ATIM_CR1_2TCKINT (1 << ATIM_CR1_CKD_SHIFT) /* 01: tDTS=2*tCK_INT */ +# define ATIM_CR1_4TCKINT (2 << ATIM_CR1_CKD_SHIFT) /* 10: tDTS=4*tCK_INT */ +#define ATIM_CR1_UIFREMAP (1 << 11) /* Bit 11: UIF status bit remapping */ + +/* Control register 2 */ + +#define ATIM_CR2_CCPC (1 << 0) /* Bit 0: Capture/Compare Preloaded Control */ +#define ATIM_CR2_CCUS (1 << 2) /* Bit 2: Capture/Compare Control Update Selection */ +#define ATIM_CR2_CCDS (1 << 3) /* Bit 3: Capture/Compare DMA Selection */ +#define ATIM_CR2_MMS_SHIFT (4) /* Bits 6-4: Master Mode Selection */ +#define ATIM_CR2_MMS_MASK (7 << ATIM_CR2_MMS_SHIFT) +# define ATIM_CR2_MMS_RESET (0 << ATIM_CR2_MMS_SHIFT) /* 000: Reset - TIMx_EGR UG bit is TRGO */ +# define ATIM_CR2_MMS_ENABLE (1 << ATIM_CR2_MMS_SHIFT) /* 001: Enable - CNT_EN is TRGO */ +# define ATIM_CR2_MMS_UPDATE (2 << ATIM_CR2_MMS_SHIFT) /* 010: Update event is TRGO */ +# define ATIM_CR2_MMS_COMPP (3 << ATIM_CR2_MMS_SHIFT) /* 010: Compare Pulse - CC1IF flag */ +# define ATIM_CR2_MMS_OC1REF (4 << ATIM_CR2_MMS_SHIFT) /* 100: Compare OC1REF is TRGO */ +# define ATIM_CR2_MMS_OC2REF (5 << ATIM_CR2_MMS_SHIFT) /* 101: Compare OC2REF is TRGO */ +# define ATIM_CR2_MMS_OC3REF (6 << ATIM_CR2_MMS_SHIFT) /* 110: Compare OC3REF is TRGO */ +# define ATIM_CR2_MMS_OC4REF (7 << ATIM_CR2_MMS_SHIFT) /* 111: Compare OC4REF is TRGO */ +#define ATIM_CR2_TI1S (1 << 7) /* Bit 7: TI1 Selection */ +#define ATIM_CR2_OIS1 (1 << 8) /* Bit 8: Output Idle state 1 (OC1 output) */ +#define ATIM_CR2_OIS1N (1 << 9) /* Bit 9: Output Idle state 1 (OC1N output) */ +#define ATIM_CR2_OIS2 (1 << 10) /* Bit 10: Output Idle state 2 (OC2 output) */ +#define ATIM_CR2_OIS2N (1 << 11) /* Bit 11: Output Idle state 2 (OC2N output) */ +#define ATIM_CR2_OIS3 (1 << 12) /* Bit 12: Output Idle state 3 (OC3 output) */ +#define ATIM_CR2_OIS3N (1 << 13) /* Bit 13: Output Idle state 3 (OC3N output) */ +#define ATIM_CR2_OIS4 (1 << 14) /* Bit 14: Output Idle state 4 (OC4 output) */ +#define ATIM_CR2_OIS5 (1 << 16) /* Bit 16: OOutput Idle state 5 (OC5 output) */ +#define ATIM_CR2_OIS6 (1 << 18) /* Bit 18: Output Idle state 6 (OC6 output) */ +#define ATIM_CR2_MMS2_SHIFT (20) /* Bits 20-23: Master Mode Selection 2 */ +#define ATIM_CR2_MMS2_MASK (15 << ATIM_CR2_MMS2_SHIFT) +# define ATIM_CR2_MMS2_RESET (0 << ATIM_CR2_MMS2_SHIFT) /* 0000: Reset - TIMx_EGR UG bit is TRG9 */ +# define ATIM_CR2_MMS2_ENABLE (1 << ATIM_CR2_MMS2_SHIFT) /* 0001: Enable - CNT_EN is TRGO2 */ +# define ATIM_CR2_MMS2_UPDATE (2 << ATIM_CR2_MMS2_SHIFT) /* 0010: Update event is TRGH0*/ +# define ATIM_CR2_MMS2_COMPP (3 << ATIM_CR2_MMS2_SHIFT) /* 0010: Compare Pulse - CC1IF flag */ +# define ATIM_CR2_MMS2_OC1REF (4 << ATIM_CR2_MMS2_SHIFT) /* 0100: Compare OC1REF is TRGO2 */ +# define ATIM_CR2_MMS2_OC2REF (5 << ATIM_CR2_MMS2_SHIFT) /* 0101: Compare OC2REF is TRGO2 */ +# define ATIM_CR2_MMS2_OC3REF (6 << ATIM_CR2_MMS2_SHIFT) /* 0110: Compare OC3REF is TRGO2 */ +# define ATIM_CR2_MMS2_OC4REF (7 << ATIM_CR2_MMS2_SHIFT) /* 0111: Compare OC4REF is TRGO2 */ +# define ATIM_CR2_MMS2_OC5REF (8 << ATIM_CR2_MMS2_SHIFT) /* 1000: Compare OC5REF is TRGO2 */ +# define ATIM_CR2_MMS2_OC6REF (9 << ATIM_CR2_MMS2_SHIFT) /* 1001: Compare OC6REF is TRGO2 */ +# define ATIM_CR2_MMS2_CMPOC4 (10 << ATIM_CR2_MMS2_SHIFT) /* 1010: Compare pulse - OC4REF edge is TRGO2 */ +# define ATIM_CR2_MMS2_CMPOC6 (11 << ATIM_CR2_MMS2_SHIFT) /* 1011: Compare pulse - OC6REF edge is TRGO2 */ +# define ATIM_CR2_MMS2_CMPOC4R6R (12 << ATIM_CR2_MMS2_SHIFT) /* 1100: Compare pulse - OC4REF/OC6REF rising */ +# define ATIM_CR2_MMS2_CMPOC4R6F (13 << ATIM_CR2_MMS2_SHIFT) /* 1101: Compare pulse - OC4REF rising/OC6REF falling */ +# define ATIM_CR2_MMS2_CMPOC5R6R (14 << ATIM_CR2_MMS2_SHIFT) /* 1110: Compare pulse - OC5REF/OC6REF rising */ +# define ATIM_CR2_MMS2_CMPOC5R6F (15 << ATIM_CR2_MMS2_SHIFT) /* 1111: Compare pulse - OC5REF rising/OC6REF falling */ + +/* Slave mode control register */ + +#define ATIM_SMCR_SMS_SHIFT (0) /* Bits 0-2: Slave mode selection */ +#define ATIM_SMCR_SMS_MASK (7 << ATIM_SMCR_SMS_SHIFT) +# define ATIM_SMCR_DISAB (0 << ATIM_SMCR_SMS_SHIFT) /* 000: Slave mode disabled */ +# define ATIM_SMCR_ENCMD1 (1 << ATIM_SMCR_SMS_SHIFT) /* 001: Encoder mode 1 */ +# define ATIM_SMCR_ENCMD2 (2 << ATIM_SMCR_SMS_SHIFT) /* 010: Encoder mode 2 */ +# define ATIM_SMCR_ENCMD3 (3 << ATIM_SMCR_SMS_SHIFT) /* 011: Encoder mode 3 */ +# define ATIM_SMCR_RESET (4 << ATIM_SMCR_SMS_SHIFT) /* 100: Reset Mode */ +# define ATIM_SMCR_GATED (5 << ATIM_SMCR_SMS_SHIFT) /* 101: Gated Mode */ +# define ATIM_SMCR_TRIGGER (6 << ATIM_SMCR_SMS_SHIFT) /* 110: Trigger Mode */ +# define ATIM_SMCR_EXTCLK1 (7 << ATIM_SMCR_SMS_SHIFT) /* 111: External Clock Mode 1 */ +#define ATIM_SMCR_TS_SHIFT (4) /* Bits 4-6: Trigger selection */ +#define ATIM_SMCR_TS_MASK (7 << ATIM_SMCR_TS_SHIFT) +# define ATIM_SMCR_ITR0 (0 << ATIM_SMCR_TS_SHIFT) /* 000: Internal trigger 0 (ITR0) */ +# define ATIM_SMCR_ITR1 (1 << ATIM_SMCR_TS_SHIFT) /* 001: Internal trigger 1 (ITR1) */ +# define ATIM_SMCR_ITR2 (2 << ATIM_SMCR_TS_SHIFT) /* 010: Internal trigger 2 (ITR2) */ +# define ATIM_SMCR_ITR3 (3 << ATIM_SMCR_TS_SHIFT) /* 011: Internal trigger 3 (ITR3) */ +# define ATIM_SMCR_T1FED (4 << ATIM_SMCR_TS_SHIFT) /* 100: TI1 Edge Detector (TI1F_ED) */ +# define ATIM_SMCR_TI1FP1 (5 << ATIM_SMCR_TS_SHIFT) /* 101: Filtered Timer Input 1 (TI1FP1) */ +# define ATIM_SMCR_T12FP2 (6 << ATIM_SMCR_TS_SHIFT) /* 110: Filtered Timer Input 2 (TI2FP2) */ +# define ATIM_SMCR_ETRF (7 << ATIM_SMCR_TS_SHIFT) /* 111: External Trigger input (ETRF) */ +#define ATIM_SMCR_MSM (1 << 7) /* Bit 7: Master/slave mode */ +#define ATIM_SMCR_ETF_SHIFT (8) /* Bits 8-11: External trigger filter */ +#define ATIM_SMCR_ETF_MASK (0x0f << ATIM_SMCR_ETF_SHIFT) +# define ATIM_SMCR_NOFILT (0 << ATIM_SMCR_ETF_SHIFT) /* 0000: No filter, sampling is done at fDTS */ +# define ATIM_SMCR_FCKINT2 (1 << ATIM_SMCR_ETF_SHIFT) /* 0001: fSAMPLING=fCK_INT, N=2 */ +# define ATIM_SMCR_FCKINT4 (2 << ATIM_SMCR_ETF_SHIFT) /* 0010: fSAMPLING=fCK_INT, N=4 */ +# define ATIM_SMCR_FCKINT8 (3 << ATIM_SMCR_ETF_SHIFT) /* 0011: fSAMPLING=fCK_INT, N=8 */ +# define ATIM_SMCR_FDTSd26 (4 << ATIM_SMCR_ETF_SHIFT) /* 0100: fSAMPLING=fDTS/2, N=6 */ +# define ATIM_SMCR_FDTSd28 (5 << ATIM_SMCR_ETF_SHIFT) /* 0101: fSAMPLING=fDTS/2, N=8 */ +# define ATIM_SMCR_FDTSd46 (6 << ATIM_SMCR_ETF_SHIFT) /* 0110: fSAMPLING=fDTS/4, N=6 */ +# define ATIM_SMCR_FDTSd48 (7 << ATIM_SMCR_ETF_SHIFT) /* 0111: fSAMPLING=fDTS/4, N=8 */ +# define ATIM_SMCR_FDTSd86 (8 << ATIM_SMCR_ETF_SHIFT) /* 1000: fSAMPLING=fDTS/8, N=6 */ +# define ATIM_SMCR_FDTSd88 (9 << ATIM_SMCR_ETF_SHIFT) /* 1001: fSAMPLING=fDTS/8, N=8 */ +# define ATIM_SMCR_FDTSd165 (10 << ATIM_SMCR_ETF_SHIFT) /* 1010: fSAMPLING=fDTS/16, N=5 */ +# define ATIM_SMCR_FDTSd166 (11 << ATIM_SMCR_ETF_SHIFT) /* 1011: fSAMPLING=fDTS/16, N=6 */ +# define ATIM_SMCR_FDTSd168 (12 << ATIM_SMCR_ETF_SHIFT) /* 1100: fSAMPLING=fDTS/16, N=8 */ +# define ATIM_SMCR_FDTSd325 (13 << ATIM_SMCR_ETF_SHIFT) /* 1101: fSAMPLING=fDTS/32, N=5 */ +# define ATIM_SMCR_FDTSd326 (14 << ATIM_SMCR_ETF_SHIFT) /* 1110: fSAMPLING=fDTS/32, N=6 */ +# define ATIM_SMCR_FDTSd328 (15 << ATIM_SMCR_ETF_SHIFT) /* 1111: fSAMPLING=fDTS/32, N=8 */ +#define ATIM_SMCR_ETPS_SHIFT (12) /* Bits 12-13: External trigger prescaler */ +#define ATIM_SMCR_ETPS_MASK (3 << ATIM_SMCR_ETPS_SHIFT) +# define ATIM_SMCR_PSCOFF (0 << ATIM_SMCR_ETPS_SHIFT) /* 00: Prescaler OFF */ +# define ATIM_SMCR_ETRPd2 (1 << ATIM_SMCR_ETPS_SHIFT) /* 01: ETRP frequency divided by 2 */ +# define ATIM_SMCR_ETRPd4 (2 << ATIM_SMCR_ETPS_SHIFT) /* 10: ETRP frequency divided by 4 */ +# define ATIM_SMCR_ETRPd8 (3 << ATIM_SMCR_ETPS_SHIFT) /* 11: ETRP frequency divided by 8 */ +#define ATIM_SMCR_ECE (1 << 14) /* Bit 14: External clock enable */ +#define ATIM_SMCR_ETP (1 << 15) /* Bit 15: External trigger polarity */ +#define ATIM_SMCR_SMS (1 << 16) /* Bit 16: Slave mode selection - bit 3 */ + +/* DMA/Interrupt enable register */ + +#define ATIM_DIER_UIE (1 << 0) /* Bit 0: Update interrupt enable */ +#define ATIM_DIER_CC1IE (1 << 1) /* Bit 1: Capture/Compare 1 interrupt enable */ +#define ATIM_DIER_CC2IE (1 << 2) /* Bit 2: Capture/Compare 2 interrupt enable */ +#define ATIM_DIER_CC3IE (1 << 3) /* Bit 3: Capture/Compare 3 interrupt enable */ +#define ATIM_DIER_CC4IE (1 << 4) /* Bit 4: Capture/Compare 4 interrupt enable */ +#define ATIM_DIER_COMIE (1 << 5) /* Bit 5: COM interrupt enable */ +#define ATIM_DIER_TIE (1 << 6) /* Bit 6: Trigger interrupt enable */ +#define ATIM_DIER_BIE (1 << 7) /* Bit 7: Break interrupt enable */ +#define ATIM_DIER_UDE (1 << 8) /* Bit 8: Update DMA request enable */ +#define ATIM_DIER_CC1DE (1 << 9) /* Bit 9: Capture/Compare 1 DMA request enable */ +#define ATIM_DIER_CC2DE (1 << 10) /* Bit 10: Capture/Compare 2 DMA request enable */ +#define ATIM_DIER_CC3DE (1 << 11) /* Bit 11: Capture/Compare 3 DMA request enable */ +#define ATIM_DIER_CC4DE (1 << 12) /* Bit 12: Capture/Compare 4 DMA request enable */ +#define ATIM_DIER_COMDE (1 << 13) /* Bit 13: COM DMA request enable */ +#define ATIM_DIER_TDE (1 << 14) /* Bit 14: Trigger DMA request enable */ + +/* Status register */ + +#define ATIM_SR_UIF (1 << 0) /* Bit 0: Update interrupt Flag */ +#define ATIM_SR_CC1IF (1 << 1) /* Bit 1: Capture/Compare 1 interrupt Flag */ +#define ATIM_SR_CC2IF (1 << 2) /* Bit 2: Capture/Compare 2 interrupt Flag */ +#define ATIM_SR_CC3IF (1 << 3) /* Bit 3: Capture/Compare 3 interrupt Flag */ +#define ATIM_SR_CC4IF (1 << 4) /* Bit 4: Capture/Compare 4 interrupt Flag */ +#define ATIM_SR_COMIF (1 << 5) /* Bit 5: COM interrupt Flag */ +#define ATIM_SR_TIF (1 << 6) /* Bit 6: Trigger interrupt Flag */ +#define ATIM_SR_BIF (1 << 7) /* Bit 7: Break interrupt Flag */ +#define ATIM_SR_B2IF (1 << 8) /* Bit 8: Break 2 interrupt Flag */ +#define ATIM_SR_CC1OF (1 << 9) /* Bit 9: Capture/Compare 1 Overcapture Flag */ +#define ATIM_SR_CC2OF (1 << 10) /* Bit 10: Capture/Compare 2 Overcapture Flag */ +#define ATIM_SR_CC3OF (1 << 11) /* Bit 11: Capture/Compare 3 Overcapture Flag */ +#define ATIM_SR_CC4OF (1 << 12) /* Bit 12: Capture/Compare 4 Overcapture Flag */ +#define ATIM_SR_CC5IF (1 << 16) /* Bit 16: Compare 5 interrupt flag */ +#define ATIM_SR_CC6IF (1 << 17) /* Bit 17: Compare 6 interrupt flag */ + +/* Event generation register */ + +#define ATIM_EGR_UG (1 << 0) /* Bit 0: Update Generation */ +#define ATIM_EGR_CC1G (1 << 1) /* Bit 1: Capture/Compare 1 Generation */ +#define ATIM_EGR_CC2G (1 << 2) /* Bit 2: Capture/Compare 2 Generation */ +#define ATIM_EGR_CC3G (1 << 3) /* Bit 3: Capture/Compare 3 Generation */ +#define ATIM_EGR_CC4G (1 << 4) /* Bit 4: Capture/Compare 4 Generation */ +#define ATIM_EGR_COMG (1 << 5) /* Bit 5: Capture/Compare Control Update Generation */ +#define ATIM_EGR_TG (1 << 6) /* Bit 6: Trigger Generation */ +#define ATIM_EGR_BG (1 << 7) /* Bit 7: Break Generation */ +#define ATIM_EGR_B2G (1 << 8) /* Bit 8: Break 2 Generation */ + +/* Capture/compare mode register 1 -- Output compare mode */ + +#define ATIM_CCMR1_CC1S_SHIFT (0) /* Bits 1-0: Capture/Compare 1 Selection */ +#define ATIM_CCMR1_CC1S_MASK (3 << ATIM_CCMR1_CC1S_SHIFT) + /* (See common (unshifted) bit field definitions below) */ +#define ATIM_CCMR1_OC1FE (1 << 2) /* Bit 2: Output Compare 1 Fast enable */ +#define ATIM_CCMR1_OC1PE (1 << 3) /* Bit 3: Output Compare 1 Preload enable */ +#define ATIM_CCMR1_OC1M_SHIFT (4) /* Bits 6-4: Output Compare 1 Mode */ +#define ATIM_CCMR1_OC1M_MASK (7 << ATIM_CCMR1_OC1M_SHIFT) + /* (See common (unshifted) bit field definitions below) */ +#define ATIM_CCMR1_OC1CE (1 << 7) /* Bit 7: Output Compare 1Clear Enable */ +#define ATIM_CCMR1_CC2S_SHIFT (8) /* Bits 8-9: Capture/Compare 2 Selection */ +#define ATIM_CCMR1_CC2S_MASK (3 << ATIM_CCMR1_CC2S_SHIFT) + /* (See common (unshifted) bit field definitions below) */ +#define ATIM_CCMR1_OC2FE (1 << 10) /* Bit 10: Output Compare 2 Fast enable */ +#define ATIM_CCMR1_OC2PE (1 << 11) /* Bit 11: Output Compare 2 Preload enable */ +#define ATIM_CCMR1_OC2M_SHIFT (12) /* Bits 14-12: Output Compare 2 Mode */ +#define ATIM_CCMR1_OC2M_MASK (7 << ATIM_CCMR1_OC2M_SHIFT) + /* (See common (unshifted) bit field definitions below) */ +#define ATIM_CCMR1_OC2CE (1 << 15) /* Bit 15: Output Compare 2 Clear Enable */ +#define ATIM_CCMR1_OC1M (1 << 16) /* Bit 16: Output Compare 1 mode - bit 3 */ +#define ATIM_CCMR1_OC2M (1 << 24) /* Bit 24: Output Compare 2 mode - bit 3 */ + + +/* Common CCMR (unshifted) Capture/Compare Selection bit-field definitions */ + +#define ATIM_CCMR_CCS_CCOUT (0) /* 00: CCx channel output */ +#define ATIM_CCMR_CCS_CCIN1 (1) /* 01: CCx channel input, ICx is TIx */ +#define ATIM_CCMR_CCS_CCIN2 (2) /* 10: CCx channel input, ICx is TIy */ +#define ATIM_CCMR_CCS_CCINTRC (3) /* 11: CCx channel input, ICx is TRC */ + +/* Common CCMR (unshifted) Compare Mode bit field definitions */ + +#define ATIM_CCMR_MODE_FRZN (0) /* 0000: Frozen */ +#define ATIM_CCMR_MODE_CHACT (1) /* 0001: Channel x active on match */ +#define ATIM_CCMR_MODE_CHINACT (2) /* 0010: Channel x inactive on match */ +#define ATIM_CCMR_MODE_OCREFTOG (3) /* 0011: OCxREF toggle ATIM_CNT=ATIM_CCRx */ +#define ATIM_CCMR_MODE_OCREFLO (4) /* 0100: OCxREF forced low */ +#define ATIM_CCMR_MODE_OCREFHI (5) /* 0101: OCxREF forced high */ +#define ATIM_CCMR_MODE_PWM1 (6) /* 0110: PWM mode 1 */ +#define ATIM_CCMR_MODE_PWM2 (7) /* 0111: PWM mode 2 */ +#define ATIM_CCMR_MODE_OPM1 (8) /* 1000: Retrigerrable OPM mode 1 */ +#define ATIM_CCMR_MODE_OPM2 (9) /* 1001: Retrigerrable OPM mode 2 */ +#define ATIM_CCMR_MODE_COMBINED1 (12) /* 1100: Combined PWM mode 1 */ +#define ATIM_CCMR_MODE_COMBINED2 (13) /* 1101: Combined PWM mode 2 */ +#define ATIM_CCMR_MODE_ASYMMETRIC1 (14) /* 1110: Asymmetric PWM mode 1 */ +#define ATIM_CCMR_MODE_ASYMMETRIC2 (15) /* 1111: Asymmetric PWM mode 2 */ + +/* Capture/compare mode register 1 -- Input capture mode */ + + /* Bits 1-0:(same as output compare mode) */ +#define ATIM_CCMR1_IC1PSC_SHIFT (2) /* Bits 3-2: Input Capture 1 Prescaler */ +#define ATIM_CCMR1_IC1PSC_MASK (3 << ATIM_CCMR1_IC1PSC_SHIFT) + /* (See common (unshifted) bit field definitions below) */ +#define ATIM_CCMR1_IC1F_SHIFT (4) /* Bits 7-4: Input Capture 1 Filter */ +#define ATIM_CCMR1_IC1F_MASK (0x0f << ATIM_CCMR1_IC1F_SHIFT) + /* (See common (unshifted) bit field definitions below) */ + /* Bits 9:8 (same as output compare mode) */ +#define ATIM_CCMR1_IC2PSC_SHIFT (10) /* Bits 11:10: Input Capture 2 Prescaler */ +#define ATIM_CCMR1_IC2PSC_MASK (3 << ATIM_CCMR1_IC2PSC_SHIFT) + /* (See common (unshifted) bit field definitions below) */ +#define ATIM_CCMR1_IC2F_SHIFT (12) /* Bits 15-12: Input Capture 2 Filter */ +#define ATIM_CCMR1_IC2F_MASK (0x0f << ATIM_CCMR1_IC2F_SHIFT) + /* (See common (unshifted) bit field definitions below) */ + +/* Common CCMR (unshifted) Input Capture Prescaler bit-field definitions */ + +#define ATIM_CCMR_ICPSC_NOPSC (0) /* 00: no prescaler, capture each edge */ +#define ATIM_CCMR_ICPSC_EVENTS2 (1) /* 01: capture once every 2 events */ +#define ATIM_CCMR_ICPSC_EVENTS4 (2) /* 10: capture once every 4 events */ +#define ATIM_CCMR_ICPSC_EVENTS8 (3) /* 11: capture once every 8 events */ + +/* Common CCMR (unshifted) Input Capture Filter bit-field definitions */ + +#define ATIM_CCMR_ICF_NOFILT (0) /* 0000: No filter, sampling at fDTS */ +#define ATIM_CCMR_ICF_FCKINT2 (1) /* 0001: fSAMPLING=fCK_INT, N=2 */ +#define ATIM_CCMR_ICF_FCKINT4 (2) /* 0010: fSAMPLING=fCK_INT, N=4 */ +#define ATIM_CCMR_ICF_FCKINT8 (3) /* 0011: fSAMPLING=fCK_INT, N=8 */ +#define ATIM_CCMR_ICF_FDTSd26 (4) /* 0100: fSAMPLING=fDTS/2, N=6 */ +#define ATIM_CCMR_ICF_FDTSd28 (5) /* 0101: fSAMPLING=fDTS/2, N=8 */ +#define ATIM_CCMR_ICF_FDTSd46 (6) /* 0110: fSAMPLING=fDTS/4, N=6 */ +#define ATIM_CCMR_ICF_FDTSd48 (7) /* 0111: fSAMPLING=fDTS/4, N=8 */ +#define ATIM_CCMR_ICF_FDTSd86 (8) /* 1000: fSAMPLING=fDTS/8, N=6 */ +#define ATIM_CCMR_ICF_FDTSd88 (9) /* 1001: fSAMPLING=fDTS/8, N=8 */ +#define ATIM_CCMR_ICF_FDTSd165 (10) /* 1010: fSAMPLING=fDTS/16, N=5 */ +#define ATIM_CCMR_ICF_FDTSd166 (11) /* 1011: fSAMPLING=fDTS/16, N=6 */ +#define ATIM_CCMR_ICF_FDTSd168 (12) /* 1100: fSAMPLING=fDTS/16, N=8 */ +#define ATIM_CCMR_ICF_FDTSd325 (13) /* 1101: fSAMPLING=fDTS/32, N=5 */ +#define ATIM_CCMR_ICF_FDTSd326 (14) /* 1110: fSAMPLING=fDTS/32, N=6 */ +#define ATIM_CCMR_ICF_FDTSd328 (15) /* 1111: fSAMPLING=fDTS/32, N=8 */ + +/* Capture/compare mode register 2 - Output Compare mode */ + +#define ATIM_CCMR2_CC3S_SHIFT (0) /* Bits 1-0: Capture/Compare 3 Selection */ +#define ATIM_CCMR2_CC3S_MASK (3 << ATIM_CCMR2_CC3S_SHIFT) + /* (See common (unshifted) bit field definitions above) */ +#define ATIM_CCMR2_OC3FE (1 << 2) /* Bit 2: Output Compare 3 Fast enable */ +#define ATIM_CCMR2_OC3PE (1 << 3) /* Bit 3: Output Compare 3 Preload enable */ +#define ATIM_CCMR2_OC3M_SHIFT (4) /* Bits 6-4: Output Compare 3 Mode */ +#define ATIM_CCMR2_OC3M_MASK (7 << ATIM_CCMR2_OC3M_SHIFT) + /* (See common (unshifted) bit field definitions above) */ +#define ATIM_CCMR2_OC3CE (1 << 7) /* Bit 7: Output Compare 3 Clear Enable */ +#define ATIM_CCMR2_CC4S_SHIFT (8) /* Bits 9-8: Capture/Compare 4 Selection */ +#define ATIM_CCMR2_CC4S_MASK (3 << ATIM_CCMR2_CC4S_SHIFT) + /* (See common (unshifted) bit field definitions above) */ +#define ATIM_CCMR2_OC4FE (1 << 10) /* Bit 10: Output Compare 4 Fast enable */ +#define ATIM_CCMR2_OC4PE (1 << 11) /* Bit 11: Output Compare 4 Preload enable */ +#define ATIM_CCMR2_OC4M_SHIFT (12) /* Bits 14-12: Output Compare 4 Mode */ +#define ATIM_CCMR2_OC4M_MASK (7 << ATIM_CCMR2_OC4M_SHIFT) + /* (See common (unshifted) bit field definitions above) */ +#define ATIM_CCMR2_OC4CE (1 << 15) /* Bit 15: Output Compare 4 Clear Enable */ +#define ATIM_CCMR2_OC3M (1 << 16) /* Bit 16: Output Compare 3 mode - bit 3 */ +#define ATIM_CCMR2_OC4M (1 << 24) /* Bit 24: Output Compare 4 mode - bit 3 */ + +/* Capture/compare mode register 2 - Input Capture Mode */ + + /* Bits 1-0:(same as output compare mode) */ +#define ATIM_CCMR2_IC3PSC_SHIFT (2) /* Bits 3-2: Input Capture 3 Prescaler */ +#define ATIM_CCMR1_IC3PSC_MASK (3 << ATIM_CCMR2_IC3PSC_SHIFT) + /* (See common (unshifted) bit field definitions above) */ +#define ATIM_CCMR2_IC3F_SHIFT (4) /* Bits 7-4: Input Capture 3 Filter */ +#define ATIM_CCMR2_IC3F_MASK (0x0f << ATIM_CCMR2_IC3F_SHIFT) + /* (See common (unshifted) bit field definitions above) */ + /* Bits 9:8 (same as output compare mode) */ +#define ATIM_CCMR2_IC4PSC_SHIFT (10) /* Bits 11:10: Input Capture 4 Prescaler */ +#define ATIM_CCMR2_IC4PSC_MASK (3 << ATIM_CCMR2_IC4PSC_SHIFT) + /* (See common (unshifted) bit field definitions above) */ +#define ATIM_CCMR2_IC4F_SHIFT (12) /* Bits 15-12: Input Capture 4 Filter */ +#define ATIM_CCMR2_IC4F_MASK (0x0f << ATIM_CCMR2_IC4F_SHIFT) + /* (See common (unshifted) bit field definitions above) */ + +/* Capture/compare mode register 3 -- Output compare mode */ + +#define ATIM_CCMR3_OC5FE (1 << 2) /* Bit 2: Output Compare 5 Fast enable */ +#define ATIM_CCMR3_OC5PE (1 << 3) /* Bit 3: Output Compare 5 Preload enable */ +#define ATIM_CCMR3_OC5M_SHIFT (4) /* Bits 6-4: Output Compare 5 Mode */ +#define ATIM_CCMR3_OC5M_MASK (7 << ATIM_CCMR3_OC5M_SHIFT) + /* (See common (unshifted) bit field definitions below) */ +#define ATIM_CCMR3_OC5CE (1 << 7) /* Bit 7: Output Compare 5 Clear Enable */ +#define ATIM_CCMR3_OC6FE (1 << 10) /* Bit 10: Output Compare 6 Fast enable */ +#define ATIM_CCMR3_OC6PE (1 << 11) /* Bit 11: Output Compare 6 Preload enable */ +#define ATIM_CCMR3_OC6M_SHIFT (12) /* Bits 14-12: Output Compare 7 Mode */ +#define ATIM_CCMR3_OC6M_MASK (7 << ATIM_CCMR3_OC6M_SHIFT) + /* (See common (unshifted) bit field definitions below) */ +#define ATIM_CCMR3_OC6CE (1 << 15) /* Bit 15: Output Compare 7 Clear Enable */ +#define ATIM_CCMR3_OC5M (1 << 16) /* Bit 16: Output Compare 5 mode - bit 3 */ +#define ATIM_CCMR3_OC6M (1 << 24) /* Bit 24: Output Compare 6 mode - bit 3 */ + + +/* Capture/compare enable register */ + +#define ATIM_CCER_CC1E (1 << 0) /* Bit 0: Capture/Compare 1 output enable */ +#define ATIM_CCER_CC1P (1 << 1) /* Bit 1: Capture/Compare 1 output Polarity */ +#define ATIM_CCER_CC1NE (1 << 2) /* Bit 2: Capture/Compare 1 Complementary output enable */ +#define ATIM_CCER_CC1NP (1 << 3) /* Bit 3: Capture/Compare 1 Complementary output polarity */ +#define ATIM_CCER_CC2E (1 << 4) /* Bit 4: Capture/Compare 2 output enable */ +#define ATIM_CCER_CC2P (1 << 5) /* Bit 5: Capture/Compare 2 output Polarity */ +#define ATIM_CCER_CC2NE (1 << 6) /* Bit 6: Capture/Compare 2 Complementary output enable */ +#define ATIM_CCER_CC2NP (1 << 7) /* Bit 7: Capture/Compare 2 Complementary output polarity */ +#define ATIM_CCER_CC3E (1 << 8) /* Bit 8: Capture/Compare 3 output enable */ +#define ATIM_CCER_CC3P (1 << 9) /* Bit 9: Capture/Compare 3 output Polarity */ +#define ATIM_CCER_CC3NE (1 << 10) /* Bit 10: Capture/Compare 3 Complementary output enable */ +#define ATIM_CCER_CC3NP (1 << 11) /* Bit 11: Capture/Compare 3 Complementary output polarity */ +#define ATIM_CCER_CC4E (1 << 12) /* Bit 12: Capture/Compare 4 output enable */ +#define ATIM_CCER_CC4P (1 << 13) /* Bit 13: Capture/Compare 4 output Polarity */ +#define ATIM_CCER_CC4NP (1 << 15) /* Bit 15: Capture/Compare 4 Complementary output polarity */ +#define ATIM_CCER_CC5E (1 << 16) /* Bit 16: Capture/Compare 5 output enable */ +#define ATIM_CCER_CC5P (1 << 17) /* Bit 17: Capture/Compare 5 output Polarity */ +#define ATIM_CCER_CC6E (1 << 20) /* Bit 20: Capture/Compare 6 output enable */ +#define ATIM_CCER_CC6P (1 << 21) /* Bit 21: Capture/Compare 6 output Polarity */ + + +/* 16-bit counter register */ + +#define ATIM_CNT_SHIFT (0) /* Bits 0-15: Timer counter value */ +#define ATIM_CNT_MASK (0xffff << ATIM_CNT_SHIFT) + +/* Repetition counter register */ + +#define ATIM_RCR_REP_SHIFT (0) /* Bits 0-15: Repetition Counter Value */ +#define ATIM_RCR_REP_MASK (0xffff << ATIM_RCR_REP_SHIFT) + +#define ATIM_RCR_REP_MAX 65536 + +/* Capture/compare registers (CCR) */ + +#define ATIM_CCR5_GC5C1 (1 << 29) /* Bit 29: Group Channel 5 and Channel 1 */ +#define ATIM_CCR5_GC5C2 (1 << 30) /* Bit 30: Group Channel 5 and Channel 2 */ +#define ATIM_CCR5_GC5C3 (1 << 31) /* Bit 31: Group Channel 5 and Channel 3 */ + +#define ATIM_CCR_MASK (0xffff) + +/* Break and dead-time register */ + +#define ATIM_BDTR_DTG_SHIFT (0) /* Bits 7:0 [7:0]: Dead-Time Generator set-up */ +#define ATIM_BDTR_DTG_MASK (0xff << ATIM_BDTR_DTG_SHIFT) +#define ATIM_BDTR_LOCK_SHIFT (8) /* Bits 9:8 [1:0]: Lock Configuration */ +#define ATIM_BDTR_LOCK_MASK (3 << ATIM_BDTR_LOCK_SHIFT) +# define ATIM_BDTR_LOCKOFF (0 << ATIM_BDTR_LOCK_SHIFT) /* 00: LOCK OFF - No bit is write protected */ +# define ATIM_BDTR_LOCK1 (1 << ATIM_BDTR_LOCK_SHIFT) /* 01: LOCK Level 1 protection */ +# define ATIM_BDTR_LOCK2 (2 << ATIM_BDTR_LOCK_SHIFT) /* 10: LOCK Level 2 protection */ +# define ATIM_BDTR_LOCK3 (3 << ATIM_BDTR_LOCK_SHIFT) /* 11: LOCK Level 3 protection */ */ +#define ATIM_BDTR_OSSI (1 << 10) /* Bit 10: Off-State Selection for Idle mode */ +#define ATIM_BDTR_OSSR (1 << 11) /* Bit 11: Off-State Selection for Run mode */ +#define ATIM_BDTR_BKE (1 << 12) /* Bit 12: Break enable */ +#define ATIM_BDTR_BKP (1 << 13) /* Bit 13: Break Polarity */ +#define ATIM_BDTR_AOE (1 << 14) /* Bit 14: Automatic Output enable */ +#define ATIM_BDTR_MOE (1 << 15) /* Bit 15: Main Output enable */ +#define ATIM_BDTR_BKF_SHIFT (16) /* Bits 16-19: Break filter */ +#define ATIM_BDTR_BKF_MASK (0xf << ATIM_BDTR_BKF_SHIFT) +# define ATIM_BDTR_BKF_NOFILT (0 << ATIM_BDTR_BKF_SHIFT) /* 0000: No filter, BRK acts asynchronously */ +# define ATIM_BDTR_BKF_FCKINT2 (1 << ATIM_BDTR_BKF_SHIFT) /* 0001: fSAMPLING=fCK_INT, N=2 */ +# define ATIM_BDTR_BKF_FCKINT4 (2 << ATIM_BDTR_BKF_SHIFT) /* 0010: fSAMPLING=fCK_INT, N=4 */ +# define ATIM_BDTR_BKF_FCKINT8 (3 << ATIM_BDTR_BKF_SHIFT) /* 0011: fSAMPLING=fCK_INT, N=8 */ +# define ATIM_BDTR_BKF_FDTSd26 (4 << ATIM_BDTR_BKF_SHIFT) /* 0100: fSAMPLING=fDTS/2, N=6 */ +# define ATIM_BDTR_BKF_FDTSd28 (5 << ATIM_BDTR_BKF_SHIFT) /* 0101: fSAMPLING=fDTS/2, N=8 */ +# define ATIM_BDTR_BKF_FDTSd36 (6 << ATIM_BDTR_BKF_SHIFT) /* 0110: fSAMPLING=fDTS/4, N=6 */ +# define ATIM_BDTR_BKF_FDTSd38 (7 << ATIM_BDTR_BKF_SHIFT) /* 0111: fSAMPLING=fDTS/4, N=8 */ +# define ATIM_BDTR_BKF_FDTSd86 (8 << ATIM_BDTR_BKF_SHIFT) /* 1000: fSAMPLING=fDTS/8, N=6 */ +# define ATIM_BDTR_BKF_FDTSd88 (9 << ATIM_BDTR_BKF_SHIFT) /* 1001: fSAMPLING=fDTS/8, N=8 */ +# define ATIM_BDTR_BKF_FDTSd165 (10 << ATIM_BDTR_BKF_SHIFT) /* 1010: fSAMPLING=fDTS/16, N=5 */ +# define ATIM_BDTR_BKF_FDTSd166 (11 << ATIM_BDTR_BKF_SHIFT) /* 1011: fSAMPLING=fDTS/16, N=6 */ +# define ATIM_BDTR_BKF_FDTSd168 (12 << ATIM_BDTR_BKF_SHIFT) /* 1100: fSAMPLING=fDTS/16, N=8 */ +# define ATIM_BDTR_BKF_FDTSd325 (13 << ATIM_BDTR_BKF_SHIFT) /* 1101: fSAMPLING=fDTS/32, N=5 */ +# define ATIM_BDTR_BKF_FDTSd326 (14 << ATIM_BDTR_BKF_SHIFT) /* 1110: fSAMPLING=fDTS/32, N=6 */ +# define ATIM_BDTR_BKF_FDTSd328 (15 << ATIM_BDTR_BKF_SHIFT) /* 1111: fSAMPLING=fDTS/32, N=8 */ +#define ATIM_BDTR_BK2F_SHIFT (20) /* Bits 20-23: Break 2 filter */ +#define ATIM_BDTR_BK2F_MASK (0xf << ATIM_BDTR_BK2F_SHIFT) +# define ATIM_BDTR_BK2F_NOFILT (0 << ATIM_BDTR_BK2F_SHIFT) /* 0000: No filter, BRK 2 acts asynchronously */ +# define ATIM_BDTR_BK2F_FCKINT2 (1 << ATIM_BDTR_BK2F_SHIFT) /* 0001: fSAMPLING=fCK_INT, N=2 */ +# define ATIM_BDTR_BK2F_FCKINT4 (2 << ATIM_BDTR_BK2F_SHIFT) /* 0010: fSAMPLING=fCK_INT, N=4 */ +# define ATIM_BDTR_BK2F_FCKINT8 (3 << ATIM_BDTR_BK2F_SHIFT) /* 0011: fSAMPLING=fCK_INT, N=8 */ +# define ATIM_BDTR_BK2F_FDTSd26 (4 << ATIM_BDTR_BK2F_SHIFT) /* 0100: fSAMPLING=fDTS/2, N=6 */ +# define ATIM_BDTR_BK2F_FDTSd28 (5 << ATIM_BDTR_BK2F_SHIFT) /* 0101: fSAMPLING=fDTS/2, N=8 */ +# define ATIM_BDTR_BK2F_FDTSd36 (6 << ATIM_BDTR_BK2F_SHIFT) /* 0110: fSAMPLING=fDTS/4, N=6 */ +# define ATIM_BDTR_BK2F_FDTSd38 (7 << ATIM_BDTR_BK2F_SHIFT) /* 0111: fSAMPLING=fDTS/4, N=8 */ +# define ATIM_BDTR_BK2F_FDTSd86 (8 << ATIM_BDTR_BK2F_SHIFT) /* 1000: fSAMPLING=fDTS/8, N=6 */ +# define ATIM_BDTR_BK2F_FDTSd88 (9 << ATIM_BDTR_BK2F_SHIFT) /* 1001: fSAMPLING=fDTS/8, N=8 */ +# define ATIM_BDTR_BK2F_FDTSd165 (10 << ATIM_BDTR_BK2F_SHIFT) /* 1010: fSAMPLING=fDTS/16, N=5 */ +# define ATIM_BDTR_BK2F_FDTSd166 (11 << ATIM_BDTR_BK2F_SHIFT) /* 1011: fSAMPLING=fDTS/16, N=6 */ +# define ATIM_BDTR_BK2F_FDTSd168 (12 << ATIM_BDTR_BK2F_SHIFT) /* 1100: fSAMPLING=fDTS/16, N=8 */ +# define ATIM_BDTR_BK2F_FDTSd325 (13 << ATIM_BDTR_BK2F_SHIFT) /* 1101: fSAMPLING=fDTS/32, N=5 */ +# define ATIM_BDTR_BK2F_FDTSd326 (14 << ATIM_BDTR_BK2F_SHIFT) /* 1110: fSAMPLING=fDTS/32, N=6 */ +# define ATIM_BDTR_BK2F_FDTSd328 (15 << ATIM_BDTR_BK2F_SHIFT) /* 1111: fSAMPLING=fDTS/32, N=8 */ +#define ATIM_BDTR_BK2E (1 << 24) /* Bit 24: Break 2 enable */ +#define ATIM_BDTR_BK2P (1 << 1525 /* Bit 25:Break 2 polarity */ + + +/* DMA control register */ + +#define ATIM_DCR_DBA_SHIFT (0) /* Bits 4-0: DMA Base Address */ +#define ATIM_DCR_DBA_MASK (0x1f << ATIM_DCR_DBA_SHIFT) +#define ATIM_DCR_DBL_SHIFT (8) /* Bits 12-8: DMA Burst Length */ +#define ATIM_DCR_DBL_MASK (0x1f << ATIM_DCR_DBL_SHIFT) +# define ATIM_DCR_DBL(n) (((n)-1) << ATIM_DCR_DBL_SHIFT) /* n transfers, n = 1..18 */ + +/* Control register 1 (TIM2-5 and TIM9-14) */ + +#define GTIM_CR1_CEN (1 << 0) /* Bit 0: Counter enable */ +#define GTIM_CR1_UDIS (1 << 1) /* Bit 1: Update Disable */ +#define GTIM_CR1_URS (1 << 2) /* Bit 2: Update Request Source */ +#define GTIM_CR1_OPM (1 << 3) /* Bit 3: One Pulse Mode (TIM2-5, 9, and 12 only) */ +#define GTIM_CR1_DIR (1 << 4) /* Bit 4: Direction (TIM2-5 only) */ +#define GTIM_CR1_CMS_SHIFT (5) /* Bits 6-5: Center-aligned Mode Selection (TIM2-5 only) */ +#define GTIM_CR1_CMS_MASK (3 << GTIM_CR1_CMS_SHIFT) +# define GTIM_CR1_EDGE (0 << GTIM_CR1_CMS_SHIFT) /* 00: Edge-aligned mode. */ +# define GTIM_CR1_CENTER1 (1 << GTIM_CR1_CMS_SHIFT) /* 01: Center-aligned mode 1 */ +# define GTIM_CR1_CENTER2 (2 << GTIM_CR1_CMS_SHIFT) /* 10: Center-aligned mode 2 */ +# define GTIM_CR1_CENTER3 (3 << GTIM_CR1_CMS_SHIFT) /* 11: Center-aligned mode 3 */ +#define GTIM_CR1_ARPE (1 << 7) /* Bit 7: Auto-Reload Preload enable */ +#define GTIM_CR1_CKD_SHIFT (8) /* Bits 9-8: Clock Division */ +#define GTIM_CR1_CKD_MASK (3 << GTIM_CR1_CKD_SHIFT) +# define GTIM_CR1_TCKINT (0 << GTIM_CR1_CKD_SHIFT) /* 00: tDTS = tCK_INT */ +# define GTIM_CR1_2TCKINT (1 << GTIM_CR1_CKD_SHIFT) /* 01: tDTS = 2 x tCK_INT */ +# define GTIM_CR1_4TCKINT (2 << GTIM_CR1_CKD_SHIFT) /* 10: tDTS = 4 x tCK_INT */ +#define GTIM_CR1_UIFREMAP (1 << 11) /* Bit 11: UIF status bit remapping */ + +/* Control register 2 (TIM2-5, TIM9-12) */ + +#define GTIM_CR2_CCPC (1 << 0) /* Bit 0: Capture/compare preloaded control (TIM15-17 only) */ +#define GTIM_CR2_CCUS (1 << 2) /* Bit 2: Capture/compare control update selection (TIM15-17 only) */ +#define GTIM_CR2_CCDS (1 << 3) /* Bit 3: Capture/Compare DMA Selection (TIM2-5,1,&16 only) */ +#define GTIM_CR2_MMS_SHIFT (4) /* Bits 6-4: Master Mode Selection (not TIM16) */ +#define GTIM_CR2_MMS_MASK (7 << GTIM_CR2_MMS_SHIFT) +# define GTIM_CR2_MMS_RESET (0 << GTIM_CR2_MMS_SHIFT) /* 000: Reset */ +# define GTIM_CR2_MMS_ENABLE (1 << GTIM_CR2_MMS_SHIFT) /* 001: Enable */ +# define GTIM_CR2_MMS_UPDATE (2 << GTIM_CR2_MMS_SHIFT) /* 010: Update */ +# define GTIM_CR2_MMS_COMPP (3 << GTIM_CR2_MMS_SHIFT) /* 011: Compare Pulse */ +# define GTIM_CR2_MMS_OC1REF (4 << GTIM_CR2_MMS_SHIFT) /* 100: Compare - OC1REF signal is used as trigger output (TRGO) */ +# define GTIM_CR2_MMS_OC2REF (5 << GTIM_CR2_MMS_SHIFT) /* 101: Compare - OC2REF signal is used as trigger output (TRGO) */ +# define GTIM_CR2_MMS_OC3REF (6 << GTIM_CR2_MMS_SHIFT) /* 110: Compare - OC3REF signal is used as trigger output (TRGO, TIM2-5 and TIM15 only) */ +# define GTIM_CR2_MMS_OC4REF (7 << GTIM_CR2_MMS_SHIFT) /* 111: Compare - OC4REF signal is used as trigger output (TRGO, TIM2-5 and TIM15 only) */ +#define GTIM_CR2_TI1S (1 << 7) /* Bit 7: TI1 Selection (not TIM16) */ +#define GTIM_CR2_OIS1 (1 << 8) /* Bit 8: COutput Idle state 1 (OC1 output) (TIM15-17 only) */ +#define GTIM_CR2_OIS1N (1 << 9) /* Bit 9: Output Idle state 1 (OC1N output) (TIM15-17 only) */ +#define GTIM_CR2_OIS2 (1 << 10) /* Bit 10: Output idle state 2 (OC2 output) (TIM15 only) */ + +/* Slave mode control register (TIM2-5) */ + +#define GTIM_SMCR_SMS_SHIFT (0) /* Bits 2-0: Slave Mode Selection */ +#define GTIM_SMCR_SMS_MASK (7 << GTIM_SMCR_SMS_SHIFT) +# define GTIM_SMCR_DISAB (0 << GTIM_SMCR_SMS_SHIFT) /* 000: Slave mode disabled */ +# define GTIM_SMCR_ENCMD1 (1 << GTIM_SMCR_SMS_SHIFT) /* 001: Encoder mode 1 */ +# define GTIM_SMCR_ENCMD2 (2 << GTIM_SMCR_SMS_SHIFT) /* 010: Encoder mode 2 */ +# define GTIM_SMCR_ENCMD3 (3 << GTIM_SMCR_SMS_SHIFT) /* 011: Encoder mode 3 */ +# define GTIM_SMCR_RESET (4 << GTIM_SMCR_SMS_SHIFT) /* 100: Reset Mode */ +# define GTIM_SMCR_GATED (5 << GTIM_SMCR_SMS_SHIFT) /* 101: Gated Mode */ +# define GTIM_SMCR_TRIGGER (6 << GTIM_SMCR_SMS_SHIFT) /* 110: Trigger Mode */ +# define GTIM_SMCR_EXTCLK1 (7 << GTIM_SMCR_SMS_SHIFT) /* 111: External Clock Mode 1 */ +#define GTIM_SMCR_TS_SHIFT (4) /* Bits 6-4: Trigger Selection */ +#define GTIM_SMCR_TS_MASK (7 << GTIM_SMCR_TS_SHIFT) +# define GTIM_SMCR_ITR0 (0 << GTIM_SMCR_TS_SHIFT) /* 000: Internal Trigger 0 (ITR0). TIM1 */ +# define GTIM_SMCR_ITR1 (1 << GTIM_SMCR_TS_SHIFT) /* 001: Internal Trigger 1 (ITR1). TIM2 */ +# define GTIM_SMCR_ITR2 (2 << GTIM_SMCR_TS_SHIFT) /* 010: Internal Trigger 2 (ITR2). TIM3 */ +# define GTIM_SMCR_ITR3 (3 << GTIM_SMCR_TS_SHIFT) /* 011: Internal Trigger 3 (ITR3). TIM4 */ +# define GTIM_SMCR_TI1FED (4 << GTIM_SMCR_TS_SHIFT) /* 100: TI1 Edge Detector (TI1F_ED) */ +# define GTIM_SMCR_TI1FP1 (5 << GTIM_SMCR_TS_SHIFT) /* 101: Filtered Timer Input 1 (TI1FP1) */ +# define GTIM_SMCR_TI2FP2 (6 << GTIM_SMCR_TS_SHIFT) /* 110: Filtered Timer Input 2 (TI2FP2) */ +# define GTIM_SMCR_ETRF (7 << GTIM_SMCR_TS_SHIFT) /* 111: External Trigger input (ETRF) */ +#define GTIM_SMCR_MSM (1 << 7) /* Bit 7: Master/Slave mode */ +#define GTIM_SMCR_ETF_SHIFT (8) /* Bits 11-8: External Trigger Filter (not TIM15) */ +#define GTIM_SMCR_ETF_MASK (0x0f << GTIM_SMCR_ETF_SHIFT) +# define GTIM_SMCR_NOFILT (0 << GTIM_SMCR_ETF_SHIFT) /* 0000: No filter, sampling is done at fDTS */ +# define GTIM_SMCR_FCKINT2 (1 << GTIM_SMCR_ETF_SHIFT) /* 0001: fSAMPLING=fCK_INT, N=2 */ +# define GTIM_SMCR_FCKINT4 (2 << GTIM_SMCR_ETF_SHIFT) /* 0010: fSAMPLING=fCK_INT, N=4 */ +# define GTIM_SMCR_FCKINT8 (3 << GTIM_SMCR_ETF_SHIFT) /* 0011: fSAMPLING=fCK_INT, N=8 */ +# define GTIM_SMCR_FDTSd26 (4 << GTIM_SMCR_ETF_SHIFT) /* 0100: fSAMPLING=fDTS/2, N=6 */ +# define GTIM_SMCR_FDTSd28 (5 << GTIM_SMCR_ETF_SHIFT) /* 0101: fSAMPLING=fDTS/2, N=8 */ +# define GTIM_SMCR_FDTSd36 (6 << GTIM_SMCR_ETF_SHIFT) /* 0110: fSAMPLING=fDTS/4, N=6 */ +# define GTIM_SMCR_FDTSd38 (7 << GTIM_SMCR_ETF_SHIFT) /* 0111: fSAMPLING=fDTS/4, N=8 */ +# define GTIM_SMCR_FDTSd86 (8 << GTIM_SMCR_ETF_SHIFT) /* 1000: fSAMPLING=fDTS/8, N=6 */ +# define GTIM_SMCR_FDTSd88 (9 << GTIM_SMCR_ETF_SHIFT) /* 1001: fSAMPLING=fDTS/8, N=8 */ +# define GTIM_SMCR_FDTSd165 (10 << GTIM_SMCR_ETF_SHIFT) /* 1010: fSAMPLING=fDTS/16, N=5 */ +# define GTIM_SMCR_FDTSd166 (11 << GTIM_SMCR_ETF_SHIFT) /* 1011: fSAMPLING=fDTS/16, N=6 */ +# define GTIM_SMCR_FDTSd168 (12 << GTIM_SMCR_ETF_SHIFT) /* 1100: fSAMPLING=fDTS/16, N=8 */ +# define GTIM_SMCR_FDTSd325 (13 << GTIM_SMCR_ETF_SHIFT) /* 1101: fSAMPLING=fDTS/32, N=5 */ +# define GTIM_SMCR_FDTSd326 (14 << GTIM_SMCR_ETF_SHIFT) /* 1110: fSAMPLING=fDTS/32, N=6 */ +# define GTIM_SMCR_FDTSd328 (15 << GTIM_SMCR_ETF_SHIFT) /* 1111: fSAMPLING=fDTS/32, N=8 */ +#define GTIM_SMCR_ETPS_SHIFT (12) /* Bits 13-12: External Trigger Prescaler (not TIM15) */ +#define GTIM_SMCR_ETPS_MASK (3 << GTIM_SMCR_ETPS_SHIFT) +# define GTIM_SMCR_PSCOFF (0 << GTIM_SMCR_ETPS_SHIFT) /* 00: Prescaler OFF */ +# define GTIM_SMCR_ETRPd2 (1 << GTIM_SMCR_ETPS_SHIFT) /* 01: ETRP frequency divided by 2 */ +# define GTIM_SMCR_ETRPd4 (2 << GTIM_SMCR_ETPS_SHIFT) /* 10: ETRP frequency divided by 4 */ +# define GTIM_SMCR_ETRPd8 (3 << GTIM_SMCR_ETPS_SHIFT) /* 11: ETRP frequency divided by 8 */ +#define GTIM_SMCR_ECE (1 << 14) /* Bit 14: External Clock enable */ +#define GTIM_SMCR_ETP (1 << 15) /* Bit 15: External Trigger Polarity */ +#define GTIM_SMCR_SMS (1 << 16) /* Bit 16: Slave mode selection - bit 3 */ + +/* DMA/Interrupt enable register (TIM2-5 and TIM9-14) */ + +#define GTIM_DIER_UIE (1 << 0) /* Bit 0: Update interrupt enable */ +#define GTIM_DIER_CC1IE (1 << 1) /* Bit 1: Capture/Compare 1 interrupt enable */ +#define GTIM_DIER_CC2IE (1 << 2) /* Bit 2: Capture/Compare 2 interrupt enable (TIM2-5,9,12,&15 only) */ +#define GTIM_DIER_CC3IE (1 << 3) /* Bit 3: Capture/Compare 3 interrupt enable (TIM2-5 only) */ +#define GTIM_DIER_CC4IE (1 << 4) /* Bit 4: Capture/Compare 4 interrupt enable (TIM2-5 only) */ +#define GTIM_DIER_COMIE (1 << 5) /* Bit 5: COM interrupt enable (TIM15-17 only) */ +#define GTIM_DIER_TIE (1 << 6) /* Bit 6: Trigger interrupt enable (TIM2-5,9,&12 only) */ +#define GTIM_DIER_BIE (1 << 7) /* Bit 7: Break interrupt enable (TIM15-17 only) */ +#define GTIM_DIER_UDE (1 << 8) /* Bit 8: Update DMA request enable (TIM2-5&15-17 only) */ +#define GTIM_DIER_CC1DE (1 << 9) /* Bit 9: Capture/Compare 1 DMA request enable (TIM2-5&15-17 only) */ +#define GTIM_DIER_CC2DE (1 << 10) /* Bit 10: Capture/Compare 2 DMA request enable (TIM2-5&15 only) */ +#define GTIM_DIER_CC3DE (1 << 11) /* Bit 11: Capture/Compare 3 DMA request enable (TIM2-5 only) */ +#define GTIM_DIER_CC4DE (1 << 12) /* Bit 12: Capture/Compare 4 DMA request enable (TIM2-5 only) */ +#define GTIM_DIER_COMDE (1 << 13) /* Bit 13: COM DMA request enable (TIM15-17 only) */ +#define GTIM_DIER_TDE (1 << 14) /* Bit 14: Trigger DMA request enable (TIM2-5&15-17 only) */ + +/* Status register */ + +#define GTIM_SR_UIF (1 << 0) /* Bit 0: Update interrupt flag */ +#define GTIM_SR_CC1IF (1 << 1) /* Bit 1: Capture/compare 1 interrupt flag */ +#define GTIM_SR_CC2IF (1 << 2) /* Bit 2: Capture/Compare 2 interrupt flag (TIM2-5,9,12,&15 only) */ +#define GTIM_SR_CC3IF (1 << 3) /* Bit 3: Capture/Compare 3 interrupt flag (TIM2-5 only) */ +#define GTIM_SR_CC4IF (1 << 4) /* Bit 4: Capture/Compare 4 interrupt flag (TIM2-5 only) */ +#define GTIM_SR_COMIF (1 << 5) /* Bit 5: COM interrupt flag (TIM15-17 only) */ +#define GTIM_SR_TIF (1 << 6) /* Bit 6: Trigger interrupt Flag (TIM2-5,9,12&15-17 only) */ +#define GTIM_SR_BIF (1 << 7) /* Bit 7: Break interrupt flag (TIM15-17 only) */ +#define GTIM_SR_CC1OF (1 << 9) /* Bit 9: Capture/Compare 1 Overcapture flag */ +#define GTIM_SR_CC2OF (1 << 10) /* Bit 10: Capture/Compare 2 Overcapture flag (TIM2-5,9,12&15 only) */ +#define GTIM_SR_CC3OF (1 << 11) /* Bit 11: Capture/Compare 3 Overcapture flag (TIM2-5 only) */ +#define GTIM_SR_CC4OF (1 << 12) /* Bit 12: Capture/Compare 4 Overcapture flag (TIM2-5 only) */ + +/* Event generation register (TIM2-5 and TIM9-14) */ + +#define GTIM_EGR_UG (1 << 0) /* Bit 0: Update generation */ +#define GTIM_EGR_CC1G (1 << 1) /* Bit 1: Capture/compare 1 generation */ +#define GTIM_EGR_CC2G (1 << 2) /* Bit 2: Capture/compare 2 generation (TIM2-5,9,12,&15 only) */ +#define GTIM_EGR_CC3G (1 << 3) /* Bit 3: Capture/compare 3 generation (TIM2-5 only) */ +#define GTIM_EGR_CC4G (1 << 4) /* Bit 4: Capture/compare 4 generation (TIM2-5 only) */ +#define GTIM_EGR_COMIG (1 << 5) /* Bit 5: Capture/Compare control update generation (TIM15-17 only) */ +#define GTIM_EGR_TG (1 << 6) /* Bit 6: Trigger generation (TIM2-5,9,12&16-17 only) */ +#define GTIM_EGR_BG (1 << 7) /* Bit 7: Break generation (TIM15-17 only) */ + +/* Capture/compare mode register 1 - Output compare mode (TIM2-5 and TIM9-14) */ + +#define GTIM_CCMR1_CC1S_SHIFT (0) /* Bits 1-0: Capture/Compare 1 Selection */ +#define GTIM_CCMR1_CC1S_MASK (3 << GTIM_CCMR1_CC1S_SHIFT) + /* (See common CCMR Capture/Compare Selection definitions below) */ +#define GTIM_CCMR1_OC1FE (1 << 2) /* Bit 2: Output Compare 1 Fast enable */ +#define GTIM_CCMR1_OC1PE (1 << 3) /* Bit 3: Output Compare 1 Preload enable */ +#define GTIM_CCMR1_OC1M_SHIFT (4) /* Bits 6-4: Output Compare 1 Mode */ +#define GTIM_CCMR1_OC1M_MASK (7 << GTIM_CCMR1_OC1M_SHIFT) + /* (See common CCMR Output Compare Mode definitions below) */ +#define GTIM_CCMR1_OC1CE (1 << 7) /* Bit 7: Output Compare 1Clear Enable */ +#define GTIM_CCMR1_CC2S_SHIFT (8) /* Bits 9-8: Capture/Compare 2 Selection */ +#define GTIM_CCMR1_CC2S_MASK (3 << GTIM_CCMR1_CC2S_SHIFT) + /* (See common CCMR Capture/Compare Selection definitions below) */ +#define GTIM_CCMR1_OC2FE (1 << 10) /* Bit 10: Output Compare 2 Fast enable */ +#define GTIM_CCMR1_OC2PE (1 << 11) /* Bit 11: Output Compare 2 Preload enable */ +#define GTIM_CCMR1_OC2M_SHIFT (12) /* Bits 14-12: Output Compare 2 Mode */ +#define GTIM_CCMR1_OC2M_MASK (7 << GTIM_CCMR1_OC2M_SHIFT) + /* (See common CCMR Output Compare Mode definitions below) */ +#define GTIM_CCMR1_OC2CE (1 << 15) /* Bit 15: Output Compare 2 Clear Enable */ +#define GTIM_CCMR1_OC1M (1 << 16) /* Bit 16: Output Compare 1 mode - bit 3 */ +#define GTIM_CCMR1_OC2M (1 << 24) /* Bit 24: Output Compare 2 mode - bit 3 */ + +/* Common CCMR (unshifted) Capture/Compare Selection bit-field definitions */ + +#define GTIM_CCMR_CCS_CCOUT (0) /* 00: CCx channel output */ +#define GTIM_CCMR_CCS_CCIN1 (1) /* 01: CCx channel input, ICx is TIx */ +#define GTIM_CCMR_CCS_CCIN2 (2) /* 10: CCx channel input, ICx is TIy */ +#define GTIM_CCMR_CCS_CCINTRC (3) /* 11: CCx channel input, ICx is TRC */ + +/* Common CCMR (unshifted) Compare Mode bit field definitions */ + +#define GTIM_CCMR_MODE_FRZN (0) /* 000: Frozen */ +#define GTIM_CCMR_MODE_CHACT (1) /* 001: Channel x active on match */ +#define GTIM_CCMR_MODE_CHINACT (2) /* 010: Channel x inactive on match */ +#define GTIM_CCMR_MODE_OCREFTOG (3) /* 011: OCxREF toggle ATIM_CNT=ATIM_CCRx */ +#define GTIM_CCMR_MODE_OCREFLO (4) /* 100: OCxREF forced low */ +#define GTIM_CCMR_MODE_OCREFHI (5) /* 101: OCxREF forced high */ +#define GTIM_CCMR_MODE_PWM1 (6) /* 110: PWM mode 1 */ +#define GTIM_CCMR_MODE_PWM2 (7) /* 111: PWM mode 2 */ + +/* Capture/compare mode register 1 - Input capture mode (TIM2-5 and TIM9-14) */ + + /* Bits 1-0 (Same as Output Compare Mode) */ +#define GTIM_CCMR1_IC1PSC_SHIFT (2) /* Bits 3-2: Input Capture 1 Prescaler */ +#define GTIM_CCMR1_IC1PSC_MASK (3 << GTIM_CCMR1_IC1PSC_SHIFT) + /* (See common CCMR Input Capture Prescaler definitions below) */ +#define GTIM_CCMR1_IC1F_SHIFT (4) /* Bits 7-4: Input Capture 1 Filter */ +#define GTIM_CCMR1_IC1F_MASK (0x0f << GTIM_CCMR1_IC1F_SHIFT) + /* (See common CCMR Input Capture Filter definitions below) */ + /* Bits 9-8: (Same as Output Compare Mode) */ +#define GTIM_CCMR1_IC2PSC_SHIFT (10) /* Bits 11-10: Input Capture 2 Prescaler */ +#define GTIM_CCMR1_IC2PSC_MASK (3 << GTIM_CCMR1_IC2PSC_SHIFT) + /* (See common CCMR Input Capture Prescaler definitions below) */ +#define GTIM_CCMR1_IC2F_SHIFT (12) /* Bits 15-12: Input Capture 2 Filter */ +#define GTIM_CCMR1_IC2F_MASK (0x0f << GTIM_CCMR1_IC2F_SHIFT) + /* (See common CCMR Input Capture Filter definitions below) */ + +/* Common CCMR (unshifted) Input Capture Prescaler bit-field definitions */ + +#define GTIM_CCMR_ICPSC_NOPSC (0) /* 00: no prescaler, capture each edge */ +#define GTIM_CCMR_ICPSC_EVENTS2 (1) /* 01: capture once every 2 events */ +#define GTIM_CCMR_ICPSC_EVENTS4 (2) /* 10: capture once every 4 events */ +#define GTIM_CCMR_ICPSC_EVENTS8 (3) /* 11: capture once every 8 events */ + +/* Common CCMR (unshifted) Input Capture Filter bit-field definitions */ + +#define GTIM_CCMR_ICF_NOFILT (0) /* 0000: No filter, sampling at fDTS */ +#define GTIM_CCMR_ICF_FCKINT2 (1) /* 0001: fSAMPLING=fCK_INT, N=2 */ +#define GTIM_CCMR_ICF_FCKINT4 (2) /* 0010: fSAMPLING=fCK_INT, N=4 */ +#define GTIM_CCMR_ICF_FCKINT8 (3) /* 0011: fSAMPLING=fCK_INT, N=8 */ +#define GTIM_CCMR_ICF_FDTSd26 (4) /* 0100: fSAMPLING=fDTS/2, N=6 */ +#define GTIM_CCMR_ICF_FDTSd28 (5) /* 0101: fSAMPLING=fDTS/2, N=8 */ +#define GTIM_CCMR_ICF_FDTSd46 (6) /* 0110: fSAMPLING=fDTS/4, N=6 */ +#define GTIM_CCMR_ICF_FDTSd48 (7) /* 0111: fSAMPLING=fDTS/4, N=8 */ +#define GTIM_CCMR_ICF_FDTSd86 (8) /* 1000: fSAMPLING=fDTS/8, N=6 */ +#define GTIM_CCMR_ICF_FDTSd88 (9) /* 1001: fSAMPLING=fDTS/8, N=8 */ +#define GTIM_CCMR_ICF_FDTSd165 (10) /* 1010: fSAMPLING=fDTS/16, N=5 */ +#define GTIM_CCMR_ICF_FDTSd166 (11) /* 1011: fSAMPLING=fDTS/16, N=6 */ +#define GTIM_CCMR_ICF_FDTSd168 (12) /* 1100: fSAMPLING=fDTS/16, N=8 */ +#define GTIM_CCMR_ICF_FDTSd325 (13) /* 1101: fSAMPLING=fDTS/32, N=5 */ +#define GTIM_CCMR_ICF_FDTSd326 (14) /* 1110: fSAMPLING=fDTS/32, N=6 */ +#define GTIM_CCMR_ICF_FDTSd328 (15) /* 1111: fSAMPLING=fDTS/32, N=8 */ + +/* Capture/compare mode register 2 - Output Compare mode (TIM2-5 only) */ + +#define GTIM_CCMR2_CC3S_SHIFT (0) /* Bits 1-0: Capture/Compare 3 Selection */ +#define GTIM_CCMR2_CC3S_MASK (3 << GTIM_CCMR2_CC3S_SHIFT) + /* (See common CCMR Capture/Compare Selection definitions above) */ +#define GTIM_CCMR2_OC3FE (1 << 2) /* Bit 2: Output Compare 3 Fast enable */ +#define GTIM_CCMR2_OC3PE (1 << 3) /* Bit 3: Output Compare 3 Preload enable */ +#define GTIM_CCMR2_OC3M_SHIFT (4) /* Bits 6-4: Output Compare 3 Mode */ +#define GTIM_CCMR2_OC3M_MASK (7 << GTIM_CCMR2_OC3M_SHIFT) + /* (See common CCMR Output Compare Mode definitions above) */ +#define GTIM_CCMR2_OC3CE (1 << 7) /* Bit 7: Output Compare 3 Clear Enable */ +#define GTIM_CCMR2_CC4S_SHIFT (8) /* Bits 9-8: Capture/Compare 4 Selection */ +#define GTIM_CCMR2_CC4S_MASK (3 << GTIM_CCMR2_CC4S_SHIFT) + /* (See common CCMR Capture/Compare Selection definitions above) */ +#define GTIM_CCMR2_OC4FE (1 << 10) /* Bit 10: Output Compare 4 Fast enable */ +#define GTIM_CCMR2_OC4PE (1 << 11) /* Bit 11: Output Compare 4 Preload enable */ +#define GTIM_CCMR2_OC4M_SHIFT (12) /* Bits 14-12: Output Compare 4 Mode */ +#define GTIM_CCMR2_OC4M_MASK (7 << GTIM_CCMR2_OC4M_SHIFT) + /* (See common CCMR Output Compare Mode definitions above) */ +#define GTIM_CCMR2_OC4CE (1 << 15) /* Bit 15: Output Compare 4 Clear Enable */ + +/* Capture/compare mode register 2 - Input capture mode (TIM2-5 only) */ + + /* Bits 1-0 (Same as Output Compare Mode) */ +#define GTIM_CCMR2_IC3PSC_SHIFT (2) /* Bits 3-2: Input Capture 3 Prescaler */ +#define GTIM_CCMR2_IC3PSC_MASK (3 << GTIM_CCMR2_IC3PSC_SHIFT) + /* (See common CCMR Input Capture Prescaler definitions below) */ +#define GTIM_CCMR2_IC3F_SHIFT (4) /* Bits 7-4: Input Capture 3 Filter */ +#define GTIM_CCMR2_IC3F_MASK (0x0f << GTIM_CCMR2_IC3F_SHIFT) + /* (See common CCMR Input Capture Filter definitions below) */ + /* Bits 9-8: (Same as Output Compare Mode) */ +#define GTIM_CCMR2_IC4PSC_SHIFT (10) /* Bits 11-10: Input Capture 4 Prescaler */ +#define GTIM_CCMR2_IC4PSC_MASK (3 << GTIM_CCMR2_IC4PSC_SHIFT) + /* (See common CCMR Input Capture Prescaler definitions below) */ +#define GTIM_CCMR2_IC4F_SHIFT (12) /* Bits 15-12: Input Capture 4 Filter */ +#define GTIM_CCMR2_IC4F_MASK (0x0f << GTIM_CCMR2_IC4F_SHIFT) + /* (See common CCMR Input Capture Filter definitions below) */ + +/* Capture/compare enable register (TIM1 and TIM8, TIM2-5 and TIM9-14) */ + +#define GTIM_CCER_CC1E (1 << 0) /* Bit 0: Capture/Compare 1 output enable */ +#define GTIM_CCER_CC1P (1 << 1) /* Bit 1: Capture/Compare 1 output polarity */ +#define GTIM_CCER_CC1NE (1 << 2) /* Bit 2: Capture/Compare 1 complementary output enable (TIM1 and TIM8 only) */ +#define GTIM_CCER_CC1NP (1 << 3) /* Bit 3: Capture/Compare 1 output Polarity (F2,F3,F4 and TIM15-17) */ +#define GTIM_CCER_CC2E (1 << 4) /* Bit 4: Capture/Compare 2 output enable (TIM2-5,9&12 only) */ +#define GTIM_CCER_CC2P (1 << 5) /* Bit 5: Capture/Compare 2 output polarity (TIM2-5,9&12 only) */ +#define GTIM_CCER_CC2NE (1 << 6) /* Bit 6: Capture/Compare 2 complementary output enable (TIM1 and TIM8 only) */ +#define GTIM_CCER_CC2NP (1 << 7) /* Bit 7: Capture/Compare 2 output Polarity (F2,F3,F4 and TIM2-5,9,12&15 only) */ +#define GTIM_CCER_CC3E (1 << 8) /* Bit 8: Capture/Compare 3 output enable (TIM2-5 only) */ +#define GTIM_CCER_CC3P (1 << 9) /* Bit 9: Capture/Compare 3 output Polarity (TIM2-5 only) */ +#define GTIM_CCER_CC3NE (1 << 10) /* Bit 10: Capture/Compare 3 complementary output enable (TIM1 and TIM8 only) */ +#define GTIM_CCER_CC3NP (1 << 11) /* Bit 11: Capture/Compare 3 output Polarity (F2,F4 and TIM2-5 only) */ +#define GTIM_CCER_CC4E (1 << 12) /* Bit 12: Capture/Compare 4 output enable (TIM2-5 only) */ +#define GTIM_CCER_CC4P (1 << 13) /* Bit 13: Capture/Compare 4 output Polarity (TIM2-5 only) */ +#define GTIM_CCER_CC4NP (1 << 15) /* Bit 15: Capture/Compare 4 output Polarity */ + +/* 16-bit counter register */ + +#define GTIM_CNT_SHIFT (0) /* Bits 0-15: Timer counter value */ +#define GTIM_CNT_MASK (0xffff << ATIM_CNT_SHIFT) + +/* DMA control register */ + +#define GTIM_DCR_DBA_SHIFT (0) /* Bits 4-0: DMA Base Address */ +#define GTIM_DCR_DBA_MASK (0x1f << GTIM_DCR_DBA_SHIFT) +#define GTIM_DCR_DBL_SHIFT (8) /* Bits 12-8: DMA Burst Length */ +#define GTIM_DCR_DBL_MASK (0x1f << GTIM_DCR_DBL_SHIFT) + +/* Timer 2/5 option register */ + +#define TIM2_OR_ITR1_RMP_SHIFT (10) /* Bits 10-11: Internal trigger 1 remap */ +#define TIM2_OR_ITR1_RMP_MASK (3 << TIM2_OR_ITR1_RMP_SHIFT) +# define TIM2_OR_ITR1_TIM8_TRGOUT (0 << TIM2_OR_ITR1_RMP_SHIFT) /* 00: TIM2_ITR1 input connected to TIM8_TRGOUT */ +# define TIM2_OR_ITR1_PTP (1 << TIM2_OR_ITR1_RMP_SHIFT) /* 01: TIM2_ITR1 input connected to PTP trigger output */ +# define TIM2_OR_ITR1_OTGFSSOF (2 << TIM2_OR_ITR1_RMP_SHIFT) /* 10: TIM2_ITR1 input connected to OTG FS SOF */ +# define TIM2_OR_ITR1_OTGHSSOF (3 << TIM2_OR_ITR1_RMP_SHIFT) /* 11: TIM2_ITR1 input connected to OTG HS SOF */ + +#define TIM5_OR_TI4_RMP_SHIFT (6) /* Bits 6-7: Internal trigger 4 remap */ +#define TIM5_OR_TI4_RMP_MASK (3 << TIM5_OR_TI4_RMP_SHIFT) +# define TIM5_OR_TI4_GPIO (0 << TIM5_OR_TI4_RMP_SHIFT) /* 00: TIM5_CH4 input connected to GPIO */ +# define TIM5_OR_TI4_LSI (1 << TIM5_OR_TI4_RMP_SHIFT) /* 01: TIM5_CH4 input connected to LSI internal clock */ +# define TIM5_OR_TI4_LSE (2 << TIM5_OR_TI4_RMP_SHIFT) /* 10: TIM5_CH4 input connected to LSE internal clock */ +# define TIM5_OR_TI4_RTC (3 << TIM5_OR_TI4_RMP_SHIFT) /* 11: TIM5_CH4 input connected to RTC output event */ + +#define TIM11_OR_TI1_RMP_SHIFT (6) /* Bits 6-7: Internal trigger 4 remap */ +#define TIM11_OR_TI1_RMP_MASK (3 << TIM11_OR_TI1_RMP_SHIFT) +# define TIM11_OR_TI1_GPIO (0 << TIM11_OR_TI1_RMP_SHIFT) /* 00-11: TIM11_CH1 input connected to GPIO */ +# define TIM11_OR_TI1_HSERTC (3 << TIM11_OR_TI1_RMP_SHIFT) /* 11: TIM11_CH1 input connected to HSE_RTC clock */ + + +/* Control register 1 */ + +#define BTIM_CR1_CEN (1 << 0) /* Bit 0: Counter enable */ +#define BTIM_CR1_UDIS (1 << 1) /* Bit 1: Update Disable */ +#define BTIM_CR1_URS (1 << 2) /* Bit 2: Update Request Source */ +#define BTIM_CR1_OPM (1 << 3) /* Bit 3: One Pulse Mode */ +#define BTIM_CR1_ARPE (1 << 7) /* Bit 7: Auto-Reload Preload enable */ + +/* Control register 2 */ + +#define BTIM_CR2_MMS_SHIFT (4) /* Bits 6-4: Master Mode Selection */ +#define BTIM_CR2_MMS_MASK (7 << BTIM_CR2_MMS_SHIFT) +# define BTIM_CR2_RESET (0 << BTIM_CR2_MMS_SHIFT) /* 000: Reset */ +# define BTIM_CR2_ENAB (1 << BTIM_CR2_MMS_SHIFT) /* 001: Enable */ +# define BTIM_CR2_UPDT (2 << BTIM_CR2_MMS_SHIFT) /* 010: Update */ + +/* DMA/Interrupt enable register */ + +#define BTIM_DIER_UIE (1 << 0) /* Bit 0: Update interrupt enable */ +#define BTIM_DIER_UDE (1 << 8) /* Bit 8: Update DMA request enable */ + +/* Status register */ + +#define BTIM_SR_UIF (1 << 0) /* Bit 0: Update interrupt flag */ + +/* Event generation register */ + +#define BTIM_EGR_UG (1 << 0) /* Bit 0: Update generation */ + +#endif /* __ARCH_ARM_SRC_STM32F7_CHIP_STM32F74XX75XX_TIM_H */ diff --git a/arch/arm/src/stm32f7/chip/stm32f74xx77xx_adc.h b/arch/arm/src/stm32f7/chip/stm32f74xx77xx_adc.h new file mode 100644 index 0000000000000000000000000000000000000000..bc79490798be7c1b0077d01c4c5373520d024a02 --- /dev/null +++ b/arch/arm/src/stm32f7/chip/stm32f74xx77xx_adc.h @@ -0,0 +1,484 @@ +/**************************************************************************************************** + * arch/arm/src/stm32f7/chip/stm32f74xx77xx_adc.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: 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. + * + ****************************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32F7_CHIP_STM32F74XX77XX_ADC_H +#define __ARCH_ARM_SRC_STM32F7_CHIP_STM32F74XX77XX_ADC_H + +/**************************************************************************************************** + * Included Files + ****************************************************************************************************/ + +#include + +#include "chip.h" + +/**************************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************************/ + +/* Register Offsets *********************************************************************************/ + +#define STM32_ADC_SR_OFFSET 0x0000 /* ADC status register (32-bit) */ +#define STM32_ADC_CR1_OFFSET 0x0004 /* ADC control register 1 (32-bit) */ +#define STM32_ADC_CR2_OFFSET 0x0008 /* ADC control register 2 (32-bit) */ +#define STM32_ADC_SMPR1_OFFSET 0x000c /* ADC sample time register 1 (32-bit) */ +#define STM32_ADC_SMPR2_OFFSET 0x0010 /* ADC sample time register 2 (32-bit) */ +#define STM32_ADC_JOFR1_OFFSET 0x0014 /* ADC injected channel data offset register 1 (32-bit) */ +#define STM32_ADC_JOFR2_OFFSET 0x0018 /* ADC injected channel data offset register 2 (32-bit) */ +#define STM32_ADC_JOFR3_OFFSET 0x001c /* ADC injected channel data offset register 3 (32-bit) */ +#define STM32_ADC_JOFR4_OFFSET 0x0020 /* ADC injected channel data offset register 4 (32-bit) */ +#define STM32_ADC_HTR_OFFSET 0x0024 /* ADC watchdog high threshold register (32-bit) */ +#define STM32_ADC_LTR_OFFSET 0x0028 /* ADC watchdog low threshold register (32-bit) */ +#define STM32_ADC_SQR1_OFFSET 0x002c /* ADC regular sequence register 1 (32-bit) */ +#define STM32_ADC_SQR2_OFFSET 0x0030 /* ADC regular sequence register 2 (32-bit) */ +#define STM32_ADC_SQR3_OFFSET 0x0034 /* ADC regular sequence register 3 (32-bit) */ +#define STM32_ADC_JSQR_OFFSET 0x0038 /* ADC injected sequence register (32-bit) */ +#define STM32_ADC_JDR1_OFFSET 0x003c /* ADC injected data register 1 (32-bit) */ +#define STM32_ADC_JDR2_OFFSET 0x0040 /* ADC injected data register 1 (32-bit) */ +#define STM32_ADC_JDR3_OFFSET 0x0044 /* ADC injected data register 1 (32-bit) */ +#define STM32_ADC_JDR4_OFFSET 0x0048 /* ADC injected data register 1 (32-bit) */ +#define STM32_ADC_DR_OFFSET 0x004c /* ADC regular data register (32-bit) */ + + +#define STM32_ADC_CSR_OFFSET 0x0000 /* Common status register */ +#define STM32_ADC_CCR_OFFSET 0x0004 /* Common control register */ +#define STM32_ADC_CDR_OFFSET 0x0008 /* Data register for dual and triple modes */ + +/* Register Addresses *******************************************************************************/ + +#if STM32F7_NADC > 0 +# define STM32_ADC1_SR (STM32_ADC1_BASE+STM32_ADC_SR_OFFSET) +# define STM32_ADC1_CR1 (STM32_ADC1_BASE+STM32_ADC_CR1_OFFSET) +# define STM32_ADC1_CR2 (STM32_ADC1_BASE+STM32_ADC_CR2_OFFSET) +# define STM32_ADC1_SMPR1 (STM32_ADC1_BASE+STM32_ADC_SMPR1_OFFSET) +# define STM32_ADC1_SMPR2 (STM32_ADC1_BASE+STM32_ADC_SMPR2_OFFSET) +# define STM32_ADC1_JOFR1 (STM32_ADC1_BASE+STM32_ADC_JOFR1_OFFSET) +# define STM32_ADC1_JOFR2 (STM32_ADC1_BASE+STM32_ADC_JOFR2_OFFSET) +# define STM32_ADC1_JOFR3 (STM32_ADC1_BASE+STM32_ADC_JOFR3_OFFSET) +# define STM32_ADC1_JOFR4 (STM32_ADC1_BASE+STM32_ADC_JOFR4_OFFSET) +# define STM32_ADC1_HTR (STM32_ADC1_BASE+STM32_ADC_HTR_OFFSET) +# define STM32_ADC1_LTR (STM32_ADC1_BASE+STM32_ADC_LTR_OFFSET) +# define STM32_ADC1_SQR1 (STM32_ADC1_BASE+STM32_ADC_SQR1_OFFSET) +# define STM32_ADC1_SQR2 (STM32_ADC1_BASE+STM32_ADC_SQR2_OFFSET) +# define STM32_ADC1_SQR3 (STM32_ADC1_BASE+STM32_ADC_SQR3_OFFSET) +# define STM32_ADC1_JSQR (STM32_ADC1_BASE+STM32_ADC_JSQR_OFFSET) +# define STM32_ADC1_JDR1 (STM32_ADC1_BASE+STM32_ADC_JDR1_OFFSET) +# define STM32_ADC1_JDR2 (STM32_ADC1_BASE+STM32_ADC_JDR2_OFFSET) +# define STM32_ADC1_JDR3 (STM32_ADC1_BASE+STM32_ADC_JDR3_OFFSET) +# define STM32_ADC1_JDR4 (STM32_ADC1_BASE+STM32_ADC_JDR4_OFFSET) +# define STM32_ADC1_DR (STM32_ADC1_BASE+STM32_ADC_DR_OFFSET) +#endif + +#if STM32F7_NADC > 1 +# define STM32_ADC2_SR (STM32_ADC2_BASE+STM32_ADC_SR_OFFSET) +# define STM32_ADC2_CR1 (STM32_ADC2_BASE+STM32_ADC_CR1_OFFSET) +# define STM32_ADC2_CR2 (STM32_ADC2_BASE+STM32_ADC_CR2_OFFSET) +# define STM32_ADC2_SMPR1 (STM32_ADC2_BASE+STM32_ADC_SMPR1_OFFSET) +# define STM32_ADC2_SMPR2 (STM32_ADC2_BASE+STM32_ADC_SMPR2_OFFSET) +# define STM32_ADC2_JOFR1 (STM32_ADC2_BASE+STM32_ADC_JOFR1_OFFSET) +# define STM32_ADC2_JOFR2 (STM32_ADC2_BASE+STM32_ADC_JOFR2_OFFSET) +# define STM32_ADC2_JOFR3 (STM32_ADC2_BASE+STM32_ADC_JOFR3_OFFSET) +# define STM32_ADC2_JOFR4 (STM32_ADC2_BASE+STM32_ADC_JOFR4_OFFSET) +# define STM32_ADC2_HTR (STM32_ADC2_BASE+STM32_ADC_HTR_OFFSET) +# define STM32_ADC2_LTR (STM32_ADC2_BASE+STM32_ADC_LTR_OFFSET) +# define STM32_ADC2_SQR1 (STM32_ADC2_BASE+STM32_ADC_SQR1_OFFSET) +# define STM32_ADC2_SQR2 (STM32_ADC2_BASE+STM32_ADC_SQR2_OFFSET) +# define STM32_ADC2_SQR3 (STM32_ADC2_BASE+STM32_ADC_SQR3_OFFSET) +# define STM32_ADC2_JSQR (STM32_ADC2_BASE+STM32_ADC_JSQR_OFFSET) +# define STM32_ADC2_JDR1 (STM32_ADC2_BASE+STM32_ADC_JDR1_OFFSET) +# define STM32_ADC2_JDR2 (STM32_ADC2_BASE+STM32_ADC_JDR2_OFFSET) +# define STM32_ADC2_JDR3 (STM32_ADC2_BASE+STM32_ADC_JDR3_OFFSET) +# define STM32_ADC2_JDR4 (STM32_ADC2_BASE+STM32_ADC_JDR4_OFFSET) +# define STM32_ADC2_DR (STM32_ADC2_BASE+STM32_ADC_DR_OFFSET) +#endif + +#if STM32F7_NADC > 2 +# define STM32_ADC3_SR (STM32_ADC3_BASE+STM32_ADC_SR_OFFSET) +# define STM32_ADC3_CR1 (STM32_ADC3_BASE+STM32_ADC_CR1_OFFSET) +# define STM32_ADC3_CR2 (STM32_ADC3_BASE+STM32_ADC_CR2_OFFSET) +# define STM32_ADC3_SMPR1 (STM32_ADC3_BASE+STM32_ADC_SMPR1_OFFSET) +# define STM32_ADC3_SMPR2 (STM32_ADC3_BASE+STM32_ADC_SMPR2_OFFSET) +# define STM32_ADC3_JOFR1 (STM32_ADC3_BASE+STM32_ADC_JOFR1_OFFSET) +# define STM32_ADC3_JOFR2 (STM32_ADC3_BASE+STM32_ADC_JOFR2_OFFSET) +# define STM32_ADC3_JOFR3 (STM32_ADC3_BASE+STM32_ADC_JOFR3_OFFSET) +# define STM32_ADC3_JOFR4 (STM32_ADC3_BASE+STM32_ADC_JOFR4_OFFSET) +# define STM32_ADC3_HTR (STM32_ADC3_BASE+STM32_ADC_HTR_OFFSET) +# define STM32_ADC3_LTR (STM32_ADC3_BASE+STM32_ADC_LTR_OFFSET) +# define STM32_ADC3_SQR1 (STM32_ADC3_BASE+STM32_ADC_SQR1_OFFSET) +# define STM32_ADC3_SQR2 (STM32_ADC3_BASE+STM32_ADC_SQR2_OFFSET) +# define STM32_ADC3_SQR3 (STM32_ADC3_BASE+STM32_ADC_SQR3_OFFSET) +# define STM32_ADC3_JSQR (STM32_ADC3_BASE+STM32_ADC_JSQR_OFFSET) +# define STM32_ADC3_JDR1 (STM32_ADC3_BASE+STM32_ADC_JDR1_OFFSET) +# define STM32_ADC3_JDR2 (STM32_ADC3_BASE+STM32_ADC_JDR2_OFFSET) +# define STM32_ADC3_JDR3 (STM32_ADC3_BASE+STM32_ADC_JDR3_OFFSET) +# define STM32_ADC3_JDR4 (STM32_ADC3_BASE+STM32_ADC_JDR4_OFFSET) +# define STM32_ADC3_DR (STM32_ADC3_BASE+STM32_ADC_DR_OFFSET) +#endif + +#define STM32_ADC_CSR (STM32_ADCCMN_BASE+STM32_ADC_CSR_OFFSET) +#define STM32_ADC_CCR (STM32_ADCCMN_BASE+STM32_ADC_CCR_OFFSET) +#define STM32_ADC_CDR (STM32_ADCCMN_BASE+STM32_ADC_CDR_OFFSET) + +/* Register Bitfield Definitions ********************************************************************/ + +/* ADC status register */ + +#define ADC_SR_AWD (1 << 0) /* Bit 0 : Analog watchdog flag */ +#define ADC_SR_EOC (1 << 1) /* Bit 1 : End of conversion */ +#define ADC_SR_JEOC (1 << 2) /* Bit 2 : Injected channel end of conversion */ +#define ADC_SR_JSTRT (1 << 3) /* Bit 3 : Injected channel Start flag */ +#define ADC_SR_STRT (1 << 4) /* Bit 4 : Regular channel Start flag */ +#define ADC_SR_OVR (1 << 5) /* Bit 5 : Overrun */ + +/* ADC control register 1 */ + +#define ADC_CR1_AWDCH_SHIFT (0) /* Bits 4-0: Analog watchdog channel select bits */ +#define ADC_CR1_AWDCH_MASK (0x1f << ADC_CR1_AWDCH_SHIFT) +#define ADC_CR1_EOCIE (1 << 5) /* Bit 5: Interrupt enable for EOC */ +#define ADC_CR1_AWDIE (1 << 6) /* Bit 6: Analog Watchdog interrupt enable */ +#define ADC_CR1_JEOCIE (1 << 7) /* Bit 7: Interrupt enable for injected channels */ +#define ADC_CR1_SCAN (1 << 8) /* Bit 8: Scan mode */ +#define ADC_CR1_AWDSGL (1 << 9) /* Bit 9: Enable the watchdog on a single channel in scan mode */ +#define ADC_CR1_JAUTO (1 << 10) /* Bit 10: Automatic Injected Group conversion */ +#define ADC_CR1_DISCEN (1 << 11) /* Bit 11: Discontinuous mode on regular channels */ +#define ADC_CR1_JDISCEN (1 << 12) /* Bit 12: Discontinuous mode on injected channels */ +#define ADC_CR1_DISCNUM_SHIFT (13) /* Bits 15-13: Discontinuous mode channel count */ +#define ADC_CR1_DISCNUM_MASK (0x07 << ADC_CR1_DISCNUM_SHIFT) +#define ADC_CR1_JAWDEN (1 << 22) /* Bit 22: Analog watchdog enable on injected channels */ +#define ADC_CR1_AWDEN (1 << 23) /* Bit 23: Analog watchdog enable on regular channels */ +#define ADC_CR1_RES_SHIFT (24) /* Bits 24-25: Resolution */ +#define ADC_CR1_RES_MASK (3 << ADC_CR1_RES_SHIFT) +#define ADC_CR1_RES_12BIT (0 << ADC_CR1_RES_SHIFT) /* 15 ADCCLK cycles. For STM32L15XX: 12 ADCCLK cycles */ +#define ADC_CR1_RES_10BIT (1 << ADC_CR1_RES_SHIFT) /* 13 ADCCLK cycles. For STM32L15XX: 11 ADCCLK cycles */ +#define ADC_CR1_RES_8BIT (2 << ADC_CR1_RES_SHIFT) /* 11 ADCCLK cycles. For STM32L15XX: 9 ADCCLK cycles */ +#define ADC_CR1_RES_6BIT (3 << ADC_CR1_RES_SHIFT) /* 9 ADCCLK cycles. For STM32L15XX: 7 ADCCLK cycles */ +#define ADC_CR1_OVRIE (1 << 26) /* Bit 26: Overrun interrupt enable */ + +/* ADC control register 2 */ + +#define ADC_CR2_ADON (1 << 0) /* Bit 0: A/D Converter ON / OFF */ +#define ADC_CR2_CONT (1 << 1) /* Bit 1: Continuous Conversion */ +#define ADC_CR2_DMA (1 << 8) /* Bit 8: Direct Memory access mode */ +#define ADC_CR2_DDS (1 << 9) /* Bit 9: DMA disable selection (for single ADC mode) */ +#define ADC_CR2_EOCS (1 << 10) /* Bit 10: End of conversion selection */ +#define ADC_CR2_ALIGN (1 << 11) /* Bit 11: Data Alignment */ + /* Bits 12-15: Reserved */ +#define ADC_CR2_JEXTSEL_SHIFT (16) /* Bits 16-19: External event select for injected group */ +#define ADC_CR2_JEXTSEL_MASK (0x0f << ADC_CR2_JEXTSEL_SHIFT) +#define ADC_CR2_JEXTSEL_T1TRGO (0x00 << ADC_CR2_JEXTSEL_SHIFT) /* 0000: Timer 1 TRGO event */ +#define ADC_CR2_JEXTSEL_T1CC4 (0x01 << ADC_CR2_JEXTSEL_SHIFT) /* 0001: Timer 1 CC4 event */ +#define ADC_CR2_JEXTSEL_T2TRGO (0x02 << ADC_CR2_JEXTSEL_SHIFT) /* 0010: Timer 2 TRGO event */ +#define ADC_CR2_JEXTSEL_T2CC1 (0x03 << ADC_CR2_JEXTSEL_SHIFT) /* 0011: Timer 2 CC1 event */ +#define ADC_CR2_JEXTSEL_T3CC4 (0x04 << ADC_CR2_JEXTSEL_SHIFT) /* 0100: Timer 3 CC4 event */ +#define ADC_CR2_JEXTSEL_T4TRGO (0x05 << ADC_CR2_JEXTSEL_SHIFT) /* 0101: Timer 4 TRGO event */ + /* 0110: NA */ +#define ADC_CR2_JEXTSEL_T8CC4 (0x07 << ADC_CR2_JEXTSEL_SHIFT) /* 0111: Timer 8 CC4 event */ +#define ADC_CR2_JEXTSEL_T1TRGO2 (0x08 << ADC_CR2_JEXTSEL_SHIFT) /* 1000: Timer 1 TRGO2 event */ +#define ADC_CR2_JEXTSEL_T8TRGO (0x09 << ADC_CR2_JEXTSEL_SHIFT) /* 1001: Timer 8 TRGO event */ +#define ADC_CR2_JEXTSEL_T8TRGO2 (0x0a << ADC_CR2_JEXTSEL_SHIFT) /* 1010: Timer 8 TRGO2 event */ +#define ADC_CR2_JEXTSEL_T3CC3 (0x0b << ADC_CR2_JEXTSEL_SHIFT) /* 1011: Timer 3 CC3 event */ +#define ADC_CR2_JEXTSEL_T5TRGO (0x0c << ADC_CR2_JEXTSEL_SHIFT) /* 1100: Timer 5 TRGO event */ +#define ADC_CR2_JEXTSEL_T3CC1 (0x0d << ADC_CR2_JEXTSEL_SHIFT) /* 1101: Timer 3 CC1 event */ +#define ADC_CR2_JEXTSEL_T6TRGO (0x0e << ADC_CR2_JEXTSEL_SHIFT) /* 1110: Timer 6 TRGO event */ + /* 1111: Reserved */ +#define ADC_CR2_JEXTEN_SHIFT (20) /* Bits 20-21: External trigger enable for injected channels */ +#define ADC_CR2_JEXTEN_MASK (3 << ADC_CR2_JEXTEN_SHIFT) +#define ADC_CR2_JEXTEN_NONE (0 << ADC_CR2_JEXTEN_SHIFT) /* 00: Trigger detection disabled */ +#define ADC_CR2_JEXTEN_RISING (1 << ADC_CR2_JEXTEN_SHIFT) /* 01: Trigger detection on the rising edge */ +#define ADC_CR2_JEXTEN_FALLING (2 << ADC_CR2_JEXTEN_SHIFT) /* 10: Trigger detection on the falling edge */ +#define ADC_CR2_JEXTEN_BOTH (3 << ADC_CR2_JEXTEN_SHIFT) /* 11: Trigger detection on both the rising and falling edges */ +#define ADC_CR2_JSWSTART (1 << 22) /* Bit 22: Start Conversion of injected channels */ + /* Bit 23: Reserved, must be kept at reset value. */ +#define ADC_CR2_EXTSEL_SHIFT (24) /* Bits 24-27: External Event Select for regular group */ +#define ADC_CR2_EXTSEL_MASK (0x0f << ADC_CR2_EXTSEL_SHIFT) +#define ADC_CR2_EXTSEL_T1CC1 (0x0 << ADC_CR2_EXTSEL_SHIFT) /* 0000: Timer 1 CC1 event */ +#define ADC_CR2_EXTSEL_T1CC2 (0x01 << ADC_CR2_EXTSEL_SHIFT) /* 0001: Timer 1 CC2 event */ +#define ADC_CR2_EXTSEL_T1CC3 (0x02 << ADC_CR2_EXTSEL_SHIFT) /* 0010: Timer 1 CC3 event */ +#define ADC_CR2_EXTSEL_T2CC2 (0x03 << ADC_CR2_EXTSEL_SHIFT) /* 0011: Timer 2 CC2 event */ +#define ADC_CR2_EXTSEL_T5TRGO (0x04 << ADC_CR2_EXTSEL_SHIFT) /* 0100: Timer 5 TRGO event */ +#define ADC_CR2_EXTSEL_T4CC4 (0x05 << ADC_CR2_EXTSEL_SHIFT) /* 0101: Timer 4 CC4 event */ +#define ADC_CR2_EXTSEL_T3CC4 (0x06 << ADC_CR2_EXTSEL_SHIFT) /* 0110: Timer 3 CC4 event */ +#define ADC_CR2_EXTSEL_T8TRGO (0x07 << ADC_CR2_EXTSEL_SHIFT) /* 0111: Timer 8 TRGO event */ +#define ADC_CR2_EXTSEL_T8TRGO2 (0x08 << ADC_CR2_EXTSEL_SHIFT) /* 1000: Timer 8 TRGO2 event */ +#define ADC_CR2_EXTSEL_T1TRGO (0x09 << ADC_CR2_EXTSEL_SHIFT) /* 1001: Timer 1 TRGO event */ +#define ADC_CR2_EXTSEL_T1TRGO2 (0x0a << ADC_CR2_EXTSEL_SHIFT) /* 1010: Timer 1 TRGO2 event */ +#define ADC_CR2_EXTSEL_T2TRGO (0x0b << ADC_CR2_EXTSEL_SHIFT) /* 1011: Timer 2 TRGO event */ +#define ADC_CR2_EXTSEL_T4TRGO (0x0c << ADC_CR2_EXTSEL_SHIFT) /* 1100: Timer 4 TRGO event */ +#define ADC_CR2_EXTSEL_T6TRGO (0x0d << ADC_CR2_EXTSEL_SHIFT) /* 1101: Timer 6 TRGO event */ + /* 1110: NA */ +#define ADC_CR2_EXTSEL_EXTI11 (0x0f << ADC_CR2_EXTSEL_SHIFT) /* 1111: EXTI line 11 */ +#define ADC_CR2_EXTEN_SHIFT (28) /* Bits 28-29: External trigger enable for regular channels */ +#define ADC_CR2_EXTEN_MASK (3 << ADC_CR2_EXTEN_SHIFT) +#define ADC_CR2_EXTEN_NONE (0 << ADC_CR2_EXTEN_SHIFT) /* 00: Trigger detection disabled */ +#define ADC_CR2_EXTEN_RISING (1 << ADC_CR2_EXTEN_SHIFT) /* 01: Trigger detection on the rising edge */ +#define ADC_CR2_EXTEN_FALLING (2 << ADC_CR2_EXTEN_SHIFT) /* 10: Trigger detection on the falling edge */ +#define ADC_CR2_EXTEN_BOTH (3 << ADC_CR2_EXTEN_SHIFT) /* 11: Trigger detection on both the rising and falling edges */ + +# define ADC_CR2_SWSTART (1 << 30) /* Bit 30: Start Conversion of regular channels */ + +/* ADC sample time register 1 */ + +#define ADC_SMPR_3 0 /* 000: 3 cycles */ +#define ADC_SMPR_15 1 /* 001: 15 cycles */ +#define ADC_SMPR_28 2 /* 010: 28 cycles */ +#define ADC_SMPR_56 3 /* 011: 56 cycles */ +#define ADC_SMPR_84 4 /* 100: 84 cycles */ +#define ADC_SMPR_112 5 /* 101: 112 cycles */ +#define ADC_SMPR_144 6 /* 110: 144 cycles */ +#define ADC_SMPR_480 7 /* 111: 480 cycles */ +#define ADC_SMPR1_SMP10_SHIFT (0) /* Bits 0-2: Channel 10 Sample time selection */ +#define ADC_SMPR1_SMP10_MASK (7 << ADC_SMPR1_SMP10_SHIFT) +#define ADC_SMPR1_SMP11_SHIFT (3) /* Bits 3-5: Channel 11 Sample time selection */ +#define ADC_SMPR1_SMP11_MASK (7 << ADC_SMPR1_SMP11_SHIFT) +#define ADC_SMPR1_SMP12_SHIFT (6) /* Bits 6-8: Channel 12 Sample time selection */ +#define ADC_SMPR1_SMP12_MASK (7 << ADC_SMPR1_SMP12_SHIFT) +#define ADC_SMPR1_SMP13_SHIFT (9) /* Bits 9-11: Channel 13 Sample time selection */ +#define ADC_SMPR1_SMP13_MASK (7 << ADC_SMPR1_SMP13_SHIFT) +#define ADC_SMPR1_SMP14_SHIFT (12) /* Bits 12-14: Channel 14 Sample time selection */ +#define ADC_SMPR1_SMP14_MASK (7 << ADC_SMPR1_SMP14_SHIFT) +#define ADC_SMPR1_SMP15_SHIFT (15) /* Bits 15-17: Channel 15 Sample time selection */ +#define ADC_SMPR1_SMP15_MASK (7 << ADC_SMPR1_SMP15_SHIFT) +#define ADC_SMPR1_SMP16_SHIFT (18) /* Bits 18-20: Channel 16 Sample time selection */ +#define ADC_SMPR1_SMP16_MASK (7 << ADC_SMPR1_SMP16_SHIFT) +#define ADC_SMPR1_SMP17_SHIFT (21) /* Bits 21-23: Channel 17 Sample time selection */ +#define ADC_SMPR1_SMP17_MASK (7 << ADC_SMPR1_SMP17_SHIFT) +#define ADC_SMPR1_SMP18_SHIFT (24) /* Bits 24-26: Channel 18 Sample time selection */ +#define ADC_SMPR1_SMP18_MASK (7 << ADC_SMPR1_SMP17_SHIFT) + + +/* ADC sample time register 2 */ + +#define ADC_SMPR2_SMP0_SHIFT (0) /* Bits 2-0: Channel 0 Sample time selection */ +#define ADC_SMPR2_SMP0_MASK (7 << ADC_SMPR2_SMP0_SHIFT) +#define ADC_SMPR2_SMP1_SHIFT (3) /* Bits 5-3: Channel 1 Sample time selection */ +#define ADC_SMPR2_SMP1_MASK (7 << ADC_SMPR2_SMP1_SHIFT) +#define ADC_SMPR2_SMP2_SHIFT (6) /* Bits 8-6: Channel 2 Sample time selection */ +#define ADC_SMPR2_SMP2_MASK (7 << ADC_SMPR2_SMP2_SHIFT) +#define ADC_SMPR2_SMP3_SHIFT (9) /* Bits 11-9: Channel 3 Sample time selection */ +#define ADC_SMPR2_SMP3_MASK (7 << ADC_SMPR2_SMP3_SHIFT) +#define ADC_SMPR2_SMP4_SHIFT (12) /* Bits 14-12: Channel 4 Sample time selection */ +#define ADC_SMPR2_SMP4_MASK (7 << ADC_SMPR2_SMP4_SHIFT) +#define ADC_SMPR2_SMP5_SHIFT (15) /* Bits 17-15: Channel 5 Sample time selection */ +#define ADC_SMPR2_SMP5_MASK (7 << ADC_SMPR2_SMP5_SHIFT) +#define ADC_SMPR2_SMP6_SHIFT (18) /* Bits 20-18: Channel 6 Sample time selection */ +#define ADC_SMPR2_SMP6_MASK (7 << ADC_SMPR2_SMP6_SHIFT) +#define ADC_SMPR2_SMP7_SHIFT (21) /* Bits 23-21: Channel 7 Sample time selection */ +#define ADC_SMPR2_SMP7_MASK (7 << ADC_SMPR2_SMP7_SHIFT) +#define ADC_SMPR2_SMP8_SHIFT (24) /* Bits 26-24: Channel 8 Sample time selection */ +#define ADC_SMPR2_SMP8_MASK (7 << ADC_SMPR2_SMP8_SHIFT) +#define ADC_SMPR2_SMP9_SHIFT (27) /* Bits 29-27: Channel 9 Sample time selection */ +#define ADC_SMPR2_SMP9_MASK (7 << ADC_SMPR2_SMP9_SHIFT) + + +/* ADC injected channel data offset register 1-4 */ + +#define ADC_JOFR_SHIFT (0) /* Bits 11-0: Data offset for injected channel x */ +#define ADC_JOFR_MASK (0x0fff << ADC_JOFR_SHIFT) + +/* ADC watchdog high threshold register */ + +#define ADC_HTR_SHIFT (0) /* Bits 11-0: Analog watchdog high threshold */ +#define ADC_HTR_MASK (0x0fff << ADC_HTR_SHIFT) + +/* ADC watchdog low threshold register */ + +#define ADC_LTR_SHIFT (0) /* Bits 11-0: Analog watchdog low threshold */ +#define ADC_LTR_MASK (0x0fff << ADC_LTR_SHIFT) + +/* ADC regular sequence register 1 */ + +#define ADC_SQR1_SQ13_SHIFT (0) /* Bits 4-0: 13th conversion in regular sequence */ +#define ADC_SQR1_SQ13_MASK (0x1f << ADC_SQR1_SQ13_SHIFT) +#define ADC_SQR1_SQ14_SHIFT (5) /* Bits 9-5: 14th conversion in regular sequence */ +#define ADC_SQR1_SQ14_MASK (0x1f << ADC_SQR1_SQ14_SHIFT) +#define ADC_SQR1_SQ15_SHIFT (10) /* Bits 14-10: 15th conversion in regular sequence */ +#define ADC_SQR1_SQ15_MASK (0x1f << ADC_SQR1_SQ15_SHIFT) +#define ADC_SQR1_SQ16_SHIFT (15) /* Bits 19-15: 16th conversion in regular sequence */ +#define ADC_SQR1_SQ16_MASK (0x1f << ADC_SQR1_SQ16_SHIFT) +#define ADC_SQR1_L_SHIFT (20) /* Bits 23-20: Regular channel sequence length */ +#define ADC_SQR1_L_MASK (0x0f << ADC_SQR1_L_SHIFT) +#define ADC_SQR1_RESERVED (0xff000000) +#define ADC_SQR1_FIRST (13) +#define ADC_SQR1_LAST (16) +#define ADC_SQR1_SQ_OFFSET (0) + +/* ADC regular sequence register 2 */ + +#define ADC_SQR2_SQ7_SHIFT (0) /* Bits 4-0: 7th conversion in regular sequence */ +#define ADC_SQR2_SQ7_MASK (0x1f << ADC_SQR2_SQ7_SHIFT) +#define ADC_SQR2_SQ8_SHIFT (5) /* Bits 9-5: 8th conversion in regular sequence */ +#define ADC_SQR2_SQ8_MASK (0x1f << ADC_SQR2_SQ8_SHIFT) +#define ADC_SQR2_SQ9_SHIFT (10) /* Bits 14-10: 9th conversion in regular sequence */ +#define ADC_SQR2_SQ9_MASK (0x1f << ADC_SQR2_SQ9_SHIFT) +#define ADC_SQR2_SQ10_SHIFT (15) /* Bits 19-15: 10th conversion in regular sequence */ +#define ADC_SQR2_SQ10_MASK (0x1f << ADC_SQR2_SQ10_SHIFT) +#define ADC_SQR2_SQ11_SHIFT (20) /* Bits 24-20: 11th conversion in regular sequence */ +#define ADC_SQR2_SQ11_MASK (0x1f << ADC_SQR2_SQ11_SHIFT ) +#define ADC_SQR2_SQ12_SHIFT (25) /* Bits 29-25: 12th conversion in regular sequence */ +#define ADC_SQR2_SQ12_MASK (0x1f << ADC_SQR2_SQ12_SHIFT) +#define ADC_SQR2_RESERVED (0xc0000000) +#define ADC_SQR2_FIRST (7) +#define ADC_SQR2_LAST (12) +#define ADC_SQR2_SQ_OFFSET (0) + +/* ADC regular sequence register 3 */ + +#define ADC_SQR3_SQ1_SHIFT (0) /* Bits 4-0: 1st conversion in regular sequence */ +#define ADC_SQR3_SQ1_MASK (0x1f << ADC_SQR3_SQ1_SHIFT) +#define ADC_SQR3_SQ2_SHIFT (5) /* Bits 9-5: 2nd conversion in regular sequence */ +#define ADC_SQR3_SQ2_MASK (0x1f << ADC_SQR3_SQ2_SHIFT) +#define ADC_SQR3_SQ3_SHIFT (10) /* Bits 14-10: 3rd conversion in regular sequence */ +#define ADC_SQR3_SQ3_MASK (0x1f << ADC_SQR3_SQ3_SHIFT) +#define ADC_SQR3_SQ4_SHIFT (15) /* Bits 19-15: 4th conversion in regular sequence */ +#define ADC_SQR3_SQ4_MASK (0x1f << ADC_SQR3_SQ4_SHIFT) +#define ADC_SQR3_SQ5_SHIFT (20) /* Bits 24-20: 5th conversion in regular sequence */ +#define ADC_SQR3_SQ5_MASK (0x1f << ADC_SQR3_SQ5_SHIFT ) +#define ADC_SQR3_SQ6_SHIFT (25) /* Bits 29-25: 6th conversion in regular sequence */ +#define ADC_SQR3_SQ6_MASK (0x1f << ADC_SQR3_SQ6_SHIFT) +#define ADC_SQR3_RESERVED (0xc0000000) +#define ADC_SQR3_FIRST (1) +#define ADC_SQR3_LAST (6) +#define ADC_SQR3_SQ_OFFSET (0) + +/* Offset between SQ bits */ + +#define ADC_SQ_OFFSET (5) + +/* ADC injected sequence register */ + +#define ADC_JSQR_JSQ1_SHIFT (0) /* Bits 4-0: 1st conversion in injected sequence */ +#define ADC_JSQR_JSQ1_MASK (0x1f << ADC_JSQR_JSQ1_SHIFT) +#define ADC_JSQR_JSQ2_SHIFT (5) /* Bits 9-5: 2nd conversion in injected sequence */ +#define ADC_JSQR_JSQ2_MASK (0x1f << ADC_JSQR_JSQ2_SHIFT) +#define ADC_JSQR_JSQ3_SHIFT (10) /* Bits 14-10: 3rd conversion in injected sequence */ +#define ADC_JSQR_JSQ3_MASK (0x1f << ADC_JSQR_JSQ3_SHIFT) +#define ADC_JSQR_JSQ4_SHIFT (15) /* Bits 19-15: 4th conversion in injected sequence */ +#define ADC_JSQR_JSQ4_MASK (0x1f << ADC_JSQR_JSQ4_SHIFT) +#define ADC_JSQR_JL_SHIFT (20) /* Bits 21-20: Injected Sequence length */ +#define ADC_JSQR_JL_MASK (3 << ADC_JSQR_JL_SHIFT) + +/* ADC injected data register 1-4 */ + +#define ADC_JDR_JDATA_SHIFT (0) /* Bits 15-0: Injected data */ +#define ADC_JDR_JDATA_MASK (0xffff << ADC_JDR_JDATA_SHIFT) + +/* ADC regular data register */ + +#define ADC_DR_RDATA_SHIFT (0) /* Bits 15-0 Regular data */ +#define ADC_DR_RDATA_MASK (0xffff << ADC_DR_RDATA_SHIFT) + +/* Common status register */ + +#define ADC_CSR_AWD1 (1 << 0) /* Bit 0: Analog watchdog flag of ADC1 (copy of AWD in ADC1_SR) */ +#define ADC_CSR_EOC1 (1 << 1) /* Bit 1: End of conversion of ADC1 (copy of EOC in ADC1_SR) */ +#define ADC_CSR_JEOC1 (1 << 2) /* Bit 2: Injected channel end of conversion of ADC1 (copy of JEOC in ADC1_SR) */ +#define ADC_CSR_JSTRT1 (1 << 3) /* Bit 3: Injected channel Start flag of ADC1 (copy of JSTRT in ADC1_SR) */ +#define ADC_CSR_STRT1 (1 << 4) /* Bit 4: Regular channel Start flag of ADC1 (copy of STRT in ADC1_SR) */ +#define ADC_CSR_OVR1 (1 << 5) /* Bit 5: Overrun flag of ADC1 (copy of OVR in ADC1_SR) */ + +#define ADC_CSR_AWD2 (1 << 8) /* Bit 8: Analog watchdog flag of ADC2 (copy of AWD in ADC2_SR) */ +#define ADC_CSR_EOC2 (1 << 9) /* Bit 9: End of conversion of ADC2 (copy of EOC in ADC2_SR) */ +#define ADC_CSR_JEOC2 (1 << 10) /* Bit 10: Injected channel end of conversion of ADC2 (copy of JEOC in ADC2_SR) */ +#define ADC_CSR_JSTRT2 (1 << 11) /* Bit 11: Injected channel Start flag of ADC2 (copy of JSTRT in ADC2_SR) */ +#define ADC_CSR_STRT2 (1 << 12) /* Bit 12: Regular channel Start flag of ADC2 (copy of STRT in ADC2_SR) */ +#define ADC_CSR_OVR2 (1 << 13) /* Bit 13: Overrun flag of ADC2 (copy of OVR in ADC2_SR) */ + /* Bits 14-15: Reserved, must be kept at reset value. */ +#define ADC_CSR_AWD3 (1 << 16) /* Bit 16: ADC3 Analog watchdog flag (copy of AWD in ADC3_SR) */ +#define ADC_CSR_EOC3 (1 << 17) /* Bit 17: ADC3 End of conversion (copy of EOC in ADC3_SR) */ +#define ADC_CSR_JEOC3 (1 << 18) /* Bit 18: ADC3 Injected channel end of conversion (copy of JEOC in ADC3_SR) */ +#define ADC_CSR_JSTRT3 (1 << 19) /* Bit 19: ADC3 Injected channel Start flag (copy of JSTRT in ADC3_SR) */ +#define ADC_CSR_STRT3 (1 << 20) /* Bit 20: ADC3 Regular channel Start flag (copy of STRT in ADC3_SR). */ +#define ADC_CSR_OVR3 (1 << 21) /* Bit 21: ADC3 overrun flag (copy of OVR in ADC3_SR). */ + +/* Common control register */ + +# define ADC_CCR_MULTI_SHIFT (0) /* Bits 0-4: Multi ADC mode selection */ +# define ADC_CCR_MULTI_MASK (0x1f << ADC_CCR_MULTI_SHIFT) +# define ADC_CCR_MULTI_NONE (0 << ADC_CCR_MULTI_SHIFT) /* 00000: Independent mode */ + /* 00001 to 01001: Dual mode (ADC1 and ADC2), ADC3 independent */ +# define ADC_CCR_MULTI_RSISM2 (1 << ADC_CCR_MULTI_SHIFT) /* 00001: Combined regular simultaneous + injected simultaneous mode */ +# define ADC_CCR_MULTI_RSATM2 (2 << ADC_CCR_MULTI_SHIFT) /* 00010: Combined regular simultaneous + alternate trigger mode */ +# define ADC_CCR_MULTI_ISM2 (5 << ADC_CCR_MULTI_SHIFT) /* 00101: Injected simultaneous mode only */ +# define ADC_CCR_MULTI_RSM2 (6 << ADC_CCR_MULTI_SHIFT) /* 00110: Regular simultaneous mode only */ +# define ADC_CCR_MULTI_IM2 (7 << ADC_CCR_MULTI_SHIFT) /* 00111: interleaved mode only */ +# define ADC_CCR_MULTI_ATM2 (9 << ADC_CCR_MULTI_SHIFT) /* 01001: Alternate trigger mode only */ + /* 10001 to 11001: Triple mode (ADC1, 2 and 3) */ +# define ADC_CCR_MULTI_RSISM3 (17 << ADC_CCR_MULTI_SHIFT) /* 10001: Combined regular simultaneous + injected simultaneous mode */ +# define ADC_CCR_MULTI_RSATM3 (18 << ADC_CCR_MULTI_SHIFT) /* 10010: Combined regular simultaneous + alternate trigger mode */ +# define ADC_CCR_MULTI_ISM3 (21 << ADC_CCR_MULTI_SHIFT) /* 10101: Injected simultaneous mode only */ +# define ADC_CCR_MULTI_RSM3 (22 << ADC_CCR_MULTI_SHIFT) /* 10110: Regular simultaneous mode only */ +# define ADC_CCR_MULTI_IM3 (23 << ADC_CCR_MULTI_SHIFT) /* 10111: interleaved mode only */ +# define ADC_CCR_MULTI_ATM3 (25 << ADC_CCR_MULTI_SHIFT) /* 11001: Alternate trigger mode only */ + /* Bits 5-7: Reserved, must be kept at reset value. */ +# define ADC_CCR_DELAY_SHIFT (8) /* Bits 8-11: Delay between 2 sampling phases */ +# define ADC_CCR_DELAY_MASK (0xf << ADC_CCR_DELAY_SHIFT) +# define ADC_CCR_DELAY(n) (((n)-5) << ADC_CCR_DELAY_SHIFT) /* n * TADCCLK, n=5-20 */ + /* Bit 12 Reserved, must be kept at reset value. */ +# define ADC_CCR_DDS (1 << 13) /* Bit 13: DMA disable selection (for multi-ADC mode) */ + +# define ADC_CCR_DMA_SHIFT (14) /* Bits 14-15: Direct memory access mode for multi ADC mode */ +# define ADC_CCR_DMA_MASK (3 << ADC_CCR_DMA_SHIFT) +# define ADC_CCR_DMA_DISABLED (0 << ADC_CCR_DMA_SHIFT) /* 00: DMA mode disabled */ +# define ADC_CCR_DMA_MODE1 (1 << ADC_CCR_DMA_SHIFT) /* 01: DMA mode 1 enabled */ +# define ADC_CCR_DMA_MODE2 (2 << ADC_CCR_DMA_SHIFT) /* 10: DMA mode 2 enabled */ +# define ADC_CCR_DMA_MODE3 (3 << ADC_CCR_DMA_SHIFT) /* 11: DMA mode 3 enabled */ + +# define ADC_CCR_ADCPRE_SHIFT (16) /* Bits 16-17: ADC prescaler */ +# define ADC_CCR_ADCPRE_MASK (3 << ADC_CCR_ADCPRE_SHIFT) +# define ADC_CCR_ADCPRE_DIV2 (0 << ADC_CCR_ADCPRE_SHIFT) /* 00: PCLK2 divided by 2 */ +# define ADC_CCR_ADCPRE_DIV4 (1 << ADC_CCR_ADCPRE_SHIFT) /* 01: PCLK2 divided by 4 */ +# define ADC_CCR_ADCPRE_DIV6 (2 << ADC_CCR_ADCPRE_SHIFT) /* 10: PCLK2 divided by 6 */ +# define ADC_CCR_ADCPRE_DIV8 (3 << ADC_CCR_ADCPRE_SHIFT) /* 11: PCLK2 divided by 8 */ + /* Bits 18-21: Reserved, must be kept at reset value. */ +# define ADC_CCR_VBATE (1 << 22) /* Bit 22: VBAT enable */ +# define ADC_CCR_TSVREFE (1 << 23) /* Bit 23: Temperature sensor and VREFINT enable */ + /* Bits 24-31 Reserved, must be kept at reset value. */ + +/* Data register for dual and triple modes (32-bit data with no named fields) */ + +/**************************************************************************************************** + * Public Types + ****************************************************************************************************/ + +/**************************************************************************************************** + * Public Data + ****************************************************************************************************/ + +/**************************************************************************************************** + * Public Function Prototypes + ****************************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_STM32F7_CHIP_STM32F74XX77XX_ADC_H */ diff --git a/arch/arm/src/stm32f7/chip/stm32f74xx77xx_i2c.h b/arch/arm/src/stm32f7/chip/stm32f74xx77xx_i2c.h new file mode 100644 index 0000000000000000000000000000000000000000..7e2d801dc90e28f47d328e75f3a886894b9af3f5 --- /dev/null +++ b/arch/arm/src/stm32f7/chip/stm32f74xx77xx_i2c.h @@ -0,0 +1,264 @@ +/************************************************************************************ + * arch/arm/src/stm32f7/chip/stm32f74xx77xx_i2c.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: 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. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32F7_STM32F74XX77XX_I2C_H +#define __ARCH_ARM_SRC_STM32F7_STM32F74XX77XX_I2C_H + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Register Offsets *****************************************************************/ + +#define STM32_I2C_CR1_OFFSET 0x0000 /* Control register 1 (32-bit) */ +#define STM32_I2C_CR2_OFFSET 0x0004 /* Control register 2 (32-bit) */ +#define STM32_I2C_OAR1_OFFSET 0x0008 /* Own address register 1 (16-bit) */ +#define STM32_I2C_OAR2_OFFSET 0x000c /* Own address register 2 (16-bit) */ +#define STM32_I2C_TIMINGR_OFFSET 0x0010 /* Timing register */ +#define STM32_I2C_TIMEOUTR_OFFSET 0x0014 /* Timeout register */ +#define STM32_I2C_ISR_OFFSET 0x0018 /* Interrupt and Status register */ +#define STM32_I2C_ICR_OFFSET 0x001c /* Interrupt clear register */ +#define STM32_I2C_PECR_OFFSET 0x0020 /* Packet error checking register */ +#define STM32_I2C_RXDR_OFFSET 0x0024 /* Receive data register */ +#define STM32_I2C_TXDR_OFFSET 0x0028 /* Transmit data register */ + +/* Register Addresses ***************************************************************/ + +#if STM32F7_NI2C > 0 +# define STM32_I2C1_CR1 (STM32_I2C1_BASE+STM32_I2C_CR1_OFFSET) +# define STM32_I2C1_CR2 (STM32_I2C1_BASE+STM32_I2C_CR2_OFFSET) +# define STM32_I2C1_OAR1 (STM32_I2C1_BASE+STM32_I2C_OAR1_OFFSET) +# define STM32_I2C1_OAR2 (STM32_I2C1_BASE+STM32_I2C_OAR2_OFFSET) +# define STM32_I2C1_TIMINGR (STM32_I2C1_BASE+STM32_I2C_TIMINGR_OFFSET) +# define STM32_I2C1_TIMEOUTR (STM32_I2C1_BASE+STM32_I2C_TIMEOUTR_OFFSET) +# define STM32_I2C1_ISR (STM32_I2C1_BASE+STM32_I2C_ISR_OFFSET) +# define STM32_I2C1_ICR (STM32_I2C1_BASE+STM32_I2C_ICR_OFFSET) +# define STM32_I2C1_PECR (STM32_I2C1_BASE+STM32_I2C_PECR_OFFSET) +# define STM32_I2C1_RXDR (STM32_I2C1_BASE+STM32_I2C_RXDR_OFFSET) +# define STM32_I2C1_TXDR (STM32_I2C1_BASE+STM32_I2C_TXDR_OFFSET) +#endif + +#if STM32F7_NI2C > 1 +# define STM32_I2C2_CR1 (STM32_I2C2_BASE+STM32_I2C_CR1_OFFSET) +# define STM32_I2C2_CR2 (STM32_I2C2_BASE+STM32_I2C_CR2_OFFSET) +# define STM32_I2C2_OAR1 (STM32_I2C2_BASE+STM32_I2C_OAR1_OFFSET) +# define STM32_I2C2_OAR2 (STM32_I2C2_BASE+STM32_I2C_OAR2_OFFSET) +# define STM32_I2C2_TIMINGR (STM32_I2C2_BASE+STM32_I2C_TIMINGR_OFFSET) +# define STM32_I2C2_TIMEOUTR (STM32_I2C2_BASE+STM32_I2C_TIMEOUTR_OFFSET) +# define STM32_I2C2_ISR (STM32_I2C2_BASE+STM32_I2C_ISR_OFFSET) +# define STM32_I2C2_ICR (STM32_I2C2_BASE+STM32_I2C_ICR_OFFSET) +# define STM32_I2C2_PECR (STM32_I2C2_BASE+STM32_I2C_PECR_OFFSET) +# define STM32_I2C2_RXDR (STM32_I2C2_BASE+STM32_I2C_RXDR_OFFSET) +# define STM32_I2C2_TXDR (STM32_I2C2_BASE+STM32_I2C_TXDR_OFFSET) +#endif + +#if STM32F7_NI2C > 2 +# define STM32_I2C3_CR1 (STM32_I2C3_BASE+STM32_I2C_CR1_OFFSET) +# define STM32_I2C3_CR2 (STM32_I2C3_BASE+STM32_I2C_CR2_OFFSET) +# define STM32_I2C3_OAR1 (STM32_I2C3_BASE+STM32_I2C_OAR1_OFFSET) +# define STM32_I2C3_OAR2 (STM32_I2C3_BASE+STM32_I2C_OAR2_OFFSET) +# define STM32_I2C3_TIMINGR (STM32_I2C3_BASE+STM32_I2C_TIMINGR_OFFSET) +# define STM32_I2C3_TIMEOUTR (STM32_I2C3_BASE+STM32_I2C_TIMEOUTR_OFFSET) +# define STM32_I2C3_ISR (STM32_I2C3_BASE+STM32_I2C_ISR_OFFSET) +# define STM32_I2C3_ICR (STM32_I2C3_BASE+STM32_I2C_ICR_OFFSET) +# define STM32_I2C3_PECR (STM32_I2C3_BASE+STM32_I2C_PECR_OFFSET) +# define STM32_I2C3_RXDR (STM32_I2C3_BASE+STM32_I2C_RXDR_OFFSET) +# define STM32_I2C3_TXDR (STM32_I2C3_BASE+STM32_I2C_TXDR_OFFSET) +#endif + +#if STM32F7_NI2C > 3 +# define STM32_I2C4_CR1 (STM32_I2C4_BASE+STM32_I2C_CR1_OFFSET) +# define STM32_I2C4_CR2 (STM32_I2C4_BASE+STM32_I2C_CR2_OFFSET) +# define STM32_I2C4_OAR1 (STM32_I2C4_BASE+STM32_I2C_OAR1_OFFSET) +# define STM32_I2C4_OAR2 (STM32_I2C4_BASE+STM32_I2C_OAR2_OFFSET) +# define STM32_I2C4_TIMINGR (STM32_I2C4_BASE+STM32_I2C_TIMINGR_OFFSET) +# define STM32_I2C4_TIMEOUTR (STM32_I2C4_BASE+STM32_I2C_TIMEOUTR_OFFSET) +# define STM32_I2C4_ISR (STM32_I2C4_BASE+STM32_I2C_ISR_OFFSET) +# define STM32_I2C4_ICR (STM32_I2C4_BASE+STM32_I2C_ICR_OFFSET) +# define STM32_I2C4_PECR (STM32_I2C4_BASE+STM32_I2C_PECR_OFFSET) +# define STM32_I2C4_RXDR (STM32_I2C4_BASE+STM32_I2C_RXDR_OFFSET) +# define STM32_I2C4_TXDR (STM32_I2C4_BASE+STM32_I2C_TXDR_OFFSET) +#endif + +/* Register Bitfield Definitions ****************************************************/ + +/* Control register 1 */ + +#define I2C_CR1_PE (1 << 0) /* Bit 0: Peripheral Enable */ +#define I2C_CR1_TXIE (1 << 1) /* Bit 1: TX Interrupt enable */ +#define I2C_CR1_RXIE (1 << 2) /* Bit 2: RX Interrupt enable */ +#define I2C_CR1_ADDRIE (1 << 3) /* Bit 3: Address match interrupt enable (slave) */ +#define I2C_CR1_NACKIE (1 << 4) /* Bit 4: Not acknowledge received interrupt enable */ +#define I2C_CR1_STOPIE (1 << 5) /* Bit 5: STOP detection interrupt enable */ +#define I2C_CR1_TCIE (1 << 6) /* Bit 6: Transfer Complete interrupt enable */ +#define I2C_CR1_ERRIE (1 << 7) /* Bit 7: Error interrupts enable */ +#define I2C_CR1_DNF_SHIFT (8) /* Bits 8-11: Digital noise filter */ +#define I2C_CR1_DNF_MASK (0xf << I2C_CR1_DNF_SHIFT) +# define I2C_CR1_DNF_DISABLE (0 << I2C_CR1_DNF_SHIFT) +# define I2C_CR1_DNF(n) ((n) << I2C_CR1_DNF_SHIFT) /* Up to n * Ti2cclk, n=1..15 */ +#define I2C_CR1_ANFOFF (1 << 12) /* Bit 12: Analog noise filter OFF */ +#define I2C_CR1_TXDMAEN (1 << 14) /* Bit 14: DMA transmission requests enable */ +#define I2C_CR1_RXDMAEN (1 << 15) /* Bit 15: DMA reception requests enable */ +#define I2C_CR1_SBC (1 << 16) /* Bit 16: Slave byte control */ +#define I2C_CR1_NOSTRETCH (1 << 17) /* Bit 17: Clock stretching disable */ +#define I2C_CR1_GCEN (1 << 19) /* Bit 19: General call enable */ +#define I2C_CR1_SMBHEN (1 << 20) /* Bit 20: SMBus Host address enable */ +#define I2C_CR1_SMBDEN (1 << 21) /* Bit 21: SMBus Device Default address enable */ +#define I2C_CR1_ALERTEN (1 << 22) /* Bit 22: SMBus alert enable */ +#define I2C_CR1_PECEN (1 << 23) /* Bit 23: PEC enable */ + +/* Control register 2 */ + +#define I2C_CR2_SADD10_SHIFT (0) /* Bits 0-9: Slave 10-bit address (master) */ +#define I2C_CR2_SADD10_MASK (0x3ff << I2C_CR2_SADD10_SHIFT) +#define I2C_CR2_SADD7_SHIFT (1) /* Bits 1-7: Slave 7-bit address (master) */ +#define I2C_CR2_SADD7_MASK (0x7f << I2C_CR2_SADD7_SHIFT) +#define I2C_CR2_RD_WRN (1 << 10) /* Bit 10: Transfer direction (master) */ +#define I2C_CR2_ADD10 (1 << 11) /* Bit 11: 10-bit addressing mode (master) */ +#define I2C_CR2_HEAD10R (1 << 12) /* Bit 12: 10-bit address header only read direction (master) */ +#define I2C_CR2_START (1 << 13) /* Bit 13: Start generation */ +#define I2C_CR2_STOP (1 << 14) /* Bit 14: Stop generation (master) */ +#define I2C_CR2_NACK (1 << 15) /* Bit 15: NACK generation (slave) */ +#define I2C_CR2_NBYTES_SHIFT (16) /* Bits 16-23: Number of bytes */ +#define I2C_CR2_NBYTES_MASK (0xff << I2C_CR2_NBYTES_SHIFT) +#define I2C_CR2_RELOAD (1 << 24) /* Bit 24: NBYTES reload mode */ +#define I2C_CR2_AUTOEND (1 << 25) /* Bit 25: Automatic end mode (master) */ +#define I2C_CR2_PECBYTE (1 << 26) /* Bit 26: Packet error checking byte */ + +/* Own address register 1 */ + +#define I2C_OAR1_OA1_10_SHIFT (0) /* Bits 0-9: 10-bit interface address */ +#define I2C_OAR1_OA1_10_MASK (0x3ff << I2C_OAR1_OA1_10_SHIFT) +#define I2C_OAR1_OA1_7_SHIFT (1) /* Bits 1-7: 7-bit interface address */ +#define I2C_OAR1_OA1_7_MASK (0x7f << I2C_OAR1_OA1_7_SHIFT) +#define I2C_OAR1_OA1MODE (1 << 10) /* Bit 10: Own Address 1 10-bit mode */ +#define I2C_OAR1_OA1EN (1 << 15) /* Bit 15: Own Address 1 enable */ + +/* Own address register 2 */ + +#define I2C_OAR2_OA2_SHIFT (1) /* Bits 1-7: 7-bit interface address */ +#define I2C_OAR2_OA2_MASK (0x7f << I2C_OAR2_OA2_SHIFT) +#define I2C_OAR2_OA2MSK_SHIFT (8) /* Bits 8-10: Own Address 2 masks */ +#define I2C_OAR2_OA2MSK_MASK (7 << I2C_OAR2_OA2MSK_SHIFT) +# define I2C_OAR2_OA2MSK_NONE (0 << I2C_OAR2_OA2MSK_SHIFT) /* No mask */ +# define I2C_OAR2_OA2MSK_2_7 (1 << I2C_OAR2_OA2MSK_SHIFT) /* Only OA2[7:2] are compared */ +# define I2C_OAR2_OA2MSK_3_7 (2 << I2C_OAR2_OA2MSK_SHIFT) /* Only OA2[7:3] are compared */ +# define I2C_OAR2_OA2MSK_4_7 (3 << I2C_OAR2_OA2MSK_SHIFT) /* Only OA2[7:4] are compared */ +# define I2C_OAR2_OA2MSK_5_7 (4 << I2C_OAR2_OA2MSK_SHIFT) /* Only OA2[7:5] are compared */ +# define I2C_OAR2_OA2MSK_6_7 (5 << I2C_OAR2_OA2MSK_SHIFT) /* Only OA2[7:6] are compared */ +# define I2C_OAR2_OA2MSK_7 (6 << I2C_OAR2_OA2MSK_SHIFT) /* Only OA2[7] is compared */ +# define I2C_OAR2_OA2MSK_ALL (7 << I2C_OAR2_OA2MSK_SHIFT) /* All 7-bit addresses acknowledged */ +#define I2C_OAR2_OA2EN (1 << 15) /* Bit 15: Own Address 2 enable */ + +/* Timing register */ + +#define I2C_TIMINGR_SCLL_SHIFT (0) /* Bits 0-7: SCL low period (master) */ +#define I2C_TIMINGR_SCLL_MASK (0xff << I2C_TIMINGR_SCLL_SHIFT) +# define I2C_TIMINGR_SCLL(n) (((n)-1) << I2C_TIMINGR_SCLL_SHIFT) /* tSCLL = n x tPRESC */ + +#define I2C_TIMINGR_SCLH_SHIFT (8) /* Bits 8-15: SCL high period (master) */ +#define I2C_TIMINGR_SCLH_MASK (0xff << I2C_TIMINGR_SCLH_SHIFT) +# define I2C_TIMINGR_SCLH(n) (((n)-1) << I2C_TIMINGR_SCLH_SHIFT) /* tSCLH = n x tPRESC */ + +#define I2C_TIMINGR_SDADEL_SHIFT (16) /* Bits 16-19: Data hold time */ +#define I2C_TIMINGR_SDADEL_MASK (0xf << I2C_TIMINGR_SDADEL_SHIFT) +# define I2C_TIMINGR_SDADEL(n) ((n) << I2C_TIMINGR_SDADEL_SHIFT) /* tSDADEL= n x tPRESC */ + +#define I2C_TIMINGR_SCLDEL_SHIFT (20) /* Bits 20-23: Data setup time */ +#define I2C_TIMINGR_SCLDEL_MASK (0xf << I2C_TIMINGR_SCLDEL_SHIFT) +# define I2C_TIMINGR_SCLDEL(n) (((n)-1) << I2C_TIMINGR_SCLDEL_SHIFT) /* tSCLDEL = n x tPRESC */ + +#define I2C_TIMINGR_PRESC_SHIFT (28) /* Bits 28-31: Timing prescaler */ +#define I2C_TIMINGR_PRESC_MASK (0xf << I2C_TIMINGR_PRESC_SHIFT) +# define I2C_TIMINGR_PRESC(n) (((n)-1) << I2C_TIMINGR_PRESC_SHIFT) /* tPRESC = n x tI2CCLK */ + +/* Timeout register */ + +#define I2C_TIMEOUTR_A_SHIFT (0) /* Bits 0-11: Bus Timeout A */ +#define I2C_TIMEOUTR_A_MASK (0x0fff << I2C_TIMEOUTR_A_SHIFT) +# define I2C_TIMEOUTR_A(n) ((n) << I2C_TIMEOUTR_A_SHIFT) +#define I2C_TIMEOUTR_TIDLE (1 << 12) /* Bit 12: Idle clock timeout detection */ +#define I2C_TIMEOUTR_TIMOUTEN (1 << 15) /* Bit 15: Clock timeout enable */ +#define I2C_TIMEOUTR_B_SHIFT (16) /* Bits 16-27: Bus Timeout B */ +#define I2C_TIMEOUTR_B_MASK (0x0fff << I2C_TIMEOUTR_B_SHIFT) +# define I2C_TIMEOUTR_B(n) ((n) << I2C_TIMEOUTR_B_SHIFT) +#define I2C_TIMEOUTR_TEXTEN (1 << 31) /* Bits 31: Extended clock timeout enable */ + + +/* Fields unique to the Interrupt and Status register */ + +#define I2C_ISR_TXE (1 << 0) /* Bit 0: Transmit data register empty (transmitters) */ +#define I2C_ISR_TXIS (1 << 1) /* Bit 1: Transmit interrupt status (transmitters) */ +#define I2C_ISR_RXNE (1 << 2) /* Bit 2: Receive data register not empty (receivers) */ +#define I2C_ISR_TC (1 << 6) /* Bit 6: Transfer Complete (master) */ +#define I2C_ISR_TCR (1 << 7) /* Bit 7: Transfer Complete Reload */ +#define I2C_ISR_BUSY (1 << 15) /* Bit 15: Bus busy */ +#define I2C_ISR_DIR (1 << 16) /* Bit 16: Transfer direction (slave) */ +#define I2C_ISR_ADDCODE_SHIFT (17) /* Bits 17-23: Address match code (slave) */ +#define I2C_ISR_ADDCODE_MASK (0x7f << I2C_ISR_ADDCODE_SHIFT) + +/* Interrupt and Status register and interrupt clear register */ +/* Common interrupt bits */ + +#define I2C_INT_ADDR (1 << 3) /* Bit 3: Address matched (slave) */ +#define I2C_INT_NACK (1 << 4) /* Bit 4: Not Acknowledge received flag */ +#define I2C_INT_STOP (1 << 5) /* Bit 5: Stop detection flag */ +#define I2C_INT_BERR (1 << 8) /* Bit 8: Bus error */ +#define I2C_INT_ARLO (1 << 9) /* Bit 9: Arbitration lost */ +#define I2C_INT_OVR (1 << 10) /* Bit 10: Overrun/Underrun (slave) */ +#define I2C_INT_PECERR (1 << 11) /* Bit 11: PEC Error in reception */ +#define I2C_INT_TIMEOUT (1 << 12) /* Bit 12: Timeout or tLOW detection flag */ +#define I2C_INT_ALERT (1 << 13) /* Bit 13: SMBus alert */ + +#define I2C_ISR_ERRORMASK (I2C_INT_BERR | I2C_INT_ARLO | I2C_INT_OVR | I2C_INT_PECERR | I2C_INT_TIMEOUT) + +#define I2C_ICR_CLEARMASK (I2C_INT_ADDR | I2C_INT_NACK | I2C_INT_STOP | I2C_INT_BERR | I2C_INT_ARLO \ + | I2C_INT_OVR | I2C_INT_PECERR | I2C_INT_TIMEOUT | I2C_INT_ALERT) + +/* Packet error checking register */ + +#define I2C_PECR_MASK (0xff) + +/* Receive data register */ + +#define I2C_RXDR_MASK (0xff) + +/* Transmit data register */ + +#define I2C_TXDR_MASK (0xff) + +#endif /* __ARCH_ARM_SRC_STM32F7_CHIP_STM32F74XX77XX_I2C_H */ + diff --git a/arch/arm/src/stm32f7/chip/stm32f74xx77xx_spi.h b/arch/arm/src/stm32f7/chip/stm32f74xx77xx_spi.h new file mode 100644 index 0000000000000000000000000000000000000000..fe8c899c564548c98698ab816afc2c39d0a7eb82 --- /dev/null +++ b/arch/arm/src/stm32f7/chip/stm32f74xx77xx_spi.h @@ -0,0 +1,258 @@ +/************************************************************************************ + * arch/arm/src/stm32f7/chip/stm32f74xx77xx_spi.h + *stm32f74xx77xx + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: 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. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32F7_CHIP_STM32F74XX77XX_SPI_H +#define __ARCH_ARM_SRC_STM32F7_CHIP_STM32F74XX77XX_SPI_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include "chip.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Maximum allowed speed as per data sheet for all SPIs (both pclk1 and pclk2)*/ + +#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) +# define STM32_SPI_CLK_MAX 50000000UL +#elif defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) +# define STM32_SPI_CLK_MAX 54000000UL +#endif + +/* Register Offsets *****************************************************************/ + +#define STM32_SPI_CR1_OFFSET 0x0000 /* SPI Control Register 1 (16-bit) */ +#define STM32_SPI_CR2_OFFSET 0x0004 /* SPI control register 2 (16-bit) */ +#define STM32_SPI_SR_OFFSET 0x0008 /* SPI status register (16-bit) */ +#define STM32_SPI_DR_OFFSET 0x000c /* SPI data register (16-bit) */ +#define STM32_SPI_CRCPR_OFFSET 0x0010 /* SPI CRC polynomial register (16-bit) */ +#define STM32_SPI_RXCRCR_OFFSET 0x0014 /* SPI Rx CRC register (16-bit) */ +#define STM32_SPI_TXCRCR_OFFSET 0x0018 /* SPI Tx CRC register (16-bit) */ +#define STM32_SPI_I2SCFGR_OFFSET 0x001c /* I2S configuration register */ +#define STM32_SPI_I2SPR_OFFSET 0x0020 /* I2S prescaler register */ + +/* Register Addresses ***************************************************************/ + +#if STM32F7_NSPI > 0 +# define STM32_SPI1_CR1 (STM32_SPI1_BASE+STM32_SPI_CR1_OFFSET) +# define STM32_SPI1_CR2 (STM32_SPI1_BASE+STM32_SPI_CR2_OFFSET) +# define STM32_SPI1_SR (STM32_SPI1_BASE+STM32_SPI_SR_OFFSET) +# define STM32_SPI1_DR (STM32_SPI1_BASE+STM32_SPI_DR_OFFSET) +# define STM32_SPI1_CRCPR (STM32_SPI1_BASE+STM32_SPI_CRCPR_OFFSET) +# define STM32_SPI1_RXCRCR (STM32_SPI1_BASE+STM32_SPI_RXCRCR_OFFSET) +# define STM32_SPI1_TXCRCR (STM32_SPI1_BASE+STM32_SPI_TXCRCR_OFFSET) +#endif + +#if STM32F7_NSPI > 1 +# define STM32_SPI2_CR1 (STM32_SPI2_BASE+STM32_SPI_CR1_OFFSET) +# define STM32_SPI2_CR2 (STM32_SPI2_BASE+STM32_SPI_CR2_OFFSET) +# define STM32_SPI2_SR (STM32_SPI2_BASE+STM32_SPI_SR_OFFSET) +# define STM32_SPI2_DR (STM32_SPI2_BASE+STM32_SPI_DR_OFFSET) +# define STM32_SPI2_CRCPR (STM32_SPI2_BASE+STM32_SPI_CRCPR_OFFSET) +# define STM32_SPI2_RXCRCR (STM32_SPI2_BASE+STM32_SPI_RXCRCR_OFFSET) +# define STM32_SPI2_TXCRCR (STM32_SPI2_BASE+STM32_SPI_TXCRCR_OFFSET) +# define STM32_SPI2_I2SCFGR (STM32_SPI2_BASE+STM32_SPI_I2SCFGR_OFFSET) +# define STM32_SPI2_I2SPR (STM32_SPI2_BASE+STM32_SPI_I2SPR_OFFSET) +#endif + +#if STM32F7_NSPI > 2 +# define STM32_SPI3_CR1 (STM32_SPI3_BASE+STM32_SPI_CR1_OFFSET) +# define STM32_SPI3_CR2 (STM32_SPI3_BASE+STM32_SPI_CR2_OFFSET) +# define STM32_SPI3_SR (STM32_SPI3_BASE+STM32_SPI_SR_OFFSET) +# define STM32_SPI3_DR (STM32_SPI3_BASE+STM32_SPI_DR_OFFSET) +# define STM32_SPI3_CRCPR (STM32_SPI3_BASE+STM32_SPI_CRCPR_OFFSET) +# define STM32_SPI3_RXCRCR (STM32_SPI3_BASE+STM32_SPI_RXCRCR_OFFSET) +# define STM32_SPI3_TXCRCR (STM32_SPI3_BASE+STM32_SPI_TXCRCR_OFFSET) +# define STM32_SPI3_I2SCFGR (STM32_SPI3_BASE+STM32_SPI_I2SCFGR_OFFSET) +# define STM32_SPI3_I2SPR (STM32_SPI3_BASE+STM32_SPI_I2SPR_OFFSET) +#endif + +#if STM32F7_NSPI > 3 +# define STM32_SPI4_CR1 (STM32_SPI4_BASE+STM32_SPI_CR1_OFFSET) +# define STM32_SPI4_CR2 (STM32_SPI4_BASE+STM32_SPI_CR2_OFFSET) +# define STM32_SPI4_SR (STM32_SPI4_BASE+STM32_SPI_SR_OFFSET) +# define STM32_SPI4_DR (STM32_SPI4_BASE+STM32_SPI_DR_OFFSET) +# define STM32_SPI4_CRCPR (STM32_SPI4_BASE+STM32_SPI_CRCPR_OFFSET) +# define STM32_SPI4_RXCRCR (STM32_SPI4_BASE+STM32_SPI_RXCRCR_OFFSET) +# define STM32_SPI4_TXCRCR (STM32_SPI4_BASE+STM32_SPI_TXCRCR_OFFSET) +# define STM32_SPI4_I2SCFGR (STM32_SPI4_BASE+STM32_SPI_I2SCFGR_OFFSET) +# define STM32_SPI4_I2SPR (STM32_SPI4_BASE+STM32_SPI_I2SPR_OFFSET) +#endif + +#if STM32F7_NSPI > 4 +# define STM32_SPI5_CR1 (STM32_SPI5_BASE+STM32_SPI_CR1_OFFSET) +# define STM32_SPI5_CR2 (STM32_SPI5_BASE+STM32_SPI_CR2_OFFSET) +# define STM32_SPI5_SR (STM32_SPI5_BASE+STM32_SPI_SR_OFFSET) +# define STM32_SPI5_DR (STM32_SPI5_BASE+STM32_SPI_DR_OFFSET) +# define STM32_SPI5_CRCPR (STM32_SPI5_BASE+STM32_SPI_CRCPR_OFFSET) +# define STM32_SPI5_RXCRCR (STM32_SPI5_BASE+STM32_SPI_RXCRCR_OFFSET) +# define STM32_SPI5_TXCRCR (STM32_SPI5_BASE+STM32_SPI_TXCRCR_OFFSET) +# define STM32_SPI5_I2SCFGR (STM32_SPI5_BASE+STM32_SPI_I2SCFGR_OFFSET) +# define STM32_SPI5_I2SPR (STM32_SPI5_BASE+STM32_SPI_I2SPR_OFFSET) +#endif + +#if STM32F7_NSPI > 5 +# define STM32_SPI6_CR1 (STM32_SPI6_BASE+STM32_SPI_CR1_OFFSET) +# define STM32_SPI6_CR2 (STM32_SPI6_BASE+STM32_SPI_CR2_OFFSET) +# define STM32_SPI6_SR (STM32_SPI6_BASE+STM32_SPI_SR_OFFSET) +# define STM32_SPI6_DR (STM32_SPI6_BASE+STM32_SPI_DR_OFFSET) +# define STM32_SPI6_CRCPR (STM32_SPI6_BASE+STM32_SPI_CRCPR_OFFSET) +# define STM32_SPI6_RXCRCR (STM32_SPI6_BASE+STM32_SPI_RXCRCR_OFFSET) +# define STM32_SPI6_TXCRCR (STM32_SPI6_BASE+STM32_SPI_TXCRCR_OFFSET) +# define STM32_SPI6_I2SCFGR (STM32_SPI6_BASE+STM32_SPI_I2SCFGR_OFFSET) +# define STM32_SPI6_I2SPR (STM32_SPI6_BASE+STM32_SPI_I2SPR_OFFSET) +#endif + +/* Register Bitfield Definitions ****************************************************/ + +/* SPI Control Register 1 */ + +#define SPI_CR1_CPHA (1 << 0) /* Bit 0: Clock Phase */ +#define SPI_CR1_CPOL (1 << 1) /* Bit 1: Clock Polarity */ +#define SPI_CR1_MSTR (1 << 2) /* Bit 2: Master Selection */ +#define SPI_CR1_BR_SHIFT (3) /* Bits 5:3 Baud Rate Control */ +#define SPI_CR1_BR_MASK (7 << SPI_CR1_BR_SHIFT) +# define SPI_CR1_FPCLCKd2 (0 << SPI_CR1_BR_SHIFT) /* 000: fPCLK/2 */ +# define SPI_CR1_FPCLCKd4 (1 << SPI_CR1_BR_SHIFT) /* 001: fPCLK/4 */ +# define SPI_CR1_FPCLCKd8 (2 << SPI_CR1_BR_SHIFT) /* 010: fPCLK/8 */ +# define SPI_CR1_FPCLCKd16 (3 << SPI_CR1_BR_SHIFT) /* 011: fPCLK/16 */ +# define SPI_CR1_FPCLCKd32 (4 << SPI_CR1_BR_SHIFT) /* 100: fPCLK/32 */ +# define SPI_CR1_FPCLCKd64 (5 << SPI_CR1_BR_SHIFT) /* 101: fPCLK/64 */ +# define SPI_CR1_FPCLCKd128 (6 << SPI_CR1_BR_SHIFT) /* 110: fPCLK/128 */ +# define SPI_CR1_FPCLCKd256 (7 << SPI_CR1_BR_SHIFT) /* 111: fPCLK/256 */ +#define SPI_CR1_SPE (1 << 6) /* Bit 6: SPI Enable */ +#define SPI_CR1_LSBFIRST (1 << 7) /* Bit 7: Frame Format */ +#define SPI_CR1_SSI (1 << 8) /* Bit 8: Internal slave select */ +#define SPI_CR1_SSM (1 << 9) /* Bit 9: Software slave management */ +#define SPI_CR1_RXONLY (1 << 10) /* Bit 10: Receive only */ +#define SPI_CR1_CRCL (1 << 11) /* Bit 11: CRC length */ +#define SPI_CR1_CRCNEXT (1 << 12) /* Bit 12: Transmit CRC next */ +#define SPI_CR1_CRCEN (1 << 13) /* Bit 13: Hardware CRC calculation enable */ +#define SPI_CR1_BIDIOE (1 << 14) /* Bit 14: Output enable in bidirectional mode */ +#define SPI_CR1_BIDIMODE (1 << 15) /* Bit 15: Bidirectional data mode enable */ + +/* SPI Control Register 2 */ + +#define SPI_CR2_RXDMAEN (1 << 0) /* Bit 0: Rx Buffer DMA Enable */ +#define SPI_CR2_TXDMAEN (1 << 1) /* Bit 1: Tx Buffer DMA Enable */ +#define SPI_CR2_SSOE (1 << 2) /* Bit 2: SS Output Enable */ +#define SPI_CR2_NSSP (1 << 3) /* Bit 3 NSSP: NSS pulse management */ +#define SPI_CR2_FRF (1 << 4) /* Bit 4: Frame format */ +#define SPI_CR2_ERRIE (1 << 5) /* Bit 5: Error interrupt enable */ +#define SPI_CR2_RXNEIE (1 << 6) /* Bit 6: RX buffer not empty interrupt enable */ +#define SPI_CR2_TXEIE (1 << 7) /* Bit 7: Tx buffer empty interrupt enable */ +#define SPI_CR2_DS_SHIFT (8) /* Bits 8-11: Data size */ +#define SPI_CR2_DS_MASK (0xf << SPI_CR2_DS_SHIFT) +# define SPI_CR2_DS_VAL(bits) (((bits)-1) << SPI_CR2_DS_SHIFT) +# define SPI_CR2_DS_4BIT SPI_CR2_DS_VAL(4) +# define SPI_CR2_DS_5BIT SPI_CR2_DS_VAL(5) +# define SPI_CR2_DS_6BIT SPI_CR2_DS_VAL(6) +# define SPI_CR2_DS_7BIT SPI_CR2_DS_VAL(7) +# define SPI_CR2_DS_8BIT SPI_CR2_DS_VAL(8) +# define SPI_CR2_DS_9BIT SPI_CR2_DS_VAL(9) +# define SPI_CR2_DS_10BIT SPI_CR2_DS_VAL(10) +# define SPI_CR2_DS_11BIT SPI_CR2_DS_VAL(11) +# define SPI_CR2_DS_12BIT SPI_CR2_DS_VAL(12) +# define SPI_CR2_DS_13BIT SPI_CR2_DS_VAL(13) +# define SPI_CR2_DS_14BIT SPI_CR2_DS_VAL(14) +# define SPI_CR2_DS_15BIT SPI_CR2_DS_VAL(15) +# define SPI_CR2_DS_16BIT SPI_CR2_DS_VAL(16) +#define SPI_CR2_FRXTH (1 << 12) /* Bit 12: FIFO reception threshold */ +#define SPI_CR2_LDMARX (1 << 13) /* Bit 13: Last DMA transfer for receptione */ +#define SPI_CR2_LDMATX (1 << 14) /* Bit 14: Last DMA transfer for transmission */ + +/* SPI status register */ + +#define SPI_SR_RXNE (1 << 0) /* Bit 0: Receive buffer not empty */ +#define SPI_SR_TXE (1 << 1) /* Bit 1: Transmit buffer empty */ +#define SPI_SR_CHSIDE (1 << 2) /* Bit 2: Channel side (i2s) */ +#define SPI_SR_UDR (1 << 3) /* Bit 3: Underrun flag (i2s) */ +#define SPI_SR_CRCERR (1 << 4) /* Bit 4: CRC error flag */ +#define SPI_SR_MODF (1 << 5) /* Bit 5: Mode fault */ +#define SPI_SR_OVR (1 << 6) /* Bit 6: Overrun flag */ +#define SPI_SR_BSY (1 << 7) /* Bit 7: Busy flag */ +#define SPI_SR_FRE (1 << 8) /* Bit 8: Frame format error */ +#define SPI_SR_FRLVL_SHIFT (9) /* Bits 9-10: FIFO reception level */ +#define SPI_SR_FRLVL_MASK (3 << SPI_SR_FRLVL_SHIFT) +# define SPI_SR_FRLVL_EMPTY (0 << SPI_SR_FRLVL_SHIFT) /* FIFO empty */ +# define SPI_SR_FRLVL_QUARTER (1 << SPI_SR_FRLVL_SHIFT) /* 1/4 FIFO */ +# define SPI_SR_FRLVL_HALF (2 << SPI_SR_FRLVL_SHIFT) /* 1/2 FIFO */ +# define SPI_SR_FRLVL_FULL (3 << SPI_SR_FRLVL_SHIFT) /* FIFO full */ +#define SPI_SR_FTLVL_SHIFT (11) /* Bits 11-12: FIFO transmission level */ +#define SPI_SR_FTLVL_MASK (3 << SPI_SR_FTLVL_SHIFT) +# define SPI_SR_FTLVL_EMPTY (0 << SPI_SR_FTLVL_SHIFT) /* FIFO empty */ +# define SPI_SR_FTLVL_QUARTER (1 << SPI_SR_FTLVL_SHIFT) /* 1/4 FIFO */ +# define SPI_SR_FTLVL_HALF (2 << SPI_SR_FTLVL_SHIFT) /* 1/2 FIFO */ +# define SPI_SR_FTLVL_FULL (3 << SPI_SR_FTLVL_SHIFT) /* FIFO full */ + +/* I2S configuration register */ + +#define SPI_I2SCFGR_CHLEN (1 << 0) /* Bit 0: Channel length (number of bits per audio channel) */ +#define SPI_I2SCFGR_DATLEN_SHIFT (1) /* Bit 1-2: Data length to be transferred */ +#define SPI_I2SCFGR_DATLEN_MASK (3 << SPI_I2SCFGR_DATLEN_SHIFT) +# define SPI_I2SCFGR_DATLEN_16BIT (0 << SPI_I2SCFGR_DATLEN_SHIFT) /* 00: 16-bit data length */ +# define SPI_I2SCFGR_DATLEN_8BIT (1 << SPI_I2SCFGR_DATLEN_SHIFT) /* 01: 24-bit data length */ +# define SPI_I2SCFGR_DATLEN_32BIT (2 << SPI_I2SCFGR_DATLEN_SHIFT) /* 10: 32-bit data length */ +#define SPI_I2SCFGR_CKPOL (1 << 3) /* Bit 3: Steady state clock polarity */ +#define SPI_I2SCFGR_I2SSTD_SHIFT (4) /* Bit 4-5: I2S standard selection */ +#define SPI_I2SCFGR_I2SSTD_MASK (3 << SPI_I2SCFGR_I2SSTD_SHIFT) +# define SPI_I2SCFGR_I2SSTD_PHILLIPS (0 << SPI_I2SCFGR_I2SSTD_SHIFT) /* 00: I2S Phillips standard. */ +# define SPI_I2SCFGR_I2SSTD_MSB (1 << SPI_I2SCFGR_I2SSTD_SHIFT) /* 01: MSB justified standard (left justified) */ +# define SPI_I2SCFGR_I2SSTD_LSB (2 << SPI_I2SCFGR_I2SSTD_SHIFT) /* 10: LSB justified standard (right justified) */ +# define SPI_I2SCFGR_I2SSTD_PCM (3 << SPI_I2SCFGR_I2SSTD_SHIFT) /* 11: PCM standard */ +#define SPI_I2SCFGR_PCMSYNC (1 << 7) /* Bit 7: PCM frame synchronization */ +#define SPI_I2SCFGR_I2SCFG_SHIFT (8) /* Bit 8-9: I2S configuration mode */ +#define SPI_I2SCFGR_I2SCFG_MASK (3 << SPI_I2SCFGR_I2SCFG_SHIFT) +# define SPI_I2SCFGR_I2SCFG_STX (0 << SPI_I2SCFGR_I2SCFG_SHIFT) /* 00: Slave - transmit */ +# define SPI_I2SCFGR_I2SCFG_SRX (1 << SPI_I2SCFGR_I2SCFG_SHIFT) /* 01: Slave - receive */ +# define SPI_I2SCFGR_I2SCFG_MTX (2 << SPI_I2SCFGR_I2SCFG_SHIFT) /* 10: Master - transmit */ +# define SPI_I2SCFGR_I2SCFG_MRX (3 << SPI_I2SCFGR_I2SCFG_SHIFT) /* 11: Master - receive */ +#define SPI_I2SCFGR_I2SE (1 << 10) /* Bit 10: I2S Enable */ +#define SPI_I2SCFGR_I2SMOD (1 << 11) /* Bit 11: I2S mode selection */ +#define SPI_I2SCFGR_ASTRTEN (1 << 12) /* Bit 12: Asynchronous start enable */ + +/* I2S prescaler register */ + +#define SPI_I2SPR_I2SDIV_SHIFT (0) /* Bit 0-7: I2S Linear prescaler */ +#define SPI_I2SPR_I2SDIV_MASK (0xff << SPI_I2SPR_I2SDIV_SHIFT) +#define SPI_I2SPR_ODD (1 << 8) /* Bit 8: Odd factor for the prescaler */ +#define SPI_I2SPR_MCKOE (1 << 9) /* Bit 9: Master clock output enable */ + +#endif /* __ARCH_ARM_SRC_STM32F7_CHIP_STM32F74XX77XX_SPI_H */ diff --git a/arch/arm/src/stm32f7/chip/stm32f74xx75xx_uart.h b/arch/arm/src/stm32f7/chip/stm32f74xx77xx_uart.h similarity index 98% rename from arch/arm/src/stm32f7/chip/stm32f74xx75xx_uart.h rename to arch/arm/src/stm32f7/chip/stm32f74xx77xx_uart.h index 50d5f949f5fe62ce6bce527a90e82e2882287035..4d109bead0d6ef5a0d8e20f2e6f46453741f6643 100644 --- a/arch/arm/src/stm32f7/chip/stm32f74xx75xx_uart.h +++ b/arch/arm/src/stm32f7/chip/stm32f74xx77xx_uart.h @@ -1,8 +1,9 @@ /************************************************************************************ - * arch/arm/src/stm32f7/chip/stm32f74xxf75xx_uart.h + * arch/arm/src/stm32f7/chip/stm32f74xxf77xx_uart.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -33,8 +34,8 @@ * ************************************************************************************/ -#ifndef __ARCH_ARM_STC_STM32F7_CHIP_STM32F74XX75XX_UART_H -#define __ARCH_ARM_STC_STM32F7_CHIP_STM32F74XX75XX_UART_H +#ifndef __ARCH_ARM_SRC_STM32F7_CHIP_STM32F74XX77XX_UART_H +#define __ARCH_ARM_SRC_STM32F7_CHIP_STM32F74XX77XX_UART_H /************************************************************************************ * Included Files @@ -42,7 +43,8 @@ #include -#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) +#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) || \ + defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) /************************************************************************************ * Pre-processor Definitions @@ -366,4 +368,4 @@ #define USART_TDR_MASK (0x1ff << USART_TDR_SHIFT) #endif /* CONFIG_STM32F7_STM32F74XX || CONFIG_STM32F7_STM32F75XX */ -#endif /* __ARCH_ARM_STC_STM32F7_CHIP_STM32F74XX75XX_UART_H */ +#endif /* __ARCH_ARM_SRC_STM32F7_CHIP_STM32F74XX77XX_UART_H */ diff --git a/arch/arm/src/stm32f7/chip/stm32f76xx77xx_dma.h b/arch/arm/src/stm32f7/chip/stm32f76xx77xx_dma.h new file mode 100644 index 0000000000000000000000000000000000000000..d4d4eb0f8931b76ac8ad68aad7c0b95bbf14575c --- /dev/null +++ b/arch/arm/src/stm32f7/chip/stm32f76xx77xx_dma.h @@ -0,0 +1,593 @@ +/************************************************************************************ + * arch/arm/src/stm32f7/chip/stm32f76xx77xx_dma.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: Gregory Nutt + * Davod 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. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32F7_CHIP_STM32F76XXX77XX_DMA_H +#define __ARCH_ARM_SRC_STM32F7_CHIP_STM32F76XXX77XX_DMA_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#if defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* 2 DMA controllers */ + +#define DMA1 (0) +#define DMA2 (1) + +/* 8 DMA streams */ + +#define DMA_STREAM0 (0) +#define DMA_STREAM1 (1) +#define DMA_STREAM2 (2) +#define DMA_STREAM3 (3) +#define DMA_STREAM4 (4) +#define DMA_STREAM5 (5) +#define DMA_STREAM6 (6) +#define DMA_STREAM7 (7) + +/* 16 DMA channels */ + +#define DMA_CHAN0 (0) +#define DMA_CHAN1 (1) +#define DMA_CHAN2 (2) +#define DMA_CHAN3 (3) +#define DMA_CHAN4 (4) +#define DMA_CHAN5 (5) +#define DMA_CHAN6 (6) +#define DMA_CHAN7 (7) +#define DMA_CHAN8 (8) +#define DMA_CHAN9 (9) +#define DMA_CHAN10 (10) +#define DMA_CHAN11 (11) +#define DMA_CHAN12 (12) +#define DMA_CHAN13 (13) +#define DMA_CHAN14 (14) +#define DMA_CHAN15 (15) + +/* Register Offsets *****************************************************************/ + +#define STM32_DMA_LISR_OFFSET 0x0000 /* DMA low interrupt status register */ +#define STM32_DMA_HISR_OFFSET 0x0004 /* DMA high interrupt status register */ +#define STM32_DMA_LIFCR_OFFSET 0x0008 /* DMA low interrupt flag clear register */ +#define STM32_DMA_HIFCR_OFFSET 0x000c /* DMA high interrupt flag clear register */ + +#define STM32_DMA_OFFSET(n) (0x0010+0x0018*(n)) +#define STM32_DMA_SCR_OFFSET 0x0000 /* DMA stream n configuration register */ +#define STM32_DMA_SNDTR_OFFSET 0x0004 /* DMA stream n number of data register */ +#define STM32_DMA_SPAR_OFFSET 0x0008 /* DMA stream n peripheral address register */ +#define STM32_DMA_SM0AR_OFFSET 0x000c /* DMA stream n memory 0 address register */ +#define STM32_DMA_SM1AR_OFFSET 0x0010 /* DMA stream n memory 1 address register */ +#define STM32_DMA_SFCR_OFFSET 0x0014 /* DMA stream n FIFO control register */ + +#define STM32_DMA_S0CR_OFFSET 0x0010 /* DMA stream 0 configuration register */ +#define STM32_DMA_S1CR_OFFSET 0x0028 /* DMA stream 1 configuration register */ +#define STM32_DMA_S2CR_OFFSET 0x0040 /* DMA stream 2 configuration register */ +#define STM32_DMA_S3CR_OFFSET 0x0058 /* DMA stream 3 configuration register */ +#define STM32_DMA_S4CR_OFFSET 0x0070 /* DMA stream 4 configuration register */ +#define STM32_DMA_S5CR_OFFSET 0x0088 /* DMA stream 5 configuration register */ +#define STM32_DMA_S6CR_OFFSET 0x00a0 /* DMA stream 6 configuration register */ +#define STM32_DMA_S7CR_OFFSET 0x00b8 /* DMA stream 7 configuration register */ + +#define STM32_DMA_S0NDTR_OFFSET 0x0014 /* DMA stream 0 number of data register */ +#define STM32_DMA_S1NDTR_OFFSET 0x002c /* DMA stream 1 number of data register */ +#define STM32_DMA_S2NDTR_OFFSET 0x0044 /* DMA stream 2 number of data register */ +#define STM32_DMA_S3NDTR_OFFSET 0x005c /* DMA stream 3 number of data register */ +#define STM32_DMA_S4NDTR_OFFSET 0x0074 /* DMA stream 4 number of data register */ +#define STM32_DMA_S5NDTR_OFFSET 0x008c /* DMA stream 5 number of data register */ +#define STM32_DMA_S6NDTR_OFFSET 0x00a4 /* DMA stream 6 number of data register */ +#define STM32_DMA_S7NDTR_OFFSET 0x00bc /* DMA stream 7 number of data register */ + +#define STM32_DMA_S0PAR_OFFSET 0x0018 /* DMA stream 0 peripheral address register */ +#define STM32_DMA_S1PAR_OFFSET 0x0030 /* DMA stream 1 peripheral address register */ +#define STM32_DMA_S2PAR_OFFSET 0x0048 /* DMA stream 2 peripheral address register */ +#define STM32_DMA_S3PAR_OFFSET 0x0060 /* DMA stream 3 peripheral address register */ +#define STM32_DMA_S4PAR_OFFSET 0x0078 /* DMA stream 4 peripheral address register */ +#define STM32_DMA_S5PAR_OFFSET 0x0090 /* DMA stream 5 peripheral address register */ +#define STM32_DMA_S6PAR_OFFSET 0x00a8 /* DMA stream 6 peripheral address register */ +#define STM32_DMA_S7PAR_OFFSET 0x00c0 /* DMA stream 7 peripheral address register */ + +#define STM32_DMA_S0M0AR_OFFSET 0x001c /* DMA stream 0 memory 0 address register */ +#define STM32_DMA_S1M0AR_OFFSET 0x0034 /* DMA stream 1 memory 0 address register */ +#define STM32_DMA_S2M0AR_OFFSET 0x004c /* DMA stream 2 memory 0 address register */ +#define STM32_DMA_S3M0AR_OFFSET 0x0064 /* DMA stream 3 memory 0 address register */ +#define STM32_DMA_S4M0AR_OFFSET 0x007c /* DMA stream 4 memory 0 address register */ +#define STM32_DMA_S5M0AR_OFFSET 0x0094 /* DMA stream 5 memory 0 address register */ +#define STM32_DMA_S6M0AR_OFFSET 0x00ac /* DMA stream 6 memory 0 address register */ +#define STM32_DMA_S7M0AR_OFFSET 0x00c4 /* DMA stream 7 memory 0 address register */ + +#define STM32_DMA_S0M1AR_OFFSET 0x0020 /* DMA stream 0 memory 1 address register */ +#define STM32_DMA_S1M1AR_OFFSET 0x0038 /* DMA stream 1 memory 1 address register */ +#define STM32_DMA_S2M1AR_OFFSET 0x0050 /* DMA stream 2 memory 1 address register */ +#define STM32_DMA_S3M1AR_OFFSET 0x0068 /* DMA stream 3 memory 1 address register */ +#define STM32_DMA_S4M1AR_OFFSET 0x0080 /* DMA stream 4 memory 1 address register */ +#define STM32_DMA_S5M1AR_OFFSET 0x0098 /* DMA stream 5 memory 1 address register */ +#define STM32_DMA_S6M1AR_OFFSET 0x00b0 /* DMA stream 6 memory 1 address register */ +#define STM32_DMA_S7M1AR_OFFSET 0x00c8 /* DMA stream 7 memory 1 address register */ + +#define STM32_DMA_S0FCR_OFFSET 0x0024 /* DMA stream 0 FIFO control register */ +#define STM32_DMA_S1FCR_OFFSET 0x003c /* DMA stream 1 FIFO control register */ +#define STM32_DMA_S2FCR_OFFSET 0x0054 /* DMA stream 2 FIFO control register */ +#define STM32_DMA_S3FCR_OFFSET 0x006c /* DMA stream 3 FIFO control register */ +#define STM32_DMA_S4FCR_OFFSET 0x0084 /* DMA stream 4 FIFO control register */ +#define STM32_DMA_S5FCR_OFFSET 0x009c /* DMA stream 5 FIFO control register */ +#define STM32_DMA_S6FCR_OFFSET 0x00b4 /* DMA stream 6 FIFO control register */ +#define STM32_DMA_S7FCR_OFFSET 0x00cc /* DMA stream 7 FIFO control register */ + +/* Register Addresses ***************************************************************/ + +#define STM32_DMA1_LISRC (STM32_DMA1_BASE+STM32_DMA_LISR_OFFSET) +#define STM32_DMA1_HISRC (STM32_DMA1_BASE+STM32_DMA_HISR_OFFSET) +#define STM32_DMA1_LIFCR (STM32_DMA1_BASE+STM32_DMA_LIFCR_OFFSET) +#define STM32_DMA1_HIFCR (STM32_DMA1_BASE+STM32_DMA_HIFCR_OFFSET) + +#define STM32_DMA1_SCR(n) (STM32_DMA1_BASE+STM32_DMA_SCR_OFFSET+STM32_DMA_OFFSET(n)) +#define STM32_DMA1_S0CR (STM32_DMA1_BASE+STM32_DMA_S0CR_OFFSET) +#define STM32_DMA1_S1CR (STM32_DMA1_BASE+STM32_DMA_S1CR_OFFSET) +#define STM32_DMA1_S2CR (STM32_DMA1_BASE+STM32_DMA_S2CR_OFFSET) +#define STM32_DMA1_S3CR (STM32_DMA1_BASE+STM32_DMA_S3CR_OFFSET) +#define STM32_DMA1_S4CR (STM32_DMA1_BASE+STM32_DMA_S4CR_OFFSET) +#define STM32_DMA1_S5CR (STM32_DMA1_BASE+STM32_DMA_S5CR_OFFSET) +#define STM32_DMA1_S6CR (STM32_DMA1_BASE+STM32_DMA_S6CR_OFFSET) +#define STM32_DMA1_S7CR (STM32_DMA1_BASE+STM32_DMA_S7CR_OFFSET) + +#define STM32_DMA1_SNDTR(n) (STM32_DMA1_BASE+STM32_DMA_SNDTR_OFFSET+STM32_DMA_OFFSET(n)) +#define STM32_DMA1_S0NDTR (STM32_DMA1_BASE+STM32_DMA_S0NDTR_OFFSET) +#define STM32_DMA1_S1NDTR (STM32_DMA1_BASE+STM32_DMA_S1NDTR_OFFSET) +#define STM32_DMA1_S2NDTR (STM32_DMA1_BASE+STM32_DMA_S2NDTR_OFFSET) +#define STM32_DMA1_S3NDTR (STM32_DMA1_BASE+STM32_DMA_S3NDTR_OFFSET) +#define STM32_DMA1_S4NDTR (STM32_DMA1_BASE+STM32_DMA_S4NDTR_OFFSET) +#define STM32_DMA1_S5NDTR (STM32_DMA1_BASE+STM32_DMA_S5NDTR_OFFSET) +#define STM32_DMA1_S6NDTR (STM32_DMA1_BASE+STM32_DMA_S6NDTR_OFFSET) +#define STM32_DMA1_S7NDTR (STM32_DMA1_BASE+STM32_DMA_S7NDTR_OFFSET) + +#define STM32_DMA1_SPAR(n) (STM32_DMA1_BASE+STM32_DMA_SPAR_OFFSET+STM32_DMA_OFFSET(n)) +#define STM32_DMA1_S0PAR (STM32_DMA1_BASE+STM32_DMA_S0PAR_OFFSET) +#define STM32_DMA1_S1PAR (STM32_DMA1_BASE+STM32_DMA_S1PAR_OFFSET) +#define STM32_DMA1_S2PAR (STM32_DMA1_BASE+STM32_DMA_S2PAR_OFFSET) +#define STM32_DMA1_S3PAR (STM32_DMA1_BASE+STM32_DMA_S3PAR_OFFSET) +#define STM32_DMA1_S4PAR (STM32_DMA1_BASE+STM32_DMA_S4PAR_OFFSET) +#define STM32_DMA1_S5PAR (STM32_DMA1_BASE+STM32_DMA_S5PAR_OFFSET) +#define STM32_DMA1_S6PAR (STM32_DMA1_BASE+STM32_DMA_S6PAR_OFFSET) +#define STM32_DMA1_S7PAR (STM32_DMA1_BASE+STM32_DMA_S7PAR_OFFSET) + +#define STM32_DMA1_SM0AR(n) (STM32_DMA1_BASE+STM32_DMA_SM0AR_OFFSET+STM32_DMA_OFFSET(n)) +#define STM32_DMA1_S0M0AR (STM32_DMA1_BASE+STM32_DMA_S0M0AR_OFFSET) +#define STM32_DMA1_S1M0AR (STM32_DMA1_BASE+STM32_DMA_S1M0AR_OFFSET) +#define STM32_DMA1_S2M0AR (STM32_DMA1_BASE+STM32_DMA_S2M0AR_OFFSET) +#define STM32_DMA1_S3M0AR (STM32_DMA1_BASE+STM32_DMA_S3M0AR_OFFSET) +#define STM32_DMA1_S4M0AR (STM32_DMA1_BASE+STM32_DMA_S4M0AR_OFFSET) +#define STM32_DMA1_S5M0AR (STM32_DMA1_BASE+STM32_DMA_S5M0AR_OFFSET) +#define STM32_DMA1_S6M0AR (STM32_DMA1_BASE+STM32_DMA_S6M0AR_OFFSET) +#define STM32_DMA1_S7M0AR (STM32_DMA1_BASE+STM32_DMA_S7M0AR_OFFSET) + +#define STM32_DMA1_SM1AR(n) (STM32_DMA1_BASE+STM32_DMA_SM1AR_OFFSET+STM32_DMA_OFFSET(n)) +#define STM32_DMA1_S0M1AR (STM32_DMA1_BASE+STM32_DMA_S0M1AR_OFFSET) +#define STM32_DMA1_S1M1AR (STM32_DMA1_BASE+STM32_DMA_S1M1AR_OFFSET) +#define STM32_DMA1_S2M1AR (STM32_DMA1_BASE+STM32_DMA_S2M1AR_OFFSET) +#define STM32_DMA1_S3M1AR (STM32_DMA1_BASE+STM32_DMA_S3M1AR_OFFSET) +#define STM32_DMA1_S4M1AR (STM32_DMA1_BASE+STM32_DMA_S4M1AR_OFFSET) +#define STM32_DMA1_S5M1AR (STM32_DMA1_BASE+STM32_DMA_S5M1AR_OFFSET) +#define STM32_DMA1_S6M1AR (STM32_DMA1_BASE+STM32_DMA_S6M1AR_OFFSET) +#define STM32_DMA1_S7M1AR (STM32_DMA1_BASE+STM32_DMA_S7M1AR_OFFSET) + +#define STM32_DMA1_SFCR(n) (STM32_DMA1_BASE+STM32_DMA_SFCR_OFFSET+STM32_DMA_OFFSET(n)) +#define STM32_DMA1_S0FCR (STM32_DMA1_BASE+STM32_DMA_S0FCR_OFFSET) +#define STM32_DMA1_S1FCR (STM32_DMA1_BASE+STM32_DMA_S1FCR_OFFSET) +#define STM32_DMA1_S2FCR (STM32_DMA1_BASE+STM32_DMA_S2FCR_OFFSET) +#define STM32_DMA1_S3FCR (STM32_DMA1_BASE+STM32_DMA_S3FCR_OFFSET) +#define STM32_DMA1_S4FCR (STM32_DMA1_BASE+STM32_DMA_S4FCR_OFFSET) +#define STM32_DMA1_S5FCR (STM32_DMA1_BASE+STM32_DMA_S5FCR_OFFSET) +#define STM32_DMA1_S6FCR (STM32_DMA1_BASE+STM32_DMA_S6FCR_OFFSET) +#define STM32_DMA1_S7FCR (STM32_DMA1_BASE+STM32_DMA_S7FCR_OFFSET) + +#define STM32_DMA2_LISRC (STM32_DMA2_BASE+STM32_DMA_LISR_OFFSET) +#define STM32_DMA2_HISRC (STM32_DMA2_BASE+STM32_DMA_HISR_OFFSET) +#define STM32_DMA2_LIFCR (STM32_DMA2_BASE+STM32_DMA_LIFCR_OFFSET) +#define STM32_DMA2_HIFCR (STM32_DMA2_BASE+STM32_DMA_HIFCR_OFFSET) + +#define STM32_DMA2_SCR(n) (STM32_DMA2_BASE+STM32_DMA_SCR_OFFSET+STM32_DMA_OFFSET(n)) +#define STM32_DMA2_S0CR (STM32_DMA2_BASE+STM32_DMA_S0CR_OFFSET) +#define STM32_DMA2_S1CR (STM32_DMA2_BASE+STM32_DMA_S1CR_OFFSET) +#define STM32_DMA2_S2CR (STM32_DMA2_BASE+STM32_DMA_S2CR_OFFSET) +#define STM32_DMA2_S3CR (STM32_DMA2_BASE+STM32_DMA_S3CR_OFFSET) +#define STM32_DMA2_S4CR (STM32_DMA2_BASE+STM32_DMA_S4CR_OFFSET) +#define STM32_DMA2_S5CR (STM32_DMA2_BASE+STM32_DMA_S5CR_OFFSET) +#define STM32_DMA2_S6CR (STM32_DMA2_BASE+STM32_DMA_S6CR_OFFSET) +#define STM32_DMA2_S7CR (STM32_DMA2_BASE+STM32_DMA_S7CR_OFFSET) + +#define STM32_DMA2_SNDTR(n) (STM32_DMA2_BASE+STM32_DMA_SNDTR_OFFSET+STM32_DMA_OFFSET(n)) +#define STM32_DMA2_S0NDTR (STM32_DMA2_BASE+STM32_DMA_S0NDTR_OFFSET) +#define STM32_DMA2_S1NDTR (STM32_DMA2_BASE+STM32_DMA_S1NDTR_OFFSET) +#define STM32_DMA2_S2NDTR (STM32_DMA2_BASE+STM32_DMA_S2NDTR_OFFSET) +#define STM32_DMA2_S3NDTR (STM32_DMA2_BASE+STM32_DMA_S3NDTR_OFFSET) +#define STM32_DMA2_S4NDTR (STM32_DMA2_BASE+STM32_DMA_S4NDTR_OFFSET) +#define STM32_DMA2_S5NDTR (STM32_DMA2_BASE+STM32_DMA_S5NDTR_OFFSET) +#define STM32_DMA2_S6NDTR (STM32_DMA2_BASE+STM32_DMA_S6NDTR_OFFSET) +#define STM32_DMA2_S7NDTR (STM32_DMA2_BASE+STM32_DMA_S7NDTR_OFFSET) + +#define STM32_DMA2_SPAR(n) (STM32_DMA2_BASE+STM32_DMA_SPAR_OFFSET+STM32_DMA_OFFSET(n)) +#define STM32_DMA2_S0PAR (STM32_DMA2_BASE+STM32_DMA_S0PAR_OFFSET) +#define STM32_DMA2_S1PAR (STM32_DMA2_BASE+STM32_DMA_S1PAR_OFFSET) +#define STM32_DMA2_S2PAR (STM32_DMA2_BASE+STM32_DMA_S2PAR_OFFSET) +#define STM32_DMA2_S3PAR (STM32_DMA2_BASE+STM32_DMA_S3PAR_OFFSET) +#define STM32_DMA2_S4PAR (STM32_DMA2_BASE+STM32_DMA_S4PAR_OFFSET) +#define STM32_DMA2_S5PAR (STM32_DMA2_BASE+STM32_DMA_S5PAR_OFFSET) +#define STM32_DMA2_S6PAR (STM32_DMA2_BASE+STM32_DMA_S6PAR_OFFSET) +#define STM32_DMA2_S7PAR (STM32_DMA2_BASE+STM32_DMA_S7PAR_OFFSET) + +#define STM32_DMA2_SM0AR(n) (STM32_DMA2_BASE+STM32_DMA_SM0AR_OFFSET+STM32_DMA_OFFSET(n)) +#define STM32_DMA2_S0M0AR (STM32_DMA2_BASE+STM32_DMA_S0M0AR_OFFSET) +#define STM32_DMA2_S1M0AR (STM32_DMA2_BASE+STM32_DMA_S1M0AR_OFFSET) +#define STM32_DMA2_S2M0AR (STM32_DMA2_BASE+STM32_DMA_S2M0AR_OFFSET) +#define STM32_DMA2_S3M0AR (STM32_DMA2_BASE+STM32_DMA_S3M0AR_OFFSET) +#define STM32_DMA2_S4M0AR (STM32_DMA2_BASE+STM32_DMA_S4M0AR_OFFSET) +#define STM32_DMA2_S5M0AR (STM32_DMA2_BASE+STM32_DMA_S5M0AR_OFFSET) +#define STM32_DMA2_S6M0AR (STM32_DMA2_BASE+STM32_DMA_S6M0AR_OFFSET) +#define STM32_DMA2_S7M0AR (STM32_DMA2_BASE+STM32_DMA_S7M0AR_OFFSET) + +#define STM32_DMA2_SM1AR(n) (STM32_DMA2_BASE+STM32_DMA_SM1AR_OFFSET+STM32_DMA_OFFSET(n)) +#define STM32_DMA2_S0M1AR (STM32_DMA2_BASE+STM32_DMA_S0M1AR_OFFSET) +#define STM32_DMA2_S1M1AR (STM32_DMA2_BASE+STM32_DMA_S1M1AR_OFFSET) +#define STM32_DMA2_S2M1AR (STM32_DMA2_BASE+STM32_DMA_S2M1AR_OFFSET) +#define STM32_DMA2_S3M1AR (STM32_DMA2_BASE+STM32_DMA_S3M1AR_OFFSET) +#define STM32_DMA2_S4M1AR (STM32_DMA2_BASE+STM32_DMA_S4M1AR_OFFSET) +#define STM32_DMA2_S5M1AR (STM32_DMA2_BASE+STM32_DMA_S5M1AR_OFFSET) +#define STM32_DMA2_S6M1AR (STM32_DMA2_BASE+STM32_DMA_S6M1AR_OFFSET) +#define STM32_DMA2_S7M1AR (STM32_DMA2_BASE+STM32_DMA_S7M1AR_OFFSET) + +#define STM32_DMA2_SFCR(n) (STM32_DMA2_BASE+STM32_DMA_SFCR_OFFSET+STM32_DMA_OFFSET(n)) +#define STM32_DMA2_S0FCR (STM32_DMA2_BASE+STM32_DMA_S0FCR_OFFSET) +#define STM32_DMA2_S1FCR (STM32_DMA2_BASE+STM32_DMA_S1FCR_OFFSET) +#define STM32_DMA2_S2FCR (STM32_DMA2_BASE+STM32_DMA_S2FCR_OFFSET) +#define STM32_DMA2_S3FCR (STM32_DMA2_BASE+STM32_DMA_S3FCR_OFFSET) +#define STM32_DMA2_S4FCR (STM32_DMA2_BASE+STM32_DMA_S4FCR_OFFSET) +#define STM32_DMA2_S5FCR (STM32_DMA2_BASE+STM32_DMA_S5FCR_OFFSET) +#define STM32_DMA2_S6FCR (STM32_DMA2_BASE+STM32_DMA_S6FCR_OFFSET) +#define STM32_DMA2_S7FCR (STM32_DMA2_BASE+STM32_DMA_S7FCR_OFFSET) + +/* Register Bitfield Definitions ****************************************************/ + +#define DMA_STREAM_MASK 0x3f +#define DMA_STREAM_FEIF_BIT (1 << 0) /* Bit 0: Stream FIFO error interrupt flag */ +#define DMA_STREAM_DMEIF_BIT (1 << 2) /* Bit 2: Stream direct mode error interrupt flag */ +#define DMA_STREAM_TEIF_BIT (1 << 3) /* Bit 3: Stream Transfer Error flag */ +#define DMA_STREAM_HTIF_BIT (1 << 4) /* Bit 4: Stream Half Transfer flag */ +#define DMA_STREAM_TCIF_BIT (1 << 5) /* Bit 5: Stream Transfer Complete flag */ + +/* DMA interrupt status register and interrupt flag clear register field definitions */ + +#define DMA_INT_STREAM0_SHIFT (0) /* Bits 0-5: DMA Stream 0 interrupt */ +#define DMA_INT_STREAM0_MASK (DMA_STREAM_MASK << DMA_INT_STREAM0_SHIFT) +#define DMA_INT_STREAM1_SHIFT (6) /* Bits 6-11: DMA Stream 1 interrupt */ +#define DMA_INT_STREAM1_MASK (DMA_STREAM_MASK << DMA_INT_STREAM1_SHIFT) +#define DMA_INT_STREAM2_SHIFT (16) /* Bits 16-21: DMA Stream 2 interrupt */ +#define DMA_INT_STREAM2_MASK (DMA_STREAM_MASK << DMA_INT_STREAM2_SHIFT) +#define DMA_INT_STREAM3_SHIFT (22) /* Bits 22-27: DMA Stream 3 interrupt */ +#define DMA_INT_STREAM3_MASK (DMA_STREAM_MASK << DMA_INT_STREAM3_SHIFT) + +#define DMA_INT_STREAM4_SHIFT (0) /* Bits 0-5: DMA Stream 4 interrupt */ +#define DMA_INT_STREAM4_MASK (DMA_STREAM_MASK << DMA_INT_STREAM4_SHIFT) +#define DMA_INT_STREAM5_SHIFT (6) /* Bits 6-11: DMA Stream 5 interrupt */ +#define DMA_INT_STREAM5_MASK (DMA_STREAM_MASK << DMA_INT_STREAM5_SHIFT) +#define DMA_INT_STREAM6_SHIFT (16) /* Bits 16-21: DMA Stream 6 interrupt */ +#define DMA_INT_STREAM6_MASK (DMA_STREAM_MASK << DMA_INT_STREAM6_SHIFT) +#define DMA_INT_STREAM7_SHIFT (22) /* Bits 22-27: DMA Stream 7 interrupt */ +#define DMA_INT_STREAM7_MASK (DMA_STREAM_MASK << DMA_INT_STREAM7_SHIFT) + +/* DMA stream configuration register */ + +#define DMA_SCR_EN (1 << 0) /* Bit 0: Stream enable */ +#define DMA_SCR_DMEIE (1 << 1) /* Bit 1: Direct mode error interrupt enable */ +#define DMA_SCR_TEIE (1 << 2) /* Bit 2: Transfer error interrupt enable */ +#define DMA_SCR_HTIE (1 << 3) /* Bit 3: Half Transfer interrupt enable */ +#define DMA_SCR_TCIE (1 << 4) /* Bit 4: Transfer complete interrupt enable */ +#define DMA_SCR_PFCTRL (1 << 5) /* Bit 5: Peripheral flow controller */ +#define DMA_SCR_DIR_SHIFT (6) /* Bits 6-7: Data transfer direction */ +#define DMA_SCR_DIR_MASK (3 << DMA_SCR_DIR_SHIFT) +# define DMA_SCR_DIR_P2M (0 << DMA_SCR_DIR_SHIFT) /* 00: Peripheral-to-memory */ +# define DMA_SCR_DIR_M2P (1 << DMA_SCR_DIR_SHIFT) /* 01: Memory-to-peripheral */ +# define DMA_SCR_DIR_M2M (2 << DMA_SCR_DIR_SHIFT) /* 10: Memory-to-memory */ +#define DMA_SCR_CIRC (1 << 8) /* Bit 8: Circular mode */ +#define DMA_SCR_PINC (1 << 9) /* Bit 9: Peripheral increment mode */ +#define DMA_SCR_MINC (1 << 10) /* Bit 10: Memory increment mode */ +#define DMA_SCR_PSIZE_SHIFT (11) /* Bits 11-12: Peripheral size */ +#define DMA_SCR_PSIZE_MASK (3 << DMA_SCR_PSIZE_SHIFT) +# define DMA_SCR_PSIZE_8BITS (0 << DMA_SCR_PSIZE_SHIFT) /* 00: 8-bits */ +# define DMA_SCR_PSIZE_16BITS (1 << DMA_SCR_PSIZE_SHIFT) /* 01: 16-bits */ +# define DMA_SCR_PSIZE_32BITS (2 << DMA_SCR_PSIZE_SHIFT) /* 10: 32-bits */ +#define DMA_SCR_MSIZE_SHIFT (13) /* Bits 13-14: Memory size */ +#define DMA_SCR_MSIZE_MASK (3 << DMA_SCR_MSIZE_SHIFT) +# define DMA_SCR_MSIZE_8BITS (0 << DMA_SCR_MSIZE_SHIFT) /* 00: 8-bits */ +# define DMA_SCR_MSIZE_16BITS (1 << DMA_SCR_MSIZE_SHIFT) /* 01: 16-bits */ +# define DMA_SCR_MSIZE_32BITS (2 << DMA_SCR_MSIZE_SHIFT) /* 10: 32-bits */ +#define DMA_SCR_PINCOS (1 << 15) /* Bit 15: Peripheral increment offset size */ +#define DMA_SCR_PL_SHIFT (16) /* Bits 16-17: Stream Priority level */ +#define DMA_SCR_PL_MASK (3 << DMA_SCR_PL_SHIFT) +# define DMA_SCR_PRILO (0 << DMA_SCR_PL_SHIFT) /* 00: Low */ +# define DMA_SCR_PRIMED (1 << DMA_SCR_PL_SHIFT) /* 01: Medium */ +# define DMA_SCR_PRIHI (2 << DMA_SCR_PL_SHIFT) /* 10: High */ +# define DMA_SCR_PRIVERYHI (3 << DMA_SCR_PL_SHIFT) /* 11: Very high */ +#define DMA_SCR_DBM (1 << 18) /* Bit 15: Double buffer mode */ +#define DMA_SCR_CT (1 << 19) /* Bit 19: Current target */ +#define DMA_SCR_PBURST_SHIFT (21) /* Bits 21-22: Peripheral burst transfer configuration */ +#define DMA_SCR_PBURST_MASK (3 << DMA_SCR_PBURST_SHIFT) +# define DMA_SCR_PBURST_SINGLE (0 << DMA_SCR_PBURST_SHIFT) /* 00: Single transfer */ +# define DMA_SCR_PBURST_INCR4 (1 << DMA_SCR_PBURST_SHIFT) /* 01: Incremental burst of 4 beats */ +# define DMA_SCR_PBURST_INCR8 (2 << DMA_SCR_PBURST_SHIFT) /* 10: Incremental burst of 8 beats */ +# define DMA_SCR_PBURST_INCR16 (3 << DMA_SCR_PBURST_SHIFT) /* 11: Incremental burst of 16 beats */ +#define DMA_SCR_MBURST_SHIFT (23) /* Bits 23-24: Memory burst transfer configuration */ +#define DMA_SCR_MBURST_MASK (3 << DMA_SCR_MBURST_SHIFT) +# define DMA_SCR_MBURST_SINGLE (0 << DMA_SCR_MBURST_SHIFT) /* 00: Single transfer */ +# define DMA_SCR_MBURST_INCR4 (1 << DMA_SCR_MBURST_SHIFT) /* 01: Incremental burst of 4 beats */ +# define DMA_SCR_MBURST_INCR8 (2 << DMA_SCR_MBURST_SHIFT) /* 10: Incremental burst of 8 beats */ +# define DMA_SCR_MBURST_INCR16 (3 << DMA_SCR_MBURST_SHIFT) /* 11: Incremental burst of 16 beats */ +#define DMA_SCR_CHSEL_SHIFT (25) /* Bits 25-28: Channel selection */ +#define DMA_SCR_CHSEL_MASK (0xf << DMA_SCR_CHSEL_SHIFT) +# define DMA_SCR_CHSEL(n) ((n) << DMA_SCR_CHSEL_SHIFT) + +#define DMA_SCR_ALLINTS (DMA_SCR_DMEIE|DMA_SCR_TEIE|DMA_SCR_HTIE|DMA_SCR_TCIE) + +/* DMA stream number of data register */ + +#define DMA_SNDTR_NDT_SHIFT (0) /* Bits 15-0: Number of data to Transfer */ +#define DMA_SNDTR_NDT_MASK (0xffff << DMA_SNDTR_NDT_SHIFT) + +/* DMA stream n FIFO control register */ + +#define DMA_SFCR_FTH_SHIFT (0) /* Bits 0-1: FIFO threshold selection */ +#define DMA_SFCR_FTH_MASK (3 << DMA_SFCR_FTH_SHIFT) +# define DMA_SFCR_FTH_QUARTER (0 << DMA_SFCR_FTH_SHIFT) /* 1/4 full FIFO */ +# define DMA_SFCR_FTH_HALF (1 << DMA_SFCR_FTH_SHIFT) /* 1/2 full FIFO */ +# define DMA_SFCR_FTH_3QUARTER (2 << DMA_SFCR_FTH_SHIFT) /* 3/4 full FIFO */ +# define DMA_SFCR_FTH_FULL (3 << DMA_SFCR_FTH_SHIFT) /* full FIFO */ +#define DMA_SFCR_DMDIS (1 << 2) /* Bit 2: Direct mode disable */ +#define DMA_SFCR_FS_SHIFT (3) /* Bits 3-5: FIFO status */ +#define DMA_SFCR_FS_MASK (7 << DMA_SFCR_FS_SHIFT) +# define DMA_SFCR_FS_QUARTER (0 << DMA_SFCR_FS_SHIFT) /* 0 < fifo_level < 1/4 */ +# define DMA_SFCR_FS_HALF (1 << DMA_SFCR_FS_SHIFT) /* 1/4 = fifo_level < 1/2 */ +# define DMA_SFCR_FS_3QUARTER (2 << DMA_SFCR_FS_SHIFT) /* 1/2 = fifo_level < 3/4 */ +# define DMA_SFCR_FS_ALMOSTFULL (3 << DMA_SFCR_FS_SHIFT) /* 3/4 = fifo_level < full */ +# define DMA_SFCR_FS_EMPTY (4 << DMA_SFCR_FS_SHIFT) /* FIFO is empty */ +# define DMA_SFCR_FS_FULL (5 << DMA_SFCR_FS_SHIFT) /* FIFO is full */ + /* Bit 6: Reserved */ +#define DMA_SFCR_FEIE (1 << 7) /* Bit 7: FIFO error interrupt enable */ + /* Bits 8-31: Reserved */ + +/* DMA Stream mapping. Each DMA stream has a mapping to several possible + * sources/sinks of data. The requests from peripherals assigned to a stream + * are simply OR'ed together before entering the DMA block. This means that only + * one request on a given stream can be enabled at once. + * + * Alternative stream selections are provided with a numeric suffix like _1, _2, etc. + * The DMA driver, however, will use the pin selection without the numeric suffix. + * Additional definitions are required in the board.h file. For example, if + * SPI3_RX connects via DMA STREAM0, then following should be application-specific + * mapping should be used: + * + * #define DMAMAP_SPI3_RX DMAMAP_SPI3_RX_1 + */ + +#define STM32_DMA_MAP(d,s,c) ((d) << 7 | (s) << 4 | (c)) +#define STM32_DMA_CONTROLLER(m) (((m) >> 7) & 1) +#define STM32_DMA_STREAM(m) (((m) >> 4) & 7) +#define STM32_DMA_CHANNEL(m) ((m) & 0xf) + +#define DMAMAP_SPI3_RX_1 STM32_DMA_MAP(DMA1,DMA_STREAM0,DMA_CHAN0) +#define DMAMAP_SPDIFRX_DT STM32_DMA_MAP(DMA1,DMA_STREAM1,DMA_CHAN0) +#define DMAMAP_SPI3_RX_2 STM32_DMA_MAP(DMA1,DMA_STREAM2,DMA_CHAN0) +#define DMAMAP_SPI2_RX STM32_DMA_MAP(DMA1,DMA_STREAM3,DMA_CHAN0) +#define DMAMAP_SPI2_TX STM32_DMA_MAP(DMA1,DMA_STREAM4,DMA_CHAN0) +#define DMAMAP_SPI3_TX_1 STM32_DMA_MAP(DMA1,DMA_STREAM5,DMA_CHAN0) +#define DMAMAP_SPDIFRX_CS STM32_DMA_MAP(DMA1,DMA_STREAM6,DMA_CHAN0) +#define DMAMAP_SPI3_TX_2 STM32_DMA_MAP(DMA1,DMA_STREAM7,DMA_CHAN0) + +#define DMAMAP_I2C1_RX STM32_DMA_MAP(DMA1,DMA_STREAM0,DMA_CHAN1) +#define DMAMAP_I2C3_RX STM32_DMA_MAP(DMA1,DMA_STREAM1,DMA_CHAN1) +#define DMAMAP_TIM7_UP_1 STM32_DMA_MAP(DMA1,DMA_STREAM2,DMA_CHAN1) +#define DMAMAP_TIM7_UP_2 STM32_DMA_MAP(DMA1,DMA_STREAM4,DMA_CHAN1) +#define DMAMAP_I2C1_RX_1 STM32_DMA_MAP(DMA1,DMA_STREAM5,DMA_CHAN1) +#define DMAMAP_I2C1_TX STM32_DMA_MAP(DMA1,DMA_STREAM6,DMA_CHAN1) +#define DMAMAP_I2C1_TX_1 STM32_DMA_MAP(DMA1,DMA_STREAM7,DMA_CHAN1) + +#define DMAMAP_TIM4_CH1 STM32_DMA_MAP(DMA1,DMA_STREAM0,DMA_CHAN2) +#define DMAMAP_I2C4_RX STM32_DMA_MAP(DMA1,DMA_STREAM2,DMA_CHAN2) +#define DMAMAP_TIM4_CH2 STM32_DMA_MAP(DMA1,DMA_STREAM3,DMA_CHAN2) +#define DMAMAP_I2C4_TX STM32_DMA_MAP(DMA1,DMA_STREAM5,DMA_CHAN2) +#define DMAMAP_TIM4_UP STM32_DMA_MAP(DMA1,DMA_STREAM6,DMA_CHAN2) +#define DMAMAP_TIM4_CH3 STM32_DMA_MAP(DMA1,DMA_STREAM7,DMA_CHAN2) + +#define DMAMAP_TIM2_UP_1 STM32_DMA_MAP(DMA1,DMA_STREAM1,DMA_CHAN3) +#define DMAMAP_TIM2_CH3 STM32_DMA_MAP(DMA1,DMA_STREAM1,DMA_CHAN3) +#define DMAMAP_I2C3_RX_1 STM32_DMA_MAP(DMA1,DMA_STREAM2,DMA_CHAN3) +#define DMAMAP_I2C3_TX STM32_DMA_MAP(DMA1,DMA_STREAM4,DMA_CHAN3) +#define DMAMAP_TIM2_CH1 STM32_DMA_MAP(DMA1,DMA_STREAM5,DMA_CHAN3) +#define DMAMAP_TIM2_CH2 STM32_DMA_MAP(DMA1,DMA_STREAM6,DMA_CHAN3) +#define DMAMAP_TIM2_CH4_1 STM32_DMA_MAP(DMA1,DMA_STREAM6,DMA_CHAN3) +#define DMAMAP_TIM2_UP_2 STM32_DMA_MAP(DMA1,DMA_STREAM7,DMA_CHAN3) +#define DMAMAP_TIM2_CH4_2 STM32_DMA_MAP(DMA1,DMA_STREAM7,DMA_CHAN3) + +#define DMAMAP_UART5_RX STM32_DMA_MAP(DMA1,DMA_STREAM0,DMA_CHAN4) +#define DMAMAP_USART3_RX STM32_DMA_MAP(DMA1,DMA_STREAM1,DMA_CHAN4) +#define DMAMAP_UART4_RX STM32_DMA_MAP(DMA1,DMA_STREAM2,DMA_CHAN4) +#define DMAMAP_USART3_TX_1 STM32_DMA_MAP(DMA1,DMA_STREAM3,DMA_CHAN4) +#define DMAMAP_UART4_TX STM32_DMA_MAP(DMA1,DMA_STREAM4,DMA_CHAN4) +#define DMAMAP_USART2_RX STM32_DMA_MAP(DMA1,DMA_STREAM5,DMA_CHAN4) +#define DMAMAP_USART2_TX STM32_DMA_MAP(DMA1,DMA_STREAM6,DMA_CHAN4) +#define DMAMAP_UART5_TX STM32_DMA_MAP(DMA1,DMA_STREAM7,DMA_CHAN4) + +#define DMAMAP_UART8_TX STM32_DMA_MAP(DMA1,DMA_STREAM0,DMA_CHAN5) +#define DMAMAP_UART7_TX STM32_DMA_MAP(DMA1,DMA_STREAM1,DMA_CHAN5) +#define DMAMAP_TIM3_CH4 STM32_DMA_MAP(DMA1,DMA_STREAM2,DMA_CHAN5) +#define DMAMAP_TIM3_UP STM32_DMA_MAP(DMA1,DMA_STREAM2,DMA_CHAN5) +#define DMAMAP_UART7_RX STM32_DMA_MAP(DMA1,DMA_STREAM3,DMA_CHAN5) +#define DMAMAP_TIM3_CH1 STM32_DMA_MAP(DMA1,DMA_STREAM4,DMA_CHAN5) +#define DMAMAP_TIM3_TRIG STM32_DMA_MAP(DMA1,DMA_STREAM4,DMA_CHAN5) +#define DMAMAP_TIM3_CH2 STM32_DMA_MAP(DMA1,DMA_STREAM5,DMA_CHAN5) +#define DMAMAP_UART8_RX STM32_DMA_MAP(DMA1,DMA_STREAM6,DMA_CHAN5) +#define DMAMAP_TIM3_CH3 STM32_DMA_MAP(DMA1,DMA_STREAM7,DMA_CHAN5) + +#define DMAMAP_TIM5_CH3 STM32_DMA_MAP(DMA1,DMA_STREAM0,DMA_CHAN6) +#define DMAMAP_TIM5_UP_1 STM32_DMA_MAP(DMA1,DMA_STREAM0,DMA_CHAN6) +#define DMAMAP_TIM5_CH4_1 STM32_DMA_MAP(DMA1,DMA_STREAM1,DMA_CHAN6) +#define DMAMAP_TIM5_TRIG_1 STM32_DMA_MAP(DMA1,DMA_STREAM1,DMA_CHAN6) +#define DMAMAP_TIM5_CH1 STM32_DMA_MAP(DMA1,DMA_STREAM2,DMA_CHAN6) +#define DMAMAP_TIM5_CH4_2 STM32_DMA_MAP(DMA1,DMA_STREAM3,DMA_CHAN6) +#define DMAMAP_TIM5_TRIG_2 STM32_DMA_MAP(DMA1,DMA_STREAM3,DMA_CHAN6) +#define DMAMAP_TIM5_CH2 STM32_DMA_MAP(DMA1,DMA_STREAM4,DMA_CHAN6) +#define DMAMAP_TIM5_UP_2 STM32_DMA_MAP(DMA1,DMA_STREAM6,DMA_CHAN6) + +#define DMAMAP_TIM6_UP STM32_DMA_MAP(DMA1,DMA_STREAM1,DMA_CHAN7) +#define DMAMAP_I2C2_RX STM32_DMA_MAP(DMA1,DMA_STREAM2,DMA_CHAN7) +#define DMAMAP_I2C2_RX_1 STM32_DMA_MAP(DMA1,DMA_STREAM3,DMA_CHAN7) +#define DMAMAP_USART3_TX_2 STM32_DMA_MAP(DMA1,DMA_STREAM4,DMA_CHAN7) +#define DMAMAP_DAC1 STM32_DMA_MAP(DMA1,DMA_STREAM5,DMA_CHAN7) +#define DMAMAP_DAC2 STM32_DMA_MAP(DMA1,DMA_STREAM6,DMA_CHAN7) +#define DMAMAP_I2C2_TX STM32_DMA_MAP(DMA1,DMA_STREAM7,DMA_CHAN7) + +#define DMAMAP_I2C3_TX_1 STM32_DMA_MAP(DMA1,DMA_STREAM0,DMA_CHAN8) +#define DMAMAP_I2C4_RX_1 STM32_DMA_MAP(DMA1,DMA_STREAM1,DMA_CHAN8) +#define DMAMAP_I2C2_TX_1 STM32_DMA_MAP(DMA1,DMA_STREAM4,DMA_CHAN8) +#define DMAMAP_I2C4_TX_1 STM32_DMA_MAP(DMA1,DMA_STREAM6,DMA_CHAN8) + +#define DMAMAP_SPI2_RX_1 STM32_DMA_MAP(DMA1,DMA_STREAM1,DMA_CHAN9) +#define DMAMAP_SPI2_TX_1 STM32_DMA_MAP(DMA1,DMA_STREAM6,DMA_CHAN9) + +#define DMAMAP_ADC1_1 STM32_DMA_MAP(DMA2,DMA_STREAM0,DMA_CHAN0) +#define DMAMAP_SAI1_A_1 STM32_DMA_MAP(DMA2,DMA_STREAM1,DMA_CHAN0) +#define DMAMAP_TIM8_CH1_1 STM32_DMA_MAP(DMA2,DMA_STREAM2,DMA_CHAN0) +#define DMAMAP_TIM8_CH2_1 STM32_DMA_MAP(DMA2,DMA_STREAM2,DMA_CHAN0) +#define DMAMAP_TIM8_CH3_1 STM32_DMA_MAP(DMA2,DMA_STREAM2,DMA_CHAN0) +#define DMAMAP_SAI1_A_2 STM32_DMA_MAP(DMA2,DMA_STREAM3,DMA_CHAN0) +#define DMAMAP_ADC1_2 STM32_DMA_MAP(DMA2,DMA_STREAM4,DMA_CHAN0) +#define DMAMAP_SAI1_B_1 STM32_DMA_MAP(DMA2,DMA_STREAM5,DMA_CHAN0) +#define DMAMAP_TIM1_CH1_1 STM32_DMA_MAP(DMA2,DMA_STREAM6,DMA_CHAN0) +#define DMAMAP_TIM1_CH2_1 STM32_DMA_MAP(DMA2,DMA_STREAM6,DMA_CHAN0) +#define DMAMAP_TIM1_CH3_1 STM32_DMA_MAP(DMA2,DMA_STREAM6,DMA_CHAN0) +#define DMAMAP_SAI1_B_2 STM32_DMA_MAP(DMA2,DMA_STREAM7,DMA_CHAN0) + +#define DMAMAP_DCMI_1 STM32_DMA_MAP(DMA2,DMA_STREAM1,DMA_CHAN1) +#define DMAMAP_ADC2_1 STM32_DMA_MAP(DMA2,DMA_STREAM2,DMA_CHAN1) +#define DMAMAP_ADC2_2 STM32_DMA_MAP(DMA2,DMA_STREAM3,DMA_CHAN1) +#define DMAMAP_SAI1_B STM32_DMA_MAP(DMA2,DMA_STREAM4,DMA_CHAN1) +#define DMAMAP_SPI6_TX STM32_DMA_MAP(DMA2,DMA_STREAM5,DMA_CHAN1) +#define DMAMAP_SPI6_RX STM32_DMA_MAP(DMA2,DMA_STREAM6,DMA_CHAN1) +#define DMAMAP_DCMI_2 STM32_DMA_MAP(DMA2,DMA_STREAM7,DMA_CHAN1) + +#define DMAMAP_ADC3_1 STM32_DMA_MAP(DMA2,DMA_STREAM0,DMA_CHAN2) +#define DMAMAP_ADC3_2 STM32_DMA_MAP(DMA2,DMA_STREAM1,DMA_CHAN2) +#define DMAMAP_SPI5_RX_1 STM32_DMA_MAP(DMA2,DMA_STREAM3,DMA_CHAN2) +#define DMAMAP_SPI5_TX_1 STM32_DMA_MAP(DMA2,DMA_STREAM4,DMA_CHAN2) +#define DMAMAP_CRYP_OUT STM32_DMA_MAP(DMA2,DMA_STREAM5,DMA_CHAN2) +#define DMAMAP_CRYP_IN STM32_DMA_MAP(DMA2,DMA_STREAM6,DMA_CHAN2) +#define DMAMAP_HASH_IN STM32_DMA_MAP(DMA2,DMA_STREAM7,DMA_CHAN2) + +#define DMAMAP_SPI1_RX_1 STM32_DMA_MAP(DMA2,DMA_STREAM0,DMA_CHAN3) +#define DMAMAP_SPI1_RX_2 STM32_DMA_MAP(DMA2,DMA_STREAM2,DMA_CHAN3) +#define DMAMAP_SPI1_TX_1 STM32_DMA_MAP(DMA2,DMA_STREAM3,DMA_CHAN3) +#define DMAMAP_SAI2_A STM32_DMA_MAP(DMA2,DMA_STREAM4,DMA_CHAN3) +#define DMAMAP_SPI1_TX_2 STM32_DMA_MAP(DMA2,DMA_STREAM5,DMA_CHAN3) +#define DMAMAP_SAI2_B STM32_DMA_MAP(DMA2,DMA_STREAM6,DMA_CHAN3) +#define DMAMAP_QUADSPI STM32_DMA_MAP(DMA2,DMA_STREAM7,DMA_CHAN3) + +#define DMAMAP_SPI4_RX_1 STM32_DMA_MAP(DMA2,DMA_STREAM0,DMA_CHAN4) +#define DMAMAP_SPI4_TX_1 STM32_DMA_MAP(DMA2,DMA_STREAM1,DMA_CHAN4) +#define DMAMAP_USART1_RX_1 STM32_DMA_MAP(DMA2,DMA_STREAM2,DMA_CHAN4) +#define DMAMAP_SDMMC1_1 STM32_DMA_MAP(DMA2,DMA_STREAM3,DMA_CHAN4) +#define DMAMAP_USART1_RX_2 STM32_DMA_MAP(DMA2,DMA_STREAM5,DMA_CHAN4) +#define DMAMAP_SDMMC1_2 STM32_DMA_MAP(DMA2,DMA_STREAM6,DMA_CHAN4) +#define DMAMAP_USART1_TX STM32_DMA_MAP(DMA2,DMA_STREAM7,DMA_CHAN4) + +#define DMAMAP_USART6_RX_1 STM32_DMA_MAP(DMA2,DMA_STREAM1,DMA_CHAN5) +#define DMAMAP_USART6_RX_2 STM32_DMA_MAP(DMA2,DMA_STREAM2,DMA_CHAN5) +#define DMAMAP_SPI4_RX_2 STM32_DMA_MAP(DMA2,DMA_STREAM3,DMA_CHAN5) +#define DMAMAP_SPI4_TX_2 STM32_DMA_MAP(DMA2,DMA_STREAM4,DMA_CHAN5) +#define DMAMAP_USART6_TX_1 STM32_DMA_MAP(DMA2,DMA_STREAM6,DMA_CHAN5) +#define DMAMAP_USART6_TX_2 STM32_DMA_MAP(DMA2,DMA_STREAM7,DMA_CHAN5) + +#define DMAMAP_TIM1_TRIG_1 STM32_DMA_MAP(DMA2,DMA_STREAM0,DMA_CHAN6) +#define DMAMAP_TIM1_CH1_2 STM32_DMA_MAP(DMA2,DMA_STREAM1,DMA_CHAN6) +#define DMAMAP_TIM1_CH2_2 STM32_DMA_MAP(DMA2,DMA_STREAM2,DMA_CHAN6) +#define DMAMAP_TIM1_CH1 STM32_DMA_MAP(DMA2,DMA_STREAM3,DMA_CHAN6) +#define DMAMAP_TIM1_CH4 STM32_DMA_MAP(DMA2,DMA_STREAM4,DMA_CHAN6) +#define DMAMAP_TIM1_TRIG_2 STM32_DMA_MAP(DMA2,DMA_STREAM4,DMA_CHAN6) +#define DMAMAP_TIM1_COM STM32_DMA_MAP(DMA2,DMA_STREAM4,DMA_CHAN6) +#define DMAMAP_TIM1_UP STM32_DMA_MAP(DMA2,DMA_STREAM5,DMA_CHAN6) +#define DMAMAP_TIM1_CH3_2 STM32_DMA_MAP(DMA2,DMA_STREAM6,DMA_CHAN6) + +#define DMAMAP_TIM8_UP STM32_DMA_MAP(DMA2,DMA_STREAM1,DMA_CHAN7) +#define DMAMAP_TIM8_CH1_2 STM32_DMA_MAP(DMA2,DMA_STREAM2,DMA_CHAN7) +#define DMAMAP_TIM8_CH2_2 STM32_DMA_MAP(DMA2,DMA_STREAM3,DMA_CHAN7) +#define DMAMAP_TIM8_CH3_2 STM32_DMA_MAP(DMA2,DMA_STREAM4,DMA_CHAN7) +#define DMAMAP_SPI5_RX_2 STM32_DMA_MAP(DMA2,DMA_STREAM5,DMA_CHAN7) +#define DMAMAP_SPI5_TX_2 STM32_DMA_MAP(DMA2,DMA_STREAM6,DMA_CHAN7) +#define DMAMAP_TIM8_CH4 STM32_DMA_MAP(DMA2,DMA_STREAM7,DMA_CHAN7) +#define DMAMAP_TIM8_TRIG STM32_DMA_MAP(DMA2,DMA_STREAM7,DMA_CHAN7) +#define DMAMAP_TIM8_COM STM32_DMA_MAP(DMA2,DMA_STREAM7,DMA_CHAN7) + +#define DMAMAP_DFSDM1_FLT0_1 STM32_DMA_MAP(DMA2,DMA_STREAM0,DMA_CHAN8) +#define DMAMAP_DFSDM1_FLT1_1 STM32_DMA_MAP(DMA2,DMA_STREAM1,DMA_CHAN8) +#define DMAMAP_DFSDM1_FLT2_1 STM32_DMA_MAP(DMA2,DMA_STREAM2,DMA_CHAN8) +#define DMAMAP_DFSDM1_FLT3_1 STM32_DMA_MAP(DMA2,DMA_STREAM3,DMA_CHAN8) +#define DMAMAP_DFSDM1_FLT0_2 STM32_DMA_MAP(DMA2,DMA_STREAM4,DMA_CHAN8) +#define DMAMAP_DFSDM1_FLT1_2 STM32_DMA_MAP(DMA2,DMA_STREAM5,DMA_CHAN8) +#define DMAMAP_DFSDM1_FLT2_2 STM32_DMA_MAP(DMA2,DMA_STREAM6,DMA_CHAN8) +#define DMAMAP_DFSDM1_FLT3_2 STM32_DMA_MAP(DMA2,DMA_STREAM7,DMA_CHAN8) + +#define DMAMAP_JPEG_IN_1 STM32_DMA_MAP(DMA2,DMA_STREAM0,DMA_CHAN9) +#define DMAMAP_JPEG_OUT_ STM32_DMA_MAP(DMA2,DMA_STREAM1,DMA_CHAN9) +#define DMAMAP_SPI4_TX_3 STM32_DMA_MAP(DMA2,DMA_STREAM2,DMA_CHAN9) +#define DMAMAP_JPEG_IN_2 STM32_DMA_MAP(DMA2,DMA_STREAM3,DMA_CHAN9) +#define DMAMAP_JPEG_OUT_2 STM32_DMA_MAP(DMA2,DMA_STREAM4,DMA_CHAN9) +#define DMAMAP_SPI5_RX_3 STM32_DMA_MAP(DMA2,DMA_STREAM5,DMA_CHAN9) + +#define DMAMAP_SAI1_B_3 STM32_DMA_MAP(DMA2,DMA_STREAM0,DMA_CHAN10) +#define DMAMAP_SAI2_B_1 STM32_DMA_MAP(DMA2,DMA_STREAM1,DMA_CHAN10) +#define DMAMAP_SAI2_A_1 STM32_DMA_MAP(DMA2,DMA_STREAM2,DMA_CHAN10) +#define DMAMAP_SAI1_A_3 STM32_DMA_MAP(DMA2,DMA_STREAM6,DMA_CHAN10) + +#define DMAMAP_SDMMC2_1 STM32_DMA_MAP(DMA2,DMA_STREAM0,DMA_CHAN11) +#define DMAMAP_QUADSPI_1 STM32_DMA_MAP(DMA2,DMA_STREAM2,DMA_CHAN11) +#define DMAMAP_SDMMC2_2 STM32_DMA_MAP(DMA2,DMA_STREAM5,DMA_CHAN11) + +#endif /* CONFIG_STM32F7_STM32F76XX || CONFIG_STM32F7_STM32F77XX */ +#endif /* __ARCH_ARM_SRC_STM32F7_CHIP_STM32F76XXX77XX_DMA_H */ diff --git a/arch/arm/src/stm32f7/chip/stm32f76xx77xx_flash.h b/arch/arm/src/stm32f7/chip/stm32f76xx77xx_flash.h new file mode 100644 index 0000000000000000000000000000000000000000..0b6f764c365c440ae099a874135329cef329411a --- /dev/null +++ b/arch/arm/src/stm32f7/chip/stm32f76xx77xx_flash.h @@ -0,0 +1,219 @@ +/************************************************************************************ + * arch/arm/src/stm32f7/chip/stm32f74xx75xx_flash.h + * + * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Authors: 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. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM327_CHIP_STM32F74XX75XX_FLASH_H +#define __ARCH_ARM_SRC_STM327_CHIP_STM32F74XX75XX_FLASH_H + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Flash size is known from the chip selection: + * + * When CONFIG_STM32F7_FLASH_OVERRIDE_DEFAULT is set the + * CONFIG_STM32F7_FLASH_CONFIG_x selects the default FLASH size based on the chip + * part number. This value can be overridden with CONFIG_STM32F7_FLASH_OVERRIDE_x + * + * Parts STM32F74xxE have 512Kb of FLASH + * Parts STM32F74xxG have 1024Kb of FLASH + * + * N.B. Only Single bank mode is supported + */ + +#define _K(x) ((x)*1024) + +#if !defined(CONFIG_STM32F7_FLASH_OVERRIDE_DEFAULT) && \ + !defined(CONFIG_STM32_FLASH_OVERRIDE_E) && \ + !defined(CONFIG_STM32_FLASH_OVERRIDE_F) && \ + !defined(CONFIG_STM32_FLASH_OVERRIDE_G) && \ + !defined(CONFIG_STM32_FLASH_OVERRIDE_I) && \ + !defined(CONFIG_STM32_FLASH_CONFIG_E) && \ + !defined(CONFIG_STM32_FLASH_CONFIG_F) && \ + !defined(CONFIG_STM32_FLASH_CONFIG_G) && \ + !defined(CONFIG_STM32_FLASH_CONFIG_I) +# define CONFIG_STM32_FLASH_OVERRIDE_E +# warning "Flash size not defined defaulting to 512KiB (E)" +#endif + +#if !defined(CONFIG_STM32F7_FLASH_OVERRIDE_DEFAULT) + +# undef CONFIG_STM32F7_FLASH_CONFIG_E +# undef CONFIG_STM32F7_FLASH_CONFIG_G +# undef CONFIG_STM32F7_FLASH_CONFIG_I + +# if defined(CONFIG_STM32F7_FLASH_OVERRIDE_E) + +# define CONFIG_STM32F7_FLASH_CONFIG_E + +# elif defined(CONFIG_STM32F7_FLASH_OVERRIDE_G) + +# define CONFIG_STM32F7_FLASH_CONFIG_G + +# elif defined(CONFIG_STM32F7_FLASH_OVERRIDE_I) + +# define CONFIG_STM32F7_FLASH_CONFIG_I + +# endif +#endif + +#if defined(CONFIG_STM32_FLASH_CONFIG_E) + +# define STM32_FLASH_NPAGES 6 +# define STM32_FLASH_SIZE _K((4 * 32) + (1 * 128) + (1 * 256)) +# define STM32_FLASH_SIZES {_K(32), _K(32), _K(32), _K(32), \ + _K(128), _K(256)} + +#elif defined(CONFIG_STM32_FLASH_CONFIG_G) + +# define STM32_FLASH_NPAGES 8 +# define STM32_FLASH_SIZE _K((4 * 32) + (1 * 128) + (3 * 256)) +# define STM32_FLASH_SIZES {_K(32), _K(32), _K(32), _K(32), \ + _K(128), _K(256), _K(256), _K(256)} + +#elif defined(CONFIG_STM32_FLASH_CONFIG_I) + +# define STM32_FLASH_NPAGES 12 +# define STM32_FLASH_SIZE _K((4 * 32) + (1 * 128) + (7 * 256)) +# define STM32_FLASH_SIZES {_K(32), _K(32), _K(32), _K(32), \ + _K(128), _K(256), _K(256), _K(256) \ + _K(256), _K(256), _K(256), _K(256)} +#endif + +/* Register Offsets *****************************************************************/ + +#define STM32_FLASH_ACR_OFFSET 0x0000 +#define STM32_FLASH_KEYR_OFFSET 0x0004 +#define STM32_FLASH_OPTKEYR_OFFSET 0x0008 +#define STM32_FLASH_SR_OFFSET 0x000c +#define STM32_FLASH_CR_OFFSET 0x0010 +#define STM32_FLASH_OPTCR_OFFSET 0x0014 +#define STM32_FLASH_OPTCR1_OFFSET 0x0018 + +/* Register Addresses ***************************************************************/ + +#define STM32_FLASH_ACR (STM32_FLASHIF_BASE+STM32_FLASH_ACR_OFFSET) +#define STM32_FLASH_KEYR (STM32_FLASHIF_BASE+STM32_FLASH_KEYR_OFFSET) +#define STM32_FLASH_OPTKEYR (STM32_FLASHIF_BASE+STM32_FLASH_OPTKEYR_OFFSET) +#define STM32_FLASH_SR (STM32_FLASHIF_BASE+STM32_FLASH_SR_OFFSET) +#define STM32_FLASH_CR (STM32_FLASHIF_BASE+STM32_FLASH_CR_OFFSET) +#define STM32_FLASH_OPTCR (STM32_FLASHIF_BASE+STM32_FLASH_OPTCR_OFFSET) +#define STM32_FLASH_OPTCR1 (STM32_FLASHIF_BASE+STM32_FLASH_OPTCR1_OFFSET) + +/* Register Bitfield Definitions ****************************************************/ +/* Flash Access Control Register (ACR) */ + +#define FLASH_ACR_LATENCY_SHIFT (0) /* Bits 0-1: Latency */ +#define FLASH_ACR_LATENCY_MASK (7 << FLASH_ACR_LATENCY_SHIFT) +# define FLASH_ACR_LATENCY(n) ((n) << FLASH_ACR_LATENCY_SHIFT) /* n wait states */ +# define FLASH_ACR_LATENCY_0 (0 << FLASH_ACR_LATENCY_SHIFT) /* 000: Zero wait states */ +# define FLASH_ACR_LATENCY_1 (1 << FLASH_ACR_LATENCY_SHIFT) /* 001: One wait state */ +# define FLASH_ACR_LATENCY_2 (2 << FLASH_ACR_LATENCY_SHIFT) /* 010: Two wait states */ +# define FLASH_ACR_LATENCY_3 (3 << FLASH_ACR_LATENCY_SHIFT) /* 011: Three wait states */ +# define FLASH_ACR_LATENCY_4 (4 << FLASH_ACR_LATENCY_SHIFT) /* 100: Four wait states */ +# define FLASH_ACR_LATENCY_5 (5 << FLASH_ACR_LATENCY_SHIFT) /* 101: Five wait states */ +# define FLASH_ACR_LATENCY_6 (6 << FLASH_ACR_LATENCY_SHIFT) /* 110: Six wait states */ +# define FLASH_ACR_LATENCY_7 (7 << FLASH_ACR_LATENCY_SHIFT) /* 111: Seven wait states */ +#define FLASH_ACR_PRFTEN (1 << 8) /* FLASH prefetch enable */ +#define FLASH_ACR_ARTEN (1 << 9) /* Bit 9: ART Accelerator Enable */ +#define FLASH_ACR_ARTRST (1 << 11) /* Bit 11: ART Accelerator reset */ + +/* Flash Status Register (SR) */ + +#define FLASH_SR_EOP (1 << 0) /* Bit 0: End of operation */ +#define FLASH_SR_OPERR (1 << 1) /* Bit 1: Operation error */ +#define FLASH_SR_WRPERR (1 << 4) /* Bit 4: Write protection error */ +#define FLASH_SR_PGAERR (1 << 5) /* Bit 5: Programming alignment error */ +#define FLASH_SR_PGPERR (1 << 6) /* Bit 6: Programming parallelism error */ +#define FLASH_SR_PGSERR (1 << 7) /* Bit 7: Programming sequence error */ +#define FLASH_SR_BSY (1 << 16) /* Bit 16: Busy */ + +/* Flash Control Register (CR) */ + +#define FLASH_CR_PG (1 << 0) /* Bit 0: Programming */ +#define FLASH_CR_SER (1 << 1) /* Bit 1: Sector Erase */ +#define FLASH_CR_MER_MER1 (1 << 2) /* Bit 2: Mass Erase sectors 0..11 */ +#define FLASH_CR_SNB_SHIFT (3) /* Bits 3-6: Sector number */ +#define FLASH_CR_SNB_MASK (0x1f << FLASH_CR_SNB_SHIFT) +# define FLASH_CR_SNB(n) ((uint32_t)((n) % 12) << FLASH_CR_SNB_SHIFT) | ((n / 12) << 7)) /* Sector n, n=0..23 */ +#define FLASH_CR_PSIZE_SHIFT (8) /* Bits 8-9: Program size */ +#define FLASH_CR_PSIZE_MASK (3 << FLASH_CR_PSIZE_SHIFT) +# define FLASH_CR_PSIZE_X8 (0 << FLASH_CR_PSIZE_SHIFT) /* Program x8 */ +# define FLASH_CR_PSIZE_X16 (1 << FLASH_CR_PSIZE_SHIFT) /* Program x16 */ +# define FLASH_CR_PSIZE_X32 (2 << FLASH_CR_PSIZE_SHIFT) /* Program x32 */ +# define FLASH_CR_PSIZE_X64 (3 << FLASH_CR_PSIZE_SHIFT) /* Program x64 */ +#define FLASH_CR_STRT (1 << 16) /* Bit 16: Start Erase */ +#define FLASH_CR_EOPIE (1 << 24) /* Bit 24: End of operation interrupt enable */ +#define FLASH_CR_ERRIE (1 << 25) /* Bit 25: Error interrupt enable */ +#define FLASH_CR_LOCK (1 << 31) /* Bit 31: Lock */ +#define FLASH_CR_MER2 (1 << 15) /* Bit 15: Mass Erase sectors 12..23 */ + +/* Flash Option Control Register (OPTCR) */ + +#define FLASH_OPTCR_OPTLOCK (1 << 0) /* Bit 0: Option lock */ +#define FLASH_OPTCR_OPTSTRT (1 << 1) /* Bit 1: Option start */ +#define FLASH_OPTCR_BORLEV_SHIFT (2) /* Bits 2-3: BOR reset Level */ +#define FLASH_OPTCR_BORLEV_MASK (3 << FLASH_OPTCR_BORLEV_SHIFT) +# define FLASH_OPTCR_VBOR3 (0 << FLASH_OPTCR_BORLEV_SHIFT) /* BOR Level 3 */ +# define FLASH_OPTCR_VBOR2 (1 << FLASH_OPTCR_BORLEV_SHIFT) /* BOR Level 2 */ +# define FLASH_OPTCR_VBOR1 (2 << FLASH_OPTCR_BORLEV_SHIFT) /* BOR Level 1 */ +# define FLASH_OPTCR_VBOR0 (3 << FLASH_OPTCR_BORLEV_SHIFT) /* BOR off */ +#define FLASH_OPTCR_USER_SHIFT (4) /* Bits 5-7: User option bytes */ +#define FLASH_OPTCR_USER_MASK (15 << FLASH_OPTCR_USER_SHIFT) +# define FLASH_OPTCR_WWDG_SW (1 << 4) /* Bit 4: WWDG_SW */ +# define FLASH_OPTCR_IWDG_SW (1 << 5) /* Bit 5: IWDG_SW */ +# define FLASH_OPTCR_NRST_STOP (1 << 6) /* Bit 6: nRST_STOP */ +# define FLASH_OPTCR_NRST_STDBY (1 << 7) /* Bit 7: nRST_STDBY */ +#define FLASH_OPTCR_RDP_SHIFT (8) /* Bits 8-15: Read protect */ +#define FLASH_OPTCR_RDP_MASK (0xff << FLASH_OPTCR_RDP_SHIFT) +# define FLASH_OPTCR_RDP(n) ((uint32_t)(n) << FLASH_OPTCR_RDP_SHIFT) +#define FLASH_OPTCR_NWRP_SHIFT (16) /* Bits 16-27: Not write protect */ +#define FLASH_OPTCR_NWRP_MASK (0xfff << FLASH_OPTCR_NWRP_SHIFT) +# define FLASH_OPTCR_NWRP(n) ((uint32_t)(n) << FLASH_OPTCR_NWRP_SHIFT) +#define FLASH_OPTCR_NDBANK (1 << 28) /* Bit 28: Not dual bank mode */ +#define FLASH_OPTCR_NDBOOT (1 << 29) /* Bit 29: Dual Boot mode */ +#define FLASH_OPTCR_IWDG_STDBY (1 << 30) /* Bit 30: IWDG freeze in stop mode */ +#define FLASH_OPTCR_IWDG_STOP (1 << 31) /* Bit 31: IWDG freeze in standby mode */ + +/* Flash Option Control Register (OPTCR1) */ + +#define FLASH_OPTCR1_BOOTADD0_SHIFT (0) /* Bits 0-15: Boot base address when Boot pin=0 */ +#define FLASH_OPTCR1_BOOTADD0_MASK (0xffff << FLASH_OPTCR1_BOOTADD0_SHIFT) +# define FLASH_OPTCR1_BOOTADD0(n) ((uint32_t)(n) << FLASH_OPTCR1_BOOTADD0_SHIFT) +#define FLASH_OPTCR1_BOOTADD1_SHIFT (16) /* Bits 16-31:Boot base address when Boot pin=1 */ +#define FLASH_OPTCR1_BOOTADD1_MASK (0xffff << FLASH_OPTCR1_BOOTADD1_SHIFT) +# define FLASH_OPTCR1_BOOTADD1(n) ((uint32_t)(n) << FLASH_OPTCR1_BOOTADD1_SHIFT) + +#endif /* __ARCH_ARM_SRC_STM327_CHIP_STM32F74XX75XX_FLASH_H */ diff --git a/arch/arm/src/stm32f7/chip/stm32f76xx77xx_gpio.h b/arch/arm/src/stm32f7/chip/stm32f76xx77xx_gpio.h new file mode 100644 index 0000000000000000000000000000000000000000..711dc0e124790dca5985db7fd24408d2eddba64d --- /dev/null +++ b/arch/arm/src/stm32f7/chip/stm32f76xx77xx_gpio.h @@ -0,0 +1,404 @@ +/************************************************************************************ + * arch/arm/src/stm32f7/chip/stm32f76xxx77xx_gpio.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: 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. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32F7_CHIP_STM32F76XX77XX_GPIO_H +#define __ARCH_ARM_SRC_STM32F7_CHIP_STM32F76XX77XX_GPIO_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include + +#if defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Register Offsets *****************************************************************/ + +#define STM32_GPIO_MODER_OFFSET 0x0000 /* GPIO port mode register */ +#define STM32_GPIO_OTYPER_OFFSET 0x0004 /* GPIO port output type register */ +#define STM32_GPIO_OSPEED_OFFSET 0x0008 /* GPIO port output speed register */ +#define STM32_GPIO_PUPDR_OFFSET 0x000c /* GPIO port pull-up/pull-down register */ +#define STM32_GPIO_IDR_OFFSET 0x0010 /* GPIO port input data register */ +#define STM32_GPIO_ODR_OFFSET 0x0014 /* GPIO port output data register */ +#define STM32_GPIO_BSRR_OFFSET 0x0018 /* GPIO port bit set/reset register */ +#define STM32_GPIO_LCKR_OFFSET 0x001c /* GPIO port configuration lock register */ +#define STM32_GPIO_AFRL_OFFSET 0x0020 /* GPIO alternate function low register */ +#define STM32_GPIO_AFRH_OFFSET 0x0024 /* GPIO alternate function high register */ + +/* Register Addresses ***************************************************************/ + +#if STM32F7_NGPIO > 0 +# define STM32_GPIOA_MODER (STM32_GPIOA_BASE+STM32_GPIO_MODER_OFFSET) +# define STM32_GPIOA_OTYPER (STM32_GPIOA_BASE+STM32_GPIO_OTYPER_OFFSET) +# define STM32_GPIOA_OSPEED (STM32_GPIOA_BASE+STM32_GPIO_OSPEED_OFFSET) +# define STM32_GPIOA_PUPDR (STM32_GPIOA_BASE+STM32_GPIO_PUPDR_OFFSET) +# define STM32_GPIOA_IDR (STM32_GPIOA_BASE+STM32_GPIO_IDR_OFFSET) +# define STM32_GPIOA_ODR (STM32_GPIOA_BASE+STM32_GPIO_ODR_OFFSET) +# define STM32_GPIOA_BSRR (STM32_GPIOA_BASE+STM32_GPIO_BSRR_OFFSET) +# define STM32_GPIOA_LCKR (STM32_GPIOA_BASE+STM32_GPIO_LCKR_OFFSET) +# define STM32_GPIOA_AFRL (STM32_GPIOA_BASE+STM32_GPIO_AFRL_OFFSET) +# define STM32_GPIOA_AFRH (STM32_GPIOA_BASE+STM32_GPIO_AFRH_OFFSET) +#endif + +#if STM32F7_NGPIO > 1 +# define STM32_GPIOB_MODER (STM32_GPIOB_BASE+STM32_GPIO_MODER_OFFSET) +# define STM32_GPIOB_OTYPER (STM32_GPIOB_BASE+STM32_GPIO_OTYPER_OFFSET) +# define STM32_GPIOB_OSPEED (STM32_GPIOB_BASE+STM32_GPIO_OSPEED_OFFSET) +# define STM32_GPIOB_PUPDR (STM32_GPIOB_BASE+STM32_GPIO_PUPDR_OFFSET) +# define STM32_GPIOB_IDR (STM32_GPIOB_BASE+STM32_GPIO_IDR_OFFSET) +# define STM32_GPIOB_ODR (STM32_GPIOB_BASE+STM32_GPIO_ODR_OFFSET) +# define STM32_GPIOB_BSRR (STM32_GPIOB_BASE+STM32_GPIO_BSRR_OFFSET) +# define STM32_GPIOB_LCKR (STM32_GPIOB_BASE+STM32_GPIO_LCKR_OFFSET) +# define STM32_GPIOB_AFRL (STM32_GPIOB_BASE+STM32_GPIO_AFRL_OFFSET) +# define STM32_GPIOB_AFRH (STM32_GPIOB_BASE+STM32_GPIO_AFRH_OFFSET) +#endif + +#if STM32F7_NGPIO > 2 +# define STM32_GPIOC_MODER (STM32_GPIOC_BASE+STM32_GPIO_MODER_OFFSET) +# define STM32_GPIOC_OTYPER (STM32_GPIOC_BASE+STM32_GPIO_OTYPER_OFFSET) +# define STM32_GPIOC_OSPEED (STM32_GPIOC_BASE+STM32_GPIO_OSPEED_OFFSET) +# define STM32_GPIOC_PUPDR (STM32_GPIOC_BASE+STM32_GPIO_PUPDR_OFFSET) +# define STM32_GPIOC_IDR (STM32_GPIOC_BASE+STM32_GPIO_IDR_OFFSET) +# define STM32_GPIOC_ODR (STM32_GPIOC_BASE+STM32_GPIO_ODR_OFFSET) +# define STM32_GPIOC_BSRR (STM32_GPIOC_BASE+STM32_GPIO_BSRR_OFFSET) +# define STM32_GPIOC_LCKR (STM32_GPIOC_BASE+STM32_GPIO_LCKR_OFFSET) +# define STM32_GPIOC_AFRL (STM32_GPIOC_BASE+STM32_GPIO_AFRL_OFFSET) +# define STM32_GPIOC_AFRH (STM32_GPIOC_BASE+STM32_GPIO_AFRH_OFFSET) +#endif + +#if STM32F7_NGPIO > 3 +# define STM32_GPIOD_MODER (STM32_GPIOD_BASE+STM32_GPIO_MODER_OFFSET) +# define STM32_GPIOD_OTYPER (STM32_GPIOD_BASE+STM32_GPIO_OTYPER_OFFSET) +# define STM32_GPIOD_OSPEED (STM32_GPIOD_BASE+STM32_GPIO_OSPEED_OFFSET) +# define STM32_GPIOD_PUPDR (STM32_GPIOD_BASE+STM32_GPIO_PUPDR_OFFSET) +# define STM32_GPIOD_IDR (STM32_GPIOD_BASE+STM32_GPIO_IDR_OFFSET) +# define STM32_GPIOD_ODR (STM32_GPIOD_BASE+STM32_GPIO_ODR_OFFSET) +# define STM32_GPIOD_BSRR (STM32_GPIOD_BASE+STM32_GPIO_BSRR_OFFSET) +# define STM32_GPIOD_LCKR (STM32_GPIOD_BASE+STM32_GPIO_LCKR_OFFSET) +# define STM32_GPIOD_AFRL (STM32_GPIOD_BASE+STM32_GPIO_AFRL_OFFSET) +# define STM32_GPIOD_AFRH (STM32_GPIOD_BASE+STM32_GPIO_AFRH_OFFSET) +#endif + +#if STM32F7_NGPIO > 4 +# define STM32_GPIOE_MODER (STM32_GPIOE_BASE+STM32_GPIO_MODER_OFFSET) +# define STM32_GPIOE_OTYPER (STM32_GPIOE_BASE+STM32_GPIO_OTYPER_OFFSET) +# define STM32_GPIOE_OSPEED (STM32_GPIOE_BASE+STM32_GPIO_OSPEED_OFFSET) +# define STM32_GPIOE_PUPDR (STM32_GPIOE_BASE+STM32_GPIO_PUPDR_OFFSET) +# define STM32_GPIOE_IDR (STM32_GPIOE_BASE+STM32_GPIO_IDR_OFFSET) +# define STM32_GPIOE_ODR (STM32_GPIOE_BASE+STM32_GPIO_ODR_OFFSET) +# define STM32_GPIOE_BSRR (STM32_GPIOE_BASE+STM32_GPIO_BSRR_OFFSET) +# define STM32_GPIOE_LCKR (STM32_GPIOE_BASE+STM32_GPIO_LCKR_OFFSET) +# define STM32_GPIOE_AFRL (STM32_GPIOE_BASE+STM32_GPIO_AFRL_OFFSET) +# define STM32_GPIOE_AFRH (STM32_GPIOE_BASE+STM32_GPIO_AFRH_OFFSET) +#endif + +#if STM32F7_NGPIO > 5 +# define STM32_GPIOF_MODER (STM32_GPIOF_BASE+STM32_GPIO_MODER_OFFSET) +# define STM32_GPIOF_OTYPER (STM32_GPIOF_BASE+STM32_GPIO_OTYPER_OFFSET) +# define STM32_GPIOF_OSPEED (STM32_GPIOF_BASE+STM32_GPIO_OSPEED_OFFSET) +# define STM32_GPIOF_PUPDR (STM32_GPIOF_BASE+STM32_GPIO_PUPDR_OFFSET) +# define STM32_GPIOF_IDR (STM32_GPIOF_BASE+STM32_GPIO_IDR_OFFSET) +# define STM32_GPIOF_ODR (STM32_GPIOF_BASE+STM32_GPIO_ODR_OFFSET) +# define STM32_GPIOF_BSRR (STM32_GPIOF_BASE+STM32_GPIO_BSRR_OFFSET) +# define STM32_GPIOF_LCKR (STM32_GPIOF_BASE+STM32_GPIO_LCKR_OFFSET) +# define STM32_GPIOF_AFRL (STM32_GPIOF_BASE+STM32_GPIO_AFRL_OFFSET) +# define STM32_GPIOF_AFRH (STM32_GPIOF_BASE+STM32_GPIO_AFRH_OFFSET) +#endif + +#if STM32F7_NGPIO > 6 +# define STM32_GPIOG_MODER (STM32_GPIOG_BASE+STM32_GPIO_MODER_OFFSET) +# define STM32_GPIOG_OTYPER (STM32_GPIOG_BASE+STM32_GPIO_OTYPER_OFFSET) +# define STM32_GPIOG_OSPEED (STM32_GPIOG_BASE+STM32_GPIO_OSPEED_OFFSET) +# define STM32_GPIOG_PUPDR (STM32_GPIOG_BASE+STM32_GPIO_PUPDR_OFFSET) +# define STM32_GPIOG_IDR (STM32_GPIOG_BASE+STM32_GPIO_IDR_OFFSET) +# define STM32_GPIOG_ODR (STM32_GPIOG_BASE+STM32_GPIO_ODR_OFFSET) +# define STM32_GPIOG_BSRR (STM32_GPIOG_BASE+STM32_GPIO_BSRR_OFFSET) +# define STM32_GPIOG_LCKR (STM32_GPIOG_BASE+STM32_GPIO_LCKR_OFFSET) +# define STM32_GPIOG_AFRL (STM32_GPIOG_BASE+STM32_GPIO_AFRL_OFFSET) +# define STM32_GPIOG_AFRH (STM32_GPIOG_BASE+STM32_GPIO_AFRH_OFFSET) +#endif + +#if STM32F7_NGPIO > 7 +# define STM32_GPIOH_MODER (STM32_GPIOH_BASE+STM32_GPIO_MODER_OFFSET) +# define STM32_GPIOH_OTYPER (STM32_GPIOH_BASE+STM32_GPIO_OTYPER_OFFSET) +# define STM32_GPIOH_OSPEED (STM32_GPIOH_BASE+STM32_GPIO_OSPEED_OFFSET) +# define STM32_GPIOH_PUPDR (STM32_GPIOH_BASE+STM32_GPIO_PUPDR_OFFSET) +# define STM32_GPIOH_IDR (STM32_GPIOH_BASE+STM32_GPIO_IDR_OFFSET) +# define STM32_GPIOH_ODR (STM32_GPIOH_BASE+STM32_GPIO_ODR_OFFSET) +# define STM32_GPIOH_BSRR (STM32_GPIOH_BASE+STM32_GPIO_BSRR_OFFSET) +# define STM32_GPIOH_LCKR (STM32_GPIOH_BASE+STM32_GPIO_LCKR_OFFSET) +# define STM32_GPIOH_AFRL (STM32_GPIOH_BASE+STM32_GPIO_AFRL_OFFSET) +# define STM32_GPIOH_AFRH (STM32_GPIOH_BASE+STM32_GPIO_AFRH_OFFSET) +#endif + +#if STM32F7_NGPIO > 8 +# define STM32_GPIOI_MODER (STM32_GPIOI_BASE+STM32_GPIO_MODER_OFFSET) +# define STM32_GPIOI_OTYPER (STM32_GPIOI_BASE+STM32_GPIO_OTYPER_OFFSET) +# define STM32_GPIOI_OSPEED (STM32_GPIOI_BASE+STM32_GPIO_OSPEED_OFFSET) +# define STM32_GPIOI_PUPDR (STM32_GPIOI_BASE+STM32_GPIO_PUPDR_OFFSET) +# define STM32_GPIOI_IDR (STM32_GPIOI_BASE+STM32_GPIO_IDR_OFFSET) +# define STM32_GPIOI_ODR (STM32_GPIOI_BASE+STM32_GPIO_ODR_OFFSET) +# define STM32_GPIOI_BSRR (STM32_GPIOI_BASE+STM32_GPIO_BSRR_OFFSET) +# define STM32_GPIOI_LCKR (STM32_GPIOI_BASE+STM32_GPIO_LCKR_OFFSET) +# define STM32_GPIOI_AFRL (STM32_GPIOI_BASE+STM32_GPIO_AFRL_OFFSET) +# define STM32_GPIOI_AFRH (STM32_GPIOI_BASE+STM32_GPIO_AFRH_OFFSET) +#endif + +#if STM32F7_NGPIO > 9 +# define STM32_GPIOJ_MODER (STM32_GPIOJ_BASE+STM32_GPIO_MODER_OFFSET) +# define STM32_GPIOJ_OTYPER (STM32_GPIOJ_BASE+STM32_GPIO_OTYPER_OFFSET) +# define STM32_GPIOJ_OSPEED (STM32_GPIOJ_BASE+STM32_GPIO_OSPEED_OFFSET) +# define STM32_GPIOJ_PUPDR (STM32_GPIOJ_BASE+STM32_GPIO_PUPDR_OFFSET) +# define STM32_GPIOJ_IDR (STM32_GPIOJ_BASE+STM32_GPIO_IDR_OFFSET) +# define STM32_GPIOJ_ODR (STM32_GPIOJ_BASE+STM32_GPIO_ODR_OFFSET) +# define STM32_GPIOJ_BSRR (STM32_GPIOJ_BASE+STM32_GPIO_BSRR_OFFSET) +# define STM32_GPIOJ_LCKR (STM32_GPIOJ_BASE+STM32_GPIO_LCKR_OFFSET) +# define STM32_GPIOJ_AFRL (STM32_GPIOJ_BASE+STM32_GPIO_AFRL_OFFSET) +# define STM32_GPIOJ_AFRH (STM32_GPIOJ_BASE+STM32_GPIO_AFRH_OFFSET) +#endif + +#if STM32F7_NGPIO > 10 +# define STM32_GPIOK_MODER (STM32_GPIOK_BASE+STM32_GPIO_MODER_OFFSET) +# define STM32_GPIOK_OTYPER (STM32_GPIOK_BASE+STM32_GPIO_OTYPER_OFFSET) +# define STM32_GPIOK_OSPEED (STM32_GPIOK_BASE+STM32_GPIO_OSPEED_OFFSET) +# define STM32_GPIOK_PUPDR (STM32_GPIOK_BASE+STM32_GPIO_PUPDR_OFFSET) +# define STM32_GPIOK_IDR (STM32_GPIOK_BASE+STM32_GPIO_IDR_OFFSET) +# define STM32_GPIOK_ODR (STM32_GPIOK_BASE+STM32_GPIO_ODR_OFFSET) +# define STM32_GPIOK_BSRR (STM32_GPIOK_BASE+STM32_GPIO_BSRR_OFFSET) +# define STM32_GPIOK_LCKR (STM32_GPIOK_BASE+STM32_GPIO_LCKR_OFFSET) +# define STM32_GPIOK_AFRL (STM32_GPIOK_BASE+STM32_GPIO_AFRL_OFFSET) +# define STM32_GPIOK_AFRH (STM32_GPIOK_BASE+STM32_GPIO_AFRH_OFFSET) +#endif + +/* Register Bitfield Definitions ****************************************************/ + +/* GPIO port mode register */ + +#define GPIO_MODER_INPUT (0) /* Input */ +#define GPIO_MODER_OUTPUT (1) /* General purpose output mode */ +#define GPIO_MODER_ALT (2) /* Alternate mode */ +#define GPIO_MODER_ANALOG (3) /* Analog mode */ + +#define GPIO_MODER_SHIFT(n) ((n) << 1) +#define GPIO_MODER_MASK(n) (3 << GPIO_MODER_SHIFT(n)) + +#define GPIO_MODER0_SHIFT (0) +#define GPIO_MODER0_MASK (3 << GPIO_MODER0_SHIFT) +#define GPIO_MODER1_SHIFT (2) +#define GPIO_MODER1_MASK (3 << GPIO_MODER1_SHIFT) +#define GPIO_MODER2_SHIFT (4) +#define GPIO_MODER2_MASK (3 << GPIO_MODER2_SHIFT) +#define GPIO_MODER3_SHIFT (6) +#define GPIO_MODER3_MASK (3 << GPIO_MODER3_SHIFT) +#define GPIO_MODER4_SHIFT (8) +#define GPIO_MODER4_MASK (3 << GPIO_MODER4_SHIFT) +#define GPIO_MODER5_SHIFT (10) +#define GPIO_MODER5_MASK (3 << GPIO_MODER5_SHIFT) +#define GPIO_MODER6_SHIFT (12) +#define GPIO_MODER6_MASK (3 << GPIO_MODER6_SHIFT) +#define GPIO_MODER7_SHIFT (14) +#define GPIO_MODER7_MASK (3 << GPIO_MODER7_SHIFT) +#define GPIO_MODER8_SHIFT (16) +#define GPIO_MODER8_MASK (3 << GPIO_MODER8_SHIFT) +#define GPIO_MODER9_SHIFT (18) +#define GPIO_MODER9_MASK (3 << GPIO_MODER9_SHIFT) +#define GPIO_MODER10_SHIFT (20) +#define GPIO_MODER10_MASK (3 << GPIO_MODER10_SHIFT) +#define GPIO_MODER11_SHIFT (22) +#define GPIO_MODER11_MASK (3 << GPIO_MODER11_SHIFT) +#define GPIO_MODER12_SHIFT (24) +#define GPIO_MODER12_MASK (3 << GPIO_MODER12_SHIFT) +#define GPIO_MODER13_SHIFT (26) +#define GPIO_MODER13_MASK (3 << GPIO_MODER13_SHIFT) +#define GPIO_MODER14_SHIFT (28) +#define GPIO_MODER14_MASK (3 << GPIO_MODER14_SHIFT) +#define GPIO_MODER15_SHIFT (30) +#define GPIO_MODER15_MASK (3 << GPIO_MODER15_SHIFT) + +/* GPIO port output type register */ + +#define GPIO_OTYPER_OD(n) (1 << (n)) /* 1=Output open-drain */ +#define GPIO_OTYPER_PP(n) (0) /* 0=Ouput push-pull */ + +/* GPIO port output speed register */ + +#define GPIO_OSPEED_2MHz (0) /* 2 MHz Low speed */ +#define GPIO_OSPEED_25MHz (1) /* 25 MHz Medium speed */ +#define GPIO_OSPEED_50MHz (2) /* 50 MHz Fast speed */ +#define GPIO_OSPEED_100MHz (3) /* 100 MHz High speed on 30 pF (80 MHz Output max speed on 15 pF) */ + +#define GPIO_OSPEED_SHIFT(n) ((n) << 1) +#define GPIO_OSPEED_MASK(n) (3 << GPIO_OSPEED_SHIFT(n)) + +#define GPIO_OSPEED0_SHIFT (0) +#define GPIO_OSPEED0_MASK (3 << GPIO_OSPEED0_SHIFT) +#define GPIO_OSPEED1_SHIFT (2) +#define GPIO_OSPEED1_MASK (3 << GPIO_OSPEED1_SHIFT) +#define GPIO_OSPEED2_SHIFT (4) +#define GPIO_OSPEED2_MASK (3 << GPIO_OSPEED2_SHIFT) +#define GPIO_OSPEED3_SHIFT (6) +#define GPIO_OSPEED3_MASK (3 << GPIO_OSPEED3_SHIFT) +#define GPIO_OSPEED4_SHIFT (8) +#define GPIO_OSPEED4_MASK (3 << GPIO_OSPEED4_SHIFT) +#define GPIO_OSPEED5_SHIFT (10) +#define GPIO_OSPEED5_MASK (3 << GPIO_OSPEED5_SHIFT) +#define GPIO_OSPEED6_SHIFT (12) +#define GPIO_OSPEED6_MASK (3 << GPIO_OSPEED6_SHIFT) +#define GPIO_OSPEED7_SHIFT (14) +#define GPIO_OSPEED7_MASK (3 << GPIO_OSPEED7_SHIFT) +#define GPIO_OSPEED8_SHIFT (16) +#define GPIO_OSPEED8_MASK (3 << GPIO_OSPEED8_SHIFT) +#define GPIO_OSPEED9_SHIFT (18) +#define GPIO_OSPEED9_MASK (3 << GPIO_OSPEED9_SHIFT) +#define GPIO_OSPEED10_SHIFT (20) +#define GPIO_OSPEED10_MASK (3 << GPIO_OSPEED10_SHIFT) +#define GPIO_OSPEED11_SHIFT (22) +#define GPIO_OSPEED11_MASK (3 << GPIO_OSPEED11_SHIFT) +#define GPIO_OSPEED12_SHIFT (24) +#define GPIO_OSPEED12_MASK (3 << GPIO_OSPEED12_SHIFT) +#define GPIO_OSPEED13_SHIFT (26) +#define GPIO_OSPEED13_MASK (3 << GPIO_OSPEED13_SHIFT) +#define GPIO_OSPEED14_SHIFT (28) +#define GPIO_OSPEED14_MASK (3 << GPIO_OSPEED14_SHIFT) +#define GPIO_OSPEED15_SHIFT (30) +#define GPIO_OSPEED15_MASK (3 << GPIO_OSPEED15_SHIFT) + +/* GPIO port pull-up/pull-down register */ + +#define GPIO_PUPDR_NONE (0) /* No pull-up, pull-down */ +#define GPIO_PUPDR_PULLUP (1) /* Pull-up */ +#define GPIO_PUPDR_PULLDOWN (2) /* Pull-down */ + +#define GPIO_PUPDR_SHIFT(n) ((n) << 1) +#define GPIO_PUPDR_MASK(n) (3 << GPIO_PUPDR_SHIFT(n)) + +#define GPIO_PUPDR0_SHIFT (0) +#define GPIO_PUPDR0_MASK (3 << GPIO_PUPDR0_SHIFT) +#define GPIO_PUPDR1_SHIFT (2) +#define GPIO_PUPDR1_MASK (3 << GPIO_PUPDR1_SHIFT) +#define GPIO_PUPDR2_SHIFT (4) +#define GPIO_PUPDR2_MASK (3 << GPIO_PUPDR2_SHIFT) +#define GPIO_PUPDR3_SHIFT (6) +#define GPIO_PUPDR3_MASK (3 << GPIO_PUPDR3_SHIFT) +#define GPIO_PUPDR4_SHIFT (8) +#define GPIO_PUPDR4_MASK (3 << GPIO_PUPDR4_SHIFT) +#define GPIO_PUPDR5_SHIFT (10) +#define GPIO_PUPDR5_MASK (3 << GPIO_PUPDR5_SHIFT) +#define GPIO_PUPDR6_SHIFT (12) +#define GPIO_PUPDR6_MASK (3 << GPIO_PUPDR6_SHIFT) +#define GPIO_PUPDR7_SHIFT (14) +#define GPIO_PUPDR7_MASK (3 << GPIO_PUPDR7_SHIFT) +#define GPIO_PUPDR8_SHIFT (16) +#define GPIO_PUPDR8_MASK (3 << GPIO_PUPDR8_SHIFT) +#define GPIO_PUPDR9_SHIFT (18) +#define GPIO_PUPDR9_MASK (3 << GPIO_PUPDR9_SHIFT) +#define GPIO_PUPDR10_SHIFT (20) +#define GPIO_PUPDR10_MASK (3 << GPIO_PUPDR10_SHIFT) +#define GPIO_PUPDR11_SHIFT (22) +#define GPIO_PUPDR11_MASK (3 << GPIO_PUPDR11_SHIFT) +#define GPIO_PUPDR12_SHIFT (24) +#define GPIO_PUPDR12_MASK (3 << GPIO_PUPDR12_SHIFT) +#define GPIO_PUPDR13_SHIFT (26) +#define GPIO_PUPDR13_MASK (3 << GPIO_PUPDR13_SHIFT) +#define GPIO_PUPDR14_SHIFT (28) +#define GPIO_PUPDR14_MASK (3 << GPIO_PUPDR14_SHIFT) +#define GPIO_PUPDR15_SHIFT (30) +#define GPIO_PUPDR15_MASK (3 << GPIO_PUPDR15_SHIFT) + +/* GPIO port input data register */ + +#define GPIO_IDR(n) (1 << (n)) + +/* GPIO port output data register */ + +#define GPIO_ODR(n) (1 << (n)) + +/* GPIO port bit set/reset register */ + +#define GPIO_BSRR_SET(n) (1 << (n)) +#define GPIO_BSRR_RESET(n) (1 << ((n)+16)) + +/* GPIO port configuration lock register */ + +#define GPIO_LCKR(n) (1 << (n)) +#define GPIO_LCKK (1 << 16) /* Lock key */ + +/* GPIO alternate function low/high register */ + +#define GPIO_AFR_SHIFT(n) ((n) << 2) +#define GPIO_AFR_MASK(n) (15 << GPIO_AFR_SHIFT(n)) + +#define GPIO_AFRL0_SHIFT (0) +#define GPIO_AFRL0_MASK (15 << GPIO_AFRL0_SHIFT) +#define GPIO_AFRL1_SHIFT (4) +#define GPIO_AFRL1_MASK (15 << GPIO_AFRL1_SHIFT) +#define GPIO_AFRL2_SHIFT (8) +#define GPIO_AFRL2_MASK (15 << GPIO_AFRL2_SHIFT) +#define GPIO_AFRL3_SHIFT (12) +#define GPIO_AFRL3_MASK (15 << GPIO_AFRL3_SHIFT) +#define GPIO_AFRL4_SHIFT (16) +#define GPIO_AFRL4_MASK (15 << GPIO_AFRL4_SHIFT) +#define GPIO_AFRL5_SHIFT (20) +#define GPIO_AFRL5_MASK (15 << GPIO_AFRL5_SHIFT) +#define GPIO_AFRL6_SHIFT (24) +#define GPIO_AFRL6_MASK (15 << GPIO_AFRL6_SHIFT) +#define GPIO_AFRL7_SHIFT (28) +#define GPIO_AFRL7_MASK (15 << GPIO_AFRL7_SHIFT) + +#define GPIO_AFRH8_SHIFT (0) +#define GPIO_AFRH8_MASK (15 << GPIO_AFRH8_SHIFT) +#define GPIO_AFRH9_SHIFT (4) +#define GPIO_AFRH9_MASK (15 << GPIO_AFRH9_SHIFT) +#define GPIO_AFRH10_SHIFT (8) +#define GPIO_AFRH10_MASK (15 << GPIO_AFRH10_SHIFT) +#define GPIO_AFRH11_SHIFT (12) +#define GPIO_AFRH11_MASK (15 << GPIO_AFRH11_SHIFT) +#define GPIO_AFRH12_SHIFT (16) +#define GPIO_AFRH12_MASK (15 << GPIO_AFRH12_SHIFT) +#define GPIO_AFRH13_SHIFT (20) +#define GPIO_AFRH13_MASK (15 << GPIO_AFRH13_SHIFT) +#define GPIO_AFRH14_SHIFT (24) +#define GPIO_AFRH14_MASK (15 << GPIO_AFRH14_SHIFT) +#define GPIO_AFRH15_SHIFT (28) +#define GPIO_AFRH15_MASK (15 << GPIO_AFRH15_SHIFT) + +#endif /* CONFIG_STM32F7_STM32F76XX || CONFIG_STM32F7_STM32F77XX */ +#endif /* __ARCH_ARM_SRC_STM32F7_CHIP_STM32F76XX77XX_GPIO_H */ diff --git a/arch/arm/src/stm32f7/chip/stm32f76xx77xx_memorymap.h b/arch/arm/src/stm32f7/chip/stm32f76xx77xx_memorymap.h new file mode 100644 index 0000000000000000000000000000000000000000..fd1a41f36de6567bf23bb05bf27ee5a2cedf01db --- /dev/null +++ b/arch/arm/src/stm32f7/chip/stm32f76xx77xx_memorymap.h @@ -0,0 +1,221 @@ +/************************************************************************************ + * arch/arm/src/stm3fr2/chip/stm32f76xxx77xxx_memorymap.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: 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. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32F7_CHIP_STM32F76XXX77XXX_MEMORYMAP_H +#define __ARCH_ARM_SRC_STM32F7_CHIP_STM32F76XXX77XXX_MEMORYMAP_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#if defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* STM32F40XXX Address Blocks *******************************************************/ + +#define STM32_CODE_BASE 0x00000000 /* 0x00000000-0x1fffffff: 512Mb code block */ +#define STM32_SRAM_BASE 0x20000000 /* 0x20000000-0x3fffffff: 512Mb sram block */ +#define STM32_PERIPH_BASE 0x40000000 /* 0x40000000-0x5fffffff: 512Mb AHB1-2 peripheral blocks */ +#define STM32_FSMC_BASE12 0x60000000 /* 0x60000000-0x7fffffff: 512Mb FSMC bank1&2 block */ +# define STM32_FSMC_BANK1 0x60000000 /* 0x60000000-0x6fffffff: 256Mb NOR/SRAM */ +# define STM32_FSMC_BANK2 0x70000000 /* 0x70000000-0x7fffffff: 256Mb NAND FLASH */ +#define STM32_FSMC_BASE34 0x80000000 /* 0x80000000-0x8fffffff: 512Mb FSMC bank3&4 block */ +# define STM32_FSMC_BANK3 0x80000000 /* 0x80000000-0x8fffffff: 256Mb NAND FLASH */ +# define STM32_FSMC_BANK4 0x90000000 /* 0x90000000-0x9fffffff: 256Mb PC CARD */ +#define STM32_FSMC_BASE5 0xc0000000 /* 0xc0000000-0xcfffffff: 256Mb FSMC */ +#define STM32_FSMC_BASE6 0xd0000000 /* 0xd0000000-0xdfffffff: 256Mb FSMC */ +#define STM32_CORTEX_BASE 0xe0000000 /* 0xe0000000-0xffffffff: 512Mb Cortex-M7 block */ + +#define STM32_REGION_MASK 0xf0000000 +#define STM32_IS_SRAM(a) ((((uint32_t)(a)) & STM32_REGION_MASK) == STM32_SRAM_BASE) +#define STM32_IS_EXTSRAM(a) ((((uint32_t)(a)) & STM32_REGION_MASK) == STM32_FSMC_BANK1) + +/* Code Base Addresses **************************************************************/ + +#define STM32_BOOT_BASE 0x00000000 /* 0x00000000-0x000fffff: Aliased boot memory */ +#define STM32_INSTRAM_BASE 0x00000000 /* 0x00000000-0x00003fff: Instruction RAM (ITCM-RAM) */ +#define STM32_SYSMEM_ICTM 0x00100000 /* 0x00100000-0x0010edbf: System memory (ITCM) */ +#define STM32_FLASH_ITCM 0x00200000 /* 0x00200000-0x003fffff: FLASH memory (ITCM) */ +#define STM32_LOADER_BASE 0x01000000 /* 0x01000000- Bootloader */ +#define STM32_FLASH_AXIM 0x08000000 /* 0x08000000-0x081fffff: FLASH memory (AXIM) */ +#define STM32_OPTIONS_BASE 0x1fff0000 /* 0x1ff00000-0x1fff001f: OTP (AXIM) */ + +/* Information Addresses ************************************************************/ + + +#define STM32_SYSMEM_AXIM 0x1ff00000 /* 0x1ff00000-0x1ff0edbf: System memory (AXIM) */ +#define STM32_SYSMEM_UID 0x1ff0f420 /* The 96-bit unique device identifier */ +#define STM32_OTP_ICTM 0x0010f000 /* 0x0010f000-0x0010edbf: OTP (ITCM) */ +#define STM32_OTP_AXIM 0x1ff0f000 /* 0x1ff00000-0x1ff0f41f: OTP (AXIM) */ + +/* SRAM Base Addresses **************************************************************/ + +#define STM32_DTCRAM_BASE 0x20000000 /* 0x20000000-0x2001ffff: DTCM-RAM on TCM interface */ +#define STM32_SRAM1_BASE 0x20020000 /* 0x20020000-0x2007bfff: System SRAM1 */ +#define STM32_SRAM2_BASE 0x2007c000 /* 0x2007c000-0x2007ffff: System SRAM2 */ + +/* Peripheral Base Addresses ********************************************************/ + +#define STM32_APB1_BASE 0x40000000 /* 0x40000000-0x40007fff: APB1 */ +#define STM32_APB2_BASE 0x40010000 /* 0x40010000-0x40016bff: APB2 */ +#define STM32_AHB1_BASE 0x40020000 /* 0x40020000-0x4007ffff: APB1 */ +#define STM32_AHB2_BASE 0x50000000 /* 0x50000000-0x5003ffff: AHB2 */ +#define STM32_AHB3_BASE 0x60000000 /* 0x60000000-0xdfffffff: AHB3 */ + +/* APB1 Base Addresses **************************************************************/ + +#define STM32_TIM2_BASE 0x40000000 /* 0x40000000-0x400003ff: TIM2 */ +#define STM32_TIM3_BASE 0x40000400 /* 0x40000400-0x400007ff: TIM3 */ +#define STM32_TIM4_BASE 0x40000800 /* 0x40000800-0x40000bff: TIM4 */ +#define STM32_TIM5_BASE 0x40000c00 /* 0x40000c00-0x40000fff: TIM5 */ +#define STM32_TIM6_BASE 0x40001000 /* 0x40001000-0x400013ff: TIM6 */ +#define STM32_TIM7_BASE 0x40001400 /* 0x40001400-0x400017ff: TIM7 */ +#define STM32_TIM12_BASE 0x40001800 /* 0x40001800-0x40001bff: TIM12 */ +#define STM32_TIM13_BASE 0x40001c00 /* 0x40001c00-0x40001fff: TIM13 */ +#define STM32_TIM14_BASE 0x40002000 /* 0x40002000-0x400023ff: TIM14 */ +#define STM32_LPTIM1_BASE 0x40002400 /* 0x40002400-0x400027ff: LPTIM1 */ +#define STM32_RTC_BASE 0x40002800 /* 0x40002800-0x40002bff: RTC & BKP Registers */ +#define STM32_BKP_BASE 0x40002800 /* 0x40002800-0x40002bff: RTC & BKP Registers */ +#define STM32_WWDG_BASE 0x40002c00 /* 0x40002c00-0x40002fff: WWDG */ +#define STM32_IWDG_BASE 0x40003000 /* 0x40003000-0x400033ff: IWDG */ +#define STM32_CAN3_BASE 0x40003400 /* 0x40003400-0x400037ff: CAN3 */ +#define STM32_SPI2_BASE 0x40003800 /* 0x40003800-0x40003bff: SPI2 / I2S2 */ +#define STM32_I2S2_BASE 0x40003800 /* 0x40003800-0x40003bff: SPI2 / I2S2 */ +#define STM32_SPI3_BASE 0x40003c00 /* 0x40003c00-0x40003fff: SPI3 / I2S3 */ +#define STM32_I2S3_BASE 0x40003c00 /* 0x40003c00-0x40003fff: SPI3 / I2S3 */ +#define STM32_SPDIFRX_BASE 0x40004000 /* 0x40004000-0x400043ff: SPDIFRX */ +#define STM32_USART2_BASE 0x40004400 /* 0x40004400-0x400047ff: USART2 */ +#define STM32_USART3_BASE 0x40004800 /* 0x40004800-0x40004bff: USART3 */ +#define STM32_UART4_BASE 0x40004c00 /* 0x40004c00-0x40004fff: UART4 */ +#define STM32_UART5_BASE 0x40005000 /* 0x40005000-0x400053ff: UART5 */ +#define STM32_I2C1_BASE 0x40005400 /* 0x40005400-0x400057ff: I2C1 */ +#define STM32_I2C2_BASE 0x40005800 /* 0x40005800-0x40005bff: I2C2 */ +#define STM32_I2C3_BASE 0x40005c00 /* 0x40005c00-0x40005fff: I2C3 */ +#define STM32_I2C4_BASE 0x40006000 /* 0x40006000-0x400063ff: I2C4 */ +#define STM32_CAN1_BASE 0x40006400 /* 0x40006400-0x400067ff: CAN1 */ +#define STM32_CAN2_BASE 0x40006800 /* 0x40006800-0x40006bff: CAN2 */ +#define STM32_HDMICEC_BASE 0x40006c00 /* 0x40006c00-0x40006fff: HDMI-CEC */ +#define STM32_PWR_BASE 0x40007000 /* 0x40007000-0x400073ff: PWR */ +#define STM32_DAC_BASE 0x40007400 /* 0x40007400-0x400077ff: DAC */ +#define STM32_UART7_BASE 0x40007800 /* 0x40007800-0x40007bff: UART7 */ +#define STM32_UART8_BASE 0x40007c00 /* 0x40007c00-0x40007fff: UART8 */ + +/* APB2 Base Addresses **************************************************************/ + +#define STM32_TIM1_BASE 0x40010000 /* 0x40010000-0x400103ff: TIM1 */ +#define STM32_TIM8_BASE 0x40010400 /* 0x40010400-0x400107ff: TIM8 */ +#define STM32_USART1_BASE 0x40011000 /* 0x40011000-0x400113ff: USART1 */ +#define STM32_USART6_BASE 0x40011400 /* 0x40011400-0x400117ff: USART6 */ +#define STM32_SDMMC2_BASE 0x40011c00 /* 0x40011c00-0x40011fff: SDMMC2 */ +#define STM32_ADC_BASE 0x40012000 /* 0x40012000-0x400123ff: ADC1 - ADC2 - ADC3 */ +# define STM32_ADC1_BASE 0x40012000 /* ADC1 */ +# define STM32_ADC2_BASE 0x40012100 /* ADC2 */ +# define STM32_ADC3_BASE 0x40012200 /* ADC3 */ +# define STM32_ADCCMN_BASE 0x40012300 /* Common */ +#define STM32_SDMMC1_BASE 0x40012c00 /* 0x40012c00-0x40012fff: SDMMC1 */ +#define STM32_SPI1_BASE 0x40013000 /* 0x40013000-0x400133ff: SPI1 */ +#define STM32_SPI4_BASE 0x40013400 /* 0x40013400-0x400137ff: SPI4 */ +#define STM32_SYSCFG_BASE 0x40013800 /* 0x40013800-0x40013bff: SYSCFG */ +#define STM32_EXTI_BASE 0x40013c00 /* 0x40013c00-0x40013fff: EXTI */ +#define STM32_TIM9_BASE 0x40014000 /* 0x40014000-0x400143ff: TIM9 */ +#define STM32_TIM10_BASE 0x40014400 /* 0x40014400-0x400147ff: TIM10 */ +#define STM32_TIM11_BASE 0x40014800 /* 0x40014800-0x40014bff: TIM11 */ +#define STM32_SPI5_BASE 0x40015000 /* 0x40015000-0x400153ff: SPI5 */ +#define STM32_SPI6_BASE 0x40015400 /* 0x40015400-0x400157ff: SPI6 */ +#define STM32_SAI1_BASE 0x40015800 /* 0x40015800-0x40015bff: SAI1 */ +#define STM32_SAI2_BASE 0x40015c00 /* 0x40015c00-0x40015fff: SAI2 */ +#define STM32_LCDTFT_BASE 0x40016800 /* 0x40016800-0x40016bff: LCD-TFT */ +#define STM32_DSIHOST_BASE 0x40016c00 /* 0x40016c00-0x400173ff: DSI Host */ +#define STM32_DFSDM1_BASE 0x40017400 /* 0x40017400-0x400174ff: DFSDM1 */ +#define STM32_MDIOS_BASE 0x40017800 /* 0x40017800-0x40017bff: MDIOS */ + +/* AHB1 Base Addresses **************************************************************/ + +#define STM32_GPIOA_BASE 0x40020000 /* 0x40020000-0x400203ff: GPIOA */ +#define STM32_GPIOB_BASE 0x40020400 /* 0x40020400-0x400207ff: GPIOB */ +#define STM32_GPIOC_BASE 0x40020800 /* 0x40020800-0x40020bff: GPIOC */ +#define STM32_GPIOD_BASE 0x40020c00 /* 0x40020c00-0x40020fff: GPIOD */ +#define STM32_GPIOE_BASE 0x40021000 /* 0x40021000-0x400213ff: GPIOE */ +#define STM32_GPIOF_BASE 0x40021400 /* 0x40021400-0x400217ff: GPIOF */ +#define STM32_GPIOG_BASE 0x40021800 /* 0x40021800-0x40021bff: GPIOG */ +#define STM32_GPIOH_BASE 0x40021c00 /* 0x40021c00-0x40021fff: GPIOH */ +#define STM32_GPIOI_BASE 0x40022000 /* 0x40022000-0x400223ff: GPIOI */ +#define STM32_GPIOJ_BASE 0x40022400 /* 0x40022400-0x400227ff: GPIOJ */ +#define STM32_GPIOK_BASE 0x40022800 /* 0x40022800-0x40022bff: GPIOK */ +#define STM32_CRC_BASE 0x40023000 /* 0x40023000-0x400233ff: CRC */ +#define STM32_RCC_BASE 0x40023800 /* 0x40023800-0x40023bff: RCC */ +#define STM32_FLASHIF_BASE 0x40023c00 /* 0x40023c00-0x40023fff: Flash interface */ +#define STM32_BKPSRAM_BASE 0x40024000 /* 0x40024000-0x40024fff: BKPSRAM */ +#define STM32_DMA1_BASE 0x40026000 /* 0x40026000-0x400263ff: DMA1 */ +#define STM32_DMA2_BASE 0x40026400 /* 0x40026400-0x400267ff: DMA2 */ +#define STM32_ETHMAC_BASE 0x40028000 /* 0x40028000-0x400293ff: ETHERNET MAC */ +#define STM32_DMA2D_BASE 0x4002b000 /* 0x4002b000-0x4002Bbff: Chrom-ART (DMA2D) */ +#define STM32_USBOTGHS_BASE 0x40040000 /* 0x40040000-0x4007ffff: USB OTG HS */ + +/* AHB2 Base Addresses **************************************************************/ + +#define STM32_USBOTGFS_BASE 0x50000000 /* 0x50000000-0x5003ffff: USB OTG FS */ +#define STM32_DCMI_BASE 0x50050000 /* 0x50050000-0x500503ff: DCMI */ +#define STM32_JPEG_BASE 0x50051000 /* 0x50051000-0x500511ff: JPEG */ +#define STM32_CRYP_BASE 0x50060000 /* 0x50060000-0x500603ff: CRYP */ +#define STM32_HASH_BASE 0x50060400 /* 0x50060400-0x500607ff: HASH */ +#define STM32_RNG_BASE 0x50060800 /* 0x50060800-0x50060bff: RNG */ + +/* AHB3 Base Addresses **************************************************************/ + +#define STM32_FMCBANK1_BASE 0x60000000 /* 0x60000000-0x6fffffff: FMC bank 1 */ +#define STM32_FMCBANK2_BASE 0x70000000 /* 0x70000000-0x7fffffff: FMC bank 2 */ +#define STM32_FMCBANK3_BASE 0x80000000 /* 0x80000000-0x8fffffff: FMC bank 3 */ +#define STM32_FMCBANK4_BASE 0x90000000 /* 0x90000000-0x9fffffff: FMC bank 4 */ +#define STM32_FSMC_BASE 0xa0000000 /* 0xa0000000-0xa0000fff: FMC control registers */ +#define STM32_QUADSPI_BASE 0xa0001000 /* 0xa0001000-0xa0001fff: QuadSPI Control */ +#define STM32_FMCBANK5_BASE 0xc0000000 /* 0xc0000000-0xcfffffff: FMC bank 5 */ +#define STM32_FMCBANK6_BASE 0xd0000000 /* 0xd0000000-0xdfffffff: FMC bank 6 */ + +/* Cortex-M7 Base Addresses *********************************************************/ +/* Other registers -- see armv7-m/nvic.h for standard Cortex-M3 registers in this + * address range + */ + +#define STM32_DEBUGMCU_BASE 0xe0042000 + +#endif /* CONFIG_STM32F7_STM32F74XX || CONFIG_STM32F7_STM32F75XX */ +#endif /* __ARCH_ARM_SRC_STM32F7_CHIP_STM32F74XXX75XXX_MEMORYMAP_H */ diff --git a/arch/arm/src/stm32f7/chip/stm32f76xx77xx_pinmap.h b/arch/arm/src/stm32f7/chip/stm32f76xx77xx_pinmap.h new file mode 100644 index 0000000000000000000000000000000000000000..4c60603c95a1d9b55317a36f2a9fbc685f3455b8 --- /dev/null +++ b/arch/arm/src/stm32f7/chip/stm32f76xx77xx_pinmap.h @@ -0,0 +1,1343 @@ +/************************************************************************************ + * arch/arm/src/stm32f7/chip/stm32f76xx77xx_pinmap.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: 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. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32_CHIP_STM32F76XX77XX_PINMAP_H +#define __ARCH_ARM_SRC_STM32_CHIP_STM32F76XX77XX_PINMAP_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "stm32_gpio.h" + +#if defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F76XX) + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Alternate Pin Functions. All members of the STM32F76|7xxx family share the same + * pin multiplexing (although they may differ in the pins physically available). + * + * 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. For example, if + * CAN1_RX connects vis PA11 on some board, then the following definitions should + * appear inthe board.h header file for that board: + * + * #define GPIO_CAN1_RX GPIO_CAN1_RX_1 + * + * The driver will then automatically configre PA11 as the CAN1 RX pin. + */ + +/* WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!! + * Additional effort is required to select specific GPIO options such as frequency, + * open-drain/push-pull, and pull-up/down! Just the basics are defined for most + * pins in this file. + */ + +/* ADC */ + +#define GPIO_ADC1_IN0 (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN0) +#define GPIO_ADC1_IN1 (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN1) +#define GPIO_ADC1_IN2 (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN2) +#define GPIO_ADC1_IN3 (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN3) +#define GPIO_ADC1_IN4 (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN4) +#define GPIO_ADC1_IN5 (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN5) +#define GPIO_ADC1_IN6 (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN6) +#define GPIO_ADC1_IN7 (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN7) +#define GPIO_ADC1_IN8 (GPIO_ANALOG|GPIO_PORTB|GPIO_PIN0) +#define GPIO_ADC1_IN9 (GPIO_ANALOG|GPIO_PORTB|GPIO_PIN1) +#define GPIO_ADC1_IN10 (GPIO_ANALOG|GPIO_PORTC|GPIO_PIN0) +#define GPIO_ADC1_IN11 (GPIO_ANALOG|GPIO_PORTC|GPIO_PIN1) +#define GPIO_ADC1_IN12 (GPIO_ANALOG|GPIO_PORTC|GPIO_PIN2) +#define GPIO_ADC1_IN13 (GPIO_ANALOG|GPIO_PORTC|GPIO_PIN3) +#define GPIO_ADC1_IN14 (GPIO_ANALOG|GPIO_PORTC|GPIO_PIN4) +#define GPIO_ADC1_IN15 (GPIO_ANALOG|GPIO_PORTC|GPIO_PIN5) + +#define GPIO_ADC2_IN0 (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN0) +#define GPIO_ADC2_IN1 (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN1) +#define GPIO_ADC2_IN2 (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN2) +#define GPIO_ADC2_IN3 (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN3) +#define GPIO_ADC2_IN4 (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN4) +#define GPIO_ADC2_IN5 (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN5) +#define GPIO_ADC2_IN6 (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN6) +#define GPIO_ADC2_IN7 (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN7) +#define GPIO_ADC2_IN8 (GPIO_ANALOG|GPIO_PORTB|GPIO_PIN0) +#define GPIO_ADC2_IN9 (GPIO_ANALOG|GPIO_PORTB|GPIO_PIN1) +#define GPIO_ADC2_IN10 (GPIO_ANALOG|GPIO_PORTC|GPIO_PIN0) +#define GPIO_ADC2_IN11 (GPIO_ANALOG|GPIO_PORTC|GPIO_PIN1) +#define GPIO_ADC2_IN12 (GPIO_ANALOG|GPIO_PORTC|GPIO_PIN2) +#define GPIO_ADC2_IN13 (GPIO_ANALOG|GPIO_PORTC|GPIO_PIN3) +#define GPIO_ADC2_IN14 (GPIO_ANALOG|GPIO_PORTC|GPIO_PIN4) +#define GPIO_ADC2_IN15 (GPIO_ANALOG|GPIO_PORTC|GPIO_PIN5) + +#define GPIO_ADC3_IN0 (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN0) +#define GPIO_ADC3_IN1 (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN1) +#define GPIO_ADC3_IN2 (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN2) +#define GPIO_ADC3_IN3 (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN3) +#define GPIO_ADC3_IN4 (GPIO_ANALOG|GPIO_PORTF|GPIO_PIN6) +#define GPIO_ADC3_IN5 (GPIO_ANALOG|GPIO_PORTF|GPIO_PIN7) +#define GPIO_ADC3_IN6 (GPIO_ANALOG|GPIO_PORTF|GPIO_PIN8) +#define GPIO_ADC3_IN7 (GPIO_ANALOG|GPIO_PORTF|GPIO_PIN9) +#define GPIO_ADC3_IN8 (GPIO_ANALOG|GPIO_PORTF|GPIO_PIN10) + +#define GPIO_ADC3_IN9 (GPIO_ANALOG|GPIO_PORTF|GPIO_PIN3) +#define GPIO_ADC3_IN10 (GPIO_ANALOG|GPIO_PORTC|GPIO_PIN0) +#define GPIO_ADC3_IN11 (GPIO_ANALOG|GPIO_PORTC|GPIO_PIN1) +#define GPIO_ADC3_IN12 (GPIO_ANALOG|GPIO_PORTC|GPIO_PIN2) +#define GPIO_ADC3_IN13 (GPIO_ANALOG|GPIO_PORTC|GPIO_PIN3) +#define GPIO_ADC3_IN14 (GPIO_ANALOG|GPIO_PORTF|GPIO_PIN4) +#define GPIO_ADC3_IN15 (GPIO_ANALOG|GPIO_PORTF|GPIO_PIN5) + +/* CAN */ + +#define GPIO_CAN1_RX_1 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN11) +#define GPIO_CAN1_RX_2 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN8) +#define GPIO_CAN1_RX_3 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN0) +#define GPIO_CAN1_RX_4 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN14) +#define GPIO_CAN1_RX_5 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTI|GPIO_PIN9) + +#define GPIO_CAN1_TX_1 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN12) +#define GPIO_CAN1_TX_2 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN9) +#define GPIO_CAN1_TX_3 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN1) +#define GPIO_CAN1_TX_4 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN13) + +#define GPIO_CAN2_RX_1 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN12) +#define GPIO_CAN2_RX_2 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN5) +#define GPIO_CAN2_TX_1 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN13) +#define GPIO_CAN2_TX_2 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN6) + +#define GPIO_CAN3_RX_1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN8) +#define GPIO_CAN3_RX_2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN3) +#define GPIO_CAN3_TX_1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN15) +#define GPIO_CAN3_TX_2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN4) + +/* DAC -" Once the DAC channel is enabled, the corresponding GPIO pin + * (PA4 or PA5) is automatically connected to the analog converter output + * (DAC_OUTx). In order to avoid parasitic consumption, the PA4 or PA5 pin + * should first be configured to analog (AIN)". + */ + +#define GPIO_DAC1_OUT (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN4) +#define GPIO_DAC2_OUT (GPIO_ANALOG|GPIO_PORTA|GPIO_PIN5) + +/* Digital Camera Interface (DCMI) */ + +#define GPIO_DCMI_D0_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTA|GPIO_PIN9) +#define GPIO_DCMI_D0_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTC|GPIO_PIN6) +#define GPIO_DCMI_D0_3 (GPIO_ALT|GPIO_AF13|GPIO_PORTH|GPIO_PIN9) +#define GPIO_DCMI_D1_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTA|GPIO_PIN10) +#define GPIO_DCMI_D1_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTC|GPIO_PIN7) +#define GPIO_DCMI_D1_3 (GPIO_ALT|GPIO_AF13|GPIO_PORTH|GPIO_PIN10) +#define GPIO_DCMI_D2_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTC|GPIO_PIN8) +#define GPIO_DCMI_D2_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTE|GPIO_PIN0) +#define GPIO_DCMI_D2_3 (GPIO_ALT|GPIO_AF13|GPIO_PORTG|GPIO_PIN10) +#define GPIO_DCMI_D2_4 (GPIO_ALT|GPIO_AF13|GPIO_PORTH|GPIO_PIN11) +#define GPIO_DCMI_D3_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTC|GPIO_PIN9) +#define GPIO_DCMI_D3_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTE|GPIO_PIN1) +#define GPIO_DCMI_D3_3 (GPIO_ALT|GPIO_AF13|GPIO_PORTG|GPIO_PIN11) +#define GPIO_DCMI_D3_4 (GPIO_ALT|GPIO_AF13|GPIO_PORTH|GPIO_PIN12) +#define GPIO_DCMI_D4_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTC|GPIO_PIN11) +#define GPIO_DCMI_D4_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTE|GPIO_PIN4) +#define GPIO_DCMI_D4_3 (GPIO_ALT|GPIO_AF13|GPIO_PORTH|GPIO_PIN14) +#define GPIO_DCMI_D5_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN6) +#define GPIO_DCMI_D5_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTD|GPIO_PIN3) +#define GPIO_DCMI_D5_3 (GPIO_ALT|GPIO_AF13|GPIO_PORTI|GPIO_PIN4) +#define GPIO_DCMI_D6_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN8) +#define GPIO_DCMI_D6_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTE|GPIO_PIN5) +#define GPIO_DCMI_D6_3 (GPIO_ALT|GPIO_AF13|GPIO_PORTI|GPIO_PIN6) +#define GPIO_DCMI_D7_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN9) +#define GPIO_DCMI_D7_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTE|GPIO_PIN6) +#define GPIO_DCMI_D7_3 (GPIO_ALT|GPIO_AF13|GPIO_PORTI|GPIO_PIN7) +#define GPIO_DCMI_D8_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTC|GPIO_PIN10) +#define GPIO_DCMI_D8_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTH|GPIO_PIN6) +#define GPIO_DCMI_D8_3 (GPIO_ALT|GPIO_AF13|GPIO_PORTI|GPIO_PIN1) +#define GPIO_DCMI_D9_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTC|GPIO_PIN12) +#define GPIO_DCMI_D9_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTH|GPIO_PIN7) +#define GPIO_DCMI_D9_3 (GPIO_ALT|GPIO_AF13|GPIO_PORTI|GPIO_PIN2) +#define GPIO_DCMI_D10_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN5) +#define GPIO_DCMI_D10_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTD|GPIO_PIN6) +#define GPIO_DCMI_D10_3 (GPIO_ALT|GPIO_AF13|GPIO_PORTI|GPIO_PIN3) +#define GPIO_DCMI_D11_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTD|GPIO_PIN2) +#define GPIO_DCMI_D11_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTF|GPIO_PIN10) +#define GPIO_DCMI_D11_3 (GPIO_ALT|GPIO_AF13|GPIO_PORTH|GPIO_PIN15) +#define GPIO_DCMI_D12_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTF|GPIO_PIN11) +#define GPIO_DCMI_D12_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTG|GPIO_PIN6) +#define GPIO_DCMI_D13_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTG|GPIO_PIN15) +#define GPIO_DCMI_D13_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTG|GPIO_PIN7) +#define GPIO_DCMI_D13_3 (GPIO_ALT|GPIO_AF13|GPIO_PORTI|GPIO_PIN0) +#define GPIO_DCMI_HSYNC_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTA|GPIO_PIN4) +#define GPIO_DCMI_HSYNC_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTH|GPIO_PIN8) +#define GPIO_DCMI_PIXCK (GPIO_ALT|GPIO_AF13|GPIO_PORTA|GPIO_PIN6) +#define GPIO_DCMI_VSYNC_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN7) +#define GPIO_DCMI_VSYNC_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTG|GPIO_PIN9) +#define GPIO_DCMI_VSYNC_3 (GPIO_ALT|GPIO_AF13|GPIO_PORTI|GPIO_PIN5) + +/* DSI Host */ + +#define DSI_TE_1 (GPIO_ALT|GPIO_AF13|GPIO_PORTB|GPIO_PIN11) +#define DSI_TE_2 (GPIO_ALT|GPIO_AF13|GPIO_PORTJ|GPIO_PIN12) + +/* Digital filter for sigma delta modulators */ + +#define GPIO_DFSDM1_CKOUT_1 (GPIO_ALT|GPIO_AF6 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN0) +#define GPIO_DFSDM1_CKOUT_2 (GPIO_ALT|GPIO_AF6 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN2) +#define GPIO_DFSDM1_CKOUT_3 (GPIO_ALT|GPIO_AF3 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN3) +#define GPIO_DFSDM1_CKOUT_4 (GPIO_ALT|GPIO_AF3 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN10) +#define GPIO_DFSDM1_CKOUT_5 (GPIO_ALT|GPIO_AF6 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN9) +#define GPIO_DFSDM1_CKIN0_1 (GPIO_ALT|GPIO_AF3 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN0) +#define GPIO_DFSDM1_CKIN0_2 (GPIO_ALT|GPIO_AF6 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN3) +#define GPIO_DFSDM1_CKIN1_1 (GPIO_ALT|GPIO_AF10|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN2) +#define GPIO_DFSDM1_CKIN1_2 (GPIO_ALT|GPIO_AF10|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN13) +#define GPIO_DFSDM1_CKIN1_3 (GPIO_ALT|GPIO_AF3 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN2) +#define GPIO_DFSDM1_CKIN1_4 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN7) +#define GPIO_DFSDM1_CKIN2_1 (GPIO_ALT|GPIO_AF10|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN15) +#define GPIO_DFSDM1_CKIN2_2 (GPIO_ALT|GPIO_AF3 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN4) +#define GPIO_DFSDM1_CKIN2_3 (GPIO_ALT|GPIO_AF6 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN8) +#define GPIO_DFSDM1_CKIN3_1 (GPIO_ALT|GPIO_AF6 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN6) +#define GPIO_DFSDM1_CKIN3_2 (GPIO_ALT|GPIO_AF10|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN1) +#define GPIO_DFSDM1_CKIN3_3 (GPIO_ALT|GPIO_AF3 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN8) +#define GPIO_DFSDM1_CKIN3_4 (GPIO_ALT|GPIO_AF10|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN5) +#define GPIO_DFSDM1_CKIN4_1 (GPIO_ALT|GPIO_AF3 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN6) +#define GPIO_DFSDM1_CKIN4_2 (GPIO_ALT|GPIO_AF6 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN11) +#define GPIO_DFSDM1_CKIN5_1 (GPIO_ALT|GPIO_AF6 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN7) +#define GPIO_DFSDM1_CKIN5_2 (GPIO_ALT|GPIO_AF3 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN10) +#define GPIO_DFSDM1_CKIN5_3 (GPIO_ALT|GPIO_AF6 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN13) +#define GPIO_DFSDM1_CKIN6_1 (GPIO_ALT|GPIO_AF3 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN0) +#define GPIO_DFSDM1_CKIN6_2 (GPIO_ALT|GPIO_AF6 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN14) +#define GPIO_DFSDM1_CKIN7_1 (GPIO_ALT|GPIO_AF6 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN8) +#define GPIO_DFSDM1_CKIN7_2 (GPIO_ALT|GPIO_AF6 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN1) +#define GPIO_DFSDM1_CKIN7_3 (GPIO_ALT|GPIO_AF6 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN11) +#define GPIO_DFSDM1_CKIN7_4 (GPIO_ALT|GPIO_AF6 |GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTS|GPIO_PIN1) +#define GPIO_DFSDM1_DATAIN0_1 (GPIO_ALT|GPIO_AF3 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN1) +#define GPIO_DFSDM1_DATAIN0_2 (GPIO_ALT|GPIO_AF6 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN4) +#define GPIO_DFSDM1_DATAIN1_1 (GPIO_ALT|GPIO_AF6 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN1) +#define GPIO_DFSDM1_DATAIN1_2 (GPIO_ALT|GPIO_AF6 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN12) +#define GPIO_DFSDM1_DATAIN1_3 (GPIO_ALT|GPIO_AF3 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN3) +#define GPIO_DFSDM1_DATAIN1_4 (GPIO_ALT|GPIO_AF10|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN6) +#define GPIO_DFSDM1_DATAIN2_1 (GPIO_ALT|GPIO_AF6 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN14) +#define GPIO_DFSDM1_DATAIN2_2 (GPIO_ALT|GPIO_AF3 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN5) +#define GPIO_DFSDM1_DATAIN2_3 (GPIO_ALT|GPIO_AF6 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN7) +#define GPIO_DFSDM1_DATAIN3_1 (GPIO_ALT|GPIO_AF6 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN7) +#define GPIO_DFSDM1_DATAIN3_2 (GPIO_ALT|GPIO_AF3 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN9) +#define GPIO_DFSDM1_DATAIN3_3 (GPIO_ALT|GPIO_AF10|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN4) +#define GPIO_DFSDM1_DATAIN4_1 (GPIO_ALT|GPIO_AF6 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN0) +#define GPIO_DFSDM1_DATAIN4_2 (GPIO_ALT|GPIO_AF3 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN7) +#define GPIO_DFSDM1_DATAIN4_3 (GPIO_ALT|GPIO_AF6 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN10) +#define GPIO_DFSDM1_DATAIN5_1 (GPIO_ALT|GPIO_AF6 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN6) +#define GPIO_DFSDM1_DATAIN5_2 (GPIO_ALT|GPIO_AF3 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN11) +#define GPIO_DFSDM1_DATAIN5_3 (GPIO_ALT|GPIO_AF6 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN12) +#define GPIO_DFSDM1_DATAIN6_1 (GPIO_ALT|GPIO_AF3 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN1) +#define GPIO_DFSDM1_DATAIN6_2 (GPIO_ALT|GPIO_AF6 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN13) +#define GPIO_DFSDM1_DATAIN7_1 (GPIO_ALT|GPIO_AF6 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN9) +#define GPIO_DFSDM1_DATAIN7_2 (GPIO_ALT|GPIO_AF6 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN10) +#define GPIO_DFSDM1_DATAIN7_3 (GPIO_ALT|GPIO_AF6 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN0) + +/* Ethernet MAC */ + +#define GPIO_ETH_MDC (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN1) +#define GPIO_ETH_MDIO (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN2) +#define GPIO_ETH_MII_COL_1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN3) +#define GPIO_ETH_MII_COL_2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN3) +#define GPIO_ETH_MII_CRS_1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN0) +#define GPIO_ETH_MII_CRS_2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN2) +#define GPIO_ETH_MII_RXD0 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN4) +#define GPIO_ETH_MII_RXD1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN5) +#define GPIO_ETH_MII_RXD2_1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN0) +#define GPIO_ETH_MII_RXD2_2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN6) +#define GPIO_ETH_MII_RXD3_1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN1) +#define GPIO_ETH_MII_RXD3_2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN7) +#define GPIO_ETH_MII_RX_CLK (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN1) +#define GPIO_ETH_MII_RX_DV (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN7) +#define GPIO_ETH_MII_RX_ER_1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN10) +#define GPIO_ETH_MII_RX_ER_2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTI|GPIO_PIN10) +#define GPIO_ETH_MII_TXD0_1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN12) +#define GPIO_ETH_MII_TXD0_2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN13) +#define GPIO_ETH_MII_TXD1_1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN13) +#define GPIO_ETH_MII_TXD1_2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN14) +#define GPIO_ETH_MII_TXD2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN2) +#define GPIO_ETH_MII_TXD3_1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN8) +#define GPIO_ETH_MII_TXD3_2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN2) +#define GPIO_ETH_MII_TX_CLK (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN3) +#define GPIO_ETH_MII_TX_EN_1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN11) +#define GPIO_ETH_MII_TX_EN_2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN11) +#define GPIO_ETH_PPS_OUT_1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN5) +#define GPIO_ETH_PPS_OUT_2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN8) + +#define GPIO_ETH_RMII_CRS_DV (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN7) +#define GPIO_ETH_RMII_REF_CLK (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN1) +#define GPIO_ETH_RMII_RXD0 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN4) +#define GPIO_ETH_RMII_RXD1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN5) +#define GPIO_ETH_RMII_TXD0_1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN12) +#define GPIO_ETH_RMII_TXD0_2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN13) +#define GPIO_ETH_RMII_TXD1_1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN13) +#define GPIO_ETH_RMII_TXD1_2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN14) +#define GPIO_ETH_RMII_TX_CLK (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN3) +#define GPIO_ETH_RMII_TX_EN_1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN11) +#define GPIO_ETH_RMII_TX_EN_2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN11) + +/* Event outputs */ + +#define GPIO_PA0_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTA|GPIO_PIN0) +#define GPIO_PA1_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTA|GPIO_PIN1) +#define GPIO_PA2_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTA|GPIO_PIN2) +#define GPIO_PA3_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTA|GPIO_PIN3) +#define GPIO_PA4_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTA|GPIO_PIN4) +#define GPIO_PA5_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTA|GPIO_PIN5) +#define GPIO_PA6_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTA|GPIO_PIN6) +#define GPIO_PA7_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTA|GPIO_PIN7) +#define GPIO_PA8_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTA|GPIO_PIN8) +#define GPIO_PA9_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTA|GPIO_PIN9) +#define GPIO_PA10_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTA|GPIO_PIN10) +#define GPIO_PA11_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTA|GPIO_PIN11) +#define GPIO_PA12_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTA|GPIO_PIN12) +#define GPIO_PA13_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTA|GPIO_PIN13) +#define GPIO_PA14_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTA|GPIO_PIN14) +#define GPIO_PA15_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTA|GPIO_PIN15) + +#define GPIO_PB0_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTB|GPIO_PIN0) +#define GPIO_PB1_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTB|GPIO_PIN1) +#define GPIO_PB2_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTB|GPIO_PIN2) +#define GPIO_PB3_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTB|GPIO_PIN3) +#define GPIO_PB4_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTB|GPIO_PIN4) +#define GPIO_PB5_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTB|GPIO_PIN5) +#define GPIO_PB6_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTB|GPIO_PIN6) +#define GPIO_PB7_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTB|GPIO_PIN7) +#define GPIO_PB8_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTB|GPIO_PIN8) +#define GPIO_PB9_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTB|GPIO_PIN9) +#define GPIO_PB10_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTB|GPIO_PIN10) +#define GPIO_PB11_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTB|GPIO_PIN11) +#define GPIO_PB12_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTB|GPIO_PIN12) +#define GPIO_PB13_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTB|GPIO_PIN13) +#define GPIO_PB14_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTB|GPIO_PIN14) +#define GPIO_PB15_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTB|GPIO_PIN15) + +#define GPIO_PC0_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTC|GPIO_PIN0) +#define GPIO_PC1_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTC|GPIO_PIN1) +#define GPIO_PC2_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTC|GPIO_PIN2) +#define GPIO_PC3_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTC|GPIO_PIN3) +#define GPIO_PC4_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTC|GPIO_PIN4) +#define GPIO_PC5_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTC|GPIO_PIN5) +#define GPIO_PC6_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTC|GPIO_PIN6) +#define GPIO_PC7_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTC|GPIO_PIN7) +#define GPIO_PC8_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTC|GPIO_PIN8) +#define GPIO_PC9_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTC|GPIO_PIN9) +#define GPIO_PC10_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTC|GPIO_PIN10) +#define GPIO_PC11_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTC|GPIO_PIN11) +#define GPIO_PC12_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTC|GPIO_PIN12) +#define GPIO_PC13_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTC|GPIO_PIN13) +#define GPIO_PC14_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTC|GPIO_PIN14) +#define GPIO_PC15_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTC|GPIO_PIN15) + +#define GPIO_PD0_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTD|GPIO_PIN0) +#define GPIO_PD1_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTD|GPIO_PIN1) +#define GPIO_PD2_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTD|GPIO_PIN2) +#define GPIO_PD3_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTD|GPIO_PIN3) +#define GPIO_PD4_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTD|GPIO_PIN4) +#define GPIO_PD5_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTD|GPIO_PIN5) +#define GPIO_PD6_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTD|GPIO_PIN6) +#define GPIO_PD7_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTD|GPIO_PIN7) +#define GPIO_PD8_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTD|GPIO_PIN8) +#define GPIO_PD9_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTD|GPIO_PIN9) +#define GPIO_PD10_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTD|GPIO_PIN10) +#define GPIO_PD11_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTD|GPIO_PIN11) +#define GPIO_PD12_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTD|GPIO_PIN12) +#define GPIO_PD13_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTD|GPIO_PIN13) +#define GPIO_PD14_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTD|GPIO_PIN14) +#define GPIO_PD15_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTD|GPIO_PIN15) + +#define GPIO_PE0_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTE|GPIO_PIN0) +#define GPIO_PE1_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTE|GPIO_PIN1) +#define GPIO_PE2_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTE|GPIO_PIN2) +#define GPIO_PE3_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTE|GPIO_PIN3) +#define GPIO_PE4_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTE|GPIO_PIN4) +#define GPIO_PE5_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTE|GPIO_PIN5) +#define GPIO_PE6_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTE|GPIO_PIN6) +#define GPIO_PE7_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTE|GPIO_PIN7) +#define GPIO_PE8_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTE|GPIO_PIN8) +#define GPIO_PE9_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTE|GPIO_PIN9) +#define GPIO_PE10_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTE|GPIO_PIN10) +#define GPIO_PE11_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTE|GPIO_PIN11) +#define GPIO_PE12_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTE|GPIO_PIN12) +#define GPIO_PE13_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTE|GPIO_PIN13) +#define GPIO_PE14_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTE|GPIO_PIN14) +#define GPIO_PE15_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTE|GPIO_PIN15) + +#define GPIO_PF0_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTF|GPIO_PIN0) +#define GPIO_PF1_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTF|GPIO_PIN1) +#define GPIO_PF2_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTF|GPIO_PIN2) +#define GPIO_PF3_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTF|GPIO_PIN3) +#define GPIO_PF4_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTF|GPIO_PIN4) +#define GPIO_PF5_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTF|GPIO_PIN5) +#define GPIO_PF6_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTF|GPIO_PIN6) +#define GPIO_PF7_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTF|GPIO_PIN7) +#define GPIO_PF8_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTF|GPIO_PIN8) +#define GPIO_PF9_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTF|GPIO_PIN9) +#define GPIO_PF10_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTF|GPIO_PIN10) +#define GPIO_PF11_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTF|GPIO_PIN11) +#define GPIO_PF12_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTF|GPIO_PIN12) +#define GPIO_PF13_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTF|GPIO_PIN13) +#define GPIO_PF14_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTF|GPIO_PIN14) +#define GPIO_PF15_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTF|GPIO_PIN15) + +#define GPIO_PG0_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTG|GPIO_PIN0) +#define GPIO_PG1_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTG|GPIO_PIN1) +#define GPIO_PG2_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTG|GPIO_PIN2) +#define GPIO_PG3_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTG|GPIO_PIN3) +#define GPIO_PG4_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTG|GPIO_PIN4) +#define GPIO_PG5_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTG|GPIO_PIN5) +#define GPIO_PG6_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTG|GPIO_PIN6) +#define GPIO_PG7_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTG|GPIO_PIN7) +#define GPIO_PG8_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTG|GPIO_PIN8) +#define GPIO_PG9_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTG|GPIO_PIN9) +#define GPIO_PG10_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTG|GPIO_PIN10) +#define GPIO_PG11_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTG|GPIO_PIN11) +#define GPIO_PG12_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTG|GPIO_PIN12) +#define GPIO_PG13_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTG|GPIO_PIN13) +#define GPIO_PG14_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTG|GPIO_PIN14) +#define GPIO_PG15_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTG|GPIO_PIN15) + +#define GPIO_PH0_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTH|GPIO_PIN0) +#define GPIO_PH1_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTH|GPIO_PIN1) +#define GPIO_PH2_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTH|GPIO_PIN2) +#define GPIO_PH3_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTH|GPIO_PIN3) +#define GPIO_PH4_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTH|GPIO_PIN4) +#define GPIO_PH5_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTH|GPIO_PIN5) +#define GPIO_PH6_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTH|GPIO_PIN6) +#define GPIO_PH7_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTH|GPIO_PIN7) +#define GPIO_PH8_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTH|GPIO_PIN8) +#define GPIO_PH9_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTH|GPIO_PIN9) +#define GPIO_PH10_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTH|GPIO_PIN10) +#define GPIO_PH11_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTH|GPIO_PIN11) +#define GPIO_PH12_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTH|GPIO_PIN12) +#define GPIO_PH13_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTH|GPIO_PIN13) +#define GPIO_PH14_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTH|GPIO_PIN14) +#define GPIO_PH15_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTH|GPIO_PIN15) + +#define GPIO_PI0_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTI|GPIO_PIN0) +#define GPIO_PI1_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTI|GPIO_PIN1) +#define GPIO_PI2_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTI|GPIO_PIN2) +#define GPIO_PI3_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTI|GPIO_PIN3) +#define GPIO_PI4_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTI|GPIO_PIN4) +#define GPIO_PI5_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTI|GPIO_PIN5) +#define GPIO_PI6_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTI|GPIO_PIN6) +#define GPIO_PI7_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTI|GPIO_PIN7) +#define GPIO_PI8_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTI|GPIO_PIN8) +#define GPIO_PI9_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTI|GPIO_PIN9) +#define GPIO_PI10_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTI|GPIO_PIN10) +#define GPIO_PI11_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTI|GPIO_PIN11) +#define GPIO_PI12_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTI|GPIO_PIN12) +#define GPIO_PI13_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTI|GPIO_PIN13) +#define GPIO_PI14_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTI|GPIO_PIN14) +#define GPIO_PI15_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTI|GPIO_PIN15) + +#define GPIO_PJ0_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTJ|GPIO_PIN0) +#define GPIO_PJ1_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTJ|GPIO_PIN1) +#define GPIO_PJ2_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTJ|GPIO_PIN2) +#define GPIO_PJ3_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTJ|GPIO_PIN3) +#define GPIO_PJ4_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTJ|GPIO_PIN4) +#define GPIO_PJ5_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTJ|GPIO_PIN5) +#define GPIO_PJ6_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTJ|GPIO_PIN6) +#define GPIO_PJ7_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTJ|GPIO_PIN7) +#define GPIO_PJ8_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTJ|GPIO_PIN8) +#define GPIO_PJ9_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTJ|GPIO_PIN9) +#define GPIO_PJ10_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTJ|GPIO_PIN10) +#define GPIO_PJ11_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTJ|GPIO_PIN11) +#define GPIO_PJ12_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTJ|GPIO_PIN12) +#define GPIO_PJ13_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTJ|GPIO_PIN13) +#define GPIO_PJ14_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTJ|GPIO_PIN14) +#define GPIO_PJ15_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTJ|GPIO_PIN15) + +#define GPIO_PK0_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTK|GPIO_PIN0) +#define GPIO_PK1_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTK|GPIO_PIN1) +#define GPIO_PK2_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTK|GPIO_PIN2) +#define GPIO_PK3_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTK|GPIO_PIN3) +#define GPIO_PK4_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTK|GPIO_PIN4) +#define GPIO_PK5_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTK|GPIO_PIN5) +#define GPIO_PK6_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTK|GPIO_PIN6) +#define GPIO_PK7_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTK|GPIO_PIN7) + +/* Flexible Static Memory Controller (FSMC) */ + +#define GPIO_FSMC_A0 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN0) +#define GPIO_FSMC_A1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN1) +#define GPIO_FSMC_A2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN2) +#define GPIO_FSMC_A3 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN3) +#define GPIO_FSMC_A4 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN4) +#define GPIO_FSMC_A5 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN5) +#define GPIO_FSMC_A6 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN12) +#define GPIO_FSMC_A7 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN13) +#define GPIO_FSMC_A8 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN14) +#define GPIO_FSMC_A9 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN15) +#define GPIO_FSMC_A10 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN0) +#define GPIO_FSMC_A11 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN1) +#define GPIO_FSMC_A12 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN2) +#define GPIO_FSMC_A13 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN3) +#define GPIO_FSMC_A14 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN4) +#define GPIO_FSMC_A15 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN5) +#define GPIO_FSMC_A16 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN11) +#define GPIO_FSMC_A17 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN12) +#define GPIO_FSMC_A18 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN13) +#define GPIO_FSMC_A19 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN3) +#define GPIO_FSMC_A20 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN4) +#define GPIO_FSMC_A21 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN5) +#define GPIO_FSMC_A22 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN6) +#define GPIO_FSMC_A23 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN2) +#define GPIO_FSMC_A24 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN13) +#define GPIO_FSMC_A25 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN14) +#define GPIO_FSMC_ALE (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN12) +#define GPIO_FSMC_BA0 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN4) +#define GPIO_FSMC_BA1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN5) +#define GPIO_FSMC_CLE (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN11) +#define GPIO_FSMC_CLK (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN3) +#define GPIO_FSMC_D0 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN14) +#define GPIO_FSMC_D1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN15) +#define GPIO_FSMC_D2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN0) +#define GPIO_FSMC_D3 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN1) +#define GPIO_FSMC_D4 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN7) +#define GPIO_FSMC_D5 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN8) +#define GPIO_FSMC_D6 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN9) +#define GPIO_FSMC_D7 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN10) +#define GPIO_FSMC_D8 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN11) +#define GPIO_FSMC_D9 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN12) +#define GPIO_FSMC_D10 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN13) +#define GPIO_FSMC_D11 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN14) +#define GPIO_FSMC_D12 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN15) +#define GPIO_FSMC_D13 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN8) +#define GPIO_FSMC_D14 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN9) +#define GPIO_FSMC_D15 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN10) +#define GPIO_FSMC_D16 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN8) +#define GPIO_FSMC_D17 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN9) +#define GPIO_FSMC_D18 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN10) +#define GPIO_FSMC_D19 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN11) +#define GPIO_FSMC_D20 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN12) +#define GPIO_FSMC_D21 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN13) +#define GPIO_FSMC_D22 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN14) +#define GPIO_FSMC_D23 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN15) +#define GPIO_FSMC_D24 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN0) +#define GPIO_FSMC_D25 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN1) +#define GPIO_FSMC_D26 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN2) +#define GPIO_FSMC_D27 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN3) +#define GPIO_FSMC_D28 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN6) +#define GPIO_FSMC_D29 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN7) +#define GPIO_FSMC_D30 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN9) +#define GPIO_FSMC_D31 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN10) +#define GPIO_FSMC_INT (GPIO_ALT|GPIO_AF12|GPIO_PORTG|GPIO_PIN7) +#define GPIO_FSMC_NBL0 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN0) +#define GPIO_FSMC_NBL1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN1) +#define GPIO_FSMC_NBL2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN4) +#define GPIO_FSMC_NBL3 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN5) +#define GPIO_FSMC_NCE_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN9) +#define GPIO_FSMC_NCE_2 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN8) +#define GPIO_FSMC_NE1_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN7) +#define GPIO_FSMC_NE1_2 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN7) +#define GPIO_FSMC_NE2_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN9) +#define GPIO_FSMC_NE2_2 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN8) +#define GPIO_FSMC_NE3 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN10) +#define GPIO_FSMC_NE4 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN12) +#define GPIO_FSMC_NL (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTB|GPIO_PIN7) +#define GPIO_FSMC_NOE (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN4) +#define GPIO_FSMC_NWAIT_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN6) +#define GPIO_FSMC_NWAIT_2 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN6) +#define GPIO_FSMC_NWE (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN5) +#define GPIO_FSMC_SDCKE0_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN3) +#define GPIO_FSMC_SDCKE0_2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN5) +#define GPIO_FSMC_SDCKE0_3 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN2) +#define GPIO_FSMC_SDCKE1_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTB|GPIO_PIN5) +#define GPIO_FSMC_SDCKE1_2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN7) +#define GPIO_FSMC_SDCLK (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN8) +#define GPIO_FSMC_SDNCAS (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN15) +#define GPIO_FSMC_SDNE0_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN2) +#define GPIO_FSMC_SDNE0_2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN4) +#define GPIO_FSMC_SDNE0_3 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN3) +#define GPIO_FSMC_SDNE1_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTB|GPIO_PIN6) +#define GPIO_FSMC_SDNE1_2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN6) +#define GPIO_FSMC_SDNRAS (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN11) +#define GPIO_FSMC_SDNWE_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTA|GPIO_PIN7) +#define GPIO_FSMC_SDNWE_2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN0) +#define GPIO_FSMC_SDNWE_3 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN5) + +/* HDMI-CEC Controller */ + +#define GPIO_HDMICEC_1 (GPIO_ALT|GPIO_AF3|GPIO_PORTB|GPIO_PIN6) +#define GPIO_HDMICEC_2 (GPIO_ALT|GPIO_AF4|GPIO_PORTA|GPIO_PIN15) + +/* I2C */ + +#define GPIO_I2C1_SCL_1 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN6) +#define GPIO_I2C1_SCL_2 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN8) +#define GPIO_I2C1_SDA_1 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN7) +#define GPIO_I2C1_SDA_2 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN9) +#define GPIO_I2C1_SMBA (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN5) + +#define GPIO_I2C2_SCL_1 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN10) +#define GPIO_I2C2_SCL_2 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTF|GPIO_PIN1) +#define GPIO_I2C2_SCL_3 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTH|GPIO_PIN4) +#define GPIO_I2C2_SDA_1 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN11) +#define GPIO_I2C2_SDA_2 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTF|GPIO_PIN0) +#define GPIO_I2C2_SDA_3 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTH|GPIO_PIN5) +#define GPIO_I2C2_SMBA_1 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN12) +#define GPIO_I2C2_SMBA_2 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN2) +#define GPIO_I2C2_SMBA_3 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN6) + +#define GPIO_I2C3_SCL_1 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTA|GPIO_PIN8) +#define GPIO_I2C3_SCL_2 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTH|GPIO_PIN7) +#define GPIO_I2C3_SDA_1 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTC|GPIO_PIN9) +#define GPIO_I2C3_SDA_2 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTH|GPIO_PIN8) +#define GPIO_I2C3_SMBA_1 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN9) +#define GPIO_I2C3_SMBA_2 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN9) + +#define GPIO_I2C4_SCL_1 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN12) +#define GPIO_I2C4_SCL_2 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN14) +#define GPIO_I2C4_SCL_3 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN11) +#define GPIO_I2C4_SCL_4 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN6) +#define GPIO_I2C4_SCL_5 (GPIO_ALT|GPIO_AF1 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN8) +#define GPIO_I2C4_SDA_1 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN13) +#define GPIO_I2C4_SDA_2 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN15) +#define GPIO_I2C4_SDA_3 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN12) +#define GPIO_I2C4_SMBA_1 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN11) +#define GPIO_I2C4_SMBA_2 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN13) +#define GPIO_I2C4_SMBA_3 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN10) +#define GPIO_I2C4_SMBA_4 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN9) + +/* I2S */ + +#define GPIO_I2S1_CK_1 (GPIO_ALT|GPIO_AF5 |GPIO_PORTA|GPIO_PIN5) +#define GPIO_I2S1_CK_2 (GPIO_ALT|GPIO_AF5 |GPIO_PORTB|GPIO_PIN3) +#define GPIO_I2S1_CK_3 (GPIO_ALT|GPIO_AF5 |GPIO_PORTG|GPIO_PIN11) +#define GPIO_I2S1_MCK (GPIO_ALT|GPIO_AF5 |GPIO_PORTC|GPIO_PIN4) +#define GPIO_I2S1_SD_1 (GPIO_ALT|GPIO_AF5 |GPIO_PORTA|GPIO_PIN7) +#define GPIO_I2S1_SD_2 (GPIO_ALT|GPIO_AF5 |GPIO_PORTB|GPIO_PIN5) +#define GPIO_I2S1_SD_3 (GPIO_ALT|GPIO_AF5 |GPIO_PORTD|GPIO_PIN7) +#define GPIO_I2S1_WS_1 (GPIO_ALT|GPIO_AF5 |GPIO_PORTA|GPIO_PIN15) +#define GPIO_I2S1_WS_2 (GPIO_ALT|GPIO_AF5 |GPIO_PORTA|GPIO_PIN4) +#define GPIO_I2S1_WS_3 (GPIO_ALT|GPIO_AF5 |GPIO_PORTG|GPIO_PIN10) + +#define GPIO_I2S2_CK_1 (GPIO_ALT|GPIO_AF5 |GPIO_PORTA|GPIO_PIN9) +#define GPIO_I2S2_CK_2 (GPIO_ALT|GPIO_AF5 |GPIO_PORTB|GPIO_PIN10) +#define GPIO_I2S2_CK_3 (GPIO_ALT|GPIO_AF5 |GPIO_PORTB|GPIO_PIN13) +#define GPIO_I2S2_CK_4 (GPIO_ALT|GPIO_AF5 |GPIO_PORTD|GPIO_PIN3) +#define GPIO_I2S2_CK_5 (GPIO_ALT|GPIO_AF5 |GPIO_PORTI|GPIO_PIN1) +#define GPIO_I2S2_CK_6 (GPIO_ALT|GPIO_AF5 |GPIO_PORTA|GPIO_PIN12) +#define GPIO_I2S2_MCK (GPIO_ALT|GPIO_AF5 |GPIO_PORTC|GPIO_PIN6) +#define GPIO_I2S2_SD_1 (GPIO_ALT|GPIO_AF5 |GPIO_PORTB|GPIO_PIN15) +#define GPIO_I2S2_SD_2 (GPIO_ALT|GPIO_AF5 |GPIO_PORTC|GPIO_PIN1) +#define GPIO_I2S2_SD_3 (GPIO_ALT|GPIO_AF5 |GPIO_PORTC|GPIO_PIN3) +#define GPIO_I2S2_SD_4 (GPIO_ALT|GPIO_AF5 |GPIO_PORTI|GPIO_PIN3) +#define GPIO_I2S2_WS_1 (GPIO_ALT|GPIO_AF5 |GPIO_PORTB|GPIO_PIN12) +#define GPIO_I2S2_WS_2 (GPIO_ALT|GPIO_AF5 |GPIO_PORTB|GPIO_PIN9) +#define GPIO_I2S2_WS_3 (GPIO_ALT|GPIO_AF5 |GPIO_PORTI|GPIO_PIN0) +#define GPIO_I2S2_WS_4 (GPIO_ALT|GPIO_AF7 |GPIO_PORTB|GPIO_PIN4) +#define GPIO_I2S2_WS_5 (GPIO_ALT|GPIO_AF5 |GPIO_PORTA|GPIO_PIN11) + +#define GPIO_I2S3_CK_1 (GPIO_ALT|GPIO_AF6 |GPIO_PORTB|GPIO_PIN3) +#define GPIO_I2S3_CK_2 (GPIO_ALT|GPIO_AF6 |GPIO_PORTC|GPIO_PIN10) +#define GPIO_I2S3_MCK (GPIO_ALT|GPIO_AF6 |GPIO_PORTC|GPIO_PIN7) +#define GPIO_I2S3_SD_1 (GPIO_ALT|GPIO_AF5 |GPIO_PORTD|GPIO_PIN6) +#define GPIO_I2S3_SD_2 (GPIO_ALT|GPIO_AF6 |GPIO_PORTB|GPIO_PIN5) +#define GPIO_I2S3_SD_3 (GPIO_ALT|GPIO_AF6 |GPIO_PORTC|GPIO_PIN12) +#define GPIO_I2S3_SD_4 (GPIO_ALT|GPIO_AF7 |GPIO_PORTB|GPIO_PIN2) +#define GPIO_I2S3_WS_1 (GPIO_ALT|GPIO_AF6 |GPIO_PORTA|GPIO_PIN15) +#define GPIO_I2S3_WS_2 (GPIO_ALT|GPIO_AF6 |GPIO_PORTA|GPIO_PIN4) + +#define GPIO_I2S4_SD_1 (GPIO_ALT|GPIO_AF11|GPIO_PORTB|GPIO_PIN7) +#define GPIO_I2S4_SD_2 (GPIO_ALT|GPIO_AF1 |GPIO_PORTB|GPIO_PIN9) + +#define GPIO_I2S_CKIN (GPIO_ALT|GPIO_AF5 |GPIO_PORTC|GPIO_PIN9) + +/* JTAG */ + +#define GPIO_JTCK (GPIO_ALT|GPIO_AF0|GPIO_PORTA|GPIO_PIN14) +#define GPIO_JTDI (GPIO_ALT|GPIO_AF0|GPIO_PORTA|GPIO_PIN15) +#define GPIO_JTDO (GPIO_ALT|GPIO_AF0|GPIO_PORTB|GPIO_PIN3) +#define GPIO_JTMS (GPIO_ALT|GPIO_AF0|GPIO_PORTA|GPIO_PIN13) +#define GPIO_NJTRST (GPIO_ALT|GPIO_AF0|GPIO_PORTB|GPIO_PIN4) + +#define GPIO_SWCLK (GPIO_ALT|GPIO_AF0|GPIO_PORTA|GPIO_PIN14) +#define GPIO_SWDIO (GPIO_ALT|GPIO_AF0|GPIO_PORTA|GPIO_PIN13) + +/* LCD-TFT Display Controller (LTDC) */ + +#define GPIO_LTDC_R0_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN13) +#define GPIO_LTDC_R0_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN2) +#define GPIO_LTDC_R0_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTI|GPIO_PIN15) +#define GPIO_LTDC_R1_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN2) +#define GPIO_LTDC_R1_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN3) +#define GPIO_LTDC_R1_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTJ|GPIO_PIN0) +#define GPIO_LTDC_R2_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN1) +#define GPIO_LTDC_R2_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN10) +#define GPIO_LTDC_R2_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN8) +#define GPIO_LTDC_R2_4 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTJ|GPIO_PIN1) +#define GPIO_LTDC_R3_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN9) +#define GPIO_LTDC_R3_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTJ|GPIO_PIN2) +#define GPIO_LTDC_R3_1 (GPIO_ALT|GPIO_AF9 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN0) +#define GPIO_LTDC_R4_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN11) +#define GPIO_LTDC_R4_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN5) +#define GPIO_LTDC_R4_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN10) +#define GPIO_LTDC_R4_4 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTJ|GPIO_PIN3) +#define GPIO_LTDC_R5_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN12) +#define GPIO_LTDC_R5_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN0) +#define GPIO_LTDC_R5_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN11) +#define GPIO_LTDC_R5_4 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTJ|GPIO_PIN4) +#define GPIO_LTDC_R5_5 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN9) +#define GPIO_LTDC_R6_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN8) +#define GPIO_LTDC_R6_2 (GPIO_ALT|GPIO_AF9 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN1) +#define GPIO_LTDC_R6_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN12) +#define GPIO_LTDC_R6_4 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTJ|GPIO_PIN5) +#define GPIO_LTDC_R7_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN15) +#define GPIO_LTDC_R7_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN6) +#define GPIO_LTDC_R7_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTJ|GPIO_PIN6) +#define GPIO_LTDC_R7_4 (GPIO_ALT|GPIO_AF9 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTJ|GPIO_PIN0) + +#define GPIO_LTDC_B0_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN4) +#define GPIO_LTDC_B0_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN14) +#define GPIO_LTDC_B0_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTJ|GPIO_PIN12) +#define GPIO_LTDC_B1_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN12) +#define GPIO_LTDC_B1_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTJ|GPIO_PIN13) +#define GPIO_LTDC_B1_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN10) +#define GPIO_LTDC_B2_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN6) +#define GPIO_LTDC_B2_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN10) +#define GPIO_LTDC_B2_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTJ|GPIO_PIN14) +#define GPIO_LTDC_B2_4 (GPIO_ALT|GPIO_AF9 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN3) +#define GPIO_LTDC_B2_5 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN9) +#define GPIO_LTDC_B3_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN10) +#define GPIO_LTDC_B3_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN11) +#define GPIO_LTDC_B3_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTJ|GPIO_PIN15) +#define GPIO_LTDC_B3_4 (GPIO_ALT|GPIO_AF13|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN8) +#define GPIO_LTDC_B4_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN12) +#define GPIO_LTDC_B4_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTI|GPIO_PIN4) +#define GPIO_LTDC_B4_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTK|GPIO_PIN3) +#define GPIO_LTDC_B4_4 (GPIO_ALT|GPIO_AF9 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN12) +#define GPIO_LTDC_B4_5 (GPIO_ALT|GPIO_AF9 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN10) +#define GPIO_LTDC_B5_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN3) +#define GPIO_LTDC_B5_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTI|GPIO_PIN5) +#define GPIO_LTDC_B5_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTK|GPIO_PIN4) +#define GPIO_LTDC_B6_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN8) +#define GPIO_LTDC_B6_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTI|GPIO_PIN6) +#define GPIO_LTDC_B6_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTK|GPIO_PIN5) +#define GPIO_LTDC_B7_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN9) +#define GPIO_LTDC_B7_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTI|GPIO_PIN7) +#define GPIO_LTDC_B7_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTK|GPIO_PIN6) + +#define GPIO_LTDC_G0_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN5) +#define GPIO_LTDC_G0_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTJ|GPIO_PIN7) +#define GPIO_LTDC_G0_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN1) +#define GPIO_LTDC_G1_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN6) +#define GPIO_LTDC_G1_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTJ|GPIO_PIN8) +#define GPIO_LTDC_G1_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN0) +#define GPIO_LTDC_G2_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN6) +#define GPIO_LTDC_G2_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN13) +#define GPIO_LTDC_G2_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTJ|GPIO_PIN9) +#define GPIO_LTDC_G2_4 (GPIO_ALT|GPIO_AF9 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTI|GPIO_PIN15) +#define GPIO_LTDC_G3_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN11) +#define GPIO_LTDC_G3_2 (GPIO_ALT|GPIO_AF9 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN10) +#define GPIO_LTDC_G3_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN14) +#define GPIO_LTDC_G3_4 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTJ|GPIO_PIN10) +#define GPIO_LTDC_G3_5 (GPIO_ALT|GPIO_AF10|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN9) +#define GPIO_LTDC_G3_6 (GPIO_ALT|GPIO_AF9 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTJ|GPIO_PIN12) +#define GPIO_LTDC_G4_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN10) +#define GPIO_LTDC_G4_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN15) +#define GPIO_LTDC_G4_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTJ|GPIO_PIN11) +#define GPIO_LTDC_G4_4 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN4) +#define GPIO_LTDC_G4_5 (GPIO_ALT|GPIO_AF9 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTJ|GPIO_PIN13) +#define GPIO_LTDC_G5_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN11) +#define GPIO_LTDC_G5_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTI|GPIO_PIN0) +#define GPIO_LTDC_G5_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTK|GPIO_PIN0) +#define GPIO_LTDC_G5_4 (GPIO_ALT|GPIO_AF9 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN4) +#define GPIO_LTDC_G6_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN7) +#define GPIO_LTDC_G6_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTI|GPIO_PIN1) +#define GPIO_LTDC_G6_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTK|GPIO_PIN1) +#define GPIO_LTDC_G6_4 (GPIO_ALT|GPIO_AF9 |GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTI|GPIO_PIN11) +#define GPIO_LTDC_G7_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN3) +#define GPIO_LTDC_G7_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTI|GPIO_PIN2) +#define GPIO_LTDC_G7_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTK|GPIO_PIN2) +#define GPIO_LTDC_G7_4 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN5) +#define GPIO_LTDC_G7_5 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN8) + +#define GPIO_LTDC_HSYNC_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN6) +#define GPIO_LTDC_HSYNC_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTI|GPIO_PIN10) +#define GPIO_LTDC_HSYNC_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTI|GPIO_PIN12) +#define GPIO_LTDC_VSYNC_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN4) +#define GPIO_LTDC_VSYNC_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTI|GPIO_PIN9) +#define GPIO_LTDC_VSYNC_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTI|GPIO_PIN13) +#define GPIO_LTDC_CLK_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN14) +#define GPIO_LTDC_CLK_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN7) +#define GPIO_LTDC_CLK_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTI|GPIO_PIN14) +#define GPIO_LTDC_DE_1 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN13) +#define GPIO_LTDC_DE_2 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN10) +#define GPIO_LTDC_DE_3 (GPIO_ALT|GPIO_AF14|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTK|GPIO_PIN7) + +/* Low Power Timer */ + +#define GPIO_LPTIM1_ETR_1 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTE|GPIO_PIN0) +#define GPIO_LPTIM1_ETR_2 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTG|GPIO_PIN14) +#define GPIO_LPTIM1_IN1_1 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTD|GPIO_PIN12) +#define GPIO_LPTIM1_IN1_2 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTG|GPIO_PIN12) +#define GPIO_LPTIM1_IN2_3 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTE|GPIO_PIN1) +#define GPIO_LPTIM1_IN2_4 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTH|GPIO_PIN2) +#define GPIO_LPTIM1_OUT_1 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN13) +#define GPIO_LPTIM1_OUT_2 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN13) + +/* Clocks outputs */ + +#define GPIO_MCO1 (GPIO_ALT|GPIO_AF0|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN8) +#define GPIO_MCO2 (GPIO_ALT|GPIO_AF0|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN9) + +/* Management data input/output */ + +#define MDIOS_MDIO_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN2) +#define MDIOS_MDC_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN6) +#define MDIOS_MDC_2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_50MHz|GPIO_PORTC|GPIO_PIN1) +#define MDIOS_MDIO_2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN10) + +/* OTG FS/HS (VBUS PA9 is not an alternate configuration) */ + +#define GPIO_OTGFS_DM (GPIO_ALT|GPIO_FLOAT|GPIO_AF10|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN11) +#define GPIO_OTGFS_DP (GPIO_ALT|GPIO_FLOAT|GPIO_AF10|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN12) +#define GPIO_OTGFS_ID (GPIO_ALT|GPIO_PULLUP|GPIO_AF10|GPIO_SPEED_100MHz|GPIO_OPENDRAIN|GPIO_PORTA|GPIO_PIN10) +#define GPIO_OTGFS_SOF (GPIO_ALT|GPIO_FLOAT|GPIO_AF10|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN8) + +#define GPIO_OTGHSFS_DM (GPIO_ALT|GPIO_FLOAT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN14) +#define GPIO_OTGHSFS_DP (GPIO_ALT|GPIO_FLOAT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN15) +#define GPIO_OTGHSFS_ID (GPIO_ALT|GPIO_PULLUP|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN12) + +#define GPIO_OTGHS_SOF (GPIO_ALT|GPIO_FLOAT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN4) + +#define GPIO_OTGHS_ULPI_CK (GPIO_ALT|GPIO_AF10|GPIO_PORTA|GPIO_PIN5) +#define GPIO_OTGHS_ULPI_D0 (GPIO_ALT|GPIO_AF10|GPIO_PORTA|GPIO_PIN3) +#define GPIO_OTGHS_ULPI_D1 (GPIO_ALT|GPIO_AF10|GPIO_PORTB|GPIO_PIN0) +#define GPIO_OTGHS_ULPI_D2 (GPIO_ALT|GPIO_AF10|GPIO_PORTB|GPIO_PIN1) +#define GPIO_OTGHS_ULPI_D3 (GPIO_ALT|GPIO_AF10|GPIO_PORTB|GPIO_PIN10) +#define GPIO_OTGHS_ULPI_D4 (GPIO_ALT|GPIO_AF10|GPIO_PORTB|GPIO_PIN11) +#define GPIO_OTGHS_ULPI_D5 (GPIO_ALT|GPIO_AF10|GPIO_PORTB|GPIO_PIN12) +#define GPIO_OTGHS_ULPI_D6 (GPIO_ALT|GPIO_AF10|GPIO_PORTB|GPIO_PIN13) +#define GPIO_OTGHS_ULPI_D7 (GPIO_ALT|GPIO_AF10|GPIO_PORTB|GPIO_PIN5) +#define GPIO_OTGHS_ULPI_DIR_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTC|GPIO_PIN2) +#define GPIO_OTGHS_ULPI_DIR_2 (GPIO_ALT|GPIO_AF10|GPIO_PORTI|GPIO_PIN11) +#define GPIO_OTGHS_ULPI_NXT_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTC|GPIO_PIN3) +#define GPIO_OTGHS_ULPI_NXT_2 (GPIO_ALT|GPIO_AF10|GPIO_PORTH|GPIO_PIN4) +#define GPIO_OTGHS_ULPI_STP (GPIO_ALT|GPIO_AF10|GPIO_PORTC|GPIO_PIN0) + +/* QuadSPI */ + +#define GPIO_QUADSPI_BK1_IO0_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTF|GPIO_PIN8) +#define GPIO_QUADSPI_BK1_IO0_2 (GPIO_ALT|GPIO_AF9 |GPIO_PORTC|GPIO_PIN9) +#define GPIO_QUADSPI_BK1_IO0_3 (GPIO_ALT|GPIO_AF9 |GPIO_PORTD|GPIO_PIN11) +#define GPIO_QUADSPI_BK1_IO1_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTF|GPIO_PIN9) +#define GPIO_QUADSPI_BK1_IO1_2 (GPIO_ALT|GPIO_AF9 |GPIO_PORTC|GPIO_PIN10) +#define GPIO_QUADSPI_BK1_IO1_3 (GPIO_ALT|GPIO_AF9 |GPIO_PORTD|GPIO_PIN12) +#define GPIO_QUADSPI_BK1_IO2_1 (GPIO_ALT|GPIO_AF9 |GPIO_PORTE|GPIO_PIN2) +#define GPIO_QUADSPI_BK1_IO2_2 (GPIO_ALT|GPIO_AF9 |GPIO_PORTF|GPIO_PIN7) +#define GPIO_QUADSPI_BK1_IO3_1 (GPIO_ALT|GPIO_AF9 |GPIO_PORTA|GPIO_PIN1) +#define GPIO_QUADSPI_BK1_IO3_2 (GPIO_ALT|GPIO_AF9 |GPIO_PORTD|GPIO_PIN13) +#define GPIO_QUADSPI_BK1_IO3_3 (GPIO_ALT|GPIO_AF9 |GPIO_PORTF|GPIO_PIN6) +#define GPIO_QUADSPI_BK1_NCS_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTB|GPIO_PIN6) +#define GPIO_QUADSPI_BK1_NCS_2 (GPIO_ALT|GPIO_AF9 |GPIO_PORTB|GPIO_PIN10) + +#define GPIO_QUADSPI_BK2_IO0_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTE|GPIO_PIN7) +#define GPIO_QUADSPI_BK2_IO0_2 (GPIO_ALT|GPIO_AF9 |GPIO_PORTH|GPIO_PIN2) +#define GPIO_QUADSPI_BK2_IO1_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTE|GPIO_PIN8) +#define GPIO_QUADSPI_BK2_IO1_2 (GPIO_ALT|GPIO_AF9 |GPIO_PORTH|GPIO_PIN3) +#define GPIO_QUADSPI_BK2_IO2_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTE|GPIO_PIN9) +#define GPIO_QUADSPI_BK2_IO2_2 (GPIO_ALT|GPIO_AF9 |GPIO_PORTG|GPIO_PIN9) +#define GPIO_QUADSPI_BK2_IO3_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTE|GPIO_PIN10) +#define GPIO_QUADSPI_BK2_IO3_2 (GPIO_ALT|GPIO_AF9 |GPIO_PORTG|GPIO_PIN14) +#define GPIO_QUADSPI_BK2_NCS (GPIO_ALT|GPIO_AF9 |GPIO_PORTC|GPIO_PIN11) + +#define GPIO_QUADSPI_CLK_1 (GPIO_ALT|GPIO_AF9 |GPIO_PORTB|GPIO_PIN2) +#define GPIO_QUADSPI_CLK_2 (GPIO_ALT|GPIO_AF9 |GPIO_PORTF|GPIO_PIN10) + +/* RTC */ + +#define GPIO_RTC_REFIN (GPIO_ALT|GPIO_AF0|GPIO_PORTB|GPIO_PIN15) + +/* Serial Audio Interface */ + +#define GPIO_SAI1_FS_A (GPIO_ALT|GPIO_AF6 |GPIO_PORTE|GPIO_PIN4) +#define GPIO_SAI1_FS_B (GPIO_ALT|GPIO_AF6 |GPIO_PORTF|GPIO_PIN9) +#define GPIO_SAI1_MCLK_A_1 (GPIO_ALT|GPIO_AF6 |GPIO_PORTE|GPIO_PIN2) +#define GPIO_SAI1_MCLK_A_2 (GPIO_ALT|GPIO_AF6 |GPIO_PORTG|GPIO_PIN7) +#define GPIO_SAI1_MCLK_B (GPIO_ALT|GPIO_AF6 |GPIO_PORTF|GPIO_PIN7) +#define GPIO_SAI1_SCK_A (GPIO_ALT|GPIO_AF6 |GPIO_PORTE|GPIO_PIN5) +#define GPIO_SAI1_SCK_B (GPIO_ALT|GPIO_AF6 |GPIO_PORTF|GPIO_PIN8) +#define GPIO_SAI1_SD_A_1 (GPIO_ALT|GPIO_AF6 |GPIO_PORTB|GPIO_PIN2) +#define GPIO_SAI1_SD_A_2 (GPIO_ALT|GPIO_AF6 |GPIO_PORTC|GPIO_PIN1) +#define GPIO_SAI1_SD_A_3 (GPIO_ALT|GPIO_AF6 |GPIO_PORTD|GPIO_PIN6) +#define GPIO_SAI1_SD_A_4 (GPIO_ALT|GPIO_AF6 |GPIO_PORTE|GPIO_PIN6) +#define GPIO_SAI1_SD_B_1 (GPIO_ALT|GPIO_AF6 |GPIO_PORTE|GPIO_PIN3) +#define GPIO_SAI1_SD_B_2 (GPIO_ALT|GPIO_AF6 |GPIO_PORTF|GPIO_PIN6) +#define GPIO_SAI2_FS_A_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTD|GPIO_PIN12) +#define GPIO_SAI2_FS_A_2 (GPIO_ALT|GPIO_AF10|GPIO_PORTI|GPIO_PIN7) +#define GPIO_SAI2_FS_B_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTE|GPIO_PIN13) +#define GPIO_SAI2_FS_B_2 (GPIO_ALT|GPIO_AF10|GPIO_PORTG|GPIO_PIN9) +#define GPIO_SAI2_FS_B_3 (GPIO_ALT|GPIO_AF8 |GPIO_PORTA|GPIO_PIN12) +#define GPIO_SAI2_FS_B_4 (GPIO_ALT|GPIO_AF8 |GPIO_PORTC|GPIO_PIN0) +#define GPIO_SAI2_MCLK_A_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTE|GPIO_PIN0) +#define GPIO_SAI2_MCLK_A_2 (GPIO_ALT|GPIO_AF10|GPIO_PORTI|GPIO_PIN4) +#define GPIO_SAI2_MCLK_B_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTA|GPIO_PIN1) +#define GPIO_SAI2_MCLK_B_2 (GPIO_ALT|GPIO_AF10|GPIO_PORTE|GPIO_PIN14) +#define GPIO_SAI2_MCLK_B_3 (GPIO_ALT|GPIO_AF10|GPIO_PORTE|GPIO_PIN6) +#define GPIO_SAI2_MCLK_B_4 (GPIO_ALT|GPIO_AF10|GPIO_PORTH|GPIO_PIN3) +#define GPIO_SAI2_SCK_A_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTD|GPIO_PIN13) +#define GPIO_SAI2_SCK_A_2 (GPIO_ALT|GPIO_AF10|GPIO_PORTI|GPIO_PIN5) +#define GPIO_SAI2_SCK_B_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTE|GPIO_PIN12) +#define GPIO_SAI2_SCK_B_2 (GPIO_ALT|GPIO_AF10|GPIO_PORTH|GPIO_PIN2) +#define GPIO_SAI2_SCK_B_3 (GPIO_ALT|GPIO_AF8 |GPIO_PORTA|GPIO_PIN2) +#define GPIO_SAI2_SD_A_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTD|GPIO_PIN11) +#define GPIO_SAI2_SD_A_2 (GPIO_ALT|GPIO_AF10|GPIO_PORTI|GPIO_PIN6) +#define GPIO_SAI2_SD_B_1 (GPIO_ALT|GPIO_AF10|GPIO_PORTA|GPIO_PIN0) +#define GPIO_SAI2_SD_B_2 (GPIO_ALT|GPIO_AF10|GPIO_PORTE|GPIO_PIN11) +#define GPIO_SAI2_SD_B_3 (GPIO_ALT|GPIO_AF10|GPIO_PORTF|GPIO_PIN11) +#define GPIO_SAI2_SD_B_4 (GPIO_ALT|GPIO_AF10|GPIO_PORTG|GPIO_PIN10) + +/* SD/MMC */ + +#define GPIO_SDMMC1_CK (GPIO_ALT|GPIO_AF12|GPIO_PORTC|GPIO_PIN12) +#define GPIO_SDMMC1_CMD (GPIO_ALT|GPIO_AF12|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN2) +#define GPIO_SDMMC1_D0 (GPIO_ALT|GPIO_AF12|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN8) +#define GPIO_SDMMC1_D1 (GPIO_ALT|GPIO_AF12|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN9) +#define GPIO_SDMMC1_D2 (GPIO_ALT|GPIO_AF12|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN10) +#define GPIO_SDMMC1_D3 (GPIO_ALT|GPIO_AF12|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN11) +#define GPIO_SDMMC1_D4 (GPIO_ALT|GPIO_AF12|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN8) +#define GPIO_SDMMC1_D5 (GPIO_ALT|GPIO_AF12|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN9) +#define GPIO_SDMMC1_D6 (GPIO_ALT|GPIO_AF12|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN6) +#define GPIO_SDMMC1_D7 (GPIO_ALT|GPIO_AF12|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN7) + +#define GPIO_SDMMC2_CK (GPIO_ALT|GPIO_AF11|GPIO_PORTD|GPIO_PIN6) +#define GPIO_SDMMC2_CMD (GPIO_ALT|GPIO_AF11|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN7) +#define GPIO_SDMMC2_D0_1 (GPIO_ALT|GPIO_AF10|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN14) +#define GPIO_SDMMC2_D1_1 (GPIO_ALT|GPIO_AF10|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN15) +#define GPIO_SDMMC2_D2_1 (GPIO_ALT|GPIO_AF10|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN) +#define GPIO_SDMMC2_D3_1 (GPIO_ALT|GPIO_AF10|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN4) +#define GPIO_SDMMC2_D0_2 (GPIO_ALT|GPIO_AF11|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN9) +#define GPIO_SDMMC2_D1_2 (GPIO_ALT|GPIO_AF11|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN10) +#define GPIO_SDMMC2_D2_2 (GPIO_ALT|GPIO_AF10|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN11) +#define GPIO_SDMMC2_D3_2 (GPIO_ALT|GPIO_AF11|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN12) +#define GPIO_SDMMC2_D4 (GPIO_ALT|GPIO_AF10|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN8) +#define GPIO_SDMMC2_D5 (GPIO_ALT|GPIO_AF10|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN9) +#define GPIO_SDMMC2_D6 (GPIO_ALT|GPIO_AF10|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN6) +#define GPIO_SDMMC2_D7 (GPIO_ALT|GPIO_AF10|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN7) + + +/* SPDIFRX */ + +#define GPIO_SPDIFRX_IN0_1 (GPIO_ALT|GPIO_AF7|GPIO_PORTG|GPIO_PIN11) +#define GPIO_SPDIFRX_IN0_2 (GPIO_ALT|GPIO_AF8|GPIO_PORTD|GPIO_PIN7) +#define GPIO_SPDIFRX_IN1_1 (GPIO_ALT|GPIO_AF7|GPIO_PORTG|GPIO_PIN12) +#define GPIO_SPDIFRX_IN1_2 (GPIO_ALT|GPIO_AF8|GPIO_PORTD|GPIO_PIN8) +#define GPIO_SPDIFRX_IN2_1 (GPIO_ALT|GPIO_AF7|GPIO_PORTG|GPIO_PIN8) +#define GPIO_SPDIFRX_IN2_2 (GPIO_ALT|GPIO_AF8|GPIO_PORTC|GPIO_PIN4) +#define GPIO_SPDIFRX_IN3_1 (GPIO_ALT|GPIO_AF7|GPIO_PORTG|GPIO_PIN9) +#define GPIO_SPDIFRX_IN3_2 (GPIO_ALT|GPIO_AF8|GPIO_PORTC|GPIO_PIN5) + +/* SPI */ + +#define GPIO_SPI1_MISO_1 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN6) +#define GPIO_SPI1_MISO_2 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN4) +#define GPIO_SPI1_MISO_3 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTG|GPIO_PIN9) +#define GPIO_SPI1_MOSI_1 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN7) +#define GPIO_SPI1_MOSI_2 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN5) +#define GPIO_SPI1_MOSI_3 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTD|GPIO_PIN7) +#define GPIO_SPI1_NSS_1 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN15) +#define GPIO_SPI1_NSS_2 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN4) +#define GPIO_SPI1_NSS_3 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTG|GPIO_PIN10) +#define GPIO_SPI1_SCK_1 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN5) +#define GPIO_SPI1_SCK_2 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN3) +#define GPIO_SPI1_SCK_3 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTG|GPIO_PIN11) + +#define GPIO_SPI2_MISO_1 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN14) +#define GPIO_SPI2_MISO_2 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTC|GPIO_PIN2) +#define GPIO_SPI2_MISO_3 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTI|GPIO_PIN2) +#define GPIO_SPI2_MOSI_1 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN15) +#define GPIO_SPI2_MOSI_2 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTC|GPIO_PIN3) +#define GPIO_SPI2_MOSI_3 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTI|GPIO_PIN3) +#define GPIO_SPI2_NSS_1 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN12) +#define GPIO_SPI2_NSS_2 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN9) +#define GPIO_SPI2_NSS_3 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTI|GPIO_PIN0) +#define GPIO_SPI2_NSS_4 (GPIO_ALT|GPIO_AF7|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN4) +#define GPIO_SPI2_NSS_5 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN11) +#define GPIO_SPI2_SCK_1 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN9) +#define GPIO_SPI2_SCK_2 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN10) +#define GPIO_SPI2_SCK_3 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN13) +#define GPIO_SPI2_SCK_4 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTD|GPIO_PIN3) +#define GPIO_SPI2_SCK_5 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTI|GPIO_PIN1) +#define GPIO_SPI2_SCK_6 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTIA|GPIO_PIN12) + +#define GPIO_SPI3_MISO_1 (GPIO_ALT|GPIO_AF6|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN4) +#define GPIO_SPI3_MISO_2 (GPIO_ALT|GPIO_AF6|GPIO_SPEED_50MHz|GPIO_PORTC|GPIO_PIN11) +#define GPIO_SPI3_MOSI_1 (GPIO_ALT|GPIO_AF7|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN2) +#define GPIO_SPI3_MOSI_2 (GPIO_ALT|GPIO_AF6|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN5) +#define GPIO_SPI3_MOSI_3 (GPIO_ALT|GPIO_AF6|GPIO_SPEED_50MHz|GPIO_PORTC|GPIO_PIN12) +#define GPIO_SPI3_MOSI_4 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTD|GPIO_PIN6) +#define GPIO_SPI3_NSS_1 (GPIO_ALT|GPIO_AF6|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN15) +#define GPIO_SPI3_NSS_2 (GPIO_ALT|GPIO_AF6|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN4) +#define GPIO_SPI3_SCK_1 (GPIO_ALT|GPIO_AF6|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN3) +#define GPIO_SPI3_SCK_2 (GPIO_ALT|GPIO_AF6|GPIO_SPEED_50MHz|GPIO_PORTC|GPIO_PIN10) + +#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) +#define GPIO_SPI4_MOSI_2 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTE|GPIO_PIN14) +#define GPIO_SPI4_NSS_1 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTE|GPIO_PIN4) +#define GPIO_SPI4_NSS_2 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTE|GPIO_PIN11) +#define GPIO_SPI4_SCK_1 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTE|GPIO_PIN2) +#define GPIO_SPI4_SCK_2 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTE|GPIO_PIN12) + +#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) +#define GPIO_SPI5_MOSI_2 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTF|GPIO_PIN11) +#define GPIO_SPI5_NSS_1 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTF|GPIO_PIN6) +#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) + +#define GPIO_SPI6_MISO_1 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTG|GPIO_PIN12) +#define GPIO_SPI6_MOSI_1 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTG|GPIO_PIN14) +#define GPIO_SPI6_NSS_1 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTG|GPIO_PIN8) +#define GPIO_SPI6_SCK_1 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTG|GPIO_PIN13) +#define GPIO_SPI6_MISO_2 (GPIO_ALT|GPIO_AF8|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN6) +#define GPIO_SPI6_MOSI_2 (GPIO_ALT|GPIO_AF8|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN7) +#define GPIO_SPI6_NSS_2 (GPIO_ALT|GPIO_AF8|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN4) +#define GPIO_SPI6_SCK_2 (GPIO_ALT|GPIO_AF8|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN5) +#define GPIO_SPI6_MISO_3 (GPIO_ALT|GPIO_AF8|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN4) +#define GPIO_SPI6_MOSI_3 (GPIO_ALT|GPIO_AF8|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN5) +#define GPIO_SPI6_NSS_3 (GPIO_ALT|GPIO_AF7|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN15) +#define GPIO_SPI6_SCK_3 (GPIO_ALT|GPIO_AF8|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN3) + +/* Timers */ + +#define GPIO_TIM1_BKIN_1 (GPIO_ALT|GPIO_AF1|GPIO_PORTA|GPIO_PIN6) +#define GPIO_TIM1_BKIN_2 (GPIO_ALT|GPIO_AF1|GPIO_PORTB|GPIO_PIN12) +#define GPIO_TIM1_BKIN_3 (GPIO_ALT|GPIO_AF1|GPIO_PORTE|GPIO_PIN15) +#define GPIO_TIM1_BKIN2 (GPIO_ALT|GPIO_AF1|GPIO_PORTE|GPIO_PIN6) +#define GPIO_TIM1_CH1N_1 (GPIO_ALT|GPIO_AF1|GPIO_PORTA|GPIO_PIN7) +#define GPIO_TIM1_CH1N_2 (GPIO_ALT|GPIO_AF1|GPIO_PORTB|GPIO_PIN13) +#define GPIO_TIM1_CH1N_3 (GPIO_ALT|GPIO_AF1|GPIO_PORTE|GPIO_PIN8) +#define GPIO_TIM1_CH1IN_1 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN8) +#define GPIO_TIM1_CH1IN_2 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTE|GPIO_PIN9) +#define GPIO_TIM1_CH1OUT_1 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN8) +#define GPIO_TIM1_CH1OUT_2 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN9) +#define GPIO_TIM1_CH1N_1 (GPIO_ALT|GPIO_AF1|GPIO_PORTA|GPIO_PIN7) +#define GPIO_TIM1_CH1N_2 (GPIO_ALT|GPIO_AF1|GPIO_PORTB|GPIO_PIN13) +#define GPIO_TIM1_CH1N_3 (GPIO_ALT|GPIO_AF1|GPIO_PORTE|GPIO_PIN8) +#define GPIO_TIM1_CH2IN_1 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN9) +#define GPIO_TIM1_CH2IN_2 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTE|GPIO_PIN11) +#define GPIO_TIM1_CH2OUT_1 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN9) +#define GPIO_TIM1_CH2OUT_2 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN11) +#define GPIO_TIM1_CH2N_1 (GPIO_ALT|GPIO_AF1|GPIO_PORTB|GPIO_PIN0) +#define GPIO_TIM1_CH2N_2 (GPIO_ALT|GPIO_AF1|GPIO_PORTB|GPIO_PIN14) +#define GPIO_TIM1_CH2N_3 (GPIO_ALT|GPIO_AF1|GPIO_PORTE|GPIO_PIN10) +#define GPIO_TIM1_CH3IN_1 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN10) +#define GPIO_TIM1_CH3IN_2 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTE|GPIO_PIN13) +#define GPIO_TIM1_CH3OUT_1 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN10) +#define GPIO_TIM1_CH3OUT_2 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN13) +#define GPIO_TIM1_CH3N_1 (GPIO_ALT|GPIO_AF1|GPIO_PORTB|GPIO_PIN1) +#define GPIO_TIM1_CH3N_2 (GPIO_ALT|GPIO_AF1|GPIO_PORTB|GPIO_PIN15) +#define GPIO_TIM1_CH3N_3 (GPIO_ALT|GPIO_AF1|GPIO_PORTE|GPIO_PIN12) +#define GPIO_TIM1_CH4IN_1 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN11) +#define GPIO_TIM1_CH4IN_2 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTE|GPIO_PIN14) +#define GPIO_TIM1_CH4OUT_1 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN11) +#define GPIO_TIM1_CH4OUT_2 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN14) +#define GPIO_TIM1_ETR_1 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN12) +#define GPIO_TIM1_ETR_2 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTE|GPIO_PIN7) + +#define GPIO_TIM2_CH1IN_1 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN0) +#define GPIO_TIM2_CH1IN_2 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN15) +#define GPIO_TIM2_CH1IN_3 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN5) +#define GPIO_TIM2_CH1OUT_1 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN0) +#define GPIO_TIM2_CH1OUT_2 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN15) +#define GPIO_TIM2_CH1OUT_3 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN5) +#define GPIO_TIM2_CH2IN_1 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN1) +#define GPIO_TIM2_CH2IN_2 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTB|GPIO_PIN3) +#define GPIO_TIM2_CH2OUT_1 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN1) +#define GPIO_TIM2_CH2OUT_2 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN3) +#define GPIO_TIM2_CH3IN_1 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN2) +#define GPIO_TIM2_CH3IN_2 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTB|GPIO_PIN10) +#define GPIO_TIM2_CH3OUT_1 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN2) +#define GPIO_TIM2_CH3OUT_2 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN10) +#define GPIO_TIM2_CH4IN_1 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN3) +#define GPIO_TIM2_CH4IN_2 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTB|GPIO_PIN11) +#define GPIO_TIM2_CH4OUT_1 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN3) +#define GPIO_TIM2_CH4OUT_2 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN11) +#define GPIO_TIM2_ETR_1 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN0) +#define GPIO_TIM2_ETR_2 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN15) +#define GPIO_TIM2_ETR_3 (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN5) + +#define GPIO_TIM3_CH1IN_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN6) +#define GPIO_TIM3_CH1IN_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTB|GPIO_PIN4) +#define GPIO_TIM3_CH1IN_3 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTC|GPIO_PIN6) +#define GPIO_TIM3_CH1OUT_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN6) +#define GPIO_TIM3_CH1OUT_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN4) +#define GPIO_TIM3_CH1OUT_3 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN6) +#define GPIO_TIM3_CH2IN_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN7) +#define GPIO_TIM3_CH2IN_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTB|GPIO_PIN5) +#define GPIO_TIM3_CH2IN_3 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTC|GPIO_PIN7) +#define GPIO_TIM3_CH2OUT_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN7) +#define GPIO_TIM3_CH2OUT_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN5) +#define GPIO_TIM3_CH2OUT_3 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN7) +#define GPIO_TIM3_CH3IN_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTB|GPIO_PIN0) +#define GPIO_TIM3_CH3IN_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTC|GPIO_PIN8) +#define GPIO_TIM3_CH3OUT_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN0) +#define GPIO_TIM3_CH3OUT_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN8) +#define GPIO_TIM3_CH4IN_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTB|GPIO_PIN1) +#define GPIO_TIM3_CH4IN_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTC|GPIO_PIN9) +#define GPIO_TIM3_CH4OUT_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN1) +#define GPIO_TIM3_CH4OUT_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN9) +#define GPIO_TIM3_ETR (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTD|GPIO_PIN2) + +#define GPIO_TIM4_CH1IN_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTB|GPIO_PIN6) +#define GPIO_TIM4_CH1IN_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTD|GPIO_PIN12) +#define GPIO_TIM4_CH1OUT_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN6) +#define GPIO_TIM4_CH1OUT_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN12) +#define GPIO_TIM4_CH2IN_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTB|GPIO_PIN7) +#define GPIO_TIM4_CH2IN_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTD|GPIO_PIN13) +#define GPIO_TIM4_CH2OUT_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN7) +#define GPIO_TIM4_CH2OUT_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN13) +#define GPIO_TIM4_CH3IN_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTB|GPIO_PIN8) +#define GPIO_TIM4_CH3IN_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTD|GPIO_PIN14) +#define GPIO_TIM4_CH3OUT_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN8) +#define GPIO_TIM4_CH3OUT_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN14) +#define GPIO_TIM4_CH4IN_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTB|GPIO_PIN9) +#define GPIO_TIM4_CH4IN_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTD|GPIO_PIN15) +#define GPIO_TIM4_CH4OUT_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN9) +#define GPIO_TIM4_CH4OUT_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN15) +#define GPIO_TIM4_ETR (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTE|GPIO_PIN0) + +#define GPIO_TIM5_CH1IN_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN0) +#define GPIO_TIM5_CH1IN_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTH|GPIO_PIN10) +#define GPIO_TIM5_CH1OUT_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN0) +#define GPIO_TIM5_CH1OUT_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN10) + +#define GPIO_TIM5_CH2IN_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN1) +#define GPIO_TIM5_CH2IN_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTH|GPIO_PIN11) +#define GPIO_TIM5_CH2OUT_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN1) +#define GPIO_TIM5_CH2OUT_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN11) + +#define GPIO_TIM5_CH3IN_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN2) +#define GPIO_TIM5_CH3IN_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTH|GPIO_PIN12) +#define GPIO_TIM5_CH3OUT_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN2) +#define GPIO_TIM5_CH3OUT_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN12) + +#define GPIO_TIM5_CH4IN_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN3) +#define GPIO_TIM5_CH4IN_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTI|GPIO_PIN0) +#define GPIO_TIM5_CH4OUT_1 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN3) +#define GPIO_TIM5_CH4OUT_2 (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTI|GPIO_PIN0) + +#define GPIO_TIM8_BKIN_1 (GPIO_ALT|GPIO_AF3|GPIO_PORTA|GPIO_PIN6) +#define GPIO_TIM8_BKIN_2 (GPIO_ALT|GPIO_AF3|GPIO_PORTI|GPIO_PIN4) +#define GPIO_TIM8_BKIN2_1 (GPIO_ALT|GPIO_AF3|GPIO_PORTA|GPIO_PIN8) +#define GPIO_TIM8_BKIN2_2 (GPIO_ALT|GPIO_AF3|GPIO_PORTI|GPIO_PIN1) +#define GPIO_TIM8_CH1IN_1 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTC|GPIO_PIN6) +#define GPIO_TIM8_CH1IN_2 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTI|GPIO_PIN5) +#define GPIO_TIM8_CH1OUT_1 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN6) +#define GPIO_TIM8_CH1OUT_2 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTI|GPIO_PIN5) +#define GPIO_TIM8_CH1N_1 (GPIO_ALT|GPIO_AF3|GPIO_PORTA|GPIO_PIN5) +#define GPIO_TIM8_CH1N_2 (GPIO_ALT|GPIO_AF3|GPIO_PORTA|GPIO_PIN7) +#define GPIO_TIM8_CH1N_3 (GPIO_ALT|GPIO_AF3|GPIO_PORTH|GPIO_PIN13) +#define GPIO_TIM8_CH2IN_1 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTC|GPIO_PIN7) +#define GPIO_TIM8_CH2IN_2 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTI|GPIO_PIN6) +#define GPIO_TIM8_CH2OUT_1 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN7) +#define GPIO_TIM8_CH2OUT_2 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTI|GPIO_PIN6) +#define GPIO_TIM8_CH2N_1 (GPIO_ALT|GPIO_AF3|GPIO_PORTB|GPIO_PIN0) +#define GPIO_TIM8_CH2N_2 (GPIO_ALT|GPIO_AF3|GPIO_PORTB|GPIO_PIN14) +#define GPIO_TIM8_CH2N_3 (GPIO_ALT|GPIO_AF3|GPIO_PORTH|GPIO_PIN14) +#define GPIO_TIM8_CH3IN_1 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTC|GPIO_PIN8) +#define GPIO_TIM8_CH3IN_2 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTI|GPIO_PIN7) +#define GPIO_TIM8_CH3OUT_1 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN8) +#define GPIO_TIM8_CH3OUT_2 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTI|GPIO_PIN7) +#define GPIO_TIM8_CH3N_1 (GPIO_ALT|GPIO_AF3|GPIO_PORTB|GPIO_PIN1) +#define GPIO_TIM8_CH3N_2 (GPIO_ALT|GPIO_AF3|GPIO_PORTB|GPIO_PIN15) +#define GPIO_TIM8_CH3N_3 (GPIO_ALT|GPIO_AF3|GPIO_PORTH|GPIO_PIN15) +#define GPIO_TIM8_CH4IN_1 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTC|GPIO_PIN9) +#define GPIO_TIM8_CH4IN_2 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTI|GPIO_PIN2) +#define GPIO_TIM8_CH4OUT_1 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN9) +#define GPIO_TIM8_CH4OUT_2 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTI|GPIO_PIN2) +#define GPIO_TIM8_ETR_1 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN0) +#define GPIO_TIM8_ETR_2 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTI|GPIO_PIN3) + +#define GPIO_TIM9_CH1IN_1 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN2) +#define GPIO_TIM9_CH1IN_2 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTE|GPIO_PIN5) +#define GPIO_TIM9_CH1OUT_1 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN2) +#define GPIO_TIM9_CH1OUT_2 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN5) +#define GPIO_TIM9_CH2IN_1 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN3) +#define GPIO_TIM9_CH2IN_2 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTE|GPIO_PIN6) +#define GPIO_TIM9_CH2OUT_1 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN3) +#define GPIO_TIM9_CH2OUT_2 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN6) + +#define GPIO_TIM10_CH1IN_1 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTB|GPIO_PIN8) +#define GPIO_TIM10_CH1IN_2 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTF|GPIO_PIN6) +#define GPIO_TIM10_CH1OUT_1 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN8) +#define GPIO_TIM10_CH1OUT_2 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN6) + +#define GPIO_TIM11_CH1IN_1 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTB|GPIO_PIN9) +#define GPIO_TIM11_CH1IN_2 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTF|GPIO_PIN7) +#define GPIO_TIM11_CH1OUT_1 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN9) +#define GPIO_TIM11_CH1OUT_2 (GPIO_ALT|GPIO_AF3|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN7) + +#define GPIO_TIM12_CH1IN_1 (GPIO_ALT|GPIO_AF9|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTB|GPIO_PIN14) +#define GPIO_TIM12_CH1IN_2 (GPIO_ALT|GPIO_AF9|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTH|GPIO_PIN6) +#define GPIO_TIM12_CH1OUT_1 (GPIO_ALT|GPIO_AF9|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN14) +#define GPIO_TIM12_CH1OUT_2 (GPIO_ALT|GPIO_AF9|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN6) + +#define GPIO_TIM12_CH2IN_1 (GPIO_ALT|GPIO_AF9|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTB|GPIO_PIN15) +#define GPIO_TIM12_CH2IN_2 (GPIO_ALT|GPIO_AF9|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTH|GPIO_PIN9) +#define GPIO_TIM12_CH2OUT_1 (GPIO_ALT|GPIO_AF9|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN15) +#define GPIO_TIM12_CH2OUT_2 (GPIO_ALT|GPIO_AF9|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN9) + +#define GPIO_TIM13_CH1IN_1 (GPIO_ALT|GPIO_AF9|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN6) +#define GPIO_TIM13_CH1IN_2 (GPIO_ALT|GPIO_AF9|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTF|GPIO_PIN8) +#define GPIO_TIM13_CH1OUT_1 (GPIO_ALT|GPIO_AF9|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN6) +#define GPIO_TIM13_CH1OUT_2 (GPIO_ALT|GPIO_AF9|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN8) + +#define GPIO_TIM14_CH1IN_1 (GPIO_ALT|GPIO_AF9|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN7) +#define GPIO_TIM14_CH1IN_2 (GPIO_ALT|GPIO_AF9|GPIO_SPEED_50MHz|GPIO_FLOAT|GPIO_PORTF|GPIO_PIN9) +#define GPIO_TIM14_CH1OUT_1 (GPIO_ALT|GPIO_AF9|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN7) +#define GPIO_TIM14_CH1OUT_2 (GPIO_ALT|GPIO_AF9|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN9) + +/* Trace */ + +#define GPIO_TRACECLK (GPIO_ALT|GPIO_AF0|GPIO_PORTE|GPIO_PIN2) +#define GPIO_TRACED0_1 (GPIO_ALT|GPIO_AF0|GPIO_PORTC|GPIO_PIN1) +#define GPIO_TRACED0_2 (GPIO_ALT|GPIO_AF0|GPIO_PORTE|GPIO_PIN3) +#define GPIO_TRACED0_3 (GPIO_ALT|GPIO_AF0|GPIO_PORTG|GPIO_PIN13) +#define GPIO_TRACED1_1 (GPIO_ALT|GPIO_AF0|GPIO_PORTC|GPIO_PIN8) +#define GPIO_TRACED1_2 (GPIO_ALT|GPIO_AF0|GPIO_PORTE|GPIO_PIN4) +#define GPIO_TRACED1_3 (GPIO_ALT|GPIO_AF0|GPIO_PORTG|GPIO_PIN14) +#define GPIO_TRACED2_1 (GPIO_ALT|GPIO_AF0|GPIO_PORTD|GPIO_PIN2) +#define GPIO_TRACED2_2 (GPIO_ALT|GPIO_AF0|GPIO_PORTE|GPIO_PIN5) +#define GPIO_TRACED3_1 (GPIO_ALT|GPIO_AF0|GPIO_PORTC|GPIO_PIN12) +#define GPIO_TRACED3_2 (GPIO_ALT|GPIO_AF0|GPIO_PORTE|GPIO_PIN6) +#define GPIO_TRACESWO (GPIO_ALT|GPIO_AF0|GPIO_PORTB|GPIO_PIN3) + +/* UARTs/USARTs */ + +#define GPIO_USART1_CK (GPIO_ALT|GPIO_AF7|GPIO_PORTA|GPIO_PIN8) +#define GPIO_USART1_CTS (GPIO_ALT|GPIO_AF7|GPIO_PORTA|GPIO_PIN11) +#define GPIO_USART1_RTS (GPIO_ALT|GPIO_AF7|GPIO_PORTA|GPIO_PIN12) +#define GPIO_USART1_RX_1 (GPIO_ALT|GPIO_AF7|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN10) +#define GPIO_USART1_RX_2 (GPIO_ALT|GPIO_AF7|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN7) +#define GPIO_USART1_RX_3 (GPIO_ALT|GPIO_AF4|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN15) +#define GPIO_USART1_TX_1 (GPIO_ALT|GPIO_AF7|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN9) +#define GPIO_USART1_TX_2 (GPIO_ALT|GPIO_AF7|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN6) +#define GPIO_USART1_TX_3 (GPIO_ALT|GPIO_AF4|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN14) + +#define GPIO_USART2_CK_1 (GPIO_ALT|GPIO_AF7|GPIO_PORTA|GPIO_PIN4) +#define GPIO_USART2_CK_2 (GPIO_ALT|GPIO_AF7|GPIO_PORTD|GPIO_PIN7) +#define GPIO_USART2_CTS_1 (GPIO_ALT|GPIO_AF7|GPIO_PORTA|GPIO_PIN0) +#define GPIO_USART2_CTS_2 (GPIO_ALT|GPIO_AF7|GPIO_PORTD|GPIO_PIN3) +#define GPIO_USART2_RTS_1 (GPIO_ALT|GPIO_AF7|GPIO_PORTA|GPIO_PIN1) +#define GPIO_USART2_RTS_2 (GPIO_ALT|GPIO_AF7|GPIO_PORTD|GPIO_PIN4) +#define GPIO_USART2_RX_1 (GPIO_ALT|GPIO_AF7|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN3) +#define GPIO_USART2_RX_2 (GPIO_ALT|GPIO_AF7|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN6) +#define GPIO_USART2_TX_1 (GPIO_ALT|GPIO_AF7|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN2) +#define GPIO_USART2_TX_2 (GPIO_ALT|GPIO_AF7|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN5) + +#define GPIO_USART3_CK_1 (GPIO_ALT|GPIO_AF7|GPIO_PORTB|GPIO_PIN12) +#define GPIO_USART3_CK_2 (GPIO_ALT|GPIO_AF7|GPIO_PORTC|GPIO_PIN12) +#define GPIO_USART3_CK_3 (GPIO_ALT|GPIO_AF7|GPIO_PORTD|GPIO_PIN10) +#define GPIO_USART3_CTS_1 (GPIO_ALT|GPIO_AF7|GPIO_PORTB|GPIO_PIN13) +#define GPIO_USART3_CTS_2 (GPIO_ALT|GPIO_AF7|GPIO_PORTD|GPIO_PIN11) +#define GPIO_USART3_RTS_1 (GPIO_ALT|GPIO_AF7|GPIO_PORTB|GPIO_PIN14) +#define GPIO_USART3_RTS_2 (GPIO_ALT|GPIO_AF7|GPIO_PORTD|GPIO_PIN12) +#define GPIO_USART3_RX_1 (GPIO_ALT|GPIO_AF7|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN11) +#define GPIO_USART3_RX_2 (GPIO_ALT|GPIO_AF7|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN11) +#define GPIO_USART3_RX_3 (GPIO_ALT|GPIO_AF7|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN9) +#define GPIO_USART3_TX_1 (GPIO_ALT|GPIO_AF7|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN10) +#define GPIO_USART3_TX_2 (GPIO_ALT|GPIO_AF7|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN10) +#define GPIO_USART3_TX_3 (GPIO_ALT|GPIO_AF7|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN8) + +#define GPIO_UART4_CTS_1 (GPIO_ALT|GPIO_AF8|GPIO_PORTB|GPIO_PIN0) +#define GPIO_UART4_CTS_2 (GPIO_ALT|GPIO_AF8|GPIO_PORTB|GPIO_PIN15) +#define GPIO_UART4_RTS_1 (GPIO_ALT|GPIO_AF8|GPIO_PORTA|GPIO_PIN15) +#define GPIO_UART4_RTS_2 (GPIO_ALT|GPIO_AF8|GPIO_PORTB|GPIO_PIN14) +#define GPIO_UART4_RX_1 (GPIO_ALT|GPIO_AF8|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN1) +#define GPIO_UART4_RX_2 (GPIO_ALT|GPIO_AF8|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN11) +#define GPIO_UART4_RX_3 (GPIO_ALT|GPIO_AF6|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN11) +#define GPIO_UART4_RX_4 (GPIO_ALT|GPIO_AF8|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN0) +#define GPIO_UART4_RX_5 (GPIO_ALT|GPIO_AF8|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN14) +#define GPIO_UART4_RX_6 (GPIO_ALT|GPIO_AF8|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTI|GPIO_PIN9) +#define GPIO_UART4_TX_1 (GPIO_ALT|GPIO_AF8|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN0) +#define GPIO_UART4_TX_2 (GPIO_ALT|GPIO_AF8|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN10) +#define GPIO_UART4_TX_3 (GPIO_ALT|GPIO_AF6|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN12) +#define GPIO_UART4_TX_4 (GPIO_ALT|GPIO_AF8|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN1) +#define GPIO_UART4_TX_5 (GPIO_ALT|GPIO_AF8|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN13) + +#define GPIO_UART5_CTS_1 (GPIO_ALT|GPIO_AF7|GPIO_PORTC|GPIO_PIN9) +#define GPIO_UART5_RTS_1 (GPIO_ALT|GPIO_AF7|GPIO_PORTC|GPIO_PIN8) +#define GPIO_UART5_RX_1 (GPIO_ALT|GPIO_AF8|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN2) +#define GPIO_UART5_TX_1 (GPIO_ALT|GPIO_AF8|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN12) +#define GPIO_UART5_RX_2 (GPIO_ALT|GPIO_AF1|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN5) +#define GPIO_UART5_TX_2 (GPIO_ALT|GPIO_AF1|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN6) +#define GPIO_UART5_RX_3 (GPIO_ALT|GPIO_AF8|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN12) +#define GPIO_UART5_TX_3 (GPIO_ALT|GPIO_AF8|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN13) +#define GPIO_UART5_RX_4 (GPIO_ALT|GPIO_AF7|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN8) +#define GPIO_UART5_TX_4 (GPIO_ALT|GPIO_AF7|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN9) + +#define GPIO_USART6_CK_1 (GPIO_ALT|GPIO_AF8|GPIO_PORTC|GPIO_PIN8) +#define GPIO_USART6_CK_2 (GPIO_ALT|GPIO_AF8|GPIO_PORTG|GPIO_PIN7) +#define GPIO_USART6_CTS_1 (GPIO_ALT|GPIO_AF8|GPIO_PORTG|GPIO_PIN13) +#define GPIO_USART6_CTS_2 (GPIO_ALT|GPIO_AF8|GPIO_PORTG|GPIO_PIN15) +#define GPIO_USART6_RTS_1 (GPIO_ALT|GPIO_AF8|GPIO_PORTG|GPIO_PIN12) +#define GPIO_USART6_RTS_2 (GPIO_ALT|GPIO_AF8|GPIO_PORTG|GPIO_PIN8) +#define GPIO_USART6_RX_1 (GPIO_ALT|GPIO_AF8|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN7) +#define GPIO_USART6_RX_2 (GPIO_ALT|GPIO_AF8|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN9) +#define GPIO_USART6_TX_1 (GPIO_ALT|GPIO_AF8|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN6) +#define GPIO_USART6_TX_2 (GPIO_ALT|GPIO_AF8|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN14) + +#define GPIO_UART7_CTS_1 (GPIO_ALT|GPIO_AF8|GPIO_PORTE|GPIO_PIN10) +#define GPIO_UART7_CTS_2 (GPIO_ALT|GPIO_AF8|GPIO_PORTF|GPIO_PIN9) +#define GPIO_UART7_RTS_1 (GPIO_ALT|GPIO_AF8|GPIO_PORTE|GPIO_PIN9) +#define GPIO_UART7_RTS_2 (GPIO_ALT|GPIO_AF8|GPIO_PORTF|GPIO_PIN8) +#define GPIO_UART7_RX_1 (GPIO_ALT|GPIO_AF8|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN7) +#define GPIO_UART7_RX_2 (GPIO_ALT|GPIO_AF8|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN6) +#define GPIO_UART7_RX_3 (GPIO_ALT|GPIO_AF12|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN8) +#define GPIO_UART7_RX_4 (GPIO_ALT|GPIO_AF12|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN3) +#define GPIO_UART7_TX_1 (GPIO_ALT|GPIO_AF8|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN8) +#define GPIO_UART7_TX_2 (GPIO_ALT|GPIO_AF8|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN7) +#define GPIO_UART7_TX_3 (GPIO_ALT|GPIO_AF12|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN15) +#define GPIO_UART7_TX_4 (GPIO_ALT|GPIO_AF12|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN4) + +#define GPIO_UART8_CTS (GPIO_ALT|GPIO_AF8|GPIO_PORTD|GPIO_PIN14) +#define GPIO_UART8_RTS (GPIO_ALT|GPIO_AF8|GPIO_PORTD|GPIO_PIN15) +#define GPIO_UART8_RX (GPIO_ALT|GPIO_AF8|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN0) +#define GPIO_UART8_TX (GPIO_ALT|GPIO_AF8|GPIO_PULLUP|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN1) + +#endif /* CONFIG_STM32F7_STM32F76XX || CONFIG_STM32F7_STM32F77XX */ +#endif /* __ARCH_ARM_SRC_STM32_CHIP_STM32F76XX77XX_PINMAP_H */ diff --git a/arch/arm/src/stm32f7/chip/stm32f76xx77xx_pwr.h b/arch/arm/src/stm32f7/chip/stm32f76xx77xx_pwr.h new file mode 100644 index 0000000000000000000000000000000000000000..21f78951f94cb0a694f44e033f49de457206e76c --- /dev/null +++ b/arch/arm/src/stm32f7/chip/stm32f76xx77xx_pwr.h @@ -0,0 +1,159 @@ +/************************************************************************************ + * arch/arm/src/stm32f7/chip/stm32f76xx77xx_pwr.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: 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. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32F7_CHIP_STM32F76XX77XX_PWR_H +#define __ARCH_ARM_SRC_STM32F7_CHIP_STM32F76XX77XX_PWR_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#if defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F76XX) + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Register Offsets *****************************************************************/ + +#define STM32_PWR_CR1_OFFSET 0x0000 /* Power control register 1 */ +#define STM32_PWR_CSR1_OFFSET 0x0004 /* Power control/status register 1 */ +#define STM32_PWR_CR2_OFFSET 0x0008 /* Power control register 1 */ +#define STM32_PWR_CSR2_OFFSET 0x000c /* Power control/status register 1 */ + +/* Register Addresses ***************************************************************/ + +#define STM32_PWR_CR1 (STM32_PWR_BASE+STM32_PWR_CR1_OFFSET) +#define STM32_PWR_CSR1 (STM32_PWR_BASE+STM32_PWR_CSR1_OFFSET) +#define STM32_PWR_CR2 (STM32_PWR_BASE+STM32_PWR_CR2_OFFSET) +#define STM32_PWR_CSR2 (STM32_PWR_BASE+STM32_PWR_CSR2_OFFSET) + +/* Register Bitfield Definitions ****************************************************/ + +/* Power control register 1 */ + +#define PWR_CR1_LPDS (1 << 0) /* Bit 0: Low-Power Deepsleep/sleep; low power run */ +#define PWR_CR1_PDDS (1 << 1) /* Bit 1: Power Down Deepsleep */ +#define PWR_CR1_CSBF (1 << 3) /* Bit 3: Clear Standby Flag */ +#define PWR_CR1_PVDE (1 << 4) /* Bit 4: Power Voltage Detector Enable */ +#define PWR_CR1_PLS_SHIFT (5) /* Bits 7-5: PVD Level Selection */ +#define PWR_CR1_PLS_MASK (7 << PWR_CR1_PLS_SHIFT) +# define PWR_CR1_2p0V (0 << PWR_CR1_PLS_SHIFT) /* 000: 2.0V */ +# define PWR_CR1_2p1V (1 << PWR_CR1_PLS_SHIFT) /* 001: 2.1V */ +# define PWR_CR1_2p3V (2 << PWR_CR1_PLS_SHIFT) /* 010: 2.3V */ +# define PWR_CR1_2p5V (3 << PWR_CR1_PLS_SHIFT) /* 011: 2.5V */ +# define PWR_CR1_2p6V (4 << PWR_CR1_PLS_SHIFT) /* 100: 2.6V */ +# define PWR_CR1_2p7V (5 << PWR_CR1_PLS_SHIFT) /* 101: 2.7V */ +# define PWR_CR1_2p8V (6 << PWR_CR1_PLS_SHIFT) /* 110: 2.8V */ +# define PWR_CR1_2p9V (7 << PWR_CR1_PLS_SHIFT) /* 111: 2.9V */ +#define PWR_CR1_DBP (1 << 8) /* Bit 8: Disable Backup Domain write protection */ +#define PWR_CR1_FPDS (1 << 9) /* Bit 9: Flash power down in Stop mode */ +#define PWR_CR1_LPUDS (1 << 10) /* Bit 10: Low-power regulator in deepsleep under-drive mode */ +#define PWR_CR1_MRUDS (1 << 11) /* Bit 11: Main regulator in deepsleep under-drive mode */ +#define PWR_CR1_ADCDC1 (1 << 13) /* Bit 13: see AN4073 for details */ +#define PWR_CR1_VOS_SHIFT (14) /* Bits 14-15: Regulator voltage scaling output selection */ +#define PWR_CR1_VOS_MASK (3 << PWR_CR1_VOS_SHIFT) +# define PWR_CR1_VOS_SCALE_3 (1 << PWR_CR1_VOS_SHIFT) /* Fmax = 144MHz */ +# define PWR_CR1_VOS_SCALE_2 (2 << PWR_CR1_VOS_SHIFT) /* Fmax = 168/180MHz */ +# define PWR_CR1_VOS_SCALE_1 (3 << PWR_CR1_VOS_SHIFT) /* Fmax = 180/216MHz */ +#define PWR_CR1_ODEN (1 << 16) /* Bit 16: Over Drive enable */ +#define PWR_CR1_ODSWEN (1 << 17) /* Bit 17: Over Drive switch enabled */ +#define PWR_CR1_UDEN_SHIFT (18) /* Bits 18-19: Under-drive enable in stop mode */ +#define PWR_CR1_UDEN_MASK (3 << PWR_CR1_UDEN_SHIFT) +# define PWR_CR1_UDEN_DISABLE (0 << PWR_CR1_UDEN_SHIFT) /* Under-drive disable */ +# define PWR_CR1_UDEN_ENABLE (3 << PWR_CR1_UDEN_SHIFT) /* Under-drive enable */ + +/* Power control/status register 1 */ + +#define PWR_CSR1_WUIF (1 << 0) /* Bit 0: Wakeup internal flag */ +#define PWR_CSR1_SBF (1 << 1) /* Bit 1: Standby flag */ +#define PWR_CSR1_PVDO (1 << 2) /* Bit 2: PVD Output */ +#define PWR_CSR1_BRR (1 << 3) /* Bit 3: Backup regulator ready */ +#define PWR_CSR1_BRE (1 << 9) /* Bit 9: Backup regulator enable */ +#define PWR_CSR1_VOSRDY (1 << 14) /* Bit 14: Regulator voltage scaling output selection ready bite */ +#define PWR_CSR1_ODRDY (1 << 16) /* Bit 16: Over Drive generator ready */ +#define PWR_CSR1_ODSWRDY (1 << 17) /* Bit 17: Over Drive Switch ready */ +#define PWR_CSR1_UDSRDY_SHIFT (18) /* Bits 18-19: Under-drive ready flag */ +#define PWR_CSR1_UDSRDY_MASK (3 << PWR_CSR1_UDSRDY_SHIFT) +# define PWR_CSR1_UDSRDY_DISAB (0 << PWR_CSR1_UDSRDY_SHIFT) /* Under-drive is disabled */ +# define PWR_CSR1_UDSRDY_STOP (3 << PWR_CSR1_UDSRDY_SHIFT) /* Under-drive mode is activated in Stop mode */ + +/* Power control register 2 */ + +#define PWR_CR2_CWUPF1 (1 << 0) /* Bit 0: Clear Wakeup Pin flag for PA0 */ +#define PWR_CR2_CWUPF2 (1 << 1) /* Bit 1: Clear Wakeup Pin flag for PA2 */ +#define PWR_CR2_CWUPF3 (1 << 2) /* Bit 2: Clear Wakeup Pin flag for PC1 */ +#define PWR_CR2_CWUPF4 (1 << 3) /* Bit 3: Clear Wakeup Pin flag for PC13 */ +#define PWR_CR2_CWUPF5 (1 << 4) /* Bit 4: Clear Wakeup Pin flag for PI8 */ +#define PWR_CR2_CWUPF6 (1 << 5) /* Bit 5: Clear Wakeup Pin flag for PI11 */ +#define PWR_CR2_WUPP1 (1 << 8) /* Bit 8: Wakeup pin polarity bit for PA0 */ +# define PWR_CR2_WUPP1_RISING (0 << 8) /* 0=Detection on rising edge */ +# define PWR_CR2_WUPP1_FALLING (1 << 8) /* 1= Detection on falling edge */ +#define PWR_CR2_WUPP2 (1 << 9) /* Bit 9: Wakeup pin polarity bit for PA2 */ +# define PWR_CR2_WUPP2_RISING (0 << 9) /* 0=Detection on rising edge */ +# define PWR_CR2_WUPP2_FALLING (1 << 9) /* 1= Detection on falling edge */ +#define PWR_CR2_WUPP3 (1 << 10) /* Bit 10: Wakeup pin polarity bit for PC1 */ +# define PWR_CR2_WUPP3_RISING (0 << 10) /* 0=Detection on rising edge */ +# define PWR_CR2_WUPP3_FALLING (1 << 10) /* 1= Detection on falling edge */ +#define PWR_CR2_WUPP4 (1 << 11) /* Bit 11: Wakeup pin polarity bit for PC13 */ +# define PWR_CR2_WUPP4_RISING (0 << 11) /* 0=Detection on rising edge */ +# define PWR_CR2_WUPP4_FALLING (1 << 11) /* 1= Detection on falling edge */ +#define PWR_CR2_WUPP5 (1 << 12) /* Bit 12: Wakeup pin polarity bit for PI8 */ +# define PWR_CR2_WUPP5_RISING (0 << 12) /* 0=Detection on rising edge */ +# define PWR_CR2_WUPP5_FALLING (1 << 12) /* 1= Detection on falling edge */ +#define PWR_CR2_WUPP6 (1 << 13) /* Bits 13: Wakeup pin polarity bit for PI11 */ +# define PWR_CR2_WUPP6_RISING (0 << 13) /* 0=Detection on rising edge */ +# define PWR_CR2_WUPP6_FALLING (1 << 13) /* 1= Detection on falling edge */ + +/* Power control/status register 2 */ + +#define PWR_CSR2_WUPF1 (1 << 0) /* Bit 0: Wakeup Pin flag for PA0 */ +#define PWR_CSR2_WUPF2 (1 << 1) /* Bit 1: Wakeup Pin flag for PA2 */ +#define PWR_CSR2_WUPF3 (1 << 2) /* Bit 2: Wakeup Pin flag for PC1 */ +#define PWR_CSR2_WUPF4 (1 << 3) /* Bit 3: Wakeup Pin flag for PC13 */ +#define PWR_CSR2_WUPF5 (1 << 4) /* Bit 4: Wakeup Pin flag for PI8 */ +#define PWR_CSR2_WUPF6 (1 << 5) /* Bit 5: Wakeup Pin flag for PI11 */ +#define PWR_CSR2_EWUP1 (1 << 8) /* Bit 8: Enable wakeup pin for PA0 */ +#define PWR_CSR2_EWUP2 (1 << 9) /* Bit 9: Enable wakeup pin for PA2 */ +#define PWR_CSR2_EWUP3 (1 << 10) /* Bit 10: Enable wakeup pin for PC1 */ +#define PWR_CSR2_EWUP4 (1 << 11) /* Bit 11: Enable wakeup pin for PC13 */ +#define PWR_CSR2_EWUP5 (1 << 12) /* Bit 12: Enable wakeup pin for PI8 */ +#define PWR_CSR2_EWUP6 (1 << 13) /* Bit 13: Enable wakeup pin for PI11 */ + +#endif /* CONFIG_STM32F7_STM32F76XX || CONFIG_STM32F7_STM32F77XX */ +#endif /* __ARCH_ARM_SRC_STM32F7_CHIP_STM32F76XX77XX_PWR_H */ diff --git a/arch/arm/src/stm32f7/chip/stm32f76xx77xx_rcc.h b/arch/arm/src/stm32f7/chip/stm32f76xx77xx_rcc.h new file mode 100644 index 0000000000000000000000000000000000000000..a63cc1911a46610233b14a9e06d7689c55caaef1 --- /dev/null +++ b/arch/arm/src/stm32f7/chip/stm32f76xx77xx_rcc.h @@ -0,0 +1,737 @@ +/**************************************************************************************************** + * arch/arm/src/stm32f7/chip/stm32f74xx75xx_rcc.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: 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. + * + ****************************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32_CHIP_STM32F76XX77XX_RCC_H +#define __ARCH_ARM_SRC_STM32_CHIP_STM32F76XX77XX_RCC_H + +/**************************************************************************************************** + * Included Files + ****************************************************************************************************/ + +#include + +#if defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) + +/**************************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************************/ + +/* Register Offsets *********************************************************************************/ + +#define STM32_RCC_CR_OFFSET 0x0000 /* Clock control register */ +#define STM32_RCC_PLLCFG_OFFSET 0x0004 /* PLL configuration register */ +#define STM32_RCC_CFGR_OFFSET 0x0008 /* Clock configuration register */ +#define STM32_RCC_CIR_OFFSET 0x000c /* Clock interrupt register */ +#define STM32_RCC_AHB1RSTR_OFFSET 0x0010 /* AHB1 peripheral reset register */ +#define STM32_RCC_AHB2RSTR_OFFSET 0x0014 /* AHB2 peripheral reset register */ +#define STM32_RCC_AHB3RSTR_OFFSET 0x0018 /* AHB3 peripheral reset register */ +#define STM32_RCC_APB1RSTR_OFFSET 0x0020 /* APB1 Peripheral reset register */ +#define STM32_RCC_APB2RSTR_OFFSET 0x0024 /* APB2 Peripheral reset register */ +#define STM32_RCC_AHB1ENR_OFFSET 0x0030 /* AHB1 Peripheral Clock enable register */ +#define STM32_RCC_AHB2ENR_OFFSET 0x0034 /* AHB2 Peripheral Clock enable register */ +#define STM32_RCC_AHB3ENR_OFFSET 0x0038 /* AHB3 Peripheral Clock enable register */ +#define STM32_RCC_APB1ENR_OFFSET 0x0040 /* APB1 Peripheral Clock enable register */ +#define STM32_RCC_APB2ENR_OFFSET 0x0044 /* APB2 Peripheral Clock enable register */ +#define STM32_RCC_AHB1LPENR_OFFSET 0x0050 /* RCC AHB1 low power mode peripheral clock enable register */ +#define STM32_RCC_AHB2LPENR_OFFSET 0x0054 /* RCC AHB2 low power mode peripheral clock enable register */ +#define STM32_RCC_AHB3LPENR_OFFSET 0x0058 /* RCC AHB3 low power mode peripheral clock enable register */ +#define STM32_RCC_APB1LPENR_OFFSET 0x0060 /* RCC APB1 low power mode peripheral clock enable register */ +#define STM32_RCC_APB2LPENR_OFFSET 0x0064 /* RCC APB2 low power mode peripheral clock enable register */ +#define STM32_RCC_BDCR_OFFSET 0x0070 /* Backup domain control register */ +#define STM32_RCC_CSR_OFFSET 0x0074 /* Control/status register */ +#define STM32_RCC_SSCGR_OFFSET 0x0080 /* Spread spectrum clock generation register */ +#define STM32_RCC_PLLI2SCFGR_OFFSET 0x0084 /* PLLI2S configuration register */ +#define STM32_RCC_PLLSAICFGR_OFFSET 0x0088 /* PLLSAI configuration register */ +#define STM32_RCC_DCKCFGR1_OFFSET 0x008c /* Dedicated clocks configuration register 1 */ +#define STM32_RCC_DCKCFGR2_OFFSET 0x0090 /* Dedicated clocks configuration register 2 */ + +/* Register Addresses *******************************************************************************/ + +#define STM32_RCC_CR (STM32_RCC_BASE+STM32_RCC_CR_OFFSET) +#define STM32_RCC_PLLCFG (STM32_RCC_BASE+STM32_RCC_PLLCFG_OFFSET) +#define STM32_RCC_CFGR (STM32_RCC_BASE+STM32_RCC_CFGR_OFFSET) +#define STM32_RCC_CIR (STM32_RCC_BASE+STM32_RCC_CIR_OFFSET) +#define STM32_RCC_AHB1RSTR (STM32_RCC_BASE+STM32_RCC_AHB1RSTR_OFFSET) +#define STM32_RCC_AHB2RSTR (STM32_RCC_BASE+STM32_RCC_AHB2RSTR_OFFSET) +#define STM32_RCC_AHB3RSTR (STM32_RCC_BASE+STM32_RCC_AHB3RSTR_OFFSET) +#define STM32_RCC_APB1RSTR (STM32_RCC_BASE+STM32_RCC_APB1RSTR_OFFSET) +#define STM32_RCC_APB2RSTR (STM32_RCC_BASE+STM32_RCC_APB2RSTR_OFFSET) +#define STM32_RCC_AHB1ENR (STM32_RCC_BASE+STM32_RCC_AHB1ENR_OFFSET) +#define STM32_RCC_AHB2ENR (STM32_RCC_BASE+STM32_RCC_AHB2ENR_OFFSET) +#define STM32_RCC_AHB3ENR (STM32_RCC_BASE+STM32_RCC_AHB3ENR_OFFSET) +#define STM32_RCC_APB1ENR (STM32_RCC_BASE+STM32_RCC_APB1ENR_OFFSET) +#define STM32_RCC_APB2ENR (STM32_RCC_BASE+STM32_RCC_APB2ENR_OFFSET) +#define STM32_RCC_AHB1LPENR (STM32_RCC_BASE+STM32_RCC_AHB1LPENR_OFFSET) +#define STM32_RCC_AHB2LPENR (STM32_RCC_BASE+STM32_RCC_AHB2LPENR) +#define STM32_RCC_AHB3LPENR (STM32_RCC_BASE+STM32_RCC_AHB3LPENR_OFFSET) +#define STM32_RCC_APB1LPENR (STM32_RCC_BASE+STM32_RCC_APB1LPENR_OFFSET) +#define STM32_RCC_APB2LPENR (STM32_RCC_BASE+STM32_RCC_APB2LPENR_OFFSET) +#define STM32_RCC_BDCR (STM32_RCC_BASE+STM32_RCC_BDCR_OFFSET) +#define STM32_RCC_CSR (STM32_RCC_BASE+STM32_RCC_CSR_OFFSET) +#define STM32_RCC_SSCGR (STM32_RCC_BASE+STM32_RCC_SSCGR_OFFSET) +#define STM32_RCC_PLLI2SCFGR (STM32_RCC_BASE+STM32_RCC_PLLI2SCFGR_OFFSET) +#define STM32_RCC_PLLSAICFGR (STM32_RCC_BASE+STM32_RCC_PLLSAICFGR_OFFSET) +#define STM32_RCC_DCKCFGR1 (STM32_RCC_BASE+STM32_RCC_DCKCFGR1_OFFSET) +#define STM32_RCC_DCKCFGR2 (STM32_RCC_BASE+STM32_RCC_DCKCFGR2_OFFSET) + +/* Register Bitfield Definitions ********************************************************************/ + +/* Clock control register */ + +#define RCC_CR_HSION (1 << 0) /* Bit 0: Internal High Speed clock enable */ +#define RCC_CR_HSIRDY (1 << 1) /* Bit 1: Internal High Speed clock ready flag */ +#define RCC_CR_HSITRIM_SHIFT (3) /* Bits 7-3: Internal High Speed clock trimming */ +#define RCC_CR_HSITRIM_MASK (0x1f << RCC_CR_HSITRIM_SHIFT) +#define RCC_CR_HSICAL_SHIFT (8) /* Bits 15-8: Internal High Speed clock Calibration */ +#define RCC_CR_HSICAL_MASK (0xff << RCC_CR_HSICAL_SHIFT) +#define RCC_CR_HSEON (1 << 16) /* Bit 16: External High Speed clock enable */ +#define RCC_CR_HSERDY (1 << 17) /* Bit 17: External High Speed clock ready flag */ +#define RCC_CR_HSEBYP (1 << 18) /* Bit 18: External High Speed clock Bypass */ +#define RCC_CR_CSSON (1 << 19) /* Bit 19: Clock Security System enable */ +#define RCC_CR_PLLON (1 << 24) /* Bit 24: PLL enable */ +#define RCC_CR_PLLRDY (1 << 25) /* Bit 25: PLL clock ready flag */ +#define RCC_CR_PLLI2SON (1 << 26) /* Bit 26: PLLI2S enable */ +#define RCC_CR_PLLI2SRDY (1 << 27) /* Bit 27: PLLI2S clock ready flag */ +#define RCC_CR_PLLSAION (1 << 28) /* Bit 28: PLLSAI enable */ +#define RCC_CR_PLLSAIRDY (1 << 29) /* Bit 29: PLLSAI clock ready flag */ + +/* PLL configuration register */ + +#define RCC_PLLCFG_PLLM_SHIFT (0) /* Bits 0-5: Main PLL (PLL) and audio PLL (PLLI2S) + * input clock divider */ +#define RCC_PLLCFG_PLLM_MASK (0x3f << RCC_PLLCFG_PLLM_SHIFT) +# define RCC_PLLCFG_PLLM(n) ((n) << RCC_PLLCFG_PLLM_SHIFT) /* n = 2..63 */ +#define RCC_PLLCFG_PLLN_SHIFT (6) /* Bits 6-14: Main PLL (PLL) VCO multiplier */ +#define RCC_PLLCFG_PLLN_MASK (0x1ff << RCC_PLLCFG_PLLN_SHIFT) +# define RCC_PLLCFG_PLLN(n) ((n) << RCC_PLLCFG_PLLN_SHIFT) /* n = 2..432 */ +#define RCC_PLLCFG_PLLP_SHIFT (16) /* Bits 16-17: Main PLL (PLL) main system clock divider */ +#define RCC_PLLCFG_PLLP_MASK (3 << RCC_PLLCFG_PLLP_SHIFT) +# define RCC_PLLCFG_PLLP(n) ((((n)>>1)-1)<< RCC_PLLCFG_PLLP_SHIFT) /* n=2,4,6,8 */ +# define RCC_PLLCFG_PLLP_2 (0 << RCC_PLLCFG_PLLP_SHIFT) /* 00: PLLP = 2 */ +# define RCC_PLLCFG_PLLP_4 (1 << RCC_PLLCFG_PLLP_SHIFT) /* 01: PLLP = 4 */ +# define RCC_PLLCFG_PLLP_6 (2 << RCC_PLLCFG_PLLP_SHIFT) /* 10: PLLP = 6 */ +# define RCC_PLLCFG_PLLP_8 (3 << RCC_PLLCFG_PLLP_SHIFT) /* 11: PLLP = 8 */ +#define RCC_PLLCFG_PLLSRC (1 << 22) /* Bit 22: Main PLL(PLL) and audio PLL (PLLI2S) + * entry clock source */ +# define RCC_PLLCFG_PLLSRC_HSI (0) +# define RCC_PLLCFG_PLLSRC_HSE RCC_PLLCFG_PLLSRC +#define RCC_PLLCFG_PLLQ_SHIFT (24) /* Bits 24-27: Main PLL (PLL) divider + * (USB OTG FS, SDIO and RNG clocks) */ +#define RCC_PLLCFG_PLLQ_MASK (15 << RCC_PLLCFG_PLLQ_SHIFT) +# define RCC_PLLCFG_PLLQ(n) ((n) << RCC_PLLCFG_PLLQ_SHIFT) /* n=2..15 */ + +#define RCC_PLLCFG_PLLR_SHIFT (28) /* Bits 28-30: PLL division factor for DSI clock */ +#define RCC_PLLCFG_PLLR_MASK (7 << RCC_PLLCFG_PLLR_SHIFT) +# define RCC_PLLCFG_PLLR(n) ((n) << RCC_PLLCFG_PLLR_SHIFT) /* n=2..7 */ + +#define RCC_PLLCFG_RESET (0x24003010) /* PLLCFG reset value */ + +/* Clock configuration register */ + +#define RCC_CFGR_SW_SHIFT (0) /* Bits 0-1: System clock Switch */ +#define RCC_CFGR_SW_MASK (3 << RCC_CFGR_SW_SHIFT) +# define RCC_CFGR_SW_HSI (0 << RCC_CFGR_SW_SHIFT) /* 00: HSI selected as system clock */ +# define RCC_CFGR_SW_HSE (1 << RCC_CFGR_SW_SHIFT) /* 01: HSE selected as system clock */ +# define RCC_CFGR_SW_PLL (2 << RCC_CFGR_SW_SHIFT) /* 10: PLL selected as system clock */ +#define RCC_CFGR_SWS_SHIFT (2) /* Bits 2-3: System Clock Switch Status */ +#define RCC_CFGR_SWS_MASK (3 << RCC_CFGR_SWS_SHIFT) +# define RCC_CFGR_SWS_HSI (0 << RCC_CFGR_SWS_SHIFT) /* 00: HSI oscillator used as system clock */ +# define RCC_CFGR_SWS_HSE (1 << RCC_CFGR_SWS_SHIFT) /* 01: HSE oscillator used as system clock */ +# define RCC_CFGR_SWS_PLL (2 << RCC_CFGR_SWS_SHIFT) /* 10: PLL used as system clock */ +#define RCC_CFGR_HPRE_SHIFT (4) /* Bits 4-7: AHB prescaler */ +#define RCC_CFGR_HPRE_MASK (0x0f << RCC_CFGR_HPRE_SHIFT) +# define RCC_CFGR_HPRE_SYSCLK (0 << RCC_CFGR_HPRE_SHIFT) /* 0xxx: SYSCLK not divided */ +# define RCC_CFGR_HPRE_SYSCLKd2 (8 << RCC_CFGR_HPRE_SHIFT) /* 1000: SYSCLK divided by 2 */ +# define RCC_CFGR_HPRE_SYSCLKd4 (9 << RCC_CFGR_HPRE_SHIFT) /* 1001: SYSCLK divided by 4 */ +# define RCC_CFGR_HPRE_SYSCLKd8 (10 << RCC_CFGR_HPRE_SHIFT) /* 1010: SYSCLK divided by 8 */ +# define RCC_CFGR_HPRE_SYSCLKd16 (11 << RCC_CFGR_HPRE_SHIFT) /* 1011: SYSCLK divided by 16 */ +# define RCC_CFGR_HPRE_SYSCLKd64 (12 << RCC_CFGR_HPRE_SHIFT) /* 1100: SYSCLK divided by 64 */ +# define RCC_CFGR_HPRE_SYSCLKd128 (13 << RCC_CFGR_HPRE_SHIFT) /* 1101: SYSCLK divided by 128 */ +# define RCC_CFGR_HPRE_SYSCLKd256 (14 << RCC_CFGR_HPRE_SHIFT) /* 1110: SYSCLK divided by 256 */ +# define RCC_CFGR_HPRE_SYSCLKd512 (15 << RCC_CFGR_HPRE_SHIFT) /* 1111: SYSCLK divided by 512 */ +#define RCC_CFGR_PPRE1_SHIFT (10) /* Bits 10-12: APB Low speed prescaler (APB1) */ +#define RCC_CFGR_PPRE1_MASK (7 << RCC_CFGR_PPRE1_SHIFT) +# define RCC_CFGR_PPRE1_HCLK (0 << RCC_CFGR_PPRE1_SHIFT) /* 0xx: HCLK not divided */ +# define RCC_CFGR_PPRE1_HCLKd2 (4 << RCC_CFGR_PPRE1_SHIFT) /* 100: HCLK divided by 2 */ +# define RCC_CFGR_PPRE1_HCLKd4 (5 << RCC_CFGR_PPRE1_SHIFT) /* 101: HCLK divided by 4 */ +# define RCC_CFGR_PPRE1_HCLKd8 (6 << RCC_CFGR_PPRE1_SHIFT) /* 110: HCLK divided by 8 */ +# define RCC_CFGR_PPRE1_HCLKd16 (7 << RCC_CFGR_PPRE1_SHIFT) /* 111: HCLK divided by 16 */ +#define RCC_CFGR_PPRE2_SHIFT (13) /* Bits 13-15: APB High speed prescaler (APB2) */ +#define RCC_CFGR_PPRE2_MASK (7 << RCC_CFGR_PPRE2_SHIFT) +# define RCC_CFGR_PPRE2_HCLK (0 << RCC_CFGR_PPRE2_SHIFT) /* 0xx: HCLK not divided */ +# define RCC_CFGR_PPRE2_HCLKd2 (4 << RCC_CFGR_PPRE2_SHIFT) /* 100: HCLK divided by 2 */ +# define RCC_CFGR_PPRE2_HCLKd4 (5 << RCC_CFGR_PPRE2_SHIFT) /* 101: HCLK divided by 4 */ +# define RCC_CFGR_PPRE2_HCLKd8 (6 << RCC_CFGR_PPRE2_SHIFT) /* 110: HCLK divided by 8 */ +# define RCC_CFGR_PPRE2_HCLKd16 (7 << RCC_CFGR_PPRE2_SHIFT) /* 111: HCLK divided by 16 */ +#define RCC_CFGR_RTCPRE_SHIFT (16) /* Bits 16-20: APB High speed prescaler (APB2) */ +#define RCC_CFGR_RTCPRE_MASK (31 << RCC_CFGR_RTCPRE_SHIFT) +# define RCC_CFGR_RTCPRE(n) ((n) << RCC_CFGR_RTCPRE_SHIFT) /* HSE/n, n=1..31 */ +#define RCC_CFGR_MCO1_SHIFT (21) /* Bits 21-22: Microcontroller Clock Output */ +#define RCC_CFGR_MCO1_MASK (3 << RCC_CFGR_MCO1_SHIFT) +# define RCC_CFGR_MCO1_HSI (0 << RCC_CFGR_MCO1_SHIFT) /* 00: HSI clock selected */ +# define RCC_CFGR_MCO1_LSE (1 << RCC_CFGR_MCO1_SHIFT) /* 01: LSE oscillator selected */ +# define RCC_CFGR_MCO1_HSE (2 << RCC_CFGR_MCO1_SHIFT) /* 10: HSE oscillator clock selected */ +# define RCC_CFGR_MCO1_PLL (3 << RCC_CFGR_MCO1_SHIFT) /* 11: PLL clock selected */ +#define RCC_CFGR_I2SSRC (1 << 23) /* Bit 23: I2S clock selection */ +#define RCC_CFGR_MCO1PRE_SHIFT (24) /* Bits 24-26: MCO1 prescaler */ +#define RCC_CFGR_MCO1PRE_MASK (7 << RCC_CFGR_MCO1PRE_SHIFT) +# define RCC_CFGR_MCO1PRE_NONE (0 << RCC_CFGR_MCO1PRE_SHIFT) /* 0xx: no division */ +# define RCC_CFGR_MCO1PRE_DIV2 (4 << RCC_CFGR_MCO1PRE_SHIFT) /* 100: division by 2 */ +# define RCC_CFGR_MCO1PRE_DIV3 (5 << RCC_CFGR_MCO1PRE_SHIFT) /* 101: division by 3 */ +# define RCC_CFGR_MCO1PRE_DIV4 (6 << RCC_CFGR_MCO1PRE_SHIFT) /* 110: division by 4 */ +# define RCC_CFGR_MCO1PRE_DIV5 (7 << RCC_CFGR_MCO1PRE_SHIFT) /* 111: division by 5 */ +#define RCC_CFGR_MCO2PRE_SHIFT (27) /* Bits 27-29: MCO2 prescaler */ +#define RCC_CFGR_MCO2PRE_MASK (7 << RCC_CFGR_MCO2PRE_SHIFT) +# define RCC_CFGR_MCO2PRE_NONE (0 << RCC_CFGR_MCO2PRE_SHIFT) /* 0xx: no division */ +# define RCC_CFGR_MCO2PRE_DIV2 (4 << RCC_CFGR_MCO2PRE_SHIFT) /* 100: division by 2 */ +# define RCC_CFGR_MCO2PRE_DIV3 (5 << RCC_CFGR_MCO2PRE_SHIFT) /* 101: division by 3 */ +# define RCC_CFGR_MCO2PRE_DIV4 (6 << RCC_CFGR_MCO2PRE_SHIFT) /* 110: division by 4 */ +# define RCC_CFGR_MCO2PRE_DIV5 (7 << RCC_CFGR_MCO2PRE_SHIFT) /* 111: division by 5 */ +#define RCC_CFGR_MCO2_SHIFT (30) /* Bits 30-31: Microcontroller clock output 2 */ +#define RCC_CFGR_MCO2_MASK (3 << RCC_CFGR_MCO2_SHIFT) +# define RCC_CFGR_MCO2_SYSCLK (0 << RCC_CFGR_MCO2_SHIFT) /* 00: System clock (SYSCLK) selected */ +# define RCC_CFGR_MCO2_PLLI2S (1 << RCC_CFGR_MCO2_SHIFT) /* 01: PLLI2S clock selected */ +# define RCC_CFGR_MCO2_HSE (2 << RCC_CFGR_MCO2_SHIFT) /* 10: HSE oscillator clock selected */ +# define RCC_CFGR_MCO2_PLL (3 << RCC_CFGR_MCO2_SHIFT) /* 11: PLL clock selected */ + +/* Clock interrupt register */ + +#define RCC_CIR_LSIRDYF (1 << 0) /* Bit 0: LSI Ready Interrupt flag */ +#define RCC_CIR_LSERDYF (1 << 1) /* Bit 1: LSE Ready Interrupt flag */ +#define RCC_CIR_HSIRDYF (1 << 2) /* Bit 2: HSI Ready Interrupt flag */ +#define RCC_CIR_HSERDYF (1 << 3) /* Bit 3: HSE Ready Interrupt flag */ +#define RCC_CIR_PLLRDYF (1 << 4) /* Bit 4: PLL Ready Interrupt flag */ +#define RCC_CIR_PLLI2SRDYF (1 << 5) /* Bit 5: PLLI2S Ready Interrupt flag */ +#define RCC_CIR_PLLSAIRDYF (1 << 6) /* Bit 6: PLLSAI Ready Interrupt flag */ +#define RCC_CIR_CSSF (1 << 7) /* Bit 7: Clock Security System Interrupt flag */ +#define RCC_CIR_LSIRDYIE (1 << 8) /* Bit 8: LSI Ready Interrupt Enable */ +#define RCC_CIR_LSERDYIE (1 << 9) /* Bit 9: LSE Ready Interrupt Enable */ +#define RCC_CIR_HSIRDYIE (1 << 10) /* Bit 10: HSI Ready Interrupt Enable */ +#define RCC_CIR_HSERDYIE (1 << 11) /* Bit 11: HSE Ready Interrupt Enable */ +#define RCC_CIR_PLLRDYIE (1 << 12) /* Bit 12: PLL Ready Interrupt Enable */ +#define RCC_CIR_PLLI2SRDYIE (1 << 13) /* Bit 13: PLLI2S Ready Interrupt enable */ +#define RCC_CIR_PLLSAIRDYIE (1 << 14) /* Bit 14: PLLSAI Ready Interrupt enable */ +#define RCC_CIR_LSIRDYC (1 << 16) /* Bit 16: LSI Ready Interrupt Clear */ +#define RCC_CIR_LSERDYC (1 << 17) /* Bit 17: LSE Ready Interrupt Clear */ +#define RCC_CIR_HSIRDYC (1 << 18) /* Bit 18: HSI Ready Interrupt Clear */ +#define RCC_CIR_HSERDYC (1 << 19) /* Bit 19: HSE Ready Interrupt Clear */ +#define RCC_CIR_PLLRDYC (1 << 20) /* Bit 20: PLL Ready Interrupt Clear */ +#define RCC_CIR_PLLI2SRDYC (1 << 21) /* Bit 21: PLLI2S Ready Interrupt clear */ +#define RCC_CIR_PLLSAIRDYC (1 << 22) /* Bit 22: PLLSAI Ready Interrupt clear */ +#define RCC_CIR_CSSC (1 << 23) /* Bit 23: Clock Security System Interrupt Clear */ + +/* AHB1 peripheral reset register */ + +#define RCC_AHB1RSTR_GPIOARST (1 << 0) /* Bit 0: IO port A reset */ +#define RCC_AHB1RSTR_GPIOBRST (1 << 1) /* Bit 1: IO port B reset */ +#define RCC_AHB1RSTR_GPIOCRST (1 << 2) /* Bit 2: IO port C reset */ +#define RCC_AHB1RSTR_GPIODRST (1 << 3) /* Bit 3: IO port D reset */ +#define RCC_AHB1RSTR_GPIOERST (1 << 4) /* Bit 4: IO port E reset */ +#define RCC_AHB1RSTR_GPIOFRST (1 << 5) /* Bit 5: IO port F reset */ +#define RCC_AHB1RSTR_GPIOGRST (1 << 6) /* Bit 6: IO port G reset */ +#define RCC_AHB1RSTR_GPIOHRST (1 << 7) /* Bit 7: IO port H reset */ +#define RCC_AHB1RSTR_GPIOIRST (1 << 8) /* Bit 8: IO port I reset */ +#define RCC_AHB1RSTR_GPIOJRST (1 << 9) /* Bit 9: IO port J reset */ +#define RCC_AHB1RSTR_GPIOKRST (1 << 10) /* Bit 10: IO port K reset */ +#define RCC_AHB1RSTR_CRCRST (1 << 12) /* Bit 12 CRC reset */ +#define RCC_AHB1RSTR_DMA1RST (1 << 21) /* Bit 21: DMA1 reset */ +#define RCC_AHB1RSTR_DMA2RST (1 << 22) /* Bit 22: DMA2 reset */ +#define RCC_AHB1RSTR_DMA2DRST (1 << 23) /* Bit 23: DMA2D reset */ +#define RCC_AHB1RSTR_ETHMACRST (1 << 25) /* Bit 25: Ethernet MAC reset */ +#define RCC_AHB1RSTR_OTGHSRST (1 << 29) /* Bit 29: USB OTG HS module reset */ + +/* AHB2 peripheral reset register */ + +#define RCC_AHB2RSTR_DCMIRST (1 << 0) /* Bit 0: Camera interface reset */ +#define RCC_AHB2RSTR_JPEGRST (1 << 1) /* Bit 1: Jpeg codec reset */ +#define RCC_AHB2RSTR_CRYPRST (1 << 4) /* Bit 4: Cryptographic module reset */ +#define RCC_AHB2RSTR_HASHRST (1 << 5) /* Bit 5: Hash module reset */ +#define RCC_AHB2RSTR_RNGRST (1 << 6) /* Bit 6: Random number generator module reset */ +#define RCC_AHB2RSTR_OTGFSRST (1 << 7) /* Bit 7: USB OTG FS module reset */ + +/* AHB3 peripheral reset register */ + +#define RCC_AHB3RSTR_FSMCRST (1 << 0) /* Bit 0: Flexible static memory controller module reset */ +#define RCC_AHB3RSTR_QSPIRST (1 << 1) /* Bit 1: Quad SPI memory controller reset */ + +/* APB1 Peripheral reset register */ + +#define RCC_APB1RSTR_TIM2RST (1 << 0) /* Bit 0: TIM2 reset */ +#define RCC_APB1RSTR_TIM3RST (1 << 1) /* Bit 1: TIM3 reset */ +#define RCC_APB1RSTR_TIM4RST (1 << 2) /* Bit 2: TIM4 reset */ +#define RCC_APB1RSTR_TIM5RST (1 << 3) /* Bit 3: TIM5 reset */ +#define RCC_APB1RSTR_TIM6RST (1 << 4) /* Bit 4: TIM6 reset */ +#define RCC_APB1RSTR_TIM7RST (1 << 5) /* Bit 5: TIM7 reset */ +#define RCC_APB1RSTR_TIM12RST (1 << 6) /* Bit 6: TIM12 reset */ +#define RCC_APB1RSTR_TIM13RST (1 << 7) /* Bit 7: TIM13 reset */ +#define RCC_APB1RSTR_TIM14RST (1 << 8) /* Bit 8: TIM14 reset */ +#define RCC_APB1RSTR_LPTIM1RST (1 << 9) /* Bit 9: LPTIM1 reset */ +#define RCC_APB1RSTR_WWDGRST (1 << 11) /* Bit 11: Window watchdog reset */ +#define RCC_APB1RSTR_CAN3RST (1 << 13) /* Bit 13: CAN3 reset */ +#define RCC_APB1RSTR_SPI2RST (1 << 14) /* Bit 14: SPI 2 reset */ +#define RCC_APB1RSTR_SPI3RST (1 << 15) /* Bit 15: SPI 3 reset */ +#define RCC_APB1RSTR_SPDIFRXRST (1 << 16) /* Bit 16: SPDIFRX reset */ +#define RCC_APB1RSTR_USART2RST (1 << 17) /* Bit 17: USART 2 reset */ +#define RCC_APB1RSTR_USART3RST (1 << 18) /* Bit 18: USART 3 reset */ +#define RCC_APB1RSTR_UART4RST (1 << 19) /* Bit 19: USART 4 reset */ +#define RCC_APB1RSTR_UART5RST (1 << 20) /* Bit 20: USART 5 reset */ +#define RCC_APB1RSTR_I2C1RST (1 << 21) /* Bit 21: I2C 1 reset */ +#define RCC_APB1RSTR_I2C2RST (1 << 22) /* Bit 22: I2C 2 reset */ +#define RCC_APB1RSTR_I2C3RST (1 << 23) /* Bit 23: I2C 3 reset */ +#define RCC_APB1RSTR_I2C4RST (1 << 24) /* Bit 24: I2C 4 reset */ +#define RCC_APB1RSTR_CAN1RST (1 << 25) /* Bit 25: CAN1 reset */ +#define RCC_APB1RSTR_CAN2RST (1 << 26) /* Bit 26: CAN2 reset */ +#define RCC_APB1RSTR_CECRST (1 << 27) /* Bit 27: CEC reset */ +#define RCC_APB1RSTR_PWRRST (1 << 28) /* Bit 28: Power interface reset */ +#define RCC_APB1RSTR_DACRST (1 << 29) /* Bit 29: DAC reset */ +#define RCC_APB1RSTR_UART7RST (1 << 30) /* Bit 30: USART 7 reset */ +#define RCC_APB1RSTR_UART8RST (1 << 31) /* Bit 31: USART 8 reset */ + +/* APB2 Peripheral reset register */ + +#define RCC_APB2RSTR_TIM1RST (1 << 0) /* Bit 0: TIM1 reset */ +#define RCC_APB2RSTR_TIM8RST (1 << 1) /* Bit 1: TIM8 reset */ +#define RCC_APB2RSTR_USART1RST (1 << 4) /* Bit 4: USART1 reset */ +#define RCC_APB2RSTR_USART6RST (1 << 5) /* Bit 5: USART6 reset */ +#define RCC_APB2RSTR_SDMMC2RST (1 << 7) /* Bit 7: SDMMC2 reset */ +#define RCC_APB2RSTR_ADCRST (1 << 8) /* Bit 8: ADC interface reset (common to all ADCs) */ +#define RCC_APB2RSTR_SDMMC1RST (1 << 11) /* Bit 11: SDMMC1 reset */ +#define RCC_APB2RSTR_SPI1RST (1 << 12) /* Bit 12: SPI1 reset */ +#define RCC_APB2RSTR_SPI4RST (1 << 13) /* Bit 13: SPI4 reset */ +#define RCC_APB2RSTR_SYSCFGRST (1 << 14) /* Bit 14: System configuration controller reset */ +#define RCC_APB2RSTR_TIM9RST (1 << 16) /* Bit 16: TIM9 reset */ +#define RCC_APB2RSTR_TIM10RST (1 << 17) /* Bit 17: TIM10 reset */ +#define RCC_APB2RSTR_TIM11RST (1 << 18) /* Bit 18: TIM11 reset */ +#define RCC_APB2RSTR_SPI5RST (1 << 20) /* Bit 20: SPI 5 reset */ +#define RCC_APB2RSTR_SPI6RST (1 << 21) /* Bit 21: SPI 6 reset */ +#define RCC_APB2RSTR_SAI1RST (1 << 22) /* Bit 22: SAI 1 reset */ +#define RCC_APB2RSTR_SAI2RST (1 << 22) /* Bit 23: SAI 2 reset */ +#define RCC_APB2RSTR_LTDCRST (1 << 26) /* Bit 26: LTDC reset */ +#define RCC_APB2RSTR_DSIRST (1 << 27) /* Bit 27: DSI reset */ +#define RCC_APB2RSTR_DFSDM1RST (1 << 29) /* Bit 29: DFSDM1 reset */ +#define RCC_APB2RSTR_MDIORST (1 << 30) /* Bit 30: MDIO reset */ + +/* AHB1 Peripheral Clock enable register */ + +#define RCC_AHB1ENR_GPIOEN(n) (1 << (n)) +#define RCC_AHB1ENR_GPIOAEN (1 << 0) /* Bit 0: IO port A clock enable */ +#define RCC_AHB1ENR_GPIOBEN (1 << 1) /* Bit 1: IO port B clock enable */ +#define RCC_AHB1ENR_GPIOCEN (1 << 2) /* Bit 2: IO port C clock enable */ +#define RCC_AHB1ENR_GPIODEN (1 << 3) /* Bit 3: IO port D clock enable */ +#define RCC_AHB1ENR_GPIOEEN (1 << 4) /* Bit 4: IO port E clock enable */ +#define RCC_AHB1ENR_GPIOFEN (1 << 5) /* Bit 5: IO port F clock enable */ +#define RCC_AHB1ENR_GPIOGEN (1 << 6) /* Bit 6: IO port G clock enable */ +#define RCC_AHB1ENR_GPIOHEN (1 << 7) /* Bit 7: IO port H clock enable */ +#define RCC_AHB1ENR_GPIOIEN (1 << 8) /* Bit 8: IO port I clock enable */ +#define RCC_AHB1ENR_GPIOJEN (1 << 9) /* Bit 9: IO port J clock enable */ +#define RCC_AHB1ENR_GPIOKEN (1 << 10) /* Bit 10: IO port K clock enable */ +#define RCC_AHB1ENR_CRCEN (1 << 12) /* Bit 12: CRC clock enable */ +#define RCC_AHB1ENR_BKPSRAMEN (1 << 18) /* Bit 18: Backup SRAM interface clock enable */ +#define RCC_AHB1ENR_DTCMRAMEN (1 << 20) /* Bit 20: DTCM RAM clock enable */ +#define RCC_AHB1ENR_DMA1EN (1 << 21) /* Bit 21: DMA1 clock enable */ +#define RCC_AHB1ENR_DMA2EN (1 << 22) /* Bit 22: DMA2 clock enable */ +#define RCC_AHB1ENR_DMA2DEN (1 << 23) /* Bit 23: DMA2D clock enable */ +#define RCC_AHB1ENR_ETHMACEN (1 << 25) /* Bit 25: Ethernet MAC clock enable */ +#define RCC_AHB1ENR_ETHMACTXEN (1 << 26) /* Bit 26: Ethernet Transmission clock enable */ +#define RCC_AHB1ENR_ETHMACRXEN (1 << 27) /* Bit 27: Ethernet Reception clock enable */ +#define RCC_AHB1ENR_ETHMACPTPEN (1 << 28) /* Bit 28: Ethernet PTP clock enable */ +#define RCC_AHB1ENR_OTGHSEN (1 << 29) /* Bit 29: USB OTG HS clock enable */ +#define RCC_AHB1ENR_OTGHSULPIEN (1 << 30) /* Bit 30: USB OTG HSULPI clock enable */ + +/* AHB2 Peripheral Clock enable register */ + +#define RCC_AHB2ENR_DCMIEN (1 << 0) /* Bit 0: Camera interface enable */ +#define RCC_AHB2ENR_JPEGEN (1 << 1) /* Bit 1: Jpeg codec enable */ +#define RCC_AHB2ENR_CRYPEN (1 << 4) /* Bit 4: Cryptographic modules clock enable */ +#define RCC_AHB2ENR_HASHEN (1 << 5) /* Bit 5: Hash modules clock enable */ +#define RCC_AHB2ENR_RNGEN (1 << 6) /* Bit 6: Random number generator clock enable */ +#define RCC_AHB2ENR_OTGFSEN (1 << 7) /* Bit 7: USB OTG FS clock enable */ + +/* AHB3 Peripheral Clock enable register */ + +#define RCC_AHB3ENR_FSMCEN (1 << 0) /* Bit 0: Flexible static memory controller module clock enable */ +#define RCC_AHB3ENR_QSPIEN (1 << 1) /* Bit 1: Quad SPI memory controller clock enable */ + +/* APB1 Peripheral Clock enable register */ + +#define RCC_APB1ENR_TIM2EN (1 << 0) /* Bit 0: TIM 2 clock enable */ +#define RCC_APB1ENR_TIM3EN (1 << 1) /* Bit 1: TIM 3 clock enable */ +#define RCC_APB1ENR_TIM4EN (1 << 2) /* Bit 2: TIM 4 clock enable */ +#define RCC_APB1ENR_TIM5EN (1 << 3) /* Bit 3: TIM 5 clock enable */ +#define RCC_APB1ENR_TIM6EN (1 << 4) /* Bit 4: TIM 6 clock enable */ +#define RCC_APB1ENR_TIM7EN (1 << 5) /* Bit 5: TIM 7 clock enable */ +#define RCC_APB1ENR_TIM12EN (1 << 6) /* Bit 6: TIM 12 clock enable */ +#define RCC_APB1ENR_TIM13EN (1 << 7) /* Bit 7: TIM 13 clock enable */ +#define RCC_APB1ENR_TIM14EN (1 << 8) /* Bit 8: TIM 14 clock enable */ +#define RCC_APB1ENR_LPTIM1EN (1 << 9) /* Bit 9: LPTIM 1 clock enable */ +#define RCC_APB1ENR_WWDGEN (1 << 11) /* Bit 11: Window watchdog clock enable */ +#define RCC_APB1ENR_CAN3EN (1 << 13) /* Bit 13: CAN 3 clock enable */ +#define RCC_APB1ENR_SPI2EN (1 << 14) /* Bit 14: SPI 2 clock enable */ +#define RCC_APB1ENR_SPI3EN (1 << 15) /* Bit 15: SPI 3 clock enable */ +#define RCC_APB1ENR_SPDIFRXEN (1 << 16) /* Bit 16: SPDIFRX clock enable */ +#define RCC_APB1ENR_USART2EN (1 << 17) /* Bit 17: USART 2 clock enable */ +#define RCC_APB1ENR_USART3EN (1 << 18) /* Bit 18: USART 3 clock enable */ +#define RCC_APB1ENR_UART4EN (1 << 19) /* Bit 19: UART 4 clock enable */ +#define RCC_APB1ENR_UART5EN (1 << 20) /* Bit 20: UART 5 clock enable */ +#define RCC_APB1ENR_I2C1EN (1 << 21) /* Bit 21: I2C 1 clock enable */ +#define RCC_APB1ENR_I2C2EN (1 << 22) /* Bit 22: I2C 2 clock enable */ +#define RCC_APB1ENR_I2C3EN (1 << 23) /* Bit 23: I2C 3 clock enable */ +#define RCC_APB1ENR_I2C4EN (1 << 24) /* Bit 24: I2C 4 clock enable */ +#define RCC_APB1ENR_CAN1EN (1 << 25) /* Bit 25: CAN 1 clock enable */ +#define RCC_APB1ENR_CAN2EN (1 << 26) /* Bit 26: CAN 2 clock enable */ +#define RCC_APB1ENR_CECEN (1 << 27) /* Bit 27: CEC clock enable */ +#define RCC_APB1ENR_PWREN (1 << 28) /* Bit 28: Power interface clock enable */ +#define RCC_APB1ENR_DACEN (1 << 29) /* Bit 29: DAC interface clock enable */ +#define RCC_APB1ENR_UART7EN (1 << 30) /* Bit 30: UART7 clock enable */ +#define RCC_APB1ENR_UART8EN (1 << 31) /* Bit 31: UART8 clock enable */ + +/* APB2 Peripheral Clock enable register */ + +#define RCC_APB2ENR_TIM1EN (1 << 0) /* Bit 0: TIM 1 clock enable */ +#define RCC_APB2ENR_TIM8EN (1 << 1) /* Bit 1: TIM 8 clock enable */ +#define RCC_APB2ENR_USART1EN (1 << 4) /* Bit 4: USART 1 clock enable */ +#define RCC_APB2ENR_USART6EN (1 << 5) /* Bit 5: USART 6 clock enable */ +#define RCC_APB2ENR_SDMMC2EN (1 << 7) /* Bit 7: SDMMC 2 clock enable */ +#define RCC_APB2ENR_ADC1EN (1 << 8) /* Bit 8: ADC 1 clock enable */ +#define RCC_APB2ENR_ADC2EN (1 << 9) /* Bit 9: ADC 2 clock enable */ +#define RCC_APB2ENR_ADC3EN (1 << 10) /* Bit 10: ADC 3 clock enable */ +#define RCC_APB2ENR_SDMMC1EN (1 << 11) /* Bit 11: SDMMC 1 clock enable */ +#define RCC_APB2ENR_SPI1EN (1 << 12) /* Bit 12: SPI 1 clock enable */ +#define RCC_APB2ENR_SPI4EN (1 << 13) /* Bit 13: SPI 4 clock enable */ +#define RCC_APB2ENR_SYSCFGEN (1 << 14) /* Bit 14: System configuration controller clock enable */ +#define RCC_APB2ENR_TIM9EN (1 << 16) /* Bit 16: TIM 9 clock enable */ +#define RCC_APB2ENR_TIM10EN (1 << 17) /* Bit 17: TIM1 0 clock enable */ +#define RCC_APB2ENR_TIM11EN (1 << 18) /* Bit 18: TIM 11 clock enable */ +#define RCC_APB2ENR_SPI5EN (1 << 20) /* Bit 20: SPI 5 clock enable */ +#define RCC_APB2ENR_SPI6EN (1 << 21) /* Bit 21: SPI 6 clock enable */ +#define RCC_APB2ENR_SAI1EN (1 << 22) /* Bit 22: SAI 1 clock enable */ +#define RCC_APB2ENR_SAI2EN (1 << 23) /* Bit 23: SAI 2 clock enable */ +#define RCC_APB2ENR_LTDCEN (1 << 26) /* Bit 26: LTDC clock enable */ +#define RCC_APB2ENR_DSIEN (1 << 27) /* Bit 27: DSI clock enable */ +#define RCC_APB2ENR_DFSDM1EN (1 << 29) /* Bit 29: DFSDM1 clock enable */ +#define RCC_APB2ENR_MDIOEN (1 << 30) /* Bit 30: MDIO clock enable */ + +/* RCC AHB1 low power mode peripheral clock enable register */ + +#define RCC_AHB1LPENR_GPIOLPEN(n) (1 << (n)) +#define RCC_AHB1LPENR_GPIOALPEN (1 << 0) /* Bit 0: IO port A clock enable during Sleep mode */ +#define RCC_AHB1LPENR_GPIOBLPEN (1 << 1) /* Bit 1: IO port B clock enable during Sleep mode */ +#define RCC_AHB1LPENR_GPIOCLPEN (1 << 2) /* Bit 2: IO port C clock enable during Sleep mode */ +#define RCC_AHB1LPENR_GPIODLPEN (1 << 3) /* Bit 3: IO port D clock enable during Sleep mode */ +#define RCC_AHB1LPENR_GPIOELPEN (1 << 4) /* Bit 4: IO port E clock enable during Sleep mode */ +#define RCC_AHB1LPENR_GPIOFLPEN (1 << 5) /* Bit 5: IO port F clock enable during Sleep mode */ +#define RCC_AHB1LPENR_GPIOGLPEN (1 << 6) /* Bit 6: IO port G clock enable during Sleep mode */ +#define RCC_AHB1LPENR_GPIOHLPEN (1 << 7) /* Bit 7: IO port H clock enable during Sleep mode */ +#define RCC_AHB1LPENR_GPIOILPEN (1 << 8) /* Bit 8: IO port I clock enable during Sleep mode */ +#define RCC_AHB1LPENR_GPIOJLPEN (1 << 9) /* Bit 8: IO port J clock enable during Sleep mode */ +#define RCC_AHB1LPENR_GPIOKLPEN (1 << 10) /* Bit 10: IO port K clock enable during Sleep mode */ +#define RCC_AHB1LPENR_CRCLPEN (1 << 12) /* Bit 12: CRC clock enable during Sleep mode */ +#define RCC_AHB1LPENR_AXILPEN (1 << 13) /* Bit 12: AXI to AHB bridge clock enable during Sleep mode */ +#define RCC_AHB1LPENR_FLITFLPEN (1 << 15) /* Bit 15: Flash interface clock enable during Sleep mode */ +#define RCC_AHB1LPENR_SRAM1LPEN (1 << 16) /* Bit 16: SRAM 1 interface clock enable during Sleep mode */ +#define RCC_AHB1LPENR_SRAM2LPEN (1 << 17) /* Bit 17: SRAM 2 interface clock enable during Sleep mode */ +#define RCC_AHB1LPENR_BKPSRAMLPEN (1 << 18) /* Bit 18: Backup SRAM interface clock enable during Sleep mode */ +#define RCC_AHB1LPENR_DTCMLPEN (1 << 20) /* Bit 20: DTCM RAM clock enable during Sleep mode */ +#define RCC_AHB1LPENR_DMA1LPEN (1 << 21) /* Bit 21: DMA1 clock enable during Sleep mode */ +#define RCC_AHB1LPENR_DMA2LPEN (1 << 22) /* Bit 22: DMA2 clock enable during Sleep mode */ +#define RCC_AHB1LPENR_DMA2DLPEN (1 << 23) /* Bit 23: DMA2D clock enable during Sleep mode */ +#define RCC_AHB1LPENR_ETHMACLPEN (1 << 25) /* Bit 25: Ethernet MAC clock enable during Sleep mode */ +#define RCC_AHB1LPENR_ETHTXLPEN (1 << 26) /* Bit 26: Ethernet Transmission clock enable during Sleep mode */ +#define RCC_AHB1LPENR_ETHRXLPEN (1 << 27) /* Bit 27: Ethernet Reception clock enable during Sleep mode */ + +#define RCC_AHB1LPENR_ETHPTPLPEN (1 << 28) /* Bit 28: Ethernet PTP clock enable during Sleep mode */ +#define RCC_AHB1LPENR_OTGHSLPEN (1 << 29) /* Bit 29: USB OTG HS clock enable during Sleep mode */ +#define RCC_AHB1LPENR_OTGHSULPILPEN (1 << 30) /* Bit 30: USB OTG HSULPI clock enable during Sleep mode */ + +/* RCC AHB2 low power mode peripheral clock enable register */ + +#define RCC_AHB2LPENR_DCMILPEN (1 << 0) /* Bit 0: Camera interface enable during Sleep mode */ +#define RCC_AHB2LPENR_JPEGLPEN (1 << 1) /* Bit 1: Jpeg codec enable during Sleep mode */ +#define RCC_AHB2LPENR_CRYPLPEN (1 << 4) /* Bit 4: Cryptographic modules clock enable during Sleep mode */ +#define RCC_AHB2LPENR_HASHLPEN (1 << 5) /* Bit 5: Hash modules clock enable during Sleep mode */ +#define RCC_AHB2LPENR_RNGLPEN (1 << 6) /* Bit 6: Random number generator clock enable during Sleep mode */ +#define RCC_AHB2LPENR_OTGFLPSEN (1 << 7) /* Bit 7: USB OTG FS clock enable during Sleep mode */ + +/* RCC AHB3 low power mode peripheral clock enable register */ + +#define RCC_AHB3LPENR_FSMLPEN (1 << 0) /* Bit 0: Flexible static memory controller module clock + * enable during Sleep mode */ +#define RCC_AHB3LPENR_QSPILPEN (1 << 1) /* Bit 1: Quad SPI memory controller clock + * enable during Sleep mode */ + +/* RCC APB1 low power mode peripheral clock enable register */ + +#define RCC_APB1LPENR_TIM2LPEN (1 << 0) /* Bit 0: TIM 2 clock enable during Sleep mode */ +#define RCC_APB1LPENR_TIM3LPEN (1 << 1) /* Bit 1: TIM 3 clock enable during Sleep mode */ +#define RCC_APB1LPENR_TIM4LPEN (1 << 2) /* Bit 2: TIM 4 clock enable during Sleep mode */ +#define RCC_APB1LPENR_TIM5LPEN (1 << 3) /* Bit 3: TIM 5 clock enable during Sleep mode */ +#define RCC_APB1LPENR_TIM6LPEN (1 << 4) /* Bit 4: TIM 6 clock enable during Sleep mode */ +#define RCC_APB1LPENR_TIM7LPEN (1 << 5) /* Bit 5: TIM 7 clock enable during Sleep mode */ +#define RCC_APB1LPENR_TIM12LPEN (1 << 6) /* Bit 6: TIM 12 clock enable during Sleep mode */ +#define RCC_APB1LPENR_TIM13LPEN (1 << 7) /* Bit 7: TIM 13 clock enable during Sleep mode */ +#define RCC_APB1LPENR_TIM14LPEN (1 << 8) /* Bit 8: TIM 14 clock enable during Sleep mode */ +#define RCC_APB1LPENR_LPTIM1LPEN (1 << 9) /* Bit 9: LPTIM 1 clock enable during Sleep mode */ +#define RCC_APB1LPENR_WWDGLPEN (1 << 11) /* Bit 11: Window watchdog clock enable during Sleep mode */ +#define RCC_APB1LPENR_SPI2LPEN (1 << 14) /* Bit 14: SPI 2 clock enable during Sleep mode */ +#define RCC_APB1LPENR_SPI3LPEN (1 << 15) /* Bit 15: SPI 3 clock enable during Sleep mode */ +#define RCC_APB1LPENR_SPDIFRXLPEN (1 << 16) /* Bit 16: SPDIFRX clock enable during Sleep mode */ +#define RCC_APB1LPENR_USART2LPEN (1 << 17) /* Bit 17: USART 2 clock enable during Sleep mode */ +#define RCC_APB1LPENR_USART3LPEN (1 << 18) /* Bit 18: USART 3 clock enable during Sleep mode */ +#define RCC_APB1LPENR_UART4LPEN (1 << 19) /* Bit 19: UART 4 clock enable during Sleep mode */ +#define RCC_APB1LPENR_UART5LPEN (1 << 20) /* Bit 20: UART 5 clock enable during Sleep mode */ +#define RCC_APB1LPENR_I2C1LPEN (1 << 21) /* Bit 21: I2C 1 clock enable during Sleep mode */ +#define RCC_APB1LPENR_I2C2LPEN (1 << 22) /* Bit 22: I2C 2 clock enable during Sleep mode */ +#define RCC_APB1LPENR_I2C3LPEN (1 << 23) /* Bit 23: I2C 3 clock enable during Sleep mode */ +#define RCC_APB1LPENR_I2C4LPEN (1 << 24) /* Bit 24: I2C 4 clock enable during Sleep mode */ +#define RCC_APB1LPENR_CAN1LPEN (1 << 25) /* Bit 25: CAN 1 clock enable during Sleep mode */ +#define RCC_APB1LPENR_CAN2LPEN (1 << 26) /* Bit 26: CAN 2 clock enable during Sleep mode */ +#define RCC_APB1LPENR_CECLPEN (1 << 27) /* Bit 27: CEC clock enable during Sleep mode */ +#define RCC_APB1LPENR_PWRLPEN (1 << 28) /* Bit 28: Power interface clock enable during Sleep mode */ +#define RCC_APB1LPENR_DACLPEN (1 << 29) /* Bit 29: DAC interface clock enable during Sleep mode */ +#define RCC_APB1LPENR_UART7LPEN (1 << 30) /* Bit 30: UART 7 clock enable during Sleep mode */ +#define RCC_APB1LPENR_UART8LPEN (1 << 31) /* Bit 31: UART 8 clock enable during Sleep mode */ + +/* RCC APB2 low power mode peripheral clock enable register */ + +#define RCC_APB2LPENR_TIM1LPEN (1 << 0) /* Bit 0: TIM 1 clock enable during Sleep mode */ +#define RCC_APB2LPENR_TIM8LPEN (1 << 1) /* Bit 1: TIM 8 clock enable during Sleep mode */ +#define RCC_APB2LPENR_USART1LPEN (1 << 4) /* Bit 4: USART 1 clock enable during Sleep mode */ +#define RCC_APB2LPENR_USART6LPEN (1 << 5) /* Bit 5: USART 6 clock enable during Sleep mode */ +#define RCC_APB2LPENR_SDMMC2LPEN (1 << 7) /* Bit 7: SDMMC 2 clock enable during Sleep mode */ +#define RCC_APB2LPENR_ADC1LPEN (1 << 8) /* Bit 8: ADC 1 clock enable during Sleep mode */ +#define RCC_APB2LPENR_ADC2LPEN (1 << 9) /* Bit 9: ADC 2 clock enable during Sleep mode */ +#define RCC_APB2LPENR_ADC3LPEN (1 << 10) /* Bit 10: ADC 3 clock enable during Sleep mode */ +#define RCC_APB2LPENR_SDMMC1LPEN (1 << 11) /* Bit 11: SDMMC 1 clock enable during Sleep mode */ +#define RCC_APB2LPENR_SPI1LPEN (1 << 12) /* Bit 12: SPI 1 clock enable during Sleep mode */ +#define RCC_APB2LPENR_SPI4LPEN (1 << 13) /* Bit 13: SPI 4 clock enable during Sleep mode */ +#define RCC_APB2LPENR_SYSCFGLPEN (1 << 14) /* Bit 14: System configuration controller clock enable during Sleep mode */ +#define RCC_APB2LPENR_TIM9LPEN (1 << 16) /* Bit 16: TIM 9 clock enable during Sleep mode */ +#define RCC_APB2LPENR_TIM10LPEN (1 << 17) /* Bit 17: TIM 10 clock enable during Sleep mode */ +#define RCC_APB2LPENR_TIM11LPEN (1 << 18) /* Bit 18: TIM 11 clock enable during Sleep mode */ +#define RCC_APB2LPENR_SPI5LPEN (1 << 20) /* Bit 20: SPI 5 clock enable during Sleep mode */ +#define RCC_APB2LPENR_SPI6LPEN (1 << 21) /* Bit 21: SPI 6 clock enable during Sleep mode */ +#define RCC_APB2LPENR_SAI1LPEN (1 << 22) /* Bit 22: SAI 1 clock enable during Sleep mode */ +#define RCC_APB2LPENR_SAI2LPEN (1 << 23) /* Bit 23: SAI 2 clock enable during Sleep mode */ +#define RCC_APB2LPENR_LTDCLPEN (1 << 26) /* Bit 26: LTDC clock enable during Sleep mode */ +#define RCC_APB2LPENR_DSILPEN (1 << 27) /* Bit 27: DSI clock enable during Sleep mode */ +#define RCC_APB2LPENR_DFSDM1LPEN (1 << 29) /* Bit 29: DFSDM1 clock enable during Sleep mode */ +#define RCC_APB2LPENR_MDIOLPEN (1 << 30) /* Bit 30: MDIO clock enable during Sleep mode */ + +/* Backup domain control register */ + +#define RCC_BDCR_LSEON (1 << 0) /* Bit 0: External Low Speed oscillator enable */ +#define RCC_BDCR_LSERDY (1 << 1) /* Bit 1: External Low Speed oscillator Ready */ +#define RCC_BDCR_LSEBYP (1 << 2) /* Bit 2: External Low Speed oscillator Bypass */ +#define RCC_BDCR_RTCSEL_SHIFT (8) /* Bits 9:8: RTC clock source selection */ +#define RCC_BDCR_RTCSEL_MASK (3 << RCC_BDCR_RTCSEL_SHIFT) +# define RCC_BDCR_RTCSEL_NOCLK (0 << RCC_BDCR_RTCSEL_SHIFT) /* 00: No clock */ +# define RCC_BDCR_RTCSEL_LSE (1 << RCC_BDCR_RTCSEL_SHIFT) /* 01: LSE oscillator clock used as RTC clock */ +# define RCC_BDCR_RTCSEL_LSI (2 << RCC_BDCR_RTCSEL_SHIFT) /* 10: LSI oscillator clock used as RTC clock */ +# define RCC_BDCR_RTCSEL_HSE (3 << RCC_BDCR_RTCSEL_SHIFT) /* 11: HSE oscillator clock divided by 128 used as RTC clock */ +#define RCC_BDCR_RTCEN (1 << 15) /* Bit 15: RTC clock enable */ +#define RCC_BDCR_BDRST (1 << 16) /* Bit 16: Backup domain software reset */ + +/* Control/status register */ + +#define RCC_CSR_LSION (1 << 0) /* Bit 0: Internal Low Speed oscillator enable */ +#define RCC_CSR_LSIRDY (1 << 1) /* Bit 1: Internal Low Speed oscillator Ready */ +#define RCC_CSR_RMVF (1 << 24) /* Bit 24: Remove reset flag */ +#define RCC_CSR_BORRSTF (1 << 25) /* Bit 25: BOR reset flag */ +#define RCC_CSR_PINRSTF (1 << 26) /* Bit 26: PIN reset flag */ +#define RCC_CSR_PORRSTF (1 << 27) /* Bit 27: POR/PDR reset flag */ +#define RCC_CSR_SFTRSTF (1 << 28) /* Bit 28: Software Reset flag */ +#define RCC_CSR_IWDGRSTF (1 << 29) /* Bit 29: Independent Watchdog reset flag */ +#define RCC_CSR_WWDGRSTF (1 << 30) /* Bit 30: Window watchdog reset flag */ +#define RCC_CSR_LPWRRSTF (1 << 31) /* Bit 31: Low-Power reset flag */ + +/* Spread spectrum clock generation register */ + +#define RCC_SSCGR_MODPER_SHIFT (0) /* Bit 0-12: Modulation period */ +#define RCC_SSCGR_MODPER_MASK (0x1fff << RCC_SSCGR_MODPER_SHIFT) +# define RCC_SSCGR_MODPER(n) ((n) << RCC_SSCGR_MODPER_SHIFT) +#define RCC_SSCGR_INCSTEP_SHIFT (13) /* Bit 13-27: Incrementation step */ +#define RCC_SSCGR_INCSTEP_MASK (0x7fff << RCC_SSCGR_INCSTEP_SHIFT) +# define RCC_SSCGR_INCSTEP(n) ((n) << RCC_SSCGR_INCSTEP_SHIFT) +#define RCC_SSCGR_SPREADSEL (1 << 30) /* Bit 30: Spread Select */ +#define RCC_SSCGR_SSCGEN (1 << 31) /* Bit 31: Spread spectrum modulation enable */ + +/* PLLI2S configuration register */ + +#define RCC_PLLI2SCFGR_PLLI2SN_SHIFT (6) /* Bits 6-14: PLLI2S multiplication factor for VCO */ +#define RCC_PLLI2SCFGR_PLLI2SN_MASK (0x1ff << RCC_PLLI2SCFGR_PLLI2SN_SHIFT) +# define RCC_PLLI2SCFGR_PLLI2SN(n) ((uint32_t)(n) << RCC_PLLI2SCFGR_PLLI2SN_SHIFT) +#define RCC_PLLI2SCFGR_PLLI2SP_SHIFT (16) /* Bits 16-17: PLLI2S division factor for SPDIFRX clock */ +#define RCC_PLLI2SCFGR_PLLI2SP_MASK (3 << RCC_PLLI2SCFGR_PLLI2SP_SHIFT) +# define RCC_PLLI2SCFGR_PLLI2SP(n) ((uint32_t)(n) << RCC_PLLI2SCFGR_PLLI2SP_SHIFT) +#define RCC_PLLI2SCFGR_PLLI2SQ_SHIFT (24) /* Bits 24-27: PLLI2S division factor for SAIs clock */ +#define RCC_PLLI2SCFGR_PLLI2SQ_MASK (15 << RCC_PLLI2SCFGR_PLLI2SQ_SHIFT) +# define RCC_PLLI2SCFGR_PLLI2SQ(n) ((uint32_t)(n) << RCC_PLLI2SCFGR_PLLI2SQ_SHIFT) +#define RCC_PLLI2SCFGR_PLLI2SR_SHIFT (28) /* Bits 28-30: PLLI2S division factor for I2S clocks */ +#define RCC_PLLI2SCFGR_PLLI2SR_MASK (7 << RCC_PLLI2SCFGR_PLLI2SR_SHIFT) +# define RCC_PLLI2SCFGR_PLLI2SR(n) (uint32_t)(n) << RCC_PLLI2SCFGR_PLLI2SR_SHIFT) + +/* PLLSAI configuration register */ + +#define RCC_PLLSAICFGR_PLLSAIN_SHIFT (6) /* Bits 6-14: PLLSAI divider (N) for VCO */ +#define RCC_PLLSAICFGR_PLLSAIN_MASK (0x1ff << RCC_PLLSAICFGR_PLLSAIN_SHIFT) +# define RCC_PLLSAICFGR_PLLSAIN(n) ((n) << RCC_PLLSAICFGR_PLLSAIN_SHIFT) +#define RCC_PLLSAICFGR_PLLSAIP_SHIFT (16) /* Bits 16-17: PLLSAI division factor for 48MHz clock */ +#define RCC_PLLSAICFGR_PLLSAIP_MASK (3 << RCC_PLLSAICFGR_PLLSAIP_SHIFT) +# define RCC_PLLSAICFGR_PLLSAIP(n) ((n) << RCC_PLLSAICFGR_PLLSAIP_SHIFT) +#define RCC_PLLSAICFGR_PLLSAIQ_SHIFT (24) /* Bits 24-27: PLLSAI division factor for SAI clock */ +#define RCC_PLLSAICFGR_PLLSAIQ_MASK (0x0F << RCC_PLLSAICFGR_PLLSAIQ_SHIFT) +# define RCC_PLLSAICFGR_PLLSAIQ(n) ((n) << RCC_PLLSAICFGR_PLLSAIQ_SHIFT) +#define RCC_PLLSAICFGR_PLLSAIR_SHIFT (28) /* Bits 28-30: PLLSAI division factor for LCD clock */ +#define RCC_PLLSAICFGR_PLLSAIR_MASK (7 << RCC_PLLSAICFGR_PLLSAIR_SHIFT) +# define RCC_PLLSAICFGR_PLLSAIR(n) ((n) << RCC_PLLSAICFGR_PLLSAIR_SHIFT) + +/* Dedicated clocks configuration register 1 */ + +#define RCC_DCKCFGR1_PLLI2SDIVQ_SHIFT (0) /* Bits 0-4: PLLI2S division factor for I2S clock */ +#define RCC_DCKCFGR1_PLLI2SDIVQ_MASK (0x1F << RCC_DCKCFGR1_PLLI2SDIVQ_SHIFT) +# define RCC_DCKCFGR1_PLLI2SDIVQ(n) ((n) << RCC_DCKCFGR1_PLLI2SDIVQ_SHIFT) +#define RCC_DCKCFGR1_PLLSAIDIVQ_SHIFT (8) /* Bits 8-12: PLLSAI division factor for SAI clock */ +#define RCC_DCKCFGR1_PLLSAIDIVQ_MASK (0x1F << RCC_DCKCFGR1_PLLSAIDIVQ_SHIFT) +# define RCC_DCKCFGR1_PLLSAIDIVQ(n) ((n) << RCC_DCKCFGR1_PLLSAIDIVQ_SHIFT) + +#define RCC_DCKCFGR1_PLLSAIDIVR_SHIFT (16) /* Bits 16-17: PLLSAI division factor for LCD_CLK clock */ +#define RCC_DCKCFGR1_PLLSAIDIVR_MASK (0x3 << RCC_DCKCFGR1_PLLSAIDIVR_SHIFT) +# define RCC_DCKCFGR1_PLLSAIDIVR(n) ((n) << RCC_DCKCFGR1_PLLSAIDIVR_SHIFT) + +#define RCC_DCKCFGR1_SAI1SEL_SHIFT (20) /* Bits 20-21: SAI 1 clock source selection */ +#define RCC_DCKCFGR1_SAI1SEL_MASK (0x3 << RCC_DCKCFGR1_SAI1SEL_SHIFT) +# define RCC_DCKCFGR1_SAI1SEL(n) ((n) << RCC_DCKCFGR1_SAI1SEL_SHIFT) + +#define RCC_DCKCFGR1_SAI2SEL_SHIFT (22) /* Bits 22-23: SAI 2 clock source selection */ +#define RCC_DCKCFGR1_SAI2SEL_MASK (0x3 << RCC_DCKCFGR1_SAI2SEL_SHIFT) +# define RCC_DCKCFGR1_SAI2SEL(n) ((n) << RCC_DCKCFGR1_SAI2SEL_SHIFT) +#define RCC_DCKCFGR1_TIMPRESEL (1 << 24) /* Bit 24: Timer clock prescaler selection */ +#define RCC_DCKCFGR1_DFSDM1SEL (1 << 25) /* Bit 25: DFSDM1 clock prescaler selection */ +#define RCC_DCKCFGR1_ADFSDM1SEL (1 << 26) /* Bit 26: DFSDM1 AUDIO clock prescaler selection */ + +/* Dedicated clocks configuration register 2 */ + +#define RCC_DCKCFGR2_USART1SEL_SHIFT (0) /* Bits 0-1: USART 1 clock source selection */ +#define RCC_DCKCFGR2_USART1SEL_MASK (3 << RCC_DCKCFGR2_USART1SEL_SHIFT) +# define RCC_DCKCFGR2_USART1SEL_APB (0 << RCC_DCKCFGR2_USART1SEL_SHIFT) /* APB2 clock (PCLK2) is selected as USART 1 clock */ +# define RCC_DCKCFGR2_USART1SEL_SYSCLK (1 << RCC_DCKCFGR2_USART1SEL_SHIFT) /* System clock is selected as USART 1 clock */ +# define RCC_DCKCFGR2_USART1SEL_HSI (2 << RCC_DCKCFGR2_USART1SEL_SHIFT) /* HSI clock is selected as USART 1 clock */ +# define RCC_DCKCFGR2_USART1SEL_LSE (3 << RCC_DCKCFGR2_USART1SEL_SHIFT) /* LSE clock is selected as USART 1 clock */ +#define RCC_DCKCFGR2_USART2SEL_SHIFT (2) /* Bits 2-3: USART 2 clock source selection */ +#define RCC_DCKCFGR2_USART2SEL_MASK (3 << RCC_DCKCFGR2_USART2SEL_SHIFT) +# define RCC_DCKCFGR2_USART2SEL_APB (0 << RCC_DCKCFGR2_USART2SEL_SHIFT) /* APB1 clock (PCLK1) is selected as USART 2 clock */ +# define RCC_DCKCFGR2_USART2SEL_SYSCLK (1 << RCC_DCKCFGR2_USART2SEL_SHIFT) /* System clock is selected as USART 2 clock */ +# define RCC_DCKCFGR2_USART2SEL_HSI (2 << RCC_DCKCFGR2_USART2SEL_SHIFT) /* HSI clock is selected as USART 2 clock */ +# define RCC_DCKCFGR2_USART2SEL_LSE (3 << RCC_DCKCFGR2_USART2SEL_SHIFT) /* LSE clock is selected as USART 2 clock */ +#define RCC_DCKCFGR2_UART4SEL_SHIFT (6) /* Bits 6-7: UART 4 clock source selection */ +#define RCC_DCKCFGR2_UART4SEL_MASK (3 << RCC_DCKCFGR2_UART4SEL_SHIFT) +# define RCC_DCKCFGR2_UART4SEL_APB (0 << RCC_DCKCFGR2_UART4SEL_SHIFT) /* APB1 clock (PCLK1) is selected as UART 4 clock */ +# define RCC_DCKCFGR2_UART4SEL_SYSCLK (1 << RCC_DCKCFGR2_UART4SEL_SHIFT) /* System clock is selected as UART 4 clock */ +# define RCC_DCKCFGR2_UART4SEL_HSI (2 << RCC_DCKCFGR2_UART4SEL_SHIFT) /* HSI clock is selected as UART 4 clock */ +# define RCC_DCKCFGR2_UART4SEL_LSE (3 << RCC_DCKCFGR2_UART4SEL_SHIFT) /* LSE clock is selected as UART 4 clock */ +#define RCC_DCKCFGR2_UART5SEL_SHIFT (8) /* Bits 8-9: UART 5 clock source selection */ +#define RCC_DCKCFGR2_UART5SEL_MASK (3 << RCC_DCKCFGR2_UART5SEL_SHIFT) +# define RCC_DCKCFGR2_UART5SEL_APB (0 << RCC_DCKCFGR2_UART5SEL_SHIFT) /* APB1 clock (PCLK1) is selected as UART 5 clock */ +# define RCC_DCKCFGR2_UART5SEL_SYSCLK (1 << RCC_DCKCFGR2_UART5SEL_SHIFT) /* System clock is selected as UART 5 clock */ +# define RCC_DCKCFGR2_UART5SEL_HSI (2 << RCC_DCKCFGR2_UART5SEL_SHIFT) /* HSI clock is selected as UART 5 clock */ +# define RCC_DCKCFGR2_UART5SEL_LSE (3 << RCC_DCKCFGR2_UART5SEL_SHIFT) /* LSE clock is selected as UART 5 clock */ +#define RCC_DCKCFGR2_USART6SEL_SHIFT (10) /* Bits 10-11: USART 6 clock source selection */ +#define RCC_DCKCFGR2_USART6SEL_MASK (3 << RCC_DCKCFGR2_USART6SEL_SHIFT) +# define RCC_DCKCFGR2_USART6SEL_APB (0 << RCC_DCKCFGR2_USART6SEL_SHIFT) /* APB2 clock (PCLK2) is selected as USART 6 clock */ +# define RCC_DCKCFGR2_USART6SEL_SYSCLK (1 << RCC_DCKCFGR2_USART6SEL_SHIFT) /* System clock is selected as USART 6 clock */ +# define RCC_DCKCFGR2_USART6SEL_HSI (2 << RCC_DCKCFGR2_USART6SEL_SHIFT) /* HSI clock is selected as USART 6 clock */ +# define RCC_DCKCFGR2_USART6SEL_LSE (3 << RCC_DCKCFGR2_USART6SEL_SHIFT) /* LSE clock is selected as USART 6 clock */ +#define RCC_DCKCFGR2_UART7SEL_SHIFT (12) /* Bits 12-13: UART 7 clock source selection */ +#define RCC_DCKCFGR2_UART7SEL_MASK (3 << RCC_DCKCFGR2_UART7SEL_SHIFT) +# define RCC_DCKCFGR2_UART7SEL_APB (0 << RCC_DCKCFGR2_UART7SEL_SHIFT) /* APB1 clock (PCLK1) is selected as UART 7 clock */ +# define RCC_DCKCFGR2_UART7SEL_SYSCLK (1 << RCC_DCKCFGR2_UART7SEL_SHIFT) /* System clock is selected as UART 7 clock */ +# define RCC_DCKCFGR2_UART7SEL_HSI (2 << RCC_DCKCFGR2_UART7SEL_SHIFT) /* HSI clock is selected as UART 7 clock */ +# define RCC_DCKCFGR2_UART7SEL_LSE (3 << RCC_DCKCFGR2_UART7SEL_SHIFT) /* LSE clock is selected as UART 7 clock */ +#define RCC_DCKCFGR2_UART8SEL_SHIFT (14) /* Bits 14-15: UART 8 clock source selection */ +#define RCC_DCKCFGR2_UART8SEL_MASK (3 << RCC_DCKCFGR2_UART8SEL_SHIFT) +# define RCC_DCKCFGR2_UART8SEL_APB (0 << RCC_DCKCFGR2_UART8SEL_SHIFT) /* APB1 clock (PCLK1) is selected as UART 8 clock */ +# define RCC_DCKCFGR2_UART8SEL_SYSCLK (1 << RCC_DCKCFGR2_UART8SEL_SHIFT) /* System clock is selected as UART 8 clock */ +# define RCC_DCKCFGR2_UART8SEL_HSI (2 << RCC_DCKCFGR2_UART8SEL_SHIFT) /* HSI clock is selected as UART 8 clock */ +# define RCC_DCKCFGR2_UART8SEL_LSE (3 << RCC_DCKCFGR2_UART8SEL_SHIFT) /* LSE clock is selected as UART 8 clock */ +#define RCC_DCKCFGR2_I2C1SEL_SHIFT (16) /* Bits 16-17: I2C1 clock source selection */ +#define RCC_DCKCFGR2_I2C1SEL_MASK (3 << RCC_DCKCFGR2_I2C1SEL_SHIFT) +# define RCC_DCKCFGR2_I2C1SEL_APB (0 << RCC_DCKCFGR2_I2C1SEL_SHIFT) /* APB1 clock (PCLK1) is selected as I2C 1 clock */ +# define RCC_DCKCFGR2_I2C1SEL_SYSCLK (1 << RCC_DCKCFGR2_I2C1SEL_SHIFT) /* System clock is selected as I2C 1 clock */ +# define RCC_DCKCFGR2_I2C1SEL_HSI (2 << RCC_DCKCFGR2_I2C1SEL_SHIFT) /* HSI clock is selected as I2C 1 clock */ +#define RCC_DCKCFGR2_I2C2SEL_SHIFT (18) /* Bits 18-19: I2C2 clock source selection */ +#define RCC_DCKCFGR2_I2C2SEL_MASK (3 << RCC_DCKCFGR2_I2C2SEL_SHIFT) +# define RCC_DCKCFGR2_I2C2SEL_APB (0 << RCC_DCKCFGR2_I2C2SEL_SHIFT) /* APB1 clock (PCLK1) is selected as I2C 2 clock */ +# define RCC_DCKCFGR2_I2C2SEL_SYSCLK (1 << RCC_DCKCFGR2_I2C2SEL_SHIFT) /* System clock is selected as I2C 2 clock */ +# define RCC_DCKCFGR2_I2C2SEL_HSI (2 << RCC_DCKCFGR2_I2C2SEL_SHIFT) /* HSI clock is selected as I2C 2 clock */ +#define RCC_DCKCFGR2_I2C3SEL_SHIFT (20) /* Bits 20-21: I2C3 clock source selection */ +#define RCC_DCKCFGR2_I2C3SEL_MASK (3 << RCC_DCKCFGR2_I2C3SEL_SHIFT) +# define RCC_DCKCFGR2_I2C3SEL_APB (0 << RCC_DCKCFGR2_I2C3SEL_SHIFT) /* APB1 clock (PCLK1) is selected as I2C 3 clock */ +# define RCC_DCKCFGR2_I2C3SEL_SYSCLK (1 << RCC_DCKCFGR2_I2C3SEL_SHIFT) /* System clock is selected as I2C 3 clock */ +# define RCC_DCKCFGR2_I2C3SEL_HSI (2 << RCC_DCKCFGR2_I2C3SEL_SHIFT) /* HSI clock is selected as I2C 3 clock */ +#define RCC_DCKCFGR2_I2C4SEL_SHIFT (22) /* Bits 22-23: I2C4 clock source selection */ +#define RCC_DCKCFGR2_I2C4SEL_MASK (3 << RCC_DCKCFGR2_I2C4SEL_SHIFT) +# define RCC_DCKCFGR2_I2C4SEL_APB (0 << RCC_DCKCFGR2_I2C4SEL_SHIFT) /* APB1 clock (PCLK1) is selected as I2C 4 clock */ +# define RCC_DCKCFGR2_I2C4SEL_SYSCLK (1 << RCC_DCKCFGR2_I2C4SEL_SHIFT) /* System clock is selected as I2C 4 clock */ +# define RCC_DCKCFGR2_I2C4SEL_HSI (2 << RCC_DCKCFGR2_I2C4SEL_SHIFT) /* HSI clock is selected as I2C 4 clock */ +#define RCC_DCKCFGR2_LPTIM1SEL_SHIFT (24) /* Bits 24-25: Low power timer 1 clock source selection */ +#define RCC_DCKCFGR2_LPTIM1SEL_MASK (3 << RCC_DCKCFGR2_LPTIM1SEL_SHIFT) +# define RCC_DCKCFGR2_LPTIM1SEL_APB (0 << RCC_DCKCFGR2_LPTIM1SEL_SHIFT) /* APB1 clock (PCLK1) is selected as LPTIM 1 clock */ +# define RCC_DCKCFGR2_LPTIM1SEL_SYSCLK (1 << RCC_DCKCFGR2_LPTIM1SEL_SHIFT) /* System clock is selected as LPTIM 1 clock */ +# define RCC_DCKCFGR2_LPTIM1SEL_HSI (2 << RCC_DCKCFGR2_LPTIM1SEL_SHIFT) /* HSI clock is selected as LPTIM 1 clock */ +# define RCC_DCKCFGR2_LPTIM1SEL_LSE (3 << RCC_DCKCFGR2_LPTIM1SEL_SHIFT) /* LSE clock is selected as LPTIM 1 clock */ +#define RCC_DCKCFGR2_CECSEL_SHIFT (26) /* Bit 26: HDMI-CEC clock source selection */ +#define RCC_DCKCFGR2_CECSEL_MASK (1 << RCC_DCKCFGR2_CECSEL_SHIFT) +# define RCC_DCKCFGR2_CECSEL_LSE (0 << RCC_DCKCFGR2_CECSEL_SHIFT) /* LSE clock is selected as HDMI-CEC clock */ +# define RCC_DCKCFGR2_CECSEL_HSI (1 << RCC_DCKCFGR2_CECSEL_SHIFT) /* HSI clock is selected as HDMI-CEC clock */ +#define RCC_DCKCFGR2_CK48MSEL_SHIFT (27) /* Bit 27: 48MHz clock source selection */ +#define RCC_DCKCFGR2_CK48MSEL_MASK (1 << RCC_DCKCFGR2_CK48MSEL_SHIFT) +# define RCC_DCKCFGR2_CK48MSEL_PLL (0 << RCC_DCKCFGR2_CK48MSEL_SHIFT) /* 48MHz clock from PLL is selected */ +# define RCC_DCKCFGR2_CK48MSEL_PLLSAI (1 << RCC_DCKCFGR2_CK48MSEL_SHIFT) /*48MHz clock from PLLSAI is selected */ +#define RCC_DCKCFGR2_SDMMCSEL_SHIFT (28) /* Bit 28: SDMMC clock source selection */ +#define RCC_DCKCFGR2_SDMMCSEL_MASK (1 << RCC_DCKCFGR2_SDMMCSEL_SHIFT) +# define RCC_DCKCFGR2_SDMMCSEL_48MHZ (0 << RCC_DCKCFGR2_SDMMCSEL_SHIFT) /* 48 MHz clock is selected as SDMMC clock */ +# define RCC_DCKCFGR2_SDMMCSEL_SYSCLK (1 << RCC_DCKCFGR2_SDMMCSEL_SHIFT) /* System clock is selected as SDMMC clock */ +#define RCC_DCKCFGR2_SDMMC2SEL_SHIFT (29) /* Bit 29: SDMMC 2 clock source selection */ +#define RCC_DCKCFGR2_SDMMC2SEL_MASK (1 << RCC_DCKCFGR2_SDMMC2SEL_SHIFT) +# define RCC_DCKCFGR2_SDMMC2SEL_48MHZ (0 << RCC_DCKCFGR2_SDMMC2SEL_SHIFT) /* 48 MHz clock is selected as SDMMC 2 clock */ +# define RCC_DCKCFGR2_SDMMC2SEL_SYSCLK (1 << RCC_DCKCFGR2_SDMMC2SEL_SHIFT) /* System clock is selected as SDMMC 2 clock */ +#define RCC_DCKCFGR2_DSISEL_SHIFT (30) /* Bit 30: DSI clock source selection */ +#define RCC_DCKCFGR2_DSISELL_MASK (1 << RCC_DCKCFGR2_DSISEL_SHIFT) +# define RCC_DCKCFGR2_DSISEL_48MHZ (0 << RCC_DCKCFGR2_DSISEL_SHIFT) /* 48 MHz clock is selected as DSI clock */ +# define RCC_DCKCFGR2_DSISEL_SYSCLK (1 << RCC_DCKCFGR2_DSISEL_SHIFT) /* System clock is selected as DSI clock */ + +#endif /* CONFIG_STM32F7_STM32F76XX || CONFIG_STM32F7_STM32F77XX */ +#endif /* __ARCH_ARM_SRC_STM32_CHIP_STM32F76XX77XX_RCC_H */ diff --git a/arch/arm/src/stm32f7/chip/stm32f76xx77xx_syscfg.h b/arch/arm/src/stm32f7/chip/stm32f76xx77xx_syscfg.h new file mode 100644 index 0000000000000000000000000000000000000000..d3a469fe8a6179672e2da7d470e9fe8a38eeb0b8 --- /dev/null +++ b/arch/arm/src/stm32f7/chip/stm32f76xx77xx_syscfg.h @@ -0,0 +1,180 @@ +/**************************************************************************************************** + * arch/arm/src/stm32f7/chip/stm32f76xx77xx_syscfg.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: 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. + * + ****************************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32F7_CHIP_STM32F76XX77XX_SYSCFG_H +#define __ARCH_ARM_SRC_STM32F7_CHIP_STM32F76XX77XX_SYSCFG_H + +/**************************************************************************************************** + * Included Files + ****************************************************************************************************/ + +#include +#include "chip.h" + +#if defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) + +/**************************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************************/ + +/* Register Offsets *********************************************************************************/ + +#define STM32_SYSCFG_MEMRMP_OFFSET 0x0000 /* SYSCFG memory remap register */ +#define STM32_SYSCFG_PMC_OFFSET 0x0004 /* SYSCFG peripheral mode configuration register */ + +#define STM32_SYSCFG_EXTICR_OFFSET(p) (0x0008 + ((p) & 0x000c)) /* Registers are displaced by 4! */ +#define STM32_SYSCFG_EXTICR1_OFFSET 0x0008 /* SYSCFG external interrupt configuration register 1 */ +#define STM32_SYSCFG_EXTICR2_OFFSET 0x000c /* SYSCFG external interrupt configuration register 2 */ +#define STM32_SYSCFG_EXTICR3_OFFSET 0x0010 /* SYSCFG external interrupt configuration register 3 */ +#define STM32_SYSCFG_EXTICR4_OFFSET 0x0014 /* SYSCFG external interrupt configuration register 4 */ + +#define STM32_SYSCFG_CBR_OFFSET 0x001c /* Class B register */ +#define STM32_SYSCFG_CMPCR_OFFSET 0x0020 /* Compensation cell control register */ + +/* Register Addresses *******************************************************************************/ + +#define STM32_SYSCFG_MEMRMP (STM32_SYSCFG_BASE+STM32_SYSCFG_MEMRMP_OFFSET) +#define STM32_SYSCFG_PMC (STM32_SYSCFG_BASE+STM32_SYSCFG_PMC_OFFSET) + +#define STM32_SYSCFG_EXTICR(p) (STM32_SYSCFG_BASE+STM32_SYSCFG_EXTICR_OFFSET(p)) +#define STM32_SYSCFG_EXTICR1 (STM32_SYSCFG_BASE+STM32_SYSCFG_EXTICR1_OFFSET) +#define STM32_SYSCFG_EXTICR2 (STM32_SYSCFG_BASE+STM32_SYSCFG_EXTICR2_OFFSET) +#define STM32_SYSCFG_EXTICR3 (STM32_SYSCFG_BASE+STM32_SYSCFG_EXTICR3_OFFSET) +#define STM32_SYSCFG_EXTICR4 (STM32_SYSCFG_BASE+STM32_SYSCFG_EXTICR4_OFFSET) + +#define STM32_SYSCFG_CBR (STM32_SYSCFG_BASE+STM32_SYSCFG_CBR_OFFSET) +#define STM32_SYSCFG_CMPCR (STM32_SYSCFG_BASE+STM32_SYSCFG_CMPCR_OFFSET) + +/* Register Bitfield Definitions ********************************************************************/ + +/* SYSCFG memory remap register */ + +#define SYSCFG_MEMRMP_MEMBOOT (1 << 0) /* Bit 0: Memory boot mapping */ +#define SYSCFG_MEMRMP_MEMBOOT_ADD0 (0 << 0) /* 0=BOOT_ADD0 defines */ +#define SYSCFG_MEMRMP_MEMBOOT_ADD1 (1 << 0) /* 1=BOOT_ADD1 defines */ +#define SYSCFG_MEMRMP_SWP_FB (1 << 8) /* Bits 8: Flash Bank swap */ +#define SYSCFG_MEMRMP_SWP_FB_BNK1 (0 << 8) /* Flash Bank 1 mapped at 0x08000000 + * Flash Bank 2 mapped at 0x08100000 */ +#define SYSCFG_MEMRMP_SWP_FB_BNK2 (1 << 8) /* Flash Bank 2 mapped at 0x08000000 + * Flash Bank 1 mapped at 0x08100000 */ +#define SYSCFG_MEMRMP_SWPFMC_SHIFT (10) /* Bits 10-11: FMC memory mapping swap */ +#define SYSCFG_MEMRMP_SWPFMC_MASK (3 << SYSCFG_MEMRMP_SWPFMC_SHIFT) +# define SYSCFG_MEMRMP_SWPFMC_NONE (0 << SYSCFG_MEMRMP_SWPFMC_SHIFT) /* No FMC memory mapping swapping */ +# define SYSCFG_MEMRMP_SWPFMC_NORRAM (1 << SYSCFG_MEMRMP_SWPFMC_SHIFT) /* NOR/RAM and SDRAM memory mapping swapped */ + +/* SYSCFG peripheral mode configuration register */ + +#define SYSCFG_PMC_I2C1_FMP (1 << 0) /* Bit 0: I2C1 Fast-mode Plus Enable */ +#define SYSCFG_PMC_I2C2_FMP (1 << 1) /* Bit 1: I2C2 Fast-mode Plus Enable */ +#define SYSCFG_PMC_I2C3_FMP (1 << 2) /* Bit 2: I2C3 Fast-mode Plus Enable */ +#define SYSCFG_PMC_I2C4_FMP (1 << 3) /* Bit 3: I2C4 Fast-mode Plus Enable */ +#define SYSCFG_PMC_PB6_FMP (1 << 4) /* Bit 4: PB6 IO pads Fast-mode Plus Enable */ +#define SYSCFG_PMC_PB7_FMP (1 << 5) /* Bit 5: PB7 IO pads Fast-mode Plus Enable */ +#define SYSCFG_PMC_PB8_FMP (1 << 6) /* Bit 6: PB8 IO pads Fast-mode Plus Enable */ +#define SYSCFG_PMC_PB9_FMP (1 << 7) /* Bit 7: PB9 IO pads Fast-mode Plus Enable */ +#define SYSCFG_PMC_ADC1DC2 (1 << 16) /* Bit 16: See AN4073 */ +#define SYSCFG_PMC_ADC2DC2 (1 << 17) /* Bit 17: See AN4073 */ +#define SYSCFG_PMC_ADC3DC2 (1 << 18) /* Bit 18: See AN4073 */ +#define SYSCFG_PMC_MII_RMII_SEL (1 << 23) /* Bit 23: Ethernet PHY interface selection */ +# define SYSCFG_PMC_MII_SEL (0 << 23) /* 0 selects MII */ +# define SYSCFG_PMC_RMII_SEL (1 << 23) /* 1 selects RMII */ + +/* SYSCFG external interrupt configuration register 1-4 */ + +#define SYSCFG_EXTICR_PORTA (0) /* 0000: PA[x] pin */ +#define SYSCFG_EXTICR_PORTB (1) /* 0001: PB[x] pin */ +#define SYSCFG_EXTICR_PORTC (2) /* 0010: PC[x] pin */ +#define SYSCFG_EXTICR_PORTD (3) /* 0011: PD[x] pin */ +#define SYSCFG_EXTICR_PORTE (4) /* 0100: PE[x] pin */ +#define SYSCFG_EXTICR_PORTF (5) /* 0101: PF[C] pin */ +#define SYSCFG_EXTICR_PORTG (6) /* 0110: PG[x] pin */ +#define SYSCFG_EXTICR_PORTH (7) /* 0111: PH[x] pin */ +#define SYSCFG_EXTICR_PORTI (8) /* 1000: PI[x] pin */ +#define SYSCFG_EXTICR_PORTJ (9) /* 1001: PJ[x] pin */ +#define SYSCFG_EXTICR_PORTK (10) /* 1010: PK[x] pin */ + +#define SYSCFG_EXTICR_PORT_MASK (15) +#define SYSCFG_EXTICR_EXTI_SHIFT(g) (((g) & 3) << 2) +#define SYSCFG_EXTICR_EXTI_MASK(g) (SYSCFG_EXTICR_PORT_MASK << (SYSCFG_EXTICR_EXTI_SHIFT(g))) + +#define SYSCFG_EXTICR1_EXTI0_SHIFT (0) /* Bits 0-3: EXTI 0 coinfiguration */ +#define SYSCFG_EXTICR1_EXTI0_MASK (SYSCFG_EXTICR_PORT_MASK << SYSCFG_EXTICR1_EXTI0_SHIFT) +#define SYSCFG_EXTICR1_EXTI1_SHIFT (4) /* Bits 4-7: EXTI 1 coinfiguration */ +#define SYSCFG_EXTICR1_EXTI1_MASK (SYSCFG_EXTICR_PORT_MASK << SYSCFG_EXTICR1_EXTI1_SHIFT) +#define SYSCFG_EXTICR1_EXTI2_SHIFT (8) /* Bits 8-11: EXTI 2 coinfiguration */ +#define SYSCFG_EXTICR1_EXTI2_MASK (SYSCFG_EXTICR_PORT_MASK << SYSCFG_EXTICR1_EXTI2_SHIFT) +#define SYSCFG_EXTICR1_EXTI3_SHIFT (12) /* Bits 12-15: EXTI 3 coinfiguration */ +#define SYSCFG_EXTICR1_EXTI3_MASK (SYSCFG_EXTICR_PORT_MASK << SYSCFG_EXTICR1_EXTI3_SHIFT) + +#define SYSCFG_EXTICR2_EXTI4_SHIFT (0) /* Bits 0-3: EXTI 4 coinfiguration */ +#define SYSCFG_EXTICR2_EXTI4_MASK (SYSCFG_EXTICR_PORT_MASK << SYSCFG_EXTICR2_EXTI4_SHIFT) +#define SYSCFG_EXTICR2_EXTI5_SHIFT (4) /* Bits 4-7: EXTI 5 coinfiguration */ +#define SYSCFG_EXTICR2_EXTI5_MASK (SYSCFG_EXTICR_PORT_MASK << SYSCFG_EXTICR2_EXTI5_SHIFT) +#define SYSCFG_EXTICR2_EXTI6_SHIFT (8) /* Bits 8-11: EXTI 6 coinfiguration */ +#define SYSCFG_EXTICR2_EXTI6_MASK (SYSCFG_EXTICR_PORT_MASK << SYSCFG_EXTICR2_EXTI6_SHIFT) +#define SYSCFG_EXTICR2_EXTI7_SHIFT (12) /* Bits 12-15: EXTI 7 coinfiguration */ +#define SYSCFG_EXTICR2_EXTI7_MASK (SYSCFG_EXTICR_PORT_MASK << SYSCFG_EXTICR2_EXTI7_SHIFT) + +#define SYSCFG_EXTICR3_EXTI8_SHIFT (0) /* Bits 0-3: EXTI 8 coinfiguration */ +#define SYSCFG_EXTICR3_EXTI8_MASK (SYSCFG_EXTICR_PORT_MASK << SYSCFG_EXTICR3_EXTI8_SHIFT) +#define SYSCFG_EXTICR3_EXTI9_SHIFT (4) /* Bits 4-7: EXTI 9 coinfiguration */ +#define SYSCFG_EXTICR3_EXTI9_MASK (SYSCFG_EXTICR_PORT_MASK << SYSCFG_EXTICR3_EXTI9_SHIFT) +#define SYSCFG_EXTICR3_EXTI10_SHIFT (8) /* Bits 8-11: EXTI 10 coinfiguration */ +#define SYSCFG_EXTICR3_EXTI10_MASK (SYSCFG_EXTICR_PORT_MASK << SYSCFG_EXTICR3_EXTI10_SHIFT) +#define SYSCFG_EXTICR3_EXTI11_SHIFT (12) /* Bits 12-15: EXTI 11 coinfiguration */ +#define SYSCFG_EXTICR3_EXTI11_MASK (SYSCFG_EXTICR_PORT_MASK << SYSCFG_EXTICR3_EXTI11_SHIFT) + +#define SYSCFG_EXTICR4_EXTI12_SHIFT (0) /* Bits 0-3: EXTI 12 coinfiguration */ +#define SYSCFG_EXTICR4_EXTI12_MASK (SYSCFG_EXTICR_PORT_MASK << SYSCFG_EXTICR4_EXTI12_SHIFT) +#define SYSCFG_EXTICR4_EXTI13_SHIFT (4) /* Bits 4-7: EXTI 13 coinfiguration */ +#define SYSCFG_EXTICR4_EXTI13_MASK (SYSCFG_EXTICR_PORT_MASK << SYSCFG_EXTICR4_EXTI13_SHIFT) +#define SYSCFG_EXTICR4_EXTI14_SHIFT (8) /* Bits 8-11: EXTI 14 coinfiguration */ +#define SYSCFG_EXTICR4_EXTI14_MASK (SYSCFG_EXTICR_PORT_MASK << SYSCFG_EXTICR4_EXTI14_SHIFT) +#define SYSCFG_EXTICR4_EXTI15_SHIFT (12) /* Bits 12-15: EXTI 15 coinfiguration */ +#define SYSCFG_EXTICR4_EXTI15_MASK (SYSCFG_EXTICR_PORT_MASK << SYSCFG_EXTICR4_EXTI15_SHIFT) + +/* Class B register */ + +#define SYSCFG_CBR_PVD (1 << 0) /* Bit 0: PVDL: PVD Lock */ +#define SYSCFG_CBR_CLL (1 << 2) /* Bit 2: CLL Core Lockup Lock*/ + +/* Compensation cell control register */ + +#define SYSCFG_CMPCR_CMPPD (1 << 0) /* Bit 0: Compensation cell power-down */ +#define SYSCFG_CMPCR_READY (1 << 8) /* Bit 8: Compensation cell ready flag */ + +#endif /* CONFIG_STM32F7_STM32F76XX || CONFIG_STM32F7_STM32F77XX */ +#endif /* __ARCH_ARM_SRC_STM32F7_CHIP_STM32F76XX77XX_SYSCFG_H */ diff --git a/arch/arm/src/stm32f7/chip/stm32f76xx77xx_tim.h b/arch/arm/src/stm32f7/chip/stm32f76xx77xx_tim.h new file mode 100644 index 0000000000000000000000000000000000000000..bb6a657aa8457f1088a582cdcf4ddad6fb3105b5 --- /dev/null +++ b/arch/arm/src/stm32f7/chip/stm32f76xx77xx_tim.h @@ -0,0 +1,1147 @@ +/**************************************************************************************************** + * arch/arm/src/stm32f7/chip/stm32f76xx77xx_tim.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: 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. + * + ****************************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32F7_CHIP_STM32F76XX77XX_TIM_H +#define __ARCH_ARM_SRC_STM32F7_CHIP_STM32F76XX77XX_TIM_H + +/**************************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************************/ + +/* Register Offsets *********************************************************************************/ + +/* Basic Timers - TIM6 and TIM7 */ + +#define STM32_BTIM_CR1_OFFSET 0x0000 /* Control register 1 (16-bit) */ +#define STM32_BTIM_CR2_OFFSET 0x0004 /* Control register 2 (16-bit) */ +#define STM32_BTIM_DIER_OFFSET 0x000c /* DMA/Interrupt enable register (16-bit) */ +#define STM32_BTIM_SR_OFFSET 0x0010 /* Status register (16-bit) */ +#define STM32_BTIM_EGR_OFFSET 0x0014 /* Event generation register (16-bit) */ +#define STM32_BTIM_CNT_OFFSET 0x0024 /* Counter (16-bit) */ +#define STM32_BTIM_PSC_OFFSET 0x0028 /* Prescaler (16-bit) */ +#define STM32_BTIM_ARR_OFFSET 0x002c /* Auto-reload register (16-bit) */ + +/* 16-/32-bit General Timers with DMA: TIM2, TM3, TIM4, and TIM5 + * 16-bit General Timers without DMA: TIM9, TIM10, TIM11, TIM12, TIM13, and TIM14 + * timers are 16-bit except for TIM2 and 5 are 32-bit + * timers TIM9 and 12 are different then TIM10, TIM11, TIM13, and TIM14 + */ + +#define STM32_GTIM_CR1_OFFSET 0x0000 /* Control register 1 (16-bit) */ +#define STM32_GTIM_CR2_OFFSET 0x0004 /* Control register 2 (16-bit, TIM2, 5 only) */ +#define STM32_GTIM_SMCR_OFFSET 0x0008 /* Slave mode control register (32-bit, TIM2, 5, 9, 12 only) */ +#define STM32_GTIM_DIER_OFFSET 0x000c /* DMA/Interrupt enable register (16-bit) */ +#define STM32_GTIM_SR_OFFSET 0x0010 /* Status register (16-bit) */ +#define STM32_GTIM_EGR_OFFSET 0x0014 /* Event generation register (16-bit) */ +#define STM32_GTIM_CCMR1_OFFSET 0x0018 /* Capture/compare mode register 1 (32-bit) */ +#define STM32_GTIM_CCMR2_OFFSET 0x001c /* Capture/compare mode register 2 (32-bit on TIM2,5 only) */ +#define STM32_GTIM_CCER_OFFSET 0x0020 /* Capture/compare enable register (16-bit) */ +#define STM32_GTIM_CNT_OFFSET 0x0024 /* Counter (16 bit and 32-bit on TIM2, 5 only) */ +#define STM32_GTIM_PSC_OFFSET 0x0028 /* Prescaler (16-bit) */ +#define STM32_GTIM_ARR_OFFSET 0x002c /* Auto-reload register (16 bit and 32-bit on TIM2, 5 only) */ +#define STM32_GTIM_CCR1_OFFSET 0x0034 /* Capture/compare register 1 (16-bit on all TIMx and 32-bit on TIM2,5 only) */ +#define STM32_GTIM_CCR2_OFFSET 0x0038 /* Capture/compare register 2 (16-bit TIM 3-4, 9, 12 and 32-bit on TIM2,5 only) */ +#define STM32_GTIM_CCR3_OFFSET 0x003c /* Capture/compare register 3 (16-bit TIM 3-4 and 32-bit on TIM2,5 only) */ +#define STM32_GTIM_CCR4_OFFSET 0x0040 /* Capture/compare register 4 (16-bit TIM 3-4 and 32-bit on TIM2,5 only) */ +#define STM32_GTIM_DCR_OFFSET 0x0048 /* DMA control register (16-bit, TIM2-5 only) */ +#define STM32_GTIM_DMAR_OFFSET 0x004c /* DMA address for burst mode (16-bit, TIM2-5 only) */ +#define STM32_GTIM_OR_OFFSET 0x0050 /* Timer 2/5/11 option register */ + +/* Advanced Timers - TIM1 and TIM8 */ + +#define STM32_ATIM_CR1_OFFSET 0x0000 /* Control register 1 (16-bit) */ +#define STM32_ATIM_CR2_OFFSET 0x0004 /* Control register 2 (32-bit*) */ +#define STM32_ATIM_SMCR_OFFSET 0x0008 /* Slave mode control register (32 -bit) */ +#define STM32_ATIM_DIER_OFFSET 0x000c /* DMA/Interrupt enable register (16-bit) */ +#define STM32_ATIM_SR_OFFSET 0x0010 /* Status register (32-bit*) */ +#define STM32_ATIM_EGR_OFFSET 0x0014 /* Event generation register (16-bit) */ +#define STM32_ATIM_CCMR1_OFFSET 0x0018 /* Capture/compare mode register 1 (32-bit*) */ +#define STM32_ATIM_CCMR2_OFFSET 0x001c /* Capture/compare mode register 2 (32-bit*) */ +#define STM32_ATIM_CCER_OFFSET 0x0020 /* Capture/compare enable register (32-bit*) */ +#define STM32_ATIM_CNT_OFFSET 0x0024 /* Counter (32-bit cnt in lower 16 bit ) */ +#define STM32_ATIM_PSC_OFFSET 0x0028 /* Prescaler (16-bit) */ +#define STM32_ATIM_ARR_OFFSET 0x002c /* Auto-reload register (16-bit) */ +#define STM32_ATIM_RCR_OFFSET 0x0030 /* Repetition counter register (16-bit) */ +#define STM32_ATIM_CCR1_OFFSET 0x0034 /* Capture/compare register 1 (16-bit) */ +#define STM32_ATIM_CCR2_OFFSET 0x0038 /* Capture/compare register 2 (16-bit) */ +#define STM32_ATIM_CCR3_OFFSET 0x003c /* Capture/compare register 3 (16-bit) */ +#define STM32_ATIM_CCR4_OFFSET 0x0040 /* Capture/compare register 4 (16-bit) */ +#define STM32_ATIM_BDTR_OFFSET 0x0044 /* Break and dead-time register (32-bit*) */ +#define STM32_ATIM_DCR_OFFSET 0x0048 /* DMA control register (16-bit) */ +#define STM32_ATIM_DMAR_OFFSET 0x004c /* DMA address for burst mode (16-bit) */ +#define STM32_ATIM_CCMR3_OFFSET 0x0054 /* Capture/compare mode register 3 (32-bit) */ +#define STM32_ATIM_CCR5_OFFSET 0x0058 /* Capture/compare register 5 (32-bit) */ +#define STM32_ATIM_CCR6_OFFSET 0x005c /* Capture/compare register 6 (16-bit) */ +#define STM32_ATIM_AF1_OFFSET 0x0060 /* Alternate function option register 1 (16-bit) */ +#define STM32_ATIM_AF2_OFFSET 0x0064 /* Alternate function option register 2 (16-bit) */ + +/* Register Addresses *******************************************************************************/ + +/* Advanced Timers - TIM1 and TIM8 */ + +#if STM32F7_NATIM > 0 +# define STM32_TIM1_CR1 (STM32_TIM1_BASE+STM32_ATIM_CR1_OFFSET) +# define STM32_TIM1_CR2 (STM32_TIM1_BASE+STM32_ATIM_CR2_OFFSET) +# define STM32_TIM1_SMCR (STM32_TIM1_BASE+STM32_ATIM_SMCR_OFFSET) +# define STM32_TIM1_DIER (STM32_TIM1_BASE+STM32_ATIM_DIER_OFFSET) +# define STM32_TIM1_SR (STM32_TIM1_BASE+STM32_ATIM_SR_OFFSET) +# define STM32_TIM1_EGR (STM32_TIM1_BASE+STM32_ATIM_EGR_OFFSET) +# define STM32_TIM1_CCMR1 (STM32_TIM1_BASE+STM32_ATIM_CCMR1_OFFSET) +# define STM32_TIM1_CCMR2 (STM32_TIM1_BASE+STM32_ATIM_CCMR2_OFFSET) +# define STM32_TIM1_CCER (STM32_TIM1_BASE+STM32_ATIM_CCER_OFFSET) +# define STM32_TIM1_CNT (STM32_TIM1_BASE+STM32_ATIM_CNT_OFFSET) +# define STM32_TIM1_PSC (STM32_TIM1_BASE+STM32_ATIM_PSC_OFFSET) +# define STM32_TIM1_ARR (STM32_TIM1_BASE+STM32_ATIM_ARR_OFFSET) +# define STM32_TIM1_RCR (STM32_TIM1_BASE+STM32_ATIM_RCR_OFFSET) +# define STM32_TIM1_CCR1 (STM32_TIM1_BASE+STM32_ATIM_CCR1_OFFSET) +# define STM32_TIM1_CCR2 (STM32_TIM1_BASE+STM32_ATIM_CCR2_OFFSET) +# define STM32_TIM1_CCR3 (STM32_TIM1_BASE+STM32_ATIM_CCR3_OFFSET) +# define STM32_TIM1_CCR4 (STM32_TIM1_BASE+STM32_ATIM_CCR4_OFFSET) +# define STM32_TIM1_BDTR (STM32_TIM1_BASE+STM32_ATIM_BDTR_OFFSET) +# define STM32_TIM1_DCR (STM32_TIM1_BASE+STM32_ATIM_DCR_OFFSET) +# define STM32_TIM1_DMAR (STM32_TIM1_BASE+STM32_ATIM_DMAR_OFFSET) +# define STM32_TIM1_CCMR3 (STM32_TIM1_BASE+STM32_ATIM_CCMR3_OFFSET) +# define STM32_TIM1_CCR5 (STM32_TIM1_BASE+STM32_ATIM_CCR5_OFFSET) +# define STM32_TIM1_CCR6 (STM32_TIM1_BASE+STM32_ATIM_CCR6_OFFSET) +# define STM32_TIM1_AF1 (STM32_TIM1_BASE+STM32_ATIM_AF1_OFFSET) +# define STM32_TIM1_AF2 (STM32_TIM1_BASE+STM32_ATIM_AF2_OFFSET) +#endif + +#if STM32F7_NATIM > 1 +# define STM32_TIM8_CR1 (STM32_TIM8_BASE+STM32_ATIM_CR1_OFFSET) +# define STM32_TIM8_CR2 (STM32_TIM8_BASE+STM32_ATIM_CR2_OFFSET) +# define STM32_TIM8_SMCR (STM32_TIM8_BASE+STM32_ATIM_SMCR_OFFSET) +# define STM32_TIM8_DIER (STM32_TIM8_BASE+STM32_ATIM_DIER_OFFSET) +# define STM32_TIM8_SR (STM32_TIM8_BASE+STM32_ATIM_SR_OFFSET) +# define STM32_TIM8_EGR (STM32_TIM8_BASE+STM32_ATIM_EGR_OFFSET) +# define STM32_TIM8_CCMR1 (STM32_TIM8_BASE+STM32_ATIM_CCMR1_OFFSET) +# define STM32_TIM8_CCMR2 (STM32_TIM8_BASE+STM32_ATIM_CCMR2_OFFSET) +# define STM32_TIM8_CCER (STM32_TIM8_BASE+STM32_ATIM_CCER_OFFSET) +# define STM32_TIM8_CNT (STM32_TIM8_BASE+STM32_ATIM_CNT_OFFSET) +# define STM32_TIM8_PSC (STM32_TIM8_BASE+STM32_ATIM_PSC_OFFSET) +# define STM32_TIM8_ARR (STM32_TIM8_BASE+STM32_ATIM_ARR_OFFSET) +# define STM32_TIM8_RCR (STM32_TIM8_BASE+STM32_ATIM_RCR_OFFSET) +# define STM32_TIM8_CCR1 (STM32_TIM8_BASE+STM32_ATIM_CCR1_OFFSET) +# define STM32_TIM8_CCR2 (STM32_TIM8_BASE+STM32_ATIM_CCR2_OFFSET) +# define STM32_TIM8_CCR3 (STM32_TIM8_BASE+STM32_ATIM_CCR3_OFFSET) +# define STM32_TIM8_CCR4 (STM32_TIM8_BASE+STM32_ATIM_CCR4_OFFSET) +# define STM32_TIM8_BDTR (STM32_TIM8_BASE+STM32_ATIM_BDTR_OFFSET) +# define STM32_TIM8_DCR (STM32_TIM8_BASE+STM32_ATIM_DCR_OFFSET) +# define STM32_TIM8_DMAR (STM32_TIM8_BASE+STM32_ATIM_DMAR_OFFSET) +# define STM32_TIM8_CCMR3 (STM32_TIM8_BASE+STM32_ATIM_CCMR3_OFFSET) +# define STM32_TIM8_CCR5 (STM32_TIM8_BASE+STM32_ATIM_CCR5_OFFSET) +# define STM32_TIM8_CCR6 (STM32_TIM8_BASE+STM32_ATIM_CCR6_OFFSET) +# define STM32_TIM8_AF1 (STM32_TIM8_BASE+STM32_ATIM_AF1_OFFSET) +# define STM32_TIM8_AF2 (STM32_TIM8_BASE+STM32_ATIM_AF2_OFFSET) +#endif + +/* 16-/32-bit General Timers - TIM2, TIM3, TIM4, and TIM5 with DMA. + * All timers are 16-bit except for TIM2 and 5 are 32-bit + */ + +#if (STM32F7_NGTIM16+STM32F7_NGTIM32) > 0 +# define STM32_TIM2_CR1 (STM32_TIM2_BASE+STM32_GTIM_CR1_OFFSET) +# define STM32_TIM2_CR2 (STM32_TIM2_BASE+STM32_GTIM_CR2_OFFSET) +# define STM32_TIM2_SMCR (STM32_TIM2_BASE+STM32_GTIM_SMCR_OFFSET) +# define STM32_TIM2_DIER (STM32_TIM2_BASE+STM32_GTIM_DIER_OFFSET) +# define STM32_TIM2_SR (STM32_TIM2_BASE+STM32_GTIM_SR_OFFSET) +# define STM32_TIM2_EGR (STM32_TIM2_BASE+STM32_GTIM_EGR_OFFSET) +# define STM32_TIM2_CCMR1 (STM32_TIM2_BASE+STM32_GTIM_CCMR1_OFFSET) +# define STM32_TIM2_CCMR2 (STM32_TIM2_BASE+STM32_GTIM_CCMR2_OFFSET) +# define STM32_TIM2_CCER (STM32_TIM2_BASE+STM32_GTIM_CCER_OFFSET) +# define STM32_TIM2_CNT (STM32_TIM2_BASE+STM32_GTIM_CNT_OFFSET) +# define STM32_TIM2_PSC (STM32_TIM2_BASE+STM32_GTIM_PSC_OFFSET) +# define STM32_TIM2_ARR (STM32_TIM2_BASE+STM32_GTIM_ARR_OFFSET) +# define STM32_TIM2_CCR1 (STM32_TIM2_BASE+STM32_GTIM_CCR1_OFFSET) +# define STM32_TIM2_CCR2 (STM32_TIM2_BASE+STM32_GTIM_CCR2_OFFSET) +# define STM32_TIM2_CCR3 (STM32_TIM2_BASE+STM32_GTIM_CCR3_OFFSET) +# define STM32_TIM2_CCR4 (STM32_TIM2_BASE+STM32_GTIM_CCR4_OFFSET) +# define STM32_TIM2_DCR (STM32_TIM2_BASE+STM32_GTIM_DCR_OFFSET) +# define STM32_TIM2_DMAR (STM32_TIM2_BASE+STM32_GTIM_DMAR_OFFSET) +# define STM32_TIM2_OR (STM32_TIM2_BASE+STM32_GTIM_OR_OFFSET) +#endif + +#if (STM32F7_NGTIM16+STM32F7_NGTIM32) > 1 +# define STM32_TIM3_CR1 (STM32_TIM3_BASE+STM32_GTIM_CR1_OFFSET) +# define STM32_TIM3_CR2 (STM32_TIM3_BASE+STM32_GTIM_CR2_OFFSET) +# define STM32_TIM3_SMCR (STM32_TIM3_BASE+STM32_GTIM_SMCR_OFFSET) +# define STM32_TIM3_DIER (STM32_TIM3_BASE+STM32_GTIM_DIER_OFFSET) +# define STM32_TIM3_SR (STM32_TIM3_BASE+STM32_GTIM_SR_OFFSET) +# define STM32_TIM3_EGR (STM32_TIM3_BASE+STM32_GTIM_EGR_OFFSET) +# define STM32_TIM3_CCMR1 (STM32_TIM3_BASE+STM32_GTIM_CCMR1_OFFSET) +# define STM32_TIM3_CCMR2 (STM32_TIM3_BASE+STM32_GTIM_CCMR2_OFFSET) +# define STM32_TIM3_CCER (STM32_TIM3_BASE+STM32_GTIM_CCER_OFFSET) +# define STM32_TIM3_CNT (STM32_TIM3_BASE+STM32_GTIM_CNT_OFFSET) +# define STM32_TIM3_PSC (STM32_TIM3_BASE+STM32_GTIM_PSC_OFFSET) +# define STM32_TIM3_ARR (STM32_TIM3_BASE+STM32_GTIM_ARR_OFFSET) +# define STM32_TIM3_CCR1 (STM32_TIM3_BASE+STM32_GTIM_CCR1_OFFSET) +# define STM32_TIM3_CCR2 (STM32_TIM3_BASE+STM32_GTIM_CCR2_OFFSET) +# define STM32_TIM3_CCR3 (STM32_TIM3_BASE+STM32_GTIM_CCR3_OFFSET) +# define STM32_TIM3_CCR4 (STM32_TIM3_BASE+STM32_GTIM_CCR4_OFFSET) +# define STM32_TIM3_DCR (STM32_TIM3_BASE+STM32_GTIM_DCR_OFFSET) +# define STM32_TIM3_DMAR (STM32_TIM3_BASE+STM32_GTIM_DMAR_OFFSET) +#endif + +#if (STM32F7_NGTIM16+STM32F7_NGTIM32) > 2 +# define STM32_TIM4_CR1 (STM32_TIM4_BASE+STM32_GTIM_CR1_OFFSET) +# define STM32_TIM4_CR2 (STM32_TIM4_BASE+STM32_GTIM_CR2_OFFSET) +# define STM32_TIM4_SMCR (STM32_TIM4_BASE+STM32_GTIM_SMCR_OFFSET) +# define STM32_TIM4_DIER (STM32_TIM4_BASE+STM32_GTIM_DIER_OFFSET) +# define STM32_TIM4_SR (STM32_TIM4_BASE+STM32_GTIM_SR_OFFSET) +# define STM32_TIM4_EGR (STM32_TIM4_BASE+STM32_GTIM_EGR_OFFSET) +# define STM32_TIM4_CCMR1 (STM32_TIM4_BASE+STM32_GTIM_CCMR1_OFFSET) +# define STM32_TIM4_CCMR2 (STM32_TIM4_BASE+STM32_GTIM_CCMR2_OFFSET) +# define STM32_TIM4_CCER (STM32_TIM4_BASE+STM32_GTIM_CCER_OFFSET) +# define STM32_TIM4_CNT (STM32_TIM4_BASE+STM32_GTIM_CNT_OFFSET) +# define STM32_TIM4_PSC (STM32_TIM4_BASE+STM32_GTIM_PSC_OFFSET) +# define STM32_TIM4_ARR (STM32_TIM4_BASE+STM32_GTIM_ARR_OFFSET) +# define STM32_TIM4_CCR1 (STM32_TIM4_BASE+STM32_GTIM_CCR1_OFFSET) +# define STM32_TIM4_CCR2 (STM32_TIM4_BASE+STM32_GTIM_CCR2_OFFSET) +# define STM32_TIM4_CCR3 (STM32_TIM4_BASE+STM32_GTIM_CCR3_OFFSET) +# define STM32_TIM4_CCR4 (STM32_TIM4_BASE+STM32_GTIM_CCR4_OFFSET) +# define STM32_TIM4_DCR (STM32_TIM4_BASE+STM32_GTIM_DCR_OFFSET) +# define STM32_TIM4_DMAR (STM32_TIM4_BASE+STM32_GTIM_DMAR_OFFSET) +#endif + +#if (STM32F7_NGTIM16+STM32F7_NGTIM32) > 3 +# define STM32_TIM5_CR1 (STM32_TIM5_BASE+STM32_GTIM_CR1_OFFSET) +# define STM32_TIM5_CR2 (STM32_TIM5_BASE+STM32_GTIM_CR2_OFFSET) +# define STM32_TIM5_SMCR (STM32_TIM5_BASE+STM32_GTIM_SMCR_OFFSET) +# define STM32_TIM5_DIER (STM32_TIM5_BASE+STM32_GTIM_DIER_OFFSET) +# define STM32_TIM5_SR (STM32_TIM5_BASE+STM32_GTIM_SR_OFFSET) +# define STM32_TIM5_EGR (STM32_TIM5_BASE+STM32_GTIM_EGR_OFFSET) +# define STM32_TIM5_CCMR1 (STM32_TIM5_BASE+STM32_GTIM_CCMR1_OFFSET) +# define STM32_TIM5_CCMR2 (STM32_TIM5_BASE+STM32_GTIM_CCMR2_OFFSET) +# define STM32_TIM5_CCER (STM32_TIM5_BASE+STM32_GTIM_CCER_OFFSET) +# define STM32_TIM5_CNT (STM32_TIM5_BASE+STM32_GTIM_CNT_OFFSET) +# define STM32_TIM5_PSC (STM32_TIM5_BASE+STM32_GTIM_PSC_OFFSET) +# define STM32_TIM5_ARR (STM32_TIM5_BASE+STM32_GTIM_ARR_OFFSET) +# define STM32_TIM5_CCR1 (STM32_TIM5_BASE+STM32_GTIM_CCR1_OFFSET) +# define STM32_TIM5_CCR2 (STM32_TIM5_BASE+STM32_GTIM_CCR2_OFFSET) +# define STM32_TIM5_CCR3 (STM32_TIM5_BASE+STM32_GTIM_CCR3_OFFSET) +# define STM32_TIM5_CCR4 (STM32_TIM5_BASE+STM32_GTIM_CCR4_OFFSET) +# define STM32_TIM5_DCR (STM32_TIM5_BASE+STM32_GTIM_DCR_OFFSET) +# define STM32_TIM5_DMAR (STM32_TIM5_BASE+STM32_GTIM_DMAR_OFFSET) +# define STM32_TIM5_OR (STM32_TIM5_BASE+STM32_GTIM_OR_OFFSET) +#endif + + +/* 16-bit General Timers - TIM9-14 without DMA. Note that (1) these timers + * support only a subset of the general timer registers are supported, and + * (2) TIM9 and TIM12 differ from the others. + */ + +#if STM32F7_NGTIMNDMA > 0 +# define STM32_TIM9_CR1 (STM32_TIM9_BASE+STM32_GTIM_CR1_OFFSET) +# define STM32_TIM9_CR2 (STM32_TIM9_BASE+STM32_GTIM_CR2_OFFSET) +# define STM32_TIM9_DIER (STM32_TIM9_BASE+STM32_GTIM_DIER_OFFSET) +# define STM32_TIM9_SR (STM32_TIM9_BASE+STM32_GTIM_SR_OFFSET) +# define STM32_TIM9_EGR (STM32_TIM9_BASE+STM32_GTIM_EGR_OFFSET) +# define STM32_TIM9_CCMR1 (STM32_TIM9_BASE+STM32_GTIM_CCMR1_OFFSET) +# define STM32_TIM9_CCER (STM32_TIM9_BASE+STM32_GTIM_CCER_OFFSET) +# define STM32_TIM9_CNT (STM32_TIM9_BASE+STM32_GTIM_CNT_OFFSET) +# define STM32_TIM9_PSC (STM32_TIM9_BASE+STM32_GTIM_PSC_OFFSET) +# define STM32_TIM9_ARR (STM32_TIM9_BASE+STM32_GTIM_ARR_OFFSET) +# define STM32_TIM9_CCR1 (STM32_TIM9_BASE+STM32_GTIM_CCR1_OFFSET) +# define STM32_TIM9_CCR2 (STM32_TIM9_BASE+STM32_GTIM_CCR2_OFFSET) +#endif + +#if STM32F7_NGTIMNDMA > 1 +# define STM32_TIM10_CR1 (STM32_TIM10_BASE+STM32_GTIM_CR1_OFFSET) +# define STM32_TIM10_DIER (STM32_TIM10_BASE+STM32_GTIM_DIER_OFFSET) +# define STM32_TIM10_SR (STM32_TIM10_BASE+STM32_GTIM_SR_OFFSET) +# define STM32_TIM10_EGR (STM32_TIM10_BASE+STM32_GTIM_EGR_OFFSET) +# define STM32_TIM10_CCMR1 (STM32_TIM10_BASE+STM32_GTIM_CCMR1_OFFSET) +# define STM32_TIM10_CCER (STM32_TIM10_BASE+STM32_GTIM_CCER_OFFSET) +# define STM32_TIM10_CNT (STM32_TIM10_BASE+STM32_GTIM_CNT_OFFSET) +# define STM32_TIM10_PSC (STM32_TIM10_BASE+STM32_GTIM_PSC_OFFSET) +# define STM32_TIM10_ARR (STM32_TIM10_BASE+STM32_GTIM_ARR_OFFSET) +# define STM32_TIM10_CCR1 (STM32_TIM10_BASE+STM32_GTIM_CCR1_OFFSET) +#endif + +#if STM32F7_NGTIMNDMA > 2 +# define STM32_TIM11_CR1 (STM32_TIM11_BASE+STM32_GTIM_CR1_OFFSET) +# define STM32_TIM11_DIER (STM32_TIM11_BASE+STM32_GTIM_DIER_OFFSET) +# define STM32_TIM11_SR (STM32_TIM11_BASE+STM32_GTIM_SR_OFFSET) +# define STM32_TIM11_EGR (STM32_TIM11_BASE+STM32_GTIM_EGR_OFFSET) +# define STM32_TIM11_CCMR1 (STM32_TIM11_BASE+STM32_GTIM_CCMR1_OFFSET) +# define STM32_TIM11_CCER (STM32_TIM11_BASE+STM32_GTIM_CCER_OFFSET) +# define STM32_TIM11_CNT (STM32_TIM11_BASE+STM32_GTIM_CNT_OFFSET) +# define STM32_TIM11_PSC (STM32_TIM11_BASE+STM32_GTIM_PSC_OFFSET) +# define STM32_TIM11_ARR (STM32_TIM11_BASE+STM32_GTIM_ARR_OFFSET) +# define STM32_TIM11_CCR1 (STM32_TIM11_BASE+STM32_GTIM_CCR1_OFFSET) +# define STM32_TIM11_OR (STM32_TIM11_BASE+STM32_GTIM_OR_OFFSET) +#endif + +#if STM32F7_NGTIMNDMA > 3 +# define STM32_TIM12_CR1 (STM32_TIM12_BASE+STM32_GTIM_CR1_OFFSET) +# define STM32_TIM12_CR2 (STM32_TIM9_BASE+STM32_GTIM_CR2_OFFSET) +# define STM32_TIM12_DIER (STM32_TIM12_BASE+STM32_GTIM_DIER_OFFSET) +# define STM32_TIM12_SR (STM32_TIM12_BASE+STM32_GTIM_SR_OFFSET) +# define STM32_TIM12_EGR (STM32_TIM12_BASE+STM32_GTIM_EGR_OFFSET) +# define STM32_TIM12_CCMR1 (STM32_TIM12_BASE+STM32_GTIM_CCMR1_OFFSET) +# define STM32_TIM12_CCER (STM32_TIM12_BASE+STM32_GTIM_CCER_OFFSET) +# define STM32_TIM12_CNT (STM32_TIM12_BASE+STM32_GTIM_CNT_OFFSET) +# define STM32_TIM12_PSC (STM32_TIM12_BASE+STM32_GTIM_PSC_OFFSET) +# define STM32_TIM12_ARR (STM32_TIM12_BASE+STM32_GTIM_ARR_OFFSET) +# define STM32_TIM12_CCR1 (STM32_TIM12_BASE+STM32_GTIM_CCR1_OFFSET) +# define STM32_TIM12_CCR2 (STM32_TIM12_BASE+STM32_GTIM_CCR2_OFFSET) +#endif + +#if STM32F7_NGTIMNDMA > 4 +# define STM32_TIM13_CR1 (STM32_TIM13_BASE+STM32_GTIM_CR1_OFFSET) +# define STM32_TIM13_DIER (STM32_TIM13_BASE+STM32_GTIM_DIER_OFFSET) +# define STM32_TIM13_SR (STM32_TIM13_BASE+STM32_GTIM_SR_OFFSET) +# define STM32_TIM13_EGR (STM32_TIM13_BASE+STM32_GTIM_EGR_OFFSET) +# define STM32_TIM13_CCMR1 (STM32_TIM13_BASE+STM32_GTIM_CCMR1_OFFSET) +# define STM32_TIM13_CCER (STM32_TIM13_BASE+STM32_GTIM_CCER_OFFSET) +# define STM32_TIM13_CNT (STM32_TIM13_BASE+STM32_GTIM_CNT_OFFSET) +# define STM32_TIM13_PSC (STM32_TIM13_BASE+STM32_GTIM_PSC_OFFSET) +# define STM32_TIM13_ARR (STM32_TIM13_BASE+STM32_GTIM_ARR_OFFSET) +# define STM32_TIM13_CCR1 (STM32_TIM13_BASE+STM32_GTIM_CCR1_OFFSET) +#endif + +#if STM32F7_NGTIMNDMA > 5 +# define STM32_TIM14_CR1 (STM32_TIM14_BASE+STM32_GTIM_CR1_OFFSET) +# define STM32_TIM14_DIER (STM32_TIM14_BASE+STM32_GTIM_DIER_OFFSET) +# define STM32_TIM14_SR (STM32_TIM14_BASE+STM32_GTIM_SR_OFFSET) +# define STM32_TIM14_EGR (STM32_TIM14_BASE+STM32_GTIM_EGR_OFFSET) +# define STM32_TIM14_CCMR1 (STM32_TIM14_BASE+STM32_GTIM_CCMR1_OFFSET) +# define STM32_TIM14_CCER (STM32_TIM14_BASE+STM32_GTIM_CCER_OFFSET) +# define STM32_TIM14_CNT (STM32_TIM14_BASE+STM32_GTIM_CNT_OFFSET) +# define STM32_TIM14_PSC (STM32_TIM14_BASE+STM32_GTIM_PSC_OFFSET) +# define STM32_TIM14_ARR (STM32_TIM14_BASE+STM32_GTIM_ARR_OFFSET) +# define STM32_TIM14_CCR1 (STM32_TIM14_BASE+STM32_GTIM_CCR1_OFFSET) +#endif + +/* Basic Timers - TIM6 and TIM7 */ + +#if STM32F7_NBTIM > 0 +# define STM32_TIM6_CR1 (STM32_TIM6_BASE+STM32_BTIM_CR1_OFFSET) +# define STM32_TIM6_CR2 (STM32_TIM6_BASE+STM32_BTIM_CR2_OFFSET) +# define STM32_TIM6_DIER (STM32_TIM6_BASE+STM32_BTIM_DIER_OFFSET) +# define STM32_TIM6_SR (STM32_TIM6_BASE+STM32_BTIM_SR_OFFSET) +# define STM32_TIM6_EGR (STM32_TIM6_BASE+STM32_BTIM_EGR_OFFSET) +# define STM32_TIM6_CNT (STM32_TIM6_BASE+STM32_BTIM_CNT_OFFSET) +# define STM32_TIM6_PSC (STM32_TIM6_BASE+STM32_BTIM_PSC_OFFSET) +# define STM32_TIM6_ARR (STM32_TIM6_BASE+STM32_BTIM_ARR_OFFSET) +#endif + +#if STM32F7_NBTIM > 1 +# define STM32_TIM7_CR1 (STM32_TIM7_BASE+STM32_BTIM_CR1_OFFSET) +# define STM32_TIM7_CR2 (STM32_TIM7_BASE+STM32_BTIM_CR2_OFFSET) +# define STM32_TIM7_DIER (STM32_TIM7_BASE+STM32_BTIM_DIER_OFFSET) +# define STM32_TIM7_SR (STM32_TIM7_BASE+STM32_BTIM_SR_OFFSET) +# define STM32_TIM7_EGR (STM32_TIM7_BASE+STM32_BTIM_EGR_OFFSET) +# define STM32_TIM7_CNT (STM32_TIM7_BASE+STM32_BTIM_CNT_OFFSET) +# define STM32_TIM7_PSC (STM32_TIM7_BASE+STM32_BTIM_PSC_OFFSET) +# define STM32_TIM7_ARR (STM32_TIM7_BASE+STM32_BTIM_ARR_OFFSET) +#endif + +/* Register Bitfield Definitions ********************************************************************/ + +/* Control register 1 */ + +#define ATIM_CR1_CEN (1 << 0) /* Bit 0: Counter enable */ +#define ATIM_CR1_UDIS (1 << 1) /* Bit 1: Update disable */ +#define ATIM_CR1_URS (1 << 2) /* Bit 2: Update request source */ +#define ATIM_CR1_OPM (1 << 3) /* Bit 3: One pulse mode */ +#define ATIM_CR1_DIR (1 << 4) /* Bit 4: Direction */ +#define ATIM_CR1_CMS_SHIFT (5) /* Bits 6-5: Center-aligned mode selection */ +#define ATIM_CR1_CMS_MASK (3 << ATIM_CR1_CMS_SHIFT) +# define ATIM_CR1_EDGE (0 << ATIM_CR1_CMS_SHIFT) /* 00: Edge-aligned mode */ +# define ATIM_CR1_CENTER1 (1 << ATIM_CR1_CMS_SHIFT) /* 01: Center-aligned mode 1 */ +# define ATIM_CR1_CENTER2 (2 << ATIM_CR1_CMS_SHIFT) /* 10: Center-aligned mode 2 */ +# define ATIM_CR1_CENTER3 (3 << ATIM_CR1_CMS_SHIFT) /* 11: Center-aligned mode 3 */ +#define ATIM_CR1_ARPE (1 << 7) /* Bit 7: Auto-reload preload enable */ +#define ATIM_CR1_CKD_SHIFT (8) /* Bits 9-8: Clock division */ +#define ATIM_CR1_CKD_MASK (3 << ATIM_CR1_CKD_SHIFT) +# define ATIM_CR1_TCKINT (0 << ATIM_CR1_CKD_SHIFT) /* 00: tDTS=tCK_INT */ +# define ATIM_CR1_2TCKINT (1 << ATIM_CR1_CKD_SHIFT) /* 01: tDTS=2*tCK_INT */ +# define ATIM_CR1_4TCKINT (2 << ATIM_CR1_CKD_SHIFT) /* 10: tDTS=4*tCK_INT */ +#define ATIM_CR1_UIFREMAP (1 << 11) /* Bit 11: UIF status bit remapping */ + +/* Control register 2 */ + +#define ATIM_CR2_CCPC (1 << 0) /* Bit 0: Capture/Compare Preloaded Control */ +#define ATIM_CR2_CCUS (1 << 2) /* Bit 2: Capture/Compare Control Update Selection */ +#define ATIM_CR2_CCDS (1 << 3) /* Bit 3: Capture/Compare DMA Selection */ +#define ATIM_CR2_MMS_SHIFT (4) /* Bits 6-4: Master Mode Selection */ +#define ATIM_CR2_MMS_MASK (7 << ATIM_CR2_MMS_SHIFT) +# define ATIM_CR2_MMS_RESET (0 << ATIM_CR2_MMS_SHIFT) /* 000: Reset - TIMx_EGR UG bit is TRGO */ +# define ATIM_CR2_MMS_ENABLE (1 << ATIM_CR2_MMS_SHIFT) /* 001: Enable - CNT_EN is TRGO */ +# define ATIM_CR2_MMS_UPDATE (2 << ATIM_CR2_MMS_SHIFT) /* 010: Update event is TRGO */ +# define ATIM_CR2_MMS_COMPP (3 << ATIM_CR2_MMS_SHIFT) /* 010: Compare Pulse - CC1IF flag */ +# define ATIM_CR2_MMS_OC1REF (4 << ATIM_CR2_MMS_SHIFT) /* 100: Compare OC1REF is TRGO */ +# define ATIM_CR2_MMS_OC2REF (5 << ATIM_CR2_MMS_SHIFT) /* 101: Compare OC2REF is TRGO */ +# define ATIM_CR2_MMS_OC3REF (6 << ATIM_CR2_MMS_SHIFT) /* 110: Compare OC3REF is TRGO */ +# define ATIM_CR2_MMS_OC4REF (7 << ATIM_CR2_MMS_SHIFT) /* 111: Compare OC4REF is TRGO */ +#define ATIM_CR2_TI1S (1 << 7) /* Bit 7: TI1 Selection */ +#define ATIM_CR2_OIS1 (1 << 8) /* Bit 8: Output Idle state 1 (OC1 output) */ +#define ATIM_CR2_OIS1N (1 << 9) /* Bit 9: Output Idle state 1 (OC1N output) */ +#define ATIM_CR2_OIS2 (1 << 10) /* Bit 10: Output Idle state 2 (OC2 output) */ +#define ATIM_CR2_OIS2N (1 << 11) /* Bit 11: Output Idle state 2 (OC2N output) */ +#define ATIM_CR2_OIS3 (1 << 12) /* Bit 12: Output Idle state 3 (OC3 output) */ +#define ATIM_CR2_OIS3N (1 << 13) /* Bit 13: Output Idle state 3 (OC3N output) */ +#define ATIM_CR2_OIS4 (1 << 14) /* Bit 14: Output Idle state 4 (OC4 output) */ +#define ATIM_CR2_OIS5 (1 << 16) /* Bit 16: OOutput Idle state 5 (OC5 output) */ +#define ATIM_CR2_OIS6 (1 << 18) /* Bit 18: Output Idle state 6 (OC6 output) */ +#define ATIM_CR2_MMS2_SHIFT (20) /* Bits 20-23: Master Mode Selection 2 */ +#define ATIM_CR2_MMS2_MASK (15 << ATIM_CR2_MMS2_SHIFT) +# define ATIM_CR2_MMS2_RESET (0 << ATIM_CR2_MMS2_SHIFT) /* 0000: Reset - TIMx_EGR UG bit is TRG9 */ +# define ATIM_CR2_MMS2_ENABLE (1 << ATIM_CR2_MMS2_SHIFT) /* 0001: Enable - CNT_EN is TRGO2 */ +# define ATIM_CR2_MMS2_UPDATE (2 << ATIM_CR2_MMS2_SHIFT) /* 0010: Update event is TRGH0*/ +# define ATIM_CR2_MMS2_COMPP (3 << ATIM_CR2_MMS2_SHIFT) /* 0010: Compare Pulse - CC1IF flag */ +# define ATIM_CR2_MMS2_OC1REF (4 << ATIM_CR2_MMS2_SHIFT) /* 0100: Compare OC1REF is TRGO2 */ +# define ATIM_CR2_MMS2_OC2REF (5 << ATIM_CR2_MMS2_SHIFT) /* 0101: Compare OC2REF is TRGO2 */ +# define ATIM_CR2_MMS2_OC3REF (6 << ATIM_CR2_MMS2_SHIFT) /* 0110: Compare OC3REF is TRGO2 */ +# define ATIM_CR2_MMS2_OC4REF (7 << ATIM_CR2_MMS2_SHIFT) /* 0111: Compare OC4REF is TRGO2 */ +# define ATIM_CR2_MMS2_OC5REF (8 << ATIM_CR2_MMS2_SHIFT) /* 1000: Compare OC5REF is TRGO2 */ +# define ATIM_CR2_MMS2_OC6REF (9 << ATIM_CR2_MMS2_SHIFT) /* 1001: Compare OC6REF is TRGO2 */ +# define ATIM_CR2_MMS2_CMPOC4 (10 << ATIM_CR2_MMS2_SHIFT) /* 1010: Compare pulse - OC4REF edge is TRGO2 */ +# define ATIM_CR2_MMS2_CMPOC6 (11 << ATIM_CR2_MMS2_SHIFT) /* 1011: Compare pulse - OC6REF edge is TRGO2 */ +# define ATIM_CR2_MMS2_CMPOC4R6R (12 << ATIM_CR2_MMS2_SHIFT) /* 1100: Compare pulse - OC4REF/OC6REF rising */ +# define ATIM_CR2_MMS2_CMPOC4R6F (13 << ATIM_CR2_MMS2_SHIFT) /* 1101: Compare pulse - OC4REF rising/OC6REF falling */ +# define ATIM_CR2_MMS2_CMPOC5R6R (14 << ATIM_CR2_MMS2_SHIFT) /* 1110: Compare pulse - OC5REF/OC6REF rising */ +# define ATIM_CR2_MMS2_CMPOC5R6F (15 << ATIM_CR2_MMS2_SHIFT) /* 1111: Compare pulse - OC5REF rising/OC6REF falling */ + +/* Slave mode control register */ + +#define ATIM_SMCR_SMS_SHIFT (0) /* Bits 0-2: Slave mode selection */ +#define ATIM_SMCR_SMS_MASK (7 << ATIM_SMCR_SMS_SHIFT) +# define ATIM_SMCR_DISAB (0 << ATIM_SMCR_SMS_SHIFT) /* 000: Slave mode disabled */ +# define ATIM_SMCR_ENCMD1 (1 << ATIM_SMCR_SMS_SHIFT) /* 001: Encoder mode 1 */ +# define ATIM_SMCR_ENCMD2 (2 << ATIM_SMCR_SMS_SHIFT) /* 010: Encoder mode 2 */ +# define ATIM_SMCR_ENCMD3 (3 << ATIM_SMCR_SMS_SHIFT) /* 011: Encoder mode 3 */ +# define ATIM_SMCR_RESET (4 << ATIM_SMCR_SMS_SHIFT) /* 100: Reset Mode */ +# define ATIM_SMCR_GATED (5 << ATIM_SMCR_SMS_SHIFT) /* 101: Gated Mode */ +# define ATIM_SMCR_TRIGGER (6 << ATIM_SMCR_SMS_SHIFT) /* 110: Trigger Mode */ +# define ATIM_SMCR_EXTCLK1 (7 << ATIM_SMCR_SMS_SHIFT) /* 111: External Clock Mode 1 */ +#define ATIM_SMCR_TS_SHIFT (4) /* Bits 4-6: Trigger selection */ +#define ATIM_SMCR_TS_MASK (7 << ATIM_SMCR_TS_SHIFT) +# define ATIM_SMCR_ITR0 (0 << ATIM_SMCR_TS_SHIFT) /* 000: Internal trigger 0 (ITR0) */ +# define ATIM_SMCR_ITR1 (1 << ATIM_SMCR_TS_SHIFT) /* 001: Internal trigger 1 (ITR1) */ +# define ATIM_SMCR_ITR2 (2 << ATIM_SMCR_TS_SHIFT) /* 010: Internal trigger 2 (ITR2) */ +# define ATIM_SMCR_ITR3 (3 << ATIM_SMCR_TS_SHIFT) /* 011: Internal trigger 3 (ITR3) */ +# define ATIM_SMCR_T1FED (4 << ATIM_SMCR_TS_SHIFT) /* 100: TI1 Edge Detector (TI1F_ED) */ +# define ATIM_SMCR_TI1FP1 (5 << ATIM_SMCR_TS_SHIFT) /* 101: Filtered Timer Input 1 (TI1FP1) */ +# define ATIM_SMCR_T12FP2 (6 << ATIM_SMCR_TS_SHIFT) /* 110: Filtered Timer Input 2 (TI2FP2) */ +# define ATIM_SMCR_ETRF (7 << ATIM_SMCR_TS_SHIFT) /* 111: External Trigger input (ETRF) */ +#define ATIM_SMCR_MSM (1 << 7) /* Bit 7: Master/slave mode */ +#define ATIM_SMCR_ETF_SHIFT (8) /* Bits 8-11: External trigger filter */ +#define ATIM_SMCR_ETF_MASK (0x0f << ATIM_SMCR_ETF_SHIFT) +# define ATIM_SMCR_NOFILT (0 << ATIM_SMCR_ETF_SHIFT) /* 0000: No filter, sampling is done at fDTS */ +# define ATIM_SMCR_FCKINT2 (1 << ATIM_SMCR_ETF_SHIFT) /* 0001: fSAMPLING=fCK_INT, N=2 */ +# define ATIM_SMCR_FCKINT4 (2 << ATIM_SMCR_ETF_SHIFT) /* 0010: fSAMPLING=fCK_INT, N=4 */ +# define ATIM_SMCR_FCKINT8 (3 << ATIM_SMCR_ETF_SHIFT) /* 0011: fSAMPLING=fCK_INT, N=8 */ +# define ATIM_SMCR_FDTSd26 (4 << ATIM_SMCR_ETF_SHIFT) /* 0100: fSAMPLING=fDTS/2, N=6 */ +# define ATIM_SMCR_FDTSd28 (5 << ATIM_SMCR_ETF_SHIFT) /* 0101: fSAMPLING=fDTS/2, N=8 */ +# define ATIM_SMCR_FDTSd46 (6 << ATIM_SMCR_ETF_SHIFT) /* 0110: fSAMPLING=fDTS/4, N=6 */ +# define ATIM_SMCR_FDTSd48 (7 << ATIM_SMCR_ETF_SHIFT) /* 0111: fSAMPLING=fDTS/4, N=8 */ +# define ATIM_SMCR_FDTSd86 (8 << ATIM_SMCR_ETF_SHIFT) /* 1000: fSAMPLING=fDTS/8, N=6 */ +# define ATIM_SMCR_FDTSd88 (9 << ATIM_SMCR_ETF_SHIFT) /* 1001: fSAMPLING=fDTS/8, N=8 */ +# define ATIM_SMCR_FDTSd165 (10 << ATIM_SMCR_ETF_SHIFT) /* 1010: fSAMPLING=fDTS/16, N=5 */ +# define ATIM_SMCR_FDTSd166 (11 << ATIM_SMCR_ETF_SHIFT) /* 1011: fSAMPLING=fDTS/16, N=6 */ +# define ATIM_SMCR_FDTSd168 (12 << ATIM_SMCR_ETF_SHIFT) /* 1100: fSAMPLING=fDTS/16, N=8 */ +# define ATIM_SMCR_FDTSd325 (13 << ATIM_SMCR_ETF_SHIFT) /* 1101: fSAMPLING=fDTS/32, N=5 */ +# define ATIM_SMCR_FDTSd326 (14 << ATIM_SMCR_ETF_SHIFT) /* 1110: fSAMPLING=fDTS/32, N=6 */ +# define ATIM_SMCR_FDTSd328 (15 << ATIM_SMCR_ETF_SHIFT) /* 1111: fSAMPLING=fDTS/32, N=8 */ +#define ATIM_SMCR_ETPS_SHIFT (12) /* Bits 12-13: External trigger prescaler */ +#define ATIM_SMCR_ETPS_MASK (3 << ATIM_SMCR_ETPS_SHIFT) +# define ATIM_SMCR_PSCOFF (0 << ATIM_SMCR_ETPS_SHIFT) /* 00: Prescaler OFF */ +# define ATIM_SMCR_ETRPd2 (1 << ATIM_SMCR_ETPS_SHIFT) /* 01: ETRP frequency divided by 2 */ +# define ATIM_SMCR_ETRPd4 (2 << ATIM_SMCR_ETPS_SHIFT) /* 10: ETRP frequency divided by 4 */ +# define ATIM_SMCR_ETRPd8 (3 << ATIM_SMCR_ETPS_SHIFT) /* 11: ETRP frequency divided by 8 */ +#define ATIM_SMCR_ECE (1 << 14) /* Bit 14: External clock enable */ +#define ATIM_SMCR_ETP (1 << 15) /* Bit 15: External trigger polarity */ +#define ATIM_SMCR_SMS (1 << 16) /* Bit 16: Slave mode selection - bit 3 */ + +/* DMA/Interrupt enable register */ + +#define ATIM_DIER_UIE (1 << 0) /* Bit 0: Update interrupt enable */ +#define ATIM_DIER_CC1IE (1 << 1) /* Bit 1: Capture/Compare 1 interrupt enable */ +#define ATIM_DIER_CC2IE (1 << 2) /* Bit 2: Capture/Compare 2 interrupt enable */ +#define ATIM_DIER_CC3IE (1 << 3) /* Bit 3: Capture/Compare 3 interrupt enable */ +#define ATIM_DIER_CC4IE (1 << 4) /* Bit 4: Capture/Compare 4 interrupt enable */ +#define ATIM_DIER_COMIE (1 << 5) /* Bit 5: COM interrupt enable */ +#define ATIM_DIER_TIE (1 << 6) /* Bit 6: Trigger interrupt enable */ +#define ATIM_DIER_BIE (1 << 7) /* Bit 7: Break interrupt enable */ +#define ATIM_DIER_UDE (1 << 8) /* Bit 8: Update DMA request enable */ +#define ATIM_DIER_CC1DE (1 << 9) /* Bit 9: Capture/Compare 1 DMA request enable */ +#define ATIM_DIER_CC2DE (1 << 10) /* Bit 10: Capture/Compare 2 DMA request enable */ +#define ATIM_DIER_CC3DE (1 << 11) /* Bit 11: Capture/Compare 3 DMA request enable */ +#define ATIM_DIER_CC4DE (1 << 12) /* Bit 12: Capture/Compare 4 DMA request enable */ +#define ATIM_DIER_COMDE (1 << 13) /* Bit 13: COM DMA request enable */ +#define ATIM_DIER_TDE (1 << 14) /* Bit 14: Trigger DMA request enable */ + +/* Status register */ + +#define ATIM_SR_UIF (1 << 0) /* Bit 0: Update interrupt Flag */ +#define ATIM_SR_CC1IF (1 << 1) /* Bit 1: Capture/Compare 1 interrupt Flag */ +#define ATIM_SR_CC2IF (1 << 2) /* Bit 2: Capture/Compare 2 interrupt Flag */ +#define ATIM_SR_CC3IF (1 << 3) /* Bit 3: Capture/Compare 3 interrupt Flag */ +#define ATIM_SR_CC4IF (1 << 4) /* Bit 4: Capture/Compare 4 interrupt Flag */ +#define ATIM_SR_COMIF (1 << 5) /* Bit 5: COM interrupt Flag */ +#define ATIM_SR_TIF (1 << 6) /* Bit 6: Trigger interrupt Flag */ +#define ATIM_SR_BIF (1 << 7) /* Bit 7: Break interrupt Flag */ +#define ATIM_SR_B2IF (1 << 8) /* Bit 8: Break 2 interrupt Flag */ +#define ATIM_SR_CC1OF (1 << 9) /* Bit 9: Capture/Compare 1 Overcapture Flag */ +#define ATIM_SR_CC2OF (1 << 10) /* Bit 10: Capture/Compare 2 Overcapture Flag */ +#define ATIM_SR_CC3OF (1 << 11) /* Bit 11: Capture/Compare 3 Overcapture Flag */ +#define ATIM_SR_CC4OF (1 << 12) /* Bit 12: Capture/Compare 4 Overcapture Flag */ +#define ATIM_SR_CC5IF (1 << 16) /* Bit 16: Compare 5 interrupt flag */ +#define ATIM_SR_CC6IF (1 << 17) /* Bit 17: Compare 6 interrupt flag */ + +/* Event generation register */ + +#define ATIM_EGR_UG (1 << 0) /* Bit 0: Update Generation */ +#define ATIM_EGR_CC1G (1 << 1) /* Bit 1: Capture/Compare 1 Generation */ +#define ATIM_EGR_CC2G (1 << 2) /* Bit 2: Capture/Compare 2 Generation */ +#define ATIM_EGR_CC3G (1 << 3) /* Bit 3: Capture/Compare 3 Generation */ +#define ATIM_EGR_CC4G (1 << 4) /* Bit 4: Capture/Compare 4 Generation */ +#define ATIM_EGR_COMG (1 << 5) /* Bit 5: Capture/Compare Control Update Generation */ +#define ATIM_EGR_TG (1 << 6) /* Bit 6: Trigger Generation */ +#define ATIM_EGR_BG (1 << 7) /* Bit 7: Break Generation */ +#define ATIM_EGR_B2G (1 << 8) /* Bit 8: Break 2 Generation */ + +/* Capture/compare mode register 1 -- Output compare mode */ + +#define ATIM_CCMR1_CC1S_SHIFT (0) /* Bits 1-0: Capture/Compare 1 Selection */ +#define ATIM_CCMR1_CC1S_MASK (3 << ATIM_CCMR1_CC1S_SHIFT) + /* (See common (unshifted) bit field definitions below) */ +#define ATIM_CCMR1_OC1FE (1 << 2) /* Bit 2: Output Compare 1 Fast enable */ +#define ATIM_CCMR1_OC1PE (1 << 3) /* Bit 3: Output Compare 1 Preload enable */ +#define ATIM_CCMR1_OC1M_SHIFT (4) /* Bits 6-4: Output Compare 1 Mode */ +#define ATIM_CCMR1_OC1M_MASK (7 << ATIM_CCMR1_OC1M_SHIFT) + /* (See common (unshifted) bit field definitions below) */ +#define ATIM_CCMR1_OC1CE (1 << 7) /* Bit 7: Output Compare 1Clear Enable */ +#define ATIM_CCMR1_CC2S_SHIFT (8) /* Bits 8-9: Capture/Compare 2 Selection */ +#define ATIM_CCMR1_CC2S_MASK (3 << ATIM_CCMR1_CC2S_SHIFT) + /* (See common (unshifted) bit field definitions below) */ +#define ATIM_CCMR1_OC2FE (1 << 10) /* Bit 10: Output Compare 2 Fast enable */ +#define ATIM_CCMR1_OC2PE (1 << 11) /* Bit 11: Output Compare 2 Preload enable */ +#define ATIM_CCMR1_OC2M_SHIFT (12) /* Bits 14-12: Output Compare 2 Mode */ +#define ATIM_CCMR1_OC2M_MASK (7 << ATIM_CCMR1_OC2M_SHIFT) + /* (See common (unshifted) bit field definitions below) */ +#define ATIM_CCMR1_OC2CE (1 << 15) /* Bit 15: Output Compare 2 Clear Enable */ +#define ATIM_CCMR1_OC1M (1 << 16) /* Bit 16: Output Compare 1 mode - bit 3 */ +#define ATIM_CCMR1_OC2M (1 << 24) /* Bit 24: Output Compare 2 mode - bit 3 */ + + +/* Common CCMR (unshifted) Capture/Compare Selection bit-field definitions */ + +#define ATIM_CCMR_CCS_CCOUT (0) /* 00: CCx channel output */ +#define ATIM_CCMR_CCS_CCIN1 (1) /* 01: CCx channel input, ICx is TIx */ +#define ATIM_CCMR_CCS_CCIN2 (2) /* 10: CCx channel input, ICx is TIy */ +#define ATIM_CCMR_CCS_CCINTRC (3) /* 11: CCx channel input, ICx is TRC */ + +/* Common CCMR (unshifted) Compare Mode bit field definitions */ + +#define ATIM_CCMR_MODE_FRZN (0) /* 0000: Frozen */ +#define ATIM_CCMR_MODE_CHACT (1) /* 0001: Channel x active on match */ +#define ATIM_CCMR_MODE_CHINACT (2) /* 0010: Channel x inactive on match */ +#define ATIM_CCMR_MODE_OCREFTOG (3) /* 0011: OCxREF toggle ATIM_CNT=ATIM_CCRx */ +#define ATIM_CCMR_MODE_OCREFLO (4) /* 0100: OCxREF forced low */ +#define ATIM_CCMR_MODE_OCREFHI (5) /* 0101: OCxREF forced high */ +#define ATIM_CCMR_MODE_PWM1 (6) /* 0110: PWM mode 1 */ +#define ATIM_CCMR_MODE_PWM2 (7) /* 0111: PWM mode 2 */ +#define ATIM_CCMR_MODE_OPM1 (8) /* 1000: Retrigerrable OPM mode 1 */ +#define ATIM_CCMR_MODE_OPM2 (9) /* 1001: Retrigerrable OPM mode 2 */ +#define ATIM_CCMR_MODE_COMBINED1 (12) /* 1100: Combined PWM mode 1 */ +#define ATIM_CCMR_MODE_COMBINED2 (13) /* 1101: Combined PWM mode 2 */ +#define ATIM_CCMR_MODE_ASYMMETRIC1 (14) /* 1110: Asymmetric PWM mode 1 */ +#define ATIM_CCMR_MODE_ASYMMETRIC2 (15) /* 1111: Asymmetric PWM mode 2 */ + +/* Capture/compare mode register 1 -- Input capture mode */ + + /* Bits 1-0:(same as output compare mode) */ +#define ATIM_CCMR1_IC1PSC_SHIFT (2) /* Bits 3-2: Input Capture 1 Prescaler */ +#define ATIM_CCMR1_IC1PSC_MASK (3 << ATIM_CCMR1_IC1PSC_SHIFT) + /* (See common (unshifted) bit field definitions below) */ +#define ATIM_CCMR1_IC1F_SHIFT (4) /* Bits 7-4: Input Capture 1 Filter */ +#define ATIM_CCMR1_IC1F_MASK (0x0f << ATIM_CCMR1_IC1F_SHIFT) + /* (See common (unshifted) bit field definitions below) */ + /* Bits 9:8 (same as output compare mode) */ +#define ATIM_CCMR1_IC2PSC_SHIFT (10) /* Bits 11:10: Input Capture 2 Prescaler */ +#define ATIM_CCMR1_IC2PSC_MASK (3 << ATIM_CCMR1_IC2PSC_SHIFT) + /* (See common (unshifted) bit field definitions below) */ +#define ATIM_CCMR1_IC2F_SHIFT (12) /* Bits 15-12: Input Capture 2 Filter */ +#define ATIM_CCMR1_IC2F_MASK (0x0f << ATIM_CCMR1_IC2F_SHIFT) + /* (See common (unshifted) bit field definitions below) */ + +/* Common CCMR (unshifted) Input Capture Prescaler bit-field definitions */ + +#define ATIM_CCMR_ICPSC_NOPSC (0) /* 00: no prescaler, capture each edge */ +#define ATIM_CCMR_ICPSC_EVENTS2 (1) /* 01: capture once every 2 events */ +#define ATIM_CCMR_ICPSC_EVENTS4 (2) /* 10: capture once every 4 events */ +#define ATIM_CCMR_ICPSC_EVENTS8 (3) /* 11: capture once every 8 events */ + +/* Common CCMR (unshifted) Input Capture Filter bit-field definitions */ + +#define ATIM_CCMR_ICF_NOFILT (0) /* 0000: No filter, sampling at fDTS */ +#define ATIM_CCMR_ICF_FCKINT2 (1) /* 0001: fSAMPLING=fCK_INT, N=2 */ +#define ATIM_CCMR_ICF_FCKINT4 (2) /* 0010: fSAMPLING=fCK_INT, N=4 */ +#define ATIM_CCMR_ICF_FCKINT8 (3) /* 0011: fSAMPLING=fCK_INT, N=8 */ +#define ATIM_CCMR_ICF_FDTSd26 (4) /* 0100: fSAMPLING=fDTS/2, N=6 */ +#define ATIM_CCMR_ICF_FDTSd28 (5) /* 0101: fSAMPLING=fDTS/2, N=8 */ +#define ATIM_CCMR_ICF_FDTSd46 (6) /* 0110: fSAMPLING=fDTS/4, N=6 */ +#define ATIM_CCMR_ICF_FDTSd48 (7) /* 0111: fSAMPLING=fDTS/4, N=8 */ +#define ATIM_CCMR_ICF_FDTSd86 (8) /* 1000: fSAMPLING=fDTS/8, N=6 */ +#define ATIM_CCMR_ICF_FDTSd88 (9) /* 1001: fSAMPLING=fDTS/8, N=8 */ +#define ATIM_CCMR_ICF_FDTSd165 (10) /* 1010: fSAMPLING=fDTS/16, N=5 */ +#define ATIM_CCMR_ICF_FDTSd166 (11) /* 1011: fSAMPLING=fDTS/16, N=6 */ +#define ATIM_CCMR_ICF_FDTSd168 (12) /* 1100: fSAMPLING=fDTS/16, N=8 */ +#define ATIM_CCMR_ICF_FDTSd325 (13) /* 1101: fSAMPLING=fDTS/32, N=5 */ +#define ATIM_CCMR_ICF_FDTSd326 (14) /* 1110: fSAMPLING=fDTS/32, N=6 */ +#define ATIM_CCMR_ICF_FDTSd328 (15) /* 1111: fSAMPLING=fDTS/32, N=8 */ + +/* Capture/compare mode register 2 - Output Compare mode */ + +#define ATIM_CCMR2_CC3S_SHIFT (0) /* Bits 1-0: Capture/Compare 3 Selection */ +#define ATIM_CCMR2_CC3S_MASK (3 << ATIM_CCMR2_CC3S_SHIFT) + /* (See common (unshifted) bit field definitions above) */ +#define ATIM_CCMR2_OC3FE (1 << 2) /* Bit 2: Output Compare 3 Fast enable */ +#define ATIM_CCMR2_OC3PE (1 << 3) /* Bit 3: Output Compare 3 Preload enable */ +#define ATIM_CCMR2_OC3M_SHIFT (4) /* Bits 6-4: Output Compare 3 Mode */ +#define ATIM_CCMR2_OC3M_MASK (7 << ATIM_CCMR2_OC3M_SHIFT) + /* (See common (unshifted) bit field definitions above) */ +#define ATIM_CCMR2_OC3CE (1 << 7) /* Bit 7: Output Compare 3 Clear Enable */ +#define ATIM_CCMR2_CC4S_SHIFT (8) /* Bits 9-8: Capture/Compare 4 Selection */ +#define ATIM_CCMR2_CC4S_MASK (3 << ATIM_CCMR2_CC4S_SHIFT) + /* (See common (unshifted) bit field definitions above) */ +#define ATIM_CCMR2_OC4FE (1 << 10) /* Bit 10: Output Compare 4 Fast enable */ +#define ATIM_CCMR2_OC4PE (1 << 11) /* Bit 11: Output Compare 4 Preload enable */ +#define ATIM_CCMR2_OC4M_SHIFT (12) /* Bits 14-12: Output Compare 4 Mode */ +#define ATIM_CCMR2_OC4M_MASK (7 << ATIM_CCMR2_OC4M_SHIFT) + /* (See common (unshifted) bit field definitions above) */ +#define ATIM_CCMR2_OC4CE (1 << 15) /* Bit 15: Output Compare 4 Clear Enable */ +#define ATIM_CCMR2_OC3M (1 << 16) /* Bit 16: Output Compare 3 mode - bit 3 */ +#define ATIM_CCMR2_OC4M (1 << 24) /* Bit 24: Output Compare 4 mode - bit 3 */ + +/* Capture/compare mode register 2 - Input Capture Mode */ + + /* Bits 1-0:(same as output compare mode) */ +#define ATIM_CCMR2_IC3PSC_SHIFT (2) /* Bits 3-2: Input Capture 3 Prescaler */ +#define ATIM_CCMR1_IC3PSC_MASK (3 << ATIM_CCMR2_IC3PSC_SHIFT) + /* (See common (unshifted) bit field definitions above) */ +#define ATIM_CCMR2_IC3F_SHIFT (4) /* Bits 7-4: Input Capture 3 Filter */ +#define ATIM_CCMR2_IC3F_MASK (0x0f << ATIM_CCMR2_IC3F_SHIFT) + /* (See common (unshifted) bit field definitions above) */ + /* Bits 9:8 (same as output compare mode) */ +#define ATIM_CCMR2_IC4PSC_SHIFT (10) /* Bits 11:10: Input Capture 4 Prescaler */ +#define ATIM_CCMR2_IC4PSC_MASK (3 << ATIM_CCMR2_IC4PSC_SHIFT) + /* (See common (unshifted) bit field definitions above) */ +#define ATIM_CCMR2_IC4F_SHIFT (12) /* Bits 15-12: Input Capture 4 Filter */ +#define ATIM_CCMR2_IC4F_MASK (0x0f << ATIM_CCMR2_IC4F_SHIFT) + /* (See common (unshifted) bit field definitions above) */ + +/* Capture/compare mode register 3 -- Output compare mode */ + +#define ATIM_CCMR3_OC5FE (1 << 2) /* Bit 2: Output Compare 5 Fast enable */ +#define ATIM_CCMR3_OC5PE (1 << 3) /* Bit 3: Output Compare 5 Preload enable */ +#define ATIM_CCMR3_OC5M_SHIFT (4) /* Bits 6-4: Output Compare 5 Mode */ +#define ATIM_CCMR3_OC5M_MASK (7 << ATIM_CCMR3_OC5M_SHIFT) + /* (See common (unshifted) bit field definitions below) */ +#define ATIM_CCMR3_OC5CE (1 << 7) /* Bit 7: Output Compare 5 Clear Enable */ +#define ATIM_CCMR3_OC6FE (1 << 10) /* Bit 10: Output Compare 6 Fast enable */ +#define ATIM_CCMR3_OC6PE (1 << 11) /* Bit 11: Output Compare 6 Preload enable */ +#define ATIM_CCMR3_OC6M_SHIFT (12) /* Bits 14-12: Output Compare 7 Mode */ +#define ATIM_CCMR3_OC6M_MASK (7 << ATIM_CCMR3_OC6M_SHIFT) + /* (See common (unshifted) bit field definitions below) */ +#define ATIM_CCMR3_OC6CE (1 << 15) /* Bit 15: Output Compare 7 Clear Enable */ +#define ATIM_CCMR3_OC5M (1 << 16) /* Bit 16: Output Compare 5 mode - bit 3 */ +#define ATIM_CCMR3_OC6M (1 << 24) /* Bit 24: Output Compare 6 mode - bit 3 */ + + +/* Capture/compare enable register */ + +#define ATIM_CCER_CC1E (1 << 0) /* Bit 0: Capture/Compare 1 output enable */ +#define ATIM_CCER_CC1P (1 << 1) /* Bit 1: Capture/Compare 1 output Polarity */ +#define ATIM_CCER_CC1NE (1 << 2) /* Bit 2: Capture/Compare 1 Complementary output enable */ +#define ATIM_CCER_CC1NP (1 << 3) /* Bit 3: Capture/Compare 1 Complementary output polarity */ +#define ATIM_CCER_CC2E (1 << 4) /* Bit 4: Capture/Compare 2 output enable */ +#define ATIM_CCER_CC2P (1 << 5) /* Bit 5: Capture/Compare 2 output Polarity */ +#define ATIM_CCER_CC2NE (1 << 6) /* Bit 6: Capture/Compare 2 Complementary output enable */ +#define ATIM_CCER_CC2NP (1 << 7) /* Bit 7: Capture/Compare 2 Complementary output polarity */ +#define ATIM_CCER_CC3E (1 << 8) /* Bit 8: Capture/Compare 3 output enable */ +#define ATIM_CCER_CC3P (1 << 9) /* Bit 9: Capture/Compare 3 output Polarity */ +#define ATIM_CCER_CC3NE (1 << 10) /* Bit 10: Capture/Compare 3 Complementary output enable */ +#define ATIM_CCER_CC3NP (1 << 11) /* Bit 11: Capture/Compare 3 Complementary output polarity */ +#define ATIM_CCER_CC4E (1 << 12) /* Bit 12: Capture/Compare 4 output enable */ +#define ATIM_CCER_CC4P (1 << 13) /* Bit 13: Capture/Compare 4 output Polarity */ +#define ATIM_CCER_CC4NP (1 << 15) /* Bit 15: Capture/Compare 4 Complementary output polarity */ +#define ATIM_CCER_CC5E (1 << 16) /* Bit 16: Capture/Compare 5 output enable */ +#define ATIM_CCER_CC5P (1 << 17) /* Bit 17: Capture/Compare 5 output Polarity */ +#define ATIM_CCER_CC6E (1 << 20) /* Bit 20: Capture/Compare 6 output enable */ +#define ATIM_CCER_CC6P (1 << 21) /* Bit 21: Capture/Compare 6 output Polarity */ + + +/* 16-bit counter register */ + +#define ATIM_CNT_SHIFT (0) /* Bits 0-15: Timer counter value */ +#define ATIM_CNT_MASK (0xffff << ATIM_CNT_SHIFT) + +/* Repetition counter register */ + +#define ATIM_RCR_REP_SHIFT (0) /* Bits 0-15: Repetition Counter Value */ +#define ATIM_RCR_REP_MASK (0xffff << ATIM_RCR_REP_SHIFT) + +#define ATIM_RCR_REP_MAX 65536 + +/* Capture/compare registers (CCR) */ + +#define ATIM_CCR5_GC5C1 (1 << 29) /* Bit 29: Group Channel 5 and Channel 1 */ +#define ATIM_CCR5_GC5C2 (1 << 30) /* Bit 30: Group Channel 5 and Channel 2 */ +#define ATIM_CCR5_GC5C3 (1 << 31) /* Bit 31: Group Channel 5 and Channel 3 */ + +#define ATIM_CCR_MASK (0xffff) + +/* Alternate function option register 1 (TIMx_AF1) */ + +#define ATIM_AF1_BKINE (1 << 0) /* Bit 0: BRK BKIN input enable */ +#define ATIM_AF1_BKDFBKE (1 << 8) /* Bit 8: BRK DFSDM_BREAK[0] enable */ +#define ATIM_AF1_BKINP (1 << 9) /* Bit 9: BRK BKIN input polarity */ + +/* Alternate function option register 2 (TIMx_AF2) */ + +#define ATIM_AF1_BK2INE (1 << 0) /* Bit 0: BRK2 BKIN input enable */ +#define ATIM_AF1_BK2DFBKE (1 << 8) /* Bit 8: BRK2 DFSDM_BREAK enable */ +#define ATIM_AF1_BK2INP (1 << 9) /* Bit 9: BRK2 BKIN2 input polarity */ + +/* Break and dead-time register */ + +#define ATIM_BDTR_DTG_SHIFT (0) /* Bits 7:0 [7:0]: Dead-Time Generator set-up */ +#define ATIM_BDTR_DTG_MASK (0xff << ATIM_BDTR_DTG_SHIFT) +#define ATIM_BDTR_LOCK_SHIFT (8) /* Bits 9:8 [1:0]: Lock Configuration */ +#define ATIM_BDTR_LOCK_MASK (3 << ATIM_BDTR_LOCK_SHIFT) +# define ATIM_BDTR_LOCKOFF (0 << ATIM_BDTR_LOCK_SHIFT) /* 00: LOCK OFF - No bit is write protected */ +# define ATIM_BDTR_LOCK1 (1 << ATIM_BDTR_LOCK_SHIFT) /* 01: LOCK Level 1 protection */ +# define ATIM_BDTR_LOCK2 (2 << ATIM_BDTR_LOCK_SHIFT) /* 10: LOCK Level 2 protection */ +# define ATIM_BDTR_LOCK3 (3 << ATIM_BDTR_LOCK_SHIFT) /* 11: LOCK Level 3 protection */ */ +#define ATIM_BDTR_OSSI (1 << 10) /* Bit 10: Off-State Selection for Idle mode */ +#define ATIM_BDTR_OSSR (1 << 11) /* Bit 11: Off-State Selection for Run mode */ +#define ATIM_BDTR_BKE (1 << 12) /* Bit 12: Break enable */ +#define ATIM_BDTR_BKP (1 << 13) /* Bit 13: Break Polarity */ +#define ATIM_BDTR_AOE (1 << 14) /* Bit 14: Automatic Output enable */ +#define ATIM_BDTR_MOE (1 << 15) /* Bit 15: Main Output enable */ +#define ATIM_BDTR_BKF_SHIFT (16) /* Bits 16-19: Break filter */ +#define ATIM_BDTR_BKF_MASK (0xf << ATIM_BDTR_BKF_SHIFT) +# define ATIM_BDTR_BKF_NOFILT (0 << ATIM_BDTR_BKF_SHIFT) /* 0000: No filter, BRK acts asynchronously */ +# define ATIM_BDTR_BKF_FCKINT2 (1 << ATIM_BDTR_BKF_SHIFT) /* 0001: fSAMPLING=fCK_INT, N=2 */ +# define ATIM_BDTR_BKF_FCKINT4 (2 << ATIM_BDTR_BKF_SHIFT) /* 0010: fSAMPLING=fCK_INT, N=4 */ +# define ATIM_BDTR_BKF_FCKINT8 (3 << ATIM_BDTR_BKF_SHIFT) /* 0011: fSAMPLING=fCK_INT, N=8 */ +# define ATIM_BDTR_BKF_FDTSd26 (4 << ATIM_BDTR_BKF_SHIFT) /* 0100: fSAMPLING=fDTS/2, N=6 */ +# define ATIM_BDTR_BKF_FDTSd28 (5 << ATIM_BDTR_BKF_SHIFT) /* 0101: fSAMPLING=fDTS/2, N=8 */ +# define ATIM_BDTR_BKF_FDTSd36 (6 << ATIM_BDTR_BKF_SHIFT) /* 0110: fSAMPLING=fDTS/4, N=6 */ +# define ATIM_BDTR_BKF_FDTSd38 (7 << ATIM_BDTR_BKF_SHIFT) /* 0111: fSAMPLING=fDTS/4, N=8 */ +# define ATIM_BDTR_BKF_FDTSd86 (8 << ATIM_BDTR_BKF_SHIFT) /* 1000: fSAMPLING=fDTS/8, N=6 */ +# define ATIM_BDTR_BKF_FDTSd88 (9 << ATIM_BDTR_BKF_SHIFT) /* 1001: fSAMPLING=fDTS/8, N=8 */ +# define ATIM_BDTR_BKF_FDTSd165 (10 << ATIM_BDTR_BKF_SHIFT) /* 1010: fSAMPLING=fDTS/16, N=5 */ +# define ATIM_BDTR_BKF_FDTSd166 (11 << ATIM_BDTR_BKF_SHIFT) /* 1011: fSAMPLING=fDTS/16, N=6 */ +# define ATIM_BDTR_BKF_FDTSd168 (12 << ATIM_BDTR_BKF_SHIFT) /* 1100: fSAMPLING=fDTS/16, N=8 */ +# define ATIM_BDTR_BKF_FDTSd325 (13 << ATIM_BDTR_BKF_SHIFT) /* 1101: fSAMPLING=fDTS/32, N=5 */ +# define ATIM_BDTR_BKF_FDTSd326 (14 << ATIM_BDTR_BKF_SHIFT) /* 1110: fSAMPLING=fDTS/32, N=6 */ +# define ATIM_BDTR_BKF_FDTSd328 (15 << ATIM_BDTR_BKF_SHIFT) /* 1111: fSAMPLING=fDTS/32, N=8 */ +#define ATIM_BDTR_BK2F_SHIFT (20) /* Bits 20-23: Break 2 filter */ +#define ATIM_BDTR_BK2F_MASK (0xf << ATIM_BDTR_BK2F_SHIFT) +# define ATIM_BDTR_BK2F_NOFILT (0 << ATIM_BDTR_BK2F_SHIFT) /* 0000: No filter, BRK 2 acts asynchronously */ +# define ATIM_BDTR_BK2F_FCKINT2 (1 << ATIM_BDTR_BK2F_SHIFT) /* 0001: fSAMPLING=fCK_INT, N=2 */ +# define ATIM_BDTR_BK2F_FCKINT4 (2 << ATIM_BDTR_BK2F_SHIFT) /* 0010: fSAMPLING=fCK_INT, N=4 */ +# define ATIM_BDTR_BK2F_FCKINT8 (3 << ATIM_BDTR_BK2F_SHIFT) /* 0011: fSAMPLING=fCK_INT, N=8 */ +# define ATIM_BDTR_BK2F_FDTSd26 (4 << ATIM_BDTR_BK2F_SHIFT) /* 0100: fSAMPLING=fDTS/2, N=6 */ +# define ATIM_BDTR_BK2F_FDTSd28 (5 << ATIM_BDTR_BK2F_SHIFT) /* 0101: fSAMPLING=fDTS/2, N=8 */ +# define ATIM_BDTR_BK2F_FDTSd36 (6 << ATIM_BDTR_BK2F_SHIFT) /* 0110: fSAMPLING=fDTS/4, N=6 */ +# define ATIM_BDTR_BK2F_FDTSd38 (7 << ATIM_BDTR_BK2F_SHIFT) /* 0111: fSAMPLING=fDTS/4, N=8 */ +# define ATIM_BDTR_BK2F_FDTSd86 (8 << ATIM_BDTR_BK2F_SHIFT) /* 1000: fSAMPLING=fDTS/8, N=6 */ +# define ATIM_BDTR_BK2F_FDTSd88 (9 << ATIM_BDTR_BK2F_SHIFT) /* 1001: fSAMPLING=fDTS/8, N=8 */ +# define ATIM_BDTR_BK2F_FDTSd165 (10 << ATIM_BDTR_BK2F_SHIFT) /* 1010: fSAMPLING=fDTS/16, N=5 */ +# define ATIM_BDTR_BK2F_FDTSd166 (11 << ATIM_BDTR_BK2F_SHIFT) /* 1011: fSAMPLING=fDTS/16, N=6 */ +# define ATIM_BDTR_BK2F_FDTSd168 (12 << ATIM_BDTR_BK2F_SHIFT) /* 1100: fSAMPLING=fDTS/16, N=8 */ +# define ATIM_BDTR_BK2F_FDTSd325 (13 << ATIM_BDTR_BK2F_SHIFT) /* 1101: fSAMPLING=fDTS/32, N=5 */ +# define ATIM_BDTR_BK2F_FDTSd326 (14 << ATIM_BDTR_BK2F_SHIFT) /* 1110: fSAMPLING=fDTS/32, N=6 */ +# define ATIM_BDTR_BK2F_FDTSd328 (15 << ATIM_BDTR_BK2F_SHIFT) /* 1111: fSAMPLING=fDTS/32, N=8 */ +#define ATIM_BDTR_BK2E (1 << 24) /* Bit 24: Break 2 enable */ +#define ATIM_BDTR_BK2P (1 << 1525 /* Bit 25:Break 2 polarity */ + + +/* DMA control register */ + +#define ATIM_DCR_DBA_SHIFT (0) /* Bits 4-0: DMA Base Address */ +#define ATIM_DCR_DBA_MASK (0x1f << ATIM_DCR_DBA_SHIFT) +#define ATIM_DCR_DBL_SHIFT (8) /* Bits 12-8: DMA Burst Length */ +#define ATIM_DCR_DBL_MASK (0x1f << ATIM_DCR_DBL_SHIFT) +# define ATIM_DCR_DBL(n) (((n)-1) << ATIM_DCR_DBL_SHIFT) /* n transfers, n = 1..18 */ + +/* Control register 1 (TIM2-5 and TIM9-14) */ + +#define GTIM_CR1_CEN (1 << 0) /* Bit 0: Counter enable */ +#define GTIM_CR1_UDIS (1 << 1) /* Bit 1: Update Disable */ +#define GTIM_CR1_URS (1 << 2) /* Bit 2: Update Request Source */ +#define GTIM_CR1_OPM (1 << 3) /* Bit 3: One Pulse Mode (TIM2-5, 9, and 12 only) */ +#define GTIM_CR1_DIR (1 << 4) /* Bit 4: Direction (TIM2-5 only) */ +#define GTIM_CR1_CMS_SHIFT (5) /* Bits 6-5: Center-aligned Mode Selection (TIM2-5 only) */ +#define GTIM_CR1_CMS_MASK (3 << GTIM_CR1_CMS_SHIFT) +# define GTIM_CR1_EDGE (0 << GTIM_CR1_CMS_SHIFT) /* 00: Edge-aligned mode. */ +# define GTIM_CR1_CENTER1 (1 << GTIM_CR1_CMS_SHIFT) /* 01: Center-aligned mode 1 */ +# define GTIM_CR1_CENTER2 (2 << GTIM_CR1_CMS_SHIFT) /* 10: Center-aligned mode 2 */ +# define GTIM_CR1_CENTER3 (3 << GTIM_CR1_CMS_SHIFT) /* 11: Center-aligned mode 3 */ +#define GTIM_CR1_ARPE (1 << 7) /* Bit 7: Auto-Reload Preload enable */ +#define GTIM_CR1_CKD_SHIFT (8) /* Bits 9-8: Clock Division */ +#define GTIM_CR1_CKD_MASK (3 << GTIM_CR1_CKD_SHIFT) +# define GTIM_CR1_TCKINT (0 << GTIM_CR1_CKD_SHIFT) /* 00: tDTS = tCK_INT */ +# define GTIM_CR1_2TCKINT (1 << GTIM_CR1_CKD_SHIFT) /* 01: tDTS = 2 x tCK_INT */ +# define GTIM_CR1_4TCKINT (2 << GTIM_CR1_CKD_SHIFT) /* 10: tDTS = 4 x tCK_INT */ +#define GTIM_CR1_UIFREMAP (1 << 11) /* Bit 11: UIF status bit remapping */ + +/* Control register 2 (TIM2-5, TIM9-12) */ + +#define GTIM_CR2_CCPC (1 << 0) /* Bit 0: Capture/compare preloaded control (TIM15-17 only) */ +#define GTIM_CR2_CCUS (1 << 2) /* Bit 2: Capture/compare control update selection (TIM15-17 only) */ +#define GTIM_CR2_CCDS (1 << 3) /* Bit 3: Capture/Compare DMA Selection (TIM2-5,1,&16 only) */ +#define GTIM_CR2_MMS_SHIFT (4) /* Bits 6-4: Master Mode Selection (not TIM16) */ +#define GTIM_CR2_MMS_MASK (7 << GTIM_CR2_MMS_SHIFT) +# define GTIM_CR2_MMS_RESET (0 << GTIM_CR2_MMS_SHIFT) /* 000: Reset */ +# define GTIM_CR2_MMS_ENABLE (1 << GTIM_CR2_MMS_SHIFT) /* 001: Enable */ +# define GTIM_CR2_MMS_UPDATE (2 << GTIM_CR2_MMS_SHIFT) /* 010: Update */ +# define GTIM_CR2_MMS_COMPP (3 << GTIM_CR2_MMS_SHIFT) /* 011: Compare Pulse */ +# define GTIM_CR2_MMS_OC1REF (4 << GTIM_CR2_MMS_SHIFT) /* 100: Compare - OC1REF signal is used as trigger output (TRGO) */ +# define GTIM_CR2_MMS_OC2REF (5 << GTIM_CR2_MMS_SHIFT) /* 101: Compare - OC2REF signal is used as trigger output (TRGO) */ +# define GTIM_CR2_MMS_OC3REF (6 << GTIM_CR2_MMS_SHIFT) /* 110: Compare - OC3REF signal is used as trigger output (TRGO, TIM2-5 and TIM15 only) */ +# define GTIM_CR2_MMS_OC4REF (7 << GTIM_CR2_MMS_SHIFT) /* 111: Compare - OC4REF signal is used as trigger output (TRGO, TIM2-5 and TIM15 only) */ +#define GTIM_CR2_TI1S (1 << 7) /* Bit 7: TI1 Selection (not TIM16) */ +#define GTIM_CR2_OIS1 (1 << 8) /* Bit 8: COutput Idle state 1 (OC1 output) (TIM15-17 only) */ +#define GTIM_CR2_OIS1N (1 << 9) /* Bit 9: Output Idle state 1 (OC1N output) (TIM15-17 only) */ +#define GTIM_CR2_OIS2 (1 << 10) /* Bit 10: Output idle state 2 (OC2 output) (TIM15 only) */ + +/* Slave mode control register (TIM2-5) */ + +#define GTIM_SMCR_SMS_SHIFT (0) /* Bits 2-0: Slave Mode Selection */ +#define GTIM_SMCR_SMS_MASK (7 << GTIM_SMCR_SMS_SHIFT) +# define GTIM_SMCR_DISAB (0 << GTIM_SMCR_SMS_SHIFT) /* 000: Slave mode disabled */ +# define GTIM_SMCR_ENCMD1 (1 << GTIM_SMCR_SMS_SHIFT) /* 001: Encoder mode 1 */ +# define GTIM_SMCR_ENCMD2 (2 << GTIM_SMCR_SMS_SHIFT) /* 010: Encoder mode 2 */ +# define GTIM_SMCR_ENCMD3 (3 << GTIM_SMCR_SMS_SHIFT) /* 011: Encoder mode 3 */ +# define GTIM_SMCR_RESET (4 << GTIM_SMCR_SMS_SHIFT) /* 100: Reset Mode */ +# define GTIM_SMCR_GATED (5 << GTIM_SMCR_SMS_SHIFT) /* 101: Gated Mode */ +# define GTIM_SMCR_TRIGGER (6 << GTIM_SMCR_SMS_SHIFT) /* 110: Trigger Mode */ +# define GTIM_SMCR_EXTCLK1 (7 << GTIM_SMCR_SMS_SHIFT) /* 111: External Clock Mode 1 */ +#define GTIM_SMCR_TS_SHIFT (4) /* Bits 6-4: Trigger Selection */ +#define GTIM_SMCR_TS_MASK (7 << GTIM_SMCR_TS_SHIFT) +# define GTIM_SMCR_ITR0 (0 << GTIM_SMCR_TS_SHIFT) /* 000: Internal Trigger 0 (ITR0). TIM1 */ +# define GTIM_SMCR_ITR1 (1 << GTIM_SMCR_TS_SHIFT) /* 001: Internal Trigger 1 (ITR1). TIM2 */ +# define GTIM_SMCR_ITR2 (2 << GTIM_SMCR_TS_SHIFT) /* 010: Internal Trigger 2 (ITR2). TIM3 */ +# define GTIM_SMCR_ITR3 (3 << GTIM_SMCR_TS_SHIFT) /* 011: Internal Trigger 3 (ITR3). TIM4 */ +# define GTIM_SMCR_TI1FED (4 << GTIM_SMCR_TS_SHIFT) /* 100: TI1 Edge Detector (TI1F_ED) */ +# define GTIM_SMCR_TI1FP1 (5 << GTIM_SMCR_TS_SHIFT) /* 101: Filtered Timer Input 1 (TI1FP1) */ +# define GTIM_SMCR_TI2FP2 (6 << GTIM_SMCR_TS_SHIFT) /* 110: Filtered Timer Input 2 (TI2FP2) */ +# define GTIM_SMCR_ETRF (7 << GTIM_SMCR_TS_SHIFT) /* 111: External Trigger input (ETRF) */ +#define GTIM_SMCR_MSM (1 << 7) /* Bit 7: Master/Slave mode */ +#define GTIM_SMCR_ETF_SHIFT (8) /* Bits 11-8: External Trigger Filter (not TIM15) */ +#define GTIM_SMCR_ETF_MASK (0x0f << GTIM_SMCR_ETF_SHIFT) +# define GTIM_SMCR_NOFILT (0 << GTIM_SMCR_ETF_SHIFT) /* 0000: No filter, sampling is done at fDTS */ +# define GTIM_SMCR_FCKINT2 (1 << GTIM_SMCR_ETF_SHIFT) /* 0001: fSAMPLING=fCK_INT, N=2 */ +# define GTIM_SMCR_FCKINT4 (2 << GTIM_SMCR_ETF_SHIFT) /* 0010: fSAMPLING=fCK_INT, N=4 */ +# define GTIM_SMCR_FCKINT8 (3 << GTIM_SMCR_ETF_SHIFT) /* 0011: fSAMPLING=fCK_INT, N=8 */ +# define GTIM_SMCR_FDTSd26 (4 << GTIM_SMCR_ETF_SHIFT) /* 0100: fSAMPLING=fDTS/2, N=6 */ +# define GTIM_SMCR_FDTSd28 (5 << GTIM_SMCR_ETF_SHIFT) /* 0101: fSAMPLING=fDTS/2, N=8 */ +# define GTIM_SMCR_FDTSd36 (6 << GTIM_SMCR_ETF_SHIFT) /* 0110: fSAMPLING=fDTS/4, N=6 */ +# define GTIM_SMCR_FDTSd38 (7 << GTIM_SMCR_ETF_SHIFT) /* 0111: fSAMPLING=fDTS/4, N=8 */ +# define GTIM_SMCR_FDTSd86 (8 << GTIM_SMCR_ETF_SHIFT) /* 1000: fSAMPLING=fDTS/8, N=6 */ +# define GTIM_SMCR_FDTSd88 (9 << GTIM_SMCR_ETF_SHIFT) /* 1001: fSAMPLING=fDTS/8, N=8 */ +# define GTIM_SMCR_FDTSd165 (10 << GTIM_SMCR_ETF_SHIFT) /* 1010: fSAMPLING=fDTS/16, N=5 */ +# define GTIM_SMCR_FDTSd166 (11 << GTIM_SMCR_ETF_SHIFT) /* 1011: fSAMPLING=fDTS/16, N=6 */ +# define GTIM_SMCR_FDTSd168 (12 << GTIM_SMCR_ETF_SHIFT) /* 1100: fSAMPLING=fDTS/16, N=8 */ +# define GTIM_SMCR_FDTSd325 (13 << GTIM_SMCR_ETF_SHIFT) /* 1101: fSAMPLING=fDTS/32, N=5 */ +# define GTIM_SMCR_FDTSd326 (14 << GTIM_SMCR_ETF_SHIFT) /* 1110: fSAMPLING=fDTS/32, N=6 */ +# define GTIM_SMCR_FDTSd328 (15 << GTIM_SMCR_ETF_SHIFT) /* 1111: fSAMPLING=fDTS/32, N=8 */ +#define GTIM_SMCR_ETPS_SHIFT (12) /* Bits 13-12: External Trigger Prescaler (not TIM15) */ +#define GTIM_SMCR_ETPS_MASK (3 << GTIM_SMCR_ETPS_SHIFT) +# define GTIM_SMCR_PSCOFF (0 << GTIM_SMCR_ETPS_SHIFT) /* 00: Prescaler OFF */ +# define GTIM_SMCR_ETRPd2 (1 << GTIM_SMCR_ETPS_SHIFT) /* 01: ETRP frequency divided by 2 */ +# define GTIM_SMCR_ETRPd4 (2 << GTIM_SMCR_ETPS_SHIFT) /* 10: ETRP frequency divided by 4 */ +# define GTIM_SMCR_ETRPd8 (3 << GTIM_SMCR_ETPS_SHIFT) /* 11: ETRP frequency divided by 8 */ +#define GTIM_SMCR_ECE (1 << 14) /* Bit 14: External Clock enable */ +#define GTIM_SMCR_ETP (1 << 15) /* Bit 15: External Trigger Polarity */ +#define GTIM_SMCR_SMS (1 << 16) /* Bit 16: Slave mode selection - bit 3 */ + +/* DMA/Interrupt enable register (TIM2-5 and TIM9-14) */ + +#define GTIM_DIER_UIE (1 << 0) /* Bit 0: Update interrupt enable */ +#define GTIM_DIER_CC1IE (1 << 1) /* Bit 1: Capture/Compare 1 interrupt enable */ +#define GTIM_DIER_CC2IE (1 << 2) /* Bit 2: Capture/Compare 2 interrupt enable (TIM2-5,9,12,&15 only) */ +#define GTIM_DIER_CC3IE (1 << 3) /* Bit 3: Capture/Compare 3 interrupt enable (TIM2-5 only) */ +#define GTIM_DIER_CC4IE (1 << 4) /* Bit 4: Capture/Compare 4 interrupt enable (TIM2-5 only) */ +#define GTIM_DIER_COMIE (1 << 5) /* Bit 5: COM interrupt enable (TIM15-17 only) */ +#define GTIM_DIER_TIE (1 << 6) /* Bit 6: Trigger interrupt enable (TIM2-5,9,&12 only) */ +#define GTIM_DIER_BIE (1 << 7) /* Bit 7: Break interrupt enable (TIM15-17 only) */ +#define GTIM_DIER_UDE (1 << 8) /* Bit 8: Update DMA request enable (TIM2-5&15-17 only) */ +#define GTIM_DIER_CC1DE (1 << 9) /* Bit 9: Capture/Compare 1 DMA request enable (TIM2-5&15-17 only) */ +#define GTIM_DIER_CC2DE (1 << 10) /* Bit 10: Capture/Compare 2 DMA request enable (TIM2-5&15 only) */ +#define GTIM_DIER_CC3DE (1 << 11) /* Bit 11: Capture/Compare 3 DMA request enable (TIM2-5 only) */ +#define GTIM_DIER_CC4DE (1 << 12) /* Bit 12: Capture/Compare 4 DMA request enable (TIM2-5 only) */ +#define GTIM_DIER_COMDE (1 << 13) /* Bit 13: COM DMA request enable (TIM15-17 only) */ +#define GTIM_DIER_TDE (1 << 14) /* Bit 14: Trigger DMA request enable (TIM2-5&15-17 only) */ + +/* Status register */ + +#define GTIM_SR_UIF (1 << 0) /* Bit 0: Update interrupt flag */ +#define GTIM_SR_CC1IF (1 << 1) /* Bit 1: Capture/compare 1 interrupt flag */ +#define GTIM_SR_CC2IF (1 << 2) /* Bit 2: Capture/Compare 2 interrupt flag (TIM2-5,9,12,&15 only) */ +#define GTIM_SR_CC3IF (1 << 3) /* Bit 3: Capture/Compare 3 interrupt flag (TIM2-5 only) */ +#define GTIM_SR_CC4IF (1 << 4) /* Bit 4: Capture/Compare 4 interrupt flag (TIM2-5 only) */ +#define GTIM_SR_COMIF (1 << 5) /* Bit 5: COM interrupt flag (TIM15-17 only) */ +#define GTIM_SR_TIF (1 << 6) /* Bit 6: Trigger interrupt Flag (TIM2-5,9,12&15-17 only) */ +#define GTIM_SR_BIF (1 << 7) /* Bit 7: Break interrupt flag (TIM15-17 only) */ +#define GTIM_SR_CC1OF (1 << 9) /* Bit 9: Capture/Compare 1 Overcapture flag */ +#define GTIM_SR_CC2OF (1 << 10) /* Bit 10: Capture/Compare 2 Overcapture flag (TIM2-5,9,12&15 only) */ +#define GTIM_SR_CC3OF (1 << 11) /* Bit 11: Capture/Compare 3 Overcapture flag (TIM2-5 only) */ +#define GTIM_SR_CC4OF (1 << 12) /* Bit 12: Capture/Compare 4 Overcapture flag (TIM2-5 only) */ + +/* Event generation register (TIM2-5 and TIM9-14) */ + +#define GTIM_EGR_UG (1 << 0) /* Bit 0: Update generation */ +#define GTIM_EGR_CC1G (1 << 1) /* Bit 1: Capture/compare 1 generation */ +#define GTIM_EGR_CC2G (1 << 2) /* Bit 2: Capture/compare 2 generation (TIM2-5,9,12,&15 only) */ +#define GTIM_EGR_CC3G (1 << 3) /* Bit 3: Capture/compare 3 generation (TIM2-5 only) */ +#define GTIM_EGR_CC4G (1 << 4) /* Bit 4: Capture/compare 4 generation (TIM2-5 only) */ +#define GTIM_EGR_COMIG (1 << 5) /* Bit 5: Capture/Compare control update generation (TIM15-17 only) */ +#define GTIM_EGR_TG (1 << 6) /* Bit 6: Trigger generation (TIM2-5,9,12&16-17 only) */ +#define GTIM_EGR_BG (1 << 7) /* Bit 7: Break generation (TIM15-17 only) */ + +/* Capture/compare mode register 1 - Output compare mode (TIM2-5 and TIM9-14) */ + +#define GTIM_CCMR1_CC1S_SHIFT (0) /* Bits 1-0: Capture/Compare 1 Selection */ +#define GTIM_CCMR1_CC1S_MASK (3 << GTIM_CCMR1_CC1S_SHIFT) + /* (See common CCMR Capture/Compare Selection definitions below) */ +#define GTIM_CCMR1_OC1FE (1 << 2) /* Bit 2: Output Compare 1 Fast enable */ +#define GTIM_CCMR1_OC1PE (1 << 3) /* Bit 3: Output Compare 1 Preload enable */ +#define GTIM_CCMR1_OC1M_SHIFT (4) /* Bits 6-4: Output Compare 1 Mode */ +#define GTIM_CCMR1_OC1M_MASK (7 << GTIM_CCMR1_OC1M_SHIFT) + /* (See common CCMR Output Compare Mode definitions below) */ +#define GTIM_CCMR1_OC1CE (1 << 7) /* Bit 7: Output Compare 1Clear Enable */ +#define GTIM_CCMR1_CC2S_SHIFT (8) /* Bits 9-8: Capture/Compare 2 Selection */ +#define GTIM_CCMR1_CC2S_MASK (3 << GTIM_CCMR1_CC2S_SHIFT) + /* (See common CCMR Capture/Compare Selection definitions below) */ +#define GTIM_CCMR1_OC2FE (1 << 10) /* Bit 10: Output Compare 2 Fast enable */ +#define GTIM_CCMR1_OC2PE (1 << 11) /* Bit 11: Output Compare 2 Preload enable */ +#define GTIM_CCMR1_OC2M_SHIFT (12) /* Bits 14-12: Output Compare 2 Mode */ +#define GTIM_CCMR1_OC2M_MASK (7 << GTIM_CCMR1_OC2M_SHIFT) + /* (See common CCMR Output Compare Mode definitions below) */ +#define GTIM_CCMR1_OC2CE (1 << 15) /* Bit 15: Output Compare 2 Clear Enable */ +#define GTIM_CCMR1_OC1M (1 << 16) /* Bit 16: Output Compare 1 mode - bit 3 */ +#define GTIM_CCMR1_OC2M (1 << 24) /* Bit 24: Output Compare 2 mode - bit 3 */ + +/* Common CCMR (unshifted) Capture/Compare Selection bit-field definitions */ + +#define GTIM_CCMR_CCS_CCOUT (0) /* 00: CCx channel output */ +#define GTIM_CCMR_CCS_CCIN1 (1) /* 01: CCx channel input, ICx is TIx */ +#define GTIM_CCMR_CCS_CCIN2 (2) /* 10: CCx channel input, ICx is TIy */ +#define GTIM_CCMR_CCS_CCINTRC (3) /* 11: CCx channel input, ICx is TRC */ + +/* Common CCMR (unshifted) Compare Mode bit field definitions */ + +#define GTIM_CCMR_MODE_FRZN (0) /* 000: Frozen */ +#define GTIM_CCMR_MODE_CHACT (1) /* 001: Channel x active on match */ +#define GTIM_CCMR_MODE_CHINACT (2) /* 010: Channel x inactive on match */ +#define GTIM_CCMR_MODE_OCREFTOG (3) /* 011: OCxREF toggle ATIM_CNT=ATIM_CCRx */ +#define GTIM_CCMR_MODE_OCREFLO (4) /* 100: OCxREF forced low */ +#define GTIM_CCMR_MODE_OCREFHI (5) /* 101: OCxREF forced high */ +#define GTIM_CCMR_MODE_PWM1 (6) /* 110: PWM mode 1 */ +#define GTIM_CCMR_MODE_PWM2 (7) /* 111: PWM mode 2 */ + +/* Capture/compare mode register 1 - Input capture mode (TIM2-5 and TIM9-14) */ + + /* Bits 1-0 (Same as Output Compare Mode) */ +#define GTIM_CCMR1_IC1PSC_SHIFT (2) /* Bits 3-2: Input Capture 1 Prescaler */ +#define GTIM_CCMR1_IC1PSC_MASK (3 << GTIM_CCMR1_IC1PSC_SHIFT) + /* (See common CCMR Input Capture Prescaler definitions below) */ +#define GTIM_CCMR1_IC1F_SHIFT (4) /* Bits 7-4: Input Capture 1 Filter */ +#define GTIM_CCMR1_IC1F_MASK (0x0f << GTIM_CCMR1_IC1F_SHIFT) + /* (See common CCMR Input Capture Filter definitions below) */ + /* Bits 9-8: (Same as Output Compare Mode) */ +#define GTIM_CCMR1_IC2PSC_SHIFT (10) /* Bits 11-10: Input Capture 2 Prescaler */ +#define GTIM_CCMR1_IC2PSC_MASK (3 << GTIM_CCMR1_IC2PSC_SHIFT) + /* (See common CCMR Input Capture Prescaler definitions below) */ +#define GTIM_CCMR1_IC2F_SHIFT (12) /* Bits 15-12: Input Capture 2 Filter */ +#define GTIM_CCMR1_IC2F_MASK (0x0f << GTIM_CCMR1_IC2F_SHIFT) + /* (See common CCMR Input Capture Filter definitions below) */ + +/* Common CCMR (unshifted) Input Capture Prescaler bit-field definitions */ + +#define GTIM_CCMR_ICPSC_NOPSC (0) /* 00: no prescaler, capture each edge */ +#define GTIM_CCMR_ICPSC_EVENTS2 (1) /* 01: capture once every 2 events */ +#define GTIM_CCMR_ICPSC_EVENTS4 (2) /* 10: capture once every 4 events */ +#define GTIM_CCMR_ICPSC_EVENTS8 (3) /* 11: capture once every 8 events */ + +/* Common CCMR (unshifted) Input Capture Filter bit-field definitions */ + +#define GTIM_CCMR_ICF_NOFILT (0) /* 0000: No filter, sampling at fDTS */ +#define GTIM_CCMR_ICF_FCKINT2 (1) /* 0001: fSAMPLING=fCK_INT, N=2 */ +#define GTIM_CCMR_ICF_FCKINT4 (2) /* 0010: fSAMPLING=fCK_INT, N=4 */ +#define GTIM_CCMR_ICF_FCKINT8 (3) /* 0011: fSAMPLING=fCK_INT, N=8 */ +#define GTIM_CCMR_ICF_FDTSd26 (4) /* 0100: fSAMPLING=fDTS/2, N=6 */ +#define GTIM_CCMR_ICF_FDTSd28 (5) /* 0101: fSAMPLING=fDTS/2, N=8 */ +#define GTIM_CCMR_ICF_FDTSd46 (6) /* 0110: fSAMPLING=fDTS/4, N=6 */ +#define GTIM_CCMR_ICF_FDTSd48 (7) /* 0111: fSAMPLING=fDTS/4, N=8 */ +#define GTIM_CCMR_ICF_FDTSd86 (8) /* 1000: fSAMPLING=fDTS/8, N=6 */ +#define GTIM_CCMR_ICF_FDTSd88 (9) /* 1001: fSAMPLING=fDTS/8, N=8 */ +#define GTIM_CCMR_ICF_FDTSd165 (10) /* 1010: fSAMPLING=fDTS/16, N=5 */ +#define GTIM_CCMR_ICF_FDTSd166 (11) /* 1011: fSAMPLING=fDTS/16, N=6 */ +#define GTIM_CCMR_ICF_FDTSd168 (12) /* 1100: fSAMPLING=fDTS/16, N=8 */ +#define GTIM_CCMR_ICF_FDTSd325 (13) /* 1101: fSAMPLING=fDTS/32, N=5 */ +#define GTIM_CCMR_ICF_FDTSd326 (14) /* 1110: fSAMPLING=fDTS/32, N=6 */ +#define GTIM_CCMR_ICF_FDTSd328 (15) /* 1111: fSAMPLING=fDTS/32, N=8 */ + +/* Capture/compare mode register 2 - Output Compare mode (TIM2-5 only) */ + +#define GTIM_CCMR2_CC3S_SHIFT (0) /* Bits 1-0: Capture/Compare 3 Selection */ +#define GTIM_CCMR2_CC3S_MASK (3 << GTIM_CCMR2_CC3S_SHIFT) + /* (See common CCMR Capture/Compare Selection definitions above) */ +#define GTIM_CCMR2_OC3FE (1 << 2) /* Bit 2: Output Compare 3 Fast enable */ +#define GTIM_CCMR2_OC3PE (1 << 3) /* Bit 3: Output Compare 3 Preload enable */ +#define GTIM_CCMR2_OC3M_SHIFT (4) /* Bits 6-4: Output Compare 3 Mode */ +#define GTIM_CCMR2_OC3M_MASK (7 << GTIM_CCMR2_OC3M_SHIFT) + /* (See common CCMR Output Compare Mode definitions above) */ +#define GTIM_CCMR2_OC3CE (1 << 7) /* Bit 7: Output Compare 3 Clear Enable */ +#define GTIM_CCMR2_CC4S_SHIFT (8) /* Bits 9-8: Capture/Compare 4 Selection */ +#define GTIM_CCMR2_CC4S_MASK (3 << GTIM_CCMR2_CC4S_SHIFT) + /* (See common CCMR Capture/Compare Selection definitions above) */ +#define GTIM_CCMR2_OC4FE (1 << 10) /* Bit 10: Output Compare 4 Fast enable */ +#define GTIM_CCMR2_OC4PE (1 << 11) /* Bit 11: Output Compare 4 Preload enable */ +#define GTIM_CCMR2_OC4M_SHIFT (12) /* Bits 14-12: Output Compare 4 Mode */ +#define GTIM_CCMR2_OC4M_MASK (7 << GTIM_CCMR2_OC4M_SHIFT) + /* (See common CCMR Output Compare Mode definitions above) */ +#define GTIM_CCMR2_OC4CE (1 << 15) /* Bit 15: Output Compare 4 Clear Enable */ + +/* Capture/compare mode register 2 - Input capture mode (TIM2-5 only) */ + + /* Bits 1-0 (Same as Output Compare Mode) */ +#define GTIM_CCMR2_IC3PSC_SHIFT (2) /* Bits 3-2: Input Capture 3 Prescaler */ +#define GTIM_CCMR2_IC3PSC_MASK (3 << GTIM_CCMR2_IC3PSC_SHIFT) + /* (See common CCMR Input Capture Prescaler definitions below) */ +#define GTIM_CCMR2_IC3F_SHIFT (4) /* Bits 7-4: Input Capture 3 Filter */ +#define GTIM_CCMR2_IC3F_MASK (0x0f << GTIM_CCMR2_IC3F_SHIFT) + /* (See common CCMR Input Capture Filter definitions below) */ + /* Bits 9-8: (Same as Output Compare Mode) */ +#define GTIM_CCMR2_IC4PSC_SHIFT (10) /* Bits 11-10: Input Capture 4 Prescaler */ +#define GTIM_CCMR2_IC4PSC_MASK (3 << GTIM_CCMR2_IC4PSC_SHIFT) + /* (See common CCMR Input Capture Prescaler definitions below) */ +#define GTIM_CCMR2_IC4F_SHIFT (12) /* Bits 15-12: Input Capture 4 Filter */ +#define GTIM_CCMR2_IC4F_MASK (0x0f << GTIM_CCMR2_IC4F_SHIFT) + /* (See common CCMR Input Capture Filter definitions below) */ + +/* Capture/compare enable register (TIM1 and TIM8, TIM2-5 and TIM9-14) */ + +#define GTIM_CCER_CC1E (1 << 0) /* Bit 0: Capture/Compare 1 output enable */ +#define GTIM_CCER_CC1P (1 << 1) /* Bit 1: Capture/Compare 1 output polarity */ +#define GTIM_CCER_CC1NE (1 << 2) /* Bit 2: Capture/Compare 1 complementary output enable (TIM1 and TIM8 only) */ +#define GTIM_CCER_CC1NP (1 << 3) /* Bit 3: Capture/Compare 1 output Polarity (F2,F3,F4 and TIM15-17) */ +#define GTIM_CCER_CC2E (1 << 4) /* Bit 4: Capture/Compare 2 output enable (TIM2-5,9&12 only) */ +#define GTIM_CCER_CC2P (1 << 5) /* Bit 5: Capture/Compare 2 output polarity (TIM2-5,9&12 only) */ +#define GTIM_CCER_CC2NE (1 << 6) /* Bit 6: Capture/Compare 2 complementary output enable (TIM1 and TIM8 only) */ +#define GTIM_CCER_CC2NP (1 << 7) /* Bit 7: Capture/Compare 2 output Polarity (F2,F3,F4 and TIM2-5,9,12&15 only) */ +#define GTIM_CCER_CC3E (1 << 8) /* Bit 8: Capture/Compare 3 output enable (TIM2-5 only) */ +#define GTIM_CCER_CC3P (1 << 9) /* Bit 9: Capture/Compare 3 output Polarity (TIM2-5 only) */ +#define GTIM_CCER_CC3NE (1 << 10) /* Bit 10: Capture/Compare 3 complementary output enable (TIM1 and TIM8 only) */ +#define GTIM_CCER_CC3NP (1 << 11) /* Bit 11: Capture/Compare 3 output Polarity (F2,F4 and TIM2-5 only) */ +#define GTIM_CCER_CC4E (1 << 12) /* Bit 12: Capture/Compare 4 output enable (TIM2-5 only) */ +#define GTIM_CCER_CC4P (1 << 13) /* Bit 13: Capture/Compare 4 output Polarity (TIM2-5 only) */ +#define GTIM_CCER_CC4NP (1 << 15) /* Bit 15: Capture/Compare 4 output Polarity */ + +/* 16-bit counter register */ + +#define GTIM_CNT_SHIFT (0) /* Bits 0-15: Timer counter value */ +#define GTIM_CNT_MASK (0xffff << ATIM_CNT_SHIFT) + +/* DMA control register */ + +#define GTIM_DCR_DBA_SHIFT (0) /* Bits 4-0: DMA Base Address */ +#define GTIM_DCR_DBA_MASK (0x1f << GTIM_DCR_DBA_SHIFT) +#define GTIM_DCR_DBL_SHIFT (8) /* Bits 12-8: DMA Burst Length */ +#define GTIM_DCR_DBL_MASK (0x1f << GTIM_DCR_DBL_SHIFT) + +/* Timer 2/5 option register */ + +#define TIM2_OR_ITR1_RMP_SHIFT (10) /* Bits 10-11: Internal trigger 1 remap */ +#define TIM2_OR_ITR1_RMP_MASK (3 << TIM2_OR_ITR1_RMP_SHIFT) +# define TIM2_OR_ITR1_TIM8_TRGOUT (0 << TIM2_OR_ITR1_RMP_SHIFT) /* 00: TIM2_ITR1 input connected to TIM8_TRGOUT */ +# define TIM2_OR_ITR1_PTP (1 << TIM2_OR_ITR1_RMP_SHIFT) /* 01: TIM2_ITR1 input connected to PTP trigger output */ +# define TIM2_OR_ITR1_OTGFSSOF (2 << TIM2_OR_ITR1_RMP_SHIFT) /* 10: TIM2_ITR1 input connected to OTG FS SOF */ +# define TIM2_OR_ITR1_OTGHSSOF (3 << TIM2_OR_ITR1_RMP_SHIFT) /* 11: TIM2_ITR1 input connected to OTG HS SOF */ + +#define TIM5_OR_TI4_RMP_SHIFT (6) /* Bits 6-7: Internal trigger 4 remap */ +#define TIM5_OR_TI4_RMP_MASK (3 << TIM5_OR_TI4_RMP_SHIFT) +# define TIM5_OR_TI4_GPIO (0 << TIM5_OR_TI4_RMP_SHIFT) /* 00: TIM5_CH4 input connected to GPIO */ +# define TIM5_OR_TI4_LSI (1 << TIM5_OR_TI4_RMP_SHIFT) /* 01: TIM5_CH4 input connected to LSI internal clock */ +# define TIM5_OR_TI4_LSE (2 << TIM5_OR_TI4_RMP_SHIFT) /* 10: TIM5_CH4 input connected to LSE internal clock */ +# define TIM5_OR_TI4_RTC (3 << TIM5_OR_TI4_RMP_SHIFT) /* 11: TIM5_CH4 input connected to RTC output event */ + +#define TIM11_OR_TI1_RMP_SHIFT (6) /* Bits 6-7: Internal trigger 4 remap */ +#define TIM11_OR_TI1_RMP_MASK (3 << TIM11_OR_TI1_RMP_SHIFT) +# define TIM11_OR_TI1_GPIO (0 << TIM11_OR_TI1_RMP_SHIFT) /* 00-11: TIM11_CH1 input connected to GPIO */ +# define TIM11_OR_TI1_HSERTC (3 << TIM11_OR_TI1_RMP_SHIFT) /* 11: TIM11_CH1 input connected to HSE_RTC clock */ + + +/* Control register 1 */ + +#define BTIM_CR1_CEN (1 << 0) /* Bit 0: Counter enable */ +#define BTIM_CR1_UDIS (1 << 1) /* Bit 1: Update Disable */ +#define BTIM_CR1_URS (1 << 2) /* Bit 2: Update Request Source */ +#define BTIM_CR1_OPM (1 << 3) /* Bit 3: One Pulse Mode */ +#define BTIM_CR1_ARPE (1 << 7) /* Bit 7: Auto-Reload Preload enable */ + +/* Control register 2 */ + +#define BTIM_CR2_MMS_SHIFT (4) /* Bits 6-4: Master Mode Selection */ +#define BTIM_CR2_MMS_MASK (7 << BTIM_CR2_MMS_SHIFT) +# define BTIM_CR2_RESET (0 << BTIM_CR2_MMS_SHIFT) /* 000: Reset */ +# define BTIM_CR2_ENAB (1 << BTIM_CR2_MMS_SHIFT) /* 001: Enable */ +# define BTIM_CR2_UPDT (2 << BTIM_CR2_MMS_SHIFT) /* 010: Update */ + +/* DMA/Interrupt enable register */ + +#define BTIM_DIER_UIE (1 << 0) /* Bit 0: Update interrupt enable */ +#define BTIM_DIER_UDE (1 << 8) /* Bit 8: Update DMA request enable */ + +/* Status register */ + +#define BTIM_SR_UIF (1 << 0) /* Bit 0: Update interrupt flag */ + +/* Event generation register */ + +#define BTIM_EGR_UG (1 << 0) /* Bit 0: Update generation */ + +#endif /* __ARCH_ARM_SRC_STM32F7_CHIP_STM32F76XX77XX_TIM_H */ diff --git a/arch/arm/src/stm32f7/stm32_adc.c b/arch/arm/src/stm32f7/stm32_adc.c new file mode 100644 index 0000000000000000000000000000000000000000..df9232048e8946f5875d7219b3b8fc6a7c49b0d6 --- /dev/null +++ b/arch/arm/src/stm32f7/stm32_adc.c @@ -0,0 +1,1782 @@ +/**************************************************************************** + * arch/arm/src/stm32f7/stm32_adc.c + * + * Copyright (C) 2011, 2013, 2015-2016 Gregory Nutt. All rights reserved. + * Copyright (C) 2015 Omni Hoverboards Inc. All rights reserved. + * Authors: Gregory Nutt + * Diego Sanchez + * Paul Alexander Patience + * 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 +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "up_internal.h" +#include "up_arch.h" + +#include "chip.h" +#include "stm32_rcc.h" +#include "stm32_tim.h" +#include "stm32_dma.h" +#include "stm32_adc.h" + +/* ADC "upper half" support must be enabled */ + +#ifdef CONFIG_ADC + +/* Some ADC peripheral must be enabled */ + +#if defined(CONFIG_STM32F7_ADC1) || defined(CONFIG_STM32F7_ADC2) || \ + defined(CONFIG_STM32F7_ADC3) + +/* This implementation is for the STM32 F7[4-7] only */ + +#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) || \ + defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ +/* RCC reset ****************************************************************/ + +#define STM32_RCC_RSTR STM32_RCC_APB2RSTR +#define RCC_RSTR_ADC1RST RCC_APB2RSTR_ADCRST +#define RCC_RSTR_ADC2RST RCC_APB2RSTR_ADCRST +#define RCC_RSTR_ADC3RST RCC_APB2RSTR_ADCRST + +/* ADC interrupts ***********************************************************/ + +#define STM32_ADC_DMAREG_OFFSET STM32_ADC_CR2_OFFSET +#define ADC_DMAREG_DMA ADC_CR2_DMA +#define STM32_ADC_EXTREG_OFFSET STM32_ADC_CR2_OFFSET +#define ADC_EXTREG_EXTSEL_MASK ADC_CR2_EXTSEL_MASK +#define STM32_ADC_ISR_OFFSET STM32_ADC_SR_OFFSET +#define STM32_ADC_IER_OFFSET STM32_ADC_CR1_OFFSET +#define ADC_ISR_EOC ADC_SR_EOC +#define ADC_IER_EOC ADC_CR1_EOCIE +#define ADC_ISR_AWD ADC_SR_AWD +#define ADC_IER_AWD ADC_CR1_AWDIE +#define ADC_ISR_JEOC ADC_SR_JEOC +#define ADC_IER_JEOC ADC_CR1_JEOCIE +#define ADC_EXTREG_EXTEN_MASK ADC_CR2_EXTEN_MASK +#define ADC_EXTREG_EXTEN_NONE ADC_CR2_EXTEN_NONE +#define ADC_EXTREG_EXTEN_DEFAULT ADC_CR2_EXTEN_RISING +#define ADC_ISR_OVR ADC_SR_OVR +#define ADC_IER_OVR ADC_CR1_OVRIE + +#define ADC_ISR_ALLINTS (ADC_ISR_EOC | ADC_ISR_AWD | ADC_ISR_JEOC | \ + ADC_ISR_OVR) +#define ADC_IER_ALLINTS (ADC_IER_EOC | ADC_IER_AWD | ADC_IER_JEOC | \ + ADC_IER_OVR) + +/* ADC Channels/DMA ********************************************************/ +/* The maximum number of channels that can be sampled. If DMA support is + * not enabled, then only a single channel can be sampled. Otherwise, + * data overruns would occur. + */ + +#define ADC_MAX_CHANNELS_DMA 16 +#define ADC_MAX_CHANNELS_NODMA 1 + +#ifdef ADC_HAVE_DMA +# define ADC_MAX_SAMPLES ADC_MAX_CHANNELS_DMA +#else +# define ADC_MAX_SAMPLES ADC_MAX_CHANNELS_NODMA +#endif + +#define ADC_DMA_CONTROL_WORD (DMA_SCR_MSIZE_16BITS | \ + DMA_SCR_PSIZE_16BITS | \ + DMA_SCR_MINC | \ + DMA_SCR_CIRC | \ + DMA_SCR_DIR_P2M) + +/* DMA channels and interface values */ + +#define ADC_SMPR_DEFAULT ADC_SMPR_112 +#define ADC_SMPR1_DEFAULT ((ADC_SMPR_DEFAULT << ADC_SMPR1_SMP10_SHIFT) | \ + (ADC_SMPR_DEFAULT << ADC_SMPR1_SMP11_SHIFT) | \ + (ADC_SMPR_DEFAULT << ADC_SMPR1_SMP12_SHIFT) | \ + (ADC_SMPR_DEFAULT << ADC_SMPR1_SMP13_SHIFT) | \ + (ADC_SMPR_DEFAULT << ADC_SMPR1_SMP14_SHIFT) | \ + (ADC_SMPR_DEFAULT << ADC_SMPR1_SMP15_SHIFT) | \ + (ADC_SMPR_DEFAULT << ADC_SMPR1_SMP16_SHIFT) | \ + (ADC_SMPR_DEFAULT << ADC_SMPR1_SMP17_SHIFT) | \ + (ADC_SMPR_DEFAULT << ADC_SMPR1_SMP18_SHIFT)) +#define ADC_SMPR2_DEFAULT ((ADC_SMPR_DEFAULT << ADC_SMPR2_SMP0_SHIFT) | \ + (ADC_SMPR_DEFAULT << ADC_SMPR2_SMP1_SHIFT) | \ + (ADC_SMPR_DEFAULT << ADC_SMPR2_SMP2_SHIFT) | \ + (ADC_SMPR_DEFAULT << ADC_SMPR2_SMP3_SHIFT) | \ + (ADC_SMPR_DEFAULT << ADC_SMPR2_SMP4_SHIFT) | \ + (ADC_SMPR_DEFAULT << ADC_SMPR2_SMP5_SHIFT) | \ + (ADC_SMPR_DEFAULT << ADC_SMPR2_SMP6_SHIFT) | \ + (ADC_SMPR_DEFAULT << ADC_SMPR2_SMP7_SHIFT) | \ + (ADC_SMPR_DEFAULT << ADC_SMPR2_SMP8_SHIFT) | \ + (ADC_SMPR_DEFAULT << ADC_SMPR2_SMP9_SHIFT)) + +/* The last external channel on ADC 1 to enable Reading Vref or Vbat / Vsence */ + +#define ADC_LAST_EXTERNAL_CHAN 15 + +/* Assuming VDC 2.4 - 3.6 */ + +#define ADC_MAX_FADC 36000000 + +#if STM32_PCLK2_FREQUENCY/2 <= ADC_MAX_FADC +# define ADC_CCR_ADCPRE_DIV ADC_CCR_ADCPRE_DIV2 +#elif STM32_PCLK2_FREQUENCY/4 <= ADC_MAX_FADC +# define ADC_CCR_ADCPRE_DIV ADC_CCR_ADCPRE_DIV4 +#elif STM32_PCLK2_FREQUENCY/6 <= ADC_MAX_FADC +# define ADC_CCR_ADCPRE_DIV ADC_CCR_ADCPRE_DIV6 +#elif STM32_PCLK2_FREQUENCY/8 <= ADC_MAX_FADC +# define ADC_CCR_ADCPRE_DIV ADC_CCR_ADCPRE_DIV8 +#else +# error "PCLK2 too high - no divisor found " +#endif + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* This structure describes the state of one ADC block */ + +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 */ + uint8_t intf; /* ADC interface number */ + uint8_t current; /* Current ADC channel being converted */ +#ifdef ADC_HAVE_DMA + uint8_t dmachan; /* DMA channel needed by this ADC */ + bool hasdma; /* True: This channel supports DMA */ +#endif +#ifdef ADC_HAVE_TIMER + uint8_t trigger; /* Timer trigger channel: 0=CC1, 1=CC2, 2=CC3, + * 3=CC4, 4=TRGO */ +#endif + xcpt_t isr; /* Interrupt handler for this ADC block */ + uint32_t base; /* Base address of registers unique to this ADC + * block */ +#ifdef ADC_HAVE_TIMER + uint32_t tbase; /* Base address of timer used by this ADC block */ + uint32_t extsel; /* EXTSEL value used by this ADC block */ + uint32_t pclck; /* The PCLK frequency that drives this timer */ + uint32_t freq; /* The desired frequency of conversions */ +#endif +#ifdef ADC_HAVE_DMA + DMA_HANDLE dma; /* Allocated DMA channel */ + + /* DMA transfer buffer */ + + uint16_t dmabuffer[ADC_MAX_SAMPLES]; +#endif + + /* List of selected ADC channels to sample */ + + uint8_t chanlist[ADC_MAX_SAMPLES]; +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +/* ADC Register access */ + +static void stm32_modifyreg32(unsigned int addr, uint32_t clrbits, + uint32_t setbits); +static uint32_t adc_getreg(FAR struct stm32_dev_s *priv, int offset); +static void adc_putreg(FAR struct stm32_dev_s *priv, int offset, + uint32_t value); +static void adc_modifyreg(FAR struct stm32_dev_s *priv, int offset, + uint32_t clrbits, uint32_t setbits); +#ifdef ADC_HAVE_TIMER +static uint16_t tim_getreg(FAR struct stm32_dev_s *priv, int offset); +static void tim_putreg(FAR struct stm32_dev_s *priv, int offset, + uint16_t value); +static void tim_modifyreg(FAR struct stm32_dev_s *priv, int offset, + uint16_t clrbits, uint16_t setbits); +static void tim_dumpregs(FAR struct stm32_dev_s *priv, + FAR const char *msg); +#endif + +static void adc_rccreset(FAR struct stm32_dev_s *priv, bool reset); + +/* ADC Interrupt Handler */ + +static int adc_interrupt(FAR struct adc_dev_s *dev); +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); +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); +static void adc_enable(FAR struct stm32_dev_s *priv, bool enable); + +static uint32_t adc_sqrbits(FAR struct stm32_dev_s *priv, int first, int last, + int offset); +static int adc_set_ch(FAR struct adc_dev_s *dev, uint8_t ch); +static bool adc_internal(FAR struct stm32_dev_s * priv); + +#ifdef ADC_HAVE_TIMER +static void adc_timstart(FAR struct stm32_dev_s *priv, bool enable); +static int adc_timinit(FAR struct stm32_dev_s *priv); +#endif + +#ifdef ADC_HAVE_DMA +static void adc_dmaconvcallback(DMA_HANDLE handle, uint8_t isr, + FAR void *arg); +#endif + +static void adc_startconv(FAR struct stm32_dev_s *priv, bool enable); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* ADC interface operations */ + +static const struct adc_ops_s g_adcops = +{ + .ao_bind = adc_bind, + .ao_reset = adc_reset, + .ao_setup = adc_setup, + .ao_shutdown = adc_shutdown, + .ao_rxint = adc_rxint, + .ao_ioctl = adc_ioctl, +}; + +/* ADC1 state */ + +#ifdef CONFIG_STM32F7_ADC1 +static struct stm32_dev_s g_adcpriv1 = +{ + .irq = STM32_IRQ_ADC, + .isr = adc123_interrupt, + .intf = 1, + .base = STM32_ADC1_BASE, +#ifdef ADC1_HAVE_TIMER + .trigger = CONFIG_STM32F7_ADC1_TIMTRIG, + .tbase = ADC1_TIMER_BASE, + .extsel = ADC1_EXTSEL_VALUE, + .pclck = ADC1_TIMER_PCLK_FREQUENCY, + .freq = CONFIG_STM32F7_ADC1_SAMPLE_FREQUENCY, +#endif +#ifdef ADC1_HAVE_DMA + .dmachan = ADC1_DMA_CHAN, + .hasdma = true, +#endif +}; + +static struct adc_dev_s g_adcdev1 = +{ + .ad_ops = &g_adcops, + .ad_priv = &g_adcpriv1, +}; +#endif + +/* ADC2 state */ + +#ifdef CONFIG_STM32F7_ADC2 +static struct stm32_dev_s g_adcpriv2 = +{ + .irq = STM32_IRQ_ADC, + .isr = adc123_interrupt, + .intf = 2, + .base = STM32_ADC2_BASE, +#ifdef ADC2_HAVE_TIMER + .trigger = CONFIG_STM32F7_ADC2_TIMTRIG, + .tbase = ADC2_TIMER_BASE, + .extsel = ADC2_EXTSEL_VALUE, + .pclck = ADC2_TIMER_PCLK_FREQUENCY, + .freq = CONFIG_STM32F7_ADC2_SAMPLE_FREQUENCY, +#endif +#ifdef ADC2_HAVE_DMA + .dmachan = ADC2_DMA_CHAN, + .hasdma = true, +#endif +}; + +static struct adc_dev_s g_adcdev2 = +{ + .ad_ops = &g_adcops, + .ad_priv = &g_adcpriv2, +}; +#endif + +/* ADC3 state */ + +#ifdef CONFIG_STM32F7_ADC3 +static struct stm32_dev_s g_adcpriv3 = +{ + .irq = STM32_IRQ_ADC, + .isr = adc123_interrupt, + .intf = 3, + .base = STM32_ADC3_BASE, +#ifdef ADC3_HAVE_TIMER + .trigger = CONFIG_STM32F7_ADC3_TIMTRIG, + .tbase = ADC3_TIMER_BASE, + .extsel = ADC3_EXTSEL_VALUE, + .pclck = ADC3_TIMER_PCLK_FREQUENCY, + .freq = CONFIG_STM32F7_ADC3_SAMPLE_FREQUENCY, +#endif +#ifdef ADC3_HAVE_DMA + .dmachan = ADC3_DMA_CHAN, + .hasdma = true, +#endif +}; + +static struct adc_dev_s g_adcdev3 = +{ + .ad_ops = &g_adcops, + .ad_priv = &g_adcpriv3, +}; +#endif + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_modifyreg32 + * + * Description: + * Modify the value of a 32-bit register (not atomic). + * + * Input Parameters: + * addr - The address of the register + * clrbits - The bits to clear + * setbits - The bits to set + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void stm32_modifyreg32(unsigned int addr, uint32_t clrbits, + uint32_t setbits) +{ + putreg32((getreg32(addr) & ~clrbits) | setbits, addr); +} + +/**************************************************************************** + * Name: adc_getreg + * + * Description: + * Read the value of an ADC register. + * + * Input Parameters: + * priv - A reference to the ADC block status + * offset - The offset to the register to read + * + * Returned Value: + * The current contents of the specified register + * + ****************************************************************************/ + +static uint32_t adc_getreg(FAR struct stm32_dev_s *priv, int offset) +{ + return getreg32(priv->base + offset); +} + +/**************************************************************************** + * Name: adc_putreg + * + * Description: + * Write a value to an ADC register. + * + * Input Parameters: + * priv - A reference to the ADC block status + * offset - The offset to the register to write to + * value - The value to write to the register + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void adc_putreg(FAR struct stm32_dev_s *priv, int offset, + uint32_t value) +{ + putreg32(value, priv->base + offset); +} + +/**************************************************************************** + * Name: adc_modifyreg + * + * Description: + * Modify the value of an ADC register (not atomic). + * + * Input Parameters: + * priv - A reference to the ADC block status + * offset - The offset to the register to modify + * clrbits - The bits to clear + * setbits - The bits to set + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void adc_modifyreg(FAR struct stm32_dev_s *priv, int offset, + uint32_t clrbits, uint32_t setbits) +{ + adc_putreg(priv, offset, (adc_getreg(priv, offset) & ~clrbits) | setbits); +} + +/**************************************************************************** + * Name: tim_getreg + * + * Description: + * Read the value of an ADC timer register. + * + * Input Parameters: + * priv - A reference to the ADC block status + * offset - The offset to the register to read + * + * Returned Value: + * The current contents of the specified register + * + ****************************************************************************/ + +#ifdef ADC_HAVE_TIMER +static uint16_t tim_getreg(FAR struct stm32_dev_s *priv, int offset) +{ + return getreg16(priv->tbase + offset); +} +#endif + +/**************************************************************************** + * Name: tim_putreg + * + * Description: + * Write a value to an ADC timer register. + * + * Input Parameters: + * priv - A reference to the ADC block status + * offset - The offset to the register to write to + * value - The value to write to the register + * + * Returned Value: + * None + * + ****************************************************************************/ + +#ifdef ADC_HAVE_TIMER +static void tim_putreg(FAR struct stm32_dev_s *priv, int offset, + uint16_t value) +{ + putreg16(value, priv->tbase + offset); +} +#endif + +/**************************************************************************** + * Name: tim_modifyreg + * + * Description: + * Modify the value of an ADC timer register (not atomic). + * + * Input Parameters: + * priv - A reference to the ADC block status + * offset - The offset to the register to modify + * clrbits - The bits to clear + * setbits - The bits to set + * + * Returned Value: + * None + * + ****************************************************************************/ + +#ifdef ADC_HAVE_TIMER +static void tim_modifyreg(FAR struct stm32_dev_s *priv, int offset, + uint16_t clrbits, uint16_t setbits) +{ + tim_putreg(priv, offset, (tim_getreg(priv, offset) & ~clrbits) | setbits); +} +#endif + +/**************************************************************************** + * Name: tim_dumpregs + * + * Description: + * Dump all timer registers. + * + * Input parameters: + * priv - A reference to the ADC block status + * + * Returned Value: + * None + * + ****************************************************************************/ + +#ifdef ADC_HAVE_TIMER +static void tim_dumpregs(FAR struct stm32_dev_s *priv, FAR const char *msg) +{ + ainfo("%s:\n", msg); + ainfo(" CR1: %04x CR2: %04x SMCR: %04x DIER: %04x\n", + tim_getreg(priv, STM32_GTIM_CR1_OFFSET), + tim_getreg(priv, STM32_GTIM_CR2_OFFSET), + tim_getreg(priv, STM32_GTIM_SMCR_OFFSET), + tim_getreg(priv, STM32_GTIM_DIER_OFFSET)); + ainfo(" SR: %04x EGR: 0000 CCMR1: %04x CCMR2: %04x\n", + tim_getreg(priv, STM32_GTIM_SR_OFFSET), + tim_getreg(priv, STM32_GTIM_CCMR1_OFFSET), + tim_getreg(priv, STM32_GTIM_CCMR2_OFFSET)); + ainfo(" CCER: %04x CNT: %04x PSC: %04x ARR: %04x\n", + tim_getreg(priv, STM32_GTIM_CCER_OFFSET), + tim_getreg(priv, STM32_GTIM_CNT_OFFSET), + tim_getreg(priv, STM32_GTIM_PSC_OFFSET), + tim_getreg(priv, STM32_GTIM_ARR_OFFSET)); + ainfo(" CCR1: %04x CCR2: %04x CCR3: %04x CCR4: %04x\n", + tim_getreg(priv, STM32_GTIM_CCR1_OFFSET), + tim_getreg(priv, STM32_GTIM_CCR2_OFFSET), + tim_getreg(priv, STM32_GTIM_CCR3_OFFSET), + tim_getreg(priv, STM32_GTIM_CCR4_OFFSET)); + if (priv->tbase == STM32_TIM1_BASE || priv->tbase == STM32_TIM8_BASE) + { + ainfo(" RCR: %04x BDTR: %04x DCR: %04x DMAR: %04x\n", + tim_getreg(priv, STM32_ATIM_RCR_OFFSET), + tim_getreg(priv, STM32_ATIM_BDTR_OFFSET), + tim_getreg(priv, STM32_ATIM_DCR_OFFSET), + tim_getreg(priv, STM32_ATIM_DMAR_OFFSET)); + } + else + { + ainfo(" DCR: %04x DMAR: %04x\n", + tim_getreg(priv, STM32_GTIM_DCR_OFFSET), + tim_getreg(priv, STM32_GTIM_DMAR_OFFSET)); + } +} +#endif + +/**************************************************************************** + * Name: adc_timstart + * + * Description: + * Start (or stop) the timer counter + * + * Input Parameters: + * priv - A reference to the ADC block status + * enable - True: Start conversion + * + * Returned Value: + * + ****************************************************************************/ + +#ifdef ADC_HAVE_TIMER +static void adc_timstart(FAR struct stm32_dev_s *priv, bool enable) +{ + ainfo("enable: %d\n", enable ? 1 : 0); + + if (enable) + { + /* Start the counter */ + + tim_modifyreg(priv, STM32_GTIM_CR1_OFFSET, 0, GTIM_CR1_CEN); + } + else + { + /* Disable the counter */ + + tim_modifyreg(priv, STM32_GTIM_CR1_OFFSET, GTIM_CR1_CEN, 0); + } +} +#endif + +/**************************************************************************** + * Name: adc_timinit + * + * Description: + * Initialize the timer that drivers the ADC sampling for this channel + * using the pre-calculated timer divider definitions. + * + * Input Parameters: + * priv - A reference to the ADC block status + * + * Returned Value: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +#ifdef ADC_HAVE_TIMER +static int adc_timinit(FAR struct stm32_dev_s *priv) +{ + uint32_t prescaler; + uint32_t reload; + uint32_t timclk; + + uint16_t clrbits = 0; + uint16_t setbits = 0; + uint16_t cr2; + uint16_t ccmr1; + uint16_t ccmr2; + uint16_t ocmode1; + uint16_t ocmode2; + uint16_t ccenable; + uint16_t ccer; + uint16_t egr; + + /* If the timer base address is zero, then this ADC was not configured to + * use a timer. + */ + + if (priv->tbase == 0) + { + return ERROR; + } + + /* EXTSEL selection: These bits select the external event used to trigger + * the start of conversion of a regular group. NOTE: + * + * - The position with of the EXTSEL field varies from one STM32 MCU + * to another. + * - The width of the EXTSEL field varies from one STM32 MCU to another. + * - The value in priv->extsel is already shifted into the correct bit + * position. + */ + + ainfo("Initializing timers extsel = 0x%08x\n", priv->extsel); + + adc_modifyreg(priv, STM32_ADC_EXTREG_OFFSET, + ADC_EXTREG_EXTEN_MASK | ADC_EXTREG_EXTSEL_MASK, + ADC_EXTREG_EXTEN_DEFAULT | priv->extsel); + + /* Configure the timer channel to drive the ADC */ + + /* Caculate optimal values for the timer prescaler and for the timer + * reload register. If freq is the desired frequency, then + * + * reload = timclk / freq + * reload = (pclck / prescaler) / freq + * + * There are many solutions to do this, but the best solution will be the + * one that has the largest reload value and the smallest prescaler value. + * That is the solution that should give us the most accuracy in the timer + * control. Subject to: + * + * 0 <= prescaler <= 65536 + * 1 <= reload <= 65535 + * + * So ( prescaler = pclck / 65535 / freq ) would be optimal. + */ + + prescaler = (priv->pclck / priv->freq + 65534) / 65535; + + /* We need to decrement the prescaler value by one, but only, the value + * does not underflow. + */ + + if (prescaler < 1) + { + awarn("WARNING: Prescaler underflowed.\n"); + prescaler = 1; + } + + /* Check for overflow */ + + else if (prescaler > 65536) + { + awarn("WARNING: Prescaler overflowed.\n"); + prescaler = 65536; + } + + timclk = priv->pclck / prescaler; + + reload = timclk / priv->freq; + if (reload < 1) + { + awarn("WARNING: Reload value underflowed.\n"); + reload = 1; + } + else if (reload > 65535) + { + awarn("WARNING: Reload value overflowed.\n"); + reload = 65535; + } + + /* Disable the timer until we get it configured */ + + adc_timstart(priv, false); + + /* Set up the timer CR1 register. + * + * Select the Counter Mode == count up: + * + * ATIM_CR1_EDGE: The counter counts up or down depending on the + * direction bit(DIR). + * ATIM_CR1_DIR: 0: count up, 1: count down + * + * Set the clock division to zero for all + */ + + clrbits = GTIM_CR1_DIR | GTIM_CR1_CMS_MASK | GTIM_CR1_CKD_MASK; + setbits = GTIM_CR1_EDGE; + tim_modifyreg(priv, STM32_GTIM_CR1_OFFSET, clrbits, setbits); + + /* Set the reload and prescaler values */ + + tim_putreg(priv, STM32_GTIM_PSC_OFFSET, prescaler-1); + tim_putreg(priv, STM32_GTIM_ARR_OFFSET, reload); + + /* Clear the advanced timers repetition counter in TIM1 */ + + if (priv->tbase == STM32_TIM1_BASE || priv->tbase == STM32_TIM8_BASE) + { + tim_putreg(priv, STM32_ATIM_RCR_OFFSET, 0); + tim_putreg(priv, STM32_ATIM_BDTR_OFFSET, ATIM_BDTR_MOE); /* Check me */ + } + + /* TIMx event generation: Bit 0 UG: Update generation */ + + tim_putreg(priv, STM32_GTIM_EGR_OFFSET, GTIM_EGR_UG); + + /* Handle channel specific setup */ + + ocmode1 = 0; + ocmode2 = 0; + + switch (priv->trigger) + { + case 0: /* TimerX CC1 event */ + { + ccenable = ATIM_CCER_CC1E; + ocmode1 = (ATIM_CCMR_CCS_CCOUT << ATIM_CCMR1_CC1S_SHIFT) | + (ATIM_CCMR_MODE_PWM1 << ATIM_CCMR1_OC1M_SHIFT) | + ATIM_CCMR1_OC1PE; + + /* Set the event CC1 */ + + egr = ATIM_EGR_CC1G; + + /* Set the duty cycle by writing to the CCR register for this + * channel + */ + + tim_putreg(priv, STM32_GTIM_CCR1_OFFSET, (uint16_t)(reload >> 1)); + } + break; + + case 1: /* TimerX CC2 event */ + { + ccenable = ATIM_CCER_CC2E; + ocmode1 = (ATIM_CCMR_CCS_CCOUT << ATIM_CCMR1_CC2S_SHIFT) | + (ATIM_CCMR_MODE_PWM1 << ATIM_CCMR1_OC2M_SHIFT) | + ATIM_CCMR1_OC2PE; + + /* Set the event CC2 */ + + egr = ATIM_EGR_CC2G; + + /* Set the duty cycle by writing to the CCR register for this + * channel + */ + + tim_putreg(priv, STM32_GTIM_CCR2_OFFSET, (uint16_t)(reload >> 1)); + } + break; + + case 2: /* TimerX CC3 event */ + { + ccenable = ATIM_CCER_CC3E; + ocmode2 = (ATIM_CCMR_CCS_CCOUT << ATIM_CCMR2_CC3S_SHIFT) | + (ATIM_CCMR_MODE_PWM1 << ATIM_CCMR2_OC3M_SHIFT) | + ATIM_CCMR2_OC3PE; + + /* Set the event CC3 */ + + egr = ATIM_EGR_CC3G; + + /* Set the duty cycle by writing to the CCR register for this + * channel + */ + + tim_putreg(priv, STM32_GTIM_CCR3_OFFSET, (uint16_t)(reload >> 1)); + } + break; + + case 3: /* TimerX CC4 event */ + { + ccenable = ATIM_CCER_CC4E; + ocmode2 = (ATIM_CCMR_CCS_CCOUT << ATIM_CCMR2_CC4S_SHIFT) | + (ATIM_CCMR_MODE_PWM1 << ATIM_CCMR2_OC4M_SHIFT) | + ATIM_CCMR2_OC4PE; + + /* Set the event CC4 */ + + egr = ATIM_EGR_CC4G; + + /* Set the duty cycle by writing to the CCR register for this + * channel + */ + + tim_putreg(priv, STM32_GTIM_CCR4_OFFSET, (uint16_t)(reload >> 1)); + } + break; + + case 4: /* TimerX TRGO event */ + { + /* TODO: TRGO support not yet implemented */ + /* Set the event TRGO */ + + ccenable = 0; + egr = GTIM_EGR_TG; + + /* Set the duty cycle by writing to the CCR register for this + * channel + */ + + tim_putreg(priv, STM32_GTIM_CCR4_OFFSET, (uint16_t)(reload >> 1)); + } + break; + + default: + aerr("ERROR: No such trigger: %d\n", priv->trigger); + return -EINVAL; + } + + /* Disable the Channel by resetting the CCxE Bit in the CCER register */ + + ccer = tim_getreg(priv, STM32_GTIM_CCER_OFFSET); + ccer &= ~ccenable; + tim_putreg(priv, STM32_GTIM_CCER_OFFSET, ccer); + + /* Fetch the CR2, CCMR1, and CCMR2 register (already have ccer) */ + + cr2 = tim_getreg(priv, STM32_GTIM_CR2_OFFSET); + ccmr1 = tim_getreg(priv, STM32_GTIM_CCMR1_OFFSET); + ccmr2 = tim_getreg(priv, STM32_GTIM_CCMR2_OFFSET); + + /* Reset the Output Compare Mode Bits and set the select output compare + * mode + */ + + ccmr1 &= ~(ATIM_CCMR1_CC1S_MASK | ATIM_CCMR1_OC1M_MASK | ATIM_CCMR1_OC1PE | + ATIM_CCMR1_CC2S_MASK | ATIM_CCMR1_OC2M_MASK | ATIM_CCMR1_OC2PE); + ccmr2 &= ~(ATIM_CCMR2_CC3S_MASK | ATIM_CCMR2_OC3M_MASK | ATIM_CCMR2_OC3PE | + ATIM_CCMR2_CC4S_MASK | ATIM_CCMR2_OC4M_MASK | ATIM_CCMR2_OC4PE); + ccmr1 |= ocmode1; + ccmr2 |= ocmode2; + + /* Reset the output polarity level of all channels (selects high + * polarity) + */ + + ccer &= ~(ATIM_CCER_CC1P | ATIM_CCER_CC2P | + ATIM_CCER_CC3P | ATIM_CCER_CC4P); + + /* Enable the output state of the selected channel (only) */ + + ccer &= ~(ATIM_CCER_CC1E | ATIM_CCER_CC2E | + ATIM_CCER_CC3E | ATIM_CCER_CC4E); + ccer |= ccenable; + + if (priv->tbase == STM32_TIM1_BASE || priv->tbase == STM32_TIM8_BASE) + { + /* Reset output N polarity level, output N state, output compare state, + * output compare N idle state. + */ + + ccer &= ~(ATIM_CCER_CC1NE | ATIM_CCER_CC1NP | + ATIM_CCER_CC2NE | ATIM_CCER_CC2NP | + ATIM_CCER_CC3NE | ATIM_CCER_CC3NP | + ATIM_CCER_CC4NP); + + /* Reset the output compare and output compare N IDLE State */ + + cr2 &= ~(ATIM_CR2_OIS1 | ATIM_CR2_OIS1N | + ATIM_CR2_OIS2 | ATIM_CR2_OIS2N | + ATIM_CR2_OIS3 | ATIM_CR2_OIS3N | + ATIM_CR2_OIS4); + } + else + { + ccer &= ~(GTIM_CCER_CC1NP | GTIM_CCER_CC2NP | GTIM_CCER_CC3NP); + } + + /* Save the modified register values */ + + tim_putreg(priv, STM32_GTIM_CR2_OFFSET, cr2); + tim_putreg(priv, STM32_GTIM_CCMR1_OFFSET, ccmr1); + tim_putreg(priv, STM32_GTIM_CCMR2_OFFSET, ccmr2); + tim_putreg(priv, STM32_GTIM_CCER_OFFSET, ccer); + tim_putreg(priv, STM32_GTIM_EGR_OFFSET, egr); + + /* Set the ARR Preload Bit */ + + tim_modifyreg(priv, STM32_GTIM_CR1_OFFSET, 0, GTIM_CR1_ARPE); + + /* Enable the timer counter */ + + adc_timstart(priv, true); + + tim_dumpregs(priv, "After starting timers"); + + return OK; +} +#endif + +/**************************************************************************** + * Name: adc_startconv + * + * Description: + * Start (or stop) the ADC conversion process + * + * Input Parameters: + * priv - A reference to the ADC block status + * enable - True: Start conversion + * + * Returned Value: + * + ****************************************************************************/ + +static void adc_startconv(FAR struct stm32_dev_s *priv, bool enable) +{ + ainfo("enable: %d\n", enable ? 1 : 0); + + if (enable) + { + /* Start the conversion of regular channels */ + + adc_modifyreg(priv, STM32_ADC_CR2_OFFSET, 0, ADC_CR2_SWSTART); + } + else + { + /* Stop the conversion */ + + adc_modifyreg(priv, STM32_ADC_CR2_OFFSET, ADC_CR2_SWSTART, 0); + } +} + +/**************************************************************************** + * Name: adc_rccreset + * + * Description: + * Deinitializes the ADCx peripheral registers to their default + * reset values. It could set all the ADCs configured. + * + * Input Parameters: + * regaddr - The register to read + * reset - Condition, set or reset + * + * Returned Value: + * + ****************************************************************************/ + +static void adc_rccreset(FAR struct stm32_dev_s *priv, bool reset) +{ + uint32_t adcbit; + + /* Pick the appropriate bit in the APB2 reset register. + * For the STM32 F1, there is an individual bit to reset each ADC, + * but for the STM32 F2/F4, there is one common reset for all ADCs. + * THIS will probably cause some problems! + */ + + switch (priv->intf) + { +#ifdef CONFIG_STM32F7_ADC1 + case 1: + adcbit = RCC_RSTR_ADC1RST; + break; +#endif +#ifdef CONFIG_STM32F7_ADC2 + case 2: + adcbit = RCC_RSTR_ADC2RST; + break; +#endif +#ifdef CONFIG_STM32F7_ADC3 + case 3: + adcbit = RCC_RSTR_ADC3RST; + break; +#endif + default: + return; + } + + /* Set or clear the selected bit in the APB2 reset register. + * modifyreg32() disables interrupts. Disabling interrupts is necessary + * because the APB2RTSR register is used by several different drivers. + */ + + if (reset) + { + /* Enable ADC reset state */ + + modifyreg32(STM32_RCC_RSTR, 0, adcbit); + } + else + { + /* Release ADC from reset state */ + + modifyreg32(STM32_RCC_RSTR, adcbit, 0); + } +} + +/**************************************************************************** + * Name: adc_enable + * + * Description : Enables or disables the specified ADC peripheral. + * Also, starts a conversion when the ADC is not + * triggered by timers + * + * Input Parameters: + * + * enable - true: enable ADC conversion + * false: disable ADC conversion + * + * Returned Value: + * + ****************************************************************************/ + +static void adc_enable(FAR struct stm32_dev_s *priv, bool enable) +{ + + ainfo("enable: %d\n", enable ? 1 : 0); + + if (enable) + { + adc_modifyreg(priv, STM32_ADC_CR2_OFFSET, 0, ADC_CR2_ADON); + } + else + { + adc_modifyreg(priv, STM32_ADC_CR2_OFFSET, ADC_CR2_ADON, 0); + } +} + +/**************************************************************************** + * Name: adc_dmacovcallback + * + * Description: + * Callback for DMA. Called from the DMA transfer complete interrupt after + * all channels have been converted and transferred with DMA. + * + * Input Parameters: + * + * handle - handle to DMA + * isr - + * arg - adc device + * + * Returned Value: + * + ****************************************************************************/ + +#ifdef ADC_HAVE_DMA +static void adc_dmaconvcallback(DMA_HANDLE handle, uint8_t isr, FAR void *arg) +{ + FAR struct adc_dev_s *dev = (FAR struct adc_dev_s *)arg; + FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev->ad_priv; + int i; + + /* Verify that the upper-half driver has bound its callback functions */ + + 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; + } + } + } + /* Restart DMA for the next conversion series */ + + adc_modifyreg(priv, STM32_ADC_DMAREG_OFFSET, ADC_DMAREG_DMA, 0); + adc_modifyreg(priv, STM32_ADC_DMAREG_OFFSET, 0, ADC_DMAREG_DMA); +} +#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 + * + * Description: + * Reset the ADC device. Called early to initialize the hardware. This + * is called, before adc_setup() and on error conditions. + * + * Input Parameters: + * + * Returned Value: + * + ****************************************************************************/ + +static void adc_reset(FAR struct adc_dev_s *dev) +{ + FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev->ad_priv; + irqstate_t flags; + uint32_t clrbits; + uint32_t setbits; +#ifdef ADC_HAVE_TIMER + int ret; +#endif + + ainfo("intf: %d\n", priv->intf); + flags = enter_critical_section(); + + /* Enable ADC reset state */ + + adc_rccreset(priv, true); + + /* Release ADC from reset state */ + + adc_rccreset(priv, false); + + /* Initialize the watchdog high threshold register */ + + adc_putreg(priv, STM32_ADC_HTR_OFFSET, 0x00000fff); + + /* Initialize the watchdog low threshold register */ + + adc_putreg(priv, STM32_ADC_LTR_OFFSET, 0x00000000); + + /* Initialize the same sample time for each ADC. + * During sample cycles channel selection bits must remain unchanged. + */ + + adc_putreg(priv, STM32_ADC_SMPR1_OFFSET, ADC_SMPR1_DEFAULT); + adc_putreg(priv, STM32_ADC_SMPR2_OFFSET, ADC_SMPR2_DEFAULT); + + /* Enable the analog watchdog */ + + clrbits = ADC_CR1_AWDCH_MASK; + setbits = ADC_CR1_AWDEN | (priv->chanlist[0] << ADC_CR1_AWDCH_SHIFT); + + /* Set the resolution of the conversion */ + + clrbits |= ADC_CR1_RES_MASK; + setbits |= ADC_CR1_RES_12BIT; + +#ifdef ADC_HAVE_DMA + if (priv->hasdma) + { + setbits |= ADC_CR1_SCAN; + } +#endif + + /* Enable interrupt flags, but disable overrun interrupt */ + + clrbits |= ADC_IER_OVR; + setbits |= ADC_IER_ALLINTS & ~ADC_IER_OVR; + + /* Set CR1 configuration */ + + adc_modifyreg(priv, STM32_ADC_CR1_OFFSET, clrbits, setbits); + + /* Disable continuous mode and set align to right */ + + clrbits = ADC_CR2_CONT | ADC_CR2_ALIGN; + setbits = 0; + + /* Disable external trigger for regular channels */ + + clrbits |= ADC_EXTREG_EXTEN_MASK; + setbits |= ADC_EXTREG_EXTEN_NONE; + +#ifdef ADC_HAVE_DMA + if (priv->hasdma) + { + setbits |= ADC_CR2_DMA; + } +#endif + + /* Set CR2 configuration */ + + adc_modifyreg(priv, STM32_ADC_CR2_OFFSET, clrbits, setbits); + + /* Configuration of the channel conversions */ + + adc_set_ch(dev, 0); + + /* ADC CCR configuration */ + + clrbits = ADC_CCR_ADCPRE_MASK | ADC_CCR_TSVREFE; + setbits = ADC_CCR_ADCPRE_DIV; + + if (adc_internal(priv)) + { + setbits = ADC_CCR_TSVREFE; + } + + clrbits |= ADC_CCR_MULTI_MASK | ADC_CCR_DELAY_MASK | ADC_CCR_DDS | + ADC_CCR_DMA_MASK | ADC_CCR_VBATE; + setbits |= ADC_CCR_MULTI_NONE | ADC_CCR_DMA_DISABLED; + + stm32_modifyreg32(STM32_ADC_CCR, clrbits, setbits); + +#ifdef ADC_HAVE_DMA + + /* Enable DMA */ + + if (priv->hasdma) + { + /* Stop and free DMA if it was started before */ + + if (priv->dma != NULL) + { + stm32_dmastop(priv->dma); + stm32_dmafree(priv->dma); + } + + priv->dma = stm32_dmachannel(priv->dmachan); + + stm32_dmasetup(priv->dma, + priv->base + STM32_ADC_DR_OFFSET, + (uint32_t)priv->dmabuffer, + priv->nchannels, + ADC_DMA_CONTROL_WORD); + + stm32_dmastart(priv->dma, adc_dmaconvcallback, dev, false); + } + +#endif + + /* Set ADON to wake up the ADC from the power down state */ + + adc_enable(priv, true); + +#ifdef ADC_HAVE_TIMER + if (priv->tbase != 0) + { + ret = adc_timinit(priv); + if (ret < 0) + { + aerr("ERROR: adc_timinit failed: %d\n", ret); + } + } +#ifndef CONFIG_ADC_NO_STARTUP_CONV + else +#endif +#endif +#ifndef CONFIG_ADC_NO_STARTUP_CONV + { + adc_startconv(priv, true); + } +#endif + + leave_critical_section(flags); + + ainfo("SR: 0x%08x CR1: 0x%08x CR2: 0x%08x\n", + adc_getreg(priv, STM32_ADC_SR_OFFSET), + adc_getreg(priv, STM32_ADC_CR1_OFFSET), + adc_getreg(priv, STM32_ADC_CR2_OFFSET)); + + ainfo("SQR1: 0x%08x SQR2: 0x%08x SQR3: 0x%08x\n", + adc_getreg(priv, STM32_ADC_SQR1_OFFSET), + adc_getreg(priv, STM32_ADC_SQR2_OFFSET), + adc_getreg(priv, STM32_ADC_SQR3_OFFSET)); + + ainfo("CCR: 0x%08x\n", getreg32(STM32_ADC_CCR)); + +} + +/**************************************************************************** + * 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. + * + * Input Parameters: + * + * Returned Value: + * + ****************************************************************************/ + +static int adc_setup(FAR struct adc_dev_s *dev) +{ + FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev->ad_priv; + int ret; + + /* Attach the ADC interrupt */ + + ret = irq_attach(priv->irq, priv->isr); + if (ret < 0) + { + ainfo("irq_attach failed: %d\n", ret); + return ret; + } + + /* Make sure that the ADC device is in the powered up, reset state */ + + adc_reset(dev); + + /* Enable the ADC interrupt */ + + ainfo("Enable the ADC interrupt: irq=%d\n", priv->irq); + up_enable_irq(priv->irq); + + return ret; +} + +/**************************************************************************** + * 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. + * + * Input Parameters: + * + * Returned Value: + * + ****************************************************************************/ + +static void adc_shutdown(FAR struct adc_dev_s *dev) +{ + FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev->ad_priv; + + adc_enable(priv, false); + + /* Disable ADC interrupts and detach the ADC interrupt handler */ + + up_disable_irq(priv->irq); + irq_detach(priv->irq); + + /* Disable and reset the ADC module */ + + adc_rccreset(priv, true); +} + +/**************************************************************************** + * Name: adc_rxint + * + * Description: + * Call to enable or disable RX interrupts. + * + * Input Parameters: + * + * Returned Value: + * + ****************************************************************************/ + +static void adc_rxint(FAR struct adc_dev_s *dev, bool enable) +{ + FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev->ad_priv; + + ainfo("intf: %d enable: %d\n", priv->intf, enable ? 1 : 0); + + if (enable) + { + /* Enable the end-of-conversion ADC and analog watchdog interrupts */ + + adc_modifyreg(priv, STM32_ADC_IER_OFFSET, 0, ADC_IER_ALLINTS); + } + else + { + /* Disable all ADC interrupts */ + + adc_modifyreg(priv, STM32_ADC_IER_OFFSET, ADC_IER_ALLINTS, 0); + } +} + +/**************************************************************************** + * Name: adc_sqrbits + ****************************************************************************/ + +static uint32_t adc_sqrbits(FAR struct stm32_dev_s *priv, int first, int last, + int offset) +{ + uint32_t bits = 0; + int i; + + for (i = first - 1; + i < priv->nchannels && i < last; + i++, offset += ADC_SQ_OFFSET) + { + bits |= (uint32_t)priv->chanlist[i] << offset; + } + + return bits; +} + +/**************************************************************************** + * Name: adc_internal + ****************************************************************************/ + +static bool adc_internal(FAR struct stm32_dev_s * priv) +{ + int i; + + if (priv->intf == 1) + { + for (i = 0; i < priv->nchannels; i++) + { + if (priv->chanlist[i] > ADC_LAST_EXTERNAL_CHAN) + { + return true; + } + + } + } + + return false; +} + +/**************************************************************************** + * Name: adc_set_ch + * + * Description: + * Sets the ADC channel. + * + * Input Parameters: + * dev - pointer to device structure used by the driver + * ch - ADC channel number + 1. 0 reserved for all configured channels + * + * Returned Value: + * int - errno + * + ****************************************************************************/ + +static int adc_set_ch(FAR struct adc_dev_s *dev, uint8_t ch) +{ + FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev->ad_priv; + uint32_t bits; + int i; + + if (ch == 0) + { + priv->current = 0; + priv->nchannels = priv->cchannels; + } + else + { + for (i = 0; i < priv->cchannels && priv->chanlist[i] != ch - 1; i++); + + if (i >= priv->cchannels) + { + return -ENODEV; + } + + priv->current = i; + priv->nchannels = 1; + } + + bits = adc_sqrbits(priv, ADC_SQR3_FIRST, ADC_SQR3_LAST, ADC_SQR3_SQ_OFFSET); + adc_modifyreg(priv, STM32_ADC_SQR3_OFFSET, ~ADC_SQR3_RESERVED, bits); + + bits = adc_sqrbits(priv, ADC_SQR2_FIRST, ADC_SQR2_LAST, ADC_SQR2_SQ_OFFSET); + adc_modifyreg(priv, STM32_ADC_SQR2_OFFSET, ~ADC_SQR2_RESERVED, bits); + + bits = ((uint32_t)priv->nchannels - 1) << ADC_SQR1_L_SHIFT | + adc_sqrbits(priv, ADC_SQR1_FIRST, ADC_SQR1_LAST, ADC_SQR1_SQ_OFFSET); + adc_modifyreg(priv, STM32_ADC_SQR1_OFFSET, ~ADC_SQR1_RESERVED, bits); + + return OK; +} + +/**************************************************************************** + * Name: adc_ioctl + * + * Description: + * All ioctl calls will be routed through this method. + * + * Input Parameters: + * dev - pointer to device structure used by the driver + * cmd - command + * arg - arguments passed with command + * + * Returned Value: + * + ****************************************************************************/ + +static int adc_ioctl(FAR struct adc_dev_s *dev, int cmd, unsigned long arg) +{ + FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev->ad_priv; + int ret = OK; + + switch (cmd) + { + case ANIOC_TRIGGER: + adc_startconv(priv, true); + break; + + default: + aerr("ERROR: Unknown cmd: %d\n", cmd); + ret = -ENOTTY; + break; + } + + return ret; +} + +/**************************************************************************** + * Name: adc_interrupt + * + * Description: + * Common ADC interrupt handler. + * + * Input Parameters: + * + * Returned Value: + * + ****************************************************************************/ + +static int adc_interrupt(FAR struct adc_dev_s *dev) +{ + FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev->ad_priv; + uint32_t regval; + uint32_t pending; + int32_t data; + + regval = adc_getreg(priv, STM32_ADC_ISR_OFFSET); + pending = regval & ADC_ISR_ALLINTS; + if (pending == 0) + { + return OK; + } + + /* Identifies the interruption AWD, OVR or EOC */ + + if ((regval & ADC_ISR_AWD) != 0) + { + awarn("WARNING: Analog Watchdog, Value converted out of range!\n"); + } + + if ((regval & ADC_ISR_OVR) != 0) + { + awarn("WARNING: Overrun has occurred!\n"); + } + + /* EOC: End of conversion */ + + if ((regval & ADC_ISR_EOC) != 0) + { + /* Read the converted value and clear EOC bit + * (It is cleared by reading the ADC_DR) + */ + + data = adc_getreg(priv, STM32_ADC_DR_OFFSET) & ADC_DR_RDATA_MASK; + + /* Verify that the upper-half driver has bound its callback functions */ + + 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. + */ + + priv->current++; + + if (priv->current >= priv->nchannels) + { + /* Restart the conversion sequence from the beginning */ + + priv->current = 0; + } + } + + regval &= ~pending; + adc_putreg(priv, STM32_ADC_ISR_OFFSET, regval); + return OK; +} + +/**************************************************************************** + * Name: adc123_interrupt + * + * Description: + * ADC1/2/3 interrupt handler + * + * Input Parameters: + * + * Returned Value: + * + ****************************************************************************/ + +static int adc123_interrupt(int irq, FAR void *context) +{ +#ifdef CONFIG_STM32F7_ADC1 + adc_interrupt(&g_adcdev1); +#endif + +#ifdef CONFIG_STM32F7_ADC2 + adc_interrupt(&g_adcdev2); +#endif + +#ifdef CONFIG_STM32F7_ADC3 + adc_interrupt(&g_adcdev3); +#endif + + return OK; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_adc_initialize + * + * Description: + * Initialize the ADC. + * + * The logic is, save nchannels : # of channels (conversions) in ADC_SQR1_L + * Then, take the chanlist array and store it in the SQR Regs, + * chanlist[0] -> ADC_SQR3_SQ1 + * chanlist[1] -> ADC_SQR3_SQ2 + * ... + * chanlist[15]-> ADC_SQR1_SQ16 + * + * up to + * chanlist[nchannels] + * + * Input Parameters: + * intf - Could be {1,2,3} for ADC1, ADC2, or ADC3 + * chanlist - The list of channels + * cchannels - Number of channels + * + * Returned Value: + * Valid ADC device structure reference on succcess; a NULL on failure + * + ****************************************************************************/ + +struct adc_dev_s *stm32_adc_initialize(int intf, FAR const uint8_t *chanlist, + int cchannels) +{ + FAR struct adc_dev_s *dev; + FAR struct stm32_dev_s *priv; + + ainfo("intf: %d cchannels: %d\n", intf, cchannels); + + switch (intf) + { +#ifdef CONFIG_STM32F7_ADC1 + case 1: + ainfo("ADC1 selected\n"); + dev = &g_adcdev1; + break; +#endif +#ifdef CONFIG_STM32F7_ADC2 + case 2: + ainfo("ADC2 selected\n"); + dev = &g_adcdev2; + break; +#endif +#ifdef CONFIG_STM32F7_ADC3 + case 3: + ainfo("ADC3 selected\n"); + dev = &g_adcdev3; + break; +#endif + default: + aerr("ERROR: No ADC interface defined\n"); + return NULL; + } + + /* Configure the selected ADC */ + + priv = (FAR struct stm32_dev_s *)dev->ad_priv; + priv->cb = NULL; + + DEBUGASSERT(cchannels <= ADC_MAX_SAMPLES); + if (cchannels > ADC_MAX_SAMPLES) + { + cchannels = ADC_MAX_SAMPLES; + } + + priv->cchannels = cchannels; + + memcpy(priv->chanlist, chanlist, cchannels); + + return dev; +} + +#endif /* CONFIG_STM32F7_STM32F74XX */ +#endif /* CONFIG_STM32F7_ADC1 || CONFIG_STM32F7_ADC2 || + * CONFIG_STM32F7_ADC3 + */ +#endif /* CONFIG_ADC */ diff --git a/arch/arm/src/stm32f7/stm32_adc.h b/arch/arm/src/stm32f7/stm32_adc.h new file mode 100644 index 0000000000000000000000000000000000000000..f07afe42db427cdc8bf9577af6848c429a27f841 --- /dev/null +++ b/arch/arm/src/stm32f7/stm32_adc.h @@ -0,0 +1,770 @@ +/************************************************************************************ + * arch/arm/src/stm32f7/stm32_adc.h + * + * Copyright (C) 2009, 2011, 2015-2016 Gregory Nutt. All rights reserved. + * Copyright (C) 2015 Omni Hoverboards Inc. All rights reserved. + * Authors: Gregory Nutt + * Paul Alexander Patience + * 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. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32F7_STM32_ADC_H +#define __ARCH_ARM_SRC_STM32F7_STM32_ADC_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include +#include "chip.h" +#include "chip/stm32_adc.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ +/* Configuration ********************************************************************/ + +/* Timer devices may be used for different purposes. One special purpose is to + * control periodic ADC sampling. If CONFIG_STM32F7_TIMn is defined then + * CONFIG_STM32F7_TIMn_ADC must also be defined to indicate that timer "n" is intended + * to be used for that purpose. Timers 1-6 and 8 may be used. + */ + +#ifndef CONFIG_STM32F7_TIM1 +# undef CONFIG_STM32F7_TIM1_ADC +# undef CONFIG_STM32F7_TIM1_ADC1 +# undef CONFIG_STM32F7_TIM1_ADC2 +# undef CONFIG_STM32F7_TIM1_ADC3 +#endif +#ifndef CONFIG_STM32F7_TIM2 +# undef CONFIG_STM32F7_TIM2_ADC +# undef CONFIG_STM32F7_TIM2_ADC1 +# undef CONFIG_STM32F7_TIM2_ADC2 +# undef CONFIG_STM32F7_TIM2_ADC3 +#endif +#ifndef CONFIG_STM32F7_TIM3 +# undef CONFIG_STM32F7_TIM3_ADC +# undef CONFIG_STM32F7_TIM3_ADC1 +# undef CONFIG_STM32F7_TIM3_ADC2 +# undef CONFIG_STM32F7_TIM3_ADC3 +#endif +#ifndef CONFIG_STM32F7_TIM4 +# undef CONFIG_STM32F7_TIM4_ADC +# undef CONFIG_STM32F7_TIM4_ADC1 +# undef CONFIG_STM32F7_TIM4_ADC2 +# undef CONFIG_STM32F7_TIM4_ADC3 +#endif +#ifndef CONFIG_STM32F7_TIM5 +# undef CONFIG_STM32F7_TIM5_ADC +# undef CONFIG_STM32F7_TIM5_ADC1 +# undef CONFIG_STM32F7_TIM5_ADC2 +# undef CONFIG_STM32F7_TIM5_ADC3 +#endif +#ifndef CONFIG_STM32F7_TIM6 +# undef CONFIG_STM32F7_TIM6_ADC +# undef CONFIG_STM32F7_TIM6_ADC1 +# undef CONFIG_STM32F7_TIM6_ADC2 +# undef CONFIG_STM32F7_TIM6_ADC3 +#endif +#ifndef CONFIG_STM32F7_TIM8 +# undef CONFIG_STM32F7_TIM8_ADC +# undef CONFIG_STM32F7_TIM8_ADC1 +# undef CONFIG_STM32F7_TIM8_ADC2 +# undef CONFIG_STM32F7_TIM8_ADC3 +#endif + +/* Up to 3 ADC interfaces are supported */ + +#if STM32F7_NADC < 3 +# undef CONFIG_STM32F7_ADC3 +#endif + +#if STM32F7_NADC < 2 +# undef CONFIG_STM32F7_ADC2 +#endif + +#if STM32F7_NADC < 1 +# undef CONFIG_STM32F7_ADC1 +#endif + +#if defined(CONFIG_STM32F7_ADC1) || defined(CONFIG_STM32F7_ADC2) || \ + defined(CONFIG_STM32F7_ADC3) + +/* DMA support */ + +#undef ADC_HAVE_DMA +#if defined(CONFIG_STM32F7_ADC1_DMA) || defined(CONFIG_STM32F7_ADC2_DMA) || \ + defined(CONFIG_STM32F7_ADC3_DMA) +# define ADC_HAVE_DMA 1 +#endif + +#ifdef CONFIG_STM32F7_ADC1_DMA +# define ADC1_HAVE_DMA 1 +#else +# undef ADC1_HAVE_DMA +#endif + +#ifdef CONFIG_STM32F7_ADC2_DMA +# define ADC2_HAVE_DMA 1 +#else +# undef ADC2_HAVE_DMA +#endif + +#ifdef CONFIG_STM32F7_ADC3_DMA +# define ADC3_HAVE_DMA 1 +#else +# undef ADC3_HAVE_DMA +#endif + +/* Timer configuration: If a timer trigger is specified, then get + * information about the timer. + */ + +#if defined(CONFIG_STM32F7_TIM1_ADC1) +# define ADC1_HAVE_TIMER 1 +# define ADC1_TIMER_BASE STM32_TIM1_BASE +# define ADC1_TIMER_PCLK_FREQUENCY STM32_APB2_TIM1_CLKIN +#elif defined(CONFIG_STM32F7_TIM2_ADC1) +# define ADC1_HAVE_TIMER 1 +# define ADC1_TIMER_BASE STM32_TIM2_BASE +# define ADC1_TIMER_PCLK_FREQUENCY STM32_APB1_TIM2_CLKIN +#elif defined(CONFIG_STM32F7_TIM3_ADC1) +# define ADC1_HAVE_TIMER 1 +# define ADC1_TIMER_BASE STM32_TIM3_BASE +# define ADC1_TIMER_PCLK_FREQUENCY STM32_APB1_TIM3_CLKIN +#elif defined(CONFIG_STM32F7_TIM4_ADC1) +# define ADC1_HAVE_TIMER 1 +# define ADC1_TIMER_BASE STM32_TIM4_BASE +# define ADC1_TIMER_PCLK_FREQUENCY STM32_APB1_TIM4_CLKIN +#elif defined(CONFIG_STM32F7_TIM5_ADC1) +# define ADC1_HAVE_TIMER 1 +# define ADC1_TIMER_BASE STM32_TIM5_BASE +# define ADC1_TIMER_PCLK_FREQUENCY STM32_APB1_TIM5_CLKIN +#elif defined(CONFIG_STM32F7_TIM6_ADC1) +# define ADC1_HAVE_TIMER 1 +# define ADC1_TIMER_BASE STM32_TIM6_BASE +# define ADC1_TIMER_PCLK_FREQUENCY STM32_APB1_TIM6_CLKIN +#elif defined(CONFIG_STM32F7_TIM8_ADC1) +# define ADC1_HAVE_TIMER 1 +# define ADC1_TIMER_BASE STM32_TIM8_BASE +# define ADC1_TIMER_PCLK_FREQUENCY STM32_APB2_TIM8_CLKIN +#else +# undef ADC1_HAVE_TIMER +#endif + +#ifdef ADC1_HAVE_TIMER +# ifndef CONFIG_STM32F7_ADC1_SAMPLE_FREQUENCY +# error "CONFIG_STM32F7_ADC1_SAMPLE_FREQUENCY not defined" +# endif +# ifndef CONFIG_STM32F7_ADC1_TIMTRIG +# error "CONFIG_STM32F7_ADC1_TIMTRIG not defined" +# warning "Values 0:CC1 1:CC2 2:CC3 3:CC4 4:TRGO" +# endif +#endif + +#if defined(CONFIG_STM32F7_TIM1_ADC2) +# define ADC2_HAVE_TIMER 1 +# define ADC2_TIMER_BASE STM32_TIM1_BASE +# define ADC2_TIMER_PCLK_FREQUENCY STM32_APB2_TIM1_CLKIN +#elif defined(CONFIG_STM32F7_TIM2_ADC2) +# define ADC2_HAVE_TIMER 1 +# define ADC2_TIMER_BASE STM32_TIM2_BASE +# define ADC2_TIMER_PCLK_FREQUENCY STM32_APB1_TIM2_CLKIN +#elif defined(CONFIG_STM32F7_TIM3_ADC2) +# define ADC2_HAVE_TIMER 1 +# define ADC2_TIMER_BASE STM32_TIM3_BASE +# define ADC2_TIMER_PCLK_FREQUENCY STM32_APB1_TIM3_CLKIN +#elif defined(CONFIG_STM32F7_TIM4_ADC2) +# define ADC2_HAVE_TIMER 1 +# define ADC2_TIMER_BASE STM32_TIM4_BASE +# define ADC2_TIMER_PCLK_FREQUENCY STM32_APB1_TIM4_CLKIN +#elif defined(CONFIG_STM32F7_TIM5_ADC2) +# define ADC2_HAVE_TIMER 1 +# define ADC2_TIMER_BASE STM32_TIM5_BASE +# define ADC2_TIMER_PCLK_FREQUENCY STM32_APB1_TIM5_CLKIN +#elif defined(CONFIG_STM32F7_TIM6_ADC2) +# define ADC2_HAVE_TIMER 1 +# define ADC2_TIMER_BASE STM32_TIM6_BASE +# define ADC2_TIMER_PCLK_FREQUENCY STM32_APB1_TIM6_CLKIN +#elif defined(CONFIG_STM32F7_TIM8_ADC2) +# define ADC2_HAVE_TIMER 1 +# define ADC2_TIMER_BASE STM32_TIM8_BASE +# define ADC2_TIMER_PCLK_FREQUENCY STM32_APB2_TIM8_CLKIN +#else +# undef ADC2_HAVE_TIMER +#endif + +#ifdef ADC2_HAVE_TIMER +# ifndef CONFIG_STM32F7_ADC2_SAMPLE_FREQUENCY +# error "CONFIG_STM32F7_ADC2_SAMPLE_FREQUENCY not defined" +# endif +# ifndef CONFIG_STM32F7_ADC2_TIMTRIG +# error "CONFIG_STM32F7_ADC2_TIMTRIG not defined" +# warning "Values 0:CC1 1:CC2 2:CC3 3:CC4 4:TRGO" +# endif +#endif + +#if defined(CONFIG_STM32F7_TIM1_ADC3) +# define ADC3_HAVE_TIMER 1 +# define ADC3_TIMER_BASE STM32_TIM1_BASE +# define ADC3_TIMER_PCLK_FREQUENCY STM32_APB2_TIM1_CLKIN +#elif defined(CONFIG_STM32F7_TIM2_ADC3) +# define ADC3_HAVE_TIMER 1 +# define ADC3_TIMER_BASE STM32_TIM2_BASE +# define ADC3_TIMER_PCLK_FREQUENCY STM32_APB1_TIM2_CLKIN +#elif defined(CONFIG_STM32F7_TIM3_ADC3) +# define ADC3_HAVE_TIMER 1 +# define ADC3_TIMER_BASE STM32_TIM3_BASE +# define ADC3_TIMER_PCLK_FREQUENCY STM32_APB1_TIM3_CLKIN +#elif defined(CONFIG_STM32F7_TIM4_ADC3) +# define ADC3_HAVE_TIMER 1 +# define ADC3_TIMER_BASE STM32_TIM4_BASE +# define ADC3_TIMER_PCLK_FREQUENCY STM32_APB1_TIM4_CLKIN +#elif defined(CONFIG_STM32F7_TIM5_ADC3) +# define ADC3_HAVE_TIMER 1 +# define ADC3_TIMER_BASE STM32_TIM5_BASE +# define ADC3_TIMER_PCLK_FREQUENCY STM32_APB1_TIM5_CLKIN +#elif defined(CONFIG_STM32F7_TIM6_ADC3) +# define ADC3_HAVE_TIMER 1 +# define ADC3_TIMER_BASE STM32_TIM6_BASE +# define ADC3_TIMER_PCLK_FREQUENCY STM32_APB1_TIM6_CLKIN +#elif defined(CONFIG_STM32F7_TIM8_ADC3) +# define ADC3_HAVE_TIMER 1 +# define ADC3_TIMER_BASE STM32_TIM8_BASE +# define ADC3_TIMER_PCLK_FREQUENCY STM32_APB2_TIM8_CLKIN +#else +# undef ADC3_HAVE_TIMER +#endif + +#ifdef ADC3_HAVE_TIMER +# ifndef CONFIG_STM32F7_ADC3_SAMPLE_FREQUENCY +# error "CONFIG_STM32F7_ADC3_SAMPLE_FREQUENCY not defined" +# endif +# ifndef CONFIG_STM32F7_ADC3_TIMTRIG +# error "CONFIG_STM32F7_ADC3_TIMTRIG not defined" +# warning "Values 0:CC1 1:CC2 2:CC3 3:CC4 4:TRGO" +# endif +#endif + +#if defined(ADC1_HAVE_TIMER) || defined(ADC2_HAVE_TIMER) || \ + defined(ADC3_HAVE_TIMER) +# define ADC_HAVE_TIMER 1 +#else +# undef ADC_HAVE_TIMER +#endif + +/* NOTE: The following assumes that all possible combinations of timers and + * values are support EXTSEL. That is not so and it varies from one STM32 + * to another. But this (wrong) assumptions keeps the logic as simple as + * possible. If unsupported combination is used, an error will show up + * later during compilation although it may be difficult to track it back + * to this simplification. + * + */ + +#define ADC1_EXTSEL_T1CC1 ADC_CR2_EXTSEL_T1CC1 +#define ADC1_EXTSEL_T1CC2 ADC_CR2_EXTSEL_T1CC2 +#define ADC1_EXTSEL_T1CC3 ADC_CR2_EXTSEL_T1CC3 +#define ADC1_EXTSEL_T1CC4 ADC_CR2_EXTSEL_T1CC4 +#define ADC1_EXTSEL_T1TRGO ADC_CR2_EXTSEL_T1TRGO +#define ADC1_EXTSEL_T1TRGO2 ADC_CR2_EXTSEL_T1TRGO2 +#define ADC2_EXTSEL_T1CC1 ADC_CR2_EXTSEL_T1CC1 +#define ADC2_EXTSEL_T1CC2 ADC_CR2_EXTSEL_T1CC2 +#define ADC2_EXTSEL_T1CC3 ADC_CR2_EXTSEL_T1CC3 +#define ADC2_EXTSEL_T1CC4 ADC_CR2_EXTSEL_T1CC4 +#define ADC2_EXTSEL_T1TRGO ADC_CR2_EXTSEL_T1TRGO +#define ADC2_EXTSEL_T1TRGO2 ADC_CR2_EXTSEL_T1TRGO2 +#define ADC3_EXTSEL_T1CC1 ADC_CR2_EXTSEL_T1CC1 +#define ADC3_EXTSEL_T1CC2 ADC_CR2_EXTSEL_T1CC2 +#define ADC3_EXTSEL_T1CC3 ADC_CR2_EXTSEL_T1CC3 +#define ADC3_EXTSEL_T1CC4 ADC_CR2_EXTSEL_T1CC4 +#define ADC3_EXTSEL_T1TRGO ADC_CR2_EXTSEL_T1TRGO +#define ADC3_EXTSEL_T1TRGO2 ADC_CR2_EXTSEL_T1TRGO2 + +#define ADC1_EXTSEL_T2CC1 ADC_CR2_EXTSEL_T2CC1 +#define ADC1_EXTSEL_T2CC2 ADC_CR2_EXTSEL_T2CC2 +#define ADC1_EXTSEL_T2CC3 ADC_CR2_EXTSEL_T2CC3 +#define ADC1_EXTSEL_T2CC4 ADC_CR2_EXTSEL_T2CC4 +#define ADC1_EXTSEL_T2TRGO ADC_CR2_EXTSEL_T2TRGO +#define ADC2_EXTSEL_T2CC1 ADC_CR2_EXTSEL_T2CC1 +#define ADC2_EXTSEL_T2CC2 ADC_CR2_EXTSEL_T2CC2 +#define ADC2_EXTSEL_T2CC3 ADC_CR2_EXTSEL_T2CC3 +#define ADC2_EXTSEL_T2CC4 ADC_CR2_EXTSEL_T2CC4 +#define ADC2_EXTSEL_T2TRGO ADC_CR2_EXTSEL_T2TRGO +#define ADC3_EXTSEL_T2CC1 ADC_CR2_EXTSEL_T2CC1 +#define ADC3_EXTSEL_T2CC2 ADC_CR2_EXTSEL_T2CC2 +#define ADC3_EXTSEL_T2CC3 ADC_CR2_EXTSEL_T2CC3 +#define ADC3_EXTSEL_T2CC4 ADC_CR2_EXTSEL_T2CC4 +#define ADC3_EXTSEL_T2TRGO ADC_CR2_EXTSEL_T2TRGO + +#define ADC1_EXTSEL_T3CC1 ADC_CR2_EXTSEL_T3CC1 +#define ADC1_EXTSEL_T3CC2 ADC_CR2_EXTSEL_T3CC2 +#define ADC1_EXTSEL_T3CC3 ADC_CR2_EXTSEL_T3CC3 +#define ADC1_EXTSEL_T3CC4 ADC_CR2_EXTSEL_T3CC4 +#define ADC1_EXTSEL_T3TRGO ADC_CR2_EXTSEL_T3TRGO +#define ADC2_EXTSEL_T3CC1 ADC_CR2_EXTSEL_T3CC1 +#define ADC2_EXTSEL_T3CC2 ADC_CR2_EXTSEL_T3CC2 +#define ADC2_EXTSEL_T3CC3 ADC_CR2_EXTSEL_T3CC3 +#define ADC2_EXTSEL_T3CC4 ADC_CR2_EXTSEL_T3CC4 +#define ADC2_EXTSEL_T3TRGO ADC_CR2_EXTSEL_T3TRGO +#define ADC3_EXTSEL_T3CC1 ADC_CR2_EXTSEL_T3CC1 +#define ADC3_EXTSEL_T3CC2 ADC_CR2_EXTSEL_T3CC2 +#define ADC3_EXTSEL_T3CC3 ADC_CR2_EXTSEL_T3CC3 +#define ADC3_EXTSEL_T3CC4 ADC_CR2_EXTSEL_T3CC4 +#define ADC3_EXTSEL_T3TRGO ADC_CR2_EXTSEL_T3TRGO + +#define ADC1_EXTSEL_T4CC1 ADC_CR2_EXTSEL_T4CC1 +#define ADC1_EXTSEL_T4CC2 ADC_CR2_EXTSEL_T4CC2 +#define ADC1_EXTSEL_T4CC3 ADC_CR2_EXTSEL_T4CC3 +#define ADC1_EXTSEL_T4CC4 ADC_CR2_EXTSEL_T4CC4 +#define ADC1_EXTSEL_T4TRGO ADC_CR2_EXTSEL_T4TRGO +#define ADC2_EXTSEL_T4CC1 ADC_CR2_EXTSEL_T4CC1 +#define ADC2_EXTSEL_T4CC2 ADC_CR2_EXTSEL_T4CC2 +#define ADC2_EXTSEL_T4CC3 ADC_CR2_EXTSEL_T4CC3 +#define ADC2_EXTSEL_T4CC4 ADC_CR2_EXTSEL_T4CC4 +#define ADC2_EXTSEL_T4TRGO ADC_CR2_EXTSEL_T4TRGO +#define ADC3_EXTSEL_T4CC1 ADC_CR2_EXTSEL_T4CC1 +#define ADC3_EXTSEL_T4CC2 ADC_CR2_EXTSEL_T4CC2 +#define ADC3_EXTSEL_T4CC3 ADC_CR2_EXTSEL_T4CC3 +#define ADC3_EXTSEL_T4CC4 ADC_CR2_EXTSEL_T4CC4 +#define ADC3_EXTSEL_T4TRGO ADC_CR2_EXTSEL_T4TRGO + +#define ADC1_EXTSEL_T5CC1 ADC_CR2_EXTSEL_T5CC1 +#define ADC1_EXTSEL_T5CC2 ADC_CR2_EXTSEL_T5CC2 +#define ADC1_EXTSEL_T5CC3 ADC_CR2_EXTSEL_T5CC3 +#define ADC1_EXTSEL_T5CC4 ADC_CR2_EXTSEL_T5CC4 +#define ADC1_EXTSEL_T5TRGO ADC_CR2_EXTSEL_T5TRGO +#define ADC2_EXTSEL_T5CC1 ADC_CR2_EXTSEL_T5CC1 +#define ADC2_EXTSEL_T5CC2 ADC_CR2_EXTSEL_T5CC2 +#define ADC2_EXTSEL_T5CC3 ADC_CR2_EXTSEL_T5CC3 +#define ADC2_EXTSEL_T5CC4 ADC_CR2_EXTSEL_T5CC4 +#define ADC2_EXTSEL_T5TRGO ADC_CR2_EXTSEL_T5TRGO +#define ADC3_EXTSEL_T5CC1 ADC_CR2_EXTSEL_T5CC1 +#define ADC3_EXTSEL_T5CC2 ADC_CR2_EXTSEL_T5CC2 +#define ADC3_EXTSEL_T5CC3 ADC_CR2_EXTSEL_T5CC3 +#define ADC3_EXTSEL_T5CC4 ADC_CR2_EXTSEL_T5CC4 +#define ADC3_EXTSEL_T5TRGO ADC_CR2_EXTSEL_T5TRGO + +#define ADC1_EXTSEL_T6CC1 ADC_CR2_EXTSEL_T6CC1 +#define ADC1_EXTSEL_T6CC2 ADC_CR2_EXTSEL_T6CC2 +#define ADC1_EXTSEL_T6CC3 ADC_CR2_EXTSEL_T6CC3 +#define ADC1_EXTSEL_T6CC4 ADC_CR2_EXTSEL_T6CC4 +#define ADC1_EXTSEL_T6TRGO ADC_CR2_EXTSEL_T6TRGO +#define ADC2_EXTSEL_T6CC1 ADC_CR2_EXTSEL_T6CC1 +#define ADC2_EXTSEL_T6CC2 ADC_CR2_EXTSEL_T6CC2 +#define ADC2_EXTSEL_T6CC3 ADC_CR2_EXTSEL_T6CC3 +#define ADC2_EXTSEL_T6CC4 ADC_CR2_EXTSEL_T6CC4 +#define ADC2_EXTSEL_T6TRGO ADC_CR2_EXTSEL_T6TRGO +#define ADC3_EXTSEL_T6CC1 ADC_CR2_EXTSEL_T6CC1 +#define ADC3_EXTSEL_T6CC2 ADC_CR2_EXTSEL_T6CC2 +#define ADC3_EXTSEL_T6CC3 ADC_CR2_EXTSEL_T6CC3 +#define ADC3_EXTSEL_T6CC4 ADC_CR2_EXTSEL_T6CC4 +#define ADC3_EXTSEL_T6TRGO ADC_CR2_EXTSEL_T6TRGO + +#define ADC1_EXTSEL_T8CC1 ADC_CR2_EXTSEL_T8CC1 +#define ADC1_EXTSEL_T8CC2 ADC_CR2_EXTSEL_T8CC2 +#define ADC1_EXTSEL_T8CC3 ADC_CR2_EXTSEL_T8CC3 +#define ADC1_EXTSEL_T8CC4 ADC_CR2_EXTSEL_T8CC4 +#define ADC1_EXTSEL_T8TRGO ADC_CR2_EXTSEL_T8TRGO +#define ADC1_EXTSEL_T8TRGO2 ADC_CR2_EXTSEL_T8TRGO2 +#define ADC2_EXTSEL_T8CC1 ADC_CR2_EXTSEL_T8CC1 +#define ADC2_EXTSEL_T8CC2 ADC_CR2_EXTSEL_T8CC2 +#define ADC2_EXTSEL_T8CC3 ADC_CR2_EXTSEL_T8CC3 +#define ADC2_EXTSEL_T8CC4 ADC_CR2_EXTSEL_T8CC4 +#define ADC2_EXTSEL_T8TRGO ADC_CR2_EXTSEL_T8TRGO +#define ADC2_EXTSEL_T8TRGO2 ADC_CR2_EXTSEL_T8TRGO2 +#define ADC3_EXTSEL_T8CC1 ADC_CR2_EXTSEL_T8CC1 +#define ADC3_EXTSEL_T8CC2 ADC_CR2_EXTSEL_T8CC2 +#define ADC3_EXTSEL_T8CC3 ADC_CR2_EXTSEL_T8CC3 +#define ADC3_EXTSEL_T8CC4 ADC_CR2_EXTSEL_T8CC4 +#define ADC3_EXTSEL_T8TRGO ADC_CR2_EXTSEL_T8TRGO +#define ADC3_EXTSEL_T8TRGO2 ADC_CR2_EXTSEL_T8TRGO2 + +#if defined(CONFIG_STM32F7_TIM1_ADC1) +# if CONFIG_STM32F7_ADC1_TIMTRIG == 0 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T1CC1 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 1 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T1CC2 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 2 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T1CC3 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 3 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T1CC4 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 4 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T1TRGO +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 5 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T1TRGO2 +# else +# error "CONFIG_STM32F7_ADC1_TIMTRIG is out of range" +# endif +#elif defined(CONFIG_STM32F7_TIM2_ADC1) +# if CONFIG_STM32F7_ADC1_TIMTRIG == 0 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T2CC1 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 1 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T2CC2 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 2 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T2CC3 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 3 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T2CC4 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 4 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T2TRGO +# else +# error "CONFIG_STM32F7_ADC1_TIMTRIG is out of range" +# endif +#elif defined(CONFIG_STM32F7_TIM3_ADC1) +# if CONFIG_STM32F7_ADC1_TIMTRIG == 0 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T3CC1 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 1 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T3CC2 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 2 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T3CC3 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 3 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T3CC4 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 4 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T3TRGO +# else +# error "CONFIG_STM32F7_ADC1_TIMTRIG is out of range" +# endif +#elif defined(CONFIG_STM32F7_TIM4_ADC1) +# if CONFIG_STM32F7_ADC1_TIMTRIG == 0 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T4CC1 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 1 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T4CC2 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 2 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T4CC3 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 3 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T4CC4 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 4 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T4TRGO +# else +# error "CONFIG_STM32F7_ADC1_TIMTRIG is out of range" +# endif +#elif defined(CONFIG_STM32F7_TIM5_ADC1) +# if CONFIG_STM32F7_ADC1_TIMTRIG == 0 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T5CC1 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 1 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T5CC2 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 2 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T5CC3 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 3 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T5CC4 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 4 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T5TRGO +# else +# error "CONFIG_STM32F7_ADC1_TIMTRIG is out of range" +# endif +#elif defined(CONFIG_STM32F7_TIM6_ADC1) +# if CONFIG_STM32F7_ADC1_TIMTRIG == 0 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T6CC1 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 1 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T6CC2 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 2 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T6CC3 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 3 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T6CC4 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 4 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T6TRGO +# else +# error "CONFIG_STM32F7_ADC1_TIMTRIG is out of range" +# endif +#elif defined(CONFIG_STM32F7_TIM8_ADC1) +# if CONFIG_STM32F7_ADC1_TIMTRIG == 0 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T8CC1 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 1 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T8CC2 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 2 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T8CC3 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 3 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T8CC4 +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 4 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T8TRGO +# elif CONFIG_STM32F7_ADC1_TIMTRIG == 5 +# define ADC1_EXTSEL_VALUE ADC1_EXTSEL_T8TRGO2 +# else +# error "CONFIG_STM32F7_ADC1_TIMTRIG is out of range" +# endif +#endif + +#if defined(CONFIG_STM32F7_TIM1_ADC2) +# if CONFIG_STM32F7_ADC2_TIMTRIG == 0 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T1CC1 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 1 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T1CC2 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 2 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T1CC3 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 3 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T1CC4 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 4 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T1TRGO +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 5 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T1TRGO2 +# else +# error "CONFIG_STM32F7_ADC2_TIMTRIG is out of range" +# endif +#elif defined(CONFIG_STM32F7_TIM2_ADC2) +# if CONFIG_STM32F7_ADC2_TIMTRIG == 0 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T2CC1 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 1 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T2CC2 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 2 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T2CC3 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 3 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T2CC4 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 4 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T2TRGO +# else +# error "CONFIG_STM32F7_ADC2_TIMTRIG is out of range" +# endif +#elif defined(CONFIG_STM32F7_TIM3_ADC2) +# if CONFIG_STM32F7_ADC2_TIMTRIG == 0 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T3CC1 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 1 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T3CC2 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 2 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T3CC3 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 3 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T3CC4 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 4 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T3TRGO +# else +# error "CONFIG_STM32F7_ADC2_TIMTRIG is out of range" +# endif +#elif defined(CONFIG_STM32F7_TIM4_ADC2) +# if CONFIG_STM32F7_ADC2_TIMTRIG == 0 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T4CC1 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 1 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T4CC2 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 2 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T4CC3 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 3 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T4CC4 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 4 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T4TRGO +# else +# error "CONFIG_STM32F7_ADC2_TIMTRIG is out of range" +# endif +#elif defined(CONFIG_STM32F7_TIM5_ADC2) +# if CONFIG_STM32F7_ADC2_TIMTRIG == 0 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T5CC1 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 1 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T5CC2 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 2 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T5CC3 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 3 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T5CC4 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 4 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T5TRGO +# else +# error "CONFIG_STM32F7_ADC2_TIMTRIG is out of range" +# endif +#elif defined(CONFIG_STM32F7_TIM6_ADC2) +# if CONFIG_STM32F7_ADC2_TIMTRIG == 0 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T6CC1 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 1 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T6CC2 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 2 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T6CC3 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 3 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T6CC4 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 4 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T6TRGO +# else +# error "CONFIG_STM32F7_ADC2_TIMTRIG is out of range" +# endif +#elif defined(CONFIG_STM32F7_TIM8_ADC2) +# if CONFIG_STM32F7_ADC2_TIMTRIG == 0 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T8CC1 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 1 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T8CC2 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 2 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T8CC3 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 3 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T8CC4 +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 4 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T8TRGO +# elif CONFIG_STM32F7_ADC2_TIMTRIG == 5 +# define ADC2_EXTSEL_VALUE ADC2_EXTSEL_T8TRGO2 +# else +# error "CONFIG_STM32F7_ADC2_TIMTRIG is out of range" +# endif +#endif + +#if defined(CONFIG_STM32F7_TIM1_ADC3) +# if CONFIG_STM32F7_ADC3_TIMTRIG == 0 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T1CC1 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 1 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T1CC2 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 2 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T1CC3 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 3 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T1CC4 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 4 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T1TRGO +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 5 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T1TRGO2 +# else +# error "CONFIG_STM32F7_ADC3_TIMTRIG is out of range" +# endif +#elif defined(CONFIG_STM32F7_TIM2_ADC3) +# if CONFIG_STM32F7_ADC3_TIMTRIG == 0 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T2CC1 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 1 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T2CC2 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 2 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T2CC3 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 3 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T2CC4 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 4 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T2TRGO +# else +# error "CONFIG_STM32F7_ADC3_TIMTRIG is out of range" +# endif +#elif defined(CONFIG_STM32F7_TIM3_ADC3) +# if CONFIG_STM32F7_ADC3_TIMTRIG == 0 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T3CC1 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 1 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T3CC2 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 2 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T3CC3 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 3 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T3CC4 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 4 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T3TRGO +# else +# error "CONFIG_STM32F7_ADC3_TIMTRIG is out of range" +# endif +#elif defined(CONFIG_STM32F7_TIM4_ADC3) +# if CONFIG_STM32F7_ADC3_TIMTRIG == 0 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T4CC1 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 1 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T4CC2 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 2 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T4CC3 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 3 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T4CC4 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 4 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T4TRGO +# else +# error "CONFIG_STM32F7_ADC3_TIMTRIG is out of range" +# endif +#elif defined(CONFIG_STM32F7_TIM5_ADC3) +# if CONFIG_STM32F7_ADC3_TIMTRIG == 0 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T5CC1 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 1 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T5CC2 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 2 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T5CC3 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 3 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T5CC4 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 4 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T5TRGO +# else +# error "CONFIG_STM32F7_ADC3_TIMTRIG is out of range" +# endif +#elif defined(CONFIG_STM32F7_TIM6_ADC3) +# if CONFIG_STM32F7_ADC3_TIMTRIG == 0 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T6CC1 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 1 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T6CC2 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 2 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T6CC3 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 3 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T6CC4 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 4 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T6TRGO +# else +# error "CONFIG_STM32F7_ADC3_TIMTRIG is out of range" +# endif +#elif defined(CONFIG_STM32F7_TIM8_ADC3) +# if CONFIG_STM32F7_ADC3_TIMTRIG == 0 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T8CC1 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 1 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T8CC2 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 2 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T8CC3 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 3 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T8CC4 +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 4 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T8TRGO +# elif CONFIG_STM32F7_ADC3_TIMTRIG == 5 +# define ADC3_EXTSEL_VALUE ADC3_EXTSEL_T8TRGO2 +# else +# error "CONFIG_STM32F7_ADC3_TIMTRIG is out of range" +# endif +#endif + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Function Prototypes + ************************************************************************************/ + +#ifndef __ASSEMBLY__ +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Name: stm32_adc_initialiize + * + * Description: + * Initialize the ADC. + * + * Input Parameters: + * intf - Could be {1,2,3} for ADC1, ADC2, or ADC3 + * chanlist - The list of channels + * nchannels - Number of channels + * + * Returned Value: + * Valid can device structure reference on succcess; a NULL on failure + * + ****************************************************************************/ + +struct adc_dev_s; +struct adc_dev_s *stm32_adc_initialize(int intf, + FAR const uint8_t *chanlist, + int nchannels); +#undef EXTERN +#ifdef __cplusplus +} +#endif +#endif /* __ASSEMBLY__ */ + +#endif /* CONFIG_STM32F7_ADC1 || CONFIG_STM32F7_ADC2 || + * CONFIG_STM32F7_ADC3 + */ +#endif /* __ARCH_ARM_SRC_STM32F7_STM32_ADC_H */ diff --git a/arch/arm/src/stm32f7/stm32_allocateheap.c b/arch/arm/src/stm32f7/stm32_allocateheap.c index 919890b83343e00298d30f92735610845e72348d..541e0654b1fd42c68d1f67139b3334157ab78e88 100644 --- a/arch/arm/src/stm32f7/stm32_allocateheap.c +++ b/arch/arm/src/stm32f7/stm32_allocateheap.c @@ -167,7 +167,7 @@ * ****************************************************************************/ -#ifdef CONFIG_DEBUG_HEAP +#ifdef CONFIG_HEAP_COLORATION static inline void up_heap_color(FAR void *start, size_t size) { memset(start, HEAP_COLOR, size); diff --git a/arch/arm/src/stm32f7/stm32_dma.c b/arch/arm/src/stm32f7/stm32_dma.c index ff904c1d6b0100a3d980e00a5fd32ba70fc046bf..7b03377bcccdfc02d705472da1848db21d385088 100644 --- a/arch/arm/src/stm32f7/stm32_dma.c +++ b/arch/arm/src/stm32f7/stm32_dma.c @@ -59,7 +59,8 @@ * families */ -#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) +#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) \ + || defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) /**************************************************************************** * Pre-processor Definitions @@ -605,8 +606,8 @@ void stm32_dmasetup(DMA_HANDLE handle, uint32_t paddr, uint32_t maddr, uint32_t regoffset; uint32_t regval; - dmadbg("paddr: %08x maddr: %08x ntransfers: %d scr: %08x\n", - paddr, maddr, ntransfers, scr); + dmainfo("paddr: %08x maddr: %08x ntransfers: %d scr: %08x\n", + paddr, maddr, ntransfers, scr); #ifdef CONFIG_STM32_DMACAPABLE DEBUGASSERT(stm32_dmacapable(maddr, ntransfers, scr)); @@ -870,7 +871,7 @@ bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr) uint32_t transfer_size, burst_length; uint32_t mend; - dmavdbg("stm32_dmacapable: 0x%08x/%u 0x%08x\n", maddr, count, ccr); + dmainfo("stm32_dmacapable: 0x%08x/%u 0x%08x\n", maddr, count, ccr); /* Verify that the address conforms to the memory transfer size. * Transfers to/from memory performed by the DMA controller are @@ -900,13 +901,13 @@ bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr) break; default: - dmavdbg("stm32_dmacapable: bad transfer size in CCR\n"); + dmainfo("stm32_dmacapable: bad transfer size in CCR\n"); return false; } if ((maddr & (transfer_size - 1)) != 0) { - dmavdbg("stm32_dmacapable: transfer unaligned\n"); + dmainfo("stm32_dmacapable: transfer unaligned\n"); return false; } @@ -938,13 +939,13 @@ bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr) break; default: - dmavdbg("stm32_dmacapable: bad burst size in CCR\n"); + dmainfo("stm32_dmacapable: bad burst size in CCR\n"); return false; } if ((maddr & (burst_length - 1)) != 0) { - dmavdbg("stm32_dmacapable: burst crosses 1KiB\n"); + dmainfo("stm32_dmacapable: burst crosses 1KiB\n"); return false; } } @@ -953,7 +954,7 @@ bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr) if ((maddr & STM32_REGION_MASK) != (mend & STM32_REGION_MASK)) { - dmavdbg("stm32_dmacapable: transfer crosses memory region\n"); + dmainfo("stm32_dmacapable: transfer crosses memory region\n"); return false; } @@ -974,7 +975,7 @@ bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr) if (maddr >= STM32_CCMRAM_BASE && (maddr - STM32_CCMRAM_BASE) < 65536) { - dmavdbg("stm32_dmacapable: transfer targets CCMRAM\n"); + dmainfo("stm32_dmacapable: transfer targets CCMRAM\n"); return false; } break; @@ -982,11 +983,11 @@ bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr) default: /* Everything else is unsupported by DMA */ - dmavdbg("stm32_dmacapable: transfer targets unknown/unsupported region\n"); + dmainfo("stm32_dmacapable: transfer targets unknown/unsupported region\n"); return false; } - dmavdbg("stm32_dmacapable: transfer OK\n"); + dmainfo("stm32_dmacapable: transfer OK\n"); return true; } #endif @@ -1032,22 +1033,22 @@ void stm32_dmasample(DMA_HANDLE handle, struct stm32_dmaregs_s *regs) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void stm32_dmadump(DMA_HANDLE handle, const struct stm32_dmaregs_s *regs, const char *msg) { struct stm32_dma_s *dmast = (struct stm32_dma_s *)handle; uint32_t dmabase = DMA_BASE(dmast->base); - dmadbg("DMA Registers: %s\n", msg); - dmadbg(" LISR[%08x]: %08x\n", dmabase + STM32_DMA_LISR_OFFSET, regs->lisr); - dmadbg(" HISR[%08x]: %08x\n", dmabase + STM32_DMA_HISR_OFFSET, regs->hisr); - dmadbg(" SCR[%08x]: %08x\n", dmast->base + STM32_DMA_SCR_OFFSET, regs->scr); - dmadbg(" SNDTR[%08x]: %08x\n", dmast->base + STM32_DMA_SNDTR_OFFSET, regs->sndtr); - dmadbg(" SPAR[%08x]: %08x\n", dmast->base + STM32_DMA_SPAR_OFFSET, regs->spar); - dmadbg(" SM0AR[%08x]: %08x\n", dmast->base + STM32_DMA_SM0AR_OFFSET, regs->sm0ar); - dmadbg(" SM1AR[%08x]: %08x\n", dmast->base + STM32_DMA_SM1AR_OFFSET, regs->sm1ar); - dmadbg(" SFCR[%08x]: %08x\n", dmast->base + STM32_DMA_SFCR_OFFSET, regs->sfcr); + dmainfo("DMA Registers: %s\n", msg); + dmainfo(" LISR[%08x]: %08x\n", dmabase + STM32_DMA_LISR_OFFSET, regs->lisr); + dmainfo(" HISR[%08x]: %08x\n", dmabase + STM32_DMA_HISR_OFFSET, regs->hisr); + dmainfo(" SCR[%08x]: %08x\n", dmast->base + STM32_DMA_SCR_OFFSET, regs->scr); + dmainfo(" SNDTR[%08x]: %08x\n", dmast->base + STM32_DMA_SNDTR_OFFSET, regs->sndtr); + dmainfo(" SPAR[%08x]: %08x\n", dmast->base + STM32_DMA_SPAR_OFFSET, regs->spar); + dmainfo(" SM0AR[%08x]: %08x\n", dmast->base + STM32_DMA_SM0AR_OFFSET, regs->sm0ar); + dmainfo(" SM1AR[%08x]: %08x\n", dmast->base + STM32_DMA_SM1AR_OFFSET, regs->sm1ar); + dmainfo(" SFCR[%08x]: %08x\n", dmast->base + STM32_DMA_SFCR_OFFSET, regs->sfcr); } #endif diff --git a/arch/arm/src/stm32f7/stm32_dma.h b/arch/arm/src/stm32f7/stm32_dma.h index 67c9cbf4c83c46f14557aba5153942b5859b6627..f78221c94993234f6e1cc18a4f383db37263b488 100644 --- a/arch/arm/src/stm32f7/stm32_dma.h +++ b/arch/arm/src/stm32f7/stm32_dma.h @@ -265,7 +265,7 @@ bool stm32_dmacapable(uintptr_t maddr, uint32_t count, uint32_t ccr); * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void stm32_dmasample(DMA_HANDLE handle, struct stm32_dmaregs_s *regs); #else # define stm32_dmasample(handle,regs) @@ -282,7 +282,7 @@ void stm32_dmasample(DMA_HANDLE handle, struct stm32_dmaregs_s *regs); * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void stm32_dmadump(DMA_HANDLE handle, const struct stm32_dmaregs_s *regs, const char *msg); #else diff --git a/arch/arm/src/stm32f7/stm32_dumpgpio.c b/arch/arm/src/stm32f7/stm32_dumpgpio.c index e1772e89cd10fb809224b416cb9ebb7539fef43c..79210b4e8e8094a88e5cb6c9d8ca5114648aa473 100644 --- a/arch/arm/src/stm32f7/stm32_dumpgpio.c +++ b/arch/arm/src/stm32f7/stm32_dumpgpio.c @@ -51,20 +51,20 @@ #include "stm32_gpio.h" #include "stm32_rcc.h" -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_GPIO_INFO /* Content of this file requires verification before it is used with other * families */ -#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) +#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) \ + || defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) /**************************************************************************** * Private Data ****************************************************************************/ /* Port letters for prettier debug output */ -#ifdef CONFIG_DEBUG static const char g_portchar[STM32F7_NGPIO] = { #if STM32F7_NGPIO > 11 @@ -95,7 +95,6 @@ static const char g_portchar[STM32F7_NGPIO] = # error "Bad number of GPIOs" #endif }; -#endif /**************************************************************************** * Public Functions @@ -126,28 +125,28 @@ int stm32_dumpgpio(uint32_t pinset, const char *msg) DEBUGASSERT(port < STM32F7_NGPIO); - lldbg("GPIO%c pinset: %08x base: %08x -- %s\n", + gpioinfo("GPIO%c pinset: %08x base: %08x -- %s\n", g_portchar[port], pinset, base, msg); if ((getreg32(STM32_RCC_AHB1ENR) & RCC_AHB1ENR_GPIOEN(port)) != 0) { - lldbg(" MODE: %08x OTYPE: %04x OSPEED: %08x PUPDR: %08x\n", - getreg32(base + STM32_GPIO_MODER_OFFSET), - getreg32(base + STM32_GPIO_OTYPER_OFFSET), - getreg32(base + STM32_GPIO_OSPEED_OFFSET), - getreg32(base + STM32_GPIO_PUPDR_OFFSET)); - lldbg(" IDR: %04x ODR: %04x LCKR: %05x\n", - getreg32(base + STM32_GPIO_IDR_OFFSET), - getreg32(base + STM32_GPIO_ODR_OFFSET), - getreg32(base + STM32_GPIO_LCKR_OFFSET)); - lldbg(" AFRH: %08x AFRL: %08x\n", - getreg32(base + STM32_GPIO_AFRH_OFFSET), - getreg32(base + STM32_GPIO_AFRL_OFFSET)); + gpioinfo(" MODE: %08x OTYPE: %04x OSPEED: %08x PUPDR: %08x\n", + getreg32(base + STM32_GPIO_MODER_OFFSET), + getreg32(base + STM32_GPIO_OTYPER_OFFSET), + getreg32(base + STM32_GPIO_OSPEED_OFFSET), + getreg32(base + STM32_GPIO_PUPDR_OFFSET)); + gpioinfo(" IDR: %04x ODR: %04x LCKR: %05x\n", + getreg32(base + STM32_GPIO_IDR_OFFSET), + getreg32(base + STM32_GPIO_ODR_OFFSET), + getreg32(base + STM32_GPIO_LCKR_OFFSET)); + gpioinfo(" AFRH: %08x AFRL: %08x\n", + getreg32(base + STM32_GPIO_AFRH_OFFSET), + getreg32(base + STM32_GPIO_AFRL_OFFSET)); } else { - lldbg(" GPIO%c not enabled: AHB1ENR: %08x\n", - g_portchar[port], getreg32(STM32_RCC_AHB1ENR)); + gpioinfo(" GPIO%c not enabled: AHB1ENR: %08x\n", + g_portchar[port], getreg32(STM32_RCC_AHB1ENR)); } leave_critical_section(flags); @@ -155,4 +154,4 @@ int stm32_dumpgpio(uint32_t pinset, const char *msg) } #endif /* CONFIG_STM32F7_STM32F74XX || CONFIG_STM32F7_STM32F75XX */ -#endif /* CONFIG_DEBUG */ +#endif /* CONFIG_DEBUG_GPIO_INFO */ diff --git a/arch/arm/src/stm32f7/stm32_ethernet.c b/arch/arm/src/stm32f7/stm32_ethernet.c index 4cf496a4eb9c996156a27c6ace0b3bdd8bfc6208..74d7721ed6059b45387fc88c2c65a874258fb18e 100644 --- a/arch/arm/src/stm32f7/stm32_ethernet.c +++ b/arch/arm/src/stm32f7/stm32_ethernet.c @@ -263,7 +263,7 @@ * enabled. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_NET_INFO # undef CONFIG_STM32F7_ETHMAC_REGDEBUG #endif @@ -609,9 +609,9 @@ struct stm32_ethmac_s struct work_s work; /* For deferring work to the work queue */ #endif - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ - struct net_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by the network */ /* Used to track transmit and receive descriptors */ @@ -664,7 +664,7 @@ static struct stm32_ethmac_s g_stm32ethmac[STM32F7_NETHERNET]; ****************************************************************************/ /* Register operations ******************************************************/ -#if defined(CONFIG_STM32F7_ETHMAC_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_STM32F7_ETHMAC_REGDEBUG static uint32_t stm32_getreg(uint32_t addr); static void stm32_putreg(uint32_t val, uint32_t addr); static void stm32_checksetup(void); @@ -795,7 +795,7 @@ static int stm32_ethconfig(struct stm32_ethmac_s *priv); * ****************************************************************************/ -#if defined(CONFIG_STM32F7_ETHMAC_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_STM32F7_ETHMAC_REGDEBUG static uint32_t stm32_getreg(uint32_t addr) { static uint32_t prevaddr = 0; @@ -816,7 +816,7 @@ static uint32_t stm32_getreg(uint32_t addr) { if (count == 4) { - lldbg("...\n"); + ninfo("...\n"); } return val; @@ -833,7 +833,7 @@ static uint32_t stm32_getreg(uint32_t addr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + ninfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -845,7 +845,7 @@ static uint32_t stm32_getreg(uint32_t addr) /* Show the register value read */ - lldbg("%08x->%08x\n", addr, val); + ninfo("%08x->%08x\n", addr, val); return val; } #endif @@ -867,12 +867,12 @@ static uint32_t stm32_getreg(uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_STM32F7_ETHMAC_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_STM32F7_ETHMAC_REGDEBUG static void stm32_putreg(uint32_t val, uint32_t addr) { /* Show the register value being written */ - lldbg("%08x<-%08x\n", addr, val); + ninfo("%08x<-%08x\n", addr, val); /* Write the value */ @@ -894,7 +894,7 @@ static void stm32_putreg(uint32_t val, uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_STM32F7_ETHMAC_REGDEBUG) && defined(CONFIG_DEBUG) +#ifdef CONFIG_STM32F7_ETHMAC_REGDEBUG static void stm32_checksetup(void) { } @@ -1041,7 +1041,7 @@ static int stm32_transmit(struct stm32_ethmac_s *priv) struct eth_txdesc_s *txdesc; struct eth_txdesc_s *txfirst; - /* The internal (optimal) uIP buffer size may be configured to be larger + /* The internal (optimal) network buffer size may be configured to be larger * than the Ethernet buffer size. */ @@ -1060,8 +1060,8 @@ static int stm32_transmit(struct stm32_ethmac_s *priv) txdesc = priv->txhead; txfirst = txdesc; - nllvdbg("d_len: %d d_buf: %p txhead: %p tdes0: %08x\n", - priv->dev.d_len, priv->dev.d_buf, txdesc, txdesc->tdes0); + ninfo("d_len: %d d_buf: %p txhead: %p tdes0: %08x\n", + priv->dev.d_len, priv->dev.d_buf, txdesc, txdesc->tdes0); DEBUGASSERT(txdesc && (txdesc->tdes0 & ETH_TDES0_OWN) == 0); @@ -1082,7 +1082,7 @@ static int stm32_transmit(struct stm32_ethmac_s *priv) bufcount = (priv->dev.d_len + (ALIGNED_BUFSIZE-1)) / ALIGNED_BUFSIZE; lastsize = priv->dev.d_len - (bufcount - 1) * ALIGNED_BUFSIZE; - nllvdbg("bufcount: %d lastsize: %d\n", bufcount, lastsize); + ninfo("bufcount: %d lastsize: %d\n", bufcount, lastsize); /* Set the first segment bit in the first TX descriptor */ @@ -1209,8 +1209,8 @@ static int stm32_transmit(struct stm32_ethmac_s *priv) priv->inflight++; - nllvdbg("txhead: %p txtail: %p inflight: %d\n", - priv->txhead, priv->txtail, priv->inflight); + ninfo("txhead: %p txtail: %p inflight: %d\n", + priv->txhead, priv->txtail, priv->inflight); /* If all TX descriptors are in-flight, then we have to disable receive interrupts * too. This is because receive events can trigger more un-stoppable transmit @@ -1249,7 +1249,7 @@ static int stm32_transmit(struct stm32_ethmac_s *priv) * Function: stm32_txpoll * * Description: - * The transmitter is available, check if uIP has any outgoing packets ready + * The transmitter is available, check if the network has any outgoing packets ready * to send. This is a callback from devif_poll(). devif_poll() may be called: * * 1. When the preceding TX packet send is complete, @@ -1391,7 +1391,7 @@ static void stm32_dopoll(struct stm32_ethmac_s *priv) if ((priv->txhead->tdes0 & ETH_TDES0_OWN) == 0 && priv->txhead->tdes2 == 0) { - /* If we have the descriptor, then poll uIP for new XMIT data. + /* If we have the descriptor, then poll the network for new XMIT data. * Allocate a buffer for the poll. */ @@ -1508,7 +1508,7 @@ static void stm32_freesegment(struct stm32_ethmac_s *priv, struct eth_rxdesc_s *rxdesc; int i; - nllvdbg("rxfirst: %p segments: %d\n", rxfirst, segments); + ninfo("rxfirst: %p segments: %d\n", rxfirst, segments); /* Give the freed RX buffers back to the Ethernet MAC to be refilled */ @@ -1580,8 +1580,8 @@ static int stm32_recvframe(struct stm32_ethmac_s *priv) uint8_t *buffer; int i; - nllvdbg("rxhead: %p rxcurr: %p segments: %d\n", - priv->rxhead, priv->rxcurr, priv->segments); + ninfo("rxhead: %p rxcurr: %p segments: %d\n", + priv->rxhead, priv->rxcurr, priv->segments); /* Check if there are free buffers. We cannot receive new frames in this * design unless there is at least one free buffer. @@ -1589,7 +1589,7 @@ static int stm32_recvframe(struct stm32_ethmac_s *priv) if (!stm32_isfreebuffer(priv)) { - nlldbg("No free buffers\n"); + nerr("ERROR: No free buffers\n"); return -ENOMEM; } @@ -1652,7 +1652,7 @@ static int stm32_recvframe(struct stm32_ethmac_s *priv) rxcurr = priv->rxcurr; } - nllvdbg("rxhead: %p rxcurr: %p segments: %d\n", + ninfo("rxhead: %p rxcurr: %p segments: %d\n", priv->rxhead, priv->rxcurr, priv->segments); /* Check if any errors are reported in the frame */ @@ -1675,7 +1675,7 @@ static int stm32_recvframe(struct stm32_ethmac_s *priv) buffer = stm32_allocbuffer(priv); /* Take the buffer from the RX descriptor of the first free - * segment, put it into the uIP device structure, then replace + * segment, put it into the network device structure, then replace * the buffer in the RX descriptor with the newly allocated * buffer. */ @@ -1705,8 +1705,8 @@ static int stm32_recvframe(struct stm32_ethmac_s *priv) arch_invalidate_dcache((uintptr_t)dev->d_buf, (uintptr_t)dev->d_buf + dev->d_len); - nllvdbg("rxhead: %p d_buf: %p d_len: %d\n", - priv->rxhead, dev->d_buf, dev->d_len); + ninfo("rxhead: %p d_buf: %p d_len: %d\n", + priv->rxhead, dev->d_buf, dev->d_len); /* Return success */ @@ -1718,7 +1718,7 @@ static int stm32_recvframe(struct stm32_ethmac_s *priv) * scanning logic, and continue scanning with the next frame. */ - nlldbg("DROPPED: RX descriptor errors: %08x\n", rxdesc->rdes0); + nwarn("WARNING: DROPPED RX descriptor errors: %08x\n", rxdesc->rdes0); stm32_freesegment(priv, rxcurr, priv->segments); } } @@ -1739,8 +1739,8 @@ static int stm32_recvframe(struct stm32_ethmac_s *priv) priv->rxhead = rxdesc; - nllvdbg("rxhead: %p rxcurr: %p segments: %d\n", - priv->rxhead, priv->rxcurr, priv->segments); + ninfo("rxhead: %p rxcurr: %p segments: %d\n", + priv->rxhead, priv->rxcurr, priv->segments); return -EAGAIN; } @@ -1778,13 +1778,13 @@ static void stm32_receive(struct stm32_ethmac_s *priv) pkt_input(&priv->dev); #endif - /* Check if the packet is a valid size for the uIP buffer configuration + /* Check if the packet is a valid size for the network buffer configuration * (this should not happen) */ if (dev->d_len > CONFIG_NET_ETH_MTU) { - nlldbg("DROPPED: Too big: %d\n", dev->d_len); + nwarn("WARNING: DROPPED Too big: %d\n", dev->d_len); continue; } @@ -1799,7 +1799,7 @@ static void stm32_receive(struct stm32_ethmac_s *priv) #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); /* Handle ARP on input then give the IPv4 packet to the network * layer @@ -1839,7 +1839,7 @@ static void stm32_receive(struct stm32_ethmac_s *priv) #ifdef CONFIG_NET_IPv6 if (BUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); /* Give the IPv6 packet to the network layer */ @@ -1876,7 +1876,7 @@ static void stm32_receive(struct stm32_ethmac_s *priv) #ifdef CONFIG_NET_ARP if (BUF->type == htons(ETHTYPE_ARP)) { - nllvdbg("ARP frame\n"); + ninfo("ARP frame\n"); /* Handle ARP packet */ @@ -1894,7 +1894,7 @@ static void stm32_receive(struct stm32_ethmac_s *priv) else #endif { - nlldbg("DROPPED: Unknown type: %04x\n", BUF->type); + nwarn("WARNING: DROPPED Unknown type: %04x\n", BUF->type); } /* We are finished with the RX buffer. NOTE: If the buffer is @@ -1935,8 +1935,8 @@ static void stm32_freeframe(struct stm32_ethmac_s *priv) struct eth_txdesc_s *txdesc; int i; - nllvdbg("txhead: %p txtail: %p inflight: %d\n", - priv->txhead, priv->txtail, priv->inflight); + ninfo("txhead: %p txtail: %p inflight: %d\n", + priv->txhead, priv->txtail, priv->inflight); /* Scan for "in-flight" descriptors owned by the CPU */ @@ -1956,8 +1956,8 @@ static void stm32_freeframe(struct stm32_ethmac_s *priv) * TX descriptors. */ - nllvdbg("txtail: %p tdes0: %08x tdes2: %08x tdes3: %08x\n", - txdesc, txdesc->tdes0, txdesc->tdes2, txdesc->tdes3); + ninfo("txtail: %p tdes0: %08x tdes2: %08x tdes3: %08x\n", + txdesc, txdesc->tdes0, txdesc->tdes2, txdesc->tdes3); DEBUGASSERT(txdesc->tdes2 != 0); @@ -2021,8 +2021,8 @@ static void stm32_freeframe(struct stm32_ethmac_s *priv) priv->txtail = txdesc; - nllvdbg("txhead: %p txtail: %p inflight: %d\n", - priv->txhead, priv->txtail, priv->inflight); + ninfo("txhead: %p txtail: %p inflight: %d\n", + priv->txhead, priv->txtail, priv->inflight); } } @@ -2072,7 +2072,7 @@ static void stm32_txdone(struct stm32_ethmac_s *priv) stm32_disableint(priv, ETH_DMAINT_TI); } - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ stm32_dopoll(priv); } @@ -2158,7 +2158,7 @@ static inline void stm32_interrupt_process(struct stm32_ethmac_s *priv) { /* Just let the user know what happened */ - nlldbg("Abormal event(s): %08x\n", dmasr); + nerr("ERROR: Abormal event(s): %08x\n", dmasr); /* Clear all pending abnormal events */ @@ -2362,7 +2362,7 @@ static void stm32_txtimeout_expiry(int argc, uint32_t arg, ...) { struct stm32_ethmac_s *priv = (struct stm32_ethmac_s *)arg; - nlldbg("Timeout!\n"); + nerr("ERROR: Timeout!\n"); #ifdef CONFIG_NET_NOINTS /* Disable further Ethernet interrupts. This will prevent some race @@ -2437,7 +2437,7 @@ static inline void stm32_poll_process(struct stm32_ethmac_s *priv) if (dev->d_buf) { - /* Update TCP timing states and poll uIP for new XMIT data. + /* Update TCP timing states and poll the network for new XMIT data. */ (void)devif_timer(dev, stm32_txpoll); @@ -2563,12 +2563,12 @@ static int stm32_ifup(struct net_driver_s *dev) int ret; #ifdef CONFIG_NET_IPv4 - nvdbg("Bringing up: %d.%d.%d.%d\n", + ninfo("Bringing up: %d.%d.%d.%d\n", dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); #endif #ifdef CONFIG_NET_IPv6 - nvdbg("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", + ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2], dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5], dev->d_ipv6addr[6], dev->d_ipv6addr[7]); @@ -2616,7 +2616,7 @@ static int stm32_ifdown(struct net_driver_s *dev) struct stm32_ethmac_s *priv = (struct stm32_ethmac_s *)dev->d_private; irqstate_t flags; - nvdbg("Taking the network down\n"); + ninfo("Taking the network down\n"); /* Disable the Ethernet interrupt */ @@ -2661,13 +2661,13 @@ static int stm32_ifdown(struct net_driver_s *dev) static inline void stm32_txavail_process(struct stm32_ethmac_s *priv) { - nvdbg("ifup: %d\n", priv->ifup); + ninfo("ifup: %d\n", priv->ifup); /* Ignore the notification if the interface is not yet up */ if (priv->ifup) { - /* Poll uIP for new XMIT data */ + /* Poll the network for new XMIT data */ stm32_dopoll(priv); } @@ -2829,8 +2829,8 @@ static int stm32_addmac(struct net_driver_s *dev, const uint8_t *mac) uint32_t temp; uint32_t registeraddress; - nllvdbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); /* Add the MAC address to the hardware multicast hash table */ @@ -2886,7 +2886,7 @@ static int stm32_rmmac(struct net_driver_s *dev, const uint8_t *mac) uint32_t temp; uint32_t registeraddress; - nllvdbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); /* Remove the MAC address to the hardware multicast hash table */ @@ -3267,7 +3267,7 @@ static int stm32_phyread(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t *val } } - nvdbg("MII transfer timed out: phydevaddr: %04x phyregaddr: %04x\n", + ninfo("MII transfer timed out: phydevaddr: %04x phyregaddr: %04x\n", phydevaddr, phyregaddr); return -ETIMEDOUT; @@ -3326,7 +3326,7 @@ static int stm32_phywrite(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t val } } - nvdbg("MII transfer timed out: phydevaddr: %04x phyregaddr: %04x value: %04x\n", + ninfo("MII transfer timed out: phydevaddr: %04x phyregaddr: %04x value: %04x\n", phydevaddr, phyregaddr, value); return -ETIMEDOUT; @@ -3363,7 +3363,7 @@ static inline int stm32_dm9161(struct stm32_ethmac_s *priv) ret = stm32_phyread(CONFIG_STM32F7_PHYADDR, MII_PHYID1, &phyval); if (ret < 0) { - ndbg("ERROR: Failed to read the PHY ID1: %d\n", ret); + nerr("ERROR: Failed to read the PHY ID1: %d\n", ret); return ret; } @@ -3374,14 +3374,14 @@ static inline int stm32_dm9161(struct stm32_ethmac_s *priv) up_systemreset(); } - nvdbg("PHY ID1: 0x%04X\n", phyval); + ninfo("PHY ID1: 0x%04X\n", phyval); /* Now check the "DAVICOM Specified Configuration Register (DSCR)", Register 16 */ ret = stm32_phyread(CONFIG_STM32F7_PHYADDR, 16, &phyval); if (ret < 0) { - ndbg("ERROR: Failed to read the PHY Register 0x10: %d\n", ret); + nerr("ERROR: Failed to read the PHY Register 0x10: %d\n", ret); return ret; } @@ -3438,7 +3438,7 @@ static int stm32_phyinit(struct stm32_ethmac_s *priv) ret = stm32_phywrite(CONFIG_STM32F7_PHYADDR, MII_MCR, MII_MCR_RESET); if (ret < 0) { - ndbg("ERROR: Failed to reset the PHY: %d\n", ret); + nerr("ERROR: Failed to reset the PHY: %d\n", ret); return ret; } up_mdelay(PHY_RESET_DELAY); @@ -3449,7 +3449,7 @@ static int stm32_phyinit(struct stm32_ethmac_s *priv) ret = stm32_phy_boardinitialize(0); if (ret < 0) { - ndbg("ERROR: Failed to initialize the PHY: %d\n", ret); + nerr("ERROR: Failed to initialize the PHY: %d\n", ret); return ret; } #endif @@ -3474,7 +3474,7 @@ static int stm32_phyinit(struct stm32_ethmac_s *priv) ret = stm32_phyread(CONFIG_STM32F7_PHYADDR, MII_MSR, &phyval); if (ret < 0) { - ndbg("ERROR: Failed to read the PHY MSR: %d\n", ret); + nerr("ERROR: Failed to read the PHY MSR: %d\n", ret); return ret; } else if ((phyval & MII_MSR_LINKSTATUS) != 0) @@ -3485,7 +3485,7 @@ static int stm32_phyinit(struct stm32_ethmac_s *priv) if (timeout >= PHY_RETRY_TIMEOUT) { - ndbg("ERROR: Timed out waiting for link status: %04x\n", phyval); + nerr("ERROR: Timed out waiting for link status: %04x\n", phyval); return -ETIMEDOUT; } @@ -3494,7 +3494,7 @@ static int stm32_phyinit(struct stm32_ethmac_s *priv) ret = stm32_phywrite(CONFIG_STM32F7_PHYADDR, MII_MCR, MII_MCR_ANENABLE); if (ret < 0) { - ndbg("ERROR: Failed to enable auto-negotiation: %d\n", ret); + nerr("ERROR: Failed to enable auto-negotiation: %d\n", ret); return ret; } @@ -3505,7 +3505,7 @@ static int stm32_phyinit(struct stm32_ethmac_s *priv) ret = stm32_phyread(CONFIG_STM32F7_PHYADDR, MII_MSR, &phyval); if (ret < 0) { - ndbg("ERROR: Failed to read the PHY MSR: %d\n", ret); + nerr("ERROR: Failed to read the PHY MSR: %d\n", ret); return ret; } else if ((phyval & MII_MSR_ANEGCOMPLETE) != 0) @@ -3516,7 +3516,7 @@ static int stm32_phyinit(struct stm32_ethmac_s *priv) if (timeout >= PHY_RETRY_TIMEOUT) { - ndbg("ERROR: Timed out waiting for auto-negotiation\n"); + nerr("ERROR: Timed out waiting for auto-negotiation\n"); return -ETIMEDOUT; } @@ -3525,13 +3525,13 @@ static int stm32_phyinit(struct stm32_ethmac_s *priv) ret = stm32_phyread(CONFIG_STM32F7_PHYADDR, CONFIG_STM32F7_PHYSR, &phyval); if (ret < 0) { - ndbg("ERROR: Failed to read PHY status register\n"); + nerr("ERROR: Failed to read PHY status register\n"); return ret; } /* Remember the selected speed and duplex modes */ - nvdbg("PHYSR[%d]: %04x\n", CONFIG_STM32F7_PHYSR, phyval); + ninfo("PHYSR[%d]: %04x\n", CONFIG_STM32F7_PHYSR, phyval); /* Different PHYs present speed and mode information in different ways. IF * This CONFIG_STM32F7_PHYSR_ALTCONFIG is selected, this indicates that the PHY @@ -3543,7 +3543,7 @@ static int stm32_phyinit(struct stm32_ethmac_s *priv) switch (phyval & CONFIG_STM32F7_PHYSR_ALTMODE) { default: - ndbg("ERROR: Unrecognized PHY status setting\n"); + nerr("ERROR: Unrecognized PHY status setting\n"); case CONFIG_STM32F7_PHYSR_10HD: priv->fduplex = 0; @@ -3597,7 +3597,7 @@ static int stm32_phyinit(struct stm32_ethmac_s *priv) ret = stm32_phywrite(CONFIG_STM32F7_PHYADDR, MII_MCR, phyval); if (ret < 0) { - ndbg("ERROR: Failed to write the PHY MCR: %d\n", ret); + nerr("ERROR: Failed to write the PHY MCR: %d\n", ret); return ret; } @@ -3613,7 +3613,7 @@ static int stm32_phyinit(struct stm32_ethmac_s *priv) #endif #endif - nvdbg("Duplex: %s Speed: %d MBps\n", + ninfo("Duplex: %s Speed: %d MBps\n", priv->fduplex ? "FULL" : "HALF", priv->mbps100 ? 100 : 10); @@ -3973,11 +3973,11 @@ static void stm32_macaddress(struct stm32_ethmac_s *priv) struct net_driver_s *dev = &priv->dev; uint32_t regval; - nllvdbg("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - dev->d_ifname, - dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], - dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], - dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5]); + ninfo("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + dev->d_ifname, + dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], + dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], + dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5]); /* Set the MAC address high register */ @@ -4041,7 +4041,7 @@ static void stm32_ipv6multicast(struct stm32_ethmac_s *priv) mac[4] = tmp16 & 0xff; mac[5] = tmp16 >> 8; - nvdbg("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", + ninfo("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); (void)stm32_addmac(dev, mac); @@ -4179,12 +4179,12 @@ static int stm32_ethconfig(struct stm32_ethmac_s *priv) /* Reset the Ethernet block */ - nllvdbg("Reset the Ethernet block\n"); + ninfo("Reset the Ethernet block\n"); stm32_ethreset(priv); /* Initialize the PHY */ - nllvdbg("Initialize the PHY\n"); + ninfo("Initialize the PHY\n"); ret = stm32_phyinit(priv); if (ret < 0) { @@ -4193,7 +4193,7 @@ static int stm32_ethconfig(struct stm32_ethmac_s *priv) /* Initialize the MAC and DMA */ - nllvdbg("Initialize the MAC and DMA\n"); + ninfo("Initialize the MAC and DMA\n"); ret = stm32_macconfig(priv); if (ret < 0) { @@ -4217,7 +4217,7 @@ static int stm32_ethconfig(struct stm32_ethmac_s *priv) /* Enable normal MAC operation */ - nllvdbg("Enable normal operation\n"); + ninfo("Enable normal operation\n"); return stm32_macenable(priv); } @@ -4253,7 +4253,7 @@ int stm32_ethinitialize(int intf) { struct stm32_ethmac_s *priv; - nvdbg("intf: %d\n", intf); + ninfo("intf: %d\n", intf); /* Get the interface structure associated with this interface number. */ diff --git a/arch/arm/src/stm32f7/stm32_exti_gpio.c b/arch/arm/src/stm32f7/stm32_exti_gpio.c index 7c150275635df00eae0cac6d81dc0a656892162d..ec4cd1a7d7156a19f686a4a7e1952fba2d260c2e 100644 --- a/arch/arm/src/stm32f7/stm32_exti_gpio.c +++ b/arch/arm/src/stm32f7/stm32_exti_gpio.c @@ -65,7 +65,8 @@ * families */ -#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) +#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) \ + || defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) /**************************************************************************** * Private Data diff --git a/arch/arm/src/stm32f7/stm32_gpio.c b/arch/arm/src/stm32f7/stm32_gpio.c index ee4e0f819bbf3abd2ddbe3e39d09c9409bbb4e62..17e8b4c10822e6ea958de283f2921ceca571e6a5 100644 --- a/arch/arm/src/stm32f7/stm32_gpio.c +++ b/arch/arm/src/stm32f7/stm32_gpio.c @@ -57,7 +57,8 @@ * families */ -#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) +#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) \ + || defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) /**************************************************************************** * Public Data @@ -181,6 +182,7 @@ int stm32_configgpio(uint32_t cfgset) break; case GPIO_OUTPUT: /* General purpose output mode */ + stm32_gpiowrite(cfgset, (cfgset & GPIO_OUTPUT_SET) != 0); /* Set the initial output value */ pinmode = GPIO_MODER_OUTPUT; break; @@ -310,17 +312,9 @@ int stm32_configgpio(uint32_t cfgset) putreg32(regval, base + STM32_GPIO_OTYPER_OFFSET); - /* If it is an output... set the pin to the correct initial state. */ - - if (pinmode == GPIO_MODER_OUTPUT) - { - bool value = ((cfgset & GPIO_OUTPUT_SET) != 0); - stm32_gpiowrite(cfgset, value); - } - /* Otherwise, it is an input pin. Should it configured as an EXTI interrupt? */ - else if ((cfgset & GPIO_EXTI) != 0) + if (pinmode != GPIO_MODER_OUTPUT && (cfgset & GPIO_EXTI) != 0) { /* "In STM32 F1 the selection of the EXTI line source is performed through * the EXTIx bits in the AFIO_EXTICRx registers, while in F2 series this diff --git a/arch/arm/src/stm32f7/stm32_gpio.h b/arch/arm/src/stm32f7/stm32_gpio.h index 7fff5e249984d0598908d038e8d1c72e1f29a77f..f79b398b7a1b9eae53e022628a33b7490046cf29 100644 --- a/arch/arm/src/stm32f7/stm32_gpio.h +++ b/arch/arm/src/stm32f7/stm32_gpio.h @@ -345,7 +345,7 @@ xcpt_t stm32_gpiosetevent(uint32_t pinset, bool risingedge, bool fallingedge, * ************************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_GPIO_INFO int stm32_dumpgpio(uint32_t pinset, const char *msg); #else # define stm32_dumpgpio(p,m) diff --git a/arch/arm/src/stm32f7/stm32_i2c.c b/arch/arm/src/stm32f7/stm32_i2c.c new file mode 100644 index 0000000000000000000000000000000000000000..3786e7d52c2ed453556a21f22f1713c424046215 --- /dev/null +++ b/arch/arm/src/stm32f7/stm32_i2c.c @@ -0,0 +1,2782 @@ +/************************************************************************************ + * arch/arm/src/stm32/stm32f7_i2c.c + * STM32 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) 2016 Gregory Nutt. All rights reserved. + * Authors: Gregroy Nutt + * John Wharington + * David Sidrane + * + * Major rewrite of ISR and supporting methods, including support + * for NACK and RELOAD by: + * + * Copyright (c) 2016 Doug Vetter. All rights reserved. + * Author: Doug Vetter + * + * 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. + * + ************************************************************************************/ + +/* ------------------------------------------------------------------------------ + * + * STM32 F7 I2C Driver + * + * Supports: + * - Master operation: + * Standard-mode (up to 100 kHz) + * Fast-mode (up to 400 kHz) + * Fast-mode Plus (up to 1 MHz) + * fI2CCLK clock source selection is based on STM32_RCC_DCKCFGR2_I2CxSRC + * being set to HSI and the calulations are based on STM32_HSI_FREQUENCY + * of 16mHz + * + * - Multiple instances (shared bus) + * - Interrupt based operation + * - RELOAD support + * + * Unsupported, possible future work: + * - More effective error reporting to higher layers + * - Slave operation + * - Support of fI2CCLK frequencies other than 16Mhz + * - Polled operation (code present but untested) + * - SMBus support + * - Multi-master support + * - IPMI + * + * Test Environment: + * + * - STM32F7676ZI on ST Nucleo-144 Board (ST Part STM32F429ZIT6) + * + * Operational Status: + * + * All supported features have been tested and found to be operational. + * + * Although the RELOAD capability has been tested as it was required to + * implement the I2C_M_NORESTART flag on F3 hardware, the associated + * logic to support the transfer messages with more than 255 byte + * payloads has not been tested as the author lacked access to a real + * device supporting these types of transfers. + * + * Performance Benchmarks: TBD + * + * Time to transfer two messages, each a byte in length, in addition to the + * START condition, in interrupt mode: + * + * DEBUG enabled (development): TBDms + * Excessive delay here is caused by printing to the console and + * is of no concern. + * + * DEBUG disabled (production): TBSus + * Between Messages: TBDus + * Between Bytes: TBDus + * + * Implementation: + * + * - Device: structure as defined by the nuttx/i2c/i2c.h + * + * - Instance: represents each individual access to the I2C driver, obtained by + * the i2c_init(); it extends the Device structure from the nuttx/i2c/i2c.h; + * Instance points to OPS, to common I2C Hardware private data and contains + * its own private data including frequency, address and mode of operation. + * + * - Private: Private data of an I2C Hardware + * + * High Level Functional Desecription + * + * This driver works with I2C "messages" (struct i2c_msg_s), which carry a buffer + * intended to transfer data to, or store data read from, the I2C bus. + * + * As the hardware can only transmit or receive one byte at a time the basic job + * of the driver (and the ISR specifically) is to process each message in the + * order they are stored in the message list, one byte at a time. When + * no messages are left the ISR exits and returns the result to the caller. + * + * The order of the list of I2C messages provided to the driver is important and + * dependent upon the hardware in use. A typical I2C transaction between the F3 + * as an I2C Master and some other IC as a I2C Slave requires two messages that + * communicate the: + * + * 1) Subaddress (register offset on the slave device) + * 2) Data sent to or read from the device + * + * These messages will typically be one byte in length but may be up to 2^31 + * bytes in length. Incidentally, the maximum length is limited only because + * i2c_msg_s.length is a signed int for some odd reason. + * + * Interrupt mode relies on the following interrupt events: + * + * TXIS - Transmit interrupt + * (data transmitted to bus and acknowedged) + * NACKF - Not Acknowledge Received + * (data transmitted to bus and NOT acknowledged) + * RXNE - Receive interrupt + * (data received from bus) + * TC - Transfer Complete + * (All bytes in message transferred) + * TCR - Transfer Complete (Reload) + * (Current batch of bytes in message transferred) + * + * The driver currently supports Single Master mode only. Slave mode is not + * supported. Additionally, the driver runs in Software End Mode (AUTOEND + * disabled) so the driver is responsible for telling the hardware what to + * do at the end of a transfer. + * + * ------------------------------------------------------------------------------ + * + * Configuration: + * + * To use this driver, enable the following configuration variable: + * + * One of: + * + * CONFIG_STM32F7_STM32F74XX + * CONFIG_STM32F7_STM32F75XX + * CONFIG_STM32F7_STM32F76XX + * CONFIG_STM32F7_STM32F77XX + * + * + * and one or more interfaces: + * + * CONFIG_STM32F7_I2C1 + * CONFIG_STM32F7_I2C2 + * CONFIG_STM32F7_I2C3 + * CONFIG_STM32F7_I2C4 + * + * To configure the ISR timeout using fixed values (CONFIG_STM32F7_I2C_DYNTIMEO=n): + * + * CONFIG_STM32F7_I2CTIMEOSEC (Timeout in seconds) + * CONFIG_STM32F7_I2CTIMEOMS (Timeout in milliseconds) + * CONFIG_STM32F7_I2CTIMEOTICKS (Timeout in ticks) + * + * To configure the ISR timeout using dynamic values (CONFIG_STM32F7_I2C_DYNTIMEO=y): + * + * CONFIG_STM32F7_I2C_DYNTIMEO_USECPERBYTE (Timeout in microseconds per byte) + * CONFIG_STM32F7_I2C_DYNTIMEO_STARTSTOP (Timeout for start/stop in milliseconds) + * + * Debugging output enabled with: + * + * CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_I2C_{ERROR|WARN|INFO} + * + * ISR Debugging output may be enabled with: + * + * CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_I2C_INFO + * + * ------------------------------------------------------------------------------ + * + * References: + * + * RM0316: + * ST STM32F76xxx and STM32F77xxx Reference Manual + * Document ID: DocID028270 Revision 2, April 2016. + * + * DATASHEET: + * ST STM32F777xx/STM32F778Ax/STM32F779x Datasheet + * Document ID: DocID028294, Revision 3, May 2016. + * + * ERRATA: + * STM32F76xxx/STM32F77xxx Errata sheet Rev A device limitations + * Document ID: DocID028806, Revision 2, April 2016. + * + * I2CSPEC: + * I2C Bus Specification and User Manual + * Document ID: UM10204, Revision 6, April 2014. + * + * ------------------------------------------------------------------------------ + */ + +/************************************************************************************ + * 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_i2c.h" +#include "stm32_gpio.h" +#include "chip/stm32_pinmap.h" + +/* At least one I2C peripheral must be enabled */ + +#if defined(CONFIG_STM32F7_I2C1) || defined(CONFIG_STM32F7_I2C2) || \ + defined(CONFIG_STM32F7_I2C3) || defined(CONFIG_STM32F7_I2C4) + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +#undef INVALID_CLOCK_SOURCE + +#ifdef CONFIG_STM32F7_I2C1 +# if STM32_RCC_DCKCFGR2_I2C1SRC != RCC_DCKCFGR2_I2C1SEL_HSI +# warning "Clock Source STM32_RCC_DCKCFGR2_I2C1SRC must be HSI" +# define INVALID_CLOCK_SOURCE +# endif +#endif +#ifdef CONFIG_STM32F7_I2C1 +# if STM32_RCC_DCKCFGR2_I2C2SRC != RCC_DCKCFGR2_I2C2SEL_HSI +# warning "Clock Source STM32_RCC_DCKCFGR2_I2C2SRC must be HSI" +# define INVALID_CLOCK_SOURCE +# endif +#endif +#ifdef CONFIG_STM32F7_I2C3 +# if STM32_RCC_DCKCFGR2_I2C3SRC != RCC_DCKCFGR2_I2C3SEL_HSI +# warning "Clock Source STM32_RCC_DCKCFGR2_I2C3SRC must be HSI" +# define INVALID_CLOCK_SOURCE +# endif +#endif +#ifdef CONFIG_STM32F7_I2C4 +# if STM32_RCC_DCKCFGR2_I2C4SRC != RCC_DCKCFGR2_I2C4SEL_HSI +# warning "Clock Source STM32_RCC_DCKCFGR2_I2C4SRC must be HSI" +# define INVALID_CLOCK_SOURCE +# endif +#endif + +/* CONFIG_I2C_POLLED may be set so that I2C interrupts will not be used. Instead, + * CPU-intensive polling will be used. + */ + +/* Interrupt wait timeout in seconds and milliseconds */ + +#if !defined(CONFIG_STM32F7_I2CTIMEOSEC) && !defined(CONFIG_STM32F7_I2CTIMEOMS) +# define CONFIG_STM32F7_I2CTIMEOSEC 0 +# define CONFIG_STM32F7_I2CTIMEOMS 500 /* Default is 500 milliseconds */ +# warning "Using Defualt 500 Ms Timeout" +#elif !defined(CONFIG_STM32F7_I2CTIMEOSEC) +# define CONFIG_STM32F7_I2CTIMEOSEC 0 /* User provided milliseconds */ +#elif !defined(CONFIG_STM32F7_I2CTIMEOMS) +# define CONFIG_STM32F7_I2CTIMEOMS 0 /* User provided seconds */ +#endif + +/* Interrupt wait time timeout in system timer ticks */ + +#ifndef CONFIG_STM32F7_I2CTIMEOTICKS +# define CONFIG_STM32F7_I2CTIMEOTICKS \ + (SEC2TICK(CONFIG_STM32F7_I2CTIMEOSEC) + MSEC2TICK(CONFIG_STM32F7_I2CTIMEOMS)) +#endif + +#ifndef CONFIG_STM32F7_I2C_DYNTIMEO_STARTSTOP +# define CONFIG_STM32F7_I2C_DYNTIMEO_STARTSTOP TICK2USEC(CONFIG_STM32F7_I2CTIMEOTICKS) +#endif + +/* Macros to convert a I2C pin to a GPIO output */ + +#define I2C_OUTPUT (GPIO_OUTPUT | GPIO_FLOAT | GPIO_OPENDRAIN |\ + GPIO_SPEED_50MHz | GPIO_OUTPUT_SET) + +#define MKI2C_OUTPUT(p) (((p) & (GPIO_PORT_MASK | GPIO_PIN_MASK)) | I2C_OUTPUT) + +#define I2C_CR1_TXRX (I2C_CR1_RXIE | I2C_CR1_TXIE) +#define I2C_CR1_ALLINTS (I2C_CR1_TXRX | I2C_CR1_TCIE | I2C_CR1_ERRIE) + +/* I2C event tracing + * + * To enable tracing statements which show the details of the state machine + * enable the following configuration variable: + * + * CONFIG_I2C_TRACE + * + * Note: This facility uses syslog, which sends output to the console by + * default. No other debug configuration variables are required. + */ + +#ifndef CONFIG_I2C_TRACE +# define stm32_i2c_tracereset(p) +# define stm32_i2c_tracenew(p,s) +# define stm32_i2c_traceevent(p,e,a) +# define stm32_i2c_tracedump(p) +#endif + +#ifndef CONFIG_I2C_NTRACE +# define CONFIG_I2C_NTRACE 32 +#endif + +/************************************************************************************ + * Private Types + ************************************************************************************/ + +/* Interrupt state */ + +enum stm32_intstate_e +{ + INTSTATE_IDLE = 0, /* No I2C activity */ + INTSTATE_WAITING, /* Waiting for completion of interrupt activity */ + INTSTATE_DONE, /* Interrupt activity complete */ +}; + +/* Trace events */ + +enum stm32_trace_e +{ + I2CEVENT_NONE = 0, + I2CEVENT_STATE_ERROR, + I2CEVENT_ISR_SHUTDOWN, + I2CEVENT_ISR_CALL, + I2CEVENT_ISR_EMPTY_CALL, + I2CEVENT_MSG_HANDLING, + I2CEVENT_POLL_NOT_READY, + I2CEVENT_EMPTY_MSG, + I2CEVENT_START, + I2CEVENT_ADDRESS_ACKED, + I2CEVENT_ADDRESS_NACKED, + I2CEVENT_NACK, + I2CEVENT_READ, + I2CEVENT_READ_ERROR, + I2CEVENT_WRITE_TO_DR, + I2CEVENT_WRITE_STOP, + I2CEVENT_WRITE_RESTART, + I2CEVENT_WRITE_NO_RESTART, + I2CEVENT_WRITE_ERROR, + I2CEVENT_WRITE_FLAG_ERROR, + I2CEVENT_TC_RESTART, + I2CEVENT_TC_NO_RESTART +}; + +/* Trace data */ + +struct stm32_trace_s +{ + uint32_t status; /* I2C 32-bit SR2|SR1 status */ + uint32_t count; /* Interrupt count when status change */ + enum stm32_intstate_e event; /* Last event that occurred with this status */ + uint32_t parm; /* Parameter associated with the event */ + uint32_t time; /* First of event or first status */ +}; + +/* I2C Device hardware configuration */ + +struct stm32_i2c_config_s +{ + uint32_t base; /* I2C base address */ + uint32_t clk_bit; /* Clock enable bit */ + uint32_t reset_bit; /* Reset bit */ + uint32_t scl_pin; /* GPIO configuration for SCL as SCL */ + uint32_t sda_pin; /* GPIO configuration for SDA as SDA */ +#ifndef CONFIG_I2C_POLLED + int (*isr)(int, void *); /* Interrupt handler */ + uint32_t ev_irq; /* Event IRQ */ + uint32_t er_irq; /* Error IRQ */ +#endif +}; + +/* I2C Device Private Data */ + +struct stm32_i2c_priv_s +{ + const struct stm32_i2c_config_s *config; /* Port configuration */ + int refs; /* Referernce count */ + sem_t sem_excl; /* Mutual exclusion semaphore */ +#ifndef CONFIG_I2C_POLLED + sem_t sem_isr; /* Interrupt wait semaphore */ +#endif + volatile uint8_t intstate; /* Interrupt handshake (see enum stm32_intstate_e) */ + + uint8_t msgc; /* Message count */ + struct i2c_msg_s *msgv; /* Message list */ + uint8_t *ptr; /* Current message buffer */ + uint32_t frequency; /* Current I2C frequency */ + int dcnt; /* Current message bytes remaining to transfer */ + uint16_t flags; /* Current message flags */ + bool astart; /* START sent */ + + /* I2C trace support */ + +#ifdef CONFIG_I2C_TRACE + int tndx; /* Trace array index */ + uint32_t start_time; /* Time when the trace was started */ + + /* The actual trace data */ + + struct stm32_trace_s trace[CONFIG_I2C_NTRACE]; +#endif + + uint32_t status; /* End of transfer SR2|SR1 status */ +}; + +/* I2C Device, Instance */ + +struct stm32_i2c_inst_s +{ + struct i2c_ops_s *ops; /* Standard I2C operations */ + struct stm32_i2c_priv_s *priv; /* Common driver private data structure */ +}; + +/************************************************************************************ + * Private Function Prototypes + ************************************************************************************/ + +static inline uint16_t stm32_i2c_getreg(FAR struct stm32_i2c_priv_s *priv, + uint8_t offset); +static inline void stm32_i2c_putreg(FAR struct stm32_i2c_priv_s *priv, uint8_t offset, + uint16_t value); +static inline void stm32_i2c_putreg32(FAR struct stm32_i2c_priv_s *priv, uint8_t offset, + uint32_t value); +static inline void stm32_i2c_modifyreg32(FAR struct stm32_i2c_priv_s *priv, + uint8_t offset, uint32_t clearbits, + uint32_t setbits); +static inline void stm32_i2c_sem_wait(FAR struct i2c_master_s *dev); +#ifdef CONFIG_STM32F7_I2C_DYNTIMEO +static useconds_t stm32_i2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs); +#endif /* CONFIG_STM32F7_I2C_DYNTIMEO */ +static inline int stm32_i2c_sem_waitdone(FAR struct stm32_i2c_priv_s *priv); +static inline void stm32_i2c_sem_waitstop(FAR struct stm32_i2c_priv_s *priv); +static inline void stm32_i2c_sem_post(FAR struct i2c_master_s *dev); +static inline void stm32_i2c_sem_init(FAR struct i2c_master_s *dev); +static inline void stm32_i2c_sem_destroy(FAR struct i2c_master_s *dev); +#ifdef CONFIG_I2C_TRACE +static void stm32_i2c_tracereset(FAR struct stm32_i2c_priv_s *priv); +static void stm32_i2c_tracenew(FAR struct stm32_i2c_priv_s *priv, uint32_t status); +static void stm32_i2c_traceevent(FAR struct stm32_i2c_priv_s *priv, + enum stm32_trace_e event, uint32_t parm); +static void stm32_i2c_tracedump(FAR struct stm32_i2c_priv_s *priv); +#endif /* CONFIG_I2C_TRACE */ +static void stm32_i2c_setclock(FAR struct stm32_i2c_priv_s *priv, + uint32_t frequency); +static inline void stm32_i2c_sendstart(FAR struct stm32_i2c_priv_s *priv); +static inline void stm32_i2c_sendstop(FAR struct stm32_i2c_priv_s *priv); +static inline uint32_t stm32_i2c_getstatus(FAR struct stm32_i2c_priv_s *priv); +static int stm32_i2c_isr(struct stm32_i2c_priv_s * priv); +#ifndef CONFIG_I2C_POLLED +# ifdef CONFIG_STM32F7_I2C1 +static int stm32_i2c1_isr(int irq, void *context); +# endif +# ifdef CONFIG_STM32F7_I2C2 +static int stm32_i2c2_isr(int irq, void *context); +# endif +# ifdef CONFIG_STM32F7_I2C3 +static int stm32_i2c3_isr(int irq, void *context); +# endif +# ifdef CONFIG_STM32F7_I2C4 +static int stm32_i2c4_isr(int irq, void *context); +# endif +#endif +static int stm32_i2c_init(FAR struct stm32_i2c_priv_s *priv); +static int stm32_i2c_deinit(FAR struct stm32_i2c_priv_s *priv); + +static int stm32_i2c_process(FAR struct i2c_master_s *dev, FAR struct i2c_msg_s *msgs, + int count); +static int stm32_i2c_transfer(FAR struct i2c_master_s *dev, FAR struct i2c_msg_s *msgs, + int count); +#ifdef CONFIG_I2C_RESET +int stm32_i2c_reset(FAR struct i2c_master_s * dev); +#endif + +/************************************************************************************ + * Private Data + ************************************************************************************/ + +#ifdef CONFIG_STM32F7_I2C1 +static const struct stm32_i2c_config_s stm32_i2c1_config = +{ + .base = STM32_I2C1_BASE, + .clk_bit = RCC_APB1ENR_I2C1EN, + .reset_bit = RCC_APB1RSTR_I2C1RST, + .scl_pin = GPIO_I2C1_SCL, + .sda_pin = GPIO_I2C1_SDA, +#ifndef CONFIG_I2C_POLLED + .isr = stm32_i2c1_isr, + .ev_irq = STM32_IRQ_I2C1EV, + .er_irq = STM32_IRQ_I2C1ER +#endif +}; + +struct stm32_i2c_priv_s stm32_i2c1_priv = +{ + .config = &stm32_i2c1_config, + .refs = 0, + .intstate = INTSTATE_IDLE, + .msgc = 0, + .msgv = NULL, + .ptr = NULL, + .frequency = 0, + .dcnt = 0, + .flags = 0, + .status = 0 +}; +#endif + +#ifdef CONFIG_STM32F7_I2C2 +static const struct stm32_i2c_config_s stm32_i2c2_config = +{ + .base = STM32_I2C2_BASE, + .clk_bit = RCC_APB1ENR_I2C2EN, + .reset_bit = RCC_APB1RSTR_I2C2RST, + .scl_pin = GPIO_I2C2_SCL, + .sda_pin = GPIO_I2C2_SDA, +#ifndef CONFIG_I2C_POLLED + .isr = stm32_i2c2_isr, + .ev_irq = STM32_IRQ_I2C2EV, + .er_irq = STM32_IRQ_I2C2ER +#endif +}; + +struct stm32_i2c_priv_s stm32_i2c2_priv = +{ + .config = &stm32_i2c2_config, + .refs = 0, + .intstate = INTSTATE_IDLE, + .msgc = 0, + .msgv = NULL, + .ptr = NULL, + .frequency = 0, + .dcnt = 0, + .flags = 0, + .status = 0 +}; +#endif + +#ifdef CONFIG_STM32F7_I2C3 +static const struct stm32_i2c_config_s stm32_i2c3_config = +{ + .base = STM32_I2C3_BASE, + .clk_bit = RCC_APB1ENR_I2C3EN, + .reset_bit = RCC_APB1RSTR_I2C3RST, + .scl_pin = GPIO_I2C3_SCL, + .sda_pin = GPIO_I2C3_SDA, +#ifndef CONFIG_I2C_POLLED + .isr = stm32_i2c3_isr, + .ev_irq = STM32_IRQ_I2C3EV, + .er_irq = STM32_IRQ_I2C3ER +#endif +}; + +struct stm32_i2c_priv_s stm32_i2c3_priv = +{ + .config = &stm32_i2c3_config, + .refs = 0, + .intstate = INTSTATE_IDLE, + .msgc = 0, + .msgv = NULL, + .ptr = NULL, + .frequency = 0, + .dcnt = 0, + .flags = 0, + .status = 0 +}; +#endif + +#ifdef CONFIG_STM32F7_I2C4 +static const struct stm32_i2c_config_s stm32_i2c4_config = +{ + .base = STM32_I2C4_BASE, + .clk_bit = RCC_APB1ENR_I2C4EN, + .reset_bit = RCC_APB1RSTR_I2C4RST, + .scl_pin = GPIO_I2C4_SCL, + .sda_pin = GPIO_I2C4_SDA, +#ifndef CONFIG_I2C_POLLED + .isr = stm32_i2c4_isr, + .ev_irq = STM32_IRQ_I2C4EV, + .er_irq = STM32_IRQ_I2C4ER +#endif +}; + +struct stm32_i2c_priv_s stm32_i2c4_priv = +{ + .config = &stm32_i2c4_config, + .refs = 0, + .intstate = INTSTATE_IDLE, + .msgc = 0, + .msgv = NULL, + .ptr = NULL, + .frequency = 0, + .dcnt = 0, + .flags = 0, + .status = 0 +}; +#endif + +/* Device Structures, Instantiation */ + +struct i2c_ops_s stm32_i2c_ops = +{ + .transfer = stm32_i2c_transfer +#ifdef CONFIG_I2C_RESET + , .reset = stm32_i2c_reset +#endif +}; + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32_i2c_getreg + * + * Description: + * Get a 16-bit register value by offset + * + ************************************************************************************/ + +static inline uint16_t stm32_i2c_getreg(FAR struct stm32_i2c_priv_s *priv, + uint8_t offset) +{ + return getreg16(priv->config->base + offset); +} + +/************************************************************************************ + * Name: stm32_i2c_getreg32 + * + * Description: + * Get a 32-bit register value by offset + * + ************************************************************************************/ + +static inline uint32_t stm32_i2c_getreg32(FAR struct stm32_i2c_priv_s *priv, + uint8_t offset) +{ + return getreg32(priv->config->base + offset); +} + +/************************************************************************************ + * Name: stm32_i2c_putreg + * + * Description: + * Put a 16-bit register value by offset + * + ************************************************************************************/ + +static inline void stm32_i2c_putreg(FAR struct stm32_i2c_priv_s *priv, uint8_t offset, + uint16_t value) +{ + putreg16(value, priv->config->base + offset); +} + +/************************************************************************************ + * Name: stm32_i2c_putreg32 + * + * Description: + * Put a 32-bit register value by offset + * + ************************************************************************************/ + +static inline void stm32_i2c_putreg32(FAR struct stm32_i2c_priv_s *priv, + uint8_t offset, uint32_t value) +{ + putreg32(value, priv->config->base + offset); +} + + +/************************************************************************************ + * Name: stm32_i2c_modifyreg32 + * + * Description: + * Modify a 32-bit register value by offset + * + ************************************************************************************/ + +static inline void stm32_i2c_modifyreg32(FAR struct stm32_i2c_priv_s *priv, + uint8_t offset, uint32_t clearbits, + uint32_t setbits) +{ + modifyreg32(priv->config->base + offset, clearbits, setbits); +} + +/************************************************************************************ + * Name: stm32_i2c_sem_wait + * + * Description: + * Take the exclusive access, waiting as necessary + * + ************************************************************************************/ + +static inline void stm32_i2c_sem_wait(FAR struct i2c_master_s *dev) +{ + while (sem_wait(&((struct stm32_i2c_inst_s *)dev)->priv->sem_excl) != 0) + { + ASSERT(errno == EINTR); + } +} + +/************************************************************************************ + * Name: stm32_i2c_tousecs + * + * Description: + * Return a micro-second delay based on the number of bytes left to be processed. + * + ************************************************************************************/ + +#ifdef CONFIG_STM32F7_I2C_DYNTIMEO +static useconds_t stm32_i2c_tousecs(int msgc, FAR struct i2c_msg_s *msgs) +{ + size_t bytecount = 0; + int i; + + /* Count the number of bytes left to process */ + + for (i = 0; i < msgc; i++) + { + bytecount += msgs[i].length; + } + + /* Then return a number of microseconds based on a user provided scaling + * factor. + */ + + return (useconds_t)(CONFIG_STM32F7_I2C_DYNTIMEO_USECPERBYTE * bytecount); +} +#endif + +/************************************************************************************ + * Name: stm32_i2c_enableinterrupts + * + * Description: + * Enable I2C interrupts + * + ************************************************************************************/ + +#ifndef CONFIG_I2C_POLLED +static inline void stm32_i2c_enableinterrupts(struct stm32_i2c_priv_s *priv) +{ + stm32_i2c_modifyreg32(priv, STM32_I2C_CR1_OFFSET, 0, (I2C_CR1_TXRX | I2C_CR1_NACKIE)); +} +#endif + +/************************************************************************************ + * Name: stm32_i2c_sem_waitdone + * + * Description: + * Wait for a transfer to complete + * + * There are two versions of this function. The first is included when using + * interrupts while the second is used if polling (CONFIG_I2C_POLLED=y). + * + ************************************************************************************/ + +#ifndef CONFIG_I2C_POLLED +static inline int stm32_i2c_sem_waitdone(FAR struct stm32_i2c_priv_s *priv) +{ + struct timespec abstime; + irqstate_t flags; + int ret; + + flags = enter_critical_section(); + + /* Enable I2C interrupts */ + + /* The TXIE and RXIE interrupts are enabled initially in stm32_i2c_process. + * The remainder of the interrupts, including error-related, are enabled here. + */ + + stm32_i2c_modifyreg32(priv, STM32_I2C_CR1_OFFSET, 0, + (I2C_CR1_ALLINTS & ~I2C_CR1_TXRX)); + + /* Signal the interrupt handler that we are waiting */ + + priv->intstate = INTSTATE_WAITING; + do + { + /* Get the current time */ + + (void)clock_gettime(CLOCK_REALTIME, &abstime); + + /* Calculate a time in the future */ + +#if CONFIG_STM32F7_I2CTIMEOSEC > 0 + abstime.tv_sec += CONFIG_STM32F7_I2CTIMEOSEC; +#endif + + /* Add a value proportional to the number of bytes in the transfer */ + +#ifdef CONFIG_STM32F7_I2C_DYNTIMEO + abstime.tv_nsec += 1000 * stm32_i2c_tousecs(priv->msgc, priv->msgv); + if (abstime.tv_nsec >= 1000 * 1000 * 1000) + { + abstime.tv_sec++; + abstime.tv_nsec -= 1000 * 1000 * 1000; + } + +#elif CONFIG_STM32F7_I2CTIMEOMS > 0 + abstime.tv_nsec += CONFIG_STM32F7_I2CTIMEOMS * 1000 * 1000; + if (abstime.tv_nsec >= 1000 * 1000 * 1000) + { + abstime.tv_sec++; + abstime.tv_nsec -= 1000 * 1000 * 1000; + } +#endif + /* Wait until either the transfer is complete or the timeout expires */ + + ret = sem_timedwait(&priv->sem_isr, &abstime); + if (ret != OK && errno != EINTR) + { + /* Break out of the loop on irrecoverable errors. This would + * include timeouts and mystery errors reported by sem_timedwait. + * NOTE that we try again if we are awakened by a signal (EINTR). + */ + + break; + } + } + + /* Loop until the interrupt level transfer is complete. */ + + while (priv->intstate != INTSTATE_DONE); + + /* Set the interrupt state back to IDLE */ + + priv->intstate = INTSTATE_IDLE; + + /* Disable I2C interrupts */ + + stm32_i2c_modifyreg32(priv, STM32_I2C_CR1_OFFSET, I2C_CR1_ALLINTS, 0); + + leave_critical_section(flags); + return ret; +} +#else +static inline int stm32_i2c_sem_waitdone(FAR struct stm32_i2c_priv_s *priv) +{ + uint32_t timeout; + uint32_t start; + uint32_t elapsed; + int ret; + + /* Get the timeout value */ + +#ifdef CONFIG_STM32F7_I2C_DYNTIMEO + timeout = USEC2TICK(stm32_i2c_tousecs(priv->msgc, priv->msgv)); +#else + timeout = CONFIG_STM32F7_I2CTIMEOTICKS; +#endif + + /* Signal the interrupt handler that we are waiting. NOTE: Interrupts + * are currently disabled but will be temporarily re-enabled below when + * sem_timedwait() sleeps. + */ + + priv->intstate = INTSTATE_WAITING; + start = clock_systimer(); + + do + { + /* Poll by simply calling the timer interrupt handler until it + * reports that it is done. + */ + + stm32_i2c_isr(priv); + + /* Calculate the elapsed time */ + + elapsed = clock_systimer() - start; + } + + /* Loop until the transfer is complete. */ + + while (priv->intstate != INTSTATE_DONE && elapsed < timeout); + + i2cinfo("intstate: %d elapsed: %d threshold: %d status: 0x%08x\n", + priv->intstate, elapsed, timeout, priv->status); + + /* Set the interrupt state back to IDLE */ + + ret = priv->intstate == INTSTATE_DONE ? OK : -ETIMEDOUT; + priv->intstate = INTSTATE_IDLE; + return ret; +} +#endif + +/************************************************************************************ + * Name: stm32_i2c_set_7bit_address + * + * Description: + * + ************************************************************************************/ + +static inline void +stm32_i2c_set_7bit_address(FAR struct stm32_i2c_priv_s *priv) +{ + stm32_i2c_modifyreg32(priv, STM32_I2C_CR2_OFFSET, I2C_CR2_SADD7_MASK, + ((priv->msgv->addr & 0x7F) << I2C_CR2_SADD7_SHIFT)); +} + +/************************************************************************************ + * Name: stm32_i2c_set_bytes_to_transfer + * + * Description: + * + ************************************************************************************/ + +static inline void +stm32_i2c_set_bytes_to_transfer(FAR struct stm32_i2c_priv_s *priv, + uint8_t n_bytes) +{ + stm32_i2c_modifyreg32(priv, STM32_I2C_CR2_OFFSET, I2C_CR2_NBYTES_MASK, + (n_bytes << I2C_CR2_NBYTES_SHIFT)); +} + +/************************************************************************************ + * Name: stm32_i2c_set_write_transfer_dir + * + * Description: + * + ************************************************************************************/ + +static inline void +stm32_i2c_set_write_transfer_dir(FAR struct stm32_i2c_priv_s *priv) +{ + stm32_i2c_modifyreg32(priv, STM32_I2C_CR2_OFFSET, I2C_CR2_RD_WRN, 0); +} + +/************************************************************************************ + * Name: stm32_i2c_set_read_transfer_dir + * + * Description: + * + ************************************************************************************/ + +static inline void +stm32_i2c_set_read_transfer_dir(FAR struct stm32_i2c_priv_s *priv) +{ + stm32_i2c_modifyreg32(priv, STM32_I2C_CR2_OFFSET, 0, I2C_CR2_RD_WRN); +} + +/************************************************************************************ + * Name: stm32_i2c_enable_reload + * + * Description: + * + ************************************************************************************/ + +static inline void +stm32_i2c_enable_reload(FAR struct stm32_i2c_priv_s *priv) +{ + stm32_i2c_modifyreg32(priv, STM32_I2C_CR2_OFFSET, 0, I2C_CR2_RELOAD); +} + +/************************************************************************************ + * Name: stm32_i2c_disable_reload + * + * Description: + * + ************************************************************************************/ + +static inline void +stm32_i2c_disable_reload(FAR struct stm32_i2c_priv_s *priv) +{ + stm32_i2c_modifyreg32(priv, STM32_I2C_CR2_OFFSET, I2C_CR2_RELOAD, 0); +} + + +/************************************************************************************ + * Name: stm32_i2c_sem_waitstop + * + * Description: + * Wait for a STOP to complete + * + ************************************************************************************/ + +static inline void stm32_i2c_sem_waitstop(FAR struct stm32_i2c_priv_s *priv) +{ + uint32_t start; + uint32_t elapsed; + uint32_t timeout; + uint32_t cr; + uint32_t sr; + + /* Select a timeout */ + +#ifdef CONFIG_STM32F7_I2C_DYNTIMEO + timeout = USEC2TICK(CONFIG_STM32F7_I2C_DYNTIMEO_STARTSTOP); +#else + timeout = CONFIG_STM32F7_I2CTIMEOTICKS; +#endif + + /* Wait as stop might still be in progress */ + + start = clock_systimer(); + do + { + /* Check for STOP condition */ + + cr = stm32_i2c_getreg32(priv, STM32_I2C_CR2_OFFSET); + if ((cr & I2C_CR2_STOP) == 0) + { + return; + } + + /* Check for timeout error */ + + sr = stm32_i2c_getreg(priv, STM32_I2C_ISR_OFFSET); + if ((sr & I2C_INT_TIMEOUT) != 0) + { + return; + } + + /* Calculate the elapsed time */ + + elapsed = clock_systimer() - start; + } + + /* Loop until the stop is complete or a timeout occurs. */ + + while (elapsed < timeout); + + /* If we get here then a timeout occurred with the STOP condition + * still pending. + */ + + i2cinfo("Timeout with CR: %04x SR: %04x\n", cr, sr); +} + +/************************************************************************************ + * Name: stm32_i2c_sem_post + * + * Description: + * Release the mutual exclusion semaphore + * + ************************************************************************************/ + +static inline void stm32_i2c_sem_post(FAR struct i2c_master_s *dev) +{ + sem_post(&((struct stm32_i2c_inst_s *)dev)->priv->sem_excl); +} + +/************************************************************************************ + * Name: stm32_i2c_sem_init + * + * Description: + * Initialize semaphores + * + ************************************************************************************/ + +static inline void stm32_i2c_sem_init(FAR struct i2c_master_s *dev) +{ + sem_init(&((struct stm32_i2c_inst_s *)dev)->priv->sem_excl, 0, 1); +#ifndef CONFIG_I2C_POLLED + sem_init(&((struct stm32_i2c_inst_s *)dev)->priv->sem_isr, 0, 0); +#endif +} + +/************************************************************************************ + * Name: stm32_i2c_sem_destroy + * + * Description: + * Destroy semaphores. + * + ************************************************************************************/ + +static inline void stm32_i2c_sem_destroy(FAR struct i2c_master_s *dev) +{ + sem_destroy(&((struct stm32_i2c_inst_s *)dev)->priv->sem_excl); +#ifndef CONFIG_I2C_POLLED + sem_destroy(&((struct stm32_i2c_inst_s *)dev)->priv->sem_isr); +#endif +} + +/************************************************************************************ + * Name: stm32_i2c_trace* + * + * Description: + * I2C trace instrumentation + * + ************************************************************************************/ + +#ifdef CONFIG_I2C_TRACE +static void stm32_i2c_traceclear(FAR struct stm32_i2c_priv_s *priv) +{ + struct stm32_trace_s *trace = &priv->trace[priv->tndx]; + + trace->status = 0; /* I2C 32-bit status */ + trace->count = 0; /* Interrupt count when status change */ + trace->event = I2CEVENT_NONE; /* Last event that occurred with this status */ + trace->parm = 0; /* Parameter associated with the event */ + trace->time = 0; /* Time of first status or event */ +} + +static void stm32_i2c_tracereset(FAR struct stm32_i2c_priv_s *priv) +{ + /* Reset the trace info for a new data collection */ + + priv->tndx = 0; + priv->start_time = clock_systimer(); + stm32_i2c_traceclear(priv); +} + +static void stm32_i2c_tracenew(FAR struct stm32_i2c_priv_s *priv, + uint32_t status) +{ + struct stm32_trace_s *trace = &priv->trace[priv->tndx]; + + /* Is the current entry uninitialized? Has the status changed? */ + + if (trace->count == 0 || status != trace->status) + { + /* Yes.. Was it the status changed? */ + + if (trace->count != 0) + { + /* Yes.. bump up the trace index (unless we are out of trace entries) */ + + if (priv->tndx >= (CONFIG_I2C_NTRACE-1)) + { + i2cerr("ERROR: Trace table overflow\n"); + return; + } + + priv->tndx++; + trace = &priv->trace[priv->tndx]; + } + + /* Initialize the new trace entry */ + + stm32_i2c_traceclear(priv); + trace->status = status; + trace->count = 1; + trace->time = clock_systimer(); + } + else + { + /* Just increment the count of times that we have seen this status */ + + trace->count++; + } +} + +static void stm32_i2c_traceevent(FAR struct stm32_i2c_priv_s *priv, + enum stm32_trace_e event, uint32_t parm) +{ + struct stm32_trace_s *trace; + + if (event != I2CEVENT_NONE) + { + trace = &priv->trace[priv->tndx]; + + /* Initialize the new trace entry */ + + trace->event = event; + trace->parm = parm; + + /* Bump up the trace index (unless we are out of trace entries) */ + + if (priv->tndx >= (CONFIG_I2C_NTRACE-1)) + { + i2cerr("ERROR: Trace table overflow\n"); + return; + } + + priv->tndx++; + stm32_i2c_traceclear(priv); + } +} + +static void stm32_i2c_tracedump(FAR struct stm32_i2c_priv_s *priv) +{ + struct stm32_trace_s *trace; + int i; + + syslog(LOG_DEBUG, "Elapsed time: %d\n", + clock_systimer() - priv->start_time); + + for (i = 0; i <= priv->tndx; i++) + { + trace = &priv->trace[i]; + syslog(LOG_DEBUG, + "%2d. STATUS: %08x COUNT: %3d EVENT: %2d PARM: %08x TIME: %d\n", + i+1, trace->status, trace->count, trace->event, trace->parm, + trace->time - priv->start_time); + } +} +#endif /* CONFIG_I2C_TRACE */ + +/************************************************************************************ + * Name: stm32_i2c_setclock + * + * Description: + * + * Sets the I2C bus clock frequency by configuring the I2C_TIMINGR register. + * + * This function supports bus clock frequencies of: + * + * 1000Khz (Fast Mode+) + * 400Khz (Fast Mode) + * 100Khz (Standard Mode) + * 10Khz (Standard Mode) + * + * Attempts to set a different frequency will quietly provision the default + * of 10Khz. + * + * The only differences between the various modes of operation (std, fast, + * fast+) are the bus clock speed and setup/hold times. Setup/hold times are + * specified as a MINIMUM time for the given mode, and naturally std mode + * has the longest minimum times. As a result, by provisioning setup/hold + * times for std mode they are also compatible with fast/fast+, though some + * performance degradation occurs in fast/fast+ as a result of the times + * being somewhat longer than strictly required. The values remain as they + * are because reliability is favored over performance. + * + * Clock Selection: + * + * The I2C peripheral clock can be provided by either PCLK1, SYSCLK or the HSI. + * + * PCLK1 >------|\ I2CCLK + * SYSCLK >------| |---------> + * HSI >------|/ + * + * HSI is the default and is always 16Mhz. + * + * SYSCLK can, in turn, be derived from the HSI, HSE, PPLCLK. + * + * HSI >------|\ + * | | SYSCLK + * PLL >------| |---------> + * | | + * HSE >------|/ + * + * + * References: + * + * App Note AN4235 and the associated software STSW-STM32126. + * + ************************************************************************************/ + +static void stm32_i2c_setclock(FAR struct stm32_i2c_priv_s *priv, uint32_t frequency) +{ + uint32_t pe; + uint8_t presc; + uint8_t scl_delay; + uint8_t sda_delay; + uint8_t scl_h_period; + uint8_t scl_l_period; + + if (frequency != priv->frequency) + { + /* I2C peripheral must be disabled to update clocking configuration */ + + pe = (stm32_i2c_getreg32(priv, STM32_I2C_CR1_OFFSET) & I2C_CR1_PE); + if (pe) + { + stm32_i2c_modifyreg32(priv, STM32_I2C_CR1_OFFSET, I2C_CR1_PE, 0); + } + + /* The Sppeed and timing calculation are based on the following + * fI2CCLK = HSI and is 16Mhz + * Analog filter is on, + * Digital filter off + * Rise Time is 120 ns and fall is 10ns + * Mode is FastMode + */ + + if (frequency == 100000) + { + presc = 0; + scl_delay = 3; + sda_delay = 0; + scl_h_period = 30; + scl_l_period = 120; + + } + else if (frequency == 400000) + { + presc = 0; + scl_delay = 3; + sda_delay = 9; + scl_h_period = 6; + scl_l_period = 24; + } + else if (frequency == 1000000) + { + presc = 0; + scl_delay = 2; + sda_delay = 0; + scl_h_period = 1; + scl_l_period = 5; + } + else + { + presc = 7; + scl_delay = 0; + sda_delay = 0; + scl_h_period = 35; + scl_l_period = 162; + } + + uint32_t timingr = + (presc << I2C_TIMINGR_PRESC_SHIFT) | + (scl_delay << I2C_TIMINGR_SCLDEL_SHIFT) | + (sda_delay << I2C_TIMINGR_SDADEL_SHIFT) | + (scl_h_period << I2C_TIMINGR_SCLH_SHIFT) | + (scl_l_period << I2C_TIMINGR_SCLL_SHIFT); + + stm32_i2c_putreg32(priv, STM32_I2C_TIMINGR_OFFSET, timingr); + + if (pe) + { + stm32_i2c_modifyreg32(priv, STM32_I2C_CR1_OFFSET, 0, I2C_CR1_PE); + } + + priv->frequency = frequency; + } +} + +/************************************************************************************ + * Name: stm32_i2c_sendstart + * + * Description: + * Send the START condition / force Master mode + * + * A START condition in I2C consists of a single byte that contains both the + * 7 bit slave address and a read/write bit (0 = WRITE, 1 = READ). If the + * address is recognized by one of the slave devices that slave device will + * ACK the byte so that data transfers can begin. + * + * A RESTART (or repeated START per the I2CSPEC) is simply a START condition + * issued in the middle of a transfer (i.e. after the initial START and before + * a STOP). A RESTART sends a new address byte and R/W bit to the bus. A + * RESTART is optional in most cases but mandatory in the event the transfer + * direction is changed. + * + * Most of the time reading data from an I2C slave requires a WRITE of the + * subaddress followed by a READ (and hence a RESTART in between). Writing + * to an I2C slave typically requires only WRITE operations and hence no + * RESTARTs. + * + * This function is therefore called both at the beginning of a transfer + * (START) and at appropriate times during a transfer (RESTART). + * + ************************************************************************************/ + +static inline void stm32_i2c_sendstart(FAR struct stm32_i2c_priv_s *priv) +{ + /* Flag the first byte as an address byte */ + + priv->astart = true; + + /* Set the private "current message" data used in protocol processing. + * + * ptr: A pointer to the start of the current message buffer. This is + * advanced after each byte in the current message is transferred. + * + * dcnt: A running counter of the bytes in the current message waiting to be + * transferred. This is decremented each time a byte is transferred. + * The hardware normally accepts a maximum of 255 bytes per transfer + * but can support more via the RELOAD mechanism. If dcnt initially + * exceeds 255, the RELOAD mechanism will be enabled automatically. + * + * flags: Used to characterize handling of the current message. + * + * The default flags value is 0 which specifies: + * + * - A transfer direction of WRITE (R/W bit = 0) + * - RESTARTs between all messages + * + * The following flags can be used to override this behavior as follows: + * + * - I2C_M_READ: Sets the transfer direction to READ (R/W bit = 1) + * - I2C_M_NORESTART: Prevents a RESTART from being issued prior to the + * transfer of the message (where allowed by the protocol). + * + */ + + priv->ptr = priv->msgv->buffer; + priv->dcnt = priv->msgv->length; + priv->flags = priv->msgv->flags; + + /* Enabling RELOAD allows the transfer of: + * + * - individual messages with a payload exceeding 255 bytes + * - multiple messages back to back without a RESTART in between + * + * so we enable it if either of those conditions exist and disable + * it otherwise. + */ + + if ((priv->flags & I2C_M_NORESTART) || priv->dcnt > 255) + { + i2cinfo("RELOAD enabled: dcnt = %i msgc = %i\n", + priv->dcnt, priv->msgc); + stm32_i2c_enable_reload(priv); + } + else + { + i2cinfo("RELOAD disable: dcnt = %i msgc = %i\n", + priv->dcnt, priv->msgc); + stm32_i2c_disable_reload(priv); + } + + /* Set the number of bytes to transfer (I2C_CR2->NBYTES) to the number of + * bytes in the current message or 255, whichever is lower so as to not + * exceed the hardware maximum allowed. + */ + + if (priv->dcnt > 255) + { + stm32_i2c_set_bytes_to_transfer(priv, 255); + } + else + { + stm32_i2c_set_bytes_to_transfer(priv, priv->dcnt); + } + + /* Set the (7 bit) address. + * 10 bit addressing is not yet supported. + */ + + stm32_i2c_set_7bit_address(priv); + + /* The flag of the current message is used to determine the direction of + * transfer required for the current message. + */ + + if (priv->flags & I2C_M_READ) + { + stm32_i2c_set_read_transfer_dir(priv); + } + else + { + stm32_i2c_set_write_transfer_dir(priv); + } + + /* Set the I2C_CR2->START bit to 1 to instruct the hardware to send the + * START condition using the address and transfer direction data entered. + */ + + i2cinfo("Sending START: dcnt=%i msgc=%i flags=0x%04x\n", + priv->dcnt, priv->msgc, priv->flags); + + stm32_i2c_modifyreg32(priv, STM32_I2C_CR2_OFFSET, 0, I2C_CR2_START); +} + +/************************************************************************************ + * Name: stm32_i2c_sendstop + * + * Description: + * Send the STOP conditions + * + * A STOP condition can be requested by setting the STOP bit in the I2C_CR2 + * register. Setting the STOP bit clears the TC flag and the STOP condition is + * sent on the bus. + * + ************************************************************************************/ + +static inline void stm32_i2c_sendstop(FAR struct stm32_i2c_priv_s *priv) +{ + i2cinfo("Sending STOP\n"); + stm32_i2c_traceevent(priv, I2CEVENT_WRITE_STOP, 0); + + stm32_i2c_modifyreg32(priv, STM32_I2C_CR2_OFFSET, 0, I2C_CR2_STOP); +} + +/************************************************************************************ + * Name: stm32_i2c_getstatus + * + * Description: + * Get 32-bit status (SR1 and SR2 combined) + * + ************************************************************************************/ + +static inline uint32_t stm32_i2c_getstatus(FAR struct stm32_i2c_priv_s *priv) +{ + return getreg32(priv->config->base + STM32_I2C_ISR_OFFSET); +} + +/************************************************************************************ + * Name: stm32_i2c_clearinterrupts + * + * Description: + * Clear all interrupts + * + ************************************************************************************/ + +static inline void stm32_i2c_clearinterrupts(struct stm32_i2c_priv_s *priv) +{ + stm32_i2c_modifyreg32(priv, STM32_I2C_ICR_OFFSET, 0, I2C_ICR_CLEARMASK); +} + +/************************************************************************************ + * Name: stm32_i2c_isr + * + * Description: + * Common interrupt service routine (ISR) that handles I2C protocol logic. + * This is instantiated for each configured I2C interface (I2C1, I2C2, I2C3). + * + * This ISR is activated and deactivated by: + * + * stm32_i2c_process + * and + * stm32_i2c_waitdone + * + * Input Parameters: + * priv - The private struct of the I2C driver. + * + ************************************************************************************/ + +static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) +{ + uint32_t status; + + /* Get state of the I2C controller */ + + status = stm32_i2c_getreg32(priv, STM32_I2C_ISR_OFFSET); + + i2cinfo("ENTER: status = 0x%08x\n", status); + + /* Update private version of the state */ + + priv->status = status; + + /* If this is a new transmission set up the trace table accordingly */ + + stm32_i2c_tracenew(priv, status); + stm32_i2c_traceevent(priv, I2CEVENT_ISR_CALL, 0); + + /* --------------------- Start of I2C protocol handling -------------------- */ + + /* I2C protocol logic follows. It's organized in an if else chain such that + * only one mode of operation is executed every time the ISR is called. + * + * If you need to add additional states to support new features be sure they + * continue the chain (i.e. begin with "else if") and are placed before the + * empty call / error states at the end of the chain. + */ + + /* NACK Handling + * + * This branch is only triggered when the NACK (Not Acknowledge Received) + * interrupt occurs. This interrupt will only fire when the I2C_CR1->NACKIE + * bit is 1. + * + * I2C_ISR->NACKF is set by hardware when a NACK is received after a byte + * is transmitted and the slave fails to acknowledge it. This is the + * opposite of, and mutually exclusive to, the I2C_ISR->TXIS event. + * + * In response to the NACK the hardware automatically triggers generation + * of a STOP condition, terminating the transfer. The only valid response + * to this state is to exit the ISR and report the failure. + * + * To differentiate an "address NACK" from a NACK that might occur during + * the transfer of other bytes the "priv->astart" parameter is + * used. This flag is set to TRUE in sendstart() and set to FALSE when + * the first TXIS event is received, which would be after the first byte + * (the address) is transmitted successfully (acknowledged). + */ + + if (status & I2C_INT_NACK) + { + + if (priv->astart == true) + { + + /* NACK received on first (address) byte: address is invalid */ + + i2cinfo("NACK: Address invalid: dcnt=%i msgc=%i status=0x%08x\n", + priv->dcnt, priv->msgc, status); + stm32_i2c_traceevent(priv, I2CEVENT_ADDRESS_NACKED, priv->msgv->addr); + } + else + { + /* NACK received on regular byte */ + + i2cinfo("NACK: NACK received: dcnt=%i msgc=%i status=0x%08x\n", + priv->dcnt, priv->msgc, status); + stm32_i2c_traceevent(priv, I2CEVENT_ADDRESS_NACKED, priv->msgv->addr); + } + + /* Set flags to terminate message transmission: + * + * set message length to -1 to indicate last byte of message sent + * set message count to 0 to indicate no more messages to send + * + * As we fall through the logic in the ISR the message handling block + * will be triggered by these flags and signal the ISR to terminate. + */ + + priv->dcnt = -1; + priv->msgc = 0; + } + + /* Transmit Interrupt Status (TXIS) Handler + * + * This branch is only triggered when the TXIS interrupt occurs. This + * interrupt will only fire when the I2C_CR1->TXIE bit is 1. + * + * This indicates the transmit data register I2C_TXDR has been emptied + * following the successful transmission of a byte and slave acknowledgement. + * In this state the I2C_TXDR register is ready to accept another byte for + * transmission. The TXIS bit will be cleared automatically when the next + * byte is written to I2C_TXDR. + * + * The number of TXIS events during the transfer corresponds to NBYTES. + * + * The TXIS flag is not set when a NACK is received. + * + * When RELOAD is disabled (RELOAD=0) and NBYTES data have been transferred: + * + * - In Automatic End Mode (AUTOEND=1), a STOP is automatically sent. + * + * Note: Automatic End Mode is not currently supported. + * + * - In Software End Mode (AUTOEND=0), the TC event occurs and the SCL + * line is stretched low in order to allow software actions (STOP, + * RESTART). + * + * When RELOAD is enabled (RELOAD=1) and NBYTES bytes have been transferred + * a TCR event occurs instead and that handler simply updates NBYTES which + * causes TXIS events to continue. The process repeats until all bytes in + * the message have been transferred. + */ + + else if ((priv->flags & (I2C_M_READ)) == 0 && (status & (I2C_ISR_TXIS)) != 0) + { + + /* TXIS interrupt occurred, address valid, ready to transmit */ + + stm32_i2c_traceevent(priv, I2CEVENT_WRITE, 0); + i2cinfo("TXIS: ENTER dcnt = %i msgc = %i status 0x%08x\n", + priv->dcnt, priv->msgc, status); + + /* The first event after the address byte is sent will be either TXIS + * or NACKF so it's safe to set the astart flag to false on + * the first TXIS event to indicate that it is no longer necessary to + * check for address validity. + */ + + if (priv->astart == true) + { + i2cinfo("TXIS: Address Valid\n"); + stm32_i2c_traceevent(priv, I2CEVENT_ADDRESS_ACKED, priv->msgv->addr); + priv->astart = false; + } + + /* If one or more bytes in the current message are ready to transmit */ + + if (priv->dcnt > 0) + { + /* Prepare to transmit the current byte */ + + stm32_i2c_traceevent(priv, I2CEVENT_WRITE_TO_DR, priv->dcnt); + i2cinfo("TXIS: Write Data 0x%02x\n", *priv->ptr); + + /* Decrement byte counter */ + + priv->dcnt--; + + /* If we are about to transmit the last byte in the current message */ + + if (priv->dcnt == 0) + { + /* If this is also the last message to send, disable RELOAD so + * TC fires next and issues STOP condition. If we don't do this + * TCR will fire next, and since there are no bytes to send we + * can't write NBYTES to clear TCR so it will fire forever. + */ + + if ((priv->msgc - 1) == 0) + { + stm32_i2c_disable_reload(priv); + } + } + + /* Transmit current byte */ + + stm32_i2c_putreg(priv, STM32_I2C_TXDR_OFFSET, *priv->ptr); + + /* Advance to next byte */ + + priv->ptr++; + } + else + { + /* Unsupported state */ + + i2cerr("ERROR: TXIS Unsupported state detected, dcnt=%i, status 0x%08x\n", + priv->dcnt, status); + stm32_i2c_traceevent(priv, I2CEVENT_WRITE_ERROR, 0); + } + + i2cinfo("TXIS: EXIT dcnt = %i msgc = %i status 0x%08x\n", + priv->dcnt, priv->msgc, status); + } + + /* Receive Buffer Not Empty (RXNE) State Handler + * + * This branch is only triggered when the RXNE interrupt occurs. This + * interrupt will only fire when the I2C_CR1->RXIE bit is 1. + * + * This indicates data has been received from the bus and is waiting to + * be read from the I2C_RXDR register. When I2C_RXDR is read this bit + * is automatically cleared and then an ACK or NACK is sent depending on + * whether we have more bytes to receive. + * + * When RELOAD is disabled and bytes remain to be transferred an acknowledge + * is automatically sent on the bus and the RXNE events continue until the + * last byte is received. + * + * When RELOAD is disabled (RELOAD=0) and BYTES have been transferred: + * + * - In Automatic End Mode (AUTOEND=1), a NACK and a STOP are automatically + * sent after the last received byte. + * + * Note: Automatic End Mode is not currently supported. + * + * - In Software End Mode (AUTOEND=0), a NACK is automatically sent after + * the last received byte, the TC event occurs and the SCL line is + * stretched low in order to allow software actions (STOP, RESTART). + * + * When RELOAD is enabled (RELOAD=1) and NBYTES bytes have been transferred + * a TCR event occurs and that handler simply updates NBYTES which causes + * RXNE events to continue until all bytes have been transferred. + */ + + else if ((priv->flags & (I2C_M_READ)) != 0 && (status & I2C_ISR_RXNE) != 0) + { + /* When read flag is set and the receive buffer is not empty + * (RXNE is set) then the driver can read from the data register. + */ + + stm32_i2c_traceevent(priv, I2CEVENT_READ, 0); + i2cinfo("RXNE: ENTER dcnt = %i msgc = %i status 0x%08x\n", + priv->dcnt, priv->msgc, status); + + /* If more bytes in the current message */ + + if (priv->dcnt > 0) + { + stm32_i2c_traceevent(priv, I2CEVENT_RCVBYTE, priv->dcnt); + + /* No interrupts or context switches may occur in the following + * sequence. Otherwise, additional bytes may be received. + */ + +#ifdef CONFIG_I2C_POLLED + irqstate_t state = enter_critical_section(); +#endif + /* Receive a byte */ + + *priv->ptr = stm32_i2c_getreg(priv, STM32_I2C_RXDR_OFFSET); + + i2cinfo("RXNE: Read Data 0x%02x\n", *priv->ptr); + + /* Advance buffer to the next byte in the message */ + + priv->ptr++; + + /* Signal byte received */ + + priv->dcnt--; + +#ifdef CONFIG_I2C_POLLED + leave_critical_section(state); +#endif + } + else + { + /* Unsupported state */ + + stm32_i2c_traceevent(priv, I2CEVENT_READ_ERROR, 0); + status = stm32_i2c_getreg(priv, STM32_I2C_ISR_OFFSET); + i2cerr("ERROR: RXNE Unsupported state detected, dcnt=%i, status 0x%08x\n", + priv->dcnt, status); + + /* Set signals that will terminate ISR and wake waiting thread */ + + priv->dcnt = -1; + priv->msgc = 0; + } + + i2cinfo("RXNE: EXIT dcnt = %i msgc = %i status 0x%08x\n", + priv->dcnt, priv->msgc, status); + } + + /* Transfer Complete (TC) State Handler + * + * This branch is only triggered when the TC interrupt occurs. This + * interrupt will only fire when: + * + * I2C_CR1->TCIE = 1 (Transfer Complete Interrupts Enabled) + * I2C_CR2->RELOAD = 0 (Reload Mode Disabled) + * I2C_CR2->AUTOEND = 0 (Autoend Mode Disabled, i.e. Software End Mode) + * + * This event indicates that the number of bytes initially defined + * in NBYTES, meaning, the number of bytes in the current message (priv->dcnt) + * has been successfully transmitted or received. + * + * When the TC interrupt occurs we have two choices to clear it and move + * on, regardless of the transfer direction: + * + * - if more messages follow, perform a repeated START if required + * and then fall through to transmit or receive the next message. + * + * - if no messages follow, perform a STOP and set flags needed to + * exit the ISR. + * + * The fact that the hardware must either RESTART or STOP when a TC + * event occurs explains why, when messages must be sent back to back + * (i.e. without a restart by specifying the I2C_M_NORESTART flag), + * RELOAD mode must be enabled and TCR event(s) must be generated + * instead. See the TCR handler for more. + */ + + else if ((status & I2C_ISR_TC) != 0) + { + i2cinfo("TC: ENTER dcnt = %i msgc = %i status 0x%08x\n", + priv->dcnt, priv->msgc, status); + + /* Prior message has been sent successfully */ + + priv->msgc--; + + /* if additional messages remain to be transmitted / received */ + + if (priv->msgc > 0) + { + i2cinfo("TC: RESTART: dcnt=%i, msgc=%i\n", + priv->dcnt, priv->msgc); + stm32_i2c_traceevent(priv, I2CEVENT_TC_NO_RESTART, priv->msgc); + + /* Issue a START condition. + * + * Note that the first thing sendstart does is update the + * private structure "current message" data (ptr, dcnt, flags) + * so they all reflect the next message in the list so we + * update msgv before we get there. + */ + + /* Advance to the next message in the list */ + + priv->msgv++; + + stm32_i2c_sendstart(priv); + + } + else + { + /* Issue a STOP conditions. + * + * No additional messages to transmit / receive, so the + * transfer is indeed complete. Nothing else to do but + * issue a STOP and exit. + */ + + i2cinfo("TC: STOP: dcnt=%i msgc=%i\n", + priv->dcnt, priv->msgc); + stm32_i2c_traceevent(priv, I2CEVENT_STOP, priv->dcnt); + + stm32_i2c_sendstop(priv); + + /* Set signals that will terminate ISR and wake waiting thread */ + + priv->dcnt = -1; + priv->msgc = 0; + } + + i2cinfo("TC: EXIT dcnt = %i msgc = %i status 0x%08x\n", + priv->dcnt, priv->msgc, status); + } + + /* Transfer Complete (Reload) State Handler + * + * This branch is only triggered when the TCR interrupt occurs. This + * interrupt will only fire when: + * + * I2C_CR1->TCIE = 1 (Transfer Complete Interrupts Enabled) + * I2C_CR2->RELOAD = 1 (Reload Mode Active) + * I2C_CR2->AUTOEND = 0 (Autoend Mode Disabled, i.e. Software End Mode) + * + * This is similar to the TC event except that TCR assumes that additional + * bytes are available to transfer. So despite what its name might imply + * the transfer really isn't complete. + * + * There are two reasons RELOAD would be enabled: + * + * 1) We're trying to send a message with a payload greater than 255 bytes. + * 2) We're trying to send messages back to back, regardless of their + * payload size, to avoid a RESTART (i.e. I2C_M_NORESTART flag is set). + * + * These conditions may be true simultaneously, as would be the case if + * we're sending multiple messages with payloads > 255 bytes. So we only + * advance to the next message if we arrive here and dcnt is 0, meaning, + * we're finished with the last message and ready to move to the next. + * + * This logic supports the transfer of bytes limited only by the size of + * the i2c_msg_s length variable. The SCL line will be stretched low + * until NBYTES is written with a non-zero value, allowing the transfer + * to continue. + * + * TODO: RESTARTs are required by the I2CSPEC if the next message transfer + * direction changes. Right now the NORESTART flag overrides this behavior. + * May have to introduce logic to issue sendstart, assuming it's legal + * with the hardware in the TCR state. + */ + + else if ((status & I2C_ISR_TCR) != 0) + { + i2cinfo("TCR: ENTER dcnt = %i msgc = %i status 0x%08x\n", + priv->dcnt, priv->msgc, status); + + /* If no more bytes in the current message to transfer */ + + if (priv->dcnt == 0) + { + /* Prior message has been sent successfully */ + + priv->msgc--; + + /* Advance to the next message in the list */ + + priv->msgv++; + + /* Update current message data */ + + priv->ptr = priv->msgv->buffer; + priv->dcnt = priv->msgv->length; + priv->flags = priv->msgv->flags; + + /* if this is the last message, disable reload so the + * TC event fires next time */ + + if (priv->msgc == 0) + { + i2cinfo("TCR: DISABLE RELOAD: dcnt = %i msgc = %i\n", + priv->dcnt, priv->msgc); + + stm32_i2c_disable_reload(priv); + } + + /* Update NBYTES with length of current message */ + + i2cinfo("TCR: NEXT MSG dcnt = %i msgc = %i\n", + priv->dcnt, priv->msgc); + + stm32_i2c_set_bytes_to_transfer(priv, priv->dcnt); + } + else + { + /* More bytes in the current (greater than 255 byte payload + * length) message, so set NBYTES according to the bytes + * remaining in the message, up to a maximum each cycle of 255. + */ + + if (priv->dcnt > 255) + { + i2cinfo("TCR: ENABLE RELOAD: NBYTES = 255 dcnt = %i msgc = %i\n", + priv->dcnt, priv->msgc); + + /* More than 255 bytes to transfer so the RELOAD bit is + * set in order to generate a TCR event rather than a TC + * event when 255 bytes are successfully transferred. + * This forces us to return here to update NBYTES and + * continue until NBYTES is set to less than 255 bytes, + * at which point RELOAD will be disabled and a TC + * event will (eventually) follow to officially terminate + * the transfer. + */ + + stm32_i2c_enable_reload(priv); + + stm32_i2c_set_bytes_to_transfer(priv, 255); + } + else + { + /* Less than 255 bytes left to transfer, which means we'll + * complete the transfer of all bytes in the current message + * the next time around. + * + * This means we need to disable the RELOAD functionality so + * we receive a TC event next time which will allow us to + * either RESTART and continue sending the contents of the + * next message or send a STOP condition and exit the ISR. + */ + + i2cinfo("TCR: DISABLE RELOAD: NBYTES = dcnt = %i msgc = %i\n", + priv->dcnt, priv->msgc); + + stm32_i2c_disable_reload(priv); + + stm32_i2c_set_bytes_to_transfer(priv, priv->dcnt); + } + + i2cinfo("TCR: EXIT dcnt = %i msgc = %i status 0x%08x\n", + priv->dcnt, priv->msgc, status); + } + } + + /* Empty call handler + * + * Case to handle an empty call to the ISR where it has nothing to + * do and should exit immediately. + */ + + else if (priv->dcnt == -1 && priv->msgc == 0) + { + status = stm32_i2c_getreg(priv, STM32_I2C_ISR_OFFSET); + i2cwarn("WARNING: EMPTY CALL: Stopping ISR: status 0x%08x\n", status); + stm32_i2c_traceevent(priv, I2CEVENT_ISR_EMPTY_CALL, 0); + } + + /* Error handler + * + * We get to this branch only if we can't handle the current state. + * + * This should not happen in interrupt based operation. + * + * This will happen during polled operation when the device is not + * in one of the supported states when polled. + */ + + else + { +#ifdef CONFIG_I2C_POLLED + stm32_i2c_traceevent(priv, I2CEVENT_POLL_DEV_NOT_RDY, 0); +#else + /* Read rest of the state */ + + status = stm32_i2c_getreg(priv, STM32_I2C_ISR_OFFSET); + + i2cerr("ERROR: Invalid state detected, status 0x%08x\n", status); + + /* set condition to terminate ISR and wake waiting thread */ + + priv->dcnt = -1; + priv->msgc = 0; + stm32_i2c_traceevent(priv, I2CEVENT_STATE_ERROR, 0); +#endif + } + + /* --------------------- End of I2C protocol handling -------------------- */ + + /* Message Handling + * + * Transmission of the whole message chain has been completed. We have to + * terminate the ISR and wake up stm32_i2c_process() that is waiting for + * the ISR cycle to handle the sending/receiving of the messages. + */ + + if (priv->dcnt == -1 && priv->msgc == 0) + { + i2cinfo("MSG: Shutting down I2C ISR\n"); + + stm32_i2c_traceevent(priv, I2CEVENT_ISR_SHUTDOWN, 0); + + /* clear pointer to message content to reflect we are done + * with the current transaction */ + + priv->msgv = NULL; + +#ifdef CONFIG_I2C_POLLED + priv->intstate = INTSTATE_DONE; +#else + + status = stm32_i2c_getreg32(priv, STM32_I2C_ISR_OFFSET); + + /* Update private state to capture NACK which is used in combination + * with the astart flag to report the type of NACK received (address + * vs data) to the upper layers once we exit the ISR. + * + * Note: We do this prior to clearing interrupts because the NACKF + * flag will naturally be cleared by that process. + */ + + priv->status = status; + + /* Clear all interrupts */ + + stm32_i2c_modifyreg32(priv, STM32_I2C_ICR_OFFSET, 0, I2C_ICR_CLEARMASK); + + /* If a thread is waiting then inform it transfer is complete */ + + if (priv->intstate == INTSTATE_WAITING) + { + sem_post(&priv->sem_isr); + priv->intstate = INTSTATE_DONE; + } +#endif + } + + status = stm32_i2c_getreg32(priv, STM32_I2C_ISR_OFFSET); + i2cinfo("EXIT: status = 0x%08x\n", status); + + return OK; +} + +/************************************************************************************ + * Name: stm32_i2c1_isr + * + * Description: + * I2C1 interrupt service routine + * + ************************************************************************************/ + +#ifndef CONFIG_I2C_POLLED +# ifdef CONFIG_STM32F7_I2C1 +static int stm32_i2c1_isr(int irq, void *context) +{ + return stm32_i2c_isr(&stm32_i2c1_priv); +} +# endif + +/************************************************************************************ + * Name: stm32_i2c2_isr + * + * Description: + * I2C2 interrupt service routine + * + ************************************************************************************/ + +# ifdef CONFIG_STM32F7_I2C2 +static int stm32_i2c2_isr(int irq, void *context) +{ + return stm32_i2c_isr(&stm32_i2c2_priv); +} +# endif + +/************************************************************************************ + * Name: stm32_i2c3_isr + * + * Description: + * I2C2 interrupt service routine + * + ************************************************************************************/ + +# ifdef CONFIG_STM32F7_I2C3 +static int stm32_i2c3_isr(int irq, void *context) +{ + return stm32_i2c_isr(&stm32_i2c3_priv); +} +# endif + +/************************************************************************************ + * Name: stm32_i2c4_isr + * + * Description: + * I2C2 interrupt service routine + * + ************************************************************************************/ + +# ifdef CONFIG_STM32F7_I2C4 +static int stm32_i2c4_isr(int irq, void *context) +{ + return stm32_i2c_isr(&stm32_i2c4_priv); +} +# endif +#endif + +/************************************************************************************ + * Private Initialization and Deinitialization + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32_i2c_init + * + * Description: + * Setup the I2C hardware, ready for operation with defaults + * + ************************************************************************************/ + +static int stm32_i2c_init(FAR struct stm32_i2c_priv_s *priv) +{ + /* Power-up and configure GPIOs */ + + /* Enable power and reset the peripheral */ + + modifyreg32(STM32_RCC_APB1ENR, 0, priv->config->clk_bit); + modifyreg32(STM32_RCC_APB1RSTR, 0, priv->config->reset_bit); + modifyreg32(STM32_RCC_APB1RSTR, priv->config->reset_bit, 0); + + /* Configure pins */ + + if (stm32_configgpio(priv->config->scl_pin) < 0) + { + return ERROR; + } + + if (stm32_configgpio(priv->config->sda_pin) < 0) + { + stm32_unconfiggpio(priv->config->scl_pin); + return ERROR; + } + +#ifndef CONFIG_I2C_POLLED + /* Attach error and event interrupts to the ISRs */ + + irq_attach(priv->config->ev_irq, priv->config->isr); + irq_attach(priv->config->er_irq, priv->config->isr); + up_enable_irq(priv->config->ev_irq); + up_enable_irq(priv->config->er_irq); +#endif + + /* TODO: + * - Provide means to set peripheral clock source via RCC_CFGR3_I2CxSW + * - Set to HSI by default, make Kconfig option + */ + + stm32_i2c_setclock(priv, 100000); + + /* Enable I2C peripheral */ + + stm32_i2c_modifyreg32(priv, STM32_I2C_CR1_OFFSET, 0, I2C_CR1_PE); + + return OK; +} + +/************************************************************************************ + * Name: stm32_i2c_deinit + * + * Description: + * Shutdown the I2C hardware + * + ************************************************************************************/ + +static int stm32_i2c_deinit(FAR struct stm32_i2c_priv_s *priv) +{ + /* Disable I2C */ + + stm32_i2c_putreg32(priv, STM32_I2C_CR1_OFFSET, 0); + + /* Unconfigure GPIO pins */ + + stm32_unconfiggpio(priv->config->scl_pin); + stm32_unconfiggpio(priv->config->sda_pin); + +#ifndef CONFIG_I2C_POLLED + + /* Disable and detach interrupts */ + + up_disable_irq(priv->config->ev_irq); + up_disable_irq(priv->config->er_irq); + irq_detach(priv->config->ev_irq); + irq_detach(priv->config->er_irq); +#endif + + /* Disable clocking */ + + modifyreg32(STM32_RCC_APB1ENR, priv->config->clk_bit, 0); + + return OK; +} + +/************************************************************************************ + * Name: stm32_i2c_process + * + * Description: + * Common I2C transfer logic + * + * Initiates a master mode transaction on the I2C bus to transfer the provided + * messages to and from the slave devices. + * + ************************************************************************************/ + +static int stm32_i2c_process(FAR struct i2c_master_s *dev, FAR struct i2c_msg_s *msgs, int count) +{ + struct stm32_i2c_inst_s *inst = (struct stm32_i2c_inst_s *)dev; + FAR struct stm32_i2c_priv_s *priv = inst->priv; + uint32_t status = 0; + uint32_t cr1; + uint32_t cr2; + int errval = 0; + int waitrc = 0; + + ASSERT(count); + + /* Wait for any STOP in progress */ + + stm32_i2c_sem_waitstop(priv); + + /* Clear any pending error interrupts */ + + stm32_i2c_clearinterrupts(priv); + + /* Old transfers are done */ + + priv->msgv = msgs; + priv->msgc = count; + + /* Reset I2C trace logic */ + + stm32_i2c_tracereset(priv); + + /* Set I2C clock frequency (on change it toggles I2C_CR1_PE !) */ + + stm32_i2c_setclock(priv, msgs->frequency); + + /* Trigger start condition, then the process moves into the ISR. I2C + * interrupts will be enabled within stm32_i2c_waitdone(). + */ + + priv->status = 0; + +#ifndef CONFIG_I2C_POLLED + /* Enable transmit and receive interrupts here so when we send the start + * condition below the ISR will fire if the data was sent and some + * response from the slave received. All other interrupts relevant to + * our needs are enabled in stm32_i2c_sem_waitdone() below. + */ + + stm32_i2c_enableinterrupts(priv); +#endif + + /* Trigger START condition generation, which also sends the slave address + * with read/write flag and the data in the first message + */ + + stm32_i2c_sendstart(priv); + + /* Wait for the ISR to tell us that the transfer is complete by attempting + * to grab the semaphore that is initially locked by the ISR. If the ISR + * does not release the lock so we can obtain it here prior to the end of + * the timeout period waitdone returns error and we report a timeout. + */ + + waitrc = stm32_i2c_sem_waitdone(priv); + + cr1 = stm32_i2c_getreg32(priv, STM32_I2C_CR1_OFFSET); + cr2 = stm32_i2c_getreg32(priv, STM32_I2C_CR2_OFFSET); +#if !defined(CONFIG_DEBUG_I2C) + UNUSED(cr1); + UNUSED(cr2); +#endif + + /* Status after a normal / good exit is usually 0x00000001, meaning the TXE + * bit is set. That occurs as a result of the I2C_TXDR register being + * empty, and it naturally will be after the last byte is transmitted. + * This bit is cleared when we attempt communications again and re-enable + * the peripheral. The priv->status field can hold additional information + * like a NACK, so we reset the status field to include that information. + */ + + status = stm32_i2c_getstatus(priv); + + /* The priv->status field can hold additional information like a NACK + * event so we include that information. + */ + + status = priv->status & 0xffffffff; + + if (waitrc < 0) + { + /* Connection timed out */ + + errval = ETIMEDOUT; + i2cerr("ERROR: Waitdone timed out CR1: 0x%08x CR2: 0x%08x status: 0x%08x\n", + cr1, cr2,status); + } + else + { + i2cinfo("Waitdone success: CR1: 0x%08x CR2: 0x%08x status: 0x%08x\n", + cr1, cr2,status ); + } + + UNUSED(cr1); + UNUSED(cr2); + + i2cinfo("priv->status: 0x%08x\n", priv->status); + + /* Check for error status conditions */ + + if ((status & (I2C_INT_BERR | + I2C_INT_ARLO | + I2C_INT_OVR | + I2C_INT_PECERR | + I2C_INT_TIMEOUT | + I2C_INT_NACK)) != 0) + + { + /* one or more errors in the mask are present */ + + if (status & I2C_INT_BERR) + { + /* Bus Error, ignore it because of errata (revision A,Z) */ + + i2cerr("ERROR: I2C Bus Error\n"); + + /* errval = EIO; */ + } + else if (status & I2C_INT_ARLO) + { + /* Arbitration Lost (master mode) */ + + i2cerr("ERROR: I2C Arbitration Lost\n"); + errval = EAGAIN; + } + + else if (status & I2C_INT_OVR) + { + /* Overrun/Underrun */ + + i2cerr("ERROR: I2C Overrun/Underrun\n"); + errval = EIO; + } + else if (status & I2C_INT_PECERR) + { + /* PEC Error in reception (SMBus Only) */ + + i2cerr("ERROR: I2C PEC Error\n"); + errval = EPROTO; + } + else if (status & I2C_INT_TIMEOUT) + { + /* Timeout or Tlow Error (SMBus Only) */ + + i2cerr("ERROR: I2C Timeout / Tlow Error\n"); + errval = ETIME; + } + else if (status & I2C_INT_NACK) + { + /* NACK Received, flag as "communication error on send" */ + + if (priv->astart == TRUE) + { + i2cwarn("WARNING: I2C Address NACK\n"); + errval = EADDRNOTAVAIL; + } + else + { + i2cwarn("WARNING: I2C Data NACK\n"); + errval = ECOMM; + } + } + else + { + /* Unrecognized error */ + + i2cerr("ERROR: I2C Unrecognized Error"); + errval = EINTR; + } + } + + /* This is not an error, but should not happen. The BUSY signal can be + * present if devices on the bus are in an odd state and need to be reset. + * NOTE: We will only see this busy indication if stm32_i2c_sem_waitdone() + * fails above; Otherwise it is cleared. + */ + + else if ((status & I2C_ISR_BUSY) != 0) + { + /* I2C Bus Busy + * + * This is a status condition rather than an error. + * + * We will only see this busy indication if stm32_i2c_sem_waitdone() + * fails above; Otherwise it is cleared by the hardware when the ISR + * wraps up the transfer with a STOP condition. + */ + + uint32_t start = clock_systimer(); + uint32_t timeout = USEC2TICK(USEC_PER_SEC/priv->frequency) + 1; + + status = stm32_i2c_getstatus(priv); + + while(status & I2C_ISR_BUSY) + { + if((clock_systimer() - start) > timeout) + { + i2cerr("ERROR: I2C Bus busy"); + errval = EBUSY; + break; + } + + status = stm32_i2c_getstatus(priv); + } + } + + /* Dump the trace result */ + + stm32_i2c_tracedump(priv); + stm32_i2c_sem_post(dev); + + return -errval; +} + +/************************************************************************************ + * Name: stm32_i2c_transfer + * + * Description: + * Generic I2C transfer function + * + ************************************************************************************/ + +static int stm32_i2c_transfer(FAR struct i2c_master_s *dev, FAR struct i2c_msg_s *msgs, + int count) +{ + stm32_i2c_sem_wait(dev); /* ensure that address or flags don't change meanwhile */ + return stm32_i2c_process(dev, msgs, count); +} + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: up_i2cinitialize + * + * Description: + * Initialize one I2C bus + * + ************************************************************************************/ + +FAR struct i2c_master_s *stm32_i2cbus_initialize(int port) +{ + struct stm32_i2c_priv_s * priv = NULL; /* private data of device with multiple instances */ + struct stm32_i2c_inst_s * inst = NULL; /* device, single instance */ + int irqs; + +#if STM32_HSI_FREQUENCY != 16000000 || defined(INVALID_CLOCK_SOURCE) +# warning STM32_I2C_INIT: Peripheral clock is HSI and it must be 16mHz or the speed/timing calculations need to be redone. + return NULL; +#endif + + /* Get I2C private structure */ + + switch (port) + { +#ifdef CONFIG_STM32F7_I2C1 + case 1: + priv = (struct stm32_i2c_priv_s *)&stm32_i2c1_priv; + break; +#endif +#ifdef CONFIG_STM32F7_I2C2 + case 2: + priv = (struct stm32_i2c_priv_s *)&stm32_i2c2_priv; + break; +#endif +#ifdef CONFIG_STM32F7_I2C3 + case 3: + priv = (struct stm32_i2c_priv_s *)&stm32_i2c3_priv; + break; +#endif +#ifdef CONFIG_STM32F7_I2C4 + case 4: + priv = (struct stm32_i2c_priv_s *)&stm32_i2c4_priv; + break; +#endif + default: + return NULL; + } + + /* Allocate instance */ + + if (!(inst = kmm_malloc(sizeof(struct stm32_i2c_inst_s)))) + { + return NULL; + } + + /* Initialize instance */ + + inst->ops = &stm32_i2c_ops; + inst->priv = priv; + + /* Init private data for the first time, increment refs count, + * power-up hardware and configure GPIOs. + */ + + irqs = enter_critical_section(); + + if ((volatile int)priv->refs++ == 0) + { + stm32_i2c_sem_init((struct i2c_master_s *)inst); + stm32_i2c_init(priv); + } + + leave_critical_section(irqs); + return (struct i2c_master_s *)inst; +} + +/************************************************************************************ + * Name: up_i2cuninitialize + * + * Description: + * Uninitialize an I2C bus + * + ************************************************************************************/ + +int stm32_i2cbus_uninitialize(FAR struct i2c_master_s * dev) +{ + int irqs; + + ASSERT(dev); + + /* Decrement refs and check for underflow */ + + if (((struct stm32_i2c_inst_s *)dev)->priv->refs == 0) + { + return ERROR; + } + + irqs = enter_critical_section(); + + if (--((struct stm32_i2c_inst_s *)dev)->priv->refs) + { + leave_critical_section(irqs); + kmm_free(dev); + return OK; + } + + leave_critical_section(irqs); + + /* Disable power and other HW resource (GPIO's) */ + + stm32_i2c_deinit(((struct stm32_i2c_inst_s *)dev)->priv); + + /* Release unused resources */ + + stm32_i2c_sem_destroy((struct i2c_master_s *)dev); + + kmm_free(dev); + return OK; +} + +/************************************************************************************ + * Name: stm32_i2c_reset + * + * Description: + * Reset an I2C bus + * + ************************************************************************************/ + +#ifdef CONFIG_I2C_RESET +int stm32_i2c_reset(FAR struct i2c_master_s * dev) +{ + struct stm32_i2c_priv_s * priv; + unsigned int clock_count; + unsigned int stretch_count; + uint32_t scl_gpio; + uint32_t sda_gpio; + int ret = ERROR; + + ASSERT(dev); + + /* Get I2C private structure */ + + priv = ((struct stm32_i2c_inst_s *)dev)->priv; + + /* Our caller must own a ref */ + + ASSERT(priv->refs > 0); + + /* Lock out other clients */ + + stm32_i2c_sem_wait(dev); + + /* De-init the port */ + + stm32_i2c_deinit(priv); + + /* Use GPIO configuration to un-wedge the bus */ + + scl_gpio = MKI2C_OUTPUT(priv->config->scl_pin); + sda_gpio = MKI2C_OUTPUT(priv->config->sda_pin); + + /* Let SDA go high */ + + stm32_gpiowrite(sda_gpio, 1); + + /* Clock the bus until any slaves currently driving it let it go. */ + + clock_count = 0; + while (!stm32_gpioread(sda_gpio)) + { + /* Give up if we have tried too hard */ + + if (clock_count++ > 10) + { + goto out; + } + + /* Sniff to make sure that clock stretching has finished. + * + * If the bus never relaxes, the reset has failed. + */ + + stretch_count = 0; + while (!stm32_gpioread(scl_gpio)) + { + /* Give up if we have tried too hard */ + + if (stretch_count++ > 10) + { + goto out; + } + + up_udelay(10); + } + + /* Drive SCL low */ + + stm32_gpiowrite(scl_gpio, 0); + up_udelay(10); + + /* Drive SCL high again */ + + stm32_gpiowrite(scl_gpio, 1); + up_udelay(10); + } + + /* Generate a start followed by a stop to reset slave + * state machines. + */ + + stm32_gpiowrite(sda_gpio, 0); + up_udelay(10); + stm32_gpiowrite(scl_gpio, 0); + up_udelay(10); + stm32_gpiowrite(scl_gpio, 1); + up_udelay(10); + stm32_gpiowrite(sda_gpio, 1); + up_udelay(10); + + /* Revert the GPIO configuration. */ + + stm32_unconfiggpio(sda_gpio); + stm32_unconfiggpio(scl_gpio); + + /* Re-init the port */ + + stm32_i2c_init(priv); + ret = OK; + +out: + + /* Release the port for re-use by other clients */ + + stm32_i2c_sem_post(dev); + return ret; +} +#endif /* CONFIG_I2C_RESET */ + +#endif /* CONFIG_STM32F7_I2C1 || CONFIG_STM32F7_I2C2 || CONFIG_STM32F7_I2C3 */ diff --git a/arch/arm/src/stm32f7/stm32_i2c.h b/arch/arm/src/stm32f7/stm32_i2c.h new file mode 100644 index 0000000000000000000000000000000000000000..c5608176387158c74c643c7d56f6c2606c1af5e6 --- /dev/null +++ b/arch/arm/src/stm32f7/stm32_i2c.h @@ -0,0 +1,104 @@ +/**************************************************************************** + * arch/arm/src/stm32f7/stm32_i2c.h + * + * Copyright (C) 2009, 2011, 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. + * + ****************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32F7_STM32F7_I2C_H +#define __ARCH_ARM_SRC_STM32F7_STM32F7_I2C_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include + +#include "chip.h" +#include "chip/stm32_i2c.h" + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* If a dynamic timeout is selected, then a non-negative, non-zero micro- + * seconds per byte value must be provided as well. + */ + +#ifdef CONFIG_STM32F7_I2C_DYNTIMEO +# if CONFIG_STM32F7_I2C_DYNTIMEO_USECPERBYTE < 1 +# warning "Ignoring CONFIG_STM32F7_I2C_DYNTIMEO because of CONFIG_STM32F7_I2C_DYNTIMEO_USECPERBYTE" +# undef CONFIG_STM32F7_I2C_DYNTIMEO +# endif +#endif + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_i2cbus_initialize + * + * Description: + * Initialize the selected I2C port. And return a unique instance of struct + * struct i2c_master_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 I2C interfaces) + * + * Returned Value: + * Valid I2C device structure reference on succcess; a NULL on failure + * + ****************************************************************************/ + +FAR struct i2c_master_s *stm32_i2cbus_initialize(int port); + +/**************************************************************************** + * Name: stm32_i2cbus_uninitialize + * + * Description: + * De-initialize the selected I2C port, and power down the device. + * + * Input Parameter: + * Device structure as returned by the stm32_i2cbus_initialize() + * + * Returned Value: + * OK on success, ERROR when internal reference count mismatch or dev + * points to invalid hardware device. + * + ****************************************************************************/ + +int stm32_i2cbus_uninitialize(FAR struct i2c_master_s *dev); + +#endif /* __ARCH_ARM_SRC_STM32F7_STM32F7_I2C_H */ diff --git a/arch/arm/src/stm32f7/stm32_irq.c b/arch/arm/src/stm32f7/stm32_irq.c index a52e3e56d934e02eb24a8b92f79d32bb1960e1b4..eb7a8e1b868399ee96bd2a03216db11fbc34be50 100644 --- a/arch/arm/src/stm32f7/stm32_irq.c +++ b/arch/arm/src/stm32f7/stm32_irq.c @@ -110,62 +110,64 @@ extern uint32_t _vectors[]; * ****************************************************************************/ -#if defined(CONFIG_DEBUG_IRQ) +#if defined(CONFIG_DEBUG_IRQ_INFO) static void stm32_dumpnvic(const char *msg, int irq) { irqstate_t flags; flags = enter_critical_section(); - lldbg("NVIC (%s, irq=%d):\n", msg, irq); - lldbg(" INTCTRL: %08x VECTAB: %08x\n", - getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB)); + + irqinfo("NVIC (%s, irq=%d):\n", msg, irq); + irqinfo(" INTCTRL: %08x VECTAB: %08x\n", + getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB)); #if 0 - lldbg(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n", - getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA), - getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE)); + irqinfo(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n", + getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA), + getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE)); #endif - lldbg(" IRQ ENABLE: %08x %08x %08x\n", - getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE), - getreg32(NVIC_IRQ64_95_ENABLE)); - lldbg(" SYSH_PRIO: %08x %08x %08x\n", - getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY), - getreg32(NVIC_SYSH12_15_PRIORITY)); - lldbg(" IRQ PRIO: %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY), - getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY)); + irqinfo(" IRQ ENABLE: %08x %08x %08x\n", + getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE), + getreg32(NVIC_IRQ64_95_ENABLE)); + irqinfo(" SYSH_PRIO: %08x %08x %08x\n", + getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY), + getreg32(NVIC_SYSH12_15_PRIORITY)); + irqinfo(" IRQ PRIO: %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY), + getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY)); #if NR_INTERRUPTS > 15 - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY), - getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY), + getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY)); #endif #if NR_INTERRUPTS > 31 - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY), - getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY), + getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY)); #endif #if NR_INTERRUPTS > 47 - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ48_51_PRIORITY), getreg32(NVIC_IRQ52_55_PRIORITY), - getreg32(NVIC_IRQ56_59_PRIORITY), getreg32(NVIC_IRQ60_63_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ48_51_PRIORITY), getreg32(NVIC_IRQ52_55_PRIORITY), + getreg32(NVIC_IRQ56_59_PRIORITY), getreg32(NVIC_IRQ60_63_PRIORITY)); #endif #if NR_INTERRUPTS > 63 - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ64_67_PRIORITY), getreg32(NVIC_IRQ68_71_PRIORITY), - getreg32(NVIC_IRQ72_75_PRIORITY), getreg32(NVIC_IRQ76_79_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ64_67_PRIORITY), getreg32(NVIC_IRQ68_71_PRIORITY), + getreg32(NVIC_IRQ72_75_PRIORITY), getreg32(NVIC_IRQ76_79_PRIORITY)); #endif #if NR_INTERRUPTS > 79 - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ80_83_PRIORITY), getreg32(NVIC_IRQ84_87_PRIORITY), - getreg32(NVIC_IRQ88_91_PRIORITY), getreg32(NVIC_IRQ92_95_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ80_83_PRIORITY), getreg32(NVIC_IRQ84_87_PRIORITY), + getreg32(NVIC_IRQ88_91_PRIORITY), getreg32(NVIC_IRQ92_95_PRIORITY)); #endif #if NR_INTERRUPTS > 95 - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ96_99_PRIORITY), getreg32(NVIC_IRQ100_103_PRIORITY), - getreg32(NVIC_IRQ104_107_PRIORITY), getreg32(NVIC_IRQ108_111_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ96_99_PRIORITY), getreg32(NVIC_IRQ100_103_PRIORITY), + getreg32(NVIC_IRQ104_107_PRIORITY), getreg32(NVIC_IRQ108_111_PRIORITY)); #endif #if NR_INTERRUPTS > 111 # warning Missing logic #endif + leave_critical_section(flags); } #else @@ -183,11 +185,11 @@ static void stm32_dumpnvic(const char *msg, int irq) * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES static int stm32_nmi(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! NMI received\n"); + _err("PANIC!!! NMI received\n"); PANIC(); return 0; } @@ -195,7 +197,7 @@ static int stm32_nmi(int irq, FAR void *context) static int stm32_busfault(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS)); + _err("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS)); PANIC(); return 0; } @@ -203,7 +205,7 @@ static int stm32_busfault(int irq, FAR void *context) static int stm32_usagefault(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS)); + _err("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS)); PANIC(); return 0; } @@ -211,7 +213,7 @@ static int stm32_usagefault(int irq, FAR void *context) static int stm32_pendsv(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! PendSV received\n"); + _err("PANIC!!! PendSV received\n"); PANIC(); return 0; } @@ -219,7 +221,7 @@ static int stm32_pendsv(int irq, FAR void *context) static int stm32_dbgmonitor(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Debug Monitor received\n"); + _err("PANIC!!! Debug Monitor received\n"); PANIC(); return 0; } @@ -227,7 +229,7 @@ static int stm32_dbgmonitor(int irq, FAR void *context) static int stm32_reserved(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Reserved interrupt\n"); + _err("PANIC!!! Reserved interrupt\n"); PANIC(); return 0; } @@ -490,7 +492,7 @@ void up_irqinitialize(void) /* Attach all other processor exceptions (except reset and sys tick) */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES irq_attach(STM32_IRQ_NMI, stm32_nmi); #ifndef CONFIG_ARM_MPU irq_attach(STM32_IRQ_MEMFAULT, up_memfault); diff --git a/arch/arm/src/stm32f7/stm32_procfs_dtcm.c b/arch/arm/src/stm32f7/stm32_procfs_dtcm.c index af6f467fef5cba94bea1fc75d50833e4a0249b80..30c54f2387dd8e35ac507b0394b1069e6c6ff7b3 100644 --- a/arch/arm/src/stm32f7/stm32_procfs_dtcm.c +++ b/arch/arm/src/stm32f7/stm32_procfs_dtcm.c @@ -147,7 +147,7 @@ static int dtcm_open(FAR struct file *filep, FAR const char *relpath, { FAR struct dtcm_file_s *priv; - fvdbg("Open '%s'\n", relpath); + finfo("Open '%s'\n", relpath); /* PROCFS is read-only. Any attempt to open with any kind of write * access is not permitted. @@ -157,7 +157,7 @@ static int dtcm_open(FAR struct file *filep, FAR const char *relpath, if ((oflags & O_WRONLY) != 0 || (oflags & O_RDONLY) == 0) { - fdbg("ERROR: Only O_RDONLY supported\n"); + ferr("ERROR: Only O_RDONLY supported\n"); return -EACCES; } @@ -165,7 +165,7 @@ static int dtcm_open(FAR struct file *filep, FAR const char *relpath, if (strcmp(relpath, "dtcm") != 0) { - fdbg("ERROR: relpath is '%s'\n", relpath); + ferr("ERROR: relpath is '%s'\n", relpath); return -ENOENT; } @@ -174,7 +174,7 @@ static int dtcm_open(FAR struct file *filep, FAR const char *relpath, priv = (FAR struct dtcm_file_s *)kmm_zalloc(sizeof(struct dtcm_file_s)); if (!priv) { - fdbg("ERROR: Failed to allocate file attributes\n"); + ferr("ERROR: Failed to allocate file attributes\n"); return -ENOMEM; } @@ -219,7 +219,7 @@ static ssize_t dtcm_read(FAR struct file *filep, FAR char *buffer, struct mallinfo mem; off_t offset = filep->f_pos; - fvdbg("buffer=%p buflen=%d\n", buffer, (int)buflen); + finfo("buffer=%p buflen=%d\n", buffer, (int)buflen); /* Recover our private data from the struct file instance */ @@ -278,7 +278,7 @@ static int dtcm_dup(FAR const struct file *oldp, FAR struct file *newp) FAR struct dtcm_file_s *oldpriv; FAR struct dtcm_file_s *newpriv; - fvdbg("Dup %p->%p\n", oldp, newp); + finfo("Dup %p->%p\n", oldp, newp); /* Recover our private data from the old struct file instance */ @@ -290,7 +290,7 @@ static int dtcm_dup(FAR const struct file *oldp, FAR struct file *newp) newpriv = (FAR struct dtcm_file_s *)kmm_zalloc(sizeof(struct dtcm_file_s)); if (!newpriv) { - fdbg("ERROR: Failed to allocate file attributes\n"); + ferr("ERROR: Failed to allocate file attributes\n"); return -ENOMEM; } @@ -308,7 +308,7 @@ static int dtcm_stat(const char *relpath, struct stat *buf) { if (strcmp(relpath, "dtcm") != 0) { - fdbg("ERROR: relpath is '%s'\n", relpath); + ferr("ERROR: relpath is '%s'\n", relpath); return -ENOENT; } diff --git a/arch/arm/src/stm32f7/stm32_rcc.c b/arch/arm/src/stm32f7/stm32_rcc.c index bd1d1e7bcab3645b87538e183038cdb56ae31e45..21cac17ad73ec47d90de44d6a0c9c6bdcde7829d 100644 --- a/arch/arm/src/stm32f7/stm32_rcc.c +++ b/arch/arm/src/stm32f7/stm32_rcc.c @@ -2,7 +2,8 @@ * arch/arm/src/stm32f7/stm32_rcc.c * * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -75,6 +76,8 @@ #if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX) # include "stm32f74xx75xx_rcc.c" +#elif defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX) +# include "stm32f76xx77xx_rcc.c" #else # error "Unsupported STM32 F7 chip" #endif diff --git a/arch/arm/src/stm32f7/stm32_sdmmc.c b/arch/arm/src/stm32f7/stm32_sdmmc.c new file mode 100644 index 0000000000000000000000000000000000000000..16473094b5a07db43495a753430daaaf7f2ae2d6 --- /dev/null +++ b/arch/arm/src/stm32f7/stm32_sdmmc.c @@ -0,0 +1,2982 @@ +/**************************************************************************** + * arch/arm/src/stm32f7/stm32_sdmmc.c + * + * Copyright (C) 2009, 2011-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 "stm32_sdmmc.h" + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "cache.h" +#include "chip.h" +#include "up_arch.h" + +#include "stm32_dma.h" +#include "stm32_gpio.h" + + +/* TODO STM32F7_SDMMC2 + */ + +#ifdef CONFIG_STM32F7_SDMMC1 + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ +/* Required system configuration options: + * + * CONFIG_ARCH_DMA - Enable architecture-specific DMA subsystem + * initialization. Required if CONFIG_SDIO_DMA is enabled. + * CONFIG_STM32F7_DMA2 - Enable STM32 DMA2 support. Required if + * CONFIG_SDIO_DMA is enabled + * CONFIG_SCHED_WORKQUEUE -- Callback support requires work queue support. + * + * Driver-specific configuration options: + * + * CONFIG_SDIO_MUXBUS - Setting this configuration enables some locking + * APIs to manage concurrent accesses on the SDIO bus. This is not + * needed for the simple case of a single SD card, for example. + * CONFIG_SDIO_DMA - Enable SDIO. This is a marginally optional. For + * most usages, SDIO will cause data overruns if used without DMA. + * NOTE the above system DMA configuration options. + * CONFIG_SDIO_WIDTH_D1_ONLY - This may be selected to force the driver + * operate with only a single data line (the default is to use all + * 4 SD data lines). + * CONFIG_SDIO_PRI - SDIO interrupt priority. This setting is not very + * important since interrupt nesting is not currently supported. + * CONFIG_SDM_DMAPRIO - SDIO DMA priority. This can be selecte if + * CONFIG_SDIO_DMA is enabled. + * CONFIG_SDIO_XFRDEBUG - Enables some very low-level debug output + * This also requires CONFIG_DEBUG_FS and CONFIG_DEBUG_INFO + */ + +#if defined(CONFIG_SDIO_DMA) && !defined(CONFIG_STM32F7_DMA2) +# warning "CONFIG_SDIO_DMA support requires CONFIG_STM32F7_DMA2" +#endif + +#ifndef CONFIG_SDIO_DMA +# warning "Large Non-DMA transfer may result in RX overrun failures" +#endif + +#ifndef CONFIG_SCHED_WORKQUEUE +# error "Callback support requires CONFIG_SCHED_WORKQUEUE" +#endif + +#ifndef CONFIG_SDIO_PRI +# define CONFIG_SDIO_PRI NVIC_SYSH_PRIORITY_DEFAULT +#endif + +#ifdef CONFIG_SDIO_DMA +# ifndef CONFIG_SDIO_DMAPRIO +# define CONFIG_SDIO_DMAPRIO DMA_SCR_PRIVERYHI +# endif +# if (CONFIG_SDIO_DMAPRIO & ~DMA_SCR_PL_MASK) != 0 +# error "Illegal value for CONFIG_SDIO_DMAPRIO" +# endif +#else +# undef CONFIG_SDIO_DMAPRIO +#endif + +#if !defined(CONFIG_DEBUG_FS) || !defined(CONFIG_DEBUG_FEATURES) +# undef CONFIG_SDIO_XFRDEBUG +#endif + +/* Friendly CLKCR bit re-definitions ****************************************/ + +#define SDIO_CLKCR_RISINGEDGE (0) +#define SDIO_CLKCR_FALLINGEDGE SDIO_CLKCR_NEGEDGE + +/* Mode dependent settings. These depend on clock devisor settings that must + * be defined in the board-specific board.h header file: SDIO_INIT_CLKDIV, + * SDIO_MMCXFR_CLKDIV, and SDIO_SDXFR_CLKDIV. + */ + +#define STM32_CLCKCR_INIT (SDMMC1_INIT_CLKDIV | SDIO_CLKCR_RISINGEDGE | \ + SDIO_CLKCR_WIDBUS_D1) +#define SDIO_CLKCR_MMCXFR (SDMMC1_MMCXFR_CLKDIV | SDIO_CLKCR_RISINGEDGE | \ + SDIO_CLKCR_WIDBUS_D1) +#define SDIO_CLCKR_SDXFR (SDMMC1_SDXFR_CLKDIV | SDIO_CLKCR_RISINGEDGE | \ + SDIO_CLKCR_WIDBUS_D1) +#define SDIO_CLCKR_SDWIDEXFR (SDMMC1_SDXFR_CLKDIV | SDIO_CLKCR_RISINGEDGE | \ + SDIO_CLKCR_WIDBUS_D4) + +/* Timing */ + +#define SDIO_CMDTIMEOUT (100000) +#define SDIO_LONGTIMEOUT (0x7fffffff) + +/* Big DTIMER setting */ + +#define SDIO_DTIMER_DATATIMEOUT (0x000fffff) + +/* DMA channel/stream configuration register settings. The following + * must be selected. The DMA driver will select the remaining fields. + * + * - 32-bit DMA + * - Memory increment + * - Direction (memory-to-peripheral, peripheral-to-memory) + * - Memory burst size (F4 only) + */ + + +/* STM32 stream configuration register (SCR) settings. */ + +#define SDIO_RXDMA32_CONFIG (DMA_SCR_PFCTRL | DMA_SCR_DIR_P2M|DMA_SCR_MINC | \ + DMA_SCR_PSIZE_32BITS | DMA_SCR_MSIZE_32BITS | \ + CONFIG_SDIO_DMAPRIO | DMA_SCR_PBURST_INCR4 | \ + DMA_SCR_MBURST_INCR4) +#define SDIO_TXDMA32_CONFIG (DMA_SCR_PFCTRL | DMA_SCR_DIR_M2P | DMA_SCR_MINC | \ + DMA_SCR_PSIZE_32BITS | DMA_SCR_MSIZE_32BITS | \ + CONFIG_SDIO_DMAPRIO | DMA_SCR_PBURST_INCR4 | \ + DMA_SCR_MBURST_INCR4) + +/* SDIO DMA Channel/Stream selection. There + * are multiple DMA stream options that must be dis-ambiguated in the board.h + * file. + */ + +#define SDIO_DMACHAN DMAMAP_SDMMC1 + +/* FIFO sizes */ + +#define SDIO_HALFFIFO_WORDS (8) +#define SDIO_HALFFIFO_BYTES (8*4) + +/* Data transfer interrupt mask bits */ + +#define SDIO_RECV_MASK (SDIO_MASK_DCRCFAILIE | SDIO_MASK_DTIMEOUTIE | \ + SDIO_MASK_DATAENDIE | SDIO_MASK_RXOVERRIE | \ + SDIO_MASK_RXFIFOHFIE | SDIO_MASK_STBITERRIE) +#define SDIO_SEND_MASK (SDIO_MASK_DCRCFAILIE | SDIO_MASK_DTIMEOUTIE | \ + SDIO_MASK_DATAENDIE | SDIO_MASK_TXUNDERRIE | \ + SDIO_MASK_TXFIFOHEIE | SDIO_MASK_STBITERRIE) +#define SDIO_DMARECV_MASK (SDIO_MASK_DCRCFAILIE | SDIO_MASK_DTIMEOUTIE | \ + SDIO_MASK_DATAENDIE | SDIO_MASK_RXOVERRIE | \ + SDIO_MASK_STBITERRIE) +#define SDIO_DMASEND_MASK (SDIO_MASK_DCRCFAILIE | SDIO_MASK_DTIMEOUTIE | \ + SDIO_MASK_DATAENDIE | SDIO_MASK_TXUNDERRIE | \ + SDIO_MASK_STBITERRIE) + +/* Event waiting interrupt mask bits */ + +#define SDIO_CMDDONE_STA (SDIO_STA_CMDSENT) +#define SDIO_RESPDONE_STA (SDIO_STA_CTIMEOUT | SDIO_STA_CCRCFAIL | \ + SDIO_STA_CMDREND) +#define SDIO_XFRDONE_STA (0) + +#define SDIO_CMDDONE_MASK (SDIO_MASK_CMDSENTIE) +#define SDIO_RESPDONE_MASK (SDIO_MASK_CCRCFAILIE | SDIO_MASK_CTIMEOUTIE | \ + SDIO_MASK_CMDRENDIE) +#define SDIO_XFRDONE_MASK (0) + +#define SDIO_CMDDONE_ICR (SDIO_ICR_CMDSENTC | SDIO_ICR_DBCKENDC) +#define SDIO_RESPDONE_ICR (SDIO_ICR_CTIMEOUTC | SDIO_ICR_CCRCFAILC | \ + SDIO_ICR_CMDRENDC | SDIO_ICR_DBCKENDC) +#define SDIO_XFRDONE_ICR (SDIO_ICR_DATAENDC | SDIO_ICR_DCRCFAILC | \ + SDIO_ICR_DTIMEOUTC | SDIO_ICR_RXOVERRC | \ + SDIO_ICR_TXUNDERRC | SDIO_ICR_STBITERRC | \ + SDIO_ICR_DBCKENDC) + +#define SDIO_WAITALL_ICR (SDIO_CMDDONE_ICR | SDIO_RESPDONE_ICR | \ + SDIO_XFRDONE_ICR | SDIO_ICR_DBCKENDC) + +/* Let's wait until we have both SDIO transfer complete and DMA complete. */ + +#define SDIO_XFRDONE_FLAG (1) +#define SDIO_DMADONE_FLAG (2) +#define SDIO_ALLDONE (3) + +/* Register logging support */ + +#ifdef CONFIG_SDIO_XFRDEBUG +# ifdef CONFIG_SDIO_DMA +# define SAMPLENDX_BEFORE_SETUP 0 +# define SAMPLENDX_BEFORE_ENABLE 1 +# define SAMPLENDX_AFTER_SETUP 2 +# define SAMPLENDX_END_TRANSFER 3 +# define SAMPLENDX_DMA_CALLBACK 4 +# define DEBUG_NSAMPLES 5 +# else +# define SAMPLENDX_BEFORE_SETUP 0 +# define SAMPLENDX_AFTER_SETUP 1 +# define SAMPLENDX_END_TRANSFER 2 +# define DEBUG_NSAMPLES 3 +# endif +#endif + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* This structure defines the state of the STM32 SDIO interface */ + +struct stm32_dev_s +{ + struct sdio_dev_s dev; /* Standard, base SDIO interface */ + + /* STM32-specific extensions */ + /* Event support */ + + sem_t waitsem; /* Implements event waiting */ + sdio_eventset_t waitevents; /* Set of events to be waited for */ + uint32_t waitmask; /* Interrupt enables for event waiting */ + volatile sdio_eventset_t wkupevent; /* The event that caused the wakeup */ + WDOG_ID waitwdog; /* Watchdog that handles event timeouts */ + + /* Callback support */ + + uint8_t cdstatus; /* Card status */ + sdio_eventset_t cbevents; /* Set of events to be cause callbacks */ + worker_t callback; /* Registered callback function */ + void *cbarg; /* Registered callback argument */ + struct work_s cbwork; /* Callback work queue structure */ + + /* Interrupt mode data transfer support */ + + uint32_t *buffer; /* Address of current R/W buffer */ + size_t remaining; /* Number of bytes remaining in the transfer */ + uint32_t xfrmask; /* Interrupt enables for data transfer */ + + /* DMA data transfer support */ + + bool widebus; /* Required for DMA support */ +#ifdef CONFIG_SDIO_DMA + volatile uint8_t xfrflags; /* Used to synchronize SDIO and DMA completion events */ + bool dmamode; /* true: DMA mode transfer */ + DMA_HANDLE dma; /* Handle for DMA channel */ +#endif +}; + +/* Register logging support */ + +#ifdef CONFIG_SDIO_XFRDEBUG +struct stm32_sdioregs_s +{ + uint8_t power; + uint16_t clkcr; + uint16_t dctrl; + uint32_t dtimer; + uint32_t dlen; + uint32_t dcount; + uint32_t sta; + uint32_t mask; + uint32_t fifocnt; +}; + +struct stm32_sampleregs_s +{ + struct stm32_sdioregs_s sdio; +#if defined(CONFIG_DEBUG_DMA_INFO) && defined(CONFIG_SDIO_DMA) + struct stm32_dmaregs_s dma; +#endif +}; +#endif + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +/* Low-level helpers ********************************************************/ + +static void stm32_takesem(struct stm32_dev_s *priv); +#define stm32_givesem(priv) (sem_post(&priv->waitsem)) +static inline void stm32_setclkcr(uint32_t clkcr); +static void stm32_configwaitints(struct stm32_dev_s *priv, uint32_t waitmask, + sdio_eventset_t waitevents, sdio_eventset_t wkupevents); +static void stm32_configxfrints(struct stm32_dev_s *priv, uint32_t xfrmask); +static void stm32_setpwrctrl(uint32_t pwrctrl); +static inline uint32_t stm32_getpwrctrl(void); + +/* DMA Helpers **************************************************************/ + +#ifdef CONFIG_SDIO_XFRDEBUG +static void stm32_sampleinit(void); +static void stm32_sdiosample(struct stm32_sdioregs_s *regs); +static void stm32_sample(struct stm32_dev_s *priv, int index); +static void stm32_sdiodump(struct stm32_sdioregs_s *regs, const char *msg); +static void stm32_dumpsample(struct stm32_dev_s *priv, + struct stm32_sampleregs_s *regs, const char *msg); +static void stm32_dumpsamples(struct stm32_dev_s *priv); +#else +# define stm32_sampleinit() +# define stm32_sample(priv,index) +# define stm32_dumpsamples(priv) +#endif + +#ifdef CONFIG_SDIO_DMA +static void stm32_dmacallback(DMA_HANDLE handle, uint8_t status, void *arg); +#endif + +/* Data Transfer Helpers ****************************************************/ + +static uint8_t stm32_log2(uint16_t value); +static void stm32_dataconfig(uint32_t timeout, uint32_t dlen, uint32_t dctrl); +static void stm32_datadisable(void); +static void stm32_sendfifo(struct stm32_dev_s *priv); +static void stm32_recvfifo(struct stm32_dev_s *priv); +static void stm32_eventtimeout(int argc, uint32_t arg); +static void stm32_endwait(struct stm32_dev_s *priv, sdio_eventset_t wkupevent); +static void stm32_endtransfer(struct stm32_dev_s *priv, sdio_eventset_t wkupevent); + +/* Interrupt Handling *******************************************************/ + +static int stm32_interrupt(int irq, void *context); +#ifdef CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE +static int stm32_rdyinterrupt(int irq, void *context); +#endif + +/* SDIO interface methods ***************************************************/ + +/* Mutual exclusion */ + +#ifdef CONFIG_SDIO_MUXBUS +static int stm32_lock(FAR struct sdio_dev_s *dev, bool lock); +#endif + +/* Initialization/setup */ + +static void stm32_reset(FAR struct sdio_dev_s *dev); +static uint8_t stm32_status(FAR struct sdio_dev_s *dev); +static void stm32_widebus(FAR struct sdio_dev_s *dev, bool enable); +static void stm32_clock(FAR struct sdio_dev_s *dev, + enum sdio_clock_e rate); +static int stm32_attach(FAR struct sdio_dev_s *dev); + +/* Command/Status/Data Transfer */ + +static int stm32_sendcmd(FAR struct sdio_dev_s *dev, uint32_t cmd, + uint32_t arg); +static int stm32_recvsetup(FAR struct sdio_dev_s *dev, FAR uint8_t *buffer, + size_t nbytes); +static int stm32_sendsetup(FAR struct sdio_dev_s *dev, + FAR const uint8_t *buffer, uint32_t nbytes); +static int stm32_cancel(FAR struct sdio_dev_s *dev); + +static int stm32_waitresponse(FAR struct sdio_dev_s *dev, uint32_t cmd); +static int stm32_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd, + uint32_t *rshort); +static int stm32_recvlong(FAR struct sdio_dev_s *dev, uint32_t cmd, + uint32_t rlong[4]); +static int stm32_recvshort(FAR struct sdio_dev_s *dev, uint32_t cmd, + uint32_t *rshort); +static int stm32_recvnotimpl(FAR struct sdio_dev_s *dev, uint32_t cmd, + uint32_t *rnotimpl); + +/* EVENT handler */ + +static void stm32_waitenable(FAR struct sdio_dev_s *dev, + sdio_eventset_t eventset); +static sdio_eventset_t + stm32_eventwait(FAR struct sdio_dev_s *dev, uint32_t timeout); +static void stm32_callbackenable(FAR struct sdio_dev_s *dev, + sdio_eventset_t eventset); +static int stm32_registercallback(FAR struct sdio_dev_s *dev, + worker_t callback, void *arg); + +/* DMA */ + +#ifdef CONFIG_SDIO_DMA +static bool stm32_dmasupported(FAR struct sdio_dev_s *dev); +#ifdef CONFIG_SDIO_PREFLIGHT +static int stm32_dmapreflight(FAR struct sdio_dev_s *dev, + FAR const uint8_t *buffer, size_t buflen); +#endif +static int stm32_dmarecvsetup(FAR struct sdio_dev_s *dev, + FAR uint8_t *buffer, size_t buflen); +static int stm32_dmasendsetup(FAR struct sdio_dev_s *dev, + FAR const uint8_t *buffer, size_t buflen); +#endif + +/* Initialization/uninitialization/reset ************************************/ + +static void stm32_callback(void *arg); +static void stm32_default(void); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +struct stm32_dev_s g_sdiodev = +{ + .dev = + { +#ifdef CONFIG_SDIO_MUXBUS + .lock = stm32_lock, +#endif + .reset = stm32_reset, + .status = stm32_status, + .widebus = stm32_widebus, + .clock = stm32_clock, + .attach = stm32_attach, + .sendcmd = stm32_sendcmd, +#ifdef CONFIG_SDIO_BLOCKSETUP + .blocksetup = stm32_blocksetup, /* Not implemented yet */ +#endif + .recvsetup = stm32_recvsetup, + .sendsetup = stm32_sendsetup, + .cancel = stm32_cancel, + .waitresponse = stm32_waitresponse, + .recvR1 = stm32_recvshortcrc, + .recvR2 = stm32_recvlong, + .recvR3 = stm32_recvshort, + .recvR4 = stm32_recvnotimpl, + .recvR5 = stm32_recvnotimpl, + .recvR6 = stm32_recvshortcrc, + .recvR7 = stm32_recvshort, + .waitenable = stm32_waitenable, + .eventwait = stm32_eventwait, + .callbackenable = stm32_callbackenable, + .registercallback = stm32_registercallback, +#ifdef CONFIG_SDIO_DMA + .dmasupported = stm32_dmasupported, +#ifdef CONFIG_SDIO_PREFLIGHT + .dmapreflight = stm32_dmapreflight, +#endif + .dmarecvsetup = stm32_dmarecvsetup, + .dmasendsetup = stm32_dmasendsetup, +#endif + }, +}; + +/* Register logging support */ + +#ifdef CONFIG_SDIO_XFRDEBUG +static struct stm32_sampleregs_s g_sampleregs[DEBUG_NSAMPLES]; +#endif + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Low-level Helpers + ****************************************************************************/ +/**************************************************************************** + * Name: stm32_takesem + * + * Description: + * Take the wait semaphore (handling false alarm wakeups due to the receipt + * of signals). + * + * Input Parameters: + * dev - Instance of the SDIO device driver state structure. + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void stm32_takesem(struct stm32_dev_s *priv) +{ + /* Take the semaphore (perhaps waiting) */ + + while (sem_wait(&priv->waitsem) != 0) + { + /* The only case that an error should occr here is if the wait was + * awakened by a signal. + */ + + ASSERT(errno == EINTR); + } +} + +/**************************************************************************** + * Name: stm32_setclkcr + * + * Description: + * Modify oft-changed bits in the CLKCR register. Only the following bit- + * fields are changed: + * + * CLKDIV, PWRSAV, BYPASS, WIDBUS, NEGEDGE, and HWFC_EN + * + * Input Parameters: + * clkcr - A new CLKCR setting for the above mentions bits (other bits + * are ignored. + * + * Returned Value: + * None + * + ****************************************************************************/ + +static inline void stm32_setclkcr(uint32_t clkcr) +{ + uint32_t regval = getreg32(STM32_SDMMC1_CLKCR); + + /* Clear CLKDIV, PWRSAV, BYPASS, WIDBUS, NEGEDGE, HWFC_EN bits */ + + regval &= ~(SDIO_CLKCR_CLKDIV_MASK | SDIO_CLKCR_PWRSAV | SDIO_CLKCR_BYPASS | + SDIO_CLKCR_WIDBUS_MASK | SDIO_CLKCR_NEGEDGE | SDIO_CLKCR_HWFC_EN | + SDIO_CLKCR_CLKEN); + + /* Replace with user provided settings */ + + clkcr &= (SDIO_CLKCR_CLKDIV_MASK | SDIO_CLKCR_PWRSAV | SDIO_CLKCR_BYPASS | + SDIO_CLKCR_WIDBUS_MASK | SDIO_CLKCR_NEGEDGE | SDIO_CLKCR_HWFC_EN | + SDIO_CLKCR_CLKEN); + + regval |= clkcr; + putreg32(regval, STM32_SDMMC1_CLKCR); + + finfo("CLKCR: %08x PWR: %08x\n", + getreg32(STM32_SDMMC1_CLKCR), getreg32(STM32_SDMMC1_POWER)); +} + +/**************************************************************************** + * Name: stm32_configwaitints + * + * Description: + * Enable/disable SDIO interrupts needed to suport the wait function + * + * Input Parameters: + * priv - A reference to the SDIO device state structure + * waitmask - The set of bits in the SDIO MASK register to set + * waitevents - Waited for events + * wkupevent - Wake-up events + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void stm32_configwaitints(struct stm32_dev_s *priv, uint32_t waitmask, + sdio_eventset_t waitevents, + sdio_eventset_t wkupevent) +{ + irqstate_t flags; +#ifdef CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE + int pinset; +#endif + + /* Save all of the data and set the new interrupt mask in one, atomic + * operation. + */ + flags = enter_critical_section(); + +#ifdef CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE + if ((waitmask & SDIOWAIT_WRCOMPLETE) != 0) + { + /* Do not use this in STM32_SDMMC1_MASK register */ + + waitmask &= !SDIOWAIT_WRCOMPLETE; + + pinset = GPIO_SDMMC1_D0 & (GPIO_PORT_MASK | GPIO_PIN_MASK); + pinset |= (GPIO_INPUT | GPIO_FLOAT | GPIO_EXTI); + + /* Arm the SDIO_D Ready and install Isr */ + + stm32_gpiosetevent(pinset, true, false, false, stm32_rdyinterrupt); + } + + /* Disarm SDIO_D ready */ + + if ((wkupevent & SDIOWAIT_WRCOMPLETE) != 0) + { + stm32_gpiosetevent(GPIO_SDMMC1_D0, false, false, false , NULL); + stm32_configgpio(GPIO_SDMMC1_D0); + } +#endif + + priv->waitevents = waitevents; + priv->wkupevent = wkupevent; + priv->waitmask = waitmask; +#ifdef CONFIG_SDIO_DMA + priv->xfrflags = 0; +#endif + putreg32(priv->xfrmask | priv->waitmask, STM32_SDMMC1_MASK); + leave_critical_section(flags); +} + +/**************************************************************************** + * Name: stm32_configxfrints + * + * Description: + * Enable SDIO interrupts needed to support the data transfer event + * + * Input Parameters: + * priv - A reference to the SDIO device state structure + * xfrmask - The set of bits in the SDIO MASK register to set + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void stm32_configxfrints(struct stm32_dev_s *priv, uint32_t xfrmask) +{ + irqstate_t flags; + flags = enter_critical_section(); + priv->xfrmask = xfrmask; + putreg32(priv->xfrmask | priv->waitmask, STM32_SDMMC1_MASK); + leave_critical_section(flags); +} + +/**************************************************************************** + * Name: stm32_setpwrctrl + * + * Description: + * Change the PWRCTRL field of the SDIO POWER register to turn the SDIO + * ON or OFF + * + * Input Parameters: + * clkcr - A new PWRCTRL setting + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void stm32_setpwrctrl(uint32_t pwrctrl) +{ + uint32_t regval; + + regval = getreg32(STM32_SDMMC1_POWER); + regval &= ~SDIO_POWER_PWRCTRL_MASK; + regval |= pwrctrl; + putreg32(regval, STM32_SDMMC1_POWER); +} + +/**************************************************************************** + * Name: stm32_getpwrctrl + * + * Description: + * Return the current value of the the PWRCTRL field of the SDIO POWER + * register. This function can be used to see if the SDIO is powered ON + * or OFF + * + * Input Parameters: + * None + * + * Returned Value: + * The current value of the the PWRCTRL field of the SDIO POWER register. + * + ****************************************************************************/ + +static inline uint32_t stm32_getpwrctrl(void) +{ + return getreg32(STM32_SDMMC1_POWER) & SDIO_POWER_PWRCTRL_MASK; +} + +/**************************************************************************** + * DMA Helpers + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_sampleinit + * + * Description: + * Setup prior to collecting DMA samples + * + ****************************************************************************/ + +#ifdef CONFIG_SDIO_XFRDEBUG +static void stm32_sampleinit(void) +{ + memset(g_sampleregs, 0xff, DEBUG_NSAMPLES * sizeof(struct stm32_sampleregs_s)); +} +#endif + +/**************************************************************************** + * Name: stm32_sdiosample + * + * Description: + * Sample SDIO registers + * + ****************************************************************************/ + +#ifdef CONFIG_SDIO_XFRDEBUG +static void stm32_sdiosample(struct stm32_sdioregs_s *regs) +{ + regs->power = (uint8_t)getreg32(STM32_SDMMC1_POWER); + regs->clkcr = (uint16_t)getreg32(STM32_SDMMC1_CLKCR); + regs->dctrl = (uint16_t)getreg32(STM32_SDMMC1_DCTRL); + regs->dtimer = getreg32(STM32_SDMMC1_DTIMER); + regs->dlen = getreg32(STM32_SDMMC1_DLEN); + regs->dcount = getreg32(STM32_SDMMC1_DCOUNT); + regs->sta = getreg32(STM32_SDMMC1_STA); + regs->mask = getreg32(STM32_SDMMC1_MASK); + regs->fifocnt = getreg32(STM32_SDMMC1_FIFOCNT); +} +#endif + +/**************************************************************************** + * Name: stm32_sample + * + * Description: + * Sample SDIO/DMA registers + * + ****************************************************************************/ + +#ifdef CONFIG_SDIO_XFRDEBUG +static void stm32_sample(struct stm32_dev_s *priv, int index) +{ + struct stm32_sampleregs_s *regs = &g_sampleregs[index]; + +#if defined(CONFIG_DEBUG_DMA_INFO) && defined(CONFIG_SDIO_DMA) + if (priv->dmamode) + { + stm32_dmasample(priv->dma, ®s->dma); + } +#endif + + stm32_sdiosample(®s->sdio); +} +#endif + +/**************************************************************************** + * Name: stm32_sdiodump + * + * Description: + * Dump one register sample + * + ****************************************************************************/ + +#ifdef CONFIG_SDIO_XFRDEBUG +static void stm32_sdiodump(struct stm32_sdioregs_s *regs, const char *msg) +{ + ferr("SDIO Registers: %s\n", msg); + ferr(" POWER[%08x]: %08x\n", STM32_SDMMC1_POWER, regs->power); + ferr(" CLKCR[%08x]: %08x\n", STM32_SDMMC1_CLKCR, regs->clkcr); + ferr(" DCTRL[%08x]: %08x\n", STM32_SDMMC1_DCTRL, regs->dctrl); + ferr(" DTIMER[%08x]: %08x\n", STM32_SDMMC1_DTIMER, regs->dtimer); + ferr(" DLEN[%08x]: %08x\n", STM32_SDMMC1_DLEN, regs->dlen); + ferr(" DCOUNT[%08x]: %08x\n", STM32_SDMMC1_DCOUNT, regs->dcount); + ferr(" STA[%08x]: %08x\n", STM32_SDMMC1_STA, regs->sta); + ferr(" MASK[%08x]: %08x\n", STM32_SDMMC1_MASK, regs->mask); + ferr("FIFOCNT[%08x]: %08x\n", STM32_SDMMC1_FIFOCNT, regs->fifocnt); +} +#endif + +/**************************************************************************** + * Name: stm32_dumpsample + * + * Description: + * Dump one register sample + * + ****************************************************************************/ + +#ifdef CONFIG_SDIO_XFRDEBUG +static void stm32_dumpsample(struct stm32_dev_s *priv, + struct stm32_sampleregs_s *regs, const char *msg) +{ +#if defined(CONFIG_DEBUG_DMA_INFO) && defined(CONFIG_SDIO_DMA) + if (priv->dmamode) + { + stm32_dmadump(priv->dma, ®s->dma, msg); + } +#endif + + stm32_sdiodump(®s->sdio, msg); +} +#endif + +/**************************************************************************** + * Name: stm32_dumpsamples + * + * Description: + * Dump all sampled register data + * + ****************************************************************************/ + +#ifdef CONFIG_SDIO_XFRDEBUG +static void stm32_dumpsamples(struct stm32_dev_s *priv) +{ + stm32_dumpsample(priv, &g_sampleregs[SAMPLENDX_BEFORE_SETUP], "Before setup"); + +#if defined(CONFIG_DEBUG_DMA_INFO) && defined(CONFIG_SDIO_DMA) + if (priv->dmamode) + { + stm32_dumpsample(priv, &g_sampleregs[SAMPLENDX_BEFORE_ENABLE], "Before DMA enable"); + } +#endif + + stm32_dumpsample(priv, &g_sampleregs[SAMPLENDX_AFTER_SETUP], "After setup"); + stm32_dumpsample(priv, &g_sampleregs[SAMPLENDX_END_TRANSFER], "End of transfer"); + +#if defined(CONFIG_DEBUG_DMA_INFO) && defined(CONFIG_SDIO_DMA) + if (priv->dmamode) + { + stm32_dumpsample(priv, &g_sampleregs[SAMPLENDX_DMA_CALLBACK], "DMA Callback"); + } +#endif +} +#endif + +/**************************************************************************** + * Name: stm32_dmacallback + * + * Description: + * Called when SDIO DMA completes + * + ****************************************************************************/ + +#ifdef CONFIG_SDIO_DMA +static void stm32_dmacallback(DMA_HANDLE handle, uint8_t status, void *arg) +{ + FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)arg; + DEBUGASSERT(priv->dmamode); + sdio_eventset_t result; + + /* In the normal case, SDIO appears to handle the End-Of-Transfer interrupt + * first with the End-Of-DMA event occurring significantly later. On + * transfer errors, however, the DMA error will occur before the End-of- + * Transfer. + */ + + stm32_sample((struct stm32_dev_s *)arg, SAMPLENDX_DMA_CALLBACK); + + /* Get the result of the DMA transfer */ + + if ((status & DMA_STATUS_ERROR) != 0) + { + fllerr("DMA error %02x, remaining: %d\n", status, priv->remaining); + result = SDIOWAIT_ERROR; + } + else + { + result = SDIOWAIT_TRANSFERDONE; + } + + /* Then terminate the transfer if this completes all of the steps in the + * transfer OR if a DMA error occurred. In the non-error case, we should + * already have the SDIO transfer done interrupt. If not, the transfer + * will appropriately time out. + */ + + priv->xfrflags |= SDIO_DMADONE_FLAG; + if (priv->xfrflags == SDIO_ALLDONE || result == SDIOWAIT_ERROR) + { + stm32_endtransfer(priv, result); + } +} +#endif + +/**************************************************************************** + * Data Transfer Helpers + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_log2 + * + * Description: + * Take (approximate) log base 2 of the provided number (Only works if the + * provided number is a power of 2). + * + ****************************************************************************/ + +static uint8_t stm32_log2(uint16_t value) +{ + uint8_t log2 = 0; + + /* 0000 0000 0000 0001 -> return 0, + * 0000 0000 0000 001x -> return 1, + * 0000 0000 0000 01xx -> return 2, + * 0000 0000 0000 1xxx -> return 3, + * ... + * 1xxx xxxx xxxx xxxx -> return 15, + */ + + DEBUGASSERT(value > 0); + while (value != 1) + { + value >>= 1; + log2++; + } + + return log2; +} + +/**************************************************************************** + * Name: stm32_dataconfig + * + * Description: + * Configure the SDIO data path for the next data transfer + * + ****************************************************************************/ + +static void stm32_dataconfig(uint32_t timeout, uint32_t dlen, uint32_t dctrl) +{ + uint32_t regval = 0; + + /* Enable data path */ + + putreg32(timeout, STM32_SDMMC1_DTIMER); /* Set DTIMER */ + putreg32(dlen, STM32_SDMMC1_DLEN); /* Set DLEN */ + + /* Configure DCTRL DTDIR, DTMODE, and DBLOCKSIZE fields and set the DTEN + * field + */ + + regval = getreg32(STM32_SDMMC1_DCTRL); + regval &= ~(SDIO_DCTRL_DTDIR | SDIO_DCTRL_DTMODE | SDIO_DCTRL_DBLOCKSIZE_MASK); + dctrl &= (SDIO_DCTRL_DTDIR | SDIO_DCTRL_DTMODE | SDIO_DCTRL_DBLOCKSIZE_MASK); + regval |= (dctrl | SDIO_DCTRL_DTEN); + +#ifdef CONFIG_SDIO_DMA + regval |= SDIO_DCTRL_DMAEN; +#endif + + putreg32(regval, STM32_SDMMC1_DCTRL); +} + +/**************************************************************************** + * Name: stm32_datadisable + * + * Description: + * Disable the SDIO data path setup by stm32_dataconfig() and + * disable DMA. + * + ****************************************************************************/ + +static void stm32_datadisable(void) +{ + uint32_t regval; + + /* Disable the data path */ + + putreg32(SDIO_DTIMER_DATATIMEOUT, STM32_SDMMC1_DTIMER); /* Reset DTIMER */ + putreg32(0, STM32_SDMMC1_DLEN); /* Reset DLEN */ + + /* Reset DCTRL DTEN, DTDIR, DTMODE, DMAEN, and DBLOCKSIZE fields */ + + regval = getreg32(STM32_SDMMC1_DCTRL); + regval &= ~(SDIO_DCTRL_DTEN | SDIO_DCTRL_DTDIR | SDIO_DCTRL_DTMODE | + SDIO_DCTRL_DMAEN | SDIO_DCTRL_DBLOCKSIZE_MASK); + putreg32(regval, STM32_SDMMC1_DCTRL); +} + +/**************************************************************************** + * Name: stm32_sendfifo + * + * Description: + * Send SDIO data in interrupt mode + * + * Input Parameters: + * priv - An instance of the SDIO device interface + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void stm32_sendfifo(struct stm32_dev_s *priv) +{ + union + { + uint32_t w; + uint8_t b[4]; + } data; + + /* Loop while there is more data to be sent and the RX FIFO is not full */ + + while (priv->remaining > 0 && + (getreg32(STM32_SDMMC1_STA) & SDIO_STA_TXFIFOF) == 0) + { + /* Is there a full word remaining in the user buffer? */ + + if (priv->remaining >= sizeof(uint32_t)) + { + /* Yes, transfer the word to the TX FIFO */ + + data.w = *priv->buffer++; + priv->remaining -= sizeof(uint32_t); + } + else + { + /* No.. transfer just the bytes remaining in the user buffer, + * padding with zero as necessary to extend to a full word. + */ + + uint8_t *ptr = (uint8_t *)priv->remaining; + int i; + + data.w = 0; + for (i = 0; i < (int)priv->remaining; i++) + { + data.b[i] = *ptr++; + } + + /* Now the transfer is finished */ + + priv->remaining = 0; + } + + /* Put the word in the FIFO */ + + putreg32(data.w, STM32_SDMMC1_FIFO); + } +} + +/**************************************************************************** + * Name: stm32_recvfifo + * + * Description: + * Receive SDIO data in interrupt mode + * + * Input Parameters: + * priv - An instance of the SDIO device interface + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void stm32_recvfifo(struct stm32_dev_s *priv) +{ + union + { + uint32_t w; + uint8_t b[4]; + } data; + + /* Loop while there is space to store the data and there is more + * data available in the RX FIFO. + */ + + while (priv->remaining > 0 && + (getreg32(STM32_SDMMC1_STA) & SDIO_STA_RXDAVL) != 0) + { + /* Read the next word from the RX FIFO */ + + data.w = getreg32(STM32_SDMMC1_FIFO); + if (priv->remaining >= sizeof(uint32_t)) + { + /* Transfer the whole word to the user buffer */ + + *priv->buffer++ = data.w; + priv->remaining -= sizeof(uint32_t); + } + else + { + /* Transfer any trailing fractional word */ + + uint8_t *ptr = (uint8_t *)priv->buffer; + int i; + + for (i = 0; i < (int)priv->remaining; i++) + { + *ptr++ = data.b[i]; + } + + /* Now the transfer is finished */ + + priv->remaining = 0; + } + } +} + +/**************************************************************************** + * Name: stm32_eventtimeout + * + * Description: + * The watchdog timeout setup when the event wait start has expired without + * any other waited-for event occurring. + * + * Input Parameters: + * argc - The number of arguments (should be 1) + * arg - The argument (state structure reference cast to uint32_t) + * + * Returned Value: + * None + * + * Assumptions: + * Always called from the interrupt level with interrupts disabled. + * + ****************************************************************************/ + +static void stm32_eventtimeout(int argc, uint32_t arg) +{ + struct stm32_dev_s *priv = (struct stm32_dev_s *)arg; + + /* There is always race conditions with timer expirations. */ + + DEBUGASSERT((priv->waitevents & SDIOWAIT_TIMEOUT) != 0 || priv->wkupevent != 0); + + /* Is a data transfer complete event expected? */ + + if ((priv->waitevents & SDIOWAIT_TIMEOUT) != 0) + { + /* Yes.. wake up any waiting threads */ + + stm32_endwait(priv, SDIOWAIT_TIMEOUT); + fllerr("Timeout: remaining: %d\n", priv->remaining); + } +} + +/**************************************************************************** + * Name: stm32_endwait + * + * Description: + * Wake up a waiting thread if the waited-for event has occurred. + * + * Input Parameters: + * priv - An instance of the SDIO device interface + * wkupevent - The event that caused the wait to end + * + * Returned Value: + * None + * + * Assumptions: + * Always called from the interrupt level with interrupts disabled. + * + ****************************************************************************/ + +static void stm32_endwait(struct stm32_dev_s *priv, sdio_eventset_t wkupevent) +{ + /* Cancel the watchdog timeout */ + + (void)wd_cancel(priv->waitwdog); + + /* Disable event-related interrupts */ + + stm32_configwaitints(priv, 0, 0, wkupevent); + + /* Wake up the waiting thread */ + + stm32_givesem(priv); +} + +/**************************************************************************** + * Name: stm32_endtransfer + * + * Description: + * Terminate a transfer with the provided status. This function is called + * only from the SDIO interrupt handler when end-of-transfer conditions + * are detected. + * + * Input Parameters: + * priv - An instance of the SDIO device interface + * wkupevent - The event that caused the transfer to end + * + * Returned Value: + * None + * + * Assumptions: + * Always called from the interrupt level with interrupts disabled. + * + ****************************************************************************/ + +static void stm32_endtransfer(struct stm32_dev_s *priv, sdio_eventset_t wkupevent) +{ + /* Disable all transfer related interrupts */ + + stm32_configxfrints(priv, 0); + + /* Clearing pending interrupt status on all transfer related interrupts */ + + putreg32(SDIO_XFRDONE_ICR, STM32_SDMMC1_ICR); + + /* If this was a DMA transfer, make sure that DMA is stopped */ + +#ifdef CONFIG_SDIO_DMA + if (priv->dmamode) + { + /* DMA debug instrumentation */ + + stm32_sample(priv, SAMPLENDX_END_TRANSFER); + + /* Make sure that the DMA is stopped (it will be stopped automatically + * on normal transfers, but not necessarily when the transfer terminates + * on an error condition). + */ + + stm32_dmastop(priv->dma); + } +#endif + + /* Mark the transfer finished */ + + priv->remaining = 0; + + /* Is a thread wait for these data transfer complete events? */ + + if ((priv->waitevents & wkupevent) != 0) + { + /* Yes.. wake up any waiting threads */ + + stm32_endwait(priv, wkupevent); + } +} + +/**************************************************************************** + * Interrupt Handling + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_rdyinterrupt + * + * Description: + * SDIO ready interrupt handler + * + * Input Parameters: + * dev - An instance of the SDIO device interface + * + * Returned Value: + * None + * + ****************************************************************************/ + +#ifdef CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE +static int stm32_rdyinterrupt(int irq, void *context) +{ + struct stm32_dev_s *priv = &g_sdiodev; + stm32_endwait(priv, SDIOWAIT_WRCOMPLETE); + return OK; +} +#endif + +/**************************************************************************** + * Name: stm32_interrupt + * + * Description: + * SDIO interrupt handler + * + * Input Parameters: + * dev - An instance of the SDIO device interface + * + * Returned Value: + * None + * + ****************************************************************************/ + +static int stm32_interrupt(int irq, void *context) +{ + struct stm32_dev_s *priv = &g_sdiodev; + uint32_t enabled; + uint32_t pending; + + /* Loop while there are pending interrupts. Check the SDIO status + * register. Mask out all bits that don't correspond to enabled + * interrupts. (This depends on the fact that bits are ordered + * the same in both the STA and MASK register). If there are non-zero + * bits remaining, then we have work to do here. + */ + + while ((enabled = getreg32(STM32_SDMMC1_STA) & getreg32(STM32_SDMMC1_MASK)) != 0) + { + /* Handle in progress, interrupt driven data transfers ****************/ + + pending = enabled & priv->xfrmask; + if (pending != 0) + { +#ifdef CONFIG_SDIO_DMA + if (!priv->dmamode) +#endif + { + /* Is the RX FIFO half full or more? Is so then we must be + * processing a receive transaction. + */ + + if ((pending & SDIO_STA_RXFIFOHF) != 0) + { + /* Receive data from the RX FIFO */ + + stm32_recvfifo(priv); + } + + /* Otherwise, Is the transmit FIFO half empty or less? If so we must + * be processing a send transaction. NOTE: We can't be processing + * both! + */ + + else if ((pending & SDIO_STA_TXFIFOHE) != 0) + { + /* Send data via the TX FIFO */ + + stm32_sendfifo(priv); + } + } + + /* Handle data end events */ + + if ((pending & SDIO_STA_DATAEND) != 0) + { + /* Handle any data remaining the RX FIFO. If the RX FIFO is + * less than half full at the end of the transfer, then no + * half-full interrupt will be received. + */ + + /* Was this transfer performed in DMA mode? */ + +#ifdef CONFIG_SDIO_DMA + if (priv->dmamode) + { + /* Yes.. Terminate the transfers only if the DMA has also + * finished. + */ + + priv->xfrflags |= SDIO_XFRDONE_FLAG; + if (priv->xfrflags == SDIO_ALLDONE) + { + stm32_endtransfer(priv, SDIOWAIT_TRANSFERDONE); + } + + /* Otherwise, just disable futher transfer interrupts and + * wait for the DMA complete event. + */ + + else + { + stm32_configxfrints(priv, 0); + } + } + else +#endif + { + /* Receive data from the RX FIFO */ + + stm32_recvfifo(priv); + + /* Then terminate the transfer */ + + stm32_endtransfer(priv, SDIOWAIT_TRANSFERDONE); + } + } + + /* Handle data block send/receive CRC failure */ + + else if ((pending & SDIO_STA_DCRCFAIL) != 0) + { + /* Terminate the transfer with an error */ + + fllerr("ERROR: Data block CRC failure, remaining: %d\n", priv->remaining); + stm32_endtransfer(priv, SDIOWAIT_TRANSFERDONE | SDIOWAIT_ERROR); + } + + /* Handle data timeout error */ + + else if ((pending & SDIO_STA_DTIMEOUT) != 0) + { + /* Terminate the transfer with an error */ + + fllerr("ERROR: Data timeout, remaining: %d\n", priv->remaining); + stm32_endtransfer(priv, SDIOWAIT_TRANSFERDONE | SDIOWAIT_TIMEOUT); + } + + /* Handle RX FIFO overrun error */ + + else if ((pending & SDIO_STA_RXOVERR) != 0) + { + /* Terminate the transfer with an error */ + + fllerr("ERROR: RX FIFO overrun, remaining: %d\n", priv->remaining); + stm32_endtransfer(priv, SDIOWAIT_TRANSFERDONE | SDIOWAIT_ERROR); + } + + /* Handle TX FIFO underrun error */ + + else if ((pending & SDIO_STA_TXUNDERR) != 0) + { + /* Terminate the transfer with an error */ + + fllerr("ERROR: TX FIFO underrun, remaining: %d\n", priv->remaining); + stm32_endtransfer(priv, SDIOWAIT_TRANSFERDONE | SDIOWAIT_ERROR); + } + + /* Handle start bit error */ + + else if ((pending & SDIO_STA_STBITERR) != 0) + { + /* Terminate the transfer with an error */ + + fllerr("ERROR: Start bit, remaining: %d\n", priv->remaining); + stm32_endtransfer(priv, SDIOWAIT_TRANSFERDONE | SDIOWAIT_ERROR); + } + } + + /* Handle wait events *************************************************/ + + pending = enabled & priv->waitmask; + if (pending != 0) + { + /* Is this a response completion event? */ + + if ((pending & SDIO_RESPDONE_STA) != 0) + { + /* Yes.. Is their a thread waiting for response done? */ + + if ((priv->waitevents & SDIOWAIT_RESPONSEDONE) != 0) + { + /* Yes.. wake the thread up */ + + putreg32(SDIO_RESPDONE_ICR | SDIO_CMDDONE_ICR, STM32_SDMMC1_ICR); + stm32_endwait(priv, SDIOWAIT_RESPONSEDONE); + } + } + + /* Is this a command completion event? */ + + if ((pending & SDIO_CMDDONE_STA) != 0) + { + /* Yes.. Is their a thread waiting for command done? */ + + if ((priv->waitevents & SDIOWAIT_RESPONSEDONE) != 0) + { + /* Yes.. wake the thread up */ + + putreg32(SDIO_CMDDONE_ICR, STM32_SDMMC1_ICR); + stm32_endwait(priv, SDIOWAIT_CMDDONE); + } + } + } + } + + return OK; +} + +/**************************************************************************** + * SDIO Interface Methods + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_lock + * + * Description: + * Locks the bus. Function calls low-level multiplexed bus routines to + * resolve bus requests and acknowledgment issues. + * + * Input Parameters: + * dev - An instance of the SDIO device interface + * lock - TRUE to lock, FALSE to unlock. + * + * Returned Value: + * OK on success; a negated errno on failure + * + ****************************************************************************/ + +#ifdef CONFIG_SDIO_MUXBUS +static int stm32_lock(FAR struct sdio_dev_s *dev, bool lock) +{ + /* Single SDIO instance so there is only one possibility. The multiplex + * bus is part of board support package. + */ + + stm32_muxbus_sdio_lock(lock); + return OK; +} +#endif + +/**************************************************************************** + * Name: stm32_reset + * + * Description: + * Reset the SDIO controller. Undo all setup and initialization. + * + * Input Parameters: + * dev - An instance of the SDIO device interface + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void stm32_reset(FAR struct sdio_dev_s *dev) +{ + FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev; + irqstate_t flags; + + /* Disable clocking */ + + flags = enter_critical_section(); + stm32_setpwrctrl(SDIO_POWER_PWRCTRL_OFF); + + /* Put SDIO registers in their default, reset state */ + + stm32_default(); + + /* Reset data */ + + priv->waitevents = 0; /* Set of events to be waited for */ + priv->waitmask = 0; /* Interrupt enables for event waiting */ + priv->wkupevent = 0; /* The event that caused the wakeup */ +#ifdef CONFIG_SDIO_DMA + priv->xfrflags = 0; /* Used to synchronize SDIO and DMA completion events */ +#endif + + wd_cancel(priv->waitwdog); /* Cancel any timeouts */ + + /* Interrupt mode data transfer support */ + + priv->buffer = 0; /* Address of current R/W buffer */ + priv->remaining = 0; /* Number of bytes remaining in the transfer */ + priv->xfrmask = 0; /* Interrupt enables for data transfer */ + + /* DMA data transfer support */ + + priv->widebus = false; /* Required for DMA support */ +#ifdef CONFIG_SDIO_DMA + priv->dmamode = false; /* true: DMA mode transfer */ +#endif + + /* Configure the SDIO peripheral */ + + stm32_setclkcr(STM32_CLCKCR_INIT | SDIO_CLKCR_CLKEN); + stm32_setpwrctrl(SDIO_POWER_PWRCTRL_ON); + leave_critical_section(flags); + + finfo("CLCKR: %08x POWER: %08x\n", + getreg32(STM32_SDMMC1_CLKCR), getreg32(STM32_SDMMC1_POWER)); +} + +/**************************************************************************** + * Name: stm32_status + * + * Description: + * Get SDIO status. + * + * Input Parameters: + * dev - Device-specific state data + * + * Returned Value: + * Returns a bitset of status values (see stm32_status_* defines) + * + ****************************************************************************/ + +static uint8_t stm32_status(FAR struct sdio_dev_s *dev) +{ + struct stm32_dev_s *priv = (struct stm32_dev_s *)dev; + return priv->cdstatus; +} + +/**************************************************************************** + * Name: stm32_widebus + * + * Description: + * Called after change in Bus width has been selected (via ACMD6). Most + * controllers will need to perform some special operations to work + * correctly in the new bus mode. + * + * Input Parameters: + * dev - An instance of the SDIO device interface + * wide - true: wide bus (4-bit) bus mode enabled + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void stm32_widebus(FAR struct sdio_dev_s *dev, bool wide) +{ + struct stm32_dev_s *priv = (struct stm32_dev_s *)dev; + priv->widebus = wide; +} + +/**************************************************************************** + * Name: stm32_clock + * + * Description: + * Enable/disable SDIO clocking + * + * Input Parameters: + * dev - An instance of the SDIO device interface + * rate - Specifies the clocking to use (see enum sdio_clock_e) + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void stm32_clock(FAR struct sdio_dev_s *dev, enum sdio_clock_e rate) +{ + uint32_t clckr; + + switch (rate) + { + /* Disable clocking (with default ID mode divisor) */ + + default: + case CLOCK_SDIO_DISABLED: + clckr = STM32_CLCKCR_INIT; + return; + + /* Enable in initial ID mode clocking (<400KHz) */ + + case CLOCK_IDMODE: + clckr = (STM32_CLCKCR_INIT | SDIO_CLKCR_CLKEN); + break; + + /* Enable in MMC normal operation clocking */ + + case CLOCK_MMC_TRANSFER: + clckr = (SDIO_CLKCR_MMCXFR | SDIO_CLKCR_CLKEN); + break; + + /* SD normal operation clocking (wide 4-bit mode) */ + + case CLOCK_SD_TRANSFER_4BIT: +#ifndef CONFIG_SDIO_WIDTH_D1_ONLY + clckr = (SDIO_CLCKR_SDWIDEXFR | SDIO_CLKCR_CLKEN); + break; +#endif + + /* SD normal operation clocking (narrow 1-bit mode) */ + + case CLOCK_SD_TRANSFER_1BIT: + clckr = (SDIO_CLCKR_SDXFR | SDIO_CLKCR_CLKEN); + break; + } + + /* Set the new clock frequency along with the clock enable/disable bit */ + + stm32_setclkcr(clckr); +} + +/**************************************************************************** + * Name: stm32_attach + * + * Description: + * Attach and prepare interrupts + * + * Input Parameters: + * dev - An instance of the SDIO device interface + * + * Returned Value: + * OK on success; A negated errno on failure. + * + ****************************************************************************/ + +static int stm32_attach(FAR struct sdio_dev_s *dev) +{ + int ret; + + /* Attach the SDIO interrupt handler */ + + ret = irq_attach(STM32_IRQ_SDMMC1, stm32_interrupt); + if (ret == OK) + { + + /* Disable all interrupts at the SDIO controller and clear static + * interrupt flags + */ + + putreg32(SDIO_MASK_RESET, STM32_SDMMC1_MASK); + putreg32(SDIO_ICR_STATICFLAGS, STM32_SDMMC1_ICR); + + /* Enable SDIO interrupts at the NVIC. They can now be enabled at + * the SDIO controller as needed. + */ + + up_enable_irq(STM32_IRQ_SDMMC1); + +#ifdef CONFIG_ARCH_IRQPRIO + /* Set the interrupt priority */ + + up_prioritize_irq(STM32_IRQ_SDIO, CONFIG_SDIO_PRI); +#endif + } + + return ret; +} + +/**************************************************************************** + * Name: stm32_sendcmd + * + * Description: + * Send the SDIO command + * + * Input Parameters: + * dev - An instance of the SDIO device interface + * cmd - The command to send (32-bits, encoded) + * arg - 32-bit argument required with some commands + * + * Returned Value: + * None + * + ****************************************************************************/ + +static int stm32_sendcmd(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t arg) +{ + uint32_t regval; + uint32_t cmdidx; + + /* Set the SDIO Argument value */ + + putreg32(arg, STM32_SDMMC1_ARG); + + /* Clear CMDINDEX, WAITRESP, WAITINT, WAITPEND, and CPSMEN bits */ + + regval = getreg32(STM32_SDMMC1_CMD); + regval &= ~(SDIO_CMD_CMDINDEX_MASK | SDIO_CMD_WAITRESP_MASK | + SDIO_CMD_WAITINT | SDIO_CMD_WAITPEND | SDIO_CMD_CPSMEN); + + /* Set WAITRESP bits */ + + switch (cmd & MMCSD_RESPONSE_MASK) + { + case MMCSD_NO_RESPONSE: + regval |= SDIO_CMD_NORESPONSE; + break; + + case MMCSD_R1_RESPONSE: + case MMCSD_R1B_RESPONSE: + case MMCSD_R3_RESPONSE: + case MMCSD_R4_RESPONSE: + case MMCSD_R5_RESPONSE: + case MMCSD_R6_RESPONSE: + case MMCSD_R7_RESPONSE: + regval |= SDIO_CMD_SHORTRESPONSE; + break; + + case MMCSD_R2_RESPONSE: + regval |= SDIO_CMD_LONGRESPONSE; + break; + } + + /* Set CPSMEN and the command index */ + + cmdidx = (cmd & MMCSD_CMDIDX_MASK) >> MMCSD_CMDIDX_SHIFT; + regval |= cmdidx | SDIO_CMD_CPSMEN; + + finfo("cmd: %08x arg: %08x regval: %08x\n", cmd, arg, regval); + + /* Write the SDIO CMD */ + + putreg32(SDIO_RESPDONE_ICR | SDIO_CMDDONE_ICR, STM32_SDMMC1_ICR); + putreg32(regval, STM32_SDMMC1_CMD); + return OK; +} + +/**************************************************************************** + * Name: stm32_recvsetup + * + * Description: + * Setup hardware in preparation for data transfer from the card in non-DMA + * (interrupt driven mode). This method will do whatever controller setup + * is necessary. This would be called for SD memory just BEFORE sending + * CMD13 (SEND_STATUS), CMD17 (READ_SINGLE_BLOCK), CMD18 + * (READ_MULTIPLE_BLOCKS), ACMD51 (SEND_SCR), etc. Normally, SDIO_WAITEVENT + * will be called to receive the indication that the transfer is complete. + * + * Input Parameters: + * dev - An instance of the SDIO device interface + * buffer - Address of the buffer in which to receive the data + * nbytes - The number of bytes in the transfer + * + * Returned Value: + * Number of bytes sent on success; a negated errno on failure + * + ****************************************************************************/ + +static int stm32_recvsetup(FAR struct sdio_dev_s *dev, FAR uint8_t *buffer, + size_t nbytes) +{ + struct stm32_dev_s *priv = (struct stm32_dev_s *)dev; + uint32_t dblocksize; + + DEBUGASSERT(priv != NULL && buffer != NULL && nbytes > 0); + DEBUGASSERT(((uint32_t)buffer & 3) == 0); + + /* Reset the DPSM configuration */ + + stm32_datadisable(); + stm32_sampleinit(); + stm32_sample(priv, SAMPLENDX_BEFORE_SETUP); + + /* Save the destination buffer information for use by the interrupt handler */ + + priv->buffer = (uint32_t *)buffer; + priv->remaining = nbytes; +#ifdef CONFIG_SDIO_DMA + priv->dmamode = false; +#endif + + /* Then set up the SDIO data path */ + + dblocksize = stm32_log2(nbytes) << SDIO_DCTRL_DBLOCKSIZE_SHIFT; + stm32_dataconfig(SDIO_DTIMER_DATATIMEOUT, nbytes, dblocksize | SDIO_DCTRL_DTDIR); + + /* And enable interrupts */ + + stm32_configxfrints(priv, SDIO_RECV_MASK); + stm32_sample(priv, SAMPLENDX_AFTER_SETUP); + return OK; +} + +/**************************************************************************** + * Name: stm32_sendsetup + * + * Description: + * Setup hardware in preparation for data transfer from the card. This method + * will do whatever controller setup is necessary. This would be called + * for SD memory just AFTER sending CMD24 (WRITE_BLOCK), CMD25 + * (WRITE_MULTIPLE_BLOCK), ... and before SDIO_SENDDATA is called. + * + * Input Parameters: + * dev - An instance of the SDIO device interface + * buffer - Address of the buffer containing the data to send + * nbytes - The number of bytes in the transfer + * + * Returned Value: + * Number of bytes sent on success; a negated errno on failure + * + ****************************************************************************/ + +static int stm32_sendsetup(FAR struct sdio_dev_s *dev, FAR const uint8_t *buffer, + size_t nbytes) +{ + struct stm32_dev_s *priv = (struct stm32_dev_s *)dev; + uint32_t dblocksize; + + DEBUGASSERT(priv != NULL && buffer != NULL && nbytes > 0); + DEBUGASSERT(((uint32_t)buffer & 3) == 0); + + /* Reset the DPSM configuration */ + + stm32_datadisable(); + stm32_sampleinit(); + stm32_sample(priv, SAMPLENDX_BEFORE_SETUP); + + /* Save the source buffer information for use by the interrupt handler */ + + priv->buffer = (uint32_t *)buffer; + priv->remaining = nbytes; +#ifdef CONFIG_SDIO_DMA + priv->dmamode = false; +#endif + + /* Then set up the SDIO data path */ + + dblocksize = stm32_log2(nbytes) << SDIO_DCTRL_DBLOCKSIZE_SHIFT; + stm32_dataconfig(SDIO_DTIMER_DATATIMEOUT, nbytes, dblocksize); + + /* Enable TX interrupts */ + + stm32_configxfrints(priv, SDIO_SEND_MASK); + stm32_sample(priv, SAMPLENDX_AFTER_SETUP); + return OK; +} + +/**************************************************************************** + * Name: stm32_cancel + * + * Description: + * Cancel the data transfer setup of SDIO_RECVSETUP, SDIO_SENDSETUP, + * SDIO_DMARECVSETUP or SDIO_DMASENDSETUP. This must be called to cancel + * the data transfer setup if, for some reason, you cannot perform the + * transfer. + * + * Input Parameters: + * dev - An instance of the SDIO device interface + * + * Returned Value: + * OK is success; a negated errno on failure + * + ****************************************************************************/ + +static int stm32_cancel(FAR struct sdio_dev_s *dev) +{ + struct stm32_dev_s *priv = (struct stm32_dev_s *)dev; + + /* Disable all transfer- and event- related interrupts */ + + stm32_configxfrints(priv, 0); + stm32_configwaitints(priv, 0, 0, 0); + + /* Clearing pending interrupt status on all transfer- and event- related + * interrupts + */ + + putreg32(SDIO_WAITALL_ICR, STM32_SDMMC1_ICR); + + /* Cancel any watchdog timeout */ + + (void)wd_cancel(priv->waitwdog); + + /* If this was a DMA transfer, make sure that DMA is stopped */ + +#ifdef CONFIG_SDIO_DMA + if (priv->dmamode) + { + /* Make sure that the DMA is stopped (it will be stopped automatically + * on normal transfers, but not necessarily when the transfer terminates + * on an error condition. + */ + + stm32_dmastop(priv->dma); + } +#endif + + /* Mark no transfer in progress */ + + priv->remaining = 0; + return OK; +} + +/**************************************************************************** + * Name: stm32_waitresponse + * + * Description: + * Poll-wait for the response to the last command to be ready. + * + * Input Parameters: + * dev - An instance of the SDIO device interface + * cmd - The command that was sent. See 32-bit command definitions above. + * + * Returned Value: + * OK is success; a negated errno on failure + * + ****************************************************************************/ + +static int stm32_waitresponse(FAR struct sdio_dev_s *dev, uint32_t cmd) +{ + int32_t timeout; + uint32_t events; + + switch (cmd & MMCSD_RESPONSE_MASK) + { + case MMCSD_NO_RESPONSE: + events = SDIO_CMDDONE_STA; + timeout = SDIO_CMDTIMEOUT; + break; + + case MMCSD_R1_RESPONSE: + case MMCSD_R1B_RESPONSE: + case MMCSD_R2_RESPONSE: + case MMCSD_R6_RESPONSE: + events = SDIO_RESPDONE_STA; + timeout = SDIO_LONGTIMEOUT; + break; + + case MMCSD_R4_RESPONSE: + case MMCSD_R5_RESPONSE: + return -ENOSYS; + + case MMCSD_R3_RESPONSE: + case MMCSD_R7_RESPONSE: + events = SDIO_RESPDONE_STA; + timeout = SDIO_CMDTIMEOUT; + break; + + default: + return -EINVAL; + } + + /* Then wait for the response (or timeout) */ + + while ((getreg32(STM32_SDMMC1_STA) & events) == 0) + { + if (--timeout <= 0) + { + ferr("ERROR: Timeout cmd: %08x events: %08x STA: %08x\n", + cmd, events, getreg32(STM32_SDMMC1_STA)); + + return -ETIMEDOUT; + } + } + + putreg32(SDIO_CMDDONE_ICR, STM32_SDMMC1_ICR); + return OK; +} + +/**************************************************************************** + * Name: stm32_recvRx + * + * Description: + * Receive response to SDIO command. Only the critical payload is + * returned -- that is 32 bits for 48 bit status and 128 bits for 136 bit + * status. The driver implementation should verify the correctness of + * the remaining, non-returned bits (CRCs, CMD index, etc.). + * + * Input Parameters: + * dev - An instance of the SDIO device interface + * Rx - Buffer in which to receive the response + * + * Returned Value: + * Number of bytes sent on success; a negated errno on failure. Here a + * failure means only a faiure to obtain the requested reponse (due to + * transport problem -- timeout, CRC, etc.). The implementation only + * assures that the response is returned intacta and does not check errors + * within the response itself. + * + ****************************************************************************/ + +static int stm32_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t *rshort) +{ +#ifdef CONFIG_DEBUG_FEATURES + uint32_t respcmd; +#endif + uint32_t regval; + int ret = OK; + + /* R1 Command response (48-bit) + * 47 0 Start bit + * 46 0 Transmission bit (0=from card) + * 45:40 bit5 - bit0 Command index (0-63) + * 39:8 bit31 - bit0 32-bit card status + * 7:1 bit6 - bit0 CRC7 + * 0 1 End bit + * + * R1b Identical to R1 with the additional busy signaling via the data + * line. + * + * R6 Published RCA Response (48-bit, SD card only) + * 47 0 Start bit + * 46 0 Transmission bit (0=from card) + * 45:40 bit5 - bit0 Command index (0-63) + * 39:8 bit31 - bit0 32-bit Argument Field, consisting of: + * [31:16] New published RCA of card + * [15:0] Card status bits {23,22,19,12:0} + * 7:1 bit6 - bit0 CRC7 + * 0 1 End bit + */ + + +#ifdef CONFIG_DEBUG_FEATURES + if (!rshort) + { + ferr("ERROR: rshort=NULL\n"); + ret = -EINVAL; + } + + /* Check that this is the correct response to this command */ + + else if ((cmd & MMCSD_RESPONSE_MASK) != MMCSD_R1_RESPONSE && + (cmd & MMCSD_RESPONSE_MASK) != MMCSD_R1B_RESPONSE && + (cmd & MMCSD_RESPONSE_MASK) != MMCSD_R6_RESPONSE) + { + ferr("ERROR: Wrong response CMD=%08x\n", cmd); + ret = -EINVAL; + } + else +#endif + { + /* Check if a timeout or CRC error occurred */ + + regval = getreg32(STM32_SDMMC1_STA); + if ((regval & SDIO_STA_CTIMEOUT) != 0) + { + ferr("ERROR: Command timeout: %08x\n", regval); + ret = -ETIMEDOUT; + } + else if ((regval & SDIO_STA_CCRCFAIL) != 0) + { + ferr("ERROR: CRC failure: %08x\n", regval); + ret = -EIO; + } +#ifdef CONFIG_DEBUG_FEATURES + else + { + /* Check response received is of desired command */ + + respcmd = getreg32(STM32_SDMMC1_RESPCMD); + if ((uint8_t)(respcmd & SDIO_RESPCMD_MASK) != (cmd & MMCSD_CMDIDX_MASK)) + { + ferr("ERROR: RESCMD=%02x CMD=%08x\n", respcmd, cmd); + ret = -EINVAL; + } + } +#endif + } + + /* Clear all pending message completion events and return the R1/R6 response */ + + putreg32(SDIO_RESPDONE_ICR | SDIO_CMDDONE_ICR, STM32_SDMMC1_ICR); + *rshort = getreg32(STM32_SDMMC1_RESP1); + return ret; +} + +static int stm32_recvlong(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t rlong[4]) +{ + uint32_t regval; + int ret = OK; + + /* R2 CID, CSD register (136-bit) + * 135 0 Start bit + * 134 0 Transmission bit (0=from card) + * 133:128 bit5 - bit0 Reserved + * 127:1 bit127 - bit1 127-bit CID or CSD register + * (including internal CRC) + * 0 1 End bit + */ + +#ifdef CONFIG_DEBUG_FEATURES + /* Check that R1 is the correct response to this command */ + + if ((cmd & MMCSD_RESPONSE_MASK) != MMCSD_R2_RESPONSE) + { + ferr("ERROR: Wrong response CMD=%08x\n", cmd); + ret = -EINVAL; + } + else +#endif + { + /* Check if a timeout or CRC error occurred */ + + regval = getreg32(STM32_SDMMC1_STA); + if (regval & SDIO_STA_CTIMEOUT) + { + ferr("ERROR: Timeout STA: %08x\n", regval); + ret = -ETIMEDOUT; + } + else if (regval & SDIO_STA_CCRCFAIL) + { + ferr("ERROR: CRC fail STA: %08x\n", regval); + ret = -EIO; + } + } + + /* Return the long response */ + + putreg32(SDIO_RESPDONE_ICR | SDIO_CMDDONE_ICR, STM32_SDMMC1_ICR); + if (rlong) + { + rlong[0] = getreg32(STM32_SDMMC1_RESP1); + rlong[1] = getreg32(STM32_SDMMC1_RESP2); + rlong[2] = getreg32(STM32_SDMMC1_RESP3); + rlong[3] = getreg32(STM32_SDMMC1_RESP4); + } + return ret; +} + +static int stm32_recvshort(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t *rshort) +{ + uint32_t regval; + int ret = OK; + + /* R3 OCR (48-bit) + * 47 0 Start bit + * 46 0 Transmission bit (0=from card) + * 45:40 bit5 - bit0 Reserved + * 39:8 bit31 - bit0 32-bit OCR register + * 7:1 bit6 - bit0 Reserved + * 0 1 End bit + */ + + /* Check that this is the correct response to this command */ + +#ifdef CONFIG_DEBUG_FEATURES + if ((cmd & MMCSD_RESPONSE_MASK) != MMCSD_R3_RESPONSE && + (cmd & MMCSD_RESPONSE_MASK) != MMCSD_R7_RESPONSE) + { + ferr("ERROR: Wrong response CMD=%08x\n", cmd); + ret = -EINVAL; + } + else +#endif + { + /* Check if a timeout occurred (Apparently a CRC error can terminate + * a good response) + */ + + regval = getreg32(STM32_SDMMC1_STA); + if (regval & SDIO_STA_CTIMEOUT) + { + ferr("ERROR: Timeout STA: %08x\n", regval); + ret = -ETIMEDOUT; + } + } + + putreg32(SDIO_RESPDONE_ICR | SDIO_CMDDONE_ICR, STM32_SDMMC1_ICR); + if (rshort) + { + *rshort = getreg32(STM32_SDMMC1_RESP1); + } + return ret; +} + +/* MMC responses not supported */ + +static int stm32_recvnotimpl(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t *rnotimpl) +{ + putreg32(SDIO_RESPDONE_ICR | SDIO_CMDDONE_ICR, STM32_SDMMC1_ICR); + return -ENOSYS; +} + +/**************************************************************************** + * Name: stm32_waitenable + * + * Description: + * Enable/disable of a set of SDIO wait events. This is part of the + * the SDIO_WAITEVENT sequence. The set of to-be-waited-for events is + * configured before calling stm32_eventwait. This is done in this way + * to help the driver to eliminate race conditions between the command + * setup and the subsequent events. + * + * The enabled events persist until either (1) SDIO_WAITENABLE is called + * again specifying a different set of wait events, or (2) SDIO_EVENTWAIT + * returns. + * + * Input Parameters: + * dev - An instance of the SDIO device interface + * eventset - A bitset of events to enable or disable (see SDIOWAIT_* + * definitions). 0=disable; 1=enable. + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void stm32_waitenable(FAR struct sdio_dev_s *dev, + sdio_eventset_t eventset) +{ + struct stm32_dev_s *priv = (struct stm32_dev_s *)dev; + uint32_t waitmask; + + DEBUGASSERT(priv != NULL); + + /* Disable event-related interrupts */ + + stm32_configwaitints(priv, 0, 0, 0); + + /* Select the interrupt mask that will give us the appropriate wakeup + * interrupts. + */ + +#if defined(CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE) + if ((eventset & SDIOWAIT_WRCOMPLETE) != 0) + { + waitmask = SDIOWAIT_WRCOMPLETE; + } + else +#endif + { + waitmask = 0; + if ((eventset & SDIOWAIT_CMDDONE) != 0) + { + waitmask |= SDIO_CMDDONE_MASK; + } + + if ((eventset & SDIOWAIT_RESPONSEDONE) != 0) + { + waitmask |= SDIO_RESPDONE_MASK; + } + + if ((eventset & SDIOWAIT_TRANSFERDONE) != 0) + { + waitmask |= SDIO_XFRDONE_MASK; + } + + /* Enable event-related interrupts */ + + putreg32(SDIO_WAITALL_ICR, STM32_SDMMC1_ICR); + } + + stm32_configwaitints(priv, waitmask, eventset, 0); +} + +/**************************************************************************** + * Name: stm32_eventwait + * + * Description: + * Wait for one of the enabled events to occur (or a timeout). Note that + * all events enabled by SDIO_WAITEVENTS are disabled when stm32_eventwait + * returns. SDIO_WAITEVENTS must be called again before stm32_eventwait + * can be used again. + * + * Input Parameters: + * dev - An instance of the SDIO device interface + * timeout - Maximum time in milliseconds to wait. Zero means immediate + * timeout with no wait. The timeout value is ignored if + * SDIOWAIT_TIMEOUT is not included in the waited-for eventset. + * + * Returned Value: + * Event set containing the event(s) that ended the wait. Should always + * be non-zero. All events are disabled after the wait concludes. + * + ****************************************************************************/ + +static sdio_eventset_t stm32_eventwait(FAR struct sdio_dev_s *dev, + uint32_t timeout) +{ + struct stm32_dev_s *priv = (struct stm32_dev_s *)dev; + sdio_eventset_t wkupevent = 0; + irqstate_t flags; + int ret; + + /* There is a race condition here... the event may have completed before + * we get here. In this case waitevents will be zero, but wkupevents will + * be non-zero (and, hopefully, the semaphore count will also be non-zero. + */ + + flags = enter_critical_section(); + DEBUGASSERT(priv->waitevents != 0 || priv->wkupevent != 0); + + /* Check if the timeout event is specified in the event set */ + + if ((priv->waitevents & SDIOWAIT_TIMEOUT) != 0) + { + int delay; + + /* Yes.. Handle a cornercase: The user request a timeout event but + * with timeout == 0? + */ + + if (!timeout) + { + /* Then just tell the caller that we already timed out */ + + wkupevent = SDIOWAIT_TIMEOUT; + goto errout; + } + + /* Start the watchdog timer */ + + delay = MSEC2TICK(timeout); + ret = wd_start(priv->waitwdog, delay, (wdentry_t)stm32_eventtimeout, + 1, (uint32_t)priv); + if (ret != OK) + { + ferr("ERROR: wd_start failed: %d\n", ret); + } + } + +#if defined(CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE) + if ((priv->waitevents & SDIOWAIT_WRCOMPLETE) != 0) + { + /* Atomically read pin to see if ready (true) and determine if ISR fired + * If Pin is ready and if ISR did NOT fire end the wait here + */ + + if (stm32_gpioread(GPIO_SDMMC1_D0) && + (priv->wkupevent & SDIOWAIT_WRCOMPLETE) == 0) + { + stm32_endwait(priv, SDIOWAIT_WRCOMPLETE); + } + } +#endif + + /* Loop until the event (or the timeout occurs). Race conditions are avoided + * by calling stm32_waitenable prior to triggering the logic that will cause + * the wait to terminate. Under certain race conditions, the waited-for + * may have already occurred before this function was called! + */ + + for (; ; ) + { + /* Wait for an event in event set to occur. If this the event has already + * occurred, then the semaphore will already have been incremented and + * there will be no wait. + */ + + stm32_takesem(priv); + wkupevent = priv->wkupevent; + + /* Check if the event has occurred. When the event has occurred, then + * evenset will be set to 0 and wkupevent will be set to a nonzero value. + */ + + if (wkupevent != 0) + { + /* Yes... break out of the loop with wkupevent non-zero */ + + break; + } + } + + /* Disable event-related interrupts */ + + stm32_configwaitints(priv, 0, 0, 0); +#ifdef CONFIG_SDIO_DMA + priv->xfrflags = 0; +#endif + +errout: + leave_critical_section(flags); + stm32_dumpsamples(priv); + return wkupevent; +} + +/**************************************************************************** + * Name: stm32_callbackenable + * + * Description: + * Enable/disable of a set of SDIO callback events. This is part of the + * the SDIO callback sequence. The set of events is configured to enabled + * callbacks to the function provided in stm32_registercallback. + * + * Events are automatically disabled once the callback is performed and no + * further callback events will occur until they are again enabled by + * calling this methos. + * + * Input Parameters: + * dev - An instance of the SDIO device interface + * eventset - A bitset of events to enable or disable (see SDIOMEDIA_* + * definitions). 0=disable; 1=enable. + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void stm32_callbackenable(FAR struct sdio_dev_s *dev, + sdio_eventset_t eventset) +{ + struct stm32_dev_s *priv = (struct stm32_dev_s *)dev; + + finfo("eventset: %02x\n", eventset); + DEBUGASSERT(priv != NULL); + + priv->cbevents = eventset; + stm32_callback(priv); +} + +/**************************************************************************** + * Name: stm32_registercallback + * + * Description: + * Register a callback that that will be invoked on any media status + * change. Callbacks should not be made from interrupt handlers, rather + * interrupt level events should be handled by calling back on the work + * thread. + * + * When this method is called, all callbacks should be disabled until they + * are enabled via a call to SDIO_CALLBACKENABLE + * + * Input Parameters: + * dev - Device-specific state data + * callback - The funtion to call on the media change + * arg - A caller provided value to return with the callback + * + * Returned Value: + * 0 on success; negated errno on failure. + * + ****************************************************************************/ + +static int stm32_registercallback(FAR struct sdio_dev_s *dev, + worker_t callback, void *arg) +{ + struct stm32_dev_s *priv = (struct stm32_dev_s *)dev; + + /* Disable callbacks and register this callback and is argument */ + + finfo("Register %p(%p)\n", callback, arg); + DEBUGASSERT(priv != NULL); + + priv->cbevents = 0; + priv->cbarg = arg; + priv->callback = callback; + return OK; +} + +/**************************************************************************** + * Name: stm32_dmasupported + * + * Description: + * Return true if the hardware can support DMA + * + * Input Parameters: + * dev - An instance of the SDIO device interface + * + * Returned Value: + * true if DMA is supported. + * + ****************************************************************************/ + +#ifdef CONFIG_SDIO_DMA +static bool stm32_dmasupported(FAR struct sdio_dev_s *dev) +{ + return true; +} +#endif + +/**************************************************************************** + * Name: stm32_dmapreflight + * + * Description: + * Preflight an SDIO DMA operation. If the buffer is not well-formed for + * SDIO DMA transfer (alignment, size, etc.) returns an error. + * + * Input Parameters: + * dev - An instance of the SDIO device interface + * buffer - The memory to DMA to/from + * buflen - The size of the DMA transfer in bytes + * + * Returned Value: + * OK on success; a negated errno on failure + ****************************************************************************/ + +#if defined(CONFIG_SDIO_DMA) && defined(CONFIG_SDIO_PREFLIGHT) +static int stm32_dmapreflight(FAR struct sdio_dev_s *dev, + FAR const uint8_t *buffer, size_t buflen) +{ + struct stm32_dev_s *priv = (struct stm32_dev_s *)dev; + + DEBUGASSERT(priv != NULL && buffer != NULL && buflen > 0); + + /* Wide bus operation is required for DMA */ + + if (!priv->widebus) + { + return -EINVAL; + } + + /* DMA must be possible to the buffer */ + + if (!stm32_dmacapable((uintptr_t)buffer, (buflen + 3) >> 2, SDIO_RXDMA32_CONFIG)) + { + return -EFAULT; + } + + return 0; +} +#endif + +/**************************************************************************** + * Name: stm32_dmarecvsetup + * + * Description: + * Setup to perform a read DMA. If the processor supports a data cache, + * then this method will also make sure that the contents of the DMA memory + * and the data cache are coherent. For read transfers this may mean + * invalidating the data cache. + * + * Input Parameters: + * dev - An instance of the SDIO device interface + * buffer - The memory to DMA from + * buflen - The size of the DMA transfer in bytes + * + * Returned Value: + * OK on success; a negated errno on failure + * + ****************************************************************************/ + +#ifdef CONFIG_SDIO_DMA +static int stm32_dmarecvsetup(FAR struct sdio_dev_s *dev, FAR uint8_t *buffer, + size_t buflen) +{ + struct stm32_dev_s *priv = (struct stm32_dev_s *)dev; + uint32_t dblocksize; + + DEBUGASSERT(priv != NULL && buffer != NULL && buflen > 0); +#ifdef CONFIG_SDIO_PREFLIGHT + DEBUGASSERT(stm32_dmapreflight(dev, buffer, buflen) == 0); +#endif + +#ifdef CONFIG_ARMV7M_DCACHE + /* buffer alignment is required for DMA transfers with dcache */ + + if (((uintptr_t)buffer & (ARMV7M_DCACHE_LINESIZE-1)) != 0 || (buflen & (ARMV7M_DCACHE_LINESIZE-1)) != 0) + { + return -EFAULT; + } +#endif + + /* Reset the DPSM configuration */ + + stm32_datadisable(); + + /* Initialize register sampling */ + + stm32_sampleinit(); + stm32_sample(priv, SAMPLENDX_BEFORE_SETUP); + + /* Save the destination buffer information for use by the interrupt handler */ + + priv->buffer = (uint32_t *)buffer; + priv->remaining = buflen; + priv->dmamode = true; + + /* Then set up the SDIO data path */ + + dblocksize = stm32_log2(buflen) << SDIO_DCTRL_DBLOCKSIZE_SHIFT; + stm32_dataconfig(SDIO_DTIMER_DATATIMEOUT, buflen, dblocksize | SDIO_DCTRL_DTDIR); + + /* Configure the RX DMA */ + + stm32_configxfrints(priv, SDIO_DMARECV_MASK); + + stm32_dmasetup(priv->dma, STM32_SDMMC1_FIFO, (uint32_t)buffer, + (buflen + 3) >> 2, SDIO_RXDMA32_CONFIG); + + /* Force RAM reread */ + + arch_invalidate_dcache((uintptr_t)buffer,(uintptr_t)buffer + buflen); + + /* Start the DMA */ + + stm32_sample(priv, SAMPLENDX_BEFORE_ENABLE); + stm32_dmastart(priv->dma, stm32_dmacallback, priv, false); + stm32_sample(priv, SAMPLENDX_AFTER_SETUP); + + return OK; +} +#endif + +/**************************************************************************** + * Name: stm32_dmasendsetup + * + * Description: + * Setup to perform a write DMA. If the processor supports a data cache, + * then this method will also make sure that the contents of the DMA memory + * and the data cache are coherent. For write transfers, this may mean + * flushing the data cache. + * + * Input Parameters: + * dev - An instance of the SDIO device interface + * buffer - The memory to DMA into + * buflen - The size of the DMA transfer in bytes + * + * Returned Value: + * OK on success; a negated errno on failure + * + ****************************************************************************/ + +#ifdef CONFIG_SDIO_DMA +static int stm32_dmasendsetup(FAR struct sdio_dev_s *dev, + FAR const uint8_t *buffer, size_t buflen) +{ + struct stm32_dev_s *priv = (struct stm32_dev_s *)dev; + uint32_t dblocksize; + + DEBUGASSERT(priv != NULL && buffer != NULL && buflen > 0); +#ifdef CONFIG_SDIO_PREFLIGHT + DEBUGASSERT(stm32_dmapreflight(dev, buffer, buflen) == 0); +#endif + +#ifdef CONFIG_ARMV7M_DCACHE + /* buffer alignment is required for DMA transfers with dcache */ + + if (((uintptr_t)buffer & (ARMV7M_DCACHE_LINESIZE-1)) != 0 || (buflen & (ARMV7M_DCACHE_LINESIZE-1)) != 0) + { + return -EFAULT; + } +#endif + + /* Reset the DPSM configuration */ + + stm32_datadisable(); + + /* Initialize register sampling */ + + stm32_sampleinit(); + stm32_sample(priv, SAMPLENDX_BEFORE_SETUP); + + /* Flush cache to physical memory */ + + arch_flush_dcache((uintptr_t)buffer, (uintptr_t)buffer + buflen); + + /* Save the source buffer information for use by the interrupt handler */ + + priv->buffer = (uint32_t *)buffer; + priv->remaining = buflen; + priv->dmamode = true; + + /* Then set up the SDIO data path */ + + dblocksize = stm32_log2(buflen) << SDIO_DCTRL_DBLOCKSIZE_SHIFT; + stm32_dataconfig(SDIO_DTIMER_DATATIMEOUT, buflen, dblocksize); + + /* Configure the TX DMA */ + + stm32_dmasetup(priv->dma, STM32_SDMMC1_FIFO, (uint32_t)buffer, + (buflen + 3) >> 2, SDIO_TXDMA32_CONFIG); + + stm32_sample(priv, SAMPLENDX_BEFORE_ENABLE); + + /* Start the DMA */ + + stm32_dmastart(priv->dma, stm32_dmacallback, priv, false); + stm32_sample(priv, SAMPLENDX_AFTER_SETUP); + + /* Enable TX interrupts */ + + stm32_configxfrints(priv, SDIO_DMASEND_MASK); + + return OK; +} +#endif + +/**************************************************************************** + * Initialization/uninitialization/reset + ****************************************************************************/ +/**************************************************************************** + * Name: stm32_callback + * + * Description: + * Perform callback. + * + * Assumptions: + * This function does not execute in the context of an interrupt handler. + * It may be invoked on any user thread or scheduled on the work thread + * from an interrupt handler. + * + ****************************************************************************/ + +static void stm32_callback(void *arg) +{ + struct stm32_dev_s *priv = (struct stm32_dev_s *)arg; + + /* Is a callback registered? */ + + DEBUGASSERT(priv != NULL); + finfo("Callback %p(%p) cbevents: %02x cdstatus: %02x\n", + priv->callback, priv->cbarg, priv->cbevents, priv->cdstatus); + + if (priv->callback) + { + /* Yes.. Check for enabled callback events */ + + if ((priv->cdstatus & SDIO_STATUS_PRESENT) != 0) + { + /* Media is present. Is the media inserted event enabled? */ + + if ((priv->cbevents & SDIOMEDIA_INSERTED) == 0) + { + /* No... return without performing the callback */ + + return; + } + } + else + { + /* Media is not present. Is the media eject event enabled? */ + + if ((priv->cbevents & SDIOMEDIA_EJECTED) == 0) + { + /* No... return without performing the callback */ + + return; + } + } + + /* Perform the callback, disabling further callbacks. Of course, the + * the callback can (and probably should) re-enable callbacks. + */ + + priv->cbevents = 0; + + /* Callbacks cannot be performed in the context of an interrupt handler. + * If we are in an interrupt handler, then queue the callback to be + * performed later on the work thread. + */ + + if (up_interrupt_context()) + { + /* Yes.. queue it */ + + finfo("Queuing callback to %p(%p)\n", priv->callback, priv->cbarg); + (void)work_queue(HPWORK, &priv->cbwork, (worker_t)priv->callback, priv->cbarg, 0); + } + else + { + /* No.. then just call the callback here */ + + finfo("Callback to %p(%p)\n", priv->callback, priv->cbarg); + priv->callback(priv->cbarg); + } + } +} + +/**************************************************************************** + * Name: stm32_default + * + * Description: + * Restore SDIO registers to their default, reset values + * + ****************************************************************************/ + +static void stm32_default(void) +{ + putreg32(SDIO_POWER_RESET, STM32_SDMMC1_POWER); + putreg32(SDIO_CLKCR_RESET, STM32_SDMMC1_CLKCR); + putreg32(SDIO_ARG_RESET, STM32_SDMMC1_ARG); + putreg32(SDIO_CMD_RESET, STM32_SDMMC1_CMD); + putreg32(SDIO_DTIMER_RESET, STM32_SDMMC1_DTIMER); + putreg32(SDIO_DLEN_RESET, STM32_SDMMC1_DLEN); + putreg32(SDIO_DCTRL_RESET, STM32_SDMMC1_DCTRL); + putreg32(SDIO_ICR_RESET, STM32_SDMMC1_ICR); + putreg32(SDIO_MASK_RESET, STM32_SDMMC1_MASK); +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: sdio_initialize + * + * Description: + * Initialize SDIO for operation. + * + * Input Parameters: + * slotno - Not used. + * + * Returned Values: + * A reference to an SDIO interface structure. NULL is returned on failures. + * + ****************************************************************************/ + +FAR struct sdio_dev_s *sdio_initialize(int slotno) +{ + /* There is only one slot */ + + struct stm32_dev_s *priv = &g_sdiodev; + + /* Initialize the SDIO slot structure */ + + sem_init(&priv->waitsem, 0, 0); + priv->waitwdog = wd_create(); + DEBUGASSERT(priv->waitwdog); + + /* Allocate a DMA channel */ + +#ifdef CONFIG_SDIO_DMA + priv->dma = stm32_dmachannel(SDIO_DMACHAN); + DEBUGASSERT(priv->dma); +#endif + + /* Configure GPIOs for 4-bit, wide-bus operation (the chip is capable of + * 8-bit wide bus operation but D4-D7 are not configured). + * + * If bus is multiplexed then there is a custom bus configuration utility + * in the scope of the board support package. + */ + +#ifndef CONFIG_SDIO_MUXBUS + stm32_configgpio(GPIO_SDMMC1_D0); +#ifndef CONFIG_SDIO_WIDTH_D1_ONLY + stm32_configgpio(GPIO_SDMMC1_D1); + stm32_configgpio(GPIO_SDMMC1_D2); + stm32_configgpio(GPIO_SDMMC1_D3); +#endif + stm32_configgpio(GPIO_SDMMC1_CK); + stm32_configgpio(GPIO_SDMMC1_CMD); +#endif + + /* Reset the card and assure that it is in the initial, unconfigured + * state. + */ + + stm32_reset(&priv->dev); + return &g_sdiodev.dev; +} + +/**************************************************************************** + * Name: sdio_mediachange + * + * Description: + * Called by board-specific logic -- posssible from an interrupt handler -- + * in order to signal to the driver that a card has been inserted or + * removed from the slot + * + * Input Parameters: + * dev - An instance of the SDIO driver device state structure. + * cardinslot - true is a card has been detected in the slot; false if a + * card has been removed from the slot. Only transitions + * (inserted->removed or removed->inserted should be reported) + * + * Returned Values: + * None + * + ****************************************************************************/ + +void sdio_mediachange(FAR struct sdio_dev_s *dev, bool cardinslot) +{ + struct stm32_dev_s *priv = (struct stm32_dev_s *)dev; + uint8_t cdstatus; + irqstate_t flags; + + /* Update card status */ + + flags = enter_critical_section(); + cdstatus = priv->cdstatus; + if (cardinslot) + { + priv->cdstatus |= SDIO_STATUS_PRESENT; + } + else + { + priv->cdstatus &= ~SDIO_STATUS_PRESENT; + } + + leave_critical_section(flags); + + finfo("cdstatus OLD: %02x NEW: %02x\n", cdstatus, priv->cdstatus); + + /* Perform any requested callback if the status has changed */ + + if (cdstatus != priv->cdstatus) + { + stm32_callback(priv); + } +} + +/**************************************************************************** + * Name: sdio_wrprotect + * + * Description: + * Called by board-specific logic to report if the card in the slot is + * mechanically write protected. + * + * Input Parameters: + * dev - An instance of the SDIO driver device state structure. + * wrprotect - true is a card is writeprotected. + * + * Returned Values: + * None + * + ****************************************************************************/ + +void sdio_wrprotect(FAR struct sdio_dev_s *dev, bool wrprotect) +{ + struct stm32_dev_s *priv = (struct stm32_dev_s *)dev; + irqstate_t flags; + + /* Update card status */ + + flags = enter_critical_section(); + if (wrprotect) + { + priv->cdstatus |= SDIO_STATUS_WRPROTECTED; + } + else + { + priv->cdstatus &= ~SDIO_STATUS_WRPROTECTED; + } + finfo("cdstatus: %02x\n", priv->cdstatus); + leave_critical_section(flags); +} +#endif /* CONFIG_STM32F7_SDMMC1 */ diff --git a/arch/arm/src/stm32f7/stm32_sdmmc.h b/arch/arm/src/stm32f7/stm32_sdmmc.h new file mode 100644 index 0000000000000000000000000000000000000000..12b6348559f7c2992eba0415677f489347cbc7c7 --- /dev/null +++ b/arch/arm/src/stm32f7/stm32_sdmmc.h @@ -0,0 +1,129 @@ +/************************************************************************************ + * arch/arm/src/stm32f7/stm32_sdmmc.h + * + * Copyright (C) 2009, 2011, 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_STM32F7_STM32_SDMMC_H +#define __ARCH_ARM_SRC_STM32F7_STM32_SDMMC_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include "chip/stm32_sdmmc.h" + +#include +#include +#include + +#include "chip.h" + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#ifndef __ASSEMBLY__ + +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Name: sdio_initialize + * + * Description: + * Initialize SDIO for operation. + * + * Input Parameters: + * slotno - Not used. + * + * Returned Values: + * A reference to an SDIO interface structure. NULL is returned on failures. + * + ****************************************************************************/ + +struct sdio_dev_s; /* See include/nuttx/sdio.h */ +FAR struct sdio_dev_s *sdio_initialize(int slotno); + +/**************************************************************************** + * Name: sdio_mediachange + * + * Description: + * Called by board-specific logic -- posssible from an interrupt handler -- + * in order to signal to the driver that a card has been inserted or + * removed from the slot + * + * Input Parameters: + * dev - An instance of the SDIO driver device state structure. + * cardinslot - true is a card has been detected in the slot; false if a + * card has been removed from the slot. Only transitions + * (inserted->removed or removed->inserted should be reported) + * + * Returned Values: + * None + * + ****************************************************************************/ + +void sdio_mediachange(FAR struct sdio_dev_s *dev, bool cardinslot); + +/**************************************************************************** + * Name: sdio_wrprotect + * + * Description: + * Called by board-specific logic to report if the card in the slot is + * mechanically write protected. + * + * Input Parameters: + * dev - An instance of the SDIO driver device state structure. + * wrprotect - true is a card is writeprotected. + * + * Returned Values: + * None + * + ****************************************************************************/ + +void sdio_wrprotect(FAR struct sdio_dev_s *dev, bool wrprotect); + +#undef EXTERN +#if defined(__cplusplus) +} +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* __ARCH_ARM_SRC_STM32F7_STM32_SDMMC_H */ + diff --git a/arch/arm/src/stm32f7/stm32_spi.c b/arch/arm/src/stm32f7/stm32_spi.c new file mode 100644 index 0000000000000000000000000000000000000000..78b5eeaf06b9f2126d86e5a57b5a9e9e3f22de9e --- /dev/null +++ b/arch/arm/src/stm32f7/stm32_spi.c @@ -0,0 +1,1819 @@ +/************************************************************************************ + * arm/arm/src/stm32f7/stm32_spi.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: 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. + * + ************************************************************************************/ + +/************************************************************************************ + * The external functions, stm32_spi1/2/3/4/5/6select and stm32_spi1/2/3/4/5/6status + * 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/3/4/5/6select() and stm32_spi1/2/3/4/5/6status() + * 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). + * + ****************************************************c*******************************/ + +/************************************************************************************ + * 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 "stm32_gpio.h" +#include "stm32_dma.h" +#include "stm32_spi.h" + +#if defined(CONFIG_STM32F7_SPI1) || defined(CONFIG_STM32F7_SPI2) || \ + defined(CONFIG_STM32F7_SPI3) || defined(CONFIG_STM32F7_SPI4) || \ + defined(CONFIG_STM32F7_SPI5) || defined(CONFIG_STM32F7_SPI6) + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Configuration ********************************************************************/ +/* SPI interrupts */ + +#ifdef CONFIG_STM32F7_SPI_INTERRUPTS +# error "Interrupt driven SPI not yet supported" +#endif + +/* Can't have both interrupt driven SPI and SPI DMA */ + +#if defined(CONFIG_STM32F7_SPI_INTERRUPTS) && defined(CONFIG_STM32F7_SPI_DMA) +# error "Cannot enable both interrupt mode and DMA mode for SPI" +#endif + +/* SPI DMA priority */ + +#ifdef CONFIG_STM32F7_SPI_DMA + +# error "SPI DMA not yet supported" + +# if defined(CONFIG_SPI_DMAPRIO) +# define SPI_DMA_PRIO CONFIG_SPI_DMAPRIO +# elif defined(DMA_SCR_PRIMED) +# define SPI_DMA_PRIO DMA_SCR_PRIMED +# else +# error "Unknown STM32 DMA" +# endif + +#if (SPI_DMA_PRIO & ~DMA_SCR_PL_MASK) != 0 +# error "Illegal value for CONFIG_SPI_DMAPRIO" +#endif + + +/* DMA channel configuration */ + +# define SPI_RXDMA16_CONFIG (SPI_DMA_PRIO|DMA_SCR_MSIZE_16BITS|DMA_SCR_PSIZE_16BITS|DMA_SCR_MINC|DMA_SCR_DIR_P2M) +# define SPI_RXDMA8_CONFIG (SPI_DMA_PRIO|DMA_SCR_MSIZE_8BITS |DMA_SCR_PSIZE_8BITS |DMA_SCR_MINC|DMA_SCR_DIR_P2M) +# define SPI_RXDMA16NULL_CONFIG (SPI_DMA_PRIO|DMA_SCR_MSIZE_8BITS |DMA_SCR_PSIZE_16BITS |DMA_SCR_DIR_P2M) +# define SPI_RXDMA8NULL_CONFIG (SPI_DMA_PRIO|DMA_SCR_MSIZE_8BITS |DMA_SCR_PSIZE_8BITS |DMA_SCR_DIR_P2M) +# define SPI_TXDMA16_CONFIG (SPI_DMA_PRIO|DMA_SCR_MSIZE_16BITS|DMA_SCR_PSIZE_16BITS|DMA_SCR_MINC|DMA_SCR_DIR_M2P) +# define SPI_TXDMA8_CONFIG (SPI_DMA_PRIO|DMA_SCR_MSIZE_8BITS |DMA_SCR_PSIZE_8BITS |DMA_SCR_MINC|DMA_SCR_DIR_M2P) +# define SPI_TXDMA16NULL_CONFIG (SPI_DMA_PRIO|DMA_SCR_MSIZE_8BITS |DMA_SCR_PSIZE_16BITS |DMA_SCR_DIR_M2P) +# define SPI_TXDMA8NULL_CONFIG (SPI_DMA_PRIO|DMA_SCR_MSIZE_8BITS |DMA_SCR_PSIZE_8BITS |DMA_SCR_DIR_M2P) +#endif + +/************************************************************************************ + * Private Types + ************************************************************************************/ + +struct stm32_spidev_s +{ + struct spi_dev_s spidev; /* Externally visible part of the SPI interface */ + uint32_t spibase; /* SPIn base address */ + uint32_t spiclock; /* Clocking for the SPI module */ +#ifdef CONFIG_STM32F7_SPI_INTERRUPTS + uint8_t spiirq; /* SPI IRQ number */ +#endif +#ifdef CONFIG_STM32F7_SPI_DMA + volatile uint8_t rxresult; /* Result of the RX DMA */ + volatile uint8_t txresult; /* Result of the RX DMA */ + uint8_t rxch; /* The RX DMA channel number */ + uint8_t txch; /* The TX DMA channel number */ + DMA_HANDLE rxdma; /* DMA channel handle for RX transfers */ + DMA_HANDLE txdma; /* DMA channel handle for TX transfers */ + sem_t rxsem; /* Wait for RX DMA to complete */ + sem_t txsem; /* Wait for TX DMA to complete */ + uint32_t txccr; /* DMA control register for TX transfers */ + uint32_t rxccr; /* DMA control register for RX transfers */ +#endif + sem_t exclsem; /* Held while chip is selected for mutual exclusion */ + uint32_t frequency; /* Requested clock frequency */ + uint32_t actual; /* Actual clock frequency */ + int8_t nbits; /* Width of word in bits */ + uint8_t mode; /* Mode 0,1,2,3 */ +}; + +/************************************************************************************ + * Private Function Prototypes + ************************************************************************************/ + +/* Helpers */ + +static inline uint16_t spi_getreg(FAR struct stm32_spidev_s *priv, uint8_t offset); +static inline void spi_putreg(FAR struct stm32_spidev_s *priv, uint8_t offset, + uint16_t value); +static inline uint16_t spi_readword(FAR struct stm32_spidev_s *priv); +static inline void spi_writeword(FAR struct stm32_spidev_s *priv, uint16_t byte); +static inline bool spi_9to16bitmode(FAR struct stm32_spidev_s *priv); + +/* DMA support */ + +#ifdef CONFIG_STM32F7_SPI_DMA +static void spi_dmarxwait(FAR struct stm32_spidev_s *priv); +static void spi_dmatxwait(FAR struct stm32_spidev_s *priv); +static inline void spi_dmarxwakeup(FAR struct stm32_spidev_s *priv); +static inline void spi_dmatxwakeup(FAR struct stm32_spidev_s *priv); +static void spi_dmarxcallback(DMA_HANDLE handle, uint8_t isr, void *arg); +static void spi_dmatxcallback(DMA_HANDLE handle, uint8_t isr, void *arg); +static void spi_dmarxsetup(FAR struct stm32_spidev_s *priv, + FAR void *rxbuffer, FAR void *rxdummy, size_t nwords); +static void spi_dmatxsetup(FAR struct stm32_spidev_s *priv, + FAR const void *txbuffer, FAR const void *txdummy, size_t nwords); +static inline void spi_dmarxstart(FAR struct stm32_spidev_s *priv); +static inline void spi_dmatxstart(FAR struct stm32_spidev_s *priv); +#endif + +/* SPI methods */ + +static int spi_lock(FAR struct spi_dev_s *dev, bool lock); +static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency); +static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode); +static void spi_setbits(FAR struct spi_dev_s *dev, int nbits); +static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd); +static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, + FAR void *rxbuffer, size_t nwords); +#ifndef CONFIG_SPI_EXCHANGE +static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *txbuffer, + size_t nwords); +static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *rxbuffer, + size_t nwords); +#endif + +/* Initialization */ + +static void spi_bus_initialize(FAR struct stm32_spidev_s *priv); + +/************************************************************************************ + * Private Data + ************************************************************************************/ + +#ifdef CONFIG_STM32F7_SPI1 +static const struct spi_ops_s g_sp1iops = +{ + .lock = spi_lock, + .select = stm32_spi1select, + .setfrequency = spi_setfrequency, + .setmode = spi_setmode, + .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = 0, /* Not supported */ +#endif + .status = stm32_spi1status, +#ifdef CONFIG_SPI_CMDDATA + .cmddata = stm32_spi1cmddata, +#endif + .send = spi_send, +#ifdef CONFIG_SPI_EXCHANGE + .exchange = spi_exchange, +#else + .sndblock = spi_sndblock, + .recvblock = spi_recvblock, +#endif +#ifdef CONFIG_SPI_CALLBACK + .registercallback = stm32_spi1register, /* Provided externally */ +#else + .registercallback = 0, /* Not implemented */ +#endif +}; + +static struct stm32_spidev_s g_spi1dev = +{ + .spidev = { &g_sp1iops }, + .spibase = STM32_SPI1_BASE, + .spiclock = STM32_PCLK2_FREQUENCY, +#ifdef CONFIG_STM32F7_SPI_INTERRUPTS + .spiirq = STM32_IRQ_SPI1, +#endif +#ifdef CONFIG_STM32F7_SPI_DMA + .rxch = DMACHAN_SPI1_RX, + .txch = DMACHAN_SPI1_TX, +#endif +}; +#endif + +#ifdef CONFIG_STM32F7_SPI2 +static const struct spi_ops_s g_sp2iops = +{ + .lock = spi_lock, + .select = stm32_spi2select, + .setfrequency = spi_setfrequency, + .setmode = spi_setmode, + .setbits = spi_setbits, + .status = stm32_spi2status, +#ifdef CONFIG_SPI_CMDDATA + .cmddata = stm32_spi2cmddata, +#endif + .send = spi_send, +#ifdef CONFIG_SPI_EXCHANGE + .exchange = spi_exchange, +#else + .sndblock = spi_sndblock, + .recvblock = spi_recvblock, +#endif +#ifdef CONFIG_SPI_CALLBACK + .registercallback = stm32_spi2register, /* provided externally */ +#else + .registercallback = 0, /* not implemented */ +#endif +}; + +static struct stm32_spidev_s g_spi2dev = +{ + .spidev = { &g_sp2iops }, + .spibase = STM32_SPI2_BASE, + .spiclock = STM32_PCLK1_FREQUENCY, +#ifdef CONFIG_STM32F7_SPI_INTERRUPTS + .spiirq = STM32_IRQ_SPI2, +#endif +#ifdef CONFIG_STM32F7_SPI_DMA + .rxch = DMACHAN_SPI2_RX, + .txch = DMACHAN_SPI2_TX, +#endif +}; +#endif + +#ifdef CONFIG_STM32F7_SPI3 +static const struct spi_ops_s g_sp3iops = +{ + .lock = spi_lock, + .select = stm32_spi3select, + .setfrequency = spi_setfrequency, + .setmode = spi_setmode, + .setbits = spi_setbits, + .status = stm32_spi3status, +#ifdef CONFIG_SPI_CMDDATA + .cmddata = stm32_spi3cmddata, +#endif + .send = spi_send, +#ifdef CONFIG_SPI_EXCHANGE + .exchange = spi_exchange, +#else + .sndblock = spi_sndblock, + .recvblock = spi_recvblock, +#endif +#ifdef CONFIG_SPI_CALLBACK + .registercallback = stm32_spi3register, /* provided externally */ +#else + .registercallback = 0, /* not implemented */ +#endif +}; + +static struct stm32_spidev_s g_spi3dev = +{ + .spidev = { &g_sp3iops }, + .spibase = STM32_SPI3_BASE, + .spiclock = STM32_PCLK1_FREQUENCY, +#ifdef CONFIG_STM32F7_SPI_INTERRUPTS + .spiirq = STM32_IRQ_SPI3, +#endif +#ifdef CONFIG_STM32F7_SPI_DMA + .rxch = DMACHAN_SPI3_RX, + .txch = DMACHAN_SPI3_TX, +#endif +}; +#endif + +#ifdef CONFIG_STM32F7_SPI4 +static const struct spi_ops_s g_sp4iops = +{ + .lock = spi_lock, + .select = stm32_spi4select, + .setfrequency = spi_setfrequency, + .setmode = spi_setmode, + .setbits = spi_setbits, + .status = stm32_spi4status, +#ifdef CONFIG_SPI_CMDDATA + .cmddata = stm32_spi4cmddata, +#endif + .send = spi_send, +#ifdef CONFIG_SPI_EXCHANGE + .exchange = spi_exchange, +#else + .sndblock = spi_sndblock, + .recvblock = spi_recvblock, +#endif +#ifdef CONFIG_SPI_CALLBACK + .registercallback = stm32_spi4register, /* provided externally */ +#else + .registercallback = 0, /* not implemented */ +#endif +}; + +static struct stm32_spidev_s g_spi4dev = +{ + .spidev = { &g_sp4iops }, + .spibase = STM32_SPI4_BASE, + .spiclock = STM32_PCLK2_FREQUENCY, +#ifdef CONFIG_STM32F7_SPI_INTERRUPTS + .spiirq = STM32_IRQ_SPI4, +#endif +#ifdef CONFIG_STM32F7_SPI_DMA + .rxch = DMACHAN_SPI4_RX, + .txch = DMACHAN_SPI4_TX, +#endif +}; +#endif + +#ifdef CONFIG_STM32F7_SPI5 +static const struct spi_ops_s g_sp5iops = +{ + .lock = spi_lock, + .select = stm32_spi5select, + .setfrequency = spi_setfrequency, + .setmode = spi_setmode, + .setbits = spi_setbits, + .status = stm32_spi5status, +#ifdef CONFIG_SPI_CMDDATA + .cmddata = stm32_spi5cmddata, +#endif + .send = spi_send, +#ifdef CONFIG_SPI_EXCHANGE + .exchange = spi_exchange, +#else + .sndblock = spi_sndblock, + .recvblock = spi_recvblock, +#endif +#ifdef CONFIG_SPI_CALLBACK + .registercallback = stm32_spi5register, /* provided externally */ +#else + .registercallback = 0, /* not implemented */ +#endif +}; + +static struct stm32_spidev_s g_spi5dev = +{ + .spidev = { &g_sp5iops }, + .spibase = STM32_SPI5_BASE, + .spiclock = STM32_PCLK2_FREQUENCY, +#ifdef CONFIG_STM32F7_SPI_INTERRUPTS + .spiirq = STM32_IRQ_SPI5, +#endif +#ifdef CONFIG_STM32F7_SPI_DMA + .rxch = DMACHAN_SPI5_RX, + .txch = DMACHAN_SPI5_TX, +#endif +}; +#endif + +#ifdef CONFIG_STM32F7_SPI6 +static const struct spi_ops_s g_sp6iops = +{ + .lock = spi_lock, + .select = stm32_spi6select, + .setfrequency = spi_setfrequency, + .setmode = spi_setmode, + .setbits = spi_setbits, + .status = stm32_spi6status, +#ifdef CONFIG_SPI_CMDDATA + .cmddata = stm32_spi3cmddata, +#endif + .send = spi_send, +#ifdef CONFIG_SPI_EXCHANGE + .exchange = spi_exchange, +#else + .sndblock = spi_sndblock, + .recvblock = spi_recvblock, +#endif +#ifdef CONFIG_SPI_CALLBACK + .registercallback = stm32_spi6register, /* provided externally */ +#else + .registercallback = 0, /* not implemented */ +#endif +}; + +static struct stm32_spidev_s g_spi6dev = +{ + .spidev = { &g_sp6iops }, + .spibase = STM32_SPI6_BASE, + .spiclock = STM32_PCLK2_FREQUENCY, +#ifdef CONFIG_STM32F7_SPI_INTERRUPTS + .spiirq = STM32_IRQ_SPI6, +#endif +#ifdef CONFIG_STM32F7_SPI_DMA + .rxch = DMACHAN_SPI6_RX, + .txch = DMACHAN_SPI6_TX, +#endif +}; +#endif + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: spi_getreg8 + * + * Description: + * Get the contents of the SPI register at offset + * + * Input Parameters: + * priv - private SPI device structure + * offset - offset to the register of interest + * + * Returned Value: + * The contents of the 8-bit register + * + ************************************************************************************/ + +static inline uint8_t spi_getreg8(FAR struct stm32_spidev_s *priv, uint8_t offset) +{ + return getreg8(priv->spibase + offset); +} + +/************************************************************************************ + * Name: spi_putreg8 + * + * Description: + * Write a 8-bit value to the SPI register at offset + * + * Input Parameters: + * priv - private SPI device structure + * offset - offset to the register of interest + * value - the 8-bit value to be written + * + ************************************************************************************/ + +static inline void spi_putreg8(FAR struct stm32_spidev_s *priv, uint8_t offset, + uint8_t value) +{ + putreg8(value, priv->spibase + offset); +} + +/************************************************************************************ + * Name: spi_getreg + * + * Description: + * Get the contents of the SPI register at offset + * + * Input Parameters: + * priv - private SPI device structure + * offset - offset to the register of interest + * + * Returned Value: + * The contents of the 16-bit register + * + ************************************************************************************/ + +static inline uint16_t spi_getreg(FAR struct stm32_spidev_s *priv, uint8_t offset) +{ + return getreg16(priv->spibase + offset); +} + +/************************************************************************************ + * Name: spi_putreg + * + * Description: + * Write a 16-bit value to the SPI register at offset + * + * Input Parameters: + * priv - private SPI device structure + * offset - offset to the register of interest + * value - the 16-bit value to be written + * + * Returned Value: + * The contents of the 16-bit register + * + ************************************************************************************/ + +static inline void spi_putreg(FAR struct stm32_spidev_s *priv, uint8_t offset, + uint16_t value) +{ + putreg16(value, priv->spibase + offset); +} + +/************************************************************************************ + * Name: spi_readword + * + * Description: + * Read one byte from SPI + * + * Input Parameters: + * priv - Device-specific state data + * + * Returned Value: + * Byte as read + * + ************************************************************************************/ + +static inline uint16_t spi_readword(FAR struct stm32_spidev_s *priv) +{ + /* Wait until the receive buffer is not empty */ + + while ((spi_getreg(priv, STM32_SPI_SR_OFFSET) & SPI_SR_RXNE) == 0); + + /* Then return the received byte */ + + return spi_getreg(priv, STM32_SPI_DR_OFFSET); +} + +/************************************************************************************ + * Name: spi_writeword + * + * Description: + * Write one byte to SPI + * + * Input Parameters: + * priv - Device-specific state data + * byte - Byte to send + * + * Returned Value: + * None + * + ************************************************************************************/ + +static inline void spi_writeword(FAR struct stm32_spidev_s *priv, uint16_t word) +{ + /* Wait until the transmit buffer is empty */ + + while ((spi_getreg(priv, STM32_SPI_SR_OFFSET) & SPI_SR_TXE) == 0); + + /* Then send the byte */ + + spi_putreg(priv, STM32_SPI_DR_OFFSET, word); +} + +/************************************************************************************ + * Name: spi_readbyte + * + * Description: + * Read one byte from SPI + * + * Input Parameters: + * priv - Device-specific state data + * + * Returned Value: + * Byte as read + * + ************************************************************************************/ + +static inline uint8_t spi_readbyte(FAR struct stm32_spidev_s *priv) +{ + /* Wait until the receive buffer is not empty */ + + while ((spi_getreg(priv, STM32_SPI_SR_OFFSET) & SPI_SR_RXNE) == 0); + + /* Then return the received byte */ + + return spi_getreg8(priv, STM32_SPI_DR_OFFSET); +} + +/************************************************************************************ + * Name: spi_writebyte + * + * Description: + * Write one 8-bit frame to the SPI FIFO + * + * Input Parameters: + * priv - Device-specific state data + * byte - Byte to send + * + * Returned Value: + * None + * + ************************************************************************************/ + +static inline void spi_writebyte(FAR struct stm32_spidev_s *priv, uint8_t byte) +{ + /* Wait until the transmit buffer is empty */ + + while ((spi_getreg(priv, STM32_SPI_SR_OFFSET) & SPI_SR_TXE) == 0); + + /* Then send the byte */ + + spi_putreg8(priv, STM32_SPI_DR_OFFSET, byte); +} + +/************************************************************************************ + * Name: spi_9to16bitmode + * + * Description: + * Check if the SPI is operating in more then 8 bit mode + * + * Input Parameters: + * priv - Device-specific state data + * + * Returned Value: + * true: >8 bit mode-bit mode, false: <= 8-bit mode + * + ************************************************************************************/ + +static inline bool spi_9to16bitmode(FAR struct stm32_spidev_s *priv) +{ + return ((spi_getreg(priv, STM32_SPI_CR2_OFFSET) & SPI_CR2_DS_9BIT) == SPI_CR2_DS_9BIT); +} + +/************************************************************************************ + * Name: spi_dmarxwait + * + * Description: + * Wait for DMA to complete. + * + ************************************************************************************/ + +#ifdef CONFIG_STM32F7_SPI_DMA +static void spi_dmarxwait(FAR struct stm32_spidev_s *priv) +{ + /* Take the semaphore (perhaps waiting). If the result is zero, then the DMA + * must not really have completed??? + */ + + while (sem_wait(&priv->rxsem) != 0 || priv->rxresult == 0) + { + /* The only case that an error should occur here is if the wait was awakened + * by a signal. + */ + + ASSERT(errno == EINTR); + } +} +#endif + +/************************************************************************************ + * Name: spi_dmatxwait + * + * Description: + * Wait for DMA to complete. + * + ************************************************************************************/ + +#ifdef CONFIG_STM32F7_SPI_DMA +static void spi_dmatxwait(FAR struct stm32_spidev_s *priv) +{ + /* Take the semaphore (perhaps waiting). If the result is zero, then the DMA + * must not really have completed??? + */ + + while (sem_wait(&priv->txsem) != 0 || priv->txresult == 0) + { + /* The only case that an error should occur here is if the wait was awakened + * by a signal. + */ + + ASSERT(errno == EINTR); + } +} +#endif + +/************************************************************************************ + * Name: spi_dmarxwakeup + * + * Description: + * Signal that DMA is complete + * + ************************************************************************************/ + +#ifdef CONFIG_STM32F7_SPI_DMA +static inline void spi_dmarxwakeup(FAR struct stm32_spidev_s *priv) +{ + (void)sem_post(&priv->rxsem); +} +#endif + +/************************************************************************************ + * Name: spi_dmatxwakeup + * + * Description: + * Signal that DMA is complete + * + ************************************************************************************/ + +#ifdef CONFIG_STM32F7_SPI_DMA +static inline void spi_dmatxwakeup(FAR struct stm32_spidev_s *priv) +{ + (void)sem_post(&priv->txsem); +} +#endif + +/************************************************************************************ + * Name: spi_dmarxcallback + * + * Description: + * Called when the RX DMA completes + * + ************************************************************************************/ + +#ifdef CONFIG_STM32F7_SPI_DMA +static void spi_dmarxcallback(DMA_HANDLE handle, uint8_t isr, void *arg) +{ + FAR struct stm32_spidev_s *priv = (FAR struct stm32_spidev_s *)arg; + + /* Wake-up the SPI driver */ + + priv->rxresult = isr | 0x080; /* OR'ed with 0x80 to assure non-zero */ + spi_dmarxwakeup(priv); +} +#endif + +/************************************************************************************ + * Name: spi_dmatxcallback + * + * Description: + * Called when the RX DMA completes + * + ************************************************************************************/ + +#ifdef CONFIG_STM32F7_SPI_DMA +static void spi_dmatxcallback(DMA_HANDLE handle, uint8_t isr, void *arg) +{ + FAR struct stm32_spidev_s *priv = (FAR struct stm32_spidev_s *)arg; + + /* Wake-up the SPI driver */ + + priv->txresult = isr | 0x080; /* OR'ed with 0x80 to assure non-zero */ + spi_dmatxwakeup(priv); +} +#endif + +/************************************************************************************ + * Name: spi_dmarxsetup + * + * Description: + * Setup to perform RX DMA + * + ************************************************************************************/ + +#ifdef CONFIG_STM32F7_SPI_DMA +static void spi_dmarxsetup(FAR struct stm32_spidev_s *priv, FAR void *rxbuffer, + FAR void *rxdummy, size_t nwords) +{ + /* 8- or 16-bit mode? */ + + if (spi_9to16bitmode(priv)) + { + /* 16-bit mode -- is there a buffer to receive data in? */ + + if (rxbuffer) + { + priv->rxccr = SPI_RXDMA16_CONFIG; + } + else + { + rxbuffer = rxdummy; + priv->rxccr = SPI_RXDMA16NULL_CONFIG; + } + } + else + { + /* 8-bit mode -- is there a buffer to receive data in? */ + + if (rxbuffer) + { + priv->rxccr = SPI_RXDMA8_CONFIG; + } + else + { + rxbuffer = rxdummy; + priv->rxccr = SPI_RXDMA8NULL_CONFIG; + } + } + + /* Configure the RX DMA */ + + stm32_dmasetup(priv->rxdma, priv->spibase + STM32_SPI_DR_OFFSET, + (uint32_t)rxbuffer, nwords, priv->rxccr); +} +#endif + +/************************************************************************************ + * Name: spi_dmatxsetup + * + * Description: + * Setup to perform TX DMA + * + ************************************************************************************/ + +#ifdef CONFIG_STM32F7_SPI_DMA +static void spi_dmatxsetup(FAR struct stm32_spidev_s *priv, FAR const void *txbuffer, + FAR const void *txdummy, size_t nwords) +{ + /* 8- or 16-bit mode? */ + + if (spi_9to16bitmode(priv)) + { + /* 16-bit mode -- is there a buffer to transfer data from? */ + + if (txbuffer) + { + priv->txccr = SPI_TXDMA16_CONFIG; + } + else + { + txbuffer = txdummy; + priv->txccr = SPI_TXDMA16NULL_CONFIG; + } + } + else + { + /* 8-bit mode -- is there a buffer to transfer data from? */ + + if (txbuffer) + { + priv->txccr = SPI_TXDMA8_CONFIG; + } + else + { + txbuffer = txdummy; + priv->txccr = SPI_TXDMA8NULL_CONFIG; + } + } + + /* Setup the TX DMA */ + + stm32_dmasetup(priv->txdma, priv->spibase + STM32_SPI_DR_OFFSET, + (uint32_t)txbuffer, nwords, priv->txccr); +} +#endif + +/************************************************************************************ + * Name: spi_dmarxstart + * + * Description: + * Start RX DMA + * + ************************************************************************************/ + +#ifdef CONFIG_STM32F7_SPI_DMA +static inline void spi_dmarxstart(FAR struct stm32_spidev_s *priv) +{ + priv->rxresult = 0; + stm32_dmastart(priv->rxdma, spi_dmarxcallback, priv, false); +} +#endif + +/************************************************************************************ + * Name: spi_dmatxstart + * + * Description: + * Start TX DMA + * + ************************************************************************************/ + +#ifdef CONFIG_STM32F7_SPI_DMA +static inline void spi_dmatxstart(FAR struct stm32_spidev_s *priv) +{ + priv->txresult = 0; + stm32_dmastart(priv->txdma, spi_dmatxcallback, priv, false); +} +#endif + +/************************************************************************************ + * Name: spi_modifycr1 + * + * Description: + * Clear and set bits in the CR1 register + * + * Input Parameters: + * priv - Device-specific state data + * clrbits - The bits to clear + * setbits - The bits to set + * + * Returned Value: + * None + * + ************************************************************************************/ + +static void spi_modifycr1(FAR struct stm32_spidev_s *priv, uint16_t setbits, + uint16_t clrbits) +{ + uint16_t cr1; + cr1 = spi_getreg(priv, STM32_SPI_CR1_OFFSET); + cr1 &= ~clrbits; + cr1 |= setbits; + spi_putreg(priv, STM32_SPI_CR1_OFFSET, cr1); +} + +/************************************************************************************ + * Name: spi_modifycr2 + * + * Description: + * Clear and set bits in the CR2 register + * + * Input Parameters: + * priv - Device-specific state data + * clrbits - The bits to clear + * setbits - The bits to set + * + * Returned Value: + * None + * + ************************************************************************************/ + +static void spi_modifycr2(FAR struct stm32_spidev_s *priv, uint16_t setbits, + uint16_t clrbits) +{ + uint16_t cr2; + cr2 = spi_getreg(priv, STM32_SPI_CR2_OFFSET); + cr2 &= ~clrbits; + cr2 |= setbits; + spi_putreg(priv, STM32_SPI_CR2_OFFSET, cr2); +} + +/************************************************************************************ + * Name: spi_lock + * + * Description: + * On SPI busses where there are multiple devices, it will be necessary to + * lock SPI to have exclusive access to the busses for a sequence of + * transfers. The bus should be locked before the chip is selected. After + * locking the SPI bus, the caller should then also call the setfrequency, + * setbits, and setmode methods to make sure that the SPI is properly + * configured for the device. If the SPI buss is being shared, then it + * may have been left in an incompatible state. + * + * Input Parameters: + * dev - Device-specific state data + * lock - true: Lock spi bus, false: unlock SPI bus + * + * Returned Value: + * None + * + ************************************************************************************/ + +static int spi_lock(FAR struct spi_dev_s *dev, bool lock) +{ + FAR struct stm32_spidev_s *priv = (FAR struct stm32_spidev_s *)dev; + + if (lock) + { + /* Take the semaphore (perhaps waiting) */ + + while (sem_wait(&priv->exclsem) != 0) + { + /* The only case that an error should occur here is if the wait was awakened + * by a signal. + */ + + ASSERT(errno == EINTR); + } + } + else + { + (void)sem_post(&priv->exclsem); + } + + return OK; +} + +/************************************************************************************ + * Name: spi_setfrequency + * + * Description: + * Set the SPI frequency. + * + * Input Parameters: + * dev - Device-specific state data + * frequency - The SPI frequency requested + * + * Returned Value: + * Returns the actual frequency selected + * + ************************************************************************************/ + +static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) +{ + FAR struct stm32_spidev_s *priv = (FAR struct stm32_spidev_s *)dev; + uint16_t setbits; + uint32_t actual; + + /* Limit to max possible (if STM32_SPI_CLK_MAX is defined in board.h) */ + + if (frequency > STM32_SPI_CLK_MAX) + { + frequency = STM32_SPI_CLK_MAX; + } + + /* Has the frequency changed? */ + + if (frequency != priv->frequency) + { + /* Choices are limited by PCLK frequency with a set of divisors */ + + if (frequency >= priv->spiclock >> 1) + { + /* More than fPCLK/2. This is as fast as we can go */ + + setbits = SPI_CR1_FPCLCKd2; /* 000: fPCLK/2 */ + actual = priv->spiclock >> 1; + } + else if (frequency >= priv->spiclock >> 2) + { + /* Between fPCLCK/2 and fPCLCK/4, pick the slower */ + + setbits = SPI_CR1_FPCLCKd4; /* 001: fPCLK/4 */ + actual = priv->spiclock >> 2; + } + else if (frequency >= priv->spiclock >> 3) + { + /* Between fPCLCK/4 and fPCLCK/8, pick the slower */ + + setbits = SPI_CR1_FPCLCKd8; /* 010: fPCLK/8 */ + actual = priv->spiclock >> 3; + } + else if (frequency >= priv->spiclock >> 4) + { + /* Between fPCLCK/8 and fPCLCK/16, pick the slower */ + + setbits = SPI_CR1_FPCLCKd16; /* 011: fPCLK/16 */ + actual = priv->spiclock >> 4; + } + else if (frequency >= priv->spiclock >> 5) + { + /* Between fPCLCK/16 and fPCLCK/32, pick the slower */ + + setbits = SPI_CR1_FPCLCKd32; /* 100: fPCLK/32 */ + actual = priv->spiclock >> 5; + } + else if (frequency >= priv->spiclock >> 6) + { + /* Between fPCLCK/32 and fPCLCK/64, pick the slower */ + + setbits = SPI_CR1_FPCLCKd64; /* 101: fPCLK/64 */ + actual = priv->spiclock >> 6; + } + else if (frequency >= priv->spiclock >> 7) + { + /* Between fPCLCK/64 and fPCLCK/128, pick the slower */ + + setbits = SPI_CR1_FPCLCKd128; /* 110: fPCLK/128 */ + actual = priv->spiclock >> 7; + } + else + { + /* Less than fPCLK/128. This is as slow as we can go */ + + setbits = SPI_CR1_FPCLCKd256; /* 111: fPCLK/256 */ + actual = priv->spiclock >> 8; + } + + spi_modifycr1(priv, 0, SPI_CR1_SPE); + spi_modifycr1(priv, setbits, SPI_CR1_BR_MASK); + spi_modifycr1(priv, SPI_CR1_SPE, 0); + + /* Save the frequency selection so that subsequent reconfigurations will be + * faster. + */ + + spiinfo("Frequency %d->%d\n", frequency, actual); + + priv->frequency = frequency; + priv->actual = actual; + } + + return priv->actual; +} + +/************************************************************************************ + * Name: spi_setmode + * + * Description: + * Set the SPI mode. see enum spi_mode_e for mode definitions + * + * Input Parameters: + * dev - Device-specific state data + * mode - The SPI mode requested + * + * Returned Value: + * Returns the actual frequency selected + * + ************************************************************************************/ + +static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode) +{ + FAR struct stm32_spidev_s *priv = (FAR struct stm32_spidev_s *)dev; + uint16_t setbits; + uint16_t clrbits; + + spiinfo("mode=%d\n", mode); + + /* Has the mode changed? */ + + if (mode != priv->mode) + { + /* Yes... Set CR1 appropriately */ + + switch (mode) + { + case SPIDEV_MODE0: /* CPOL=0; CPHA=0 */ + setbits = 0; + clrbits = SPI_CR1_CPOL | SPI_CR1_CPHA; + break; + + case SPIDEV_MODE1: /* CPOL=0; CPHA=1 */ + setbits = SPI_CR1_CPHA; + clrbits = SPI_CR1_CPOL; + break; + + case SPIDEV_MODE2: /* CPOL=1; CPHA=0 */ + setbits = SPI_CR1_CPOL; + clrbits = SPI_CR1_CPHA; + break; + + case SPIDEV_MODE3: /* CPOL=1; CPHA=1 */ + setbits = SPI_CR1_CPOL | SPI_CR1_CPHA; + clrbits = 0; + break; + + default: + return; + } + + spi_modifycr1(priv, 0, SPI_CR1_SPE); + spi_modifycr1(priv, setbits, clrbits); + spi_modifycr1(priv, SPI_CR1_SPE, 0); + + /* Save the mode so that subsequent re-configurations will be faster */ + + priv->mode = mode; + } +} + +/************************************************************************************ + * Name: spi_setbits + * + * Description: + * Set the number of bits per word. + * + * Input Parameters: + * dev - Device-specific state data + * nbits - The number of bits requested + * + * Returned Value: + * None + * + ************************************************************************************/ + +static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) +{ + FAR struct stm32_spidev_s *priv = (FAR struct stm32_spidev_s *)dev; + uint16_t setbitscr1; + uint16_t clrbitscr1; + uint16_t setbitscr2; + uint16_t clrbitscr2; + int savbits = nbits; + + spiinfo("nbits=%d\n", nbits); + + /* Has the number of bits changed? */ + + if (nbits != priv->nbits) + { + /* Yes... Set CR1/2 appropriately */ + /* Negative sign means LSBFIRST, set this in CR1*/ + + if (nbits < 0) + { + setbitscr1 = SPI_CR1_LSBFIRST; + clrbitscr1 = 0; + nbits = -nbits; + } + else + { + setbitscr1 = 0; + clrbitscr1 = SPI_CR1_LSBFIRST; + } + + /* Set the number of bits (valid range 4-16) */ + + if (nbits < 4 || nbits > 16) + { + return; + } + + clrbitscr2 = SPI_CR2_DS_MASK; + setbitscr2 = SPI_CR2_DS_VAL(nbits); + + /* If nbits is <=8, then we are in byte mode and FRXTH shall be set + * (else, transaction will not complete). + */ + + if (nbits < 9) + { + setbitscr2 |= SPI_CR2_FRXTH; /* RX FIFO Threshold = 1 byte */ + } + else + { + clrbitscr2 |= SPI_CR2_FRXTH; /* RX FIFO Threshold = 2 bytes */ + } + + spi_modifycr1(priv, 0, SPI_CR1_SPE); + spi_modifycr1(priv, setbitscr1, clrbitscr1); + spi_modifycr2(priv, setbitscr2, clrbitscr2); + spi_modifycr1(priv, SPI_CR1_SPE, 0); + + /* Save the selection so the subsequence re-configurations will be faster */ + + priv->nbits = savbits; // nbits has been clobbered... save the signed value. + } +} + +/************************************************************************************ + * Name: spi_send + * + * Description: + * Exchange one word on SPI + * + * Input Parameters: + * dev - Device-specific state data + * wd - The word to send. the size of the data is determined by the + * number of bits selected for the SPI interface. + * + * Returned Value: + * response + * + ************************************************************************************/ + +static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd) +{ + FAR struct stm32_spidev_s *priv = (FAR struct stm32_spidev_s *)dev; + uint32_t regval; + uint16_t ret; + + DEBUGASSERT(priv && priv->spibase); + + /* According to the number of bits, access data register as word or byte + * This is absolutely required because of packing. With nbits <=8 bit frames, + * two bytes are received by a 16-bit read of the data register! + */ + + if (spi_9to16bitmode(priv)) + { + spi_writeword(priv, wd); + ret = spi_readword(priv); + } + else + { + spi_writebyte(priv, (uint8_t)(wd & 0xFF)); + ret = (uint16_t)spi_readbyte(priv); + } + + /* Check and clear any error flags (Reading from the SR clears the error + * flags). + */ + + regval = spi_getreg(priv, STM32_SPI_SR_OFFSET); + + if (spi_9to16bitmode(priv)) + { + spiinfo("Sent: %04x Return: %04x Status: %02x\n", wd, ret, regval); + } + else + { + spiinfo("Sent: %02x Return: %02x Status: %02x\n", wd, ret, regval); + } + + UNUSED(regval); + return ret; +} + +/************************************************************************************ + * Name: spi_exchange (no DMA). aka spi_exchange_nodma + * + * Description: + * Exchange a block of data on SPI without using DMA + * + * Input Parameters: + * dev - Device-specific state data + * txbuffer - A pointer to the buffer of data to be sent + * rxbuffer - A pointer to a buffer in which to receive data + * nwords - the length of data to be exchaned in units of words. + * The wordsize is determined by the number of bits-per-word + * selected for the SPI interface. If nbits <= 8, the data is + * packed into uint8_t's; if nbits >8, the data is packed into uint16_t's + * + * Returned Value: + * None + * + ************************************************************************************/ + +#if !defined(CONFIG_STM32F7_SPI_DMA) || defined(CONFIG_STM32F7_DMACAPABLE) +#if !defined(CONFIG_STM32F7_SPI_DMA) +static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, + FAR void *rxbuffer, size_t nwords) +#else +static void spi_exchange_nodma(FAR struct spi_dev_s *dev, FAR const void *txbuffer, + FAR void *rxbuffer, size_t nwords) +#endif +{ + FAR struct stm32_spidev_s *priv = (FAR struct stm32_spidev_s *)dev; + DEBUGASSERT(priv && priv->spibase); + + spiinfo("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); + + /* 8- or 16-bit mode? */ + + if (spi_9to16bitmode(priv)) + { + /* 16-bit mode */ + + const uint16_t *src = (const uint16_t *)txbuffer; + uint16_t *dest = (uint16_t *)rxbuffer; + uint16_t word; + + while (nwords-- > 0) + { + /* Get the next word to write. Is there a source buffer? */ + + if (src) + { + word = *src++; + } + else + { + word = 0xffff; + } + + /* Exchange one word */ + + word = spi_send(dev, word); + + /* Is there a buffer to receive the return value? */ + + if (dest) + { + *dest++ = word; + } + } + } + else + { + /* 8-bit mode */ + + const uint8_t *src = (const uint8_t *)txbuffer; + uint8_t *dest = (uint8_t *)rxbuffer; + uint8_t word; + + while (nwords-- > 0) + { + /* Get the next word to write. Is there a source buffer? */ + + if (src) + { + word = *src++; + } + else + { + word = 0xff; + } + + /* Exchange one word */ + + word = (uint8_t)spi_send(dev, (uint16_t)word); + + /* Is there a buffer to receive the return value? */ + + if (dest) + { + *dest++ = word; + } + } + } +} +#endif /* !CONFIG_STM32F7_SPI_DMA || CONFIG_STM32F7_DMACAPABLE */ + +/**************************************************************************** + * Name: spi_exchange (with DMA capability) + * + * Description: + * Exchange a block of data on SPI using DMA + * + * Input Parameters: + * dev - Device-specific state data + * txbuffer - A pointer to the buffer of data to be sent + * rxbuffer - A pointer to a buffer in which to receive data + * nwords - the length of data to be exchanged in units of words. + * The wordsize is determined by the number of bits-per-word + * selected for the SPI interface. If nbits <= 8, the data is + * packed into uint8_t's; if nbits >8, the data is packed into uint16_t's + * + * Returned Value: + * None + * + ************************************************************************************/ + +#ifdef CONFIG_STM32F7_SPI_DMA +static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, + FAR void *rxbuffer, size_t nwords) +{ + FAR struct stm32_spidev_s *priv = (FAR struct stm32_spidev_s *)dev; + +#ifdef CONFIG_STM32F7_DMACAPABLE + if ((txbuffer && !stm32_dmacapable((uint32_t)txbuffer, nwords, priv->txccr)) || + (rxbuffer && !stm32_dmacapable((uint32_t)rxbuffer, nwords, priv->rxccr))) + { + /* Unsupported memory region, fall back to non-DMA method. */ + + spi_exchange_nodma(dev, txbuffer, rxbuffer, nwords); + } + else +#endif + { + static uint16_t rxdummy = 0xffff; + static const uint16_t txdummy = 0xffff; + + spiinfo("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); + DEBUGASSERT(priv && priv->spibase); + + /* Setup DMAs */ + + spi_dmarxsetup(priv, rxbuffer, &rxdummy, nwords); + spi_dmatxsetup(priv, txbuffer, &txdummy, nwords); + + /* Start the DMAs */ + + spi_dmarxstart(priv); + spi_dmatxstart(priv); + + /* Then wait for each to complete */ + + spi_dmarxwait(priv); + spi_dmatxwait(priv); + } +} +#endif /* CONFIG_STM32F7_SPI_DMA */ + +/**************************************************************************** + * Name: spi_sndblock + * + * Description: + * Send a block of data on SPI + * + * Input Parameters: + * dev - Device-specific state data + * txbuffer - A pointer to the buffer of data to be sent + * nwords - the length of data to send from the buffer in number of words. + * The wordsize is determined by the number of bits-per-word + * selected for the SPI interface. If nbits <= 8, the data is + * packed into uint8_t's; if nbits >8, the data is packed into uint16_t's + * + * Returned Value: + * None + * + ************************************************************************************/ + +#ifndef CONFIG_SPI_EXCHANGE +static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *txbuffer, size_t nwords) +{ + spiinfo("txbuffer=%p nwords=%d\n", txbuffer, nwords); + return spi_exchange(dev, txbuffer, NULL, nwords); +} +#endif + +/************************************************************************************ + * Name: spi_recvblock + * + * Description: + * Receive a block of data from SPI + * + * Input Parameters: + * dev - Device-specific state data + * rxbuffer - A pointer to the buffer in which to recieve data + * nwords - the length of data that can be received in the buffer in number + * of words. The wordsize is determined by the number of bits-per-word + * selected for the SPI interface. If nbits <= 8, the data is + * packed into uint8_t's; if nbits >8, the data is packed into uint16_t's + * + * Returned Value: + * None + * + ************************************************************************************/ + +#ifndef CONFIG_SPI_EXCHANGE +static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *rxbuffer, size_t nwords) +{ + spiinfo("rxbuffer=%p nwords=%d\n", rxbuffer, nwords); + return spi_exchange(dev, NULL, rxbuffer, nwords); +} +#endif + +/************************************************************************************ + * Name: spi_bus_initialize + * + * Description: + * Initialize the selected SPI bus in its default state (Master, 8-bit, mode 0, etc.) + * + * Input Parameter: + * priv - private SPI device structure + * + * Returned Value: + * None + * + ************************************************************************************/ + +static void spi_bus_initialize(FAR struct stm32_spidev_s *priv) +{ + uint16_t setbits; + uint16_t clrbits; + + /* Configure CR1 and CR2. Default configuration: + * Mode 0: CR1.CPHA=0 and CR1.CPOL=0 + * Master: CR1.MSTR=1 + * 8-bit: CR2.DS=7 + * MSB tranmitted first: CR1.LSBFIRST=0 + * Replace NSS with SSI & SSI=1: CR1.SSI=1 CR1.SSM=1 (prevents MODF error) + * Two lines full duplex: CR1.BIDIMODE=0 CR1.BIDIOIE=(Don't care) and CR1.RXONLY=0 + */ + + clrbits = SPI_CR1_CPHA | SPI_CR1_CPOL | SPI_CR1_BR_MASK | SPI_CR1_LSBFIRST | + SPI_CR1_RXONLY | SPI_CR1_BIDIOE | SPI_CR1_BIDIMODE; + setbits = SPI_CR1_MSTR | SPI_CR1_SSI | SPI_CR1_SSM; + spi_modifycr1(priv, setbits, clrbits); + + clrbits = SPI_CR2_DS_MASK; + setbits = SPI_CR2_DS_8BIT | SPI_CR2_FRXTH; /* FRXTH must be high in 8-bit mode */ + spi_modifycr2(priv, setbits, clrbits); + + priv->frequency = 0; + priv->nbits = 8; + priv->mode = SPIDEV_MODE0; + + /* Select a default frequency of approx. 400KHz */ + + spi_setfrequency((FAR struct spi_dev_s *)priv, 400000); + + /* CRCPOLY configuration */ + + spi_putreg(priv, STM32_SPI_CRCPR_OFFSET, 7); + + /* Initialize the SPI semaphore that enforces mutually exclusive access */ + + sem_init(&priv->exclsem, 0, 1); + + /* Initialize the SPI semaphores that is used to wait for DMA completion */ + +#ifdef CONFIG_STM32F7_SPI_DMA + sem_init(&priv->rxsem, 0, 0); + sem_init(&priv->txsem, 0, 0); + + /* Get DMA channels. NOTE: stm32_dmachannel() will always assign the DMA channel. + * if the channel is not available, then stm32_dmachannel() will block and wait + * until the channel becomes available. WARNING: If you have another device sharing + * a DMA channel with SPI and the code never releases that channel, then the call + * to stm32_dmachannel() will hang forever in this function! Don't let your + * design do that! + */ + + priv->rxdma = stm32_dmachannel(priv->rxch); + priv->txdma = stm32_dmachannel(priv->txch); + DEBUGASSERT(priv->rxdma && priv->txdma); + + spi_putreg(priv, STM32_SPI_CR2_OFFSET, SPI_CR2_RXDMAEN | SPI_CR2_TXDMAEN); +#endif + + /* Enable spi */ + + spi_modifycr1(priv, SPI_CR1_SPE, 0); +} + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32_spibus_initialize + * + * Description: + * Initialize the selected SPI bus + * + * Input Parameter: + * Port number (for hardware that has mutiple SPI interfaces) + * + * Returned Value: + * Valid SPI device structure reference on succcess; a NULL on failure + * + ************************************************************************************/ + +FAR struct spi_dev_s *stm32_spibus_initialize(int bus) +{ + FAR struct stm32_spidev_s *priv = NULL; + + irqstate_t flags = enter_critical_section(); + +#ifdef CONFIG_STM32F7_SPI1 + if (bus == 1) + { + /* Select SPI1 */ + + priv = &g_spi1dev; + + /* Only configure if the bus is not already configured */ + + if ((spi_getreg(priv, STM32_SPI_CR1_OFFSET) & SPI_CR1_SPE) == 0) + { + /* Configure SPI1 pins: SCK, MISO, and MOSI */ + + stm32_configgpio(GPIO_SPI1_SCK); + stm32_configgpio(GPIO_SPI1_MISO); + stm32_configgpio(GPIO_SPI1_MOSI); + + /* Set up default configuration: Master, 8-bit, etc. */ + + spi_bus_initialize(priv); + } + } + else +#endif +#ifdef CONFIG_STM32F7_SPI2 + if (bus == 2) + { + /* Select SPI2 */ + + priv = &g_spi2dev; + + /* Only configure if the bus is not already configured */ + + if ((spi_getreg(priv, STM32_SPI_CR1_OFFSET) & SPI_CR1_SPE) == 0) + { + /* Configure SPI2 pins: SCK, MISO, and MOSI */ + + stm32_configgpio(GPIO_SPI2_SCK); + stm32_configgpio(GPIO_SPI2_MISO); + stm32_configgpio(GPIO_SPI2_MOSI); + + /* Set up default configuration: Master, 8-bit, etc. */ + + spi_bus_initialize(priv); + } + } + else +#endif +#ifdef CONFIG_STM32F7_SPI3 + if (bus == 3) + { + /* Select SPI3 */ + + priv = &g_spi3dev; + + /* Only configure if the bus is not already configured */ + + if ((spi_getreg(priv, STM32_SPI_CR1_OFFSET) & SPI_CR1_SPE) == 0) + { + /* Configure SPI3 pins: SCK, MISO, and MOSI */ + + stm32_configgpio(GPIO_SPI3_SCK); + stm32_configgpio(GPIO_SPI3_MISO); + stm32_configgpio(GPIO_SPI3_MOSI); + + /* Set up default configuration: Master, 8-bit, etc. */ + + spi_bus_initialize(priv); + } + } + else +#endif +#ifdef CONFIG_STM32F7_SPI4 + if (bus == 4) + { + /* Select SPI4 */ + + priv = &g_spi4dev; + + /* Only configure if the bus is not already configured */ + + if ((spi_getreg(priv, STM32_SPI_CR1_OFFSET) & SPI_CR1_SPE) == 0) + { + /* Configure SPI4 pins: SCK, MISO, and MOSI */ + + stm32_configgpio(GPIO_SPI4_SCK); + stm32_configgpio(GPIO_SPI4_MISO); + stm32_configgpio(GPIO_SPI4_MOSI); + + /* Set up default configuration: Master, 8-bit, etc. */ + + spi_bus_initialize(priv); + } + } + else +#endif +#ifdef CONFIG_STM32F7_SPI5 + if (bus == 5) + { + /* Select SPI5 */ + + priv = &g_spi5dev; + + /* Only configure if the bus is not already configured */ + + if ((spi_getreg(priv, STM32_SPI_CR1_OFFSET) & SPI_CR1_SPE) == 0) + { + /* Configure SPI5 pins: SCK, MISO, and MOSI */ + + stm32_configgpio(GPIO_SPI5_SCK); + stm32_configgpio(GPIO_SPI5_MISO); + stm32_configgpio(GPIO_SPI5_MOSI); + + /* Set up default configuration: Master, 8-bit, etc. */ + + spi_bus_initialize(priv); + } + } + else +#endif +#ifdef CONFIG_STM32F7_SPI6 + if (bus == 6) + { + /* Select SPI6 */ + + priv = &g_spi6dev; + + /* Only configure if the bus is not already configured */ + + if ((spi_getreg(priv, STM32_SPI_CR1_OFFSET) & SPI_CR1_SPE) == 0) + { + /* Configure SPI6 pins: SCK, MISO, and MOSI */ + + stm32_configgpio(GPIO_SPI6_SCK); + stm32_configgpio(GPIO_SPI6_MISO); + stm32_configgpio(GPIO_SPI6_MOSI); + + /* Set up default configuration: Master, 8-bit, etc. */ + + spi_bus_initialize(priv); + } + } + else +#endif + { + spierr("ERROR: Unsupported SPI bus: %d\n", bus); + return NULL; + } + + leave_critical_section(flags); + return (FAR struct spi_dev_s *)priv; +} + +#endif /* CONFIG_STM32F7_SPI1 || CONFIG_STM32F7_SPI2 || CONFIG_STM32F7_SPI3 || \ + * CONFIG_STM32F7_SPI4 || CONFIG_STM32F7_SPI5 || CONFIG_STM32F7_SPI6 */ diff --git a/arch/arm/src/stm32f7/stm32_spi.h b/arch/arm/src/stm32f7/stm32_spi.h index 2d606d2f45c6685ea4114cdeca640b2bf6075a10..2a2aa91881a21d1b75745b184b924ec355054247 100644 --- a/arch/arm/src/stm32f7/stm32_spi.h +++ b/arch/arm/src/stm32f7/stm32_spi.h @@ -2,7 +2,8 @@ * arch/arm/src/stm32f7/stm32_spi.h * * Copyright (C) 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -33,8 +34,8 @@ * ************************************************************************************/ -#ifndef __ARCH_ARM_STC_STM32F7_STM32_SPI_H -#define __ARCH_ARM_STC_STM32F7_STM32_SPI_H +#ifndef __ARCH_ARM_SRC_STM32F7_STM32_SPI_H +#define __ARCH_ARM_SRC_STM32F7_STM32_SPI_H /************************************************************************************ * Included Files @@ -45,7 +46,7 @@ #include #include "chip.h" -//#include "chip/stm32_spi.h" +#include "chip/stm32_spi.h" /************************************************************************************ * Public Functions @@ -110,37 +111,37 @@ FAR struct spi_dev_s *stm32_spibus_initialize(int bus); * ************************************************************************************/ -#ifdef CONFIG_STM32_SPI1 +#ifdef CONFIG_STM32F7_SPI1 void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected); uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid); int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd); #endif -#ifdef CONFIG_STM32_SPI2 +#ifdef CONFIG_STM32F7_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); int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd); #endif -#ifdef CONFIG_STM32_SPI3 +#ifdef CONFIG_STM32F7_SPI3 void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected); uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid); int stm32_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd); #endif -#ifdef CONFIG_STM32_SPI4 +#ifdef CONFIG_STM32F7_SPI4 void stm32_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected); uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid); int stm32_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd); #endif -#ifdef CONFIG_STM32_SPI5 +#ifdef CONFIG_STM32F7_SPI5 void stm32_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected); uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid); int stm32_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd); #endif -#ifdef CONFIG_STM32_SPI6 +#ifdef CONFIG_STM32F7_SPI6 void stm32_spi6select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected); uint8_t stm32_spi6status(FAR struct spi_dev_s *dev, enum spi_dev_e devid); int stm32_spi6cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd); @@ -167,32 +168,32 @@ int stm32_spi6cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) ****************************************************************************/ #ifdef CONFIG_SPI_CALLBACK -#ifdef CONFIG_STM32_SPI1 +#ifdef CONFIG_STM32F7_SPI1 int stm32_spi1register(FAR struct spi_dev_s *dev, spi_mediachange_t callback, FAR void *arg); #endif -#ifdef CONFIG_STM32_SPI2 +#ifdef CONFIG_STM32F7_SPI2 int stm32_spi2register(FAR struct spi_dev_s *dev, spi_mediachange_t callback, FAR void *arg); #endif -#ifdef CONFIG_STM32_SPI3 +#ifdef CONFIG_STM32F7_SPI3 int stm32_spi3register(FAR struct spi_dev_s *dev, spi_mediachange_t callback, FAR void *arg); #endif -#ifdef CONFIG_STM32_SPI4 +#ifdef CONFIG_STM32F7_SPI4 int stm32_spi4register(FAR struct spi_dev_s *dev, spi_mediachange_t callback, FAR void *arg); #endif -#ifdef CONFIG_STM32_SPI5 +#ifdef CONFIG_STM32F7_SPI5 int stm32_spi5register(FAR struct spi_dev_s *dev, spi_mediachange_t callback, FAR void *arg); #endif -#ifdef CONFIG_STM32_SPI6 +#ifdef CONFIG_STM32F7_SPI6 int stm32_spi6register(FAR struct spi_dev_s *dev, spi_mediachange_t callback, FAR void *arg); #endif @@ -204,5 +205,5 @@ int stm32_spi6register(FAR struct spi_dev_s *dev, spi_mediachange_t callback, #endif #endif /* __ASSEMBLY__ */ -#endif /* __ARCH_ARM_STC_STM32F7_STM32_SPI_H */ +#endif /* __ARCH_ARM_SRC_STM32F7_STM32_SPI_H */ diff --git a/arch/arm/src/stm32f7/stm32_tim.c b/arch/arm/src/stm32f7/stm32_tim.c new file mode 100644 index 0000000000000000000000000000000000000000..84934db13dca9d8d9f572446cff735b116dac14f --- /dev/null +++ b/arch/arm/src/stm32f7/stm32_tim.c @@ -0,0 +1,1497 @@ +/************************************************************************************ + * arm/arm/src/stm32f7/stm32_tim.c + * + * Copyright (C) 2011 Uros Platise. All rights reserved. + * Author: Uros Platise + * + * With modifications and updates by: + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: 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 +#include +#include +#include + +#include + +#include "chip.h" +#include "up_internal.h" +#include "up_arch.h" + +#include "stm32_gpio.h" +#include "stm32_tim.h" + +/************************************************************************************ + * Private Types + ************************************************************************************/ +/* Configuration ********************************************************************/ +/* Timer devices may be used for different purposes. Such special purposes include: + * + * - To generate modulated outputs for such things as motor control. If CONFIG_STM32F7_TIMn + * is defined then the CONFIG_STM32F7_TIMn_PWM may also be defined to indicate that + * the timer is intended to be used for pulsed output modulation. + * + * - To control periodic ADC input sampling. If CONFIG_STM32F7_TIMn is defined then + * CONFIG_STM32F7_TIMn_ADC may also be defined to indicate that timer "n" is intended + * to be used for that purpose. + * + * - To control periodic DAC outputs. If CONFIG_STM32F7_TIMn is defined then + * CONFIG_STM32F7_TIMn_DAC may also be defined to indicate that timer "n" is intended + * to be used for that purpose. + * + * - To use a Quadrature Encoder. If CONFIG_STM32F7_TIMn is defined then + * CONFIG_STM32F7_TIMn_QE may also be defined to indicate that timer "n" is intended + * to be used for that purpose. + * + * In any of these cases, the timer will not be used by this timer module. + */ + +#if defined(CONFIG_STM32F7_TIM1_PWM) || defined (CONFIG_STM32F7_TIM1_ADC) || \ + defined(CONFIG_STM32F7_TIM1_DAC) || defined(CONFIG_STM32F7_TIM1_QE) +# undef CONFIG_STM32F7_TIM1 +#endif +#if defined(CONFIG_STM32F7_TIM2_PWM) || defined (CONFIG_STM32F7_TIM2_ADC) || \ + defined(CONFIG_STM32F7_TIM2_DAC) || defined(CONFIG_STM32F7_TIM2_QE) +# undef CONFIG_STM32F7_TIM2 +#endif +#if defined(CONFIG_STM32F7_TIM3_PWM) || defined (CONFIG_STM32F7_TIM3_ADC) || \ + defined(CONFIG_STM32F7_TIM3_DAC) || defined(CONFIG_STM32F7_TIM3_QE) +# undef CONFIG_STM32F7_TIM3 +#endif +#if defined(CONFIG_STM32F7_TIM4_PWM) || defined (CONFIG_STM32F7_TIM4_ADC) || \ + defined(CONFIG_STM32F7_TIM4_DAC) || defined(CONFIG_STM32F7_TIM4_QE) +# undef CONFIG_STM32F7_TIM4 +#endif +#if defined(CONFIG_STM32F7_TIM5_PWM) || defined (CONFIG_STM32F7_TIM5_ADC) || \ + defined(CONFIG_STM32F7_TIM5_DAC) || defined(CONFIG_STM32F7_TIM5_QE) +# undef CONFIG_STM32F7_TIM5 +#endif +#if defined(CONFIG_STM32F7_TIM6_PWM) || defined (CONFIG_STM32F7_TIM6_ADC) || \ + defined(CONFIG_STM32F7_TIM6_DAC) || defined(CONFIG_STM32F7_TIM6_QE) +# undef CONFIG_STM32F7_TIM6 +#endif +#if defined(CONFIG_STM32F7_TIM7_PWM) || defined (CONFIG_STM32F7_TIM7_ADC) || \ + defined(CONFIG_STM32F7_TIM7_DAC) || defined(CONFIG_STM32F7_TIM7_QE) +# undef CONFIG_STM32F7_TIM7 +#endif +#if defined(CONFIG_STM32F7_TIM8_PWM) || defined (CONFIG_STM32F7_TIM8_ADC) || \ + defined(CONFIG_STM32F7_TIM8_DAC) || defined(CONFIG_STM32F7_TIM8_QE) +# undef CONFIG_STM32F7_TIM8 +#endif +#if defined(CONFIG_STM32F7_TIM9_PWM) || defined (CONFIG_STM32F7_TIM9_ADC) || \ + defined(CONFIG_STM32F7_TIM9_DAC) || defined(CONFIG_STM32F7_TIM9_QE) +# undef CONFIG_STM32F7_TIM9 +#endif +#if defined(CONFIG_STM32F7_TIM10_PWM) || defined (CONFIG_STM32F7_TIM10_ADC) || \ + defined(CONFIG_STM32F7_TIM10_DAC) || defined(CONFIG_STM32F7_TIM10_QE) +# undef CONFIG_STM32F7_TIM10 +#endif +#if defined(CONFIG_STM32F7_TIM11_PWM) || defined (CONFIG_STM32F7_TIM11_ADC) || \ + defined(CONFIG_STM32F7_TIM11_DAC) || defined(CONFIG_STM32F7_TIM11_QE) +# undef CONFIG_STM32F7_TIM11 +#endif +#if defined(CONFIG_STM32F7_TIM12_PWM) || defined (CONFIG_STM32F7_TIM12_ADC) || \ + defined(CONFIG_STM32F7_TIM12_DAC) || defined(CONFIG_STM32F7_TIM12_QE) +# undef CONFIG_STM32F7_TIM12 +#endif +#if defined(CONFIG_STM32F7_TIM13_PWM) || defined (CONFIG_STM32F7_TIM13_ADC) || \ + defined(CONFIG_STM32F7_TIM13_DAC) || defined(CONFIG_STM32F7_TIM13_QE) +# undef CONFIG_STM32F7_TIM13 +#endif +#if defined(CONFIG_STM32F7_TIM14_PWM) || defined (CONFIG_STM32F7_TIM14_ADC) || \ + defined(CONFIG_STM32F7_TIM14_DAC) || defined(CONFIG_STM32F7_TIM14_QE) +# undef CONFIG_STM32F7_TIM14 +#endif + +#if defined(CONFIG_STM32F7_TIM1) +# if defined(GPIO_TIM1_CH1OUT) ||defined(GPIO_TIM1_CH2OUT)||\ + defined(GPIO_TIM1_CH3OUT) ||defined(GPIO_TIM1_CH4OUT) +# define HAVE_TIM1_GPIOCONFIG 1 +#endif +#endif + +#if defined(CONFIG_STM32F7_TIM2) +# if defined(GPIO_TIM2_CH1OUT) ||defined(GPIO_TIM2_CH2OUT)||\ + defined(GPIO_TIM2_CH3OUT) ||defined(GPIO_TIM2_CH4OUT) +# define HAVE_TIM2_GPIOCONFIG 1 +#endif +#endif + +#if defined(CONFIG_STM32F7_TIM3) +# if defined(GPIO_TIM3_CH1OUT) ||defined(GPIO_TIM3_CH2OUT)||\ + defined(GPIO_TIM3_CH3OUT) ||defined(GPIO_TIM3_CH4OUT) +# define HAVE_TIM3_GPIOCONFIG 1 +#endif +#endif + +#if defined(CONFIG_STM32F7_TIM4) +# if defined(GPIO_TIM4_CH1OUT) ||defined(GPIO_TIM4_CH2OUT)||\ + defined(GPIO_TIM4_CH3OUT) ||defined(GPIO_TIM4_CH4OUT) +# define HAVE_TIM4_GPIOCONFIG 1 +#endif +#endif + +#if defined(CONFIG_STM32F7_TIM5) +# if defined(GPIO_TIM5_CH1OUT) ||defined(GPIO_TIM5_CH2OUT)||\ + defined(GPIO_TIM5_CH3OUT) ||defined(GPIO_TIM5_CH4OUT) +# define HAVE_TIM5_GPIOCONFIG 1 +#endif +#endif + +#if defined(CONFIG_STM32F7_TIM8) +# if defined(GPIO_TIM8_CH1OUT) ||defined(GPIO_TIM8_CH2OUT)||\ + defined(GPIO_TIM8_CH3OUT) ||defined(GPIO_TIM8_CH4OUT) +# define HAVE_TIM8_GPIOCONFIG 1 +#endif +#endif +#if defined(CONFIG_STM32F7_TIM9) +# if defined(GPIO_TIM9_CH1OUT) ||defined(GPIO_TIM9_CH2OUT)||\ + defined(GPIO_TIM9_CH3OUT) ||defined(GPIO_TIM9_CH4OUT) +# define HAVE_TIM9_GPIOCONFIG 1 +#endif +#endif + +#if defined(CONFIG_STM32F7_TIM10) +# if defined(GPIO_TIM10_CH1OUT) ||defined(GPIO_TIM10_CH2OUT)||\ + defined(GPIO_TIM10_CH3OUT) ||defined(GPIO_TIM10_CH4OUT) +# define HAVE_TIM10_GPIOCONFIG 1 +#endif +#endif + +#if defined(CONFIG_STM32F7_TIM11) +# if defined(GPIO_TIM11_CH1OUT) ||defined(GPIO_TIM11_CH2OUT)||\ + defined(GPIO_TIM11_CH3OUT) ||defined(GPIO_TIM11_CH4OUT) +# define HAVE_TIM11_GPIOCONFIG 1 +#endif +#endif + +#if defined(CONFIG_STM32F7_TIM12) +# if defined(GPIO_TIM12_CH1OUT) ||defined(GPIO_TIM12_CH2OUT)||\ + defined(GPIO_TIM12_CH3OUT) ||defined(GPIO_TIM12_CH4OUT) +# define HAVE_TIM12_GPIOCONFIG 1 +#endif +#endif + +#if defined(CONFIG_STM32F7_TIM13) +# if defined(GPIO_TIM13_CH1OUT) ||defined(GPIO_TIM13_CH2OUT)||\ + defined(GPIO_TIM13_CH3OUT) ||defined(GPIO_TIM13_CH4OUT) +# define HAVE_TIM13_GPIOCONFIG 1 +#endif +#endif + +#if defined(CONFIG_STM32F7_TIM14) +# if defined(GPIO_TIM14_CH1OUT) ||defined(GPIO_TIM14_CH2OUT)||\ + defined(GPIO_TIM14_CH3OUT) ||defined(GPIO_TIM14_CH4OUT) +# define HAVE_TIM14_GPIOCONFIG 1 +#endif +#endif + + +/* This module then only compiles if there are enabled timers that are not intended for + * some other purpose. + */ + +#if defined(CONFIG_STM32F7_TIM1) || defined(CONFIG_STM32F7_TIM2) || \ + defined(CONFIG_STM32F7_TIM3) || defined(CONFIG_STM32F7_TIM4) || \ + defined(CONFIG_STM32F7_TIM5) || defined(CONFIG_STM32F7_TIM6) || \ + defined(CONFIG_STM32F7_TIM7) || defined(CONFIG_STM32F7_TIM8) || \ + defined(CONFIG_STM32F7_TIM9) || defined(CONFIG_STM32F7_TIM10) || \ + defined(CONFIG_STM32F7_TIM11) || defined(CONFIG_STM32F7_TIM12) || \ + defined(CONFIG_STM32F7_TIM13) || defined(CONFIG_STM32F7_TIM14) + +/************************************************************************************ + * Private Types + ************************************************************************************/ + +/* TIM Device Structure */ + +struct stm32_tim_priv_s +{ + struct stm32_tim_ops_s *ops; + stm32_tim_mode_t mode; + uint32_t base; /* TIMn base address */ +}; + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/* Get a 16-bit register value by offset */ + +static inline uint16_t stm32_getreg16(FAR struct stm32_tim_dev_s *dev, + uint8_t offset) +{ + return getreg16(((struct stm32_tim_priv_s *)dev)->base + offset); +} + +/* Put a 16-bit register value by offset */ + +static inline void stm32_putreg16(FAR struct stm32_tim_dev_s *dev, uint8_t offset, + uint16_t value) +{ + putreg16(value, ((struct stm32_tim_priv_s *)dev)->base + offset); +} + +/* Modify a 16-bit register value by offset */ + +static inline void stm32_modifyreg16(FAR struct stm32_tim_dev_s *dev, + uint8_t offset, uint16_t clearbits, + uint16_t setbits) +{ + modifyreg16(((struct stm32_tim_priv_s *)dev)->base + offset, clearbits, setbits); +} + +/* Get a 32-bit register value by offset. This applies only for the STM32 F4 + * 32-bit registers (CNT, ARR, CRR1-4) in the 32-bit timers TIM2-5. + */ + +static inline uint32_t stm32_getreg32(FAR struct stm32_tim_dev_s *dev, + uint8_t offset) +{ + return getreg32(((struct stm32_tim_priv_s *)dev)->base + offset); +} + +/* Put a 32-bit register value by offset. This applies only for the STM32 F4 + * 32-bit registers (CNT, ARR, CRR1-4) in the 32-bit timers TIM2-5. + */ + +static inline void stm32_putreg32(FAR struct stm32_tim_dev_s *dev, uint8_t offset, + uint32_t value) +{ + putreg32(value, ((struct stm32_tim_priv_s *)dev)->base + offset); +} + +static void stm32_tim_reload_counter(FAR struct stm32_tim_dev_s *dev) +{ + uint16_t val = stm32_getreg16(dev, STM32_BTIM_EGR_OFFSET); + val |= ATIM_EGR_UG; + stm32_putreg16(dev, STM32_BTIM_EGR_OFFSET, val); +} + +static void stm32_tim_enable(FAR struct stm32_tim_dev_s *dev) +{ + uint16_t val = stm32_getreg16(dev, STM32_BTIM_CR1_OFFSET); + val |= ATIM_CR1_CEN; + stm32_tim_reload_counter(dev); + stm32_putreg16(dev, STM32_BTIM_CR1_OFFSET, val); +} + +static void stm32_tim_disable(FAR struct stm32_tim_dev_s *dev) +{ + uint16_t val = stm32_getreg16(dev, STM32_BTIM_CR1_OFFSET); + val &= ~ATIM_CR1_CEN; + stm32_putreg16(dev, STM32_BTIM_CR1_OFFSET, val); +} + +/* Reset timer into system default state, but do not affect output/input pins */ + +static void stm32_tim_reset(FAR struct stm32_tim_dev_s *dev) +{ + ((struct stm32_tim_priv_s *)dev)->mode = STM32_TIM_MODE_DISABLED; + stm32_tim_disable(dev); +} + +#if defined(HAVE_TIM1_GPIOCONFIG)||defined(HAVE_TIM2_GPIOCONFIG)||\ + defined(HAVE_TIM3_GPIOCONFIG)||defined(HAVE_TIM4_GPIOCONFIG)||\ + defined(HAVE_TIM5_GPIOCONFIG)||defined(HAVE_TIM8_GPIOCONFIG) +static void stm32_tim_gpioconfig(uint32_t cfg, stm32_tim_channel_t mode) +{ + /* TODO: Add support for input capture and bipolar dual outputs for TIM8 */ + + if (mode & STM32_TIM_CH_MODE_MASK) + { + stm32_configgpio(cfg); + } + else + { + stm32_unconfiggpio(cfg); + } +} +#endif + +/************************************************************************************ + * Basic Functions + ************************************************************************************/ + +static int stm32_tim_setclock(FAR struct stm32_tim_dev_s *dev, uint32_t freq) +{ + uint32_t freqin; + int prescaler; + + DEBUGASSERT(dev != NULL); + + /* Disable Timer? */ + + if (freq == 0) + { + stm32_tim_disable(dev); + return 0; + } + + /* Get the input clock frequency for this timer. These vary with + * different timer clock sources, MCU-specific timer configuration, and + * board-specific clock configuration. The correct input clock frequency + * must be defined in the board.h header file. + */ + + switch (((struct stm32_tim_priv_s *)dev)->base) + { +#ifdef CONFIG_STM32F7_TIM1 + case STM32_TIM1_BASE: + freqin = STM32_APB2_TIM1_CLKIN; + break; +#endif +#ifdef CONFIG_STM32F7_TIM2 + case STM32_TIM2_BASE: + freqin = STM32_APB1_TIM2_CLKIN; + break; +#endif +#ifdef CONFIG_STM32F7_TIM3 + case STM32_TIM3_BASE: + freqin = STM32_APB1_TIM3_CLKIN; + break; +#endif +#ifdef CONFIG_STM32F7_TIM4 + case STM32_TIM4_BASE: + freqin = STM32_APB1_TIM4_CLKIN; + break; +#endif +#ifdef CONFIG_STM32F7_TIM5 + case STM32_TIM5_BASE: + freqin = STM32_APB1_TIM5_CLKIN; + break; +#endif +#ifdef CONFIG_STM32F7_TIM6 + case STM32_TIM6_BASE: + freqin = STM32_APB1_TIM6_CLKIN; + break; +#endif +#ifdef CONFIG_STM32F7_TIM7 + case STM32_TIM7_BASE: + freqin = STM32_APB1_TIM7_CLKIN; + break; +#endif +#ifdef CONFIG_STM32F7_TIM8 + case STM32_TIM8_BASE: + freqin = STM32_APB2_TIM8_CLKIN; + break; +#endif +#ifdef CONFIG_STM32F7_TIM9 + case STM32_TIM9_BASE: + freqin = STM32_APB2_TIM9_CLKIN; + break; +#endif +#ifdef CONFIG_STM32F7_TIM10 + case STM32_TIM10_BASE: + freqin = STM32_APB2_TIM10_CLKIN; + break; +#endif +#ifdef CONFIG_STM32F7_TIM11 + case STM32_TIM11_BASE: + freqin = STM32_APB2_TIM11_CLKIN; + break; +#endif +#ifdef CONFIG_STM32F7_TIM12 + case STM32_TIM12_BASE: + freqin = STM32_APB1_TIM12_CLKIN; + break; +#endif +#ifdef CONFIG_STM32F7_TIM13 + case STM32_TIM13_BASE: + freqin = STM32_APB1_TIM13_CLKIN; + break; +#endif +#ifdef CONFIG_STM32F7_TIM14 + case STM32_TIM14_BASE: + freqin = STM32_APB1_TIM14_CLKIN; + break; +#endif + default: + return -EINVAL; + } + + /* Select a pre-scaler value for this timer using the input clock + * frequency. + */ + + prescaler = freqin / freq; + + /* We need to decrement value for '1', but only, if that will not to + * cause underflow. + */ + + if (prescaler > 0) + { + prescaler--; + } + + /* Check for overflow as well. */ + + if (prescaler > 0xffff) + { + prescaler = 0xffff; + } + + stm32_putreg16(dev, STM32_BTIM_PSC_OFFSET, prescaler); + stm32_tim_enable(dev); + + return prescaler; +} + +static void stm32_tim_setperiod(FAR struct stm32_tim_dev_s *dev, + uint32_t period) +{ + DEBUGASSERT(dev != NULL); + stm32_putreg32(dev, STM32_BTIM_ARR_OFFSET, period); +} + +static int stm32_tim_setisr(FAR struct stm32_tim_dev_s *dev, + int (*handler)(int irq, void *context), + int source) +{ + int vectorno; + + DEBUGASSERT(dev != NULL); + DEBUGASSERT(source == 0); + + switch (((struct stm32_tim_priv_s *)dev)->base) + { +#ifdef CONFIG_STM32F7_TIM1 + case STM32_TIM1_BASE: + vectorno = STM32_IRQ_TIM1UP; + break; +#endif +#ifdef CONFIG_STM32F7_TIM2 + case STM32_TIM2_BASE: + vectorno = STM32_IRQ_TIM2; + break; +#endif +#ifdef CONFIG_STM32F7_TIM3 + case STM32_TIM3_BASE: + vectorno = STM32_IRQ_TIM3; + break; +#endif +#ifdef CONFIG_STM32F7_TIM4 + case STM32_TIM4_BASE: + vectorno = STM32_IRQ_TIM4; + break; +#endif +#ifdef CONFIG_STM32F7_TIM5 + case STM32_TIM5_BASE: + vectorno = STM32_IRQ_TIM5; + break; +#endif +#ifdef CONFIG_STM32F7_TIM6 + case STM32_TIM6_BASE: + vectorno = STM32_IRQ_TIM6; + break; +#endif +#ifdef CONFIG_STM32F7_TIM7 + case STM32_TIM7_BASE: + vectorno = STM32_IRQ_TIM7; + break; +#endif +#ifdef CONFIG_STM32F7_TIM8 + case STM32_TIM8_BASE: + vectorno = STM32_IRQ_TIM8UP; + break; +#endif +#ifdef CONFIG_STM32F7_TIM9 + case STM32_TIM9_BASE: + vectorno = STM32_IRQ_TIM9; + break; +#endif +#ifdef CONFIG_STM32F7_TIM10 + case STM32_TIM10_BASE: + vectorno = STM32_IRQ_TIM10; + break; +#endif +#ifdef CONFIG_STM32F7_TIM11 + case STM32_TIM11_BASE: + vectorno = STM32_IRQ_TIM11; + break; +#endif +#ifdef CONFIG_STM32F7_TIM12 + case STM32_TIM12_BASE: + vectorno = STM32_IRQ_TIM12; + break; +#endif +#ifdef CONFIG_STM32F7_TIM13 + case STM32_TIM13_BASE: + vectorno = STM32_IRQ_TIM13; + break; +#endif +#ifdef CONFIG_STM32F7_TIM14 + case STM32_TIM14_BASE: + vectorno = STM32_IRQ_TIM14; + break; +#endif + + default: + return -EINVAL; + } + + /* Disable interrupt when callback is removed */ + + if (!handler) + { + up_disable_irq(vectorno); + irq_detach(vectorno); + return OK; + } + + /* Otherwise set callback and enable interrupt */ + + irq_attach(vectorno, handler); + up_enable_irq(vectorno); + +#ifdef CONFIG_ARCH_IRQPRIO + /* Set the interrupt priority */ + + up_prioritize_irq(vectorno, NVIC_SYSH_PRIORITY_DEFAULT); +#endif + + return OK; +} + +static void stm32_tim_enableint(FAR struct stm32_tim_dev_s *dev, int source) +{ + DEBUGASSERT(dev != NULL); + stm32_modifyreg16(dev, STM32_BTIM_DIER_OFFSET, 0, ATIM_DIER_UIE); +} + +static void stm32_tim_disableint(FAR struct stm32_tim_dev_s *dev, int source) +{ + DEBUGASSERT(dev != NULL); + stm32_modifyreg16(dev, STM32_BTIM_DIER_OFFSET, ATIM_DIER_UIE, 0); +} + +static void stm32_tim_ackint(FAR struct stm32_tim_dev_s *dev, int source) +{ + stm32_putreg16(dev, STM32_BTIM_SR_OFFSET, ~ATIM_SR_UIF); +} + +/************************************************************************************ + * General Functions + ************************************************************************************/ + +static int stm32_tim_setmode(FAR struct stm32_tim_dev_s *dev, stm32_tim_mode_t mode) +{ + uint16_t val = ATIM_CR1_CEN | ATIM_CR1_ARPE; + + DEBUGASSERT(dev != NULL); + + /* This function is not supported on basic timers. To enable or + * disable it, simply set its clock to valid frequency or zero. + */ + + if (((struct stm32_tim_priv_s *)dev)->base == STM32_TIM6_BASE || \ + ((struct stm32_tim_priv_s *)dev)->base == STM32_TIM7_BASE) + { + return -EINVAL; + } + + /* Decode operational modes */ + + switch (mode & STM32_TIM_MODE_MASK) + { + case STM32_TIM_MODE_DISABLED: + val = 0; + break; + + case STM32_TIM_MODE_DOWN: + val |= ATIM_CR1_DIR; + + case STM32_TIM_MODE_UP: + break; + + case STM32_TIM_MODE_UPDOWN: + val |= ATIM_CR1_CENTER1; + // Our default: Interrupts are generated on compare, when counting down + break; + + case STM32_TIM_MODE_PULSE: + val |= ATIM_CR1_OPM; + break; + + default: + return -EINVAL; + } + + stm32_tim_reload_counter(dev); + stm32_putreg16(dev, STM32_BTIM_CR1_OFFSET, val); + + /* Advanced registers require Main Output Enable */ + + if (((struct stm32_tim_priv_s *)dev)->base == STM32_TIM1_BASE || + ((struct stm32_tim_priv_s *)dev)->base == STM32_TIM8_BASE) + { + stm32_modifyreg16(dev, STM32_ATIM_BDTR_OFFSET, 0, ATIM_BDTR_MOE); + } + + return OK; +} + +static int stm32_tim_setchannel(FAR struct stm32_tim_dev_s *dev, uint8_t channel, + stm32_tim_channel_t mode) +{ + uint16_t ccmr_orig = 0; + uint16_t ccmr_val = 0; + uint16_t ccmr_mask = 0xff; + uint16_t ccer_val = stm32_getreg16(dev, STM32_GTIM_CCER_OFFSET); + uint8_t ccmr_offset = STM32_GTIM_CCMR1_OFFSET; + + DEBUGASSERT(dev != NULL); + + /* Further we use range as 0..3; if channel=0 it will also overflow here */ + + if (--channel > 4) + { + return -EINVAL; + } + + /* Assume that channel is disabled and polarity is active high */ + + ccer_val &= ~(3 << (channel << 2)); + + /* This function is not supported on basic timers. To enable or + * disable it, simply set its clock to valid frequency or zero. + */ + + if (((struct stm32_tim_priv_s *)dev)->base == STM32_TIM6_BASE || \ + ((struct stm32_tim_priv_s *)dev)->base == STM32_TIM7_BASE) + { + return -EINVAL; + } + + + /* Decode configuration */ + + switch (mode & STM32_TIM_CH_MODE_MASK) + { + case STM32_TIM_CH_DISABLED: + break; + + case STM32_TIM_CH_OUTPWM: + ccmr_val = (ATIM_CCMR_MODE_PWM1 << ATIM_CCMR1_OC1M_SHIFT) + ATIM_CCMR1_OC1PE; + ccer_val |= ATIM_CCER_CC1E << (channel << 2); + break; + + default: + return -EINVAL; + } + + /* Set polarity */ + + if (mode & STM32_TIM_CH_POLARITY_NEG) + { + ccer_val |= ATIM_CCER_CC1P << (channel << 2); + } + + /* Define its position (shift) and get register offset */ + + if (channel & 1) + { + ccmr_val <<= 8; + ccmr_mask <<= 8; + } + + if (channel > 1) + { + ccmr_offset = STM32_GTIM_CCMR2_OFFSET; + } + + ccmr_orig = stm32_getreg16(dev, ccmr_offset); + ccmr_orig &= ~ccmr_mask; + ccmr_orig |= ccmr_val; + stm32_putreg16(dev, ccmr_offset, ccmr_orig); + stm32_putreg16(dev, STM32_GTIM_CCER_OFFSET, ccer_val); + + /* set GPIO */ + + switch (((struct stm32_tim_priv_s *)dev)->base) + { +#ifdef CONFIG_STM32F7_TIM1 + case STM32_TIM1_BASE: + switch (channel) + { +# if defined(GPIO_TIM1_CH1OUT) + case 0: + stm32_tim_gpioconfig(GPIO_TIM1_CH1OUT, mode); break; +# endif +# if defined(GPIO_TIM1_CH2OUT) + case 1: + stm32_tim_gpioconfig(GPIO_TIM1_CH2OUT, mode); break; +# endif +# if defined(GPIO_TIM1_CH3OUT) + case 2: + stm32_tim_gpioconfig(GPIO_TIM1_CH3OUT, mode); break; +# endif +# if defined(GPIO_TIM1_CH4OUT) + case 3: + stm32_tim_gpioconfig(GPIO_TIM1_CH4OUT, mode); break; +# endif + default: + return -EINVAL; + } + break; +#endif +#ifdef CONFIG_STM32F7_TIM2 + case STM32_TIM2_BASE: + switch (channel) + { +# if defined(GPIO_TIM2_CH1OUT) + case 0: + stm32_tim_gpioconfig(GPIO_TIM2_CH1OUT, mode); + break; +# endif +# if defined(GPIO_TIM2_CH2OUT) + case 1: + stm32_tim_gpioconfig(GPIO_TIM2_CH2OUT, mode); + break; +# endif +# if defined(GPIO_TIM2_CH3OUT) + case 2: + stm32_tim_gpioconfig(GPIO_TIM2_CH3OUT, mode); + break; +# endif +# if defined(GPIO_TIM2_CH4OUT) + case 3: + stm32_tim_gpioconfig(GPIO_TIM2_CH4OUT, mode); + break; +#endif + default: + return -EINVAL; + } + break; +#endif +#ifdef CONFIG_STM32F7_TIM3 + case STM32_TIM3_BASE: + switch (channel) + { +# if defined(GPIO_TIM3_CH1OUT) + case 0: + stm32_tim_gpioconfig(GPIO_TIM3_CH1OUT, mode); + break; +# endif +# if defined(GPIO_TIM3_CH2OUT) + case 1: + stm32_tim_gpioconfig(GPIO_TIM3_CH2OUT, mode); + break; +# endif +# if defined(GPIO_TIM3_CH3OUT) + case 2: + stm32_tim_gpioconfig(GPIO_TIM3_CH3OUT, mode); + break; +# endif +# if defined(GPIO_TIM3_CH4OUT) + case 3: + stm32_tim_gpioconfig(GPIO_TIM3_CH4OUT, mode); + break; +#endif + default: + return -EINVAL; + } + break; +#endif +#ifdef CONFIG_STM32F7_TIM4 + case STM32_TIM4_BASE: + switch (channel) + { +# if defined(GPIO_TIM4_CH1OUT) + case 0: + stm32_tim_gpioconfig(GPIO_TIM4_CH1OUT, mode); + break; +# endif +# if defined(GPIO_TIM4_CH2OUT) + case 1: + stm32_tim_gpioconfig(GPIO_TIM4_CH2OUT, mode); + break; +# endif +# if defined(GPIO_TIM4_CH3OUT) + case 2: + stm32_tim_gpioconfig(GPIO_TIM4_CH3OUT, mode); + break; +# endif +# if defined(GPIO_TIM4_CH4OUT) + case 3: + stm32_tim_gpioconfig(GPIO_TIM4_CH4OUT, mode); + break; +# endif + default: + return -EINVAL; + } + break; +#endif +#ifdef CONFIG_STM32F7_TIM5 + case STM32_TIM5_BASE: + switch (channel) + { +# if defined(GPIO_TIM5_CH1OUT) + case 0: + stm32_tim_gpioconfig(GPIO_TIM5_CH1OUT, mode); + break; +# endif +# if defined(GPIO_TIM5_CH2OUT) + case 1: + stm32_tim_gpioconfig(GPIO_TIM5_CH2OUT, mode); + break; +# endif +# if defined(GPIO_TIM5_CH3OUT) + case 2: + stm32_tim_gpioconfig(GPIO_TIM5_CH3OUT, mode); + break; +# endif +# if defined(GPIO_TIM5_CH4OUT) + case 3: + stm32_tim_gpioconfig(GPIO_TIM5_CH4OUT, mode); + break; +# endif + default: + return -EINVAL; + } + break; +#endif +#ifdef CONFIG_STM32F7_TIM8 + case STM32_TIM8_BASE: + switch (channel) + { +# if defined(GPIO_TIM8_CH1OUT) + case 0: + stm32_tim_gpioconfig(GPIO_TIM8_CH1OUT, mode); break; +# endif +# if defined(GPIO_TIM8_CH2OUT) + case 1: + stm32_tim_gpioconfig(GPIO_TIM8_CH2OUT, mode); break; +# endif +# if defined(GPIO_TIM8_CH3OUT) + case 2: + stm32_tim_gpioconfig(GPIO_TIM8_CH3OUT, mode); break; +# endif +# if defined(GPIO_TIM8_CH4OUT) + case 3: + stm32_tim_gpioconfig(GPIO_TIM8_CH4OUT, mode); break; +# endif + default: + return -EINVAL; + } + break; +#endif +# ifdef CONFIG_STM32F7_TIM9 + case STM32_TIM9_BASE: + switch (channel) + { +# if defined(GPIO_TIM9_CH1OUT) + case 0: + stm32_tim_gpioconfig(GPIO_TIM9_CH1OUT, mode); + break; +# endif +# if defined(GPIO_TIM9_CH2OUT) + case 1: + stm32_tim_gpioconfig(GPIO_TIM9_CH2OUT, mode); + break; +# endif +# if defined(GPIO_TIM9_CH3OUT) + case 2: + stm32_tim_gpioconfig(GPIO_TIM9_CH3OUT, mode); + break; +# endif +# if defined(GPIO_TIM9_CH4OUT) + case 3: + stm32_tim_gpioconfig(GPIO_TIM9_CH4OUT, mode); + break; +# endif + default: + return -EINVAL; + } + break; +#endif +#ifdef CONFIG_STM32F7_TIM10 + case STM32_TIM10_BASE: + switch (channel) + { +# if defined(GPIO_TIM10_CH1OUT) + case 0: + stm32_tim_gpioconfig(GPIO_TIM10_CH1OUT, mode); + break; +# endif +# if defined(GPIO_TIM10_CH2OUT) + case 1: + stm32_tim_gpioconfig(GPIO_TIM10_CH2OUT, mode); + break; +# endif +# if defined(GPIO_TIM10_CH3OUT) + case 2: + stm32_tim_gpioconfig(GPIO_TIM10_CH3OUT, mode); + break; +# endif +# if defined(GPIO_TIM10_CH4OUT) + case 3: + stm32_tim_gpioconfig(GPIO_TIM10_CH4OUT, mode); + break; +# endif + default: + return -EINVAL; + } + break; +#endif +#ifdef CONFIG_STM32F7_TIM11 + case STM32_TIM11_BASE: + switch (channel) + { +# if defined(GPIO_TIM11_CH1OUT) + case 0: + stm32_tim_gpioconfig(GPIO_TIM11_CH1OUT, mode); + break; +# endif +# if defined(GPIO_TIM11_CH2OUT) + case 1: + stm32_tim_gpioconfig(GPIO_TIM11_CH2OUT, mode); + break; +# endif +# if defined(GPIO_TIM11_CH3OUT) + case 2: + stm32_tim_gpioconfig(GPIO_TIM11_CH3OUT, mode); + break; +# endif +# if defined(GPIO_TIM11_CH4OUT) + case 3: + stm32_tim_gpioconfig(GPIO_TIM11_CH4OUT, mode); + break; +# endif + default: + return -EINVAL; + } + break; +#endif +#ifdef CONFIG_STM32F7_TIM12 + case STM32_TIM12_BASE: + switch (channel) + { +# if defined(GPIO_TIM12_CH1OUT) + case 0: + stm32_tim_gpioconfig(GPIO_TIM12_CH1OUT, mode); + break; +# endif +# if defined(GPIO_TIM12_CH2OUT) + case 1: + stm32_tim_gpioconfig(GPIO_TIM12_CH2OUT, mode); + break; +# endif +# if defined(GPIO_TIM12_CH3OUT) + case 2: + stm32_tim_gpioconfig(GPIO_TIM12_CH3OUT, mode); + break; +# endif +# if defined(GPIO_TIM12_CH4OUT) + case 3: + stm32_tim_gpioconfig(GPIO_TIM12_CH4OUT, mode); + break; +# endif + default: + return -EINVAL; + } + break; +#endif +#ifdef CONFIG_STM32F7_TIM13 + case STM32_TIM13_BASE: + switch (channel) + { +# if defined(GPIO_TIM13_CH1OUT) + case 0: + stm32_tim_gpioconfig(GPIO_TIM13_CH1OUT, mode); + break; +# endif +# if defined(GPIO_TIM13_CH2OUT) + case 1: + stm32_tim_gpioconfig(GPIO_TIM13_CH2OUT, mode); + break; +# endif +# if defined(GPIO_TIM13_CH3OUT) + case 2: + stm32_tim_gpioconfig(GPIO_TIM13_CH3OUT, mode); + break; +# endif +# if defined(GPIO_TIM13_CH4OUT) + case 3: + stm32_tim_gpioconfig(GPIO_TIM13_CH4OUT, mode); + break; +# endif + default: + return -EINVAL; + } + break; +#endif +#ifdef CONFIG_STM32F7_TIM14 + case STM32_TIM14_BASE: + switch (channel) + { +# if defined(GPIO_TIM14_CH1OUT) + case 0: + stm32_tim_gpioconfig(GPIO_TIM14_CH1OUT, mode); + break; +# endif +# if defined(GPIO_TIM14_CH2OUT) + case 1: + stm32_tim_gpioconfig(GPIO_TIM14_CH2OUT, mode); + break; +# endif +# if defined(GPIO_TIM14_CH3OUT) + case 2: + stm32_tim_gpioconfig(GPIO_TIM14_CH3OUT, mode); + break; +# endif +# if defined(GPIO_TIM14_CH4OUT) + case 3: + stm32_tim_gpioconfig(GPIO_TIM14_CH4OUT, mode); + break; +# endif + default: + return -EINVAL; + } + break; +#endif + } + return OK; +} + +static int stm32_tim_setcompare(FAR struct stm32_tim_dev_s *dev, uint8_t channel, + uint32_t compare) +{ + DEBUGASSERT(dev != NULL); + + switch (channel) + { + case 1: + stm32_putreg32(dev, STM32_GTIM_CCR1_OFFSET, compare); + break; + case 2: + stm32_putreg32(dev, STM32_GTIM_CCR2_OFFSET, compare); + break; + case 3: + stm32_putreg32(dev, STM32_GTIM_CCR3_OFFSET, compare); + break; + case 4: + stm32_putreg32(dev, STM32_GTIM_CCR4_OFFSET, compare); + break; + default: + return -EINVAL; + } + return OK; +} + +static int stm32_tim_getcapture(FAR struct stm32_tim_dev_s *dev, uint8_t channel) +{ + DEBUGASSERT(dev != NULL); + + switch (channel) + { + case 1: + return stm32_getreg32(dev, STM32_GTIM_CCR1_OFFSET); + case 2: + return stm32_getreg32(dev, STM32_GTIM_CCR2_OFFSET); + case 3: + return stm32_getreg32(dev, STM32_GTIM_CCR3_OFFSET); + case 4: + return stm32_getreg32(dev, STM32_GTIM_CCR4_OFFSET); + } + + return -EINVAL; +} + +/************************************************************************************ + * Advanced Functions + ************************************************************************************/ + +/* TODO: Advanced functions for the STM32_ATIM */ + +/************************************************************************************ + * Device Structures, Instantiation + ************************************************************************************/ + +struct stm32_tim_ops_s stm32_tim_ops = +{ + .setmode = &stm32_tim_setmode, + .setclock = &stm32_tim_setclock, + .setperiod = &stm32_tim_setperiod, + .setchannel = &stm32_tim_setchannel, + .setcompare = &stm32_tim_setcompare, + .getcapture = &stm32_tim_getcapture, + .setisr = &stm32_tim_setisr, + .enableint = &stm32_tim_enableint, + .disableint = &stm32_tim_disableint, + .ackint = &stm32_tim_ackint +}; + +#ifdef CONFIG_STM32F7_TIM1 +struct stm32_tim_priv_s stm32_tim1_priv = +{ + .ops = &stm32_tim_ops, + .mode = STM32_TIM_MODE_UNUSED, + .base = STM32_TIM1_BASE, +}; +#endif +#ifdef CONFIG_STM32F7_TIM2 +struct stm32_tim_priv_s stm32_tim2_priv = +{ + .ops = &stm32_tim_ops, + .mode = STM32_TIM_MODE_UNUSED, + .base = STM32_TIM2_BASE, +}; +#endif + +#ifdef CONFIG_STM32F7_TIM3 +struct stm32_tim_priv_s stm32_tim3_priv = +{ + .ops = &stm32_tim_ops, + .mode = STM32_TIM_MODE_UNUSED, + .base = STM32_TIM3_BASE, +}; +#endif + +#ifdef CONFIG_STM32F7_TIM4 +struct stm32_tim_priv_s stm32_tim4_priv = +{ + .ops = &stm32_tim_ops, + .mode = STM32_TIM_MODE_UNUSED, + .base = STM32_TIM4_BASE, +}; +#endif + +#ifdef CONFIG_STM32F7_TIM5 +struct stm32_tim_priv_s stm32_tim5_priv = +{ + .ops = &stm32_tim_ops, + .mode = STM32_TIM_MODE_UNUSED, + .base = STM32_TIM5_BASE, +}; +#endif + +#ifdef CONFIG_STM32F7_TIM6 +struct stm32_tim_priv_s stm32_tim6_priv = +{ + .ops = &stm32_tim_ops, + .mode = STM32_TIM_MODE_UNUSED, + .base = STM32_TIM6_BASE, +}; +#endif + +#ifdef CONFIG_STM32F7_TIM7 +struct stm32_tim_priv_s stm32_tim7_priv = +{ + .ops = &stm32_tim_ops, + .mode = STM32_TIM_MODE_UNUSED, + .base = STM32_TIM7_BASE, +}; +#endif + +#ifdef CONFIG_STM32F7_TIM8 +struct stm32_tim_priv_s stm32_tim8_priv = +{ + .ops = &stm32_tim_ops, + .mode = STM32_TIM_MODE_UNUSED, + .base = STM32_TIM8_BASE, +}; +#endif + +#ifdef CONFIG_STM32F7_TIM9 +struct stm32_tim_priv_s stm32_tim9_priv = +{ + .ops = &stm32_tim_ops, + .mode = STM32_TIM_MODE_UNUSED, + .base = STM32_TIM9_BASE, +}; +#endif + +#ifdef CONFIG_STM32F7_TIM10 +struct stm32_tim_priv_s stm32_tim10_priv = +{ + .ops = &stm32_tim_ops, + .mode = STM32_TIM_MODE_UNUSED, + .base = STM32_TIM10_BASE, +}; +#endif + +#ifdef CONFIG_STM32F7_TIM11 +struct stm32_tim_priv_s stm32_tim11_priv = +{ + .ops = &stm32_tim_ops, + .mode = STM32_TIM_MODE_UNUSED, + .base = STM32_TIM11_BASE, +}; +#endif + +#ifdef CONFIG_STM32F7_TIM12 +struct stm32_tim_priv_s stm32_tim12_priv = +{ + .ops = &stm32_tim_ops, + .mode = STM32_TIM_MODE_UNUSED, + .base = STM32_TIM12_BASE, +}; +#endif + +#ifdef CONFIG_STM32F7_TIM13 +struct stm32_tim_priv_s stm32_tim13_priv = +{ + .ops = &stm32_tim_ops, + .mode = STM32_TIM_MODE_UNUSED, + .base = STM32_TIM13_BASE, +}; +#endif + +#ifdef CONFIG_STM32F7_TIM14 +struct stm32_tim_priv_s stm32_tim14_priv = +{ + .ops = &stm32_tim_ops, + .mode = STM32_TIM_MODE_UNUSED, + .base = STM32_TIM14_BASE, +}; +#endif + + +/************************************************************************************ + * Public Function - Initialization + ************************************************************************************/ + +FAR struct stm32_tim_dev_s *stm32_tim_init(int timer) +{ + struct stm32_tim_dev_s *dev = NULL; + + /* Get structure and enable power */ + + switch (timer) + { +#ifdef CONFIG_STM32F7_TIM1 + case 1: + dev = (struct stm32_tim_dev_s *)&stm32_tim1_priv; + modifyreg32(STM32_RCC_APB2ENR, 0, RCC_APB2ENR_TIM1EN); + break; +#endif +#ifdef CONFIG_STM32F7_TIM2 + case 2: + dev = (struct stm32_tim_dev_s *)&stm32_tim2_priv; + modifyreg32(STM32_RCC_APB1ENR, 0, RCC_APB1ENR_TIM2EN); + break; +#endif +#ifdef CONFIG_STM32F7_TIM3 + case 3: + dev = (struct stm32_tim_dev_s *)&stm32_tim3_priv; + modifyreg32(STM32_RCC_APB1ENR, 0, RCC_APB1ENR_TIM3EN); + break; +#endif +#ifdef CONFIG_STM32F7_TIM4 + case 4: + dev = (struct stm32_tim_dev_s *)&stm32_tim4_priv; + modifyreg32(STM32_RCC_APB1ENR, 0, RCC_APB1ENR_TIM4EN); + break; +#endif +#ifdef CONFIG_STM32F7_TIM5 + case 5: + dev = (struct stm32_tim_dev_s *)&stm32_tim5_priv; + modifyreg32(STM32_RCC_APB1ENR, 0, RCC_APB1ENR_TIM5EN); + break; +#endif +#ifdef CONFIG_STM32F7_TIM6 + case 6: + dev = (struct stm32_tim_dev_s *)&stm32_tim6_priv; + modifyreg32(STM32_RCC_APB1ENR, 0, RCC_APB1ENR_TIM6EN); + break; +#endif +#ifdef CONFIG_STM32F7_TIM7 + case 7: + dev = (struct stm32_tim_dev_s *)&stm32_tim7_priv; + modifyreg32(STM32_RCC_APB1ENR, 0, RCC_APB1ENR_TIM7EN); + break; +#endif +#ifdef CONFIG_STM32F7_TIM8 + case 8: + dev = (struct stm32_tim_dev_s *)&stm32_tim8_priv; + modifyreg32(STM32_RCC_APB2ENR, 0, RCC_APB2ENR_TIM8EN); + break; +#endif +#ifdef CONFIG_STM32F7_TIM9 + case 9: + dev = (struct stm32_tim_dev_s *)&stm32_tim9_priv; + modifyreg32(STM32_RCC_APB2ENR, 0, RCC_APB2ENR_TIM9EN); + break; +#endif +#ifdef CONFIG_STM32F7_TIM10 + case 10: + dev = (struct stm32_tim_dev_s *)&stm32_tim10_priv; + modifyreg32(STM32_RCC_APB2ENR, 0, RCC_APB2ENR_TIM10EN); + break; +#endif +#ifdef CONFIG_STM32F7_TIM11 + case 11: + dev = (struct stm32_tim_dev_s *)&stm32_tim11_priv; + modifyreg32(STM32_RCC_APB2ENR, 0, RCC_APB2ENR_TIM11EN); + break; +#endif +#ifdef CONFIG_STM32F7_TIM12 + case 12: + dev = (struct stm32_tim_dev_s *)&stm32_tim12_priv; + modifyreg32(STM32_RCC_APB1ENR, 0, RCC_APB1ENR_TIM12EN); + break; +#endif +#ifdef CONFIG_STM32F7_TIM13 + case 13: + dev = (struct stm32_tim_dev_s *)&stm32_tim13_priv; + modifyreg32(STM32_RCC_APB1ENR, 0, RCC_APB1ENR_TIM13EN); + break; +#endif +#ifdef CONFIG_STM32F7_TIM14 + case 14: + dev = (struct stm32_tim_dev_s *)&stm32_tim14_priv; + modifyreg32(STM32_RCC_APB1ENR, 0, RCC_APB1ENR_TIM14EN); + break; +#endif + default: + return NULL; + } + + /* Is device already allocated */ + + if (((struct stm32_tim_priv_s *)dev)->mode != STM32_TIM_MODE_UNUSED) + { + return NULL; + } + + stm32_tim_reset(dev); + + return dev; +} + +/* TODO: Detach interrupts, and close down all TIM Channels */ + +int stm32_tim_deinit(FAR struct stm32_tim_dev_s * dev) +{ + DEBUGASSERT(dev != NULL); + + /* Disable power */ + + switch (((struct stm32_tim_priv_s *)dev)->base) + { +#ifdef CONFIG_STM32F7_TIM1 + case STM32_TIM1_BASE: + modifyreg32(STM32_RCC_APB2ENR, RCC_APB2ENR_TIM1EN, 0); + break; +#endif +#ifdef CONFIG_STM32F7_TIM2 + case STM32_TIM2_BASE: + modifyreg32(STM32_RCC_APB1ENR, RCC_APB1ENR_TIM2EN, 0); + break; +#endif +#ifdef CONFIG_STM32F7_TIM3 + case STM32_TIM3_BASE: + modifyreg32(STM32_RCC_APB1ENR, RCC_APB1ENR_TIM3EN, 0); + break; +#endif +#ifdef CONFIG_STM32F7_TIM4 + case STM32_TIM4_BASE: + modifyreg32(STM32_RCC_APB1ENR, RCC_APB1ENR_TIM4EN, 0); + break; +#endif +#ifdef CONFIG_STM32F7_TIM5 + case STM32_TIM5_BASE: + modifyreg32(STM32_RCC_APB1ENR, RCC_APB1ENR_TIM5EN, 0); + break; +#endif +#ifdef CONFIG_STM32F7_TIM6 + case STM32_TIM6_BASE: + modifyreg32(STM32_RCC_APB1ENR, RCC_APB1ENR_TIM6EN, 0); + break; +#endif +#ifdef CONFIG_STM32F7_TIM7 + case STM32_TIM7_BASE: + modifyreg32(STM32_RCC_APB1ENR, RCC_APB1ENR_TIM7EN, 0); + break; +#endif +#ifdef CONFIG_STM32F7_TIM8 + case STM32_TIM8_BASE: + modifyreg32(STM32_RCC_APB2ENR, RCC_APB2ENR_TIM8EN, 0); + break; +#endif +#ifdef CONFIG_STM32F7_TIM9 + case STM32_TIM9_BASE: + modifyreg32(STM32_RCC_APB2ENR, RCC_APB2ENR_TIM9EN, 0); + break; +#endif +#ifdef CONFIG_STM32F7_TIM10 + case STM32_TIM10_BASE: + modifyreg32(STM32_RCC_APB2ENR, RCC_APB2ENR_TIM10EN, 0); + break; +#endif +#ifdef CONFIG_STM32F7_TIM11 + case STM32_TIM11_BASE: + modifyreg32(STM32_RCC_APB2ENR, RCC_APB2ENR_TIM11EN, 0); + break; +#endif +#ifdef CONFIG_STM32F7_TIM12 + case STM32_TIM12_BASE: + modifyreg32(STM32_RCC_APB1ENR, RCC_APB1ENR_TIM12EN, 0); + break; +#endif +#ifdef CONFIG_STM32F7_TIM13 + case STM32_TIM13_BASE: + modifyreg32(STM32_RCC_APB1ENR, RCC_APB1ENR_TIM13EN, 0); + break; +#endif +#ifdef CONFIG_STM32F7_TIM14 + case STM32_TIM14_BASE: + modifyreg32(STM32_RCC_APB1ENR, RCC_APB1ENR_TIM14EN, 0); + break; +#endif + default: + return -EINVAL; + } + + /* Mark it as free */ + + ((struct stm32_tim_priv_s *)dev)->mode = STM32_TIM_MODE_UNUSED; + + return OK; +} + +#endif /* defined(CONFIG_STM32F7_TIM1 || ... || TIM8) */ diff --git a/arch/arm/src/stm32f7/stm32_tim.h b/arch/arm/src/stm32f7/stm32_tim.h new file mode 100644 index 0000000000000000000000000000000000000000..c4561288a91985ae7608af1441020ebc3c97a628 --- /dev/null +++ b/arch/arm/src/stm32f7/stm32_tim.h @@ -0,0 +1,215 @@ +/************************************************************************************ + * arch/arm/src/stm32f7/stm32_tim.h + * + * Copyright (C) 2011 Uros Platise. All rights reserved. + * Author: Uros Platise + * + * With modifications and updates by: + * + * Copyright (C) 2011-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. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32F7_STM32_TIM_H +#define __ARCH_ARM_SRC_STM32F7_STM32_TIM_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "chip.h" +#include "chip/stm32_tim.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ +/* Helpers **************************************************************************/ + +#define STM32_TIM_SETMODE(d,mode) ((d)->ops->setmode(d,mode)) +#define STM32_TIM_SETCLOCK(d,freq) ((d)->ops->setclock(d,freq)) +#define STM32_TIM_SETPERIOD(d,period) ((d)->ops->setperiod(d,period)) +#define STM32_TIM_SETCHANNEL(d,ch,mode) ((d)->ops->setchannel(d,ch,mode)) +#define STM32_TIM_SETCOMPARE(d,ch,comp) ((d)->ops->setcompare(d,ch,comp)) +#define STM32_TIM_GETCAPTURE(d,ch) ((d)->ops->getcapture(d,ch)) +#define STM32_TIM_SETISR(d,hnd,s) ((d)->ops->setisr(d,hnd,s)) +#define STM32_TIM_ENABLEINT(d,s) ((d)->ops->enableint(d,s)) +#define STM32_TIM_DISABLEINT(d,s) ((d)->ops->disableint(d,s)) +#define STM32_TIM_ACKINT(d,s) ((d)->ops->ackint(d,s)) + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +#ifndef __ASSEMBLY__ + +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/* TIM Device Structure */ + +struct stm32_tim_dev_s +{ + struct stm32_tim_ops_s *ops; +}; + +/* TIM Modes of Operation */ + +typedef enum +{ + STM32_TIM_MODE_UNUSED = -1, + + /* One of the following */ + + STM32_TIM_MODE_MASK = 0x0310, + STM32_TIM_MODE_DISABLED = 0x0000, + STM32_TIM_MODE_UP = 0x0100, + STM32_TIM_MODE_DOWN = 0x0110, + STM32_TIM_MODE_UPDOWN = 0x0200, + STM32_TIM_MODE_PULSE = 0x0300, + + /* One of the following */ + + STM32_TIM_MODE_CK_INT = 0x0000, +//STM32_TIM_MODE_CK_INT_TRIG = 0x0400, +//STM32_TIM_MODE_CK_EXT = 0x0800, +//STM32_TIM_MODE_CK_EXT_TRIG = 0x0C00, + + /* Clock sources, OR'ed with CK_EXT */ + +//STM32_TIM_MODE_CK_CHINVALID = 0x0000, +//STM32_TIM_MODE_CK_CH1 = 0x0001, +//STM32_TIM_MODE_CK_CH2 = 0x0002, +//STM32_TIM_MODE_CK_CH3 = 0x0003, +//STM32_TIM_MODE_CK_CH4 = 0x0004 + + /* Todo: external trigger block */ + +} stm32_tim_mode_t; + +/* TIM Channel Modes */ + +typedef enum +{ + STM32_TIM_CH_DISABLED = 0x00, + + /* Common configuration */ + + STM32_TIM_CH_POLARITY_POS = 0x00, + STM32_TIM_CH_POLARITY_NEG = 0x01, + + /* MODES: */ + + STM32_TIM_CH_MODE_MASK = 0x06, + + /* Output Compare Modes */ + + STM32_TIM_CH_OUTPWM = 0x04, /** Enable standard PWM mode, active high when counter < compare */ +//STM32_TIM_CH_OUTCOMPARE = 0x06, + + // TODO other modes ... as PWM capture, ENCODER and Hall Sensor +//STM32_TIM_CH_INCAPTURE = 0x10, +//STM32_TIM_CH_INPWM = 0x20 +//STM32_TIM_CH_DRIVE_OC -- open collector mode + +} stm32_tim_channel_t; + +/* TIM Operations */ + +struct stm32_tim_ops_s +{ + /* Basic Timers */ + + int (*setmode)(FAR struct stm32_tim_dev_s *dev, stm32_tim_mode_t mode); + int (*setclock)(FAR struct stm32_tim_dev_s *dev, uint32_t freq); + void (*setperiod)(FAR struct stm32_tim_dev_s *dev, uint32_t period); + + /* General and Advanced Timers Adds */ + + int (*setchannel)(FAR struct stm32_tim_dev_s *dev, uint8_t channel, stm32_tim_channel_t mode); + int (*setcompare)(FAR struct stm32_tim_dev_s *dev, uint8_t channel, uint32_t compare); + int (*getcapture)(FAR struct stm32_tim_dev_s *dev, uint8_t channel); + + /* Timer interrupts */ + + int (*setisr)(FAR struct stm32_tim_dev_s *dev, int (*handler)(int irq, void *context), int source); + void (*enableint)(FAR struct stm32_tim_dev_s *dev, int source); + void (*disableint)(FAR struct stm32_tim_dev_s *dev, int source); + void (*ackint)(FAR struct stm32_tim_dev_s *dev, int source); +}; + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/* Power-up timer and get its structure */ + +FAR struct stm32_tim_dev_s *stm32_tim_init(int timer); + +/* Power-down timer, mark it as unused */ + +int stm32_tim_deinit(FAR struct stm32_tim_dev_s * dev); + +/**************************************************************************** + * Name: stm32_timer_initialize + * + * Description: + * Bind the configuration timer to a timer lower half instance and + * register the timer drivers at 'devpath' + * + * Input Parameters: + * devpath - The full path to the timer device. This should be of the form /dev/timer0 + * timer - the timer number. + * + * Returned Values: + * Zero (OK) is returned on success; A negated errno value is returned + * to indicate the nature of any failure. + * + ****************************************************************************/ + +#ifdef CONFIG_TIMER +int stm32_timer_initialize(FAR const char *devpath, int timer); +#endif + +#undef EXTERN +#if defined(__cplusplus) +} +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* __ARCH_ARM_SRC_STM32F7_STM32_TIM_H */ diff --git a/arch/arm/src/stm32f7/stm32_uart.h b/arch/arm/src/stm32f7/stm32_uart.h index 9b1bce0b4e6d8761eb3c493cc4c1ebc9928642e8..d250eb77612c200ce9d29042a502eeb5634c6725 100644 --- a/arch/arm/src/stm32f7/stm32_uart.h +++ b/arch/arm/src/stm32f7/stm32_uart.h @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef __ARCH_ARM_STC_STM32F7_STM32_UART_H -#define __ARCH_ARM_STC_STM32F7_STM32_UART_H +#ifndef __ARCH_ARM_SRC_STM32F7_STM32_UART_H +#define __ARCH_ARM_SRC_STM32F7_STM32_UART_H /************************************************************************************ * Included Files @@ -342,4 +342,4 @@ void stm32_serial_dma_poll(void); #endif #endif /* __ASSEMBLY__ */ -#endif /* __ARCH_ARM_STC_STM32F7_STM32_UART_H */ +#endif /* __ARCH_ARM_SRC_STM32F7_STM32_UART_H */ diff --git a/arch/arm/src/stm32f7/stm32f74xx75xx_rcc.c b/arch/arm/src/stm32f7/stm32f74xx75xx_rcc.c index 1db43d255132f7e258e8c20db5607bc91235c175..7ae301548a091df5de9e6023d8d2820eea93c601 100644 --- a/arch/arm/src/stm32f7/stm32f74xx75xx_rcc.c +++ b/arch/arm/src/stm32f7/stm32f74xx75xx_rcc.c @@ -1,8 +1,9 @@ /**************************************************************************** * arch/arm/src/stm32f7/stm32f74xxx75xx_rcc.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -827,18 +828,38 @@ static void stm32_stdclockconfig(void) { } -#ifdef CONFIG_STM32F7_LTDC - /* Configure PLLSAI */ +#if defined(CONFIG_STM32F7_LTDC) || defined(CONFIG_STM32F7_PLLSAI) + + /* Configure PLLSAI */ regval = getreg32(STM32_RCC_PLLSAICFGR); + regval &= ~( RCC_PLLSAICFGR_PLLSAIN_MASK + | RCC_PLLSAICFGR_PLLSAIP_MASK + | RCC_PLLSAICFGR_PLLSAIQ_MASK + | RCC_PLLSAICFGR_PLLSAIR_MASK); regval |= (STM32_RCC_PLLSAICFGR_PLLSAIN - | STM32_RCC_PLLSAICFGR_PLLSAIR - | STM32_RCC_PLLSAICFGR_PLLSAIQ); + | STM32_RCC_PLLSAICFGR_PLLSAIP + | STM32_RCC_PLLSAICFGR_PLLSAIQ + | STM32_RCC_PLLSAICFGR_PLLSAIR); putreg32(regval, STM32_RCC_PLLSAICFGR); - regval = getreg32(STM32_RCC_DCKCFGR); - regval |= STM32_RCC_DCKCFGR_PLLSAIDIVR; - putreg32(regval, STM32_RCC_DCKCFGR); + regval = getreg32(STM32_RCC_DCKCFGR1); + regval &= ~(RCC_DCKCFGR1_PLLI2SDIVQ_MASK + | RCC_DCKCFGR1_PLLSAIDIVQ_MASK + | RCC_DCKCFGR1_PLLSAIDIVR_MASK + | RCC_DCKCFGR1_SAI1SEL_MASK + | RCC_DCKCFGR1_SAI2SEL_MASK + | RCC_DCKCFGR1_TIMPRESEL); + + regval |= (STM32_RCC_DCKCFGR1_PLLI2SDIVQ + | STM32_RCC_DCKCFGR1_PLLSAIDIVQ + | STM32_RCC_DCKCFGR1_PLLSAIDIVR + | STM32_RCC_DCKCFGR1_SAI1SRC + | STM32_RCC_DCKCFGR1_SAI2SRC + | STM32_RCC_DCKCFGR1_TIMPRESRC); + + putreg32(regval, STM32_RCC_DCKCFGR1); + /* Enable PLLSAI */ @@ -852,6 +873,68 @@ static void stm32_stdclockconfig(void) { } #endif +#if defined(CONFIG_STM32F7_LTDC) || defined(CONFIG_STM32F7_PLLI2S) + + /* Configure PLLI2S */ + + regval = getreg32(STM32_RCC_PLLI2SCFGR); + regval &= ~( RCC_PLLI2SCFGR_PLLI2SN_MASK + | RCC_PLLI2SCFGR_PLLI2SP_MASK + | RCC_PLLI2SCFGR_PLLI2SQ_MASK + | RCC_PLLI2SCFGR_PLLI2SR_MASK); + regval |= (STM32_RCC_PLLSAICFGR_PLLSAIN + | STM32_RCC_PLLSAICFGR_PLLSAIP + | STM32_RCC_PLLSAICFGR_PLLSAIQ + | STM32_RCC_PLLSAICFGR_PLLSAIR); + putreg32(regval, STM32_RCC_PLLI2SCFGR); + + regval = getreg32(STM32_RCC_DCKCFGR2); + regval &= ~( RCC_DCKCFGR2_USART1SEL_MASK + | RCC_DCKCFGR2_USART2SEL_MASK + | RCC_DCKCFGR2_UART4SEL_MASK + | RCC_DCKCFGR2_UART5SEL_MASK + | RCC_DCKCFGR2_USART6SEL_MASK + | RCC_DCKCFGR2_UART7SEL_MASK + | RCC_DCKCFGR2_UART8SEL_MASK + | RCC_DCKCFGR2_I2C1SEL_MASK + | RCC_DCKCFGR2_I2C2SEL_MASK + | RCC_DCKCFGR2_I2C3SEL_MASK + | RCC_DCKCFGR2_I2C4SEL_MASK + | RCC_DCKCFGR2_LPTIM1SEL_MASK + | RCC_DCKCFGR2_CECSEL_MASK + | RCC_DCKCFGR2_CK48MSEL_MASK + | RCC_DCKCFGR2_SDMMCSEL_MASK); + + regval |= ( STM32_RCC_DCKCFGR2_USART1SRC + | STM32_RCC_DCKCFGR2_USART2SRC + | STM32_RCC_DCKCFGR2_UART4SRC + | STM32_RCC_DCKCFGR2_UART5SRC + | STM32_RCC_DCKCFGR2_USART6SRC + | STM32_RCC_DCKCFGR2_UART7SRC + | STM32_RCC_DCKCFGR2_UART8SRC + | STM32_RCC_DCKCFGR2_I2C1SRC + | STM32_RCC_DCKCFGR2_I2C2SRC + | STM32_RCC_DCKCFGR2_I2C3SRC + | STM32_RCC_DCKCFGR2_I2C4SRC + | STM32_RCC_DCKCFGR2_LPTIM1SRC + | STM32_RCC_DCKCFGR2_CECSRC + | STM32_RCC_DCKCFGR2_CK48MSRC + | STM32_RCC_DCKCFGR2_SDMMCSRC); + + putreg32(regval, STM32_RCC_DCKCFGR2); + + /* Enable PLLI2S */ + + regval = getreg32(STM32_RCC_CR); + regval |= RCC_CR_PLLI2SON; + putreg32(regval, STM32_RCC_CR); + + /* Wait until the PLLI2S is ready */ + + while ((getreg32(STM32_RCC_CR) & RCC_CR_PLLI2SRDY) == 0) + { + } +#endif #if defined(CONFIG_STM32F7_IWDG) || defined(CONFIG_RTC_LSICLOCK) /* Low speed internal clock source LSI */ diff --git a/arch/arm/src/stm32f7/stm32f76xx77xx_rcc.c b/arch/arm/src/stm32f7/stm32f76xx77xx_rcc.c new file mode 100644 index 0000000000000000000000000000000000000000..d24705d5fd6ebe045e3a9198fb34a0856f888ba6 --- /dev/null +++ b/arch/arm/src/stm32f7/stm32f76xx77xx_rcc.c @@ -0,0 +1,976 @@ +/**************************************************************************** + * arch/arm/src/stm32f7/stm32f76xxx77xx_rcc.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: 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 "stm32_pwr.h" + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Allow up to 100 milliseconds for the high speed clock to become ready. + * that is a very long delay, but if the clock does not become ready we are + * hosed anyway. Normally this is very fast, but I have seen at least one + * board that required this long, long timeout for the HSE to be ready. + */ + +#define HSERDY_TIMEOUT (100 * CONFIG_BOARD_LOOPSPERMSEC) + +/* Same for HSI */ + +#define HSIRDY_TIMEOUT HSERDY_TIMEOUT + +/* HSE divisor to yield ~1MHz RTC clock */ + +#define HSE_DIVISOR (STM32_HSE_FREQUENCY + 500000) / 1000000 + +/* FLASH wait states */ + +#if !defined(BOARD_FLASH_WAITSTATES) +# error BOARD_FLASH_WAITSTATES not defined +#elif BOARD_FLASH_WAITSTATES < 0 || BOARD_FLASH_WAITSTATES > 15 +# error BOARD_FLASH_WAITSTATES is out of range +#endif + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: rcc_reset + * + * Description: + * Reset the RCC clock configuration to the default reset state + * + ****************************************************************************/ + +static inline void rcc_reset(void) +{ + uint32_t regval; + + /* Enable the Internal High Speed clock (HSI) */ + + regval = getreg32(STM32_RCC_CR); + regval |= RCC_CR_HSION; + putreg32(regval, STM32_RCC_CR); + + /* Reset CFGR register */ + + putreg32(0x00000000, STM32_RCC_CFGR); + + /* Reset HSION, HSEON, CSSON and PLLON bits */ + + regval = getreg32(STM32_RCC_CR); + regval &= ~(RCC_CR_HSION | RCC_CR_HSEON | RCC_CR_CSSON | RCC_CR_PLLON); + putreg32(regval, STM32_RCC_CR); + + /* Reset PLLCFGR register to reset default */ + + putreg32(RCC_PLLCFG_RESET, STM32_RCC_PLLCFG); + + /* Reset HSEBYP bit */ + + regval = getreg32(STM32_RCC_CR); + regval &= ~RCC_CR_HSEBYP; + putreg32(regval, STM32_RCC_CR); + + /* Disable all interrupts */ + + putreg32(0x00000000, STM32_RCC_CIR); +} + +/**************************************************************************** + * Name: rcc_enableahb1 + * + * Description: + * Enable selected AHB1 peripherals + * + ****************************************************************************/ + +static inline void rcc_enableahb1(void) +{ + uint32_t regval; + + /* Set the appropriate bits in the AHB1ENR register to enabled the + * selected AHB1 peripherals. + */ + + regval = getreg32(STM32_RCC_AHB1ENR); + + /* Enable GPIOA, GPIOB, .... GPIOI */ + +#if STM32F7_NGPIO > 0 + regval |= (RCC_AHB1ENR_GPIOAEN +#if STM32F7_NGPIO > 1 + | RCC_AHB1ENR_GPIOBEN +#endif +#if STM32F7_NGPIO > 2 + | RCC_AHB1ENR_GPIOCEN +#endif +#if STM32F7_NGPIO > 3 + | RCC_AHB1ENR_GPIODEN +#endif +#if STM32F7_NGPIO > 4 + | RCC_AHB1ENR_GPIOEEN +#endif +#if STM32F7_NGPIO > 5 + | RCC_AHB1ENR_GPIOFEN +#endif +#if STM32F7_NGPIO > 6 + | RCC_AHB1ENR_GPIOGEN +#endif +#if STM32F7_NGPIO > 7 + | RCC_AHB1ENR_GPIOHEN +#endif +#if STM32F7_NGPIO > 8 + | RCC_AHB1ENR_GPIOIEN +#endif +#if STM32F7_NGPIO > 9 + | RCC_AHB1ENR_GPIOJEN +#endif +#if STM32F7_NGPIO > 10 + | RCC_AHB1ENR_GPIOKEN +#endif + ); +#endif + +#ifdef CONFIG_STM32F7_CRC + /* CRC clock enable */ + + regval |= RCC_AHB1ENR_CRCEN; +#endif + +#ifdef CONFIG_STM32F7_BKPSRAM + /* Backup SRAM clock enable */ + + regval |= RCC_AHB1ENR_BKPSRAMEN; +#endif + +#ifdef CONFIG_ARMV7M_DTCM + /* DTCM data RAM clock enable */ + + regval |= RCC_AHB1ENR_DTCMRAMEN; +#endif + +#ifdef CONFIG_STM32F7_DMA1 + /* DMA 1 clock enable */ + + regval |= RCC_AHB1ENR_DMA1EN; +#endif + +#ifdef CONFIG_STM32F7_DMA2 + /* DMA 2 clock enable */ + + regval |= RCC_AHB1ENR_DMA2EN; +#endif + +#ifdef CONFIG_STM32F7_DMA2D + /* DMA2D clock */ + + regval |= RCC_AHB1ENR_DMA2DEN; +#endif + +#ifdef CONFIG_STM32F7_ETHMAC + /* Ethernet MAC clocking */ + + regval |= (RCC_AHB1ENR_ETHMACEN | RCC_AHB1ENR_ETHMACTXEN | \ + RCC_AHB1ENR_ETHMACRXEN); + +#ifdef CONFIG_STM32F7_ETH_PTP + /* Precision Time Protocol (PTP) */ + + regval |= RCC_AHB1ENR_ETHMACPTPEN; + +#endif +#endif + +#ifdef CONFIG_STM32F7_OTGHS + /* USB OTG HS */ + + regval |= RCC_AHB1ENR_OTGHSEN; + +#endif /* CONFIG_STM32F7_OTGHS */ + + putreg32(regval, STM32_RCC_AHB1ENR); /* Enable peripherals */ +} + +/**************************************************************************** + * Name: rcc_enableahb2 + * + * Description: + * Enable selected AHB2 peripherals + * + ****************************************************************************/ + +static inline void rcc_enableahb2(void) +{ + uint32_t regval; + + /* Set the appropriate bits in the AHB2ENR register to enabled the + * selected AHB2 peripherals. + */ + + regval = getreg32(STM32_RCC_AHB2ENR); + +#ifdef CONFIG_STM32F7_DCMI + /* Camera interface enable */ + + regval |= RCC_AHB2ENR_DCMIEN; +#endif + +#ifdef CONFIG_STM32F7_CRYP + /* Cryptographic modules clock enable */ + + regval |= RCC_AHB2ENR_CRYPEN; +#endif + +#ifdef CONFIG_STM32F7_HASH + /* Hash modules clock enable */ + + regval |= RCC_AHB2ENR_HASHEN; +#endif + +#ifdef CONFIG_STM32F7_RNG + /* Random number generator clock enable */ + + regval |= RCC_AHB2ENR_RNGEN; +#endif + +#ifdef CONFIG_STM32F7_OTGFS + /* USB OTG FS clock enable */ + + regval |= RCC_AHB2ENR_OTGFSEN; +#endif + + putreg32(regval, STM32_RCC_AHB2ENR); /* Enable peripherals */ +} + +/**************************************************************************** + * Name: rcc_enableahb3 + * + * Description: + * Enable selected AHB3 peripherals + * + ****************************************************************************/ + +static inline void rcc_enableahb3(void) +{ + uint32_t regval; + + /* Set the appropriate bits in the AHB3ENR register to enabled the + * selected AHB3 peripherals. + */ + + regval = getreg32(STM32_RCC_AHB3ENR); + +#ifdef CONFIG_STM32F7_FSMC + /* Flexible static memory controller module clock enable */ + + regval |= RCC_AHB3ENR_FSMCEN; +#endif + +#ifdef CONFIG_STM32F7_QUADSPI + /* FQuad SPI memory controller clock enable */ + + regval |= RCC_AHB3ENR_QSPIEN; +#endif + + putreg32(regval, STM32_RCC_AHB3ENR); /* Enable peripherals */ +} + +/**************************************************************************** + * Name: rcc_enableapb1 + * + * Description: + * Enable selected APB1 peripherals + * + ****************************************************************************/ + +static inline void rcc_enableapb1(void) +{ + uint32_t regval; + + /* Set the appropriate bits in the APB1ENR register to enabled the + * selected APB1 peripherals. + */ + + regval = getreg32(STM32_RCC_APB1ENR); + +#ifdef CONFIG_STM32F7_TIM2 + /* TIM2 clock enable */ + + regval |= RCC_APB1ENR_TIM2EN; +#endif + +#ifdef CONFIG_STM32F7_TIM3 + /* TIM3 clock enable */ + + regval |= RCC_APB1ENR_TIM3EN; +#endif + +#ifdef CONFIG_STM32F7_TIM4 + /* TIM4 clock enable */ + + regval |= RCC_APB1ENR_TIM4EN; +#endif + +#ifdef CONFIG_STM32F7_TIM5 + /* TIM5 clock enable */ + + regval |= RCC_APB1ENR_TIM5EN; +#endif + +#ifdef CONFIG_STM32F7_TIM6 + /* TIM6 clock enable */ + + regval |= RCC_APB1ENR_TIM6EN; +#endif + +#ifdef CONFIG_STM32F7_TIM7 + /* TIM7 clock enable */ + + regval |= RCC_APB1ENR_TIM7EN; +#endif + +#ifdef CONFIG_STM32F7_TIM12 + /* TIM12 clock enable */ + + regval |= RCC_APB1ENR_TIM12EN; +#endif + +#ifdef CONFIG_STM32F7_TIM13 + /* TIM13 clock enable */ + + regval |= RCC_APB1ENR_TIM13EN; +#endif + +#ifdef CONFIG_STM32F7_TIM14 + /* TIM14 clock enable */ + + regval |= RCC_APB1ENR_TIM14EN; +#endif + +#ifdef CONFIG_STM32F7_LPTIM1 + /* Low-power timer 1 clock enable */ + + regval |= RCC_APB1ENR_LPTIM1EN; +#endif + +#ifdef CONFIG_STM32F7_WWDG + /* Window watchdog clock enable */ + + regval |= RCC_APB1ENR_WWDGEN; +#endif + +#ifdef CONFIG_STM32F7_SPI2 + /* SPI2 clock enable */ + + regval |= RCC_APB1ENR_SPI2EN; +#endif + +#ifdef CONFIG_STM32F7_SPI3 + /* SPI3 clock enable */ + + regval |= RCC_APB1ENR_SPI3EN; +#endif + +#ifdef CONFIG_STM32F7_SPDIFRX + /* SPDIFRX clock enable */ + + regval |= RCC_APB1ENR_SPDIFRXEN; +#endif + +#ifdef CONFIG_STM32F7_USART2 + /* USART 2 clock enable */ + + regval |= RCC_APB1ENR_USART2EN; +#endif + +#ifdef CONFIG_STM32F7_USART3 + /* USART3 clock enable */ + + regval |= RCC_APB1ENR_USART3EN; +#endif + +#ifdef CONFIG_STM32F7_UART4 + /* UART4 clock enable */ + + regval |= RCC_APB1ENR_UART4EN; +#endif + +#ifdef CONFIG_STM32F7_UART5 + /* UART5 clock enable */ + + regval |= RCC_APB1ENR_UART5EN; +#endif + +#ifdef CONFIG_STM32F7_I2C1 + /* I2C1 clock enable */ + + regval |= RCC_APB1ENR_I2C1EN; +#endif + +#ifdef CONFIG_STM32F7_I2C2 + /* I2C2 clock enable */ + + regval |= RCC_APB1ENR_I2C2EN; +#endif + +#ifdef CONFIG_STM32F7_I2C3 + /* I2C3 clock enable */ + + regval |= RCC_APB1ENR_I2C3EN; +#endif + +#ifdef CONFIG_STM32F7_I2C4 + /* I2C4 clock enable */ + + regval |= RCC_APB1ENR_I2C4EN; +#endif + +#ifdef CONFIG_STM32F7_CAN1 + /* CAN 1 clock enable */ + + regval |= RCC_APB1ENR_CAN1EN; +#endif + +#ifdef CONFIG_STM32F7_CAN2 + /* CAN2 clock enable. NOTE: CAN2 needs CAN1 clock as well. */ + + regval |= (RCC_APB1ENR_CAN1EN | RCC_APB1ENR_CAN2EN); +#endif + +#ifdef CONFIG_STM32F7_CEC + /* CEC clock enable. */ + + regval |= RCC_APB1ENR_CECEN; +#endif + + /* Power interface clock enable. The PWR block is always enabled so that + * we can set the internal voltage regulator for maximum performance. + */ + + regval |= RCC_APB1ENR_PWREN; + +#if defined (CONFIG_STM32F7_DAC1) || defined(CONFIG_STM32F7_DAC2) + /* DAC interface clock enable */ + + regval |= RCC_APB1ENR_DACEN; +#endif + +#ifdef CONFIG_STM32F7_UART7 + /* UART7 clock enable */ + + regval |= RCC_APB1ENR_UART7EN; +#endif + +#ifdef CONFIG_STM32F7_UART8 + /* UART8 clock enable */ + + regval |= RCC_APB1ENR_UART8EN; +#endif + + putreg32(regval, STM32_RCC_APB1ENR); /* Enable peripherals */ +} + +/**************************************************************************** + * Name: rcc_enableapb2 + * + * Description: + * Enable selected APB2 peripherals + * + ****************************************************************************/ + +static inline void rcc_enableapb2(void) +{ + uint32_t regval; + + /* Set the appropriate bits in the APB2ENR register to enabled the + * selected APB2 peripherals. + */ + + regval = getreg32(STM32_RCC_APB2ENR); + +#ifdef CONFIG_STM32F7_TIM1 + /* TIM1 clock enable */ + + regval |= RCC_APB2ENR_TIM1EN; +#endif + +#ifdef CONFIG_STM32F7_TIM8 + /* TIM8 clock enable */ + + regval |= RCC_APB2ENR_TIM8EN; +#endif + +#ifdef CONFIG_STM32F7_USART1 + /* USART1 clock enable */ + + regval |= RCC_APB2ENR_USART1EN; +#endif + +#ifdef CONFIG_STM32F7_USART6 + /* USART6 clock enable */ + + regval |= RCC_APB2ENR_USART6EN; +#endif + +#ifdef CONFIG_STM32F7_ADC1 + /* ADC1 clock enable */ + + regval |= RCC_APB2ENR_ADC1EN; +#endif + +#ifdef CONFIG_STM32F7_ADC2 + /* ADC2 clock enable */ + + regval |= RCC_APB2ENR_ADC2EN; +#endif + +#ifdef CONFIG_STM32F7_ADC3 + /* ADC3 clock enable */ + + regval |= RCC_APB2ENR_ADC3EN; +#endif + +#ifdef CONFIG_STM32F7_SDMMC1 + /* SDIO clock enable */ + + regval |= RCC_APB2ENR_SDMMC1EN; +#endif + +#ifdef CONFIG_STM32F7_SPI1 + /* SPI1 clock enable */ + + regval |= RCC_APB2ENR_SPI1EN; +#endif + +#ifdef CONFIG_STM32F7_SPI4 + /* SPI4 clock enable */ + + regval |= RCC_APB2ENR_SPI4EN; +#endif + + /* System configuration controller clock enable */ + + regval |= RCC_APB2ENR_SYSCFGEN; + +#ifdef CONFIG_STM32F7_TIM9 + /* TIM9 clock enable */ + + regval |= RCC_APB2ENR_TIM9EN; +#endif + +#ifdef CONFIG_STM32F7_TIM10 + /* TIM10 clock enable */ + + regval |= RCC_APB2ENR_TIM10EN; +#endif + +#ifdef CONFIG_STM32F7_TIM11 + /* TIM11 clock enable */ + + regval |= RCC_APB2ENR_TIM11EN; +#endif + +#ifdef CONFIG_STM32F7_SPI5 + /* SPI5 clock enable */ + + regval |= RCC_APB2ENR_SPI5EN; +#endif + +#ifdef CONFIG_STM32F7_SPI6 + /* SPI6 clock enable */ + + regval |= RCC_APB2ENR_SPI6EN; +#endif + +#ifdef CONFIG_STM32F7_SAI1 + /* SPI6 clock enable */ + + regval |= RCC_APB2ENR_SAI1EN; +#endif + +#ifdef CONFIG_STM32F7_SAI2 + /* SPI6 clock enable */ + + regval |= RCC_APB2ENR_SAI2EN; +#endif + +#ifdef CONFIG_STM32F7_LTDC + /* LTDC clock enable */ + + regval |= RCC_APB2ENR_LTDCEN; +#endif + + putreg32(regval, STM32_RCC_APB2ENR); /* Enable peripherals */ +} + +/**************************************************************************** + * Name: stm32_stdclockconfig + * + * Description: + * Called to change to new clock based on settings in board.h + * + * NOTE: This logic would need to be extended if you need to select low- + * power clocking modes! + ****************************************************************************/ + +#ifndef CONFIG_STM32F7_CUSTOM_CLOCKCONFIG +static void stm32_stdclockconfig(void) +{ + uint32_t regval; + volatile int32_t timeout; + +#ifdef STM32_BOARD_USEHSI + /* Enable Internal High-Speed Clock (HSI) */ + + regval = getreg32(STM32_RCC_CR); + regval |= RCC_CR_HSION; /* Enable HSI */ + putreg32(regval, STM32_RCC_CR); + + /* Wait until the HSI is ready (or until a timeout elapsed) */ + + for (timeout = HSIRDY_TIMEOUT; timeout > 0; timeout--) + { + /* Check if the HSIRDY flag is the set in the CR */ + + if ((getreg32(STM32_RCC_CR) & RCC_CR_HSIRDY) != 0) + { + /* If so, then break-out with timeout > 0 */ + + break; + } + } + +#else /* if STM32_BOARD_USEHSE */ + /* Enable External High-Speed Clock (HSE) */ + + regval = getreg32(STM32_RCC_CR); + regval |= RCC_CR_HSEON; /* Enable HSE */ + putreg32(regval, STM32_RCC_CR); + + /* Wait until the HSE is ready (or until a timeout elapsed) */ + + for (timeout = HSERDY_TIMEOUT; timeout > 0; timeout--) + { + /* Check if the HSERDY flag is the set in the CR */ + + if ((getreg32(STM32_RCC_CR) & RCC_CR_HSERDY) != 0) + { + /* If so, then break-out with timeout > 0 */ + + break; + } + } +#endif + + /* Check for a timeout. If this timeout occurs, then we are hosed. We + * have no real back-up plan, although the following logic makes it look + * as though we do. + */ + + if (timeout > 0) + { + /* Select regulator voltage output Scale 1 mode to support system + * frequencies up to 216 MHz. + */ + + regval = getreg32(STM32_RCC_APB1ENR); + regval |= RCC_APB1ENR_PWREN; + putreg32(regval, STM32_RCC_APB1ENR); + + regval = getreg32(STM32_PWR_CR1); + regval &= ~PWR_CR1_VOS_MASK; + regval |= PWR_CR1_VOS_SCALE_1; + putreg32(regval, STM32_PWR_CR1); + + /* Set the HCLK source/divider */ + + regval = getreg32(STM32_RCC_CFGR); + regval &= ~RCC_CFGR_HPRE_MASK; + regval |= STM32_RCC_CFGR_HPRE; + putreg32(regval, STM32_RCC_CFGR); + + /* Set the PCLK2 divider */ + + regval = getreg32(STM32_RCC_CFGR); + regval &= ~RCC_CFGR_PPRE2_MASK; + regval |= STM32_RCC_CFGR_PPRE2; + putreg32(regval, STM32_RCC_CFGR); + + /* Set the PCLK1 divider */ + + regval = getreg32(STM32_RCC_CFGR); + regval &= ~RCC_CFGR_PPRE1_MASK; + regval |= STM32_RCC_CFGR_PPRE1; + putreg32(regval, STM32_RCC_CFGR); + +#ifdef CONFIG_RTC_HSECLOCK + /* Set the RTC clock divisor */ + + regval = getreg32(STM32_RCC_CFGR); + regval &= ~RCC_CFGR_RTCPRE_MASK; + regval |= RCC_CFGR_RTCPRE(HSE_DIVISOR); + putreg32(regval, STM32_RCC_CFGR); +#endif + + /* Set the PLL dividers and multipliers to configure the main PLL */ + +#ifdef STM32_BOARD_USEHSI + regval = (STM32_PLLCFG_PLLM | STM32_PLLCFG_PLLN | STM32_PLLCFG_PLLP | + RCC_PLLCFG_PLLSRC_HSI | STM32_PLLCFG_PLLQ); +#else /* if STM32_BOARD_USEHSE */ + regval = (STM32_PLLCFG_PLLM | STM32_PLLCFG_PLLN | STM32_PLLCFG_PLLP | + RCC_PLLCFG_PLLSRC_HSE | STM32_PLLCFG_PLLQ); +#endif + putreg32(regval, STM32_RCC_PLLCFG); + + /* Enable the main PLL */ + + regval = getreg32(STM32_RCC_CR); + regval |= RCC_CR_PLLON; + putreg32(regval, STM32_RCC_CR); + + /* Wait until the PLL is ready */ + + while ((getreg32(STM32_RCC_CR) & RCC_CR_PLLRDY) == 0) + { + } + + /* Enable the Over-drive to extend the clock frequency to 216 Mhz */ + + regval = getreg32(STM32_PWR_CR1); + regval |= PWR_CR1_ODEN; + putreg32(regval, STM32_PWR_CR1); + while ((getreg32(STM32_PWR_CSR1) & PWR_CSR1_ODRDY) == 0) + { + } + + regval = getreg32(STM32_PWR_CR1); + regval |= PWR_CR1_ODSWEN; + putreg32(regval, STM32_PWR_CR1); + while ((getreg32(STM32_PWR_CSR1) & PWR_CSR1_ODSWRDY) == 0) + { + } + + /* Configure FLASH wait states */ + + regval = FLASH_ACR_LATENCY(BOARD_FLASH_WAITSTATES); + +#ifdef CONFIG_STM32F7_FLASH_PREFETCH + /* Enable FLASH prefetch */ + + regval |= FLASH_ACR_PRFTEN; +#endif + +#ifdef CONFIG_ARMV7M_ITCM + /* The Flash memory interface accelerates code execution with a system of + * instruction prefetch and cache lines on ITCM interface (ART + * Accelerator™). + */ + + regval |= FLASH_ACR_ARTEN; +#endif + + putreg32(regval, STM32_FLASH_ACR); + + /* Select the main PLL as system clock source */ + + regval = getreg32(STM32_RCC_CFGR); + regval &= ~RCC_CFGR_SW_MASK; + regval |= RCC_CFGR_SW_PLL; + putreg32(regval, STM32_RCC_CFGR); + + /* Wait until the PLL source is used as the system clock source */ + + while ((getreg32(STM32_RCC_CFGR) & RCC_CFGR_SWS_MASK) != RCC_CFGR_SWS_PLL) + { + } + +#if defined(CONFIG_STM32F7_LTDC) || defined(CONFIG_STM32F7_PLLSAI) + + /* Configure PLLSAI */ + + regval = getreg32(STM32_RCC_PLLSAICFGR); + regval &= ~( RCC_PLLSAICFGR_PLLSAIN_MASK + | RCC_PLLSAICFGR_PLLSAIP_MASK + | RCC_PLLSAICFGR_PLLSAIQ_MASK + | RCC_PLLSAICFGR_PLLSAIR_MASK); + regval |= (STM32_RCC_PLLSAICFGR_PLLSAIN + | STM32_RCC_PLLSAICFGR_PLLSAIP + | STM32_RCC_PLLSAICFGR_PLLSAIQ + | STM32_RCC_PLLSAICFGR_PLLSAIR); + putreg32(regval, STM32_RCC_PLLSAICFGR); + + regval = getreg32(STM32_RCC_DCKCFGR1); + regval &= ~(RCC_DCKCFGR1_PLLI2SDIVQ_MASK + | RCC_DCKCFGR1_PLLSAIDIVQ_MASK + | RCC_DCKCFGR1_PLLSAIDIVR_MASK + | RCC_DCKCFGR1_SAI1SEL_MASK + | RCC_DCKCFGR1_SAI2SEL_MASK + | RCC_DCKCFGR1_TIMPRESEL + | RCC_DCKCFGR1_DFSDM1SEL + | RCC_DCKCFGR1_ADFSDM1SEL); + + regval |= (STM32_RCC_DCKCFGR1_PLLI2SDIVQ + | STM32_RCC_DCKCFGR1_PLLSAIDIVQ + | STM32_RCC_DCKCFGR1_PLLSAIDIVR + | STM32_RCC_DCKCFGR1_SAI1SRC + | STM32_RCC_DCKCFGR1_SAI2SRC + | STM32_RCC_DCKCFGR1_TIMPRESRC + | STM32_RCC_DCKCFGR1_DFSDM1SRC + | STM32_RCC_DCKCFGR1_ADFSDM1SRC); + + putreg32(regval, STM32_RCC_DCKCFGR1); + + /* Enable PLLSAI */ + + regval = getreg32(STM32_RCC_CR); + regval |= RCC_CR_PLLSAION; + putreg32(regval, STM32_RCC_CR); + + /* Wait until the PLLSAI is ready */ + + while ((getreg32(STM32_RCC_CR) & RCC_CR_PLLSAIRDY) == 0) + { + } +#endif +#if defined(CONFIG_STM32F7_LTDC) || defined(CONFIG_STM32F7_PLLI2S) + + /* Configure PLLI2S */ + + regval = getreg32(STM32_RCC_PLLI2SCFGR); + regval &= ~( RCC_PLLI2SCFGR_PLLI2SN_MASK + | RCC_PLLI2SCFGR_PLLI2SP_MASK + | RCC_PLLI2SCFGR_PLLI2SQ_MASK + | RCC_PLLI2SCFGR_PLLI2SR_MASK); + regval |= (STM32_RCC_PLLSAICFGR_PLLSAIN + | STM32_RCC_PLLSAICFGR_PLLSAIP + | STM32_RCC_PLLSAICFGR_PLLSAIQ + | STM32_RCC_PLLSAICFGR_PLLSAIR); + putreg32(regval, STM32_RCC_PLLI2SCFGR); + + regval = getreg32(STM32_RCC_DCKCFGR2); + regval &= ~( RCC_DCKCFGR2_USART1SEL_MASK + | RCC_DCKCFGR2_USART2SEL_MASK + | RCC_DCKCFGR2_UART4SEL_MASK + | RCC_DCKCFGR2_UART5SEL_MASK + | RCC_DCKCFGR2_USART6SEL_MASK + | RCC_DCKCFGR2_UART7SEL_MASK + | RCC_DCKCFGR2_UART8SEL_MASK + | RCC_DCKCFGR2_I2C1SEL_MASK + | RCC_DCKCFGR2_I2C2SEL_MASK + | RCC_DCKCFGR2_I2C3SEL_MASK + | RCC_DCKCFGR2_I2C4SEL_MASK + | RCC_DCKCFGR2_LPTIM1SEL_MASK + | RCC_DCKCFGR2_CECSEL_MASK + | RCC_DCKCFGR2_CK48MSEL_MASK + | RCC_DCKCFGR2_SDMMCSEL_MASK + | RCC_DCKCFGR2_SDMMC2SEL_MASK + | RCC_DCKCFGR2_DSISELL_MASK); + + regval |= ( STM32_RCC_DCKCFGR2_USART1SRC + | STM32_RCC_DCKCFGR2_USART2SRC + | STM32_RCC_DCKCFGR2_UART4SRC + | STM32_RCC_DCKCFGR2_UART5SRC + | STM32_RCC_DCKCFGR2_USART6SRC + | STM32_RCC_DCKCFGR2_UART7SRC + | STM32_RCC_DCKCFGR2_UART8SRC + | STM32_RCC_DCKCFGR2_I2C1SRC + | STM32_RCC_DCKCFGR2_I2C2SRC + | STM32_RCC_DCKCFGR2_I2C3SRC + | STM32_RCC_DCKCFGR2_I2C4SRC + | STM32_RCC_DCKCFGR2_LPTIM1SRC + | STM32_RCC_DCKCFGR2_CECSRC + | STM32_RCC_DCKCFGR2_CK48MSRC + | STM32_RCC_DCKCFGR2_SDMMCSRC + | STM32_RCC_DCKCFGR2_SDMMC2SRC + | STM32_RCC_DCKCFGR2_DSISRC); + + putreg32(regval, STM32_RCC_DCKCFGR2); + + /* Enable PLLI2S */ + + regval = getreg32(STM32_RCC_CR); + regval |= RCC_CR_PLLI2SON; + putreg32(regval, STM32_RCC_CR); + + /* Wait until the PLLI2S is ready */ + + while ((getreg32(STM32_RCC_CR) & RCC_CR_PLLI2SRDY) == 0) + { + } +#endif + +#if defined(CONFIG_STM32F7_IWDG) || defined(CONFIG_RTC_LSICLOCK) + /* Low speed internal clock source LSI */ + + stm32_rcc_enablelsi(); +#endif + +#if defined(CONFIG_RTC_LSECLOCK) + /* Low speed external clock source LSE + * + * TODO: There is another case where the LSE needs to + * be enabled: if the MCO1 pin selects LSE as source. + */ + + stm32_rcc_enablelse(); +#endif + } +} +#endif + +/**************************************************************************** + * Name: rcc_enableperiphals + ****************************************************************************/ + +static inline void rcc_enableperipherals(void) +{ + rcc_enableahb1(); + rcc_enableahb2(); + rcc_enableahb3(); + rcc_enableapb1(); + rcc_enableapb2(); +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ diff --git a/arch/arm/src/stm32l4/Kconfig b/arch/arm/src/stm32l4/Kconfig index eccd8469bfb32013e27552e180cecd77848ace48..143230fa5b9121d3b53fd6da9544c55e53c7507a 100644 --- a/arch/arm/src/stm32l4/Kconfig +++ b/arch/arm/src/stm32l4/Kconfig @@ -333,7 +333,7 @@ config STM32L4_QSPI_DMATHRESHOLD config STM32L4_QSPI_DMADEBUG bool "QSPI DMA transfer debug" - depends on STM32L4_QSPI_DMA && DEBUG && DEBUG_DMA + depends on STM32L4_QSPI_DMA && DEBUG_SPI && DEBUG_DMA default n ---help--- Enable special debug instrumentation to analyze QSPI DMA data transfers. @@ -343,11 +343,11 @@ config STM32L4_QSPI_DMADEBUG config STM32L4_QSPI_REGDEBUG bool "QSPI Register level debug" - depends on DEBUG + depends on DEBUG_SPI_INFO default n ---help--- Output detailed register-level QSPI device debug information. - Requires also DEBUG. + Requires also CONFIG_DEBUG_SPI_INFO. endif @@ -871,7 +871,7 @@ config CAN1_BAUD default 250000 depends on STM32L4_CAN1 ---help--- - CAN1 BAUD rate. Required if STM32L4_CAN1 is defined. + CAN1 BAUD rate. Required if CONFIG_STM32L4_CAN1 is defined. config CAN_TSEG1 int "TSEG1 quanta" @@ -884,6 +884,15 @@ config CAN_TSEG2 default 7 ---help--- The number of CAN time quanta in segment 2. Default: 7 + +config STM32L4_CAN_REGDEBUG + bool "CAN Register level debug" + depends on DEBUG_CAN_INFO + default n + ---help--- + Output detailed register-level CAN device debug information. + Requires also CONFIG_DEBUG_CAN_INFO. + endmenu endif # ARCH_CHIP_STM32L4 diff --git a/arch/arm/src/stm32l4/Make.defs b/arch/arm/src/stm32l4/Make.defs index d7b602efe472dd1630e38aaa04ef78018c1ace4e..d4f1c944948ae05970e30c66bd55a9bca0eab021 100644 --- a/arch/arm/src/stm32l4/Make.defs +++ b/arch/arm/src/stm32l4/Make.defs @@ -105,10 +105,6 @@ else ifeq ($(CONFIG_MODULE),y) CMN_CSRCS += up_elf.c up_coherent_dcache.c endif -ifeq ($(CONFIG_STACK_COLORATION),y) -CMN_CSRCS += up_checkstack.c -endif - # Required STM32L4 files CHIP_ASRCS = @@ -150,7 +146,7 @@ CHIP_CSRCS += stm32l4_rtcc.c endif endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) CHIP_CSRCS += stm32l4_dumpgpio.c endif diff --git a/arch/arm/src/stm32l4/stm32l4.h b/arch/arm/src/stm32l4/stm32l4.h index c78865577d2c10811dbfa3abdbd60e9ee38b75d6..b19fd62c43b5616adb3ee7bec0df40a37f0e8781 100644 --- a/arch/arm/src/stm32l4/stm32l4.h +++ b/arch/arm/src/stm32l4/stm32l4.h @@ -53,21 +53,6 @@ * Pre-processor Definitions ************************************************************************************/ -/* Additional Configuration *********************************************************/ -/* Custom debug settings used in the STM32L4 port. These are managed by - * STM32L4-specific logic and not the common logic in include/debug.h. - * NOTE: Some of these also depend on CONFIG_DEBUG_VERBOSE - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_DMA -# undef CONFIG_DEBUG_RTC -# undef CONFIG_DEBUG_I2C -# undef CONFIG_DEBUG_CAN -# undef CONFIG_DEBUG_PWM -# undef CONFIG_DEBUG_SENSORS -#endif - /* Peripherals **********************************************************************/ #include "chip.h" diff --git a/arch/arm/src/stm32l4/stm32l4_allocateheap.c b/arch/arm/src/stm32l4/stm32l4_allocateheap.c index d5ac105436cd5442894ec4296368367b3492f746..dc39c59e51de3033f8cceacf35061a42f0907128 100644 --- a/arch/arm/src/stm32l4/stm32l4_allocateheap.c +++ b/arch/arm/src/stm32l4/stm32l4_allocateheap.c @@ -148,7 +148,7 @@ * ****************************************************************************/ -#ifdef CONFIG_DEBUG_HEAP +#ifdef CONFIG_HEAP_COLORATION static inline void up_heap_color(FAR void *start, size_t size) { memset(start, HEAP_COLOR, size); diff --git a/arch/arm/src/stm32l4/stm32l4_can.c b/arch/arm/src/stm32l4/stm32l4_can.c index 81efb677d2c3b91d138c75436d183f93e7c3d97d..2d65032c3309681e2bce4e5a969f1efdcea56688 100644 --- a/arch/arm/src/stm32l4/stm32l4_can.c +++ b/arch/arm/src/stm32l4/stm32l4_can.c @@ -1,4 +1,4 @@ -/************************************************************************************ +/**************************************************************************** * arch/arm/src/stm32l4/stm32l4_can.c * * Copyright (C) 2011, 2016 Gregory Nutt. All rights reserved. @@ -35,7 +35,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************************************/ + ****************************************************************************/ /**************************************************************************** * Included Files @@ -82,23 +82,8 @@ #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 +#ifndef CONFIG_DEBUG_CAN_INFO +# undef CONFIG_STM32L4_CAN_REGDEBUG #endif /**************************************************************************** @@ -122,43 +107,66 @@ struct stm32l4_can_s /* 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); +static uint32_t stm32l4can_getreg(FAR struct stm32l4_can_s *priv, + int offset); +static uint32_t stm32l4can_getfreg(FAR struct stm32l4_can_s *priv, + int offset); +static void stm32l4can_putreg(FAR struct stm32l4_can_s *priv, int offset, + uint32_t value); +static void stm32l4can_putfreg(FAR struct stm32l4_can_s *priv, int offset, + uint32_t value); +#ifdef CONFIG_STM32L4_CAN_REGDEBUG +static void stm32l4can_dumpctrlregs(FAR struct stm32l4_can_s *priv, + FAR const char *msg); +static void stm32l4can_dumpmbregs(FAR struct stm32l4_can_s *priv, + FAR const char *msg); +static void stm32l4can_dumpfiltregs(FAR 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) +# define stm32l4can_dumpctrlregs(priv,msg) +# define stm32l4can_dumpmbregs(priv,msg) +# define stm32l4can_dumpfiltregs(priv,msg) #endif +/* Filtering (todo) */ + +static int stm32l4can_addextfilter(FAR struct stm32l4_can_s *priv, + FAR struct canioc_extfilter_s *arg); +static int stm32l4can_delextfilter(FAR struct stm32l4_can_s *priv, + int arg); +static int stm32l4can_addstdfilter(FAR struct stm32l4_can_s *priv, + FAR struct canioc_stdfilter_s *arg); +static int stm32l4can_delstdfilter(FAR struct stm32l4_can_s *priv, + int arg); + /* 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); +static void stm32l4can_reset(FAR struct can_dev_s *dev); +static int stm32l4can_setup(FAR struct can_dev_s *dev); +static void stm32l4can_shutdown(FAR struct can_dev_s *dev); +static void stm32l4can_rxint(FAR struct can_dev_s *dev, bool enable); +static void stm32l4can_txint(FAR struct can_dev_s *dev, bool enable); +static int stm32l4can_ioctl(FAR struct can_dev_s *dev, int cmd, + unsigned long arg); +static int stm32l4can_remoterequest(FAR struct can_dev_s *dev, + uint16_t id); +static int stm32l4can_send(FAR struct can_dev_s *dev, + FAR struct can_msg_s *msg); +static bool stm32l4can_txready(FAR struct can_dev_s *dev); +static bool stm32l4can_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 stm32l4can_rx0interrupt(int irq, FAR void *context); +static int stm32l4can_txinterrupt(int irq, FAR 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); +static int stm32l4can_enterinitmode(FAR struct stm32l4_can_s *priv); +static int stm32l4can_exitinitmode(FAR struct stm32l4_can_s *priv); +static int stm32l4can_bittiming(FAR struct stm32l4_can_s *priv); +static int stm32l4can_cellinit(FAR struct stm32l4_can_s *priv); +static int stm32l4can_filterinit(FAR struct stm32l4_can_s *priv); /**************************************************************************** * Private Data @@ -166,16 +174,16 @@ static int can_filterinit(struct stm32l4_can_s *priv); 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, + .co_reset = stm32l4can_reset, + .co_setup = stm32l4can_setup, + .co_shutdown = stm32l4can_shutdown, + .co_rxint = stm32l4can_rxint, + .co_txint = stm32l4can_txint, + .co_ioctl = stm32l4can_ioctl, + .co_remoterequest = stm32l4can_remoterequest, + .co_send = stm32l4can_send, + .co_txready = stm32l4can_txready, + .co_txempty = stm32l4can_txempty, }; #ifdef CONFIG_STM32L4_CAN1 @@ -202,8 +210,8 @@ static struct can_dev_s g_can1dev = ****************************************************************************/ /**************************************************************************** - * Name: can_getreg - * Name: can_getfreg + * Name: stm32l4can_getreg + * Name: stm32l4can_getfreg * * Description: * Read the value of a CAN register or filter block register. @@ -216,8 +224,8 @@ static struct can_dev_s g_can1dev = * ****************************************************************************/ -#ifdef CONFIG_CAN_REGDEBUG -static uint32_t can_vgetreg(uint32_t addr) +#ifdef CONFIG_STM32L4_CAN_REGDEBUG +static uint32_t stm32l4can_vgetreg(uint32_t addr) { static uint32_t prevaddr = 0; static uint32_t preval = 0; @@ -237,7 +245,7 @@ static uint32_t can_vgetreg(uint32_t addr) { if (count == 4) { - lldbg("...\n"); + caninfo("...\n"); } return val; @@ -254,7 +262,7 @@ static uint32_t can_vgetreg(uint32_t addr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + caninfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -266,27 +274,27 @@ static uint32_t can_vgetreg(uint32_t addr) /* Show the register value read */ - lldbg("%08x->%08x\n", addr, val); + caninfo("%08x->%08x\n", addr, val); return val; } -static uint32_t can_getreg(struct stm32l4_can_s *priv, int offset) +static uint32_t stm32l4can_getreg(FAR struct stm32l4_can_s *priv, int offset) { - return can_vgetreg(priv->base + offset); + return stm32l4can_vgetreg(priv->base + offset); } -static uint32_t can_getfreg(struct stm32l4_can_s *priv, int offset) +static uint32_t stm32l4can_getfreg(FAR struct stm32l4_can_s *priv, int offset) { - return can_vgetreg(priv->fbase + offset); + return stm32l4can_vgetreg(priv->fbase + offset); } #else -static uint32_t can_getreg(struct stm32l4_can_s *priv, int offset) +static uint32_t stm32l4can_getreg(FAR struct stm32l4_can_s *priv, int offset) { return getreg32(priv->base + offset); } -static uint32_t can_getfreg(struct stm32l4_can_s *priv, int offset) +static uint32_t stm32l4can_getfreg(FAR struct stm32l4_can_s *priv, int offset) { return getreg32(priv->fbase + offset); } @@ -294,8 +302,8 @@ static uint32_t can_getfreg(struct stm32l4_can_s *priv, int offset) #endif /**************************************************************************** - * Name: can_putreg - * Name: can_putfreg + * Name: stm32l4can_putreg + * Name: stm32l4can_putfreg * * Description: * Set the value of a CAN register or filter block register. @@ -310,42 +318,46 @@ static uint32_t can_getfreg(struct stm32l4_can_s *priv, int offset) * ****************************************************************************/ -#ifdef CONFIG_CAN_REGDEBUG -static void can_vputreg(uint32_t addr, uint32_t value) +#ifdef CONFIG_STM32L4_CAN_REGDEBUG +static void stm32l4can_vputreg(uint32_t addr, uint32_t value) { /* Show the register value being written */ - lldbg("%08x<-%08x\n", addr, value); + caninfo("%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) +static void stm32l4can_putreg(FAR struct stm32l4_can_s *priv, int offset, + uint32_t value) { - can_vputreg(priv->base + offset, value); + stm32l4can_vputreg(priv->base + offset, value); } -static void can_putfreg(struct stm32l4_can_s *priv, int offset, uint32_t value) +static void stm32l4can_putfreg(FAR struct stm32l4_can_s *priv, int offset, + uint32_t value) { - can_vputreg(priv->fbase + offset, value); + stm32l4can_vputreg(priv->fbase + offset, value); } #else -static void can_putreg(struct stm32l4_can_s *priv, int offset, uint32_t value) +static void stm32l4can_putreg(FAR 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) +static void stm32l4can_putfreg(FAR struct stm32l4_can_s *priv, int offset, + uint32_t value) { putreg32(value, priv->fbase + offset); } #endif /**************************************************************************** - * Name: can_dumpctrlregs + * Name: stm32l4can_dumpctrlregs * * Description: * Dump the contents of all CAN control registers @@ -358,38 +370,39 @@ 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) +#ifdef CONFIG_STM32L4_CAN_REGDEBUG +static void stm32l4can_dumpctrlregs(FAR struct stm32l4_can_s *priv, + FAR const char *msg) { if (msg) { - canlldbg("Control Registers: %s\n", msg); + caninfo("Control Registers: %s\n", msg); } else { - canlldbg("Control Registers:\n"); + caninfo("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)); + caninfo(" 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)); + caninfo(" 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)); + caninfo(" 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 + * Name: stm32l4can_dumpmbregs * * Description: * Dump the contents of all CAN mailbox registers @@ -402,54 +415,55 @@ static void can_dumpctrlregs(struct stm32l4_can_s *priv, FAR const char *msg) * ****************************************************************************/ -#ifdef CONFIG_CAN_REGDEBUG -static void can_dumpmbregs(struct stm32l4_can_s *priv, FAR const char *msg) +#ifdef CONFIG_STM32L4_CAN_REGDEBUG +static void stm32l4can_dumpmbregs(FAR struct stm32l4_can_s *priv, + FAR const char *msg) { if (msg) { - canlldbg("Mailbox Registers: %s\n", msg); + caninfo("Mailbox Registers: %s\n", msg); } else { - canlldbg("Mailbox Registers:\n"); + caninfo("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)); + caninfo(" 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)); + + caninfo(" 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)); + + caninfo(" 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)); + + caninfo(" 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)); + + caninfo(" 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 + * Name: stm32l4can_dumpfiltregs * * Description: * Dump the contents of all CAN filter registers @@ -462,42 +476,43 @@ static void can_dumpmbregs(struct stm32l4_can_s *priv, FAR const char *msg) * ****************************************************************************/ -#ifdef CONFIG_CAN_REGDEBUG -static void can_dumpfiltregs(struct stm32l4_can_s *priv, FAR const char *msg) +#ifdef CONFIG_STM32L4_CAN_REGDEBUG +static void stm32l4can_dumpfiltregs(FAR struct stm32l4_can_s *priv, + FAR const char *msg) { int i; if (msg) { - canlldbg("Filter Registers: %s\n", msg); + caninfo("Filter Registers: %s\n", msg); } else { - canlldbg("Filter Registers:\n"); + caninfo("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)); + caninfo(" 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))); + caninfo(" 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 + * Name: stm32l4can_reset * * Description: * Reset the CAN device. Called early to initialize the hardware. This - * function is called, before can_setup() and on error conditions. + * function is called, before stm32l4can_setup() and on error conditions. * * Input Parameters: * dev - An instance of the "upper half" can driver state structure. @@ -507,14 +522,14 @@ static void can_dumpfiltregs(struct stm32l4_can_s *priv, FAR const char *msg) * ****************************************************************************/ -static void can_reset(FAR struct can_dev_s *dev) +static void stm32l4can_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); + caninfo("CAN%d\n", priv->port); /* Get the bits in the AHB1RSTR1 register needed to reset this CAN device */ @@ -526,12 +541,12 @@ static void can_reset(FAR struct can_dev_s *dev) else #endif { - canlldbg("Unsupported port %d\n", priv->port); + canerr("ERROR: 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. + /* Disable interrupts momentary to stop any ongoing CAN event processing + * and to prevent any concurrent access to the AHB1RSTR1 register. */ flags = enter_critical_section(); @@ -548,7 +563,7 @@ static void can_reset(FAR struct can_dev_s *dev) } /**************************************************************************** - * Name: can_setup + * Name: stm32l4can_setup * * Description: * Configure the CAN. This method is called the first time that the CAN @@ -564,49 +579,56 @@ static void can_reset(FAR struct can_dev_s *dev) * ****************************************************************************/ -static int can_setup(FAR struct can_dev_s *dev) +static int stm32l4can_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); + caninfo("CAN%d RX0 irq: %d TX irq: %d\n", + priv->port, priv->canrx0, priv->cantx); /* CAN cell initialization */ - ret = can_cellinit(priv); + ret = stm32l4can_cellinit(priv); if (ret < 0) { - canlldbg("CAN%d cell initialization failed: %d\n", priv->port, ret); + canerr("ERROR: CAN%d cell initialization failed: %d\n", + priv->port, ret); return ret; } - can_dumpctrlregs(priv, "After cell initialization"); - can_dumpmbregs(priv, NULL); + stm32l4can_dumpctrlregs(priv, "After cell initialization"); + stm32l4can_dumpmbregs(priv, NULL); /* CAN filter initialization */ - ret = can_filterinit(priv); + ret = stm32l4can_filterinit(priv); if (ret < 0) { - canlldbg("CAN%d filter initialization failed: %d\n", priv->port, ret); + canerr("ERROR: CAN%d filter initialization failed: %d\n", + priv->port, ret); return ret; } - can_dumpfiltregs(priv, "After filter initialization"); + stm32l4can_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 interrupt and TX interrupts. The others are + * not used. + */ - ret = irq_attach(priv->canrx0, can_rx0interrupt); + ret = irq_attach(priv->canrx0, stm32l4can_rx0interrupt); if (ret < 0) { - canlldbg("Failed to attach CAN%d RX0 IRQ (%d)", priv->port, priv->canrx0); + canerr("ERROR: Failed to attach CAN%d RX0 IRQ (%d)", + priv->port, priv->canrx0); return ret; } - ret = irq_attach(priv->cantx, can_txinterrupt); + ret = irq_attach(priv->cantx, stm32l4can_txinterrupt); if (ret < 0) { - canlldbg("Failed to attach CAN%d TX IRQ (%d)", priv->port, priv->cantx); + canerr("ERROR: Failed to attach CAN%d TX IRQ (%d)", + priv->port, priv->cantx); return ret; } @@ -621,7 +643,7 @@ static int can_setup(FAR struct can_dev_s *dev) } /**************************************************************************** - * Name: can_shutdown + * Name: stm32l4can_shutdown * * Description: * Disable the CAN. This method is called when the CAN device is closed. @@ -635,11 +657,11 @@ static int can_setup(FAR struct can_dev_s *dev) * ****************************************************************************/ -static void can_shutdown(FAR struct can_dev_s *dev) +static void stm32l4can_shutdown(FAR struct can_dev_s *dev) { FAR struct stm32l4_can_s *priv = dev->cd_priv; - canllvdbg("CAN%d\n", priv->port); + caninfo("CAN%d\n", priv->port); /* Disable the RX FIFO 0 and TX interrupts */ @@ -653,11 +675,11 @@ static void can_shutdown(FAR struct can_dev_s *dev) /* And reset the hardware */ - can_reset(dev); + stm32l4can_reset(dev); } /**************************************************************************** - * Name: can_rxint + * Name: stm32l4can_rxint * * Description: * Call to enable or disable RX interrupts. @@ -670,16 +692,16 @@ static void can_shutdown(FAR struct can_dev_s *dev) * ****************************************************************************/ -static void can_rxint(FAR struct can_dev_s *dev, bool enable) +static void stm32l4can_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); + caninfo("CAN%d enable: %d\n", priv->port, enable); /* Enable/disable the FIFO 0 message pending interrupt */ - regval = can_getreg(priv, STM32L4_CAN_IER_OFFSET); + regval = stm32l4can_getreg(priv, STM32L4_CAN_IER_OFFSET); if (enable) { regval |= CAN_IER_FMPIE0; @@ -689,11 +711,11 @@ static void can_rxint(FAR struct can_dev_s *dev, bool enable) regval &= ~CAN_IER_FMPIE0; } - can_putreg(priv, STM32L4_CAN_IER_OFFSET, regval); + stm32l4can_putreg(priv, STM32L4_CAN_IER_OFFSET, regval); } /**************************************************************************** - * Name: can_txint + * Name: stm32l4can_txint * * Description: * Call to enable or disable TX interrupts. @@ -706,25 +728,25 @@ 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 void stm32l4can_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); + caninfo("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 = stm32l4can_getreg(priv, STM32L4_CAN_IER_OFFSET); regval &= ~CAN_IER_TMEIE; - can_putreg(priv, STM32L4_CAN_IER_OFFSET, regval); + stm32l4can_putreg(priv, STM32L4_CAN_IER_OFFSET, regval); } } /**************************************************************************** - * Name: can_ioctl + * Name: stm32l4can_ioctl * * Description: * All ioctl calls will be routed through this method @@ -737,15 +759,302 @@ 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 stm32l4can_ioctl(FAR struct can_dev_s *dev, int cmd, + unsigned long arg) { - /* No CAN ioctls are supported */ + FAR struct stm32l4_can_s *priv; + int ret = -ENOTTY; - return -ENOTTY; + caninfo("cmd=%04x arg=%lu\n", cmd, arg); + + DEBUGASSERT(dev && dev->cd_priv); + priv = dev->cd_priv; + + /* Handle the command */ + + switch (cmd) + { + /* CANIOC_GET_BITTIMING: + * Description: Return the current bit timing settings + * Argument: A pointer to a write-able instance of struct + * canioc_bittiming_s in which current bit timing + * values will be returned. + * Returned Value: Zero (OK) is returned on success. Otherwise -1 + * (ERROR) is returned with the errno variable set + * to indicate the nature of the error. + * Dependencies: None + */ + + case CANIOC_GET_BITTIMING: + { + FAR struct canioc_bittiming_s *bt = + (FAR struct canioc_bittiming_s *)arg; + uint32_t regval; + uint32_t brp; + + DEBUGASSERT(bt != NULL); + regval = stm32l4can_getreg(priv, STM32L4_CAN_BTR_OFFSET); + bt->bt_sjw = ((regval & CAN_BTR_SJW_MASK) >> CAN_BTR_SJW_SHIFT) + 1; + bt->bt_tseg1 = ((regval & CAN_BTR_TS1_MASK) >> CAN_BTR_TS1_SHIFT) + 1; + bt->bt_tseg2 = ((regval & CAN_BTR_TS2_MASK) >> CAN_BTR_TS2_SHIFT) + 1; + + brp = ((regval & CAN_BTR_BRP_MASK) >> CAN_BTR_BRP_SHIFT) + 1; + bt->bt_baud = STM32L4_PCLK1_FREQUENCY / + (brp * (bt->bt_tseg1 + bt->bt_tseg2 + 1)); + ret = OK; + } + break; + + /* CANIOC_SET_BITTIMING: + * Description: Set new current bit timing values + * Argument: A pointer to a read-able instance of struct + * canioc_bittiming_s in which the new bit timing + * values are provided. + * Returned Value: Zero (OK) is returned on success. Otherwise -1 + * (ERROR)is returned with the errno variable set + * to indicate thenature of the error. + * Dependencies: None + * + * REVISIT: There is probably a limitation here: If there are multiple + * threads trying to send CAN packets, when one of these threads + * reconfigures the bitrate, the MCAN hardware will be reset and the + * context of operation will be lost. Hence, this IOCTL can only safely + * be executed in quiescent time periods. + */ + + case CANIOC_SET_BITTIMING: + { + FAR const struct canioc_bittiming_s *bt = + (FAR const struct canioc_bittiming_s *)arg; + uint32_t brp; + uint32_t can_bit_quanta; + uint32_t tmp; + uint32_t regval; + + DEBUGASSERT(bt != NULL); + DEBUGASSERT(bt->bt_baud < STM32L4_PCLK1_FREQUENCY); + DEBUGASSERT(bt->bt_sjw > 0 && bt->bt_sjw <= 4); + DEBUGASSERT(bt->bt_tseg1 > 0 && bt->bt_tseg1 <= 16); + DEBUGASSERT(bt->bt_tseg2 > 0 && bt->bt_tseg2 <= 8); + + regval = stm32l4can_getreg(priv, STM32L4_CAN_BTR_OFFSET); + + /* Extract bit timing data */ + /* tmp is in clocks per bit time */ + + tmp = STM32L4_PCLK1_FREQUENCY / bt->bt_baud; + + /* This value is dynamic as requested by user */ + + can_bit_quanta = bt->bt_tseg1 + bt->bt_tseg2 + 1; + + if (tmp < can_bit_quanta) + { + /* This timing is not possible */ + + ret = -EINVAL; + } + + /* Otherwise, nquanta is can_bit_quanta, ts1 and ts2 are + * provided by the user and we calculate brp to achieve + * can_bit_quanta quanta in the bit times + */ + + else + { + brp = (tmp + (can_bit_quanta/2)) / can_bit_quanta; + DEBUGASSERT(brp >= 1 && brp <= CAN_BTR_BRP_MAX); + } + + caninfo("TS1: %d TS2: %d BRP: %d\n", bt->bt_tseg1, bt->bt_tseg2, brp); + + /* Configure bit timing. */ + + regval &= ~(CAN_BTR_BRP_MASK | CAN_BTR_TS1_MASK | CAN_BTR_TS2_MASK | CAN_BTR_SJW_MASK); + regval |= ((brp - 1) << CAN_BTR_BRP_SHIFT) | + ((bt->bt_tseg1 - 1) << CAN_BTR_TS1_SHIFT) | + ((bt->bt_tseg2 - 1) << CAN_BTR_TS2_SHIFT) | + ((bt->bt_sjw - 1) << CAN_BTR_SJW_SHIFT); + + /* Bit timing can only be configured in init mode. */ + + ret = stm32l4can_enterinitmode(priv); + if (ret != 0) + { + break; + } + + stm32l4can_putreg(priv, STM32L4_CAN_BTR_OFFSET, regval); + + ret = stm32l4can_exitinitmode(priv); + + if (ret == 0) + { + priv->baud = STM32L4_PCLK1_FREQUENCY / (brp * (bt->bt_tseg1 + bt->bt_tseg2 + 1)); + } + } + break; + + /* CANIOC_GET_CONNMODES: + * Description: Get the current bus connection modes + * Argument: A pointer to a write-able instance of struct + * canioc_connmodes_s in which the new bus modes will + * be returned. + * Returned Value: Zero (OK) is returned on success. Otherwise -1 + * (ERROR)is returned with the errno variable set + * to indicate the nature of the error. + * Dependencies: None + */ + + case CANIOC_GET_CONNMODES: + { + FAR struct canioc_connmodes_s *bm = + (FAR struct canioc_connmodes_s *)arg; + uint32_t regval; + + DEBUGASSERT(bm != NULL); + + regval = stm32l4can_getreg(priv, STM32L4_CAN_BTR_OFFSET); + + bm->bm_loopback = ((regval & CAN_BTR_LBKM) == CAN_BTR_LBKM); + bm->bm_silent = ((regval & CAN_BTR_SILM) == CAN_BTR_SILM); + ret = OK; + break; + } + + /* CANIOC_SET_CONNMODES: + * Description: Set new bus connection modes values + * Argument: A pointer to a read-able instance of struct + * canioc_connmodes_s in which the new bus modes + * are provided. + * Returned Value: Zero (OK) is returned on success. Otherwise -1 + * (ERROR) is returned with the errno variable set + * to indicate the nature of the error. + * Dependencies: None + */ + + case CANIOC_SET_CONNMODES: + { + FAR struct canioc_connmodes_s *bm = + (FAR struct canioc_connmodes_s *)arg; + uint32_t regval; + + DEBUGASSERT(bm != NULL); + + regval = stm32l4can_getreg(priv, STM32L4_CAN_BTR_OFFSET); + + if (bm->bm_loopback) + { + regval |= CAN_BTR_LBKM; + } + else + { + regval &= ~CAN_BTR_LBKM; + } + + if (bm->bm_silent) + { + regval |= CAN_BTR_SILM; + } + else + { + regval &= ~CAN_BTR_SILM; + } + + /* This register can only be configured in init mode. */ + + ret = stm32l4can_enterinitmode(priv); + if (ret != 0) + { + break; + } + + stm32l4can_putreg(priv, STM32L4_CAN_BTR_OFFSET, regval); + + ret = stm32l4can_exitinitmode(priv); + } + break; + +#ifdef CONFIG_CAN_EXTID + /* CANIOC_ADD_EXTFILTER: + * Description: Add an address filter for a extended 29 bit + * address. + * Argument: A reference to struct canioc_extfilter_s + * Returned Value: A non-negative filter ID is returned on success. + * Otherwise -1 (ERROR) is returned with the errno + * variable set to indicate the nature of the error. + */ + + case CANIOC_ADD_EXTFILTER: + { + DEBUGASSERT(arg != 0); + ret = stm32l4can_addextfilter(priv, (FAR struct canioc_extfilter_s *)arg); + } + break; + + /* CANIOC_DEL_EXTFILTER: + * Description: Remove an address filter for a standard 29 bit + * address. + * Argument: The filter index previously returned by the + * CANIOC_ADD_EXTFILTER command + * Returned Value: Zero (OK) is returned on success. Otherwise -1 + * (ERROR)is returned with the errno variable set + * to indicate the nature of the error. + */ + + case CANIOC_DEL_EXTFILTER: + { + DEBUGASSERT(arg <= priv->config->nextfilters); + ret = stm32l4can_delextfilter(priv, (int)arg); + } + break; +#endif + + /* CANIOC_ADD_STDFILTER: + * Description: Add an address filter for a standard 11 bit + * address. + * Argument: A reference to struct canioc_stdfilter_s + * Returned Value: A non-negative filter ID is returned on success. + * Otherwise -1 (ERROR) is returned with the errno + * variable set to indicate the nature of the error. + */ + + case CANIOC_ADD_STDFILTER: + { + DEBUGASSERT(arg != 0); + ret = stm32l4can_addstdfilter(priv, (FAR struct canioc_stdfilter_s *)arg); + } + break; + + /* CANIOC_DEL_STDFILTER: + * Description: Remove an address filter for a standard 11 bit + * address. + * Argument: The filter index previously returned by the + * CANIOC_ADD_STDFILTER command + * Returned Value: Zero (OK) is returned on success. Otherwise -1 + * (ERROR) is returned with the errno variable set + * to indicate the nature of the error. + */ + + case CANIOC_DEL_STDFILTER: + { + DEBUGASSERT(arg <= priv->config->nstdfilters); + ret = stm32l4can_delstdfilter(priv, (int)arg); + } + break; + + /* Unsupported/unrecognized command */ + + default: + canerr("ERROR: Unrecognized command: %04x\n", cmd); + break; + } + + return ret; } /**************************************************************************** - * Name: can_remoterequest + * Name: stm32l4can_remoterequest * * Description: * Send a remote request @@ -758,14 +1067,14 @@ 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 stm32l4can_remoterequest(FAR struct can_dev_s *dev, uint16_t id) { #warning "Remote request not implemented" return -ENOSYS; } /**************************************************************************** - * Name: can_send + * Name: stm32l4can_send * * Description: * Send one can message. @@ -787,7 +1096,8 @@ 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 int stm32l4can_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; @@ -796,11 +1106,12 @@ 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); + caninfo("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); + regval = stm32l4can_getreg(priv, STM32L4_CAN_TSR_OFFSET); if ((regval & CAN_TSR_TME0) != 0 && (regval & CAN_TSR_RQCP0) == 0) { txmb = 0; @@ -815,15 +1126,16 @@ static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg) } else { - canlldbg("ERROR: No available mailbox\n"); + canerr("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); + regval = stm32l4can_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); + stm32l4can_putreg(priv, STM32L4_CAN_TIR_OFFSET(txmb), regval); /* Set up the ID, standard 11-bit or extended 29-bit. */ @@ -843,15 +1155,15 @@ static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg) 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); + stm32l4can_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 = stm32l4can_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); + stm32l4can_putreg(priv, STM32L4_CAN_TDTR_OFFSET(txmb), regval); /* Set up the data fields */ @@ -882,7 +1194,7 @@ static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg) } } - can_putreg(priv, STM32L4_CAN_TDLR_OFFSET(txmb), regval); + stm32l4can_putreg(priv, STM32L4_CAN_TDLR_OFFSET(txmb), regval); regval = 0; if (dlc > 4) @@ -909,26 +1221,26 @@ static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg) } } - can_putreg(priv, STM32L4_CAN_TDHR_OFFSET(txmb), regval); + stm32l4can_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 = stm32l4can_getreg(priv, STM32L4_CAN_IER_OFFSET); regval |= CAN_IER_TMEIE; - can_putreg(priv, STM32L4_CAN_IER_OFFSET, regval); + stm32l4can_putreg(priv, STM32L4_CAN_IER_OFFSET, regval); /* Request transmission */ - regval = can_getreg(priv, STM32L4_CAN_TIR_OFFSET(txmb)); + regval = stm32l4can_getreg(priv, STM32L4_CAN_TIR_OFFSET(txmb)); regval |= CAN_TIR_TXRQ; /* Transmit Mailbox Request */ - can_putreg(priv, STM32L4_CAN_TIR_OFFSET(txmb), regval); + stm32l4can_putreg(priv, STM32L4_CAN_TIR_OFFSET(txmb), regval); - can_dumpmbregs(priv, "After send"); + stm32l4can_dumpmbregs(priv, "After send"); return OK; } /**************************************************************************** - * Name: can_txready + * Name: stm32l4can_txready * * Description: * Return true if the CAN hardware can accept another TX message. @@ -941,15 +1253,15 @@ 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 stm32l4can_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); + regval = stm32l4can_getreg(priv, STM32L4_CAN_TSR_OFFSET); + caninfo("CAN%d TSR: %08x\n", priv->port, regval); if ((regval & CAN_ALL_MAILBOXES) != 0) { @@ -960,7 +1272,7 @@ static bool can_txready(FAR struct can_dev_s *dev) } /**************************************************************************** - * Name: can_txempty + * Name: stm32l4can_txempty * * Description: * Return true if all message have been sent. If for example, the CAN @@ -977,15 +1289,15 @@ static bool can_txready(FAR struct can_dev_s *dev) * ****************************************************************************/ -static bool can_txempty(FAR struct can_dev_s *dev) +static bool stm32l4can_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); + regval = stm32l4can_getreg(priv, STM32L4_CAN_TSR_OFFSET); + caninfo("CAN%d TSR: %08x\n", priv->port, regval); if ((regval & CAN_ALL_MAILBOXES) == CAN_ALL_MAILBOXES) { @@ -996,7 +1308,7 @@ static bool can_txempty(FAR struct can_dev_s *dev) } /**************************************************************************** - * Name: can_rx0interrupt + * Name: stm32l4can_rx0interrupt * * Description: * CAN RX FIFO 0 interrupt handler @@ -1010,7 +1322,7 @@ static bool can_txempty(FAR struct can_dev_s *dev) * ****************************************************************************/ -static int can_rx0interrupt(int irq, void *context) +static int stm32l4can_rx0interrupt(int irq, FAR void *context) { FAR struct can_dev_s *dev = NULL; FAR struct stm32l4_can_s *priv; @@ -1025,19 +1337,19 @@ static int can_rx0interrupt(int irq, void *context) /* Verify that a message is pending in FIFO 0 */ - regval = can_getreg(priv, STM32L4_CAN_RF0R_OFFSET); + regval = stm32l4can_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"); + canwarn("WARNING: No messages pending\n"); return OK; } - can_dumpmbregs(priv, "RX0 interrupt"); + stm32l4can_dumpmbregs(priv, "RX0 interrupt"); /* Get the CAN identifier. */ - regval = can_getreg(priv, STM32L4_CAN_RI0R_OFFSET); + regval = stm32l4can_getreg(priv, STM32L4_CAN_RI0R_OFFSET); #ifdef CONFIG_CAN_EXTID if ((regval & CAN_RIR_IDE) != 0) @@ -1053,7 +1365,7 @@ static int can_rx0interrupt(int irq, void *context) #else if ((regval & CAN_RIR_IDE) != 0) { - canlldbg("ERROR: Received message with extended identifier. Dropped\n"); + canerr("ERROR: Received message with extended identifier. Dropped\n"); ret = -ENOSYS; goto errout; } @@ -1074,18 +1386,18 @@ static int can_rx0interrupt(int irq, void *context) /* Get the DLC */ - regval = can_getreg(priv, STM32L4_CAN_RDT0R_OFFSET); + regval = stm32l4can_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); + regval = stm32l4can_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); + regval = stm32l4can_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; @@ -1100,14 +1412,14 @@ static int can_rx0interrupt(int irq, void *context) #ifndef CONFIG_CAN_EXTID errout: #endif - regval = can_getreg(priv, STM32L4_CAN_RF0R_OFFSET); + regval = stm32l4can_getreg(priv, STM32L4_CAN_RF0R_OFFSET); regval |= CAN_RFR_RFOM; - can_putreg(priv, STM32L4_CAN_RF0R_OFFSET, regval); + stm32l4can_putreg(priv, STM32L4_CAN_RF0R_OFFSET, regval); return ret; } /**************************************************************************** - * Name: can_txinterrupt + * Name: stm32l4can_txinterrupt * * Description: * CAN TX mailbox complete interrupt handler @@ -1121,7 +1433,7 @@ errout: * ****************************************************************************/ -static int can_txinterrupt(int irq, void *context) +static int stm32l4can_txinterrupt(int irq, FAR void *context) { FAR struct can_dev_s *dev = NULL; FAR struct stm32l4_can_s *priv; @@ -1132,7 +1444,7 @@ static int can_txinterrupt(int irq, void *context) /* Get the transmit status */ - regval = can_getreg(priv, STM32L4_CAN_TSR_OFFSET); + regval = stm32l4can_getreg(priv, STM32L4_CAN_TSR_OFFSET); /* Check for RQCP0: Request completed mailbox 0 */ @@ -1142,7 +1454,7 @@ static int can_txinterrupt(int irq, void *context) * ALST0 and TERR0) for Mailbox 0. */ - can_putreg(priv, STM32L4_CAN_TSR_OFFSET, CAN_TSR_RQCP0); + stm32l4can_putreg(priv, STM32L4_CAN_TSR_OFFSET, CAN_TSR_RQCP0); /* Check for errors */ @@ -1162,7 +1474,7 @@ static int can_txinterrupt(int irq, void *context) * ALST1 and TERR1) for Mailbox 1. */ - can_putreg(priv, STM32L4_CAN_TSR_OFFSET, CAN_TSR_RQCP1); + stm32l4can_putreg(priv, STM32L4_CAN_TSR_OFFSET, CAN_TSR_RQCP1); /* Check for errors */ @@ -1182,7 +1494,7 @@ static int can_txinterrupt(int irq, void *context) * ALST2 and TERR2) for Mailbox 2. */ - can_putreg(priv, STM32L4_CAN_TSR_OFFSET, CAN_TSR_RQCP2); + stm32l4can_putreg(priv, STM32L4_CAN_TSR_OFFSET, CAN_TSR_RQCP2); /* Check for errors */ @@ -1198,7 +1510,7 @@ static int can_txinterrupt(int irq, void *context) } /**************************************************************************** - * Name: can_bittiming + * Name: stm32l4can_bittiming * * Description: * Set the CAN bit timing register (BTR) based on the configured BAUD. @@ -1241,6 +1553,7 @@ static int can_txinterrupt(int irq, void *context) * Tbs1 = Tq * ts1 * Tbs2 = Tq * ts2 * Tq = brp * Tpclk1 + * baud = Fpclk1 / (brp * (1 + ts1 + ts2))) * * Where: * Tpclk1 is the period of the APB1 clock (PCLK1). @@ -1253,15 +1566,15 @@ static int can_txinterrupt(int irq, void *context) * ****************************************************************************/ -static int can_bittiming(struct stm32l4_can_s *priv) +static int stm32l4can_bittiming(FAR 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); + caninfo("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. * @@ -1314,7 +1627,7 @@ static int can_bittiming(struct stm32l4_can_s *priv) DEBUGASSERT(brp >= 1 && brp <= CAN_BTR_BRP_MAX); } - canllvdbg("TS1: %d TS2: %d BRP: %d\n", ts1, ts2, brp); + caninfo("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: @@ -1333,15 +1646,17 @@ static int can_bittiming(struct stm32l4_can_s *priv) tmp |= CAN_BTR_LBKM; #endif - can_putreg(priv, STM32L4_CAN_BTR_OFFSET, tmp); + stm32l4can_putreg(priv, STM32L4_CAN_BTR_OFFSET, tmp); return OK; } /**************************************************************************** - * Name: can_cellinit + * Name: stm32l4can_enterinitmode * * Description: - * CAN cell initialization + * Put the CAN cell in Initialization mode. This only disconnects the CAN + * peripheral, no registers are changed. The initialization mode is + * required to change the baud rate. * * Input Parameter: * priv - A pointer to the private data structure for this CAN block @@ -1351,35 +1666,24 @@ static int can_bittiming(struct stm32l4_can_s *priv) * ****************************************************************************/ -static int can_cellinit(struct stm32l4_can_s *priv) +static int stm32l4can_enterinitmode(FAR 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. */ + volatile uint32_t timeout; - regval |= CAN_MCR_TXFP; - can_putreg(priv, STM32L4_CAN_MCR_OFFSET, regval); + caninfo("CAN%d\n", priv->port); /* Enter initialization mode */ + regval = stm32l4can_getreg(priv, STM32L4_CAN_MCR_OFFSET); regval |= CAN_MCR_INRQ; - can_putreg(priv, STM32L4_CAN_MCR_OFFSET, regval); + stm32l4can_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); + regval = stm32l4can_getreg(priv, STM32L4_CAN_MSR_OFFSET); if ((regval & CAN_MSR_INAK) != 0) { /* We are in initialization mode */ @@ -1392,44 +1696,43 @@ static int can_cellinit(struct stm32l4_can_s *priv) if (timeout < 1) { - canlldbg("ERROR: Timed out waiting to enter initialization mode\n"); + canerr("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); + return 0; +} - /* Configure bit timing. */ +/**************************************************************************** + * Name: stm32l4can_exitinitmode + * + * Description: + * Put the CAN cell out of the Initialization mode (to Normal mode) + * + * 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. + * + ****************************************************************************/ - ret = can_bittiming(priv); - if (ret < 0) - { - canlldbg("ERROR: Failed to set bit timing: %d\n", ret); - return ret; - } +static int stm32l4can_exitinitmode(FAR struct stm32l4_can_s *priv) +{ + uint32_t regval; + volatile uint32_t timeout; - /* Exit initialization mode */ + /* Exit Initialization mode, enter Normal mode */ - regval = can_getreg(priv, STM32L4_CAN_MCR_OFFSET); + regval = stm32l4can_getreg(priv, STM32L4_CAN_MCR_OFFSET); regval &= ~CAN_MCR_INRQ; - can_putreg(priv, STM32L4_CAN_MCR_OFFSET, regval); + stm32l4can_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); + regval = stm32l4can_getreg(priv, STM32L4_CAN_MSR_OFFSET); if ((regval & CAN_MSR_INAK) == 0) { /* We are out of initialization mode */ @@ -1442,15 +1745,80 @@ static int can_cellinit(struct stm32l4_can_s *priv) if (timeout < 1) { - canlldbg("ERROR: Timed out waiting to exit initialization mode: %08x\n", regval); + canerr("ERROR: Timed out waiting to exit initialization mode: %08x\n", regval); return -ETIMEDOUT; } - return OK; + return 0; +} + +/**************************************************************************** + * Name: stm32l4can_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 stm32l4can_cellinit(FAR struct stm32l4_can_s *priv) +{ + uint32_t regval; + int ret; + + caninfo("CAN%d\n", priv->port); + + /* Exit from sleep mode */ + + regval = stm32l4can_getreg(priv, STM32L4_CAN_MCR_OFFSET); + regval &= ~CAN_MCR_SLEEP; + stm32l4can_putreg(priv, STM32L4_CAN_MCR_OFFSET, regval); + + /* Configure CAN behavior. Priority driven request order, not message ID. */ + + regval |= CAN_MCR_TXFP; + stm32l4can_putreg(priv, STM32L4_CAN_MCR_OFFSET, regval); + + ret = stm32l4can_enterinitmode(priv); + if(ret != 0) + { + return ret; + } + + /* 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 = stm32l4can_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); + stm32l4can_putreg(priv, STM32L4_CAN_MCR_OFFSET, regval); + + /* Configure bit timing. */ + + ret = stm32l4can_bittiming(priv); + if (ret < 0) + { + canerr("ERROR: Failed to set bit timing: %d\n", ret); + return ret; + } + + return stm32l4can_exitinitmode(priv); } /**************************************************************************** - * Name: can_filterinit + * Name: stm32l4can_filterinit * * Description: * CAN filter initialization. CAN filters are not currently used by this @@ -1466,7 +1834,7 @@ static int can_cellinit(struct stm32l4_can_s *priv) * 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 + * contains one CAN device. 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 @@ -1481,12 +1849,12 @@ static int can_cellinit(struct stm32l4_can_s *priv) * ****************************************************************************/ -static int can_filterinit(struct stm32l4_can_s *priv) +static int stm32l4can_filterinit(FAR struct stm32l4_can_s *priv) { uint32_t regval; uint32_t bitmask; - canllvdbg("CAN%d filter: %d\n", priv->port, priv->filter); + caninfo("CAN%d filter: %d\n", priv->port, priv->filter); /* Get the bitmask associated with the filter used by this CAN block */ @@ -1494,61 +1862,153 @@ static int can_filterinit(struct stm32l4_can_s *priv) /* Enter filter initialization mode */ - regval = can_getfreg(priv, STM32L4_CAN_FMR_OFFSET); + regval = stm32l4can_getfreg(priv, STM32L4_CAN_FMR_OFFSET); regval |= CAN_FMR_FINIT; - can_putfreg(priv, STM32L4_CAN_FMR_OFFSET, regval); + stm32l4can_putfreg(priv, STM32L4_CAN_FMR_OFFSET, regval); /* Disable the filter */ - regval = can_getfreg(priv, STM32L4_CAN_FA1R_OFFSET); + regval = stm32l4can_getfreg(priv, STM32L4_CAN_FA1R_OFFSET); regval &= ~bitmask; - can_putfreg(priv, STM32L4_CAN_FA1R_OFFSET, regval); + stm32l4can_putfreg(priv, STM32L4_CAN_FA1R_OFFSET, regval); /* Select the 32-bit scale for the filter */ - regval = can_getfreg(priv, STM32L4_CAN_FS1R_OFFSET); + regval = stm32l4can_getfreg(priv, STM32L4_CAN_FS1R_OFFSET); regval |= bitmask; - can_putfreg(priv, STM32L4_CAN_FS1R_OFFSET, regval); + stm32l4can_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); + stm32l4can_putfreg(priv, STM32L4_CAN_FIR_OFFSET(priv->filter, 1), 0); + stm32l4can_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 = stm32l4can_getfreg(priv, STM32L4_CAN_FM1R_OFFSET); regval &= ~bitmask; - can_putfreg(priv, STM32L4_CAN_FM1R_OFFSET, regval); + stm32l4can_putfreg(priv, STM32L4_CAN_FM1R_OFFSET, regval); /* Assign FIFO 0 for the filter */ - regval = can_getfreg(priv, STM32L4_CAN_FFA1R_OFFSET); + regval = stm32l4can_getfreg(priv, STM32L4_CAN_FFA1R_OFFSET); regval &= ~bitmask; - can_putfreg(priv, STM32L4_CAN_FFA1R_OFFSET, regval); + stm32l4can_putfreg(priv, STM32L4_CAN_FFA1R_OFFSET, regval); /* Enable the filter */ - regval = can_getfreg(priv, STM32L4_CAN_FA1R_OFFSET); + regval = stm32l4can_getfreg(priv, STM32L4_CAN_FA1R_OFFSET); regval |= bitmask; - can_putfreg(priv, STM32L4_CAN_FA1R_OFFSET, regval); + stm32l4can_putfreg(priv, STM32L4_CAN_FA1R_OFFSET, regval); /* Exit filter initialization mode */ - regval = can_getfreg(priv, STM32L4_CAN_FMR_OFFSET); + regval = stm32l4can_getfreg(priv, STM32L4_CAN_FMR_OFFSET); regval &= ~CAN_FMR_FINIT; - can_putfreg(priv, STM32L4_CAN_FMR_OFFSET, regval); + stm32l4can_putfreg(priv, STM32L4_CAN_FMR_OFFSET, regval); return OK; } +/**************************************************************************** + * Name: stm32l4can_addextfilter + * + * Description: + * Add a filter for extended CAN IDs + * + * Input Parameter: + * priv - A pointer to the private data structure for this CAN block + * arg - A pointer to a structure describing the filter + * + * Returned Value: + * A non-negative filter ID is returned on success. + * Otherwise -1 (ERROR) is returned with the errno + * set to indicate the nature of the error. + * + ****************************************************************************/ + +static int stm32l4can_addextfilter(FAR struct stm32l4_can_s *priv, + FAR struct canioc_extfilter_s *arg) +{ + return -ENOTTY; +} + +/**************************************************************************** + * Name: stm32l4can_delextfilter + * + * Description: + * Remove a filter for extended CAN IDs + * + * Input Parameter: + * priv - A pointer to the private data structure for this CAN block + * arg - The filter index previously returned by the + * CANIOC_ADD_EXTFILTER command + * + * Returned Value: + * Zero (OK) is returned on success. Otherwise -1 (ERROR) + * returned with the errno variable set to indicate the + * of the error. + * + ****************************************************************************/ + +static int stm32l4can_delextfilter(FAR struct stm32l4_can_s *priv, int arg) +{ + return -ENOTTY; +} + +/**************************************************************************** + * Name: stm32l4can_addextfilter + * + * Description: + * Add a filter for standard CAN IDs + * + * Input Parameter: + * priv - A pointer to the private data structure for this CAN block + * arg - A pointer to a structure describing the filter + * + * Returned Value: + * A non-negative filter ID is returned on success. + * Otherwise -1 (ERROR) is returned with the errno + * set to indicate the nature of the error. + * + ****************************************************************************/ + +static int stm32l4can_addstdfilter(FAR struct stm32l4_can_s *priv, + FAR struct canioc_stdfilter_s *arg) +{ + return -ENOTTY; +} + +/**************************************************************************** + * Name: stm32l4can_delstdfilter + * + * Description: + * Remove a filter for standard CAN IDs + * + * Input Parameter: + * priv - A pointer to the private data structure for this CAN block + * arg - The filter index previously returned by the + * CANIOC_ADD_STDFILTER command + * + * Returned Value: + * Zero (OK) is returned on success. Otherwise -1 (ERROR) + * returned with the errno variable set to indicate the + * of the error. + * + ****************************************************************************/ + +static int stm32l4can_delstdfilter(FAR struct stm32l4_can_s *priv, int arg) +{ + return -ENOTTY; +} + /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: stm32l4_caninitialize + * Name: stm32l4can_initialize * * Description: * Initialize the selected CAN port @@ -1561,11 +2021,11 @@ static int can_filterinit(struct stm32l4_can_s *priv) * ****************************************************************************/ -FAR struct can_dev_s *stm32l4_caninitialize(int port) +FAR struct can_dev_s *stm32l4can_initialize(int port) { - struct can_dev_s *dev = NULL; + FAR struct can_dev_s *dev = NULL; - canvdbg("CAN%d\n", port); + caninfo("CAN%d\n", port); /* NOTE: Peripherical clocking for CAN1 and/or CAN2 was already provided * by stm32l4_clockconfig() early in the reset sequence. @@ -1588,7 +2048,7 @@ FAR struct can_dev_s *stm32l4_caninitialize(int port) else #endif { - candbg("ERROR: Unsupported port %d\n", port); + canerr("ERROR: Unsupported port %d\n", port); return NULL; } diff --git a/arch/arm/src/stm32l4/stm32l4_can.h b/arch/arm/src/stm32l4/stm32l4_can.h index f9dad5d89fd8efcda29d4d6075b6f06f9b47b1ef..91b96c7c9b3ff64200a0bce99f30c752384978d6 100644 --- a/arch/arm/src/stm32l4/stm32l4_can.h +++ b/arch/arm/src/stm32l4/stm32l4_can.h @@ -131,7 +131,7 @@ extern "C" ****************************************************************************/ struct can_dev_s; -FAR struct can_dev_s *stm32l4_caninitialize(int port); +FAR struct can_dev_s *stm32l4can_initialize(int port); #undef EXTERN #if defined(__cplusplus) diff --git a/arch/arm/src/stm32l4/stm32l4_dma.h b/arch/arm/src/stm32l4/stm32l4_dma.h index ee11f8655c51bd08e8a975b45d77ec7e00cad7c9..c5ccf60b29d635c967af82f4ad0e7ce137602857 100644 --- a/arch/arm/src/stm32l4/stm32l4_dma.h +++ b/arch/arm/src/stm32l4/stm32l4_dma.h @@ -90,7 +90,7 @@ typedef FAR void *DMA_HANDLE; typedef void (*dma_callback_t)(DMA_HANDLE handle, uint8_t status, void *arg); -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO struct stm32l4_dmaregs_s { uint32_t isr; /* Interrupt Status Register; each channel gets 4 bits */ @@ -267,7 +267,7 @@ bool stm32l4_dmacapable(uintptr_t maddr, uint32_t count, uint32_t ccr); * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void stm32l4_dmasample(DMA_HANDLE handle, struct stm32l4_dmaregs_s *regs); #else # define stm32l4_dmasample(handle,regs) @@ -284,7 +284,7 @@ void stm32l4_dmasample(DMA_HANDLE handle, struct stm32l4_dmaregs_s *regs); * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void stm32l4_dmadump(DMA_HANDLE handle, const struct stm32l4_dmaregs_s *regs, const char *msg); #else diff --git a/arch/arm/src/stm32l4/stm32l4_flash.h b/arch/arm/src/stm32l4/stm32l4_flash.h index ecb6fccb0a9dba169d512e7a9eda3cffdb6b44ac..96bd6135d906376c076019b3e6c3ff1231180fd6 100644 --- a/arch/arm/src/stm32l4/stm32l4_flash.h +++ b/arch/arm/src/stm32l4/stm32l4_flash.h @@ -3,7 +3,7 @@ * * Copyright (C) 2009, 2011, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt - * David Sidrane + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/arch/arm/src/stm32l4/stm32l4_gpio.c b/arch/arm/src/stm32l4/stm32l4_gpio.c index 8ae6efdb11857001c0cbc7709d2601792d243248..0c3432d6e478692a468bbe59f3876e453d7f6fe8 100644 --- a/arch/arm/src/stm32l4/stm32l4_gpio.c +++ b/arch/arm/src/stm32l4/stm32l4_gpio.c @@ -176,6 +176,7 @@ int stm32l4_configgpio(uint32_t cfgset) break; case GPIO_OUTPUT: /* General purpose output mode */ + stm32l4_gpiowrite(cfgset, (cfgset & GPIO_OUTPUT_SET) != 0); /* Set the initial output value */ pinmode = GPIO_MODER_OUTPUT; break; @@ -305,17 +306,9 @@ int stm32l4_configgpio(uint32_t cfgset) putreg32(regval, base + STM32L4_GPIO_OTYPER_OFFSET); - /* If it is an output... set the pin to the correct initial state. */ - - if (pinmode == GPIO_MODER_OUTPUT) - { - bool value = ((cfgset & GPIO_OUTPUT_SET) != 0); - stm32l4_gpiowrite(cfgset, value); - } - /* Otherwise, it is an input pin. Should it configured as an EXTI interrupt? */ - else if ((cfgset & GPIO_EXTI) != 0) + if ((cfgset & GPIO_EXTI) != 0) { #if 0 /* "In STM32 F1 the selection of the EXTI line source is performed through diff --git a/arch/arm/src/stm32l4/stm32l4_gpio.h b/arch/arm/src/stm32l4/stm32l4_gpio.h index 185af4810fb0739ca3b612488e25f883c94bbf68..49f8c95fa5d97b32451c09add95b43e7c0f648cc 100644 --- a/arch/arm/src/stm32l4/stm32l4_gpio.h +++ b/arch/arm/src/stm32l4/stm32l4_gpio.h @@ -350,7 +350,7 @@ xcpt_t stm32l4_gpiosetevent(uint32_t pinset, bool risingedge, bool fallingedge, * ************************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES int stm32l4_dumpgpio(uint32_t pinset, const char *msg); #else # define stm32l4_dumpgpio(p,m) diff --git a/arch/arm/src/stm32l4/stm32l4_i2c.c b/arch/arm/src/stm32l4/stm32l4_i2c.c index 452b125e36140d76081d964a4b59fafb251c9aeb..ce6c91b677eeb15564e54bb6b6a8a7908d2951d5 100644 --- a/arch/arm/src/stm32l4/stm32l4_i2c.c +++ b/arch/arm/src/stm32l4/stm32l4_i2c.c @@ -146,15 +146,6 @@ #define STATUS_BUSY(status) (status & I2C_ISR_BUSY) /* Debug ****************************************************************************/ -/* CONFIG_DEBUG_I2C + CONFIG_DEBUG enables general I2C debug output. */ - -#ifdef CONFIG_DEBUG_I2C -# define i2cdbg dbg -# define i2cvdbg vdbg -#else -# define i2cdbg(x...) -# define i2cvdbg(x...) -#endif /* I2C event trace logic. NOTE: trace uses the internal, non-standard, low-level * debug interface syslog() but does not require that any other debug @@ -671,7 +662,7 @@ static inline int stm32l4_i2c_sem_waitdone(FAR struct stm32l4_i2c_priv_s *priv) while (priv->intstate != INTSTATE_DONE && elapsed < timeout); - i2cvdbg("intstate: %d elapsed: %ld threshold: %ld status: %08x\n", + i2cinfo("intstate: %d elapsed: %ld threshold: %ld status: %08x\n", priv->intstate, (long)elapsed, (long)timeout, priv->status); /* Set the interrupt state back to IDLE */ @@ -825,7 +816,7 @@ static inline void stm32l4_i2c_sem_waitstop(FAR struct stm32l4_i2c_priv_s *priv) * still pending. */ - i2cvdbg("Timeout with CR: %04x SR: %04x\n", cr, sr); + i2cinfo("Timeout with CR: %04x SR: %04x\n", cr, sr); } /************************************************************************************ @@ -919,7 +910,7 @@ static void stm32l4_i2c_tracenew(FAR struct stm32l4_i2c_priv_s *priv, if (priv->tndx >= (CONFIG_I2C_NTRACE-1)) { - i2cdbg("Trace table overflow\n"); + i2cerr("ERROR: Trace table overflow\n"); return; } @@ -960,7 +951,7 @@ static void stm32l4_i2c_traceevent(FAR struct stm32l4_i2c_priv_s *priv, if (priv->tndx >= (CONFIG_I2C_NTRACE-1)) { - i2cdbg("Trace table overflow\n"); + i2cerr("ERROR: Trace table overflow\n"); return; } @@ -1731,7 +1722,7 @@ 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: %08x status: %08x\n", + i2cerr("ERROR: 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 diff --git a/arch/arm/src/stm32l4/stm32l4_idle.c b/arch/arm/src/stm32l4/stm32l4_idle.c index 7cf0734c22d1b88ca12b91ce3bb62b75b4139aa1..60dacd2928d9f6f9920015748ffbcd6b816e713a 100644 --- a/arch/arm/src/stm32l4/stm32l4_idle.c +++ b/arch/arm/src/stm32l4/stm32l4_idle.c @@ -101,7 +101,7 @@ static void up_idlepm(void) /* Perform board-specific, state-dependent logic here */ - llvdbg("newstate= %d oldstate=%d\n", newstate, oldstate); + _info("newstate= %d oldstate=%d\n", newstate, oldstate); /* Then force the global state change */ diff --git a/arch/arm/src/stm32l4/stm32l4_irq.c b/arch/arm/src/stm32l4/stm32l4_irq.c index e0e963c66df118d575182ab6d4f51e361a7a64ea..4742d5c95b59eb1ab60a048d9e90d12f43d702bf 100644 --- a/arch/arm/src/stm32l4/stm32l4_irq.c +++ b/arch/arm/src/stm32l4/stm32l4_irq.c @@ -106,40 +106,42 @@ extern uint32_t _vectors[]; * ****************************************************************************/ -#if defined(CONFIG_DEBUG_IRQ) +#if defined(CONFIG_DEBUG_IRQ_INFO) static void stm32l4_dumpnvic(const char *msg, int irq) { irqstate_t flags; flags = enter_critical_section(); - lldbg("NVIC (%s, irq=%d):\n", msg, irq); - lldbg(" INTCTRL: %08x VECTAB: %08x\n", - getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB)); + + irqinfo("NVIC (%s, irq=%d):\n", msg, irq); + irqinfo(" INTCTRL: %08x VECTAB: %08x\n", + getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB)); #if 0 - lldbg(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n", - getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA), - getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE)); + irqinfo(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n", + getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA), + getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE)); #endif - lldbg(" IRQ ENABLE: %08x %08x %08x\n", - getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE), - getreg32(NVIC_IRQ64_95_ENABLE)); - lldbg(" SYSH_PRIO: %08x %08x %08x\n", - getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY), - getreg32(NVIC_SYSH12_15_PRIORITY)); - lldbg(" IRQ PRIO: %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY), - getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY)); - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY), - getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY)); - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY), - getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY)); - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ48_51_PRIORITY), getreg32(NVIC_IRQ52_55_PRIORITY), - getreg32(NVIC_IRQ56_59_PRIORITY), getreg32(NVIC_IRQ60_63_PRIORITY)); - lldbg(" %08x\n", - getreg32(NVIC_IRQ64_67_PRIORITY)); + irqinfo(" IRQ ENABLE: %08x %08x %08x\n", + getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE), + getreg32(NVIC_IRQ64_95_ENABLE)); + irqinfo(" SYSH_PRIO: %08x %08x %08x\n", + getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY), + getreg32(NVIC_SYSH12_15_PRIORITY)); + irqinfo(" IRQ PRIO: %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY), + getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY), + getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY), + getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ48_51_PRIORITY), getreg32(NVIC_IRQ52_55_PRIORITY), + getreg32(NVIC_IRQ56_59_PRIORITY), getreg32(NVIC_IRQ60_63_PRIORITY)); + irqinfo(" %08x\n", + getreg32(NVIC_IRQ64_67_PRIORITY)); + leave_critical_section(flags); } #else @@ -157,11 +159,11 @@ static void stm32l4_dumpnvic(const char *msg, int irq) * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES static int stm32l4_nmi(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! NMI received\n"); + _err("PANIC!!! NMI received\n"); PANIC(); return 0; } @@ -169,7 +171,7 @@ static int stm32l4_nmi(int irq, FAR void *context) static int stm32l4_busfault(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS)); + _err("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS)); PANIC(); return 0; } @@ -177,7 +179,7 @@ static int stm32l4_busfault(int irq, FAR void *context) static int stm32l4_usagefault(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS)); + _err("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS)); PANIC(); return 0; } @@ -185,7 +187,7 @@ static int stm32l4_usagefault(int irq, FAR void *context) static int stm32l4_pendsv(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! PendSV received\n"); + _err("PANIC!!! PendSV received\n"); PANIC(); return 0; } @@ -193,7 +195,7 @@ static int stm32l4_pendsv(int irq, FAR void *context) static int stm32l4_dbgmonitor(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Debug Monitor received\n"); + _err("PANIC!!! Debug Monitor received\n"); PANIC(); return 0; } @@ -201,7 +203,7 @@ static int stm32l4_dbgmonitor(int irq, FAR void *context) static int stm32l4_reserved(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Reserved interrupt\n"); + _err("PANIC!!! Reserved interrupt\n"); PANIC(); return 0; } @@ -403,7 +405,7 @@ void up_irqinitialize(void) /* Attach all other processor exceptions (except reset and sys tick) */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES irq_attach(STM32L4_IRQ_NMI, stm32l4_nmi); #ifndef CONFIG_ARM_MPU irq_attach(STM32L4_IRQ_MEMFAULT, up_memfault); diff --git a/arch/arm/src/stm32l4/stm32l4_qspi.c b/arch/arm/src/stm32l4/stm32l4_qspi.c index 57aa85dac0522c3b406c537b29111579df663bdb..db01e22bba79a21901c518c521fc40fb89b4333c 100644 --- a/arch/arm/src/stm32l4/stm32l4_qspi.c +++ b/arch/arm/src/stm32l4/stm32l4_qspi.c @@ -85,33 +85,12 @@ #define IS_ALIGNED(n) (((uint32_t)(n) & ALIGN_MASK) == 0) /* Debug *******************************************************************/ -/* Check if QSPI debug is enabled (non-standard.. no support in - * include/debug.h - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_SPI -# undef CONFIG_STM32L4_QSPI_DMADEBUG -# undef CONFIG_STM32L4_QSPI_REGDEBUG -#endif +/* Check if QSPI debug is enabled */ #ifndef CONFIG_DEBUG_DMA # undef CONFIG_STM32L4_QSPI_DMADEBUG #endif -#ifdef CONFIG_DEBUG_SPI -# define qspidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define qspivdbg lldbg -# else -# define qspivdbg(x...) -# endif -#else -# define qspidbg(x...) -# define qspivdbg(x...) -#endif - #define DMA_INITIAL 0 #define DMA_AFTER_SETUP 1 #define DMA_AFTER_START 2 @@ -286,13 +265,13 @@ static inline uint32_t qspi_getreg(struct stm32l4_qspidev_s *priv, static inline void qspi_putreg(struct stm32l4_qspidev_s *priv, uint32_t value, unsigned int offset); -#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_SPI_INFO static void qspi_dumpregs(struct stm32l4_qspidev_s *priv, const char *msg); #else # define qspi_dumpregs(priv,msg) #endif -#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_GPIO) +#if defined(CONFIG_DEBUG_SPI_INFO) && defined(CONFIG_DEBUG_GPIO) static void qspi_dumpgpioconfig(const char *msg); #else # define qspi_dumpgpioconfig(msg) @@ -426,7 +405,7 @@ static bool qspi_checkreg(struct stm32l4_qspidev_s *priv, bool wr, uint32_t valu { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", priv->ntimes); + spiinfo("...[Repeats %d times]...\n", priv->ntimes); } /* Save information about the new access */ @@ -460,7 +439,7 @@ static inline uint32_t qspi_getreg(struct stm32l4_qspidev_s *priv, #ifdef CONFIG_STM32L4_QSPI_REGDEBUG if (qspi_checkreg(priv, false, value, address)) { - lldbg("%08x->%08x\n", address, value); + spiinfo("%08x->%08x\n", address, value); } #endif @@ -483,7 +462,7 @@ static inline void qspi_putreg(struct stm32l4_qspidev_s *priv, uint32_t value, #ifdef CONFIG_STM32L4_QSPI_REGDEBUG if (qspi_checkreg(priv, true, value, address)) { - lldbg("%08x<-%08x\n", address, value); + spiinfo("%08x<-%08x\n", address, value); } #endif @@ -505,11 +484,11 @@ static inline void qspi_putreg(struct stm32l4_qspidev_s *priv, uint32_t value, * ****************************************************************************/ -#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_SPI_INFO static void qspi_dumpregs(struct stm32l4_qspidev_s *priv, const char *msg) { uint32_t regval; - qspivdbg("%s:\n", msg); + spiinfo("%s:\n", msg); #if 0 /* this extra verbose output may be helpful in some cases; you'll need @@ -517,77 +496,73 @@ static void qspi_dumpregs(struct stm32l4_qspidev_s *priv, const char *msg) */ regval = getreg32(priv->base + STM32L4_QUADSPI_CR_OFFSET); /* Control Register */ - qspivdbg("CR:%08x\n",regval); - qspivdbg(" EN:%1d ABORT:%1d DMAEN:%1d TCEN:%1d SSHIFT:%1d\n" - " FTHRES: %d\n" - " TEIE:%1d TCIE:%1d FTIE:%1d SMIE:%1d TOIE:%1d APMS:%1d PMM:%1d\n" - " PRESCALER: %d\n", - (regval&QSPI_CR_EN)?1:0, - (regval&QSPI_CR_ABORT)?1:0, - (regval&QSPI_CR_DMAEN)?1:0, - (regval&QSPI_CR_TCEN)?1:0, - (regval&QSPI_CR_SSHIFT)?1:0, - (regval&QSPI_CR_FTHRES_MASK)>>QSPI_CR_FTHRES_SHIFT, - (regval&QSPI_CR_TEIE)?1:0, - (regval&QSPI_CR_TCIE)?1:0, - (regval&QSPI_CR_FTIE)?1:0, - (regval&QSPI_CR_SMIE)?1:0, - (regval&QSPI_CR_TOIE)?1:0, - (regval&QSPI_CR_APMS)?1:0, - (regval&QSPI_CR_PMM)?1:0, - (regval&QSPI_CR_PRESCALER_MASK)>>QSPI_CR_PRESCALER_SHIFT - ); + spiinfo("CR:%08x\n",regval); + spiinfo(" EN:%1d ABORT:%1d DMAEN:%1d TCEN:%1d SSHIFT:%1d\n" + " FTHRES: %d\n" + " TEIE:%1d TCIE:%1d FTIE:%1d SMIE:%1d TOIE:%1d APMS:%1d PMM:%1d\n" + " PRESCALER: %d\n", + (regval & QSPI_CR_EN) ? 1 : 0, + (regval & QSPI_CR_ABORT) ? 1 : 0, + (regval & QSPI_CR_DMAEN) ? 1 : 0, + (regval & QSPI_CR_TCEN) ? 1 : 0, + (regval & QSPI_CR_SSHIFT) ? 1 : 0, + (regval & QSPI_CR_FTHRES_MASK) >> QSPI_CR_FTHRES_SHIFT, + (regval & QSPI_CR_TEIE) ? 1 : 0, + (regval & QSPI_CR_TCIE) ? 1 : 0, + (regval & QSPI_CR_FTIE) ? 1 : 0, + (regval & QSPI_CR_SMIE) ? 1 : 0, + (regval & QSPI_CR_TOIE) ? 1 : 0, + (regval & QSPI_CR_APMS) ? 1 : 0, + (regval & QSPI_CR_PMM) ? 1 : 0, + (regval & QSPI_CR_PRESCALER_MASK) >> QSPI_CR_PRESCALER_SHIFT); regval = getreg32(priv->base + STM32L4_QUADSPI_DCR_OFFSET); /* Device Configuration Register */ - qspivdbg("DCR:%08x\n",regval); - qspivdbg(" CKMODE:%1d CSHT:%d FSIZE:%d\n", - (regval&QSPI_DCR_CKMODE)?1:0, - (regval&QSPI_DCR_CSHT_MASK)>>QSPI_DCR_CSHT_SHIFT, - (regval&QSPI_DCR_FSIZE_MASK)>>QSPI_DCR_FSIZE_SHIFT - ); + spiinfo("DCR:%08x\n",regval); + spiinfo(" CKMODE:%1d CSHT:%d FSIZE:%d\n", + (regval & QSPI_DCR_CKMODE) ? 1 : 0, + (regval & QSPI_DCR_CSHT_MASK) >> QSPI_DCR_CSHT_SHIFT, + (regval & QSPI_DCR_FSIZE_MASK) >> QSPI_DCR_FSIZE_SHIFT); regval = getreg32(priv->base + STM32L4_QUADSPI_CCR_OFFSET); /* Communication Configuration Register */ - qspivdbg("CCR:%08x\n",regval); - qspivdbg(" INST:%02x IMODE:%d ADMODE:%d ADSIZE:%d ABMODE:%d\n" - " ABSIZE:%d DCYC:%d DMODE:%d FMODE:%d\n" - " SIOO:%1d DDRM:%1d\n", - (regval&QSPI_CCR_INSTRUCTION_MASK)>>QSPI_CCR_INSTRUCTION_SHIFT, - (regval&QSPI_CCR_IMODE_MASK)>>QSPI_CCR_IMODE_SHIFT, - (regval&QSPI_CCR_ADMODE_MASK)>>QSPI_CCR_ADMODE_SHIFT, - (regval&QSPI_CCR_ADSIZE_MASK)>>QSPI_CCR_ABSIZE_SHIFT, - (regval&QSPI_CCR_ABMODE_MASK)>>QSPI_CCR_ABMODE_SHIFT, - (regval&QSPI_CCR_ABSIZE_MASK)>>QSPI_CCR_ABSIZE_SHIFT, - (regval&QSPI_CCR_DCYC_MASK)>>QSPI_CCR_DCYC_SHIFT, - (regval&QSPI_CCR_DMODE_MASK)>>QSPI_CCR_DMODE_SHIFT, - (regval&QSPI_CCR_FMODE_MASK)>>QSPI_CCR_FMODE_SHIFT, - (regval&QSPI_CCR_SIOO)?1:0, - (regval&QSPI_CCR_DDRM)?1:0 - ); + spiinfo("CCR:%08x\n",regval); + spiinfo(" INST:%02x IMODE:%d ADMODE:%d ADSIZE:%d ABMODE:%d\n" + " ABSIZE:%d DCYC:%d DMODE:%d FMODE:%d\n" + " SIOO:%1d DDRM:%1d\n", + (regval & QSPI_CCR_INSTRUCTION_MASK) >> QSPI_CCR_INSTRUCTION_SHIFT, + (regval & QSPI_CCR_IMODE_MASK) >> QSPI_CCR_IMODE_SHIFT, + (regval & QSPI_CCR_ADMODE_MASK) >> QSPI_CCR_ADMODE_SHIFT, + (regval & QSPI_CCR_ADSIZE_MASK) >> QSPI_CCR_ABSIZE_SHIFT, + (regval & QSPI_CCR_ABMODE_MASK) >> QSPI_CCR_ABMODE_SHIFT, + (regval & QSPI_CCR_ABSIZE_MASK) >> QSPI_CCR_ABSIZE_SHIFT, + (regval & QSPI_CCR_DCYC_MASK) >> QSPI_CCR_DCYC_SHIFT, + (regval & QSPI_CCR_DMODE_MASK) >> QSPI_CCR_DMODE_SHIFT, + (regval & QSPI_CCR_FMODE_MASK) >> QSPI_CCR_FMODE_SHIFT, + (regval & QSPI_CCR_SIOO) ? 1 : 0, + (regval & QSPI_CCR_DDRM) ? 1 : 0); regval = getreg32(priv->base + STM32L4_QUADSPI_SR_OFFSET); /* Status Register */ - qspivdbg("SR:%08x\n",regval); - qspivdbg(" TEF:%1d TCF:%1d FTF:%1d SMF:%1d TOF:%1d BUSY:%1d FLEVEL:%d\n", - (regval&QSPI_SR_TEF)?1:0, - (regval&QSPI_SR_TCF)?1:0, - (regval&QSPI_SR_FTF)?1:0, - (regval&QSPI_SR_SMF)?1:0, - (regval&QSPI_SR_TOF)?1:0, - (regval&QSPI_SR_BUSY)?1:0, - (regval&QSPI_SR_FLEVEL_MASK)>>QSPI_SR_FLEVEL_SHIFT - ); + spiinfo("SR:%08x\n",regval); + spiinfo(" TEF:%1d TCF:%1d FTF:%1d SMF:%1d TOF:%1d BUSY:%1d FLEVEL:%d\n", + (regval & QSPI_SR_TEF) ? 1 : 0, + (regval & QSPI_SR_TCF) ? 1 : 0, + (regval & QSPI_SR_FTF) ? 1 : 0, + (regval & QSPI_SR_SMF) ? 1 : 0, + (regval & QSPI_SR_TOF) ? 1 : 0, + (regval & QSPI_SR_BUSY) ? 1 : 0, + (regval & QSPI_SR_FLEVEL_MASK) >> QSPI_SR_FLEVEL_SHIFT); #else - qspivdbg(" CR:%08x DCR:%08x CCR:%08x SR:%08x\n", + spiinfo(" CR:%08x DCR:%08x CCR:%08x SR:%08x\n", getreg32(priv->base + STM32L4_QUADSPI_CR_OFFSET), /* Control Register */ getreg32(priv->base + STM32L4_QUADSPI_DCR_OFFSET), /* Device Configuration Register */ getreg32(priv->base + STM32L4_QUADSPI_CCR_OFFSET), /* Communication Configuration Register */ getreg32(priv->base + STM32L4_QUADSPI_SR_OFFSET)); /* Status Register */ - qspivdbg(" DLR:%08x ABR:%08x PSMKR:%08x PSMAR:%08x\n", + spiinfo(" DLR:%08x ABR:%08x PSMKR:%08x PSMAR:%08x\n", getreg32(priv->base + STM32L4_QUADSPI_DLR_OFFSET), /* Data Length Register */ getreg32(priv->base + STM32L4_QUADSPI_ABR_OFFSET), /* Alternate Bytes Register */ getreg32(priv->base + STM32L4_QUADSPI_PSMKR_OFFSET), /* Polling Status mask Register */ getreg32(priv->base + STM32L4_QUADSPI_PSMAR_OFFSET)); /* Polling Status match Register */ - qspivdbg(" PIR:%08x LPTR:%08x\n", + spiinfo(" PIR:%08x LPTR:%08x\n", getreg32(priv->base + STM32L4_QUADSPI_PIR_OFFSET), /* Polling Interval Register */ getreg32(priv->base + STM32L4_QUADSPI_LPTR_OFFSET)); /* Low-Power Timeout Register */ (void)regval; @@ -595,29 +570,29 @@ static void qspi_dumpregs(struct stm32l4_qspidev_s *priv, const char *msg) } #endif -#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_GPIO) +#if defined(CONFIG_DEBUG_SPI_INFO) && defined(CONFIG_DEBUG_GPIO) static void qspi_dumpgpioconfig(const char *msg) { uint32_t regval; - qspivdbg("%s:\n", msg); + spiinfo("%s:\n", msg); regval = getreg32(STM32L4_GPIOE_MODER); - qspivdbg("E_MODER:%08x\n",regval); + spiinfo("E_MODER:%08x\n",regval); regval = getreg32(STM32L4_GPIOE_OTYPER); - qspivdbg("E_OTYPER:%08x\n",regval); + spiinfo("E_OTYPER:%08x\n",regval); regval = getreg32(STM32L4_GPIOE_OSPEED); - qspivdbg("E_OSPEED:%08x\n",regval); + spiinfo("E_OSPEED:%08x\n",regval); regval = getreg32(STM32L4_GPIOE_PUPDR); - qspivdbg("E_PUPDR:%08x\n",regval); + spiinfo("E_PUPDR:%08x\n",regval); regval = getreg32(STM32L4_GPIOE_AFRL); - qspivdbg("E_AFRL:%08x\n",regval); + spiinfo("E_AFRL:%08x\n",regval); regval = getreg32(STM32L4_GPIOE_AFRH); - qspivdbg("E_AFRH:%08x\n",regval); + spiinfo("E_AFRH:%08x\n",regval); } #endif @@ -728,21 +703,21 @@ static int qspi_setupxctnfromcmd(struct qspi_xctnspec_s *xctn, { DEBUGASSERT(xctn != NULL && cmdinfo != NULL); -#ifdef CONFIG_DEBUG_SPI - qspivdbg("Transfer:\n"); - qspivdbg(" flags: %02x\n", cmdinfo->flags); - qspivdbg(" cmd: %04x\n", cmdinfo->cmd); +#ifdef CONFIG_DEBUG_SPI_INFO + spiinfo("Transfer:\n"); + spiinfo(" flags: %02x\n", cmdinfo->flags); + spiinfo(" cmd: %04x\n", cmdinfo->cmd); if (QSPICMD_ISADDRESS(cmdinfo->flags)) { - qspivdbg(" address/length: %08lx/%d\n", + spiinfo(" address/length: %08lx/%d\n", (unsigned long)cmdinfo->addr, cmdinfo->addrlen); } if (QSPICMD_ISDATA(cmdinfo->flags)) { - qspivdbg(" %s Data:\n", QSPICMD_ISWRITE(cmdinfo->flags) ? "Write" : "Read"); - qspivdbg(" buffer/length: %p/%d\n", cmdinfo->buffer, cmdinfo->buflen); + spiinfo(" %s Data:\n", QSPICMD_ISWRITE(cmdinfo->flags) ? "Write" : "Read"); + spiinfo(" buffer/length: %p/%d\n", cmdinfo->buffer, cmdinfo->buflen); } #endif @@ -852,14 +827,14 @@ static int qspi_setupxctnfrommem(struct qspi_xctnspec_s *xctn, { DEBUGASSERT(xctn != NULL && meminfo != NULL); -#ifdef CONFIG_DEBUG_SPI - qspivdbg("Transfer:\n"); - qspivdbg(" flags: %02x\n", meminfo->flags); - qspivdbg(" cmd: %04x\n", meminfo->cmd); - qspivdbg(" address/length: %08lx/%d\n", +#ifdef CONFIG_DEBUG_SPI_INFO + spiinfo("Transfer:\n"); + spiinfo(" flags: %02x\n", meminfo->flags); + spiinfo(" cmd: %04x\n", meminfo->cmd); + spiinfo(" address/length: %08lx/%d\n", (unsigned long)meminfo->addr, meminfo->addrlen); - qspivdbg(" %s Data:\n", QSPIMEM_ISWRITE(meminfo->flags) ? "Write" : "Read"); - qspivdbg(" buffer/length: %p/%d\n", meminfo->buffer, meminfo->buflen); + spiinfo(" %s Data:\n", QSPIMEM_ISWRITE(meminfo->flags) ? "Write" : "Read"); + spiinfo(" buffer/length: %p/%d\n", meminfo->buffer, meminfo->buflen); #endif DEBUGASSERT(meminfo->cmd < 256); @@ -1472,7 +1447,7 @@ static int qspi_memory_dma(struct stm32l4_qspidev_s *priv, (wdentry_t)qspi_dma_timeout, 1, (uint32_t)priv); if (ret != OK) { - qspidbg("ERROR: wd_start failed: %d\n", ret); + spierr("ERROR: wd_start failed: %d\n", ret); } /* Wait for the DMA complete */ @@ -1535,7 +1510,7 @@ static int qspi_memory_dma(struct stm32l4_qspidev_s *priv, if (priv->result) { - qspidbg("ERROR: DMA failed with result: %d\n", priv->result); + spierr("ERROR: DMA failed with result: %d\n", priv->result); } return priv->result; @@ -1705,7 +1680,7 @@ static int qspi_lock(struct qspi_dev_s *dev, bool lock) { struct stm32l4_qspidev_s *priv = (struct stm32l4_qspidev_s *)dev; - qspivdbg("lock=%d\n", lock); + spiinfo("lock=%d\n", lock); if (lock) { /* Take the semaphore (perhaps waiting) */ @@ -1758,7 +1733,7 @@ static uint32_t qspi_setfrequency(struct qspi_dev_s *dev, uint32_t frequency) return 0; } - qspivdbg("frequency=%d\n", frequency); + spiinfo("frequency=%d\n", frequency); DEBUGASSERT(priv); /* Wait till BUSY flag reset */ @@ -1810,14 +1785,14 @@ static uint32_t qspi_setfrequency(struct qspi_dev_s *dev, uint32_t frequency) /* Calculate the new actual frequency */ actual = STL32L4_QSPI_CLOCK / prescaler; - qspivdbg("prescaler=%d actual=%d\n", prescaler, actual); + spiinfo("prescaler=%d actual=%d\n", prescaler, actual); /* Save the frequency setting */ priv->frequency = frequency; priv->actual = actual; - qspivdbg("Frequency %d->%d\n", frequency, actual); + spiinfo("Frequency %d->%d\n", frequency, actual); return actual; } @@ -1850,7 +1825,7 @@ static void qspi_setmode(struct qspi_dev_s *dev, enum qspi_mode_e mode) return; } - qspivdbg("mode=%d\n", mode); + spiinfo("mode=%d\n", mode); /* Has the mode changed? */ @@ -1880,14 +1855,14 @@ static void qspi_setmode(struct qspi_dev_s *dev, enum qspi_mode_e mode) case QSPIDEV_MODE1: /* CPOL=0; CPHA=1 */ case QSPIDEV_MODE2: /* CPOL=1; CPHA=0 */ - qspivdbg("unsupported mode=%d\n", mode); + spiinfo("unsupported mode=%d\n", mode); default: DEBUGASSERT(FALSE); return; } qspi_putreg(priv, regval, STM32L4_QUADSPI_DCR); - qspivdbg("DCR=%08x\n", regval); + spiinfo("DCR=%08x\n", regval); /* Save the mode so that subsequent re-configurations will be faster */ @@ -1917,7 +1892,7 @@ static void qspi_setbits(struct qspi_dev_s *dev, int nbits) if (8 != nbits) { - qspivdbg("unsupported nbits=%d\n", nbits); + spiinfo("unsupported nbits=%d\n", nbits); DEBUGASSERT(FALSE); } } @@ -2456,7 +2431,7 @@ struct qspi_dev_s *stm32l4_qspi_initialize(int intf) /* The STM32L4 has only a single QSPI port */ - qspivdbg("intf: %d\n", intf); + spiinfo("intf: %d\n", intf); DEBUGASSERT(intf == 0); /* Select the QSPI interface */ @@ -2497,7 +2472,7 @@ struct qspi_dev_s *stm32l4_qspi_initialize(int intf) } else { - qspidbg("ERROR: QSPI%d not supported\n", intf); + spierr("ERROR: QSPI%d not supported\n", intf); return NULL; } @@ -2520,7 +2495,7 @@ struct qspi_dev_s *stm32l4_qspi_initialize(int intf) priv->dmach = stm32l4_dmachannel(DMACHAN_QUADSPI); if (!priv->dmach) { - qspidbg("ERROR: Failed to allocate the DMA channel\n"); + spierr("ERROR: Failed to allocate the DMA channel\n"); priv->candma = false; } } @@ -2536,7 +2511,7 @@ struct qspi_dev_s *stm32l4_qspi_initialize(int intf) priv->dmadog = wd_create(); if (priv->dmadog == NULL) { - qspidbg("ERROR: Failed to create wdog\n"); + spierr("ERROR: Failed to create wdog\n"); goto errout_with_dmahandles; } #endif @@ -2547,7 +2522,7 @@ struct qspi_dev_s *stm32l4_qspi_initialize(int intf) ret = irq_attach(priv->irq, priv->handler); if (ret < 0) { - qspidbg("ERROR: Failed to attach irq %d\n", priv->irq); + spierr("ERROR: Failed to attach irq %d\n", priv->irq); goto errout_with_dmadog; } @@ -2564,7 +2539,7 @@ struct qspi_dev_s *stm32l4_qspi_initialize(int intf) ret = qspi_hw_initialize(priv); if (ret < 0) { - qspidbg("ERROR: Failed to initialize QSPI hardware\n"); + spierr("ERROR: Failed to initialize QSPI hardware\n"); goto errout_with_irq; } diff --git a/arch/arm/src/stm32l4/stm32l4_rcc.c b/arch/arm/src/stm32l4/stm32l4_rcc.c index 0d51d7afd16a25cd3a1678ba96da8cab4f358bda..34e6052eefe4fe1a84c5907651a5d95f41b4fe44 100644 --- a/arch/arm/src/stm32l4/stm32l4_rcc.c +++ b/arch/arm/src/stm32l4/stm32l4_rcc.c @@ -88,17 +88,68 @@ * Public Functions ****************************************************************************/ -/************************************************************************************ - * Name: stm32l4_clockconfig +/**************************************************************************** + * Name: rcc_resetbkp * * Description: - * Called to establish the clock settings based on the values in board.h. This - * function (by default) will reset most everything, enable the PLL, and enable - * peripheral clocking for all periperipherals enabled in the NuttX configuration - * file. + * The RTC needs to reset the Backup Domain to change RTCSEL and resetting + * the Backup Domain renders to disabling the LSE as consequence. In order + * to avoid resetting the Backup Domain when we already configured LSE we + * will reset the Backup Domain early (here). * - * If CONFIG_ARCH_BOARD_STM32L4_CUSTOM_CLOCKCONFIG is defined, then clocking will - * be enabled by an externally provided, board-specific function called + * Input Parameters: + * None + * + * Returned Value: + * None + * + ****************************************************************************/ + +#if defined(CONFIG_STM32_PWR) && defined(CONFIG_RTC) +static inline void rcc_resetbkp(void) +{ + bool init_stat; + + /* Check if the RTC is already configured */ + + init_stat = rtc_is_inits(); + if(!init_stat) + { + /* Enable write access to the backup domain (RTC registers, RTC + * backup data registers and backup SRAM). + */ + + (void)stm32l4_pwr_enablebkp(true); + + /* We might be changing RTCSEL - to ensure such changes work, we must + * reset the backup domain (having backed up the RTC_MAGIC token) + */ + + modifyreg32(STM32L4_RCC_BDCR, 0, RCC_BDCR_BDRST); + modifyreg32(STM32L4_RCC_BDCR, RCC_BDCR_BDRST, 0); + + (void)stm32l4_pwr_enablebkp(false); + } +} +#else +# define rcc_resetbkp() +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_clockconfig + * + * Description: + * Called to establish the clock settings based on the values in board.h. + * This function (by default) will reset most everything, enable the PLL, + * and enable peripheral clocking for all peripherals enabled in the NuttX + * configuration file. + * + * If CONFIG_ARCH_BOARD_STM32L4_CUSTOM_CLOCKCONFIG is defined, then clocking + * will be enabled by an externally provided, board-specific function called * stm32l4_board_clockconfig(). * * Input Parameters: @@ -107,7 +158,7 @@ * Returned Value: * None * - ************************************************************************************/ + ****************************************************************************/ void stm32l4_clockconfig(void) { @@ -115,6 +166,10 @@ void stm32l4_clockconfig(void) rcc_reset(); + /* Reset backup domain if appropriate */ + + rcc_resetbkp(); + #if defined(CONFIG_ARCH_BOARD_STM32L4_CUSTOM_CLOCKCONFIG) /* Invoke Board Custom Clock Configuration */ diff --git a/arch/arm/src/stm32l4/stm32l4_rng.c b/arch/arm/src/stm32l4/stm32l4_rng.c index b82c42fdc20a96b8dfdd3563c15f21a1d3ac9611..f9324fb6f1ef6e154b7573d82be1412bc3706c40 100644 --- a/arch/arm/src/stm32l4/stm32l4_rng.c +++ b/arch/arm/src/stm32l4/stm32l4_rng.c @@ -107,7 +107,7 @@ static const struct file_operations g_rngops = static int stm32l4_rnginitialize(void) { - vdbg("Initializing RNG\n"); + _info("Initializing RNG\n"); memset(&g_rngdev, 0, sizeof(struct rng_dev_s)); @@ -117,7 +117,7 @@ static int stm32l4_rnginitialize(void) { /* We could not attach the ISR to the interrupt */ - vdbg("Could not attach IRQ.\n"); + _info("Could not attach IRQ.\n"); return -EAGAIN; } diff --git a/arch/arm/src/stm32l4/stm32l4_rtc.h b/arch/arm/src/stm32l4/stm32l4_rtc.h index b155bef8b0b692729cf6fca6d82155d473ae110d..222f5bc7c0cf9f79469fda8f0634eab7bf4246fc 100644 --- a/arch/arm/src/stm32l4/stm32l4_rtc.h +++ b/arch/arm/src/stm32l4/stm32l4_rtc.h @@ -105,6 +105,26 @@ extern "C" * Public Functions ****************************************************************************/ +/************************************************************************************ + * Name: rtc_is_inits + * + * Description: + * Returns 'true' if the RTC has been initialized (according to the RTC itself). + * It will be 'false' if the RTC has never been initialized since first time power + * up, and the counters are stopped until it is first initialized. + * + * Input Parameters: + * None + * + * Returned Value: + * bool -- true if the INITS flag is set in the ISR. + * + ************************************************************************************/ +#ifdef CONFIG_RTC_DRIVER +bool rtc_is_inits(void); +#endif + + /**************************************************************************** * Name: stm32l4_rtc_getdatetime_with_subseconds * diff --git a/arch/arm/src/stm32l4/stm32l4_rtcc.c b/arch/arm/src/stm32l4/stm32l4_rtcc.c index eab4fa45e8103d08423db232406fbdfd3f48cc92..390e104d726c55e4d5cd5df5f452390df45e4b3e 100644 --- a/arch/arm/src/stm32l4/stm32l4_rtcc.c +++ b/arch/arm/src/stm32l4/stm32l4_rtcc.c @@ -83,10 +83,6 @@ # error "CONFIG_STM32L4_PWR must selected to use this driver" #endif -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_RTC -#endif - #if !defined(CONFIG_RTC_MAGIC) # define CONFIG_RTC_MAGIC (0xfacefeee) #endif @@ -116,20 +112,6 @@ #define RTC_ALRMR_ENABLE (0x80000000) -/* Debug ****************************************************************************/ - -#ifdef CONFIG_DEBUG_RTC -# define rtcdbg dbg -# define rtcvdbg vdbg -# define rtclldbg lldbg -# define rtcllvdbg llvdbg -#else -# define rtcdbg(x...) -# define rtcvdbg(x...) -# define rtclldbg(x...) -# define rtcllvdbg(x...) -#endif - /************************************************************************************ * Private Types ************************************************************************************/ @@ -191,27 +173,27 @@ static int rtchw_set_alrmbr(rtc_alarmreg_t alarmreg); * ************************************************************************************/ -#ifdef CONFIG_DEBUG_RTC +#ifdef CONFIG_DEBUG_RTC_INFO static void rtc_dumpregs(FAR const char *msg) { - rtclldbg("%s:\n", msg); - rtclldbg(" TR: %08x\n", getreg32(STM32L4_RTC_TR)); - rtclldbg(" DR: %08x\n", getreg32(STM32L4_RTC_DR)); - rtclldbg(" CR: %08x\n", getreg32(STM32L4_RTC_CR)); - rtclldbg(" ISR: %08x\n", getreg32(STM32L4_RTC_ISR)); - rtclldbg(" PRER: %08x\n", getreg32(STM32L4_RTC_PRER)); - rtclldbg(" WUTR: %08x\n", getreg32(STM32L4_RTC_WUTR)); + rtcinfo("%s:\n", msg); + rtcinfo(" TR: %08x\n", getreg32(STM32L4_RTC_TR)); + rtcinfo(" DR: %08x\n", getreg32(STM32L4_RTC_DR)); + rtcinfo(" CR: %08x\n", getreg32(STM32L4_RTC_CR)); + rtcinfo(" ISR: %08x\n", getreg32(STM32L4_RTC_ISR)); + rtcinfo(" PRER: %08x\n", getreg32(STM32L4_RTC_PRER)); + rtcinfo(" WUTR: %08x\n", getreg32(STM32L4_RTC_WUTR)); - rtclldbg(" ALRMAR: %08x\n", getreg32(STM32L4_RTC_ALRMAR)); - rtclldbg(" ALRMBR: %08x\n", getreg32(STM32L4_RTC_ALRMBR)); - rtclldbg(" SHIFTR: %08x\n", getreg32(STM32L4_RTC_SHIFTR)); - rtclldbg(" TSTR: %08x\n", getreg32(STM32L4_RTC_TSTR)); - rtclldbg(" TSDR: %08x\n", getreg32(STM32L4_RTC_TSDR)); - rtclldbg(" TSSSR: %08x\n", getreg32(STM32L4_RTC_TSSSR)); - rtclldbg(" CALR: %08x\n", getreg32(STM32L4_RTC_CALR)); - rtclldbg(" TAMPCR: %08x\n", getreg32(STM32L4_RTC_TAMPCR)); - rtclldbg("ALRMASSR: %08x\n", getreg32(STM32L4_RTC_ALRMASSR)); - rtclldbg("ALRMBSSR: %08x\n", getreg32(STM32L4_RTC_ALRMBSSR)); + rtcinfo(" ALRMAR: %08x\n", getreg32(STM32L4_RTC_ALRMAR)); + rtcinfo(" ALRMBR: %08x\n", getreg32(STM32L4_RTC_ALRMBR)); + rtcinfo(" SHIFTR: %08x\n", getreg32(STM32L4_RTC_SHIFTR)); + rtcinfo(" TSTR: %08x\n", getreg32(STM32L4_RTC_TSTR)); + rtcinfo(" TSDR: %08x\n", getreg32(STM32L4_RTC_TSDR)); + rtcinfo(" TSSSR: %08x\n", getreg32(STM32L4_RTC_TSSSR)); + rtcinfo(" CALR: %08x\n", getreg32(STM32L4_RTC_CALR)); + rtcinfo(" TAMPCR: %08x\n", getreg32(STM32L4_RTC_TAMPCR)); + rtcinfo("ALRMASSR: %08x\n", getreg32(STM32L4_RTC_ALRMASSR)); + rtcinfo("ALRMBSSR: %08x\n", getreg32(STM32L4_RTC_ALRMBSSR)); } #else # define rtc_dumpregs(msg) @@ -231,21 +213,21 @@ static void rtc_dumpregs(FAR const char *msg) * ************************************************************************************/ -#ifdef CONFIG_DEBUG_RTC +#ifdef CONFIG_DEBUG_RTC_INFO static void rtc_dumptime(FAR const struct tm *tp, FAR const char *msg) { - rtclldbg("%s:\n", msg); + rtcinfo("%s:\n", msg); #if 0 - rtclldbg(" tm_sec: %08x\n", tp->tm_sec); - rtclldbg(" tm_min: %08x\n", tp->tm_min); - rtclldbg(" tm_hour: %08x\n", tp->tm_hour); - rtclldbg(" tm_mday: %08x\n", tp->tm_mday); - rtclldbg(" tm_mon: %08x\n", tp->tm_mon); - rtclldbg(" tm_year: %08x\n", tp->tm_year); + rtcinfo(" tm_sec: %08x\n", tp->tm_sec); + rtcinfo(" tm_min: %08x\n", tp->tm_min); + rtcinfo(" tm_hour: %08x\n", tp->tm_hour); + rtcinfo(" tm_mday: %08x\n", tp->tm_mday); + rtcinfo(" tm_mon: %08x\n", tp->tm_mon); + rtcinfo(" tm_year: %08x\n", tp->tm_year); #else - rtclldbg(" tm: %04d-%02d-%02d %02d:%02d:%02d\n", - tp->tm_year+1900, tp->tm_mon+1, tp->tm_mday, - tp->tm_hour, tp->tm_min, tp->tm_sec); + rtcinfo(" tm: %04d-%02d-%02d %02d:%02d:%02d\n", + tp->tm_year+1900, tp->tm_mon+1, tp->tm_mday, + tp->tm_hour, tp->tm_min, tp->tm_sec); #endif } #else @@ -268,7 +250,7 @@ static void rtc_dumptime(FAR const struct tm *tp, FAR const char *msg) * ************************************************************************************/ -static bool rtc_is_inits(void) +bool rtc_is_inits(void) { uint32_t regval; @@ -750,7 +732,7 @@ static int rtchw_set_alrmar(rtc_alarmreg_t alarmreg) putreg32(alarmreg, STM32L4_RTC_ALRMAR); putreg32(0, STM32L4_RTC_ALRMASSR); - rtcvdbg(" TR: %08x ALRMAR: %08x\n", + rtcinfo(" TR: %08x ALRMAR: %08x\n", getreg32(STM32L4_RTC_TR), getreg32(STM32L4_RTC_ALRMAR)); /* Enable RTC alarm A */ @@ -796,7 +778,7 @@ static int rtchw_set_alrmbr(rtc_alarmreg_t alarmreg) putreg32(alarmreg, STM32L4_RTC_ALRMBR); putreg32(0, STM32L4_RTC_ALRMBSSR); - rtcvdbg(" TR: %08x ALRMBR: %08x\n", + rtcinfo(" TR: %08x ALRMBR: %08x\n", getreg32(STM32L4_RTC_TR), getreg32(STM32L4_RTC_ALRMBR)); /* Enable RTC alarm B */ @@ -850,13 +832,6 @@ int up_rtc_initialize(void) (void)stm32l4_pwr_enablebkp(true); -#if 0 - /* Do not reset the backup domain; you will lose your clock setup done in *rcc.c */ - - modifyreg32(STM32L4_RCC_BDCR, 0, RCC_BDCR_BDRST); - modifyreg32(STM32L4_RCC_BDCR, RCC_BDCR_BDRST, 0); -#endif - #if defined(CONFIG_STM32L4_RTC_HSECLOCK) modifyreg32(STM32L4_RCC_BDCR, RCC_BDCR_RTCSEL_MASK, RCC_BDCR_RTCSEL_HSE); #elif defined(CONFIG_STM32L4_RTC_LSICLOCK) @@ -1309,7 +1284,7 @@ int stm32l4_rtc_setalarm(FAR struct alm_setalarm_s *alminfo) break; default: - rtcvdbg("ERROR: Invalid ALARM%d\n", alminfo->as_id); + rtcerr("ERROR: Invalid ALARM%d\n", alminfo->as_id); break; } @@ -1409,7 +1384,7 @@ int stm32l4_rtc_cancelalarm(enum alm_id_e alarmid) break; default: - rtcvdbg("ERROR: Invalid ALARM%d\n", alarmid); + rtcerr("ERROR: Invalid ALARM%d\n", alarmid); break; } diff --git a/arch/arm/src/stm32l4/stm32l4_spi.c b/arch/arm/src/stm32l4/stm32l4_spi.c index b6907d5955bf64440470175d6bcee956d893506c..3d64d812729aa51b82b8038803c01508114e64b9 100644 --- a/arch/arm/src/stm32l4/stm32l4_spi.c +++ b/arch/arm/src/stm32l4/stm32l4_spi.c @@ -136,27 +136,6 @@ #define SPI_TXDMA16NULL_CONFIG (SPI_DMA_PRIO|DMA_CCR_MSIZE_8BITS |DMA_CCR_PSIZE_16BITS |DMA_CCR_DIR) #define SPI_TXDMA8NULL_CONFIG (SPI_DMA_PRIO|DMA_CCR_MSIZE_8BITS |DMA_CCR_PSIZE_8BITS |DMA_CCR_DIR) - -/* Debug ****************************************************************************/ -/* Check if (non-standard) SPI debug is enabled */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_SPI -#endif - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - /************************************************************************************ * Private Types ************************************************************************************/ @@ -1020,7 +999,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) * faster. */ - spivdbg("Frequency %d->%d\n", frequency, actual); + spiinfo("Frequency %d->%d\n", frequency, actual); priv->frequency = frequency; priv->actual = actual; @@ -1050,7 +1029,7 @@ static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode) uint16_t setbits; uint16_t clrbits; - spivdbg("mode=%d\n", mode); + spiinfo("mode=%d\n", mode); /* Has the mode changed? */ @@ -1117,7 +1096,7 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) uint16_t clrbits1, clrbits2; int savbits = nbits; - spivdbg("nbits=%d\n", nbits); + spiinfo("nbits=%d\n", nbits); /* Has the number of bits changed? */ @@ -1220,11 +1199,11 @@ static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd) if (spi_16bitmode(priv)) { - spivdbg("Sent: %04x Return: %04x Status: %02x\n", wd, ret, regval); + spiinfo("Sent: %04x Return: %04x Status: %02x\n", wd, ret, regval); } else { - spivdbg("Sent: %02x Return: %02x Status: %02x\n", wd, ret, regval); + spiinfo("Sent: %02x Return: %02x Status: %02x\n", wd, ret, regval); } UNUSED(regval); @@ -1263,7 +1242,7 @@ static void spi_exchange_nodma(FAR struct spi_dev_s *dev, FAR const void *txbuff FAR struct stm32l4_spidev_s *priv = (FAR struct stm32l4_spidev_s *)dev; DEBUGASSERT(priv && priv->spibase); - spivdbg("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); + spiinfo("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); /* 8- or 16-bit mode? */ @@ -1376,7 +1355,7 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, static uint16_t rxdummy = 0xffff; static const uint16_t txdummy = 0xffff; - spivdbg("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); + spiinfo("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); DEBUGASSERT(priv && priv->spibase); /* Setup DMAs */ @@ -1419,7 +1398,7 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, #ifndef CONFIG_SPI_EXCHANGE static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *txbuffer, size_t nwords) { - spivdbg("txbuffer=%p nwords=%d\n", txbuffer, nwords); + spiinfo("txbuffer=%p nwords=%d\n", txbuffer, nwords); return spi_exchange(dev, txbuffer, NULL, nwords); } #endif @@ -1446,7 +1425,7 @@ static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *txbuffer, si #ifndef CONFIG_SPI_EXCHANGE static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *rxbuffer, size_t nwords) { - spivdbg("rxbuffer=%p nwords=%d\n", rxbuffer, nwords); + spiinfo("rxbuffer=%p nwords=%d\n", rxbuffer, nwords); return spi_exchange(dev, NULL, rxbuffer, nwords); } #endif @@ -1627,7 +1606,7 @@ FAR struct spi_dev_s *stm32l4_spibus_initialize(int bus) else #endif { - spidbg("ERROR: Unsupbused SPI bus: %d\n", bus); + spierr("ERROR: Unsupbused SPI bus: %d\n", bus); return NULL; } diff --git a/arch/arm/src/stm32l4/stm32l4_start.c b/arch/arm/src/stm32l4/stm32l4_start.c index 6209cde5418671e0ef56e5dbba093496c1bb43fd..1c391851b4bb4bfb91aa9f647a94c179dda371d7 100644 --- a/arch/arm/src/stm32l4/stm32l4_start.c +++ b/arch/arm/src/stm32l4/stm32l4_start.c @@ -120,7 +120,7 @@ static void go_os_start(void *pv, unsigned int nbytes) * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES # define showprogress(c) up_lowputc(c) #else # define showprogress(c) diff --git a/arch/arm/src/stm32l4/stm32l4x6xx_dma.c b/arch/arm/src/stm32l4/stm32l4x6xx_dma.c index eb91e3a7547f819e081465c99ab6f2cd33f8a21d..e05173d82c4d193f3d296ea7262db86b7b80008c 100644 --- a/arch/arm/src/stm32l4/stm32l4x6xx_dma.c +++ b/arch/arm/src/stm32l4/stm32l4x6xx_dma.c @@ -727,7 +727,7 @@ bool stm32l4_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void stm32l4_dmasample(DMA_HANDLE handle, struct stm32l4_dmaregs_s *regs) { struct stm32l4_dma_s *dmach = (struct stm32l4_dma_s *)handle; @@ -755,20 +755,19 @@ void stm32l4_dmasample(DMA_HANDLE handle, struct stm32l4_dmaregs_s *regs) * ****************************************************************************/ -#ifdef CONFIG_DEBUG_DMA +#ifdef CONFIG_DEBUG_DMA_INFO void stm32l4_dmadump(DMA_HANDLE handle, const struct stm32l4_dmaregs_s *regs, const char *msg) { struct stm32l4_dma_s *dmach = (struct stm32l4_dma_s *)handle; uint32_t dmabase = DMA_BASE(dmach->base); - dmadbg("DMA Registers: %s\n", msg); - dmadbg(" ISR[%08x]: %08x\n", dmabase + STM32L4_DMA_ISR_OFFSET, regs->isr); - dmadbg(" CSELR[%08x]: %08x\n", dmabase + STM32L4_DMA_CSELR_OFFSET, regs->cselr); - dmadbg(" CCR[%08x]: %08x\n", dmach->base + STM32L4_DMACHAN_CCR_OFFSET, regs->ccr); - dmadbg(" CNDTR[%08x]: %08x\n", dmach->base + STM32L4_DMACHAN_CNDTR_OFFSET, regs->cndtr); - dmadbg(" CPAR[%08x]: %08x\n", dmach->base + STM32L4_DMACHAN_CPAR_OFFSET, regs->cpar); - dmadbg(" CMAR[%08x]: %08x\n", dmach->base + STM32L4_DMACHAN_CMAR_OFFSET, regs->cmar); + dmainfo("DMA Registers: %s\n", msg); + dmainfo(" ISR[%08x]: %08x\n", dmabase + STM32L4_DMA_ISR_OFFSET, regs->isr); + dmainfo(" CSELR[%08x]: %08x\n", dmabase + STM32L4_DMA_CSELR_OFFSET, regs->cselr); + dmainfo(" CCR[%08x]: %08x\n", dmach->base + STM32L4_DMACHAN_CCR_OFFSET, regs->ccr); + dmainfo(" CNDTR[%08x]: %08x\n", dmach->base + STM32L4_DMACHAN_CNDTR_OFFSET, regs->cndtr); + dmainfo(" CPAR[%08x]: %08x\n", dmach->base + STM32L4_DMACHAN_CPAR_OFFSET, regs->cpar); + dmainfo(" CMAR[%08x]: %08x\n", dmach->base + STM32L4_DMACHAN_CMAR_OFFSET, regs->cmar); } #endif - diff --git a/arch/arm/src/str71x/str71x_decodeirq.c b/arch/arm/src/str71x/str71x_decodeirq.c index c908ae9e3a10110eb97cdf37f4b2db391325ac4f..88751c80c14f56fd424f21098578b517e9e9e5c6 100644 --- a/arch/arm/src/str71x/str71x_decodeirq.c +++ b/arch/arm/src/str71x/str71x_decodeirq.c @@ -91,8 +91,8 @@ void up_decodeirq(uint32_t *regs) { #ifdef CONFIG_SUPPRESS_INTERRUPTS board_autoled_on(LED_INIRQ); - lowsyslog(LOG_ERR, "Unexpected IRQ\n"); CURRENT_REGS = regs; + err("ERROR: Unexpected IRQ\n"); PANIC(); #else unsigned int irq; @@ -132,7 +132,7 @@ void up_decodeirq(uint32_t *regs) CURRENT_REGS = savestate; } -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES else { PANIC(); /* Normally never happens */ diff --git a/arch/arm/src/str71x/str71x_head.S b/arch/arm/src/str71x/str71x_head.S index 6a299e8911bb182a95247a80e5447fbc2f9e077a..c35715e02d21e5010ca74a170e2a5b8803573420 100644 --- a/arch/arm/src/str71x/str71x_head.S +++ b/arch/arm/src/str71x/str71x_head.S @@ -67,7 +67,7 @@ #ifdef CONFIG_ARCH_LEDS .globl board_autoled_initialize /* Boot LED setup */ #endif -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES .globl up_lowputc /* Low-level debug output */ #endif .globl os_start /* NuttX entry point */ @@ -86,7 +86,7 @@ *****************************************************************************/ .macro showprogress, code -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES mov r0, #\code bl up_lowputc #endif diff --git a/arch/arm/src/tiva/Kconfig b/arch/arm/src/tiva/Kconfig index 20be1413092ef246f9b924e31c8a3e535fa4f4ef..174252528bfed9156af77d977ee277a0044aead6 100644 --- a/arch/arm/src/tiva/Kconfig +++ b/arch/arm/src/tiva/Kconfig @@ -783,7 +783,7 @@ config TIVA_I2C_HIGHSPEED config TIVA_I2C_REGDEBUG bool "Register level debug" default n - depends on DEBUG + depends on DEBUG_I2C_INFO ---help--- Enables extremely detailed register access debug output. @@ -840,7 +840,7 @@ endif # TIVA_TIMER_16BIT config TIVA_TIMER_REGDEBUG bool "Register level debug" default n - depends on DEBUG + depends on DEBUG_TIMER_INFO ---help--- Enables extremely detailed register access debug output. @@ -853,7 +853,7 @@ menu "ADC Configuration" config TIVA_ADC_REGDEBUG bool "Register level debug" default n - depends on DEBUG + depends on DEBUG_ANALOG_INFO ---help--- Enables extremely detailed register access debug output. @@ -1103,9 +1103,9 @@ config TIVA_EMAC_HWCHECKSUM config TIVA_ETHERNET_REGDEBUG bool "Register-Level Debug" default n - depends on DEBUG + depends on DEBUG_NET_INFO ---help--- - Enable very low-level register access debug. Depends on DEBUG. + Enable very low-level register access debug. Depends on CONFIG_DEBUG_FEATURES. endmenu # Tiva Ethernet Configuration diff --git a/arch/arm/src/tiva/Make.defs b/arch/arm/src/tiva/Make.defs index cb5648817586721f50db0450af0946503e54a8a2..0ba34f6751ab221e1d0d68054c7caaeff740b436 100644 --- a/arch/arm/src/tiva/Make.defs +++ b/arch/arm/src/tiva/Make.defs @@ -78,7 +78,10 @@ endif CHIP_ASRCS = CHIP_CSRCS = tiva_allocateheap.c tiva_start.c tiva_irq.c tiva_gpio.c CHIP_CSRCS += tiva_gpioirq.c tiva_lowputc.c tiva_serial.c tiva_ssi.c + +ifeq ($(CONFIG_DEBUG_GPIO_INFO),y) CHIP_CSRCS += tiva_dumpgpio.c +endif ifeq ($(CONFIG_ARCH_CHIP_TM4C129),y) CHIP_CSRCS += tm4c129_syscontrol.c diff --git a/arch/arm/src/tiva/chip/tm4c129_syscontrol.h b/arch/arm/src/tiva/chip/tm4c129_syscontrol.h index 5a4886ec6ccddbd8616bc30cda29bd6b2404ae19..928be38e95adaec1f6447b1c172098ca25060e9b 100644 --- a/arch/arm/src/tiva/chip/tm4c129_syscontrol.h +++ b/arch/arm/src/tiva/chip/tm4c129_syscontrol.h @@ -254,7 +254,7 @@ #define TIVA_SYSCON_UNIQUEID2_OFFSET 0x0f28 /* Unique ID 2 */ #define TIVA_SYSCON_UNIQUEID3_OFFSET 0x0f2c /* Unique ID 3 */ -/*( CCM System Control Registers (CCM Control Offset) */ +/* CCM System Control Registers (CCM Control Offset) */ #define TIVA_SYSCON_CCMCGREQ_OFFSET 0x0204 /* Cryptographic Modules Clock Gating Request */ diff --git a/arch/arm/src/tiva/lm3s_ethernet.c b/arch/arm/src/tiva/lm3s_ethernet.c index 5544e2544213f75c42ce7a9537b4a8782edb0afb..ab9bd28901607601c6a45333556ba4fc93013417 100644 --- a/arch/arm/src/tiva/lm3s_ethernet.c +++ b/arch/arm/src/tiva/lm3s_ethernet.c @@ -187,9 +187,9 @@ struct tiva_driver_s WDOG_ID ld_txpoll; /* TX poll timer */ WDOG_ID ld_txtimeout; /* TX timeout timer */ - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ - struct net_driver_s ld_dev; /* Interface understood by uIP */ + struct net_driver_s ld_dev; /* Interface understood by the network */ }; /**************************************************************************** @@ -333,7 +333,7 @@ static void tiva_ethreset(struct tiva_driver_s *priv) regval = getreg32(TIVA_SYSCON_RCGC2); regval |= (SYSCON_RCGC2_EMAC0 | SYSCON_RCGC2_EPHY0); putreg32(regval, TIVA_SYSCON_RCGC2); - nllvdbg("RCGC2: %08x\n", regval); + ninfo("RCGC2: %08x\n", regval); /* Put the Ethernet controller into the reset state */ @@ -349,7 +349,7 @@ static void tiva_ethreset(struct tiva_driver_s *priv) regval &= ~(SYSCON_SRCR2_EMAC0 | SYSCON_SRCR2_EPHY0); putreg32(regval, TIVA_SYSCON_SRCR2); - nllvdbg("SRCR2: %08x\n", regval); + ninfo("SRCR2: %08x\n", regval); /* Wait just a bit, again. If we touch the ethernet too soon, we may busfault. */ @@ -495,7 +495,7 @@ static int tiva_transmit(struct tiva_driver_s *priv) */ pktlen = priv->ld_dev.d_len; - nllvdbg("Sending packet, pktlen: %d\n", pktlen); + ninfo("Sending packet, pktlen: %d\n", pktlen); DEBUGASSERT(pktlen > ETH_HDRLEN); dbuf = priv->ld_dev.d_buf; @@ -558,7 +558,7 @@ static int tiva_transmit(struct tiva_driver_s *priv) * Function: tiva_txpoll * * Description: - * The transmitter is available, check if uIP has any outgoing packets ready + * The transmitter is available, check if the network has any outgoing packets ready * to send. This is a callback from devif_poll(). devif_poll() may be called: * * 1. When the preceding TX packet send is complete, @@ -584,7 +584,7 @@ static int tiva_txpoll(struct net_driver_s *dev) * the field d_len is set to a value > 0. */ - nllvdbg("Poll result: d_len=%d\n", priv->ld_dev.d_len); + ninfo("Poll result: d_len=%d\n", priv->ld_dev.d_len); if (priv->ld_dev.d_len > 0) { DEBUGASSERT((tiva_ethin(priv, TIVA_MAC_TR_OFFSET) & MAC_TR_NEWTX) == 0); @@ -672,12 +672,12 @@ static void tiva_receive(struct tiva_driver_s *priv) regval = tiva_ethin(priv, TIVA_MAC_DATA_OFFSET); pktlen = (int)(regval & 0x0000ffff); - nllvdbg("Receiving packet, pktlen: %d\n", pktlen); + ninfo("Receiving packet, pktlen: %d\n", pktlen); /* Check if the pktlen is valid. It should be large enough to hold * an Ethernet header and small enough to fit entirely in the I/O * buffer. Six is subtracted to acount for the 2-byte length/type - * and 4 byte FCS that are not copied into the uIP packet. + * and 4 byte FCS that are not copied into the network packet. */ if (pktlen > (CONFIG_NET_ETH_MTU + 6) || pktlen <= (ETH_HDRLEN + 6)) @@ -686,7 +686,7 @@ static void tiva_receive(struct tiva_driver_s *priv) /* We will have to drop this packet */ - nlldbg("Bad packet size dropped (%d)\n", pktlen); + nwarn("WARNING: Bad packet size dropped (%d)\n", pktlen); NETDEV_RXERRORS(&priv->ld_dev); /* The number of bytes and words left to read is pktlen - 4 (including, @@ -752,7 +752,7 @@ static void tiva_receive(struct tiva_driver_s *priv) } } - /* Pass the packet length to uIP MINUS 2 bytes for the length and + /* Pass the packet length to the network MINUS 2 bytes for the length and * 4 bytes for the FCS. */ @@ -770,7 +770,7 @@ static void tiva_receive(struct tiva_driver_s *priv) #ifdef CONFIG_NET_IPv4 if (ETHBUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); NETDEV_RXIPV4(&priv->ld_dev); /* Handle ARP on input then give the IPv4 packet to the network @@ -811,7 +811,7 @@ static void tiva_receive(struct tiva_driver_s *priv) #ifdef CONFIG_NET_IPv6 if (ETHBUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); NETDEV_RXIPV6(&priv->ld_dev); /* Give the IPv6 packet to the network layer */ @@ -850,7 +850,7 @@ static void tiva_receive(struct tiva_driver_s *priv) #ifdef CONFIG_NET_ARP if (ETHBUF->type == htons(ETHTYPE_ARP)) { - nllvdbg("ARP packet received (%02x)\n", ETHBUF->type); + ninfo("ARP packet received (%02x)\n", ETHBUF->type); NETDEV_RXARP(&priv->ld_dev); arp_arpin(&priv->ld_dev); @@ -867,7 +867,8 @@ static void tiva_receive(struct tiva_driver_s *priv) else #endif { - nlldbg("Unsupported packet type dropped (%02x)\n", htons(ETHBUF->type)); + nwarn("WARNING: Unsupported packet type dropped (%02x)\n", + htons(ETHBUF->type)); NETDEV_RXDROPPED(&priv->ld_dev); } } @@ -905,7 +906,7 @@ static void tiva_txdone(struct tiva_driver_s *priv) DEBUGASSERT((tiva_ethin(priv, TIVA_MAC_TR_OFFSET) & MAC_TR_NEWTX) == 0); - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ (void)devif_poll(&priv->ld_dev, tiva_txpoll); } @@ -1024,7 +1025,7 @@ static void tiva_txtimeout(int argc, uint32_t arg, ...) /* Increment statistics */ - nlldbg("Tx timeout\n"); + nerr("ERROR: Tx timeout\n"); NETDEV_TXTIMEOUTS(&priv->ld_dev); /* Then reset the hardware */ @@ -1033,7 +1034,7 @@ static void tiva_txtimeout(int argc, uint32_t arg, ...) tiva_ifdown(&priv->ld_dev); tiva_ifup(&priv->ld_dev); - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ (void)devif_poll(&priv->ld_dev, tiva_txpoll); } @@ -1069,7 +1070,7 @@ static void tiva_polltimer(int argc, uint32_t arg, ...) if ((tiva_ethin(priv, TIVA_MAC_TR_OFFSET) & MAC_TR_NEWTX) == 0) { - /* If so, update TCP timing states and poll uIP for new XMIT data */ + /* If so, update TCP timing states and poll the network for new XMIT data */ (void)devif_timer(&priv->ld_dev, tiva_txpoll); @@ -1104,9 +1105,9 @@ static int tiva_ifup(struct net_driver_s *dev) uint32_t div; uint16_t phyreg; - nlldbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); /* Enable and reset the Ethernet controller */ @@ -1125,7 +1126,7 @@ static int tiva_ifup(struct net_driver_s *dev) div = SYSCLK_FREQUENCY / 2 / TIVA_MAX_MDCCLK; tiva_ethout(priv, TIVA_MAC_MDV_OFFSET, div); - nllvdbg("MDV: %08x\n", div); + ninfo("MDV: %08x\n", div); /* Then configure the Ethernet Controller for normal operation * @@ -1137,7 +1138,7 @@ static int tiva_ifup(struct net_driver_s *dev) regval &= ~TIVA_TCTCL_CLRBITS; regval |= TIVA_TCTCL_SETBITS; tiva_ethout(priv, TIVA_MAC_TCTL_OFFSET, regval); - nllvdbg("TCTL: %08x\n", regval); + ninfo("TCTL: %08x\n", regval); /* Setup the receive control register (Disable multicast frames, disable * promiscuous mode, disable bad CRC rejection). @@ -1147,7 +1148,7 @@ static int tiva_ifup(struct net_driver_s *dev) regval &= ~TIVA_RCTCL_CLRBITS; regval |= TIVA_RCTCL_SETBITS; tiva_ethout(priv, TIVA_MAC_RCTL_OFFSET, regval); - nllvdbg("RCTL: %08x\n", regval); + ninfo("RCTL: %08x\n", regval); /* Setup the time stamp configuration register */ @@ -1159,7 +1160,7 @@ static int tiva_ifup(struct net_driver_s *dev) regval &= ~(MAC_TS_EN); #endif tiva_ethout(priv, TIVA_MAC_TS_OFFSET, regval); - nllvdbg("TS: %08x\n", regval); + ninfo("TS: %08x\n", regval); #endif /* Wait for the link to come up. This following is not very conservative @@ -1168,13 +1169,13 @@ static int tiva_ifup(struct net_driver_s *dev) * set */ - nlldbg("Waiting for link\n"); + ninfo("Waiting for link\n"); do { phyreg = tiva_phyread(priv, MII_MSR); } while ((phyreg & MII_MSR_LINKSTATUS) == 0); - nlldbg("Link established\n"); + ninfo("Link established\n"); /* Reset the receive FIFO */ @@ -1258,9 +1259,9 @@ static int tiva_ifdown(struct net_driver_s *dev) irqstate_t flags; uint32_t regval; - nlldbg("Taking down: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Taking down: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); /* Cancel the TX poll timer and TX timeout timers */ @@ -1353,7 +1354,7 @@ static int tiva_txavail(struct net_driver_s *dev) flags = enter_critical_section(); if (priv->ld_bifup && (tiva_ethin(priv, TIVA_MAC_TR_OFFSET) & MAC_TR_NEWTX) == 0) { - /* If the interface is up and we can use the Tx FIFO, then poll uIP + /* If the interface is up and we can use the Tx FIFO, then poll the network * for new Tx data */ @@ -1455,7 +1456,7 @@ static inline int tiva_ethinitialize(int intf) /* Check if the Ethernet module is present */ - ndbg("Setting up eth%d\n", intf); + ninfo("Setting up eth%d\n", intf); #if TIVA_NETHCONTROLLERS > 1 # error "This debug check only works with one interface" diff --git a/arch/arm/src/tiva/tiva_adc.h b/arch/arm/src/tiva/tiva_adc.h index 693252ad35d219a3470530cd743652c107fe02c2..7f6edd4f9d8b741146a22623f2c3f6fe06c3d9d3 100644 --- a/arch/arm/src/tiva/tiva_adc.h +++ b/arch/arm/src/tiva/tiva_adc.h @@ -52,7 +52,7 @@ * Pre-processor Definitions ****************************************************************************/ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_TIVA_ADC_REGDEBUG #endif diff --git a/arch/arm/src/tiva/tiva_adclib.c b/arch/arm/src/tiva/tiva_adclib.c index 64fb93552d25b409a0af644faef10427edcd6489..8376e51cc8b1c22843ba0cba17135db257aa2fd8 100644 --- a/arch/arm/src/tiva/tiva_adclib.c +++ b/arch/arm/src/tiva/tiva_adclib.c @@ -209,7 +209,7 @@ void tiva_adc_one_time_init(uint32_t clock, uint8_t sample_rate) static bool one_time_init = false; #ifdef CONFIG_DEBUG_ANALOG - avdbg("setting clock=%d MHz sample rate=%d\n", + ainfo("setting clock=%d MHz sample rate=%d\n", clock, sample_rate); #endif @@ -219,7 +219,7 @@ void tiva_adc_one_time_init(uint32_t clock, uint8_t sample_rate) if (one_time_init == false) { - avdbg("performing ADC one-time initialization...\n"); + ainfo("performing ADC one-time initialization...\n"); /* set clock */ tiva_adc_clock(clock); @@ -238,7 +238,7 @@ void tiva_adc_one_time_init(uint32_t clock, uint8_t sample_rate) #ifdef CONFIG_DEBUG_ANALOG else { - avdbg("one time initialization previously completed\n"); + ainfo("one time initialization previously completed\n"); } #endif } @@ -257,7 +257,7 @@ void tiva_adc_configure(struct tiva_adc_cfg_s *cfg) uint8_t s; uint8_t c; - avdbg("configure ADC%d...\n", cfg->adc); + ainfo("configure ADC%d...\n", cfg->adc); /* Configure each SSE */ @@ -270,7 +270,7 @@ void tiva_adc_configure(struct tiva_adc_cfg_s *cfg) #ifdef CONFIG_DEBUG_ANALOG else { - avdbg("ADC%d SSE%d has no configuration\n", cfg->adc, s); + ainfo("ADC%d SSE%d has no configuration\n", cfg->adc, s); } #endif } @@ -298,9 +298,9 @@ void tiva_adc_configure(struct tiva_adc_cfg_s *cfg) void tiva_adc_sse_cfg(uint8_t adc, uint8_t sse, struct tiva_adc_sse_cfg_s *ssecfg) { - avdbg("configure ADC%d SSE%d...\n", adc, sse); + ainfo("configure ADC%d SSE%d...\n", adc, sse); #ifdef CONFIG_DEBUG_ANALOG - avdbg("priority=%d trigger=%d...\n", ssecfg->priority, ssecfg->trigger); + ainfo("priority=%d trigger=%d...\n", ssecfg->priority, ssecfg->trigger); #endif uint8_t priority = ssecfg->priority; @@ -327,7 +327,7 @@ void tiva_adc_sse_cfg(uint8_t adc, uint8_t sse, void tiva_adc_step_cfg(struct tiva_adc_step_cfg_s *stepcfg) { #ifdef CONFIG_DEBUG_ANALOG - avdbg(" shold=0x%02x flags=0x%02x ain=%d...\n", + ainfo(" shold=0x%02x flags=0x%02x ain=%d...\n", stepcfg->shold, stepcfg->flags, stepcfg->ain); #endif @@ -341,7 +341,7 @@ void tiva_adc_step_cfg(struct tiva_adc_step_cfg_s *stepcfg) uint8_t ain = stepcfg->ain; uint32_t gpio = ain2gpio[stepcfg->ain]; - avdbg("configure ADC%d SSE%d STEP%d...\n", adc, sse, step); + ainfo("configure ADC%d SSE%d STEP%d...\n", adc, sse, step); /* Configure the AIN GPIO for analog input if not flagged to be muxed to * the internal temperature sensor @@ -410,14 +410,14 @@ void tiva_adc_irq_attach(uint8_t adc, uint8_t sse, xcpt_t isr) int irq = sse2irq[SSE_IDX(adc, sse)]; #ifdef CONFIG_DEBUG_ANALOG - avdbg("assigning ISR=0x%p to ADC%d SSE%d IRQ=0x%02x...\n", + ainfo("assigning ISR=0x%p to ADC%d SSE%d IRQ=0x%02x...\n", isr, adc, sse, irq); #endif ret = irq_attach(irq, isr); if (ret < 0) { - adbg("ERROR: Failed to attach IRQ %d: %d\n", irq, ret); + aerr("ERROR: Failed to attach IRQ %d: %d\n", irq, ret); return; } @@ -446,7 +446,7 @@ void tiva_adc_irq_detach(uint8_t adc, uint8_t sse) ret = irq_detach(irq); if (ret < 0) { - adbg("ERROR: Failed to detach IRQ %d: %d\n", irq, ret); + aerr("ERROR: Failed to detach IRQ %d: %d\n", irq, ret); return; } } @@ -682,7 +682,7 @@ uint32_t tiva_adc_int_status(uint8_t adc) uint8_t tiva_adc_sse_enable(uint8_t adc, uint8_t sse, bool state) { - avdbg("ADC%d SSE%d=%01d\n", adc, sse, state); + ainfo("ADC%d SSE%d=%01d\n", adc, sse, state); uintptr_t actssreg = TIVA_ADC_ACTSS(adc); if (state == true) @@ -867,7 +867,7 @@ uint8_t tiva_adc_sse_data(uint8_t adc, uint8_t sse, int32_t *buf) ssfstatreg = getreg32(TIVA_ADC_BASE(adc) + TIVA_ADC_SSFSTAT(sse)); } - avdbg("fifo=%d\n", fifo_count); + ainfo("fifo=%d\n", fifo_count); return fifo_count; } @@ -1086,20 +1086,20 @@ void tiva_adc_dump_reg_cfg(uint8_t adc, uint8_t sse) /* Dump register contents */ - avdbg("CC [0x%08x]=0x%08x\n", ccreg, cc); - avdbg("PC [0x%08x]=0x%08x\n", pcreg, pc); - avdbg("ACTSS [0x%08x]=0x%08x\n", actssreg, actss); - avdbg("SSPRI [0x%08x]=0x%08x\n", ssprireg, sspri); - avdbg("EMUX [0x%08x]=0x%08x\n", emuxreg, emux); - avdbg("SSMUX [0x%08x]=0x%08x\n", ssmuxreg, ssmux); + ainfo("CC [0x%08x]=0x%08x\n", ccreg, cc); + ainfo("PC [0x%08x]=0x%08x\n", pcreg, pc); + ainfo("ACTSS [0x%08x]=0x%08x\n", actssreg, actss); + ainfo("SSPRI [0x%08x]=0x%08x\n", ssprireg, sspri); + ainfo("EMUX [0x%08x]=0x%08x\n", emuxreg, emux); + ainfo("SSMUX [0x%08x]=0x%08x\n", ssmuxreg, ssmux); #ifdef CONFIG_ARCH_CHIP_TM4C129 - avdbg("SSEMUX [0x%08x]=0x%08x\n", ssemuxreg, ssemux); + ainfo("SSEMUX [0x%08x]=0x%08x\n", ssemuxreg, ssemux); #endif - avdbg("SSOP [0x%08x]=0x%08x\n", ssopreg, ssop); + ainfo("SSOP [0x%08x]=0x%08x\n", ssopreg, ssop); #ifdef CONFIG_EXPERIMENTAL - avdbg("SSTSH [0x%08x]=0x%08x\n", sstshreg, sstsh); + ainfo("SSTSH [0x%08x]=0x%08x\n", sstshreg, sstsh); #endif - avdbg("SSCTL [0x%08x]=0x%08x\n", ssctlreg, ssctl); + ainfo("SSCTL [0x%08x]=0x%08x\n", ssctlreg, ssctl); } #endif /* CONFIG_DEBUG_ANALOG */ diff --git a/arch/arm/src/tiva/tiva_adclow.c b/arch/arm/src/tiva/tiva_adclow.c index 7a0b5509ce9b22f90f4b8704c3d9107428e3fd58..6a89e62b5777fe194ebca1da757bb48c58d261fe 100644 --- a/arch/arm/src/tiva/tiva_adclow.c +++ b/arch/arm/src/tiva/tiva_adclow.c @@ -327,7 +327,7 @@ static int tiva_adc1_sse3_interrupt(int irq, void *context) static void tiva_adc_irqinitialize(struct tiva_adc_cfg_s *cfg) { - avdbg("initialize irqs for ADC%d...\n", cfg->adc); + ainfo("initialize irqs for ADC%d...\n", cfg->adc); #ifdef CONFIG_TIVA_ADC0 if (cfg->adc == 0) @@ -411,7 +411,7 @@ static int tiva_adc_bind(FAR struct adc_dev_s *dev, static void tiva_adc_reset(struct adc_dev_s *dev) { - avdbg("Resetting...\n"); + ainfo("Resetting...\n"); struct tiva_adc_s *priv = (struct tiva_adc_s *)dev->ad_priv; struct tiva_adc_sse_s *sse; @@ -443,7 +443,7 @@ static void tiva_adc_reset(struct adc_dev_s *dev) static int tiva_adc_setup(struct adc_dev_s *dev) { - avdbg("Setup\n"); + ainfo("Setup\n"); struct tiva_adc_s *priv = (struct tiva_adc_s *)dev->ad_priv; struct tiva_adc_sse_s *sse; @@ -477,7 +477,7 @@ static int tiva_adc_setup(struct adc_dev_s *dev) static void tiva_adc_shutdown(struct adc_dev_s *dev) { struct tiva_adc_s *priv = (struct tiva_adc_s *)dev->ad_priv; - avdbg("Shutdown\n"); + ainfo("Shutdown\n"); DEBUGASSERT(priv->ena); @@ -512,7 +512,7 @@ static void tiva_adc_shutdown(struct adc_dev_s *dev) static void tiva_adc_rxint(struct adc_dev_s *dev, bool enable) { - avdbg("RXINT=%d\n", enable); + ainfo("RXINT=%d\n", enable); struct tiva_adc_s *priv = (struct tiva_adc_s *)dev->ad_priv; struct tiva_adc_sse_s *sse; @@ -552,7 +552,7 @@ static int tiva_adc_ioctl(struct adc_dev_s *dev, int cmd, unsigned long arg) { int ret = OK; - avdbg("cmd=%d arg=%ld\n", cmd, arg); + ainfo("cmd=%d arg=%ld\n", cmd, arg); switch (cmd) { @@ -686,7 +686,7 @@ static void tiva_adc_read(void *arg) * and should cause a full system stop. */ - alldbg("PANIC!!! Invalid ADC device number given %d\n", sse->adc); + aerr("ERROR: Invalid ADC device number given %d\n", sse->adc); PANIC(); return; } @@ -704,7 +704,7 @@ static void tiva_adc_read(void *arg) priv->cb->au_receive(dev, tiva_adc_get_ain(sse->adc, sse->num, i), buf[i]); - avdbg("AIN%d = 0x%04x\n", + ainfo("AIN%d = 0x%04x\n", tiva_adc_get_ain(sse->adc, sse->num, i), buf[i]); } } @@ -753,7 +753,7 @@ static void tiva_adc_interrupt(struct tiva_adc_sse_s *sse) ret = work_queue(HPWORK, &sse->work, tiva_adc_read, sse, 0); if (ret != 0) { - adbg("ERROR: Failed to queue work: %d ADC.SSE: %d.%d\n", + aerr("ERROR: Failed to queue work: %d ADC.SSE: %d.%d\n", ret, sse->adc, sse->num); } } @@ -832,9 +832,9 @@ static struct tiva_adc_s *tiva_adc_struct_init(struct tiva_adc_cfg_s *cfg) } tiva_adc_struct_init_error: - avdbg("Invalid ADC device number: expected=%d actual=%d\n", + ainfo("Invalid ADC device number: expected=%d actual=%d\n", 0, cfg->adc); - avdbg("ADC%d (CONFIG_TIVA_ADC%d) must be enabled in Kconfig first!", + ainfo("ADC%d (CONFIG_TIVA_ADC%d) must be enabled in Kconfig first!", cfg->adc, cfg->adc); return NULL; @@ -872,15 +872,15 @@ int tiva_adc_initialize(const char *devpath, struct tiva_adc_cfg_s *cfg, struct tiva_adc_s *adc; int ret = 0; - avdbg("initializing...\n"); + ainfo("initializing...\n"); /* Initialize the private ADC device data structure */ adc = tiva_adc_struct_init(cfg); if (adc == NULL) { - adbg("Invalid ADC device number: expected=%d actual=%d\n", - 0, cfg->adc); + aerr("ERROR: Invalid ADC device number: expected=%d actual=%d\n", + 0, cfg->adc); return -ENODEV; } @@ -888,8 +888,8 @@ int tiva_adc_initialize(const char *devpath, struct tiva_adc_cfg_s *cfg, if (tiva_adc_enable(adc->devno, true) < 0) { - adbg("ERROR: failure to power ADC peripheral (devno=%d)\n", - cfg->adc); + aerr("ERROR: failure to power ADC peripheral (devno=%d)\n", + cfg->adc); return ret; } @@ -912,21 +912,21 @@ int tiva_adc_initialize(const char *devpath, struct tiva_adc_cfg_s *cfg, if (adc->dev == NULL) { - adbg("ERROR: Failed to get interface %s\n", devpath); + aerr("ERROR: Failed to get interface %s\n", devpath); return -ENODEV; } - avdbg("adc_dev_s=0x%08x\n", adc->dev); + ainfo("adc_dev_s=0x%08x\n", adc->dev); /* Register the ADC driver */ - avdbg("Register the ADC driver at %s\n", devpath); + ainfo("Register the ADC driver at %s\n", devpath); ret = adc_register(devpath, adc->dev); if (ret < 0) { - adbg("ERROR: Failed to register %s to character driver: %d\n", - devpath, ret); + aerr("ERROR: Failed to register %s to character driver: %d\n", + devpath, ret); return ret; } @@ -943,7 +943,7 @@ int tiva_adc_initialize(const char *devpath, struct tiva_adc_cfg_s *cfg, void tiva_adc_lock(FAR struct tiva_adc_s *priv, int sse) { - avdbg("Locking...\n"); + ainfo("Locking...\n"); struct tiva_adc_sse_s *s = g_sses[SSE_IDX(priv->devno, sse)]; int ret; @@ -964,7 +964,7 @@ void tiva_adc_lock(FAR struct tiva_adc_s *priv, int sse) #ifdef CONFIG_DEBUG_ANALOG if (loop_count % 1000) { - avdbg("loop=%d\n"); + ainfo("loop=%d\n"); } ++loop_count; #endif @@ -982,7 +982,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) { - avdbg("Unlocking\n"); + ainfo("Unlocking\n"); struct tiva_adc_sse_s *s = g_sses[SSE_IDX(priv->devno, sse)]; sem_post(&s->exclsem); } @@ -1002,33 +1002,33 @@ void tiva_adc_unlock(FAR struct tiva_adc_s *priv, int sse) static void tiva_adc_runtimeobj_ptrs(void) { # ifdef CONFIG_TIVA_ADC0 - avdbg("ADC0 [struct] [global value] [array value]\n"); - avdbg(" adc_dev_s dev0=0x%08x g_devs[0]=0x%08x\n", + ainfo("ADC0 [struct] [global value] [array value]\n"); + ainfo(" adc_dev_s dev0=0x%08x g_devs[0]=0x%08x\n", &dev0, g_devs[0]); - avdbg(" tiva_adc_s adc0=0x%08x g_adcs[0]=0x%08x\n", + ainfo(" tiva_adc_s adc0=0x%08x g_adcs[0]=0x%08x\n", &adc0, g_adcs[0]); - avdbg(" tiva_adc_sse_s sse0=0x%08x g_sses[0,0]=0x%08x\n", + ainfo(" tiva_adc_sse_s sse0=0x%08x g_sses[0,0]=0x%08x\n", &sse00, g_sses[SSE_IDX(0, 0)]); - avdbg(" tiva_adc_sse_s sse1=0x%08x g_sses[0,1]=0x%08x\n", + ainfo(" tiva_adc_sse_s sse1=0x%08x g_sses[0,1]=0x%08x\n", &sse01, g_sses[SSE_IDX(0, 1)]); - avdbg(" tiva_adc_sse_s sse2=0x%08x g_sses[0,2]=0x%08x\n", + ainfo(" tiva_adc_sse_s sse2=0x%08x g_sses[0,2]=0x%08x\n", &sse02, g_sses[SSE_IDX(0, 2)]); - avdbg(" tiva_adc_sse_s sse3=0x%08x g_sses[0,3]=0x%08x\n", + ainfo(" tiva_adc_sse_s sse3=0x%08x g_sses[0,3]=0x%08x\n", &sse03, g_sses[SSE_IDX(0, 3)]); # endif # ifdef CONFIG_TIVA_ADC1 - avdbg("ADC1 [struct] [global value] [array value]\n"); - avdbg(" adc_dev_s dev1=0x%08x g_devs[1]=0x%08x\n", + ainfo("ADC1 [struct] [global value] [array value]\n"); + ainfo(" adc_dev_s dev1=0x%08x g_devs[1]=0x%08x\n", &dev1, g_devs[1]); - avdbg(" tiva_adc_s adc1=0x%08x g_adcs[1]=0x%08x\n", + ainfo(" tiva_adc_s adc1=0x%08x g_adcs[1]=0x%08x\n", &adc1, g_adcs[1]); - avdbg(" tiva_adc_sse_s sse0=0x%08x g_sses[1,0]=0x%08x\n", + ainfo(" tiva_adc_sse_s sse0=0x%08x g_sses[1,0]=0x%08x\n", &sse10, g_sses[SSE_IDX(1, 0)]); - avdbg(" tiva_adc_sse_s sse1=0x%08x g_sses[1,1]=0x%08x\n", + ainfo(" tiva_adc_sse_s sse1=0x%08x g_sses[1,1]=0x%08x\n", &sse11, g_sses[SSE_IDX(1, 1)]); - avdbg(" tiva_adc_sse_s sse2=0x%08x g_sses[1,2]=0x%08x\n", + ainfo(" tiva_adc_sse_s sse2=0x%08x g_sses[1,2]=0x%08x\n", &sse12, g_sses[SSE_IDX(1, 2)]); - avdbg(" tiva_adc_sse_s sse3=0x%08x g_sses[1,3]=0x%08x\n", + ainfo(" tiva_adc_sse_s sse3=0x%08x g_sses[1,3]=0x%08x\n", &sse13, g_sses[SSE_IDX(1, 3)]); # endif } @@ -1038,24 +1038,24 @@ static void tiva_adc_runtimeobj_vals(void) struct tiva_adc_sse_s *sse; uint8_t s; # ifdef CONFIG_TIVA_ADC0 - avdbg("ADC0 [0x%08x] cfg=%d ena=%d devno=%d\n", + ainfo("ADC0 [0x%08x] cfg=%d ena=%d devno=%d\n", &adc0, adc0.cfg, adc0.ena, adc0.devno); for (s = 0; s < 4; ++s) { sse = g_sses[SSE_IDX(0, s)]; - avdbg("SSE%d [0x%08x] adc=%d cfg=%d ena=%d num=%d\n", + ainfo("SSE%d [0x%08x] adc=%d cfg=%d ena=%d num=%d\n", s, sse, sse->adc, sse->cfg, sse->ena, sse->num); } # endif # ifdef CONFIG_TIVA_ADC1 - avdbg("ADC1 [0x%08x] cfg=%d ena=%d devno=%d\n", + ainfo("ADC1 [0x%08x] cfg=%d ena=%d devno=%d\n", &adc1, adc1.cfg, adc1.ena, adc1.devno); for (s = 0; s < 4; ++s) { sse = g_sses[SSE_IDX(1, s)]; - avdbg("SSE%d [0x%08x] adc=%d cfg=%d ena=%d num=%d\n", + ainfo("SSE%d [0x%08x] adc=%d cfg=%d ena=%d num=%d\n", s, sse, sse->adc, sse->cfg, sse->ena, sse->num); } # endif @@ -1072,15 +1072,15 @@ static void tiva_adc_runtimeobj_vals(void) static void tiva_adc_dump_dev(void) { # ifdef CONFIG_TIVA_ADC0 - avdbg("adc_ops_s g_adcops=0x%08x adc0.dev->ad_ops=0x%08x\n", + ainfo("adc_ops_s g_adcops=0x%08x adc0.dev->ad_ops=0x%08x\n", &g_adcops, adc0.dev->ad_ops); - avdbg("tiva_adc_s adc0=0x%08x adc0.dev->ad_priv=0x%08x\n", + ainfo("tiva_adc_s adc0=0x%08x adc0.dev->ad_priv=0x%08x\n", &adc0, adc0.dev->ad_priv); # endif # ifdef CONFIG_TIVA_ADC1 - avdbg("adc_ops_s g_adcops=0x%08x adc1.dev->ad_ops=0x%08x\n", + ainfo("adc_ops_s g_adcops=0x%08x adc1.dev->ad_ops=0x%08x\n", &g_adcops, adc1.dev->ad_ops); - avdbg("tiva_adc_s adc1=0x%08x adc1.dev->ad_priv=0x%08x\n", + ainfo("tiva_adc_s adc1=0x%08x adc1.dev->ad_priv=0x%08x\n", &adc1, adc1.dev->ad_priv); # endif } diff --git a/arch/arm/src/tiva/tiva_dumpgpio.c b/arch/arm/src/tiva/tiva_dumpgpio.c index 89ae3a462b2f6da0af322c9f0e6ca8661f3f1d77..b50e8fa0f5380235973b3942b6a899f840c06a28 100644 --- a/arch/arm/src/tiva/tiva_dumpgpio.c +++ b/arch/arm/src/tiva/tiva_dumpgpio.c @@ -39,6 +39,11 @@ #include +/* Output debug info even if debug output is not selected. */ + +#undef CONFIG_DEBUG_INFO +#define CONFIG_DEBUG_INFO 1 + #include #include #include @@ -134,9 +139,9 @@ static inline uint8_t tiva_gpioport(int port) * ****************************************************************************/ +#ifdef CONFIG_DEBUG_GPIO_INFO int tiva_dumpgpio(uint32_t pinset, const char *msg) { -#ifdef CONFIG_DEBUG irqstate_t flags; unsigned int port = (pinset & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT; uintptr_t base; @@ -163,35 +168,34 @@ int tiva_dumpgpio(uint32_t pinset, const char *msg) enabled = ((rcgc2 & SYSCON_RCGC2_GPIO(port)) != 0); #endif - lldbg("GPIO%c pinset: %08x base: %08x -- %s\n", - tiva_gpioport(port), pinset, base, msg); + gpioinfo("GPIO%c pinset: %08x base: %08x -- %s\n", + tiva_gpioport(port), pinset, base, msg); #ifdef TIVA_SYSCON_RCGCGPIO - lldbg("RCGCGPIO: %08x (%s)\n", - rcgcgpio, enabled ? "enabled" : "disabled"); + gpioinfo("RCGCGPIO: %08x (%s)\n", + rcgcgpio, enabled ? "enabled" : "disabled"); #else - lldbg(" RCGC2: %08x (%s)\n", - rcgc2, enabled ? "enabled" : "disabled"); + gpioinfo(" RCGC2: %08x (%s)\n", + rcgc2, enabled ? "enabled" : "disabled"); #endif /* Don't bother with the rest unless the port is enabled */ if (enabled) { - lldbg(" AFSEL: %02x DEN: %02x DIR: %02x DATA: %02x\n", - getreg32(base + TIVA_GPIO_AFSEL_OFFSET), getreg32(base + TIVA_GPIO_DEN_OFFSET), - getreg32(base + TIVA_GPIO_DIR_OFFSET), getreg32(base + TIVA_GPIO_DATA_OFFSET + 0x3fc)); - lldbg(" IS: %02x IBE: %02x IEV: %02x IM: %02x RIS: %08x MIS: %08x\n", - getreg32(base + TIVA_GPIO_IEV_OFFSET), getreg32(base + TIVA_GPIO_IM_OFFSET), - getreg32(base + TIVA_GPIO_RIS_OFFSET), getreg32(base + TIVA_GPIO_MIS_OFFSET)); - lldbg(" 2MA: %02x 4MA: %02x 8MA: %02x ODR: %02x PUR %02x PDR: %02x SLR: %02x\n", - getreg32(base + TIVA_GPIO_DR2R_OFFSET), getreg32(base + TIVA_GPIO_DR4R_OFFSET), - getreg32(base + TIVA_GPIO_DR8R_OFFSET), getreg32(base + TIVA_GPIO_ODR_OFFSET), - getreg32(base + TIVA_GPIO_PUR_OFFSET), getreg32(base + TIVA_GPIO_PDR_OFFSET), - getreg32(base + TIVA_GPIO_SLR_OFFSET)); + gpioinfo(" AFSEL: %02x DEN: %02x DIR: %02x DATA: %02x\n", + getreg32(base + TIVA_GPIO_AFSEL_OFFSET), getreg32(base + TIVA_GPIO_DEN_OFFSET), + getreg32(base + TIVA_GPIO_DIR_OFFSET), getreg32(base + TIVA_GPIO_DATA_OFFSET + 0x3fc)); + gpioinfo(" IS: %02x IBE: %02x IEV: %02x IM: %02x RIS: %08x MIS: %08x\n", + getreg32(base + TIVA_GPIO_IEV_OFFSET), getreg32(base + TIVA_GPIO_IM_OFFSET), + getreg32(base + TIVA_GPIO_RIS_OFFSET), getreg32(base + TIVA_GPIO_MIS_OFFSET)); + gpioinfo(" 2MA: %02x 4MA: %02x 8MA: %02x ODR: %02x PUR %02x PDR: %02x SLR: %02x\n", + getreg32(base + TIVA_GPIO_DR2R_OFFSET), getreg32(base + TIVA_GPIO_DR4R_OFFSET), + getreg32(base + TIVA_GPIO_DR8R_OFFSET), getreg32(base + TIVA_GPIO_ODR_OFFSET), + getreg32(base + TIVA_GPIO_PUR_OFFSET), getreg32(base + TIVA_GPIO_PDR_OFFSET), + getreg32(base + TIVA_GPIO_SLR_OFFSET)); } leave_critical_section(flags); -#endif /* CONFIG_DEBUG */ - return OK; } +#endif /* CONFIG_DEBUG_GPIO_INFO */ diff --git a/arch/arm/src/tiva/tiva_flash.c b/arch/arm/src/tiva/tiva_flash.c index 0dd70dd1dcb313b8f5f51f831c2c48433a6545b1..c606b1888751734f5d9a616bcee6b0dc0ac4e753 100644 --- a/arch/arm/src/tiva/tiva_flash.c +++ b/arch/arm/src/tiva/tiva_flash.c @@ -146,7 +146,7 @@ static int tiva_erase(FAR struct mtd_dev_s *dev, off_t startblock, { pageaddr = TIVA_VIRTUAL_BASE + curpage * TIVA_FLASH_PAGESIZE; - fvdbg("Erase page at %08x\n", pageaddr); + finfo("Erase page at %08x\n", pageaddr); /* set page address */ diff --git a/arch/arm/src/tiva/tiva_gpio.c b/arch/arm/src/tiva/tiva_gpio.c index 6ce03bdae5595b1022422df19220f9b7cf19c730..5d009d786473820fe1c9884750455f59afebd820 100644 --- a/arch/arm/src/tiva/tiva_gpio.c +++ b/arch/arm/src/tiva/tiva_gpio.c @@ -732,15 +732,19 @@ static inline void tiva_interrupt(uint32_t pinset) modifyreg32(base + TIVA_GPIO_IEV_OFFSET, ievclr, ievset); -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO uint32_t regval; - gpiovdbg("reg expected actual: [interrupt type=%d]\n", inttype); + + gpioinfo("reg expected actual: [interrupt type=%d]\n", inttype); + regval = (getreg32(base+TIVA_GPIO_IS_OFFSET) & pin) ? pin : 0; - gpiovdbg("IS 0x%08x 0x%08x\n", isset, regval); + gpioinfo("IS 0x%08x 0x%08x\n", isset, regval); + regval = (getreg32(base+TIVA_GPIO_IBE_OFFSET) & pin) ? pin : 0; - gpiovdbg("IBE 0x%08x 0x%08x\n", ibeset, regval); + gpioinfo("IBE 0x%08x 0x%08x\n", ibeset, regval); + regval = (getreg32(base+TIVA_GPIO_IEV_OFFSET) & pin) ? pin : 0; - gpiovdbg("IEV 0x%08x 0x%08x\n", ievset, regval); + gpioinfo("IEV 0x%08x 0x%08x\n", ievset, regval); #endif } #endif @@ -987,16 +991,12 @@ void tiva_gpio_lockport(uint32_t pinset, bool lock) if (lock) { -#ifdef CONFIG_DEBUG_GPIO - gpiovdbg(" locking port=%d pin=%d\n", port, pinno); -#endif + gpioinfo(" locking port=%d pin=%d\n", port, pinno); modifyreg32(base + TIVA_GPIO_CR_OFFSET, pinmask, 0); } else { -#ifdef CONFIG_DEBUG_GPIO - gpiovdbg("unlocking port=%d pin=%d\n", port, pinno); -#endif + gpioinfo("unlocking port=%d pin=%d\n", port, pinno); modifyreg32(base + TIVA_GPIO_CR_OFFSET, 0, pinmask); } diff --git a/arch/arm/src/tiva/tiva_gpio.h b/arch/arm/src/tiva/tiva_gpio.h index 12b466042e35f3eac46e73555ba0f9bf045af50c..a20dccc15f08b4ba72ba143623191618dd4d4286 100644 --- a/arch/arm/src/tiva/tiva_gpio.h +++ b/arch/arm/src/tiva/tiva_gpio.h @@ -319,47 +319,17 @@ # define GPIO_PIN_6 (6 << GPIO_PIN_SHIFT) # define GPIO_PIN_7 (7 << GPIO_PIN_SHIFT) -/* Debug ********************************************************************/ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_GPIO -#endif - -#ifdef CONFIG_DEBUG_GPIO -# define gpiodbg(format, ...) dbg(format, ##__VA_ARGS__) -# define gpiolldbg(format, ...) lldbg(format, ##__VA_ARGS__) -# define gpiovdbg(format, ...) vdbg(format, ##__VA_ARGS__) -# define gpiollvdbg(format, ...) llvdbg(format, ##__VA_ARGS__) -#else -# define gpiodbg(x...) -# define gpiolldbg(x...) -# define gpiovdbg(x...) -# define gpiollvdbg(x...) -#endif - /**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Inline Functions + * Public Function Prototypes ****************************************************************************/ #ifndef __ASSEMBLY__ -/**************************************************************************** - * Public Data - ****************************************************************************/ - #if defined(__cplusplus) extern "C" { #endif -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - uintptr_t tiva_gpiobaseaddress(unsigned int port); /**************************************************************************** @@ -413,8 +383,18 @@ int tiva_dumpgpio(uint32_t pinset, const char *msg); void tiva_gpio_lockport(uint32_t pinset, bool lock); -#ifdef CONFIG_DEBUG_GPIO +/**************************************************************************** + * Function: tiva_dumpgpio + * + * Description: + * Dump all GPIO registers associated with the provided base address + * + ****************************************************************************/ + +#ifdef CONFIG_DEBUG_GPIO_INFO void tiva_gpio_dumpconfig(uint32_t pinset); +#else +# define tiva_gpio_dumpconfig(p) #endif #ifdef CONFIG_TIVA_GPIO_IRQS diff --git a/arch/arm/src/tiva/tiva_gpioirq.c b/arch/arm/src/tiva/tiva_gpioirq.c index 33b5fa0e3a66dd17f130373cfbfbeaa32e541740..1023dd7bc23d992edb83e49e68d3357702597239 100644 --- a/arch/arm/src/tiva/tiva_gpioirq.c +++ b/arch/arm/src/tiva/tiva_gpioirq.c @@ -293,7 +293,7 @@ static int tiva_gpioporthandler(uint8_t port, void *context) uint8_t pin; /* Pin number */ tiva_gpioirqclear(port, 0xff); - gpiollvdbg("mis=0b%08b\n", mis & 0xff); + gpioinfo("mis=0b%08b\n", mis & 0xff); /* Now process each IRQ pending in the MIS */ @@ -303,10 +303,10 @@ static int tiva_gpioporthandler(uint8_t port, void *context) { if (((mis >> pin) & 1) != 0) { - gpiollvdbg("port=%d pin=%d irq=%p index=%d\n", - port, pin, - g_gpioportirqvector[TIVA_GPIO_IRQ_IDX(port, pin)], - TIVA_GPIO_IRQ_IDX(port, pin)); + gpioinfo("port=%d pin=%d irq=%p index=%d\n", + port, pin, + g_gpioportirqvector[TIVA_GPIO_IRQ_IDX(port, pin)], + TIVA_GPIO_IRQ_IDX(port, pin)); g_gpioportirqvector[TIVA_GPIO_IRQ_IDX(port, pin)](irq, context); } @@ -560,7 +560,7 @@ int tiva_gpioirqinitialize(void) g_gpioportirqvector[i] = irq_unexpected_isr; } - gpiovdbg("tiva_gpioirqinitialize isr=%d/%d irq_unexpected_isr=%p\n", + gpioinfo("tiva_gpioirqinitialize isr=%d/%d irq_unexpected_isr=%p\n", i, TIVA_NIRQ_PINS, irq_unexpected_isr); /* Then attach each GPIO interrupt handlers and enable corresponding GPIO @@ -692,7 +692,7 @@ xcpt_t tiva_gpioirqattach(uint32_t pinset, xcpt_t isr) * to the unexpected interrupt handler. */ - gpiovdbg("assign port=%d pin=%d function=%p to idx=%d\n", + gpioinfo("assign port=%d pin=%d function=%p to idx=%d\n", port, pinno, isr, TIVA_GPIO_IRQ_IDX(port, pinno)); if (isr == NULL) @@ -737,7 +737,7 @@ void tiva_gpioportirqattach(uint8_t port, xcpt_t isr) * to the unexpected interrupt handler. */ - gpiovdbg("assign function=%p to port=%d\n", isr, port); + gpioinfo("assign function=%p to port=%d\n", isr, port); if (isr == NULL) { diff --git a/arch/arm/src/tiva/tiva_i2c.c b/arch/arm/src/tiva/tiva_i2c.c index 28450836f844a514bc7a39bc67376405dad16283..1d0127aa04b0d1e6d8fe7d2c3d63a8cdb7649c68 100644 --- a/arch/arm/src/tiva/tiva_i2c.c +++ b/arch/arm/src/tiva/tiva_i2c.c @@ -119,17 +119,8 @@ #define MKI2C_OUTPUT(p) (((p) & (GPIO_PORT_MASK | GPIO_PIN_MASK)) | I2C_OUTPUT) /* Debug ****************************************************************************/ -/* CONFIG_DEBUG_I2C + CONFIG_DEBUG enables general I2C debug output. */ -#ifdef CONFIG_DEBUG_I2C -# define i2cdbg dbg -# define i2cvdbg vdbg -#else -# define i2cdbg(x...) -# define i2cvdbg(x...) -#endif - -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_I2C_INFO # undef CONFIG_TIVA_I2C_REGDEBUG #endif @@ -609,7 +600,7 @@ static bool tiva_i2c_checkreg(struct tiva_i2c_priv_s *priv, bool wr, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", priv->ntimes); + i2cinfo("...[Repeats %d times]...\n", priv->ntimes); } /* Save information about the new access */ @@ -642,7 +633,7 @@ static uint32_t tiva_i2c_getreg(struct tiva_i2c_priv_s *priv, unsigned int offse if (tiva_i2c_checkreg(priv, false, regval, regaddr)) { - lldbg("%08x->%08x\n", regaddr, regval); + i2cinfo("%08x->%08x\n", regaddr, regval); } return regval; @@ -671,7 +662,7 @@ static void tiva_i2c_putreg(struct tiva_i2c_priv_s *priv, unsigned int offset, if (tiva_i2c_checkreg(priv, true, regval, regaddr)) { - lldbg("%08x<-%08x\n", regaddr, regval); + i2cinfo("%08x<-%08x\n", regaddr, regval); } putreg32(regval, regaddr); @@ -865,7 +856,7 @@ static inline int tiva_i2c_sem_waitdone(struct tiva_i2c_priv_s *priv) while (priv->intstate != INTSTATE_DONE && elapsed < timeout); - i2cvdbg("intstate: %d elapsed: %ld threshold: %ld status: %08x\n", + i2cinfo("intstate: %d elapsed: %ld threshold: %ld status: %08x\n", priv->intstate, (long)elapsed, (long)timeout, status); /* Set the interrupt state back to IDLE */ @@ -968,7 +959,7 @@ static void tiva_i2c_tracenew(struct tiva_i2c_priv_s *priv, uint32_t status) if (priv->tndx >= (CONFIG_I2C_NTRACE-1)) { - i2cdbg("I2C%d: ERROR: Trace table overflow\n", priv->config->devno); + i2cerr("ERROR: I2C%d trace table overflow\n", priv->config->devno); return; } @@ -1017,7 +1008,7 @@ static void tiva_i2c_traceevent(struct tiva_i2c_priv_s *priv, if (priv->tndx >= (CONFIG_I2C_NTRACE-1)) { - i2cdbg("I2C%d: ERROR: Trace table overflow\n", priv->config->devno); + i2cerr("ERROR: I2C%d trace table overflow\n", priv->config->devno); return; } @@ -1676,7 +1667,7 @@ static int tiva_i2c_initialize(struct tiva_i2c_priv_s *priv, uint32_t frequency) uint32_t regval; int ret; - i2cvdbg("I2C%d: refs=%d\n", config->devno, priv->refs); + i2cinfo("I2C%d: refs=%d\n", config->devno, priv->refs); /* Enable power and clocking to the I2C peripheral. * @@ -1692,12 +1683,12 @@ static int tiva_i2c_initialize(struct tiva_i2c_priv_s *priv, uint32_t frequency) tiva_i2c_enablepwr(config->devno); tiva_i2c_enableclk(config->devno); - i2cvdbg("I2C%d: RCGI2C[%08x]=%08x\n", + i2cinfo("I2C%d: RCGI2C[%08x]=%08x\n", config->devno, TIVA_SYSCON_RCGCI2C, getreg32(TIVA_SYSCON_RCGCI2C)); #else modifyreg32(TIVA_SYSCON_RCGC1, 0, priv->rcgbit); - i2cvdbg("I2C%d: RCGC1[%08x]=%08x\n", + i2cinfo("I2C%d: RCGC1[%08x]=%08x\n", config->devno, TIVA_SYSCON_RCGC1, getreg32(TIVA_SYSCON_RCGC1)); #endif @@ -1713,13 +1704,13 @@ static int tiva_i2c_initialize(struct tiva_i2c_priv_s *priv, uint32_t frequency) /* Configure pins */ - i2cvdbg("I2C%d: SCL=%08x SDA=%08x\n", + i2cinfo("I2C%d: SCL=%08x SDA=%08x\n", config->devno, config->scl_pin, config->sda_pin); ret = tiva_configgpio(config->scl_pin); if (ret < 0) { - i2cvdbg("I2C%d: tiva_configgpio(%08x) failed: %d\n", + i2cinfo("I2C%d: tiva_configgpio(%08x) failed: %d\n", config->scl_pin, ret); return ret; } @@ -1727,7 +1718,7 @@ static int tiva_i2c_initialize(struct tiva_i2c_priv_s *priv, uint32_t frequency) ret = tiva_configgpio(config->sda_pin); if (ret < 0) { - i2cvdbg("I2C%d: tiva_configgpio(%08x) failed: %d\n", + i2cinfo("I2C%d: tiva_configgpio(%08x) failed: %d\n", config->sda_pin, ret); tiva_configgpio(MKI2C_INPUT(config->scl_pin)); return ret; @@ -1779,7 +1770,7 @@ static int tiva_i2c_uninitialize(struct tiva_i2c_priv_s *priv) { uint32_t regval; - i2cvdbg("I2C%d: refs=%d\n", priv->config->devno, priv->refs); + i2cinfo("I2C%d: refs=%d\n", priv->config->devno, priv->refs); /* Disable I2C */ @@ -1823,7 +1814,7 @@ static void tiva_i2c_setclock(struct tiva_i2c_priv_s *priv, uint32_t frequency) uint32_t regval; uint32_t tmp; - i2cvdbg("I2C%d: frequency: %u\n", priv->config->devno, frequency); + i2cinfo("I2C%d: frequency: %u\n", priv->config->devno, frequency); /* Has the I2C bus frequency changed? */ @@ -1876,7 +1867,7 @@ static int tiva_i2c_transfer(struct i2c_master_s *dev, struct i2c_msg_s *msgv, int ret = OK; DEBUGASSERT(priv && priv->config && msgv && msgc > 0); - i2cvdbg("I2C%d: msgc=%d\n", priv->config->devno, msgc); + i2cinfo("I2C%d: msgc=%d\n", priv->config->devno, msgc); tiva_i2c_sem_wait(priv); /* Ensure that address or flags don't change meanwhile */ @@ -1916,7 +1907,7 @@ static int tiva_i2c_transfer(struct i2c_master_s *dev, struct i2c_msg_s *msgv, if (tiva_i2c_sem_waitdone(priv) < 0) { - i2cdbg("I2C%d: ERROR: Timed out\n", priv->config->devno); + i2cerr("ERROR: I2C%d timed out\n", priv->config->devno); ret = -ETIMEDOUT; } #if 0 /* I2CM_CS_CLKTO */ @@ -1925,7 +1916,7 @@ static int tiva_i2c_transfer(struct i2c_master_s *dev, struct i2c_msg_s *msgv, else if ((priv->mstatus & (I2CM_CS_ERROR | I2CM_CS_ARBLST)) != 0) #endif { - i2cdbg("I2C%d: ERROR: I2C error status: %08x\n", + i2cerr("ERROR: I2C%d I2C error status: %08x\n", priv->config->devno, priv->mstatus); if ((priv->mstatus & I2CM_CS_ARBLST) != 0) @@ -1972,7 +1963,7 @@ static int tiva_i2c_transfer(struct i2c_master_s *dev, struct i2c_msg_s *msgv, * other bits are valid. */ - i2cdbg("I2C%d: ERROR: I2C still busy: %08x\n", + i2cerr("ERROR: I2C%d I2C still busy: %08x\n", priv->config->devno, regval); /* Reset and reinitialize the I2C hardware */ @@ -2027,7 +2018,7 @@ static int tiva_i2c_reset(FAR struct i2c_master_s * dev) int ret = ERROR; DEBUGASSERT(priv && priv->config); - i2cvdbg("I2C%d:\n", priv->config->devno); + i2cinfo("I2C%d:\n", priv->config->devno); /* Our caller must own a ref */ @@ -2144,7 +2135,7 @@ struct i2c_master_s *tiva_i2cbus_initialize(int port) const struct tiva_i2c_config_s *config; int flags; - i2cvdbg("I2C%d: Initialize\n", port); + i2cinfo("I2C%d: Initialize\n", port); /* Get I2C private structure */ @@ -2221,7 +2212,7 @@ struct i2c_master_s *tiva_i2cbus_initialize(int port) #endif default: - i2cdbg("I2C%d: ERROR: Not supported\n", port); + i2cerr("ERROR: I2C%d not supported\n", port); return NULL; } @@ -2267,7 +2258,7 @@ int tiva_i2cbus_uninitialize(struct i2c_master_s *dev) DEBUGASSERT(priv && priv->config && priv->refs > 0); - i2cvdbg("I2C%d: Uninitialize\n", priv->config->devno); + i2cinfo("I2C%d: Uninitialize\n", priv->config->devno); /* Decrement reference count and check for underflow */ diff --git a/arch/arm/src/tiva/tiva_irq.c b/arch/arm/src/tiva/tiva_irq.c index 67f8f1806020490de47f4c30dc6465fc90df2c0c..6771007d59e8d0f70f19239647cd1812adc66a67 100644 --- a/arch/arm/src/tiva/tiva_irq.c +++ b/arch/arm/src/tiva/tiva_irq.c @@ -107,71 +107,71 @@ extern uint32_t _vectors[]; * ****************************************************************************/ -#if defined(CONFIG_DEBUG_IRQ) +#if defined(CONFIG_DEBUG_IRQ_INFO) static void tiva_dumpnvic(const char *msg, int irq) { irqstate_t flags; flags = enter_critical_section(); - lldbg("NVIC (%s, irq=%d):\n", msg, irq); - lldbg(" INTCTRL: %08x VECTAB: %08x\n", - getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB)); + irqinfo("NVIC (%s, irq=%d):\n", msg, irq); + irqinfo(" INTCTRL: %08x VECTAB: %08x\n", + getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB)); #if 0 - lldbg(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n", - getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA), - getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE)); + irqinfo(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n", + getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA), + getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE)); #endif #if NR_VECTORS < 64 - lldbg(" IRQ ENABLE: %08x %08x\n", - getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE)); + irqinfo(" IRQ ENABLE: %08x %08x\n", + getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE)); #elif NR_VECTORS < 96 - lldbg(" IRQ ENABLE: %08x %08x %08x\n", - getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE), - getreg32(NVIC_IRQ64_95_ENABLE)); + irqinfo(" IRQ ENABLE: %08x %08x %08x\n", + getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE), + getreg32(NVIC_IRQ64_95_ENABLE)); #elif NR_VECTORS < 128 - lldbg(" IRQ ENABLE: %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE), - getreg32(NVIC_IRQ64_95_ENABLE), getreg32(NVIC_IRQ96_127_ENABLE)); + irqinfo(" IRQ ENABLE: %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE), + getreg32(NVIC_IRQ64_95_ENABLE), getreg32(NVIC_IRQ96_127_ENABLE)); #endif #if NR_VECTORS > 127 # warning Missing output #endif - lldbg(" SYSH_PRIO: %08x %08x %08x\n", - getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY), - getreg32(NVIC_SYSH12_15_PRIORITY)); - lldbg(" IRQ PRIO: %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY), - getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY)); - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY), - getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY)); - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY), - getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY)); + irqinfo(" SYSH_PRIO: %08x %08x %08x\n", + getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY), + getreg32(NVIC_SYSH12_15_PRIORITY)); + irqinfo(" IRQ PRIO: %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY), + getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY), + getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY), + getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY)); #if NR_VECTORS > 47 - lldbg(" %08x %08x %08x %08x\n", - getreg32(NVIC_IRQ48_51_PRIORITY), getreg32(NVIC_IRQ52_55_PRIORITY), - getreg32(NVIC_IRQ56_59_PRIORITY), getreg32(NVIC_IRQ60_63_PRIORITY)); + irqinfo(" %08x %08x %08x %08x\n", + getreg32(NVIC_IRQ48_51_PRIORITY), getreg32(NVIC_IRQ52_55_PRIORITY), + getreg32(NVIC_IRQ56_59_PRIORITY), getreg32(NVIC_IRQ60_63_PRIORITY)); #endif #if NR_VECTORS > 63 - lldbg(" %08x %08x %08x %08x\n", + irqinfo(" %08x %08x %08x %08x\n", getreg32(NVIC_IRQ64_67_PRIORITY), getreg32(NVIC_IRQ68_71_PRIORITY), getreg32(NVIC_IRQ72_75_PRIORITY), getreg32(NVIC_IRQ76_79_PRIORITY)); #endif #if NR_VECTORS > 79 - lldbg(" %08x %08x %08x %08x\n", + irqinfo(" %08x %08x %08x %08x\n", getreg32(NVIC_IRQ80_83_PRIORITY), getreg32(NVIC_IRQ84_87_PRIORITY), getreg32(NVIC_IRQ88_91_PRIORITY), getreg32(NVIC_IRQ92_95_PRIORITY)); #endif #if NR_VECTORS > 95 - lldbg(" %08x %08x %08x %08x\n", + irqinfo(" %08x %08x %08x %08x\n", getreg32(NVIC_IRQ96_99_PRIORITY), getreg32(NVIC_IRQ100_103_PRIORITY), getreg32(NVIC_IRQ104_107_PRIORITY), getreg32(NVIC_IRQ108_111_PRIORITY)); #endif #if NR_VECTORS > 111 - lldbg(" %08x %08x %08x %08x\n", + irqinfo(" %08x %08x %08x %08x\n", getreg32(NVIC_IRQ112_115_PRIORITY), getreg32(NVIC_IRQ116_119_PRIORITY), getreg32(NVIC_IRQ120_123_PRIORITY), getreg32(NVIC_IRQ124_127_PRIORITY)); #endif @@ -195,11 +195,11 @@ static void tiva_dumpnvic(const char *msg, int irq) * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES static int tiva_nmi(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! NMI received\n"); + _err("PANIC!!! NMI received\n"); PANIC(); return 0; } @@ -207,7 +207,7 @@ static int tiva_nmi(int irq, FAR void *context) static int tiva_busfault(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Bus fault recived\n"); + _err("PANIC!!! Bus fault recived\n"); PANIC(); return 0; } @@ -215,7 +215,7 @@ static int tiva_busfault(int irq, FAR void *context) static int tiva_usagefault(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Usage fault received\n"); + _err("PANIC!!! Usage fault received\n"); PANIC(); return 0; } @@ -223,7 +223,7 @@ static int tiva_usagefault(int irq, FAR void *context) static int tiva_pendsv(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! PendSV received\n"); + _err("PANIC!!! PendSV received\n"); PANIC(); return 0; } @@ -231,7 +231,7 @@ static int tiva_pendsv(int irq, FAR void *context) static int tiva_dbgmonitor(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Debug Monitor received\n"); + _err("PANIC!!! Debug Monitor received\n"); PANIC(); return 0; } @@ -239,7 +239,7 @@ static int tiva_dbgmonitor(int irq, FAR void *context) static int tiva_reserved(int irq, FAR void *context) { (void)up_irq_save(); - dbg("PANIC!!! Reserved interrupt\n"); + _err("PANIC!!! Reserved interrupt\n"); PANIC(); return 0; } @@ -474,7 +474,7 @@ void up_irqinitialize(void) /* Attach all other processor exceptions (except reset and sys tick) */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES irq_attach(TIVA_IRQ_NMI, tiva_nmi); #ifndef CONFIG_ARM_MPU irq_attach(TIVA_IRQ_MEMFAULT, up_memfault); diff --git a/arch/arm/src/tiva/tiva_serial.c b/arch/arm/src/tiva/tiva_serial.c index fb9ea3ee61aac155eb38b15a7552bf1430f91808..e131fbd5d6bce55e723cd1cc17a45ed1c6d18913 100644 --- a/arch/arm/src/tiva/tiva_serial.c +++ b/arch/arm/src/tiva/tiva_serial.c @@ -109,13 +109,16 @@ # define UART4_ASSIGNED 1 #elif defined(CONFIG_UART5_SERIAL_CONSOLE) # define CONSOLE_DEV g_uart5port /* UART5 is console */ -# define TTYS5_DEV g_uart5port /* UART5 is ttyS0 */ +# define TTYS0_DEV g_uart5port /* UART5 is ttyS0 */ +# define UART5_ASSIGNED 1 #elif defined(CONFIG_UART6_SERIAL_CONSOLE) # define CONSOLE_DEV g_uart6port /* UART6 is console */ -# define TTYS5_DEV g_uart6port /* UART6 is ttyS0 */ +# define TTYS0_DEV g_uart6port /* UART6 is ttyS0 */ +# define UART6_ASSIGNED 1 #elif defined(CONFIG_UART7_SERIAL_CONSOLE) # define CONSOLE_DEV g_uart7port /* UART7 is console */ -# define TTYS5_DEV g_uart7port /* UART7 is ttyS0 */ +# define TTYS0_DEV g_uart7port /* UART7 is ttyS0 */ +# define UART7_ASSIGNED 1 #else # undef CONSOLE_DEV /* No console */ # if defined(CONFIG_TIVA_UART0) diff --git a/arch/arm/src/tiva/tiva_ssi.c b/arch/arm/src/tiva/tiva_ssi.c index 6870b9eb374b2a9ad3efd91c10817763e83c1fa0..882d6460df0e74a305dd53ad534ab28a62b305b1 100644 --- a/arch/arm/src/tiva/tiva_ssi.c +++ b/arch/arm/src/tiva/tiva_ssi.c @@ -66,18 +66,12 @@ * Pre-processor Definitions ****************************************************************************/ -/* Enables debug output from this file (needs CONFIG_DEBUG with - * CONFIG_DEBUG_VERBOSE too) - */ - -#undef SSI_DEBUG /* Define to enable debug */ +/* CONFIG_DEBUG_SPI enables debug output from this file */ -#ifdef SSI_DEBUG -# define ssidbg lldbg -# define ssivdbg llvdbg +#ifdef CONFIG_DEBUG_SPI +# define ssi_dumpgpio(m) tiva_dumpgpio(SDCCS_GPIO, m) #else -# define ssidbg(x...) -# define ssivdbg(x...) +# define ssi_dumpgpio(m) #endif /* How many SSI modules does this chip support? The LM3S6918 supports 2 SSI @@ -462,7 +456,7 @@ static uint32_t ssi_disable(struct tiva_ssidev_s *priv) retval = ssi_getreg(priv, TIVA_SSI_CR1_OFFSET); regval = (retval & ~SSI_CR1_SSE); ssi_putreg(priv, TIVA_SSI_CR1_OFFSET, regval); - ssivdbg("CR1: %08x\n", regval); + spiinfo("CR1: %08x\n", regval); return retval; } @@ -489,7 +483,7 @@ static void ssi_enable(struct tiva_ssidev_s *priv, uint32_t enable) regval &= ~SSI_CR1_SSE; regval |= (enable & SSI_CR1_SSE); ssi_putreg(priv, TIVA_SSI_CR1_OFFSET, regval); - ssivdbg("CR1: %08x\n", regval); + spiinfo("CR1: %08x\n", regval); } /**************************************************************************** @@ -538,14 +532,14 @@ static void ssi_semtake(sem_t *sem) static void ssi_txnull(struct tiva_ssidev_s *priv) { - ssivdbg("TX: ->0xffff\n"); + spiinfo("TX: ->0xffff\n"); ssi_putreg(priv, TIVA_SSI_DR_OFFSET, 0xffff); } static void ssi_txuint16(struct tiva_ssidev_s *priv) { uint16_t *ptr = (uint16_t *)priv->txbuffer; - ssivdbg("TX: %p->%04x\n", ptr, *ptr); + spiinfo("TX: %p->%04x\n", ptr, *ptr); ssi_putreg(priv, TIVA_SSI_DR_OFFSET, (uint32_t)(*ptr++)); priv->txbuffer = (void *)ptr; } @@ -553,7 +547,7 @@ static void ssi_txuint16(struct tiva_ssidev_s *priv) static void ssi_txuint8(struct tiva_ssidev_s *priv) { uint8_t *ptr = (uint8_t *)priv->txbuffer; - ssivdbg("TX: %p->%02x\n", ptr, *ptr); + spiinfo("TX: %p->%02x\n", ptr, *ptr); ssi_putreg(priv, TIVA_SSI_DR_OFFSET, (uint32_t)(*ptr++)); priv->txbuffer = (void *)ptr; } @@ -577,9 +571,9 @@ static void ssi_txuint8(struct tiva_ssidev_s *priv) static void ssi_rxnull(struct tiva_ssidev_s *priv) { -#if defined(SSI_DEBUG) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_SPI_INFO uint32_t regval = ssi_getreg(priv, TIVA_SSI_DR_OFFSET); - ssivdbg("RX: discard %04x\n", regval); + spiinfo("RX: discard %04x\n", regval); #else (void)ssi_getreg(priv, TIVA_SSI_DR_OFFSET); #endif @@ -589,7 +583,7 @@ static void ssi_rxuint16(struct tiva_ssidev_s *priv) { uint16_t *ptr = (uint16_t *)priv->rxbuffer; *ptr = (uint16_t)ssi_getreg(priv, TIVA_SSI_DR_OFFSET); - ssivdbg("RX: %p<-%04x\n", ptr, *ptr); + spiinfo("RX: %p<-%04x\n", ptr, *ptr); priv->rxbuffer = (void *)(++ptr); } @@ -597,7 +591,7 @@ static void ssi_rxuint8(struct tiva_ssidev_s *priv) { uint8_t *ptr = (uint8_t *)priv->rxbuffer; *ptr = (uint8_t)ssi_getreg(priv, TIVA_SSI_DR_OFFSET); - ssivdbg("RX: %p<-%02x\n", ptr, *ptr); + spiinfo("RX: %p<-%02x\n", ptr, *ptr); priv->rxbuffer = (void *)(++ptr); } @@ -719,7 +713,7 @@ static int ssi_performtx(struct tiva_ssidev_s *priv) * when the Tx FIFO is 1/2 full or less. */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES regval |= (SSI_IM_TX | SSI_RIS_ROR); #else regval |= SSI_IM_TX; @@ -792,7 +786,7 @@ static inline void ssi_performrx(struct tiva_ssidev_s *priv) * interrupt, probably an Rx timeout). */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES regval |= (SSI_IM_RX | SSI_IM_RT | SSI_IM_ROR); #else regval |= (SSI_IM_RX | SSI_IM_RT); @@ -841,7 +835,8 @@ static int ssi_transfer(struct tiva_ssidev_s *priv, const void *txbuffer, #endif int ntxd; - ssidbg("txbuffer: %p rxbuffer: %p nwords: %d\n", txbuffer, rxbuffer, nwords); + spiinfo("txbuffer: %p rxbuffer: %p nwords: %d\n", + txbuffer, rxbuffer, nwords); /* Set up to perform the transfer */ @@ -882,7 +877,7 @@ static int ssi_transfer(struct tiva_ssidev_s *priv, const void *txbuffer, #ifndef CONFIG_SSI_POLLWAIT flags = enter_critical_section(); - ssivdbg("ntxwords: %d nrxwords: %d nwords: %d SR: %08x\n", + spiinfo("ntxwords: %d nrxwords: %d nwords: %d SR: %08x\n", priv->ntxwords, priv->nrxwords, priv->nwords, ssi_getreg(priv, TIVA_SSI_SR_OFFSET)); @@ -896,7 +891,7 @@ static int ssi_transfer(struct tiva_ssidev_s *priv, const void *txbuffer, ssi_performrx(priv); - ssivdbg("ntxwords: %d nrxwords: %d nwords: %d SR: %08x IM: %08x\n", + spiinfo("ntxwords: %d nrxwords: %d nwords: %d SR: %08x IM: %08x\n", priv->ntxwords, priv->nrxwords, priv->nwords, ssi_getreg(priv, TIVA_SSI_SR_OFFSET), ssi_getreg(priv, TIVA_SSI_IM_OFFSET)); @@ -906,14 +901,14 @@ static int ssi_transfer(struct tiva_ssidev_s *priv, const void *txbuffer, * with the transfer, so it should be safe with no timeout. */ - ssivdbg("Waiting for transfer complete\n"); + spiinfo("Waiting for transfer complete\n"); leave_critical_section(flags); do { ssi_semtake(&priv->xfrsem); } while (priv->nrxwords < priv->nwords); - ssidbg("Transfer complete\n"); + spiinfo("Transfer complete\n"); #else /* Perform the transfer using polling logic. This will totally @@ -1022,14 +1017,14 @@ static int ssi_interrupt(int irq, void *context) /* Check for Rx FIFO overruns */ -#ifdef SSI_DEBUG +#ifdef CONFIG_DEBUG_SPI_ERROR if ((regval & SSI_RIS_ROR) != 0) { - ssidbg("Rx FIFO Overrun!\n"); + spierr("ERROR: Rx FIFO Overrun!\n"); } #endif - ssivdbg("ntxwords: %d nrxwords: %d nwords: %d SR: %08x\n", + spiinfo("ntxwords: %d nrxwords: %d nwords: %d SR: %08x\n", priv->ntxwords, priv->nrxwords, priv->nwords, ssi_getreg(priv, TIVA_SSI_SR_OFFSET)); @@ -1041,7 +1036,7 @@ static int ssi_interrupt(int irq, void *context) ssi_performrx(priv); - ssivdbg("ntxwords: %d nrxwords: %d nwords: %d SR: %08x IM: %08x\n", + spiinfo("ntxwords: %d nrxwords: %d nwords: %d SR: %08x IM: %08x\n", priv->ntxwords, priv->nrxwords, priv->nwords, ssi_getreg(priv, TIVA_SSI_SR_OFFSET), ssi_getreg(priv, TIVA_SSI_IM_OFFSET)); @@ -1056,7 +1051,7 @@ static int ssi_interrupt(int irq, void *context) /* Wake up the waiting thread */ - ssidbg("Transfer complete\n"); + spiinfo("Transfer complete\n"); ssi_semgive(&priv->xfrsem); } @@ -1137,7 +1132,7 @@ static uint32_t ssi_setfrequencyinternal(struct tiva_ssidev_s *priv, uint32_t scr; uint32_t actual; - ssidbg("frequency: %d\n", frequency); + spiinfo("frequency: %d\n", frequency); DEBUGASSERT(frequency); /* Has the frequency changed? */ @@ -1207,7 +1202,7 @@ static uint32_t ssi_setfrequencyinternal(struct tiva_ssidev_s *priv, regval &= ~SSI_CR0_SCR_MASK; regval |= (scr << SSI_CR0_SCR_SHIFT); ssi_putreg(priv, TIVA_SSI_CR0_OFFSET, regval); - ssivdbg("CR0: %08x CPSR: %08x\n", regval, cpsdvsr); + spiinfo("CR0: %08x CPSR: %08x\n", regval, cpsdvsr); /* Calcluate the actual frequency */ @@ -1261,7 +1256,7 @@ static void ssi_setmodeinternal(struct tiva_ssidev_s *priv, enum spi_mode_e mode uint32_t modebits; uint32_t regval; - ssidbg("mode: %d\n", mode); + spiinfo("mode: %d\n", mode); DEBUGASSERT(priv); /* Has the number of bits per word changed? */ @@ -1298,7 +1293,7 @@ static void ssi_setmodeinternal(struct tiva_ssidev_s *priv, enum spi_mode_e mode regval &= ~(SSI_CR0_FRF_MASK | SSI_CR0_SPH | SSI_CR0_SPO); regval |= modebits; ssi_putreg(priv, TIVA_SSI_CR0_OFFSET, regval); - ssivdbg("CR0: %08x\n", regval); + spiinfo("CR0: %08x\n", regval); /* Save the mode so that subsequent re-configuratins will be faster */ @@ -1340,7 +1335,7 @@ static void ssi_setbitsinternal(struct tiva_ssidev_s *priv, int nbits) { uint32_t regval; - ssidbg("nbits: %d\n", nbits); + spiinfo("nbits: %d\n", nbits); DEBUGASSERT(priv); if (nbits != priv->nbits && nbits >= 4 && nbits <= 16) { @@ -1348,7 +1343,7 @@ static void ssi_setbitsinternal(struct tiva_ssidev_s *priv, int nbits) regval &= ~SSI_CR0_DSS_MASK; regval |= ((nbits - 1) << SSI_CR0_DSS_SHIFT); ssi_putreg(priv, TIVA_SSI_CR0_OFFSET, regval); - ssivdbg("CR0: %08x\n", regval); + spiinfo("CR0: %08x\n", regval); priv->nbits = nbits; } @@ -1507,7 +1502,7 @@ FAR struct spi_dev_s *tiva_ssibus_initialize(int port) struct tiva_ssidev_s *priv; irqstate_t flags; - ssidbg("port: %d\n", port); + spiinfo("port: %d\n", port); /* Set up for the selected port */ diff --git a/arch/arm/src/tiva/tiva_start.c b/arch/arm/src/tiva/tiva_start.c index 6ecc46223eb8f4c0a7beb824a31d3e79d7e3c868..db2abcc5ec72675dd4a85de8083dd0280ee6b306 100644 --- a/arch/arm/src/tiva/tiva_start.c +++ b/arch/arm/src/tiva/tiva_start.c @@ -78,7 +78,7 @@ * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES # define showprogress(c) up_lowputc(c) #else # define showprogress(c) diff --git a/arch/arm/src/tiva/tiva_timer.h b/arch/arm/src/tiva/tiva_timer.h index 0f262bc73e24039ff52fef4c448a20ac77009f73..2f498581d271b5dd873a37c5ac7a8690245fadfb 100644 --- a/arch/arm/src/tiva/tiva_timer.h +++ b/arch/arm/src/tiva/tiva_timer.h @@ -127,20 +127,6 @@ #define TIMER_ISDMARTCM(c) ((((c)->flags) & TIMER_FLAG_DMARTCM) != 0) #define TIMER_ISDMAMATCH(c) ((((c)->flags) & TIMER_FLAG_DMAMATCH) != 0) -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the timer - * driver. NOTE: that only lldbg types are used so that the output is - * immediately available. - */ - -#ifdef CONFIG_DEBUG_TIMER -# define timdbg lldbg -# define timvdbg llvdbg -#else -# define timdbg(x...) -# define timvdbg(x...) -#endif - /**************************************************************************** * Public Types ****************************************************************************/ diff --git a/arch/arm/src/tiva/tiva_timerlib.c b/arch/arm/src/tiva/tiva_timerlib.c index fd6b5805db9d79ae20261d9fcf2c7828772e602c..f04dd260268871fe0b2522c8b329c60280e841a0 100644 --- a/arch/arm/src/tiva/tiva_timerlib.c +++ b/arch/arm/src/tiva/tiva_timerlib.c @@ -63,6 +63,10 @@ * Pre-processor Definitions ****************************************************************************/ +#ifndef CONFIG_DEBUG_TIMER_INFO +# undef CONFIG_TIVA_TIMER_REGDEBUG +#endif + /**************************************************************************** * Private Types ****************************************************************************/ @@ -393,7 +397,7 @@ static bool tiva_timer_checkreg(struct tiva_gptmstate_s *priv, bool wr, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", priv->ntimes); + tmrinfo("...[Repeats %d times]...\n", priv->ntimes); } /* Save information about the new access */ @@ -426,7 +430,7 @@ static uint32_t tiva_getreg(struct tiva_gptmstate_s *priv, unsigned int offset) #ifdef CONFIG_TIVA_TIMER_REGDEBUG if (tiva_timer_checkreg(priv, false, regval, regaddr)) { - lldbg("%08x->%08x\n", regaddr, regval); + tmrinfo("%08x->%08x\n", regaddr, regval); } #endif @@ -449,7 +453,7 @@ static void tiva_putreg(struct tiva_gptmstate_s *priv, unsigned int offset, #ifdef CONFIG_TIVA_TIMER_REGDEBUG if (tiva_timer_checkreg(priv, true, regval, regaddr)) { - lldbg("%08x<-%08x\n", regaddr, regval); + tmrinfo("%08x<-%08x\n", regaddr, regval); } #endif @@ -1776,7 +1780,7 @@ TIMER_HANDLE tiva_gptm_configure(const struct tiva_gptmconfig_s *config) priv->clkin = ALTCLK_FREQUENCY; #else - timvdbg("tiva_gptm_configure: Error: alternate clock only available on TM4C129 devices\n"); + tmrinfo("tiva_gptm_configure: Error: alternate clock only available on TM4C129 devices\n"); return (TIMER_HANDLE)NULL; #endif /* CONFIG_ARCH_CHIP_TM4C129 */ } @@ -2378,14 +2382,14 @@ void tiva_timer32_setinterval(TIMER_HANDLE handle, uint32_t interval) #ifdef CONFIG_TIVA_TIMER_REGDEBUG /* Generate low-level debug output outside of the critical section */ - lldbg("%08x<-%08x\n", loadr, interval); + tmrinfo("%08x<-%08x\n", loadr, interval); if (toints) { # ifdef CONFIG_ARCH_CHIP_TM4C129 - lldbg("%08x->%08x\n", moder, modev1); - lldbg("%08x<-%08x\n", moder, modev2); + tmrinfo("%08x->%08x\n", moder, modev1); + tmrinfo("%08x<-%08x\n", moder, modev2); # endif /* CONFIG_ARCH_CHIP_TM4C129 */ - lldbg("%08x<-%08x\n", imrr, priv->imr); + tmrinfo("%08x<-%08x\n", imrr, priv->imr); } #endif } @@ -2525,14 +2529,14 @@ void tiva_timer16_setinterval(TIMER_HANDLE handle, uint16_t interval, int tmndx) #ifdef CONFIG_TIVA_TIMER_REGDEBUG /* Generate low-level debug output outside of the critical section */ - lldbg("%08x<-%08x\n", loadr, interval); + tmrinfo("%08x<-%08x\n", loadr, interval); if (toints) { #ifdef CONFIG_ARCH_CHIP_TM4C129 - lldbg("%08x->%08x\n", moder, modev1); - lldbg("%08x<-%08x\n", moder, modev2); + tmrinfo("%08x->%08x\n", moder, modev1); + tmrinfo("%08x<-%08x\n", moder, modev2); #endif - lldbg("%08x<-%08x\n", imrr, priv->imr); + tmrinfo("%08x<-%08x\n", imrr, priv->imr); } #endif } @@ -2564,7 +2568,7 @@ uint32_t tiva_timer32_remaining(TIMER_HANDLE handle) uint32_t interval; uint32_t remaining; - timvdbg("Entry\n"); + tmrinfo("Entry\n"); DEBUGASSERT(priv && priv->attr && priv->config && priv->config->mode != TIMER16_MODE); @@ -2730,13 +2734,13 @@ void tiva_rtc_setalarm(TIMER_HANDLE handle, uint32_t delay) #ifdef CONFIG_TIVA_TIMER_REGDEBUG /* Generate low-level debug output outside of the critical section */ - lldbg("%08x->%08x\n", base + TIVA_TIMER_TAR_OFFSET, counter); - lldbg("%08x<-%08x\n", base + TIVA_TIMER_TAMATCHR_OFFSET, match); + tmrinfo("%08x->%08x\n", base + TIVA_TIMER_TAR_OFFSET, counter); + tmrinfo("%08x<-%08x\n", base + TIVA_TIMER_TAMATCHR_OFFSET, match); #ifdef CONFIG_ARCH_CHIP_TM4C129 - lldbg("%08x->%08x\n", base + TIVA_TIMER_ADCEV_OFFSET, adcev); - lldbg("%08x<-%08x\n", base + TIVA_TIMER_ADCEV_OFFSET, adcev | adcbits); + tmrinfo("%08x->%08x\n", base + TIVA_TIMER_ADCEV_OFFSET, adcev); + tmrinfo("%08x<-%08x\n", base + TIVA_TIMER_ADCEV_OFFSET, adcev | adcbits); #endif /* CONFIG_ARCH_CHIP_TM4C129 */ - lldbg("%08x<-%08x\n", base + TIVA_TIMER_IMR_OFFSET, priv->imr); + tmrinfo("%08x<-%08x\n", base + TIVA_TIMER_IMR_OFFSET, priv->imr); #endif } #endif @@ -2834,13 +2838,13 @@ void tiva_timer32_relmatch(TIMER_HANDLE handle, uint32_t relmatch) #ifdef CONFIG_TIVA_TIMER_REGDEBUG /* Generate low-level debug output outside of the critical section */ - lldbg("%08x->%08x\n", base + TIVA_TIMER_TAR_OFFSET, counter); - lldbg("%08x<-%08x\n", base + TIVA_TIMER_TAMATCHR_OFFSET, match); + tmrinfo("%08x->%08x\n", base + TIVA_TIMER_TAR_OFFSET, counter); + tmrinfo("%08x<-%08x\n", base + TIVA_TIMER_TAMATCHR_OFFSET, match); #ifdef CONFIG_ARCH_CHIP_TM4C129 - lldbg("%08x->%08x\n", base + TIVA_TIMER_ADCEV_OFFSET, adcev); - lldbg("%08x<-%08x\n", base + TIVA_TIMER_ADCEV_OFFSET, adcev | adcbits); + tmrinfo("%08x->%08x\n", base + TIVA_TIMER_ADCEV_OFFSET, adcev); + tmrinfo("%08x<-%08x\n", base + TIVA_TIMER_ADCEV_OFFSET, adcev | adcbits); #endif /* CONFIG_ARCH_CHIP_TM4C129 */ - lldbg("%08x<-%08x\n", base + TIVA_TIMER_IMR_OFFSET, priv->imr); + tmrinfo("%08x<-%08x\n", base + TIVA_TIMER_IMR_OFFSET, priv->imr); #endif /* CONFIG_TIVA_TIMER_REGDEBUG */ } @@ -3036,15 +3040,15 @@ void tiva_timer16_relmatch(TIMER_HANDLE handle, uint32_t relmatch, int tmndx) #ifdef CONFIG_TIVA_TIMER_REGDEBUG /* Generate low-level debug output outside of the critical section */ - lldbg("%08x->%08x\n", timerr, timerv); - lldbg("%08x->%08x\n", prescr, prescv); - lldbg("%08x<-%08x\n", matchr, matchv); - lldbg("%08x<-%08x\n", prematchr, prematchv); + tmrinfo("%08x->%08x\n", timerr, timerv); + tmrinfo("%08x->%08x\n", prescr, prescv); + tmrinfo("%08x<-%08x\n", matchr, matchv); + tmrinfo("%08x<-%08x\n", prematchr, prematchv); #ifdef CONFIG_ARCH_CHIP_TM4C129 - lldbg("%08x->%08x\n", adcevr, adcevv); - lldbg("%08x<-%08x\n", adcevr, adcevv | adcbits); + tmrinfo("%08x->%08x\n", adcevr, adcevv); + tmrinfo("%08x<-%08x\n", adcevr, adcevv | adcbits); #endif - lldbg("%08x<-%08x\n", imr, priv->imr); + tmrinfo("%08x<-%08x\n", imr, priv->imr); #endif } #endif diff --git a/arch/arm/src/tiva/tiva_timerlow32.c b/arch/arm/src/tiva/tiva_timerlow32.c index ac3ac065f53531fae325d0b3ef5d7e2138be2c13..2491e01f63476bf825a679adeb545e316b2b54be 100644 --- a/arch/arm/src/tiva/tiva_timerlow32.c +++ b/arch/arm/src/tiva/tiva_timerlow32.c @@ -57,10 +57,6 @@ #if defined(CONFIG_TIMER) && defined(CONFIG_TIVA_TIMER) -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Private Types ****************************************************************************/ @@ -200,7 +196,7 @@ static uint32_t tiva_ticks2usec(struct tiva_lowerhalf_s *priv, uint32_t ticks) static void tiva_timeout(struct tiva_lowerhalf_s *priv, uint32_t timeout) { - timvdbg("Entry: timeout=%d\n", timeout); + tmrinfo("Entry: timeout=%d\n", timeout); /* Save the desired timeout value */ @@ -215,7 +211,7 @@ static void tiva_timeout(struct tiva_lowerhalf_s *priv, uint32_t timeout) timeout = tiva_ticks2usec(priv, priv->clkticks); priv->adjustment = priv->timeout - timeout; - timvdbg("clkin=%d clkticks=%d timeout=%d, adjustment=%d\n", + tmrinfo("clkin=%d clkticks=%d timeout=%d, adjustment=%d\n", priv->clkin, priv->clkticks, priv->timeout, priv->adjustment); } @@ -237,7 +233,7 @@ static void tiva_timer_handler(TIMER_HANDLE handle, void *arg, uint32_t status) { struct tiva_lowerhalf_s *priv = (struct tiva_lowerhalf_s *)arg; - timvdbg("Entry: status=%08x\n", status); + tmrinfo("Entry: status=%08x\n", status); DEBUGASSERT(arg && status); /* Check if the timeout interrupt is pending */ @@ -276,7 +272,7 @@ static void tiva_timer_handler(TIMER_HANDLE handle, void *arg, uint32_t status) /* No handler or the handler returned false.. stop the timer */ tiva_timer32_stop(priv->handle); - timvdbg("Stopped\n"); + tmrinfo("Stopped\n"); } } } @@ -300,7 +296,7 @@ static int tiva_start(struct timer_lowerhalf_s *lower) { struct tiva_lowerhalf_s *priv = (struct tiva_lowerhalf_s *)lower; - timvdbg("Entry: started %d\n", priv->started); + tmrinfo("Entry: started %d\n", priv->started); /* Has the timer already been started? */ @@ -337,7 +333,7 @@ static int tiva_stop(struct timer_lowerhalf_s *lower) { struct tiva_lowerhalf_s *priv = (struct tiva_lowerhalf_s *)lower; - timvdbg("Entry: started %d\n", priv->started); + tmrinfo("Entry: started %d\n", priv->started); /* Has the timer already been started? */ @@ -377,7 +373,7 @@ static int tiva_getstatus(struct timer_lowerhalf_s *lower, struct tiva_lowerhalf_s *priv = (struct tiva_lowerhalf_s *)lower; uint32_t remaining; - timvdbg("Entry\n"); + tmrinfo("Entry\n"); DEBUGASSERT(priv); /* Return the status bit */ @@ -402,9 +398,9 @@ static int tiva_getstatus(struct timer_lowerhalf_s *lower, remaining = tiva_timer32_remaining(priv->handle); status->timeleft = tiva_ticks2usec(priv, remaining); - timvdbg(" flags : %08x\n", status->flags); - timvdbg(" timeout : %d\n", status->timeout); - timvdbg(" timeleft : %d\n", status->timeleft); + tmrinfo(" flags : %08x\n", status->flags); + tmrinfo(" timeout : %d\n", status->timeout); + tmrinfo(" timeleft : %d\n", status->timeleft); return OK; } @@ -435,7 +431,7 @@ static int tiva_settimeout(struct timer_lowerhalf_s *lower, uint32_t timeout) return -EPERM; } - timvdbg("Entry: timeout=%d\n", timeout); + tmrinfo("Entry: timeout=%d\n", timeout); /* Calculate the the new time settings */ @@ -476,7 +472,7 @@ static tccb_t tiva_sethandler(struct timer_lowerhalf_s *lower, flags = enter_critical_section(); DEBUGASSERT(priv); - timvdbg("Entry: handler=%p\n", handler); + tmrinfo("Entry: handler=%p\n", handler); /* Get the old handler return value */ @@ -516,7 +512,7 @@ static int tiva_ioctl(struct timer_lowerhalf_s *lower, int cmd, int ret = -ENOTTY; DEBUGASSERT(priv); - timvdbg("Entry: cmd=%d arg=%ld\n", cmd, arg); + tmrinfo("Entry: cmd=%d arg=%ld\n", cmd, arg); return ret; } @@ -557,7 +553,7 @@ int tiva_timer_initialize(FAR const char *devpath, void *drvr; int ret; - timvdbg("\n"); + tmrinfo("\n"); DEBUGASSERT(devpath); /* Allocate an instance of the lower half state structure */ @@ -565,7 +561,7 @@ int tiva_timer_initialize(FAR const char *devpath, priv = (struct tiva_lowerhalf_s *)kmm_zalloc(sizeof(struct tiva_lowerhalf_s)); if (!priv) { - timdbg("ERROR: Failed to allocate driver structure\n"); + tmrerr("ERROR: Failed to allocate driver structure\n"); return -ENOMEM; } @@ -577,7 +573,7 @@ int tiva_timer_initialize(FAR const char *devpath, #else if (config->cmn.alternate) { - timdbg("ERROR: Alternate clock unsupported on TM4C123 architecture\n"); + tmrerr("ERROR: Alternate clock unsupported on TM4C123 architecture\n"); return -ENOMEM; } else @@ -599,7 +595,7 @@ int tiva_timer_initialize(FAR const char *devpath, priv->handle = tiva_gptm_configure((const struct tiva_gptmconfig_s *)&priv->config); if (!priv->handle) { - timdbg("ERROR: Failed to create timer handle\n"); + tmrerr("ERROR: Failed to create timer handle\n"); ret = -EINVAL; goto errout_with_alloc; } diff --git a/arch/arm/src/tiva/tm4c_ethernet.c b/arch/arm/src/tiva/tm4c_ethernet.c index d8e73bec3a3266c4350d0b35443459f425f8d9ec..37fcbc22677667eba26e3dd6c0e74e5cf2db25a4 100644 --- a/arch/arm/src/tiva/tm4c_ethernet.c +++ b/arch/arm/src/tiva/tm4c_ethernet.c @@ -247,7 +247,7 @@ * enabled. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_INFO # undef CONFIG_TIVA_ETHERNET_REGDEBUG #endif @@ -630,7 +630,7 @@ struct tiva_ethmac_s xcpt_t handler; /* Attached PHY interrupt handler */ #endif - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ struct net_driver_s dev; /* Interface understood by network subsystem */ @@ -667,7 +667,7 @@ static struct tiva_ethmac_s g_tiva_ethmac[TIVA_NETHCONTROLLERS]; ****************************************************************************/ /* Register operations ******************************************************/ -#if defined(CONFIG_TIVA_ETHERNET_REGDEBUG) && defined(CONFIG_DEBUG) +#if defined(CONFIG_TIVA_ETHERNET_REGDEBUG) && defined(CONFIG_DEBUG_INFO) static uint32_t tiva_getreg(uint32_t addr); static void tiva_putreg(uint32_t val, uint32_t addr); static void tiva_checksetup(void); @@ -787,7 +787,7 @@ static int tive_emac_configure(FAR struct tiva_ethmac_s *priv); * ****************************************************************************/ -#if defined(CONFIG_TIVA_ETHERNET_REGDEBUG) && defined(CONFIG_DEBUG) +#if defined(CONFIG_TIVA_ETHERNET_REGDEBUG) && defined(CONFIG_DEBUG_INFO) static uint32_t tiva_getreg(uint32_t addr) { static uint32_t prevaddr = 0; @@ -808,7 +808,7 @@ static uint32_t tiva_getreg(uint32_t addr) { if (count == 4) { - lldbg("...\n"); + _info("...\n"); } return val; @@ -825,7 +825,7 @@ static uint32_t tiva_getreg(uint32_t addr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + _info("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -837,7 +837,7 @@ static uint32_t tiva_getreg(uint32_t addr) /* Show the register value read */ - lldbg("%08x->%08x\n", addr, val); + _info("%08x->%08x\n", addr, val); return val; } #endif @@ -859,12 +859,12 @@ static uint32_t tiva_getreg(uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_TIVA_ETHERNET_REGDEBUG) && defined(CONFIG_DEBUG) +#if defined(CONFIG_TIVA_ETHERNET_REGDEBUG) && defined(CONFIG_DEBUG_INFO) static void tiva_putreg(uint32_t val, uint32_t addr) { /* Show the register value being written */ - lldbg("%08x<-%08x\n", addr, val); + _info("%08x<-%08x\n", addr, val); /* Write the value */ @@ -886,7 +886,7 @@ static void tiva_putreg(uint32_t val, uint32_t addr) * ****************************************************************************/ -#if defined(CONFIG_TIVA_ETHERNET_REGDEBUG) && defined(CONFIG_DEBUG) +#if defined(CONFIG_TIVA_ETHERNET_REGDEBUG) && defined(CONFIG_DEBUG_INFO) static void tiva_checksetup(void) { } @@ -1032,7 +1032,7 @@ static int tiva_transmit(FAR struct tiva_ethmac_s *priv) struct emac_txdesc_s *txdesc; struct emac_txdesc_s *txfirst; - /* The internal (optimal) uIP buffer size may be configured to be larger + /* The internal (optimal) network buffer size may be configured to be larger * than the Ethernet buffer size. */ @@ -1051,7 +1051,7 @@ static int tiva_transmit(FAR struct tiva_ethmac_s *priv) txdesc = priv->txhead; txfirst = txdesc; - nvdbg("d_len: %d d_buf: %p txhead: %p tdes0: %08x\n", + ninfo("d_len: %d d_buf: %p txhead: %p tdes0: %08x\n", priv->dev.d_len, priv->dev.d_buf, txdesc, txdesc->tdes0); DEBUGASSERT(txdesc && (txdesc->tdes0 & EMAC_TDES0_OWN) == 0); @@ -1068,7 +1068,7 @@ static int tiva_transmit(FAR struct tiva_ethmac_s *priv) bufcount = (priv->dev.d_len + (OPTIMAL_EMAC_BUFSIZE-1)) / OPTIMAL_EMAC_BUFSIZE; lastsize = priv->dev.d_len - (bufcount - 1) * OPTIMAL_EMAC_BUFSIZE; - nvdbg("bufcount: %d lastsize: %d\n", bufcount, lastsize); + ninfo("bufcount: %d lastsize: %d\n", bufcount, lastsize); /* Set the first segment bit in the first TX descriptor */ @@ -1178,7 +1178,7 @@ static int tiva_transmit(FAR struct tiva_ethmac_s *priv) priv->inflight++; - nvdbg("txhead: %p txtail: %p inflight: %d\n", + ninfo("txhead: %p txtail: %p inflight: %d\n", priv->txhead, priv->txtail, priv->inflight); /* If all TX descriptors are in-flight, then we have to disable receive interrupts @@ -1218,7 +1218,7 @@ static int tiva_transmit(FAR struct tiva_ethmac_s *priv) * Function: tiva_txpoll * * Description: - * The transmitter is available, check if uIP has any outgoing packets ready + * The transmitter is available, check if the network has any outgoing packets ready * to send. This is a callback from devif_poll(). devif_poll() may be called: * * 1. When the preceding TX packet send is complete, @@ -1360,7 +1360,7 @@ static void tiva_dopoll(FAR struct tiva_ethmac_s *priv) if ((priv->txhead->tdes0 & EMAC_TDES0_OWN) == 0 && priv->txhead->tdes2 == 0) { - /* If we have the descriptor, then poll uIP for new XMIT data. + /* If we have the descriptor, then poll the network for new XMIT data. * Allocate a buffer for the poll. */ @@ -1477,7 +1477,7 @@ static void tiva_freesegment(FAR struct tiva_ethmac_s *priv, struct emac_rxdesc_s *rxdesc; int i; - nvdbg("rxfirst: %p segments: %d\n", rxfirst, segments); + ninfo("rxfirst: %p segments: %d\n", rxfirst, segments); /* Set OWN bit in RX descriptors. This gives the buffers back to DMA */ @@ -1535,7 +1535,7 @@ static int tiva_recvframe(FAR struct tiva_ethmac_s *priv) uint8_t *buffer; int i; - nvdbg("rxhead: %p rxcurr: %p segments: %d\n", + ninfo("rxhead: %p rxcurr: %p segments: %d\n", priv->rxhead, priv->rxcurr, priv->segments); /* Check if there are free buffers. We cannot receive new frames in this @@ -1544,7 +1544,7 @@ static int tiva_recvframe(FAR struct tiva_ethmac_s *priv) if (!tiva_isfreebuffer(priv)) { - nlldbg("No free buffers\n"); + nerr("ERROR: No free buffers\n"); return -ENOMEM; } @@ -1601,7 +1601,7 @@ static int tiva_recvframe(FAR struct tiva_ethmac_s *priv) rxcurr = priv->rxcurr; } - nvdbg("rxhead: %p rxcurr: %p segments: %d\n", + ninfo("rxhead: %p rxcurr: %p segments: %d\n", priv->rxhead, priv->rxcurr, priv->segments); /* Check if any errors are reported in the frame */ @@ -1624,7 +1624,7 @@ static int tiva_recvframe(FAR struct tiva_ethmac_s *priv) buffer = tiva_allocbuffer(priv); /* Take the buffer from the RX descriptor of the first free - * segment, put it into the uIP device structure, then replace + * segment, put it into the network device structure, then replace * the buffer in the RX descriptor with the newly allocated * buffer. */ @@ -1640,7 +1640,7 @@ static int tiva_recvframe(FAR struct tiva_ethmac_s *priv) priv->rxhead = (struct emac_rxdesc_s *)rxdesc->rdes3; tiva_freesegment(priv, rxcurr, priv->segments); - nvdbg("rxhead: %p d_buf: %p d_len: %d\n", + ninfo("rxhead: %p d_buf: %p d_len: %d\n", priv->rxhead, dev->d_buf, dev->d_len); return OK; @@ -1651,7 +1651,7 @@ static int tiva_recvframe(FAR struct tiva_ethmac_s *priv) * scanning logic, and continue scanning with the next frame. */ - nlldbg("DROPPED: RX descriptor errors: %08x\n", rxdesc->rdes0); + nwarn("DROPPED: RX descriptor errors: %08x\n", rxdesc->rdes0); tiva_freesegment(priv, rxcurr, priv->segments); } } @@ -1667,7 +1667,7 @@ static int tiva_recvframe(FAR struct tiva_ethmac_s *priv) priv->rxhead = rxdesc; - nvdbg("rxhead: %p rxcurr: %p segments: %d\n", + ninfo("rxhead: %p rxcurr: %p segments: %d\n", priv->rxhead, priv->rxcurr, priv->segments); return -EAGAIN; @@ -1706,13 +1706,13 @@ static void tiva_receive(FAR struct tiva_ethmac_s *priv) pkt_input(&priv->dev); #endif - /* Check if the packet is a valid size for the uIP buffer configuration + /* Check if the packet is a valid size for the network buffer configuration * (this should not happen) */ if (dev->d_len > CONFIG_NET_ETH_MTU) { - nlldbg("DROPPED: Too big: %d\n", dev->d_len); + nwarn("DROPPED: Too big: %d\n", dev->d_len); } else @@ -1721,7 +1721,7 @@ static void tiva_receive(FAR struct tiva_ethmac_s *priv) #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); /* Handle ARP on input then give the IPv4 packet to the network * layer @@ -1760,7 +1760,7 @@ static void tiva_receive(FAR struct tiva_ethmac_s *priv) #ifdef CONFIG_NET_IPv6 if (BUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("IPv6 frame\n"); + ninfo("IPv6 frame\n"); /* Give the IPv6 packet to the network layer */ @@ -1797,7 +1797,7 @@ static void tiva_receive(FAR struct tiva_ethmac_s *priv) #ifdef CONFIG_NET_ARP if (BUF->type == htons(ETHTYPE_ARP)) { - nvdbg("ARP frame\n"); + ninfo("ARP frame\n"); /* Handle ARP packet */ @@ -1815,7 +1815,7 @@ static void tiva_receive(FAR struct tiva_ethmac_s *priv) else #endif { - nlldbg("DROPPED: Unknown type: %04x\n", BUF->type); + nwarn("DROPPED: Unknown type: %04x\n", BUF->type); } /* We are finished with the RX buffer. NOTE: If the buffer is @@ -1856,7 +1856,7 @@ static void tiva_freeframe(FAR struct tiva_ethmac_s *priv) FAR struct emac_txdesc_s *txdesc; int i; - nvdbg("txhead: %p txtail: %p inflight: %d\n", + ninfo("txhead: %p txtail: %p inflight: %d\n", priv->txhead, priv->txtail, priv->inflight); /* Scan for "in-flight" descriptors owned by the CPU */ @@ -1872,7 +1872,7 @@ static void tiva_freeframe(FAR struct tiva_ethmac_s *priv) * TX descriptors. */ - nvdbg("txtail: %p tdes0: %08x tdes2: %08x tdes3: %08x\n", + ninfo("txtail: %p tdes0: %08x tdes2: %08x tdes3: %08x\n", txdesc, txdesc->tdes0, txdesc->tdes2, txdesc->tdes3); DEBUGASSERT(txdesc->tdes2 != 0); @@ -1925,7 +1925,7 @@ static void tiva_freeframe(FAR struct tiva_ethmac_s *priv) priv->txtail = txdesc; - nvdbg("txhead: %p txtail: %p inflight: %d\n", + ninfo("txhead: %p txtail: %p inflight: %d\n", priv->txhead, priv->txtail, priv->inflight); } } @@ -1980,7 +1980,7 @@ static void tiva_txdone(FAR struct tiva_ethmac_s *priv) tiva_disableint(priv, EMAC_DMAINT_TI); } - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ tiva_dopoll(priv); } @@ -2067,7 +2067,7 @@ static inline void tiva_interrupt_process(FAR struct tiva_ethmac_s *priv) { /* Just let the user know what happened */ - nlldbg("Abnormal event(s): %08x\n", dmaris); + nerr("ERROR: Abnormal event(s): %08x\n", dmaris); /* Clear all pending abnormal events */ @@ -2228,7 +2228,7 @@ static inline void tiva_txtimeout_process(FAR struct tiva_ethmac_s *priv) tiva_ifdown(&priv->dev); tiva_ifup(&priv->dev); - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ tiva_dopoll(priv); } @@ -2287,7 +2287,7 @@ static void tiva_txtimeout_expiry(int argc, uint32_t arg, ...) { FAR struct tiva_ethmac_s *priv = (FAR struct tiva_ethmac_s *)arg; - nlldbg("Timeout!\n"); + nerr("ERROR: Timeout!\n"); #ifdef CONFIG_NET_NOINTS /* Disable further Ethernet interrupts. This will prevent some race @@ -2362,7 +2362,7 @@ static inline void tiva_poll_process(FAR struct tiva_ethmac_s *priv) if (dev->d_buf) { - /* Update TCP timing states and poll uIP for new XMIT data. + /* Update TCP timing states and poll the network for new XMIT data. */ (void)devif_timer(dev, tiva_txpoll); @@ -2488,15 +2488,15 @@ static int tiva_ifup(struct net_driver_s *dev) int ret; #ifdef CONFIG_NET_IPv4 - ndbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); #endif #ifdef CONFIG_NET_IPv6 - ndbg("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", - dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2], - dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5], - dev->d_ipv6addr[6], dev->d_ipv6addr[7]); + ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", + dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2], + dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5], + dev->d_ipv6addr[6], dev->d_ipv6addr[7]); #endif /* Configure the Ethernet interface for DMA operation. */ @@ -2541,7 +2541,7 @@ static int tiva_ifdown(struct net_driver_s *dev) FAR struct tiva_ethmac_s *priv = (FAR struct tiva_ethmac_s *)dev->d_private; irqstate_t flags; - nvdbg("Taking the network down\n"); + ninfo("Taking the network down\n"); /* Disable the Ethernet interrupt */ @@ -2586,13 +2586,13 @@ static int tiva_ifdown(struct net_driver_s *dev) static inline void tiva_txavail_process(FAR struct tiva_ethmac_s *priv) { - nvdbg("ifup: %d\n", priv->ifup); + ninfo("ifup: %d\n", priv->ifup); /* Ignore the notification if the interface is not yet up */ if (priv->ifup) { - /* Poll uIP for new XMIT data */ + /* Poll the network for new XMIT data */ tiva_dopoll(priv); } @@ -2753,7 +2753,7 @@ static int tiva_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) uint32_t temp; uint32_t registeraddress; - nvdbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); /* Add the MAC address to the hardware multicast hash table */ @@ -2810,7 +2810,7 @@ static int tiva_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) uint32_t temp; uint32_t registeraddress; - nvdbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); /* Remove the MAC address to the hardware multicast hash table */ @@ -3236,7 +3236,7 @@ static int tiva_phyread(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t *valu } } - ndbg("MII transfer timed out: phydevaddr: %04x phyregaddr: %04x\n", + nerr("ERROR: MII transfer timed out: phydevaddr: %04x phyregaddr: %04x\n", phydevaddr, phyregaddr); return -ETIMEDOUT; @@ -3295,7 +3295,7 @@ static int tiva_phywrite(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t valu } } - ndbg("MII transfer timed out: phydevaddr: %04x phyregaddr: %04x value: %04x\n", + nerr("ERROR: MII transfer timed out: phydevaddr: %04x phyregaddr: %04x value: %04x\n", phydevaddr, phyregaddr, value); return -ETIMEDOUT; @@ -3343,7 +3343,7 @@ static int tiva_phyinit(FAR struct tiva_ethmac_s *priv) ret = tiva_phywrite(CONFIG_TIVA_PHYADDR, MII_MCR, MII_MCR_RESET); if (ret < 0) { - ndbg("Failed to reset the PHY: %d\n", ret); + nerr("ERROR: Failed to reset the PHY: %d\n", ret); return ret; } @@ -3359,7 +3359,7 @@ static int tiva_phyinit(FAR struct tiva_ethmac_s *priv) ret = tiva_phyread(CONFIG_TIVA_PHYADDR, MII_MSR, &phyval); if (ret < 0) { - ndbg("Failed to read the PHY MSR: %d\n", ret); + nerr("ERROR: Failed to read the PHY MSR: %d\n", ret); return ret; } else if ((phyval & MII_MSR_LINKSTATUS) != 0) @@ -3370,7 +3370,7 @@ static int tiva_phyinit(FAR struct tiva_ethmac_s *priv) if (timeout >= PHY_RETRY_TIMEOUT) { - ndbg("Timed out waiting for link status: %04x\n", phyval); + nerr("ERROR: Timed out waiting for link status: %04x\n", phyval); return -ETIMEDOUT; } @@ -3379,7 +3379,7 @@ static int tiva_phyinit(FAR struct tiva_ethmac_s *priv) ret = tiva_phywrite(CONFIG_TIVA_PHYADDR, MII_MCR, MII_MCR_ANENABLE); if (ret < 0) { - ndbg("Failed to enable auto-negotiation: %d\n", ret); + nerr("ERROR: Failed to enable auto-negotiation: %d\n", ret); return ret; } @@ -3390,7 +3390,7 @@ static int tiva_phyinit(FAR struct tiva_ethmac_s *priv) ret = tiva_phyread(CONFIG_TIVA_PHYADDR, MII_MSR, &phyval); if (ret < 0) { - ndbg("Failed to read the PHY MSR: %d\n", ret); + nerr("ERROR: Failed to read the PHY MSR: %d\n", ret); return ret; } else if ((phyval & MII_MSR_ANEGCOMPLETE) != 0) @@ -3401,7 +3401,7 @@ static int tiva_phyinit(FAR struct tiva_ethmac_s *priv) if (timeout >= PHY_RETRY_TIMEOUT) { - ndbg("Timed out waiting for auto-negotiation\n"); + nerr("ERROR: Timed out waiting for auto-negotiation\n"); return -ETIMEDOUT; } @@ -3410,13 +3410,13 @@ static int tiva_phyinit(FAR struct tiva_ethmac_s *priv) ret = tiva_phyread(CONFIG_TIVA_PHYADDR, CONFIG_TIVA_PHYSR, &phyval); if (ret < 0) { - ndbg("Failed to read PHY status register\n"); + nerr("ERROR: Failed to read PHY status register\n"); return ret; } /* Remember the selected speed and duplex modes */ - nvdbg("PHYSR[%d]: %04x\n", CONFIG_TIVA_PHYSR, phyval); + ninfo("PHYSR[%d]: %04x\n", CONFIG_TIVA_PHYSR, phyval); /* Different PHYs present speed and mode information in different ways. IF * This CONFIG_TIVA_PHYSR_ALTCONFIG is selected, this indicates that the PHY @@ -3480,7 +3480,7 @@ static int tiva_phyinit(FAR struct tiva_ethmac_s *priv) ret = tiva_phywrite(CONFIG_TIVA_PHYADDR, MII_MCR, phyval); if (ret < 0) { - ndbg("Failed to write the PHY MCR: %d\n", ret); + nerr("ERROR: Failed to write the PHY MCR: %d\n", ret); return ret; } up_mdelay(PHY_CONFIG_DELAY); @@ -3495,9 +3495,9 @@ static int tiva_phyinit(FAR struct tiva_ethmac_s *priv) #endif #endif - ndbg("Duplex: %s Speed: %d MBps\n", - priv->fduplex ? "FULL" : "HALF", - priv->mbps100 ? 100 : 10); + ninfo("Duplex: %s Speed: %d MBps\n", + priv->fduplex ? "FULL" : "HALF", + priv->mbps100 ? 100 : 10); return OK; } @@ -3599,7 +3599,7 @@ static inline void tiva_phy_initialize(FAR struct tiva_ethmac_s *priv) { /* Enable the clock to the PHY module */ - nllvdbg("Enable EPHY clocking\n"); + ninfo("Enable EPHY clocking\n"); tiva_ephy_enableclk(); /* What until the PREPHY register indicates that the PHY is ready before @@ -3611,7 +3611,7 @@ static inline void tiva_phy_initialize(FAR struct tiva_ethmac_s *priv) /* Enable power to the Ethernet PHY */ - nllvdbg("Enable EPHY power\n"); + ninfo("Enable EPHY power\n"); tiva_ephy_enablepwr(); /* What until the PREPHY register indicates that the PHY registers are ready @@ -3621,11 +3621,11 @@ static inline void tiva_phy_initialize(FAR struct tiva_ethmac_s *priv) while (!tiva_ephy_periphrdy()); up_udelay(250); - nllvdbg("RCGCEPHY: %08x PCEPHY: %08x PREPHY: %08x\n", - getreg32(TIVA_SYSCON_RCGCEPHY), - getreg32(TIVA_SYSCON_PCEPHY), - getreg32(TIVA_SYSCON_PREPHY)); - nllvdbg("Configure PHY GPIOs\n"); + ninfo("RCGCEPHY: %08x PCEPHY: %08x PREPHY: %08x\n", + getreg32(TIVA_SYSCON_RCGCEPHY), + getreg32(TIVA_SYSCON_PCEPHY), + getreg32(TIVA_SYSCON_PREPHY)); + ninfo("Configure PHY GPIOs\n"); #ifdef CONFIG_TIVA_PHY_INTERNAL /* Integrated PHY: @@ -3931,7 +3931,7 @@ static void tiva_macaddress(FAR struct tiva_ethmac_s *priv) FAR struct net_driver_s *dev = &priv->dev; uint32_t regval; - nvdbg("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + ninfo("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", dev->d_ifname, dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], @@ -3999,7 +3999,7 @@ static void tiva_ipv6multicast(FAR struct tiva_ethmac_s *priv) mac[4] = tmp16 & 0xff; mac[5] = tmp16 >> 8; - nvdbg("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", + ninfo("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); (void)tiva_addmac(dev, mac); @@ -4129,12 +4129,12 @@ static int tive_emac_configure(FAR struct tiva_ethmac_s *priv) /* Reset the Ethernet block */ - nvdbg("Reset the Ethernet block\n"); + ninfo("Reset the Ethernet block\n"); tiva_ethreset(priv); /* Initialize the PHY */ - nvdbg("Initialize the PHY\n"); + ninfo("Initialize the PHY\n"); ret = tiva_phyinit(priv); if (ret < 0) { @@ -4143,7 +4143,7 @@ static int tive_emac_configure(FAR struct tiva_ethmac_s *priv) /* Initialize the MAC and DMA */ - nvdbg("Initialize the MAC and DMA\n"); + ninfo("Initialize the MAC and DMA\n"); ret = tiva_macconfig(priv); if (ret < 0) { @@ -4164,7 +4164,7 @@ static int tive_emac_configure(FAR struct tiva_ethmac_s *priv) /* Enable normal MAC operation */ - nvdbg("Enable normal operation\n"); + ninfo("Enable normal operation\n"); return tiva_macenable(priv); } @@ -4201,7 +4201,7 @@ int tiva_ethinitialize(int intf) struct tiva_ethmac_s *priv; uint32_t regval; - nllvdbg("intf: %d\n", intf); + ninfo("intf: %d\n", intf); /* Get the interface structure associated with this interface number. */ @@ -4247,7 +4247,7 @@ int tiva_ethinitialize(int intf) * bringing it a fully functional state. */ - nllvdbg("Enable EMAC clocking\n"); + ninfo("Enable EMAC clocking\n"); tiva_emac_enablepwr(); /* Ethernet MAC Power Control */ tiva_emac_enableclk(); /* Ethernet MAC Run Mode Clock Gating Control */ @@ -4260,11 +4260,11 @@ int tiva_ethinitialize(int intf) /* Show all EMAC clocks */ - nllvdbg("RCGCEMAC: %08x PCEMAC: %08x PREMAC: %08x MOSCCTL: %08x\n", - getreg32(TIVA_SYSCON_RCGCEMAC), - getreg32(TIVA_SYSCON_PCEMAC), - getreg32(TIVA_SYSCON_PREMAC), - getreg32(TIVA_SYSCON_MOSCCTL)); + ninfo("RCGCEMAC: %08x PCEMAC: %08x PREMAC: %08x MOSCCTL: %08x\n", + getreg32(TIVA_SYSCON_RCGCEMAC), + getreg32(TIVA_SYSCON_PCEMAC), + getreg32(TIVA_SYSCON_PREMAC), + getreg32(TIVA_SYSCON_MOSCCTL)); /* Configure clocking and GPIOs to support the internal/eternal PHY */ @@ -4309,7 +4309,7 @@ int tiva_ethinitialize(int intf) /* Register the device with the OS so that socket IOCTLs can be performed */ - nllvdbg("Registering Ethernet device\n"); + ninfo("Registering Ethernet device\n"); return netdev_register(&priv->dev, NET_LL_ETHERNET); } @@ -4411,7 +4411,7 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) xcpt_t oldhandler; DEBUGASSERT(intf); - nvdbg("%s: handler=%p\n", intf, handler); + ninfo("%s: handler=%p\n", intf, handler); /* Get the interface structure associated with this interface. */ diff --git a/arch/arm/src/tms570/tms570_boot.c b/arch/arm/src/tms570/tms570_boot.c index 66c92862f55d16a479219c50938fbefe7fb2833f..653825cce4eec077bfa98f566f5f20f523d48a55 100644 --- a/arch/arm/src/tms570/tms570_boot.c +++ b/arch/arm/src/tms570/tms570_boot.c @@ -122,7 +122,7 @@ static inline void tms570_event_export(void) static inline void tms570_check_reset(void) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES uint32_t regval; /* Read from the system exception status register to identify the cause of diff --git a/arch/arm/src/tms570/tms570_esm.c b/arch/arm/src/tms570/tms570_esm.c index a3259e4050f0c4e81a35ee641d85d714298d1c1c..2019fac5065c887c2ee823048fe81c6742ae926b 100644 --- a/arch/arm/src/tms570/tms570_esm.c +++ b/arch/arm/src/tms570/tms570_esm.c @@ -155,7 +155,7 @@ int tms570_esm_interrupt(int irq, void *context) /* Crash -- possibly showing diagnostic debug information. */ - lldbg("ESM Interrupt. PC: %08x\n", CURRENT_REGS[REG_PC]); + _err("ERROR: ESM Interrupt. PC: %08x\n", CURRENT_REGS[REG_PC]); PANIC(); return OK; /* To keep the compiler happy */ } diff --git a/arch/arm/src/tms570/tms570_gio.c b/arch/arm/src/tms570/tms570_gio.c index 159ee05e4faf863eb45c0a37b3219891316fc48b..34ffb4cfd2107bef4f00d56bd4a350a16aa53abc 100644 --- a/arch/arm/src/tms570/tms570_gio.c +++ b/arch/arm/src/tms570/tms570_gio.c @@ -58,7 +58,7 @@ * Private Data ****************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO static const char g_portchar[TMS570_NPORTS] = { 'A' @@ -289,14 +289,14 @@ bool tms570_gioread(gio_pinset_t pinset) * ************************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO int tms570_dumpgio(uint32_t pinset, const char *msg) { irqstate_t flags; uintptr_t base; unsigned int port; - lldbg("GIO%c pinset: %08x base: %08x -- %s\n", + _info("GIO%c pinset: %08x base: %08x -- %s\n", g_portchar[port], pinset, base, msg); /* Get the base address associated with the GIO port */ @@ -310,19 +310,19 @@ int tms570_dumpgio(uint32_t pinset, const char *msg) /* Show global GIO registers */ - lldbg(" GCR0: %08x INTDET: %08x POL: %08x ENA: %08x\n", + _info(" GCR0: %08x INTDET: %08x POL: %08x ENA: %08x\n", getreg32(TMS570_GIO_GCR0), getreg32(TMS570_GIO_INTDET), getreg32(TMS570_GIO_POL), getreg32(TMS570_GIO_ENASET)); - lldbg(" LVL: %08x FLG: %08x EMU1: %08x EMU2: %08x\n", + _info(" LVL: %08x FLG: %08x EMU1: %08x EMU2: %08x\n", getreg32(TMS570_GIO_LVLSET), getreg32(TMS570_GIO_FLG), getreg32(TMS570_GIO_EMU1), getreg32(TMS570_GIO_EMU2)); /* Port specific registers */ - lldbg(" DIR: %08x DIN: %08x DOUT: %08x PDR: %08x\n", + _info(" DIR: %08x DIN: %08x DOUT: %08x PDR: %08x\n", getreg32(base + TMS570_GIO_DIR_OFFSET), getreg32(base + TMS570_GIO_DIN_OFFSET), getreg32(base + TMS570_GIO_DOUT_OFFSET), getreg32(base + TMS570_GIO_PDR_OFFSET)); - lldbg(" PULDIS: %08x PSL: %08x\n", + _info(" PULDIS: %08x PSL: %08x\n", getreg32(base + TMS570_GIO_PULDIS_OFFSET), getreg32(base + TMS570_GIO_PSL_OFFSET)); leave_critical_section(flags); diff --git a/arch/arm/src/tms570/tms570_gio.h b/arch/arm/src/tms570/tms570_gio.h index bc59e8b1e22689b3e506b5ed25c30cbafc500968..45fa7073fb0156f01a64309e12c7e287a7412067 100644 --- a/arch/arm/src/tms570/tms570_gio.h +++ b/arch/arm/src/tms570/tms570_gio.h @@ -328,7 +328,7 @@ void tms570_gioirqdisable(int irq); * ************************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO int tms570_dumpgio(uint32_t pinset, const char *msg); #else # define tms570_dumpgio(p,m) diff --git a/arch/avr/include/debug.h b/arch/avr/include/debug.h index b95e9b9322a0e0486150c508e868da8940f4f19b..05116b4418acfc8a2b3166e3b6c82e6222816017 100644 --- a/arch/avr/include/debug.h +++ b/arch/avr/include/debug.h @@ -72,19 +72,15 @@ } \ while(0) -/* __arch_syslog() and __arch_lowsyslog() override behavior of NuttX - * dbg macros. They put the format string into program memory and - * utilize IPTR (__memx) parameter of syslog to take the format - * directly from program memory. This reduces amount of RAM held by - * the format strings used in debug statements. +/* __arch_syslog() overrides the behavior of NuttX debug macros. They put + * the format string into program memory and utilize IPTR (__memx) parameter + * of syslog to take the format directly from program memory. This reduces + * amount of RAM held by the format strings used in debug statements. */ #define __arch_syslog(...) \ __dbg_expand(syslog, ##__VA_ARGS__) -#define __arch_lowsyslog(...) \ - __dbg_expand(lowsyslog, ##__VA_ARGS__) - #endif /* CONFIG_AVR_HAS_MEMX_PTR */ #endif /* __INCLUDE_ARCH_DEBUG_H */ diff --git a/arch/avr/src/at32uc3/at32uc3_config.h b/arch/avr/src/at32uc3/at32uc3_config.h index 8867fae8694fde919916dc149f27fdd50d85549f..9dd75a24f7ed8e600ae558947305446b1f3527d4 100644 --- a/arch/avr/src/at32uc3/at32uc3_config.h +++ b/arch/avr/src/at32uc3/at32uc3_config.h @@ -181,13 +181,6 @@ # define USE_SERIALDRIVER 1 #endif -/* Determine which device to use as the system logging device */ - -#ifndef CONFIG_SYSLOG -# undef CONFIG_SYSLOG_CHAR -# undef CONFIG_RAMLOG_SYSLOG -#endif - /* If GPIO IRQ support is defined, then a set of GPIOs must all be included */ #if CONFIG_AVR32_GPIOIRQSETA == 0 && CONFIG_AVR32_GPIOIRQSETB == 0 diff --git a/arch/avr/src/at32uc3/at32uc3_gpioirq.c b/arch/avr/src/at32uc3/at32uc3_gpioirq.c index 231af1026d900316b52d77e78c2cd12bccd242e4..171fa39f1f2fe0344f85bfbb78c0dcb3ea22b68b 100644 --- a/arch/avr/src/at32uc3/at32uc3_gpioirq.c +++ b/arch/avr/src/at32uc3/at32uc3_gpioirq.c @@ -228,8 +228,8 @@ static void gpio_porthandler(uint32_t regbase, int irqbase, uint32_t irqset, voi } else { - lldbg("No handler: pin=%d ifr=%08x irqset=%08x", - pin, ifr, irqset); + _err("ERROR: No handler: pin=%d ifr=%08x irqset=%08x", + pin, ifr, irqset); } } @@ -247,8 +247,8 @@ static void gpio_porthandler(uint32_t regbase, int irqbase, uint32_t irqset, voi putreg32(bit, regbase + AVR32_GPIO_IFRC_OFFSET); ifr &= ~bit; - lldbg("IRQ on unconfigured pin: pin=%d ifr=%08x irqset=%08x", - pin, ifr, irqset); + warn("WARNING: IRQ on unconfigured pin: pin=%d ifr=%08x irqset=%08x", + pin, ifr, irqset); } } } diff --git a/arch/avr/src/at32uc3/at32uc3_irq.c b/arch/avr/src/at32uc3/at32uc3_irq.c index 6df9cdf4a6ceb5ee9051a2b0f5bb56e84971e653..4474f9e5c1849fe68a84228addc6d433a6fac6f0 100644 --- a/arch/avr/src/at32uc3/at32uc3_irq.c +++ b/arch/avr/src/at32uc3/at32uc3_irq.c @@ -177,7 +177,7 @@ static int up_getgrp(unsigned int irq) static int avr32_xcptn(int irq, FAR void *context) { (void)up_irq_save(); - lldbg("PANIC!!! Exception IRQ: %d\n", irq); + _alert("PANIC!!! Exception IRQ: %d\n", irq); PANIC(); return 0; } @@ -321,11 +321,11 @@ unsigned int avr32_intirqno(unsigned int level) mask <<= 1; } - lldbg("Spurious interrupt: group=%d IRR=%08x\n", group, irr); + _err("ERROR: Spurious interrupt: group=%d IRR=%08x\n", group, irr); return -ENODEV; } - lldbg("Bad group: %d\n", group); + _err("ERROR: Bad group: %d\n", group); return AVR32_IRQ_BADVECTOR; } diff --git a/arch/avr/src/at90usb/at90usb_config.h b/arch/avr/src/at90usb/at90usb_config.h index 3f0d80a19d8a819b3a0e2a61d97995536e928bd4..b00fd1e0ba8751bde6117f8ef56b4ab27cf6aeb9 100644 --- a/arch/avr/src/at90usb/at90usb_config.h +++ b/arch/avr/src/at90usb/at90usb_config.h @@ -100,13 +100,6 @@ # define USE_SERIALDRIVER 1 #endif -/* Determine which device to use as the system logging device */ - -#ifndef CONFIG_SYSLOG -# undef CONFIG_SYSLOG_CHAR -# undef CONFIG_RAMLOG_SYSLOG -#endif - /************************************************************************************ * Public Types ************************************************************************************/ diff --git a/arch/avr/src/at90usb/at90usb_usbdev.c b/arch/avr/src/at90usb/at90usb_usbdev.c index 7bfe6639b4cd435442038aba446fadb9796bdc37..333037d21585d3bc33304185c3721d48578466b2 100644 --- a/arch/avr/src/at90usb/at90usb_usbdev.c +++ b/arch/avr/src/at90usb/at90usb_usbdev.c @@ -1399,8 +1399,8 @@ static inline void avr_ep0setup(void) index = GETUINT16(ctrl.index); len = GETUINT16(ctrl.len); - ullvdbg("type=%02x req=%02x value=%04x index=%04x len=%04x\n", - ctrl.type, ctrl.req, value, index, len); + uinfo("type=%02x req=%02x value=%04x index=%04x len=%04x\n", + ctrl.type, ctrl.req, value, index, len); /* Dispatch any non-standard requests */ @@ -1596,7 +1596,7 @@ static inline void avr_ep0setup(void) #ifdef CONFIG_USBDEV_SELFPOWERED if (value == USB_FEATURE_TESTMODE) { - ullvdbg("test mode: %d\n", index); + uinfo("test mode: %d\n", index); } else if (value == USB_FEATURE_REMOTEWAKEUP) { @@ -2247,7 +2247,7 @@ static int avr_epdisable(FAR struct usbdev_ep_s *ep) FAR struct avr_ep_s *privep = (FAR struct avr_ep_s *)ep; irqstate_t flags; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { usbtrace(TRACE_DEVERROR(AVR_TRACEERR_INVALIDPARMS), 0); @@ -2279,7 +2279,7 @@ static FAR struct usbdev_req_s *avr_epallocreq(FAR struct usbdev_ep_s *ep) { FAR struct avr_req_s *privreq; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { usbtrace(TRACE_DEVERROR(AVR_TRACEERR_INVALIDPARMS), 0); @@ -2312,7 +2312,7 @@ static void avr_epfreereq(FAR struct usbdev_ep_s *ep, { FAR struct avr_req_s *privreq = (FAR struct avr_req_s *)req; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !req) { usbtrace(TRACE_DEVERROR(AVR_TRACEERR_INVALIDPARMS), 0); @@ -2382,12 +2382,12 @@ static int avr_epsubmit(FAR struct usbdev_ep_s *ep, irqstate_t flags; int ret = OK; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!req || !req->callback || !req->buf || !ep) { usbtrace(TRACE_DEVERROR(AVR_TRACEERR_INVALIDPARMS), 0); - ullvdbg("req=%p callback=%p buf=%p ep=%p\n", - req, req->callback, req->buf, ep); + uinfo("req=%p callback=%p buf=%p ep=%p\n", + req, req->callback, req->buf, ep); return -EINVAL; } #endif @@ -2484,7 +2484,7 @@ static int avr_epcancel(FAR struct usbdev_ep_s *ep, FAR struct avr_ep_s *privep = (FAR struct avr_ep_s *)ep; irqstate_t flags; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !req) { usbtrace(TRACE_DEVERROR(AVR_TRACEERR_INVALIDPARMS), 0); @@ -2582,7 +2582,7 @@ static FAR struct usbdev_ep_s *avr_allocep(FAR struct usbdev_s *dev, * requested 'logical' endpoint. */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (epno >= AVR_NENDPOINTS) { usbtrace(TRACE_DEVERROR(AVR_TRACEERR_BADEPNO), (uint16_t)epno); @@ -2725,7 +2725,7 @@ static int avr_selfpowered(struct usbdev_s *dev, bool selfpowered) { usbtrace(TRACE_DEVSELFPOWERED, (uint16_t) selfpowered); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev) { usbtrace(TRACE_DEVERROR(AVR_TRACEERR_INVALIDPARMS), 0); @@ -2872,7 +2872,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) usbtrace(TRACE_DEVREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !driver->ops->bind || !driver->ops->unbind || !driver->ops->disconnect || !driver->ops->setup) { @@ -2927,7 +2927,7 @@ int usbdev_unregister(struct usbdevclass_driver_s *driver) { usbtrace(TRACE_DEVUNREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (driver != g_usbdev.driver) { usbtrace(TRACE_DEVERROR(AVR_TRACEERR_INVALIDPARMS), 0); diff --git a/arch/avr/src/atmega/atmega_config.h b/arch/avr/src/atmega/atmega_config.h index 0390f1c129fb05e8bd41bbe3cc13a79c2dc2f0eb..3d21cd82a79fc05970a65bb9bb1deea2753f227e 100644 --- a/arch/avr/src/atmega/atmega_config.h +++ b/arch/avr/src/atmega/atmega_config.h @@ -106,13 +106,6 @@ # define USE_SERIALDRIVER 1 #endif -/* Determine which device to use as the system logging device */ - -#ifndef CONFIG_SYSLOG -# undef CONFIG_SYSLOG_CHAR -# undef CONFIG_RAMLOG_SYSLOG -#endif - /************************************************************************************ * Public Types ************************************************************************************/ diff --git a/arch/avr/src/avr/up_createstack.c b/arch/avr/src/avr/up_createstack.c index c2dda4d271d97de33e06569c49afc78907867f2c..54efb1a3fb53f917fb55ac1b18116eda1d513715 100644 --- a/arch/avr/src/avr/up_createstack.c +++ b/arch/avr/src/avr/up_createstack.c @@ -122,12 +122,12 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype) tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Was the allocation successful? */ if (!tcb->stack_alloc_ptr) { - sdbg("ERROR: Failed to allocate stack, size %d\n", stack_size); + serr("ERROR: Failed to allocate stack, size %d\n", stack_size); } #endif } diff --git a/arch/avr/src/avr/up_dumpstate.c b/arch/avr/src/avr/up_dumpstate.c index a82b682d35366ea4c392d02cb05842f0404b2d95..5a1660b81b41761182dab67ff4b7bbdcbdfbc154 100644 --- a/arch/avr/src/avr/up_dumpstate.c +++ b/arch/avr/src/avr/up_dumpstate.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/avr/src/avr/up_dumpstate.c * - * Copyright (C) 2011, 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -39,13 +39,6 @@ #include -/* Output debug info -- even if debug is not selected. */ - -#undef CONFIG_DEBUG -#undef CONFIG_DEBUG_VERBOSE -#define CONFIG_DEBUG 1 -#define CONFIG_DEBUG_VERBOSE 1 - #include #include #include @@ -97,7 +90,7 @@ static void up_stackdump(uint16_t sp, uint16_t stack_base) for (stack = sp & ~3; stack < stack_base; stack += 12) { uint8_t *ptr = (uint8_t *)stack; - lldbg("%04x: %02x %02x %02x %02x %02x %02x %02x %02x" + _alert("%04x: %02x %02x %02x %02x %02x %02x %02x %02x" " %02x %02x %02x %02x\n", stack, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7], @@ -115,28 +108,28 @@ static inline void up_registerdump(void) if (g_current_regs) { - lldbg("R%02d: %02x %02x %02x %02x %02x %02x %02x %02x\n", + _alert("R%02d: %02x %02x %02x %02x %02x %02x %02x %02x\n", 0, g_current_regs[REG_R0], g_current_regs[REG_R1], g_current_regs[REG_R2], g_current_regs[REG_R3], g_current_regs[REG_R4], g_current_regs[REG_R5], g_current_regs[REG_R6], g_current_regs[REG_R7]); - lldbg("R%02d: %02x %02x %02x %02x %02x %02x %02x %02x\n", + _alert("R%02d: %02x %02x %02x %02x %02x %02x %02x %02x\n", 8, g_current_regs[REG_R8], g_current_regs[REG_R9], g_current_regs[REG_R10], g_current_regs[REG_R11], g_current_regs[REG_R12], g_current_regs[REG_R13], g_current_regs[REG_R14], g_current_regs[REG_R15]); - lldbg("R%02d: %02x %02x %02x %02x %02x %02x %02x %02x\n", + _alert("R%02d: %02x %02x %02x %02x %02x %02x %02x %02x\n", 16, g_current_regs[REG_R16], g_current_regs[REG_R17], g_current_regs[REG_R18], g_current_regs[REG_R19], g_current_regs[REG_R20], g_current_regs[REG_R21], g_current_regs[REG_R22], g_current_regs[REG_R23]); - lldbg("R%02d: %02x %02x %02x %02x %02x %02x %02x %02x\n", + _alert("R%02d: %02x %02x %02x %02x %02x %02x %02x %02x\n", 24, g_current_regs[REG_R24], g_current_regs[REG_R25], g_current_regs[REG_R26], g_current_regs[REG_R27], @@ -144,12 +137,12 @@ static inline void up_registerdump(void) g_current_regs[REG_R30], g_current_regs[REG_R31]); #if !defined(REG_PC2) - lldbg("PC: %02x%02x SP: %02x%02x SREG: %02x\n", + _alert("PC: %02x%02x SP: %02x%02x SREG: %02x\n", g_current_regs[REG_PC0], g_current_regs[REG_PC1], g_current_regs[REG_SPH], g_current_regs[REG_SPL], g_current_regs[REG_SREG]); #else - lldbg("PC: %02x%02x%02x SP: %02x%02x SREG: %02x\n", + _alert("PC: %02x%02x%02x SP: %02x%02x SREG: %02x\n", g_current_regs[REG_PC0], g_current_regs[REG_PC1], g_current_regs[REG_PC2], g_current_regs[REG_SPH], g_current_regs[REG_SPL], g_current_regs[REG_SREG]); @@ -197,12 +190,12 @@ void up_dumpstate(void) /* Show interrupt stack info */ - lldbg("sp: %04x\n", sp); - lldbg("IRQ stack:\n"); - lldbg(" base: %04x\n", istackbase); - lldbg(" size: %04x\n", istacksize); + _alert("sp: %04x\n", sp); + _alert("IRQ stack:\n"); + _alert(" base: %04x\n", istackbase); + _alert(" size: %04x\n", istacksize); #ifdef CONFIG_STACK_COLORATION - lldbg(" used: %08x\n", up_check_intstack()); + _alert(" used: %08x\n", up_check_intstack()); #endif /* Does the current stack pointer lie within the interrupt @@ -224,14 +217,14 @@ void up_dumpstate(void) if (g_current_regs) { sp = g_current_regs[REG_R13]; - lldbg("sp: %04x\n", sp); + _alert("sp: %04x\n", sp); } - lldbg("User stack:\n"); - lldbg(" base: %04x\n", ustackbase); - lldbg(" size: %04x\n", ustacksize); + _alert("User stack:\n"); + _alert(" base: %04x\n", ustackbase); + _alert(" size: %04x\n", ustacksize); #ifdef CONFIG_STACK_COLORATION - lldbg(" used: %08x\n", up_check_tcbstack(rtcb)); + _alert(" used: %08x\n", up_check_tcbstack(rtcb)); #endif /* Dump the user stack if the stack pointer lies within the allocated user @@ -243,11 +236,11 @@ void up_dumpstate(void) up_stackdump(sp, ustackbase); } #else - lldbg("sp: %04x\n", sp); - lldbg("stack base: %04x\n", ustackbase); - lldbg("stack size: %04x\n", ustacksize); + _alert("sp: %04x\n", sp); + _alert("stack base: %04x\n", ustackbase); + _alert("stack size: %04x\n", ustacksize); #ifdef CONFIG_STACK_COLORATION - lldbg("stack used: %08x\n", up_check_tcbstack(rtcb)); + _alert("stack used: %08x\n", up_check_tcbstack(rtcb)); #endif /* Dump the user stack if the stack pointer lies within the allocated user @@ -256,7 +249,7 @@ void up_dumpstate(void) if (sp > ustackbase || sp <= ustackbase - ustacksize) { - lldbg("ERROR: Stack pointer is not within allocated stack\n"); + _alert("ERROR: Stack pointer is not within allocated stack\n"); } else { diff --git a/arch/avr/src/avr/up_initialstate.c b/arch/avr/src/avr/up_initialstate.c index 506b28c6200bd38c5d1f24de80c9c335aa461dd5..057054d437a3c64e7c920d7f72bc8f4f52eaf59c 100644 --- a/arch/avr/src/avr/up_initialstate.c +++ b/arch/avr/src/avr/up_initialstate.c @@ -50,18 +50,6 @@ #include "up_internal.h" #include "up_arch.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/avr/src/avr/up_releasepending.c b/arch/avr/src/avr/up_releasepending.c index 80789fee51dfeb8e2e91d9d1dd9f9fe4de6197db..5b9b05df2be579cb45b27f8912c4e0cfc41b99c7 100644 --- a/arch/avr/src/avr/up_releasepending.c +++ b/arch/avr/src/avr/up_releasepending.c @@ -66,7 +66,7 @@ void up_release_pending(void) { struct tcb_s *rtcb = this_task(); - slldbg("From TCB=%p\n", rtcb); + sinfo("From TCB=%p\n", rtcb); /* Merge the g_pendingtasks list into the ready-to-run task list */ diff --git a/arch/avr/src/avr/up_reprioritizertr.c b/arch/avr/src/avr/up_reprioritizertr.c index 28978a19dabe78cf792553af78e9b0d011e22e9f..846b59becf62f3f90196124d25eae4a734d899d8 100644 --- a/arch/avr/src/avr/up_reprioritizertr.c +++ b/arch/avr/src/avr/up_reprioritizertr.c @@ -94,7 +94,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) struct tcb_s *rtcb = this_task(); bool switch_needed; - slldbg("TCB=%p PRI=%d\n", tcb, priority); + sinfo("TCB=%p PRI=%d\n", tcb, priority); /* Remove the tcb task from the ready-to-run list. * sched_removereadytorun will return true if we just diff --git a/arch/avr/src/avr/up_schedulesigaction.c b/arch/avr/src/avr/up_schedulesigaction.c index 5c6cbf52eee68272e7d17d6c5cfce079a25f5705..16f7a3358709f4639760884ab0b2467be373321d 100644 --- a/arch/avr/src/avr/up_schedulesigaction.c +++ b/arch/avr/src/avr/up_schedulesigaction.c @@ -94,7 +94,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) { irqstate_t flags; - sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver); + sinfo("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver); /* Make sure that interrupts are disabled */ @@ -108,7 +108,8 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * being delivered to the currently executing task. */ - sdbg("rtcb=0x%p g_current_regs=0x%p\n", this_task(), g_current_regs); + sinfo("rtcb=0x%p g_current_regs=0x%p\n", + this_task(), g_current_regs); if (tcb == this_task()) { diff --git a/arch/avr/src/avr/up_sigdeliver.c b/arch/avr/src/avr/up_sigdeliver.c index e786cba00c6c8edeb9a5429f3324398af182a26a..c73460793e68599793ff2b10058166d115ebce7d 100644 --- a/arch/avr/src/avr/up_sigdeliver.c +++ b/arch/avr/src/avr/up_sigdeliver.c @@ -82,7 +82,7 @@ void up_sigdeliver(void) board_autoled_on(LED_SIGNAL); - sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", + sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); ASSERT(rtcb->xcp.sigdeliver != NULL); @@ -117,7 +117,7 @@ void up_sigdeliver(void) * errno that is needed by the user logic (it is probably EINTR). */ - sdbg("Resuming\n"); + sinfo("Resuming\n"); (void)up_irq_save(); rtcb->pterrno = saved_errno; diff --git a/arch/avr/src/avr/up_spi.c b/arch/avr/src/avr/up_spi.c index 94de828c1582948d5aa832cf9818890c7dfae54c..bf6eda418edf0c31414850853283371885aa44a6 100644 --- a/arch/avr/src/avr/up_spi.c +++ b/arch/avr/src/avr/up_spi.c @@ -62,28 +62,6 @@ #ifdef CONFIG_AVR_SPI -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - /**************************************************************************** * Private Types ****************************************************************************/ @@ -269,7 +247,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) actual = priv->actual; } - spidbg("Frequency %d->%d\n", frequency, actual); + spiinfo("Frequency %d->%d\n", frequency, actual); return actual; } @@ -408,7 +386,7 @@ static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size { FAR uint8_t *ptr = (FAR uint8_t *)buffer; - spidbg("nwords: %d\n", nwords); + spiinfo("nwords: %d\n", nwords); while (nwords-- > 0) { (void)spi_send(dev, (uint16_t)*ptr++); @@ -439,7 +417,7 @@ static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nw { FAR uint8_t *ptr = (FAR uint8_t *)buffer; - spidbg("nwords: %d\n", nwords); + spiinfo("nwords: %d\n", nwords); while (nwords-- > 0) { *ptr++ = spi_send(dev, (uint16_t)0xff); diff --git a/arch/avr/src/avr32/up_createstack.c b/arch/avr/src/avr32/up_createstack.c index db76abc38d9d21f88a75ccb8d56c37c84d9c7d20..6bc17519bc26127bace92f63bb728a02f03f1971 100644 --- a/arch/avr/src/avr32/up_createstack.c +++ b/arch/avr/src/avr32/up_createstack.c @@ -140,12 +140,12 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype) tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size); } -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Was the allocation successful? */ if (!tcb->stack_alloc_ptr) { - sdbg("ERROR: Failed to allocate stack, size %d\n", stack_size); + serr("ERROR: Failed to allocate stack, size %d\n", stack_size); } #endif } diff --git a/arch/avr/src/avr32/up_dumpstate.c b/arch/avr/src/avr32/up_dumpstate.c index 31daafdedb78ca8e40223dd46ced62291c453ba8..c15b33144053ed37906d2936e3df71add87a5822 100644 --- a/arch/avr/src/avr32/up_dumpstate.c +++ b/arch/avr/src/avr32/up_dumpstate.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/avr/src/avr32/up_dumpstate.c * - * Copyright (C) 2010-2011, 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2010-2011, 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -39,13 +39,6 @@ #include -/* Output debug info -- even if debug is not selected. */ - -#undef CONFIG_DEBUG -#undef CONFIG_DEBUG_VERBOSE -#define CONFIG_DEBUG 1 -#define CONFIG_DEBUG_VERBOSE 1 - #include #include #include @@ -93,7 +86,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base) for (stack = sp & ~0x1f; stack < stack_base; stack += 32) { uint32_t *ptr = (uint32_t *)stack; - lldbg("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n", + _alert("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n", stack, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7]); } @@ -109,21 +102,21 @@ static inline void up_registerdump(void) if (g_current_regs) { - lldbg("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n", + _alert("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n", 0, g_current_regs[REG_R0], g_current_regs[REG_R1], g_current_regs[REG_R2], g_current_regs[REG_R3], g_current_regs[REG_R4], g_current_regs[REG_R5], g_current_regs[REG_R6], g_current_regs[REG_R7]); - lldbg("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n", + _alert("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n", 8, g_current_regs[REG_R8], g_current_regs[REG_R9], g_current_regs[REG_R10], g_current_regs[REG_R11], g_current_regs[REG_R12], g_current_regs[REG_R13], g_current_regs[REG_R14], g_current_regs[REG_R15]); - lldbg("SR: %08x\n", g_current_regs[REG_SR]); + _alert("SR: %08x\n", g_current_regs[REG_SR]); } } @@ -163,12 +156,12 @@ void up_dumpstate(void) /* Show interrupt stack info */ - lldbg("sp: %08x\n", sp); - lldbg("IRQ stack:\n"); - lldbg(" base: %08x\n", istackbase); - lldbg(" size: %08x\n", istacksize); + _alert("sp: %08x\n", sp); + _alert("IRQ stack:\n"); + _alert(" base: %08x\n", istackbase); + _alert(" size: %08x\n", istacksize); #ifdef CONFIG_STACK_COLORATION - lldbg(" used: %08x\n", up_check_intstack()); + _alert(" used: %08x\n", up_check_intstack()); #endif /* Does the current stack pointer lie within the interrupt @@ -190,14 +183,14 @@ void up_dumpstate(void) if (g_current_regs) { sp = g_current_regs[REG_R13]; - lldbg("sp: %08x\n", sp); + _alert("sp: %08x\n", sp); } - lldbg("User stack:\n"); - lldbg(" base: %08x\n", ustackbase); - lldbg(" size: %08x\n", ustacksize); + _alert("User stack:\n"); + _alert(" base: %08x\n", ustackbase); + _alert(" size: %08x\n", ustacksize); #ifdef CONFIG_STACK_COLORATION - lldbg(" used: %08x\n", up_check_tcbstack(rtcb)); + _alert(" used: %08x\n", up_check_tcbstack(rtcb)); #endif /* Dump the user stack if the stack pointer lies within the allocated user @@ -209,11 +202,11 @@ void up_dumpstate(void) up_stackdump(sp, ustackbase); } #else - lldbg("sp: %08x\n", sp); - lldbg("stack base: %08x\n", ustackbase); - lldbg("stack size: %08x\n", ustacksize); + _alert("sp: %08x\n", sp); + _alert("stack base: %08x\n", ustackbase); + _alert("stack size: %08x\n", ustacksize); #ifdef CONFIG_STACK_COLORATION - lldbg("stack used: %08x\n", up_check_tcbstack(rtcb)); + _alert("stack used: %08x\n", up_check_tcbstack(rtcb)); #endif /* Dump the user stack if the stack pointer lies within the allocated user @@ -222,7 +215,7 @@ void up_dumpstate(void) if (sp > ustackbase || sp <= ustackbase - ustacksize) { - lldbg("ERROR: Stack pointer is not within allocated stack\n"); + _alert("ERROR: Stack pointer is not within allocated stack\n"); } else { diff --git a/arch/avr/src/avr32/up_initialstate.c b/arch/avr/src/avr32/up_initialstate.c index 821637423ae757dcaf60ca481c0650fac0d001a7..641d6278bda42cdf467bd0dcac79dc29644f51ac 100644 --- a/arch/avr/src/avr32/up_initialstate.c +++ b/arch/avr/src/avr32/up_initialstate.c @@ -85,7 +85,7 @@ void up_initial_state(struct tcb_s *tcb) * all registers is a good debug helper, but should not be necessary. */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES memset(xcp, 0, sizeof(struct xcptcontext)); #else /* No pending signal delivery */ diff --git a/arch/avr/src/avr32/up_releasepending.c b/arch/avr/src/avr32/up_releasepending.c index aaae06b59e480c1318a9ee3d660bbdf943ca3274..617c04cc3b9138e5a4309c4615e56cea9593dae0 100644 --- a/arch/avr/src/avr32/up_releasepending.c +++ b/arch/avr/src/avr32/up_releasepending.c @@ -67,7 +67,7 @@ void up_release_pending(void) { struct tcb_s *rtcb = this_task(); - slldbg("From TCB=%p\n", rtcb); + sinfo("From TCB=%p\n", rtcb); /* Merge the g_pendingtasks list into the ready-to-run task list */ diff --git a/arch/avr/src/avr32/up_reprioritizertr.c b/arch/avr/src/avr32/up_reprioritizertr.c index 88732c2b06e167907d86bd72cb128aaacea2632c..1ce7a4c406e1a9c8e2ee83dcf4ff0d760169bd49 100644 --- a/arch/avr/src/avr32/up_reprioritizertr.c +++ b/arch/avr/src/avr32/up_reprioritizertr.c @@ -95,7 +95,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) struct tcb_s *rtcb = this_task(); bool switch_needed; - slldbg("TCB=%p PRI=%d\n", tcb, priority); + sinfo("TCB=%p PRI=%d\n", tcb, priority); /* Remove the tcb task from the ready-to-run list. * sched_removereadytorun will return true if we just diff --git a/arch/avr/src/avr32/up_schedulesigaction.c b/arch/avr/src/avr32/up_schedulesigaction.c index 838c1382c2d643fbc566a7710ad65d25d6e66d6f..4ec759448da6e248a926d89c3246a44ce0781cc2 100644 --- a/arch/avr/src/avr32/up_schedulesigaction.c +++ b/arch/avr/src/avr32/up_schedulesigaction.c @@ -94,7 +94,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) { irqstate_t flags; - sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver); + sinfo("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver); /* Make sure that interrupts are disabled */ @@ -108,7 +108,8 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * being delivered to the currently executing task. */ - sdbg("rtcb=0x%p g_current_regs=0x%p\n", this_task(), g_current_regs); + sinfo("rtcb=0x%p g_current_regs=0x%p\n", + this_task(), g_current_regs); if (tcb == this_task()) { diff --git a/arch/avr/src/avr32/up_sigdeliver.c b/arch/avr/src/avr32/up_sigdeliver.c index 883bec974204ca75e07f15a245fe76353354f9f7..811e4b031cbda97c689cd4d956b5507d644a4f68 100644 --- a/arch/avr/src/avr32/up_sigdeliver.c +++ b/arch/avr/src/avr32/up_sigdeliver.c @@ -86,7 +86,7 @@ void up_sigdeliver(void) board_autoled_on(LED_SIGNAL); - sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", + sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); ASSERT(rtcb->xcp.sigdeliver != NULL); @@ -117,7 +117,7 @@ void up_sigdeliver(void) * errno that is needed by the user logic (it is probably EINTR). */ - sdbg("Resuming\n"); + sinfo("Resuming\n"); (void)up_irq_save(); rtcb->pterrno = saved_errno; diff --git a/arch/avr/src/common/up_assert.c b/arch/avr/src/common/up_assert.c index 8ea84f017bc3dd454a3984a328ee0b47f84e8847..92c3bde0175f05fe10e8012ab17b60f41f3a5a25 100644 --- a/arch/avr/src/common/up_assert.c +++ b/arch/avr/src/common/up_assert.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/avr/src/common/up_assert.c * - * Copyright (C) 2010-2011, 2013-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2010-2011, 2013-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include #include @@ -75,23 +64,6 @@ # undef CONFIG_ARCH_USBDUMP #endif -/* The following is just intended to keep some ugliness out of the mainline - * code. We are going to print the task name if: - * - * CONFIG_TASK_NAME_SIZE > 0 && <-- The task has a name - * (defined(CONFIG_DEBUG) || <-- And the debug is enabled (lldbg used) - * defined(CONFIG_ARCH_STACKDUMP)) <-- Or lowsyslog() is used - */ - -#undef CONFIG_PRINT_TASKNAME -#if CONFIG_TASK_NAME_SIZE > 0 && (defined(CONFIG_DEBUG) || defined(CONFIG_ARCH_STACKDUMP)) -# define CONFIG_PRINT_TASKNAME 1 -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -137,7 +109,7 @@ static int usbtrace_syslog(FAR const char *fmt, ...) /* Let vsyslog do the real work */ va_start(ap, fmt); - ret = lowvsyslog(LOG_INFO, fmt, ap); + ret = vsyslog(LOG_EMERG, fmt, ap); va_end(ap); return ret; } @@ -159,17 +131,17 @@ static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg) void up_assert(const uint8_t *filename, int lineno) { -#ifdef CONFIG_PRINT_TASKNAME +#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG_ALERT) struct tcb_s *rtcb = this_task(); #endif board_autoled_on(LED_ASSERTION); -#ifdef CONFIG_PRINT_TASKNAME - lldbg("Assertion failed at file:%s line: %d task: %s\n", +#if CONFIG_TASK_NAME_SIZE > 0 + _alert("Assertion failed at file:%s line: %d task: %s\n", filename, lineno, rtcb->name); #else - lldbg("Assertion failed at file:%s line: %d\n", + _alert("Assertion failed at file:%s line: %d\n", filename, lineno); #endif diff --git a/arch/avr/src/common/up_exit.c b/arch/avr/src/common/up_exit.c index 936a79d2331c7c58f54b5789ed2ef5c985e5cc27..4b77c358b232c1542f388790315648feb2e4776f 100644 --- a/arch/avr/src/common/up_exit.c +++ b/arch/avr/src/common/up_exit.c @@ -52,6 +52,14 @@ #include "group/group.h" #include "up_internal.h" +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -66,7 +74,7 @@ * ****************************************************************************/ -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG) +#ifdef CONFIG_DUMP_ON_EXIT static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) { #if CONFIG_NFILE_DESCRIPTORS > 0 @@ -77,8 +85,8 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) int i; #endif - sdbg(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid); - sdbg(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state); + sinfo(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid); + sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state); #if CONFIG_NFILE_DESCRIPTORS > 0 filelist = tcb->group->tg_filelist; @@ -87,8 +95,8 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) struct inode *inode = filelist->fl_files[i].f_inode; if (inode) { - sdbg(" fd=%d refcount=%d\n", - i, inode->i_crefs); + sinfo(" fd=%d refcount=%d\n", + i, inode->i_crefs); } } #endif @@ -101,11 +109,11 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) if (filep->fs_fd >= 0) { #if CONFIG_STDIO_BUFFER_SIZE > 0 - sdbg(" fd=%d nbytes=%d\n", - filep->fs_fd, - filep->fs_bufpos - filep->fs_bufstart); + sinfo(" fd=%d nbytes=%d\n", + filep->fs_fd, + filep->fs_bufpos - filep->fs_bufstart); #else - sdbg(" fd=%d\n", filep->fs_fd); + sinfo(" fd=%d\n", filep->fs_fd); #endif } } @@ -138,10 +146,10 @@ void _exit(int status) (void)up_irq_save(); - slldbg("TCB=%p exiting\n", this_task()); + sinfo("TCB=%p exiting\n", this_task()); -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG) - slldbg("Other tasks:\n"); +#ifdef CONFIG_DUMP_ON_EXIT + sinfo("Other tasks:\n"); sched_foreach(_up_dumponexit, NULL); #endif diff --git a/arch/avr/src/common/up_initialize.c b/arch/avr/src/common/up_initialize.c index 5c36cd08144fad14026b9f3e948f6587b3a54068..669821631c082c6d7b5c4e285113ca0916ecafe1 100644 --- a/arch/avr/src/common/up_initialize.c +++ b/arch/avr/src/common/up_initialize.c @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #include @@ -99,13 +99,6 @@ # define USE_SERIALDRIVER 1 #endif -/* Determine which device to use as the system logging device */ - -#ifndef CONFIG_SYSLOG -# undef CONFIG_SYSLOG_CHAR -# undef CONFIG_RAMLOG_SYSLOG -#endif - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -120,18 +113,18 @@ * ****************************************************************************/ -#if defined(CONFIG_ARCH_CALIBRATION) && defined(CONFIG_DEBUG) +#if defined(CONFIG_ARCH_CALIBRATION) && defined(CONFIG_DEBUG_FEATURES) static void up_calibratedelay(void) { int i; - lldbg("Beginning 100s delay\n"); + _warn("Beginning 100s delay\n"); for (i = 0; i < 100; i++) { up_mdelay(1000); } - lldbg("End 100s delay\n"); + _warn("End 100s delay\n"); } #else # define up_calibratedelay() @@ -259,20 +252,18 @@ void up_initialize(void) #if defined(CONFIG_DEV_LOWCONSOLE) lowconsole_init(); -#elif defined(CONFIG_SYSLOG_CONSOLE) +#elif defined(CONFIG_CONSOLE_SYSLOG) syslog_console_init(); #elif defined(CONFIG_RAMLOG_CONSOLE) ramlog_consoleinit(); #endif - /* Initialize the system logging device */ + /* Early initialization of the system logging device. Some SYSLOG channel + * can be initialized early in the initialization sequence because they + * depend on only minimal OS initialization. + */ -#ifdef CONFIG_SYSLOG_CHAR - syslog_initialize(); -#endif -#ifdef CONFIG_RAMLOG_SYSLOG - ramlog_sysloginit(); -#endif + syslog_initialize(SYSLOG_INIT_EARLY); #ifndef CONFIG_NETDEV_LATEINIT /* Initialize the network */ diff --git a/arch/avr/src/common/up_internal.h b/arch/avr/src/common/up_internal.h index 92a160ee90ebf0915b3f7f3164ee4f1c2dcaf759..64eecb658ce1bc772d310ab4b49c170b5fa25267 100644 --- a/arch/avr/src/common/up_internal.h +++ b/arch/avr/src/common/up_internal.h @@ -67,6 +67,10 @@ #undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */ #undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */ +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT /* Needs CONFIG_DEBUG_SCHED_INFO */ +#endif + /* Check if an interrupt stack size is configured */ #ifndef CONFIG_ARCH_INTERRUPTSTACK diff --git a/arch/hc/src/common/up_createstack.c b/arch/hc/src/common/up_createstack.c index 9afb471e470f9a9f5402040bd2577edb26a496cd..f09b98a87a20ad4e710e60609c96a882c2b89e23 100644 --- a/arch/hc/src/common/up_createstack.c +++ b/arch/hc/src/common/up_createstack.c @@ -137,12 +137,12 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype) tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size); } -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Was the allocation successful? */ if (!tcb->stack_alloc_ptr) { - sdbg("ERROR: Failed to allocate stack, size %d\n", stack_size); + serr("ERROR: Failed to allocate stack, size %d\n", stack_size); } #endif } diff --git a/arch/hc/src/common/up_exit.c b/arch/hc/src/common/up_exit.c index f80a4c3b0e00850c7de1f5c5d9a813d6c06f2f92..098b8681dbb85489d490828836a2c60c74b4c987 100644 --- a/arch/hc/src/common/up_exit.c +++ b/arch/hc/src/common/up_exit.c @@ -56,9 +56,9 @@ * Pre-processor Definitions ****************************************************************************/ -/**************************************************************************** - * Private Data - ****************************************************************************/ +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT +#endif /**************************************************************************** * Private Functions @@ -74,7 +74,7 @@ * ****************************************************************************/ -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG) +#ifdef CONFIG_DUMP_ON_EXIT static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) { #if CONFIG_NFILE_DESCRIPTORS > 0 @@ -85,8 +85,8 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) int i; #endif - sdbg(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid); - sdbg(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state); + sinfo(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid); + sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state); #if CONFIG_NFILE_DESCRIPTORS > 0 filelist = tcb->group->tg_filelist; @@ -95,8 +95,8 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) struct inode *inode = filelist->fl_files[i].f_inode; if (inode) { - sdbg(" fd=%d refcount=%d\n", - i, inode->i_crefs); + sinfo(" fd=%d refcount=%d\n", + i, inode->i_crefs); } } #endif @@ -109,11 +109,11 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) if (filep->fs_fd >= 0) { #if CONFIG_STDIO_BUFFER_SIZE > 0 - sdbg(" fd=%d nbytes=%d\n", - filep->fs_fd, - filep->fs_bufpos - filep->fs_bufstart); + sinfo(" fd=%d nbytes=%d\n", + filep->fs_fd, + filep->fs_bufpos - filep->fs_bufstart); #else - sdbg(" fd=%d\n", filep->fs_fd); + sinfo(" fd=%d\n", filep->fs_fd); #endif } } @@ -146,10 +146,10 @@ void _exit(int status) (void)up_irq_save(); - slldbg("TCB=%p exiting\n", this_task()); + sinfo("TCB=%p exiting\n", this_task()); -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG) - slldbg("Other tasks:\n"); +#ifdef CONFIG_DUMP_ON_EXIT + sinfo("Other tasks:\n"); sched_foreach(_up_dumponexit, NULL); #endif diff --git a/arch/hc/src/common/up_initialize.c b/arch/hc/src/common/up_initialize.c index 30daa39ea29ba63289d2e6cdad8aa92006bd9507..c5b1149d04a7d24a37760c6d15d178beeeff38db 100644 --- a/arch/hc/src/common/up_initialize.c +++ b/arch/hc/src/common/up_initialize.c @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include "up_arch.h" @@ -69,18 +69,18 @@ * ****************************************************************************/ -#if defined(CONFIG_ARCH_CALIBRATION) && defined(CONFIG_DEBUG) +#if defined(CONFIG_ARCH_CALIBRATION) && defined(CONFIG_DEBUG_FEATURES) static void up_calibratedelay(void) { int i; - lldbg("Beginning 100s delay\n"); + _warn("Beginning 100s delay\n"); for (i = 0; i < 100; i++) { up_mdelay(1000); } - lldbg("End 100s delay\n"); + _warn("End 100s delay\n"); } #else # define up_calibratedelay() @@ -178,20 +178,18 @@ void up_initialize(void) #if defined(CONFIG_DEV_LOWCONSOLE) lowconsole_init(); -#elif defined(CONFIG_SYSLOG_CONSOLE) +#elif defined(CONFIG_CONSOLE_SYSLOG) syslog_console_init(); #elif defined(CONFIG_RAMLOG_CONSOLE) ramlog_consoleinit(); #endif - /* Initialize the system logging device */ + /* Early initialization of the system logging device. Some SYSLOG channel + * can be initialized early in the initialization sequence because they + * depend on only minimal OS initialization. + */ -#ifdef CONFIG_SYSLOG_CHAR - syslog_initialize(); -#endif -#ifdef CONFIG_RAMLOG_SYSLOG - ramlog_sysloginit(); -#endif + syslog_initialize(SYSLOG_INIT_EARLY); #ifndef CONFIG_NETDEV_LATEINIT /* Initialize the network */ diff --git a/arch/hc/src/common/up_internal.h b/arch/hc/src/common/up_internal.h index 1650711f3a6c8b47b8c51524e0dc2795f7612824..ca582195fcf5bd395a259990fc33e2e4c2429717 100644 --- a/arch/hc/src/common/up_internal.h +++ b/arch/hc/src/common/up_internal.h @@ -62,6 +62,10 @@ #undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */ #undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */ +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT /* Needs CONFIG_DEBUG_SCHED_INFO */ +#endif + /* Determine which (if any) console driver to use. If a console is enabled * and no other console device is specified, then a serial console is * assumed. @@ -96,13 +100,6 @@ # define USE_SERIALDRIVER 1 #endif -/* Determine which device to use as the system logging device */ - -#ifndef CONFIG_SYSLOG -# undef CONFIG_SYSLOG_CHAR -# undef CONFIG_RAMLOG_SYSLOG -#endif - /* Check if an interrupt stack size is configured */ #ifndef CONFIG_ARCH_INTERRUPTSTACK diff --git a/arch/hc/src/common/up_releasepending.c b/arch/hc/src/common/up_releasepending.c index d9a209c343765022ac61114163dd75ec94336fc8..f2afeabd794b7611274f18cdbbffd50cfe274c10 100644 --- a/arch/hc/src/common/up_releasepending.c +++ b/arch/hc/src/common/up_releasepending.c @@ -66,7 +66,7 @@ void up_release_pending(void) { struct tcb_s *rtcb = this_task(); - slldbg("From TCB=%p\n", rtcb); + sinfo("From TCB=%p\n", rtcb); /* Merge the g_pendingtasks list into the ready-to-run task list */ diff --git a/arch/hc/src/common/up_reprioritizertr.c b/arch/hc/src/common/up_reprioritizertr.c index efdde667389c5d8490a1ed9e49dd33c2955e37cd..0b0d400d9a536692f9d7b23e657b9e221cc7d2bc 100644 --- a/arch/hc/src/common/up_reprioritizertr.c +++ b/arch/hc/src/common/up_reprioritizertr.c @@ -95,7 +95,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) struct tcb_s *rtcb = this_task(); bool switch_needed; - slldbg("TCB=%p PRI=%d\n", tcb, priority); + sinfo("TCB=%p PRI=%d\n", tcb, priority); /* Remove the tcb task from the ready-to-run list. * sched_removereadytorun will return true if we just diff --git a/arch/hc/src/m9s12/Make.defs b/arch/hc/src/m9s12/Make.defs index 809a0696c338b44501fdbf1833119c228ee295df..97fc4861a927b5efea8dad117bb9fb1900b31520 100644 --- a/arch/hc/src/m9s12/Make.defs +++ b/arch/hc/src/m9s12/Make.defs @@ -50,6 +50,6 @@ ifneq ($(CONFIG_SCHED_TICKLESS),y) CHIP_CSRCS += m9s12_timerisr.c endif -ifeq ($(CONFIG_DEBUG_GPIO),y) +ifeq ($(CONFIG_DEBUG_GPIO_INFO),y) CHIP_CSRCS+= m9s12_dumpgpio.c endif diff --git a/arch/hc/src/m9s12/m9s12.h b/arch/hc/src/m9s12/m9s12.h index e6c98244deda20b850e49e986ba5c71a5cd5cc2f..9a1c9711599ee4889bbb1497f08b12772f64e41d 100644 --- a/arch/hc/src/m9s12/m9s12.h +++ b/arch/hc/src/m9s12/m9s12.h @@ -294,7 +294,7 @@ void hcs12_gpioirqdisable(int irq); * ************************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO int hcs12_dumpgpio(uint16_t pinset, const char *msg); #else # define hcs12_dumpgpio(p,m) diff --git a/arch/hc/src/m9s12/m9s12_assert.c b/arch/hc/src/m9s12/m9s12_assert.c index 1eab6eb4e340eb853404673bb306161d1494a1f7..496b3933a662e9468f4e7c4ba74e9d76e9663b76 100644 --- a/arch/hc/src/m9s12/m9s12_assert.c +++ b/arch/hc/src/m9s12/m9s12_assert.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/hc/src/m9s12/m9s12_assert.c * - * Copyright (C) 2011-2015 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 @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include #include @@ -75,23 +64,6 @@ # undef CONFIG_ARCH_USBDUMP #endif -/* The following is just intended to keep some ugliness out of the mainline - * code. We are going to print the task name if: - * - * CONFIG_TASK_NAME_SIZE > 0 && <-- The task has a name - * (defined(CONFIG_DEBUG) || <-- And the debug is enabled (lldbg used) - * defined(CONFIG_ARCH_STACKDUMP) <-- Or lowsyslog() is used - */ - -#undef CONFIG_PRINT_TASKNAME -#if CONFIG_TASK_NAME_SIZE > 0 && (defined(CONFIG_DEBUG) || defined(CONFIG_ARCH_STACKDUMP)) -# define CONFIG_PRINT_TASKNAME 1 -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -108,7 +80,7 @@ static void up_stackdump(uint16_t sp, uint16_t stack_base) for (stack = sp; stack < stack_base; stack += 16) { uint8_t *ptr = (uint8_t*)stack; - lldbg("%04x: %02x %02x %02x %02x %02x %02x %02x %02x" + _alert("%04x: %02x %02x %02x %02x %02x %02x %02x %02x" " %02x %02x %02x %02x %02x %02x %02x %02x\n", stack, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7], ptr[8], ptr[9], ptr[10], ptr[11], ptr[12], ptr[13], ptr[14], ptr[15]); @@ -129,11 +101,11 @@ static inline void up_registerdump(void) if (g_current_regs) { - lldbg("A:%02x B:%02x X:%02x%02x Y:%02x%02x PC:%02x%02x CCR:%02x\n", + _alert("A:%02x B:%02x X:%02x%02x Y:%02x%02x PC:%02x%02x CCR:%02x\n", g_current_regs[REG_A], g_current_regs[REG_B], g_current_regs[REG_XH], g_current_regs[REG_XL], g_current_regs[REG_YH], g_current_regs[REG_YL], g_current_regs[REG_PCH], g_current_regs[REG_PCL], g_current_regs[REG_CCR]); - lldbg("SP:%02x%02x FRAME:%02x%02x TMP:%02x%02x Z:%02x%02x XY:%02x\n", + _alert("SP:%02x%02x FRAME:%02x%02x TMP:%02x%02x Z:%02x%02x XY:%02x\n", g_current_regs[REG_SPH], g_current_regs[REG_SPL], g_current_regs[REG_FRAMEH], g_current_regs[REG_FRAMEL], g_current_regs[REG_TMPL], g_current_regs[REG_TMPH], g_current_regs[REG_ZL], @@ -142,16 +114,16 @@ static inline void up_registerdump(void) #if CONFIG_HCS12_MSOFTREGS > 2 # error "Need to save more registers" #elif CONFIG_HCS12_MSOFTREGS == 2 - lldbg("SOFTREGS: %02x%02x :%02x%02x\n", + _alert("SOFTREGS: %02x%02x :%02x%02x\n", g_current_regs[REG_SOFTREG1], g_current_regs[REG_SOFTREG1+1], g_current_regs[REG_SOFTREG2], g_current_regs[REG_SOFTREG2+1]); #elif CONFIG_HCS12_MSOFTREGS == 1 - lldbg("SOFTREGS: %02x%02x\n", g_current_regs[REG_SOFTREG1], + _alert("SOFTREGS: %02x%02x\n", g_current_regs[REG_SOFTREG1], g_current_regs[REG_SOFTREG1+1]); #endif #ifndef CONFIG_HCS12_NONBANKED - lldbg("PPAGE: %02x\n", g_current_regs[REG_PPAGE],); + _alert("PPAGE: %02x\n", g_current_regs[REG_PPAGE],); #endif } } @@ -172,7 +144,7 @@ static int usbtrace_syslog(FAR const char *fmt, ...) /* Let vsyslog do the real work */ va_start(ap, fmt); - ret = lowvsyslog(LOG_INFO, fmt, ap); + ret = vsyslog(LOG_EMERG, fmt, ap); va_end(ap); return ret; } @@ -221,10 +193,10 @@ static void up_dumpstate(void) /* Show interrupt stack info */ - lldbg("sp: %04x\n", sp); - lldbg("IRQ stack:\n"); - lldbg(" base: %04x\n", istackbase); - lldbg(" size: %04x\n", istacksize); + _alert("sp: %04x\n", sp); + _alert("IRQ stack:\n"); + _alert(" base: %04x\n", istackbase); + _alert(" size: %04x\n", istacksize); /* Does the current stack pointer lie within the interrupt * stack? @@ -241,18 +213,18 @@ static void up_dumpstate(void) */ sp = g_intstackbase; - lldbg("sp: %04x\n", sp); + _alert("sp: %04x\n", sp); } /* Show user stack info */ - lldbg("User stack:\n"); - lldbg(" base: %04x\n", ustackbase); - lldbg(" size: %04x\n", ustacksize); + _alert("User stack:\n"); + _alert(" base: %04x\n", ustackbase); + _alert(" size: %04x\n", ustacksize); #else - lldbg("sp: %04x\n", sp); - lldbg("stack base: %04x\n", ustackbase); - lldbg("stack size: %04x\n", ustacksize); + _alert("sp: %04x\n", sp); + _alert("stack base: %04x\n", ustackbase); + _alert("stack size: %04x\n", ustacksize); #endif /* Dump the user stack if the stack pointer lies within the allocated user @@ -262,7 +234,7 @@ static void up_dumpstate(void) if (sp > ustackbase || sp <= ustackbase - ustacksize) { #if !defined(CONFIG_ARCH_INTERRUPTSTACK) || CONFIG_ARCH_INTERRUPTSTACK < 4 - lldbg("ERROR: Stack pointer is not within allocated stack\n"); + _alert("ERROR: Stack pointer is not within allocated stack\n"); #endif } else @@ -322,17 +294,17 @@ static void _up_assert(int errorcode) void up_assert(const uint8_t *filename, int lineno) { -#ifdef CONFIG_PRINT_TASKNAME +#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG_ALERT) struct tcb_s *rtcb = this_task(); #endif board_autoled_on(LED_ASSERTION); -#ifdef CONFIG_PRINT_TASKNAME - lldbg("Assertion failed at file:%s line: %d task: %s\n", +#if CONFIG_TASK_NAME_SIZE > 0 + _alert("Assertion failed at file:%s line: %d task: %s\n", filename, lineno, rtcb->name); #else - lldbg("Assertion failed at file:%s line: %d\n", + _alert("Assertion failed at file:%s line: %d\n", filename, lineno); #endif diff --git a/arch/hc/src/m9s12/m9s12_dumpgpio.c b/arch/hc/src/m9s12/m9s12_dumpgpio.c index db4261256ba2ca623b2a7dae76dab0dd62c7edcd..ad6ce5860fbd08eb8d213b6820b64fb6f6b57322 100644 --- a/arch/hc/src/m9s12/m9s12_dumpgpio.c +++ b/arch/hc/src/m9s12/m9s12_dumpgpio.c @@ -1,8 +1,7 @@ /**************************************************************************** * arch/arm/src/m9s12/m9s12_dumpgpio.c - * arch/arm/src/chip/m9s12_dumpgpio.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 @@ -40,6 +39,13 @@ #include +/* Output debug info -- even if debug is not selected. */ + +#undef CONFIG_DEBUG_FEATURES +#undef CONFIG_DEBUG_INFO +#define CONFIG_DEBUG_FEATURES 1 +#define CONFIG_DEBUG_INFO 1 + #include #include #include @@ -49,7 +55,7 @@ #include "m9s12_pim.h" #include "m9s12_mebi.h" -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO /**************************************************************************** * Pre-processor Definitions @@ -166,39 +172,39 @@ static inline void hcs12_pimdump(uint8_t portndx) if (portndx >= HCS12_PIM_NPORTS) { - lldbg(" Illegal PIM port index: %d\n", portndx); + gpioinfo(" Illegal PIM port index: %d\n", portndx); return; } ptr = &piminfo[portndx]; - lldbg(" PIM Port%c:\n", ptr->name); - lldbg(" IO:%02x INP:%02x DDR:%02x RDR:%02x\n", - getreg8(ptr->base+HCS12_PIM_IO_OFFSET), - getreg8(ptr->base+HCS12_PIM_INPUT_OFFSET), - getreg8(ptr->base+HCS12_PIM_DDR_OFFSET), - getreg8(ptr->base+HCS12_PIM_RDR_OFFSET)); + gpioinfo(" PIM Port%c:\n", ptr->name); + gpioinfo(" IO:%02x INP:%02x DDR:%02x RDR:%02x\n", + getreg8(ptr->base+HCS12_PIM_IO_OFFSET), + getreg8(ptr->base+HCS12_PIM_INPUT_OFFSET), + getreg8(ptr->base+HCS12_PIM_DDR_OFFSET), + getreg8(ptr->base+HCS12_PIM_RDR_OFFSET)); switch (ptr->form) { case PIMPORT_FORM1: - lldbg(" PER:%02x PS:%02x\n", - getreg8(ptr->base+HCS12_PIM_PER_OFFSET), - getreg8(ptr->base+HCS12_PIM_PS_OFFSET)); + gpioinfo(" PER:%02x PS:%02x\n", + getreg8(ptr->base+HCS12_PIM_PER_OFFSET), + getreg8(ptr->base+HCS12_PIM_PS_OFFSET)); break; case PIMPORT_FORM2: - lldbg(" PER:%02x PS:%02x WOM:%02x\n", - getreg8(ptr->base+HCS12_PIM_PER_OFFSET), - getreg8(ptr->base+HCS12_PIM_PS_OFFSET), - getreg8(ptr->base+HCS12_PIM_WOM_OFFSET)); + gpioinfo(" PER:%02x PS:%02x WOM:%02x\n", + getreg8(ptr->base+HCS12_PIM_PER_OFFSET), + getreg8(ptr->base+HCS12_PIM_PS_OFFSET), + getreg8(ptr->base+HCS12_PIM_WOM_OFFSET)); break; case PIMPORT_FORM3: - lldbg(" PER:%02x PS:%02x IE:%02x IF:%02x\n", - getreg8(ptr->base+HCS12_PIM_PER_OFFSET), - getreg8(ptr->base+HCS12_PIM_PS_OFFSET), - getreg8(ptr->base+HCS12_PIM_IE_OFFSET), - getreg8(ptr->base+HCS12_PIM_IF_OFFSET)); + gpioinfo(" PER:%02x PS:%02x IE:%02x IF:%02x\n", + getreg8(ptr->base+HCS12_PIM_PER_OFFSET), + getreg8(ptr->base+HCS12_PIM_PS_OFFSET), + getreg8(ptr->base+HCS12_PIM_IE_OFFSET), + getreg8(ptr->base+HCS12_PIM_IF_OFFSET)); break; default: @@ -220,30 +226,30 @@ static inline void hcs12_mebidump(uint8_t portndx) if (portndx >= HCS12_MEBI_NPORTS) { - lldbg(" Illegal MEBI port index: %d\n", portndx); + gpioinfo(" Illegal MEBI port index: %d\n", portndx); return; } ptr = &mebiinfo[portndx]; - lldbg(" MEBI Port%c:\n", ptr->name); + gpioinfo(" MEBI Port%c:\n", ptr->name); switch (ptr->form) { case MEBIPORT_AB: - lldbg(" DATA:%02x DDR:%02x\n", - getreg8(ptr->data), getreg8(ptr->ddr)); + gpioinfo(" DATA:%02x DDR:%02x\n", + getreg8(ptr->data), getreg8(ptr->ddr)); break; case MEBIPORT_E: - lldbg(" DATA:%02x DDR:%02x MODE:%02x PEAR:%02x\n", - getreg8(ptr->data), getreg8(ptr->ddr), - getreg8(HCS12_MEBI_MODE), getreg8(HCS12_MEBI_PEAR)); + gpioinfo(" DATA:%02x DDR:%02x MODE:%02x PEAR:%02x\n", + getreg8(ptr->data), getreg8(ptr->ddr), + getreg8(HCS12_MEBI_MODE), getreg8(HCS12_MEBI_PEAR)); break; case MEBIPORT_K: - lldbg(" DATA:%02x DDR:%02x MODE:%02x\n", - getreg8(ptr->data), getreg8(ptr->ddr), - getreg8(HCS12_MEBI_MODE)); + gpioinfo(" DATA:%02x DDR:%02x MODE:%02x\n", + getreg8(ptr->data), getreg8(ptr->ddr), + getreg8(HCS12_MEBI_MODE)); break; default: @@ -268,7 +274,7 @@ int hcs12_dumpgpio(uint16_t pinset, const char *msg) uint8_t portndx = HCS12_PORTNDX(pinset); irqstate_t flags = enter_critical_section(); - lldbg("pinset: %08x -- %s\n", pinset, msg); + gpioinfo("pinset: %08x -- %s\n", pinset, msg); if (HCS12_PIMPORT(pinset)) { @@ -283,5 +289,4 @@ int hcs12_dumpgpio(uint16_t pinset, const char *msg) return OK; } -#endif /* CONFIG_DEBUG_GPIO */ - +#endif /* CONFIG_DEBUG_GPIO_INFO */ diff --git a/arch/hc/src/m9s12/m9s12_ethernet.c b/arch/hc/src/m9s12/m9s12_ethernet.c index 0f02c88aedd45060e57410eb546dc099f06ab1fd..958a10affec76ba08056588a610c394ef6d1081f 100644 --- a/arch/hc/src/m9s12/m9s12_ethernet.c +++ b/arch/hc/src/m9s12/m9s12_ethernet.c @@ -97,9 +97,9 @@ struct emac_driver_s WDOG_ID d_txpoll; /* TX poll timer */ WDOG_ID d_txtimeout; /* TX timeout timer */ - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ - struct net_driver_s d_dev; /* Interface understood by uIP */ + struct net_driver_s d_dev; /* Interface understood by the network */ }; /**************************************************************************** @@ -185,8 +185,9 @@ static int emac_transmit(FAR struct emac_driver_s *priv) * Function: emac_txpoll * * Description: - * The transmitter is available, check if uIP has any outgoing packets ready - * to send. This is a callback from devif_poll(). devif_poll() may be called: + * The transmitter is available, check if the network has any outgoing + * packets ready to send. This is a callback from devif_poll(). + * devif_poll() may be called: * * 1. When the preceding TX packet send is complete, * 2. When the preceding TX packet send timesout and the interface is reset @@ -276,7 +277,7 @@ static void emac_receive(FAR struct emac_driver_s *priv) { /* Check for errors and update statistics */ - /* Check if the packet is a valid size for the uIP buffer configuration */ + /* Check if the packet is a valid size for the network buffer configuration */ /* Copy the data data from the hardware to priv->d_dev.d_buf. Set * amount of data in priv->d_dev.d_len @@ -293,7 +294,7 @@ static void emac_receive(FAR struct emac_driver_s *priv) #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); /* Handle ARP on input then give the IPv4 packet to the network * layer @@ -333,7 +334,7 @@ static void emac_receive(FAR struct emac_driver_s *priv) #ifdef CONFIG_NET_IPv6 if (BUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); /* Give the IPv6 packet to the network layer */ @@ -413,7 +414,7 @@ static void emac_txdone(FAR struct emac_driver_s *priv) wd_cancel(priv->d_txtimeout); - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ (void)devif_poll(&priv->d_dev, emac_txpoll); } @@ -484,7 +485,7 @@ static void emac_txtimeout(int argc, uint32_t arg, ...) /* Then reset the hardware */ - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ (void)devif_poll(&priv->d_dev, emac_txpoll); } @@ -515,7 +516,7 @@ static void emac_polltimer(int argc, uint32_t arg, ...) * the TX poll if he are unable to accept another packet for transmission. */ - /* If so, update TCP timing states and poll uIP for new XMIT data. Hmmm.. + /* If so, update TCP timing states and poll the network for new XMIT data. Hmmm.. * might be bug here. Does this mean if there is a transmit in progress, * we will missing TCP time state updates? */ @@ -548,9 +549,9 @@ static int emac_ifup(struct net_driver_s *dev) { FAR struct emac_driver_s *priv = (FAR struct emac_driver_s *)dev->d_private; - ndbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24 ); + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24 ); /* Initialize PHYs, the Ethernet interface, and setup up Ethernet interrupts */ @@ -644,7 +645,7 @@ static int emac_txavail(struct net_driver_s *dev) { /* Check if there is room in the hardware to hold another outgoing packet. */ - /* If so, then poll uIP for new XMIT data */ + /* If so, then poll the network for new XMIT data */ (void)devif_poll(&priv->d_dev, emac_txpoll); } diff --git a/arch/hc/src/m9s12/m9s12_gpio.c b/arch/hc/src/m9s12/m9s12_gpio.c index 7d43f0a3d8a6fef99dc18f81e75648d6379315f6..0004bdf5de7af9886749dedee39b299c19911e3e 100644 --- a/arch/hc/src/m9s12/m9s12_gpio.c +++ b/arch/hc/src/m9s12/m9s12_gpio.c @@ -304,7 +304,7 @@ static inline void pim_configgpio(uint16_t cfgset, uint8_t portndx, uint8_t pin) DEBUGASSERT(portndx < HCS12_PIM_NPORTS); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if ((cfgset & GPIO_INT_ENABLE) != 0) { /* Yes.. then it must not be tagged as an output */ diff --git a/arch/hc/src/m9s12/m9s12_start.S b/arch/hc/src/m9s12/m9s12_start.S index 49d31b4e1dde018cda7dabf6c5d5e17904aa228b..3747967f5b76b447e213f4454897d411d3d2dd47 100644 --- a/arch/hc/src/m9s12/m9s12_start.S +++ b/arch/hc/src/m9s12/m9s12_start.S @@ -82,7 +82,7 @@ */ .macro showprogress, code -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES ldab \code #ifdef CONFIG_HCS12_SERIALMON jsr #PutChar diff --git a/arch/mips/src/common/up_createstack.c b/arch/mips/src/common/up_createstack.c index 5540b8bc4f8fde821587e2e4d1d15a8545c0f9b1..69d5ff04869639cda3aa6e90a9ee77f871a2ef7a 100644 --- a/arch/mips/src/common/up_createstack.c +++ b/arch/mips/src/common/up_createstack.c @@ -158,12 +158,12 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype) tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size); } -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Was the allocation successful? */ if (!tcb->stack_alloc_ptr) { - sdbg("ERROR: Failed to allocate stack, size %d\n", stack_size); + serr("ERROR: Failed to allocate stack, size %d\n", stack_size); } #endif } diff --git a/arch/mips/src/common/up_exit.c b/arch/mips/src/common/up_exit.c index 36a1d2b1704dafae3e1cc0d12bf9b07382d3795e..af9a79a0e7589cc62f1c97cc7f3c2c635ad1064c 100644 --- a/arch/mips/src/common/up_exit.c +++ b/arch/mips/src/common/up_exit.c @@ -58,9 +58,9 @@ * Pre-processor Definitions ****************************************************************************/ -/**************************************************************************** - * Private Data - ****************************************************************************/ +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT +#endif /**************************************************************************** * Private Functions @@ -76,7 +76,7 @@ * ****************************************************************************/ -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG) +#ifdef CONFIG_DUMP_ON_EXIT static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) { #if CONFIG_NFILE_DESCRIPTORS > 0 @@ -87,8 +87,8 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) int i; #endif - sdbg(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid); - sdbg(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state); + sinfo(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid); + sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state); #if CONFIG_NFILE_DESCRIPTORS > 0 filelist = tcb->group->tg_filelist; @@ -97,8 +97,8 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) struct inode *inode = filelist->fl_files[i].f_inode; if (inode) { - sdbg(" fd=%d refcount=%d\n", - i, inode->i_crefs); + sinfo(" fd=%d refcount=%d\n", + i, inode->i_crefs); } } #endif @@ -111,11 +111,11 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) if (filep->fs_fd >= 0) { #if CONFIG_STDIO_BUFFER_SIZE > 0 - sdbg(" fd=%d nbytes=%d\n", - filep->fs_fd, - filep->fs_bufpos - filep->fs_bufstart); + sinfo(" fd=%d nbytes=%d\n", + filep->fs_fd, + filep->fs_bufpos - filep->fs_bufstart); #else - sdbg(" fd=%d\n", filep->fs_fd); + sinfo(" fd=%d\n", filep->fs_fd); #endif } } @@ -148,10 +148,10 @@ void _exit(int status) (void)up_irq_save(); - slldbg("TCB=%p exiting\n", this_task()); + sinfo("TCB=%p exiting\n", this_task()); -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG) - slldbg("Other tasks:\n"); +#ifdef CONFIG_DUMP_ON_EXIT + sinfo("Other tasks:\n"); sched_foreach(_up_dumponexit, NULL); #endif diff --git a/arch/mips/src/common/up_initialize.c b/arch/mips/src/common/up_initialize.c index b7df229f2f04c9a6c52b3a38a6a1c8f8541fc5ca..d6d634c9bc735cca5e8a14d15e5a52cd75aef1a5 100644 --- a/arch/mips/src/common/up_initialize.c +++ b/arch/mips/src/common/up_initialize.c @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include @@ -71,18 +71,18 @@ * ****************************************************************************/ -#if defined(CONFIG_ARCH_CALIBRATION) && defined(CONFIG_DEBUG) +#if defined(CONFIG_ARCH_CALIBRATION) && defined(CONFIG_DEBUG_FEATURES) static void up_calibratedelay(void) { int i; - lldbg("Beginning 100s delay\n"); + _warn("Beginning 100s delay\n"); for (i = 0; i < 100; i++) { up_mdelay(1000); } - lldbg("End 100s delay\n"); + _warn("End 100s delay\n"); } #else # define up_calibratedelay() @@ -180,20 +180,18 @@ void up_initialize(void) #if defined(CONFIG_DEV_LOWCONSOLE) lowconsole_init(); -#elif defined(CONFIG_SYSLOG_CONSOLE) +#elif defined(CONFIG_CONSOLE_SYSLOG) syslog_console_init(); #elif defined(CONFIG_RAMLOG_CONSOLE) ramlog_consoleinit(); #endif - /* Initialize the system logging device */ + /* Early initialization of the system logging device. Some SYSLOG channel + * can be initialized early in the initialization sequence because they + * depend on only minimal OS initialization. + */ -#ifdef CONFIG_SYSLOG_CHAR - syslog_initialize(); -#endif -#ifdef CONFIG_RAMLOG_SYSLOG - ramlog_sysloginit(); -#endif + syslog_initialize(SYSLOG_INIT_EARLY); #ifndef CONFIG_NETDEV_LATEINIT /* Initialize the network */ diff --git a/arch/mips/src/common/up_internal.h b/arch/mips/src/common/up_internal.h index 3b2ca4ccbc396da08c566563de56c1d908ad24e7..f14bc63b3c88e0de14a6a26fcc97cf57dcc0e610 100644 --- a/arch/mips/src/common/up_internal.h +++ b/arch/mips/src/common/up_internal.h @@ -60,6 +60,10 @@ #undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */ #undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */ +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT /* Needs CONFIG_DEBUG_SCHED_INFO */ +#endif + /* Determine which (if any) console driver to use. If a console is enabled * and no other console device is specified, then a serial console is * assumed. @@ -94,13 +98,6 @@ # define USE_SERIALDRIVER 1 #endif -/* Determine which device to use as the system logging device */ - -#ifndef CONFIG_SYSLOG -# undef CONFIG_SYSLOG_CHAR -# undef CONFIG_RAMLOG_SYSLOG -#endif - /* Check if an interrupt stack size is configured */ #ifndef CONFIG_ARCH_INTERRUPTSTACK diff --git a/arch/mips/src/mips32/up_assert.c b/arch/mips/src/mips32/up_assert.c index 8b4ae3e50aba8d7164bc42bd96ee7f1fa44166ad..5723fe1840504bdfdf11e979ace247cc1c155ec7 100644 --- a/arch/mips/src/mips32/up_assert.c +++ b/arch/mips/src/mips32/up_assert.c @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include #include @@ -75,23 +64,6 @@ # undef CONFIG_ARCH_USBDUMP #endif -/* The following is just intended to keep some ugliness out of the mainline - * code. We are going to print the task name if: - * - * CONFIG_TASK_NAME_SIZE > 0 && <-- The task has a name - * (defined(CONFIG_DEBUG) || <-- And the debug is enabled (lldbg used) - * defined(CONFIG_ARCH_STACKDUMP) <-- Or lowsyslog() is used - */ - -#undef CONFIG_PRINT_TASKNAME -#if CONFIG_TASK_NAME_SIZE > 0 && (defined(CONFIG_DEBUG) || defined(CONFIG_ARCH_STACKDUMP)) -# define CONFIG_PRINT_TASKNAME 1 -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -137,7 +109,7 @@ static int usbtrace_syslog(FAR const char *fmt, ...) /* Let vsyslog do the real work */ va_start(ap, fmt); - ret = lowvsyslog(LOG_INFO, fmt, ap); + ret = vsyslog(LOG_EMERG, fmt, ap); va_end(ap); return ret; } @@ -159,17 +131,17 @@ static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg) void up_assert(const uint8_t *filename, int lineno) { -#ifdef CONFIG_PRINT_TASKNAME +#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG_ALERT) struct tcb_s *rtcb = this_task(); #endif board_autoled_on(LED_ASSERTION); -#ifdef CONFIG_PRINT_TASKNAME - lldbg("Assertion failed at file:%s line: %d task: %s\n", +#if CONFIG_TASK_NAME_SIZE > 0 + _alert("Assertion failed at file:%s line: %d task: %s\n", filename, lineno, rtcb->name); #else - lldbg("Assertion failed at file:%s line: %d\n", + _alert("Assertion failed at file:%s line: %d\n", filename, lineno); #endif diff --git a/arch/mips/src/mips32/up_dumpstate.c b/arch/mips/src/mips32/up_dumpstate.c index b56d7f2419b298e5a117b8b0cc3d6f713c4a5139..db9fcda6573e23ee5e2dc0dde10c2e96da29747d 100644 --- a/arch/mips/src/mips32/up_dumpstate.c +++ b/arch/mips/src/mips32/up_dumpstate.c @@ -39,13 +39,6 @@ #include -/* Output debug info -- even if debug is not selected. */ - -#undef CONFIG_DEBUG -#undef CONFIG_DEBUG_VERBOSE -#define CONFIG_DEBUG 1 -#define CONFIG_DEBUG_VERBOSE 1 - #include #include #include @@ -61,14 +54,6 @@ #ifdef CONFIG_ARCH_STACKDUMP -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -101,7 +86,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base) for (stack = sp & ~0x1f; stack < stack_base; stack += 32) { uint32_t *ptr = (uint32_t *)stack; - lldbg("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n", + _alert("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n", stack, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7]); } @@ -117,27 +102,27 @@ static inline void up_registerdump(void) if (g_current_regs) { - lldbg("MFLO:%08x MFHI:%08x EPC:%08x STATUS:%08x\n", + _alert("MFLO:%08x MFHI:%08x EPC:%08x STATUS:%08x\n", g_current_regs[REG_MFLO], g_current_regs[REG_MFHI], g_current_regs[REG_EPC], g_current_regs[REG_STATUS]); - lldbg("AT:%08x V0:%08x V1:%08x A0:%08x A1:%08x A2:%08x A3:%08x\n", + _alert("AT:%08x V0:%08x V1:%08x A0:%08x A1:%08x A2:%08x A3:%08x\n", g_current_regs[REG_AT], g_current_regs[REG_V0], g_current_regs[REG_V1], g_current_regs[REG_A0], g_current_regs[REG_A1], g_current_regs[REG_A2], g_current_regs[REG_A3]); - lldbg("T0:%08x T1:%08x T2:%08x T3:%08x T4:%08x T5:%08x T6:%08x T7:%08x\n", + _alert("T0:%08x T1:%08x T2:%08x T3:%08x T4:%08x T5:%08x T6:%08x T7:%08x\n", g_current_regs[REG_T0], g_current_regs[REG_T1], g_current_regs[REG_T2], g_current_regs[REG_T3], g_current_regs[REG_T4], g_current_regs[REG_T5], g_current_regs[REG_T6], g_current_regs[REG_T7]); - lldbg("S0:%08x S1:%08x S2:%08x S3:%08x S4:%08x S5:%08x S6:%08x S7:%08x\n", + _alert("S0:%08x S1:%08x S2:%08x S3:%08x S4:%08x S5:%08x S6:%08x S7:%08x\n", g_current_regs[REG_S0], g_current_regs[REG_S1], g_current_regs[REG_S2], g_current_regs[REG_S3], g_current_regs[REG_S4], g_current_regs[REG_S5], g_current_regs[REG_S6], g_current_regs[REG_S7]); #ifdef MIPS32_SAVE_GP - lldbg("T8:%08x T9:%08x GP:%08x SP:%08x FP:%08x RA:%08x\n", + _alert("T8:%08x T9:%08x GP:%08x SP:%08x FP:%08x RA:%08x\n", g_current_regs[REG_T8], g_current_regs[REG_T9], g_current_regs[REG_GP], g_current_regs[REG_SP], g_current_regs[REG_FP], g_current_regs[REG_RA]); #else - lldbg("T8:%08x T9:%08x SP:%08x FP:%08x RA:%08x\n", + _alert("T8:%08x T9:%08x SP:%08x FP:%08x RA:%08x\n", g_current_regs[REG_T8], g_current_regs[REG_T9], g_current_regs[REG_SP], g_current_regs[REG_FP], g_current_regs[REG_RA]); #endif @@ -184,10 +169,10 @@ void up_dumpstate(void) /* Show interrupt stack info */ - lldbg("sp: %08x\n", sp); - lldbg("IRQ stack:\n"); - lldbg(" base: %08x\n", istackbase); - lldbg(" size: %08x\n", istacksize); + _alert("sp: %08x\n", sp); + _alert("IRQ stack:\n"); + _alert(" base: %08x\n", istackbase); + _alert(" size: %08x\n", istacksize); /* Does the current stack pointer lie within the interrupt * stack? @@ -204,18 +189,18 @@ void up_dumpstate(void) */ sp = g_intstackbase; - lldbg("sp: %08x\n", sp); + _alert("sp: %08x\n", sp); } /* Show user stack info */ - lldbg("User stack:\n"); - lldbg(" base: %08x\n", ustackbase); - lldbg(" size: %08x\n", ustacksize); + _alert("User stack:\n"); + _alert(" base: %08x\n", ustackbase); + _alert(" size: %08x\n", ustacksize); #else - lldbg("sp: %08x\n", sp); - lldbg("stack base: %08x\n", ustackbase); - lldbg("stack size: %08x\n", ustacksize); + _alert("sp: %08x\n", sp); + _alert("stack base: %08x\n", ustackbase); + _alert("stack size: %08x\n", ustacksize); #endif /* Dump the user stack if the stack pointer lies within the allocated user @@ -225,7 +210,7 @@ void up_dumpstate(void) if (sp > ustackbase || sp <= ustackbase - ustacksize) { #if !defined(CONFIG_ARCH_INTERRUPTSTACK) || CONFIG_ARCH_INTERRUPTSTACK < 4 - lldbg("ERROR: Stack pointer is not within allocated stack\n"); + _alert("ERROR: Stack pointer is not within allocated stack\n"); #endif } else diff --git a/arch/mips/src/mips32/up_releasepending.c b/arch/mips/src/mips32/up_releasepending.c index 0d4522ba8d8896c4ca9d7304b5074cf1063fa25e..b7e1d8ce9284a2d3642103977bfa6da3f34556d8 100644 --- a/arch/mips/src/mips32/up_releasepending.c +++ b/arch/mips/src/mips32/up_releasepending.c @@ -69,7 +69,7 @@ void up_release_pending(void) { struct tcb_s *rtcb = this_task(); - slldbg("From TCB=%p\n", rtcb); + sinfo("From TCB=%p\n", rtcb); /* Merge the g_pendingtasks list into the ready-to-run task list */ diff --git a/arch/mips/src/mips32/up_reprioritizertr.c b/arch/mips/src/mips32/up_reprioritizertr.c index 3365f8862e23d529c580e296abfe3b74c5b87429..22a204d58bafd42d472bfbe288d13475e5836f01 100644 --- a/arch/mips/src/mips32/up_reprioritizertr.c +++ b/arch/mips/src/mips32/up_reprioritizertr.c @@ -97,7 +97,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) struct tcb_s *rtcb = this_task(); bool switch_needed; - slldbg("TCB=%p PRI=%d\n", tcb, priority); + sinfo("TCB=%p PRI=%d\n", tcb, priority); /* Remove the tcb task from the ready-to-run list. * sched_removereadytorun will return true if we just diff --git a/arch/mips/src/mips32/up_schedulesigaction.c b/arch/mips/src/mips32/up_schedulesigaction.c index 1c8612ffd9396f65996b06d3c750d395dfc12bf6..e44384c5aa5f993d908d46905465245344e476f4 100644 --- a/arch/mips/src/mips32/up_schedulesigaction.c +++ b/arch/mips/src/mips32/up_schedulesigaction.c @@ -95,7 +95,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) irqstate_t flags; uint32_t status; - sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver); + sinfo("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver); /* Make sure that interrupts are disabled */ @@ -109,7 +109,8 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * being delivered to the currently executing task. */ - sdbg("rtcb=0x%p g_current_regs=0x%p\n", this_task(), g_current_regs); + sinfo("rtcb=0x%p g_current_regs=0x%p\n", + this_task(), g_current_regs); if (tcb == this_task()) { @@ -163,7 +164,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) up_savestate(tcb->xcp.regs); - svdbg("PC/STATUS Saved: %08x/%08x New: %08x/%08x\n", + sinfo("PC/STATUS Saved: %08x/%08x New: %08x/%08x\n", tcb->xcp.saved_epc, tcb->xcp.saved_status, g_current_regs[REG_EPC], g_current_regs[REG_STATUS]); } @@ -196,7 +197,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) status |= CP0_STATUS_IM_SWINTS; tcb->xcp.regs[REG_STATUS] = status; - svdbg("PC/STATUS Saved: %08x/%08x New: %08x/%08x\n", + sinfo("PC/STATUS Saved: %08x/%08x New: %08x/%08x\n", tcb->xcp.saved_epc, tcb->xcp.saved_status, tcb->xcp.regs[REG_EPC], tcb->xcp.regs[REG_STATUS]); } diff --git a/arch/mips/src/mips32/up_sigdeliver.c b/arch/mips/src/mips32/up_sigdeliver.c index a841a941b812b54fd562a541c20d124e1248f868..bf8f8e170820e9635a1169fe5dc065952b2d6798 100644 --- a/arch/mips/src/mips32/up_sigdeliver.c +++ b/arch/mips/src/mips32/up_sigdeliver.c @@ -96,7 +96,7 @@ void up_sigdeliver(void) board_autoled_on(LED_SIGNAL); - sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", + sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); ASSERT(rtcb->xcp.sigdeliver != NULL); @@ -127,7 +127,7 @@ void up_sigdeliver(void) * errno that is needed by the user logic (it is probably EINTR). */ - svdbg("Resuming EPC: %08x STATUS: %08x\n", regs[REG_EPC], regs[REG_STATUS]); + sinfo("Resuming EPC: %08x STATUS: %08x\n", regs[REG_EPC], regs[REG_STATUS]); (void)up_irq_save(); rtcb->pterrno = saved_errno; diff --git a/arch/mips/src/mips32/up_swint0.c b/arch/mips/src/mips32/up_swint0.c index 1d335b179241a209162fd9d5f65c2146c223067c..95638c8c08723c15a489cba79f3b1246bd809eb9 100644 --- a/arch/mips/src/mips32/up_swint0.c +++ b/arch/mips/src/mips32/up_swint0.c @@ -52,32 +52,6 @@ #include "up_internal.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Configuration ************************************************************/ - -/* Debug ********************************************************************/ -/* Debug output from this file may interfere with context switching! To get - * debug output you must enabled the following in your NuttX configuration: - * - * CONFIG_DEBUG and CONFIG_DEBUG_SYSCALL - */ - -#ifdef CONFIG_DEBUG_SYSCALL -# define swidbg(format, ...) lldbg(format, ##__VA_ARGS__) -#else -# define swidbg(x...) -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -86,28 +60,28 @@ * Name: up_registerdump ****************************************************************************/ -#ifdef CONFIG_DEBUG_SYSCALL +#ifdef CONFIG_DEBUG_SYSCALL_INFO static void up_registerdump(const uint32_t *regs) { - swidbg("MFLO:%08x MFHI:%08x EPC:%08x STATUS:%08x\n", - regs[REG_MFLO], regs[REG_MFHI], regs[REG_EPC], regs[REG_STATUS]); - swidbg("AT:%08x V0:%08x V1:%08x A0:%08x A1:%08x A2:%08x A3:%08x\n", - regs[REG_AT], regs[REG_V0], regs[REG_V1], regs[REG_A0], - regs[REG_A1], regs[REG_A2], regs[REG_A3]); - swidbg("T0:%08x T1:%08x T2:%08x T3:%08x T4:%08x T5:%08x T6:%08x T7:%08x\n", - regs[REG_T0], regs[REG_T1], regs[REG_T2], regs[REG_T3], - regs[REG_T4], regs[REG_T5], regs[REG_T6], regs[REG_T7]); - swidbg("S0:%08x S1:%08x S2:%08x S3:%08x S4:%08x S5:%08x S6:%08x S7:%08x\n", - regs[REG_S0], regs[REG_S1], regs[REG_S2], regs[REG_S3], - regs[REG_S4], regs[REG_S5], regs[REG_S6], regs[REG_S7]); + svcinfo("MFLO:%08x MFHI:%08x EPC:%08x STATUS:%08x\n", + regs[REG_MFLO], regs[REG_MFHI], regs[REG_EPC], regs[REG_STATUS]); + svcinfo("AT:%08x V0:%08x V1:%08x A0:%08x A1:%08x A2:%08x A3:%08x\n", + regs[REG_AT], regs[REG_V0], regs[REG_V1], regs[REG_A0], + regs[REG_A1], regs[REG_A2], regs[REG_A3]); + svcinfo("T0:%08x T1:%08x T2:%08x T3:%08x T4:%08x T5:%08x T6:%08x T7:%08x\n", + regs[REG_T0], regs[REG_T1], regs[REG_T2], regs[REG_T3], + regs[REG_T4], regs[REG_T5], regs[REG_T6], regs[REG_T7]); + svcinfo("S0:%08x S1:%08x S2:%08x S3:%08x S4:%08x S5:%08x S6:%08x S7:%08x\n", + regs[REG_S0], regs[REG_S1], regs[REG_S2], regs[REG_S3], + regs[REG_S4], regs[REG_S5], regs[REG_S6], regs[REG_S7]); #ifdef MIPS32_SAVE_GP - swidbg("T8:%08x T9:%08x GP:%08x SP:%08x FP:%08x RA:%08x\n", - regs[REG_T8], regs[REG_T9], regs[REG_GP], regs[REG_SP], - regs[REG_FP], regs[REG_RA]); + svcinfo("T8:%08x T9:%08x GP:%08x SP:%08x FP:%08x RA:%08x\n", + regs[REG_T8], regs[REG_T9], regs[REG_GP], regs[REG_SP], + regs[REG_FP], regs[REG_RA]); #else - swidbg("T8:%08x T9:%08x SP:%08x FP:%08x RA:%08x\n", - regs[REG_T8], regs[REG_T9], regs[REG_SP], regs[REG_FP], - regs[REG_RA]); + svcinfo("T8:%08x T9:%08x SP:%08x FP:%08x RA:%08x\n", + regs[REG_T8], regs[REG_T9], regs[REG_SP], regs[REG_FP], + regs[REG_RA]); #endif } #else @@ -167,8 +141,8 @@ int up_swint0(int irq, FAR void *context) * arguments depending on the system call. */ -#ifdef CONFIG_DEBUG_SYSCALL - swidbg("Entry: regs: %p cmd: %d\n", regs, regs[REG_R4]); +#ifdef CONFIG_DEBUG_SYSCALL_INFO + svcinfo("Entry: regs: %p cmd: %d\n", regs, regs[REG_R4]); up_registerdump(regs); #endif @@ -289,7 +263,7 @@ int up_swint0(int irq, FAR void *context) g_current_regs[REG_R0] -= CONFIG_SYS_RESERVED; #else - slldbg("ERROR: Bad SYS call: %d\n", regs[REG_A0]); + svcerr("ERROR: Bad SYS call: %d\n", regs[REG_A0]); #endif } break; @@ -297,15 +271,15 @@ int up_swint0(int irq, FAR void *context) /* Report what happened. That might difficult in the case of a context switch */ -#ifdef CONFIG_DEBUG_SYSCALL +#ifdef CONFIG_DEBUG_SYSCALL_INFO if (regs != g_current_regs) { - swidbg("SWInt Return: Context switch!\n"); + svcinfo("SWInt Return: Context switch!\n"); up_registerdump((const uint32_t *)g_current_regs); } else { - swidbg("SWInt Return: %d\n", regs[REG_V0]); + svcinfo("SWInt Return: %d\n", regs[REG_V0]); } #endif diff --git a/arch/mips/src/mips32/up_vfork.c b/arch/mips/src/mips32/up_vfork.c index dda54ae1799ccceb613dcdbbb787e45463d04edf..06b79f7bb13743527e02a91b7ccaa3378aa338e6 100644 --- a/arch/mips/src/mips32/up_vfork.c +++ b/arch/mips/src/mips32/up_vfork.c @@ -123,26 +123,26 @@ pid_t up_vfork(const struct vfork_s *context) uint32_t stackutil; int ret; - svdbg("s0:%08x s1:%08x s2:%08x s3:%08x s4:%08x\n", + sinfo("s0:%08x s1:%08x s2:%08x s3:%08x s4:%08x\n", context->s0, context->s1, context->s2, context->s3, context->s4); #ifdef CONFIG_MIPS32_FRAMEPOINTER - svdbg("s5:%08x s6:%08x s7:%08x\n", + sinfo("s5:%08x s6:%08x s7:%08x\n", context->s5, context->s6, context->s7); #ifdef MIPS32_SAVE_GP - svdbg("fp:%08x sp:%08x ra:%08x gp:%08x\n", + sinfo("fp:%08x sp:%08x ra:%08x gp:%08x\n", context->fp, context->sp, context->ra, context->gp); #else - svdbg("fp:%08x sp:%08x ra:%08x\n", + sinfo("fp:%08x sp:%08x ra:%08x\n", context->fp context->sp, context->ra); #endif #else - svdbg("s5:%08x s6:%08x s7:%08x s8:%08x\n", + sinfo("s5:%08x s6:%08x s7:%08x s8:%08x\n", context->s5, context->s6, context->s7, context->s8); #ifdef MIPS32_SAVE_GP - svdbg("sp:%08x ra:%08x gp:%08x\n", + sinfo("sp:%08x ra:%08x gp:%08x\n", context->sp, context->ra, context->gp); #else - svdbg("sp:%08x ra:%08x\n", + sinfo("sp:%08x ra:%08x\n", context->sp, context->ra); #endif #endif @@ -152,11 +152,11 @@ pid_t up_vfork(const struct vfork_s *context) child = task_vforksetup((start_t)context->ra); if (!child) { - sdbg("task_vforksetup failed\n"); + sinfo("task_vforksetup failed\n"); return (pid_t)ERROR; } - svdbg("Parent=%p Child=%p\n", parent, child); + sinfo("Parent=%p Child=%p\n", parent, child); /* Get the size of the parent task's stack. Due to alignment operations, * the adjusted stack size may be smaller than the stack size originally @@ -171,7 +171,7 @@ pid_t up_vfork(const struct vfork_s *context) parent->flags & TCB_FLAG_TTYPE_MASK); if (ret != OK) { - sdbg("up_create_stack failed: %d\n", ret); + serr("ERROR: up_create_stack failed: %d\n", ret); task_vforkabort(child, -ret); return (pid_t)ERROR; } @@ -185,7 +185,7 @@ pid_t up_vfork(const struct vfork_s *context) DEBUGASSERT((uint32_t)parent->adj_stack_ptr > context->sp); stackutil = (uint32_t)parent->adj_stack_ptr - context->sp; - svdbg("stacksize:%d stackutil:%d\n", stacksize, stackutil); + sinfo("stacksize:%d stackutil:%d\n", stacksize, stackutil); /* Make some feeble effort to perserve the stack contents. This is * feeble because the stack surely contains invalid pointers and other @@ -211,14 +211,14 @@ pid_t up_vfork(const struct vfork_s *context) newfp = context->fp; } - svdbg("Old stack base:%08x SP:%08x FP:%08x\n", + sinfo("Old stack base:%08x SP:%08x FP:%08x\n", parent->adj_stack_ptr, context->sp, context->fp); - svdbg("New stack base:%08x SP:%08x FP:%08x\n", + sinfo("New stack base:%08x SP:%08x FP:%08x\n", child->cmn.adj_stack_ptr, newsp, newfp); #else - svdbg("Old stack base:%08x SP:%08x\n", + sinfo("Old stack base:%08x SP:%08x\n", parent->adj_stack_ptr, context->sp); - svdbg("New stack base:%08x SP:%08x\n", + sinfo("New stack base:%08x SP:%08x\n", child->cmn.adj_stack_ptr, newsp); #endif diff --git a/arch/mips/src/pic32mx/Kconfig b/arch/mips/src/pic32mx/Kconfig index 3da65ead3598a6c60683627b169b5379b85e1635..366c50fdf5e888a975c145c5f1804ba5c8127c45 100644 --- a/arch/mips/src/pic32mx/Kconfig +++ b/arch/mips/src/pic32mx/Kconfig @@ -1034,11 +1034,11 @@ config PIC32MX_SPI_ENHBUF config PIC32MX_SPI_REGDEBUG bool "SPI Register level debug" - depends on DEBUG + depends on DEBUG_INFO default n ---help--- Output detailed register-level SPI device debug information. - Requires also DEBUG. + Requires also CONFIG_DEBUG_FEATURES. endmenu # SPI Driver Configuration @@ -1097,9 +1097,9 @@ config NET_WOL config NET_REGDEBUG bool "Register level debug" default n - depends on PIC32MX_ETHERNET && DEBUG + depends on PIC32MX_ETHERNET && DEBUG_NET_INFO ---help--- - Enabled low level register debug. Also needs DEBUG. + Enabled low level register debug. Also needs CONFIG_DEBUG_FEATURES. config NET_HASH bool "Hash" diff --git a/arch/mips/src/pic32mx/pic32mx-ethernet.c b/arch/mips/src/pic32mx/pic32mx-ethernet.c index eae7719bd41b0c9f2c9e0e36805b3b502ac56aad..8578977b3b47787426e46a78ecf04238595d9cfe 100644 --- a/arch/mips/src/pic32mx/pic32mx-ethernet.c +++ b/arch/mips/src/pic32mx/pic32mx-ethernet.c @@ -141,20 +141,11 @@ #define PIC32MX_NBUFFERS (CONFIG_NET_NRXDESC + CONFIG_NET_NTXDESC + 1) /* Debug Configuration *****************************************************/ -/* Register/Descriptor debug -- can only happen of CONFIG_DEBUG is selected. - * This will probably generate much more output than you care to see. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_NET_REGDEBUG -# undef CONFIG_NET_DESCDEBUG -#endif - /* CONFIG_NET_DUMPPACKET will dump the contents of each packet to the * console. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_NET_DUMPPACKET #endif @@ -319,9 +310,9 @@ struct pic32mx_driver_s sq_queue_t pd_freebuffers; /* The free buffer list */ - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ - struct net_driver_s pd_dev; /* Interface understood by uIP */ + struct net_driver_s pd_dev; /* Interface understood by the network */ /* Descriptors and packet buffers */ @@ -447,7 +438,7 @@ static void pic32mx_ethreset(struct pic32mx_driver_s *priv); #ifdef CONFIG_NET_REGDEBUG static void pic32mx_printreg(uint32_t addr, uint32_t val, bool iswrite) { - lldbg("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val); + ninfo("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val); } #endif @@ -497,7 +488,7 @@ static void pic32mx_checkreg(uint32_t addr, uint32_t val, bool iswrite) { /* No.. More than one. */ - lldbg("[repeats %d more times]\n", count); + ninfo("[repeats %d more times]\n", count); } } @@ -576,12 +567,12 @@ static void pic32mx_putreg(uint32_t val, uint32_t addr) #ifdef CONFIG_NET_DESCDEBUG static void pic32mx_dumptxdesc(struct pic32mx_txdesc_s *txdesc, const char *msg) { - lldbg("TX Descriptor [%p]: %s\n", txdesc, msg); - lldbg(" status: %08x\n", txdesc->status); - lldbg(" address: %08x [%08x]\n", txdesc->address, VIRT_ADDR(txdesc->address)); - lldbg(" tsv1: %08x\n", txdesc->tsv1); - lldbg(" tsv2: %08x\n", txdesc->tsv2); - lldbg(" nexted: %08x [%08x]\n", txdesc->nexted, VIRT_ADDR(txdesc->nexted)); + ninfo("TX Descriptor [%p]: %s\n", txdesc, msg); + ninfo(" status: %08x\n", txdesc->status); + ninfo(" address: %08x [%08x]\n", txdesc->address, VIRT_ADDR(txdesc->address)); + ninfo(" tsv1: %08x\n", txdesc->tsv1); + ninfo(" tsv2: %08x\n", txdesc->tsv2); + ninfo(" nexted: %08x [%08x]\n", txdesc->nexted, VIRT_ADDR(txdesc->nexted)); } #endif @@ -603,12 +594,12 @@ static void pic32mx_dumptxdesc(struct pic32mx_txdesc_s *txdesc, const char *msg) #ifdef CONFIG_NET_DESCDEBUG static void pic32mx_dumprxdesc(struct pic32mx_rxdesc_s *rxdesc, const char *msg) { - lldbg("RX Descriptor [%p]: %s\n", rxdesc, msg); - lldbg(" status: %08x\n", rxdesc->status); - lldbg(" address: %08x [%08x]\n", rxdesc->address, VIRT_ADDR(rxdesc->address)); - lldbg(" rsv1: %08x\n", rxdesc->rsv1); - lldbg(" rsv2: %08x\n", rxdesc->rsv2); - lldbg(" nexted: %08x [%08x]\n", rxdesc->nexted, VIRT_ADDR(rxdesc->nexted)); + ninfo("RX Descriptor [%p]: %s\n", rxdesc, msg); + ninfo(" status: %08x\n", rxdesc->status); + ninfo(" address: %08x [%08x]\n", rxdesc->address, VIRT_ADDR(rxdesc->address)); + ninfo(" rsv1: %08x\n", rxdesc->rsv1); + ninfo(" rsv2: %08x\n", rxdesc->rsv2); + ninfo(" nexted: %08x [%08x]\n", rxdesc->nexted, VIRT_ADDR(rxdesc->nexted)); } #endif @@ -1024,7 +1015,7 @@ static int pic32mx_transmit(struct pic32mx_driver_s *priv) /* Find the next available TX descriptor. We are guaranteed that is will * not fail by upstream logic that assures that a TX packet is available - * before polling uIP. + * before polling the network. */ txdesc = pic32mx_txdesc(priv); @@ -1080,8 +1071,9 @@ static int pic32mx_transmit(struct pic32mx_driver_s *priv) * Function: pic32mx_txpoll * * Description: - * The transmitter is available, check if uIP has any outgoing packets ready - * to send. This is a callback from devif_poll(). devif_poll() may be called: + * The transmitter is available, check if the network has any outgoing + * packets ready to send. This is a callback from devif_poll(). + * devif_poll() may be called: * * 1. When the preceding TX packet send is complete, * 2. When the preceding TX packet send timesout and the interface is reset @@ -1172,7 +1164,7 @@ static int pic32mx_txpoll(struct net_driver_s *dev) * Function: pic32mx_poll * * Description: - * Perform the uIP poll. + * Perform the network poll. * * Parameters: * priv - Reference to the driver state structure @@ -1220,7 +1212,7 @@ static void pic32mx_poll(struct pic32mx_driver_s *priv) * Function: pic32mx_timerpoll * * Description: - * Perform the uIP timer poll. + * Perform the network timer poll. * * Parameters: * priv - Reference to the driver state structure @@ -1365,7 +1357,8 @@ static void pic32mx_rxdone(struct pic32mx_driver_s *priv) if ((rxdesc->rsv2 & RXDESC_RSV2_OK) == 0) { - nlldbg("ERROR. rsv1: %08x rsv2: %08x\n", rxdesc->rsv1, rxdesc->rsv2); + nerr("ERROR. rsv1: %08x rsv2: %08x\n", + rxdesc->rsv1, rxdesc->rsv2); NETDEV_RXERRORS(&priv->pd_dev); pic32mx_rxreturn(rxdesc); } @@ -1378,8 +1371,8 @@ static void pic32mx_rxdone(struct pic32mx_driver_s *priv) else if (priv->pd_dev.d_len > CONFIG_NET_ETH_MTU) { - nlldbg("Too big. packet length: %d rxdesc: %08x\n", - priv->pd_dev.d_len, rxdesc->status); + nerr("ERROR: Too big. packet length: %d rxdesc: %08x\n", + priv->pd_dev.d_len, rxdesc->status); NETDEV_RXERRORS(&priv->pd_dev); pic32mx_rxreturn(rxdesc); } @@ -1389,7 +1382,8 @@ static void pic32mx_rxdone(struct pic32mx_driver_s *priv) else if ((rxdesc->status & (RXDESC_STATUS_EOP | RXDESC_STATUS_SOP)) != (RXDESC_STATUS_EOP | RXDESC_STATUS_SOP)) { - nlldbg("Fragment. packet length: %d rxdesc: %08x\n", priv->pd_dev.d_len, rxdesc->status); + nerr("ERROR: Fragment. packet length: %d rxdesc: %08x\n", + priv->pd_dev.d_len, rxdesc->status); NETDEV_RXFRAGMENTS(&priv->pd_dev); pic32mx_rxreturn(rxdesc); } @@ -1427,7 +1421,7 @@ static void pic32mx_rxdone(struct pic32mx_driver_s *priv) #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); NETDEV_RXIPV4(&priv->pd_dev); /* Handle ARP on input then give the IPv4 packet to the network @@ -1469,7 +1463,7 @@ static void pic32mx_rxdone(struct pic32mx_driver_s *priv) #ifdef CONFIG_NET_IPv6 if (BUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); NETDEV_RXIPV6(&priv->pd_dev); /* Give the IPv6 packet to the network layer */ @@ -1528,7 +1522,8 @@ static void pic32mx_rxdone(struct pic32mx_driver_s *priv) { /* Unrecognized... drop it. */ - nlldbg("Unrecognized packet type dropped: %04x\n", ntohs(BUF->type)); + nerr("ERROR: Unrecognized packet type dropped: %04x\n", + ntohs(BUF->type)); NETDEV_RXDROPPED(&priv->pd_dev); } @@ -1634,11 +1629,11 @@ static void pic32mx_txdone(struct pic32mx_driver_s *priv) pic32mx_putreg(priv->pd_inten, PIC32MX_ETH_IEN); } - /* Otherwise poll uIP for new XMIT data */ + /* Otherwise poll the network for new XMIT data */ else { - /* Perform the uIP poll */ + /* Perform the network poll */ pic32mx_poll(priv); } @@ -1690,7 +1685,7 @@ static int pic32mx_interrupt(int irq, void *context) if ((status & ETH_INT_RXOVFLW) != 0) { - nlldbg("RX Overrun. status: %08x\n", status); + nerr("ERROR: RX Overrun. status: %08x\n", status); NETDEV_RXERRORS(&priv->pd_dev); } @@ -1701,7 +1696,7 @@ static int pic32mx_interrupt(int irq, void *context) if ((status & ETH_INT_RXBUFNA) != 0) { - nlldbg("RX buffer descriptor overrun. status: %08x\n", status); + nerr("ERROR: RX buffer descriptor overrun. status: %08x\n", status); NETDEV_RXERRORS(&priv->pd_dev); } @@ -1712,7 +1707,7 @@ static int pic32mx_interrupt(int irq, void *context) if ((status & ETH_INT_RXBUSE) != 0) { - nlldbg("RX BVCI bus error. status: %08x\n", status); + nerr("ERROR: RX BVCI bus error. status: %08x\n", status); NETDEV_RXERRORS(&priv->pd_dev); } @@ -1755,7 +1750,7 @@ static int pic32mx_interrupt(int irq, void *context) if ((status & ETH_INT_TXABORT) != 0) { - nlldbg("TX abort. status: %08x\n", status); + nerr("ERROR: TX abort. status: %08x\n", status); NETDEV_TXERRORS(&priv->pd_dev); } @@ -1766,7 +1761,7 @@ static int pic32mx_interrupt(int irq, void *context) if ((status & ETH_INT_TXBUSE) != 0) { - nlldbg("TX BVCI bus error. status: %08x\n", status); + nerr("ERROR: TX BVCI bus error. status: %08x\n", status); NETDEV_TXERRORS(&priv->pd_dev); } @@ -1848,7 +1843,7 @@ static void pic32mx_txtimeout(int argc, uint32_t arg, ...) (void)pic32mx_ifup(&priv->pd_dev); - /* Then poll uIP for new XMIT data (We are guaranteed to have a free + /* Then poll the network for new XMIT data (We are guaranteed to have a free * buffer here). */ @@ -1884,7 +1879,7 @@ static void pic32mx_polltimer(int argc, uint32_t arg, ...) if (pic32mx_txdesc(priv) != NULL) { - /* If so, update TCP timing states and poll uIP for new XMIT data. Hmmm.. + /* If so, update TCP timing states and poll the network for new XMIT data. Hmmm.. * might be bug here. Does this mean if there is a transmit in progress, * we will missing TCP time state updates? */ @@ -1920,9 +1915,9 @@ static int pic32mx_ifup(struct net_driver_s *dev) uint32_t regval; int ret; - ndbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); /* Reset the Ethernet controller (again) */ @@ -2010,7 +2005,7 @@ static int pic32mx_ifup(struct net_driver_s *dev) ret = pic32mx_phyinit(priv); if (ret != 0) { - ndbg("pic32mx_phyinit failed: %d\n", ret); + nerr("ERROR: pic32mx_phyinit failed: %d\n", ret); return ret; } @@ -2281,7 +2276,7 @@ static int pic32mx_txavail(struct net_driver_s *dev) if (pic32mx_txdesc(priv) != NULL) { - /* If so, then poll uIP for new XMIT data. First allocate a buffer + /* If so, then poll the network for new XMIT data. First allocate a buffer * to perform the poll */ @@ -2372,14 +2367,14 @@ static int pic32mx_rmmac(struct net_driver_s *dev, const uint8_t *mac) #if defined(CONFIG_NET_REGDEBUG) && defined(PIC32MX_HAVE_PHY) static void pic32mx_showmii(uint8_t phyaddr, const char *msg) { - dbg("PHY " PIC32MX_PHYNAME ": %s\n", msg); - dbg(" MCR: %04x\n", pic32mx_phyread(phyaddr, MII_MCR)); - dbg(" MSR: %04x\n", pic32mx_phyread(phyaddr, MII_MSR)); - dbg(" ADVERTISE: %04x\n", pic32mx_phyread(phyaddr, MII_ADVERTISE)); - dbg(" LPA: %04x\n", pic32mx_phyread(phyaddr, MII_LPA)); - dbg(" EXPANSION: %04x\n", pic32mx_phyread(phyaddr, MII_EXPANSION)); + ninfo("PHY " PIC32MX_PHYNAME ": %s\n", msg); + ninfo(" MCR: %04x\n", pic32mx_phyread(phyaddr, MII_MCR)); + ninfo(" MSR: %04x\n", pic32mx_phyread(phyaddr, MII_MSR)); + ninfo(" ADVERTISE: %04x\n", pic32mx_phyread(phyaddr, MII_ADVERTISE)); + ninfo(" LPA: %04x\n", pic32mx_phyread(phyaddr, MII_LPA)); + ninfo(" EXPANSION: %04x\n", pic32mx_phyread(phyaddr, MII_EXPANSION)); #ifdef CONFIG_ETH0_PHY_KS8721 - dbg(" 10BTCR: %04x\n", pic32mx_phyread(phyaddr, MII_KS8721_10BTCR)); + ninfo(" 10BTCR: %04x\n", pic32mx_phyread(phyaddr, MII_KS8721_10BTCR)); #endif } #endif @@ -2542,7 +2537,7 @@ static inline int pic32mx_phyreset(uint8_t phyaddr) } } - ndbg("Reset failed. MCR: %04x\n", phyreg); + nerr("ERROR: Reset failed. MCR: %04x\n", phyreg); return -ETIMEDOUT; } #endif @@ -2589,7 +2584,7 @@ static inline int pic32mx_phyautoneg(uint8_t phyaddr) } } - ndbg("Auto-negotiation failed. MSR: %04x\n", phyreg); + nerr("ERROR: Auto-negotiation failed. MSR: %04x\n", phyreg); return -ETIMEDOUT; } #endif @@ -2668,7 +2663,7 @@ static int pic32mx_phymode(uint8_t phyaddr, uint8_t mode) #endif } - ndbg("Link failed. MSR: %04x\n", phyreg); + nerr("ERROR: Link failed. MSR: %04x\n", phyreg); return -ETIMEDOUT; } #endif @@ -2737,7 +2732,7 @@ static inline int pic32mx_phyinit(struct pic32mx_driver_s *priv) ret = pic32mx_phyreset(phyaddr); if (ret < 0) { - ndbg("Failed to reset PHY at address %d\n", phyaddr); + nerr("ERROR: Failed to reset PHY at address %d\n", phyaddr); continue; } @@ -2750,12 +2745,12 @@ static inline int pic32mx_phyinit(struct pic32mx_driver_s *priv) */ phyreg = (unsigned int)pic32mx_phyread(phyaddr, MII_PHYID1); - nvdbg("Addr: %d PHY ID1: %04x\n", phyaddr, phyreg); + ninfo("Addr: %d PHY ID1: %04x\n", phyaddr, phyreg); if (phyreg == PIC32MX_PHYID1) { phyreg = pic32mx_phyread(phyaddr, MII_PHYID2); - nvdbg("Addr: %d PHY ID2: %04x\n", phyaddr, phyreg); + ninfo("Addr: %d PHY ID2: %04x\n", phyaddr, phyreg); if (phyreg == PIC32MX_PHYID2) { @@ -2770,10 +2765,10 @@ static inline int pic32mx_phyinit(struct pic32mx_driver_s *priv) { /* Failed to find PHY at any location */ - ndbg("No PHY detected\n"); + nerr("ERROR: No PHY detected\n"); return -ENODEV; } - nvdbg("phyaddr: %d\n", phyaddr); + ninfo("phyaddr: %d\n", phyaddr); /* Save the discovered PHY device address */ @@ -2874,7 +2869,7 @@ static inline int pic32mx_phyinit(struct pic32mx_driver_s *priv) priv->pd_mode = PIC32MX_100BASET_FD; break; default: - ndbg("Unrecognized mode: %04x\n", phyreg); + nerr("ERROR: Unrecognized mode: %04x\n", phyreg); return -ENODEV; } #elif defined(CONFIG_ETH0_PHY_DP83848C) @@ -2897,7 +2892,7 @@ static inline int pic32mx_phyinit(struct pic32mx_driver_s *priv) priv->pd_mode = PIC32MX_10BASET_FD; break; default: - ndbg("Unrecognized mode: %04x\n", phyreg); + nerr("ERROR: Unrecognized mode: %04x\n", phyreg); return -ENODEV; } #elif defined(CONFIG_ETH0_PHY_LAN8720) @@ -2942,7 +2937,7 @@ static inline int pic32mx_phyinit(struct pic32mx_driver_s *priv) } else { - ndbg("Unrecognized mode: %04x\n", phyreg); + nerr("ERROR: Unrecognized mode: %04x\n", phyreg); return -ENODEV; } } @@ -2950,9 +2945,9 @@ static inline int pic32mx_phyinit(struct pic32mx_driver_s *priv) # warning "PHY Unknown: speed and duplex are bogus" #endif - ndbg("%dBase-T %s duplex\n", - (priv->pd_mode & PIC32MX_SPEED_MASK) == PIC32MX_SPEED_100 ? 100 : 10, - (priv->pd_mode & PIC32MX_DUPLEX_MASK) == PIC32MX_DUPLEX_FULL ?"full" : "half"); + ninfo("%dBase-T %s duplex\n", + (priv->pd_mode & PIC32MX_SPEED_MASK) == PIC32MX_SPEED_100 ? 100 : 10, + (priv->pd_mode & PIC32MX_DUPLEX_MASK) == PIC32MX_DUPLEX_FULL ?"full" : "half"); /* Disable auto-configuration. Set the fixed speed/duplex mode. * (probably more than little redundant). diff --git a/arch/mips/src/pic32mx/pic32mx-exception.c b/arch/mips/src/pic32mx/pic32mx-exception.c index b5a058f3a6f4da1b0cb36e7e36e3ba0a21f8a828..86d8ddf133e12aee55960386108f3771208fc526 100644 --- a/arch/mips/src/pic32mx/pic32mx-exception.c +++ b/arch/mips/src/pic32mx/pic32mx-exception.c @@ -55,22 +55,6 @@ #include "pic32mx-int.h" #include "pic32mx.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -85,7 +69,7 @@ uint32_t *pic32mx_exception(uint32_t *regs) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES uint32_t cause; uint32_t epc; #endif @@ -96,98 +80,98 @@ uint32_t *pic32mx_exception(uint32_t *regs) board_autoled_on(LED_INIRQ); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Get the cause of the exception from the CAUSE register */ asm volatile("\tmfc0 %0,$13,0\n" : "=r"(cause)); asm volatile("\tmfc0 %0,$14,0\n" : "=r"(epc)); -#ifdef CONFIG_DEBUG_VERBOSE +#ifdef CONFIG_DEBUG_INFO switch (cause & CP0_CAUSE_EXCCODE_MASK) { case CP0_CAUSE_EXCCODE_INT: /* Interrupt */ - llvdbg("EXCEPTION: Interrupt" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Interrupt" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_TLBL: /* TLB exception (load or instruction fetch) */ - llvdbg("EXCEPTION: TLB exception (load or instruction fetch)" - " CAUSE: %08x EPC:%08x\n", cause, epc); + _alert("EXCEPTION: TLB exception (load or instruction fetch)" + " CAUSE: %08x EPC:%08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_TLBS: /* TLB exception (store) */ - llvdbg("EXCEPTION: TLB exception (store)" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: TLB exception (store)" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_ADEL: /* Address error exception (load or instruction fetch) */ - llvdbg("EXCEPTION: Address error exception (load or instruction fetch)" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Address error exception (load or instruction fetch)" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_ADES: /* Address error exception (store) */ - llvdbg("EXCEPTION: Address error exception (store)" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Address error exception (store)" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_IBE: /* Bus error exception (instruction fetch) */ - llvdbg("EXCEPTION: Bus error exception (instruction fetch)" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Bus error exception (instruction fetch)" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_DBE: /* Bus error exception (data reference: load or store) */ - llvdbg("EXCEPTION: Bus error exception (data reference: load or store)" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Bus error exception (data reference: load or store)" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_SYS: /* Syscall exception */ - llvdbg("EXCEPTION: Syscall exception" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Syscall exception" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_BP: /* Breakpoint exception */ - llvdbg("EXCEPTION: Breakpoint exception" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Breakpoint exception" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_RI: /* Reserved instruction exception */ - llvdbg("EXCEPTION: Reserved instruction exception" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Reserved instruction exception" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_CPU: /* Coprocessor Unusable exception */ - llvdbg("EXCEPTION: Coprocessor Unusable exception" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Coprocessor Unusable exception" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_OV: /* Arithmetic Overflow exception */ - llvdbg("EXCEPTION: Arithmetic Overflow exception" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Arithmetic Overflow exception" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_TR: /* Trap exception */ - llvdbg("EXCEPTION: Trap exception" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Trap exception" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_FPE: /* Floating point exception */ - llvdbg("EXCEPTION: Floating point exception" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Floating point exception" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_C2E: /* Precise Coprocessor 2 exceptions */ - llvdbg("EXCEPTION: Precise Coprocessor 2 exceptions" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Precise Coprocessor 2 exceptions" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_MDMX: /* MDMX Unusable (MIPS64) */ - llvdbg("EXCEPTION: MDMX Unusable (MIPS64)" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: MDMX Unusable (MIPS64)" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_WATCH: /* WatchHi/WatchLo address */ - llvdbg("EXCEPTION: WatchHi/WatchLo address" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: WatchHi/WatchLo address" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_MCHECK: /* Machine check */ - llvdbg("EXCEPTION: Machine check" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Machine check" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_CACHEERR: /* Cache error */ - llvdbg("EXCEPTION: Cache error" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Cache error" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; default: - llvdbg("EXCEPTION: Unknown" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Unknown" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; } #else - lldbg("EXCEPTION: CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: CAUSE: %08x EPC: %08x\n", cause, epc); #endif #endif diff --git a/arch/mips/src/pic32mx/pic32mx-gpio.c b/arch/mips/src/pic32mx/pic32mx-gpio.c index 78d9acca22a2536ae0d7814e7ba987fd0189b5ef..a672cb35e0212aeb3557e9a12dc6cf2b5d3ac4c7 100644 --- a/arch/mips/src/pic32mx/pic32mx-gpio.c +++ b/arch/mips/src/pic32mx/pic32mx-gpio.c @@ -303,7 +303,7 @@ bool pic32mx_gpioread(uint16_t pinset) * ****************************************************************************/ -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_GPIO) +#ifdef CONFIG_DEBUG_GPIO_INFO void pic32mx_dumpgpio(uint32_t pinset, const char *msg) { unsigned int port = pic32mx_portno(pinset); @@ -321,17 +321,17 @@ void pic32mx_dumpgpio(uint32_t pinset, const char *msg) /* The following requires exclusive access to the GPIO registers */ sched_lock(); - lldbg("IOPORT%c pinset: %04x base: %08x -- %s\n", - 'A'+port, pinset, base, msg); - lldbg(" TRIS: %08x PORT: %08x LAT: %08x ODC: %08x\n", - getreg32(base + PIC32MX_IOPORT_TRIS_OFFSET), - getreg32(base + PIC32MX_IOPORT_PORT_OFFSET), - getreg32(base + PIC32MX_IOPORT_LAT_OFFSET), - getreg32(base + PIC32MX_IOPORT_ODC_OFFSET)); - lldbg(" CNCON: %08x CNEN: %08x CNPUE: %08x\n", - getreg32(PIC32MX_IOPORT_CNCON), - getreg32(PIC32MX_IOPORT_CNEN), - getreg32(PIC32MX_IOPORT_CNPUE)); + gpioinfo("IOPORT%c pinset: %04x base: %08x -- %s\n", + 'A'+port, pinset, base, msg); + gpioinfo(" TRIS: %08x PORT: %08x LAT: %08x ODC: %08x\n", + getreg32(base + PIC32MX_IOPORT_TRIS_OFFSET), + getreg32(base + PIC32MX_IOPORT_PORT_OFFSET), + getreg32(base + PIC32MX_IOPORT_LAT_OFFSET), + getreg32(base + PIC32MX_IOPORT_ODC_OFFSET)); + gpioinfo(" CNCON: %08x CNEN: %08x CNPUE: %08x\n", + getreg32(PIC32MX_IOPORT_CNCON), + getreg32(PIC32MX_IOPORT_CNEN), + getreg32(PIC32MX_IOPORT_CNPUE)); sched_unlock(); } } diff --git a/arch/mips/src/pic32mx/pic32mx-serial.c b/arch/mips/src/pic32mx/pic32mx-serial.c index 590c5998a159fd0a664fb7769cafe5594d9af799..ebd20cdfddab3ce5f38abeca780ffc54fb801ada 100644 --- a/arch/mips/src/pic32mx/pic32mx-serial.c +++ b/arch/mips/src/pic32mx/pic32mx-serial.c @@ -494,14 +494,14 @@ static int up_interrupt(int irq, void *context) * - Overflow condition for the receive buffer OERR (UxSTA bit 1) occurs */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (up_pending_irq(priv->irqe)) { /* Clear the pending error interrupt */ up_clrpend_irq(priv->irqe); - lldbg("ERROR: interrupt STA: %08x\n", - up_serialin(priv, PIC32MX_UART_STA_OFFSET)); + _err("ERROR: interrupt STA: %08x\n", + up_serialin(priv, PIC32MX_UART_STA_OFFSET)); handled = true; } #endif @@ -700,7 +700,7 @@ static void up_rxint(struct uart_dev_s *dev, bool enable) */ #ifndef CONFIG_SUPPRESS_SERIAL_INTS -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES up_enable_irq(priv->irqe); #endif up_enable_irq(priv->irqrx); @@ -709,7 +709,7 @@ static void up_rxint(struct uart_dev_s *dev, bool enable) } else { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES up_disable_irq(priv->irqe); #endif up_disable_irq(priv->irqrx); diff --git a/arch/mips/src/pic32mx/pic32mx-spi.c b/arch/mips/src/pic32mx/pic32mx-spi.c index 44e79d6b48492d3ebdfb922e037690ff0538aa4d..2489f671c45c5f03acbc0efe0dd7674c56642b6d 100644 --- a/arch/mips/src/pic32mx/pic32mx-spi.c +++ b/arch/mips/src/pic32mx/pic32mx-spi.c @@ -72,20 +72,6 @@ # error CONFIG_SPI_EXCHANGE not supported by this driver #endif -/* Debug */ - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - /**************************************************************************** * Private Types ****************************************************************************/ @@ -329,7 +315,7 @@ static uint32_t spi_getreg(FAR struct pic32mx_dev_s *priv, unsigned int offset) { if (count == 4) { - lldbg("...\n"); + _info("...\n"); } return value; } @@ -345,7 +331,7 @@ static uint32_t spi_getreg(FAR struct pic32mx_dev_s *priv, unsigned int offset) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + _info("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -357,7 +343,7 @@ static uint32_t spi_getreg(FAR struct pic32mx_dev_s *priv, unsigned int offset) /* Show the register value read */ - lldbg("%08x->%08x\n", addr, value); + _info("%08x->%08x\n", addr, value); return value; } #else @@ -395,7 +381,7 @@ static void spi_putreg(FAR struct pic32mx_dev_s *priv, unsigned int offset, /* Show the register value being written */ - lldbg("%08x<-%08x\n", addr, value); + _info("%08x<-%08x\n", addr, value); /* Then do the write */ @@ -476,7 +462,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) uint32_t actual; uint32_t regval; - spivdbg("Old frequency: %d actual: %d New frequency: %d\n", + spiinfo("Old frequency: %d actual: %d New frequency: %d\n", priv->frequency, priv->actual, frequency); /* Check if the requested frequency is the same as the frequency selection */ @@ -511,7 +497,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) /* Save the new BRG value */ spi_putreg(priv, PIC32MX_SPI_BRG_OFFSET, regval); - spivdbg("PBCLOCK: %d frequency: %d divisor: %d BRG: %d\n", + spiinfo("PBCLOCK: %d frequency: %d divisor: %d BRG: %d\n", BOARD_PBCLOCK, frequency, divisor, regval); /* Calculate the new actual frequency. @@ -526,7 +512,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) priv->frequency = frequency; priv->actual = actual; - spidbg("New frequency: %d Actual: %d\n", frequency, actual); + spiinfo("New frequency: %d Actual: %d\n", frequency, actual); return actual; } @@ -550,7 +536,7 @@ static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode) FAR struct pic32mx_dev_s *priv = (FAR struct pic32mx_dev_s *)dev; uint32_t regval; - spivdbg("Old mode: %d New mode: %d\n", priv->mode, mode); + spiinfo("Old mode: %d New mode: %d\n", priv->mode, mode); /* Has the mode changed? */ @@ -612,7 +598,7 @@ static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode) } spi_putreg(priv, PIC32MX_SPI_CON_OFFSET, regval); - spivdbg("CON: %08x\n", regval); + spiinfo("CON: %08x\n", regval); /* Save the mode so that subsequent re-configuratins will be faster */ @@ -641,7 +627,7 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) uint32_t setting; uint32_t regval; - spivdbg("Old nbits: %d New nbits: %d\n", priv->nbits, nbits); + spiinfo("Old nbits: %d New nbits: %d\n", priv->nbits, nbits); /* Has the number of bits changed? */ @@ -665,7 +651,7 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) } else { - spidbg("Unsupported nbits: %d\n", nbits); + spierr("ERROR: Unsupported nbits: %d\n", nbits); return; } @@ -673,7 +659,7 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) regval &= ~SPI_CON_MODE_MASK; regval |= setting; regval = spi_getreg(priv, PIC32MX_SPI_CON_OFFSET); - spivdbg("CON: %08x\n", regval); + spiinfo("CON: %08x\n", regval); /* Save the selection so the subsequence re-configurations will be faster */ @@ -701,7 +687,7 @@ static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd) { FAR struct pic32mx_dev_s *priv = (FAR struct pic32mx_dev_s *)dev; - spivdbg("wd: %04x\n", wd); + spiinfo("wd: %04x\n", wd); /* Write the data to transmitted to the SPI Data Register */ @@ -754,7 +740,7 @@ static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size uint32_t regval; uint8_t data; - spivdbg("nwords: %d\n", nwords); + spiinfo("nwords: %d\n", nwords); while (nwords) { /* Write the data to transmitted to the SPI Data Register */ @@ -809,7 +795,7 @@ static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nw FAR struct pic32mx_dev_s *priv = (FAR struct pic32mx_dev_s *)dev; FAR uint8_t *ptr = (FAR uint8_t *)buffer; - spivdbg("nwords: %d\n", nwords); + spiinfo("nwords: %d\n", nwords); while (nwords) { /* Write some dummy data to the SPI Data Register in order to clock the @@ -864,7 +850,7 @@ FAR struct spi_dev_s *pic32mx_spibus_initialize(int port) irqstate_t flags; uint32_t regval; - spivdbg("port: %d\n", port); + spiinfo("port: %d\n", port); /* Select the SPI state structure for this port */ @@ -897,7 +883,7 @@ FAR struct spi_dev_s *pic32mx_spibus_initialize(int port) else #endif { - spidbg("Unsuppport port: %d\n", port); + spierr("ERROR: Unsuppport port: %d\n", port); return NULL; } @@ -926,7 +912,8 @@ FAR struct spi_dev_s *pic32mx_spibus_initialize(int port) ret = irq_attach(priv->vector, spi_interrupt); if (ret < 0) { - spidbg("Failed to attach vector: %d port: %d\n", priv->vector, port); + spierr("ERROR: Failed to attach vector: %d port: %d\n", + priv->vector, port); goto errout; } #endif @@ -952,7 +939,7 @@ FAR struct spi_dev_s *pic32mx_spibus_initialize(int port) regval |= (SPI_CON_ENHBUF | SPI_CON_RTXISEL_HALF | SPI_CON_STXISEL_HALF); #endif spi_putreg(priv, PIC32MX_SPI_CON_OFFSET, regval); - spivdbg("CON: %08x\n", regval); + spiinfo("CON: %08x\n", regval); /* Set the initial SPI configuration */ @@ -976,7 +963,7 @@ FAR struct spi_dev_s *pic32mx_spibus_initialize(int port) ret = up_prioritize_irq(priv->vector, CONFIG_PIC32MX_SPI_PRIORITY) if (ret < 0) { - spidbg("up_prioritize_irq failed: %d\n", ret); + spierr("ERROR: up_prioritize_irq failed: %d\n", ret); goto errout; } #endif diff --git a/arch/mips/src/pic32mx/pic32mx-usbdev.c b/arch/mips/src/pic32mx/pic32mx-usbdev.c index 00d9f240930d8cfdfe8883500ff9cbce4616d712..da5544580a9d700d7350cc19067a31b70cbcf94d 100644 --- a/arch/mips/src/pic32mx/pic32mx-usbdev.c +++ b/arch/mips/src/pic32mx/pic32mx-usbdev.c @@ -79,15 +79,6 @@ # define CONFIG_USBDEV_EP0_MAXSIZE 64 #endif -/* Extremely detailed register/BDT debug that you would normally never want - * enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_PIC32MX_USBDEV_REGDEBUG -# undef CONFIG_PIC32MX_USBDEV_BDTDEBUG -#endif - /* Disable this logic because it is buggy. It works most of the time but * has some lurking issues that keep this higher performance solution from * being usable. @@ -289,19 +280,17 @@ # undef CONFIG_PIC32MX_USBDEV_BDTDEBUG # define CONFIG_PIC32MX_USBDEV_BDTDEBUG 1 -# define regdbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define regvdbg lldbg -# else -# define regvdbg(x...) -# endif +# define regerr _err +# define regwarn _warn +# define reginfo _info #else # define pic32mx_getreg(addr) getreg16(addr) # define pic32mx_putreg(val,addr) putreg16(val,addr) -# define regdbg(x...) -# define regvdbg(x...) +# define regerr(x...) +# define regwarn(x...) +# define reginfo(x...) #endif @@ -309,17 +298,15 @@ #ifdef CONFIG_PIC32MX_USBDEV_BDTDEBUG -# define bdtdbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define bdtvdbg lldbg -# else -# define bdtvdbg(x...) -# endif +# define bdterr _err +# define bdtwarn _warn +# define bdtinfo _info #else -# define bdtdbg(x...) -# define bdtvdbg(x...) +# define bdterr(x...) +# define bdtwarn(x...) +# define bdtinfo(x...) #endif @@ -602,16 +589,13 @@ static volatile struct usbotg_bdtentry_s g_bdt[4*PIC32MX_NENDPOINTS] __attribute__ ((aligned(512))); /**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Private Functions + * Private Functions ****************************************************************************/ /**************************************************************************** * Register Operations ****************************************************************************/ + /**************************************************************************** * Name: pic32mx_getreg ****************************************************************************/ @@ -637,8 +621,9 @@ static uint16_t pic32mx_getreg(uint32_t addr) { if (count == 4) { - lldbg("...\n"); + reginfo("...\n"); } + return val; } } @@ -653,7 +638,7 @@ static uint16_t pic32mx_getreg(uint32_t addr) { /* Yes.. then show how many times the value repeated */ - lldbg("[repeats %d more times]\n", count-3); + reginfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -665,7 +650,7 @@ static uint16_t pic32mx_getreg(uint32_t addr) /* Show the register value read */ - lldbg("%08x->%04x\n", addr, val); + reginfo("%08x->%04x\n", addr, val); return val; } #endif @@ -679,7 +664,7 @@ static void pic32mx_putreg(uint16_t val, uint32_t addr) { /* Show the register value being written */ - lldbg("%08x<-%04x\n", addr, val); + reginfo("%08x<-%04x\n", addr, val); /* Write the value */ @@ -874,8 +859,8 @@ static void pic32mx_epwrite(struct pic32mx_ep_s *privep, /* And, finally, give the BDT to the USB */ - bdtdbg("EP%d BDT IN [%p] {%08x, %08x}\n", - USB_EPNO(privep->ep.eplog), bdt, status, bdt->addr); + bdtinfo("EP%d BDT IN [%p] {%08x, %08x}\n", + USB_EPNO(privep->ep.eplog), bdt, status, bdt->addr); bdt->status = status; } @@ -908,15 +893,15 @@ static void pic32mx_wrcomplete(struct pic32mx_usbdev_s *priv, epno = USB_EPNO(privep->ep.eplog); #ifdef CONFIG_USBDEV_NOWRITEAHEAD - ullvdbg("EP%d: len=%d xfrd=%d inflight=%d\n", - epno, privreq->req.len, privreq->req.xfrd, privreq->inflight[0]); + uinfo("EP%d: len=%d xfrd=%d inflight=%d\n", + epno, privreq->req.len, privreq->req.xfrd, privreq->inflight[0]); #else - ullvdbg("EP%d: len=%d xfrd=%d inflight={%d, %d}\n", - epno, privreq->req.len, privreq->req.xfrd, - privreq->inflight[0], privreq->inflight[1]); + uinfo("EP%d: len=%d xfrd=%d inflight={%d, %d}\n", + epno, privreq->req.len, privreq->req.xfrd, + privreq->inflight[0], privreq->inflight[1]); #endif - bdtdbg("EP%d BDT IN [%p] {%08x, %08x}\n", - epno, bdtin, bdtin->status, bdtin->addr); + bdtinfo("EP%d BDT IN [%p] {%08x, %08x}\n", + epno, bdtin, bdtin->status, bdtin->addr); /* We should own the BDT that just completed. But NULLify the entire BDT IN. * Why? So that we can tell later that the BDT available. No, it is not @@ -1224,8 +1209,8 @@ static int pic32mx_wrstart(struct pic32mx_usbdev_s *priv, bytesleft = privreq->req.len; } - ullvdbg("epno=%d req=%p: len=%d xfrd=%d index=%d nullpkt=%d\n", - epno, privreq, privreq->req.len, xfrd, index, privep->txnullpkt); + uinfo("epno=%d req=%p: len=%d xfrd=%d index=%d nullpkt=%d\n", + epno, privreq, privreq->req.len, xfrd, index, privep->txnullpkt); /* Get the number of bytes left to be sent in the packet */ @@ -1338,10 +1323,10 @@ static int pic32mx_rdcomplete(struct pic32mx_usbdev_s *priv, bdtout = privep->bdtout; epno = USB_EPNO(privep->ep.eplog); - ullvdbg("EP%d: len=%d xfrd=%d\n", - epno, privreq->req.len, privreq->req.xfrd); - bdtdbg("EP%d BDT OUT [%p] {%08x, %08x}\n", - epno, bdtout, bdtout->status, bdtout->addr); + uinfo("EP%d: len=%d xfrd=%d\n", + epno, privreq->req.len, privreq->req.xfrd); + bdtinfo("EP%d BDT OUT [%p] {%08x, %08x}\n", + epno, bdtout, bdtout->status, bdtout->addr); /* We should own the BDT that just completed */ @@ -1484,7 +1469,8 @@ static int pic32mx_ep0rdsetup(struct pic32mx_usbdev_s *priv, uint8_t *dest, /* Then give the BDT to the USB */ - bdtdbg("EP0 BDT OUT [%p] {%08x, %08x}\n", bdtout, status, bdtout->addr); + bdtinfo("EP0 BDT OUT [%p] {%08x, %08x}\n", + bdtout, status, bdtout->addr); bdtout->status = status; priv->ctrlstate = CTRLSTATE_RDREQUEST; @@ -1585,7 +1571,8 @@ static int pic32mx_rdsetup(struct pic32mx_ep_s *privep, uint8_t *dest, int readl /* Then give the BDT to the USB */ - bdtdbg("EP%d BDT OUT [%p] {%08x, %08x}\n", epno, bdtout, status, bdtout->addr); + bdtinfo("EP%d BDT OUT [%p] {%08x, %08x}\n", + epno, bdtout, status, bdtout->addr); bdtout->status = status; return OK; @@ -1626,7 +1613,7 @@ static int pic32mx_rdrequest(struct pic32mx_usbdev_s *priv, return OK; } - ullvdbg("EP%d: len=%d\n", USB_EPNO(privep->ep.eplog), privreq->req.len); + uinfo("EP%d: len=%d\n", USB_EPNO(privep->ep.eplog), privreq->req.len); /* Ignore any attempt to receive a zero length packet */ @@ -1915,8 +1902,8 @@ static void pic32mx_ep0setup(struct pic32mx_usbdev_s *priv) index.w = GETUINT16(priv->ctrl.index); len.w = GETUINT16(priv->ctrl.len); - ullvdbg("SETUP: type=%02x req=%02x value=%04x index=%04x len=%04x\n", - priv->ctrl.type, priv->ctrl.req, value.w, index.w, len.w); + uinfo("SETUP: type=%02x req=%02x value=%04x index=%04x len=%04x\n", + priv->ctrl.type, priv->ctrl.req, value.w, index.w, len.w); /* Dispatch any non-standard requests */ @@ -2159,7 +2146,7 @@ static void pic32mx_ep0setup(struct pic32mx_usbdev_s *priv) { /* Special case recipient=device test mode */ - ullvdbg("test mode: %d\n", index.w); + uinfo("test mode: %d\n", index.w); } else { @@ -2596,7 +2583,8 @@ static void pic32mx_ep0transfer(struct pic32mx_usbdev_s *priv, uint16_t ustat) bdt = &g_bdt[index]; priv->eplist[0].bdtout = bdt; - bdtdbg("EP0 BDT OUT [%p] {%08x, %08x}\n", bdt, bdt->status, bdt->addr); + bdtinfo("EP0 BDT OUT [%p] {%08x, %08x}\n", + bdt, bdt->status, bdt->addr); /* Check the current EP0 OUT buffer contains a SETUP packet */ @@ -2832,7 +2820,7 @@ static int pic32mx_interrupt(int irq, void *context) if ((usbir & USB_INT_UERR) != 0) { usbtrace(TRACE_INTDECODE(PIC32MX_TRACEINTID_UERR), usbir); - ulldbg("Error: EIR=%04x\n", pic32mx_getreg(PIC32MX_USB_EIR)); + uerr("ERROR: EIR=%04x\n", pic32mx_getreg(PIC32MX_USB_EIR)); /* Clear all pending USB error interrupts */ @@ -3148,11 +3136,11 @@ static int pic32mx_epconfigure(struct usbdev_ep_s *ep, bool bidi; int index; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !desc) { usbtrace(TRACE_DEVERROR(PIC32MX_TRACEERR_INVALIDPARMS), 0); - ulldbg("ERROR: ep=%p desc=%p\n"); + uerr("ERROR: ep=%p desc=%p\n"); return -EINVAL; } #endif @@ -3210,7 +3198,8 @@ static int pic32mx_epconfigure(struct usbdev_ep_s *ep, bdt->status = 0; bdt->addr = 0; - bdtdbg("EP%d BDT IN [%p] {%08x, %08x}\n", epno, bdt, bdt->status, bdt->addr); + bdtinfo("EP%d BDT IN [%p] {%08x, %08x}\n", + epno, bdt, bdt->status, bdt->addr); /* Now do the same for the other buffer. */ @@ -3218,7 +3207,8 @@ static int pic32mx_epconfigure(struct usbdev_ep_s *ep, bdt->status = 0; bdt->addr = 0; - bdtdbg("EP%d BDT IN [%p] {%08x, %08x}\n", epno, bdt, bdt->status, bdt->addr); + bdtinfo("EP%d BDT IN [%p] {%08x, %08x}\n", + epno, bdt, bdt->status, bdt->addr); } if (!epin || bidi) @@ -3232,7 +3222,8 @@ static int pic32mx_epconfigure(struct usbdev_ep_s *ep, bdt->status = 0; bdt->addr = 0; - bdtdbg("EP%d BDT OUT [%p] {%08x, %08x}\n", epno, bdt, bdt->status, bdt->addr); + bdtinfo("EP%d BDT OUT [%p] {%08x, %08x}\n", + epno, bdt, bdt->status, bdt->addr); /* Now do the same for the other buffer. */ @@ -3240,7 +3231,8 @@ static int pic32mx_epconfigure(struct usbdev_ep_s *ep, bdt->status = 0; bdt->addr = 0; - bdtdbg("EP%d BDT OUT [%p] {%08x, %08x}\n", epno, bdt, bdt->status, bdt->addr); + bdtinfo("EP%d BDT OUT [%p] {%08x, %08x}\n", + epno, bdt, bdt->status, bdt->addr); } /* Get the maxpacket size of the endpoint. */ @@ -3275,11 +3267,11 @@ static int pic32mx_epdisable(struct usbdev_ep_s *ep) int i; irqstate_t flags; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { usbtrace(TRACE_DEVERROR(PIC32MX_TRACEERR_INVALIDPARMS), 0); - ulldbg("ERROR: ep=%p\n", ep); + uerr("ERROR: ep=%p\n", ep); return -EINVAL; } #endif @@ -3319,7 +3311,7 @@ static struct usbdev_req_s *pic32mx_epallocreq(struct usbdev_ep_s *ep) { struct pic32mx_req_s *privreq; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { usbtrace(TRACE_DEVERROR(PIC32MX_TRACEERR_INVALIDPARMS), 0); @@ -3347,7 +3339,7 @@ static void pic32mx_epfreereq(struct usbdev_ep_s *ep, struct usbdev_req_s *req) { struct pic32mx_req_s *privreq = (struct pic32mx_req_s *)req; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !req) { usbtrace(TRACE_DEVERROR(PIC32MX_TRACEERR_INVALIDPARMS), 0); @@ -3372,11 +3364,12 @@ static int pic32mx_epsubmit(struct usbdev_ep_s *ep, struct usbdev_req_s *req) uint8_t epno; int ret = OK; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!req || !req->callback || !req->buf || !ep) { usbtrace(TRACE_DEVERROR(PIC32MX_TRACEERR_INVALIDPARMS), 0); - ulldbg("ERROR: req=%p callback=%p buf=%p ep=%p\n", req, req->callback, req->buf, ep); + uerr("ERROR: req=%p callback=%p buf=%p ep=%p\n", + req, req->callback, req->buf, ep); return -EINVAL; } #endif @@ -3384,11 +3377,11 @@ static int pic32mx_epsubmit(struct usbdev_ep_s *ep, struct usbdev_req_s *req) usbtrace(TRACE_EPSUBMIT, USB_EPNO(ep->eplog)); priv = privep->dev; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv->driver) { usbtrace(TRACE_DEVERROR(PIC32MX_TRACEERR_NOTCONFIGURED), priv->usbdev.speed); - ulldbg("ERROR: driver=%p\n", priv->driver); + uerr("ERROR: driver=%p\n", priv->driver); return -ESHUTDOWN; } #endif @@ -3459,7 +3452,7 @@ static int pic32mx_epcancel(struct usbdev_ep_s *ep, struct usbdev_req_s *req) struct pic32mx_ep_s *privep = (struct pic32mx_ep_s *)ep; irqstate_t flags; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !req) { usbtrace(TRACE_DEVERROR(PIC32MX_TRACEERR_INVALIDPARMS), 0); @@ -3575,10 +3568,10 @@ static int pic32mx_epbdtstall(struct usbdev_ep_s *ep, bool resume, bool epin) bdt->addr = (uint8_t *)physaddr; bdt->status = (USB_BDT_UOWN | bytecount); - bdtdbg("EP0 BDT IN [%p] {%08x, %08x}\n", - bdt, bdt->status, bdt->addr); - bdtdbg("EP0 BDT IN [%p] {%08x, %08x}\n", - otherbdt, otherbdt->status, otherbdt->addr); + bdtinfo("EP0 BDT IN [%p] {%08x, %08x}\n", + bdt, bdt->status, bdt->addr); + bdtinfo("EP0 BDT IN [%p] {%08x, %08x}\n", + otherbdt, otherbdt->status, otherbdt->addr); } else { @@ -3592,10 +3585,11 @@ static int pic32mx_epbdtstall(struct usbdev_ep_s *ep, bool resume, bool epin) bdt->addr = 0; bdt->status = 0; - bdtdbg("EP%d BDT %s [%p] {%08x, %08x}\n", - epno, epin ? "IN" : "OUT", bdt, bdt->status, bdt->addr); - bdtdbg("EP%d BDT %s [%p] {%08x, %08x}\n", - epno, epin ? "IN" : "OUT", otherbdt, otherbdt->status, otherbdt->addr); + bdtinfo("EP%d BDT %s [%p] {%08x, %08x}\n", + epno, epin ? "IN" : "OUT", bdt, bdt->status, bdt->addr); + bdtinfo("EP%d BDT %s [%p] {%08x, %08x}\n", + epno, epin ? "IN" : "OUT", otherbdt, otherbdt->status, + otherbdt->addr); /* Restart any queued requests (after a delay so that we can be assured * that the hardware has recovered from the stall -- I don't know of any @@ -3627,10 +3621,11 @@ static int pic32mx_epbdtstall(struct usbdev_ep_s *ep, bool resume, bool epin) pic32mx_rqstop(privep); - bdtdbg("EP%d BDT %s [%p] {%08x, %08x}\n", - epno, epin ? "IN" : "OUT", bdt, bdt->status, bdt->addr); - bdtdbg("EP%d BDT %s [%p] {%08x, %08x}\n", - epno, epin ? "IN" : "OUT", otherbdt, otherbdt->status, otherbdt->addr); + bdtinfo("EP%d BDT %s [%p] {%08x, %08x}\n", + epno, epin ? "IN" : "OUT", bdt, bdt->status, bdt->addr); + bdtinfo("EP%d BDT %s [%p] {%08x, %08x}\n", + epno, epin ? "IN" : "OUT", otherbdt, otherbdt->status, + otherbdt->addr); } return OK; @@ -3646,7 +3641,7 @@ static int pic32mx_epstall(struct usbdev_ep_s *ep, bool resume) irqstate_t flags; int ret; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep) { usbtrace(TRACE_DEVERROR(PIC32MX_TRACEERR_INVALIDPARMS), 0); @@ -3707,7 +3702,7 @@ static struct usbdev_ep_s *pic32mx_allocep(struct usbdev_s *dev, uint8_t epno, uint16_t epset = PIC32MX_ENDP_ALLSET; usbtrace(TRACE_DEVALLOCEP, (uint16_t)epno); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev) { usbtrace(TRACE_DEVERROR(PIC32MX_TRACEERR_INVALIDPARMS), 0); @@ -3765,7 +3760,7 @@ static void pic32mx_freeep(struct usbdev_s *dev, struct usbdev_ep_s *ep) struct pic32mx_usbdev_s *priv; struct pic32mx_ep_s *privep; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev || !ep) { usbtrace(TRACE_DEVERROR(PIC32MX_TRACEERR_INVALIDPARMS), 0); @@ -3797,7 +3792,7 @@ static int pic32mx_getframe(struct usbdev_s *dev) uint16_t frmh; uint16_t tmp; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev) { usbtrace(TRACE_DEVERROR(PIC32MX_TRACEERR_INVALIDPARMS), 0); @@ -3838,7 +3833,7 @@ static int pic32mx_wakeup(struct usbdev_s *dev) struct pic32mx_usbdev_s *priv = (struct pic32mx_usbdev_s *)dev; usbtrace(TRACE_DEVWAKEUP, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev) { usbtrace(TRACE_DEVERROR(PIC32MX_TRACEERR_INVALIDPARMS), 0); @@ -3862,7 +3857,7 @@ static int pic32mx_selfpowered(struct usbdev_s *dev, bool selfpowered) usbtrace(TRACE_DEVSELFPOWERED, (uint16_t)selfpowered); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev) { usbtrace(TRACE_DEVERROR(PIC32MX_TRACEERR_INVALIDPARMS), 0); @@ -4373,7 +4368,7 @@ int usbdev_register(struct usbdevclass_driver_s *driver) usbtrace(TRACE_DEVREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !driver->ops->bind || !driver->ops->unbind || !driver->ops->disconnect || !driver->ops->setup) { @@ -4439,7 +4434,7 @@ int usbdev_unregister(struct usbdevclass_driver_s *driver) usbtrace(TRACE_DEVUNREGISTER, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (driver != priv->driver) { usbtrace(TRACE_DEVERROR(PIC32MX_TRACEERR_INVALIDPARMS), 0); diff --git a/arch/mips/src/pic32mx/pic32mx.h b/arch/mips/src/pic32mx/pic32mx.h index d636293703b17b93bd5526a26d7e65b79287e812..c2dccffab9db822c5e2aa261b87f63e2cbddf307 100644 --- a/arch/mips/src/pic32mx/pic32mx.h +++ b/arch/mips/src/pic32mx/pic32mx.h @@ -378,7 +378,7 @@ void pic32mx_gpioirqdisable(unsigned int cn); * ************************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO void pic32mx_dumpgpio(uint32_t pinset, const char *msg); #else # define pic32mx_dumpgpio(p,m) diff --git a/arch/mips/src/pic32mz/Kconfig b/arch/mips/src/pic32mz/Kconfig index ac412b6dc5262c644bb0d48884c948150cc1b0a9..70dcf7d0766ae550acede9a4138a7d3b063a9c9b 100644 --- a/arch/mips/src/pic32mz/Kconfig +++ b/arch/mips/src/pic32mz/Kconfig @@ -332,11 +332,11 @@ config PIC32MZ_SPI_ENHBUF config PIC32MZ_SPI_REGDEBUG bool "SPI Register level debug" - depends on DEBUG + depends on DEBUG_INFO default n ---help--- Output detailed register-level SPI device debug information. - Requires also DEBUG. + Requires also CONFIG_DEBUG_FEATURES. endmenu # SPI Driver Configuration @@ -400,9 +400,9 @@ config NET_WOL config NET_REGDEBUG bool "Register level debug" default n - depends on PIC32MZ_ETHERNET && DEBUG + depends on PIC32MZ_ETHERNET && DEBUG_NET_INFO ---help--- - Enabled low level register debug. Also needs DEBUG. + Enabled low level register debug. Also needs CONFIG_DEBUG_FEATURES. config NET_HASH bool "Hash" @@ -425,8 +425,8 @@ menu "Device Configuration 0 (DEVCFG0)" config PIC32MZ_DEBUGGER_ENABLE bool "Background debugger enable" - default y if DEBUG - default n if !DEBUG + default y if DEBUG_FEATURES + default n if !DEBUG_FEATURES ---help--- Background Debugger Enable @@ -444,8 +444,8 @@ config PIC32MZ_ICESEL_CH2 config PIC32MZ_TRACE_ENABLE bool "Trace enable" - default y if DEBUG - default n if !DEBUG + default y if DEBUG_FEATURES + default n if !DEBUG_FEATURES ---help--- Trace Enable diff --git a/arch/mips/src/pic32mz/pic32mz-ethernet.c b/arch/mips/src/pic32mz/pic32mz-ethernet.c index 6b45f1ea023fff8d1d7b1f73a9ca362b0c94d2b9..87a91962d4e6b92dc72307986ca05dc5ab0b48cc 100644 --- a/arch/mips/src/pic32mz/pic32mz-ethernet.c +++ b/arch/mips/src/pic32mz/pic32mz-ethernet.c @@ -141,11 +141,11 @@ #define PIC32MZ_NBUFFERS (CONFIG_NET_NRXDESC + CONFIG_NET_NTXDESC + 1) /* Debug Configuration *****************************************************/ -/* Register/Descriptor debug -- can only happen of CONFIG_DEBUG is selected. +/* Register/Descriptor debug -- can only happen of CONFIG_DEBUG_FEATURES is selected. * This will probably generate much more output than you care to see. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_NET_REGDEBUG # undef CONFIG_NET_DESCDEBUG #endif @@ -154,7 +154,7 @@ * console. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_NET_DUMPPACKET #endif @@ -337,9 +337,9 @@ struct pic32mz_driver_s sq_queue_t pd_freebuffers; /* The free buffer list */ - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ - struct net_driver_s pd_dev; /* Interface understood by uIP */ + struct net_driver_s pd_dev; /* Interface understood by the network */ /* Descriptors and packet buffers */ @@ -465,7 +465,7 @@ static void pic32mz_ethreset(struct pic32mz_driver_s *priv); #ifdef CONFIG_NET_REGDEBUG static void pic32mz_printreg(uint32_t addr, uint32_t val, bool iswrite) { - lldbg("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val); + ninfo("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val); } #endif @@ -515,7 +515,7 @@ static void pic32mz_checkreg(uint32_t addr, uint32_t val, bool iswrite) { /* No.. More than one. */ - lldbg("[repeats %d more times]\n", count); + ninfo("[repeats %d more times]\n", count); } } @@ -594,12 +594,12 @@ static void pic32mz_putreg(uint32_t val, uint32_t addr) #ifdef CONFIG_NET_DESCDEBUG static void pic32mz_dumptxdesc(struct pic32mz_txdesc_s *txdesc, const char *msg) { - lldbg("TX Descriptor [%p]: %s\n", txdesc, msg); - lldbg(" status: %08x\n", txdesc->status); - lldbg(" address: %08x [%08x]\n", txdesc->address, VIRT_ADDR(txdesc->address)); - lldbg(" tsv1: %08x\n", txdesc->tsv1); - lldbg(" tsv2: %08x\n", txdesc->tsv2); - lldbg(" nexted: %08x [%08x]\n", txdesc->nexted, VIRT_ADDR(txdesc->nexted)); + ninfo("TX Descriptor [%p]: %s\n", txdesc, msg); + ninfo(" status: %08x\n", txdesc->status); + ninfo(" address: %08x [%08x]\n", txdesc->address, VIRT_ADDR(txdesc->address)); + ninfo(" tsv1: %08x\n", txdesc->tsv1); + ninfo(" tsv2: %08x\n", txdesc->tsv2); + ninfo(" nexted: %08x [%08x]\n", txdesc->nexted, VIRT_ADDR(txdesc->nexted)); } #endif @@ -621,12 +621,12 @@ static void pic32mz_dumptxdesc(struct pic32mz_txdesc_s *txdesc, const char *msg) #ifdef CONFIG_NET_DESCDEBUG static void pic32mz_dumprxdesc(struct pic32mz_rxdesc_s *rxdesc, const char *msg) { - lldbg("RX Descriptor [%p]: %s\n", rxdesc, msg); - lldbg(" status: %08x\n", rxdesc->status); - lldbg(" address: %08x [%08x]\n", rxdesc->address, VIRT_ADDR(rxdesc->address)); - lldbg(" rsv1: %08x\n", rxdesc->rsv1); - lldbg(" rsv2: %08x\n", rxdesc->rsv2); - lldbg(" nexted: %08x [%08x]\n", rxdesc->nexted, VIRT_ADDR(rxdesc->nexted)); + ninfo("RX Descriptor [%p]: %s\n", rxdesc, msg); + ninfo(" status: %08x\n", rxdesc->status); + ninfo(" address: %08x [%08x]\n", rxdesc->address, VIRT_ADDR(rxdesc->address)); + ninfo(" rsv1: %08x\n", rxdesc->rsv1); + ninfo(" rsv2: %08x\n", rxdesc->rsv2); + ninfo(" nexted: %08x [%08x]\n", rxdesc->nexted, VIRT_ADDR(rxdesc->nexted)); } #endif @@ -1042,7 +1042,7 @@ static int pic32mz_transmit(struct pic32mz_driver_s *priv) /* Find the next available TX descriptor. We are guaranteed that is will * not fail by upstream logic that assures that a TX packet is available - * before polling uIP. + * before polling the network. */ txdesc = pic32mz_txdesc(priv); @@ -1098,8 +1098,9 @@ static int pic32mz_transmit(struct pic32mz_driver_s *priv) * Function: pic32mz_txpoll * * Description: - * The transmitter is available, check if uIP has any outgoing packets ready - * to send. This is a callback from devif_poll(). devif_poll() may be called: + * The transmitter is available, check if the network has any outgoing + * packets ready to send. This is a callback from devif_poll(). + * devif_poll() may be called: * * 1. When the preceding TX packet send is complete, * 2. When the preceding TX packet send timesout and the interface is reset @@ -1190,7 +1191,7 @@ static int pic32mz_txpoll(struct net_driver_s *dev) * Function: pic32mz_poll * * Description: - * Perform the uIP poll. + * Perform the network poll. * * Parameters: * priv - Reference to the driver state structure @@ -1238,7 +1239,7 @@ static void pic32mz_poll(struct pic32mz_driver_s *priv) * Function: pic32mz_timerpoll * * Description: - * Perform the uIP timer poll. + * Perform the network timer poll. * * Parameters: * priv - Reference to the driver state structure @@ -1383,7 +1384,8 @@ static void pic32mz_rxdone(struct pic32mz_driver_s *priv) if ((rxdesc->rsv2 & RXDESC_RSV2_OK) == 0) { - nlldbg("ERROR. rsv1: %08x rsv2: %08x\n", rxdesc->rsv1, rxdesc->rsv2); + nwarn("WARNING. rsv1: %08x rsv2: %08x\n", + rxdesc->rsv1, rxdesc->rsv2); NETDEV_RXERRORS(&priv->pd_dev); pic32mz_rxreturn(rxdesc); } @@ -1396,7 +1398,8 @@ static void pic32mz_rxdone(struct pic32mz_driver_s *priv) else if (priv->pd_dev.d_len > CONFIG_NET_ETH_MTU) { - nlldbg("Too big. packet length: %d rxdesc: %08x\n", priv->pd_dev.d_len, rxdesc->status); + nwarn("WARNING: Too big. packet length: %d rxdesc: %08x\n", + priv->pd_dev.d_len, rxdesc->status); NETDEV_RXERRORS(&priv->pd_dev); pic32mz_rxreturn(rxdesc); } @@ -1406,7 +1409,8 @@ static void pic32mz_rxdone(struct pic32mz_driver_s *priv) else if ((rxdesc->status & (RXDESC_STATUS_EOP | RXDESC_STATUS_SOP)) != (RXDESC_STATUS_EOP | RXDESC_STATUS_SOP)) { - nlldbg("Fragment. packet length: %d rxdesc: %08x\n", priv->pd_dev.d_len, rxdesc->status); + nwarn("WARNING: Fragment. packet length: %d rxdesc: %08x\n", + priv->pd_dev.d_len, rxdesc->status); NETDEV_RXFRAGMENTS(&priv->pd_dev); pic32mz_rxreturn(rxdesc); } @@ -1444,7 +1448,7 @@ static void pic32mz_rxdone(struct pic32mz_driver_s *priv) #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); NETDEV_RXIPV4(&priv->pd_dev); /* Handle ARP on input then give the IPv4 packet to the network @@ -1486,7 +1490,7 @@ static void pic32mz_rxdone(struct pic32mz_driver_s *priv) #ifdef CONFIG_NET_IPv6 if (BUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); NETDEV_RXIPV6(&priv->pd_dev); /* Give the IPv6 packet to the network layer */ @@ -1545,7 +1549,8 @@ static void pic32mz_rxdone(struct pic32mz_driver_s *priv) { /* Unrecognized... drop it. */ - nlldbg("Unrecognized packet type dropped: %04x\n", ntohs(BUF->type)); + nwarn("WARNING: Unrecognized packet type dropped: %04x\n", + ntohs(BUF->type)); NETDEV_RXDROPPED(&priv->pd_dev); } @@ -1651,11 +1656,11 @@ static void pic32mz_txdone(struct pic32mz_driver_s *priv) pic32mz_putreg(priv->pd_inten, PIC32MZ_ETH_IEN); } - /* Otherwise poll uIP for new XMIT data */ + /* Otherwise poll the network for new XMIT data */ else { - /* Perform the uIP poll */ + /* Perform the network poll */ pic32mz_poll(priv); } @@ -1707,7 +1712,7 @@ static int pic32mz_interrupt(int irq, void *context) if ((status & ETH_INT_RXOVFLW) != 0) { - nlldbg("RX Overrun. status: %08x\n", status); + nerr("ERROR: RX Overrun. status: %08x\n", status); NETDEV_RXERRORS(&priv->pd_dev); } @@ -1718,7 +1723,7 @@ static int pic32mz_interrupt(int irq, void *context) if ((status & ETH_INT_RXBUFNA) != 0) { - nlldbg("RX buffer descriptor overrun. status: %08x\n", status); + nerr("ERROR: RX buffer descriptor overrun. status: %08x\n", status); NETDEV_RXERRORS(&priv->pd_dev); } @@ -1729,7 +1734,7 @@ static int pic32mz_interrupt(int irq, void *context) if ((status & ETH_INT_RXBUSE) != 0) { - nlldbg("RX BVCI bus error. status: %08x\n", status); + nerr("ERROR: RX BVCI bus error. status: %08x\n", status); NETDEV_RXERRORS(&priv->pd_dev); } @@ -1772,7 +1777,7 @@ static int pic32mz_interrupt(int irq, void *context) if ((status & ETH_INT_TXABORT) != 0) { - nlldbg("TX abort. status: %08x\n", status); + nerr("ERROR: TX abort. status: %08x\n", status); NETDEV_TXERRORS(&priv->pd_dev); } @@ -1783,7 +1788,7 @@ static int pic32mz_interrupt(int irq, void *context) if ((status & ETH_INT_TXBUSE) != 0) { - nlldbg("TX BVCI bus error. status: %08x\n", status); + nerr("ERROR: TX BVCI bus error. status: %08x\n", status); NETDEV_TXERRORS(&priv->pd_dev); } @@ -1865,7 +1870,7 @@ static void pic32mz_txtimeout(int argc, uint32_t arg, ...) (void)pic32mz_ifup(&priv->pd_dev); - /* Then poll uIP for new XMIT data (We are guaranteed to have a free + /* Then poll the network for new XMIT data (We are guaranteed to have a free * buffer here). */ @@ -1901,7 +1906,7 @@ static void pic32mz_polltimer(int argc, uint32_t arg, ...) if (pic32mz_txdesc(priv) != NULL) { - /* If so, update TCP timing states and poll uIP for new XMIT data. Hmmm.. + /* If so, update TCP timing states and poll the network for new XMIT data. Hmmm.. * might be bug here. Does this mean if there is a transmit in progress, * we will missing TCP time state updates? */ @@ -1937,9 +1942,9 @@ static int pic32mz_ifup(struct net_driver_s *dev) uint32_t regval; int ret; - ndbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); /* Reset the Ethernet controller (again) */ @@ -2027,7 +2032,7 @@ static int pic32mz_ifup(struct net_driver_s *dev) ret = pic32mz_phyinit(priv); if (ret != 0) { - ndbg("pic32mz_phyinit failed: %d\n", ret); + nerr("ERROR: pic32mz_phyinit failed: %d\n", ret); return ret; } @@ -2104,11 +2109,10 @@ static int pic32mz_ifup(struct net_driver_s *dev) priv->pd_dev.d_mac.ether_addr_octet[0] = (uint32_t)(regval & 0xff); priv->pd_dev.d_mac.ether_addr_octet[1] = (uint32_t)((regval >> 8) & 0xff); - ndbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], - dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], - dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5]); - + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], + dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], + dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5]); #endif /* Continue Ethernet Controller Initialization ****************************/ @@ -2304,7 +2308,7 @@ static int pic32mz_txavail(struct net_driver_s *dev) if (pic32mz_txdesc(priv) != NULL) { - /* If so, then poll uIP for new XMIT data. First allocate a buffer + /* If so, then poll the network for new XMIT data. First allocate a buffer * to perform the poll */ @@ -2395,14 +2399,14 @@ static int pic32mz_rmmac(struct net_driver_s *dev, const uint8_t *mac) #if defined(CONFIG_NET_REGDEBUG) && defined(PIC32MZ_HAVE_PHY) static void pic32mz_showmii(uint8_t phyaddr, const char *msg) { - dbg("PHY " PIC32MZ_PHYNAME ": %s\n", msg); - dbg(" MCR: %04x\n", pic32mz_phyread(phyaddr, MII_MCR)); - dbg(" MSR: %04x\n", pic32mz_phyread(phyaddr, MII_MSR)); - dbg(" ADVERTISE: %04x\n", pic32mz_phyread(phyaddr, MII_ADVERTISE)); - dbg(" LPA: %04x\n", pic32mz_phyread(phyaddr, MII_LPA)); - dbg(" EXPANSION: %04x\n", pic32mz_phyread(phyaddr, MII_EXPANSION)); + ninfo("PHY " PIC32MZ_PHYNAME ": %s\n", msg); + ninfo(" MCR: %04x\n", pic32mz_phyread(phyaddr, MII_MCR)); + ninfo(" MSR: %04x\n", pic32mz_phyread(phyaddr, MII_MSR)); + ninfo(" ADVERTISE: %04x\n", pic32mz_phyread(phyaddr, MII_ADVERTISE)); + ninfo(" LPA: %04x\n", pic32mz_phyread(phyaddr, MII_LPA)); + ninfo(" EXPANSION: %04x\n", pic32mz_phyread(phyaddr, MII_EXPANSION)); #ifdef CONFIG_ETH0_PHY_KS8721 - dbg(" 10BTCR: %04x\n", pic32mz_phyread(phyaddr, MII_KS8721_10BTCR)); + ninfo(" 10BTCR: %04x\n", pic32mz_phyread(phyaddr, MII_KS8721_10BTCR)); #endif } #endif @@ -2565,7 +2569,7 @@ static inline int pic32mz_phyreset(uint8_t phyaddr) } } - ndbg("Reset failed. MCR: %04x\n", phyreg); + nerr("ERROR: Reset failed. MCR: %04x\n", phyreg); return -ETIMEDOUT; } #endif @@ -2612,7 +2616,7 @@ static inline int pic32mz_phyautoneg(uint8_t phyaddr) } } - ndbg("Auto-negotiation failed. MSR: %04x\n", phyreg); + nerr("ERROR: Auto-negotiation failed. MSR: %04x\n", phyreg); return -ETIMEDOUT; } #endif @@ -2691,7 +2695,7 @@ static int pic32mz_phymode(uint8_t phyaddr, uint8_t mode) #endif } - ndbg("Link failed. MSR: %04x\n", phyreg); + nerr("ERROR: Link failed. MSR: %04x\n", phyreg); return -ETIMEDOUT; } #endif @@ -2760,7 +2764,7 @@ static inline int pic32mz_phyinit(struct pic32mz_driver_s *priv) ret = pic32mz_phyreset(phyaddr); if (ret < 0) { - ndbg("Failed to reset PHY at address %d\n", phyaddr); + nerr("ERROR: Failed to reset PHY at address %d\n", phyaddr); continue; } @@ -2773,12 +2777,12 @@ static inline int pic32mz_phyinit(struct pic32mz_driver_s *priv) */ phyreg = (unsigned int)pic32mz_phyread(phyaddr, MII_PHYID1); - nvdbg("Addr: %d PHY ID1: %04x EXPECT: %04x\n", phyaddr, phyreg, PIC32MZ_PHYID1); + ninfo("Addr: %d PHY ID1: %04x EXPECT: %04x\n", phyaddr, phyreg, PIC32MZ_PHYID1); if (phyreg == PIC32MZ_PHYID1) { phyreg = pic32mz_phyread(phyaddr, MII_PHYID2); - nvdbg("Addr: %d PHY ID2: %04x EXPECT: %04x\n", phyaddr, phyreg, PIC32MZ_PHYID2); + ninfo("Addr: %d PHY ID2: %04x EXPECT: %04x\n", phyaddr, phyreg, PIC32MZ_PHYID2); if (phyreg == PIC32MZ_PHYID2) { @@ -2793,10 +2797,10 @@ static inline int pic32mz_phyinit(struct pic32mz_driver_s *priv) { /* Failed to find PHY at any location */ - ndbg("No PHY detected\n"); + nerr("ERROR: No PHY detected\n"); return -ENODEV; } - nvdbg("phyaddr: %d\n", phyaddr); + ninfo("phyaddr: %d\n", phyaddr); /* Save the discovered PHY device address */ @@ -2897,7 +2901,7 @@ static inline int pic32mz_phyinit(struct pic32mz_driver_s *priv) priv->pd_mode = PIC32MZ_100BASET_FD; break; default: - ndbg("Unrecognized mode: %04x\n", phyreg); + nerr("ERROR: Unrecognized mode: %04x\n", phyreg); return -ENODEV; } #elif defined(CONFIG_ETH0_PHY_DP83848C) @@ -2920,7 +2924,7 @@ static inline int pic32mz_phyinit(struct pic32mz_driver_s *priv) priv->pd_mode = PIC32MZ_10BASET_FD; break; default: - ndbg("Unrecognized mode: %04x\n", phyreg); + nerr("ERROR: Unrecognized mode: %04x\n", phyreg); return -ENODEV; } #elif defined(CONFIG_ETH0_PHY_LAN8720) || defined(CONFIG_ETH0_PHY_LAN8740) || defined(CONFIG_ETH0_PHY_LAN8740A) @@ -2965,7 +2969,7 @@ static inline int pic32mz_phyinit(struct pic32mz_driver_s *priv) } else { - ndbg("Unrecognized mode: %04x\n", phyreg); + nerr("ERROR: Unrecognized mode: %04x\n", phyreg); return -ENODEV; } } @@ -2973,9 +2977,9 @@ static inline int pic32mz_phyinit(struct pic32mz_driver_s *priv) # warning "PHY Unknown: speed and duplex are bogus" #endif - ndbg("%dBase-T %s duplex\n", - (priv->pd_mode & PIC32MZ_SPEED_MASK) == PIC32MZ_SPEED_100 ? 100 : 10, - (priv->pd_mode & PIC32MZ_DUPLEX_MASK) == PIC32MZ_DUPLEX_FULL ?"full" : "half"); + ninfo("%dBase-T %s duplex\n", + (priv->pd_mode & PIC32MZ_SPEED_MASK) == PIC32MZ_SPEED_100 ? 100 : 10, + (priv->pd_mode & PIC32MZ_DUPLEX_MASK) == PIC32MZ_DUPLEX_FULL ?"full" : "half"); /* Disable auto-configuration. Set the fixed speed/duplex mode. * (probably more than little redundant). diff --git a/arch/mips/src/pic32mz/pic32mz-exception.c b/arch/mips/src/pic32mz/pic32mz-exception.c index ec23ff8c3b54b9a176d44a1823e4f506a00f99c7..256010e910aa049341156b280a8b0583cdaeaab7 100644 --- a/arch/mips/src/pic32mz/pic32mz-exception.c +++ b/arch/mips/src/pic32mz/pic32mz-exception.c @@ -55,22 +55,6 @@ #include "chip/pic32mz-int.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -85,7 +69,7 @@ uint32_t *pic32mz_exception(uint32_t *regs) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES uint32_t cause; uint32_t epc; #endif @@ -96,98 +80,98 @@ uint32_t *pic32mz_exception(uint32_t *regs) board_autoled_on(LED_INIRQ); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Get the cause of the exception from the CAUSE register */ asm volatile("\tmfc0 %0,$13,0\n" : "=r"(cause)); asm volatile("\tmfc0 %0,$14,0\n" : "=r"(epc)); -#ifdef CONFIG_DEBUG_VERBOSE +#ifdef CONFIG_DEBUG_INFO switch (cause & CP0_CAUSE_EXCCODE_MASK) { case CP0_CAUSE_EXCCODE_INT: /* Interrupt */ - llvdbg("EXCEPTION: Interrupt" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Interrupt" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_TLBL: /* TLB exception (load or instruction fetch) */ - llvdbg("EXCEPTION: TLB exception (load or instruction fetch)" - " CAUSE: %08x EPC:%08x\n", cause, epc); + _alert("EXCEPTION: TLB exception (load or instruction fetch)" + " CAUSE: %08x EPC:%08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_TLBS: /* TLB exception (store) */ - llvdbg("EXCEPTION: TLB exception (store)" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: TLB exception (store)" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_ADEL: /* Address error exception (load or instruction fetch) */ - llvdbg("EXCEPTION: Address error exception (load or instruction fetch)" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Address error exception (load or instruction fetch)" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_ADES: /* Address error exception (store) */ - llvdbg("EXCEPTION: Address error exception (store)" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Address error exception (store)" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_IBE: /* Bus error exception (instruction fetch) */ - llvdbg("EXCEPTION: Bus error exception (instruction fetch)" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Bus error exception (instruction fetch)" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_DBE: /* Bus error exception (data reference: load or store) */ - llvdbg("EXCEPTION: Bus error exception (data reference: load or store)" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Bus error exception (data reference: load or store)" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_SYS: /* Syscall exception */ - llvdbg("EXCEPTION: Syscall exception" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Syscall exception" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_BP: /* Breakpoint exception */ - llvdbg("EXCEPTION: Breakpoint exception" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Breakpoint exception" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_RI: /* Reserved instruction exception */ - llvdbg("EXCEPTION: Reserved instruction exception" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Reserved instruction exception" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_CPU: /* Coprocessor Unusable exception */ - llvdbg("EXCEPTION: Coprocessor Unusable exception" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Coprocessor Unusable exception" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_OV: /* Arithmetic Overflow exception */ - llvdbg("EXCEPTION: Arithmetic Overflow exception" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Arithmetic Overflow exception" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_TR: /* Trap exception */ - llvdbg("EXCEPTION: Trap exception" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Trap exception" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_FPE: /* Floating point exception */ - llvdbg("EXCEPTION: Floating point exception" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Floating point exception" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_C2E: /* Precise Coprocessor 2 exceptions */ - llvdbg("EXCEPTION: Precise Coprocessor 2 exceptions" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Precise Coprocessor 2 exceptions" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_MDMX: /* MDMX Unusable (MIPS64) */ - llvdbg("EXCEPTION: MDMX Unusable (MIPS64)" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: MDMX Unusable (MIPS64)" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_WATCH: /* WatchHi/WatchLo address */ - llvdbg("EXCEPTION: WatchHi/WatchLo address" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: WatchHi/WatchLo address" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_MCHECK: /* Machine check */ - llvdbg("EXCEPTION: Machine check" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Machine check" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; case CP0_CAUSE_EXCCODE_CACHEERR: /* Cache error */ - llvdbg("EXCEPTION: Cache error" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Cache error" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; default: - llvdbg("EXCEPTION: Unknown" - " CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: Unknown" + " CAUSE: %08x EPC: %08x\n", cause, epc); break; } #else - lldbg("EXCEPTION: CAUSE: %08x EPC: %08x\n", cause, epc); + _alert("EXCEPTION: CAUSE: %08x EPC: %08x\n", cause, epc); #endif #endif diff --git a/arch/mips/src/pic32mz/pic32mz-gpio.c b/arch/mips/src/pic32mz/pic32mz-gpio.c index 8bec67734365927778faa106a4826c1316bfeaff..3d247edc5b33b5e183d7ece4c0bf3efde38b63af 100644 --- a/arch/mips/src/pic32mz/pic32mz-gpio.c +++ b/arch/mips/src/pic32mz/pic32mz-gpio.c @@ -307,7 +307,7 @@ bool pic32mz_gpioread(pinset_t pinset) * ****************************************************************************/ -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_GPIO) +#ifdef CONFIG_DEBUG_GPIO_INFO void pic32mz_dumpgpio(uint32_t pinset, const char *msg) { unsigned int port = pic32mz_portno(pinset); @@ -325,17 +325,17 @@ void pic32mz_dumpgpio(uint32_t pinset, const char *msg) /* The following requires exclusive access to the GPIO registers */ sched_lock(); - lldbg("IOPORT%c pinset: %04x base: %08x -- %s\n", - 'A'+port, pinset, base, msg); - lldbg(" TRIS: %08x PORT: %08x LAT: %08x ODC: %08x\n", - getreg32(base + PIC32MZ_IOPORT_TRIS_OFFSET), - getreg32(base + PIC32MZ_IOPORT_PORT_OFFSET), - getreg32(base + PIC32MZ_IOPORT_LAT_OFFSET), - getreg32(base + PIC32MZ_IOPORT_ODC_OFFSET)); - lldbg(" CNCON: %08x CNEN: %08x CNPUE: %08x\n", - getreg32(PIC32MZ_IOPORT_CNCON), - getreg32(PIC32MZ_IOPORT_CNEN), - getreg32(PIC32MZ_IOPORT_CNPUE)); + gpioinfo("IOPORT%c pinset: %04x base: %08x -- %s\n", + 'A'+port, pinset, base, msg); + gpioinfo(" TRIS: %08x PORT: %08x LAT: %08x ODC: %08x\n", + getreg32(base + PIC32MZ_IOPORT_TRIS_OFFSET), + getreg32(base + PIC32MZ_IOPORT_PORT_OFFSET), + getreg32(base + PIC32MZ_IOPORT_LAT_OFFSET), + getreg32(base + PIC32MZ_IOPORT_ODC_OFFSET)); + gpioinfo(" CNCON: %08x CNEN: %08x CNPUE: %08x\n", + getreg32(PIC32MZ_IOPORT_CNCON), + getreg32(PIC32MZ_IOPORT_CNEN), + getreg32(PIC32MZ_IOPORT_CNPUE)); sched_unlock(); } } diff --git a/arch/mips/src/pic32mz/pic32mz-gpio.h b/arch/mips/src/pic32mz/pic32mz-gpio.h index 1c967bc802ae72c3528afc806b311518f08ee716..d2c6389a99280274d28598a304041bdb51e77330 100644 --- a/arch/mips/src/pic32mz/pic32mz-gpio.h +++ b/arch/mips/src/pic32mz/pic32mz-gpio.h @@ -253,7 +253,7 @@ void pic32mz_gpioirqdisable(pinset_t pinset); * ************************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO void pic32mz_dumpgpio(uint32_t pinset, const char *msg); #else # define pic32mz_dumpgpio(p,m) diff --git a/arch/mips/src/pic32mz/pic32mz-serial.c b/arch/mips/src/pic32mz/pic32mz-serial.c index 6845ff50352ecbea62faddbf0122192b8a2d910c..fcdc0c1874db0e2acebbb9bb7f9137cef1643d89 100644 --- a/arch/mips/src/pic32mz/pic32mz-serial.c +++ b/arch/mips/src/pic32mz/pic32mz-serial.c @@ -752,14 +752,14 @@ static int up_interrupt(struct uart_dev_s *dev) * - Overflow condition for the receive buffer OERR (UxSTA bit 1) occurs */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_ERROR if (up_pending_irq(priv->irqe)) { /* Clear the pending error interrupt */ up_clrpend_irq(priv->irqe); - lldbg("ERROR: interrupt STA: %08x\n", - up_serialin(priv, PIC32MZ_UART_STA_OFFSET)); + _err("ERROR: interrupt STA: %08x\n", + up_serialin(priv, PIC32MZ_UART_STA_OFFSET)); handled = true; } #endif @@ -1008,7 +1008,7 @@ static void up_rxint(struct uart_dev_s *dev, bool enable) */ #ifndef CONFIG_SUPPRESS_SERIAL_INTS -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_ERROR up_enable_irq(priv->irqe); #endif up_enable_irq(priv->irqrx); @@ -1017,7 +1017,7 @@ static void up_rxint(struct uart_dev_s *dev, bool enable) } else { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_ERROR up_disable_irq(priv->irqe); #endif up_disable_irq(priv->irqrx); diff --git a/arch/mips/src/pic32mz/pic32mz-spi.c b/arch/mips/src/pic32mz/pic32mz-spi.c index d2f83fb2927e562e56db396d78943f30a7af2408..3eea799d10ce4197fa5a4e9af304f1443022d82c 100644 --- a/arch/mips/src/pic32mz/pic32mz-spi.c +++ b/arch/mips/src/pic32mz/pic32mz-spi.c @@ -67,20 +67,6 @@ #define BOARD_PBCLOCK BOARD_PBCLK2 -/* Debug */ - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - /**************************************************************************** * Private Types ****************************************************************************/ @@ -496,7 +482,7 @@ static bool spi_checkreg(struct pic32mz_dev_s *priv, uintptr_t regaddr, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", priv->ntimes); + _info("...[Repeats %d times]...\n", priv->ntimes); } /* Save information about the new access */ @@ -546,8 +532,8 @@ static uint32_t spi_getreg(FAR struct pic32mz_dev_s *priv, { /* Yes.. */ - lldbg("%08lx->%08lx\n", - (unsigned long)regaddr, (unsigned long)regval); + _info("%08lx->%08lx\n", + (unsigned long)regaddr, (unsigned long)regval); } /* Return the value read */ @@ -588,8 +574,8 @@ static void spi_putaddr(FAR struct pic32mz_dev_s *priv, uintptr_t regaddr, { /* Yes.. */ - lldbg("%08lx<-%08lx\n", - (unsigned long)regaddr, (unsigned long)regval); + _info("%08lx<-%08lx\n", + (unsigned long)regaddr, (unsigned long)regval); } /* Write the value to the register */ @@ -652,7 +638,7 @@ static void spi_exchange8(FAR struct pic32mz_dev_s *priv, uint32_t regval; uint8_t data; - spivdbg("nbytes: %d\n", nbytes); + spiinfo("nbytes: %d\n", nbytes); while (nbytes) { /* Write the data to transmitted to the SPI Data Register */ @@ -723,7 +709,7 @@ static void spi_exchange16(FAR struct pic32mz_dev_s *priv, uint32_t regval; uint16_t data; - spivdbg("nwords: %d\n", nwords); + spiinfo("nwords: %d\n", nwords); while (nwords) { /* Write the data to transmitted to the SPI Data Register */ @@ -837,7 +823,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) uint32_t actual; uint32_t regval; - spivdbg("Old frequency: %d actual: %d New frequency: %d\n", + spiinfo("Old frequency: %d actual: %d New frequency: %d\n", priv->frequency, priv->actual, frequency); /* Check if the requested frequency is the same as the frequency selection */ @@ -872,7 +858,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) /* Save the new BRG value */ spi_putreg(priv, PIC32MZ_SPI_BRG_OFFSET, regval); - spivdbg("PBCLOCK: %d frequency: %d divisor: %d BRG: %d\n", + spiinfo("PBCLOCK: %d frequency: %d divisor: %d BRG: %d\n", BOARD_PBCLOCK, frequency, divisor, regval); /* Calculate the new actual frequency. @@ -887,7 +873,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) priv->frequency = frequency; priv->actual = actual; - spidbg("New frequency: %d Actual: %d\n", frequency, actual); + spiinfo("New frequency: %d Actual: %d\n", frequency, actual); return actual; } @@ -911,7 +897,7 @@ static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode) FAR struct pic32mz_dev_s *priv = (FAR struct pic32mz_dev_s *)dev; uint32_t regval; - spivdbg("Old mode: %d New mode: %d\n", priv->mode, mode); + spiinfo("Old mode: %d New mode: %d\n", priv->mode, mode); /* Has the mode changed? */ @@ -973,7 +959,7 @@ static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode) } spi_putreg(priv, PIC32MZ_SPI_CON_OFFSET, regval); - spivdbg("CON: %08x\n", regval); + spiinfo("CON: %08x\n", regval); /* Save the mode so that subsequent re-configuratins will be faster */ @@ -1002,7 +988,7 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) uint32_t setting; uint32_t regval; - spivdbg("Old nbits: %d New nbits: %d\n", priv->nbits, nbits); + spiinfo("Old nbits: %d New nbits: %d\n", priv->nbits, nbits); /* Has the number of bits changed? */ @@ -1025,7 +1011,7 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) } else { - spidbg("Unsupported nbits: %d\n", nbits); + spierr("ERROR: Unsupported nbits: %d\n", nbits); return; } @@ -1033,7 +1019,7 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) regval &= ~SPI_CON_MODE_MASK; regval |= setting; regval = spi_getreg(priv, PIC32MZ_SPI_CON_OFFSET); - spivdbg("CON: %08x\n", regval); + spiinfo("CON: %08x\n", regval); /* Save the selection so the subsequence re-configurations will be * faster @@ -1075,7 +1061,7 @@ static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd) rxword = 0; spi_exchange16(priv, &txword, &rxword, 1); - spivdbg("Sent %04x received %04x\n", txword, rxword); + spiinfo("Sent %04x received %04x\n", txword, rxword); return rxword; } else @@ -1089,7 +1075,7 @@ static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd) rxbyte = (uint8_t)0; spi_exchange8(priv, &txbyte, &rxbyte, 1); - spivdbg("Sent %02x received %02x\n", txbyte, rxbyte); + spiinfo("Sent %02x received %02x\n", txbyte, rxbyte); return (uint16_t)rxbyte; } } @@ -1222,7 +1208,7 @@ FAR struct spi_dev_s *pic32mz_spibus_initialize(int port) irqstate_t flags; uint32_t regval; - spivdbg("port: %d\n", port); + spiinfo("port: %d\n", port); /* Select the SPI state structure and SDI PPS register for this port */ @@ -1275,7 +1261,7 @@ FAR struct spi_dev_s *pic32mz_spibus_initialize(int port) else #endif { - spidbg("Unsuppport port: %d\n", port); + spierr("ERROR: Unsuppport port: %d\n", port); return NULL; } @@ -1311,7 +1297,7 @@ FAR struct spi_dev_s *pic32mz_spibus_initialize(int port) ret = irq_attach(priv->config->rxirq, spi_interrupt); if (ret < 0) { - spidbg("Failed to attach RX interrupt: %d port: %d\n", + spierr("ERROR: Failed to attach RX interrupt: %d port: %d\n", priv->config->rxirq, port); goto errout; } @@ -1319,7 +1305,7 @@ FAR struct spi_dev_s *pic32mz_spibus_initialize(int port) ret = irq_attach(priv->config->txirq, spi_interrupt); if (ret < 0) { - spidbg("Failed to attach TX interrupt: %d port: %d\n", + spierr("ERROR: Failed to attach TX interrupt: %d port: %d\n", priv->tconfig->xirq, port); goto errout_with_rxirq; } @@ -1327,7 +1313,7 @@ FAR struct spi_dev_s *pic32mz_spibus_initialize(int port) ret = irq_attach(priv->config->firq, spi_interrupt); if (ret < 0) { - spidbg("Failed to attach fault interrupt: %d port: %d\n", + spierr("ERROR: Failed to attach fault interrupt: %d port: %d\n", priv->config->firq, port); goto errout_with_txirq; } @@ -1354,7 +1340,7 @@ FAR struct spi_dev_s *pic32mz_spibus_initialize(int port) regval |= (SPI_CON_ENHBUF | SPI_CON_SRXISEL_HALF | SPI_CON_STXISEL_HALF); #endif spi_putreg(priv, PIC32MZ_SPI_CON_OFFSET, regval); - spivdbg("CON: %08x\n", regval); + spiinfo("CON: %08x\n", regval); /* Set the initial SPI configuration */ diff --git a/arch/rgmp/src/bridge.c b/arch/rgmp/src/bridge.c index 46f45a8f59322934b1bdda5c3b91378f0b48d98d..320019ba9f2f907cc171cb087dcea5f060351b2e 100644 --- a/arch/rgmp/src/bridge.c +++ b/arch/rgmp/src/bridge.c @@ -98,7 +98,7 @@ static const struct file_operations up_bridge_fops = int rtos_bridge_init(struct rgmp_bridge *b) { - int err; + int errcode; struct bridge *bridge; char path[30] = {'/', 'd', 'e', 'v', '/'}; @@ -106,10 +106,10 @@ int rtos_bridge_init(struct rgmp_bridge *b) goto err0; bridge->b = b; - if ((err = sem_init(&bridge->rd_lock, 0, 1)) == ERROR) + if ((errcode = sem_init(&bridge->rd_lock, 0, 1)) == ERROR) goto err1; - if ((err = sem_init(&bridge->wr_lock, 0, 1)) == ERROR) + if ((errcode = sem_init(&bridge->wr_lock, 0, 1)) == ERROR) goto err1; // make rgmp_bridge0 to be the console @@ -119,7 +119,7 @@ int rtos_bridge_init(struct rgmp_bridge *b) else strlcpy(path + 5, b->vdev->name, 25); - if ((err = register_driver(path, &up_bridge_fops, 0666, bridge)) == ERROR) + if ((errcode = register_driver(path, &up_bridge_fops, 0666, bridge)) == ERROR) { cprintf("NuttX: register bridge %s fail\n", b->vdev->name); goto err1; diff --git a/arch/rgmp/src/nuttx.c b/arch/rgmp/src/nuttx.c index 0832e8f9ec03f75860dd9e8f0001b7b2c5382329..4a274264d7f8f8dbb4b8faf240254c93b5983f48 100644 --- a/arch/rgmp/src/nuttx.c +++ b/arch/rgmp/src/nuttx.c @@ -258,7 +258,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) if ((tcb->task_state < FIRST_READY_TO_RUN_STATE) || (tcb->task_state > LAST_READY_TO_RUN_STATE)) { - warn("%s: task sched error\n", __func__); + _warn("%s: task sched error\n", __func__); return; } else @@ -304,7 +304,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) if (g_pendingtasks.head) { - warn("Disable preemption failed for task block itself\n"); + _warn("Disable preemption failed for task block itself\n"); sched_mergepending(); } @@ -353,7 +353,7 @@ void up_unblock_task(struct tcb_s *tcb) if ((tcb->task_state < FIRST_BLOCKED_STATE) || (tcb->task_state > LAST_BLOCKED_STATE)) { - warn("%s: task sched error\n", __func__); + _warn("%s: task sched error\n", __func__); return; } else @@ -453,7 +453,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) #endif ) { - warn("%s: task sched error\n", __func__); + _warn("%s: task sched error\n", __func__); return; } else @@ -496,7 +496,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) if (g_pendingtasks.head) { - warn("Disable preemption failed for reprioritize task\n"); + _warn("Disable preemption failed for reprioritize task\n"); sched_mergepending(); } diff --git a/arch/rgmp/src/x86/com.c b/arch/rgmp/src/x86/com.c index 8a149bcadc0d50a3a08df7b87289f16983c1a8d6..8c8d076cc05f72eb19da90c0769246514a6acf7c 100644 --- a/arch/rgmp/src/x86/com.c +++ b/arch/rgmp/src/x86/com.c @@ -245,38 +245,45 @@ static int up_setup(struct uart_dev_s *dev) } data; // clear and disable FIFO + outb(base+COM_FCR, 1); outb(base+COM_FCR, 3); outb(base+COM_FCR, 0); // Clear any preexisting overrun indications and interrupts // Serial port doesn't exist if COM_LSR returns 0xFF + inb(base+COM_LSR); inb(base+COM_IIR); inb(base+COM_RX); - if (inb(base+COM_LSR) == 0xff) { - dbg("COM %d does not exist\n", base); + if (inb(base+COM_LSR) == 0xff) + { + _err("ERROR: COM %d does not exist\n", base); return -1; - } + } // Set speed; requires DLAB latch + outb(base+COM_LCR, COM_LCR_DLAB); data.val = 115200 / priv->baud; outb(base+COM_DLL, data.sep.low); outb(base+COM_DLM, data.sep.high); // set data bits, stop bit, parity; turn off DLAB latch + outb(base+COM_LCR, priv->lcr.val); // OUT2 must be set to enable interrupt + outb(base+COM_MCR, COM_MCR_OUT2); // setup FIFO + outb(base+COM_FCR, 1); // disable COM interrupts - outb(base+COM_IER, 0); + outb(base+COM_IER, 0); return OK; } @@ -315,11 +322,11 @@ static void up_shutdown(struct uart_dev_s *dev) static int up_attach(struct uart_dev_s *dev) { struct up_dev_s *priv = dev->priv; - int err; + int errcode; - err = rgmp_request_irq(priv->irq, &priv->action, 0); + errcode = rgmp_request_irq(priv->irq, &priv->action, 0); - return err; + return errcode; } /**************************************************************************** @@ -578,47 +585,67 @@ void up_earlyserialinit(void) void up_serialinit(void) { uart_dev_t *dev; - int err; + int errcode; #ifdef CONFIG_COM1 dev = up_alloc_com(COM1, 4); if (dev == NULL) - dbg("alloc com1 fail\n"); - else { - err = uart_register("/dev/ttyS0", dev); - if (err) - dbg("register com1 fail\n"); - } + { + _err("ERROR: alloc com1 fail\n"); + } + else + { + errcode = uart_register("/dev/ttyS0", dev); + if (errcode) + { + _err("ERROR: register com1 fail\n"); + } + } #endif #ifdef CONFIG_COM2 dev = up_alloc_com(COM2, 3); if (dev == NULL) - dbg("alloc com2 fail\n"); - else { - err = uart_register("/dev/ttyS1", dev); - if (err) - dbg("register com2 fail\n"); - } + { + _err("ERROR: alloc com2 fail\n"); + } + else + { + errcode = uart_register("/dev/ttyS1", dev); + if (errcode) + { + _err("ERROR: register com2 fail\n"); + } + } #endif #ifdef CONFIG_COM3 dev = up_alloc_com(COM3, 4); if (dev == NULL) - dbg("alloc com3 fail\n"); - else { - err = uart_register("/dev/ttyS2", dev); - if (err) - dbg("register com3 fail\n"); - } + { + _err("ERROR: alloc com3 fail\n"); + } + else + { + errcode = uart_register("/dev/ttyS2", dev); + if (errcode) + { + _err("ERROR: register com3 fail\n"); + } + } #endif #ifdef CONFIG_COM4 dev = up_alloc_com(COM4, 3); if (dev == NULL) - dbg("alloc com4 fail\n"); - else { - err = uart_register("/dev/ttyS3", dev); - if (err) - dbg("register com4 fail\n"); - } + { + _err("ERROR: alloc com4 fail\n"); + } + else + { + errcode = uart_register("/dev/ttyS3", dev); + if (errcode) + { + _err("ERROR: register com4 fail\n"); + } + } #endif } diff --git a/arch/sh/src/common/up_assert.c b/arch/sh/src/common/up_assert.c index c8303f2995810c5b31acb47b2456ea0859730db6..ec02578cfd04d00666cddec13f8cfcffacefeeca 100644 --- a/arch/sh/src/common/up_assert.c +++ b/arch/sh/src/common/up_assert.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/sh/src/common/up_assert.c * - * Copyright (C) 2008-2009, 2012-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009, 2012-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include #include @@ -76,10 +65,6 @@ # undef CONFIG_ARCH_USBDUMP #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -125,7 +110,7 @@ static int usbtrace_syslog(FAR const char *fmt, ...) /* Let vsyslog do the real work */ va_start(ap, fmt); - ret = lowvsyslog(LOG_INFO, fmt, ap); + ret = vsyslog(LOG_EMERG, fmt, ap); va_end(ap); return ret; } @@ -147,17 +132,17 @@ static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg) void up_assert(const uint8_t *filename, int lineno) { -#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG) +#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG_ALERT) struct tcb_s *rtcb = this_task(); #endif board_autoled_on(LED_ASSERTION); #if CONFIG_TASK_NAME_SIZE > 0 - lldbg("Assertion failed at file:%s line: %d task: %s\n", + _alert("Assertion failed at file:%s line: %d task: %s\n", filename, lineno, rtcb->name); #else - lldbg("Assertion failed at file:%s line: %d\n", + _alert("Assertion failed at file:%s line: %d\n", filename, lineno); #endif diff --git a/arch/sh/src/common/up_createstack.c b/arch/sh/src/common/up_createstack.c index f52f03386ed13f260d4e6d48f56187b218d0d3ee..3a2a4118119997cdc4e1c121fa9c80b63c62ca6a 100644 --- a/arch/sh/src/common/up_createstack.c +++ b/arch/sh/src/common/up_createstack.c @@ -137,12 +137,12 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype) tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size); } -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Was the allocation successful? */ if (!tcb->stack_alloc_ptr) { - sdbg("ERROR: Failed to allocate stack, size %d\n", stack_size); + serr("ERROR: Failed to allocate stack, size %d\n", stack_size); } #endif } diff --git a/arch/sh/src/common/up_exit.c b/arch/sh/src/common/up_exit.c index 84845556e983c96467843fd43f58e19ba7035633..1aa9644dba9ca0c5c1894a18cef6efa2506465bc 100644 --- a/arch/sh/src/common/up_exit.c +++ b/arch/sh/src/common/up_exit.c @@ -57,9 +57,9 @@ * Pre-processor Definitions ****************************************************************************/ -/**************************************************************************** - * Private Data - ****************************************************************************/ +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT +#endif /**************************************************************************** * Private Functions @@ -75,7 +75,7 @@ * ****************************************************************************/ -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG) +#ifdef CONFIG_DUMP_ON_EXIT static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) { #if CONFIG_NFILE_DESCRIPTORS > 0 @@ -86,8 +86,8 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) int i; #endif - sdbg(" TCB=%p name=%s\n", tcb, tcb->argv[0]); - sdbg(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state); + sinfo(" TCB=%p name=%s\n", tcb, tcb->argv[0]); + sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state); #if CONFIG_NFILE_DESCRIPTORS > 0 filelist = tcb->group->tg_filelist; @@ -96,8 +96,8 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) struct inode *inode = filelist->fl_files[i].f_inode; if (inode) { - sdbg(" fd=%d refcount=%d\n", - i, inode->i_crefs); + sinfo(" fd=%d refcount=%d\n", + i, inode->i_crefs); } } #endif @@ -110,11 +110,11 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) if (filep->fs_fd >= 0) { #if CONFIG_STDIO_BUFFER_SIZE > 0 - sdbg(" fd=%d nbytes=%d\n", - filep->fs_fd, - filep->fs_bufpos - filep->fs_bufstart); + sinfo(" fd=%d nbytes=%d\n", + filep->fs_fd, + filep->fs_bufpos - filep->fs_bufstart); #else - sdbg(" fd=%d\n", filep->fs_fd); + sinfo(" fd=%d\n", filep->fs_fd); #endif } } @@ -147,10 +147,10 @@ void _exit(int status) (void)up_irq_save(); - slldbg("TCB=%p exiting\n", this_task()); + sinfo("TCB=%p exiting\n", this_task()); -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG) - slldbg("Other tasks:\n"); +#ifdef CONFIG_DUMP_ON_EXIT + sinfo("Other tasks:\n"); sched_foreach(_up_dumponexit, NULL); #endif diff --git a/arch/sh/src/common/up_initialize.c b/arch/sh/src/common/up_initialize.c index 98c6bf273d842474e4d91df99a1267975fb5d252..c333f4b993928d48f1807c523e53ec468eaf8442 100644 --- a/arch/sh/src/common/up_initialize.c +++ b/arch/sh/src/common/up_initialize.c @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include "up_arch.h" @@ -77,18 +77,18 @@ * ****************************************************************************/ -#if defined(CONFIG_ARCH_CALIBRATION) & defined(CONFIG_DEBUG) +#if defined(CONFIG_ARCH_CALIBRATION) & defined(CONFIG_DEBUG_FEATURES) static void up_calibratedelay(void) { int i; - slldbg("Beginning 100s delay\n"); + swarn("Beginning 100s delay\n"); for (i = 0; i < 100; i++) { up_mdelay(1000); } - slldbg("End 100s delay\n"); + swarn("End 100s delay\n"); } #else # define up_calibratedelay() @@ -172,20 +172,18 @@ void up_initialize(void) #if defined(CONFIG_DEV_LOWCONSOLE) lowconsole_init(); -#elif defined(CONFIG_SYSLOG_CONSOLE) +#elif defined(CONFIG_CONSOLE_SYSLOG) syslog_console_init(); #elif defined(CONFIG_RAMLOG_CONSOLE) ramlog_consoleinit(); #endif - /* Initialize the system logging device */ + /* Early initialization of the system logging device. Some SYSLOG channel + * can be initialized early in the initialization sequence because they + * depend on only minimal OS initialization. + */ -#ifdef CONFIG_SYSLOG_CHAR - syslog_initialize(); -#endif -#ifdef CONFIG_RAMLOG_SYSLOG - ramlog_sysloginit(); -#endif + syslog_initialize(SYSLOG_INIT_EARLY); #ifndef CONFIG_NETDEV_LATEINIT /* Initialize the network */ diff --git a/arch/sh/src/common/up_internal.h b/arch/sh/src/common/up_internal.h index 5f1a54bb3effb5ee03851ec596dd2d139e1e8432..c055436edb6f4f32ac2b31df9ad9939face99e6e 100644 --- a/arch/sh/src/common/up_internal.h +++ b/arch/sh/src/common/up_internal.h @@ -101,13 +101,6 @@ # define USE_SERIALDRIVER 1 #endif -/* Determine which device to use as the system logging device */ - -#ifndef CONFIG_SYSLOG -# undef CONFIG_SYSLOG_CHAR -# undef CONFIG_RAMLOG_SYSLOG -#endif - /* Check if an interrupt stack size is configured */ #ifndef CONFIG_ARCH_INTERRUPTSTACK diff --git a/arch/sh/src/common/up_releasepending.c b/arch/sh/src/common/up_releasepending.c index b91503cbe6a3f046514a8195a246a2a90b364ab9..195935ff458d3b101ba2c5bcf163762fb99d3321 100644 --- a/arch/sh/src/common/up_releasepending.c +++ b/arch/sh/src/common/up_releasepending.c @@ -67,7 +67,7 @@ void up_release_pending(void) { struct tcb_s *rtcb = this_task(); - slldbg("From TCB=%p\n", rtcb); + sinfo("From TCB=%p\n", rtcb); /* Merge the g_pendingtasks list into the ready-to-run task list */ diff --git a/arch/sh/src/common/up_reprioritizertr.c b/arch/sh/src/common/up_reprioritizertr.c index e838cff0bba8de83d17c6b920e30c5192a78df79..f2d0d1a2266038d108a3577bba9450c56e3114fa 100644 --- a/arch/sh/src/common/up_reprioritizertr.c +++ b/arch/sh/src/common/up_reprioritizertr.c @@ -95,7 +95,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) struct tcb_s *rtcb = this_task(); bool switch_needed; - slldbg("TCB=%p PRI=%d\n", tcb, priority); + sinfo("TCB=%p PRI=%d\n", tcb, priority); /* Remove the tcb task from the ready-to-run list. * sched_removereadytorun will return true if we just diff --git a/arch/sh/src/m16c/m16c_dumpstate.c b/arch/sh/src/m16c/m16c_dumpstate.c index e80fbcb9f57d62b5d11c63cd7add92cec5c1f0f3..7dc1a74ee43d6b0544f2d075dc061da51563bf33 100644 --- a/arch/sh/src/m16c/m16c_dumpstate.c +++ b/arch/sh/src/m16c/m16c_dumpstate.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/sh/src/m16c/m16c_assert.c * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -39,13 +39,6 @@ #include -/* Output debug info -- even if debug is not selected. */ - -#undef CONFIG_DEBUG -#undef CONFIG_DEBUG_VERBOSE -#define CONFIG_DEBUG 1 -#define CONFIG_DEBUG_VERBOSE 1 - #include #include @@ -59,14 +52,6 @@ #ifdef CONFIG_ARCH_STACKDUMP -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -112,7 +97,7 @@ static void m16c_stackdump(uint16_t sp, uint16_t stack_base) for (stack = sp & ~7; stack < stack_base; stack += 8) { uint8_t *ptr = (uint8_t*)stack; - lldbg("%04x: %02x %02x %02x %02x %02x %02x %02x %02x\n", + _alert("%04x: %02x %02x %02x %02x %02x %02x %02x %02x\n", stack, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7]); } } @@ -131,14 +116,14 @@ static inline void m16c_registerdump(void) { /* Yes.. dump the interrupt registers */ - lldbg("PC: %02x%02x%02x FLG: %02x00%02x FB: %02x%02x SB: %02x%02x SP: %02x%02x\n", + _alert("PC: %02x%02x%02x FLG: %02x00%02x FB: %02x%02x SB: %02x%02x SP: %02x%02x\n", ptr[REG_FLGPCHI] & 0xff, ptr[REG_PC], ptr[REG_PC+1], ptr[REG_FLGPCHI] >> 8, ptr[REG_FLG], ptr[REG_FB], ptr[REG_FB+1], ptr[REG_SB], ptr[REG_SB+1], ptr[REG_SP], ptr[REG_SP+1]); - lldbg("R0: %02x%02x R1: %02x%02x R2: %02x%02x A0: %02x%02x A1: %02x%02x\n", + _alert("R0: %02x%02x R1: %02x%02x R2: %02x%02x A0: %02x%02x A1: %02x%02x\n", ptr[REG_R0], ptr[REG_R0+1], ptr[REG_R1], ptr[REG_R1+1], ptr[REG_R2], ptr[REG_R2+1], ptr[REG_R3], ptr[REG_R3+1], ptr[REG_A0], ptr[REG_A0+1], ptr[REG_A1], ptr[REG_A1+1]); @@ -194,10 +179,10 @@ void up_dumpstate(void) /* Show interrupt stack info */ - lldbg("sp: %04x\n", sp); - lldbg("IRQ stack:\n"); - lldbg(" base: %04x\n", istackbase); - lldbg(" size: %04x\n", istacksize); + _alert("sp: %04x\n", sp); + _alert("IRQ stack:\n"); + _alert(" base: %04x\n", istackbase); + _alert(" size: %04x\n", istacksize); /* Does the current stack pointer lie within the interrupt * stack? @@ -212,18 +197,18 @@ void up_dumpstate(void) /* Extract the user stack pointer from the register area */ sp = m16c_getusersp(); - lldbg("sp: %04x\n", sp); + _alert("sp: %04x\n", sp); } /* Show user stack info */ - lldbg("User stack:\n"); - lldbg(" base: %04x\n", ustackbase); - lldbg(" size: %04x\n", ustacksize); + _alert("User stack:\n"); + _alert(" base: %04x\n", ustackbase); + _alert(" size: %04x\n", ustacksize); #else - lldbg("sp: %04x\n", sp); - lldbg("stack base: %04x\n", ustackbase); - lldbg("stack size: %04x\n", ustacksize); + _alert("sp: %04x\n", sp); + _alert("stack base: %04x\n", ustackbase); + _alert("stack size: %04x\n", ustacksize); #endif /* Dump the user stack if the stack pointer lies within the allocated user @@ -233,7 +218,7 @@ void up_dumpstate(void) if (sp > ustackbase || sp <= ustackbase - ustacksize) { #if !defined(CONFIG_ARCH_INTERRUPTSTACK) || CONFIG_ARCH_INTERRUPTSTACK < 4 - lldbg("ERROR: Stack pointer is not within allocated stack\n"); + _alert("ERROR: Stack pointer is not within allocated stack\n"); #endif } else diff --git a/arch/sh/src/m16c/m16c_head.S b/arch/sh/src/m16c/m16c_head.S index f18da3fe3fe02581a8bd07ca3b8fe5b7635b99fd..711ce26aaaf16b09a8fcefbeac13d0fcd9a02907 100644 --- a/arch/sh/src/m16c/m16c_head.S +++ b/arch/sh/src/m16c/m16c_head.S @@ -58,7 +58,7 @@ *****************************************************************************/ .macro showprogress, code -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES .globl _up_lowputc mov.b r#\code1l /* Character to print */ jsr.a _up_lowputc /* Print it */ diff --git a/arch/sh/src/m16c/m16c_schedulesigaction.c b/arch/sh/src/m16c/m16c_schedulesigaction.c index 682d3299875c8ebad2da16137073dad542efabf9..23d105240bf2d498f224877b5c4a07b6090fa90d 100644 --- a/arch/sh/src/m16c/m16c_schedulesigaction.c +++ b/arch/sh/src/m16c/m16c_schedulesigaction.c @@ -93,7 +93,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) { irqstate_t flags; - sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver); + sinfo("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver); /* Make sure that interrupts are disabled */ @@ -107,7 +107,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * being delivered to the currently executing task. */ - sdbg("rtcb=0x%p g_current_regs=0x%p\n", this_task(), g_current_regs); + sinfo("rtcb=0x%p g_current_regs=0x%p\n", this_task(), g_current_regs); if (tcb == this_task()) { diff --git a/arch/sh/src/m16c/m16c_serial.c b/arch/sh/src/m16c/m16c_serial.c index a366e3b57d399db91ac01473c474652f644338d4..4bc1f969ce6cd2ab4199b1d4d5d3e17ff8e44039 100644 --- a/arch/sh/src/m16c/m16c_serial.c +++ b/arch/sh/src/m16c/m16c_serial.c @@ -588,7 +588,7 @@ static int up_setup(struct uart_dev_s *dev) else #endif { - dbg("Invalid UART #\n"); + _err("ERROR: Invalid UART #\n"); } /* Set UART transmit/receive control register 1 to enable transmit and receive */ @@ -613,7 +613,7 @@ static int up_setup(struct uart_dev_s *dev) } else { - dbg("Invalid bits=%d\n", priv->bits); + _err("ERROR: Invalid bits=%d\n", priv->bits); } if (priv->parity != 0) @@ -665,7 +665,7 @@ static int up_setup(struct uart_dev_s *dev) else #endif { - dbg("Invalid UART #\n"); + _err("ERROR: Invalid UART #\n"); } /* Read any data left in the RX fifo */ @@ -872,7 +872,7 @@ static void m16c_rxint(struct up_dev_s *dev, bool enable) else #endif { - dbg("Invalid UART #\n"); + _err("ERROR: Invalid UART #\n"); return; } @@ -1027,7 +1027,7 @@ static void m16c_txint(struct up_dev_s *dev, bool enable) else #endif { - dbg("Invalid UART #\n"); + _err("ERROR: Invalid UART #\n"); return; } diff --git a/arch/sh/src/m16c/m16c_sigdeliver.c b/arch/sh/src/m16c/m16c_sigdeliver.c index 3b595ed7ef7d94bc591ad2000f04e0d1770e2353..40976346f3dcea748084a2bb1dae345612cec363 100644 --- a/arch/sh/src/m16c/m16c_sigdeliver.c +++ b/arch/sh/src/m16c/m16c_sigdeliver.c @@ -95,7 +95,7 @@ void up_sigdeliver(void) board_autoled_on(LED_SIGNAL); - sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", + sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); ASSERT(rtcb->xcp.sigdeliver != NULL); @@ -128,7 +128,7 @@ void up_sigdeliver(void) * errno that is needed by the user logic (it is probably EINTR). */ - sdbg("Resuming\n"); + sinfo("Resuming\n"); (void)up_irq_save(); rtcb->pterrno = saved_errno; diff --git a/arch/sh/src/sh1/sh1_dumpstate.c b/arch/sh/src/sh1/sh1_dumpstate.c index ad165c4d2c87cecc85f400d2b45193e108cab261..e9b0e59078479efa09d760819f4bdea9bee36d12 100644 --- a/arch/sh/src/sh1/sh1_dumpstate.c +++ b/arch/sh/src/sh1/sh1_dumpstate.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/sh/src/sh1/sh1_assert.c * - * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009, 2011, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -39,13 +39,6 @@ #include -/* Output debug info -- even if debug is not selected. */ - -#undef CONFIG_DEBUG -#undef CONFIG_DEBUG_VERBOSE -#define CONFIG_DEBUG 1 -#define CONFIG_DEBUG_VERBOSE 1 - #include #include @@ -58,14 +51,6 @@ #ifdef CONFIG_ARCH_STACKDUMP -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -99,7 +84,7 @@ static void sh1_stackdump(uint32_t sp, uint32_t stack_base) for (stack = sp & ~0x1f; stack < stack_base; stack += 32) { uint32_t *ptr = (uint32_t*)stack; - lldbg("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n", + _alert("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n", stack, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7]); } @@ -119,17 +104,17 @@ static inline void sh1_registerdump(void) { /* Yes.. dump the interrupt registers */ - lldbg("PC: %08x SR=%08x\n", + _alert("PC: %08x SR=%08x\n", ptr[REG_PC], ptr[REG_SR]); - lldbg("PR: %08x GBR: %08x MACH: %08x MACL: %08x\n", + _alert("PR: %08x GBR: %08x MACH: %08x MACL: %08x\n", ptr[REG_PR], ptr[REG_GBR], ptr[REG_MACH], ptr[REG_MACL]); - lldbg("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n", 0, + _alert("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n", 0, ptr[REG_R0], ptr[REG_R1], ptr[REG_R2], ptr[REG_R3], ptr[REG_R4], ptr[REG_R5], ptr[REG_R6], ptr[REG_R7]); - lldbg("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n", 8, + _alert("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n", 8, ptr[REG_R8], ptr[REG_R9], ptr[REG_R10], ptr[REG_R11], ptr[REG_R12], ptr[REG_R13], ptr[REG_R14], ptr[REG_R15]); } @@ -175,10 +160,10 @@ void up_dumpstate(void) /* Show interrupt stack info */ - lldbg("sp: %08x\n", sp); - lldbg("IRQ stack:\n"); - lldbg(" base: %08x\n", istackbase); - lldbg(" size: %08x\n", istacksize); + _alert("sp: %08x\n", sp); + _alert("IRQ stack:\n"); + _alert(" base: %08x\n", istackbase); + _alert(" size: %08x\n", istacksize); /* Does the current stack pointer lie within the interrupt * stack? @@ -195,18 +180,18 @@ void up_dumpstate(void) */ sp = g_intstackbase; - lldbg("sp: %08x\n", sp); + _alert("sp: %08x\n", sp); } /* Show user stack info */ - lldbg("User stack:\n"); - lldbg(" base: %08x\n", ustackbase); - lldbg(" size: %08x\n", ustacksize); + _alert("User stack:\n"); + _alert(" base: %08x\n", ustackbase); + _alert(" size: %08x\n", ustacksize); #else - lldbg("sp: %08x\n", sp); - lldbg("stack base: %08x\n", ustackbase); - lldbg("stack size: %08x\n", ustacksize); + _alert("sp: %08x\n", sp); + _alert("stack base: %08x\n", ustackbase); + _alert("stack size: %08x\n", ustacksize); #endif /* Dump the user stack if the stack pointer lies within the allocated user @@ -216,7 +201,7 @@ void up_dumpstate(void) if (sp > ustackbase || sp <= ustackbase - ustacksize) { #if !defined(CONFIG_ARCH_INTERRUPTSTACK) || CONFIG_ARCH_INTERRUPTSTACK < 4 - lldbg("ERROR: Stack pointer is not within allocated stack\n"); + _alert("ERROR: Stack pointer is not within allocated stack\n"); #endif } else diff --git a/arch/sh/src/sh1/sh1_head.S b/arch/sh/src/sh1/sh1_head.S index 9bb4efb1f5e17e6c4618b4d6fbc5ffda76d60f2d..e46522da8851794a4d977de14c3adfd51a213a57 100644 --- a/arch/sh/src/sh1/sh1_head.S +++ b/arch/sh/src/sh1/sh1_head.S @@ -67,7 +67,7 @@ #ifdef CONFIG_ARCH_LEDS .globl _board_autoled_initialize /* Boot LED setup */ #endif -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES .globl _up_lowputc /* Low-level debug output */ #endif .globl _os_start /* NuttX entry point */ @@ -161,7 +161,7 @@ *****************************************************************************/ .macro showprogress, code -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES mov.l .Llowputc, r0 /* Address of up_earlyconsoleinit */ jsr @r0 /* Call it */ mov #\code, r4 /* Delay slot */ @@ -488,7 +488,7 @@ __start0: #endif .Llowsetup: .long _up_lowsetup -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES .Llowputc: .long _up_lowputc #endif diff --git a/arch/sh/src/sh1/sh1_irq.c b/arch/sh/src/sh1/sh1_irq.c index 58514a257444c385621964b5dea0d6997c56f5d6..bb5987734026786845e220eecf76450f4ce54895 100644 --- a/arch/sh/src/sh1/sh1_irq.c +++ b/arch/sh/src/sh1/sh1_irq.c @@ -92,10 +92,10 @@ void up_prioritize_irq(int irq, int priority) uint32_t reg; int shift; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if ((unsigned) irq > NR_IRQS || (unsigned)priority > 15) { - dbg("Invalid parameters\n"); + _err("ERROR: Invalid parameters\n"); return; } #endif @@ -260,7 +260,7 @@ void up_prioritize_irq(int irq, int priority) #endif default: - dbg("Invalid irq=%d\n", irq); + _err("ERROR: Invalid irq=%d\n", irq); return; } diff --git a/arch/sh/src/sh1/sh1_schedulesigaction.c b/arch/sh/src/sh1/sh1_schedulesigaction.c index 4c6e7c16595cd8d5cba63d37dfac39ec7ef5566d..11c241ddea36204814ecbc46447d406855f084ab 100644 --- a/arch/sh/src/sh1/sh1_schedulesigaction.c +++ b/arch/sh/src/sh1/sh1_schedulesigaction.c @@ -93,7 +93,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) { irqstate_t flags; - sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver); + sinfo("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver); /* Make sure that interrupts are disabled */ @@ -107,7 +107,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * being delivered to the currently executing task. */ - sdbg("rtcb=0x%p g_current_regs=0x%p\n", this_task(), g_current_regs); + sinfo("rtcb=0x%p g_current_regs=0x%p\n", this_task(), g_current_regs); if (tcb == this_task()) { diff --git a/arch/sh/src/sh1/sh1_sigdeliver.c b/arch/sh/src/sh1/sh1_sigdeliver.c index eead3c06f256866b088bdbe85d497cc3e0a1ab52..85b8f57978dd43fc35751f03888b8e620b52dec3 100644 --- a/arch/sh/src/sh1/sh1_sigdeliver.c +++ b/arch/sh/src/sh1/sh1_sigdeliver.c @@ -95,7 +95,7 @@ void up_sigdeliver(void) board_autoled_on(LED_SIGNAL); - sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", + sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); ASSERT(rtcb->xcp.sigdeliver != NULL); @@ -127,7 +127,7 @@ void up_sigdeliver(void) * errno that is needed by the user logic (it is probably EINTR). */ - sdbg("Resuming\n"); + sinfo("Resuming\n"); (void)up_irq_save(); rtcb->pterrno = saved_errno; diff --git a/arch/sim/src/board_lcd.c b/arch/sim/src/board_lcd.c index 3760aa195e57a70cb900126ae84c8cd73a1099c3..0467c77b9f4a72b68501b309ef2e572debab677d 100644 --- a/arch/sim/src/board_lcd.c +++ b/arch/sim/src/board_lcd.c @@ -100,27 +100,6 @@ # error "Unsupported BPP" #endif -/* Debug ********************************************************************/ -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must - * also be enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg(format, ...) vdbg(format, ##__VA_ARGS__) -#else -# define lcddbg(x...) -#endif - /**************************************************************************** * Private Type Definition ****************************************************************************/ @@ -257,7 +236,7 @@ static struct sim_dev_s g_lcddev = static int sim_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer, size_t npixels) { - lcddbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); return OK; } @@ -278,7 +257,7 @@ static int sim_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer, static int sim_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, size_t npixels) { - lcddbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); return -ENOSYS; } @@ -294,7 +273,7 @@ static int sim_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); - gvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n", + ginfo("fmt: %d xres: %d yres: %d nplanes: %d\n", g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes); memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s)); return OK; @@ -312,7 +291,7 @@ static int sim_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, FAR struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(dev && pinfo && planeno == 0); - gvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); + ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); return OK; } @@ -328,7 +307,7 @@ static int sim_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, static int sim_getpower(struct lcd_dev_s *dev) { - gvdbg("power: %d\n", 0); + ginfo("power: %d\n", 0); return g_lcddev.power; } @@ -344,7 +323,7 @@ static int sim_getpower(struct lcd_dev_s *dev) static int sim_setpower(struct lcd_dev_s *dev, int power) { - gvdbg("power: %d\n", power); + ginfo("power: %d\n", power); DEBUGASSERT(power <= CONFIG_LCD_MAXPOWER); /* Set new power level */ @@ -363,7 +342,7 @@ static int sim_setpower(struct lcd_dev_s *dev, int power) static int sim_getcontrast(struct lcd_dev_s *dev) { - gvdbg("Not implemented\n"); + ginfo("Not implemented\n"); return -ENOSYS; } @@ -377,7 +356,7 @@ static int sim_getcontrast(struct lcd_dev_s *dev) static int sim_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) { - gvdbg("contrast: %d\n", contrast); + ginfo("contrast: %d\n", contrast); return -ENOSYS; } @@ -397,7 +376,7 @@ static int sim_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) int board_lcd_initialize(void) { - gvdbg("Initializing\n"); + ginfo("Initializing\n"); return OK; } diff --git a/arch/sim/src/up_blocktask.c b/arch/sim/src/up_blocktask.c index ccc39204896f78461f88f906752c6a8b3276406f..27223b19c3bc902fbb2758f8a7bc16aa114b6785 100644 --- a/arch/sim/src/up_blocktask.c +++ b/arch/sim/src/up_blocktask.c @@ -83,7 +83,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && (tcb->task_state <= LAST_READY_TO_RUN_STATE)); - sdbg("Blocking TCB=%p\n", tcb); + //sinfo("Blocking TCB=%p\n", tcb); /* Remove the tcb task from the ready-to-run list. If we * are blocking the task at the head of the task list (the @@ -127,7 +127,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) */ rtcb = this_task(); - sdbg("New Active Task TCB=%p\n", rtcb); + sinfo("New Active Task TCB=%p\n", rtcb); /* The way that we handle signals in the simulation is kind of * a kludge. This would be unsafe in a truly multi-threaded, interrupt @@ -136,7 +136,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state) if (rtcb->xcp.sigdeliver) { - sdbg("Delivering signals TCB=%p\n", rtcb); + sinfo("Delivering signals TCB=%p\n", rtcb); ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); rtcb->xcp.sigdeliver = NULL; } diff --git a/arch/sim/src/up_deviceimage.c b/arch/sim/src/up_deviceimage.c index f50944bd2e1e9772811fdd8ac7108e6c3060b31c..bf3ccc0dc27c81af5cd683df039ea0184d973ca0 100644 --- a/arch/sim/src/up_deviceimage.c +++ b/arch/sim/src/up_deviceimage.c @@ -58,7 +58,7 @@ ****************************************************************************/ #ifdef VFAT_STANDALONE -# define sdbg(format, ...) printf(format, ##__VA_ARGS__) +# define serr(format, ...) printf(format, ##__VA_ARGS__) # define kmm_malloc(size) malloc(size) # define kmm_free(mem) free(mem) #endif @@ -223,7 +223,7 @@ char *up_deviceimage(void) ret = inflateInit(&strm); if (ret != Z_OK) { - sdbg("inflateInit FAILED: ret=%d msg=\"%s\"\n", + serr("ERROR: inflateInit FAILED: ret=%d msg=\"%s\"\n", ret, strm.msg ? strm.msg : "No message"); return NULL; } @@ -260,7 +260,7 @@ char *up_deviceimage(void) case Z_DATA_ERROR: case Z_MEM_ERROR: case Z_STREAM_ERROR: - sdbg("inflate FAILED: ret=%d msg=\"%s\"\n", + serr("ERROR: inflate FAILED: ret=%d msg=\"%s\"\n", ret, strm.msg ? strm.msg : "No message"); (void)inflateEnd(&strm); kmm_free(pbuffer); diff --git a/arch/sim/src/up_elf.c b/arch/sim/src/up_elf.c index ecc4f2d2fee18f22d11de17e5ad2c308ee4a5466..bba6010ac9abc729776848881899644850c9914f 100644 --- a/arch/sim/src/up_elf.c +++ b/arch/sim/src/up_elf.c @@ -138,7 +138,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym, uintptr_t addr) { - bdbg("Not supported\n"); + berr("ERROR: Not supported\n"); return -ENOSYS; } diff --git a/arch/sim/src/up_exit.c b/arch/sim/src/up_exit.c index a022405d762deab1395f3804e2f65c425f427ebb..2a17a8075b8bb4f3d48dda2fad052a8f24293100 100644 --- a/arch/sim/src/up_exit.c +++ b/arch/sim/src/up_exit.c @@ -67,7 +67,7 @@ void _exit(int status) { FAR struct tcb_s *tcb; - sdbg("TCB=%p exiting\n", tcb); + sinfo("TCB=%p exiting\n", tcb); /* Destroy the task at the head of the ready to run list. */ @@ -78,7 +78,7 @@ void _exit(int status) */ tcb = this_task(); - sdbg("New Active Task TCB=%p\n", tcb); + sinfo("New Active Task TCB=%p\n", tcb); /* The way that we handle signals in the simulation is kind of * a kludge. This would be unsafe in a truly multi-threaded, interrupt @@ -87,7 +87,7 @@ void _exit(int status) if (tcb->xcp.sigdeliver) { - sdbg("Delivering signals TCB=%p\n", tcb); + sinfo("Delivering signals TCB=%p\n", tcb); ((sig_deliver_t)tcb->xcp.sigdeliver)(tcb); tcb->xcp.sigdeliver = NULL; } @@ -96,4 +96,3 @@ void _exit(int status) up_longjmp(tcb->xcp.regs, 1); } - diff --git a/arch/sim/src/up_framebuffer.c b/arch/sim/src/up_framebuffer.c index 847fcd0b6a76a18d296845dd6ab09545109ed5e5..1de73fd514fd2f4587eaad1a6857c656f658df28 100644 --- a/arch/sim/src/up_framebuffer.c +++ b/arch/sim/src/up_framebuffer.c @@ -191,13 +191,14 @@ struct fb_vtable_s g_fbobject = static int up_getvideoinfo(FAR struct fb_vtable_s *vtable, FAR struct fb_videoinfo_s *vinfo) { - dbg("vtable=%p vinfo=%p\n", vtable, vinfo); + _info("vtable=%p vinfo=%p\n", vtable, vinfo); if (vtable && vinfo) { memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s)); return OK; } - dbg("Returning EINVAL\n"); + + _err("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -208,13 +209,14 @@ static int up_getvideoinfo(FAR struct fb_vtable_s *vtable, static int up_getplaneinfo(FAR struct fb_vtable_s *vtable, int planeno, FAR struct fb_planeinfo_s *pinfo) { - dbg("vtable=%p planeno=%d pinfo=%p\n", vtable, planeno, pinfo); + _info("vtable=%p planeno=%d pinfo=%p\n", vtable, planeno, pinfo); if (vtable && planeno == 0 && pinfo) { memcpy(pinfo, &g_planeinfo, sizeof(struct fb_planeinfo_s)); return OK; } - dbg("Returning EINVAL\n"); + + _err("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -228,7 +230,7 @@ static int up_getcmap(FAR struct fb_vtable_s *vtable, FAR struct fb_cmap_s *cmap int len; int i; - dbg("vtable=%p cmap=%p len=%d\n", vtable, cmap, cmap->len); + _info("vtable=%p cmap=%p len=%d\n", vtable, cmap, cmap->len); if (vtable && cmap) { for (i = cmap->first, len = 0; i < 256 && len < cmap->len; i++, len++) @@ -244,7 +246,8 @@ static int up_getcmap(FAR struct fb_vtable_s *vtable, FAR struct fb_cmap_s *cmap cmap->len = len; return OK; } - dbg("Returning EINVAL\n"); + + _err("ERROR: Returning EINVAL\n"); return -EINVAL; } #endif @@ -259,12 +262,13 @@ static int up_putcmap(FAR struct fb_vtable_s *vtable, FAR const struct fb_cmap_s #ifdef CONFIG_SIM_X11FB return up_x11cmap(cmap->first, cmap->len, cmap->red, cmap->green, cmap->blue, NULL); #else - dbg("vtable=%p cmap=%p len=%d\n", vtable, cmap, cmap->len); + _info("vtable=%p cmap=%p len=%d\n", vtable, cmap, cmap->len); if (vtable && cmap) { return OK; } - dbg("Returning EINVAL\n"); + + _err("ERROR: Returning EINVAL\n"); return -EINVAL; #endif } @@ -278,23 +282,24 @@ static int up_putcmap(FAR struct fb_vtable_s *vtable, FAR const struct fb_cmap_s static int up_getcursor(FAR struct fb_vtable_s *vtable, FAR struct fb_cursorattrib_s *attrib) { - dbg("vtable=%p attrib=%p\n", vtable, attrib); + _info("vtable=%p attrib=%p\n", vtable, attrib); if (vtable && attrib) { #ifdef CONFIG_FB_HWCURSORIMAGE attrib->fmt = FB_FMT; #endif - dbg("pos: (x=%d, y=%d)\n", g_cpos.x, g_cpos.y); + _info("pos: (x=%d, y=%d)\n", g_cpos.x, g_cpos.y); attrib->pos = g_cpos; #ifdef CONFIG_FB_HWCURSORSIZE attrib->mxsize.h = CONFIG_SIM_FBHEIGHT; attrib->mxsize.w = CONFIG_SIM_FBWIDTH; - dbg("size: (h=%d, w=%d)\n", g_csize.h, g_csize.w); + _info("size: (h=%d, w=%d)\n", g_csize.h, g_csize.w); attrib->size = g_csize; #endif return OK; } - dbg("Returning EINVAL\n"); + + _err("ERROR: Returning EINVAL\n"); return -EINVAL; } #endif @@ -307,32 +312,33 @@ static int up_getcursor(FAR struct fb_vtable_s *vtable, static int up_setcursor(FAR struct fb_vtable_s *vtable, FAR struct fb_setcursor_s *setttings) { - dbg("vtable=%p setttings=%p\n", vtable, setttings); + _info("vtable=%p setttings=%p\n", vtable, setttings); if (vtable && setttings) { - dbg("flags: %02x\n", settings->flags); + _info("flags: %02x\n", settings->flags); if ((flags & FB_CUR_SETPOSITION) != 0) { g_cpos = settings->pos; - dbg("pos: (h:%d, w:%d)\n", g_cpos.x, g_cpos.y); + _info("pos: (h:%d, w:%d)\n", g_cpos.x, g_cpos.y); } #ifdef CONFIG_FB_HWCURSORSIZE if ((flags & FB_CUR_SETSIZE) != 0) { g_csize = settings->size; - dbg("size: (h:%d, w:%d)\n", g_csize.h, g_csize.w); + _info("size: (h:%d, w:%d)\n", g_csize.h, g_csize.w); } #endif #ifdef CONFIG_FB_HWCURSORIMAGE if ((flags & FB_CUR_SETIMAGE) != 0) { - dbg("image: (h:%d, w:%d) @ %p\n", - settings->img.height, settings->img.width, settings->img.image); + _info("image: (h:%d, w:%d) @ %p\n", + settings->img.height, settings->img.width, settings->img.image); } #endif return OK; } - dbg("Returning EINVAL\n"); + + _err("ERROR: Returning EINVAL\n"); return -EINVAL; } #endif diff --git a/arch/sim/src/up_initialize.c b/arch/sim/src/up_initialize.c index 7efcfb237382ea1ecb5b6189624fbc3d944c642a..cb07619eabd0f74fa47b42551e58ae99944674a8 100644 --- a/arch/sim/src/up_initialize.c +++ b/arch/sim/src/up_initialize.c @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include "up_internal.h" @@ -162,18 +162,18 @@ void up_initialize(void) /* Register a console (or not) */ up_devconsole(); /* Our private /dev/console */ -#elif defined(CONFIG_SYSLOG_CONSOLE) +#elif defined(CONFIG_CONSOLE_SYSLOG) syslog_console_init(); #elif defined(CONFIG_RAMLOG_CONSOLE) ramlog_consoleinit(); #endif -#ifdef CONFIG_SYSLOG_CHAR - syslog_initialize(); -#endif -#ifdef CONFIG_RAMLOG_SYSLOG - ramlog_sysloginit(); /* System logging device */ -#endif + /* Early initialization of the system logging device. Some SYSLOG channel + * can be initialized early in the initialization sequence because they + * depend on only minimal OS initialization. + */ + + syslog_initialize(SYSLOG_INIT_EARLY); #if defined(CONFIG_FS_FAT) && !defined(CONFIG_DISABLE_MOUNTPOINT) up_registerblockdevice(); /* Our FAT ramdisk at /dev/ram0 */ diff --git a/arch/sim/src/up_internal.h b/arch/sim/src/up_internal.h index ddae194a6a1abdfd3c6a40f4eaf12763b1c94089..f163e67a25497bf793291e518191025a679f4b9f 100644 --- a/arch/sim/src/up_internal.h +++ b/arch/sim/src/up_internal.h @@ -96,13 +96,6 @@ # endif #endif -/* Determine which device to use as the system logging device */ - -#ifndef CONFIG_SYSLOG -# undef CONFIG_SYSLOG_CHAR -# undef CONFIG_RAMLOG_SYSLOG -#endif - /* The design for how we signal UART data availability is up in the air */ #undef CONFIG_SIM_UART_DATAPOST diff --git a/arch/sim/src/up_netdriver.c b/arch/sim/src/up_netdriver.c index c785f4974604edaf82ede354b378a6a1d07b7b3a..1e7ef5345cf64cede285ad22f5bd4132961ffc2c 100644 --- a/arch/sim/src/up_netdriver.c +++ b/arch/sim/src/up_netdriver.c @@ -213,7 +213,7 @@ void netdriver_loop(void) #ifdef CONFIG_NET_IPv4 if (eth->type == HTONS(ETHTYPE_IP) && is_ours) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); /* Handle ARP on input then give the IPv4 packet to the network * layer @@ -254,7 +254,7 @@ void netdriver_loop(void) #ifdef CONFIG_NET_IPv6 if (eth->type == HTONS(ETHTYPE_IP6) && is_ours) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); /* Give the IPv6 packet to the network layer */ diff --git a/arch/sim/src/up_releasepending.c b/arch/sim/src/up_releasepending.c index 386b58589a38143e6bd5bb24baf9c0e30c3fa70b..7a1df748279a7e838e8ba5afb739a20da55fdf92 100644 --- a/arch/sim/src/up_releasepending.c +++ b/arch/sim/src/up_releasepending.c @@ -66,7 +66,7 @@ void up_release_pending(void) { FAR struct tcb_s *rtcb = this_task(); - sdbg("From TCB=%p\n", rtcb); + sinfo("From TCB=%p\n", rtcb); /* Merge the g_pendingtasks list into the ready-to-run task list */ @@ -93,7 +93,7 @@ void up_release_pending(void) */ rtcb = this_task(); - sdbg("New Active Task TCB=%p\n", rtcb); + sinfo("New Active Task TCB=%p\n", rtcb); /* The way that we handle signals in the simulation is kind of * a kludge. This would be unsafe in a truly multi-threaded, interrupt @@ -102,7 +102,7 @@ void up_release_pending(void) if (rtcb->xcp.sigdeliver) { - sdbg("Delivering signals TCB=%p\n", rtcb); + sinfo("Delivering signals TCB=%p\n", rtcb); ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); rtcb->xcp.sigdeliver = NULL; } diff --git a/arch/sim/src/up_reprioritizertr.c b/arch/sim/src/up_reprioritizertr.c index 39c981c64838ee87872b0517939a4b040d05aa55..048c311559607353625a2e62729997eb22b7ed5a 100644 --- a/arch/sim/src/up_reprioritizertr.c +++ b/arch/sim/src/up_reprioritizertr.c @@ -95,7 +95,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) FAR struct tcb_s *rtcb = this_task(); bool switch_needed; - sdbg("TCB=%p PRI=%d\n", tcb, priority); + sinfo("TCB=%p PRI=%d\n", tcb, priority); /* Remove the tcb task from the ready-to-run list. * sched_removereadytorun will return true if we just @@ -148,7 +148,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) */ rtcb = this_task(); - sdbg("New Active Task TCB=%p\n", rtcb); + sinfo("New Active Task TCB=%p\n", rtcb); /* The way that we handle signals in the simulation is kind of * a kludge. This would be unsafe in a truly multi-threaded, interrupt @@ -157,7 +157,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) if (rtcb->xcp.sigdeliver) { - sdbg("Delivering signals TCB=%p\n", rtcb); + sinfo("Delivering signals TCB=%p\n", rtcb); ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); rtcb->xcp.sigdeliver = NULL; } diff --git a/arch/sim/src/up_schednote.c b/arch/sim/src/up_schednote.c index 41797969b2c3ae7680a4e1092a4a55f85dbcd152..28e2fd8fbf039fee657ab79727d6836138393cca 100644 --- a/arch/sim/src/up_schednote.c +++ b/arch/sim/src/up_schednote.c @@ -68,19 +68,19 @@ void sched_note_start(FAR struct tcb_s *tcb) { #ifdef CONFIG_SMP #if CONFIG_TASK_NAME_SIZE > 0 - lowsyslog(LOG_INFO, "CPU%d: Start %s, TCB@%p, state=%d\n", - tcb->cpu, tcb->name, tcb, tcb->task_state); + syslog(LOG_INFO, "CPU%d: Start %s, TCB@%p, state=%d\n", + tcb->cpu, tcb->name, tcb, tcb->task_state); #else - lowsyslog(LOG_INFO, "CPU%d: Start TCB@%p, state=%d\n" - tcb->cpu, tcb, tcb->task_state); + syslog(LOG_INFO, "CPU%d: Start TCB@%p, state=%d\n" + tcb->cpu, tcb, tcb->task_state); #endif #else #if CONFIG_TASK_NAME_SIZE > 0 - lowsyslog(LOG_INFO, "Start %s, TCB@%p, state=%d\n", - tcb->name, tcb, tcb->task_state); + syslog(LOG_INFO, "Start %s, TCB@%p, state=%d\n", + tcb->name, tcb, tcb->task_state); #else - lowsyslog(LOG_INFO, "Start TCB@%p, state=%d\n", - tcb, tcb->task_state); + syslog(LOG_INFO, "Start TCB@%p, state=%d\n", + tcb, tcb->task_state); #endif #endif } @@ -89,19 +89,19 @@ void sched_note_stop(FAR struct tcb_s *tcb) { #ifdef CONFIG_SMP #if CONFIG_TASK_NAME_SIZE > 0 - lowsyslog(LOG_INFO, "CPU%d: Stop %s, TCB@%p, state=%d\n", - tcb->cpu, tcb->name, tcb, tcb->task_state); + syslog(LOG_INFO, "CPU%d: Stop %s, TCB@%p, state=%d\n", + tcb->cpu, tcb->name, tcb, tcb->task_state); #else - lowsyslog(LOG_INFO, "CPU%d: Stop TCB@%p, state=%d\n", - tcb->cpu, tcb, tcb->task_state); + syslog(LOG_INFO, "CPU%d: Stop TCB@%p, state=%d\n", + tcb->cpu, tcb, tcb->task_state); #endif #else #if CONFIG_TASK_NAME_SIZE > 0 - lowsyslog(LOG_INFO, "Stop %s, TCB@%p, state=%d\n", - tcb->name, tcb, tcb->task_state); + syslog(LOG_INFO, "Stop %s, TCB@%p, state=%d\n", + tcb->name, tcb, tcb->task_state); #else - lowsyslog(LOG_INFO, "Stop TCB@%p, state=%d\n", - tcb, tcb->task_state); + syslog(LOG_INFO, "Stop TCB@%p, state=%d\n", + tcb, tcb->task_state); #endif #endif } @@ -110,19 +110,19 @@ void sched_note_suspend(FAR struct tcb_s *tcb) { #ifdef CONFIG_SMP #if CONFIG_TASK_NAME_SIZE > 0 - lowsyslog(LOG_INFO, "CPU%d: Suspend %s, TCB@%p, state=%d\n", - tcb->cpu, tcb->name, tcb, tcb->task_state); + syslog(LOG_INFO, "CPU%d: Suspend %s, TCB@%p, state=%d\n", + tcb->cpu, tcb->name, tcb, tcb->task_state); #else - lowsyslog(LOG_INFO, "CPU%d: Suspend TCB@%p, state=%d\n", - tcb->cpu, tcb, tcb->task_state); + syslog(LOG_INFO, "CPU%d: Suspend TCB@%p, state=%d\n", + tcb->cpu, tcb, tcb->task_state); #endif #else #if CONFIG_TASK_NAME_SIZE > 0 - lowsyslog(LOG_INFO, "Suspend %s, TCB@%p, state=%d\n", - tcb->name, tcb, tcb->task_state); + syslog(LOG_INFO, "Suspend %s, TCB@%p, state=%d\n", + tcb->name, tcb, tcb->task_state); #else - lowsyslog(LOG_INFO, "Suspend TCB@%p, state=%d\n", - tcb, tcb->task_state); + syslog(LOG_INFO, "Suspend TCB@%p, state=%d\n", + tcb, tcb->task_state); #endif #endif } @@ -131,19 +131,19 @@ void sched_note_resume(FAR struct tcb_s *tcb) { #ifdef CONFIG_SMP #if CONFIG_TASK_NAME_SIZE > 0 - lowsyslog(LOG_INFO, "CPU%d: Resume %s, TCB@%p, state=%d\n", - tcb->cpu, tcb->name, tcb, tcb->task_state); + syslog(LOG_INFO, "CPU%d: Resume %s, TCB@%p, state=%d\n", + tcb->cpu, tcb->name, tcb, tcb->task_state); #else - lowsyslog(LOG_INFO, "CPU%d: Resume TCB@%p, state=%d\n", - tcb->cpu, tcb, tcb->task_state); + syslog(LOG_INFO, "CPU%d: Resume TCB@%p, state=%d\n", + tcb->cpu, tcb, tcb->task_state); #endif #else #if CONFIG_TASK_NAME_SIZE > 0 - lowsyslog(LOG_INFO, "Resume %s, TCB@%p, state=%d\n", - tcb->name, tcb, tcb->task_state); + syslog(LOG_INFO, "Resume %s, TCB@%p, state=%d\n", + tcb->name, tcb, tcb->task_state); #else - lowsyslog(LOG_INFO, "Resume TCB@%p, state=%d\n", - tcb, tcb->task_state); + syslog(LOG_INFO, "Resume TCB@%p, state=%d\n", + tcb, tcb->task_state); #endif #endif } @@ -160,19 +160,19 @@ void sched_note_premption(FAR struct tcb_s *tcb, bool locked) { #ifdef CONFIG_SMP #if CONFIG_TASK_NAME_SIZE > 0 - lowsyslog(LOG_INFO, "CPU%d: Task %s TCB@%p preemption %s\n", - tcb->cpu, tcb->name, tcb, locked ? "LOCKED" : "UNLOCKED"); + syslog(LOG_INFO, "CPU%d: Task %s TCB@%p preemption %s\n", + tcb->cpu, tcb->name, tcb, locked ? "LOCKED" : "UNLOCKED"); #else - lowsyslog(LOG_INFO, "CPU%d: TCB@%p preemption %s\n", - tcb->cpu, tcb, locked ? "LOCKED" : "UNLOCKED"); + syslog(LOG_INFO, "CPU%d: TCB@%p preemption %s\n", + tcb->cpu, tcb, locked ? "LOCKED" : "UNLOCKED"); #endif #else #if CONFIG_TASK_NAME_SIZE > 0 - lowsyslog(LOG_INFO, "Task %s, TCB@%p preemption %s\n", - tcb->name, tcb, locked ? "LOCKED" : "UNLOCKED"); + syslog(LOG_INFO, "Task %s, TCB@%p preemption %s\n", + tcb->name, tcb, locked ? "LOCKED" : "UNLOCKED"); #else - lowsyslog(LOG_INFO, "TCB@%p preemption %s\n", - tcb, locked ? "LOCKED" : "UNLOCKED"); + syslog(LOG_INFO, "TCB@%p preemption %s\n", + tcb, locked ? "LOCKED" : "UNLOCKED"); #endif #endif } @@ -190,19 +190,19 @@ void sched_note_csection(FAR struct tcb_s *tcb, bool enter) { #ifdef CONFIG_SMP #if CONFIG_TASK_NAME_SIZE > 0 - lowsyslog(LOG_INFO, "CPU%d: Task %s TCB@%p critical section %s\n", - tcb->cpu, tcb->name, tcb, enter ? "ENTER" : "LEAVE"); + syslog(LOG_INFO, "CPU%d: Task %s TCB@%p critical section %s\n", + tcb->cpu, tcb->name, tcb, enter ? "ENTER" : "LEAVE"); #else - lowsyslog(LOG_INFO, "CPU%d: TCB@%p critical section %s\n", - tcb->cpu, tcb, enter ? "ENTER" : "LEAVE"); + syslog(LOG_INFO, "CPU%d: TCB@%p critical section %s\n", + tcb->cpu, tcb, enter ? "ENTER" : "LEAVE"); #endif #else #if CONFIG_TASK_NAME_SIZE > 0 - lowsyslog(LOG_INFO, "Task %s, TCB@%p critical section %s\n", - tcb->name, tcb, enter ? "ENTER" : "LEAVE"); + syslog(LOG_INFO, "Task %s, TCB@%p critical section %s\n", + tcb->name, tcb, enter ? "ENTER" : "LEAVE"); #else - lowsyslog(LOG_INFO, "TCB@%p critical section %s\n", - tcb, enter ? "ENTER" : "LEAVE"); + syslog(LOG_INFO, "TCB@%p critical section %s\n", + tcb, enter ? "ENTER" : "LEAVE"); #endif #endif } diff --git a/arch/sim/src/up_smpsignal.c b/arch/sim/src/up_smpsignal.c index 58582d0df96bcef5f868fe56602a2fe1afbee8b3..f921c7f3b4969ae6ea7b169988616ebce422383c 100644 --- a/arch/sim/src/up_smpsignal.c +++ b/arch/sim/src/up_smpsignal.c @@ -112,7 +112,7 @@ void sim_cpu_pause(int cpu, volatile spinlock_t *wait, if (rtcb->xcp.sigdeliver) { - sdbg("CPU%d: Delivering signals TCB=%p\n", cpu, rtcb); + sinfo("CPU%d: Delivering signals TCB=%p\n", cpu, rtcb); ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); rtcb->xcp.sigdeliver = NULL; } diff --git a/arch/sim/src/up_spiflash.c b/arch/sim/src/up_spiflash.c index 9c516972f0bf666d620da525bd0c4e0bf4567146..fa3862727e38deb2c6518b7a4684bec4a2953843 100644 --- a/arch/sim/src/up_spiflash.c +++ b/arch/sim/src/up_spiflash.c @@ -60,26 +60,6 @@ ************************************************************************************/ /* Configuration ********************************************************************/ -/* Debug ****************************************************************************/ -/* Check if (non-standard) SPI debug is enabled */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_SPI -#endif - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - /* Define the FLASH SIZE in bytes */ #ifdef CONFIG_SIM_SPIFLASH_1M @@ -479,7 +459,7 @@ static uint16_t spiflash_send(FAR struct spi_dev_s *dev, uint16_t wd) static void spiflash_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, FAR void *rxbuffer, size_t nwords) { - spivdbg("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); + spiinfo("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); /* 8-bit mode */ @@ -536,7 +516,7 @@ static void spiflash_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffe #ifndef CONFIG_SPI_EXCHANGE static void spiflash_sndblock(FAR struct spi_dev_s *dev, FAR const void *txbuffer, size_t nwords) { - spivdbg("txbuffer=%p nwords=%d\n", txbuffer, nwords); + spiinfo("txbuffer=%p nwords=%d\n", txbuffer, nwords); return spiflash_exchange(dev, txbuffer, NULL, nwords); } #endif @@ -565,7 +545,7 @@ static void spiflash_sndblock(FAR struct spi_dev_s *dev, FAR const void *txbuffe static void spiflash_recvblock(FAR struct spi_dev_s *dev, FAR void *rxbuffer, size_t nwords) { - spivdbg("rxbuffer=%p nwords=%d\n", rxbuffer, nwords); + spiinfo("rxbuffer=%p nwords=%d\n", rxbuffer, nwords); return spiflash_exchange(dev, NULL, rxbuffer, nwords); } #endif diff --git a/arch/sim/src/up_touchscreen.c b/arch/sim/src/up_touchscreen.c index 4b4e598f45f741ccc98088cec22ee38c7785adb4..a56870c8500a2758df273517cb131f8079021653 100644 --- a/arch/sim/src/up_touchscreen.c +++ b/arch/sim/src/up_touchscreen.c @@ -194,7 +194,7 @@ static void up_notify(FAR struct up_dev_s *priv) * that the read data is available. */ - ivdbg("contact=%d nwaiters=%d\n", priv->sample.contact, priv->nwaiters); + iinfo("contact=%d nwaiters=%d\n", priv->sample.contact, priv->nwaiters); if (priv->nwaiters > 0) { /* After posting this semaphore, we need to exit because the touchscreen @@ -217,7 +217,7 @@ static void up_notify(FAR struct up_dev_s *priv) if (fds) { fds->revents |= POLLIN; - ivdbg("Report events: %02x\n", fds->revents); + iinfo("Report events: %02x\n", fds->revents); sem_post(fds->sem); } } @@ -235,7 +235,7 @@ static int up_sample(FAR struct up_dev_s *priv, /* Is there new touchscreen sample data available? */ - ivdbg("penchange=%d contact=%d id=%d\n", + iinfo("penchange=%d contact=%d id=%d\n", priv->penchange, sample->contact, priv->id); if (priv->penchange) @@ -263,7 +263,7 @@ static int up_sample(FAR struct up_dev_s *priv, } priv->penchange = false; - ivdbg("penchange=%d contact=%d id=%d\n", + iinfo("penchange=%d contact=%d id=%d\n", priv->penchange, priv->sample.contact, priv->id); ret = OK; @@ -308,11 +308,11 @@ static int up_waitsample(FAR struct up_dev_s *priv, { /* Wait for a change in the touchscreen state */ - ivdbg("Waiting...\n"); + iinfo("Waiting...\n"); priv->nwaiters++; ret = sem_wait(&priv->waitsem); priv->nwaiters--; - ivdbg("Awakened...\n"); + iinfo("Awakened...\n"); if (ret < 0) { @@ -357,7 +357,7 @@ errout: static int up_open(FAR struct file *filep) { - ivdbg("Opening...\n"); + iinfo("Opening...\n"); return OK; } @@ -367,7 +367,7 @@ static int up_open(FAR struct file *filep) static int up_close(FAR struct file *filep) { - ivdbg("Closing...\n"); + iinfo("Closing...\n"); return OK; } @@ -383,7 +383,7 @@ static ssize_t up_read(FAR struct file *filep, FAR char *buffer, size_t len) struct up_sample_s sample; int ret; - ivdbg("len=%d\n", len); + iinfo("len=%d\n", len); DEBUGASSERT(filep); inode = filep->f_inode; @@ -480,7 +480,7 @@ static ssize_t up_read(FAR struct file *filep, FAR char *buffer, size_t len) ret = SIZEOF_TOUCH_SAMPLE_S(1); errout: - ivdbg("Returning %d\n", ret); + iinfo("Returning %d\n", ret); sem_post(&priv->devsem); return ret; } @@ -495,7 +495,7 @@ static int up_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR struct up_dev_s *priv; int ret; - ivdbg("cmd: %d arg: %ld\n", cmd, arg); + iinfo("cmd: %d arg: %ld\n", cmd, arg); DEBUGASSERT(filep); inode = filep->f_inode; @@ -539,7 +539,7 @@ static int up_poll(FAR struct file *filep, FAR struct pollfd *fds, int ret; int i; - ivdbg("setup: %d\n", (int)setup); + iinfo("setup: %d\n", (int)setup); DEBUGASSERT(filep && fds); inode = filep->f_inode; @@ -648,7 +648,7 @@ int board_tsc_setup(int minor) char devname[DEV_NAMELEN]; int ret; - ivdbg("minor: %d\n", minor); + iinfo("minor: %d\n", minor); /* Debug-only sanity checks */ @@ -665,12 +665,12 @@ int board_tsc_setup(int minor) /* Register the device as an input device */ (void)snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor); - ivdbg("Registering %s\n", devname); + iinfo("Registering %s\n", devname); ret = register_driver(devname, &up_fops, 0666, priv); if (ret < 0) { - idbg("register_driver() failed: %d\n", ret); + ierr("ERROR: register_driver() failed: %d\n", ret); goto errout_with_priv; } @@ -732,12 +732,12 @@ void board_tsc_teardown(void) /* Un-register the device */ (void)snprintf(devname, DEV_NAMELEN, DEV_FORMAT, priv->minor); - ivdbg("Un-registering %s\n", devname); + iinfo("Un-registering %s\n", devname); ret = unregister_driver(devname); if (ret < 0) { - idbg("uregister_driver() failed: %d\n", ret); + ierr("ERROR: uregister_driver() failed: %d\n", ret); } /* Clean up any resources. Ouch! While we are holding the semaphore? */ @@ -755,8 +755,8 @@ int up_buttonevent(int x, int y, int buttons) FAR struct up_dev_s *priv = (FAR struct up_dev_s *)&g_simtouchscreen; bool pendown; /* true: pen is down */ - ivdbg("x=%d y=%d buttons=%02x\n", x, y, buttons); - ivdbg("contact=%d nwaiters=%d\n", priv->sample.contact, priv->nwaiters); + iinfo("x=%d y=%d buttons=%02x\n", x, y, buttons); + iinfo("contact=%d nwaiters=%d\n", priv->sample.contact, priv->nwaiters); /* Any button press will count as pendown. */ diff --git a/arch/sim/src/up_unblocktask.c b/arch/sim/src/up_unblocktask.c index 148b551973bed735fa4302c10c50a87ebc830854..5217efeb8fbe8e4db28d9292b9c712f5788377bd 100644 --- a/arch/sim/src/up_unblocktask.c +++ b/arch/sim/src/up_unblocktask.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/sim/src/up_unblocktask.c * - * Copyright (C) 2007-2009, 2013, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2013, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -77,7 +77,7 @@ void up_unblock_task(FAR struct tcb_s *tcb) ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && (tcb->task_state <= LAST_BLOCKED_STATE)); - sdbg("Unblocking TCB=%p\n", tcb); + sinfo("Unblocking TCB=%p\n", tcb); /* Remove the task from the blocked task list */ @@ -107,7 +107,7 @@ void up_unblock_task(FAR struct tcb_s *tcb) */ rtcb = this_task(); - sdbg("New Active Task TCB=%p\n", rtcb); + sinfo("New Active Task TCB=%p\n", rtcb); /* The way that we handle signals in the simulation is kind of * a kludge. This would be unsafe in a truly multi-threaded, interrupt @@ -116,7 +116,7 @@ void up_unblock_task(FAR struct tcb_s *tcb) if (rtcb->xcp.sigdeliver) { - sdbg("Delivering signals TCB=%p\n", rtcb); + sinfo("Delivering signals TCB=%p\n", rtcb); ((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb); rtcb->xcp.sigdeliver = NULL; } diff --git a/arch/x86/src/common/up_assert.c b/arch/x86/src/common/up_assert.c index 32eb751c56d3c2b7c5fde27086101f97e1b10dc8..7afec4e4bec97bc679ea3a7346cc5e06d413f66e 100644 --- a/arch/x86/src/common/up_assert.c +++ b/arch/x86/src/common/up_assert.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/x86/src/common/up_assert.c * - * Copyright (C) 2011-2015 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 @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include #include @@ -76,19 +65,6 @@ # undef CONFIG_ARCH_USBDUMP #endif -/* The following is just intended to keep some ugliness out of the mainline - * code. We are going to print the task name if: - * - * CONFIG_TASK_NAME_SIZE > 0 && <-- The task has a name - * (defined(CONFIG_DEBUG) || <-- And the debug is enabled (lldbg used) - * defined(CONFIG_ARCH_STACKDUMP) <-- Or lowsyslog() is used - */ - -#undef CONFIG_PRINT_TASKNAME -#if CONFIG_TASK_NAME_SIZE > 0 && (defined(CONFIG_DEBUG) || defined(CONFIG_ARCH_STACKDUMP)) -# define CONFIG_PRINT_TASKNAME 1 -#endif - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -105,9 +81,9 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base) for (stack = sp & ~0x1f; stack < stack_base; stack += 32) { uint32_t *ptr = (uint32_t*)stack; - lldbg("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n", - stack, ptr[0], ptr[1], ptr[2], ptr[3], - ptr[4], ptr[5], ptr[6], ptr[7]); + _alert("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n", + stack, ptr[0], ptr[1], ptr[2], ptr[3], + ptr[4], ptr[5], ptr[6], ptr[7]); } } #else @@ -127,7 +103,7 @@ static int usbtrace_syslog(FAR const char *fmt, ...) /* Let vsyslog do the real work */ va_start(ap, fmt); - ret = lowvsyslog(LOG_INFO, fmt, ap); + ret = vsyslog(LOG_EMERG, fmt, ap); va_end(ap); return ret; } @@ -176,10 +152,10 @@ static void up_dumpstate(void) /* Show interrupt stack info */ - lldbg("sp: %08x\n", sp); - lldbg("IRQ stack:\n"); - lldbg(" base: %08x\n", istackbase); - lldbg(" size: %08x\n", istacksize); + _alert("sp: %08x\n", sp); + _alert("IRQ stack:\n"); + _alert(" base: %08x\n", istackbase); + _alert(" size: %08x\n", istacksize); /* Does the current stack pointer lie within the interrupt * stack? @@ -196,18 +172,18 @@ static void up_dumpstate(void) */ sp = g_intstackbase; - lldbg("sp: %08x\n", sp); + _alert("sp: %08x\n", sp); } /* Show user stack info */ - lldbg("User stack:\n"); - lldbg(" base: %08x\n", ustackbase); - lldbg(" size: %08x\n", ustacksize); + _alert("User stack:\n"); + _alert(" base: %08x\n", ustackbase); + _alert(" size: %08x\n", ustacksize); #else - lldbg("sp: %08x\n", sp); - lldbg("stack base: %08x\n", ustackbase); - lldbg("stack size: %08x\n", ustacksize); + _alert("sp: %08x\n", sp); + _alert("stack base: %08x\n", ustackbase); + _alert("stack size: %08x\n", ustacksize); #endif /* Dump the user stack if the stack pointer lies within the allocated user @@ -217,7 +193,7 @@ static void up_dumpstate(void) if (sp > ustackbase || sp <= ustackbase - ustacksize) { #if !defined(CONFIG_ARCH_INTERRUPTSTACK) || CONFIG_ARCH_INTERRUPTSTACK < 4 - lldbg("ERROR: Stack pointer is not within allocated stack\n"); + _alert("ERROR: Stack pointer is not within allocated stack\n"); #endif } else @@ -280,17 +256,17 @@ static void _up_assert(int errorcode) void up_assert(const uint8_t *filename, int lineno) { -#ifdef CONFIG_PRINT_TASKNAME +#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG_ALERT) struct tcb_s *rtcb = this_task(); #endif board_autoled_on(LED_ASSERTION); -#ifdef CONFIG_PRINT_TASKNAME - lldbg("Assertion failed at file:%s line: %d task: %s\n", +#if CONFIG_TASK_NAME_SIZE > 0 + _alert("Assertion failed at file:%s line: %d task: %s\n", filename, lineno, rtcb->name); #else - lldbg("Assertion failed at file:%s line: %d\n", + _alert("Assertion failed at file:%s line: %d\n", filename, lineno); #endif diff --git a/arch/x86/src/common/up_elf.c b/arch/x86/src/common/up_elf.c index 894f8657864a6f03033bda7bff7d2ddb46307227..7f169dee739ccb55cbf94e6fb26f7f3df725e759 100644 --- a/arch/x86/src/common/up_elf.c +++ b/arch/x86/src/common/up_elf.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/x86/src/up_elf.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 @@ -146,7 +146,6 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym, int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym, uintptr_t addr) { - bdbg("Not supported\n"); + bwarn("WARNING: Not supported\n"); return -ENOSYS; } - diff --git a/arch/x86/src/common/up_exit.c b/arch/x86/src/common/up_exit.c index 12779df0248e0cb320e41a946c8331a32226384e..5ebeba07c3b2fa79abac0fa951cbb77a534a11aa 100644 --- a/arch/x86/src/common/up_exit.c +++ b/arch/x86/src/common/up_exit.c @@ -1,7 +1,7 @@ /**************************************************************************** * common/up_exit.c * - * Copyright (C) 2011, 2013-2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2013-2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -56,9 +56,9 @@ * Pre-processor Definitions ****************************************************************************/ -/**************************************************************************** - * Private Data - ****************************************************************************/ +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT +#endif /**************************************************************************** * Private Functions @@ -74,7 +74,7 @@ * ****************************************************************************/ -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG) +#ifdef CONFIG_DUMP_ON_EXIT static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) { #if CONFIG_NFILE_DESCRIPTORS > 0 @@ -85,8 +85,8 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) int i; #endif - sdbg(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid); - sdbg(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state); + sinfo(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid); + sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state); #if CONFIG_NFILE_DESCRIPTORS > 0 filelist = tcb->group->tg_filelist; @@ -95,8 +95,8 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) struct inode *inode = filelist->fl_files[i].f_inode; if (inode) { - sdbg(" fd=%d refcount=%d\n", - i, inode->i_crefs); + sinfo(" fd=%d refcount=%d\n", + i, inode->i_crefs); } } #endif @@ -109,11 +109,11 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) if (filep->fs_fd >= 0) { #if CONFIG_STDIO_BUFFER_SIZE > 0 - sdbg(" fd=%d nbytes=%d\n", - filep->fs_fd, - filep->fs_bufpos - filep->fs_bufstart); + sinfo(" fd=%d nbytes=%d\n", + filep->fs_fd, + filep->fs_bufpos - filep->fs_bufstart); #else - sdbg(" fd=%d\n", filep->fs_fd); + sinfo(" fd=%d\n", filep->fs_fd); #endif } } @@ -146,10 +146,10 @@ void _exit(int status) (void)up_irq_save(); - slldbg("TCB=%p exiting\n", this_task()); + sinfo("TCB=%p exiting\n", this_task()); -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG) - slldbg("Other tasks:\n"); +#ifdef CONFIG_DUMP_ON_EXIT + sinfo("Other tasks:\n"); sched_foreach(_up_dumponexit, NULL); #endif diff --git a/arch/x86/src/common/up_initialize.c b/arch/x86/src/common/up_initialize.c index 07697ea078cb4557d8debe047cd5859445b1ad30..853304038bdc33f65575ee0420948f29933eda6b 100644 --- a/arch/x86/src/common/up_initialize.c +++ b/arch/x86/src/common/up_initialize.c @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include @@ -71,18 +71,18 @@ * ****************************************************************************/ -#if defined(CONFIG_ARCH_CALIBRATION) && defined(CONFIG_DEBUG) +#if defined(CONFIG_ARCH_CALIBRATION) && defined(CONFIG_DEBUG_FEATURES) static void up_calibratedelay(void) { int i; - lldbg("Beginning 100s delay\n"); + _warn("Beginning 100s delay\n"); for (i = 0; i < 100; i++) { up_mdelay(1000); } - lldbg("End 100s delay\n"); + _warn("End 100s delay\n"); } #else # define up_calibratedelay() @@ -180,20 +180,18 @@ void up_initialize(void) #if defined(CONFIG_DEV_LOWCONSOLE) lowconsole_init(); -#elif defined(CONFIG_SYSLOG_CONSOLE) +#elif defined(CONFIG_CONSOLE_SYSLOG) syslog_console_init(); #elif defined(CONFIG_RAMLOG_CONSOLE) ramlog_consoleinit(); #endif - /* Initialize the system logging device */ + /* Early initialization of the system logging device. Some SYSLOG channel + * can be initialized early in the initialization sequence because they + * depend on only minimal OS initialization. + */ -#ifdef CONFIG_SYSLOG_CHAR - syslog_initialize(); -#endif -#ifdef CONFIG_RAMLOG_SYSLOG - ramlog_sysloginit(); -#endif + syslog_initialize(SYSLOG_INIT_EARLY); #ifndef CONFIG_NETDEV_LATEINIT /* Initialize the network */ diff --git a/arch/x86/src/common/up_internal.h b/arch/x86/src/common/up_internal.h index d0eb1570c36c35b4f191c58ed40be34e40919836..810bece03a402f139d62666d4c22be26184468a5 100644 --- a/arch/x86/src/common/up_internal.h +++ b/arch/x86/src/common/up_internal.h @@ -62,6 +62,10 @@ #undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */ #undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */ +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT /* Needs CONFIG_DEBUG_SCHED_INFO */ +#endif + /* Determine which (if any) console driver to use. If a console is enabled * and no other console device is specified, then a serial console is * assumed. @@ -96,13 +100,6 @@ # define USE_SERIALDRIVER 1 #endif -/* Determine which device to use as the system logging device */ - -#ifndef CONFIG_SYSLOG -# undef CONFIG_SYSLOG_CHAR -# undef CONFIG_RAMLOG_SYSLOG -#endif - /* Check if an interrupt stack size is configured */ #ifndef CONFIG_ARCH_INTERRUPTSTACK diff --git a/arch/x86/src/common/up_releasepending.c b/arch/x86/src/common/up_releasepending.c index 76137604bb4e0dec729dbb6193b03d4744e276c3..b0e8890db3ae063e4e68983bcf5d22a63a5417f9 100644 --- a/arch/x86/src/common/up_releasepending.c +++ b/arch/x86/src/common/up_releasepending.c @@ -67,7 +67,7 @@ void up_release_pending(void) { struct tcb_s *rtcb = this_task(); - slldbg("From TCB=%p\n", rtcb); + sinfo("From TCB=%p\n", rtcb); /* Merge the g_pendingtasks list into the ready-to-run task list */ diff --git a/arch/x86/src/common/up_reprioritizertr.c b/arch/x86/src/common/up_reprioritizertr.c index 398199261dea8bbf774ac9f168cd87a7dd996160..110d26a6717924603532138d56d5843e410b851b 100644 --- a/arch/x86/src/common/up_reprioritizertr.c +++ b/arch/x86/src/common/up_reprioritizertr.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/arm/up_reprioritizertr.c * - * Copyright (C) 2011, 2013-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2013-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -95,7 +95,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority) struct tcb_s *rtcb = this_task(); bool switch_needed; - slldbg("TCB=%p PRI=%d\n", tcb, priority); + sinfo("TCB=%p PRI=%d\n", tcb, priority); /* Remove the tcb task from the ready-to-run list. * sched_removereadytorun will return true if we just diff --git a/arch/x86/src/i486/up_createstack.c b/arch/x86/src/i486/up_createstack.c index 1d9b1008d09d1a4c67c3142616d1c5766e3f408a..f51d6f2ca2b29e9c31d47b29cd7d79c769e79755 100644 --- a/arch/x86/src/i486/up_createstack.c +++ b/arch/x86/src/i486/up_createstack.c @@ -139,12 +139,12 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype) tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size); } -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Was the allocation successful? */ if (!tcb->stack_alloc_ptr) { - sdbg("ERROR: Failed to allocate stack, size %d\n", stack_size); + serr("ERROR: Failed to allocate stack, size %d\n", stack_size); } #endif } diff --git a/arch/x86/src/i486/up_regdump.c b/arch/x86/src/i486/up_regdump.c index 4cc2d8cb3657bcebef7297b1a6999938f6846706..d28ec481edaed9268a1846c944a798ccd453678e 100644 --- a/arch/x86/src/i486/up_regdump.c +++ b/arch/x86/src/i486/up_regdump.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/x86/src/i486/up_regdump.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 @@ -39,46 +39,28 @@ #include -/* Output debug info -- even if debug is not selected. */ - -#undef CONFIG_DEBUG -#undef CONFIG_DEBUG_VERBOSE -#define CONFIG_DEBUG 1 -#define CONFIG_DEBUG_VERBOSE 1 - #include #include #include "up_internal.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ + /**************************************************************************** * Name: up_registerdump ****************************************************************************/ void up_registerdump(uint32_t *regs) { - lldbg(" ds:%08x irq:%08x err:%08x\n", + _alert(" ds:%08x irq:%08x err:%08x\n", regs[REG_DS], regs[REG_IRQNO], regs[REG_ERRCODE]); - lldbg("edi:%08x esi:%08x ebp:%08x esp:%08x\n", + _alert("edi:%08x esi:%08x ebp:%08x esp:%08x\n", regs[REG_EDI], regs[REG_ESI], regs[REG_EBP], regs[REG_ESP]); - lldbg("ebx:%08x edx:%08x ecx:%08x eax:%08x\n", + _alert("ebx:%08x edx:%08x ecx:%08x eax:%08x\n", regs[REG_EBX], regs[REG_EDX], regs[REG_ECX], regs[REG_EAX]); - lldbg("eip:%08x cs:%08x flg:%08x sp:%08x ss:%08x\n", + _alert("eip:%08x cs:%08x flg:%08x sp:%08x ss:%08x\n", regs[REG_EIP], regs[REG_CS], regs[REG_EFLAGS], regs[REG_SP], regs[REG_SS]); } diff --git a/arch/x86/src/i486/up_schedulesigaction.c b/arch/x86/src/i486/up_schedulesigaction.c index 60604e8827fa4fc733a8f7583d681c48b4d1b0e1..5faf6d1ebd558c58c2ec8c1bf971c1893786c2f8 100644 --- a/arch/x86/src/i486/up_schedulesigaction.c +++ b/arch/x86/src/i486/up_schedulesigaction.c @@ -101,7 +101,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) { irqstate_t flags; - sdbg("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver); + sinfo("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver); /* Make sure that interrupts are disabled */ @@ -115,7 +115,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * to the currently executing task. */ - sdbg("rtcb=0x%p g_current_regs=0x%p\n", this_task(), g_current_regs); + sinfo("rtcb=0x%p g_current_regs=0x%p\n", this_task(), g_current_regs); if (tcb == this_task()) { diff --git a/arch/x86/src/i486/up_sigdeliver.c b/arch/x86/src/i486/up_sigdeliver.c index e807c3d6161c7f184248e5df7e8af8303bdf1cff..b6ec9a09d5c0ceac46478be8b132fb34cb245514 100644 --- a/arch/x86/src/i486/up_sigdeliver.c +++ b/arch/x86/src/i486/up_sigdeliver.c @@ -95,7 +95,7 @@ void up_sigdeliver(void) board_autoled_on(LED_SIGNAL); - sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", + sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); ASSERT(rtcb->xcp.sigdeliver != NULL); @@ -126,7 +126,7 @@ void up_sigdeliver(void) * errno that is needed by the user logic (it is probably EINTR). */ - sdbg("Resuming\n"); + sinfo("Resuming\n"); (void)up_irq_save(); rtcb->pterrno = saved_errno; diff --git a/arch/x86/src/qemu/qemu.h b/arch/x86/src/qemu/qemu.h index 6148180aa9d70f4efb08e21db1c30edf61d21c7f..85ea4bde35403310542cddfca552d4890a27ddb3 100644 --- a/arch/x86/src/qemu/qemu.h +++ b/arch/x86/src/qemu/qemu.h @@ -187,7 +187,7 @@ void i486_gpioirqdisable(int irq); * ************************************************************************************/ -#ifdef CONFIG_DEBUG_GPIO +#ifdef CONFIG_DEBUG_GPIO_INFO int i486_dumpgpio(uint16_t pinset, const char *msg); #else # define i486_dumpgpio(p,m) diff --git a/arch/x86/src/qemu/qemu_fullcontextrestore.S b/arch/x86/src/qemu/qemu_fullcontextrestore.S index 97a208ad89332f0b094f36f59c600efa7559c6ec..bc55160e3a98f6806b977083f7155e6be7126b9e 100644 --- a/arch/x86/src/qemu/qemu_fullcontextrestore.S +++ b/arch/x86/src/qemu/qemu_fullcontextrestore.S @@ -58,7 +58,7 @@ /* Trace macros, use like trace 'i' to print char to serial port. */ .macro chout, addr, ch -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES mov $\addr, %dx mov $\ch, %al out %al, %dx @@ -66,7 +66,7 @@ .endm .macro trace, ch -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES push %eax push %edx chout 0x3f8, \ch diff --git a/arch/x86/src/qemu/qemu_head.S b/arch/x86/src/qemu/qemu_head.S index 82b8d37a8d704089cbb4e6b1dbce0b730538938f..2b205208b3e3af22ae9a47d53a97b21a6f91db0e 100644 --- a/arch/x86/src/qemu/qemu_head.S +++ b/arch/x86/src/qemu/qemu_head.S @@ -64,7 +64,7 @@ /* Trace macros, use like trace 'i' to print char to serial port. */ .macro trace, ch -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES mov $0x3f8, %dx mov $\ch, %al out %al, %dx diff --git a/arch/x86/src/qemu/qemu_saveusercontext.S b/arch/x86/src/qemu/qemu_saveusercontext.S index 5b4b78647bc2b2de901b6fa961578be2b12a6e68..0620bbf6582cc383756aaa01c0d70cfa2ff25d47 100644 --- a/arch/x86/src/qemu/qemu_saveusercontext.S +++ b/arch/x86/src/qemu/qemu_saveusercontext.S @@ -54,7 +54,7 @@ /* Trace macros, use like trace 'i' to print char to serial port. */ .macro chout, addr, ch -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES mov $\addr, %dx mov $\ch, %al out %al, %dx @@ -62,7 +62,7 @@ .endm .macro trace, ch -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES push %eax push %edx chout 0x3f8, \ch diff --git a/arch/x86/src/qemu/qemu_vga.c b/arch/x86/src/qemu/qemu_vga.c index ec56c8aaa8781e12e328172f4a556c9199ee1384..151333933207087d0f941465338f757958c862fa 100644 --- a/arch/x86/src/qemu/qemu_vga.c +++ b/arch/x86/src/qemu/qemu_vga.c @@ -498,7 +498,7 @@ FAR struct lcd_dev_s *qemu_vga_initialize(void) int ret = init_graph_vga(VGA_XRES, VGA_YRES, 1); if (ret < 0) { - gdbg("ERROR: init_graph_vga returned %d\n",ret); + gerr("ERROR: init_graph_vga returned %d\n",ret); } memset(g_pscreen, 0, VGA_XRES * VGA_YRES); @@ -510,7 +510,7 @@ void qemu_vga(void) int ret = init_graph_vga(VGA_XRES, VGA_YRES, 1); if (ret < 0) { - gdbg("ERROR: init_graph_vga returned %d\n",ret); + gerr("ERROR: init_graph_vga returned %d\n",ret); } memset(g_pscreen, g_bg_color, VGA_XRES * VGA_YRES); diff --git a/arch/z16/src/common/up_assert.c b/arch/z16/src/common/up_assert.c index fbd73d2579cef3bf5eeeda8daa3ca1ceb214424d..5346e9d48c9b93b60aff2225770f3d581d088e14 100644 --- a/arch/z16/src/common/up_assert.c +++ b/arch/z16/src/common/up_assert.c @@ -1,7 +1,7 @@ /**************************************************************************** * common/up_assert.c * - * Copyright (C) 2008-2009, 2012-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009, 2012-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include #include @@ -120,7 +109,7 @@ static int usbtrace_syslog(FAR const char *fmt, ...) /* Let vsyslog do the real work */ va_start(ap, fmt); - ret = lowvsyslog(LOG_INFO, fmt, ap); + ret = vsyslog(LOG_EMERG, fmt, ap); va_end(ap); return ret; } @@ -146,7 +135,7 @@ void up_assert(const uint8_t *filename, int lineno) void up_assert(void) #endif { -#if CONFIG_TASK_NAME_SIZE > 0 +#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG_ALERT) struct tcb_s *rtcb = this_task(); #endif @@ -154,17 +143,17 @@ void up_assert(void) #ifdef CONFIG_HAVE_FILENAME #if CONFIG_TASK_NAME_SIZE > 0 - lldbg("Assertion failed at file:%s line: %d task: %s\n", + _alert("Assertion failed at file:%s line: %d task: %s\n", filename, lineno, rtcb->name); #else - lldbg("Assertion failed at file:%s line: %d\n", + _alert("Assertion failed at file:%s line: %d\n", filename, lineno); #endif #else -#if CONFIG_TASK_NAME_SIZE > 0 - lldbg("Assertion failed: task: %s\n", rtcb->name); +#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG_ALERT) + _alert("Assertion failed: task: %s\n", rtcb->name); #else - lldbg("Assertion failed\n"); + _alert("Assertion failed\n"); #endif #endif diff --git a/arch/z16/src/common/up_blocktask.c b/arch/z16/src/common/up_blocktask.c index e165e74a73097470c544b44ba8c65c4fca135f6a..584aec0ea83626f1eb633131d868e5f5013153fe 100644 --- a/arch/z16/src/common/up_blocktask.c +++ b/arch/z16/src/common/up_blocktask.c @@ -83,7 +83,7 @@ void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state) ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && (tcb->task_state <= LAST_READY_TO_RUN_STATE)); - /* dbg("Blocking TCB=%p\n", tcb); */ + /* sinfo("Blocking TCB=%p\n", tcb); */ /* Remove the tcb task from the ready-to-run list. If we * are blocking the task at the head of the task list (the diff --git a/arch/z16/src/common/up_createstack.c b/arch/z16/src/common/up_createstack.c index c4d55370408db9a4e2a28eecc525e73f4a868949..2c35e68aef8e40c9bf28c181542b4a2874e44220 100644 --- a/arch/z16/src/common/up_createstack.c +++ b/arch/z16/src/common/up_createstack.c @@ -120,12 +120,12 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype) tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Was the allocation successful? */ if (!tcb->stack_alloc_ptr) { - sdbg("ERROR: Failed to allocate stack, size %d\n", stack_size); + serr("ERROR: Failed to allocate stack, size %d\n", stack_size); } #endif } diff --git a/arch/z16/src/common/up_exit.c b/arch/z16/src/common/up_exit.c index 7c238b249971094274c686f1e5f60e1ea67bef42..a47e042b38c05495e062a6ed2b5a6ad3359e065a 100644 --- a/arch/z16/src/common/up_exit.c +++ b/arch/z16/src/common/up_exit.c @@ -53,6 +53,14 @@ #include "sched/sched.h" #include "up_internal.h" +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -67,7 +75,7 @@ * ****************************************************************************/ -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG) +#ifdef CONFIG_DUMP_ON_EXIT static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) { #if CONFIG_NFILE_DESCRIPTORS > 0 @@ -78,8 +86,8 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) int i; #endif - lldbg(" TCB=%p name=%s\n", tcb, tcb->argv[0]); - lldbg(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state); + sinfo(" TCB=%p name=%s\n", tcb, tcb->argv[0]); + sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state); #if CONFIG_NFILE_DESCRIPTORS > 0 filelist = tcb->group->tg_filelist; @@ -88,7 +96,7 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) struct inode *inode = filelist->fl_files[i].f_inode; if (inode) { - lldbg(" fd=%d refcount=%d\n", + sinfo(" fd=%d refcount=%d\n", i, inode->i_crefs); } } @@ -102,11 +110,11 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) if (filep->fs_fd >= 0) { #if CONFIG_STDIO_BUFFER_SIZE > 0 - lldbg(" fd=%d nbytes=%d\n", + sinfo(" fd=%d nbytes=%d\n", filep->fs_fd, filep->fs_bufpos - filep->fs_bufstart); #else - lldbg(" fd=%d\n", filep->fs_fd); + sinfo(" fd=%d\n", filep->fs_fd); #endif } } @@ -139,10 +147,10 @@ void _exit(int status) (void)up_irq_save(); - slldbg("TCB=%p exiting\n", tcb); + sinfo("TCB=%p exiting\n", tcb); -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG) - lldbg("Other tasks:\n"); +#ifdef CONFIG_DUMP_ON_EXIT + sinfo("Other tasks:\n"); sched_foreach(_up_dumponexit, NULL); #endif @@ -155,7 +163,7 @@ void _exit(int status) */ tcb = this_task(); - slldbg("New Active Task TCB=%p\n", tcb); + sinfo("New Active Task TCB=%p\n", tcb); /* Then switch contexts */ diff --git a/arch/z16/src/common/up_initialize.c b/arch/z16/src/common/up_initialize.c index 50b287d08a69f0d0afd5d32c32b1a2ffa9c2f025..f6a020203aae6ad6d6b9dcdc8f0bb463e8325d13 100644 --- a/arch/z16/src/common/up_initialize.c +++ b/arch/z16/src/common/up_initialize.c @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include @@ -82,18 +82,18 @@ volatile FAR chipreg_t *g_current_regs; * ****************************************************************************/ -#if defined(CONFIG_ARCH_CALIBRATION) && defined(CONFIG_DEBUG) +#if defined(CONFIG_ARCH_CALIBRATION) && defined(CONFIG_DEBUG_FEATURES) static void up_calibratedelay(void) { int i; - lldbg("Beginning 100s delay\n"); + _warn("Beginning 100s delay\n"); for (i = 0; i < 100; i++) { up_mdelay(1000); } - lldbg("End 100s delay\n"); + _warn("End 100s delay\n"); } #else # define up_calibratedelay() @@ -180,20 +180,18 @@ void up_initialize(void) #if defined(CONFIG_DEV_LOWCONSOLE) lowconsole_init(); -#elif defined(CONFIG_SYSLOG_CONSOLE) +#elif defined(CONFIG_CONSOLE_SYSLOG) syslog_console_init(); #elif defined(CONFIG_RAMLOG_CONSOLE) ramlog_consoleinit(); #endif - /* Initialize the system logging device */ + /* Early initialization of the system logging device. Some SYSLOG channel + * can be initialized early in the initialization sequence because they + * depend on only minimal OS initialization. + */ -#ifdef CONFIG_SYSLOG_CHAR - syslog_initialize(); -#endif -#ifdef CONFIG_RAMLOG_SYSLOG - ramlog_sysloginit(); -#endif + syslog_initialize(SYSLOG_INIT_EARLY); #ifndef CONFIG_NETDEV_LATEINIT /* Initialize the network */ diff --git a/arch/z16/src/common/up_internal.h b/arch/z16/src/common/up_internal.h index bd6f36ca9f8343c5f869d614a0b669adfb099978..c959bb095622274a8646dde3073f6b0fec777e5b 100644 --- a/arch/z16/src/common/up_internal.h +++ b/arch/z16/src/common/up_internal.h @@ -58,7 +58,11 @@ #undef CONFIG_SUPPRESS_UART_CONFIG /* Do not reconfig UART */ #undef CONFIG_DUMP_ON_EXIT /* Dump task state on exit */ #undef CONFIG_Z16_LOWPUTC /* Support up_lowputc for debug */ -#undef CONFIG_Z16_LOWGETC /* support up_lowgetc for debug */ +#undef CONFIG_Z16_LOWGETC /* support z16_lowgetc for debug */ + +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT /* Needs CONFIG_DEBUG_SCHED_INFO */ +#endif /* Determine which (if any) console driver to use. If a console is enabled * and no other console device is specified, then a serial console is @@ -98,13 +102,6 @@ # define USE_SERIALDRIVER 1 #endif -/* Determine which device to use as the system logging device */ - -#ifndef CONFIG_SYSLOG -# undef CONFIG_SYSLOG_CHAR -# undef CONFIG_RAMLOG_SYSLOG -#endif - /* Macros for portability */ #define IN_INTERRUPT (g_current_regs != NULL) diff --git a/arch/z16/src/common/up_registerdump.c b/arch/z16/src/common/up_registerdump.c index a4047d56f0171a4109300f4b461bc1d8c6de16a5..dbee6553dd36d7d6f169f1c06e7d1a9e31d9d811 100644 --- a/arch/z16/src/common/up_registerdump.c +++ b/arch/z16/src/common/up_registerdump.c @@ -1,7 +1,7 @@ /**************************************************************************** * common/up_registerdump.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 @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if - * debug is not selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include @@ -60,14 +49,6 @@ #ifdef CONFIG_ARCH_STACKDUMP -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -78,16 +59,19 @@ static void up_registerdump(void) { +#ifdef CONFIG_DEBUG_INFO FAR uint32_t *regs32 = (FAR uint32_t*)g_current_regs; - lldbg("R0 :%08x R1 :%08x R2 :%08x R3 :%08x " + + _alert("R0 :%08x R1 :%08x R2 :%08x R3 :%08x " "R4 :%08x R5 :%08x R6 :%08x R7 :%08x\n" regs32[REG_R0/2], regs32[REG_R1/2], regs32[REG_R2/2], regs32[REG_R3/2], regs32[REG_R4/2], regs32[REG_R5/2], regs32[REG_R6/2], regs32[REG_R7/2]); - lldbg("R8 :%08x R9 :%08x R10:%08x R11:%08x R12:%08x R13:%08x\n" + _alert("R8 :%08x R9 :%08x R10:%08x R11:%08x R12:%08x R13:%08x\n" regs32[REG_R8/2], regs32[REG_R9/2], regs32[REG_R10/2], regs3[REG_R11/2], regs32[REG_R12/2], regs32[REG_R13/2]); - lldbg("FP :%08x SP :%08x FLG:%04x\n" + _alert("FP :%08x SP :%08x FLG:%04x\n" regs32[REG_R14/2], regs32[REG_R15/2], g_current_regs[REG_FLAGS]); +#endif } #endif /* CONFIG_ARCH_STACKDUMP */ diff --git a/arch/z16/src/common/up_releasepending.c b/arch/z16/src/common/up_releasepending.c index 2d0e09b5ac30f97d6945fa467e66514db74f4dae..ddac88d6c4ce6256512daeb43a6bb7d7df3048a5 100644 --- a/arch/z16/src/common/up_releasepending.c +++ b/arch/z16/src/common/up_releasepending.c @@ -68,7 +68,7 @@ void up_release_pending(void) { FAR struct tcb_s *rtcb = this_task(); - slldbg("From TCB=%p\n", rtcb); + sinfo("From TCB=%p\n", rtcb); /* Merge the g_pendingtasks list into the ready-to-run task list */ diff --git a/arch/z16/src/common/up_reprioritizertr.c b/arch/z16/src/common/up_reprioritizertr.c index 4872db37f2634ce6db9a3dcbe10880e9c96a5fbb..4724fc2f29445dbfb73d7228f77f1892bf7d11f9 100644 --- a/arch/z16/src/common/up_reprioritizertr.c +++ b/arch/z16/src/common/up_reprioritizertr.c @@ -96,7 +96,7 @@ void up_reprioritize_rtr(FAR struct tcb_s *tcb, uint8_t priority) FAR struct tcb_s *rtcb = this_task(); bool switch_needed; - slldbg("TCB=%p PRI=%d\n", tcb, priority); + sinfo("TCB=%p PRI=%d\n", tcb, priority); /* Remove the tcb task from the ready-to-run list. * sched_removereadytorun will return true if we just diff --git a/arch/z16/src/common/up_schedulesigaction.c b/arch/z16/src/common/up_schedulesigaction.c index 0592b883352a9a13d4f1bdf45f211175aab48e72..557dcdf5f478a2a6691c7b0d4540f55a28d59073 100644 --- a/arch/z16/src/common/up_schedulesigaction.c +++ b/arch/z16/src/common/up_schedulesigaction.c @@ -92,7 +92,7 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver) { irqstate_t flags; - dbg("tcb=0x%p sigdeliver=0x%06x\n", tcb, (uint32_t)sigdeliver); + sinfo("tcb=0x%p sigdeliver=0x%06x\n", tcb, (uint32_t)sigdeliver); /* Make sure that interrupts are disabled */ @@ -106,7 +106,7 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver) * being delivered to the currently executing task. */ - dbg("rtcb=0x%p g_current_regs=0x%p\n", this_task(), g_current_regs); + sinfo("rtcb=0x%p g_current_regs=0x%p\n", this_task(), g_current_regs); if (tcb == this_task()) { diff --git a/arch/z16/src/common/up_sigdeliver.c b/arch/z16/src/common/up_sigdeliver.c index 9861f0096e0208d2775dac3149e231d226dc1071..7860f1d1de4eb408f956f5f9fad12fab4c37b336 100644 --- a/arch/z16/src/common/up_sigdeliver.c +++ b/arch/z16/src/common/up_sigdeliver.c @@ -84,7 +84,7 @@ void up_sigdeliver(void) board_autoled_on(LED_SIGNAL); - sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", + sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); ASSERT(rtcb->xcp.sigdeliver != NULL); @@ -119,7 +119,7 @@ void up_sigdeliver(void) * errno that is needed by the user logic (it is probably EINTR). */ - sdbg("Resuming\n"); + sinfo("Resuming\n"); (void)up_irq_save(); rtcb->pterrno = saved_errno; diff --git a/arch/z16/src/common/up_stackdump.c b/arch/z16/src/common/up_stackdump.c index f6d9e41236da561befedd4ee55b304605f43200c..3dc17151dd159efeb44e44cd6f0562fe80514065 100644 --- a/arch/z16/src/common/up_stackdump.c +++ b/arch/z16/src/common/up_stackdump.c @@ -1,7 +1,7 @@ /**************************************************************************** * common/up_stackdump.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 @@ -39,13 +39,6 @@ #include -/* Output debug info -- even if debug is not selected. */ - -#undef CONFIG_DEBUG -#undef CONFIG_DEBUG_VERBOSE -#define CONFIG_DEBUG 1 -#define CONFIG_DEBUG_VERBOSE 1 - #include #include "chip/chip.h" @@ -74,13 +67,13 @@ static void up_stackdump(void) chipreg_t stack_base = (chipreg_t)rtcb->adj_stack_ptr; chipreg_t stack_size = (chipreg_t)rtcb->adj_stack_size; - lldbg("stack_base: %08x\n", stack_base); - lldbg("stack_size: %08x\n", stack_size); - lldbg("sp: %08x\n", sp); + _alert("stack_base: %08x\n", stack_base); + _alert("stack_size: %08x\n", stack_size); + _alert("sp: %08x\n", sp); if (sp >= stack_base || sp < stack_base - stack_size) { - lldbg("ERROR: Stack pointer is not within allocated stack\n"); + _err("ERROR: Stack pointer is not within allocated stack\n"); return; } else @@ -90,9 +83,9 @@ static void up_stackdump(void) for (stack = sp & ~0x0f; stack < stack_base; stack += 8*sizeof(chipreg_t)) { chipreg_t *ptr = (chipreg_t*)stack; - lldbg("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n", - stack, ptr[0], ptr[1], ptr[2], ptr[3], - ptr[4], ptr[5], ptr[6], ptr[7]); + _alert("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n", + stack, ptr[0], ptr[1], ptr[2], ptr[3], + ptr[4], ptr[5], ptr[6], ptr[7]); } } } diff --git a/arch/z16/src/common/up_unblocktask.c b/arch/z16/src/common/up_unblocktask.c index 96eb7675ac550bcb3a69bbd1cd3d3614ac2b62d0..8fe8beccfa82e384e9e72509b6706cf3c3c80085 100644 --- a/arch/z16/src/common/up_unblocktask.c +++ b/arch/z16/src/common/up_unblocktask.c @@ -79,7 +79,7 @@ void up_unblock_task(FAR struct tcb_s *tcb) ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && (tcb->task_state <= LAST_BLOCKED_STATE)); - /* dbg("Unblocking TCB=%p\n", tcb); */ + /* sinfo("Unblocking TCB=%p\n", tcb); */ /* Remove the task from the blocked task list */ diff --git a/arch/z16/src/z16f/Kconfig b/arch/z16/src/z16f/Kconfig index 8861726aee32ab65025216d389b175e0f96d1dfb..56067cae663f9ee0e71481a35bdc8bebb54bbf0d 100644 --- a/arch/z16/src/z16f/Kconfig +++ b/arch/z16/src/z16f/Kconfig @@ -33,7 +33,7 @@ menu "Z16F ESPI Configuration" config Z16F_ESPI_REGDEBUG bool "ESPI register-level debug" default n - depends on DEBUG + depends on DEBUG_FEATURES endmenu # Z16F ESPI Configuration endif # ARCH_CHIP_Z16F diff --git a/arch/z16/src/z16f/z16f_clkinit.c b/arch/z16/src/z16f/z16f_clkinit.c index 15371646bc5e2d9060c0096bf5affef9465e751d..883a5d840762714fb6664ab74bc4fca272eb300b 100644 --- a/arch/z16/src/z16f/z16f_clkinit.c +++ b/arch/z16/src/z16f/z16f_clkinit.c @@ -59,7 +59,7 @@ extern _Erom unsigned long SYS_CLK_FREQ; * Private Functions ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /**************************************************************************** * System clock initialization--DEBUG. Code Using Frequency Input from * ZDS IDE. @@ -206,7 +206,7 @@ static void z16f_sysclkinit(int clockid, uint32_t frequency) for (count = 0; count < 10000; count++); } -#else /* CONFIG_DEBUG */ +#else /* CONFIG_DEBUG_FEATURES */ /**************************************************************************** * System Clock Initialization Recommended for Release Code * @@ -247,7 +247,7 @@ static void z16f_sysclkinit(int clockid, uint32_t frequency) putreg8(0xe0 | 1, Z16F_OSC_CTL); /* Use the external osc/clock as system clock */ } } -#endif /* CONFIG_DEBUG */ +#endif /* CONFIG_DEBUG_FEATURES */ /**************************************************************************** * Public Functions diff --git a/arch/z16/src/z16f/z16f_espi.c b/arch/z16/src/z16f/z16f_espi.c index 869cbb79cbbcf52434b9b0ad54585a4b92e809dd..60db49a88b1f8e2f1d6e1b1d5e6e35f8d16c5393 100644 --- a/arch/z16/src/z16f/z16f_espi.c +++ b/arch/z16/src/z16f/z16f_espi.c @@ -55,32 +55,6 @@ #ifdef CONFIG_Z16F_ESPI -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug *******************************************************************/ -/* Check if SPI debug is enabled (non-standard.. no support in - * include/debug.h - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_SPI -# undef CONFIG_Z16F_ESPI_REGDEBUG -#endif - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg (void) -# endif -#else -# define spidbg (void) -# define spivdbg (void) -#endif - /**************************************************************************** * Private Types ****************************************************************************/ @@ -127,7 +101,7 @@ static void spi_putreg16(FAR struct z16f_spi_s *priv, uint16_t regval, # define spi_putreg16(priv,regval,regaddr) putreg16(regval, regaddr) #endif -#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_SPI_INFO static void spi_dumpregs(FAR struct z16f_spi_s *priv, const char *msg); #else # define spi_dumpregs(priv,msg) @@ -231,7 +205,7 @@ static bool spi_checkreg(FAR struct z16f_spi_s *priv, bool wr, uint16_t regval, { /* Yes... show how many times we did it */ - lldbg("...[Repeats %d times]...\n", priv->ntimes); + syslog(LOG_INFO, "...[Repeats %d times]...\n", priv->ntimes); } /* Save information about the new access */ @@ -263,7 +237,7 @@ static uint8_t spi_getreg8(FAR struct z16f_spi_s *priv, uintptr_t regaddr) if (spi_checkreg(priv, false, (uint16_t)regval, regaddr)) { - lldbg("%06x->%02x\n", regaddr, regval); + syslog(LOG_INFO, "%06x->%02x\n", regaddr, regval); } return regval; @@ -284,7 +258,7 @@ static void spi_putreg8(FAR struct z16f_spi_s *priv, uint8_t regval, { if (spi_checkreg(priv, true, (uint16_t)regval, regaddr)) { - lldbg("%06x<-%02x\n", regaddr, regval); + syslog(LOG_INFO, "%06x<-%02x\n", regaddr, regval); } putreg8(regval, regaddr); @@ -305,7 +279,7 @@ static void spi_putreg16(FAR struct z16f_spi_s *priv, uint16_t regval, { if (spi_checkreg(priv, true, regval, regaddr)) { - lldbg("%06x<-%04x\n", regaddr, regval); + syslog(LOG_INFO, "%06x<-%04x\n", regaddr, regval); } putreg8(regval, regaddr); @@ -327,14 +301,14 @@ static void spi_putreg16(FAR struct z16f_spi_s *priv, uint16_t regval, * ****************************************************************************/ -#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_SPI_INFO static void spi_dumpregs(FAR struct z16f_spi_s *priv, FAR const char *msg) { - spivdbg("%s:\n", msg); - spivdbg(" DCR: %02x CTL: %02x MODE: %02x STAT: %02x\n", + spiinfo("%s:\n", msg); + spiinfo(" DCR: %02x CTL: %02x MODE: %02x STAT: %02x\n", getreg8(Z16F_ESPI_DCR), getreg8(Z16F_ESPI_CTL), getreg8(Z16F_ESPI_MODE), getreg8(Z16F_ESPI_STAT)); - spivdbg(" STATE: %02x BR: %02x %02x\n", + spiinfo(" STATE: %02x BR: %02x %02x\n", getreg8(Z16F_ESPI_STATE), getreg8(Z16F_ESPI_BRH), getreg8(Z16F_ESPI_BRL)); } @@ -395,7 +369,7 @@ static int spi_lock(FAR struct spi_dev_s *dev, bool lock) { FAR struct z16f_spi_s *priv = (FAR struct z16f_spi_s *)dev; - spivdbg("lock=%d\n", lock); + spiinfo("lock=%d\n", lock); if (lock) { /* Take the semaphore (perhaps waiting) */ @@ -438,7 +412,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) uint32_t actual; uint32_t brg; - spivdbg("frequency=%d\n", frequency); + spiinfo("frequency=%d\n", frequency); /* Check if the requested frequency is the same as the frequency selection */ @@ -469,14 +443,14 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) /* Calculate the new actual frequency */ actual = (BOARD_SYSTEM_FREQUENCY >> 1) / brg; - spivdbg("BR=%04x actual=%ld\n", (unsigned int)brg, (long)actual); + spiinfo("BR=%04x actual=%ld\n", (unsigned int)brg, (long)actual); /* Save the frequency setting */ priv->frequency = frequency; priv->actual = actual; - spidbg("Frequency %d->%d\n", frequency, actual); + spiinfo("Frequency %d->%d\n", frequency, actual); return actual; } @@ -500,7 +474,7 @@ static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode) FAR struct z16f_spi_s *priv = (FAR struct z16f_spi_s *)dev; uint8_t regval; - spivdbg("mode=%d\n", mode); + spiinfo("mode=%d\n", mode); /* Has the mode changed? */ @@ -542,7 +516,7 @@ static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode) } spi_putreg8(priv, regval, Z16F_ESPI_CTL); - spivdbg("ESPI CTL: %02x\n", regval); + spiinfo("ESPI CTL: %02x\n", regval); /* Save the mode so that subsequent re-configurations will be faster */ @@ -570,7 +544,7 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) FAR struct z16f_spi_s *priv = (FAR struct z16f_spi_s *)dev; uint8_t regval; - spivdbg("nbits=%d\n", nbits); + spiinfo("nbits=%d\n", nbits); DEBUGASSERT(priv && nbits > 0 && nbits <= 8); /* Has the number of bits changed? */ @@ -590,7 +564,7 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) } spi_putreg8(priv, regval, Z16F_ESPI_MODE); - spivdbg("ESPI MODE: %02x\n", regval); + spiinfo("ESPI MODE: %02x\n", regval); /* Save the selection so the subsequence re-configurations will be faster */ @@ -628,7 +602,7 @@ static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd) rxbyte = (uint8_t)0; spi_exchange(dev, &txbyte, &rxbyte, 1); - spivdbg("Sent %02x received %02x\n", txbyte, rxbyte); + spiinfo("Sent %02x received %02x\n", txbyte, rxbyte); return (uint16_t)rxbyte; } @@ -661,7 +635,7 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, FAR uint8_t *rxptr = rxbuffer; FAR const uint8_t *txptr = txbuffer; - spivdbg("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); + spiinfo("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); /* Make sure that any previous transfer is flushed from the hardware */ @@ -823,7 +797,7 @@ FAR struct spi_dev_s *z16_spibus_initialize(int port) irqstate_t flags; uint8_t regval; - spivdbg("port: %d\n", port); + spiinfo("port: %d\n", port); DEBUGASSERT(port == 0); /* Check if we have already initialized the ESPI */ diff --git a/arch/z16/src/z16f/z16f_lowuart.S b/arch/z16/src/z16f/z16f_lowuart.S index 161d5ac9243c50a269ba738ff596bba69bae59cb..ef7c31a6ca4872f4d48be3cee53911625baab5f9 100644 --- a/arch/z16/src/z16f/z16f_lowuart.S +++ b/arch/z16/src/z16f/z16f_lowuart.S @@ -70,7 +70,7 @@ xdef _up_lowputc #endif #ifdef CONFIG_Z16_LOWGETC - xdef _up_lowgetc + xdef _z16_lowgetc #endif /************************************************************************* @@ -222,7 +222,7 @@ _z16f_xmitc1: #endif /* CONFIG_Z16_LOWPUTC */ /************************************************************************* - * Name: _up_lowgetc + * Name: _z16_lowgetc * * Description: * Get a character from the serial port @@ -236,34 +236,34 @@ _z16f_xmitc1: *************************************************************************/ #ifdef CONFIG_Z16_LOWGETC -_up_lowgetc: -_up_lowgetc1: +_z16_lowgetc: +_z16_lowgetc1: #ifdef HAVE_Z16F_SERIAL_CONSOLE ld r0, #Z16F_UARTSTAT0_RDA /* RDA=Receive data available */ #ifdef CONFIG_UART1_SERIAL_CONSOLE tm.b Z16F_UART1_STAT0, r0 - jp eq, _up_lowgetc1 /* While (!Z16F_UART1_STAT0 & RDA)) */ + jp eq, _z16_lowgetc1 /* While (!Z16F_UART1_STAT0 & RDA)) */ ld.ub r0, Z16F_UART1_RXD /* r0 = Z16F_UART1_RXD */ #else tm.b Z16F_UART0_STAT0,r0 /* While (!Z16F_UART0_STAT0 & RDA) */ - jp eq, _up_lowgetc1 + jp eq, _z16_lowgetc1 ld.ub r0, Z16F_UART0_RXD /* r0 = Z16F_UART0_RXD */ #endif cp r0, #%0d /* Test for '\r' */ - jp eq, _up_lowgetc2 + jp eq, _z16_lowgetc2 cp r0, #%0d /* Test \r + high bit */ - jp ne, _up_lowgetc3 + jp ne, _z16_lowgetc3 -_up_lowgetc2: +_z16_lowgetc2: ld r0, #%0a /* Convert '\r' to '\n' */ -_up_lowgetc3: /* Return value in r0 */ +_z16_lowgetc3: /* Return value in r0 */ #endif /* HAVE_Z16F_SERIAL_CONSOLE */ ret /* Return */ diff --git a/arch/z16/src/z16f/z16f_sysexec.c b/arch/z16/src/z16f/z16f_sysexec.c index d7ac63175133bea4c3aee1226e409386b80c6f60..7c3eafa0ab60ec9a8508fc3c01dc3fc70f74cad8 100644 --- a/arch/z16/src/z16f/z16f_sysexec.c +++ b/arch/z16/src/z16f/z16f_sysexec.c @@ -88,42 +88,42 @@ void z16f_sysexec(FAR chipreg_t *regs) excp = getreg16(Z16F_SYSEXCP); if ((excp & Z16F_SYSEXCP_SPOVF) != 0) { - lowsyslog(LOG_ERR, "SP OVERFLOW\n"); + err("ERROR: SP OVERFLOW\n"); } if ((excp & Z16F_SYSEXCP_PCOVF) != 0) { - lowsyslog(LOG_ERR, "PC OVERFLOW\n"); + err("ERROR: PC OVERFLOW\n"); } if ((excp & Z16F_SYSEXCP_DIV0) != 0) { - lowsyslog(LOG_ERR, "Divide by zero\n"); + err("ERROR: Divide by zero\n"); } if ((excp & Z16F_SYSEXCP_DIVOVF) != 0) { - lowsyslog(LOG_ERR, "Divide overflow\n"); + err("ERROR: Divide overflow\n"); } if ((excp & Z16F_SYSEXCP_ILL) != 0) { - lowsyslog(LOG_ERR, "Illegal instruction\n"); + err("ERROR: Illegal instruction\n"); } if ((excp & Z16F_SYSEXCP_WDTOSC) != 0) { - lowsyslog(LOG_ERR, "WDT oscillator failure\n"); + err("ERROR: WDT oscillator failure\n"); } if ((excp & Z16F_SYSEXCP_PRIOSC) != 0) { - lowsyslog(LOG_ERR, "Primary Oscillator Failure\n"); + err("ERROR: Primary Oscillator Failure\n"); } if ((excp & Z16F_SYSEXCP_WDT) != 0) { - lowsyslog(LOG_ERR, "Watchdog timeout\n"); + err("ERROR: Watchdog timeout\n"); z16f_reset(); } diff --git a/arch/z80/src/common/up_assert.c b/arch/z80/src/common/up_assert.c index 78e114d35d9e476ca8bf9cfc488e11c03e357817..da899feb6f478f875c32415838fac8b971286cab 100644 --- a/arch/z80/src/common/up_assert.c +++ b/arch/z80/src/common/up_assert.c @@ -1,7 +1,7 @@ /**************************************************************************** * common/up_assert.c * - * Copyright (C) 2007-2009, 2012-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2012-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -39,17 +39,6 @@ #include -/* Output debug info if stack dump is selected -- even if debug is not - * selected. - */ - -#ifdef CONFIG_ARCH_STACKDUMP -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 -#endif - #include #include #include @@ -75,10 +64,6 @@ # undef CONFIG_ARCH_USBDUMP #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -123,7 +108,7 @@ static int usbtrace_syslog(FAR const char *fmt, ...) /* Let vsyslog do the real work */ va_start(ap, fmt); - ret = lowvsyslog(LOG_INFO, fmt, ap); + ret = vsyslog(LOG_EMERG, fmt, ap); va_end(ap); return ret; } @@ -149,7 +134,7 @@ void up_assert(const uint8_t *filename, int lineno) void up_assert(void) #endif { -#if CONFIG_TASK_NAME_SIZE > 0 +#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG_ALERT) struct tcb_s *rtcb = this_task(); #endif @@ -157,17 +142,17 @@ void up_assert(void) #ifdef CONFIG_HAVE_FILENAME #if CONFIG_TASK_NAME_SIZE > 0 - lldbg("Assertion failed at file:%s line: %d task: %s\n", + _alert("Assertion failed at file:%s line: %d task: %s\n", filename, lineno, rtcb->name); #else - lldbg("Assertion failed at file:%s line: %d\n", + _alert("Assertion failed at file:%s line: %d\n", filename, lineno); #endif #else #if CONFIG_TASK_NAME_SIZE > 0 - lldbg("Assertion failed: task: %s\n", rtcb->name); + _alert("Assertion failed: task: %s\n", rtcb->name); #else - lldbg("Assertion failed\n"); + _alert("Assertion failed\n"); #endif #endif diff --git a/arch/z80/src/common/up_blocktask.c b/arch/z80/src/common/up_blocktask.c index 831de41317d39ce12bd7e3a29c0c268fc0045397..a4aa7b8ed507c28b6f84b03dd56cd6e9445ea59a 100644 --- a/arch/z80/src/common/up_blocktask.c +++ b/arch/z80/src/common/up_blocktask.c @@ -85,7 +85,7 @@ void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state) ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) && (tcb->task_state <= LAST_READY_TO_RUN_STATE)); - /* dbg("Blocking TCB=%p\n", tcb); */ + /* _info("Blocking TCB=%p\n", tcb); */ /* Remove the tcb task from the ready-to-run list. If we * are blocking the task at the head of the task list (the diff --git a/arch/z80/src/common/up_createstack.c b/arch/z80/src/common/up_createstack.c index 60c4733d99e232d2f91f07d594591530975f15ae..a0a2bc2507d029d3a0fd996d2736c10e2b466171 100644 --- a/arch/z80/src/common/up_createstack.c +++ b/arch/z80/src/common/up_createstack.c @@ -137,12 +137,12 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype) tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size); } -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Was the allocation successful? */ if (!tcb->stack_alloc_ptr) { - sdbg("ERROR: Failed to allocate stack, size %d\n", stack_size); + serr("ERROR: Failed to allocate stack, size %d\n", stack_size); } #endif } diff --git a/arch/z80/src/common/up_doirq.c b/arch/z80/src/common/up_doirq.c index 30e2caf9fd1489b5fe2f2b82e7192119a8ed5883..878594a126c811cf0816658b48c25aece48f5180 100644 --- a/arch/z80/src/common/up_doirq.c +++ b/arch/z80/src/common/up_doirq.c @@ -78,8 +78,8 @@ FAR chipreg_t *up_doirq(uint8_t irq, FAR chipreg_t *regs) #ifdef CONFIG_SUPPRESS_INTERRUPTS - lowsyslog(LOG_ERR, "Unexpected IRQ\n"); IRQ_ENTER(regs); + err("ERROR: Unexpected IRQ\n"); PANIC(); return NULL; /* Won't get here */ diff --git a/arch/z80/src/common/up_exit.c b/arch/z80/src/common/up_exit.c index 82f647c18c99aaea4edb441214eeb43e328dd805..29860f7d296c62e19000022e5b30ce7280121499 100644 --- a/arch/z80/src/common/up_exit.c +++ b/arch/z80/src/common/up_exit.c @@ -59,9 +59,9 @@ * Pre-processor Definitions ****************************************************************************/ -/**************************************************************************** - * Private Data - ****************************************************************************/ +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT +#endif /**************************************************************************** * Private Functions @@ -77,7 +77,7 @@ * ****************************************************************************/ -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG) +#ifdef CONFIG_DUMP_ON_EXIT static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) { #if CONFIG_NFILE_DESCRIPTORS > 0 @@ -88,8 +88,8 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) int i; #endif - lldbg(" TCB=%p name=%s\n", tcb, tcb->argv[0]); - lldbg(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state); + sinfo(" TCB=%p name=%s\n", tcb, tcb->argv[0]); + sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state); #if CONFIG_NFILE_DESCRIPTORS > 0 filelist = tcb->group->tg_filelist; @@ -98,7 +98,7 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) struct inode *inode = filelist->fl_files[i].f_inode; if (inode) { - lldbg(" fd=%d refcount=%d\n", + sinfo(" fd=%d refcount=%d\n", i, inode->i_crefs); } } @@ -112,11 +112,11 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg) if (filep->fs_fd >= 0) { #if CONFIG_STDIO_BUFFER_SIZE > 0 - lldbg(" fd=%d nbytes=%d\n", + sinfo(" fd=%d nbytes=%d\n", filep->fs_fd, filep->fs_bufpos - filep->fs_bufstart); #else - lldbg(" fd=%d\n", filep->fs_fd); + sinfo(" fd=%d\n", filep->fs_fd); #endif } } @@ -149,10 +149,10 @@ void _exit(int status) (void)up_irq_save(); - slldbg("TCB=%p exiting\n", tcb); + sinfo("TCB=%p exiting\n", tcb); -#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG) - lldbg("Other tasks:\n"); +#ifdef CONFIG_DUMP_ON_EXIT + sinfo("Other tasks:\n"); sched_foreach(_up_dumponexit, NULL); #endif @@ -165,7 +165,7 @@ void _exit(int status) */ tcb = this_task(); - slldbg("New Active Task TCB=%p\n", tcb); + sinfo("New Active Task TCB=%p\n", tcb); #ifdef CONFIG_ARCH_ADDRENV /* Make sure that the address environment for the previously running diff --git a/arch/z80/src/common/up_initialize.c b/arch/z80/src/common/up_initialize.c index 218a78232663302543378c313a897da7d681c701..9684998ff36b914883612b991536eb57bdcf27b8 100644 --- a/arch/z80/src/common/up_initialize.c +++ b/arch/z80/src/common/up_initialize.c @@ -48,7 +48,8 @@ #include #include #include -#include +#include +#include #include @@ -70,18 +71,18 @@ * ****************************************************************************/ -#if defined(CONFIG_ARCH_CALIBRATION) && defined(CONFIG_DEBUG) +#if defined(CONFIG_ARCH_CALIBRATION) && defined(CONFIG_DEBUG_FEATURES) static void up_calibratedelay(void) { int i; - lldbg("Beginning 100s delay\n"); + _warn("Beginning 100s delay\n"); for (i = 0; i < 100; i++) { up_mdelay(1000); } - lldbg("End 100s delay\n"); + _warn("End 100s delay\n"); } #else # define up_calibratedelay() @@ -176,12 +177,19 @@ void up_initialize(void) #if defined(CONFIG_DEV_LOWCONSOLE) lowconsole_init(); -#elif defined(CONFIG_SYSLOG_CONSOLE) +#elif defined(CONFIG_CONSOLE_SYSLOG) syslog_console_init(); #elif defined(CONFIG_RAMLOG_CONSOLE) ramlog_consoleinit(); #endif + /* Early initialization of the system logging device. Some SYSLOG channel + * can be initialized early in the initialization sequence because they + * depend on minimal OS initialization. + */ + + syslog_initialize(SYSLOG_INIT_EARLY); + #ifndef CONFIG_NETDEV_LATEINIT /* Initialize the network */ diff --git a/arch/z80/src/common/up_internal.h b/arch/z80/src/common/up_internal.h index 76deaa34b7b7d4b0a993236713b85ca39a3371f1..2f1436967de2a300e96c7e6b44082436637af339 100644 --- a/arch/z80/src/common/up_internal.h +++ b/arch/z80/src/common/up_internal.h @@ -51,6 +51,10 @@ #undef CONFIG_SUPPRESS_UART_CONFIG /* Do not reconfig UART */ #undef CONFIG_DUMP_ON_EXIT /* Dump task state on exit */ +#ifndef CONFIG_DEBUG_SCHED_INFO +# undef CONFIG_DUMP_ON_EXIT /* Needs CONFIG_DEBUG_SCHED_INFO */ +#endif + /**************************************************************************** * Included Files ****************************************************************************/ @@ -88,7 +92,7 @@ # if defined(CONFIG_RAMLOG_CONSOLE) # undef USE_SERIALDRIVER # undef CONFIG_DEV_LOWCONSOLE -# elif defined(CONFIG_SYSLOG_CONSOLE) +# elif defined(CONFIG_CONSOLE_SYSLOG) # undef USE_SERIALDRIVER # undef CONFIG_DEV_LOWCONSOLE # elif defined(CONFIG_DEV_LOWCONSOLE) @@ -173,7 +177,7 @@ void lowconsole_init(void); /* Defined in drivers/syslog_console.c */ -#ifdef CONFIG_SYSLOG_CONSOLE +#ifdef CONFIG_CONSOLE_SYSLOG void syslog_console_init(); #else # define syslog_console_init() diff --git a/arch/z80/src/common/up_releasepending.c b/arch/z80/src/common/up_releasepending.c index e4bc07a78fb7d9522f3ed8387d5dcce3324c67ef..3a3974863f7dac3d06d71f83ed403e22da2f5c43 100644 --- a/arch/z80/src/common/up_releasepending.c +++ b/arch/z80/src/common/up_releasepending.c @@ -70,7 +70,7 @@ void up_release_pending(void) { FAR struct tcb_s *rtcb = this_task(); - slldbg("From TCB=%p\n", rtcb); + sinfo("From TCB=%p\n", rtcb); /* Merge the g_pendingtasks list into the ready-to-run task list */ diff --git a/arch/z80/src/common/up_reprioritizertr.c b/arch/z80/src/common/up_reprioritizertr.c index d7102775631a35b569c4e6550ec0855a759c981c..12c4bcef99c1a96e9aa1eaca7e746ca3b711458d 100644 --- a/arch/z80/src/common/up_reprioritizertr.c +++ b/arch/z80/src/common/up_reprioritizertr.c @@ -98,7 +98,7 @@ void up_reprioritize_rtr(FAR struct tcb_s *tcb, uint8_t priority) FAR struct tcb_s *rtcb = this_task(); bool switch_needed; - slldbg("TCB=%p PRI=%d\n", tcb, priority); + sinfo("TCB=%p PRI=%d\n", tcb, priority); /* Remove the tcb task from the ready-to-run list. * sched_removereadytorun will return true if we just diff --git a/arch/z80/src/common/up_stackdump.c b/arch/z80/src/common/up_stackdump.c index 32a3fc68302cad1f05cde59fb9c2ba9bd41f8b9a..1ad64c66a946a82f54a9191fc9fbf4d1f9ff483e 100644 --- a/arch/z80/src/common/up_stackdump.c +++ b/arch/z80/src/common/up_stackdump.c @@ -1,7 +1,7 @@ /**************************************************************************** * common/up_stackdump.c * - * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -39,13 +39,6 @@ #include -/* Output debug info -- even if debug is not selected. */ - -#undef CONFIG_DEBUG -#undef CONFIG_DEBUG_VERBOSE -#define CONFIG_DEBUG 1 -#define CONFIG_DEBUG_VERBOSE 1 - #include #include @@ -55,14 +48,6 @@ #ifdef CONFIG_ARCH_STACKDUMP -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -83,13 +68,13 @@ static void up_stackdump(void) uint16_t stack_base = (uint16_t)rtcb->adj_stack_ptr; uint16_t stack_size = (uint16_t)rtcb->adj_stack_size; - lldbg("stack_base: %04x\n", stack_base); - lldbg("stack_size: %04x\n", stack_size); - lldbg("sp: %04x\n", sp); + _alert("stack_base: %04x\n", stack_base); + _alert("stack_size: %04x\n", stack_size); + _alert("sp: %04x\n", sp); if (sp >= stack_base || sp < stack_base - stack_size) { - lldbg("ERROR: Stack pointer is not within allocated stack\n"); + _alert("ERROR: Stack pointer is not within allocated stack\n"); return; } else @@ -99,9 +84,9 @@ static void up_stackdump(void) for (stack = sp & ~0x0f; stack < stack_base; stack += 8*sizeof(uint16_t)) { uint16_t *ptr = (uint16_t*)stack; - lldbg("%04x: %04x %04x %04x %04x %04x %04x %04x %04x\n", - stack, ptr[0], ptr[1], ptr[2], ptr[3], - ptr[4], ptr[5], ptr[6], ptr[7]); + _alert("%04x: %04x %04x %04x %04x %04x %04x %04x %04x\n", + stack, ptr[0], ptr[1], ptr[2], ptr[3], + ptr[4], ptr[5], ptr[6], ptr[7]); } } } diff --git a/arch/z80/src/common/up_stackframe.c b/arch/z80/src/common/up_stackframe.c index 9da978a4f7d41b2a4598310012b25233012b849c..8f4a0f180623672827930602707ca523647bce2a 100644 --- a/arch/z80/src/common/up_stackframe.c +++ b/arch/z80/src/common/up_stackframe.c @@ -63,14 +63,6 @@ #define STACK_ALIGN_DOWN(a) ((a) & ~STACK_ALIGN_MASK) #define STACK_ALIGN_UP(a) (((a) + STACK_ALIGN_MASK) & ~STACK_ALIGN_MASK) -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/z80/src/common/up_unblocktask.c b/arch/z80/src/common/up_unblocktask.c index f110172052b5c3043cfd696e7e5749f29864fcde..3539ef404d9214010f5465198b4143bc69a4bd45 100644 --- a/arch/z80/src/common/up_unblocktask.c +++ b/arch/z80/src/common/up_unblocktask.c @@ -81,7 +81,7 @@ void up_unblock_task(FAR struct tcb_s *tcb) ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) && (tcb->task_state <= LAST_BLOCKED_STATE)); - /* dbg("Unblocking TCB=%p\n", tcb); */ + /* _info("Unblocking TCB=%p\n", tcb); */ /* Remove the task from the blocked task list */ diff --git a/arch/z80/src/ez80/ez80_emac.c b/arch/z80/src/ez80/ez80_emac.c index 2b1b5834fec8112a72d9b9b5446bed9942921636..640c1d3fc21f0137d484236e7d04f206ddb8f126 100644 --- a/arch/z80/src/ez80/ez80_emac.c +++ b/arch/z80/src/ez80/ez80_emac.c @@ -244,7 +244,7 @@ /* EMAC statistics (debug only) */ -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_NET) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_NET) struct ez80mac_statistics_s { uint32_t rx_int; /* Number of Rx interrupts received */ @@ -321,13 +321,13 @@ struct ez80emac_driver_s WDOG_ID txpoll; /* TX poll timer */ WDOG_ID txtimeout; /* TX timeout timer */ -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_NET) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_NET) struct ez80mac_statistics_s stat; #endif - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ - struct net_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by the network */ }; /**************************************************************************** @@ -574,11 +574,11 @@ static int ez80emac_miiconfigure(FAR struct ez80emac_driver_s *priv) /* Verify that the detect PHY is an AMD Am87c874 as expected */ -#ifdef CONFIG_DEBUG /* Parameter checking only done when DEBUG is enabled */ +#ifdef CONFIG_DEBUG_FEATURES /* Parameter checking only done when DEBUG is enabled */ phyval = ez80emac_miiread(priv, MII_PHYID1); if (phyval != MII_PHYID1_AM79C874) { - ndbg("Not an Am79c874 PHY: PHY1=%04x vs %04x\n", phyval, MII_PHYID1_AM79C874); + nerr("ERROR: Not an Am79c874 PHY: PHY1=%04x vs %04x\n", phyval, MII_PHYID1_AM79C874); ret = -ENODEV; goto dumpregs; } @@ -586,7 +586,7 @@ static int ez80emac_miiconfigure(FAR struct ez80emac_driver_s *priv) phyval = ez80emac_miiread(priv, MII_PHYID2); if (phyval != MII_PHYID2_AM79C874) { - ndbg("Not an Am79c874 PHY: PHY2=%04x vs %04x\n", phyval, MII_PHYID2_AM79C874); + nerr("ERROR: Not an Am79c874 PHY: PHY2=%04x vs %04x\n", phyval, MII_PHYID2_AM79C874); ret = -ENODEV; goto dumpregs; } @@ -618,7 +618,7 @@ static int ez80emac_miiconfigure(FAR struct ez80emac_driver_s *priv) #if CONFIG_EZ80_PHYCONFIG == EZ80_EMAC_AUTONEG - ndbg("Configure autonegotiation\n"); + ninfo("Configure autonegotiation\n"); if (bauto) { ez80emac_miiwrite(priv, MII_ADVERTISE, @@ -628,12 +628,12 @@ static int ez80emac_miiconfigure(FAR struct ez80emac_driver_s *priv) } else { - ndbg("Am79c784 is not capable of autonegotiation\n"); + nerr("ERROR: Am79c784 is not capable of autonegotiation\n"); } #elif CONFIG_EZ80_PHYCONFIG == EZ80_EMAC_100BFD - ndbg("100BASETX full duplex\n"); + ninfo("100BASETX full duplex\n"); phyval |= MII_MCR_SPEED100 | MII_MCR_FULLDPLX; ez80emac_miiwrite(priv, MII_ADVERTISE, MII_ADVERTISE_100BASETXFULL|MII_ADVERTISE_100BASETXHALF| @@ -642,7 +642,7 @@ static int ez80emac_miiconfigure(FAR struct ez80emac_driver_s *priv) #elif CONFIG_EZ80_PHYCONFIG == EZ80_EMAC_100BHD - ndbg("100BASETX half duplex\n"); + ninfo("100BASETX half duplex\n"); phyval |= MII_MCR_SPEED100; ez80emac_miiwrite(priv, MII_ADVERTISE, MII_ADVERTISE_100BASETXHALF|MII_ADVERTISE_10BASETXFULL| @@ -650,14 +650,14 @@ static int ez80emac_miiconfigure(FAR struct ez80emac_driver_s *priv) #elif CONFIG_EZ80_PHYCONFIG == EZ80_EMAC_10BFD - ndbg("10BASETX full duplex\n"); + ninfo("10BASETX full duplex\n"); phyval |= MII_MCR_FULLDPLX; ez80emac_miiwrite(priv, MII_ADVERTISE, MII_ADVERTISE_10BASETXFULL|MII_ADVERTISE_10BASETXHALF|MII_ADVERTISE_CSMA); #elif CONFIG_EZ80_PHYCONFIG == EZ80_EMAC_10BHD - ndbg("10BASETX half duplex\n"); + ninfo("10BASETX half duplex\n"); ez80emac_miiwrite(priv, MII_ADVERTISE, MII_ADVERTISE_10BASETXHALF|MII_ADVERTISE_CSMA); @@ -681,7 +681,7 @@ static int ez80emac_miiconfigure(FAR struct ez80emac_driver_s *priv) if ((phyval & MII_MSR_LINKSTATUS) == 0) { - ndbg("Failed to establish link\n"); + nerr("ERROR: Failed to establish link\n"); ret = -ETIMEDOUT; } else @@ -700,16 +700,16 @@ static int ez80emac_miiconfigure(FAR struct ez80emac_driver_s *priv) } dumpregs: - nvdbg("Am79c874 MII registers (FIAD=%lx)\n", CONFIG_EZ80_FIAD); - nvdbg(" MII_MCR: %04x\n", ez80emac_miiread(priv, MII_MCR)); - nvdbg(" MII_MSR: %04x\n", ez80emac_miiread(priv, MII_MSR)); - nvdbg(" MII_PHYID1: %04x\n", ez80emac_miiread(priv, MII_PHYID1)); - nvdbg(" MII_PHYID2: %04x\n", ez80emac_miiread(priv, MII_PHYID2)); - nvdbg(" MII_ADVERTISE: %04x\n", ez80emac_miiread(priv, MII_ADVERTISE)); - nvdbg(" MII_LPA: %04x\n", ez80emac_miiread(priv, MII_LPA)); - nvdbg(" MII_EXPANSION: %04x\n", ez80emac_miiread(priv, MII_EXPANSION)); - nvdbg(" MII_DIAGNOSTICS: %04x\n", ez80emac_miiread(priv, MII_AM79C874_DIAGNOSTIC)); - nvdbg("EMAC CFG1: %02x\n", inp(EZ80_EMAC_CFG1)); + ninfo("Am79c874 MII registers (FIAD=%lx)\n", CONFIG_EZ80_FIAD); + ninfo(" MII_MCR: %04x\n", ez80emac_miiread(priv, MII_MCR)); + ninfo(" MII_MSR: %04x\n", ez80emac_miiread(priv, MII_MSR)); + ninfo(" MII_PHYID1: %04x\n", ez80emac_miiread(priv, MII_PHYID1)); + ninfo(" MII_PHYID2: %04x\n", ez80emac_miiread(priv, MII_PHYID2)); + ninfo(" MII_ADVERTISE: %04x\n", ez80emac_miiread(priv, MII_ADVERTISE)); + ninfo(" MII_LPA: %04x\n", ez80emac_miiread(priv, MII_LPA)); + ninfo(" MII_EXPANSION: %04x\n", ez80emac_miiread(priv, MII_EXPANSION)); + ninfo(" MII_DIAGNOSTICS: %04x\n", ez80emac_miiread(priv, MII_AM79C874_DIAGNOSTIC)); + ninfo("EMAC CFG1: %02x\n", inp(EZ80_EMAC_CFG1)); return ret; } #else @@ -731,21 +731,21 @@ static int ez80emac_miiconfigure(FAR struct ez80emac_driver_s *priv) if (!ez80emac_miipoll(priv, MII_MCR, MII_MCR_ANRESTART, false)) { - ndbg("Autonegotiation didn't start.\n"); + nerr("ERROR: Autonegotiation didn't start.\n"); } /* Wait for auto-negotiation to complete */ if (!ez80emac_miipoll(priv, MII_MSR, MII_MSR_ANEGCOMPLETE, true)) { - ndbg("Autonegotiation didn't complete.\n"); + nerr("ERROR: Autonegotiation didn't complete.\n"); } /* Wait link */ if (!ez80emac_miipoll(priv, MII_MSR, MII_MSR_LINKSTATUS, true)) { - ndbg("Link is down!\n"); + nwarn("WARNING: Link is down!\n"); priv->blinkok = false; } else @@ -763,7 +763,7 @@ static int ez80emac_miiconfigure(FAR struct ez80emac_driver_s *priv) if ((advertise & MII_ADVERTISE_100BASETXFULL) && (lpa & MII_LPA_100BASETXFULL)) { - ndbg("100BASETX full duplex\n"); + ninfo("100BASETX full duplex\n"); regval = inp(EZ80_EMAC_CFG1); regval |= EMAC_CFG1_FULLHD; /* Enable full duplex mode */ outp(EZ80_EMAC_CFG1, regval); @@ -775,7 +775,7 @@ static int ez80emac_miiconfigure(FAR struct ez80emac_driver_s *priv) else if ((advertise & MII_ADVERTISE_100BASETXHALF) && (lpa & MII_LPA_100BASETXHALF)) { - ndbg("100BASETX half duplex\n"); + ninfo("100BASETX half duplex\n"); regval = inp(EZ80_EMAC_CFG1); regval &= ~EMAC_CFG1_FULLHD; /* Disable full duplex mode */ outp(EZ80_EMAC_CFG1, regval); @@ -787,7 +787,7 @@ static int ez80emac_miiconfigure(FAR struct ez80emac_driver_s *priv) else if ((advertise & MII_ADVERTISE_10BASETXFULL) && (lpa & MII_LPA_10BASETXFULL)) { - ndbg("10BASETX full duplex\n"); + ninfo("10BASETX full duplex\n"); regval = inp(EZ80_EMAC_CFG1); regval |= EMAC_CFG1_FULLHD; /* Enable full duplex mode */ outp(EZ80_EMAC_CFG1, regval); @@ -799,7 +799,7 @@ static int ez80emac_miiconfigure(FAR struct ez80emac_driver_s *priv) else if ((advertise & MII_ADVERTISE_10BASETXHALF) && (lpa & MII_LPA_10BASETXHALF)) { - ndbg("10BASETX half duplex\n"); + ninfo("10BASETX half duplex\n"); regval = inp(EZ80_EMAC_CFG1); regval &= ~EMAC_CFG1_FULLHD; /* Disable full duplex mode */ outp(EZ80_EMAC_CFG1, regval); @@ -808,7 +808,7 @@ static int ez80emac_miiconfigure(FAR struct ez80emac_driver_s *priv) } else { - ndbg("No valid connection; force 10Mbps half-duplex.\n"); + nwarn("WARNING: No valid connection; force 10Mbps half-duplex.\n"); regval = inp(EZ80_EMAC_CFG1); regval &= ~EMAC_CFG1_FULLHD; /* Disable full duplex mode */ outp(EZ80_EMAC_CFG1, regval); @@ -838,15 +838,15 @@ static int ez80emac_miiconfigure(FAR struct ez80emac_driver_s *priv) mcr |= MII_MCR_ANENABLE; ez80emac_miiwrite(priv, MII_MCR, mcr); - nvdbg("MII registers (FIAD=%lx)\n", CONFIG_EZ80_FIAD); - nvdbg(" MII_MCR: %04x\n", ez80emac_miiread(priv, MII_MCR)); - nvdbg(" MII_MSR: %04x\n", ez80emac_miiread(priv, MII_MSR)); - nvdbg(" MII_PHYID1: %04x\n", ez80emac_miiread(priv, MII_PHYID1)); - nvdbg(" MII_PHYID2: %04x\n", ez80emac_miiread(priv, MII_PHYID2)); - nvdbg(" MII_ADVERTISE: %04x\n", ez80emac_miiread(priv, MII_ADVERTISE)); - nvdbg(" MII_LPA: %04x\n", ez80emac_miiread(priv, MII_LPA)); - nvdbg(" MII_EXPANSION: %04x\n", ez80emac_miiread(priv, MII_EXPANSION)); - nvdbg("EMAC CFG1: %02x\n", inp(EZ80_EMAC_CFG11)); + ninfo("MII registers (FIAD=%lx)\n", CONFIG_EZ80_FIAD); + ninfo(" MII_MCR: %04x\n", ez80emac_miiread(priv, MII_MCR)); + ninfo(" MII_MSR: %04x\n", ez80emac_miiread(priv, MII_MSR)); + ninfo(" MII_PHYID1: %04x\n", ez80emac_miiread(priv, MII_PHYID1)); + ninfo(" MII_PHYID2: %04x\n", ez80emac_miiread(priv, MII_PHYID2)); + ninfo(" MII_ADVERTISE: %04x\n", ez80emac_miiread(priv, MII_ADVERTISE)); + ninfo(" MII_LPA: %04x\n", ez80emac_miiread(priv, MII_LPA)); + ninfo(" MII_EXPANSION: %04x\n", ez80emac_miiread(priv, MII_EXPANSION)); + ninfo("EMAC CFG1: %02x\n", inp(EZ80_EMAC_CFG11)); return OK; } #endif @@ -960,9 +960,9 @@ static int ez80emac_transmit(struct ez80emac_driver_s *priv) * handler and, therefore, may be suspended when debug output is generated! */ - nllvdbg("txnext=%p {%06x, %u, %04x} trp=%02x%02x\n", - priv->txnext, priv->txnext->np, priv->txnext->pktsize, priv->txnext->stat, - inp(EZ80_EMAC_TRP_H), inp(EZ80_EMAC_TRP_L)); + ninfo("txnext=%p {%06x, %u, %04x} trp=%02x%02x\n", + priv->txnext, priv->txnext->np, priv->txnext->pktsize, priv->txnext->stat, + inp(EZ80_EMAC_TRP_H), inp(EZ80_EMAC_TRP_L)); /* Increment statistics */ @@ -1039,11 +1039,11 @@ static int ez80emac_transmit(struct ez80emac_driver_s *priv) outp(EZ80_EMAC_PTMR, EMAC_PTMR); leave_critical_section(flags); - nllvdbg("txdesc=%p {%06x, %u, %04x}\n", - txdesc, txdesc->np, txdesc->pktsize, txdesc->stat); - nllvdbg("txnext=%p {%06x, %u, %04x} trp=%02x%02x\n", - txnext, txnext->np, txnext->pktsize, txnext->stat, - inp(EZ80_EMAC_TRP_H), inp(EZ80_EMAC_TRP_L)); + ninfo("txdesc=%p {%06x, %u, %04x}\n", + txdesc, txdesc->np, txdesc->pktsize, txdesc->stat); + ninfo("txnext=%p {%06x, %u, %04x} trp=%02x%02x\n", + txnext, txnext->np, txnext->pktsize, txnext->stat, + inp(EZ80_EMAC_TRP_H), inp(EZ80_EMAC_TRP_L)); /* Setup the TX timeout watchdog (perhaps restarting the timer) */ @@ -1055,8 +1055,9 @@ static int ez80emac_transmit(struct ez80emac_driver_s *priv) * Function: ez80emac_txpoll * * Description: - * The transmitter is available, check if uIP has any outgoing packets ready - * to send. This is a callback from devif_poll(). devif_poll() may be called: + * The transmitter is available, check if the network has any outgoing + * packets ready to send. This is a callback from devif_poll(). + * devif_poll() may be called: * * 1. When the preceding TX packet send is complete, * 2. When the preceding TX packet send timesout and the interface is reset @@ -1081,7 +1082,7 @@ static int ez80emac_txpoll(struct net_driver_s *dev) * the field d_len is set to a value > 0. */ - nvdbg("Poll result: d_len=%d\n", priv->dev.d_len); + ninfo("Poll result: d_len=%d\n", priv->dev.d_len); if (priv->dev.d_len > 0) { /* Look up the destination MAC address and add it to the Ethernet @@ -1196,7 +1197,7 @@ static int ez80emac_receive(struct ez80emac_driver_s *priv) */ rwp = ez80emac_rwp(); - nvdbg("rxnext=%p {%06x, %u, %04x} rrp=%06x rwp=%06x blkslft=%02x\n", + ninfo("rxnext=%p {%06x, %u, %04x} rrp=%06x rwp=%06x blkslft=%02x\n", rxdesc, rxdesc->np, rxdesc->pktsize, rxdesc->stat, ez80emac_rrp(), rwp, inp(EZ80_EMAC_BLKSLFT_H), inp(EZ80_EMAC_BLKSLFT_L)); @@ -1221,19 +1222,19 @@ static int ez80emac_receive(struct ez80emac_driver_s *priv) if ((rxdesc->stat & EMAC_RXDESC_OK) == 0) { - nvdbg("Skipping bad RX pkt: %04x\n", rxdesc->stat); + ninfo("Skipping bad RX pkt: %04x\n", rxdesc->stat); EMAC_STAT(priv, rx_errors); EMAC_STAT(priv, rx_nok); continue; } /* We have a good packet. Check if the packet is a valid size - * for the uIP buffer configuration (I routinely see + * for the network buffer configuration (I routinely see */ if (rxdesc->pktsize > CONFIG_NET_ETH_MTU) { - nvdbg("Truncated oversize RX pkt: %d->%d\n", rxdesc->pktsize, CONFIG_NET_ETH_MTU); + ninfo("Truncated oversize RX pkt: %d->%d\n", rxdesc->pktsize, CONFIG_NET_ETH_MTU); pktlen = CONFIG_NET_ETH_MTU; } else @@ -1251,7 +1252,7 @@ static int ez80emac_receive(struct ez80emac_driver_s *priv) if ((FAR uint8_t*)(psrc + pktlen) > (FAR uint8_t*)priv->rxendp1) { int nbytes = (int)((FAR uint8_t*)priv->rxendp1 - (FAR uint8_t*)psrc); - nvdbg("RX wraps after %d bytes\n", nbytes + SIZEOF_EMACSDESC); + ninfo("RX wraps after %d bytes\n", nbytes + SIZEOF_EMACSDESC); memcpy(pdest, psrc, nbytes); memcpy(&pdest[nbytes], priv->rxstart, pktlen - nbytes); @@ -1287,7 +1288,7 @@ static int ez80emac_receive(struct ez80emac_driver_s *priv) outp(EZ80_EMAC_RRP_L, (uint8_t)((uint24_t)rxdesc & 0xff)); outp(EZ80_EMAC_RRP_H, (uint8_t)(((uint24_t)rxdesc >> 8) & 0xff)); - nvdbg("rxnext=%p {%06x, %u, %04x} rrp=%06x rwp=%06x blkslft=%02x\n", + ninfo("rxnext=%p {%06x, %u, %04x} rrp=%06x rwp=%06x blkslft=%02x\n", rxdesc, rxdesc->np, rxdesc->pktsize, rxdesc->stat, ez80emac_rrp(), rwp, inp(EZ80_EMAC_BLKSLFT_H), inp(EZ80_EMAC_BLKSLFT_L)); @@ -1303,7 +1304,7 @@ static int ez80emac_receive(struct ez80emac_driver_s *priv) #ifdef CONFIG_NET_IPv4 if (ETHBUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); /* Handle ARP on input then give the IPv4 packet to the network * layer @@ -1344,7 +1345,7 @@ static int ez80emac_receive(struct ez80emac_driver_s *priv) #ifdef CONFIG_NET_IPv6 if (ETHBUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); /* Give the IPv6 packet to the network layer */ @@ -1382,7 +1383,7 @@ static int ez80emac_receive(struct ez80emac_driver_s *priv) #ifdef CONFIG_NET_ARP if (ETHBUF->type == htons(ETHTYPE_ARP)) { - nvdbg("ARP packet received (%02x)\n", ETHBUF->type); + ninfo("ARP packet received (%02x)\n", ETHBUF->type); EMAC_STAT(priv, rx_arp); arp_arpin(&priv->dev); @@ -1399,7 +1400,7 @@ static int ez80emac_receive(struct ez80emac_driver_s *priv) else #endif { - ndbg("Unsupported packet type dropped (%02x)\n", ETHBUF->type); + ninfo("Unsupported packet type dropped (%02x)\n", ETHBUF->type); EMAC_STAT(priv, rx_dropped); } @@ -1447,7 +1448,7 @@ static int ez80emac_txinterrupt(int irq, FAR void *context) /* All events are packet/control frame transmit complete events */ - nvdbg("txhead=%p {%06x, %u, %04x} trp=%02x%02x istat=%02x\n", + ninfo("txhead=%p {%06x, %u, %04x} trp=%02x%02x istat=%02x\n", txhead, txhead->np, txhead->pktsize, txhead->stat, inp(EZ80_EMAC_TRP_H), inp(EZ80_EMAC_TRP_L), istat); @@ -1457,9 +1458,9 @@ static int ez80emac_txinterrupt(int irq, FAR void *context) { if ((txhead->stat & EMAC_TXDESC_ABORT) != 0) { - ndbg("Descriptor %p aborted {%06x, %u, %04x} trp=%02x%02x\n", - txhead, txhead->np, txhead->pktsize, txhead->stat, - inp(EZ80_EMAC_TRP_H), inp(EZ80_EMAC_TRP_L)); + nwarn("WARNING: Descriptor %p aborted {%06x, %u, %04x} trp=%02x%02x\n", + txhead, txhead->np, txhead->pktsize, txhead->stat, + inp(EZ80_EMAC_TRP_H), inp(EZ80_EMAC_TRP_L)); EMAC_STAT(priv, tx_errors); EMAC_STAT(priv, tx_abterrors); @@ -1470,7 +1471,7 @@ static int ez80emac_txinterrupt(int irq, FAR void *context) txhead = (FAR struct ez80emac_desc_s *)txhead->np; if (txhead) { - nvdbg("txhead=%p {%06x, %u, %04x} trp=%02x%02x\n", + ninfo("txhead=%p {%06x, %u, %04x} trp=%02x%02x\n", txhead, txhead->np, txhead->pktsize, txhead->stat, inp(EZ80_EMAC_TRP_H), inp(EZ80_EMAC_TRP_L)); } @@ -1483,7 +1484,7 @@ static int ez80emac_txinterrupt(int irq, FAR void *context) priv->txhead = txhead; if (!priv->txhead) { - nvdbg("No pending Tx.. Stopping XMIT function.\n"); + ninfo("No pending Tx.. Stopping XMIT function.\n"); /* Stop the Tx poll timer. (It will get restarted when we have * something to send @@ -1603,7 +1604,7 @@ static int ez80emac_sysinterrupt(int irq, FAR void *context) if ((istat & EMAC_ISTAT_TXFSMERR) != 0) { - ndbg("Tx FSMERR txhead=%p {%06x, %u, %04x} trp=%02x%02x istat=%02x\n", + nwarn("WARNING: Tx FSMERR txhead=%p {%06x, %u, %04x} trp=%02x%02x istat=%02x\n", priv->txhead, priv->txhead->np, priv->txhead->pktsize, priv->txhead->stat, inp(EZ80_EMAC_TRP_H), inp(EZ80_EMAC_TRP_L), istat); @@ -1619,7 +1620,7 @@ static int ez80emac_sysinterrupt(int irq, FAR void *context) if ((istat & EMAC_ISTAT_RXOVR) != 0) { - ndbg("Rx OVR rxnext=%p {%06x, %u, %04x} rrp=%02x%02x rwp=%02x%02x blkslft=%02x istat=%02x\n", + nwarn("WARNING: Rx OVR rxnext=%p {%06x, %u, %04x} rrp=%02x%02x rwp=%02x%02x blkslft=%02x istat=%02x\n", priv->rxnext, priv->rxnext->np, priv->rxnext->pktsize, priv->rxnext->stat, inp(EZ80_EMAC_RRP_H), inp(EZ80_EMAC_RRP_L), inp(EZ80_EMAC_RWP_H), inp(EZ80_EMAC_RWP_L), @@ -1669,7 +1670,7 @@ static void ez80emac_txtimeout(int argc, uint32_t arg, ...) ez80emac_ifup(&priv->dev); leave_critical_section(flags); - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ (void)devif_poll(&priv->dev, ez80emac_txpoll); } @@ -1695,7 +1696,7 @@ static void ez80emac_polltimer(int argc, uint32_t arg, ...) { struct ez80emac_driver_s *priv = (struct ez80emac_driver_s *)arg; - /* Poll uIP for new XMIT data */ + /* Poll the network for new XMIT data */ (void)devif_timer(&priv->dev, ez80emac_txpoll); @@ -1727,13 +1728,13 @@ static int ez80emac_ifup(FAR struct net_driver_s *dev) uint8_t regval; int ret; - ndbg("Bringing up: MAC %02x:%02x:%02x:%02x:%02x:%02x\n", - dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], - dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], - dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5]); - ndbg(" IP %d.%d.%d.%d\n", - dev->d_ipaddr >> 24, (dev->d_ipaddr >> 16) & 0xff, - (dev->d_ipaddr >> 8) & 0xff, dev->d_ipaddr & 0xff); + ninfo("Bringing up: MAC %02x:%02x:%02x:%02x:%02x:%02x\n", + dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], + dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], + dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5]); + ninfo(" IP %d.%d.%d.%d\n", + dev->d_ipaddr >> 24, (dev->d_ipaddr >> 16) & 0xff, + (dev->d_ipaddr >> 8) & 0xff, dev->d_ipaddr & 0xff); /* Bring up the interface -- Must be down right now */ @@ -1882,7 +1883,7 @@ static int ez80emac_txavail(struct net_driver_s *dev) /* Check if there is room in the hardware to hold another outgoing packet. */ - /* If so, then poll uIP for new XMIT data */ + /* If so, then poll the network for new XMIT data */ (void)devif_poll(&priv->dev, ez80emac_txpoll); } @@ -2008,7 +2009,7 @@ static int ez80_emacinitialize(void) priv->txnext->pktsize = 0; priv->txnext->stat = 0; - nvdbg("txnext=%p {%06x, %u, %04x} tlbp=%02x%02x trp=%02x%02x\n", + ninfo("txnext=%p {%06x, %u, %04x} tlbp=%02x%02x trp=%02x%02x\n", priv->txnext, priv->txnext->np, priv->txnext->pktsize, priv->txnext->stat, inp(EZ80_EMAC_TLBP_H), inp(EZ80_EMAC_TLBP_L), inp(EZ80_EMAC_TRP_H), inp(EZ80_EMAC_TRP_L)); @@ -2029,7 +2030,7 @@ static int ez80_emacinitialize(void) priv->rxnext->pktsize = 0; priv->rxnext->stat = 0; - nvdbg("rxnext=%p {%06x, %u, %04x} bp=%02x%02x\n", + ninfo("rxnext=%p {%06x, %u, %04x} bp=%02x%02x\n", priv->rxnext, priv->rxnext->np, priv->rxnext->pktsize, priv->rxnext->stat, inp(EZ80_EMAC_BP_H), inp(EZ80_EMAC_BP_L)); @@ -2049,7 +2050,7 @@ static int ez80_emacinitialize(void) outp(EZ80_EMAC_RRP_L, (uint8_t)(addr & 0xff)); outp(EZ80_EMAC_RRP_H, (uint8_t)((addr >> 8) & 0xff)); - nvdbg("rrp=%02x%02x rwp=%02x%02x\n", + ninfo("rrp=%02x%02x rwp=%02x%02x\n", inp(EZ80_EMAC_RRP_H), inp(EZ80_EMAC_RRP_L), inp(EZ80_EMAC_RWP_H), inp(EZ80_EMAC_RWP_L)); @@ -2062,7 +2063,7 @@ static int ez80_emacinitialize(void) outp(EZ80_EMAC_RHBP_H, (uint8_t)((addr >> 8) & 0xff)); priv->rxendp1 = (FAR struct ez80emac_desc_s *)addr; - nvdbg("rxendp1=%p rhbp=%02x%02x\n", + ninfo("rxendp1=%p rhbp=%02x%02x\n", priv->rxendp1, inp(EZ80_EMAC_RHBP_H), inp(EZ80_EMAC_RHBP_L)); @@ -2071,7 +2072,7 @@ static int ez80_emacinitialize(void) */ outp(EZ80_EMAC_BUFSZ, EMAC_BUFSZ); - nvdbg("bufsz=%02x blksleft=%02x%02x\n", + ninfo("bufsz=%02x blksleft=%02x%02x\n", inp(EZ80_EMAC_BUFSZ), inp(EZ80_EMAC_BLKSLFT_H), inp(EZ80_EMAC_BLKSLFT_L)); /* Software reset */ @@ -2083,7 +2084,7 @@ static int ez80_emacinitialize(void) regval &= ~EMAC_RST_SRST; outp(EZ80_EMAC_RST, regval); - nvdbg("After soft reset: rwp=%02x%02x trp=%02x%02x\n", + ninfo("After soft reset: rwp=%02x%02x trp=%02x%02x\n", inp(EZ80_EMAC_RWP_H), inp(EZ80_EMAC_RWP_L), inp(EZ80_EMAC_TRP_H), inp(EZ80_EMAC_TRP_L)); @@ -2093,7 +2094,7 @@ static int ez80_emacinitialize(void) ez80emac_miiwrite(priv, MII_MCR, MII_MCR_RESET); if (!ez80emac_miipoll(priv, MII_MCR, MII_MCR_RESET, false)) { - ndbg("PHY reset error.\n"); + nerr("ERROR: PHY reset error.\n"); } /* Initialize MAC */ @@ -2148,7 +2149,7 @@ static int ez80_emacinitialize(void) ez80emac_miiwrite(priv, MII_MCR, MII_MCR_RESET); if (!ez80emac_miipoll(priv, MII_MCR, MII_MCR_RESET, false)) { - ndbg("PHY reset error.\n"); + nerr("ERROR: PHY reset error.\n"); ret = -EIO; goto errout; } @@ -2199,7 +2200,7 @@ int up_netinitialize(void) ret = irq_attach(EZ80_EMACSYS_IRQ, ez80emac_sysinterrupt); if (ret < 0) { - nlldbg("Unable to attach IRQ %d\n", EZ80_EMACSYS_IRQ); + nerr("ERROR: Unable to attach IRQ %d\n", EZ80_EMACSYS_IRQ); ret = -EAGAIN; goto errout; } @@ -2207,7 +2208,7 @@ int up_netinitialize(void) ret = irq_attach(EZ80_EMACRX_IRQ, ez80emac_rxinterrupt); if (ret < 0) { - nlldbg("Unable to attach IRQ %d\n", EZ80_EMACRX_IRQ); + nerr("ERROR: Unable to attach IRQ %d\n", EZ80_EMACRX_IRQ); ret = -EAGAIN; goto errout; } @@ -2215,7 +2216,7 @@ int up_netinitialize(void) ret = irq_attach(EZ80_EMACTX_IRQ, ez80emac_txinterrupt); if (ret < 0) { - nlldbg("Unable to attach IRQ %d\n", EZ80_EMACTX_IRQ); + nerr("ERROR: Unable to attach IRQ %d\n", EZ80_EMACTX_IRQ); ret = -EAGAIN; goto errout; } @@ -2256,7 +2257,7 @@ errout: * Add one MAC address to the multi-cast hash table * * Parameters: - * dev - Reference to the uIP driver state structure + * dev - Reference to the network driver state structure * mac - The MAC address to add * enable - true: Enable filtering on this address; false: disable * diff --git a/arch/z80/src/ez80/ez80_i2c.c b/arch/z80/src/ez80/ez80_i2c.c index f1c8a2bcd1a5f506dbbf2c5d205eb03a2d02f5a4..0e4bdb1b28a5f23b547fc0635987fc1e20785503 100644 --- a/arch/z80/src/ez80/ez80_i2c.c +++ b/arch/z80/src/ez80/ez80_i2c.c @@ -399,12 +399,12 @@ static int ez80_i2c_sendaddr(struct ez80_i2cdev_s *priv, uint8_t readbit) */ sr = ez80_i2c_waitiflg(); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (sr != I2C_SR_MSTART) { /* This error should never occur */ - dbg("Bad START status: %02x\n", sr); + _err("ERROR: Bad START status: %02x\n", sr); ez80_i2c_clriflg(); return -EIO; } @@ -426,7 +426,7 @@ static int ez80_i2c_sendaddr(struct ez80_i2cdev_s *priv, uint8_t readbit) sr = ez80_i2c_waitiflg(); if (sr != I2C_SR_MADDRWRACK && sr != I2C_SR_MADDRWR) { - dbg("Bad ADDR8 status: %02x\n", sr); + _err("ERROR: Bad ADDR8 status: %02x\n", sr); goto failure; } } @@ -445,7 +445,7 @@ static int ez80_i2c_sendaddr(struct ez80_i2cdev_s *priv, uint8_t readbit) sr = ez80_i2c_waitiflg(); if (sr != I2C_SR_MADDRWRACK && sr != I2C_SR_MADDRWR) { - dbg("Bad ADDR10H status: %02x\n", sr); + _err("ERROR: Bad ADDR10H status: %02x\n", sr); goto failure; } @@ -459,7 +459,7 @@ static int ez80_i2c_sendaddr(struct ez80_i2cdev_s *priv, uint8_t readbit) sr = ez80_i2c_waitiflg(); if (sr != I2C_SR_MADDR2WRACK && sr != I2C_SR_MADDR2WR) { - dbg("Bad ADDR10L status: %02x\n", sr); + _err("ERROR: Bad ADDR10L status: %02x\n", sr); goto failure; } } @@ -469,7 +469,7 @@ static int ez80_i2c_sendaddr(struct ez80_i2cdev_s *priv, uint8_t readbit) /* We don't attempt any fancy status-based error recovery */ failure: -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES switch (sr) { case I2C_SR_ARBLOST1: /* Arbitration lost in address or data byte */ @@ -479,12 +479,12 @@ failure: * Call address received, ACK transmitted */ case I2C_SR_ARBLOST4: /* Arbitration lost in address as master, slave * address and Read bit received, ACK transmitted */ - dbg("Arbitration lost: %02x\n", sr); + _err("ERROR: Arbitration lost: %02x\n", sr); ez80_i2c_clriflg(); return -EAGAIN; default: - dbg("Unexpected status: %02x\n", sr); + _err("ERROR: Unexpected status: %02x\n", sr); ez80_i2c_clriflg(); return -EIO; } @@ -634,7 +634,7 @@ static int ez80_i2c_read_transfer(FAR struct ez80_i2cdev_s *priv, * this will cause the whole transfer to start over */ - dbg("Arbitration lost: %02x\n", regval); + _err("ERROR: Arbitration lost: %02x\n", regval); ez80_i2c_clriflg(); break; } @@ -643,7 +643,7 @@ static int ez80_i2c_read_transfer(FAR struct ez80_i2cdev_s *priv, else { - dbg("Unexpected status: %02x\n", regval); + _err("ERROR: Unexpected status: %02x\n", regval); ez80_i2c_clriflg(); return-EIO; } @@ -731,7 +731,7 @@ static int ez80_i2c_write_transfer(FAR struct ez80_i2cdev_s *priv, sr = ez80_i2c_waitiflg(); if (sr != I2C_SR_MDATAWRACK && sr != I2C_SR_MDATAWR) { - dbg("Bad DATA status: %02x\n", sr); + _err("ERROR: Bad DATA status: %02x\n", sr); ez80_i2c_clriflg(); if (sr == I2C_SR_ARBLOST1) { diff --git a/arch/z80/src/ez80/ez80_registerdump.c b/arch/z80/src/ez80/ez80_registerdump.c index 0e523b693a7553568ddc4eb8027302830e4ed4d9..7257627a81db8ff39949b1ccd30bfa54550ae3bb 100644 --- a/arch/z80/src/ez80/ez80_registerdump.c +++ b/arch/z80/src/ez80/ez80_registerdump.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/z80/src/ez80/ez80_registerdump.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 @@ -39,13 +39,6 @@ #include -/* Output debug info -- even if debug is not selected. */ - -#undef CONFIG_DEBUG -#undef CONFIG_DEBUG_VERBOSE -#define CONFIG_DEBUG 1 -#define CONFIG_DEBUG_VERBOSE 1 - #include #include @@ -77,22 +70,22 @@ static void ez80_registerdump(void) if (g_current_regs) { #ifdef CONFIG_EZ80_Z80MODE - lldbg("AF: %04x I: %04x\n", + _alert("AF: %04x I: %04x\n", g_current_regs[XCPT_AF], g_current_regs[XCPT_I]); - lldbg("BC: %04x DE: %04x HL: %04x\n", + _alert("BC: %04x DE: %04x HL: %04x\n", g_current_regs[XCPT_BC], g_current_regs[XCPT_DE], g_current_regs[XCPT_HL]); - lldbg("IX: %04x IY: %04x\n", + _alert("IX: %04x IY: %04x\n", g_current_regs[XCPT_IX], g_current_regs[XCPT_IY]); - lldbg("SP: %04x PC: %04x\n" + _alert("SP: %04x PC: %04x\n" g_current_regs[XCPT_SP], g_current_regs[XCPT_PC]); #else - lldbg("AF: %06x I: %06x\n", + _alert("AF: %06x I: %06x\n", g_current_regs[XCPT_AF], g_current_regs[XCPT_I]); - lldbg("BC: %06x DE: %06x HL: %06x\n", + _alert("BC: %06x DE: %06x HL: %06x\n", g_current_regs[XCPT_BC], g_current_regs[XCPT_DE], g_current_regs[XCPT_HL]); - lldbg("IX: %06x IY: %06x\n", + _alert("IX: %06x IY: %06x\n", g_current_regs[XCPT_IX], g_current_regs[XCPT_IY]); - lldbg("SP: %06x PC: %06x\n" + _alert("SP: %06x PC: %06x\n" g_current_regs[XCPT_SP], g_current_regs[XCPT_PC]); #endif } diff --git a/arch/z80/src/ez80/ez80_schedulesigaction.c b/arch/z80/src/ez80/ez80_schedulesigaction.c index 33d6c11b5f2a0b45ac61e6bb774f5e7eeddc32c9..6cc6b57c66bd8b949b6fe82752b7b7c57ddc8beb 100644 --- a/arch/z80/src/ez80/ez80_schedulesigaction.c +++ b/arch/z80/src/ez80/ez80_schedulesigaction.c @@ -125,7 +125,7 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver) { irqstate_t flags; - sdbg("tcb=0x%p sigdeliver=0x%04x\n", tcb, (uint16_t)sigdeliver); + sinfo("tcb=0x%p sigdeliver=0x%04x\n", tcb, (uint16_t)sigdeliver); /* Make sure that interrupts are disabled */ diff --git a/arch/z80/src/ez80/ez80_sigdeliver.c b/arch/z80/src/ez80/ez80_sigdeliver.c index 657961ce59eb36a80e96c2329f63db2f8b808246..694b3c018657042c166fac25a2660b48c13bb8cf 100644 --- a/arch/z80/src/ez80/ez80_sigdeliver.c +++ b/arch/z80/src/ez80/ez80_sigdeliver.c @@ -95,8 +95,8 @@ void up_sigdeliver(void) board_autoled_on(LED_SIGNAL); - sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); + sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", + rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); ASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ @@ -127,7 +127,7 @@ void up_sigdeliver(void) * errno that is needed by the user logic (it is probably EINTR). */ - sdbg("Resuming\n"); + sinfo("Resuming\n"); (void)up_irq_save(); rtcb->pterrno = saved_errno; diff --git a/arch/z80/src/ez80/ez80_spi.c b/arch/z80/src/ez80/ez80_spi.c index a2f1c4c535dbdb4841a925ba635932db3903e7e9..0e3b9d07be8c7895a08b005a8dcedf8bcb54855e 100644 --- a/arch/z80/src/ez80/ez80_spi.c +++ b/arch/z80/src/ez80/ez80_spi.c @@ -446,7 +446,7 @@ FAR struct spi_dev_s *ez80_spibus_initialize(int port) /* Only the SPI1 interface is supported */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (port != 1) { return NULL; diff --git a/arch/z80/src/z180/z180_mmu.c b/arch/z80/src/z180/z180_mmu.c index e3612dc9f024d9064799e9766e5dbd3e6921b3da..53e6183d0b42279258ae4a0372f01600d69f0e92 100644 --- a/arch/z80/src/z180/z180_mmu.c +++ b/arch/z80/src/z180/z180_mmu.c @@ -258,7 +258,7 @@ int up_addrenv_create(size_t textsize, size_t datasize, size_t heapsize, { /* No address environment... but I suppose that is not an error */ - sdbg("ERROR: npages is zero\n"); + serr("ERROR: npages is zero\n"); return OK; } @@ -273,7 +273,7 @@ int up_addrenv_create(size_t textsize, size_t datasize, size_t heapsize, cbr = z180_mmu_alloccbr(); if (!cbr) { - sdbg("ERROR: No free CBR structures\n"); + serr("ERROR: No free CBR structures\n"); ret = -ENOMEM; goto errout_with_irq; } @@ -287,7 +287,7 @@ int up_addrenv_create(size_t textsize, size_t datasize, size_t heapsize, #endif if (!alloc) { - sdbg("ERROR: Failed to allocate %d pages\n", npages); + serr("ERROR: Failed to allocate %d pages\n", npages); ret = -ENOMEM; goto errout_with_cbr; } diff --git a/arch/z80/src/z180/z180_registerdump.c b/arch/z80/src/z180/z180_registerdump.c index 1c3a4c73be35a182838ab6e35ebe423cf492238f..00be16de85e30d745a613d65ec43698c73136481 100644 --- a/arch/z80/src/z180/z180_registerdump.c +++ b/arch/z80/src/z180/z180_registerdump.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/z80/src/z180/z180_registerdump.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 @@ -39,13 +39,6 @@ #include -/* Output debug info -- even if debug is not selected. */ - -#undef CONFIG_DEBUG -#undef CONFIG_DEBUG_VERBOSE -#define CONFIG_DEBUG 1 -#define CONFIG_DEBUG_VERBOSE 1 - #include #include @@ -56,14 +49,6 @@ #ifdef CONFIG_ARCH_STACKDUMP -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -76,15 +61,15 @@ static void z180_registerdump(void) { if (g_current_regs) { - lldbg("AF: %04x I: %04x\n", + _alert("AF: %04x I: %04x\n", g_current_regs[XCPT_AF], g_current_regs[XCPT_I]); - lldbg("BC: %04x DE: %04x HL: %04x\n", + _alert("BC: %04x DE: %04x HL: %04x\n", g_current_regs[XCPT_BC], g_current_regs[XCPT_DE], g_current_regs[XCPT_HL]); - lldbg("IX: %04x IY: %04x\n", + _alert("IX: %04x IY: %04x\n", g_current_regs[XCPT_IX], g_current_regs[XCPT_IY]); - lldbg("SP: %04x PC: %04x\n" + _alert("SP: %04x PC: %04x\n" g_current_regs[XCPT_SP], g_current_regs[XCPT_PC]); - lldbg("CBAR: %02x BBR: %02x CBR: %02x\n" + _alert("CBAR: %02x BBR: %02x CBR: %02x\n" inp(Z180_MMU_CBAR), inp(Z180_MMU_BBR), inp(Z180_MMU_CBR)); } } diff --git a/arch/z80/src/z180/z180_schedulesigaction.c b/arch/z80/src/z180/z180_schedulesigaction.c index a29a4b9d8a3935a436768e753501b685ef350b67..c53663f783be6becdbd3d619f3e0a662c4d2667a 100644 --- a/arch/z80/src/z180/z180_schedulesigaction.c +++ b/arch/z80/src/z180/z180_schedulesigaction.c @@ -125,7 +125,7 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver) { irqstate_t flags; - dbg("tcb=0x%p sigdeliver=0x%04x\n", tcb, (uint16_t)sigdeliver); + _info("tcb=0x%p sigdeliver=0x%04x\n", tcb, (uint16_t)sigdeliver); /* Make sure that interrupts are disabled */ diff --git a/arch/z80/src/z180/z180_sigdeliver.c b/arch/z80/src/z180/z180_sigdeliver.c index e058d5a116d381d52cc8cbf509a0e26ac7c8504d..3a67b345f8b5dacc0e0e908f5a6169e98d67b4f8 100644 --- a/arch/z80/src/z180/z180_sigdeliver.c +++ b/arch/z80/src/z180/z180_sigdeliver.c @@ -94,8 +94,8 @@ void up_sigdeliver(void) board_autoled_on(LED_SIGNAL); - sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); + sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", + rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); ASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ @@ -126,7 +126,7 @@ void up_sigdeliver(void) * errno that is needed by the user logic (it is probably EINTR). */ - sdbg("Resuming\n"); + sinfo("Resuming\n"); (void)up_irq_save(); rtcb->pterrno = saved_errno; diff --git a/arch/z80/src/z8/z8_i2c.c b/arch/z80/src/z8/z8_i2c.c index cc3508a564ce7549ddb2fc9ac9cfabf7534bcfdd..e8c2a0e046fedee65a8784d5c8c7548eca04ff08 100644 --- a/arch/z80/src/z8/z8_i2c.c +++ b/arch/z80/src/z8/z8_i2c.c @@ -236,7 +236,7 @@ static uint16_t z8_i2c_getbrg(uint32_t frequency) if (frequency > 400*1000) { - dbg("Invalid inputs\n"); + _err("ERROR: Invalid inputs\n"); frequency = 400*1000; } diff --git a/arch/z80/src/z8/z8_registerdump.c b/arch/z80/src/z8/z8_registerdump.c index df6c761a7c942243ad0f02eb9327607c7507376a..0b0cdc6c2e41c5140abf5af8cf7e051dea7a452e 100644 --- a/arch/z80/src/z8/z8_registerdump.c +++ b/arch/z80/src/z8/z8_registerdump.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/z80/src/z8/z8_registerdump.c * - * Copyright (C) 2008-2009,2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009, 2011, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -39,13 +39,6 @@ #include -/* Output debug info -- even if debug is not selected. */ - -#undef CONFIG_DEBUG -#undef CONFIG_DEBUG_VERBOSE -#define CONFIG_DEBUG 1 -#define CONFIG_DEBUG_VERBOSE 1 - #include #include @@ -57,29 +50,21 @@ #ifdef CONFIG_ARCH_STACKDUMP -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ static inline void z8_dumpregs(FAR chipret_t *regs) { - lldbg("REGS: %04x %04x %04x %04x %04x %04x %04x %04x\n", - regs[XCPT_RR0], regs[XCPT_RR2], regs[XCPT_RR4], regs[XCPT_RR6], - regs[XCPT_RR8], regs[XCPT_RR10], regs[XCPT_RR12], regs[XCPT_RR14]); + _alert("REGS: %04x %04x %04x %04x %04x %04x %04x %04x\n", + regs[XCPT_RR0], regs[XCPT_RR2], regs[XCPT_RR4], regs[XCPT_RR6], + regs[XCPT_RR8], regs[XCPT_RR10], regs[XCPT_RR12], regs[XCPT_RR14]); } static inline void z8_dumpstate(chipreg_t sp, chipreg_t pc, uint8_t irqctl, chipreg_t rpflags) { - lldbg("SP: %04x PC: %04x IRQCTL: %02x RP: %02x FLAGS: %02x\n", + _alert("SP: %04x PC: %04x IRQCTL: %02x RP: %02x FLAGS: %02x\n", sp, pc, irqctl & 0xff, rpflags >> 8, rpflags & 0xff); } diff --git a/arch/z80/src/z8/z8_schedulesigaction.c b/arch/z80/src/z8/z8_schedulesigaction.c index 2e6de089ec572a16d1af398a9185a737d57493db..338bf3096a3aeabaf3e036d1a6af6764699c551d 100644 --- a/arch/z80/src/z8/z8_schedulesigaction.c +++ b/arch/z80/src/z8/z8_schedulesigaction.c @@ -125,7 +125,7 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver) { irqstate_t flags; - dbg("tcb=0x%p sigdeliver=0x%04x\n", tcb, (uint16_t)sigdeliver); + _info("tcb=0x%p sigdeliver=0x%04x\n", tcb, (uint16_t)sigdeliver); /* Make sure that interrupts are disabled */ diff --git a/arch/z80/src/z8/z8_sigdeliver.c b/arch/z80/src/z8/z8_sigdeliver.c index 1cbb7e21590a4897113af077dafd6010bd92cee3..b6abac296a05d71535ccce5369a78733ed603f62 100644 --- a/arch/z80/src/z8/z8_sigdeliver.c +++ b/arch/z80/src/z8/z8_sigdeliver.c @@ -109,8 +109,8 @@ void up_sigdeliver(void) board_autoled_on(LED_SIGNAL); - sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); + sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", + rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); ASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ @@ -141,7 +141,7 @@ void up_sigdeliver(void) * errno that is needed by the user logic (it is probably EINTR). */ - sdbg("Resuming\n"); + sinfo("Resuming\n"); (void)up_irq_save(); rtcb->pterrno = saved_errno; diff --git a/arch/z80/src/z80/z80_registerdump.c b/arch/z80/src/z80/z80_registerdump.c index dd83a1eb8c7358f1f6a2da070bd5e095667fc3d1..9d87ccc9c073bbd6c9140e596faf60c078f30ae7 100644 --- a/arch/z80/src/z80/z80_registerdump.c +++ b/arch/z80/src/z80/z80_registerdump.c @@ -39,13 +39,6 @@ #include -/* Output debug info -- even if debug is not selected. */ - -#undef CONFIG_DEBUG -#undef CONFIG_DEBUG_VERBOSE -#define CONFIG_DEBUG 1 -#define CONFIG_DEBUG_VERBOSE 1 - #include #include @@ -56,14 +49,6 @@ #ifdef CONFIG_ARCH_STACKDUMP -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -76,13 +61,13 @@ static void z80_registerdump(void) { if (g_current_regs) { - lldbg("AF: %04x I: %04x\n", + _alert("AF: %04x I: %04x\n", g_current_regs[XCPT_AF], g_current_regs[XCPT_I]); - lldbg("BC: %04x DE: %04x HL: %04x\n", + _alert("BC: %04x DE: %04x HL: %04x\n", g_current_regs[XCPT_BC], g_current_regs[XCPT_DE], g_current_regs[XCPT_HL]); - lldbg("IX: %04x IY: %04x\n", + _alert("IX: %04x IY: %04x\n", g_current_regs[XCPT_IX], g_current_regs[XCPT_IY]); - lldbg("SP: %04x PC: %04x\n" + _alert("SP: %04x PC: %04x\n" g_current_regs[XCPT_SP], g_current_regs[XCPT_PC]); } } diff --git a/arch/z80/src/z80/z80_schedulesigaction.c b/arch/z80/src/z80/z80_schedulesigaction.c index eb0c9c5554d818cde70d32e4cafbf446fe1ab61f..439808b0cadfd362b3ac0a73c01455237d7149a4 100644 --- a/arch/z80/src/z80/z80_schedulesigaction.c +++ b/arch/z80/src/z80/z80_schedulesigaction.c @@ -125,7 +125,7 @@ void up_schedule_sigaction(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver) { irqstate_t flags; - dbg("tcb=0x%p sigdeliver=0x%04x\n", tcb, (uint16_t)sigdeliver); + _info("tcb=0x%p sigdeliver=0x%04x\n", tcb, (uint16_t)sigdeliver); /* Make sure that interrupts are disabled */ diff --git a/arch/z80/src/z80/z80_sigdeliver.c b/arch/z80/src/z80/z80_sigdeliver.c index b56d1afd32a76fdd3e3a9a32fdeb18858c409f66..232eb4be98d4cec97b79123a204595b10de483c8 100644 --- a/arch/z80/src/z80/z80_sigdeliver.c +++ b/arch/z80/src/z80/z80_sigdeliver.c @@ -94,8 +94,8 @@ void up_sigdeliver(void) board_autoled_on(LED_SIGNAL); - sdbg("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", - rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); + sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n", + rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head); ASSERT(rtcb->xcp.sigdeliver != NULL); /* Save the real return state on the stack. */ @@ -126,7 +126,7 @@ void up_sigdeliver(void) * errno that is needed by the user logic (it is probably EINTR). */ - sdbg("Resuming\n"); + sinfo("Resuming\n"); (void)up_irq_save(); rtcb->pterrno = saved_errno; diff --git a/audio/audio.c b/audio/audio.c index a1f0db3834ca97b08b16d815567767fd064cb772..b8194908ab94225a5e29fd7ac9141418a92c34db 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -146,7 +146,7 @@ static int audio_open(FAR struct file *filep) uint8_t tmp; int ret; - audvdbg("crefs: %d\n", upper->crefs); + audinfo("crefs: %d\n", upper->crefs); /* Get exclusive access to the device structures */ @@ -198,7 +198,7 @@ static int audio_close(FAR struct file *filep) FAR struct audio_upperhalf_s *upper = inode->i_private; int ret; - audvdbg("crefs: %d\n", upper->crefs); + audinfo("crefs: %d\n", upper->crefs); /* Get exclusive access to the device structures */ @@ -228,7 +228,7 @@ static int audio_close(FAR struct file *filep) /* Disable the Audio device */ DEBUGASSERT(lower->ops->shutdown != NULL); - audvdbg("calling shutdown: %d\n"); + audinfo("calling shutdown: %d\n"); lower->ops->shutdown(lower); } @@ -358,7 +358,7 @@ static int audio_ioctl(FAR struct file *filep, int cmd, unsigned long arg) #endif int ret; - audvdbg("cmd: %d arg: %ld\n", cmd, arg); + audinfo("cmd: %d arg: %ld\n", cmd, arg); /* Get exclusive access to the device structures */ @@ -382,7 +382,7 @@ static int audio_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR struct audio_caps_s *caps = (FAR struct audio_caps_s *)((uintptr_t)arg); DEBUGASSERT(lower->ops->getcaps != NULL); - audvdbg("AUDIOIOC_GETCAPS: Device=%d\n", caps->ac_type); + audinfo("AUDIOIOC_GETCAPS: Device=%d\n", caps->ac_type); /* Call the lower-half driver capabilities handler */ @@ -396,7 +396,7 @@ static int audio_ioctl(FAR struct file *filep, int cmd, unsigned long arg) (FAR const struct audio_caps_desc_s *)((uintptr_t)arg); DEBUGASSERT(lower->ops->configure != NULL); - audvdbg("AUDIOIOC_INITIALIZE: Device=%d\n", caps->caps.ac_type); + audinfo("AUDIOIOC_INITIALIZE: Device=%d\n", caps->caps.ac_type); /* Call the lower-half driver configure handler */ @@ -412,7 +412,7 @@ static int audio_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { DEBUGASSERT(lower->ops->shutdown != NULL); - audvdbg("AUDIOIOC_SHUTDOWN\n"); + audinfo("AUDIOIOC_SHUTDOWN\n"); /* Call the lower-half driver initialize handler */ ret = lower->ops->shutdown(lower); @@ -427,7 +427,7 @@ static int audio_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case AUDIOIOC_START: { - audvdbg("AUDIOIOC_START\n"); + audinfo("AUDIOIOC_START\n"); DEBUGASSERT(lower->ops->start != NULL); /* Start the audio stream */ @@ -449,7 +449,7 @@ static int audio_ioctl(FAR struct file *filep, int cmd, unsigned long arg) #ifndef CONFIG_AUDIO_EXCLUDE_STOP case AUDIOIOC_STOP: { - audvdbg("AUDIOIOC_STOP\n"); + audinfo("AUDIOIOC_STOP\n"); DEBUGASSERT(lower->ops->stop != NULL); if (upper->started) @@ -475,7 +475,7 @@ static int audio_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case AUDIOIOC_PAUSE: { - audvdbg("AUDIOIOC_PAUSE\n"); + audinfo("AUDIOIOC_PAUSE\n"); DEBUGASSERT(lower->ops->pause != NULL); if (upper->started) @@ -497,7 +497,7 @@ static int audio_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case AUDIOIOC_RESUME: { - audvdbg("AUDIOIOC_RESUME\n"); + audinfo("AUDIOIOC_RESUME\n"); DEBUGASSERT(lower->ops->resume != NULL); if (upper->started) @@ -521,7 +521,7 @@ static int audio_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case AUDIOIOC_ALLOCBUFFER: { - audvdbg("AUDIOIOC_ALLOCBUFFER\n"); + audinfo("AUDIOIOC_ALLOCBUFFER\n"); bufdesc = (FAR struct audio_buf_desc_s *) arg; if (lower->ops->allocbuffer) @@ -544,7 +544,7 @@ static int audio_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case AUDIOIOC_FREEBUFFER: { - audvdbg("AUDIOIOC_FREEBUFFER\n"); + audinfo("AUDIOIOC_FREEBUFFER\n"); bufdesc = (FAR struct audio_buf_desc_s *) arg; if (lower->ops->freebuffer) @@ -569,7 +569,7 @@ static int audio_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case AUDIOIOC_ENQUEUEBUFFER: { - audvdbg("AUDIOIOC_ENQUEUEBUFFER\n"); + audinfo("AUDIOIOC_ENQUEUEBUFFER\n"); DEBUGASSERT(lower->ops->enqueuebuffer != NULL); @@ -585,7 +585,7 @@ static int audio_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case AUDIOIOC_REGISTERMQ: { - audvdbg("AUDIOIOC_REGISTERMQ\n"); + audinfo("AUDIOIOC_REGISTERMQ\n"); upper->usermq = (mqd_t) arg; ret = OK; @@ -599,7 +599,7 @@ static int audio_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case AUDIOIOC_UNREGISTERMQ: { - audvdbg("AUDIOIOC_UNREGISTERMQ\n"); + audinfo("AUDIOIOC_UNREGISTERMQ\n"); upper->usermq = NULL; ret = OK; @@ -613,7 +613,7 @@ static int audio_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case AUDIOIOC_RESERVE: { - audvdbg("AUDIOIOC_RESERVE\n"); + audinfo("AUDIOIOC_RESERVE\n"); DEBUGASSERT(lower->ops->reserve != NULL); /* Call lower-half to perform the reservation */ @@ -633,7 +633,7 @@ static int audio_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case AUDIOIOC_RELEASE: { - audvdbg("AUDIOIOC_RELEASE\n"); + audinfo("AUDIOIOC_RELEASE\n"); DEBUGASSERT(lower->ops->release != NULL); /* Call lower-half to perform the release */ @@ -650,7 +650,7 @@ static int audio_ioctl(FAR struct file *filep, int cmd, unsigned long arg) default: { - audvdbg("Forwarding unrecognized cmd: %d arg: %ld\n", cmd, arg); + audinfo("Forwarding unrecognized cmd: %d arg: %ld\n", cmd, arg); DEBUGASSERT(lower->ops->ioctl != NULL); ret = lower->ops->ioctl(lower, cmd, arg); } @@ -704,7 +704,7 @@ static inline void audio_dequeuebuffer(FAR struct audio_upperhalf_s *upper, { struct audio_msg_s msg; - audllvdbg("Entry\n"); + audinfo("Entry\n"); /* Send a dequeue message to the user if a message queue is registered */ @@ -742,7 +742,7 @@ static inline void audio_complete(FAR struct audio_upperhalf_s *upper, { struct audio_msg_s msg; - audllvdbg("Entry\n"); + audinfo("Entry\n"); /* Send a dequeue message to the user if a message queue is registered */ @@ -791,7 +791,7 @@ static void audio_callback(FAR void *handle, uint16_t reason, { FAR struct audio_upperhalf_s *upper = (FAR struct audio_upperhalf_s *)handle; - audllvdbg("Entry\n"); + audinfo("Entry\n"); /* Perform operation based on reason code */ @@ -832,7 +832,7 @@ static void audio_callback(FAR void *handle, uint16_t reason, default: { - auddbg("Unknown callback reason code %d\n", reason); + auderr("ERROR: Unknown callback reason code %d\n", reason); break; } } @@ -885,7 +885,7 @@ int audio_register(FAR const char *name, FAR struct audio_lowerhalf_s *dev) upper = (FAR struct audio_upperhalf_s *)kmm_zalloc(sizeof(struct audio_upperhalf_s)); if (!upper) { - auddbg("Allocation failed\n"); + auderr("ERROR: Allocation failed\n"); return -ENOMEM; } @@ -995,7 +995,7 @@ int audio_register(FAR const char *name, FAR struct audio_lowerhalf_s *dev) dev->upper = audio_callback; dev->priv = upper; - audvdbg("Registering %s\n", path); + audinfo("Registering %s\n", path); return register_driver(path, &g_audioops, 0666, upper); } diff --git a/audio/pcm_decode.c b/audio/pcm_decode.c index d57d5dbb9b25a694eb58797540f25cbc34dc348f..383d8ef261368d64633a2a294e711568b1e2da67 100644 --- a/audio/pcm_decode.c +++ b/audio/pcm_decode.c @@ -259,23 +259,23 @@ static void pcm_callback(FAR void *arg, uint16_t reason, #ifdef CONFIG_PCM_DEBUG static void pcm_dump(FAR const struct wav_header_s *wav) { - dbg("Wave file header\n"); - dbg(" Header Chunk:\n"); - dbg(" Chunk ID: 0x%08x\n", wav->hdr.chunkid); - dbg(" Chunk Size: %u\n", wav->hdr.chunklen); - dbg(" Format: 0x%08x\n", wav->hdr.format); - dbg(" Format Chunk:\n"); - dbg(" Chunk ID: 0x%08x\n", wav->fmt.chunkid); - dbg(" Chunk Size: %u\n", wav->fmt.chunklen); - dbg(" Audio Format: 0x%04x\n", wav->fmt.format); - dbg(" Num. Channels: %d\n", wav->fmt.nchannels); - dbg(" Sample Rate: %u\n", wav->fmt.samprate); - dbg(" Byte Rate: %u\n", wav->fmt.byterate); - dbg(" Block Align: %d\n", wav->fmt.align); - dbg(" Bits Per Sample: %d\n", wav->fmt.bpsamp); - dbg(" Data Chunk:\n"); - dbg(" Chunk ID: 0x%08x\n", wav->data.chunkid); - dbg(" Chunk Size: %u\n", wav->data.chunklen); + _info("Wave file header\n"); + _info(" Header Chunk:\n"); + _info(" Chunk ID: 0x%08x\n", wav->hdr.chunkid); + _info(" Chunk Size: %u\n", wav->hdr.chunklen); + _info(" Format: 0x%08x\n", wav->hdr.format); + _info(" Format Chunk:\n"); + _info(" Chunk ID: 0x%08x\n", wav->fmt.chunkid); + _info(" Chunk Size: %u\n", wav->fmt.chunklen); + _info(" Audio Format: 0x%04x\n", wav->fmt.format); + _info(" Num. Channels: %d\n", wav->fmt.nchannels); + _info(" Sample Rate: %u\n", wav->fmt.samprate); + _info(" Byte Rate: %u\n", wav->fmt.byterate); + _info(" Block Align: %d\n", wav->fmt.align); + _info(" Bits Per Sample: %d\n", wav->fmt.bpsamp); + _info(" Data Chunk:\n"); + _info(" Chunk ID: 0x%08x\n", wav->data.chunkid); + _info(" Chunk Size: %u\n", wav->data.chunklen); } #endif @@ -398,14 +398,14 @@ static bool pcm_parsewav(FAR struct pcm_decode_s *priv, uint8_t *data) if (priv->bpsamp != 8 && priv->bpsamp != 16) { - auddbg("ERROR: Cannot support bits per sample of %d in this mode\n", + auderr("ERROR: Cannot support bits per sample of %d in this mode\n", priv->bpsamp); return -EINVAL; } if (priv->nchannels != 1 && priv->nchannels != 2) { - auddbg("ERROR: Cannot support number of channles of %d in this mode\n", + auderr("ERROR: Cannot support number of channles of %d in this mode\n", priv->nchannels); return -EINVAL; } @@ -432,7 +432,7 @@ static bool pcm_parsewav(FAR struct pcm_decode_s *priv, uint8_t *data) static void pcm_subsample_configure(FAR struct pcm_decode_s *priv, uint8_t subsample) { - audvdbg("subsample: %d\n", subsample); + audinfo("subsample: %d\n", subsample); /* Three possibilities: * @@ -448,7 +448,7 @@ static void pcm_subsample_configure(FAR struct pcm_decode_s *priv, if (subsample != AUDIO_SUBSAMPLE_NONE) { - audvdbg("Start sub-sampling\n"); + audinfo("Start sub-sampling\n"); /* Save the current subsample setting. Subsampling will begin on * then next audio buffer that we receive. @@ -466,7 +466,7 @@ static void pcm_subsample_configure(FAR struct pcm_decode_s *priv, else if (subsample == AUDIO_SUBSAMPLE_NONE) { - audvdbg("Stop sub-sampling\n"); + audinfo("Stop sub-sampling\n"); /* Indicate that we are in normal play mode. This will take effect * when the next audio buffer is received. @@ -691,7 +691,7 @@ static int pcm_getcaps(FAR struct audio_lowerhalf_s *dev, int type, ret = lower->ops->getcaps(lower, type, caps); if (ret < 0) { - auddbg("Lower getcaps() failed: %d\n", ret); + auderr("ERROR: Lower getcaps() failed: %d\n", ret); return ret; } @@ -758,7 +758,7 @@ static int pcm_configure(FAR struct audio_lowerhalf_s *dev, lower = priv->lower; DEBUGASSERT(lower && lower->ops->configure); - audvdbg("Defer to lower configure\n"); + audinfo("Defer to lower configure\n"); #ifdef CONFIG_AUDIO_MULTI_SESSION return lower->ops->configure(lower, session, caps); #else @@ -796,7 +796,7 @@ static int pcm_shutdown(FAR struct audio_lowerhalf_s *dev) lower = priv->lower; DEBUGASSERT(lower && lower->ops->start); - audvdbg("Defer to lower shutdown\n"); + audinfo("Defer to lower shutdown\n"); return lower->ops->shutdown(lower); } @@ -827,7 +827,7 @@ static int pcm_start(FAR struct audio_lowerhalf_s *dev) lower = priv->lower; DEBUGASSERT(lower && lower->ops->start); - audvdbg("Defer to lower start\n"); + audinfo("Defer to lower start\n"); #ifdef CONFIG_AUDIO_MULTI_SESSION return lower->ops->start(lower, session); #else @@ -866,7 +866,7 @@ static int pcm_stop(FAR struct audio_lowerhalf_s *dev) lower = priv->lower; DEBUGASSERT(lower && lower->ops->stop); - audvdbg("Defer to lower stop\n"); + audinfo("Defer to lower stop\n"); #ifdef CONFIG_AUDIO_MULTI_SESSION return lower->ops->stop(lower, session); #else @@ -900,7 +900,7 @@ static int pcm_pause(FAR struct audio_lowerhalf_s *dev) lower = priv->lower; DEBUGASSERT(lower && lower->ops->pause); - audvdbg("Defer to lower pause\n"); + audinfo("Defer to lower pause\n"); #ifdef CONFIG_AUDIO_MULTI_SESSION return lower->ops->pause(lower, session); #else @@ -933,7 +933,7 @@ static int pcm_resume(FAR struct audio_lowerhalf_s *dev) lower = priv->lower; DEBUGASSERT(lower && lower->ops->resume); - audvdbg("Defer to lower resume\n"); + audinfo("Defer to lower resume\n"); #ifdef CONFIG_AUDIO_MULTI_SESSION return lower->ops->resume(lower, session); #else @@ -967,7 +967,7 @@ static int pcm_allocbuffer(FAR struct audio_lowerhalf_s *dev, lower = priv->lower; DEBUGASSERT(lower && lower->ops->allocbuffer); - audvdbg("Defer to lower allocbuffer\n"); + audinfo("Defer to lower allocbuffer\n"); return lower->ops->allocbuffer(lower, apb); } @@ -994,7 +994,7 @@ static int pcm_freebuffer(FAR struct audio_lowerhalf_s *dev, lower = priv->lower; DEBUGASSERT(lower && lower->ops->freebuffer); - audvdbg("Defer to lower freebuffer, apb=%p\n", apb); + audinfo("Defer to lower freebuffer, apb=%p\n", apb); return lower->ops->freebuffer(lower, apb); } @@ -1026,7 +1026,7 @@ static int pcm_enqueuebuffer(FAR struct audio_lowerhalf_s *dev, int ret; DEBUGASSERT(priv); - audvdbg("Received buffer %p, streaming=%d\n", apb, priv->streaming); + audinfo("Received buffer %p, streaming=%d\n", apb, priv->streaming); lower = priv->lower; DEBUGASSERT(lower && lower->ops->enqueuebuffer && lower->ops->configure); @@ -1046,7 +1046,7 @@ static int pcm_enqueuebuffer(FAR struct audio_lowerhalf_s *dev, } #ifndef CONFIG_AUDIO_EXCLUDE_FFORWARD - audvdbg("Received: apb=%p curbyte=%d nbytes=%d flags=%04x\n", + audinfo("Received: apb=%p curbyte=%d nbytes=%d flags=%04x\n", apb, apb->curbyte, apb->nbytes, apb->flags); /* Perform any necessary sub-sampling operations */ @@ -1056,7 +1056,7 @@ static int pcm_enqueuebuffer(FAR struct audio_lowerhalf_s *dev, /* Then give the audio buffer to the lower driver */ - audvdbg("Pass to lower enqueuebuffer: apb=%p curbyte=%d nbytes=%d\n", + audinfo("Pass to lower enqueuebuffer: apb=%p curbyte=%d nbytes=%d\n", apb, apb->curbyte, apb->nbytes); return lower->ops->enqueuebuffer(lower, apb); @@ -1069,7 +1069,7 @@ static int pcm_enqueuebuffer(FAR struct audio_lowerhalf_s *dev, */ bytesleft = apb->nbytes - apb->curbyte; - audvdbg("curbyte=%d nbytes=%d nmaxbytes=%d bytesleft=%d\n", + audinfo("curbyte=%d nbytes=%d nmaxbytes=%d bytesleft=%d\n", apb->curbyte, apb->nbytes, apb->nmaxbytes, bytesleft); if (bytesleft >= sizeof(struct wav_header_s)) @@ -1100,7 +1100,7 @@ static int pcm_enqueuebuffer(FAR struct audio_lowerhalf_s *dev, #endif if (ret < 0) { - auddbg("ERROR: Failed to set PCM configuration: %d\n", ret); + auderr("ERROR: Failed to set PCM configuration: %d\n", ret); return ret; } @@ -1109,7 +1109,7 @@ static int pcm_enqueuebuffer(FAR struct audio_lowerhalf_s *dev, apb->curbyte += sizeof(struct wav_header_s); #ifndef CONFIG_AUDIO_EXCLUDE_FFORWARD - audvdbg("Begin streaming: apb=%p curbyte=%d nbytes=%d\n", + audinfo("Begin streaming: apb=%p curbyte=%d nbytes=%d\n", apb, apb->curbyte, apb->nbytes); /* Perform any necessary sub-sampling operations */ @@ -1119,7 +1119,7 @@ static int pcm_enqueuebuffer(FAR struct audio_lowerhalf_s *dev, /* Then give the audio buffer to the lower driver */ - audvdbg("Pass to lower enqueuebuffer: apb=%p curbyte=%d nbytes=%d\n", + audinfo("Pass to lower enqueuebuffer: apb=%p curbyte=%d nbytes=%d\n", apb, apb->curbyte, apb->nbytes); ret = lower->ops->enqueuebuffer(lower, apb); @@ -1135,7 +1135,7 @@ static int pcm_enqueuebuffer(FAR struct audio_lowerhalf_s *dev, } } - auddbg("ERROR: Invalid PCM WAV file\n"); + auderr("ERROR: Invalid PCM WAV file\n"); /* The normal protocol for streaming errors is as follows: * @@ -1161,7 +1161,7 @@ static int pcm_enqueuebuffer(FAR struct audio_lowerhalf_s *dev, /* This is not a WAV file! */ - auddbg("ERROR: Invalid PCM WAV file\n"); + auderr("ERROR: Invalid PCM WAV file\n"); return -EINVAL; } @@ -1186,7 +1186,7 @@ static int pcm_cancelbuffer(FAR struct audio_lowerhalf_s *dev, lower = priv->lower; DEBUGASSERT(lower && lower->ops->cancelbuffer); - audvdbg("Defer to lower cancelbuffer, apb=%p\n", apb); + audinfo("Defer to lower cancelbuffer, apb=%p\n", apb); return lower->ops->cancelbuffer(lower, apb); } @@ -1211,7 +1211,7 @@ static int pcm_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd, lower = priv->lower; DEBUGASSERT(lower && lower->ops->ioctl); - audvdbg("Defer to lower ioctl, cmd=%d arg=%ld\n"); + audinfo("Defer to lower ioctl, cmd=%d arg=%ld\n"); return lower->ops->ioctl(lower, cmd, arg); } @@ -1256,7 +1256,7 @@ static int pcm_reserve(FAR struct audio_lowerhalf_s *dev) lower = priv->lower; DEBUGASSERT(lower && lower->ops->reserve); - audvdbg("Defer to lower reserve\n"); + audinfo("Defer to lower reserve\n"); #ifdef CONFIG_AUDIO_MULTI_SESSION ret = lower->ops->reserve(lower, &priv->session); @@ -1298,7 +1298,7 @@ static int pcm_release(FAR struct audio_lowerhalf_s *dev) lower = priv->lower; DEBUGASSERT(lower && lower->ops->release); - audvdbg("Defer to lower release\n"); + audinfo("Defer to lower release\n"); #ifdef CONFIG_AUDIO_MULTI_SESSION return lower->ops->release(lower, session); #else @@ -1378,7 +1378,7 @@ FAR struct audio_lowerhalf_s * priv = (FAR struct pcm_decode_s *)kmm_zalloc(sizeof(struct pcm_decode_s)); if (!priv) { - auddbg("ERROR: Failed to allocate driver structure\n"); + auderr("ERROR: Failed to allocate driver structure\n"); return NULL; } diff --git a/binfmt/binfmt.h b/binfmt/binfmt.h index 370ef57eaebcabe67c62a976163e8c0983a0fff5..cfde554d4e453f3262db9bed85b9e01685fd4a36 100644 --- a/binfmt/binfmt.h +++ b/binfmt/binfmt.h @@ -86,7 +86,7 @@ EXTERN FAR struct binfmt_s *g_binfmts; * ****************************************************************************/ -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_BINFMT) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_BINFMT) int dump_module(FAR const struct binary_s *bin); #else # define dump_module(bin) diff --git a/binfmt/binfmt_copyargv.c b/binfmt/binfmt_copyargv.c index 2fee46d047d460aba7f739efc4b2f59a9ddc876b..f0a594f5a6d20e2408aad0874d1a207852373aa5 100644 --- a/binfmt/binfmt_copyargv.c +++ b/binfmt/binfmt_copyargv.c @@ -114,12 +114,12 @@ int binfmt_copyargv(FAR struct binary_s *bin, FAR char * const *argv) if (nargs > MAX_EXEC_ARGS) { - bdbg("ERROR: Too many arguments: %lu\n", (unsigned long)argvsize); + berr("ERROR: Too many arguments: %lu\n", (unsigned long)argvsize); return -E2BIG; } } - bvdbg("args=%d argsize=%lu\n", nargs, (unsigned long)argsize); + binfo("args=%d argsize=%lu\n", nargs, (unsigned long)argsize); /* Allocate the argv array and an argument buffer */ @@ -129,7 +129,7 @@ int binfmt_copyargv(FAR struct binary_s *bin, FAR char * const *argv) bin->argbuffer = (FAR char *)kmm_malloc(argvsize + argsize); if (!bin->argbuffer) { - bdbg("ERROR: Failed to allocate the argument buffer\n"); + berr("ERROR: Failed to allocate the argument buffer\n"); return -ENOMEM; } diff --git a/binfmt/binfmt_dumpmodule.c b/binfmt/binfmt_dumpmodule.c index c69fed83c4398b844364bf8150c09c74f7e082c6..a28f4cefeeda07e02242082ec35f17645b94d4cd 100644 --- a/binfmt/binfmt_dumpmodule.c +++ b/binfmt/binfmt_dumpmodule.c @@ -47,7 +47,7 @@ #include "binfmt.h" -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_BINFMT) && !defined(CONFIG_BINFMT_DISABLE) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_BINFMT) && !defined(CONFIG_BINFMT_DISABLE) /**************************************************************************** * Pre-processor Definitions @@ -86,21 +86,21 @@ int dump_module(FAR const struct binary_s *bin) { if (bin) { - bdbg("Module:\n"); - bdbg(" filename: %s\n", bin->filename); - bdbg(" argv: %p\n", bin->argv); - bdbg(" entrypt: %p\n", bin->entrypt); - bdbg(" mapped: %p size=%d\n", bin->mapped, bin->mapsize); - bdbg(" alloc: %p %p %p\n", bin->alloc[0], bin->alloc[1], bin->alloc[2]); + berr("Module:\n"); + berr(" filename: %s\n", bin->filename); + berr(" argv: %p\n", bin->argv); + berr(" entrypt: %p\n", bin->entrypt); + berr(" mapped: %p size=%d\n", bin->mapped, bin->mapsize); + berr(" alloc: %p %p %p\n", bin->alloc[0], bin->alloc[1], bin->alloc[2]); #ifdef CONFIG_BINFMT_CONSTRUCTORS - bdbg(" ctors: %p nctors=%d\n", bin->ctors, bin->nctors); - bdbg(" dtors: %p ndtors=%d\n", bin->dtors, bin->ndtors); + berr(" ctors: %p nctors=%d\n", bin->ctors, bin->nctors); + berr(" dtors: %p ndtors=%d\n", bin->dtors, bin->ndtors); #endif #ifdef CONFIG_ARCH_ADDRENV - bdbg(" addrenv: %p\n", bin->addrenv); + berr(" addrenv: %p\n", bin->addrenv); #endif - bdbg(" stacksize: %d\n", bin->stacksize); - bdbg(" unload: %p\n", bin->unload); + berr(" stacksize: %d\n", bin->stacksize); + berr(" unload: %p\n", bin->unload); } return OK; diff --git a/binfmt/binfmt_exec.c b/binfmt/binfmt_exec.c index f3f62027ebfb7cc564330b4f46ed868c60910ba1..2e6f074b79a342deb98b9f88e8e2e4e36a66ec26 100644 --- a/binfmt/binfmt_exec.c +++ b/binfmt/binfmt_exec.c @@ -86,7 +86,7 @@ int exec(FAR const char *filename, FAR char * const *argv, #if defined(CONFIG_SCHED_ONEXIT) && defined(CONFIG_SCHED_HAVE_PARENT) FAR struct binary_s *bin; int pid; - int err; + int errcode; int ret; /* Allocate the load information */ @@ -94,8 +94,8 @@ int exec(FAR const char *filename, FAR char * const *argv, bin = (FAR struct binary_s *)kmm_zalloc(sizeof(struct binary_s)); if (!bin) { - bdbg("ERROR: Failed to allocate binary_s\n"); - err = ENOMEM; + berr("ERROR: Failed to allocate binary_s\n"); + errcode = ENOMEM; goto errout; } @@ -110,8 +110,8 @@ int exec(FAR const char *filename, FAR char * const *argv, ret = binfmt_copyargv(bin, argv); if (ret < 0) { - err = -ret; - bdbg("ERROR: Failed to copy argv[]: %d\n", err); + errcode = -ret; + berr("ERROR: Failed to copy argv[]: %d\n", errcode); goto errout_with_bin; } @@ -120,8 +120,8 @@ int exec(FAR const char *filename, FAR char * const *argv, ret = load_module(bin); if (ret < 0) { - err = get_errno(); - bdbg("ERROR: Failed to load program '%s': %d\n", filename, err); + errcode = get_errno(); + berr("ERROR: Failed to load program '%s': %d\n", filename, errcode); goto errout_with_argv; } @@ -137,8 +137,8 @@ int exec(FAR const char *filename, FAR char * const *argv, pid = exec_module(bin); if (pid < 0) { - err = get_errno(); - bdbg("ERROR: Failed to execute program '%s': %d\n", filename, err); + errcode = get_errno(); + berr("ERROR: Failed to execute program '%s': %d\n", filename, errcode); goto errout_with_lock; } @@ -149,8 +149,8 @@ int exec(FAR const char *filename, FAR char * const *argv, ret = schedule_unload(pid, bin); if (ret < 0) { - err = get_errno(); - bdbg("ERROR: Failed to schedule unload '%s': %d\n", filename, err); + errcode = get_errno(); + berr("ERROR: Failed to schedule unload '%s': %d\n", filename, errcode); } sched_unlock(); @@ -164,12 +164,12 @@ errout_with_argv: errout_with_bin: kmm_free(bin); errout: - set_errno(err); + set_errno(errcode); return ERROR; #else struct binary_s bin; - int err; + int errcode; int ret; /* Load the module into memory */ @@ -182,8 +182,8 @@ errout: ret = load_module(&bin); if (ret < 0) { - err = get_errno(); - bdbg("ERROR: Failed to load program '%s': %d\n", filename, err); + errcode = get_errno(); + berr("ERROR: Failed to load program '%s': %d\n", filename, errcode); goto errout; } @@ -192,8 +192,8 @@ errout: ret = exec_module(&bin); if (ret < 0) { - err = get_errno(); - bdbg("ERROR: Failed to execute program '%s': %d\n", filename, err); + errcode = get_errno(); + berr("ERROR: Failed to execute program '%s': %d\n", filename, errcode); goto errout_with_module; } @@ -204,10 +204,9 @@ errout: errout_with_module: unload_module(&bin); errout: - set_errno(err); + set_errno(errcode); return ERROR; #endif } #endif /* !CONFIG_BINFMT_DISABLE */ - diff --git a/binfmt/binfmt_execmodule.c b/binfmt/binfmt_execmodule.c index 971c47123cce10c1b8f0477b99c1ca9141bcc800..eef50068a538b895fbf0412c98d59e7c2af26398 100644 --- a/binfmt/binfmt_execmodule.c +++ b/binfmt/binfmt_execmodule.c @@ -109,7 +109,7 @@ static void exec_ctors(FAR void *arg) for (i = 0; i < binp->nctors; i++) { - bvdbg("Calling ctor %d at %p\n", i, (FAR void *)ctor); + binfo("Calling ctor %d at %p\n", i, (FAR void *)ctor); (*ctor)(); ctor++; @@ -142,27 +142,27 @@ int exec_module(FAR const struct binary_s *binp) #endif FAR uint32_t *stack; pid_t pid; - int err; + int errcode; int ret; /* Sanity checking */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!binp || !binp->entrypt || binp->stacksize <= 0) { - err = EINVAL; + errcode = EINVAL; goto errout; } #endif - bvdbg("Executing %s\n", binp->filename); + binfo("Executing %s\n", binp->filename); /* Allocate a TCB for the new task. */ tcb = (FAR struct task_tcb_s *)kmm_zalloc(sizeof(struct task_tcb_s)); if (!tcb) { - err = ENOMEM; + errcode = ENOMEM; goto errout; } @@ -172,8 +172,8 @@ int exec_module(FAR const struct binary_s *binp) ret = up_addrenv_select(&binp->addrenv, &oldenv); if (ret < 0) { - bdbg("ERROR: up_addrenv_select() failed: %d\n", ret); - err = -ret; + berr("ERROR: up_addrenv_select() failed: %d\n", ret); + errcode = -ret; goto errout_with_tcb; } @@ -192,7 +192,7 @@ int exec_module(FAR const struct binary_s *binp) stack = (FAR uint32_t *)kumm_malloc(binp->stacksize); if (!stack) { - err = ENOMEM; + errcode = ENOMEM; goto errout_with_addrenv; } @@ -202,8 +202,8 @@ int exec_module(FAR const struct binary_s *binp) stack, binp->stacksize, binp->entrypt, binp->argv); if (ret < 0) { - err = get_errno(); - bdbg("task_init() failed: %d\n", err); + errcode = get_errno(); + berr("task_init() failed: %d\n", errcode); goto errout_with_addrenv; } @@ -224,8 +224,8 @@ int exec_module(FAR const struct binary_s *binp) ret = up_addrenv_kstackalloc(&tcb->cmn); if (ret < 0) { - bdbg("ERROR: up_addrenv_select() failed: %d\n", ret); - err = -ret; + berr("ERROR: up_addrenv_select() failed: %d\n", ret); + errcode = -ret; goto errout_with_tcbinit; } #endif @@ -236,8 +236,8 @@ int exec_module(FAR const struct binary_s *binp) ret = shm_group_initialize(tcb->cmn.group); if (ret < 0) { - bdbg("ERROR: shm_group_initialize() failed: %d\n", ret); - err = -ret; + berr("ERROR: shm_group_initialize() failed: %d\n", ret); + errcode = -ret; goto errout_with_tcbinit; } #endif @@ -260,8 +260,8 @@ int exec_module(FAR const struct binary_s *binp) ret = up_addrenv_clone(&binp->addrenv, &tcb->cmn.group->tg_addrenv); if (ret < 0) { - err = -ret; - bdbg("ERROR: up_addrenv_clone() failed: %d\n", ret); + errcode = -ret; + berr("ERROR: up_addrenv_clone() failed: %d\n", ret); goto errout_with_tcbinit; } @@ -288,8 +288,8 @@ int exec_module(FAR const struct binary_s *binp) ret = task_activate((FAR struct tcb_s *)tcb); if (ret < 0) { - err = get_errno(); - bdbg("task_activate() failed: %d\n", err); + errcode = get_errno(); + berr("task_activate() failed: %d\n", errcode); goto errout_with_tcbinit; } @@ -299,8 +299,8 @@ int exec_module(FAR const struct binary_s *binp) ret = up_addrenv_restore(&oldenv); if (ret < 0) { - bdbg("ERROR: up_addrenv_select() failed: %d\n", ret); - err = -ret; + berr("ERROR: up_addrenv_select() failed: %d\n", ret); + errcode = -ret; goto errout_with_tcbinit; } #endif @@ -322,8 +322,8 @@ errout_with_tcb: kmm_free(tcb); errout: - set_errno(err); - bdbg("returning errno: %d\n", err); + set_errno(errcode); + berr("returning errno: %d\n", errcode); return ERROR; } diff --git a/binfmt/binfmt_loadmodule.c b/binfmt/binfmt_loadmodule.c index 1b614838e6afb59fe4f9565397d5906b3a45cac3..9cd80a8f42ceb8ada57c0152a6c187f246ec5816 100644 --- a/binfmt/binfmt_loadmodule.c +++ b/binfmt/binfmt_loadmodule.c @@ -91,7 +91,7 @@ static int load_default_priority(FAR struct binary_s *bin) ret = sched_getparam(0, ¶m); if (ret < 0) { - bdbg("ERROR: sched_getparam failed: %d\n", get_errno()); + berr("ERROR: sched_getparam failed: %d\n", get_errno()); return ERROR; } @@ -120,7 +120,7 @@ static int load_absmodule(FAR struct binary_s *bin) FAR struct binfmt_s *binfmt; int ret = -ENOENT; - bvdbg("Loading %s\n", bin->filename); + binfo("Loading %s\n", bin->filename); /* Disabling pre-emption should be sufficient protection while accessing * the list of registered binary format handlers. @@ -142,7 +142,7 @@ static int load_absmodule(FAR struct binary_s *bin) { /* Successfully loaded -- break out with ret == 0 */ - bvdbg("Successfully loaded module %s\n", bin->filename); + binfo("Successfully loaded module %s\n", bin->filename); /* Save the unload method for use by unload_module */ @@ -180,7 +180,7 @@ int load_module(FAR struct binary_s *bin) /* Verify that we were provided something to work with */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (bin && bin->filename) #endif { @@ -262,7 +262,7 @@ int load_module(FAR struct binary_s *bin) if (ret < 0) { - bdbg("ERROR: Returning errno %d\n", -ret); + berr("ERROR: Returning errno %d\n", -ret); set_errno(-ret); return ERROR; } diff --git a/binfmt/binfmt_schedunload.c b/binfmt/binfmt_schedunload.c index f9da1349f6b96688f47315b30567c0cbf4ef4498..5121e975eacdf89bd547982b7d7614fb760b1411 100644 --- a/binfmt/binfmt_schedunload.c +++ b/binfmt/binfmt_schedunload.c @@ -209,7 +209,7 @@ static void unload_callback(int signo, siginfo_t *info, void *ucontext) if (!info || signo != SIGCHLD) { - blldbg("ERROR:Bad signal callback: signo=%d info=%p\n", signo, info); + berr("ERROR:Bad signal callback: signo=%d info=%p\n", signo, info); return; } @@ -218,7 +218,7 @@ static void unload_callback(int signo, siginfo_t *info, void *ucontext) bin = unload_list_remove(info->si_pid); if (!bin) { - blldbg("ERROR: Could not find load info for PID=%d\n", info->si_pid); + berr("ERROR: Could not find load info for PID=%d\n", info->si_pid); return; } @@ -227,7 +227,7 @@ static void unload_callback(int signo, siginfo_t *info, void *ucontext) ret = unload_module(bin); if (ret < 0) { - blldbg("ERROR: unload_module failed: %d\n", get_errno()); + berr("ERROR: unload_module failed: %d\n", get_errno()); } /* Free the load structure */ @@ -284,7 +284,7 @@ int schedule_unload(pid_t pid, FAR struct binary_s *bin) /* The errno value will get trashed by the following debug output */ errorcode = get_errno(); - bvdbg("ERROR: sigprocmask failed: %d\n", ret); + berr("ERROR: sigprocmask failed: %d\n", ret); goto errout; } @@ -310,14 +310,14 @@ int schedule_unload(pid_t pid, FAR struct binary_s *bin) /* The errno value will get trashed by the following debug output */ errorcode = get_errno(); - bvdbg("ERROR: sigaction failed: %d\n" , ret); + berr("ERROR: sigaction failed: %d\n" , ret); /* Emergency removal from the list */ flags = enter_critical_section(); if (unload_list_remove(pid) != bin) { - blldbg("ERROR: Failed to remove structure\n"); + berr("ERROR: Failed to remove structure\n"); } leave_critical_section(flags); diff --git a/binfmt/binfmt_unloadmodule.c b/binfmt/binfmt_unloadmodule.c index 887d6d66c09a84aad65f2d533bf0c9e2af4e7311..25b9cef121f2ec6f2b73db5aa45af517e516a9e1 100644 --- a/binfmt/binfmt_unloadmodule.c +++ b/binfmt/binfmt_unloadmodule.c @@ -99,7 +99,7 @@ static inline int exec_dtors(FAR struct binary_s *binp) ret = up_addrenv_select(&binp->addrenv, &oldenv); if (ret < 0) { - bdbg("ERROR: up_addrenv_select() failed: %d\n", ret); + berr("ERROR: up_addrenv_select() failed: %d\n", ret); return ret; } #endif @@ -108,7 +108,7 @@ static inline int exec_dtors(FAR struct binary_s *binp) for (i = 0; i < binp->ndtors; i++) { - bvdbg("Calling dtor %d at %p\n", i, (FAR void *)dtor); + binfo("Calling dtor %d at %p\n", i, (FAR void *)dtor); (*dtor)(); dtor++; @@ -161,7 +161,7 @@ int unload_module(FAR struct binary_s *binp) ret = binp->unload(binp); if (ret < 0) { - bdbg("binp->unload() failed: %d\n", ret); + berr("binp->unload() failed: %d\n", ret); set_errno(-ret); return ERROR; } @@ -173,7 +173,7 @@ int unload_module(FAR struct binary_s *binp) ret = exec_dtors(binp); if (ret < 0) { - bdbg("exec_ctors() failed: %d\n", ret); + berr("exec_ctors() failed: %d\n", ret); set_errno(-ret); return ERROR; } @@ -187,7 +187,7 @@ int unload_module(FAR struct binary_s *binp) if (binp->mapped) { - bvdbg("Unmapping address space: %p\n", binp->mapped); + binfo("Unmapping address space: %p\n", binp->mapped); munmap(binp->mapped, binp->mapsize); } @@ -198,7 +198,7 @@ int unload_module(FAR struct binary_s *binp) { if (binp->alloc[i]) { - bvdbg("Freeing alloc[%d]: %p\n", i, binp->alloc[i]); + binfo("Freeing alloc[%d]: %p\n", i, binp->alloc[i]); kumm_free((FAR void *)binp->alloc[i]); } } diff --git a/binfmt/builtin.c b/binfmt/builtin.c index 537556136b65b956e2b119e691841304025d2606..88ad846c7fc21031d826d79cabb4dcfbb2bef721 100644 --- a/binfmt/builtin.c +++ b/binfmt/builtin.c @@ -95,7 +95,7 @@ static int builtin_loadbinary(struct binary_s *binp) int index; int ret; - bvdbg("Loading file: %s\n", binp->filename); + binfo("Loading file: %s\n", binp->filename); /* Open the binary file for reading (only) */ @@ -103,7 +103,7 @@ static int builtin_loadbinary(struct binary_s *binp) if (fd < 0) { int errval = get_errno(); - bdbg("ERROR: Failed to open binary %s: %d\n", binp->filename, errval); + berr("ERROR: Failed to open binary %s: %d\n", binp->filename, errval); return -errval; } @@ -115,7 +115,7 @@ static int builtin_loadbinary(struct binary_s *binp) if (ret < 0) { int errval = get_errno(); - bdbg("ERROR: FIOC_FILENAME ioctl failed: %d\n", errval); + berr("ERROR: FIOC_FILENAME ioctl failed: %d\n", errval); close(fd); return -errval; } @@ -128,7 +128,7 @@ static int builtin_loadbinary(struct binary_s *binp) if (index < 0) { int errval = get_errno(); - bdbg("ERROR: %s is not a builtin application\n", filename); + berr("ERROR: %s is not a builtin application\n", filename); close(fd); return -errval; @@ -171,12 +171,12 @@ int builtin_initialize(void) /* Register ourselves as a binfmt loader */ - bvdbg("Registering Builtin Loader\n"); + binfo("Registering Builtin Loader\n"); ret = register_binfmt(&g_builtin_binfmt); if (ret != 0) { - bdbg("Failed to register binfmt: %d\n", ret); + berr("Failed to register binfmt: %d\n", ret); } return ret; diff --git a/binfmt/elf.c b/binfmt/elf.c index 7291389ebade37dbbcddd933ccfcd75cdef41df3..37b1e117cd4f4271fe461921ff9318de47a0cc0a 100644 --- a/binfmt/elf.c +++ b/binfmt/elf.c @@ -60,11 +60,11 @@ * Pre-processor Definitions ****************************************************************************/ -/* CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, and CONFIG_DEBUG_BINFMT have to be +/* CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_BINFMT have to be * defined or CONFIG_ELF_DUMPBUFFER does nothing. */ -#if !defined(CONFIG_DEBUG_VERBOSE) || !defined (CONFIG_DEBUG_BINFMT) +#if !defined(CONFIG_DEBUG_INFO) || !defined (CONFIG_DEBUG_BINFMT) # undef CONFIG_ELF_DUMPBUFFER #endif @@ -73,7 +73,7 @@ #endif #ifdef CONFIG_ELF_DUMPBUFFER -# define elf_dumpbuffer(m,b,n) bvdbgdumpbuffer(m,b,n) +# define elf_dumpbuffer(m,b,n) binfodumpbuffer(m,b,n) #else # define elf_dumpbuffer(m,b,n) #endif @@ -87,7 +87,7 @@ ****************************************************************************/ static int elf_loadbinary(FAR struct binary_s *binp); -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_BINFMT) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_BINFMT) static void elf_dumploadinfo(FAR struct elf_loadinfo_s *loadinfo); #endif @@ -110,63 +110,63 @@ static struct binfmt_s g_elfbinfmt = * Name: elf_dumploadinfo ****************************************************************************/ -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_BINFMT) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_BINFMT) static void elf_dumploadinfo(FAR struct elf_loadinfo_s *loadinfo) { int i; - bdbg("LOAD_INFO:\n"); - bdbg(" textalloc: %08lx\n", (long)loadinfo->textalloc); - bdbg(" dataalloc: %08lx\n", (long)loadinfo->dataalloc); - bdbg(" textsize: %ld\n", (long)loadinfo->textsize); - bdbg(" datasize: %ld\n", (long)loadinfo->datasize); - bdbg(" filelen: %ld\n", (long)loadinfo->filelen); + berr("LOAD_INFO:\n"); + berr(" textalloc: %08lx\n", (long)loadinfo->textalloc); + berr(" dataalloc: %08lx\n", (long)loadinfo->dataalloc); + berr(" textsize: %ld\n", (long)loadinfo->textsize); + berr(" datasize: %ld\n", (long)loadinfo->datasize); + berr(" filelen: %ld\n", (long)loadinfo->filelen); #ifdef CONFIG_BINFMT_CONSTRUCTORS - bdbg(" ctoralloc: %08lx\n", (long)loadinfo->ctoralloc); - bdbg(" ctors: %08lx\n", (long)loadinfo->ctors); - bdbg(" nctors: %d\n", loadinfo->nctors); - bdbg(" dtoralloc: %08lx\n", (long)loadinfo->dtoralloc); - bdbg(" dtors: %08lx\n", (long)loadinfo->dtors); - bdbg(" ndtors: %d\n", loadinfo->ndtors); + berr(" ctoralloc: %08lx\n", (long)loadinfo->ctoralloc); + berr(" ctors: %08lx\n", (long)loadinfo->ctors); + berr(" nctors: %d\n", loadinfo->nctors); + berr(" dtoralloc: %08lx\n", (long)loadinfo->dtoralloc); + berr(" dtors: %08lx\n", (long)loadinfo->dtors); + berr(" ndtors: %d\n", loadinfo->ndtors); #endif - bdbg(" filfd: %d\n", loadinfo->filfd); - bdbg(" symtabidx: %d\n", loadinfo->symtabidx); - bdbg(" strtabidx: %d\n", loadinfo->strtabidx); + berr(" filfd: %d\n", loadinfo->filfd); + berr(" symtabidx: %d\n", loadinfo->symtabidx); + berr(" strtabidx: %d\n", loadinfo->strtabidx); - bdbg("ELF Header:\n"); - bdbg(" e_ident: %02x %02x %02x %02x\n", + berr("ELF Header:\n"); + berr(" e_ident: %02x %02x %02x %02x\n", loadinfo->ehdr.e_ident[0], loadinfo->ehdr.e_ident[1], loadinfo->ehdr.e_ident[2], loadinfo->ehdr.e_ident[3]); - bdbg(" e_type: %04x\n", loadinfo->ehdr.e_type); - bdbg(" e_machine: %04x\n", loadinfo->ehdr.e_machine); - bdbg(" e_version: %08x\n", loadinfo->ehdr.e_version); - bdbg(" e_entry: %08lx\n", (long)loadinfo->ehdr.e_entry); - bdbg(" e_phoff: %d\n", loadinfo->ehdr.e_phoff); - bdbg(" e_shoff: %d\n", loadinfo->ehdr.e_shoff); - bdbg(" e_flags: %08x\n" , loadinfo->ehdr.e_flags); - bdbg(" e_ehsize: %d\n", loadinfo->ehdr.e_ehsize); - bdbg(" e_phentsize: %d\n", loadinfo->ehdr.e_phentsize); - bdbg(" e_phnum: %d\n", loadinfo->ehdr.e_phnum); - bdbg(" e_shentsize: %d\n", loadinfo->ehdr.e_shentsize); - bdbg(" e_shnum: %d\n", loadinfo->ehdr.e_shnum); - bdbg(" e_shstrndx: %d\n", loadinfo->ehdr.e_shstrndx); + berr(" e_type: %04x\n", loadinfo->ehdr.e_type); + berr(" e_machine: %04x\n", loadinfo->ehdr.e_machine); + berr(" e_version: %08x\n", loadinfo->ehdr.e_version); + berr(" e_entry: %08lx\n", (long)loadinfo->ehdr.e_entry); + berr(" e_phoff: %d\n", loadinfo->ehdr.e_phoff); + berr(" e_shoff: %d\n", loadinfo->ehdr.e_shoff); + berr(" e_flags: %08x\n" , loadinfo->ehdr.e_flags); + berr(" e_ehsize: %d\n", loadinfo->ehdr.e_ehsize); + berr(" e_phentsize: %d\n", loadinfo->ehdr.e_phentsize); + berr(" e_phnum: %d\n", loadinfo->ehdr.e_phnum); + berr(" e_shentsize: %d\n", loadinfo->ehdr.e_shentsize); + berr(" e_shnum: %d\n", loadinfo->ehdr.e_shnum); + berr(" e_shstrndx: %d\n", loadinfo->ehdr.e_shstrndx); if (loadinfo->shdr && loadinfo->ehdr.e_shnum > 0) { for (i = 0; i < loadinfo->ehdr.e_shnum; i++) { FAR Elf32_Shdr *shdr = &loadinfo->shdr[i]; - bdbg("Sections %d:\n", i); - bdbg(" sh_name: %08x\n", shdr->sh_name); - bdbg(" sh_type: %08x\n", shdr->sh_type); - bdbg(" sh_flags: %08x\n", shdr->sh_flags); - bdbg(" sh_addr: %08x\n", shdr->sh_addr); - bdbg(" sh_offset: %d\n", shdr->sh_offset); - bdbg(" sh_size: %d\n", shdr->sh_size); - bdbg(" sh_link: %d\n", shdr->sh_link); - bdbg(" sh_info: %d\n", shdr->sh_info); - bdbg(" sh_addralign: %d\n", shdr->sh_addralign); - bdbg(" sh_entsize: %d\n", shdr->sh_entsize); + berr("Sections %d:\n", i); + berr(" sh_name: %08x\n", shdr->sh_name); + berr(" sh_type: %08x\n", shdr->sh_type); + berr(" sh_flags: %08x\n", shdr->sh_flags); + berr(" sh_addr: %08x\n", shdr->sh_addr); + berr(" sh_offset: %d\n", shdr->sh_offset); + berr(" sh_size: %d\n", shdr->sh_size); + berr(" sh_link: %d\n", shdr->sh_link); + berr(" sh_info: %d\n", shdr->sh_info); + berr(" sh_addralign: %d\n", shdr->sh_addralign); + berr(" sh_entsize: %d\n", shdr->sh_entsize); } } } @@ -193,7 +193,7 @@ static void elf_dumpentrypt(FAR struct binary_s *binp, ret = elf_addrenv_select(loadinfo); if (ret < 0) { - bdbg("ERROR: elf_addrenv_select() failed: %d\n", ret); + berr("ERROR: elf_addrenv_select() failed: %d\n", ret); return; } #endif @@ -207,7 +207,7 @@ static void elf_dumpentrypt(FAR struct binary_s *binp, ret = elf_addrenv_restore(loadinfo); if (ret < 0) { - bdbg("ERROR: elf_addrenv_restore() failed: %d\n", ret); + berr("ERROR: elf_addrenv_restore() failed: %d\n", ret); } #endif } @@ -229,7 +229,7 @@ static int elf_loadbinary(FAR struct binary_s *binp) struct elf_loadinfo_s loadinfo; /* Contains globals for libelf */ int ret; - bvdbg("Loading file: %s\n", binp->filename); + binfo("Loading file: %s\n", binp->filename); /* Initialize the ELF library to load the program binary. */ @@ -237,7 +237,7 @@ static int elf_loadbinary(FAR struct binary_s *binp) elf_dumploadinfo(&loadinfo); if (ret != 0) { - bdbg("Failed to initialize for load of ELF program: %d\n", ret); + berr("Failed to initialize for load of ELF program: %d\n", ret); goto errout; } @@ -247,7 +247,7 @@ static int elf_loadbinary(FAR struct binary_s *binp) elf_dumploadinfo(&loadinfo); if (ret != 0) { - bdbg("Failed to load ELF program binary: %d\n", ret); + berr("Failed to load ELF program binary: %d\n", ret); goto errout_with_init; } @@ -256,7 +256,7 @@ static int elf_loadbinary(FAR struct binary_s *binp) ret = elf_bind(&loadinfo, binp->exports, binp->nexports); if (ret != 0) { - bdbg("Failed to bind symbols program binary: %d\n", ret); + berr("Failed to bind symbols program binary: %d\n", ret); goto errout_with_load; } @@ -338,12 +338,12 @@ int elf_initialize(void) /* Register ourselves as a binfmt loader */ - bvdbg("Registering ELF\n"); + binfo("Registering ELF\n"); ret = register_binfmt(&g_elfbinfmt); if (ret != 0) { - bdbg("Failed to register binfmt: %d\n", ret); + berr("Failed to register binfmt: %d\n", ret); } return ret; diff --git a/binfmt/libelf/Kconfig b/binfmt/libelf/Kconfig index 4437914ec3988223b15f329935dd2b94b5d3b8e9..5580a70a4751628ea7f109d93e7e0dba072b8ae6 100644 --- a/binfmt/libelf/Kconfig +++ b/binfmt/libelf/Kconfig @@ -35,7 +35,7 @@ config ELF_BUFFERINCR config ELF_DUMPBUFFER bool "Dump ELF buffers" default n - depends on DEBUG && DEBUG_VERBOSE + depends on DEBUG_INFO ---help--- Dump various ELF buffers for debug purposes diff --git a/binfmt/libelf/libelf_addrenv.c b/binfmt/libelf/libelf_addrenv.c index 3c01279b2c2b7d959978df03ad88f5b733754896..5e358f58e47455b69512a3cc5aa5abf6a80de2d5 100644 --- a/binfmt/libelf/libelf_addrenv.c +++ b/binfmt/libelf/libelf_addrenv.c @@ -101,7 +101,7 @@ int elf_addrenv_alloc(FAR struct elf_loadinfo_s *loadinfo, size_t textsize, ret = up_addrenv_create(textsize, datasize, heapsize, &loadinfo->addrenv); if (ret < 0) { - bdbg("ERROR: up_addrenv_create failed: %d\n", ret); + berr("ERROR: up_addrenv_create failed: %d\n", ret); return ret; } @@ -114,14 +114,14 @@ int elf_addrenv_alloc(FAR struct elf_loadinfo_s *loadinfo, size_t textsize, ret = up_addrenv_vtext(&loadinfo->addrenv, &vtext); if (ret < 0) { - bdbg("ERROR: up_addrenv_vtext failed: %d\n", ret); + berr("ERROR: up_addrenv_vtext failed: %d\n", ret); return ret; } ret = up_addrenv_vdata(&loadinfo->addrenv, textsize, &vdata); if (ret < 0) { - bdbg("ERROR: up_adup_addrenv_vdatadrenv_vtext failed: %d\n", ret); + berr("ERROR: up_adup_addrenv_vdatadrenv_vtext failed: %d\n", ret); return ret; } @@ -170,7 +170,7 @@ void elf_addrenv_free(FAR struct elf_loadinfo_s *loadinfo) ret = up_addrenv_destroy(&loadinfo->addrenv); if (ret < 0) { - bdbg("ERROR: up_addrenv_destroy failed: %d\n", ret); + berr("ERROR: up_addrenv_destroy failed: %d\n", ret); } #else /* If there is an allocation for the ELF image, free it */ diff --git a/binfmt/libelf/libelf_bind.c b/binfmt/libelf/libelf_bind.c index a4fd589613bc1d222acefb27f04e1c7b37f35d6c..5239f0523c72c513291e67fc6e097d5f6bbe7acd 100644 --- a/binfmt/libelf/libelf_bind.c +++ b/binfmt/libelf/libelf_bind.c @@ -55,11 +55,11 @@ * Pre-processor Definitions ****************************************************************************/ -/* CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, and CONFIG_DEBUG_BINFMT have to be +/* CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_BINFMT have to be * defined or CONFIG_ELF_DUMPBUFFER does nothing. */ -#if !defined(CONFIG_DEBUG_VERBOSE) || !defined (CONFIG_DEBUG_BINFMT) +#if !defined(CONFIG_DEBUG_INFO) || !defined (CONFIG_DEBUG_BINFMT) # undef CONFIG_ELF_DUMPBUFFER #endif @@ -68,7 +68,7 @@ #endif #ifdef CONFIG_ELF_DUMPBUFFER -# define elf_dumpbuffer(m,b,n) bvdbgdumpbuffer(m,b,n) +# define elf_dumpbuffer(m,b,n) binfodumpbuffer(m,b,n) #else # define elf_dumpbuffer(m,b,n) #endif @@ -103,7 +103,7 @@ static inline int elf_readrel(FAR struct elf_loadinfo_s *loadinfo, if (index < 0 || index > (relsec->sh_size / sizeof(Elf32_Rel))) { - bdbg("Bad relocation symbol index: %d\n", index); + berr("Bad relocation symbol index: %d\n", index); return -EINVAL; } @@ -156,7 +156,7 @@ static int elf_relocate(FAR struct elf_loadinfo_s *loadinfo, int relidx, ret = elf_readrel(loadinfo, relsec, i, &rel); if (ret < 0) { - bdbg("Section %d reloc %d: Failed to read relocation entry: %d\n", + berr("Section %d reloc %d: Failed to read relocation entry: %d\n", relidx, i, ret); return ret; } @@ -172,7 +172,7 @@ static int elf_relocate(FAR struct elf_loadinfo_s *loadinfo, int relidx, ret = elf_readsym(loadinfo, symidx, &sym); if (ret < 0) { - bdbg("Section %d reloc %d: Failed to read symbol[%d]: %d\n", + berr("Section %d reloc %d: Failed to read symbol[%d]: %d\n", relidx, i, symidx, ret); return ret; } @@ -194,13 +194,13 @@ static int elf_relocate(FAR struct elf_loadinfo_s *loadinfo, int relidx, if (ret == -ESRCH) { - bdbg("Section %d reloc %d: Undefined symbol[%d] has no name: %d\n", + berr("Section %d reloc %d: Undefined symbol[%d] has no name: %d\n", relidx, i, symidx, ret); psym = NULL; } else { - bdbg("Section %d reloc %d: Failed to get value of symbol[%d]: %d\n", + berr("Section %d reloc %d: Failed to get value of symbol[%d]: %d\n", relidx, i, symidx, ret); return ret; } @@ -210,7 +210,7 @@ static int elf_relocate(FAR struct elf_loadinfo_s *loadinfo, int relidx, if (rel.r_offset < 0 || rel.r_offset > dstsec->sh_size - sizeof(uint32_t)) { - bdbg("Section %d reloc %d: Relocation address out of range, offset %d size %d\n", + berr("Section %d reloc %d: Relocation address out of range, offset %d size %d\n", relidx, i, rel.r_offset, dstsec->sh_size); return -EINVAL; } @@ -222,7 +222,7 @@ static int elf_relocate(FAR struct elf_loadinfo_s *loadinfo, int relidx, ret = up_relocate(&rel, psym, addr); if (ret < 0) { - bdbg("ERROR: Section %d reloc %d: Relocation failed: %d\n", relidx, i, ret); + berr("ERROR: Section %d reloc %d: Relocation failed: %d\n", relidx, i, ret); return ret; } } @@ -233,7 +233,7 @@ static int elf_relocate(FAR struct elf_loadinfo_s *loadinfo, int relidx, static int elf_relocateadd(FAR struct elf_loadinfo_s *loadinfo, int relidx, FAR const struct symtab_s *exports, int nexports) { - bdbg("Not implemented\n"); + berr("Not implemented\n"); return -ENOSYS; } @@ -278,7 +278,7 @@ int elf_bind(FAR struct elf_loadinfo_s *loadinfo, ret = elf_allocbuffer(loadinfo); if (ret < 0) { - bdbg("elf_allocbuffer failed: %d\n", ret); + berr("elf_allocbuffer failed: %d\n", ret); return -ENOMEM; } @@ -291,7 +291,7 @@ int elf_bind(FAR struct elf_loadinfo_s *loadinfo, ret = elf_addrenv_select(loadinfo); if (ret < 0) { - bdbg("ERROR: elf_addrenv_select() failed: %d\n", ret); + berr("ERROR: elf_addrenv_select() failed: %d\n", ret); return ret; } #endif @@ -352,7 +352,7 @@ int elf_bind(FAR struct elf_loadinfo_s *loadinfo, status = elf_addrenv_restore(loadinfo); if (status < 0) { - bdbg("ERROR: elf_addrenv_restore() failed: %d\n", status); + berr("ERROR: elf_addrenv_restore() failed: %d\n", status); if (ret == OK) { ret = status; diff --git a/binfmt/libelf/libelf_ctors.c b/binfmt/libelf/libelf_ctors.c index 95f3884135f67bc6aae2b6a92ff7cf72baf82eb3..b957038bc3a0cbbb80697d6ee5c33b09014df02f 100644 --- a/binfmt/libelf/libelf_ctors.c +++ b/binfmt/libelf/libelf_ctors.c @@ -103,7 +103,7 @@ int elf_loadctors(FAR struct elf_loadinfo_s *loadinfo) ret = elf_allocbuffer(loadinfo); if (ret < 0) { - bdbg("elf_allocbuffer failed: %d\n", ret); + berr("elf_allocbuffer failed: %d\n", ret); return -ENOMEM; } @@ -121,7 +121,7 @@ int elf_loadctors(FAR struct elf_loadinfo_s *loadinfo) * static constructor section. */ - bvdbg("elf_findsection .ctors section failed: %d\n", ctoridx); + binfo("elf_findsection .ctors section failed: %d\n", ctoridx); return ret == -ENOENT ? OK : ret; } @@ -138,7 +138,7 @@ int elf_loadctors(FAR struct elf_loadinfo_s *loadinfo) ctorsize = shdr->sh_size; loadinfo->nctors = ctorsize / sizeof(binfmt_ctor_t); - bvdbg("ctoridx=%d ctorsize=%d sizeof(binfmt_ctor_t)=%d nctors=%d\n", + binfo("ctoridx=%d ctorsize=%d sizeof(binfmt_ctor_t)=%d nctors=%d\n", ctoridx, ctorsize, sizeof(binfmt_ctor_t), loadinfo->nctors); /* Check if there are any constructors. It is not an error if there @@ -166,7 +166,7 @@ int elf_loadctors(FAR struct elf_loadinfo_s *loadinfo) loadinfo->ctoralloc = (binfmt_ctor_t *)kumm_malloc(ctorsize); if (!loadinfo->ctoralloc) { - bdbg("Failed to allocate memory for .ctors\n"); + berr("Failed to allocate memory for .ctors\n"); return -ENOMEM; } @@ -178,7 +178,7 @@ int elf_loadctors(FAR struct elf_loadinfo_s *loadinfo) shdr->sh_offset); if (ret < 0) { - bdbg("Failed to allocate .ctors: %d\n", ret); + berr("Failed to allocate .ctors: %d\n", ret); return ret; } @@ -191,7 +191,7 @@ int elf_loadctors(FAR struct elf_loadinfo_s *loadinfo) { FAR uintptr_t *ptr = (uintptr_t *)((FAR void *)(&loadinfo->ctors)[i]); - bvdbg("ctor %d: %08lx + %08lx = %08lx\n", + binfo("ctor %d: %08lx + %08lx = %08lx\n", i, *ptr, (unsigned long)loadinfo->textalloc, (unsigned long)(*ptr + loadinfo->textalloc)); diff --git a/binfmt/libelf/libelf_dtors.c b/binfmt/libelf/libelf_dtors.c index 1f4cdab7e3e27cf673f4bf90e05f2c51d34f67b1..6d0b0cff1a449f6a200584adcb955b66d130fbef 100644 --- a/binfmt/libelf/libelf_dtors.c +++ b/binfmt/libelf/libelf_dtors.c @@ -103,7 +103,7 @@ int elf_loaddtors(FAR struct elf_loadinfo_s *loadinfo) ret = elf_allocbuffer(loadinfo); if (ret < 0) { - bdbg("elf_allocbuffer failed: %d\n", ret); + berr("elf_allocbuffer failed: %d\n", ret); return -ENOMEM; } @@ -121,7 +121,7 @@ int elf_loaddtors(FAR struct elf_loadinfo_s *loadinfo) * static destructor section. */ - bvdbg("elf_findsection .dtors section failed: %d\n", dtoridx); + binfo("elf_findsection .dtors section failed: %d\n", dtoridx); return ret == -ENOENT ? OK : ret; } @@ -138,7 +138,7 @@ int elf_loaddtors(FAR struct elf_loadinfo_s *loadinfo) dtorsize = shdr->sh_size; loadinfo->ndtors = dtorsize / sizeof(binfmt_dtor_t); - bvdbg("dtoridx=%d dtorsize=%d sizeof(binfmt_dtor_t)=%d ndtors=%d\n", + binfo("dtoridx=%d dtorsize=%d sizeof(binfmt_dtor_t)=%d ndtors=%d\n", dtoridx, dtorsize, sizeof(binfmt_dtor_t), loadinfo->ndtors); /* Check if there are any destructors. It is not an error if there @@ -166,7 +166,7 @@ int elf_loaddtors(FAR struct elf_loadinfo_s *loadinfo) loadinfo->ctoralloc = (binfmt_dtor_t *)kumm_malloc(dtorsize); if (!loadinfo->ctoralloc) { - bdbg("Failed to allocate memory for .dtors\n"); + berr("Failed to allocate memory for .dtors\n"); return -ENOMEM; } @@ -178,7 +178,7 @@ int elf_loaddtors(FAR struct elf_loadinfo_s *loadinfo) shdr->sh_offset); if (ret < 0) { - bdbg("Failed to allocate .dtors: %d\n", ret); + berr("Failed to allocate .dtors: %d\n", ret); return ret; } @@ -191,7 +191,7 @@ int elf_loaddtors(FAR struct elf_loadinfo_s *loadinfo) { FAR uintptr_t *ptr = (uintptr_t *)((FAR void *)(&loadinfo->dtors)[i]); - bvdbg("dtor %d: %08lx + %08lx = %08lx\n", + binfo("dtor %d: %08lx + %08lx = %08lx\n", i, *ptr, (unsigned long)loadinfo->textalloc, (unsigned long)(*ptr + loadinfo->textalloc)); diff --git a/binfmt/libelf/libelf_init.c b/binfmt/libelf/libelf_init.c index 35414fca18371ada5ae84427e64863da73e52144..7307261df623eedaec37ecfde97ef1922c96a9d7 100644 --- a/binfmt/libelf/libelf_init.c +++ b/binfmt/libelf/libelf_init.c @@ -56,16 +56,16 @@ * Pre-processor Definitions ****************************************************************************/ -/* CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, and CONFIG_DEBUG_BINFMT have to be +/* CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_BINFMT have to be * defined or CONFIG_ELF_DUMPBUFFER does nothing. */ -#if !defined(CONFIG_DEBUG_VERBOSE) || !defined (CONFIG_DEBUG_BINFMT) +#if !defined(CONFIG_DEBUG_INFO) || !defined (CONFIG_DEBUG_BINFMT) # undef CONFIG_ELF_DUMPBUFFER #endif #ifdef CONFIG_ELF_DUMPBUFFER -# define elf_dumpbuffer(m,b,n) bvdbgdumpbuffer(m,b,n) +# define elf_dumpbuffer(m,b,n) binfodumpbuffer(m,b,n) #else # define elf_dumpbuffer(m,b,n) #endif @@ -102,7 +102,7 @@ static inline int elf_filelen(FAR struct elf_loadinfo_s *loadinfo, if (ret < 0) { int errval = errno; - bdbg("Failed to stat file: %d\n", errval); + berr("Failed to stat file: %d\n", errval); return -errval; } @@ -110,7 +110,7 @@ static inline int elf_filelen(FAR struct elf_loadinfo_s *loadinfo, if (!S_ISREG(buf.st_mode)) { - bdbg("Not a regular file. mode: %d\n", buf.st_mode); + berr("Not a regular file. mode: %d\n", buf.st_mode); return -ENOENT; } @@ -145,7 +145,7 @@ int elf_init(FAR const char *filename, FAR struct elf_loadinfo_s *loadinfo) { int ret; - bvdbg("filename: %s loadinfo: %p\n", filename, loadinfo); + binfo("filename: %s loadinfo: %p\n", filename, loadinfo); /* Clear the load info structure */ @@ -156,7 +156,7 @@ int elf_init(FAR const char *filename, FAR struct elf_loadinfo_s *loadinfo) ret = elf_filelen(loadinfo, filename); if (ret < 0) { - bdbg("elf_filelen failed: %d\n", ret); + berr("elf_filelen failed: %d\n", ret); return ret; } @@ -166,7 +166,7 @@ int elf_init(FAR const char *filename, FAR struct elf_loadinfo_s *loadinfo) if (loadinfo->filfd < 0) { int errval = errno; - bdbg("Failed to open ELF binary %s: %d\n", filename, errval); + berr("Failed to open ELF binary %s: %d\n", filename, errval); return -errval; } @@ -175,7 +175,7 @@ int elf_init(FAR const char *filename, FAR struct elf_loadinfo_s *loadinfo) ret = elf_read(loadinfo, (FAR uint8_t *)&loadinfo->ehdr, sizeof(Elf32_Ehdr), 0); if (ret < 0) { - bdbg("Failed to read ELF header: %d\n", ret); + berr("Failed to read ELF header: %d\n", ret); return ret; } @@ -193,7 +193,7 @@ int elf_init(FAR const char *filename, FAR struct elf_loadinfo_s *loadinfo) * is not correctly formed. */ - bdbg("Bad ELF header: %d\n", ret); + berr("Bad ELF header: %d\n", ret); return ret; } diff --git a/binfmt/libelf/libelf_iobuffer.c b/binfmt/libelf/libelf_iobuffer.c index 6e97781a37afbf3b70f2db4bf7cee85d9d450f4d..29abb492deebbc862fcbce184512fcff4f4dc3b2 100644 --- a/binfmt/libelf/libelf_iobuffer.c +++ b/binfmt/libelf/libelf_iobuffer.c @@ -87,7 +87,7 @@ int elf_allocbuffer(FAR struct elf_loadinfo_s *loadinfo) loadinfo->iobuffer = (FAR uint8_t *)kmm_malloc(CONFIG_ELF_BUFFERSIZE); if (!loadinfo->iobuffer) { - bdbg("Failed to allocate an I/O buffer\n"); + berr("Failed to allocate an I/O buffer\n"); return -ENOMEM; } @@ -123,7 +123,7 @@ int elf_reallocbuffer(FAR struct elf_loadinfo_s *loadinfo, size_t increment) buffer = kmm_realloc((FAR void *)loadinfo->iobuffer, newsize); if (!buffer) { - bdbg("Failed to reallocate the I/O buffer\n"); + berr("Failed to reallocate the I/O buffer\n"); return -ENOMEM; } diff --git a/binfmt/libelf/libelf_load.c b/binfmt/libelf/libelf_load.c index b5cef6c6e9c6ac25a88d92e568384cc548338c8d..5b589323f013535f4e899f9fce9ae979aa8cc724 100644 --- a/binfmt/libelf/libelf_load.c +++ b/binfmt/libelf/libelf_load.c @@ -156,7 +156,7 @@ static inline int elf_loadfile(FAR struct elf_loadinfo_s *loadinfo) /* Read each section into memory that is marked SHF_ALLOC + SHT_NOBITS */ - bvdbg("Loaded sections:\n"); + binfo("Loaded sections:\n"); text = (FAR uint8_t *)loadinfo->textalloc; data = (FAR uint8_t *)loadinfo->dataalloc; @@ -196,7 +196,7 @@ static inline int elf_loadfile(FAR struct elf_loadinfo_s *loadinfo) ret = elf_read(loadinfo, *pptr, shdr->sh_size, shdr->sh_offset); if (ret < 0) { - bdbg("ERROR: Failed to read section %d: %d\n", i, ret); + berr("ERROR: Failed to read section %d: %d\n", i, ret); return ret; } } @@ -212,7 +212,7 @@ static inline int elf_loadfile(FAR struct elf_loadinfo_s *loadinfo) /* Update sh_addr to point to copy in memory */ - bvdbg("%d. %08lx->%08lx\n", i, + binfo("%d. %08lx->%08lx\n", i, (unsigned long)shdr->sh_addr, (unsigned long)*pptr); shdr->sh_addr = (uintptr_t)*pptr; @@ -250,7 +250,7 @@ int elf_load(FAR struct elf_loadinfo_s *loadinfo) #endif int ret; - bvdbg("loadinfo: %p\n", loadinfo); + binfo("loadinfo: %p\n", loadinfo); DEBUGASSERT(loadinfo && loadinfo->filfd >= 0); /* Load section headers into memory */ @@ -258,7 +258,7 @@ int elf_load(FAR struct elf_loadinfo_s *loadinfo) ret = elf_loadshdrs(loadinfo); if (ret < 0) { - bdbg("ERROR: elf_loadshdrs failed: %d\n", ret); + berr("ERROR: elf_loadshdrs failed: %d\n", ret); goto errout_with_buffers; } @@ -286,7 +286,7 @@ int elf_load(FAR struct elf_loadinfo_s *loadinfo) ret = elf_addrenv_alloc(loadinfo, loadinfo->textsize, loadinfo->datasize, heapsize); if (ret < 0) { - bdbg("ERROR: elf_addrenv_alloc() failed: %d\n", ret); + berr("ERROR: elf_addrenv_alloc() failed: %d\n", ret); goto errout_with_buffers; } @@ -299,7 +299,7 @@ int elf_load(FAR struct elf_loadinfo_s *loadinfo) ret = elf_addrenv_select(loadinfo); if (ret < 0) { - bdbg("ERROR: elf_addrenv_select() failed: %d\n", ret); + berr("ERROR: elf_addrenv_select() failed: %d\n", ret); goto errout_with_buffers; } #endif @@ -309,7 +309,7 @@ int elf_load(FAR struct elf_loadinfo_s *loadinfo) ret = elf_loadfile(loadinfo); if (ret < 0) { - bdbg("ERROR: elf_loadfile failed: %d\n", ret); + berr("ERROR: elf_loadfile failed: %d\n", ret); goto errout_with_addrenv; } @@ -319,14 +319,14 @@ int elf_load(FAR struct elf_loadinfo_s *loadinfo) ret = elf_loadctors(loadinfo); if (ret < 0) { - bdbg("ERROR: elf_loadctors failed: %d\n", ret); + berr("ERROR: elf_loadctors failed: %d\n", ret); goto errout_with_addrenv; } ret = elf_loaddtors(loadinfo); if (ret < 0) { - bdbg("ERROR: elf_loaddtors failed: %d\n", ret); + berr("ERROR: elf_loaddtors failed: %d\n", ret); goto errout_with_addrenv; } #endif @@ -335,7 +335,7 @@ int elf_load(FAR struct elf_loadinfo_s *loadinfo) exidx = elf_findsection(loadinfo, CONFIG_ELF_EXIDX_SECTNAME); if (exidx < 0) { - bvdbg("elf_findsection: Exception Index section not found: %d\n", exidx); + binfo("elf_findsection: Exception Index section not found: %d\n", exidx); } else { @@ -349,7 +349,7 @@ int elf_load(FAR struct elf_loadinfo_s *loadinfo) ret = elf_addrenv_restore(loadinfo); if (ret < 0) { - bdbg("ERROR: elf_addrenv_restore() failed: %d\n", ret); + berr("ERROR: elf_addrenv_restore() failed: %d\n", ret); goto errout_with_buffers; } #endif diff --git a/binfmt/libelf/libelf_read.c b/binfmt/libelf/libelf_read.c index 420c8f1808932c39f72164d98b7ad0976cd95ba0..cdadf4444e381bb753e6a7b3d18bd8a9bcf6a77a 100644 --- a/binfmt/libelf/libelf_read.c +++ b/binfmt/libelf/libelf_read.c @@ -115,7 +115,7 @@ int elf_read(FAR struct elf_loadinfo_s *loadinfo, FAR uint8_t *buffer, ssize_t nbytes; /* Number of bytes read */ off_t rpos; /* Position returned by lseek */ - bvdbg("Read %ld bytes from offset %ld\n", (long)readsize, (long)offset); + binfo("Read %ld bytes from offset %ld\n", (long)readsize, (long)offset); /* Loop until all of the requested data has been read. */ @@ -127,7 +127,7 @@ int elf_read(FAR struct elf_loadinfo_s *loadinfo, FAR uint8_t *buffer, if (rpos != offset) { int errval = errno; - bdbg("Failed to seek to position %lu: %d\n", + berr("Failed to seek to position %lu: %d\n", (unsigned long)offset, errval); return -errval; } @@ -143,14 +143,14 @@ int elf_read(FAR struct elf_loadinfo_s *loadinfo, FAR uint8_t *buffer, if (errval != EINTR) { - bdbg("Read from offset %lu failed: %d\n", + berr("Read from offset %lu failed: %d\n", (unsigned long)offset, errval); return -errval; } } else if (nbytes == 0) { - bdbg("Unexpected end of file\n"); + berr("Unexpected end of file\n"); return -ENODATA; } else diff --git a/binfmt/libelf/libelf_sections.c b/binfmt/libelf/libelf_sections.c index 26189d72479788c3679de5e6cfef4e227b6a5964..8f4369d367dc3cc970534be20d450b9318d3750d 100644 --- a/binfmt/libelf/libelf_sections.c +++ b/binfmt/libelf/libelf_sections.c @@ -93,7 +93,7 @@ static inline int elf_sectname(FAR struct elf_loadinfo_s *loadinfo, shstrndx = loadinfo->ehdr.e_shstrndx; if (shstrndx == SHN_UNDEF) { - bdbg("No section header string table\n"); + berr("No section header string table\n"); return -EINVAL; } @@ -126,7 +126,7 @@ static inline int elf_sectname(FAR struct elf_loadinfo_s *loadinfo, { if (loadinfo->filelen <= offset) { - bdbg("At end of file\n"); + berr("At end of file\n"); return -EINVAL; } @@ -139,7 +139,7 @@ static inline int elf_sectname(FAR struct elf_loadinfo_s *loadinfo, ret = elf_read(loadinfo, buffer, readlen, offset); if (ret < 0) { - bdbg("Failed to read section name\n"); + berr("Failed to read section name\n"); return ret; } @@ -159,7 +159,7 @@ static inline int elf_sectname(FAR struct elf_loadinfo_s *loadinfo, ret = elf_reallocbuffer(loadinfo, CONFIG_ELF_BUFFERINCR); if (ret < 0) { - bdbg("elf_reallocbuffer failed: %d\n", ret); + berr("elf_reallocbuffer failed: %d\n", ret); return ret; } } @@ -196,7 +196,7 @@ int elf_loadshdrs(FAR struct elf_loadinfo_s *loadinfo) if (loadinfo->ehdr.e_shnum < 1) { - bdbg("No sections(?)\n"); + berr("No sections(?)\n"); return -EINVAL; } @@ -205,7 +205,7 @@ int elf_loadshdrs(FAR struct elf_loadinfo_s *loadinfo) shdrsize = (size_t)loadinfo->ehdr.e_shentsize * (size_t)loadinfo->ehdr.e_shnum; if (loadinfo->ehdr.e_shoff + shdrsize > loadinfo->filelen) { - bdbg("Insufficent space in file for section header table\n"); + berr("Insufficent space in file for section header table\n"); return -ESPIPE; } @@ -214,7 +214,7 @@ int elf_loadshdrs(FAR struct elf_loadinfo_s *loadinfo) loadinfo->shdr = (FAR FAR Elf32_Shdr *)kmm_malloc(shdrsize); if (!loadinfo->shdr) { - bdbg("Failed to allocate the section header table. Size: %ld\n", + berr("Failed to allocate the section header table. Size: %ld\n", (long)shdrsize); return -ENOMEM; } @@ -225,7 +225,7 @@ int elf_loadshdrs(FAR struct elf_loadinfo_s *loadinfo) loadinfo->ehdr.e_shoff); if (ret < 0) { - bdbg("Failed to read section header table: %d\n", ret); + berr("Failed to read section header table: %d\n", ret); } return ret; @@ -264,13 +264,13 @@ int elf_findsection(FAR struct elf_loadinfo_s *loadinfo, ret = elf_sectname(loadinfo, shdr); if (ret < 0) { - bdbg("elf_sectname failed: %d\n", ret); + berr("elf_sectname failed: %d\n", ret); return ret; } /* Check if the name of this section is 'sectname' */ - bvdbg("%d. Comparing \"%s\" and .\"%s\"\n", + binfo("%d. Comparing \"%s\" and .\"%s\"\n", i, loadinfo->iobuffer, sectname); if (strcmp((FAR const char *)loadinfo->iobuffer, sectname) == 0) diff --git a/binfmt/libelf/libelf_symbols.c b/binfmt/libelf/libelf_symbols.c index 17694815585b72ce7f6d63944cd7dc3b3789d606..ba67034e540f60c443e40afae96561965b7d572f 100644 --- a/binfmt/libelf/libelf_symbols.c +++ b/binfmt/libelf/libelf_symbols.c @@ -97,7 +97,7 @@ static int elf_symname(FAR struct elf_loadinfo_s *loadinfo, if (sym->st_name == 0) { - bdbg("Symbol has no name\n"); + berr("Symbol has no name\n"); return -ESRCH; } @@ -116,7 +116,7 @@ static int elf_symname(FAR struct elf_loadinfo_s *loadinfo, { if (loadinfo->filelen <= offset) { - bdbg("At end of file\n"); + berr("At end of file\n"); return -EINVAL; } @@ -129,7 +129,7 @@ static int elf_symname(FAR struct elf_loadinfo_s *loadinfo, ret = elf_read(loadinfo, buffer, readlen, offset); if (ret < 0) { - bdbg("elf_read failed: %d\n", ret); + berr("elf_read failed: %d\n", ret); return ret; } @@ -149,7 +149,7 @@ static int elf_symname(FAR struct elf_loadinfo_s *loadinfo, ret = elf_reallocbuffer(loadinfo, CONFIG_ELF_BUFFERINCR); if (ret < 0) { - bdbg("elf_reallocbuffer failed: %d\n", ret); + berr("elf_reallocbuffer failed: %d\n", ret); return ret; } } @@ -195,7 +195,7 @@ int elf_findsymtab(FAR struct elf_loadinfo_s *loadinfo) if (loadinfo->symtabidx == 0) { - bdbg("No symbols in ELF file\n"); + berr("No symbols in ELF file\n"); return -EINVAL; } @@ -229,7 +229,7 @@ int elf_readsym(FAR struct elf_loadinfo_s *loadinfo, int index, if (index < 0 || index > (symtab->sh_size / sizeof(Elf32_Sym))) { - bdbg("Bad relocation symbol index: %d\n", index); + berr("Bad relocation symbol index: %d\n", index); return -EINVAL; } @@ -278,7 +278,7 @@ int elf_symvalue(FAR struct elf_loadinfo_s *loadinfo, FAR Elf32_Sym *sym, { /* NuttX ELF modules should be compiled with -fno-common. */ - bdbg("SHN_COMMON: Re-compile with -fno-common\n"); + berr("SHN_COMMON: Re-compile with -fno-common\n"); return -ENOSYS; } @@ -286,7 +286,7 @@ int elf_symvalue(FAR struct elf_loadinfo_s *loadinfo, FAR Elf32_Sym *sym, { /* st_value already holds the correct value */ - bvdbg("SHN_ABS: st_value=%08lx\n", (long)sym->st_value); + binfo("SHN_ABS: st_value=%08lx\n", (long)sym->st_value); return OK; } @@ -303,7 +303,7 @@ int elf_symvalue(FAR struct elf_loadinfo_s *loadinfo, FAR Elf32_Sym *sym, * indicate the nameless symbol. */ - bdbg("SHN_UNDEF: Failed to get symbol name: %d\n", ret); + berr("SHN_UNDEF: Failed to get symbol name: %d\n", ret); return ret; } @@ -316,13 +316,13 @@ int elf_symvalue(FAR struct elf_loadinfo_s *loadinfo, FAR Elf32_Sym *sym, #endif if (!symbol) { - bdbg("SHN_UNDEF: Exported symbol \"%s\" not found\n", loadinfo->iobuffer); + berr("SHN_UNDEF: Exported symbol \"%s\" not found\n", loadinfo->iobuffer); return -ENOENT; } /* Yes... add the exported symbol value to the ELF symbol table entry */ - bvdbg("SHN_ABS: name=%s %08x+%08x=%08x\n", + binfo("SHN_ABS: name=%s %08x+%08x=%08x\n", loadinfo->iobuffer, sym->st_value, symbol->sym_value, sym->st_value + symbol->sym_value); @@ -334,7 +334,7 @@ int elf_symvalue(FAR struct elf_loadinfo_s *loadinfo, FAR Elf32_Sym *sym, { secbase = loadinfo->shdr[sym->st_shndx].sh_addr; - bvdbg("Other: %08x+%08x=%08x\n", + binfo("Other: %08x+%08x=%08x\n", sym->st_value, secbase, sym->st_value + secbase); sym->st_value += secbase; diff --git a/binfmt/libelf/libelf_verify.c b/binfmt/libelf/libelf_verify.c index 015d9d39fe191d0ad9bd2b1c7f27e9b637c81db7..26cb51ae7c26f43f1f9e91e649992940a819d395 100644 --- a/binfmt/libelf/libelf_verify.c +++ b/binfmt/libelf/libelf_verify.c @@ -87,7 +87,7 @@ int elf_verifyheader(FAR const Elf32_Ehdr *ehdr) { if (!ehdr) { - bdbg("NULL ELF header!"); + berr("NULL ELF header!"); return -ENOEXEC; } @@ -95,7 +95,7 @@ int elf_verifyheader(FAR const Elf32_Ehdr *ehdr) if (memcmp(ehdr->e_ident, g_elfmagic, EI_MAGIC_SIZE) != 0) { - bvdbg("Not ELF magic {%02x, %02x, %02x, %02x}\n", + binfo("Not ELF magic {%02x, %02x, %02x, %02x}\n", ehdr->e_ident[0], ehdr->e_ident[1], ehdr->e_ident[2], ehdr->e_ident[3]); return -ENOEXEC; } @@ -104,7 +104,7 @@ int elf_verifyheader(FAR const Elf32_Ehdr *ehdr) if (ehdr->e_type != ET_REL) { - bdbg("Not a relocatable file: e_type=%d\n", ehdr->e_type); + berr("Not a relocatable file: e_type=%d\n", ehdr->e_type); return -EINVAL; } @@ -112,7 +112,7 @@ int elf_verifyheader(FAR const Elf32_Ehdr *ehdr) if (up_checkarch(ehdr)) { - bdbg("Not a supported architecture\n"); + berr("Not a supported architecture\n"); return -ENOEXEC; } diff --git a/binfmt/libnxflat/Kconfig b/binfmt/libnxflat/Kconfig index 0a11f8c083bbe390e385fb28329d6e54acbe0b46..66c0031528e0192ca9e0bd9180210f8675e8c166 100644 --- a/binfmt/libnxflat/Kconfig +++ b/binfmt/libnxflat/Kconfig @@ -6,4 +6,4 @@ config NXFLAT_DUMPBUFFER bool "Dump NXFLAT buffers" default n - depends on DEBUG && DEBUG_VERBOSE + depends on DEBUG_INFO diff --git a/binfmt/libnxflat/libnxflat_addrenv.c b/binfmt/libnxflat/libnxflat_addrenv.c index 92840dc02d5369417db2e1dfb92be52089886637..9ca8add7cce40350736ecf9eb6236f283818ff3f 100644 --- a/binfmt/libnxflat/libnxflat_addrenv.c +++ b/binfmt/libnxflat/libnxflat_addrenv.c @@ -103,7 +103,7 @@ int nxflat_addrenv_alloc(FAR struct nxflat_loadinfo_s *loadinfo, size_t envsize) dspace = (FAR struct dspace_s *)kmm_malloc(sizeof(struct dspace_s)); if (dspace == 0) { - bdbg("ERROR: Failed to allocate DSpace\n"); + berr("ERROR: Failed to allocate DSpace\n"); return -ENOMEM; } @@ -124,7 +124,7 @@ int nxflat_addrenv_alloc(FAR struct nxflat_loadinfo_s *loadinfo, size_t envsize) ret = up_addrenv_create(0, envsize, heapsize, &loadinfo->addrenv); if (ret < 0) { - bdbg("ERROR: up_addrenv_create failed: %d\n", ret); + berr("ERROR: up_addrenv_create failed: %d\n", ret); goto errout_with_dspace; } @@ -137,7 +137,7 @@ int nxflat_addrenv_alloc(FAR struct nxflat_loadinfo_s *loadinfo, size_t envsize) ret = up_addrenv_vdata(&loadinfo->addrenv, 0, &vdata); if (ret < 0) { - bdbg("ERROR: up_addrenv_vdata failed: %d\n", ret); + berr("ERROR: up_addrenv_vdata failed: %d\n", ret); goto errout_with_addrenv; } @@ -148,7 +148,7 @@ int nxflat_addrenv_alloc(FAR struct nxflat_loadinfo_s *loadinfo, size_t envsize) ret = up_addrenv_select(loadinfo->addrenv, &oldenv); if (ret < 0) { - bdbg("ERROR: up_addrenv_select failed: %d\n", ret); + berr("ERROR: up_addrenv_select failed: %d\n", ret); goto errout_with_addrenv; } @@ -157,7 +157,7 @@ int nxflat_addrenv_alloc(FAR struct nxflat_loadinfo_s *loadinfo, size_t envsize) ret = up_addrenv_restore(oldenv); if (ret < 0) { - bdbg("ERROR: up_addrenv_restore failed: %d\n", ret); + berr("ERROR: up_addrenv_restore failed: %d\n", ret); goto errout_with_addrenv; } @@ -227,7 +227,7 @@ void nxflat_addrenv_free(FAR struct nxflat_loadinfo_s *loadinfo) ret = up_addrenv_destroy(loadinfo->addrenv); if (ret < 0) { - bdbg("ERROR: up_addrenv_destroy failed: %d\n", ret); + berr("ERROR: up_addrenv_destroy failed: %d\n", ret); } loadinfo->addrenv = 0; diff --git a/binfmt/libnxflat/libnxflat_bind.c b/binfmt/libnxflat/libnxflat_bind.c index 3c1709b2a5be2ee0bbb0a00debbf6fed82d3abaa..71c3b8d57d139f062db6062c2b780431dde3d84d 100644 --- a/binfmt/libnxflat/libnxflat_bind.c +++ b/binfmt/libnxflat/libnxflat_bind.c @@ -58,16 +58,16 @@ * Pre-processor Definitions ****************************************************************************/ -/* CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, and CONFIG_DEBUG_BINFMT have to be +/* CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_BINFMT have to be * defined or CONFIG_NXFLAT_DUMPBUFFER does nothing. */ -#if !defined(CONFIG_DEBUG_VERBOSE) || !defined (CONFIG_DEBUG_BINFMT) +#if !defined(CONFIG_DEBUG_INFO) || !defined (CONFIG_DEBUG_BINFMT) # undef CONFIG_NXFLAT_DUMPBUFFER #endif #ifdef CONFIG_NXFLAT_DUMPBUFFER -# define nxflat_dumpbuffer(m,b,n) bvdbgdumpbuffer(m,b,n) +# define nxflat_dumpbuffer(m,b,n) binfodumpbuffer(m,b,n) #else # define nxflat_dumpbuffer(m,b,n) #endif @@ -104,20 +104,20 @@ static inline int nxflat_bindrel32i(FAR struct nxflat_loadinfo_s *loadinfo, { FAR uint32_t *addr; - bvdbg("NXFLAT_RELOC_TYPE_REL32I Offset: %08x I-Space: %p\n", + binfo("NXFLAT_RELOC_TYPE_REL32I Offset: %08x I-Space: %p\n", offset, loadinfo->ispace + sizeof(struct nxflat_hdr_s)); if (offset < loadinfo->dsize) { addr = (FAR uint32_t *)(offset + loadinfo->dspace->region); - bvdbg(" Before: %08x\n", *addr); + binfo(" Before: %08x\n", *addr); *addr += (uint32_t)(loadinfo->ispace + sizeof(struct nxflat_hdr_s)); - bvdbg(" After: %08x\n", *addr); + binfo(" After: %08x\n", *addr); return OK; } else { - bdbg("Offset: %08 does not lie in D-Space size: %08x\n", + berr("Offset: %08 does not lie in D-Space size: %08x\n", offset, loadinfo->dsize); return -EINVAL; } @@ -143,20 +143,20 @@ static inline int nxflat_bindrel32d(FAR struct nxflat_loadinfo_s *loadinfo, { FAR uint32_t *addr; - bvdbg("NXFLAT_RELOC_TYPE_REL32D Offset: %08x D-Space: %p\n", + binfo("NXFLAT_RELOC_TYPE_REL32D Offset: %08x D-Space: %p\n", offset, loadinfo->dspace->region); if (offset < loadinfo->dsize) { addr = (FAR uint32_t *)(offset + loadinfo->dspace->region); - bvdbg(" Before: %08x\n", *addr); + binfo(" Before: %08x\n", *addr); *addr += (uint32_t)(loadinfo->dspace->region); - bvdbg(" After: %08x\n", *addr); + binfo(" After: %08x\n", *addr); return OK; } else { - bdbg("Offset: %08 does not lie in D-Space size: %08x\n", + berr("Offset: %08 does not lie in D-Space size: %08x\n", offset, loadinfo->dsize); return -EINVAL; } @@ -185,20 +185,20 @@ static inline int nxflat_bindrel32id(FAR struct nxflat_loadinfo_s *loadinfo, { FAR uint32_t *addr; - bvdbg("NXFLAT_RELOC_TYPE_REL32D Offset: %08x D-Space: %p\n", + binfo("NXFLAT_RELOC_TYPE_REL32D Offset: %08x D-Space: %p\n", offset, loadinfo->dspace->region); if (offset < loadinfo->dsize) { addr = (FAR uint32_t *)(offset + loadinfo->dspace->region); - bvdbg(" Before: %08x\n", *addr); + binfo(" Before: %08x\n", *addr); *addr += ((uint32_t)loadinfo->ispace - (uint32_t)(loadinfo->dspace->region)); - bvdbg(" After: %08x\n", *addr); + binfo(" After: %08x\n", *addr); return OK; } else { - bdbg("Offset: %08 does not lie in D-Space size: %08x\n", + berr("Offset: %08 does not lie in D-Space size: %08x\n", offset, loadinfo->dsize); return -EINVAL; } @@ -237,7 +237,7 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo) offset = ntohl(hdr->h_relocstart); nrelocs = ntohs(hdr->h_reloccount); - bvdbg("offset: %08lx nrelocs: %d\n", (long)offset, nrelocs); + binfo("offset: %08lx nrelocs: %d\n", (long)offset, nrelocs); /* The value of the relocation list that we get from the header is a * file offset. We will have to convert this to an offset into the @@ -251,7 +251,7 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo) relocs = (FAR struct nxflat_reloc_s *) (offset - loadinfo->isize + loadinfo->dspace->region); - bvdbg("isize: %08lx dpsace: %p relocs: %p\n", + binfo("isize: %08lx dpsace: %p relocs: %p\n", (long)loadinfo->isize, loadinfo->dspace->region, relocs); /* All relocations are performed within the D-Space allocation. If @@ -265,7 +265,7 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo) ret = nxflat_addrenv_select(loadinfo); if (ret < 0) { - bdbg("ERROR: nxflat_addrenv_select() failed: %d\n", ret); + berr("ERROR: nxflat_addrenv_select() failed: %d\n", ret); return ret; } #endif @@ -329,7 +329,7 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo) default: { - bdbg("ERROR: Unrecognized relocation type: %d\n", NXFLAT_RELOC_TYPE(reloc.r_info)); + berr("ERROR: Unrecognized relocation type: %d\n", NXFLAT_RELOC_TYPE(reloc.r_info)); result = -EINVAL; } break; @@ -359,7 +359,7 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo) ret = nxflat_addrenv_restore(loadinfo); if (ret < 0) { - bdbg("ERROR: nxflat_addrenv_restore() failed: %d\n", ret); + berr("ERROR: nxflat_addrenv_restore() failed: %d\n", ret); } #endif @@ -405,7 +405,7 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo, offset = ntohl(hdr->h_importsymbols); nimports = ntohs(hdr->h_importcount); - bvdbg("Imports offset: %08x nimports: %d\n", offset, nimports); + binfo("Imports offset: %08x nimports: %d\n", offset, nimports); /* The import[] table resides within the D-Space allocation. If * CONFIG_ARCH_ADDRENV=y, then that D-Space allocation lies in an address @@ -418,7 +418,7 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo, ret = nxflat_addrenv_select(loadinfo); if (ret < 0) { - bdbg("ERROR: nxflat_addrenv_select() failed: %d\n", ret); + berr("ERROR: nxflat_addrenv_select() failed: %d\n", ret); return ret; } #endif @@ -450,7 +450,7 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo, for (i = 0; i < nimports; i++) { - bvdbg("Import[%d] (%08p) offset: %08x func: %08x\n", + binfo("Import[%d] (%08p) offset: %08x func: %08x\n", i, &imports[i], imports[i].i_funcname, imports[i].i_funcaddress); /* Get a pointer to the imported symbol name. The name itself @@ -473,7 +473,7 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo, #endif if (!symbol) { - bdbg("Exported symbol \"%s\" not found\n", symname); + berr("Exported symbol \"%s\" not found\n", symname); #ifdef CONFIG_ARCH_ADDRENV (void)nxflat_addrenv_restore(loadinfo); #endif @@ -484,7 +484,7 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo, imports[i].i_funcaddress = (uint32_t)symbol->sym_value; - bvdbg("Bound import[%d] (%08p) to export '%s' (%08x)\n", + binfo("Bound import[%d] (%08p) to export '%s' (%08x)\n", i, &imports[i], symname, imports[i].i_funcaddress); } } @@ -504,7 +504,7 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo, ret = nxflat_addrenv_restore(loadinfo); if (ret < 0) { - bdbg("ERROR: nxflat_addrenv_restore() failed: %d\n", ret); + berr("ERROR: nxflat_addrenv_restore() failed: %d\n", ret); } return ret; @@ -542,7 +542,7 @@ static inline int nxflat_clearbss(FAR struct nxflat_loadinfo_s *loadinfo) ret = nxflat_addrenv_select(loadinfo); if (ret < 0) { - bdbg("ERROR: nxflat_addrenv_select() failed: %d\n", ret); + berr("ERROR: nxflat_addrenv_select() failed: %d\n", ret); return ret; } #endif @@ -558,7 +558,7 @@ static inline int nxflat_clearbss(FAR struct nxflat_loadinfo_s *loadinfo) ret = nxflat_addrenv_restore(loadinfo); if (ret < 0) { - bdbg("ERROR: nxflat_addrenv_restore() failed: %d\n", ret); + berr("ERROR: nxflat_addrenv_restore() failed: %d\n", ret); } return ret; diff --git a/binfmt/libnxflat/libnxflat_init.c b/binfmt/libnxflat/libnxflat_init.c index 52159c5f03199c9f29c4903c88cab884fb3c07df..eff6cd8b29dad8065a2e190cdb41b62edafd352f 100644 --- a/binfmt/libnxflat/libnxflat_init.c +++ b/binfmt/libnxflat/libnxflat_init.c @@ -54,16 +54,16 @@ * Pre-processor Definitions ****************************************************************************/ -/* CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, and CONFIG_DEBUG_BINFMT have to be +/* CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_BINFMT have to be * defined or CONFIG_NXFLAT_DUMPBUFFER does nothing. */ -#if !defined(CONFIG_DEBUG_VERBOSE) || !defined (CONFIG_DEBUG_BINFMT) +#if !defined(CONFIG_DEBUG_INFO) || !defined (CONFIG_DEBUG_BINFMT) # undef CONFIG_NXFLAT_DUMPBUFFER #endif #ifdef CONFIG_NXFLAT_DUMPBUFFER -# define nxflat_dumpbuffer(m,b,n) bvdbgdumpbuffer(m,b,n) +# define nxflat_dumpbuffer(m,b,n) binfodumpbuffer(m,b,n) #else # define nxflat_dumpbuffer(m,b,n) #endif @@ -100,7 +100,7 @@ int nxflat_init(const char *filename, struct nxflat_loadinfo_s *loadinfo) uint32_t bssend; int ret; - bvdbg("filename: %s loadinfo: %p\n", filename, loadinfo); + binfo("filename: %s loadinfo: %p\n", filename, loadinfo); /* Clear the load info structure */ @@ -112,7 +112,7 @@ int nxflat_init(const char *filename, struct nxflat_loadinfo_s *loadinfo) if (loadinfo->filfd < 0) { int errval = errno; - bdbg("Failed to open NXFLAT binary %s: %d\n", filename, errval); + berr("Failed to open NXFLAT binary %s: %d\n", filename, errval); return -errval; } @@ -122,7 +122,7 @@ int nxflat_init(const char *filename, struct nxflat_loadinfo_s *loadinfo) sizeof(struct nxflat_hdr_s), 0); if (ret < 0) { - bdbg("Failed to read NXFLAT header: %d\n", ret); + berr("Failed to read NXFLAT header: %d\n", ret); return ret; } @@ -140,7 +140,7 @@ int nxflat_init(const char *filename, struct nxflat_loadinfo_s *loadinfo) * done so. */ - bdbg("Bad NXFLAT header\n"); + berr("Bad NXFLAT header\n"); return -ENOEXEC; } diff --git a/binfmt/libnxflat/libnxflat_load.c b/binfmt/libnxflat/libnxflat_load.c index a3e49d3ce1d245f7397759dcc6bd548ff233cd9d..c849daf7de2e1e51203178df24f00e7a33b0efef 100644 --- a/binfmt/libnxflat/libnxflat_load.c +++ b/binfmt/libnxflat/libnxflat_load.c @@ -150,11 +150,11 @@ int nxflat_load(struct nxflat_loadinfo_s *loadinfo) MAP_SHARED | MAP_FILE, loadinfo->filfd, 0); if (loadinfo->ispace == (uint32_t)MAP_FAILED) { - bdbg("Failed to map NXFLAT ISpace: %d\n", errno); + berr("Failed to map NXFLAT ISpace: %d\n", errno); return -errno; } - bvdbg("Mapped ISpace (%d bytes) at %08x\n", loadinfo->isize, loadinfo->ispace); + binfo("Mapped ISpace (%d bytes) at %08x\n", loadinfo->isize, loadinfo->ispace); /* The following call allocate D-Space memory and will provide a pointer * to the allocated (but still uninitialized) D-Space memory. @@ -163,11 +163,11 @@ int nxflat_load(struct nxflat_loadinfo_s *loadinfo) ret = nxflat_addrenv_alloc(loadinfo, loadinfo->dsize); if (ret < 0) { - bdbg("ERROR: nxflat_addrenv_alloc() failed: %d\n", ret); + berr("ERROR: nxflat_addrenv_alloc() failed: %d\n", ret); return ret; } - bvdbg("Allocated DSpace (%d bytes) at %p\n", + binfo("Allocated DSpace (%d bytes) at %p\n", loadinfo->dsize, loadinfo->dspace->region); /* If CONFIG_ARCH_ADDRENV=y, then the D-Space allocation lies in an address @@ -180,7 +180,7 @@ int nxflat_load(struct nxflat_loadinfo_s *loadinfo) ret = nxflat_addrenv_select(loadinfo); if (ret < 0) { - bdbg("ERROR: nxflat_addrenv_select() failed: %d\n", ret); + berr("ERROR: nxflat_addrenv_select() failed: %d\n", ret); return ret; } #endif @@ -193,11 +193,11 @@ int nxflat_load(struct nxflat_loadinfo_s *loadinfo) dreadsize, doffset); if (ret < 0) { - bdbg("Failed to read .data section: %d\n", ret); + berr("Failed to read .data section: %d\n", ret); goto errout; } - bvdbg("TEXT: %08x Entry point offset: %08x Data offset: %08x\n", + binfo("TEXT: %08x Entry point offset: %08x Data offset: %08x\n", loadinfo->ispace, loadinfo->entryoffs, doffset); /* Restore the original address environment */ @@ -206,7 +206,7 @@ int nxflat_load(struct nxflat_loadinfo_s *loadinfo) ret = nxflat_addrenv_restore(loadinfo); if (ret < 0) { - bdbg("ERROR: nxflat_addrenv_restore() failed: %d\n", ret); + berr("ERROR: nxflat_addrenv_restore() failed: %d\n", ret); return ret; } #endif diff --git a/binfmt/libnxflat/libnxflat_read.c b/binfmt/libnxflat/libnxflat_read.c index 023b7c07e4f8d07c54f263d6891a98dd0506ce1f..678dd6d67182e48f89da296d4c98694073fd2e2a 100644 --- a/binfmt/libnxflat/libnxflat_read.c +++ b/binfmt/libnxflat/libnxflat_read.c @@ -114,7 +114,7 @@ int nxflat_read(struct nxflat_loadinfo_s *loadinfo, char *buffer, int readsize, int bytesleft; /* Number of bytes of .data left to read */ int bytesread; /* Total number of bytes read */ - bvdbg("Read %d bytes from offset %d\n", readsize, offset); + binfo("Read %d bytes from offset %d\n", readsize, offset); /* Seek to the position in the object file where the initialized * data is saved. @@ -129,7 +129,7 @@ int nxflat_read(struct nxflat_loadinfo_s *loadinfo, char *buffer, int readsize, if (rpos != offset) { int errval = errno; - bdbg("Failed to seek to position %d: %d\n", offset, errval); + berr("Failed to seek to position %d: %d\n", offset, errval); return -errval; } @@ -141,13 +141,13 @@ int nxflat_read(struct nxflat_loadinfo_s *loadinfo, char *buffer, int readsize, int errval = errno; if (errval != EINTR) { - bdbg("Read from offset %d failed: %d\n", offset, errval); + berr("Read from offset %d failed: %d\n", offset, errval); return -errval; } } else if (nbytes == 0) { - bdbg("Unexpected end of file\n"); + berr("Unexpected end of file\n"); return -ENODATA; } else diff --git a/binfmt/libnxflat/libnxflat_verify.c b/binfmt/libnxflat/libnxflat_verify.c index e645fdf925c9be4bea96b0afab2f736b32fac91a..76d8354edf429ababce4ac4fa0cdcb86fcdee8c7 100644 --- a/binfmt/libnxflat/libnxflat_verify.c +++ b/binfmt/libnxflat/libnxflat_verify.c @@ -79,7 +79,7 @@ int nxflat_verifyheader(const struct nxflat_hdr_s *header) { if (!header) { - bdbg("NULL NXFLAT header!"); + berr("NULL NXFLAT header!"); return -ENOEXEC; } @@ -91,7 +91,7 @@ int nxflat_verifyheader(const struct nxflat_hdr_s *header) if (strncmp(header->h_magic, NXFLAT_MAGIC, 4) != 0) { - bdbg("Unrecognized magic=\"%c%c%c%c\"\n", + berr("Unrecognized magic=\"%c%c%c%c\"\n", header->h_magic[0], header->h_magic[1], header->h_magic[2], header->h_magic[3]); return -ENOEXEC; diff --git a/binfmt/libpcode/Kconfig b/binfmt/libpcode/Kconfig index 92b09650ff20d84a61c04f4aeaea7a8719599113..046dc71c55bdc0d1c4e9527ebfda99eafb65a8e6 100644 --- a/binfmt/libpcode/Kconfig +++ b/binfmt/libpcode/Kconfig @@ -64,6 +64,6 @@ endif # PCODE_TEST_FS config PCODE_DUMPBUFFER bool "Dump P-code buffers" default n - depends on DEBUG && DEBUG_VERBOSE + depends on DEBUG_INFO ---help--- Dump various P-code buffers for debug purposes diff --git a/binfmt/libpcode/README.txt b/binfmt/libpcode/README.txt index d0bbb4ffc3c8c45f76bbec78ae16f17d28c35098..d6cb606af7777b5e31bb8c81ba91dcb06c891155 100644 --- a/binfmt/libpcode/README.txt +++ b/binfmt/libpcode/README.txt @@ -96,9 +96,9 @@ Here is a simple test configuration using the NuttX simulator: Debug options can also be enabled with: - CONFIG_DEBUG=y + CONFIG_DEBUG_FEATURES=y CONFIG_DEBUG_BINFMT=y - CONFIG_DEBUG_VERBOSE=y + CONFIG_DEBUG_INFO=y 4. In lieu of a a real test application, this Quick'n'Dirty patch can be used to initialize the P-Code binary format: diff --git a/binfmt/nxflat.c b/binfmt/nxflat.c index 1c4b454ff99a003142e619a39f82cac8ac8f6c8e..c2f1c06f78b0f0385f73ea9f33f2317d480ee4b7 100644 --- a/binfmt/nxflat.c +++ b/binfmt/nxflat.c @@ -56,16 +56,16 @@ * Pre-processor Definitions ****************************************************************************/ -/* CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, and CONFIG_DEBUG_BINFMT have to be +/* CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_BINFMT have to be * defined or CONFIG_NXFLAT_DUMPBUFFER does nothing. */ -#if !defined(CONFIG_DEBUG_VERBOSE) || !defined (CONFIG_DEBUG_BINFMT) +#if !defined(CONFIG_DEBUG_INFO) || !defined (CONFIG_DEBUG_BINFMT) # undef CONFIG_NXFLAT_DUMPBUFFER #endif #ifdef CONFIG_NXFLAT_DUMPBUFFER -# define nxflat_dumpbuffer(m,b,n) bvdbgdumpbuffer(m,b,n) +# define nxflat_dumpbuffer(m,b,n) binfodumpbuffer(m,b,n) #else # define nxflat_dumpbuffer(m,b,n) #endif @@ -79,7 +79,7 @@ ****************************************************************************/ static int nxflat_loadbinary(struct binary_s *binp); -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_BINFMT) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_BINFMT) static void nxflat_dumploadinfo(struct nxflat_loadinfo_s *loadinfo); #endif @@ -102,36 +102,36 @@ static struct binfmt_s g_nxflatbinfmt = * Name: nxflat_dumploadinfo ****************************************************************************/ -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_BINFMT) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_BINFMT) static void nxflat_dumploadinfo(struct nxflat_loadinfo_s *loadinfo) { unsigned long dsize = loadinfo->datasize + loadinfo->bsssize; - bdbg("LOAD_INFO:\n"); - bdbg(" ISPACE:\n"); - bdbg(" ispace: %08lx\n", loadinfo->ispace); - bdbg(" entryoffs: %08lx\n", loadinfo->entryoffs); - bdbg(" isize: %08lx\n", loadinfo->isize); + berr("LOAD_INFO:\n"); + berr(" ISPACE:\n"); + berr(" ispace: %08lx\n", loadinfo->ispace); + berr(" entryoffs: %08lx\n", loadinfo->entryoffs); + berr(" isize: %08lx\n", loadinfo->isize); - bdbg(" DSPACE:\n"); - bdbg(" dspace: %08lx\n", loadinfo->dspace); + berr(" DSPACE:\n"); + berr(" dspace: %08lx\n", loadinfo->dspace); if (loadinfo->dspace != NULL) { - bdbg(" crefs: %d\n", loadinfo->dspace->crefs); - bdbg(" region: %08lx\n", loadinfo->dspace->region); + berr(" crefs: %d\n", loadinfo->dspace->crefs); + berr(" region: %08lx\n", loadinfo->dspace->region); } - bdbg(" datasize: %08lx\n", loadinfo->datasize); - bdbg(" bsssize: %08lx\n", loadinfo->bsssize); - bdbg(" (pad): %08lx\n", loadinfo->dsize - dsize); - bdbg(" stacksize: %08lx\n", loadinfo->stacksize); - bdbg(" dsize: %08lx\n", loadinfo->dsize); - - bdbg(" RELOCS:\n"); - bdbg(" relocstart: %08lx\n", loadinfo->relocstart); - bdbg(" reloccount: %d\n", loadinfo->reloccount); - - bdbg(" HANDLES:\n"); - bdbg(" filfd: %d\n", loadinfo->filfd); + berr(" datasize: %08lx\n", loadinfo->datasize); + berr(" bsssize: %08lx\n", loadinfo->bsssize); + berr(" (pad): %08lx\n", loadinfo->dsize - dsize); + berr(" stacksize: %08lx\n", loadinfo->stacksize); + berr(" dsize: %08lx\n", loadinfo->dsize); + + berr(" RELOCS:\n"); + berr(" relocstart: %08lx\n", loadinfo->relocstart); + berr(" reloccount: %d\n", loadinfo->reloccount); + + berr(" HANDLES:\n"); + berr(" filfd: %d\n", loadinfo->filfd); } #else # define nxflat_dumploadinfo(i) @@ -151,7 +151,7 @@ static int nxflat_loadbinary(struct binary_s *binp) struct nxflat_loadinfo_s loadinfo; /* Contains globals for libnxflat */ int ret; - bvdbg("Loading file: %s\n", binp->filename); + binfo("Loading file: %s\n", binp->filename); /* Initialize the xflat library to load the program binary. */ @@ -159,7 +159,7 @@ static int nxflat_loadbinary(struct binary_s *binp) nxflat_dumploadinfo(&loadinfo); if (ret != 0) { - bdbg("Failed to initialize for load of NXFLAT program: %d\n", ret); + berr("Failed to initialize for load of NXFLAT program: %d\n", ret); goto errout; } @@ -169,7 +169,7 @@ static int nxflat_loadbinary(struct binary_s *binp) nxflat_dumploadinfo(&loadinfo); if (ret != 0) { - bdbg("Failed to load NXFLAT program binary: %d\n", ret); + berr("Failed to load NXFLAT program binary: %d\n", ret); goto errout_with_init; } @@ -178,7 +178,7 @@ static int nxflat_loadbinary(struct binary_s *binp) ret = nxflat_bind(&loadinfo, binp->exports, binp->nexports); if (ret != 0) { - bdbg("Failed to bind symbols program binary: %d\n", ret); + berr("Failed to bind symbols program binary: %d\n", ret); goto errout_with_load; } @@ -252,11 +252,11 @@ int nxflat_initialize(void) /* Register ourselves as a binfmt loader */ - bvdbg("Registering NXFLAT\n"); + binfo("Registering NXFLAT\n"); ret = register_binfmt(&g_nxflatbinfmt); if (ret != 0) { - bdbg("Failed to register binfmt: %d\n", ret); + berr("Failed to register binfmt: %d\n", ret); } return ret; } diff --git a/binfmt/pcode.c b/binfmt/pcode.c index 6023622440e0a23cf54000b6b38c068b89b4e8c8..8e52b75aab37d1f75a858116232a6a0cbb6b6db2 100644 --- a/binfmt/pcode.c +++ b/binfmt/pcode.c @@ -169,18 +169,18 @@ static int pcode_mount_testfs(void) /* Create a ROM disk for the ROMFS filesystem */ - bvdbg("Registering romdisk at /dev/ram%d\n", CONFIG_PCODE_TEST_DEVMINOR); + binfo("Registering romdisk at /dev/ram%d\n", CONFIG_PCODE_TEST_DEVMINOR); ret = romdisk_register(CONFIG_PCODE_TEST_DEVMINOR, (FAR uint8_t *)romfs_img, NSECTORS(ROMFS_IMG_LEN), SECTORSIZE); if (ret < 0) { - bdbg("ERROR: romdisk_register failed: %d\n", ret); + berr("ERROR: romdisk_register failed: %d\n", ret); return ret; } /* Mount the test file system */ - bvdbg("Mounting ROMFS filesystem at target=%s with source=%s\n", + binfo("Mounting ROMFS filesystem at target=%s with source=%s\n", CONFIG_PCODE_TEST_MOUNTPOINT, CONFIG_PCODE_TEST_DEVPATH); ret = mount(CONFIG_PCODE_TEST_DEVPATH, CONFIG_PCODE_TEST_MOUNTPOINT, @@ -190,7 +190,7 @@ static int pcode_mount_testfs(void) int errval = get_errno(); DEBUGASSERT(errval > 0); - bdbg("ERROR: mount(%s,%s,romfs) failed: %d\n", + berr("ERROR: mount(%s,%s,romfs) failed: %d\n", CONFIG_PCODE_TEST_DEVPATH, CONFIG_PCODE_TEST_MOUNTPOINT, errval); return -errval; } @@ -259,14 +259,14 @@ static int pcode_proxy(int argc, char **argv) sem_post(&g_pcode_handoff.exclsem); DEBUGASSERT(binp && fullpath); - bvdbg("Executing %s\n", fullpath); + binfo("Executing %s\n", fullpath); /* Set-up the on-exit handler that will unload the module on exit */ ret = on_exit(pcode_onexit, binp); if (ret < 0) { - bdbg("ERROR: on_exit failed: %d\n", get_errno()); + berr("ERROR: on_exit failed: %d\n", get_errno()); kmm_free(fullpath); return EXIT_FAILURE; } @@ -283,7 +283,7 @@ static int pcode_proxy(int argc, char **argv) if (ret < 0) { - bdbg("ERROR: Execution failed\n"); + berr("ERROR: Execution failed\n"); return EXIT_FAILURE; } @@ -310,7 +310,7 @@ static int pcode_load(struct binary_s *binp) int fd; int ret; - bvdbg("Loading file: %s\n", binp->filename); + binfo("Loading file: %s\n", binp->filename); /* Open the binary file for reading (only) */ @@ -318,7 +318,7 @@ static int pcode_load(struct binary_s *binp) if (fd < 0) { int errval = get_errno(); - bdbg("ERROR: Failed to open binary %s: %d\n", binp->filename, errval); + berr("ERROR: Failed to open binary %s: %d\n", binp->filename, errval); return -errval; } @@ -341,12 +341,12 @@ static int pcode_load(struct binary_s *binp) if (errval != EINTR) { - bdbg("ERROR: read failed: %d\n", errval); + berr("ERROR: read failed: %d\n", errval); ret = -errval; goto errout_with_fd; } - bdbg("Interrupted by a signal\n"); + berr("Interrupted by a signal\n"); } else { @@ -366,7 +366,7 @@ static int pcode_load(struct binary_s *binp) if (memcmp(&hdr.fh_ident, FHI_POFF_MAG, 4) != 0 || hdr.fh_type != FHT_EXEC) { - dbg("ERROR: File is not a P-code executable: %d\n"); + _err("ERROR: File is not a P-code executable: %d\n"); ret = -ENOEXEC; goto errout_with_fd; } @@ -399,7 +399,7 @@ static int pcode_load(struct binary_s *binp) g_pcode_handoff.fullpath = strdup(binp->filename); if (!g_pcode_handoff.fullpath) { - bdbg("ERROR: Failed to duplicate the full path: %d\n", + berr("ERROR: Failed to duplicate the full path: %d\n", binp->filename); sem_post(&g_pcode_handoff.exclsem); @@ -473,18 +473,18 @@ int pcode_initialize(void) ret = pcode_mount_testfs(); if (ret < 0) { - bdbg("ERROR: Failed to mount test file system: %d\n", ret); + berr("ERROR: Failed to mount test file system: %d\n", ret); return ret; } /* Register ourselves as a binfmt loader */ - bvdbg("Registering P-Code Loader\n"); + binfo("Registering P-Code Loader\n"); ret = register_binfmt(&g_pcode_binfmt); if (ret != 0) { - bdbg("Failed to register binfmt: %d\n", ret); + berr("Failed to register binfmt: %d\n", ret); } return ret; @@ -513,7 +513,7 @@ void pcode_uninitialize(void) int errval = get_errno(); DEBUGASSERT(errval > 0); - bdbg("ERROR: unregister_binfmt() failed: %d\n", errval); + berr("ERROR: unregister_binfmt() failed: %d\n", errval); UNUSED(errval); } @@ -524,7 +524,7 @@ void pcode_uninitialize(void) int errval = get_errno(); DEBUGASSERT(errval > 0); - bdbg("ERROR: umount(%s) failed: %d\n", CONFIG_PCODE_TEST_MOUNTPOINT, errval); + berr("ERROR: umount(%s) failed: %d\n", CONFIG_PCODE_TEST_MOUNTPOINT, errval); UNUSED(errval); } #endif diff --git a/configs/Kconfig b/configs/Kconfig index c8169d0086fc0173406ba56ebea0989cc40c25d0..c2efce0812812c382283d74946f54bbfd3353bcf 100644 --- a/configs/Kconfig +++ b/configs/Kconfig @@ -444,6 +444,12 @@ config ARCH_BOARD_MIRTOO This is the port to the DTX1-4000L "Mirtoo" module. This module uses MicroChip PIC32MX250F128D. See http://www.dimitech.com/ for further information. +config ARCH_BOARD_MOXA + bool "Moxa board" + depends on ARCH_CHIP_MOXART + ---help--- + Moxa + config ARCH_BOARD_NUTINY_NUC120 bool "Nuvoton NuTiny NUC120" depends on ARCH_CHIP_NUC120LE3AN @@ -649,14 +655,27 @@ config ARCH_BOARD_PIRELLI_DPL10 config ARCH_BOARD_NUCLEO_144 bool "STMicro NUCLEO-144" - depends on ARCH_CHIP_STM32F746 + depends on ARCH_CHIP_STM32F746ZG || ARCH_CHIP_STM32F767ZI select ARCH_HAVE_LEDS select ARCH_HAVE_BUTTONS select ARCH_HAVE_IRQBUTTONS ---help--- - STMicro Nucleo-144 development board featuring the STM32F746ZGT6U - MCU. The STM32F746ZGT6U is a 216MHz Cortex-M7 operation with 1024Kb Flash - memory and 300Kb SRAM. + STMicro Nucleo-144 development board featuring STMicroelectronics + F2, F3, F4 and F7 MCU families. The board is a "Hardware pattern" + that can be populated with the 144 pin package of the following MCUs: + + Target STM32 Order code + STM32F207ZGT6 NUCLEO-F207ZG + STM32F303ZET6 NUCLEO-F303ZE + STM32F429ZIT6 NUCLEO-F429ZI + STM32F446ZET6 NUCLEO-F446ZE + + Supported in this release are: + + NUCLEO-F746ZG - STM32F746ZGT6 a 216MHz Cortex-M7, w/FPU - 1024KiB + Flash memory and 320KiB SRAM. + NUCLEO-F767ZI - STM32F767ZIT6 a 216MHz Cortex-M7, w/DPFPU - + 2048KiB Flash memory and 512KiB SRAM. config ARCH_BOARD_NUCLEO_F303RE bool "STM32F303 Nucleo F303RE" @@ -984,7 +1003,7 @@ config ARCH_BOARD_STM32F429I_DISCO config ARCH_BOARD_STM32F746G_DISCO bool "STMicro STM32F746G-Discovery board" - depends on ARCH_CHIP_STM32F746 + depends on ARCH_CHIP_STM32F746NG select ARCH_HAVE_LEDS select ARCH_HAVE_BUTTONS select ARCH_HAVE_IRQBUTTONS @@ -993,8 +1012,14 @@ config ARCH_BOARD_STM32F746G_DISCO MCU. The STM32F746NGH6 is a 216MHz Cortex-M7 operation with 1024Kb Flash memory and 320Kb SRAM. +config ARCH_BOARD_STM32F746_WS + bool "Waveshare STM32F746 board" + depends on ARCH_CHIP_STM32F746IG + ---help--- + Waveshare STM32F746 development board featuring the STM32F746IG MCU. + config ARCH_BOARD_STM32L476VG_DISCO - bool "STMicro STM32F746VG-Discovery board" + bool "STMicro STM32L476VG -Discovery board" depends on ARCH_CHIP_STM32L476RG select ARCH_HAVE_LEDS select ARCH_HAVE_BUTTONS @@ -1238,26 +1263,27 @@ config ARCH_BOARD_CUSTOM Don't see the board you want? You must first select the exact MCU part number, then the boards supporting that part will be available for selection. -config ARCH_BOARD_MOXA - bool "Moxa board" - depends on ARCH_CHIP_MOXART - ---help--- - Moxa - endchoice +if !ARCH_BOARD_CUSTOM + +config ARCH_BOARD_CUSTOM_DIR + string + default "configs/dummy" + +config ARCH_BOARD_CUSTOM_DIR_RELPATH + bool + default y + +endif # !ARCH_BOARD_CUSTOM + if ARCH_BOARD_CUSTOM -menu "Custom Board Configuration" -config ARCH_BOARD_CUSTOM_NAME - string "Custom board name" - default "" - ---help--- - This is a name for the board. It is not used except to return the - information via the NSH uname command. +menu "Custom Board Configuration" config ARCH_BOARD_CUSTOM_DIR string "Custom board directory" + default "configs/dummy" ---help--- If the custom board configuration is selected, then it is necessary to also tell the build system where it can find the board directory @@ -1270,33 +1296,15 @@ config ARCH_BOARD_CUSTOM_DIR config ARCH_BOARD_CUSTOM_DIR_RELPATH bool "Relative custom board directory" + default y ---help--- Specifies that the board directory is relative to the NuttX directory. -config BOARD_CRASHDUMP - bool "Enable Board level logging of crash dumps" - default n - ---help--- - If selected up_asseert will call out to board_crashdump, in the case - of an assertion failure, prior to calling exit. Or in the - case of a hardfault prior to looping indefinitely. board_crashdump - then has a chance to save the state of the machine. - - The purpose of board_crashdump is to save as much information as it can - about the cause of the fault and then most likely reset the system. - - N.B. There is limited system resources that can be used, who knows - what memory is trashed? So all we can expect to do is save the - "machine state" in a place where on the next reset can write it - to more sophisticated storage in a sane operating environment. - -config BOARD_RESET_ON_CRASH - bool "Eanble Board Reset after the crashdump is saved" - default n - depends on BOARD_CRASHDUMP +config ARCH_BOARD_CUSTOM_NAME + string "Custom board name" ---help--- - If selected the board_crashdump should reset the machine after - saveing the state of the machine + This is a name for the board. It is not used except to return the + information via the NSH uname command. config BOARD_CUSTOM_LEDS bool "Custom board LEDs" @@ -1425,6 +1433,7 @@ config ARCH_BOARD 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 "stm32f746-ws" if ARCH_BOARD_STM32F746_WS default "stm32l476vg-disco" if ARCH_BOARD_STM32L476VG_DISCO default "stm32ldiscovery" if ARCH_BOARD_STM32L_DISCOVERY default "stm32vldiscovery" if ARCH_BOARD_STM32VL_DISCOVERY @@ -1483,34 +1492,9 @@ config ARCH_IRQBUTTONS ---help--- "Support interrupts on button presses and releases." -config NSH_MMCSDMINOR - int "MMC/SD minor number" - default 0 - depends on NSH_LIBRARY && MMCSD - ---help--- - If board-specific NSH start-up logic needs to mount an MMC/SD device, then the - setting should be provided to identify the MMC/SD minor device number (i.e., the N ini - /dev/mmcsdN). Default 0 - -config NSH_MMCSDSLOTNO - int "MMC/SD slot number" - default 0 - depends on NSH_LIBRARY && MMCSD - ---help--- - If board-specific NSH start-up supports more than one MMC/SD slot, then this setting - should be provided to indicate which slot should be used. Default: 0. - -config NSH_MMCSDSPIPORTNO - int "MMC/SD SPI device number" - default 0 - depends on NSH_LIBRARY && MMCSD && MMCSD_SPI - ---help--- - If board-specif NSH start-up logic will mount an SPI-based MMC/SD volume, then this - setting may be needed to tell the board logic which SPI bus to use. Default: 0 - (meaning is board-specific). - comment "Board-Specific Options" + if ARCH_BOARD_AMBER source "configs/amber/Kconfig" endif @@ -1637,6 +1621,9 @@ endif if ARCH_BOARD_MOTEINO_MEGA source "configs/moteino-mega/Kconfig" endif +if ARCH_BOARD_MOXA +source "configs/moxa/Kconfig" +endif if ARCH_BOARD_MX1ADS source "configs/mx1ads/Kconfig" endif @@ -1799,6 +1786,9 @@ endif if ARCH_BOARD_STM32F746G_DISCO source "configs/stm32f746g-disco/Kconfig" endif +if ARCH_BOARD_STM32F746_WS +source "configs/stm32f746-ws/Kconfig" +endif if ARCH_BOARD_STM32L476VG_DISCO source "configs/stm32l476vg-disco/Kconfig" endif @@ -1868,10 +1858,35 @@ endif if ARCH_BOARD_SIM source "configs/sim/Kconfig" endif -if ARCH_BOARD_MOXA -source "configs/moxa/Kconfig" +if ARCH_BOARD_CUSTOM +source "$ARCH_BOARD_CUSTOM_DIR/Kconfig" endif +config BOARD_CRASHDUMP + bool "Enable Board level logging of crash dumps" + default n + ---help--- + If selected up_assert will call out to board_crashdump, in the case + of an assertion failure, prior to calling exit. Or in the + case of a hardfault prior to looping indefinitely. board_crashdump + then has a chance to save the state of the machine. + + The purpose of board_crashdump is to save as much information as it can + about the cause of the fault and then most likely reset the system. + + N.B. There is limited system resources that can be used, who knows + what memory is trashed? So all we can expect to do is save the + "machine state" in a place where on the next reset can write it + to more sophisticated storage in a sane operating environment. + +config BOARD_RESET_ON_CRASH + bool "Enable Board Reset after the crashdump is saved" + default n + depends on BOARD_CRASHDUMP + ---help--- + If selected the board_crashdump should reset the machine after + saveing the state of the machine + config LIB_BOARDCTL bool "Enable boardctl() interface" default n diff --git a/configs/README.txt b/configs/README.txt index 9b1c8486bac2551d012ec604212528d34a1725d1..2e4c4aad9582d43d7eb9ec19c6383e5e67c15e81 100644 --- a/configs/README.txt +++ b/configs/README.txt @@ -123,7 +123,7 @@ Make.defs -- This makefile fragment provides architecture and Definitions in the Make.defs file probably depend on some of the settings in the .config file. For example, the CFLAGS will most likely be - different if CONFIG_DEBUG=y. + different if CONFIG_DEBUG_FEATURES=y. The included tools/Config.mk file contains additional definitions that may be overriden in the architecture-specific Make.defs file as necessary: @@ -393,9 +393,12 @@ configs/ntosd-dm320 NuttX 0.2.1 release. configs/nucleo-144 - STMicro Nucleo-144 development board featuring the STM32F746ZGT6U MCU. The - STM32F746ZGT6U is a 216MHz Cortex-M7 operation with 1024Kb Flash memory - and 300Kb SRAM. + STMicro Nucleo-144 development board family. Included support for (1) the + Nucleo-F767ZG board featuring the STM32F746ZGT6U MCU. The STM32F746ZGT6U + is a 216MHz Cortex-M7 operation with 1024Kb Flash memory and 320Kb SRAM. + And (2) the Nucleo-F746ZG board featuring the STM32F767ZIT6 MCU. The + STM32F767ZIT6 is a 216MHz Cortex-M7 operation with 2048Kb Flash memory + and 512Kb SRAM. configs/nucleo-f4x1re STMicro ST Nucleo F401RE and F411RE boards. See @@ -655,6 +658,9 @@ configs/stm32f746g-disco MCU. The STM32F746NGH6 is a 216MHz Cortex-M7 operation with 1024Kb Flash memory and 300Kb SRAM. +configs/stm32f746g-ws + Waveshare STM32F746 development board featuring the STM32F746IG MCU. + configs/stm32l476vg-disco STMicro STM32L476VG_DISCO development board featuring the STM32L476VG MCU. The STM32L476VG is a Cortex-M4 optimised for low-power operation diff --git a/configs/amber/hello/defconfig b/configs/amber/hello/defconfig index 5c62c54f88638c70fe654a76da06daaaf6d0557d..506a83f03ecbf10d8f871b1b7f12b59935e9e660 100644 --- a/configs/amber/hello/defconfig +++ b/configs/amber/hello/defconfig @@ -42,7 +42,7 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set @@ -298,7 +298,6 @@ CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/arduino-due/README.txt b/configs/arduino-due/README.txt index e128fb71d6833652935a4dd83be9f934d7e0d9d0..e886b558898a263a2933fc5fd5ec4d8a49a6ff23 100644 --- a/configs/arduino-due/README.txt +++ b/configs/arduino-due/README.txt @@ -1072,8 +1072,8 @@ Configuration sub-directories debug output on USART0 can be enabled with: Build Setup: - CONFIG_DEBUG=y : Enable debug features - CONFIG_DEBUG_VERBOSE=y : Enable verbose debug output + CONFIG_DEBUG_FEATURES=y : Enable debug features + CONFIG_DEBUG_INFO=y : Enable verbose debug output CONFIG_DEBUG_INPUT=y : Enable debug output from input devices STATUS: diff --git a/configs/arduino-due/nsh/defconfig b/configs/arduino-due/nsh/defconfig index 51cf6e0923d956b47d0dbc93a61596e61c89a1f8..eb780c055653f1500bdfd0a9989af08638066973 100644 --- a/configs/arduino-due/nsh/defconfig +++ b/configs/arduino-due/nsh/defconfig @@ -42,10 +42,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -76,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 @@ -94,6 +96,7 @@ CONFIG_ARCH_CHIP_SAM34=y # 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 @@ -115,12 +118,15 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="sam34" +# 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 @@ -131,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 @@ -473,7 +480,12 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -481,6 +493,7 @@ CONFIG_DEV_NULL=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -492,6 +505,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -515,10 +530,6 @@ CONFIG_UART0_SERIALDRIVER=y # 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 @@ -545,15 +556,18 @@ CONFIG_UART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -585,12 +599,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -653,11 +661,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -700,10 +711,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -713,17 +724,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -731,17 +742,16 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -763,8 +773,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -775,6 +785,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 @@ -886,12 +897,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -899,6 +910,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/arduino-due/src/sam_autoleds.c b/configs/arduino-due/src/sam_autoleds.c index 8921c2d04c5034f3354340e40f3d028ac88ce400..f3fcdbdca97fd1658e8fa39450e3bfb4771d1f47 100644 --- a/configs/arduino-due/src/sam_autoleds.c +++ b/configs/arduino-due/src/sam_autoleds.c @@ -95,26 +95,6 @@ * at approximately 2Hz, then a fatal error has been detected and the system */ -/* 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/arduino-due/src/sam_mmcsd.c b/configs/arduino-due/src/sam_mmcsd.c index 23787dd7dd146bc2942264a4eb81d6175167480c..b7556ea082fd422de719d79b0b1b83ac65b25428 100644 --- a/configs/arduino-due/src/sam_mmcsd.c +++ b/configs/arduino-due/src/sam_mmcsd.c @@ -254,31 +254,31 @@ int sam_sdinitialize(int minor) /* Get the SPI driver instance for the SD chip select */ - fvdbg("Initializing bit bang SPI for the MMC/SD slot\n"); + finfo("Initializing bit bang SPI for the MMC/SD slot\n"); spi = sam_mmcsd_spiinitialize(); if (!spi) { - fdbg("Failed to bit bang SPI for the MMC/SD slot\n"); + ferr("ERROR: Failed to bit bang SPI for the MMC/SD slot\n"); return -ENODEV; } - fvdbg("Successfully initialized bit bang SPI for the MMC/SD slot\n"); + finfo("Successfully initialized bit bang SPI for the MMC/SD slot\n"); /* Bind the SPI device for the chip select to the slot */ - fvdbg("Binding bit bang SPI device to MMC/SD slot %d\n", + finfo("Binding bit bang SPI device to MMC/SD slot %d\n", SAM34_MMCSDSLOTNO); ret = mmcsd_spislotinitialize(minor, SAM34_MMCSDSLOTNO, spi); if (ret < 0) { - fdbg("Failed to bind bit bang SPI device to MMC/SD slot %d: %d\n", + ferr("ERROR: Failed to bind bit bang SPI device to MMC/SD slot %d: %d\n", SAM34_MMCSDSLOTNO, ret); return ret; } - fvdbg("Successfuly bound bit bang SPI device to MMC/SD slot %d\n", + finfo("Successfuly bound bit bang SPI device to MMC/SD slot %d\n", SAM34_MMCSDSLOTNO); return OK; diff --git a/configs/arduino-due/src/sam_touchscreen.c b/configs/arduino-due/src/sam_touchscreen.c index d2a2c408ff0bccf9ae1af08f9351826f03a2b25f..d16184a6cd0bf6dcaecd82865bf90168062f9762 100644 --- a/configs/arduino-due/src/sam_touchscreen.c +++ b/configs/arduino-due/src/sam_touchscreen.c @@ -266,7 +266,7 @@ static int tsc_attach(FAR struct ads7843e_config_s *state, xcpt_t isr) { /* Attach the XPT2046 interrupt */ - ivdbg("Attaching %p to IRQ %d\n", isr, SAM_TSC_IRQ); + iinfo("Attaching %p to IRQ %d\n", isr, SAM_TSC_IRQ); return irq_attach(SAM_TSC_IRQ, isr); } @@ -274,7 +274,7 @@ static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable) { /* Attach and enable, or detach and disable */ - ivdbg("IRQ:%d enable:%d\n", SAM_TSC_IRQ, enable); + iinfo("IRQ:%d enable:%d\n", SAM_TSC_IRQ, enable); if (enable) { sam_gpioirqenable(SAM_TSC_IRQ); @@ -300,7 +300,7 @@ static bool tsc_pendown(FAR struct ads7843e_config_s *state) /* The /PENIRQ value is active low */ bool pendown = !sam_gpioread(GPIO_TSC_IRQ); - ivdbg("pendown:%d\n", pendown); + iinfo("pendown:%d\n", pendown); return pendown; } @@ -359,7 +359,7 @@ int board_tsc_setup(int minor) static bool initialized = false; int ret; - idbg("minor %d\n", minor); + iinfo("minor %d\n", minor); DEBUGASSERT(minor == 0); /* Have we already initialized? Since we never uninitialize we must prevent @@ -383,7 +383,7 @@ int board_tsc_setup(int minor) dev = sam_tsc_spiinitialize(); if (!dev) { - idbg("Failed to initialize bit bang SPI\n"); + ierr("ERROR: Failed to initialize bit bang SPI\n"); return -ENODEV; } @@ -392,7 +392,7 @@ int board_tsc_setup(int minor) ret = ads7843e_register(dev, &g_tscinfo, CONFIG_ADS7843E_DEVMINOR); if (ret < 0) { - idbg("Failed to register touchscreen device\n"); + ierr("ERROR: Failed to register touchscreen device\n"); /* up_spiuninitialize(dev); */ return -ENODEV; } diff --git a/configs/arduino-due/src/sam_userleds.c b/configs/arduino-due/src/sam_userleds.c index b461812e50e698c5ca672a2f46cf5d5c41e1f7e7..2d86511b7855a44d27ba4fa75f726d080b314ab9 100644 --- a/configs/arduino-due/src/sam_userleds.c +++ b/configs/arduino-due/src/sam_userleds.c @@ -51,38 +51,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Function Protototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/arduino-mega2560/hello/defconfig b/configs/arduino-mega2560/hello/defconfig index 4459053ee1b4d3a0f4c0f572801cc74a4d8e5bba..fe1eb43cfc05fa15825eb9bd3b67d025ef5a2b72 100644 --- a/configs/arduino-mega2560/hello/defconfig +++ b/configs/arduino-mega2560/hello/defconfig @@ -45,7 +45,7 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set @@ -360,7 +360,7 @@ CONFIG_USART0_2STOP=0 # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -393,7 +393,6 @@ CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/arduino-mega2560/nsh/defconfig b/configs/arduino-mega2560/nsh/defconfig index 9aee289d6d74ebb06b9e0d0423cb32a9211599ae..5c561848996a8a1fa14c649dcfbaf6cab8e9daf8 100644 --- a/configs/arduino-mega2560/nsh/defconfig +++ b/configs/arduino-mega2560/nsh/defconfig @@ -46,7 +46,7 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set @@ -369,7 +369,7 @@ CONFIG_USART0_2STOP=0 # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -402,7 +402,6 @@ CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/avr32dev1/nsh/defconfig b/configs/avr32dev1/nsh/defconfig index 0f87f20046180b408e1c452b5729e31394177f7c..2b4bbaf59fa2921046afcf587eeb7ec835da14a0 100644 --- a/configs/avr32dev1/nsh/defconfig +++ b/configs/avr32dev1/nsh/defconfig @@ -42,7 +42,7 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set @@ -345,7 +345,6 @@ CONFIG_FS_FAT=y # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/avr32dev1/ostest/defconfig b/configs/avr32dev1/ostest/defconfig index 6fc2eed59f499df469eb1dbcf28b7e6ca928afce..0576325bf00c86c205b9b015a3f21a548a422650 100644 --- a/configs/avr32dev1/ostest/defconfig +++ b/configs/avr32dev1/ostest/defconfig @@ -42,7 +42,7 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set @@ -335,7 +335,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/c5471evm/httpd/Make.defs b/configs/c5471evm/httpd/Make.defs index 9f465df52ca0c4fd8fb0bde972a07fb91639b7cd..aa491bb2bc750e87155b94edc1b1c32e19c192d8 100644 --- a/configs/c5471evm/httpd/Make.defs +++ b/configs/c5471evm/httpd/Make.defs @@ -71,7 +71,7 @@ ifneq ($(HOSTOS),Cygwin) endif endif -ifeq ("${CONFIG_DEBUG}","y") +ifeq ("${CONFIG_DEBUG_FEATURES}","y") ARCHOPTIMIZATION = -g endif @@ -115,7 +115,7 @@ EXEEXT = ifneq ($(CROSSDEV),arm-nuttx-elf-) LDFLAGS += -nostartfiles -nodefaultlibs endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) LDFLAGS += -g endif diff --git a/configs/c5471evm/httpd/defconfig b/configs/c5471evm/httpd/defconfig index 895892b246254a3827f67f510eda2c4d4179a0a3..8407b01b8a661870b1cdfe352d3508b92fe8f8bb 100644 --- a/configs/c5471evm/httpd/defconfig +++ b/configs/c5471evm/httpd/defconfig @@ -37,12 +37,15 @@ CONFIG_RRLOAD_BINARY=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 # -# CONFIG_DEBUG is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y @@ -74,10 +77,12 @@ CONFIG_ARCH_CHIP_C5471=y # 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 @@ -86,20 +91,39 @@ CONFIG_ARCH_CHIP_C5471=y # 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=y # 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 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="arm" CONFIG_ARCH_CHIP="c5471" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y # CONFIG_ARCH_LOWVECTORS is not set @@ -153,11 +177,14 @@ CONFIG_C5471_AUTONEGOTIATION=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set # CONFIG_ARCH_IDLE_CUSTOM is not set @@ -209,6 +236,7 @@ CONFIG_ARCH_LEDS=y # # Board-Specific Options # +# CONFIG_LIB_BOARDCTL is not set # # RTOS Features @@ -243,6 +271,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="webserver_main" CONFIG_RR_INTERVAL=200 +# CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=0 CONFIG_MAX_TASKS=64 # CONFIG_SCHED_HAVE_PARENT is not set @@ -287,9 +316,10 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGCONDTIMEDOUT=16 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # CONFIG_SCHED_WORKQUEUE is not set # CONFIG_SCHED_HPWORK is not set @@ -320,22 +350,42 @@ CONFIG_DEV_NULL=y # 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=y CONFIG_WATCHDOG_DEVPATH="/dev/watchdog0" -# CONFIG_TIMER 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -347,6 +397,8 @@ CONFIG_WATCHDOG_DEVPATH="/dev/watchdog0" # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -370,14 +422,11 @@ CONFIG_SERIAL=y # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set CONFIG_OTHER_UART_SERIALDRIVER=y - -# -# USART Configuration -# CONFIG_MCU_SERIAL=y # CONFIG_STANDARD_SERIAL is not set # 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_OTHER_SERIAL_CONSOLE=y # CONFIG_NO_SERIAL_CONSOLE is not set @@ -385,14 +434,18 @@ CONFIG_OTHER_SERIAL_CONSOLE=y # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -406,7 +459,6 @@ CONFIG_NET=y # # Driver buffer configuration # -CONFIG_NET_IPv4=y # CONFIG_NET_MULTIBUFFER is not set CONFIG_NET_ETH_MTU=590 CONFIG_NET_ETH_TCP_RECVWNDO=536 @@ -417,6 +469,19 @@ CONFIG_NET_GUARDSIZE=2 # # CONFIG_NET_MULTILINK is not set CONFIG_NET_ETHERNET=y +# CONFIG_NET_LOOPBACK is not set +# CONFIG_NET_TUN is not set + +# +# Network Device Operations +# +# CONFIG_NETDEV_PHY_IOCTL is not set + +# +# Internet Protocol Selection +# +CONFIG_NET_IPv4=y +# CONFIG_NET_IPv6 is not set # # Socket Support @@ -427,14 +492,14 @@ CONFIG_NET_SOCKOPTS=y # CONFIG_NET_SOLINGER is not set # -# Network Device Operations +# Raw Socket Support # -# CONFIG_NETDEV_PHY_IOCTL is not set +# CONFIG_NET_PKT is not set # -# Raw Socket Support +# Unix Domain Socket Support # -# CONFIG_NET_PKT is not set +# CONFIG_NET_LOCAL is not set # # TCP/IP Networking @@ -490,6 +555,7 @@ CONFIG_IOB_NCHAINS=8 # Routing Table Configuration # # CONFIG_NET_ROUTE is not set +CONFIG_NET_HOSTNAME="" # # Crypto API @@ -510,12 +576,7 @@ CONFIG_DISABLE_MOUNTPOINT=y # CONFIG_FS_NAMED_SEMAPHORES is not set # CONFIG_FS_RAMMAP is not set # CONFIG_FS_PROCFS is not set - -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -535,6 +596,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -571,13 +636,18 @@ CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 # CONFIG_LIBC_STRERROR is not set # CONFIG_LIBC_PERROR_STDOUT is not set CONFIG_ARCH_LOWPUTC=y +# 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_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -592,14 +662,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -607,11 +676,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -620,42 +689,50 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_NSH is not set # 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 # 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 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_UDP is not set +# CONFIG_EXAMPLES_USBTERM is not set +# CONFIG_EXAMPLES_WATCHDOG is not set CONFIG_EXAMPLES_WEBSERVER=y CONFIG_EXAMPLES_WEBSERVER_IPADDR=0x0a000002 CONFIG_EXAMPLES_WEBSERVER_DRIPADDR=0x0a000001 CONFIG_EXAMPLES_WEBSERVER_NETMASK=0xffffff00 CONFIG_EXAMPLES_WEBSERVER_NOMAC=y -# CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBTERM is not set -# CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WGET is not set +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + # # Graphics Support # @@ -666,25 +743,24 @@ CONFIG_EXAMPLES_WEBSERVER_NOMAC=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_MICROPYTHON is not set # CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # # 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 +CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set -# CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set CONFIG_NETUTILS_WEBSERVER=y # CONFIG_NETUTILS_HTTPD_SINGLECONNECT is not set @@ -700,11 +776,6 @@ CONFIG_NETUTILS_HTTPD_CLASSIC=y CONFIG_NETUTILS_HTTPD_KEEPALIVE_DISABLE=y # CONFIG_NETUTILS_XMLRPC is not set -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # @@ -722,115 +793,16 @@ CONFIG_NETUTILS_HTTPD_KEEPALIVE_DISABLE=y # # System Libraries and NSH Add-Ons # - -# -# Custom Free Memory Command -# -# CONFIG_SYSTEM_FREE is not set - -# -# EMACS-like Command Line Editor -# # CONFIG_SYSTEM_CLE is not set - -# -# CU Minimal Terminal -# # CONFIG_SYSTEM_CUTERM is not set - -# -# FLASH Program Installation -# -# CONFIG_SYSTEM_INSTALL is not set - -# -# FLASH Erase-all Command -# - -# -# Intel HEX to binary conversion -# +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set - -# -# I2C tool -# - -# -# INI File Parser -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# NxPlayer media player library / command Line -# - -# -# RAM test -# +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set - -# -# readline() -# +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set - -# -# P-Code Support -# - -# -# PHY Tool -# - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sudoku -# # CONFIG_SYSTEM_SUDOKU is not set - -# -# Sysinfo -# - -# -# VI Work-Alike Editor -# +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set - -# -# Stack Monitor -# - -# -# USB CDC/ACM Device Commands -# - -# -# USB Composite Device Commands -# - -# -# USB Mass Storage Device Commands -# - -# -# USB Monitor -# - -# -# Zmodem Commands -# # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/c5471evm/nettest/Make.defs b/configs/c5471evm/nettest/Make.defs index 909f21b08309edf54cb33c3c53e43bcf602f2731..0cd136c400e3c36bcd975dd59e5007128b134077 100644 --- a/configs/c5471evm/nettest/Make.defs +++ b/configs/c5471evm/nettest/Make.defs @@ -71,7 +71,7 @@ ifneq ($(HOSTOS),Cygwin) endif endif -ifeq ("${CONFIG_DEBUG}","y") +ifeq ("${CONFIG_DEBUG_FEATURES}","y") ARCHOPTIMIZATION = -g endif @@ -115,7 +115,7 @@ EXEEXT = ifneq ($(CROSSDEV),arm-nuttx-elf-) LDFLAGS += -nostartfiles -nodefaultlibs endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) LDFLAGS += -g endif diff --git a/configs/c5471evm/nettest/defconfig b/configs/c5471evm/nettest/defconfig index 006c9b09b0e89ddf7920e41b39da206af722fdb8..386d69a57db8447488d1ad113d2c21b736673ef5 100644 --- a/configs/c5471evm/nettest/defconfig +++ b/configs/c5471evm/nettest/defconfig @@ -37,14 +37,16 @@ CONFIG_RRLOAD_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,6 +77,7 @@ CONFIG_ARCH_CHIP_C5471=y # 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 @@ -93,7 +96,9 @@ CONFIG_ARCH_CHIP_C5471=y # 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=y # CONFIG_ARCH_ARM926EJS is not set @@ -104,10 +109,21 @@ CONFIG_ARCH_ARM7TDMI=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="arm" CONFIG_ARCH_CHIP="c5471" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y # CONFIG_ARCH_LOWVECTORS is not set @@ -161,6 +177,7 @@ CONFIG_C5471_AUTONEGOTIATION=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # CONFIG_ARCH_HAVE_MPU is not set @@ -292,9 +309,10 @@ CONFIG_NAME_MAX=32 CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # CONFIG_SCHED_WORKQUEUE is not set # CONFIG_SCHED_HPWORK is not set @@ -325,6 +343,7 @@ CONFIG_DEV_NULL=y # 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 @@ -344,8 +363,22 @@ CONFIG_WATCHDOG_DEVPATH="/dev/watchdog0" # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -357,6 +390,8 @@ CONFIG_WATCHDOG_DEVPATH="/dev/watchdog0" # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -380,14 +415,11 @@ CONFIG_SERIAL=y # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set CONFIG_OTHER_UART_SERIALDRIVER=y - -# -# USART Configuration -# CONFIG_MCU_SERIAL=y # CONFIG_STANDARD_SERIAL is not set # 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_OTHER_SERIAL_CONSOLE=y # CONFIG_NO_SERIAL_CONSOLE is not set @@ -395,15 +427,18 @@ CONFIG_OTHER_SERIAL_CONSOLE=y # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -536,12 +571,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # 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 # @@ -560,6 +589,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -600,11 +633,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -618,10 +654,14 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # Application Configuration # +# +# 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_DHCPD is not set @@ -629,11 +669,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -655,18 +695,19 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD 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 @@ -674,16 +715,26 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # 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_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + # # Graphics Support # @@ -694,8 +745,8 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -706,11 +757,12 @@ 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_NETLIB=y # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set # CONFIG_NETUTILS_XMLRPC is not set @@ -732,15 +784,16 @@ CONFIG_NETUTILS_NETLIB=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/c5471evm/nsh/Make.defs b/configs/c5471evm/nsh/Make.defs index 41fa4b2f25a6652100cdea4b890bdbc4b11720ed..9e22f8ef31ce5e7f2a54c8607cdb8f9c181693bf 100644 --- a/configs/c5471evm/nsh/Make.defs +++ b/configs/c5471evm/nsh/Make.defs @@ -71,7 +71,7 @@ ifneq ($(HOSTOS),Cygwin) endif endif -ifeq ("${CONFIG_DEBUG}","y") +ifeq ("${CONFIG_DEBUG_FEATURES}","y") ARCHOPTIMIZATION = -g endif @@ -115,7 +115,7 @@ EXEEXT = ifneq ($(CROSSDEV),arm-nuttx-elf-) LDFLAGS += -nostartfiles -nodefaultlibs endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) LDFLAGS += -g endif diff --git a/configs/c5471evm/nsh/defconfig b/configs/c5471evm/nsh/defconfig index fe48c98b95b28e9dc0a64502ae21d233e3085ec1..ea349bf244811954efe7b316eeb6d8f6637f58ca 100644 --- a/configs/c5471evm/nsh/defconfig +++ b/configs/c5471evm/nsh/defconfig @@ -37,14 +37,16 @@ CONFIG_RRLOAD_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,6 +77,7 @@ CONFIG_ARCH_CHIP_C5471=y # 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 @@ -93,7 +96,9 @@ CONFIG_ARCH_CHIP_C5471=y # 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=y # CONFIG_ARCH_ARM926EJS is not set @@ -104,10 +109,21 @@ CONFIG_ARCH_ARM7TDMI=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="arm" CONFIG_ARCH_CHIP="c5471" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y # CONFIG_ARCH_LOWVECTORS is not set @@ -161,6 +177,7 @@ CONFIG_C5471_AUTONEGOTIATION=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # CONFIG_ARCH_HAVE_MPU is not set @@ -300,9 +317,10 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGCONDTIMEDOUT=16 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # CONFIG_SCHED_WORKQUEUE is not set # CONFIG_SCHED_HPWORK is not set @@ -352,8 +370,23 @@ CONFIG_WATCHDOG_DEVPATH="/dev/watchdog0" # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -366,6 +399,8 @@ CONFIG_NETDEV_TELNET=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -389,10 +424,6 @@ CONFIG_SERIAL=y # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set CONFIG_OTHER_UART_SERIALDRIVER=y - -# -# USART Configuration -# CONFIG_MCU_SERIAL=y # CONFIG_STANDARD_SERIAL is not set # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -405,15 +436,18 @@ CONFIG_OTHER_SERIAL_CONSOLE=y # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -551,12 +585,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # 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 # @@ -575,6 +603,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -615,6 +647,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 @@ -627,6 +661,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -647,17 +682,19 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # 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_DISCOVER 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -667,18 +704,19 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y 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_NXTERM 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_PPPD 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 @@ -686,22 +724,27 @@ CONFIG_EXAMPLES_NSH=y # 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_UDP is not set # 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_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # # File System Utilities # +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -713,8 +756,8 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -727,25 +770,27 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -763,6 +808,7 @@ CONFIG_NSH_NESTDEPTH=3 # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_ARP is not set # CONFIG_NSH_DISABLE_BASENAME is not set # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set @@ -804,6 +850,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 @@ -836,6 +883,7 @@ CONFIG_NSH_FILEIOSIZE=1024 # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -864,6 +912,8 @@ CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048 CONFIG_NSH_TELNETD_CLIENTPRIO=100 CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048 CONFIG_NSH_IOBUFFER_SIZE=512 +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # CONFIG_NSH_TELNET_LOGIN is not set # @@ -878,13 +928,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -893,5 +942,6 @@ 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/cc3200-launchpad/nsh/defconfig b/configs/cc3200-launchpad/nsh/defconfig index 68c1a21f1c547fcb72108ff4f6bfb47917b968df..8fbff6d4eb47d75b2017cc5fc73ff5d696340e62 100644 --- a/configs/cc3200-launchpad/nsh/defconfig +++ b/configs/cc3200-launchpad/nsh/defconfig @@ -37,12 +37,15 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_ALERT is not set +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y @@ -72,11 +75,14 @@ CONFIG_ARCH="arm" # 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=y +# 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 @@ -85,65 +91,137 @@ CONFIG_ARCH_CHIP_TIVA=y # 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=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="tiva" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +CONFIG_ARM_TOOLCHAIN_GNU=y CONFIG_ARMV7M_USEBASEPRI=y 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 is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set # # Tiva/Stellaris Configuration Options # # CONFIG_ARCH_CHIP_TM4C123GH6ZRB is not set # CONFIG_ARCH_CHIP_TM4C123GH6PMI is not set +# CONFIG_ARCH_CHIP_TM4C1294NC is not set +# CONFIG_ARCH_CHIP_TM4C129XNC is not set CONFIG_ARCH_CHIP_CC3200=y CONFIG_TIVA_BOARD_EARLYINIT=y # # Tiva/Stellaris Peripheral Support # +# CONFIG_TIVA_ADC is not set +# CONFIG_TIVA_HAVE_ADC0 is not set +# CONFIG_TIVA_HAVE_ADC1 is not set +# CONFIG_TIVA_I2C is not set +CONFIG_TIVA_HAVE_I2C1=y +# CONFIG_TIVA_HAVE_I2C2 is not set +# CONFIG_TIVA_HAVE_I2C3 is not set +# CONFIG_TIVA_HAVE_I2C4 is not set +# CONFIG_TIVA_HAVE_I2C5 is not set +# CONFIG_TIVA_HAVE_I2C6 is not set +# CONFIG_TIVA_HAVE_I2C7 is not set +# CONFIG_TIVA_HAVE_I2C8 is not set +# CONFIG_TIVA_HAVE_I2C9 is not set +# CONFIG_TIVA_HAVE_UART3 is not set +# CONFIG_TIVA_HAVE_UART4 is not set +# CONFIG_TIVA_HAVE_UART5 is not set +# CONFIG_TIVA_HAVE_UART6 is not set +# CONFIG_TIVA_HAVE_UART7 is not set +# CONFIG_TIVA_HAVE_SSI0 is not set +# CONFIG_TIVA_HAVE_SSI1 is not set +# CONFIG_TIVA_HAVE_SSI2 is not set +# CONFIG_TIVA_HAVE_SSI3 is not set +# CONFIG_TIVA_HAVE_ETHERNET is not set +# CONFIG_TIVA_SSI is not set +# CONFIG_TIVA_TIMER is not set +# CONFIG_TIVA_HAVE_TIMER0 is not set +# CONFIG_TIVA_HAVE_TIMER1 is not set +# CONFIG_TIVA_HAVE_TIMER2 is not set +# CONFIG_TIVA_HAVE_TIMER3 is not set +# CONFIG_TIVA_HAVE_TIMER4 is not set +# CONFIG_TIVA_HAVE_TIMER5 is not set +# CONFIG_TIVA_HAVE_TIMER6 is not set +# CONFIG_TIVA_HAVE_TIMER7 is not set +# CONFIG_TIVA_ADC0 is not set +# CONFIG_TIVA_I2C0 is not set +# CONFIG_TIVA_I2C1 is not set CONFIG_TIVA_UART0=y # CONFIG_TIVA_UART1 is not set # CONFIG_TIVA_UART2 is not set -# CONFIG_TIVA_SSI0 is not set -# CONFIG_TIVA_SSI1 is not set -# CONFIG_TIVA_ETHERNET is not set # CONFIG_TIVA_FLASH is not set # -# Disable GPIO Interrupts -# -CONFIG_TIVA_GPIOA_IRQS=y -CONFIG_TIVA_GPIOB_IRQS=y -CONFIG_TIVA_GPIOC_IRQS=y -CONFIG_TIVA_GPIOD_IRQS=y -CONFIG_TIVA_GPIOE_IRQS=y -# CONFIG_TIVA_GPIOF_IRQS is not set -# CONFIG_TIVA_GPIOG_IRQS is not set -# CONFIG_TIVA_GPIOH_IRQS is not set -# CONFIG_TIVA_GPIOJ_IRQS is not set +# Enable GPIO Interrupts +# +# CONFIG_TIVA_GPIO_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOA_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOB_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOC_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOD_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOE_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOF_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOG_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOH_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOJ_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOK_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOL_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOM_IRQS is not set +# CONFIG_TIVA_HAVE_GPION_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOP_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOQ_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOR_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOS_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOT_IRQS is not set # # Architecture Options @@ -156,11 +234,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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=y # CONFIG_ARCH_STACKDUMP is not set @@ -220,6 +301,7 @@ CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_LIB_BOARDCTL is not set # # RTOS Features @@ -249,11 +331,13 @@ CONFIG_PREALLOC_TIMERS=2 # # Tasks and Scheduling # +# CONFIG_SPINLOCK is not set # CONFIG_INIT_NONE is not set CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="nsh_main" CONFIG_RR_INTERVAL=100 +# CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=0 CONFIG_MAX_TASKS=8 # CONFIG_SCHED_HAVE_PARENT is not set @@ -304,6 +388,14 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=32 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 @@ -330,22 +422,43 @@ CONFIG_DEV_NULL=y # 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_TIMER 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -353,6 +466,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -375,13 +490,15 @@ CONFIG_UART0_SERIALDRIVER=y # CONFIG_USART6_SERIALDRIVER is not set # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set - -# -# USART Configuration -# +# 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 is not set CONFIG_UART0_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set # CONFIG_NO_SERIAL_CONSOLE is not set # @@ -395,20 +512,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -434,13 +554,17 @@ CONFIG_UART0_2STOP=0 # 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=y CONFIG_FS_PROCFS=y +# CONFIG_FS_PROCFS_REGISTER is not set # # Exclude individual procfs entries @@ -448,12 +572,7 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_PROCESS is not set # CONFIG_FS_PROCFS_EXCLUDE_UPTIME is not set # CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set - -# -# System Logging -# - -# CONFIG_SYSLOG is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -474,7 +593,12 @@ CONFIG_MM_REGIONS=2 # CONFIG_AUDIO is not set # -# Binary Formats +# Wireless Support +# +# CONFIG_WIRELESS is not set + +# +# Binary Loader # # CONFIG_BINFMT_DISABLE is not set # CONFIG_BINFMT_EXEPATH is not set @@ -499,6 +623,7 @@ CONFIG_LIB_HOMEDIR="/" # 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 @@ -511,14 +636,19 @@ CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 # 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_SCHED_WORKQUEUE is not set +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -537,11 +667,14 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_BUILTIN_PROXY_STACKSIZE=512 +# +# CAN Utilities +# + # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -549,11 +682,11 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -561,75 +694,80 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=512 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 # 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_SMART_TEST 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_UDP 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_WEBSERVER 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_MICROPYTHON is not set # CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # # 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 # CONFIG_NETUTILS_SMTP is not set -# CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_NETLIB is not set -# CONFIG_NETUTILS_WEBCLIENT is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -639,7 +777,6 @@ CONFIG_NSH_READLINE=y CONFIG_NSH_LINELEN=64 # CONFIG_NSH_DISABLE_SEMICOLON is not set CONFIG_NSH_CMDPARMS=y -CONFIG_NSH_TMPDIR="/tmp" CONFIG_NSH_MAXARGUMENTS=6 CONFIG_NSH_ARGCAT=y CONFIG_NSH_NESTDEPTH=3 @@ -650,13 +787,16 @@ 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 @@ -665,8 +805,10 @@ CONFIG_NSH_BUILTIN_APPS=y # 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 @@ -674,6 +816,7 @@ CONFIG_NSH_BUILTIN_APPS=y # 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 @@ -683,8 +826,10 @@ CONFIG_NSH_BUILTIN_APPS=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 # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set @@ -712,6 +857,8 @@ CONFIG_NSH_FILEIOSIZE=512 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 @@ -725,112 +872,19 @@ CONFIG_NSH_CONSOLE=y # # System Libraries and NSH Add-Ons # - -# -# Custom Free Memory Command -# -# CONFIG_SYSTEM_FREE is not set - -# -# EMACS-like Command Line Editor -# # CONFIG_SYSTEM_CLE is not set - -# -# FLASH Program Installation -# -# CONFIG_SYSTEM_INSTALL is not set - -# -# FLASH Erase-all Command -# - -# -# Intel HEX to binary conversion -# +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set - -# -# I2C tool -# - -# -# INI File Parser -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# NxPlayer media player library / command Line -# -# CONFIG_SYSTEM_NXPLAYER is not set - -# -# RAM test -# +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set - -# -# readline() -# +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y - -# -# P-Code Support -# - -# -# PHY Tool -# - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sudoku -# +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set - -# -# Sysinfo -# - -# -# VI Work-Alike Editor -# +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set - -# -# Stack Monitor -# - -# -# USB CDC/ACM Device Commands -# - -# -# USB Composite Device Commands -# - -# -# USB Mass Storage Device Commands -# - -# -# USB Monitor -# - -# -# Zmodem Commands -# # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/cc3200-launchpad/src/cc3200_autoleds.c b/configs/cc3200-launchpad/src/cc3200_autoleds.c index 01c944eb522e174e1648e14fcc72033141e7396e..26ac6a8aaf5f77e42a47142c87aa368328ae2cab 100644 --- a/configs/cc3200-launchpad/src/cc3200_autoleds.c +++ b/configs/cc3200-launchpad/src/cc3200_autoleds.c @@ -87,35 +87,15 @@ * LED_PANIC 4 ON OFF OFF (flashing 2Hz) */ -/* 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 - /* Dump GPIO registers */ -#ifdef CONFIG_DEBUG_LEDS +#ifdef CONFIG_DEBUG_LEDS_INFO # define led_dumpgpio(m) lm_dumpgpio(LED_GPIO, m) #else # define led_dumpgpio(m) #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/cc3200-launchpad/src/cc3200_boot.c b/configs/cc3200-launchpad/src/cc3200_boot.c index cf644905e0f10f176b57b5fb59be1be86b175619..841f40eca7c72ed0a3b8e0abc68b248a86d62b1e 100644 --- a/configs/cc3200-launchpad/src/cc3200_boot.c +++ b/configs/cc3200-launchpad/src/cc3200_boot.c @@ -2,12 +2,14 @@ * configs/cc3200-launchpad/src/cc3200_boot.c * * Copyright (C) 2014 Droidifi LLC. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. * Author: Jim Ewing + * Gregory Nutt * - * Adapted for the cc3200 from code: + * Adapted for the cc3200 from code: * - * Copyright (C) Gregory Nutt. - * Gregory Nutt + * Copyright (C) 2014 Gregory Nutt. + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -48,7 +50,6 @@ #include #include #include -#include #include "cc3200_launchpad.h" @@ -56,13 +57,8 @@ * Pre-processor Definitions ****************************************************************************/ -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ +#define CC3200_SRAM1_BASE 0x20000000 +#define CC3200_SRAM1_SIZE 0x4000 /**************************************************************************** * Public Functions @@ -133,13 +129,8 @@ void tiva_boardinitialize(void) ****************************************************************************/ #if CONFIG_MM_REGIONS > 1 - -#define CC3200_SRAM1_BASE 0x20000000 -#define CC3200_SRAM1_SIZE 0x4000 - void up_addregion(void) { kumm_addregion((FAR void*)CC3200_SRAM1_BASE, CC3200_SRAM1_SIZE); } - #endif diff --git a/configs/cc3200-launchpad/src/cc3200_launchpad.h b/configs/cc3200-launchpad/src/cc3200_launchpad.h index 9f9c77dc68c3d566777826e6fb158bdebb6a0270..b54180bf3a4bc2f40165a91049428609d9e7b11e 100644 --- a/configs/cc3200-launchpad/src/cc3200_launchpad.h +++ b/configs/cc3200-launchpad/src/cc3200_launchpad.h @@ -1,7 +1,7 @@ /**************************************************************************** * configs/cc3200-launchpad/src/cc3200_launchpad.h * - * 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 @@ -71,6 +71,12 @@ void cc3200_uart_init(void); void cc3200_led_init(void); +/**************************************************************************** + * Name: cc3200_led_initialize + ****************************************************************************/ + +void cc3200_led_initialize(void); + /**************************************************************************** * Name: cc3200_ledon ****************************************************************************/ diff --git a/configs/cc3200-launchpad/src/cc3200_leds.c b/configs/cc3200-launchpad/src/cc3200_leds.c index e8e231113fb988d007689ce277df339884c66273..30afc10229643ff8d8f419f8d4d2c02f8a5db5d8 100644 --- a/configs/cc3200-launchpad/src/cc3200_leds.c +++ b/configs/cc3200-launchpad/src/cc3200_leds.c @@ -1,3 +1,41 @@ +/**************************************************************************** + * configs/cc3200-launchpad/src/cc3200_leds.c + * + * Copyright (C) 2014 Droidifi LLC. All rights reserved. + * Copyright (C) 2016 Gregory Nutt. + * Author: Jim Ewing + * 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. + * + * 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 @@ -18,6 +56,10 @@ #define LED2_GPIO 10 #define LED3_GPIO 11 +/**************************************************************************** + * Public Functions + ****************************************************************************/ + /**************************************************************************** * Name: cc3200_led_initialize ****************************************************************************/ @@ -33,7 +75,7 @@ void cc3200_led_initialize(void) uint8_t x=16; putreg32(getreg32(0x44025000 + 0x00000058) | 0x00000001, 0x44025000 + 0x00000058); - while(--x) + while (--x) ; cc3200_pin_type_gpio(PIN_01, PIN_MODE_0, false); diff --git a/configs/cloudctrl/README.txt b/configs/cloudctrl/README.txt index f98996d214abd6018c3ecd4445c7c7e5977a997e..adce2658bae5b6599a3360f86180ecf1c3111999 100644 --- a/configs/cloudctrl/README.txt +++ b/configs/cloudctrl/README.txt @@ -651,7 +651,7 @@ Cloudctrl-specific Configuration Options 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 + CONFIG_STM32_CAN_REGDEBUG - If CONFIG_DEBUG_FEATURES is set, this will generate an dump of all CAN registers. Cloudctrl LCD Hardware Configuration @@ -708,9 +708,9 @@ Cloudctrl-specific Configuration Options CONFIG_STM32_OTGFS_SOFINTR - Enable SOF interrupts. Why would you ever want to do that? CONFIG_STM32_USBHOST_REGDEBUG - Enable very low-level register access - debug. Depends on CONFIG_DEBUG. + debug. Depends on CONFIG_DEBUG_FEATURES. CONFIG_STM32_USBHOST_PKTDUMP - Dump all incoming and outgoing USB - packets. Depends on CONFIG_DEBUG. + packets. Depends on CONFIG_DEBUG_FEATURES. Configurations ============== diff --git a/configs/cloudctrl/include/board.h b/configs/cloudctrl/include/board.h index 474caee909f1fdb23a131c10fd841af848d51ddb..14c7fab32f311e799ace1f9784d4e7b3430fa9cc 100644 --- a/configs/cloudctrl/include/board.h +++ b/configs/cloudctrl/include/board.h @@ -101,14 +101,14 @@ #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) */ +/* APB1 timers 2-7 will be twice 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) +#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) /* MCO output driven by PLL3. From above, we already have PLL3 input frequency as: * diff --git a/configs/cloudctrl/nsh/defconfig b/configs/cloudctrl/nsh/defconfig index ece509d9cf68897b80398d17df468ade44d0a685..ec0165b7f392b250ea933484fe7d3ac91f7db1eb 100644 --- a/configs/cloudctrl/nsh/defconfig +++ b/configs/cloudctrl/nsh/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -207,6 +209,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set CONFIG_ARCH_CHIP_STM32F107VC=y # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -417,6 +420,10 @@ CONFIG_STM32_JTAG_FULL_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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -428,9 +435,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -706,6 +721,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -725,7 +742,12 @@ CONFIG_RTC=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -733,6 +755,7 @@ CONFIG_RTC=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -796,6 +819,8 @@ CONFIG_ETH0_PHY_DM9161=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -846,15 +871,18 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -1008,12 +1036,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -1097,6 +1119,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1134,16 +1157,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1153,17 +1177,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1171,8 +1195,8 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1180,11 +1204,10 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # 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_WEBSERVER is not set # CONFIG_EXAMPLES_XMLRPC is not set # @@ -1209,8 +1232,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1223,22 +1246,22 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CHAT is not set # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER 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 +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1340,6 +1363,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1384,12 +1408,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1398,6 +1422,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/cloudctrl/src/stm32_adc.c b/configs/cloudctrl/src/stm32_adc.c index 9774efba202f08c118e65f85550303a7cfee4003..346100b7828c997c2640aedd29ff4693c7f8abb5 100644 --- a/configs/cloudctrl/src/stm32_adc.c +++ b/configs/cloudctrl/src/stm32_adc.c @@ -146,7 +146,7 @@ int board_adc_setup(void) adc = stm32_adcinitialize(1, g_chanlist, ADC1_NCHANNELS); if (adc == NULL) { - adbg("ERROR: Failed to get ADC interface\n"); + aerr("ERROR: Failed to get ADC interface\n"); return -ENODEV; } @@ -155,7 +155,7 @@ int board_adc_setup(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - adbg("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } diff --git a/configs/cloudctrl/src/stm32_autoleds.c b/configs/cloudctrl/src/stm32_autoleds.c index 752b00cccf24a289841a950a6a86a8723e21390e..8b91f3699c6af6ee429314a7018ad6859163a022 100644 --- a/configs/cloudctrl/src/stm32_autoleds.c +++ b/configs/cloudctrl/src/stm32_autoleds.c @@ -58,18 +58,6 @@ * 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 - /* The following definitions map the encoded LED setting to GPIO settings */ #define CLOUDCTRL_LED1 (1 << 0) diff --git a/configs/cloudctrl/src/stm32_spi.c b/configs/cloudctrl/src/stm32_spi.c index 6cabaff272713a069db480c621ae1823f298218b..13054c3165b1bcb45836e22bebd2dbef43afb0aa 100644 --- a/configs/cloudctrl/src/stm32_spi.c +++ b/configs/cloudctrl/src/stm32_spi.c @@ -54,32 +54,6 @@ #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI3) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_SPI -#endif - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -141,7 +115,7 @@ void weak_function stm32_spidev_initialize(void) #ifdef CONFIG_STM32_SPI1 void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); /* SPI1 connects to the SD CARD and to the SPI FLASH */ @@ -163,7 +137,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI3 void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } diff --git a/configs/cloudctrl/src/stm32_usb.c b/configs/cloudctrl/src/stm32_usb.c index 10ecdec7ca1fa0664976e95a72902a1da132fbdc..a1e889feb159a5281956893f53a794fa000330d3 100644 --- a/configs/cloudctrl/src/stm32_usb.c +++ b/configs/cloudctrl/src/stm32_usb.c @@ -107,13 +107,13 @@ static int usbhost_waiter(int argc, char *argv[]) { struct usbhost_hubport_s *hport; - uvdbg("Running\n"); + uinfo("Running\n"); for (;;) { /* Wait for the device to change state */ DEBUGVERIFY(CONN_WAIT(g_usbconn, &hport)); - uvdbg("%s\n", hport->connected ? "connected" : "disconnected"); + uinfo("%s\n", hport->connected ? "connected" : "disconnected"); /* Did we just become connected? */ @@ -177,7 +177,7 @@ int stm32_usbhost_initialize(void) * that we care about: */ - uvdbg("Register class drivers\n"); + uinfo("Register class drivers\n"); #ifdef CONFIG_USBHOST_MSC /* Register the USB mass storage class */ @@ -185,7 +185,7 @@ int stm32_usbhost_initialize(void) ret = usbhost_msc_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the mass storage class\n"); + uerr("ERROR: Failed to register the mass storage class\n"); } #endif @@ -195,19 +195,19 @@ int stm32_usbhost_initialize(void) ret = usbhost_cdcacm_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the CDC/ACM serial class\n"); + uerr("ERROR: Failed to register the CDC/ACM serial class\n"); } #endif /* Then get an instance of the USB host interface */ - uvdbg("Initialize USB host\n"); + uinfo("Initialize USB host\n"); g_usbconn = stm32_otgfshost_initialize(0); if (g_usbconn) { /* Start a thread to handle device connection. */ - uvdbg("Start usbhost_waiter\n"); + uinfo("Start usbhost_waiter\n"); pid = task_create("usbhost", CONFIG_USBHOST_DEFPRIO, CONFIG_USBHOST_STACKSIZE, @@ -301,11 +301,8 @@ xcpt_t stm32_setup_overcurrent(xcpt_t handler) #ifdef CONFIG_USBDEV void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } #endif #endif /* CONFIG_STM32_OTGFS */ - - - diff --git a/configs/cloudctrl/src/stm32_userleds.c b/configs/cloudctrl/src/stm32_userleds.c index aadc2ac6db4d9c259ca4b8cc6bbfcf288614d1c6..f2ef6a800a4ba3bed4426a9286e85862723fe401 100644 --- a/configs/cloudctrl/src/stm32_userleds.c +++ b/configs/cloudctrl/src/stm32_userleds.c @@ -54,22 +54,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data ****************************************************************************/ @@ -80,10 +64,6 @@ static uint32_t g_ledcfg[BOARD_NLEDS] = GPIO_LED1, GPIO_LED2, GPIO_LED3, GPIO_LED4 }; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/cloudctrl/src/stm32_w25.c b/configs/cloudctrl/src/stm32_w25.c index da059d35b967e51a550cba94924910f7817aee0b..df43ab80456b31ce15ce5ce4833a5616ab60863b 100644 --- a/configs/cloudctrl/src/stm32_w25.c +++ b/configs/cloudctrl/src/stm32_w25.c @@ -107,7 +107,7 @@ int stm32_w25initialize(int minor) spi = stm32_spibus_initialize(1); if (!spi) { - fdbg("ERROR: Failed to initialize SPI port 2\n"); + ferr("ERROR: Failed to initialize SPI port 2\n"); return -ENODEV; } @@ -116,7 +116,7 @@ int stm32_w25initialize(int minor) mtd = w25_initialize(spi); if (!mtd) { - fdbg("ERROR: Failed to bind SPI port 2 to the SST 25 FLASH driver\n"); + ferr("ERROR: Failed to bind SPI port 2 to the SST 25 FLASH driver\n"); return -ENODEV; } @@ -126,7 +126,7 @@ int stm32_w25initialize(int minor) ret = ftl_initialize(minor, mtd); if (ret < 0) { - fdbg("ERROR: Initialize the FTL layer\n"); + ferr("ERROR: Initialize the FTL layer\n"); return ret; } #else @@ -135,7 +135,7 @@ int stm32_w25initialize(int minor) ret = nxffs_initialize(mtd); if (ret < 0) { - fdbg("ERROR: NXFFS initialization failed: %d\n", -ret); + ferr("ERROR: NXFFS initialization failed: %d\n", -ret); return ret; } @@ -145,7 +145,7 @@ int stm32_w25initialize(int minor) ret = mount(NULL, devname, "nxffs", 0, NULL); if (ret < 0) { - fdbg("ERROR: Failed to mount the NXFFS volume: %d\n", errno); + ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno); return ret; } #endif diff --git a/configs/compal_e86/nsh_highram/defconfig b/configs/compal_e86/nsh_highram/defconfig index e521e8e7daf8f868ab85174964963434e377d78e..4e47505113045b97a0044e5ea0d4169d9d926560 100644 --- a/configs/compal_e86/nsh_highram/defconfig +++ b/configs/compal_e86/nsh_highram/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,6 +77,7 @@ CONFIG_ARCH_CHIP_CALYPSO=y # 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 @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_CALYPSO=y # 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=y # CONFIG_ARCH_ARM926EJS is not set # CONFIG_ARCH_ARM920T is not set @@ -102,10 +109,21 @@ CONFIG_ARCH_ARM7TDMI=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="arm" CONFIG_ARCH_CHIP="calypso" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y # CONFIG_ARCH_LOWVECTORS is not set @@ -158,12 +176,14 @@ CONFIG_SERIAL_CONSOLE_NONE=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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=y +# CONFIG_ARCH_HAVE_RESET is not set CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set # CONFIG_ARCH_IDLE_CUSTOM is not set @@ -219,6 +239,7 @@ CONFIG_NSH_MMCSDMINOR=0 # CONFIG_LIB_BOARDCTL=y CONFIG_BOARDCTL_POWEROFF=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 @@ -258,6 +279,7 @@ 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 @@ -302,9 +324,10 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGCONDTIMEDOUT=16 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # CONFIG_SCHED_WORKQUEUE is not set # CONFIG_SCHED_HPWORK is not set @@ -335,14 +358,20 @@ CONFIG_DEV_NULL=y # 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=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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -356,8 +385,22 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -367,6 +410,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -390,14 +435,11 @@ CONFIG_SERIAL=y # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set CONFIG_OTHER_UART_SERIALDRIVER=y - -# -# USART Configuration -# CONFIG_MCU_SERIAL=y # CONFIG_STANDARD_SERIAL is not set # 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_OTHER_SERIAL_CONSOLE=y # CONFIG_NO_SERIAL_CONSOLE is not set @@ -405,15 +447,18 @@ CONFIG_OTHER_SERIAL_CONSOLE=y # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -444,17 +489,12 @@ CONFIG_OTHER_SERIAL_CONSOLE=y # 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 # @@ -475,6 +515,10 @@ CONFIG_HEAP2_SIZE=0 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -518,10 +562,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -540,11 +588,14 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -552,11 +603,13 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_FTPC is not set # CONFIG_EXAMPLES_FTPD is not set CONFIG_EXAMPLES_HELLO=y -# CONFIG_EXAMPLES_HELLOXX is not set -# CONFIG_EXAMPLES_JSON is not set +CONFIG_EXAMPLES_HELLO_PRIORITY=100 +CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 # CONFIG_EXAMPLES_HIDKBD is not set -# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -564,33 +617,45 @@ CONFIG_EXAMPLES_HELLO=y 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_NXTERM 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_PPPD 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_SMART_TEST 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -602,30 +667,28 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -645,6 +708,7 @@ 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 @@ -653,6 +717,7 @@ 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 @@ -661,8 +726,10 @@ CONFIG_NSH_DISABLE_DATE=y # 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 @@ -672,6 +739,7 @@ CONFIG_NSH_DISABLE_DATE=y # CONFIG_NSH_DISABLE_MOUNT is not set # CONFIG_NSH_DISABLE_MV is not set # CONFIG_NSH_DISABLE_MW is not set +# CONFIG_NSH_DISABLE_POWEROFF is not set # CONFIG_NSH_DISABLE_PS is not set # CONFIG_NSH_DISABLE_PUT is not set # CONFIG_NSH_DISABLE_PWD is not set @@ -679,9 +747,12 @@ CONFIG_NSH_DISABLE_DATE=y # CONFIG_NSH_DISABLE_RMDIR is not set # CONFIG_NSH_DISABLE_SET is not set # CONFIG_NSH_DISABLE_SH is not set +CONFIG_NSH_DISABLE_SHUTDOWN=y # 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 @@ -708,6 +779,8 @@ CONFIG_NSH_FILEIOSIZE=1024 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 @@ -721,15 +794,19 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/compal_e88/nsh_highram/defconfig b/configs/compal_e88/nsh_highram/defconfig index 85ad3ce661b1191f900b75f120b204eb6a6bc4cc..41fd85249b1ecb10550f7391bf323d03777cb2a9 100644 --- a/configs/compal_e88/nsh_highram/defconfig +++ b/configs/compal_e88/nsh_highram/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,6 +77,7 @@ CONFIG_ARCH_CHIP_CALYPSO=y # 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 @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_CALYPSO=y # 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=y # CONFIG_ARCH_ARM926EJS is not set # CONFIG_ARCH_ARM920T is not set @@ -102,10 +109,21 @@ CONFIG_ARCH_ARM7TDMI=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="arm" CONFIG_ARCH_CHIP="calypso" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y # CONFIG_ARCH_LOWVECTORS is not set @@ -158,12 +176,14 @@ CONFIG_SERIAL_CONSOLE_NONE=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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=y +# CONFIG_ARCH_HAVE_RESET is not set CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set # CONFIG_ARCH_IDLE_CUSTOM is not set @@ -219,6 +239,7 @@ CONFIG_NSH_MMCSDMINOR=0 # CONFIG_LIB_BOARDCTL=y CONFIG_BOARDCTL_POWEROFF=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 @@ -258,6 +279,7 @@ 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 @@ -302,9 +324,10 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGCONDTIMEDOUT=16 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # CONFIG_SCHED_WORKQUEUE is not set # CONFIG_SCHED_HPWORK is not set @@ -335,14 +358,20 @@ CONFIG_DEV_NULL=y # 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=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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -356,8 +385,22 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -367,6 +410,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -390,14 +435,11 @@ CONFIG_SERIAL=y # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set CONFIG_OTHER_UART_SERIALDRIVER=y - -# -# USART Configuration -# CONFIG_MCU_SERIAL=y # CONFIG_STANDARD_SERIAL is not set # 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_OTHER_SERIAL_CONSOLE=y # CONFIG_NO_SERIAL_CONSOLE is not set @@ -405,15 +447,18 @@ CONFIG_OTHER_SERIAL_CONSOLE=y # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -444,17 +489,12 @@ CONFIG_OTHER_SERIAL_CONSOLE=y # 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 # @@ -475,6 +515,10 @@ CONFIG_HEAP2_SIZE=0 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -518,10 +562,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -540,11 +588,14 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -552,11 +603,13 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_FTPC is not set # CONFIG_EXAMPLES_FTPD is not set CONFIG_EXAMPLES_HELLO=y -# CONFIG_EXAMPLES_HELLOXX is not set -# CONFIG_EXAMPLES_JSON is not set +CONFIG_EXAMPLES_HELLO_PRIORITY=100 +CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 # CONFIG_EXAMPLES_HIDKBD is not set -# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -564,33 +617,45 @@ CONFIG_EXAMPLES_HELLO=y 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_NXTERM 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_PPPD 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_SMART_TEST 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -602,30 +667,28 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -645,6 +708,7 @@ 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 @@ -653,6 +717,7 @@ 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 @@ -661,8 +726,10 @@ CONFIG_NSH_DISABLE_DATE=y # 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 @@ -672,6 +739,7 @@ CONFIG_NSH_DISABLE_DATE=y # CONFIG_NSH_DISABLE_MOUNT is not set # CONFIG_NSH_DISABLE_MV is not set # CONFIG_NSH_DISABLE_MW is not set +# CONFIG_NSH_DISABLE_POWEROFF is not set # CONFIG_NSH_DISABLE_PS is not set # CONFIG_NSH_DISABLE_PUT is not set # CONFIG_NSH_DISABLE_PWD is not set @@ -679,9 +747,12 @@ CONFIG_NSH_DISABLE_DATE=y # CONFIG_NSH_DISABLE_RMDIR is not set # CONFIG_NSH_DISABLE_SET is not set # CONFIG_NSH_DISABLE_SH is not set +CONFIG_NSH_DISABLE_SHUTDOWN=y # 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 @@ -708,6 +779,8 @@ CONFIG_NSH_FILEIOSIZE=512 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 @@ -721,15 +794,19 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/compal_e99/nsh_compalram/Make.defs b/configs/compal_e99/nsh_compalram/Make.defs index 9fe718fb8934776f8e472db62def7bfea629034c..2920fb27d693490654b5b8714b662f488bc9e05a 100644 --- a/configs/compal_e99/nsh_compalram/Make.defs +++ b/configs/compal_e99/nsh_compalram/Make.defs @@ -71,7 +71,7 @@ ifneq ($(HOSTOS),Cygwin) endif endif -ifeq ("${CONFIG_DEBUG}","y") +ifeq ("${CONFIG_DEBUG_FEATURES}","y") ARCHOPTIMIZATION = -g endif @@ -115,7 +115,7 @@ EXEEXT = ifneq ($(CROSSDEV),arm-nuttx-elf-) LDFLAGS += -nostartfiles -nodefaultlibs endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) LDFLAGS += -g endif diff --git a/configs/compal_e99/nsh_compalram/defconfig b/configs/compal_e99/nsh_compalram/defconfig index e3107fc84707a1a341b1e7ea735a4500f5de0d47..d2a8f010e5d25671a71d66506675952de6174ff8 100644 --- a/configs/compal_e99/nsh_compalram/defconfig +++ b/configs/compal_e99/nsh_compalram/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,6 +77,7 @@ CONFIG_ARCH_CHIP_CALYPSO=y # 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 @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_CALYPSO=y # 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=y # CONFIG_ARCH_ARM926EJS is not set # CONFIG_ARCH_ARM920T is not set @@ -102,10 +109,21 @@ CONFIG_ARCH_ARM7TDMI=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="arm" CONFIG_ARCH_CHIP="calypso" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y # CONFIG_ARCH_LOWVECTORS is not set @@ -159,12 +177,14 @@ CONFIG_SERIAL_CONSOLE_NONE=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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=y +# CONFIG_ARCH_HAVE_RESET is not set CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set # CONFIG_ARCH_IDLE_CUSTOM is not set @@ -221,6 +241,7 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_COMPALE99_LCD_SSD1783=y CONFIG_LIB_BOARDCTL=y CONFIG_BOARDCTL_POWEROFF=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 @@ -260,6 +281,7 @@ 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 @@ -304,9 +326,10 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGCONDTIMEDOUT=16 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # CONFIG_SCHED_WORKQUEUE is not set # CONFIG_SCHED_HPWORK is not set @@ -337,14 +360,20 @@ CONFIG_DEV_NULL=y # 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=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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -358,10 +387,15 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set # CONFIG_LCD_NOGETRUN is not set @@ -378,6 +412,7 @@ CONFIG_LCD_MAXPOWER=1 # CONFIG_LCD_UG9664HSWAG01 is not set # CONFIG_LCD_UG2864HSWEG01 is not set # CONFIG_LCD_UG2832HSWEG04 is not set +# CONFIG_LCD_SSD1351 is not set # CONFIG_LCD_ST7565 is not set # CONFIG_LCD_ST7567 is not set # CONFIG_LCD_UG2864AMBAG01 is not set @@ -389,12 +424,16 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set +# CONFIG_SLCD is not set # -# Alphanumeric/Segment LCD Devices +# LED Support # -# CONFIG_LCD_LCD1602 is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -404,6 +443,8 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -427,14 +468,11 @@ CONFIG_SERIAL=y # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set CONFIG_OTHER_UART_SERIALDRIVER=y - -# -# USART Configuration -# CONFIG_MCU_SERIAL=y # CONFIG_STANDARD_SERIAL is not set # 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_OTHER_SERIAL_CONSOLE=y # CONFIG_NO_SERIAL_CONSOLE is not set @@ -442,15 +480,18 @@ CONFIG_OTHER_SERIAL_CONSOLE=y # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -481,22 +522,16 @@ CONFIG_OTHER_SERIAL_CONSOLE=y # 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 -CONFIG_NX_LCDDRIVER=y # # Memory Management @@ -513,6 +548,10 @@ CONFIG_HEAP2_SIZE=2097152 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -556,10 +595,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -578,11 +621,14 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -590,11 +636,13 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_FTPC is not set # CONFIG_EXAMPLES_FTPD is not set CONFIG_EXAMPLES_HELLO=y -# CONFIG_EXAMPLES_HELLOXX is not set -# CONFIG_EXAMPLES_JSON is not set +CONFIG_EXAMPLES_HELLO_PRIORITY=100 +CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 # CONFIG_EXAMPLES_HIDKBD is not set -# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -602,33 +650,45 @@ CONFIG_EXAMPLES_HELLO=y 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_NXTERM 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_PPPD 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_SMART_TEST 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -640,30 +700,28 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -683,6 +741,7 @@ 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 @@ -691,6 +750,7 @@ 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 @@ -699,8 +759,10 @@ CONFIG_NSH_DISABLE_DATE=y # 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 @@ -710,6 +772,7 @@ CONFIG_NSH_DISABLE_DATE=y # CONFIG_NSH_DISABLE_MOUNT is not set # CONFIG_NSH_DISABLE_MV is not set # CONFIG_NSH_DISABLE_MW is not set +# CONFIG_NSH_DISABLE_POWEROFF is not set # CONFIG_NSH_DISABLE_PS is not set # CONFIG_NSH_DISABLE_PUT is not set # CONFIG_NSH_DISABLE_PWD is not set @@ -717,9 +780,12 @@ CONFIG_NSH_DISABLE_DATE=y # CONFIG_NSH_DISABLE_RMDIR is not set # CONFIG_NSH_DISABLE_SET is not set # CONFIG_NSH_DISABLE_SH is not set +CONFIG_NSH_DISABLE_SHUTDOWN=y # 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 @@ -746,6 +812,8 @@ CONFIG_NSH_FILEIOSIZE=1024 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 @@ -759,15 +827,19 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/compal_e99/nsh_highram/Make.defs b/configs/compal_e99/nsh_highram/Make.defs index a7164120e0caa69c94c6a7cdf1cedbb992c39a86..28c0f00c54a94e26c5a495157cf30db1c2d7404e 100644 --- a/configs/compal_e99/nsh_highram/Make.defs +++ b/configs/compal_e99/nsh_highram/Make.defs @@ -71,7 +71,7 @@ ifneq ($(HOSTOS),Cygwin) endif endif -ifeq ("${CONFIG_DEBUG}","y") +ifeq ("${CONFIG_DEBUG_FEATURES}","y") ARCHOPTIMIZATION = -g endif @@ -115,7 +115,7 @@ EXEEXT = ifneq ($(CROSSDEV),arm-nuttx-elf-) LDFLAGS += -nostartfiles -nodefaultlibs endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) LDFLAGS += -g endif diff --git a/configs/compal_e99/nsh_highram/defconfig b/configs/compal_e99/nsh_highram/defconfig index a7cbecbe981b4be19ead1c5e51a09be0620626e1..778ad9d60e35b8f31489adb88911f4fa1d08a84b 100644 --- a/configs/compal_e99/nsh_highram/defconfig +++ b/configs/compal_e99/nsh_highram/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,6 +77,7 @@ CONFIG_ARCH_CHIP_CALYPSO=y # 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 @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_CALYPSO=y # 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=y # CONFIG_ARCH_ARM926EJS is not set # CONFIG_ARCH_ARM920T is not set @@ -102,10 +109,21 @@ CONFIG_ARCH_ARM7TDMI=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="arm" CONFIG_ARCH_CHIP="calypso" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y # CONFIG_ARCH_LOWVECTORS is not set @@ -158,12 +176,14 @@ CONFIG_SERIAL_CONSOLE_NONE=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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=y +# CONFIG_ARCH_HAVE_RESET is not set CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set # CONFIG_ARCH_IDLE_CUSTOM is not set @@ -220,6 +240,7 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_COMPALE99_LCD_SSD1783=y CONFIG_LIB_BOARDCTL=y CONFIG_BOARDCTL_POWEROFF=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 @@ -259,6 +280,7 @@ 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 @@ -303,9 +325,10 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGCONDTIMEDOUT=16 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # CONFIG_SCHED_WORKQUEUE is not set # CONFIG_SCHED_HPWORK is not set @@ -336,14 +359,20 @@ CONFIG_DEV_NULL=y # 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=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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -357,10 +386,15 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set CONFIG_LCD_NOGETRUN=y @@ -377,6 +411,7 @@ CONFIG_LCD_MAXPOWER=1 # CONFIG_LCD_UG9664HSWAG01 is not set # CONFIG_LCD_UG2864HSWEG01 is not set # CONFIG_LCD_UG2832HSWEG04 is not set +# CONFIG_LCD_SSD1351 is not set # CONFIG_LCD_ST7565 is not set # CONFIG_LCD_ST7567 is not set # CONFIG_LCD_UG2864AMBAG01 is not set @@ -388,12 +423,16 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set +# CONFIG_SLCD is not set # -# Alphanumeric/Segment LCD Devices +# LED Support # -# CONFIG_LCD_LCD1602 is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -403,6 +442,8 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -426,14 +467,11 @@ CONFIG_SERIAL=y # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set CONFIG_OTHER_UART_SERIALDRIVER=y - -# -# USART Configuration -# CONFIG_MCU_SERIAL=y # CONFIG_STANDARD_SERIAL is not set # 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_OTHER_SERIAL_CONSOLE=y # CONFIG_NO_SERIAL_CONSOLE is not set @@ -441,15 +479,18 @@ CONFIG_OTHER_SERIAL_CONSOLE=y # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -480,17 +521,12 @@ CONFIG_OTHER_SERIAL_CONSOLE=y # 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 # @@ -499,6 +535,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 @@ -596,6 +633,10 @@ CONFIG_HEAP2_SIZE=2097152 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -639,10 +680,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -661,11 +706,14 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -673,14 +721,14 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_IGMP is not set +# CONFIG_EXAMPLES_JSON is not set CONFIG_EXAMPLES_KEYPADTEST=y CONFIG_EXAMPLES_KEYPAD_DEVNAME="/dev/keypad" # CONFIG_EXAMPLES_KEYPADTEST_ENCODED is not set -# CONFIG_EXAMPLES_IGMP is not set # CONFIG_EXAMPLES_LCDRW 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 @@ -688,7 +736,6 @@ CONFIG_EXAMPLES_KEYPAD_DEVNAME="/dev/keypad" 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=y CONFIG_EXAMPLES_NXHELLO_VPLANE=0 @@ -709,6 +756,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=y CONFIG_EXAMPLES_NXIMAGE_XSCALE1p0=y # CONFIG_EXAMPLES_NXIMAGE_XSCALE1p5 is not set @@ -725,6 +773,7 @@ CONFIG_EXAMPLES_NXLINES_LINEWIDTH=4 CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=2 CONFIG_EXAMPLES_NXLINES_BPP=16 # CONFIG_EXAMPLES_NXLINES_EXTERNINIT is not set +# CONFIG_EXAMPLES_NXTERM is not set CONFIG_EXAMPLES_NXTEXT=y # @@ -749,26 +798,38 @@ CONFIG_EXAMPLES_NXTEXT_BGFONTID=14 CONFIG_EXAMPLES_NXTEXT_PUFONTID=0 # CONFIG_EXAMPLES_NXTEXT_EXTERNINIT 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_PPPD 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_SMART_TEST 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -780,30 +841,28 @@ CONFIG_EXAMPLES_NXTEXT_PUFONTID=0 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -823,6 +882,7 @@ 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 @@ -831,6 +891,7 @@ 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 @@ -839,8 +900,10 @@ CONFIG_NSH_DISABLE_DATE=y # 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 @@ -850,6 +913,7 @@ CONFIG_NSH_DISABLE_DATE=y # CONFIG_NSH_DISABLE_MOUNT is not set # CONFIG_NSH_DISABLE_MV is not set # CONFIG_NSH_DISABLE_MW is not set +# CONFIG_NSH_DISABLE_POWEROFF is not set # CONFIG_NSH_DISABLE_PS is not set # CONFIG_NSH_DISABLE_PUT is not set # CONFIG_NSH_DISABLE_PWD is not set @@ -857,9 +921,12 @@ CONFIG_NSH_DISABLE_DATE=y # CONFIG_NSH_DISABLE_RMDIR is not set # CONFIG_NSH_DISABLE_SET is not set # CONFIG_NSH_DISABLE_SH is not set +CONFIG_NSH_DISABLE_SHUTDOWN=y # 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 @@ -886,6 +953,8 @@ CONFIG_NSH_FILEIOSIZE=1024 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 @@ -899,15 +968,19 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/compal_e99/src/ssd1783.c b/configs/compal_e99/src/ssd1783.c index e33cbd4f80e11d20d03df1702bbe9a4d473322e9..75725fc9204ba713058e846c136cce20039fd6f3 100644 --- a/configs/compal_e99/src/ssd1783.c +++ b/configs/compal_e99/src/ssd1783.c @@ -75,15 +75,8 @@ #define LCD_XRES 98 #define LCD_YRES 67 -/* Debug ******************************************************************************/ +/* This should be put elsewhere */ -#ifdef CONFIG_DEBUG_LCD -# define lcddbg(format, ...) vdbg(format, ##__VA_ARGS__) -#else -# define lcddbg(x...) -#endif - -/** This should be put elsewhere */ #ifdef __CC_ARM /* ARM Compiler */ #define lcd_inline static __inline #elif defined (__ICCARM__) /* for IAR Compiler */ @@ -250,7 +243,8 @@ static void lcd_write_prepare(unsigned int x1, unsigned int x2, unsigned int y1, { CMD, 0x5c }, /* enter write display ram mode */ { END, 0x00 } }; - dbg("x1:%d, x2:%d, y1:%d, y2:%d\n",x1, x2,y1, y2); + + _info("x1:%d, x2:%d, y1:%d, y2:%d\n",x1, x2,y1, y2); fb_ssd1783_send_cmdlist(prepare_disp_write_cmds); } @@ -307,7 +301,7 @@ int lcd_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer, int lcd_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, size_t npixels) { - gvdbg("Not implemented\n"); + ginfo("Not implemented\n"); return -ENOSYS; } @@ -322,7 +316,7 @@ int lcd_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, static int lcd_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { - DEBUGASSERT(dev && vinfo);gvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n", + DEBUGASSERT(dev && vinfo);ginfo("fmt: %d xres: %d yres: %d nplanes: %d\n", g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes); memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s)); return OK; @@ -339,7 +333,7 @@ static int lcd_getvideoinfo(FAR struct lcd_dev_s *dev, static int lcd_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, FAR struct lcd_planeinfo_s *pinfo) { - DEBUGASSERT(dev && pinfo && planeno == 0);gvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); + DEBUGASSERT(dev && pinfo && planeno == 0);ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); return OK; } @@ -355,7 +349,7 @@ static int lcd_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, static int lcd_getpower(struct lcd_dev_s *dev) { - gvdbg("power: %d\n", 0); + ginfo("power: %d\n", 0); return g_lcddev.power; } @@ -376,7 +370,7 @@ static int lcd_setpower(struct lcd_dev_s *dev, int power) return OK; } - gvdbg("power: %d\n", power); + ginfo("power: %d\n", power); DEBUGASSERT(power <= CONFIG_LCD_MAXPOWER); /* Set new power level */ @@ -405,7 +399,7 @@ static int lcd_setpower(struct lcd_dev_s *dev, int power) } else { - gvdbg("powering LCD off...\n"); + ginfo("powering LCD off...\n"); /* Switch pin from PWL to LT */ reg &= ~ASCONF_PWL_ENA; putreg8(reg, ASIC_CONF_REG); @@ -426,7 +420,7 @@ static int lcd_setpower(struct lcd_dev_s *dev, int power) static int lcd_getcontrast(struct lcd_dev_s *dev) { - gvdbg("Not implemented\n"); + ginfo("Not implemented\n"); return -ENOSYS; } @@ -440,7 +434,7 @@ static int lcd_getcontrast(struct lcd_dev_s *dev) static int lcd_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) { - gvdbg("Not implemented\n"); + ginfo("Not implemented\n"); return -ENOSYS; } @@ -453,7 +447,7 @@ static int lcd_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) **************************************************************************************/ static inline void lcd_initialize(void) { - gvdbg("%s: initializing LCD.\n",__FUNCTION__); + ginfo("%s: initializing LCD.\n",__FUNCTION__); calypso_reset_set(RESET_EXT, 0); usleep(5000); uwire_init(); @@ -478,7 +472,7 @@ static inline void lcd_initialize(void) int board_lcd_initialize(void) { - gvdbg("Initializing\n"); + ginfo("Initializing\n"); lcd_initialize(); diff --git a/configs/demo9s12ne64/ostest/defconfig b/configs/demo9s12ne64/ostest/defconfig index b5f8ba3a5d6162332eb7956c445ef1c9feef561d..f9ee45ac71cae2ca6c188c08e3d1d0580fe1061f 100644 --- a/configs/demo9s12ne64/ostest/defconfig +++ b/configs/demo9s12ne64/ostest/defconfig @@ -38,7 +38,7 @@ CONFIG_MOTOROLA_SREC=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set @@ -292,7 +292,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/demo9s12ne64/src/m9s12_leds.c b/configs/demo9s12ne64/src/m9s12_leds.c index 11fc1c6915093cea90a6281f05710fcd6d262863..6f8fd77ebb1b011eefee759459710e69796085d8 100644 --- a/configs/demo9s12ne64/src/m9s12_leds.c +++ b/configs/demo9s12ne64/src/m9s12_leds.c @@ -46,30 +46,6 @@ #include "demo9s12ne64.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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/demo9s12ne64/src/m9s12_spi.c b/configs/demo9s12ne64/src/m9s12_spi.c index b418635021f66b6c64b909ccd026f42ab303482f..e296ee5595bdb7131b5c59aa8dafbd3c9adbb153 100644 --- a/configs/demo9s12ne64/src/m9s12_spi.c +++ b/configs/demo9s12ne64/src/m9s12_spi.c @@ -50,32 +50,6 @@ #if defined(CONFIG_HCS12_SPI) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ diff --git a/configs/dk-tm4c129x/ipv6/defconfig b/configs/dk-tm4c129x/ipv6/defconfig index de1c4d8fbd51714383fd28c6ac70ec290d8564d4..b67e6e377d25ca9c860d0fe29b64c64dd152ad95 100644 --- a/configs/dk-tm4c129x/ipv6/defconfig +++ b/configs/dk-tm4c129x/ipv6/defconfig @@ -41,14 +41,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -79,10 +81,12 @@ 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 CONFIG_ARCH_CHIP_TIVA=y +# 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 @@ -91,29 +95,54 @@ CONFIG_ARCH_CHIP_TIVA=y # 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=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="tiva" +# 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_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 @@ -122,6 +151,7 @@ CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y # CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL is not set # CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW is not set # CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE is not set +# CONFIG_ARMV7M_HAVE_STACKCHECK is not set # CONFIG_ARMV7M_ITMSYSLOG is not set # @@ -139,6 +169,9 @@ CONFIG_ARCH_CHIP_TM4C=y # # Tiva/Stellaris Peripheral Support # +# CONFIG_TIVA_ADC is not set +CONFIG_TIVA_HAVE_ADC0=y +CONFIG_TIVA_HAVE_ADC1=y CONFIG_TIVA_I2C=y CONFIG_TIVA_HAVE_I2C1=y CONFIG_TIVA_HAVE_I2C2=y @@ -161,11 +194,16 @@ CONFIG_TIVA_HAVE_SSI3=y CONFIG_TIVA_HAVE_ETHERNET=y # CONFIG_TIVA_SSI is not set # CONFIG_TIVA_TIMER is not set +CONFIG_TIVA_HAVE_TIMER0=y +CONFIG_TIVA_HAVE_TIMER1=y +CONFIG_TIVA_HAVE_TIMER2=y CONFIG_TIVA_HAVE_TIMER3=y CONFIG_TIVA_HAVE_TIMER4=y CONFIG_TIVA_HAVE_TIMER5=y CONFIG_TIVA_HAVE_TIMER6=y CONFIG_TIVA_HAVE_TIMER7=y +# CONFIG_TIVA_ADC0 is not set +# CONFIG_TIVA_ADC1 is not set # CONFIG_TIVA_I2C0 is not set # CONFIG_TIVA_I2C1 is not set # CONFIG_TIVA_I2C2 is not set @@ -233,7 +271,7 @@ CONFIG_TIVA_I2C_TIMEOMS=500 CONFIG_TIVA_I2C_TIMEOTICKS=500 # -# Tiva Ethernet Configuration +# Ethernet Configuration # CONFIG_TIVA_PHY_INTERNAL=y CONFIG_TIVA_AUTONEG=y @@ -254,11 +292,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -319,6 +360,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_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 @@ -353,6 +402,7 @@ 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 @@ -389,6 +439,7 @@ CONFIG_NAME_MAX=32 # 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 @@ -404,9 +455,10 @@ CONFIG_SIG_SIGWORK=17 # CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_HPWORK=y @@ -440,24 +492,46 @@ CONFIG_DEV_NULL=y # 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=y # CONFIG_I2C_SLAVE is not set # CONFIG_I2C_POLLED is not set # CONFIG_I2C_TRACE is not set +CONFIG_I2C_DRIVER=y # 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_TIMER is not set +# CONFIG_TIMERS_CS2100CP 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y @@ -465,7 +539,11 @@ CONFIG_NETDEVICES=y # # General Ethernet MAC Driver Options # +# CONFIG_NETDEV_LOOPBACK is not set +# CONFIG_NETDEV_TELNET is not set # CONFIG_NETDEV_MULTINIC is not set +# CONFIG_ARCH_HAVE_NETDEV_STATISTICS is not set +# CONFIG_NETDEV_LATEINIT is not set # # External Ethernet MAC Device Support @@ -475,20 +553,37 @@ CONFIG_NETDEVICES=y # CONFIG_ENCX24J600 is not set # CONFIG_NET_E1000 is not set # CONFIG_NET_SLIP is not set +# CONFIG_NET_FTMAC100 is not set # CONFIG_NET_VNET is not set CONFIG_ARCH_PHY_INTERRUPT=y # CONFIG_PIPES is not set # CONFIG_PM is not set # CONFIG_POWER is not set CONFIG_SENSORS=y +# CONFIG_AS5048B is not set +# CONFIG_BH1750FVI is not set +# CONFIG_BMP180 is not set # CONFIG_LIS331DL is not set +# CONFIG_SN_LSM9DS1 is not set +# CONFIG_MB7040 is not set +# CONFIG_MCP9844 is not set +# CONFIG_MS58XX is not set +CONFIG_MS58XX_VDD=30 +# CONFIG_MPL115A is not set # CONFIG_SENSORS_ADXL345 is not set +# CONFIG_MAX31855 is not set +# CONFIG_MAX6675 is not set CONFIG_I2C_LM75=y CONFIG_LM75=y +CONFIG_LM75_I2C_FREQUENCY=100000 +# CONFIG_LM92 is not set # CONFIG_QENCODER is not set +# CONFIG_ZEROCROSS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -512,14 +607,11 @@ CONFIG_UART0_SERIALDRIVER=y # 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 is not set CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -536,18 +628,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -571,6 +668,8 @@ CONFIG_NET_GUARDSIZE=2 # # CONFIG_NET_MULTILINK is not set CONFIG_NET_ETHERNET=y +# CONFIG_NET_LOOPBACK is not set +# CONFIG_NET_TUN is not set # # Network Device Operations @@ -635,6 +734,7 @@ CONFIG_NET_ICMPv6_NEIGHBOR=y CONFIG_ICMPv6_NEIGHBOR_MAXTRIES=5 CONFIG_ICMPv6_NEIGHBOR_DELAYMSEC=20 # CONFIG_NET_ICMPv6_AUTOCONF is not set +# CONFIG_NET_ICMPv6_ROUTER is not set # # IGMPv2 Client Support @@ -661,6 +761,7 @@ CONFIG_NET_STATISTICS=y # Routing Table Configuration # # CONFIG_NET_ROUTE is not set +CONFIG_NET_HOSTNAME="" # # Crypto API @@ -683,18 +784,13 @@ CONFIG_NET_STATISTICS=y CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_RAMMAP is not set # CONFIG_FS_FAT is not set -# CONFIG_NFS 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 - -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -714,6 +810,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -753,13 +853,19 @@ CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 # 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=y +# CONFIG_NETDB_DNSCLIENT is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -778,23 +884,28 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # 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 # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -803,37 +914,47 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 # 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_SMART_TEST 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set -# CONFIG_EXAMPLES_DISCOVER is not set -# CONFIG_EXAMPLES_WEBSERVER is not set +# CONFIG_EXAMPLES_UDPBLASTER is not set # CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -845,41 +966,37 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_DISCOVER 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 -# CONFIG_NETDB_DNSCLIENT is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set # CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -899,13 +1016,16 @@ 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 @@ -914,8 +1034,10 @@ CONFIG_NSH_BUILTIN_APPS=y # 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 @@ -923,6 +1045,7 @@ CONFIG_NSH_BUILTIN_APPS=y # 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 @@ -932,8 +1055,10 @@ CONFIG_NSH_BUILTIN_APPS=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 # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set @@ -960,11 +1085,11 @@ CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_CONSOLE=y # CONFIG_NSH_ALTCONDEV is not set CONFIG_NSH_ARCHINIT=y -CONFIG_LIB_BOARDCTL=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y CONFIG_NSH_NETINIT_THREAD=y CONFIG_NSH_NETINIT_MONITOR=y CONFIG_NSH_NETINIT_SIGNO=18 @@ -1013,6 +1138,8 @@ CONFIG_NSH_IPv6NETMASK_7=0xffff CONFIG_NSH_IPv6NETMASK_8=0xff80 # 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 @@ -1026,39 +1153,11 @@ CONFIG_NSH_MAX_ROUNDTRIP=20 # # System Libraries and NSH Add-Ons # - -# -# Custom Free Memory Command -# -# CONFIG_SYSTEM_FREE is not set - -# -# EMACS-like Command Line Editor -# # CONFIG_SYSTEM_CLE is not set - -# -# CU Minimal Terminal -# # CONFIG_SYSTEM_CUTERM is not set - -# -# FLASH Program Installation -# -# CONFIG_SYSTEM_INSTALL is not set - -# -# FLASH Erase-all Command -# - -# -# Intel HEX to binary conversion -# +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set - -# -# I2C tool -# +# CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=6 CONFIG_I2CTOOL_MAXBUS=6 @@ -1066,94 +1165,22 @@ CONFIG_I2CTOOL_MINADDR=0x03 CONFIG_I2CTOOL_MAXADDR=0x77 CONFIG_I2CTOOL_MAXREGADDR=0xff CONFIG_I2CTOOL_DEFFREQ=400000 - -# -# INI File Parser -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# NxPlayer media player library / command Line -# - -# -# RAM test -# -# CONFIG_SYSTEM_RAMTEST is not set - -# -# readline() -# -CONFIG_SYSTEM_READLINE=y -CONFIG_READLINE_ECHO=y - -# -# P-Code Support -# - -# -# PHY Tool -# -# CONFIG_SYSTEM_MDIO is not set - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sudoku -# -# CONFIG_SYSTEM_SUDOKU is not set - -# -# Sysinfo -# - -# -# Temperature -# +# CONFIG_SYSTEM_INSTALL is not set CONFIG_SYSTEM_LM75=y CONFIG_SYSTEM_LM75_DEVNAME="/dev/temp" CONFIG_SYSTEM_LM75_FAHRENHEIT=y # CONFIG_SYSTEM_LM75_CENTIGRADE is not set CONFIG_SYSTEM_LM75_STACKSIZE=1024 CONFIG_SYSTEM_LM75_PRIORITY=100 - -# -# VI Work-Alike Editor -# +# CONFIG_SYSTEM_MDIO is not set +# CONFIG_SYSTEM_NETDB 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set - -# -# Stack Monitor -# - -# -# USB CDC/ACM Device Commands -# - -# -# USB Composite Device Commands -# - -# -# USB Mass Storage Device Commands -# - -# -# USB Monitor -# - -# -# Zmodem Commands -# # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/dk-tm4c129x/nsh/defconfig b/configs/dk-tm4c129x/nsh/defconfig index 0b9e6a5f03fbf18c3ec7d11745e11fae025f801e..aa70c473d95baf9f0251f088e813f914a74f8291 100644 --- a/configs/dk-tm4c129x/nsh/defconfig +++ b/configs/dk-tm4c129x/nsh/defconfig @@ -41,14 +41,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -79,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 @@ -97,7 +100,9 @@ CONFIG_ARCH_CHIP_TIVA=y # 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 @@ -108,8 +113,17 @@ 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="tiva" +# 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 @@ -117,6 +131,8 @@ 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 # @@ -126,6 +142,7 @@ CONFIG_ARCH_HAVE_FPU=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 @@ -275,6 +292,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set CONFIG_ARCH_HAVE_MPU=y @@ -421,6 +439,7 @@ CONFIG_NAME_MAX=32 # 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 @@ -436,9 +455,10 @@ CONFIG_SIG_SIGWORK=17 # CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_HPWORK=y @@ -479,6 +499,7 @@ CONFIG_I2C=y # CONFIG_I2C_SLAVE is not set # CONFIG_I2C_POLLED is not set # CONFIG_I2C_TRACE is not set +CONFIG_I2C_DRIVER=y # CONFIG_SPI is not set # CONFIG_I2S is not set @@ -494,8 +515,23 @@ CONFIG_I2C=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y @@ -527,9 +563,12 @@ CONFIG_ARCH_PHY_INTERRUPT=y # CONFIG_POWER is not set CONFIG_SENSORS=y # CONFIG_AS5048B is not set +# CONFIG_BH1750FVI is not set # CONFIG_BMP180 is not set # CONFIG_LIS331DL is not set +# CONFIG_SN_LSM9DS1 is not set # CONFIG_MB7040 is not set +# CONFIG_MCP9844 is not set # CONFIG_MS58XX is not set CONFIG_MS58XX_VDD=30 # CONFIG_MPL115A is not set @@ -538,12 +577,15 @@ CONFIG_MS58XX_VDD=30 # CONFIG_MAX6675 is not set CONFIG_I2C_LM75=y CONFIG_LM75=y +CONFIG_LM75_I2C_FREQUENCY=100000 # CONFIG_LM92 is not set # CONFIG_QENCODER is not set # CONFIG_ZEROCROSS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -567,10 +609,6 @@ CONFIG_UART0_SERIALDRIVER=y # 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 @@ -597,15 +635,18 @@ CONFIG_UART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -755,12 +796,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -779,6 +814,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -822,6 +861,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 @@ -834,6 +875,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -860,17 +902,19 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -880,40 +924,47 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD 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_SMART_TEST 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_UDP is not set # 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -925,8 +976,8 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -939,25 +990,27 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -977,6 +1030,7 @@ CONFIG_NSH_BUILTIN_APPS=y # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_ARP is not set # CONFIG_NSH_DISABLE_BASENAME is not set # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set @@ -1018,6 +1072,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 @@ -1050,6 +1105,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y CONFIG_NSH_NETINIT_THREAD=y CONFIG_NSH_NETINIT_MONITOR=y CONFIG_NSH_NETINIT_SIGNO=18 @@ -1081,6 +1137,8 @@ CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048 CONFIG_NSH_TELNETD_CLIENTPRIO=100 CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048 CONFIG_NSH_IOBUFFER_SIZE=512 +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # CONFIG_NSH_TELNET_LOGIN is not set # @@ -1095,11 +1153,11 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=6 CONFIG_I2CTOOL_MAXBUS=6 @@ -1107,8 +1165,14 @@ CONFIG_I2CTOOL_MINADDR=0x03 CONFIG_I2CTOOL_MAXADDR=0x77 CONFIG_I2CTOOL_MAXREGADDR=0xff CONFIG_I2CTOOL_DEFFREQ=400000 -# CONFIG_FSUTILS_INIFILE is not set -# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set +CONFIG_SYSTEM_LM75=y +CONFIG_SYSTEM_LM75_DEVNAME="/dev/temp" +CONFIG_SYSTEM_LM75_FAHRENHEIT=y +# CONFIG_SYSTEM_LM75_CENTIGRADE is not set +CONFIG_SYSTEM_LM75_STACKSIZE=1024 +CONFIG_SYSTEM_LM75_PRIORITY=100 +# CONFIG_SYSTEM_MDIO is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1116,13 +1180,7 @@ CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y # CONFIG_READLINE_TABCOMPLETION is not set # CONFIG_READLINE_CMD_HISTORY is not set -# CONFIG_SYSTEM_MDIO is not set # CONFIG_SYSTEM_SUDOKU is not set -CONFIG_SYSTEM_LM75=y -CONFIG_SYSTEM_LM75_DEVNAME="/dev/temp" -CONFIG_SYSTEM_LM75_FAHRENHEIT=y -# CONFIG_SYSTEM_LM75_CENTIGRADE is not set -CONFIG_SYSTEM_LM75_STACKSIZE=1024 -CONFIG_SYSTEM_LM75_PRIORITY=100 +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/dk-tm4c129x/src/tm4c_bringup.c b/configs/dk-tm4c129x/src/tm4c_bringup.c index 72fcac02928935bbda8388730bc88dd1d25a1371..e2207559b7e43c70d119c16023d2c8c555c288ed 100644 --- a/configs/dk-tm4c129x/src/tm4c_bringup.c +++ b/configs/dk-tm4c129x/src/tm4c_bringup.c @@ -86,14 +86,14 @@ static void tm4c_i2c_register(int bus) i2c = tiva_i2cbus_initialize(bus); if (i2c == NULL) { - dbg("ERROR: Failed to get I2C%d interface\n", bus); + _err("ERROR: Failed to get I2C%d interface\n", bus); } else { ret = i2c_register(i2c, bus); if (ret < 0) { - dbg("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); + _err("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); tiva_i2cbus_uninitialize(i2c); } } @@ -174,7 +174,7 @@ int tm4c_bringup(void) ret = tiva_tmp100_initialize(TMP100_DEVNAME); if (ret < 0) { - dbg("ERROR: Failed to initialize TMP100 driver: %d\n", ret); + _err("ERROR: Failed to initialize TMP100 driver: %d\n", ret); } #endif @@ -184,7 +184,7 @@ int tm4c_bringup(void) ret = tiva_timer_configure(); if (ret < 0) { - dbg("ERROR: Failed to initialize timer driver: %d\n", ret); + _err("ERROR: Failed to initialize timer driver: %d\n", ret); } #endif diff --git a/configs/dk-tm4c129x/src/tm4c_ethernet.c b/configs/dk-tm4c129x/src/tm4c_ethernet.c index 9394a4522b000c711653bf2da6910b3379270f63..dbf31f08969e3471f15fd51a500db0c840856866 100644 --- a/configs/dk-tm4c129x/src/tm4c_ethernet.c +++ b/configs/dk-tm4c129x/src/tm4c_ethernet.c @@ -84,10 +84,10 @@ void tiva_ethernetmac(struct ether_addr *ethaddr) user0 = getreg32(TIVA_FLASH_USERREG0); user1 = getreg32(TIVA_FLASH_USERREG1); - nlldbg("user: %06x:%06x\n", user1 & 0x00ffffff, user0 & 0x00ffffff); + ninfo("user: %06x:%06x\n", user1 & 0x00ffffff, user0 & 0x00ffffff); DEBUGASSERT(user0 != 0xffffffff && user1 != 0xffffffff); - /* Re-format that MAC address the way that uIP expects to see it */ + /* Re-format that MAC address the way that the network expects to see it */ ethaddr->ether_addr_octet[0] = ((user0 >> 0) & 0xff); ethaddr->ether_addr_octet[1] = ((user0 >> 8) & 0xff); diff --git a/configs/dk-tm4c129x/src/tm4c_ssi.c b/configs/dk-tm4c129x/src/tm4c_ssi.c index 6c2b0f86ae5cf2805fdf59131593e424cd7ce041..8e142bfe3221977e1ec3e66117281cca005e4d78 100644 --- a/configs/dk-tm4c129x/src/tm4c_ssi.c +++ b/configs/dk-tm4c129x/src/tm4c_ssi.c @@ -59,28 +59,14 @@ * Pre-processor Definitions ************************************************************************************/ -/* CONFIG_DEBUG_SPI enables debug output from this file (needs CONFIG_DEBUG too) */ +/* Enables debug output from this file */ #ifdef CONFIG_DEBUG_SPI -# define ssidbg lldbg -#else -# define ssidbg(x...) -#endif - -/* Dump GPIO registers */ - -#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_VERBOSE) -# define ssivdbg lldbg # define ssi_dumpgpio(m) tiva_dumpgpio(SDCCS_GPIO, m) #else -# define ssivdbg(x...) # define ssi_dumpgpio(m) #endif -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -118,14 +104,14 @@ void weak_function tm4c_ssidev_initialize(void) void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - ssidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); ssi_dumpgpio("tiva_ssiselect() Entry"); ssi_dumpgpio("tiva_ssiselect() Exit"); } uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - ssidbg("Returning SPI_STATUS_PRESENT\n"); + spiinfo("Returning SPI_STATUS_PRESENT\n"); return SPI_STATUS_PRESENT; } diff --git a/configs/dk-tm4c129x/src/tm4c_timer.c b/configs/dk-tm4c129x/src/tm4c_timer.c index e6cfe3e13cb340c43edea12bc1718c0acdd9a3e4..f3317810885271a73733be25e34716e6f540f736 100644 --- a/configs/dk-tm4c129x/src/tm4c_timer.c +++ b/configs/dk-tm4c129x/src/tm4c_timer.c @@ -102,12 +102,12 @@ int tiva_timer_configure(void) { int ret; - timvdbg("Registering TIMER%d at %s\n", GPTM, CONFIG_DK_TM4C129X_TIMER_DEVNAME); + tmrinfo("Registering TIMER%d at %s\n", GPTM, CONFIG_DK_TM4C129X_TIMER_DEVNAME); ret = tiva_timer_register(CONFIG_DK_TM4C129X_TIMER_DEVNAME, GPTM, ALTCLK); if (ret < 0) { - timdbg("ERROR: Failed to register timer driver: %d\n", ret); + tmrerr("ERROR: Failed to register timer driver: %d\n", ret); } return ret; diff --git a/configs/dk-tm4c129x/src/tm4c_userleds.c b/configs/dk-tm4c129x/src/tm4c_userleds.c index 623091f8aff41f0477dded9892fa6f3566c4f078..9bac0ab7c2ee253f9be43c7eb126487ce61a8fa3 100644 --- a/configs/dk-tm4c129x/src/tm4c_userleds.c +++ b/configs/dk-tm4c129x/src/tm4c_userleds.c @@ -62,22 +62,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/dummy/Kconfig b/configs/dummy/Kconfig new file mode 100644 index 0000000000000000000000000000000000000000..f72f3c094ce4c8f031445c514c343376e4e79e75 --- /dev/null +++ b/configs/dummy/Kconfig @@ -0,0 +1,4 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# diff --git a/configs/ea3131/nsh/defconfig b/configs/ea3131/nsh/defconfig index 847486498ebf85ebf8f2109eca35edf0a2ce63f9..b4536492556ae66bed6b5788868af7d05793ef7b 100644 --- a/configs/ea3131/nsh/defconfig +++ b/configs/ea3131/nsh/defconfig @@ -41,12 +41,15 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y @@ -76,11 +79,14 @@ CONFIG_ARCH="arm" # 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 @@ -89,20 +95,39 @@ CONFIG_ARCH_CHIP_LPC31XX=y # 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=y # 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 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="arm" CONFIG_ARCH_CHIP="lpc31xx" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y CONFIG_ARCH_LOWVECTORS=y CONFIG_ARCH_ROMPGTABLE=y @@ -165,11 +190,14 @@ CONFIG_ARCH_HAVE_EXTSRAM1=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 is not set 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_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set @@ -227,6 +255,13 @@ 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 @@ -256,8 +291,12 @@ 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 @@ -308,6 +347,14 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # 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 @@ -334,22 +381,43 @@ CONFIG_DEV_NULL=y # 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_TIMER 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -357,6 +425,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set CONFIG_UART_SERIALDRIVER=y # CONFIG_UART0_SERIALDRIVER is not set @@ -379,13 +449,15 @@ CONFIG_UART_SERIALDRIVER=y # CONFIG_USART6_SERIALDRIVER is not set # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set - -# -# USART Configuration -# +# 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 is not set CONFIG_UART_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set # CONFIG_NO_SERIAL_CONSOLE is not set # @@ -399,20 +471,23 @@ CONFIG_UART_PARITY=0 CONFIG_UART_2STOP=0 # CONFIG_UART_IFLOWCONTROL is not set # CONFIG_UART_OFLOWCONTROL is not set -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_UART_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -438,22 +513,22 @@ CONFIG_UART_2STOP=0 # CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set CONFIG_FS_READABLE=y CONFIG_FS_WRITABLE=y +# CONFIG_FS_NAMED_SEMAPHORES is not set +CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_RAMMAP is not set 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 # CONFIG_FS_SMARTFS is not set # CONFIG_FS_PROCFS is not set - -# -# System Logging -# - -# CONFIG_SYSLOG is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -475,7 +550,11 @@ CONFIG_MM_REGIONS=1 # CONFIG_AUDIO is not set # -# Binary Formats +# Wireless Support +# + +# +# Binary Loader # # CONFIG_BINFMT_DISABLE is not set # CONFIG_BINFMT_EXEPATH is not set @@ -500,6 +579,7 @@ CONFIG_LIB_HOMEDIR="/" # 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 @@ -510,16 +590,23 @@ 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_LIBC_TMPDIR="/tmp" +CONFIG_LIBC_MAX_TMPFILE=32 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_SCHED_WORKQUEUE is not set +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -534,26 +621,26 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -561,75 +648,80 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 # 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 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_UDP 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_WEBSERVER 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_MICROPYTHON is not set # CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # # 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 # CONFIG_NETUTILS_SMTP is not set -# CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_NETLIB is not set -# CONFIG_NETUTILS_WEBCLIENT is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -648,13 +740,16 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -663,8 +758,10 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -673,6 +770,7 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -682,8 +780,10 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -710,7 +810,8 @@ CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_CONSOLE=y # CONFIG_NSH_ALTCONDEV is not set CONFIG_NSH_ARCHINIT=y -CONFIG_LIB_BOARDCTL=y +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # # NxWidgets/NxWM @@ -724,112 +825,19 @@ CONFIG_LIB_BOARDCTL=y # # System Libraries and NSH Add-Ons # - -# -# Custom Free Memory Command -# -# CONFIG_SYSTEM_FREE is not set - -# -# EMACS-like Command Line Editor -# # CONFIG_SYSTEM_CLE is not set - -# -# FLASH Program Installation -# -# CONFIG_SYSTEM_INSTALL is not set - -# -# FLASH Erase-all Command -# - -# -# Intel HEX to binary conversion -# +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set - -# -# I2C tool -# - -# -# INI File Parser -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# NxPlayer media player library / command Line -# -# CONFIG_SYSTEM_NXPLAYER is not set - -# -# RAM test -# +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set - -# -# readline() -# +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y - -# -# P-Code Support -# - -# -# PHY Tool -# - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sudoku -# +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set - -# -# Sysinfo -# - -# -# VI Work-Alike Editor -# +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set - -# -# Stack Monitor -# - -# -# USB CDC/ACM Device Commands -# - -# -# USB Composite Device Commands -# - -# -# USB Mass Storage Device Commands -# - -# -# USB Monitor -# - -# -# Zmodem Commands -# # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/ea3131/pgnsh/defconfig b/configs/ea3131/pgnsh/defconfig index 68215a41b38f6b66ffdb85e86204d65e98d12de1..0be35cb7ecda25c8d3df9b1cf1e24636d7bdf601 100644 --- a/configs/ea3131/pgnsh/defconfig +++ b/configs/ea3131/pgnsh/defconfig @@ -44,14 +44,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -82,6 +84,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,7 +102,11 @@ CONFIG_ARCH_CHIP_LPC31XX=y # 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=y # CONFIG_ARCH_ARM920T is not set @@ -109,10 +116,21 @@ CONFIG_ARCH_ARM926EJS=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="arm" CONFIG_ARCH_CHIP="lpc31xx" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y CONFIG_ARCH_LOWVECTORS=y # CONFIG_ARCH_ROMPGTABLE is not set @@ -175,12 +193,14 @@ CONFIG_ARCH_HAVE_EXTSRAM1=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 is not set 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_PAGING=y CONFIG_PAGING_PAGESIZE=1024 @@ -258,6 +278,7 @@ CONFIG_EA3131_PAGING_BINOFFSET=0 CONFIG_EA3131_PAGING_SDSLOT=0 CONFIG_EA3131_PAGING_SPIPORT=0 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 @@ -297,6 +318,7 @@ 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 @@ -347,9 +369,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -380,14 +403,20 @@ CONFIG_DEV_NULL=y # 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=y +# CONFIG_SPI_SLAVE is not set CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_CMDDATA is not set CONFIG_SPI_CALLBACK=y # CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_HWFEATURES is not set +# CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -401,7 +430,21 @@ CONFIG_SPI_CALLBACK=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -413,6 +456,7 @@ CONFIG_MMCSD_SPICLOCK=20000000 CONFIG_MMCSD_SPIMODE=0 # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set CONFIG_MTD=y # @@ -421,6 +465,7 @@ CONFIG_MTD=y # CONFIG_MTD_PARTITION is not set # CONFIG_MTD_SECT512 is not set # CONFIG_MTD_BYTE_WRITE is not set +# CONFIG_MTD_PROGMEM is not set # CONFIG_MTD_CONFIG is not set # @@ -428,18 +473,24 @@ CONFIG_MTD=y # # CONFIG_MTD_NAND is not set # CONFIG_RAMMTD is not set +# CONFIG_FILEMTD is not set # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set CONFIG_MTD_M25P=y CONFIG_M25P_SPIMODE=3 +CONFIG_M25P_SPIFREQUENCY=20000000 CONFIG_M25P_MANUFACTURER=0x20 CONFIG_M25P_MEMORY_TYPE=0x20 # CONFIG_M25P_SUBSECTOR_ERASE 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 @@ -450,6 +501,8 @@ CONFIG_M25P_MEMORY_TYPE=0x20 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set CONFIG_UART_SERIALDRIVER=y # CONFIG_UART0_SERIALDRIVER is not set @@ -473,14 +526,11 @@ CONFIG_UART_SERIALDRIVER=y # 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 is not set CONFIG_UART_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -497,19 +547,23 @@ CONFIG_UART_PARITY=0 CONFIG_UART_2STOP=0 # CONFIG_UART_IFLOWCONTROL is not set # CONFIG_UART_OFLOWCONTROL is not set +# CONFIG_UART_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -542,19 +596,16 @@ 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 # CONFIG_FS_SMARTFS 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 # @@ -574,6 +625,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -619,10 +674,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -637,26 +697,26 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -664,18 +724,19 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 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_NXTERM 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_PPPD 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 @@ -683,14 +744,27 @@ CONFIG_EXAMPLES_NSH=y # 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_FLASH_ERASEALL is not set +# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_FSUTILS_PASSWD is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -703,30 +777,28 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -745,6 +817,7 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -753,6 +826,7 @@ 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 @@ -761,8 +835,10 @@ CONFIG_NSH_DISABLE_DATE=y # 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 @@ -781,8 +857,10 @@ CONFIG_NSH_DISABLE_DATE=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 # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set @@ -809,6 +887,8 @@ CONFIG_NSH_FILEIOSIZE=512 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 @@ -822,15 +902,19 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/ea3131/src/lpc31_fillpage.c b/configs/ea3131/src/lpc31_fillpage.c index 3ca97433cf0fc23c373095851fd596b0aff20699..5683472158671894fb4c70760c4599744e750094 100644 --- a/configs/ea3131/src/lpc31_fillpage.c +++ b/configs/ea3131/src/lpc31_fillpage.c @@ -199,7 +199,7 @@ struct pg_source_s /* This the device geometry */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES FAR struct mtd_geometry_s geo; #endif }; @@ -244,7 +244,7 @@ static inline void lpc31_initsrc(void) char devname[16]; #endif - pgllvdbg("Initializing %s\n", CONFIG_PAGING_BINPATH); + pginfo("Initializing %s\n", CONFIG_PAGING_BINPATH); /* No, do we need to mount an SD device? */ @@ -289,7 +289,7 @@ static inline void lpc31_initsrc(void) static inline void lpc31_initsrc(void) { FAR struct spi_dev_s *spi; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES uint32_t capacity; int ret; #endif @@ -300,7 +300,7 @@ static inline void lpc31_initsrc(void) { /* No... the initialize now */ - pgllvdbg("Initializing\n"); + pginfo("Initializing\n"); /* First get an instance of the SPI device interface */ @@ -318,7 +318,7 @@ static inline void lpc31_initsrc(void) /* Verify that we can use the device */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Get the device geometry. (casting to uintptr_t first eliminates * complaints on some architectures where the sizeof long is different * from the size of a pointer). @@ -327,7 +327,7 @@ static inline void lpc31_initsrc(void) ret = MTD_IOCTL(g_pgsrc.mtd, MTDIOC_GEOMETRY, (unsigned long)&g_pgsrc.geo); DEBUGASSERT(ret >= 0); capacity = g_pgsrc.geo.erasesize*g_pgsrc.geo.neraseblocks; - pgllvdbg("capacity: %d\n", capacity); + pginfo("capacity: %d\n", capacity); DEBUGASSERT(capacity >= (CONFIG_EA3131_PAGING_BINOFFSET + PG_TEXT_VSIZE)); #endif @@ -412,7 +412,7 @@ int up_fillpage(FAR struct tcb_s *tcb, FAR void *vpage) off_t offset; #endif - pglldbg("TCB: %p vpage: %p far: %08x\n", tcb, vpage, tcb->xcp.far); + pginfo("TCB: %p vpage: %p far: %08x\n", tcb, vpage, tcb->xcp.far); DEBUGASSERT(tcb->xcp.far >= PG_PAGED_VBASE && tcb->xcp.far < PG_PAGED_VEND); /* If BINPATH is defined, then it is the full path to a file on a mounted file @@ -475,7 +475,7 @@ int up_fillpage(FAR struct tcb_s *tcb, FAR void *vpage) int up_fillpage(FAR struct tcb_s *tcb, FAR void *vpage, up_pgcallback_t pg_callback) { - pglldbg("TCB: %p vpage: %d far: %08x\n", tcb, vpage, tcb->xcp.far); + pginfo("TCB: %p vpage: %d far: %08x\n", tcb, vpage, tcb->xcp.far); DEBUGASSERT(tcb->xcp.far >= PG_PAGED_VBASE && tcb->xcp.far < PG_PAGED_VEND); #if defined(CONFIG_PAGING_BINPATH) diff --git a/configs/ea3131/src/lpc31_leds.c b/configs/ea3131/src/lpc31_leds.c index 367c3031c461f91c7ac2e52a5ba746d9ffd1c1d5..32ca8940e1e782dfde9dfad2d9d49609f1ec847a 100644 --- a/configs/ea3131/src/lpc31_leds.c +++ b/configs/ea3131/src/lpc31_leds.c @@ -51,30 +51,6 @@ #include "up_internal.h" #include "lpc31.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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/ea3131/src/lpc31_spi.c b/configs/ea3131/src/lpc31_spi.c index cda79ac9e63998245c3fbbeb21397343bc8cc7d4..74914bdce634d755e2d00399be9d56b8d337968a 100644 --- a/configs/ea3131/src/lpc31_spi.c +++ b/configs/ea3131/src/lpc31_spi.c @@ -55,32 +55,6 @@ #if 0 /* At present, EA3131 specific logic is hard-coded in the file lpc31_spi.c * in arch/arm/src/lpc31xx */ -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -127,7 +101,7 @@ void weak_function lpc31_spidev_intialize(void) void lpc31_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #warning "Missing logic" } diff --git a/configs/ea3131/src/lpc31_usbhost.c b/configs/ea3131/src/lpc31_usbhost.c index 4c7b500233f4cb48ddb305a74dc921cd3b00571c..a1b86a759ffc667602e3d49770610890606e20bc 100644 --- a/configs/ea3131/src/lpc31_usbhost.c +++ b/configs/ea3131/src/lpc31_usbhost.c @@ -104,7 +104,7 @@ static int ehci_waiter(int argc, char *argv[]) { FAR struct usbhost_hubport_s *hport; - uvdbg("ehci_waiter: Running\n"); + uinfo("ehci_waiter: Running\n"); for (;;) { /* Wait for the device to change state */ @@ -206,7 +206,7 @@ int lpc31_usbhost_initialize(void) ret = usbhost_cdcacm_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the CDC/ACM serial class\n"); + uerr("ERROR: Failed to register the CDC/ACM serial class\n"); } #endif @@ -216,7 +216,7 @@ int lpc31_usbhost_initialize(void) ret = usbhost_kbdinit(); if (ret != OK) { - udbg("ERROR: Failed to register the KBD class\n"); + uerr("ERROR: Failed to register the KBD class\n"); } #endif @@ -225,7 +225,7 @@ int lpc31_usbhost_initialize(void) g_ehciconn = lpc31_ehci_initialize(0); if (!g_ehciconn) { - udbg("ERROR: lpc31_ehci_initialize failed\n"); + uerr("ERROR: lpc31_ehci_initialize failed\n"); return -ENODEV; } @@ -235,7 +235,7 @@ int lpc31_usbhost_initialize(void) (main_t)ehci_waiter, (FAR char * const *)NULL); if (pid < 0) { - udbg("ERROR: Failed to create ehci_waiter task: %d\n", ret); + uerr("ERROR: Failed to create ehci_waiter task: %d\n", ret); return -ENODEV; } @@ -262,7 +262,7 @@ int lpc31_usbhost_initialize(void) void lpc31_usbhost_vbusdrive(int rhport, bool enable) { - uvdbg("RHPort%d: enable=%d\n", rhport+1, enable); + uinfo("RHPort%d: enable=%d\n", rhport+1, enable); /* The LPC3131 has only a single root hub port */ diff --git a/configs/ea3131/src/lpc31_usbmsc.c b/configs/ea3131/src/lpc31_usbmsc.c index f55bdc8e10f58594b18216a79349fde2cbea6481..0d9736d4d6b1ea05ff0f163ec69f1e604f41f8c6 100644 --- a/configs/ea3131/src/lpc31_usbmsc.c +++ b/configs/ea3131/src/lpc31_usbmsc.c @@ -93,8 +93,7 @@ int board_usbmsc_initialize(int port) pbuffer = (uint8_t *)kmm_malloc(BUFFER_SIZE); if (!pbuffer) { - lowsyslog(LOG_ERR, "ERROR: Failed to allocate ramdisk of size %d\n", - BUFFER_SIZE); + err("ERROR: Failed to allocate ramdisk of size %d\n", BUFFER_SIZE); return -ENOMEM; } @@ -107,9 +106,8 @@ int board_usbmsc_initialize(int port) RDFLAG_WRENABLED | RDFLAG_FUNLINK); if (ret < 0) { - syslog(LOG_ERR, - "ERROR: create_ramdisk: Failed to register ramdisk at %s: %d\n", - g_source, -ret); + err("ERROR: create_ramdisk: Failed to register ramdisk at %s: %d\n", + g_source, -ret); kmm_free(pbuffer); return ret; } @@ -119,9 +117,8 @@ int board_usbmsc_initialize(int port) ret = mkfatfs(g_source, &g_fmt); if (ret < 0) { - syslog(LOG_ERR, - "ERROR: create_ramdisk: Failed to create FAT filesystem on ramdisk at %s\n", - g_source); + err("ERROR: create_ramdisk: Failed to create FAT filesystem on ramdisk at %s\n", + g_source); /* kmm_free(pbuffer); -- RAM disk is registered */ return ret; } diff --git a/configs/ea3131/usbserial/defconfig b/configs/ea3131/usbserial/defconfig index e7a88724c9db24212a25c4c6bdade45896fcb72b..4af07a8c243e25b9f51677ac06f1e613b9d8902d 100644 --- a/configs/ea3131/usbserial/defconfig +++ b/configs/ea3131/usbserial/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -121,6 +122,8 @@ CONFIG_ARCH_ARM926EJS=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="arm" CONFIG_ARCH_CHIP="lpc31xx" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_HAVE_TRUSTZONE is not set @@ -410,7 +413,12 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -418,6 +426,7 @@ CONFIG_DEV_NULL=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -430,6 +439,7 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y CONFIG_SERIAL_REMOVABLE=y +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set CONFIG_UART_SERIALDRIVER=y # CONFIG_UART0_SERIALDRIVER is not set @@ -453,10 +463,6 @@ CONFIG_UART_SERIALDRIVER=y # 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_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set @@ -519,15 +525,18 @@ CONFIG_PL2303_PRODUCTSTR="USBdev Serial" CONFIG_USBHOST_HAVE_ASYNCH=y # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -564,12 +573,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -640,6 +643,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -668,10 +672,10 @@ CONFIG_ARCH_HAVE_TLS=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -680,18 +684,18 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -705,7 +709,6 @@ CONFIG_ARCH_HAVE_TLS=y # 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=y CONFIG_EXAMPLES_USBSERIAL_BUFSIZE=512 # CONFIG_EXAMPLES_USBSERIAL_TRACEINIT is not set @@ -715,6 +718,7 @@ CONFIG_EXAMPLES_USBSERIAL_BUFSIZE=512 # CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -736,8 +740,8 @@ CONFIG_EXAMPLES_USBSERIAL_BUFSIZE=512 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -748,6 +752,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 @@ -769,17 +774,17 @@ CONFIG_EXAMPLES_USBSERIAL_BUFSIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_USBMONITOR is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/ea3152/ostest/defconfig b/configs/ea3152/ostest/defconfig index 598fabeb5ab0a4638c04761bb4743ca5b2709745..7c590ebf44cd98fd2777741f364cfa33ace83830 100644 --- a/configs/ea3152/ostest/defconfig +++ b/configs/ea3152/ostest/defconfig @@ -41,12 +41,15 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y @@ -76,11 +79,14 @@ CONFIG_ARCH="arm" # 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 @@ -89,20 +95,39 @@ CONFIG_ARCH_CHIP_LPC31XX=y # 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=y # 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 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="arm" CONFIG_ARCH_CHIP="lpc31xx" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y CONFIG_ARCH_LOWVECTORS=y CONFIG_ARCH_ROMPGTABLE=y @@ -166,11 +191,14 @@ CONFIG_ARCH_HAVE_EXTSRAM1=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 is not set 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_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set @@ -226,6 +254,7 @@ CONFIG_ARCH_HAVE_BUTTONS=y # # Board-Specific Options # +# CONFIG_LIB_BOARDCTL is not set # # RTOS Features @@ -255,8 +284,12 @@ 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="ostest_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 @@ -307,6 +340,14 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # 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 @@ -333,22 +374,43 @@ CONFIG_DEV_NULL=y # 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_TIMER 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -356,6 +418,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set CONFIG_UART_SERIALDRIVER=y # CONFIG_UART0_SERIALDRIVER is not set @@ -378,12 +442,14 @@ CONFIG_UART_SERIALDRIVER=y # CONFIG_USART6_SERIALDRIVER is not set # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set - -# -# USART Configuration -# +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_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 is not set CONFIG_UART_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set # CONFIG_NO_SERIAL_CONSOLE is not set # @@ -397,20 +463,23 @@ CONFIG_UART_PARITY=0 CONFIG_UART_2STOP=0 # CONFIG_UART_IFLOWCONTROL is not set # CONFIG_UART_OFLOWCONTROL is not set -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_UART_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -435,14 +504,11 @@ CONFIG_DISABLE_MOUNTPOINT=y # 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_PROCFS is not set - -# -# System Logging -# - -# CONFIG_SYSLOG is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -464,7 +530,11 @@ CONFIG_MM_REGIONS=1 # CONFIG_AUDIO is not set # -# Binary Formats +# Wireless Support +# + +# +# Binary Loader # # CONFIG_BINFMT_DISABLE is not set # CONFIG_NXFLAT is not set @@ -487,6 +557,7 @@ CONFIG_NUNGET_CHARS=2 # 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 @@ -498,14 +569,18 @@ CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 # CONFIG_LIBC_STRERROR is not set # CONFIG_LIBC_PERROR_STDOUT is not set CONFIG_ARCH_LOWPUTC=y +# 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_SCHED_WORKQUEUE is not set +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -520,14 +595,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -535,11 +609,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -547,12 +621,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_NSH is not set # 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM is not set # CONFIG_EXAMPLES_NXTEXT is not set CONFIG_EXAMPLES_OSTEST=y CONFIG_EXAMPLES_OSTEST_LOOPS=1 @@ -560,62 +633,64 @@ CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048 CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3 CONFIG_EXAMPLES_OSTEST_RR_RANGE=10000 CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 +# CONFIG_EXAMPLES_PCA9635 is not set # CONFIG_EXAMPLES_PIPE is not set # CONFIG_EXAMPLES_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 # 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 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_UDP 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_WEBSERVER 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_MICROPYTHON is not set # CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # # 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 # CONFIG_NETUTILS_SMTP is not set -# CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_NETLIB is not set -# CONFIG_NETUTILS_WEBCLIENT is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library @@ -634,111 +709,16 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # # System Libraries and NSH Add-Ons # - -# -# Custom Free Memory Command -# -# CONFIG_SYSTEM_FREE is not set - -# -# EMACS-like Command Line Editor -# # CONFIG_SYSTEM_CLE is not set - -# -# FLASH Program Installation -# -# CONFIG_SYSTEM_INSTALL is not set - -# -# FLASH Erase-all Command -# - -# -# Intel HEX to binary conversion -# +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set - -# -# I2C tool -# - -# -# INI File Parser -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# NxPlayer media player library / command Line -# -# CONFIG_SYSTEM_NXPLAYER is not set - -# -# RAM test -# +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set - -# -# readline() -# +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set - -# -# P-Code Support -# - -# -# PHY Tool -# - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sudoku -# # CONFIG_SYSTEM_SUDOKU is not set - -# -# Sysinfo -# - -# -# VI Work-Alike Editor -# +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set - -# -# Stack Monitor -# - -# -# USB CDC/ACM Device Commands -# - -# -# USB Composite Device Commands -# - -# -# USB Mass Storage Device Commands -# - -# -# USB Monitor -# - -# -# Zmodem Commands -# # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/ea3152/src/lpc31_fillpage.c b/configs/ea3152/src/lpc31_fillpage.c index 647960cfa35bb9d9845df23285279bb8c53a9ae3..51ad18749e40387f5fd4042a0a2a668d6f4a0792 100644 --- a/configs/ea3152/src/lpc31_fillpage.c +++ b/configs/ea3152/src/lpc31_fillpage.c @@ -199,7 +199,7 @@ struct pg_source_s /* This the device geometry */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES FAR struct mtd_geometry_s geo; #endif }; @@ -244,7 +244,7 @@ static inline void lpc31_initsrc(void) char devname[16]; #endif - pgllvdbg("Initializing %s\n", CONFIG_PAGING_BINPATH); + pginfo("Initializing %s\n", CONFIG_PAGING_BINPATH); /* No, do we need to mount an SD device? */ @@ -289,7 +289,7 @@ static inline void lpc31_initsrc(void) static inline void lpc31_initsrc(void) { FAR struct spi_dev_s *spi; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES uint32_t capacity; int ret; #endif @@ -300,7 +300,7 @@ static inline void lpc31_initsrc(void) { /* No... the initialize now */ - pgllvdbg("Initializing\n"); + pginfo("Initializing\n"); /* First get an instance of the SPI device interface */ @@ -318,7 +318,7 @@ static inline void lpc31_initsrc(void) /* Verify that we can use the device */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Get the device geometry. (casting to uintptr_t first eliminates * complaints on some architectures where the sizeof long is different * from the size of a pointer). @@ -327,7 +327,7 @@ static inline void lpc31_initsrc(void) ret = MTD_IOCTL(g_pgsrc.mtd, MTDIOC_GEOMETRY, (unsigned long)&g_pgsrc.geo); DEBUGASSERT(ret >= 0); capacity = g_pgsrc.geo.erasesize*g_pgsrc.geo.neraseblocks; - pgllvdbg("capacity: %d\n", capacity); + pginfo("capacity: %d\n", capacity); DEBUGASSERT(capacity >= (CONFIG_EA3152_PAGING_BINOFFSET + PG_TEXT_VSIZE)); #endif @@ -412,7 +412,7 @@ int up_fillpage(FAR struct tcb_s *tcb, FAR void *vpage) off_t offset; #endif - pglldbg("TCB: %p vpage: %p far: %08x\n", tcb, vpage, tcb->xcp.far); + pginfo("TCB: %p vpage: %p far: %08x\n", tcb, vpage, tcb->xcp.far); DEBUGASSERT(tcb->xcp.far >= PG_PAGED_VBASE && tcb->xcp.far < PG_PAGED_VEND); /* If BINPATH is defined, then it is the full path to a file on a mounted file @@ -475,7 +475,7 @@ int up_fillpage(FAR struct tcb_s *tcb, FAR void *vpage) int up_fillpage(FAR struct tcb_s *tcb, FAR void *vpage, up_pgcallback_t pg_callback) { - pglldbg("TCB: %p vpage: %d far: %08x\n", tcb, vpage, tcb->xcp.far); + pginfo("TCB: %p vpage: %d far: %08x\n", tcb, vpage, tcb->xcp.far); DEBUGASSERT(tcb->xcp.far >= PG_PAGED_VBASE && tcb->xcp.far < PG_PAGED_VEND); #if defined(CONFIG_PAGING_BINPATH) diff --git a/configs/ea3152/src/lpc31_leds.c b/configs/ea3152/src/lpc31_leds.c index ab0ea797492d0866faa7a9e54b0071916718ed4b..582b1f680a9a21c6b26834f231bc78bdbe24971e 100644 --- a/configs/ea3152/src/lpc31_leds.c +++ b/configs/ea3152/src/lpc31_leds.c @@ -51,30 +51,6 @@ #include "up_internal.h" #include "lpc31.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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/ea3152/src/lpc31_spi.c b/configs/ea3152/src/lpc31_spi.c index 5e81cc398dab2bba89771443783f817282342fac..0995794a0fd87b1905987a67bf0a162bc4915de4 100644 --- a/configs/ea3152/src/lpc31_spi.c +++ b/configs/ea3152/src/lpc31_spi.c @@ -55,32 +55,6 @@ #if 0 /* At present, EA3152 specific logic is hard-coded in the file lpc31_spi.c * in arch/arm/src/lpc31xx */ -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -127,7 +101,7 @@ void weak_function lpc31_spidev_intialize(void) void lpc31_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #warning "Missing logic" } diff --git a/configs/ea3152/src/lpc31_usbmsc.c b/configs/ea3152/src/lpc31_usbmsc.c index e251d5cbc02316722f8b695d8d7b58606d1cd266..b3e431eeba8352b7afd258ba70e52fcf76d43faf 100644 --- a/configs/ea3152/src/lpc31_usbmsc.c +++ b/configs/ea3152/src/lpc31_usbmsc.c @@ -93,8 +93,8 @@ int board_usbmsc_initialize(int port) pbuffer = (uint8_t *)kmm_malloc(BUFFER_SIZE); if (!pbuffer) { - lowsyslog("board_usbmsc_initialize: Failed to allocate ramdisk of size %d\n", - BUFFER_SIZE); + err("ERROR: board_usbmsc_initialize: Failed to allocate ramdisk of size %d\n", + BUFFER_SIZE); return -ENOMEM; } @@ -107,8 +107,8 @@ int board_usbmsc_initialize(int port) RDFLAG_WRENABLED | RDFLAG_FUNLINK); if (ret < 0) { - printf("create_ramdisk: Failed to register ramdisk at %s: %d\n", - g_source, -ret); + err("ERROR: create_ramdisk: Failed to register ramdisk at %s: %d\n", + g_source, -ret); kmm_free(pbuffer); return ret; } @@ -118,8 +118,8 @@ int board_usbmsc_initialize(int port) ret = mkfatfs(g_source, &g_fmt); if (ret < 0) { - printf("create_ramdisk: Failed to create FAT filesystem on ramdisk at %s\n", - g_source); + err("ERROR: create_ramdisk: Failed to create FAT filesystem on ramdisk at %s\n", + g_source); /* kmm_free(pbuffer); -- RAM disk is registered */ return ret; } diff --git a/configs/eagle100/httpd/defconfig b/configs/eagle100/httpd/defconfig index 96e0b09524e1dbc82f2ad38ca52a97d626291a54..19ed517f66dc9e2e83d0c24a85c1b453d8432aa3 100644 --- a/configs/eagle100/httpd/defconfig +++ b/configs/eagle100/httpd/defconfig @@ -21,6 +21,7 @@ CONFIG_WINDOWS_CYGWIN=y # Build Configuration # # CONFIG_APPS_DIR="../apps" +CONFIG_BUILD_FLAT=y # CONFIG_BUILD_2PASS is not set # @@ -30,20 +31,25 @@ CONFIG_WINDOWS_CYGWIN=y # 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_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y @@ -73,10 +79,14 @@ CONFIG_ARCH="arm" # 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=y +# 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 @@ -85,28 +95,53 @@ CONFIG_ARCH_CHIP_LM=y # 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=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="tiva" +# 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_MPU 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_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 @@ -115,9 +150,11 @@ CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y # CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL is not set # CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW is not set # CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE is not set +# CONFIG_ARMV7M_HAVE_STACKCHECK is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set # -# Stellaris Configuration Options +# Tiva/Stellaris Configuration Options # CONFIG_ARCH_CHIP_LM3S6918=y # CONFIG_ARCH_CHIP_LM3S9B96 is not set @@ -126,23 +163,79 @@ CONFIG_ARCH_CHIP_LM3S6918=y # CONFIG_ARCH_CHIP_LM3S8962 is not set # CONFIG_ARCH_CHIP_LM4F120 is not set CONFIG_ARCH_CHIP_LM3S=y -CONFIG_TIVA_HAVE_SSI1=y # CONFIG_LM_REVA2 is not set - -# -# Stellaris Peripheral Support -# +# CONFIG_TIVA_BOARD_EARLYINIT is not set + +# +# Tiva/Stellaris Peripheral Support +# +# CONFIG_TIVA_ADC is not set +# CONFIG_TIVA_HAVE_ADC0 is not set +# CONFIG_TIVA_HAVE_ADC1 is not set +# CONFIG_TIVA_I2C is not set +CONFIG_TIVA_HAVE_I2C1=y +# CONFIG_TIVA_HAVE_I2C2 is not set +# CONFIG_TIVA_HAVE_I2C3 is not set +# CONFIG_TIVA_HAVE_I2C4 is not set +# CONFIG_TIVA_HAVE_I2C5 is not set +# CONFIG_TIVA_HAVE_I2C6 is not set +# CONFIG_TIVA_HAVE_I2C7 is not set +# CONFIG_TIVA_HAVE_I2C8 is not set +# CONFIG_TIVA_HAVE_I2C9 is not set +# CONFIG_TIVA_HAVE_UART3 is not set +# CONFIG_TIVA_HAVE_UART4 is not set +# CONFIG_TIVA_HAVE_UART5 is not set +# CONFIG_TIVA_HAVE_UART6 is not set +# CONFIG_TIVA_HAVE_UART7 is not set +CONFIG_TIVA_HAVE_SSI0=y +CONFIG_TIVA_HAVE_SSI1=y +# CONFIG_TIVA_HAVE_SSI2 is not set +# CONFIG_TIVA_HAVE_SSI3 is not set +CONFIG_TIVA_HAVE_ETHERNET=y +CONFIG_TIVA_SSI=y +# CONFIG_TIVA_TIMER is not set +# CONFIG_TIVA_HAVE_TIMER0 is not set +# CONFIG_TIVA_HAVE_TIMER1 is not set +# CONFIG_TIVA_HAVE_TIMER2 is not set +CONFIG_TIVA_HAVE_TIMER3=y +# CONFIG_TIVA_HAVE_TIMER4 is not set +# CONFIG_TIVA_HAVE_TIMER5 is not set +# CONFIG_TIVA_HAVE_TIMER6 is not set +# CONFIG_TIVA_HAVE_TIMER7 is not set +# CONFIG_TIVA_ADC0 is not set +# CONFIG_TIVA_I2C0 is not set +# CONFIG_TIVA_I2C1 is not set CONFIG_TIVA_UART0=y # CONFIG_TIVA_UART1 is not set # CONFIG_TIVA_UART2 is not set CONFIG_TIVA_SSI0=y # CONFIG_TIVA_SSI1 is not set +# CONFIG_TIVA_TIMER3 is not set CONFIG_TIVA_ETHERNET=y # CONFIG_TIVA_FLASH is not set # -# Disable GPIO Interrupts -# +# Enable GPIO Interrupts +# +CONFIG_TIVA_GPIO_IRQS=y +CONFIG_TIVA_HAVE_GPIOA_IRQS=y +CONFIG_TIVA_HAVE_GPIOB_IRQS=y +CONFIG_TIVA_HAVE_GPIOC_IRQS=y +CONFIG_TIVA_HAVE_GPIOD_IRQS=y +CONFIG_TIVA_HAVE_GPIOE_IRQS=y +CONFIG_TIVA_HAVE_GPIOF_IRQS=y +CONFIG_TIVA_HAVE_GPIOG_IRQS=y +# CONFIG_TIVA_HAVE_GPIOH_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOJ_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOK_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOL_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOM_IRQS is not set +# CONFIG_TIVA_HAVE_GPION_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOP_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOQ_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOR_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOS_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOT_IRQS is not set CONFIG_TIVA_GPIOA_IRQS=y CONFIG_TIVA_GPIOB_IRQS=y CONFIG_TIVA_GPIOC_IRQS=y @@ -150,14 +243,11 @@ CONFIG_TIVA_GPIOD_IRQS=y CONFIG_TIVA_GPIOE_IRQS=y CONFIG_TIVA_GPIOF_IRQS=y CONFIG_TIVA_GPIOG_IRQS=y -CONFIG_TIVA_GPIOH_IRQS=y -# CONFIG_TIVA_GPIOJ_IRQS is not set # # Stellaris Ethernet Configuration # # CONFIG_TIVA_ETHLEDS is not set -CONFIG_TIVA_BOARDMAC=y # CONFIG_TIVA_ETHHDUPLEX is not set # CONFIG_TIVA_ETHNOAUTOCRC is not set # CONFIG_TIVA_ETHNOPAD is not set @@ -165,10 +255,11 @@ CONFIG_TIVA_BOARDMAC=y # CONFIG_TIVA_PROMISCUOUS is not set # CONFIG_TIVA_TIMESTAMP is not set # CONFIG_TIVA_BADCRC is not set -# CONFIG_M3S_DUMPPACKET is not set +# CONFIG_TIVA_DUMPPACKET is not set +CONFIG_TIVA_BOARDMAC=y # -# Stellaris SSI Configuration +# Tiva/Stellaris SSI Configuration # CONFIG_SSI_POLLWAIT=y CONFIG_SSI_TXLIMIT=4 @@ -180,10 +271,19 @@ CONFIG_SSI_TXLIMIT=4 # CONFIG_ARCH_VECNOTIRQ is not set # CONFIG_ARCH_DMA is not set CONFIG_ARCH_HAVE_IRQPRIO=y -# CONFIG_ARCH_ADDRENV is not set +# 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 @@ -238,39 +338,78 @@ CONFIG_ARCH_LEDS=y # # Board-Specific Options # +# CONFIG_LIB_BOARDCTL is not set # # RTOS Features # -# CONFIG_BOARD_INITIALIZE is not set +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=y +CONFIG_DISABLE_ENVIRON=y + +# +# Clocks and Timers +# CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set -CONFIG_RR_INTERVAL=200 -# CONFIG_SCHED_CPULOAD is not set -# CONFIG_SCHED_INSTRUMENTATION is not set -CONFIG_TASK_NAME_SIZE=0 -# CONFIG_SCHED_HAVE_PARENT is not set +# CONFIG_CLOCK_MONOTONIC is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2009 CONFIG_START_MONTH=5 CONFIG_START_DAY=20 -CONFIG_DEV_CONSOLE=y +CONFIG_MAX_WDOGPARMS=4 +CONFIG_PREALLOC_WDOGS=8 +CONFIG_WDOG_INTRESERVE=1 +CONFIG_PREALLOC_TIMERS=8 + +# +# Tasks and Scheduling +# +# CONFIG_INIT_NONE is not set +CONFIG_INIT_ENTRYPOINT=y +# CONFIG_INIT_FILEPATH is not set +CONFIG_USER_ENTRYPOINT="webserver_main" +CONFIG_RR_INTERVAL=200 +# CONFIG_SCHED_SPORADIC is not set +CONFIG_TASK_NAME_SIZE=0 +CONFIG_MAX_TASKS=8 +# CONFIG_SCHED_HAVE_PARENT is not set +# CONFIG_SCHED_WAITPID is not set + +# +# Pthread Options +# # CONFIG_MUTEX_TYPES is not set -# CONFIG_PRIORITY_INHERITANCE is not set +CONFIG_NPTHREAD_KEYS=0 + +# +# 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_SCHED_WAITPID 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_USER_ENTRYPOINT="webserver_main" -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=y -CONFIG_DISABLE_ENVIRON=y # # Signal Numbers @@ -279,21 +418,14 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGCONDTIMEDOUT=16 +# CONFIG_MODULE is not set # -# Sizes of configurable things (0 disables) +# Work queue support # -CONFIG_MAX_TASKS=8 -CONFIG_NPTHREAD_KEYS=0 -CONFIG_NFILE_DESCRIPTORS=8 -CONFIG_NFILE_STREAMS=8 -CONFIG_NAME_MAX=32 -CONFIG_PREALLOC_MQ_MSGS=0 -CONFIG_MQ_MAXMSGSIZE=0 -CONFIG_MAX_WDOGPARMS=4 -CONFIG_PREALLOC_WDOGS=8 -CONFIG_WDOG_INTRESERVE=1 -CONFIG_PREALLOC_TIMERS=8 +# CONFIG_SCHED_WORKQUEUE is not set +# CONFIG_SCHED_HPWORK is not set +# CONFIG_SCHED_LPWORK is not set # # Stack and heap information @@ -302,6 +434,7 @@ 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 @@ -310,14 +443,26 @@ 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 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 @@ -325,15 +470,36 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y # # General Ethernet MAC Driver Options # +# CONFIG_NETDEV_LOOPBACK is not set +# CONFIG_NETDEV_TELNET is not set # CONFIG_NETDEV_MULTINIC is not set +CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y +# CONFIG_NETDEV_STATISTICS is not set +# CONFIG_NETDEV_LATEINIT is not set # # External Ethernet MAC Device Support @@ -343,6 +509,7 @@ CONFIG_NETDEVICES=y # CONFIG_ENCX24J600 is not set # CONFIG_NET_E1000 is not set # CONFIG_NET_SLIP is not set +# CONFIG_NET_FTMAC100 is not set # CONFIG_NET_VNET is not set # CONFIG_PIPES is not set # CONFIG_PM is not set @@ -351,14 +518,38 @@ CONFIG_NETDEVICES=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set +# CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y - -# -# USART Configuration -# +# 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=y +# 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_UART0_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set # CONFIG_NO_SERIAL_CONSOLE is not set # @@ -372,20 +563,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -394,20 +588,58 @@ CONFIG_ARCH_HAVE_NET=y # CONFIG_ARCH_HAVE_PHY is not set CONFIG_NET=y # CONFIG_NET_NOINTS is not set -CONFIG_NET_IPv4=y -# CONFIG_NET_MULTIBUFFER is not set # CONFIG_NET_PROMISCUOUS is not set + +# +# Driver buffer configuration +# +# CONFIG_NET_MULTIBUFFER is not set +CONFIG_NET_ETH_MTU=590 +CONFIG_NET_ETH_TCP_RECVWNDO=536 +CONFIG_NET_GUARDSIZE=2 + +# +# Data link support +# +# CONFIG_NET_MULTILINK is not set +CONFIG_NET_ETHERNET=y +# CONFIG_NET_LOOPBACK is not set +# CONFIG_NET_TUN is not set + +# +# Network Device Operations +# +# CONFIG_NETDEV_PHY_IOCTL is not set + +# +# Internet Protocol Selection +# +CONFIG_NET_IPv4=y +# CONFIG_NET_IPv6 is not set + +# +# Socket Support +# CONFIG_NSOCKET_DESCRIPTORS=16 CONFIG_NET_NACTIVESOCKETS=16 CONFIG_NET_SOCKOPTS=y # CONFIG_NET_SOLINGER is not set -CONFIG_NET_ETH_MTU=562 -# CONFIG_NET_TCPURGDATA is not set + +# +# Raw Socket Support +# +# CONFIG_NET_PKT is not set + +# +# Unix Domain Socket Support +# +# CONFIG_NET_LOCAL is not set # # TCP/IP Networking # CONFIG_NET_TCP=y +# CONFIG_NET_TCPURGDATA is not set CONFIG_NET_TCP_CONNS=16 CONFIG_NET_MAX_LISTENPORTS=8 CONFIG_NET_TCP_READAHEAD=y @@ -421,24 +653,48 @@ CONFIG_NET_TCPBACKLOG=y # UDP Networking # # CONFIG_NET_UDP is not set + +# +# ICMP Networking Support +# CONFIG_NET_ICMP=y # CONFIG_NET_ICMP_PING is not set + +# +# IGMPv2 Client Support +# # CONFIG_NET_IGMP is not set -CONFIG_NET_STATISTICS=y -CONFIG_NET_ETH_TCP_RECVWNDO=536 + +# +# ARP Configuration +# +CONFIG_NET_ARP=y CONFIG_NET_ARPTAB_SIZE=16 +CONFIG_NET_ARP_MAXAGE=120 # CONFIG_NET_ARP_IPIN is not set +# CONFIG_NET_ARP_SEND is not set + +# +# Network I/O Buffer Support +# CONFIG_NET_IOB=y CONFIG_IOB_NBUFFERS=24 CONFIG_IOB_BUFSIZE=196 CONFIG_IOB_NCHAINS=8 -CONFIG_IOB_THROTTLE=0 +# CONFIG_NET_ARCH_INCR32 is not set +# CONFIG_NET_ARCH_CHKSUM is not set +CONFIG_NET_STATISTICS=y # # Routing Table Configuration # # CONFIG_NET_ROUTE is not set -CONFIG_NET_ETHERNET=y +CONFIG_NET_HOSTNAME="" + +# +# Crypto API +# +# CONFIG_CRYPTO is not set # # File Systems @@ -451,14 +707,10 @@ CONFIG_DISABLE_MOUNTPOINT=y # 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_RAMMAP is not set # CONFIG_FS_PROCFS is not set - -# -# System Logging -# - -# CONFIG_SYSLOG is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -479,7 +731,11 @@ CONFIG_MM_REGIONS=1 # CONFIG_AUDIO is not set # -# Binary Formats +# Wireless Support +# + +# +# Binary Loader # # CONFIG_BINFMT_DISABLE is not set # CONFIG_NXFLAT is not set @@ -502,6 +758,7 @@ CONFIG_NUNGET_CHARS=0 # 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 @@ -513,14 +770,18 @@ CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 # CONFIG_LIBC_STRERROR is not set # CONFIG_LIBC_PERROR_STDOUT is not set CONFIG_ARCH_LOWPUTC=y +# 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_SCHED_WORKQUEUE is not set +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -535,26 +796,25 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # 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_LCDRW is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -563,87 +823,93 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_NSH is not set # 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM is not set # CONFIG_EXAMPLES_NXTEXT is not set # CONFIG_EXAMPLES_OSTEST is not set -# CONFIG_EXAMPLES_PASHELLO is not set +# CONFIG_EXAMPLES_PCA9635 is not set # CONFIG_EXAMPLES_PIPE is not set # CONFIG_EXAMPLES_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 +# 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 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_UDP is not set +# CONFIG_EXAMPLES_USBTERM is not set +# CONFIG_EXAMPLES_WATCHDOG is not set CONFIG_EXAMPLES_WEBSERVER=y CONFIG_EXAMPLES_WEBSERVER_IPADDR=0x0a000002 CONFIG_EXAMPLES_WEBSERVER_DRIPADDR=0x0a000001 CONFIG_EXAMPLES_WEBSERVER_NETMASK=0xffffff00 CONFIG_EXAMPLES_WEBSERVER_NOMAC=y -# CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBTERM is not set -# CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WGET 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_MICROPYTHON is not set # CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # # 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 +CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set -# CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set CONFIG_NETUTILS_WEBSERVER=y # CONFIG_NETUTILS_HTTPD_SINGLECONNECT is not set # CONFIG_NETUTILS_HTTPD_SCRIPT_DISABLE is not set +CONFIG_NETUTILS_HTTPD_MAXPATH=64 # CONFIG_NETUTILS_HTTPD_CGIPATH is not set CONFIG_NETUTILS_HTTPD_ERRPATH="" # CONFIG_NETUTILS_HTTPD_SERVERHEADER_DISABLE is not set CONFIG_NETUTILS_HTTPD_TIMEOUT=0 CONFIG_NETUTILS_HTTPD_CLASSIC=y # CONFIG_NETUTILS_HTTPD_MMAP is not set +# CONFIG_NETUTILS_HTTPD_SENDFILE is not set CONFIG_NETUTILS_HTTPD_KEEPALIVE_DISABLE=y # CONFIG_NETUTILS_XMLRPC is not set -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # @@ -661,93 +927,16 @@ CONFIG_NETUTILS_HTTPD_KEEPALIVE_DISABLE=y # # System Libraries and NSH Add-Ons # - -# -# USB CDC/ACM Device Commands -# - -# -# USB Composite Device Commands -# - -# -# Custom Free Memory Command -# +# CONFIG_SYSTEM_CLE is not set +# CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set - -# -# I2C tool -# - -# -# INI File Parser -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# FLASH Program Installation -# +# CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set # CONFIG_SYSTEM_INSTALL is not set - -# -# FLASH Erase-all Command -# - -# -# NxPlayer media player library / command Line -# -# CONFIG_SYSTEM_NXPLAYER is not set - -# -# RAM test -# # CONFIG_SYSTEM_RAMTEST is not set - -# -# readline() -# +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sysinfo -# - -# -# USB Monitor -# - -# -# EMACS-like Command Line Editor -# -# CONFIG_SYSTEM_CLE is not set - -# -# VI Work-Alike Editor -# +# CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set - -# -# Stack Monitor -# - -# -# USB Mass Storage Device Commands -# - -# -# Zmodem Commands -# # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/eagle100/nettest/defconfig b/configs/eagle100/nettest/defconfig index bd692c7ffa9a2202aedbe428fda4cad25c9911d8..deb0cd9e48adf94061f9395410d4b36691c87b26 100644 --- a/configs/eagle100/nettest/defconfig +++ b/configs/eagle100/nettest/defconfig @@ -41,14 +41,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -79,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=y @@ -97,7 +100,9 @@ CONFIG_ARCH_CHIP_LM=y # 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 @@ -108,14 +113,25 @@ CONFIG_ARCH_CORTEXM3=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="tiva" +# 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 # @@ -125,6 +141,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -258,6 +275,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set CONFIG_ARCH_HAVE_MPU=y @@ -393,9 +411,10 @@ CONFIG_NAME_MAX=32 CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # CONFIG_SCHED_WORKQUEUE is not set # CONFIG_SCHED_HPWORK is not set @@ -426,6 +445,7 @@ CONFIG_DEV_NULL=y # 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 @@ -444,8 +464,22 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y @@ -454,7 +488,9 @@ CONFIG_NETDEVICES=y # General Ethernet MAC Driver Options # # CONFIG_NETDEV_LOOPBACK is not set +# CONFIG_NETDEV_TELNET is not set # CONFIG_NETDEV_MULTINIC is not set +CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y # CONFIG_NETDEV_LATEINIT is not set # @@ -474,6 +510,8 @@ CONFIG_NETDEVICES=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -497,13 +535,10 @@ CONFIG_UART0_SERIALDRIVER=y # 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_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_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -520,19 +555,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -665,12 +704,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # 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 # @@ -689,6 +722,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -729,11 +766,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -747,10 +787,14 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # Application Configuration # +# +# 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_DHCPD is not set @@ -758,11 +802,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -784,18 +828,19 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD 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 @@ -803,16 +848,26 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # 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_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + # # Graphics Support # @@ -823,8 +878,8 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -835,11 +890,12 @@ 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_NETLIB=y # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set # CONFIG_NETUTILS_XMLRPC is not set @@ -861,15 +917,16 @@ CONFIG_NETUTILS_NETLIB=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/eagle100/nsh/defconfig b/configs/eagle100/nsh/defconfig index b8227f844f6c47d909eaaf0b7d47c32d1f318e08..f39a61f2ae8431ca398b544019366ca98cd95369 100644 --- a/configs/eagle100/nsh/defconfig +++ b/configs/eagle100/nsh/defconfig @@ -41,14 +41,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -79,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=y @@ -97,7 +100,9 @@ CONFIG_ARCH_CHIP_LM=y # 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 @@ -108,14 +113,25 @@ CONFIG_ARCH_CORTEXM3=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="tiva" +# 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 # @@ -125,6 +141,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -258,6 +275,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set CONFIG_ARCH_HAVE_MPU=y @@ -416,9 +434,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -459,6 +478,10 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_CMDDATA is not set CONFIG_SPI_CALLBACK=y # CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_HWFEATURES is not set +# CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -472,7 +495,21 @@ CONFIG_SPI_CALLBACK=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -484,6 +521,7 @@ CONFIG_MMCSD_SPICLOCK=12500000 CONFIG_MMCSD_SPIMODE=0 # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set # CONFIG_MTD is not set # CONFIG_EEPROM is not set CONFIG_NETDEVICES=y @@ -517,6 +555,8 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -540,10 +580,6 @@ CONFIG_UART0_SERIALDRIVER=y # 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 @@ -570,15 +606,18 @@ CONFIG_UART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -719,7 +758,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_NFS is not set # CONFIG_FS_NXFFS is not set # CONFIG_FS_ROMFS is not set @@ -728,12 +769,6 @@ CONFIG_FS_FAT=y # 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 # @@ -752,6 +787,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -797,6 +836,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 @@ -804,12 +845,14 @@ CONFIG_NETDB_DNSCLIENT_ENTRIES=4 CONFIG_NETDB_DNSCLIENT_NAMESIZE=32 CONFIG_NETDB_DNSCLIENT_LIFESEC=3600 CONFIG_NETDB_DNSCLIENT_MAXRESPONSE=96 +# CONFIG_NETDB_RESOLVCONF is not set CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_NETDB_DNSSERVER_IPv4 is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -830,18 +873,20 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # 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_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -851,18 +896,19 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y 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_NXTERM 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_PPPD 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 @@ -870,22 +916,29 @@ CONFIG_EXAMPLES_NSH=y # 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_UDP is not set # 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_WEBSERVER is not set # CONFIG_EXAMPLES_WGET 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 @@ -898,8 +951,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -912,25 +965,27 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -949,6 +1004,7 @@ CONFIG_NSH_NESTDEPTH=3 # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_ARP is not set # CONFIG_NSH_DISABLE_BASENAME is not set # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set @@ -991,6 +1047,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 @@ -1023,6 +1080,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1049,6 +1107,8 @@ CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048 CONFIG_NSH_TELNETD_CLIENTPRIO=100 CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048 CONFIG_NSH_IOBUFFER_SIZE=512 +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # CONFIG_NSH_TELNET_LOGIN is not set # @@ -1063,13 +1123,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1078,5 +1137,6 @@ 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/eagle100/nxflat/defconfig b/configs/eagle100/nxflat/defconfig index 67b18010a403e1943117cc285382958f1f037e00..00b4c87cf21a78ddccd8a336af74f6edaebfde6b 100644 --- a/configs/eagle100/nxflat/defconfig +++ b/configs/eagle100/nxflat/defconfig @@ -21,6 +21,7 @@ CONFIG_WINDOWS_CYGWIN=y # Build Configuration # # CONFIG_APPS_DIR="../apps" +CONFIG_BUILD_FLAT=y # CONFIG_BUILD_2PASS is not set # @@ -30,6 +31,7 @@ CONFIG_WINDOWS_CYGWIN=y # 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 @@ -39,12 +41,15 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y @@ -74,11 +79,14 @@ CONFIG_ARCH="arm" # 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=y # 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 @@ -87,29 +95,53 @@ CONFIG_ARCH_CHIP_LM=y # 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=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="tiva" +# 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_MPU=y +# 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_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 @@ -118,6 +150,8 @@ CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y # CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL is not set # CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW is not set # CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE is not set +# CONFIG_ARMV7M_HAVE_STACKCHECK is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set # # Tiva/Stellaris Configuration Options @@ -129,23 +163,79 @@ CONFIG_ARCH_CHIP_LM3S6918=y # CONFIG_ARCH_CHIP_LM3S8962 is not set # CONFIG_ARCH_CHIP_LM4F120 is not set CONFIG_ARCH_CHIP_LM3S=y -CONFIG_TIVA_HAVE_SSI1=y # CONFIG_LM_REVA2 is not set +# CONFIG_TIVA_BOARD_EARLYINIT is not set # # Tiva/Stellaris Peripheral Support # +# CONFIG_TIVA_ADC is not set +# CONFIG_TIVA_HAVE_ADC0 is not set +# CONFIG_TIVA_HAVE_ADC1 is not set +# CONFIG_TIVA_I2C is not set +CONFIG_TIVA_HAVE_I2C1=y +# CONFIG_TIVA_HAVE_I2C2 is not set +# CONFIG_TIVA_HAVE_I2C3 is not set +# CONFIG_TIVA_HAVE_I2C4 is not set +# CONFIG_TIVA_HAVE_I2C5 is not set +# CONFIG_TIVA_HAVE_I2C6 is not set +# CONFIG_TIVA_HAVE_I2C7 is not set +# CONFIG_TIVA_HAVE_I2C8 is not set +# CONFIG_TIVA_HAVE_I2C9 is not set +# CONFIG_TIVA_HAVE_UART3 is not set +# CONFIG_TIVA_HAVE_UART4 is not set +# CONFIG_TIVA_HAVE_UART5 is not set +# CONFIG_TIVA_HAVE_UART6 is not set +# CONFIG_TIVA_HAVE_UART7 is not set +CONFIG_TIVA_HAVE_SSI0=y +CONFIG_TIVA_HAVE_SSI1=y +# CONFIG_TIVA_HAVE_SSI2 is not set +# CONFIG_TIVA_HAVE_SSI3 is not set +CONFIG_TIVA_HAVE_ETHERNET=y +CONFIG_TIVA_SSI=y +# CONFIG_TIVA_TIMER is not set +# CONFIG_TIVA_HAVE_TIMER0 is not set +# CONFIG_TIVA_HAVE_TIMER1 is not set +# CONFIG_TIVA_HAVE_TIMER2 is not set +CONFIG_TIVA_HAVE_TIMER3=y +# CONFIG_TIVA_HAVE_TIMER4 is not set +# CONFIG_TIVA_HAVE_TIMER5 is not set +# CONFIG_TIVA_HAVE_TIMER6 is not set +# CONFIG_TIVA_HAVE_TIMER7 is not set +# CONFIG_TIVA_ADC0 is not set +# CONFIG_TIVA_I2C0 is not set +# CONFIG_TIVA_I2C1 is not set CONFIG_TIVA_UART0=y # CONFIG_TIVA_UART1 is not set # CONFIG_TIVA_UART2 is not set CONFIG_TIVA_SSI0=y # CONFIG_TIVA_SSI1 is not set +# CONFIG_TIVA_TIMER3 is not set # CONFIG_TIVA_ETHERNET is not set # CONFIG_TIVA_FLASH is not set # -# Disable GPIO Interrupts -# +# Enable GPIO Interrupts +# +CONFIG_TIVA_GPIO_IRQS=y +CONFIG_TIVA_HAVE_GPIOA_IRQS=y +CONFIG_TIVA_HAVE_GPIOB_IRQS=y +CONFIG_TIVA_HAVE_GPIOC_IRQS=y +CONFIG_TIVA_HAVE_GPIOD_IRQS=y +CONFIG_TIVA_HAVE_GPIOE_IRQS=y +CONFIG_TIVA_HAVE_GPIOF_IRQS=y +CONFIG_TIVA_HAVE_GPIOG_IRQS=y +# CONFIG_TIVA_HAVE_GPIOH_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOJ_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOK_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOL_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOM_IRQS is not set +# CONFIG_TIVA_HAVE_GPION_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOP_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOQ_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOR_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOS_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOT_IRQS is not set CONFIG_TIVA_GPIOA_IRQS=y CONFIG_TIVA_GPIOB_IRQS=y CONFIG_TIVA_GPIOC_IRQS=y @@ -153,8 +243,6 @@ CONFIG_TIVA_GPIOD_IRQS=y CONFIG_TIVA_GPIOE_IRQS=y CONFIG_TIVA_GPIOF_IRQS=y CONFIG_TIVA_GPIOG_IRQS=y -CONFIG_TIVA_GPIOH_IRQS=y -# CONFIG_TIVA_GPIOJ_IRQS is not set # # Tiva/Stellaris SSI Configuration @@ -169,10 +257,19 @@ CONFIG_SSI_TXLIMIT=4 # CONFIG_ARCH_VECNOTIRQ is not set # CONFIG_ARCH_DMA is not set CONFIG_ARCH_HAVE_IRQPRIO=y -# CONFIG_ARCH_ADDRENV is not set +# 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 @@ -227,39 +324,78 @@ CONFIG_ARCH_LEDS=y # # Board-Specific Options # +# CONFIG_LIB_BOARDCTL is not set # # RTOS Features # -# CONFIG_BOARD_INITIALIZE is not set +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=y + +# +# Clocks and Timers +# CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set -CONFIG_RR_INTERVAL=200 -# CONFIG_SCHED_CPULOAD is not set -# CONFIG_SCHED_INSTRUMENTATION is not set -CONFIG_TASK_NAME_SIZE=0 -# CONFIG_SCHED_HAVE_PARENT is not set +# CONFIG_CLOCK_MONOTONIC is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2009 CONFIG_START_MONTH=5 CONFIG_START_DAY=6 -CONFIG_DEV_CONSOLE=y +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="nxflat_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 is not set + +# +# Pthread Options +# # CONFIG_MUTEX_TYPES is not set -# CONFIG_PRIORITY_INHERITANCE 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_SCHED_WAITPID 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_USER_ENTRYPOINT="nxflat_main" -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=y # # Signal Numbers @@ -270,19 +406,18 @@ CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGCONDTIMEDOUT=16 # -# Sizes of configurable things (0 disables) +# POSIX Message Queue Options # -CONFIG_MAX_TASKS=16 -CONFIG_NPTHREAD_KEYS=4 -CONFIG_NFILE_DESCRIPTORS=8 -CONFIG_NFILE_STREAMS=8 -CONFIG_NAME_MAX=32 CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 -CONFIG_MAX_WDOGPARMS=2 -CONFIG_PREALLOC_WDOGS=4 -CONFIG_WDOG_INTRESERVE=0 -CONFIG_PREALLOC_TIMERS=4 +# 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 @@ -291,6 +426,7 @@ 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 @@ -299,14 +435,26 @@ 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 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 @@ -314,9 +462,25 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -324,6 +488,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -346,12 +512,14 @@ CONFIG_UART0_SERIALDRIVER=y # CONFIG_USART6_SERIALDRIVER is not set # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set - -# -# USART Configuration -# +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_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 is not set CONFIG_UART0_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set # CONFIG_NO_SERIAL_CONSOLE is not set # @@ -365,20 +533,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -387,6 +558,11 @@ CONFIG_UART0_2STOP=0 # CONFIG_ARCH_HAVE_PHY is not set # CONFIG_NET is not set +# +# Crypto API +# +# CONFIG_CRYPTO is not set + # # File Systems # @@ -395,21 +571,20 @@ CONFIG_UART0_2STOP=0 # 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=y +# CONFIG_FS_TMPFS is not set # CONFIG_FS_SMARTFS is not set # CONFIG_FS_PROCFS is not set - -# -# System Logging -# - -# CONFIG_SYSLOG is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -430,7 +605,11 @@ CONFIG_MM_REGIONS=1 # CONFIG_AUDIO is not set # -# Binary Formats +# Wireless Support +# + +# +# Binary Loader # # CONFIG_BINFMT_DISABLE is not set CONFIG_NXFLAT=y @@ -453,6 +632,7 @@ CONFIG_NUNGET_CHARS=2 # 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 @@ -464,14 +644,19 @@ CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 # CONFIG_LIBC_STRERROR is not set # CONFIG_LIBC_PERROR_STDOUT is not set CONFIG_ARCH_LOWPUTC=y +# 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_SCHED_WORKQUEUE is not set +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -486,26 +671,25 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # 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_LCDRW is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -513,69 +697,77 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_NSH is not set # 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_NXFLAT=y # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM is not set # CONFIG_EXAMPLES_NXTEXT is not set # CONFIG_EXAMPLES_OSTEST is not set -# CONFIG_EXAMPLES_PASHELLO is not set +# CONFIG_EXAMPLES_PCA9635 is not set # CONFIG_EXAMPLES_PIPE is not set # CONFIG_EXAMPLES_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 +# 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 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_UDP is not set -# CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set +# CONFIG_EXAMPLES_UNIONFS is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER 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_MICROPYTHON is not set # CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # # 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 # CONFIG_NETUTILS_SMTP is not set -# CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_NETLIB is not set -# CONFIG_NETUTILS_WEBCLIENT is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library @@ -594,93 +786,16 @@ CONFIG_EXAMPLES_NXFLAT=y # # System Libraries and NSH Add-Ons # - -# -# USB CDC/ACM Device Commands -# - -# -# USB Composite Device Commands -# - -# -# Custom Free Memory Command -# +# CONFIG_SYSTEM_CLE is not set +# CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set - -# -# I2C tool -# - -# -# INI File Parser -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# FLASH Program Installation -# +# CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set # CONFIG_SYSTEM_INSTALL is not set - -# -# FLASH Erase-all Command -# - -# -# NxPlayer media player library / command Line -# -# CONFIG_SYSTEM_NXPLAYER is not set - -# -# RAM test -# # CONFIG_SYSTEM_RAMTEST is not set - -# -# readline() -# +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sysinfo -# - -# -# USB Monitor -# - -# -# EMACS-like Command Line Editor -# -# CONFIG_SYSTEM_CLE is not set - -# -# VI Work-Alike Editor -# +# CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set - -# -# Stack Monitor -# - -# -# USB Mass Storage Device Commands -# - -# -# Zmodem Commands -# # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/eagle100/src/lm_ethernet.c b/configs/eagle100/src/lm_ethernet.c index 62f073697c57efecaf0529ff926106ae484dd906..69c6e6c8f485a6c6bdc00c50f448a33027b32696 100644 --- a/configs/eagle100/src/lm_ethernet.c +++ b/configs/eagle100/src/lm_ethernet.c @@ -83,10 +83,10 @@ void tiva_ethernetmac(struct ether_addr *ethaddr) user0 = getreg32(TIVA_FLASH_USERREG0); user1 = getreg32(TIVA_FLASH_USERREG1); - nlldbg("user: %06x:%06x\n", user1 & 0x00ffffff, user0 & 0x00ffffff); + ninfo("user: %06x:%06x\n", user1 & 0x00ffffff, user0 & 0x00ffffff); DEBUGASSERT(user0 != 0xffffffff && user1 != 0xffffffff); - /* Re-format that MAC address the way that uIP expects to see it */ + /* Re-format that MAC address the way that the network expects to see it */ ethaddr->ether_addr_octet[0] = ((user0 >> 0) & 0xff); ethaddr->ether_addr_octet[1] = ((user0 >> 8) & 0xff); diff --git a/configs/eagle100/src/lm_leds.c b/configs/eagle100/src/lm_leds.c index feea1dacf404cf94ebd24872634bf247d8e15ab7..5163bc9aadfe0d83c8bee56c62c804ade62ba235 100644 --- a/configs/eagle100/src/lm_leds.c +++ b/configs/eagle100/src/lm_leds.c @@ -55,21 +55,9 @@ * 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 - /* Dump GPIO registers */ -#ifdef CONFIG_DEBUG_LEDS +#ifdef CONFIG_DEBUG_LEDS_INFO # define led_dumpgpio(m) tiva_dumpgpio(LED_GPIO, m) #else # define led_dumpgpio(m) @@ -79,16 +67,12 @@ * Private Data ****************************************************************************/ -/**************************************************************************** - * Private Functions - ****************************************************************************/ +static uint8_t g_nest; /**************************************************************************** * Public Functions ****************************************************************************/ -static uint8_t g_nest; - /**************************************************************************** * Name: board_autoled_initialize * @@ -100,7 +84,7 @@ static uint8_t g_nest; #ifdef CONFIG_ARCH_LEDS void board_autoled_initialize(void) { - leddbg("Initializing\n"); + ledinfo("Initializing\n"); /* Configure Port E, Bit 1 as an output, initial value=OFF */ diff --git a/configs/eagle100/src/lm_ssi.c b/configs/eagle100/src/lm_ssi.c index adc5ad59edec70a4b4becedeeff31a474dc837dc..7befb1f87d640e474da7748bdb423904bc01cfd9 100644 --- a/configs/eagle100/src/lm_ssi.c +++ b/configs/eagle100/src/lm_ssi.c @@ -59,27 +59,9 @@ * Pre-processor Definitions ************************************************************************************/ -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SSI_DEBUG /* Define to enable debug */ -#undef SSI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SSI_DEBUG -# define ssidbg lldbg -# ifdef SSI_VERBOSE -# define ssivdbg lldbg -# else -# define ssivdbg(x...) -# endif -#else -# undef SSI_VERBOSE -# define ssidbg(x...) -# define ssivdbg(x...) -#endif - -/* Dump GPIO registers */ +/* CONFIG_DEBUG_SPI enables debug output from this file */ -#ifdef SSI_VERBOSE +#ifdef CONFIG_DEBUG_SPI # define ssi_dumpgpio(m) tiva_dumpgpio(SDCCS_GPIO, m) #else # define ssi_dumpgpio(m) @@ -127,7 +109,7 @@ void weak_function lm_ssidev_initialize(void) void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - ssidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); if (devid == SPIDEV_MMCSD) { /* Assert the CS pin to the card */ @@ -140,7 +122,7 @@ void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool select uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - ssidbg("Returning SPI_STATUS_PRESENT\n"); + spiinfo("Returning SPI_STATUS_PRESENT\n"); return SPI_STATUS_PRESENT; } diff --git a/configs/eagle100/thttpd/defconfig b/configs/eagle100/thttpd/defconfig index 9bd0ee452b5debe61b735d7dc9b3b1176c614228..191ad3376566348c55571c43caa86369fe88aab0 100644 --- a/configs/eagle100/thttpd/defconfig +++ b/configs/eagle100/thttpd/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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=y @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_LM=y # 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 @@ -102,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="tiva" +# 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 # @@ -119,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -249,11 +268,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -344,6 +366,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="thttp_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 @@ -381,9 +404,10 @@ CONFIG_NAME_MAX=32 CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # CONFIG_SCHED_WORKQUEUE is not set # CONFIG_SCHED_HPWORK is not set @@ -414,6 +438,7 @@ CONFIG_DEV_NULL=y # 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 @@ -431,8 +456,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y @@ -440,7 +480,11 @@ CONFIG_NETDEVICES=y # # General Ethernet MAC Driver Options # +# CONFIG_NETDEV_LOOPBACK is not set +# CONFIG_NETDEV_TELNET is not set # CONFIG_NETDEV_MULTINIC is not set +CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y +# CONFIG_NETDEV_LATEINIT is not set # # External Ethernet MAC Device Support @@ -450,6 +494,7 @@ CONFIG_NETDEVICES=y # CONFIG_ENCX24J600 is not set # CONFIG_NET_E1000 is not set # CONFIG_NET_SLIP is not set +# CONFIG_NET_FTMAC100 is not set # CONFIG_NET_VNET is not set # CONFIG_PIPES is not set # CONFIG_PM is not set @@ -458,6 +503,8 @@ CONFIG_NETDEVICES=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -481,13 +528,10 @@ CONFIG_UART0_SERIALDRIVER=y # 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_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_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -504,19 +548,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -540,6 +588,7 @@ CONFIG_NET_GUARDSIZE=2 # # CONFIG_NET_MULTILINK is not set CONFIG_NET_ETHERNET=y +# CONFIG_NET_LOOPBACK is not set # CONFIG_NET_TUN is not set # @@ -625,6 +674,7 @@ CONFIG_IOB_NCHAINS=8 # Routing Table Configuration # # CONFIG_NET_ROUTE is not set +CONFIG_NET_HOSTNAME="" # # Crypto API @@ -648,14 +698,10 @@ CONFIG_FS_READABLE=y # CONFIG_FS_FAT 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_PROCFS is not set - -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -675,6 +721,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -718,10 +768,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -736,14 +791,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -751,11 +805,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -764,19 +818,20 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_NSH is not set # 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD 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 @@ -785,6 +840,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_THTTPD=y @@ -793,13 +849,24 @@ CONFIG_EXAMPLES_THTTPD_DRIPADDR=0x0a000001 CONFIG_EXAMPLES_THTTPD_NETMASK=0xffffff00 # 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_UNIONFS is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # CONFIG_EXAMPLES_XMLRPC 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 # @@ -811,20 +878,24 @@ CONFIG_EXAMPLES_THTTPD_NETMASK=0xffffff00 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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_FTPD is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set CONFIG_NETUTILS_THTTPD=y @@ -859,16 +930,10 @@ CONFIG_THTTPD_IDLE_SEND_LIMIT_SEC=300 CONFIG_THTTPD_TILDE_MAP_NONE=y # CONFIG_THTTPD_GENERATE_INDICES is not set # CONFIG_THTTPD_USE_URLPATTERN is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # @@ -886,15 +951,16 @@ CONFIG_NETUTILS_NETLIB=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_POWEROFF is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/efm32-g8xx-stk/nsh/defconfig b/configs/efm32-g8xx-stk/nsh/defconfig index a3112c194cbbab6363817fb7ea7bd836626ed259..b641b4264ea57bd4bae149524a2cdd21b7469734 100644 --- a/configs/efm32-g8xx-stk/nsh/defconfig +++ b/configs/efm32-g8xx-stk/nsh/defconfig @@ -41,12 +41,15 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y @@ -78,10 +81,12 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set CONFIG_ARCH_CHIP_EFM32=y # 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 @@ -90,27 +95,52 @@ CONFIG_ARCH_CHIP_EFM32=y # 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=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="efm32" +# 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 is not set +# CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set +# CONFIG_ARM_HAVE_MPU_UNIFIED 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_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 @@ -119,6 +149,7 @@ CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y # CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL is not set # CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW is not set # CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE is not set +# CONFIG_ARMV7M_HAVE_STACKCHECK is not set # CONFIG_ARMV7M_ITMSYSLOG is not set # @@ -128,6 +159,7 @@ CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y # CONFIG_ARCH_CHIP_EFM32G880F128 is not set CONFIG_ARCH_CHIP_EFM32G890F128=y # CONFIG_ARCH_CHIP_EFM32GG332F1024 is not set +# CONFIG_ARCH_CHIP_EFM32GG990F1024 is not set # CONFIG_EFM32_EFM32TG is not set CONFIG_EFM32_EFM32G=y # CONFIG_EFM32_EFM32GG is not set @@ -139,11 +171,17 @@ CONFIG_EFM32_HAVE_USART2=y CONFIG_EFM32_HAVE_UART0=y # CONFIG_EFM32_HAVE_UART1 is not set CONFIG_EFM32_HAVE_LEUART1=y +# CONFIG_EFM32_HAVE_OTGFS is not set # CONFIG_EFM32_USART_ISUART is not set # CONFIG_EFM32_USART_ISSPI is not set # CONFIG_EFM32_UART is not set CONFIG_EFM32_LEUART=y # CONFIG_EFM32_DMA is not set +# CONFIG_EFM32_RMU is not set +# CONFIG_EFM32_FLASHPROG is not set +# CONFIG_EFM32_I2C0 is not set +# CONFIG_EFM32_I2C1 is not set +# CONFIG_EFM32_BITBAND is not set # CONFIG_EFM32_USART0 is not set # CONFIG_EFM32_USART1 is not set # CONFIG_EFM32_USART2 is not set @@ -151,7 +189,12 @@ CONFIG_EFM32_LEUART=y # CONFIG_EFM32_UART1 is not set CONFIG_EFM32_LEUART0=y # CONFIG_EFM32_LEUART1 is not set +# CONFIG_EFM32_TIMER0 is not set +# CONFIG_EFM32_TIMER1 is not set +# CONFIG_EFM32_TIMER2 is not set +# CONFIG_EFM32_TIMER3 is not set CONFIG_EFM32_GPIO_IRQ=y +# CONFIG_EFM32_LECLOCK is not set CONFIG_LEUART0_SERIAL_CONSOLE=y # CONFIG_NO_LEUART_SERIAL_CONSOLE is not set @@ -164,6 +207,7 @@ CONFIG_LEUART0_BAUD=2400 CONFIG_LEUART0_BITS=8 CONFIG_LEUART0_PARITY=0 CONFIG_LEUART0_2STOP=0 +# CONFIG_EFM32_RTC_BURTC is not set # # Architecture Options @@ -176,11 +220,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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=y # CONFIG_ARCH_IRQPRIO is not set CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set @@ -243,6 +290,7 @@ CONFIG_NSH_MMCSDMINOR=0 # EFM32 G8XX STK Hardware Configuration # # CONFIG_EFM32G8STK_BCEN is not set +# CONFIG_LIB_BOARDCTL is not set # # RTOS Features @@ -277,6 +325,7 @@ 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 @@ -327,9 +376,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -360,22 +410,43 @@ CONFIG_DEV_NULL=y # 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_TIMER 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -383,6 +454,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -406,30 +479,30 @@ CONFIG_SERIAL=y # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set CONFIG_OTHER_UART_SERIALDRIVER=y - -# -# 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 is not set -# CONFIG_UART0_SERIAL_CONSOLE is not set CONFIG_OTHER_SERIAL_CONSOLE=y # CONFIG_NO_SERIAL_CONSOLE is not set -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_OFLOWCONTROL 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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -458,11 +531,7 @@ CONFIG_DISABLE_MOUNTPOINT=y CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_RAMMAP is not set # CONFIG_FS_PROCFS is not set - -# -# System Logging -# -# CONFIG_SYSLOG is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -482,6 +551,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -506,6 +579,7 @@ CONFIG_NUNGET_CHARS=2 # 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 @@ -517,13 +591,18 @@ CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 # CONFIG_LIBC_STRERROR is not set # CONFIG_LIBC_PERROR_STDOUT is not set CONFIG_ARCH_LOWPUTC=y +# 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_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -538,14 +617,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -553,11 +631,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -565,75 +643,77 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 # 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 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_UDP 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_WEBSERVER 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_MICROPYTHON is not set # CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # # 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 # CONFIG_NETUTILS_SMTP is not set -# CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_NETLIB is not set -# CONFIG_NETUTILS_WEBCLIENT is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -651,13 +731,16 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -666,8 +749,10 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -675,6 +760,7 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -684,8 +770,10 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -712,6 +800,8 @@ CONFIG_NSH_FILEIOSIZE=256 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 @@ -725,113 +815,20 @@ CONFIG_NSH_CONSOLE=y # # System Libraries and NSH Add-Ons # - -# -# Custom Free Memory Command -# -# CONFIG_SYSTEM_FREE is not set - -# -# EMACS-like Command Line Editor -# CONFIG_SYSTEM_CLE=y CONFIG_SYSTEM_CLE_DEBUGLEVEL=0 - -# -# FLASH Program Installation -# -# CONFIG_SYSTEM_INSTALL is not set - -# -# FLASH Erase-all Command -# - -# -# Intel HEX to binary conversion -# +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set - -# -# I2C tool -# - -# -# INI File Parser -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# NxPlayer media player library / command Line -# -# CONFIG_SYSTEM_NXPLAYER is not set - -# -# RAM test -# +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set - -# -# readline() -# +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y - -# -# P-Code Support -# - -# -# PHY Tool -# - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sudoku -# +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set - -# -# Sysinfo -# - -# -# VI Work-Alike Editor -# +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set - -# -# Stack Monitor -# - -# -# USB CDC/ACM Device Commands -# - -# -# USB Composite Device Commands -# - -# -# USB Mass Storage Device Commands -# - -# -# USB Monitor -# - -# -# Zmodem Commands -# # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/efm32-g8xx-stk/src/efm32_autoleds.c b/configs/efm32-g8xx-stk/src/efm32_autoleds.c index 5c3164671215108fddfd9b6cc290128c3536fa49..086f7f32e4973b91d046102a6d2903deac4509ee 100644 --- a/configs/efm32-g8xx-stk/src/efm32_autoleds.c +++ b/configs/efm32-g8xx-stk/src/efm32_autoleds.c @@ -59,18 +59,6 @@ * 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 - /* The following definitions map the encoded LED setting to GPIO settings */ #define EFM32_LED0 (1 << 0) diff --git a/configs/efm32-g8xx-stk/src/efm32_userleds.c b/configs/efm32-g8xx-stk/src/efm32_userleds.c index d21868ea62ef1efb460da039b1ff8ec3433b7ee0..31125325ebe39512552a1f3e8d9921fe32601b25 100644 --- a/configs/efm32-g8xx-stk/src/efm32_userleds.c +++ b/configs/efm32-g8xx-stk/src/efm32_userleds.c @@ -55,22 +55,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data ****************************************************************************/ diff --git a/configs/efm32gg-stk3700/nsh/defconfig b/configs/efm32gg-stk3700/nsh/defconfig index d8d3ea37a76efbc45c3803bbe10b4a3a8d8d228c..74c43841d3d97ea5d0c24b5820e4d9e29546d97b 100644 --- a/configs/efm32gg-stk3700/nsh/defconfig +++ b/configs/efm32gg-stk3700/nsh/defconfig @@ -41,14 +41,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -79,10 +81,12 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set CONFIG_ARCH_CHIP_EFM32=y # 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 @@ -91,10 +95,15 @@ CONFIG_ARCH_CHIP_EFM32=y # 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 @@ -104,14 +113,25 @@ CONFIG_ARCH_CORTEXM3=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="efm32" +# 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 is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set +# CONFIG_ARM_HAVE_MPU_UNIFIED is not set # # ARMV7M Configuration Options @@ -120,6 +140,7 @@ CONFIG_ARMV7M_CMNVECTOR=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 @@ -157,8 +178,10 @@ CONFIG_EFM32_HAVE_OTGFS=y CONFIG_EFM32_LEUART=y # CONFIG_EFM32_DMA is not set # CONFIG_EFM32_RMU is not set +# CONFIG_EFM32_FLASHPROG is not set # CONFIG_EFM32_I2C0 is not set # CONFIG_EFM32_I2C1 is not set +# CONFIG_EFM32_BITBAND is not set # CONFIG_EFM32_USART0 is not set # CONFIG_EFM32_USART1 is not set # CONFIG_EFM32_USART2 is not set @@ -197,11 +220,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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=y # CONFIG_ARCH_IRQPRIO is not set CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set @@ -299,6 +325,7 @@ 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 @@ -349,9 +376,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -382,6 +410,7 @@ CONFIG_DEV_NULL=y # 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 @@ -399,8 +428,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -410,6 +454,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -433,14 +479,11 @@ CONFIG_SERIAL=y # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set CONFIG_OTHER_UART_SERIALDRIVER=y - -# -# 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 is not set CONFIG_OTHER_SERIAL_CONSOLE=y # CONFIG_NO_SERIAL_CONSOLE is not set @@ -448,15 +491,18 @@ CONFIG_OTHER_SERIAL_CONSOLE=y # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -485,12 +531,7 @@ CONFIG_DISABLE_MOUNTPOINT=y CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_RAMMAP is not set # CONFIG_FS_PROCFS is not set - -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -510,6 +551,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -550,10 +595,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -568,14 +617,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -583,11 +631,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -595,19 +643,19 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD 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 @@ -615,15 +663,24 @@ CONFIG_EXAMPLES_NSH=y # 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_THTTPD 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -635,32 +692,28 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_PPPD is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -678,6 +731,7 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -686,6 +740,7 @@ 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 @@ -694,8 +749,10 @@ CONFIG_NSH_DISABLE_DATE=y # 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 @@ -713,8 +770,10 @@ CONFIG_NSH_DISABLE_DATE=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 # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set @@ -741,6 +800,8 @@ CONFIG_NSH_FILEIOSIZE=256 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 @@ -754,17 +815,20 @@ CONFIG_NSH_CONSOLE=y # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set CONFIG_SYSTEM_CLE=y CONFIG_SYSTEM_CLE_DEBUGLEVEL=0 # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y -# CONFIG_SYSTEM_POWEROFF is not set +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/efm32gg-stk3700/src/efm32_autoleds.c b/configs/efm32gg-stk3700/src/efm32_autoleds.c index 4b1cf4dfdf8367f08a290f2a107cbf43bd4485ed..4500f4e8392440ae9a612f649e7fff9fa0958cc9 100644 --- a/configs/efm32gg-stk3700/src/efm32_autoleds.c +++ b/configs/efm32gg-stk3700/src/efm32_autoleds.c @@ -89,30 +89,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/efm32gg-stk3700/src/efm32_userleds.c b/configs/efm32gg-stk3700/src/efm32_userleds.c index 10b4f4df9bb98368426f3d4b0dec4cfbc764afaf..9e30b55a89e85b9997fbc2acdfa5691cca472ba9 100644 --- a/configs/efm32gg-stk3700/src/efm32_userleds.c +++ b/configs/efm32gg-stk3700/src/efm32_userleds.c @@ -66,22 +66,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/ekk-lm3s9b96/nsh/defconfig b/configs/ekk-lm3s9b96/nsh/defconfig index 3d89e90c42e91ae0a06d3f4c26c4b9a12f41ad91..ee98426b9e0dd131da79bf9363d1ae4ab536a5dd 100644 --- a/configs/ekk-lm3s9b96/nsh/defconfig +++ b/configs/ekk-lm3s9b96/nsh/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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=y @@ -93,7 +96,9 @@ CONFIG_ARCH_CHIP_LM=y # 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 @@ -104,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="tiva" +# 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 # @@ -121,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 +264,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set CONFIG_ARCH_HAVE_MPU=y @@ -405,9 +423,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -448,6 +467,10 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_CMDDATA is not set CONFIG_SPI_CALLBACK=y # CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_HWFEATURES is not set +# CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -461,7 +484,21 @@ CONFIG_SPI_CALLBACK=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=0 # CONFIG_MMCSD_READONLY is not set @@ -473,6 +510,7 @@ CONFIG_MMCSD_SPICLOCK=20000000 CONFIG_MMCSD_SPIMODE=0 # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set # CONFIG_MTD is not set # CONFIG_EEPROM is not set CONFIG_NETDEVICES=y @@ -506,6 +544,8 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -529,10 +569,6 @@ CONFIG_UART0_SERIALDRIVER=y # 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 @@ -559,15 +595,18 @@ CONFIG_UART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -708,7 +747,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_NFS=y # CONFIG_NFS_STATISTICS is not set # CONFIG_FS_NXFFS is not set @@ -718,12 +759,6 @@ CONFIG_NFS=y # 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 # @@ -742,6 +777,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -787,6 +826,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 @@ -794,12 +835,14 @@ CONFIG_NETDB_DNSCLIENT_ENTRIES=8 CONFIG_NETDB_DNSCLIENT_NAMESIZE=32 CONFIG_NETDB_DNSCLIENT_LIFESEC=3600 CONFIG_NETDB_DNSCLIENT_MAXRESPONSE=96 +# CONFIG_NETDB_RESOLVCONF is not set CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_NETDB_DNSSERVER_IPv4 is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -820,18 +863,20 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # 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_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -841,18 +886,19 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y 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_NXTERM 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_PPPD 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 @@ -860,22 +906,29 @@ CONFIG_EXAMPLES_NSH=y # 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_UDP is not set # 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_WEBSERVER is not set # CONFIG_EXAMPLES_WGET 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 @@ -888,8 +941,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -901,25 +954,27 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -938,6 +993,7 @@ CONFIG_NSH_NESTDEPTH=3 # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_ARP is not set # CONFIG_NSH_DISABLE_BASENAME is not set # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set @@ -981,6 +1037,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 @@ -1013,6 +1070,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1041,6 +1099,8 @@ CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048 CONFIG_NSH_TELNETD_CLIENTPRIO=100 CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048 CONFIG_NSH_IOBUFFER_SIZE=512 +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # CONFIG_NSH_TELNET_LOGIN is not set # @@ -1055,13 +1115,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1070,5 +1129,6 @@ 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/ekk-lm3s9b96/src/lm_ethernet.c b/configs/ekk-lm3s9b96/src/lm_ethernet.c index 622a972b3ea9864273ab3d8a596100118719dcf3..3c9cca9d6e4d16b71c95166f0da360232279e96b 100644 --- a/configs/ekk-lm3s9b96/src/lm_ethernet.c +++ b/configs/ekk-lm3s9b96/src/lm_ethernet.c @@ -84,10 +84,10 @@ void tiva_ethernetmac(struct ether_addr *ethaddr) user0 = getreg32(TIVA_FLASH_USERREG0); user1 = getreg32(TIVA_FLASH_USERREG1); - nlldbg("user: %06x:%06x\n", user1 & 0x00ffffff, user0 & 0x00ffffff); + ninfo("user: %06x:%06x\n", user1 & 0x00ffffff, user0 & 0x00ffffff); DEBUGASSERT(user0 != 0xffffffff && user1 != 0xffffffff); - /* Re-format that MAC address the way that uIP expects to see it */ + /* Re-format that MAC address the way that the network expects to see it */ ethaddr->ether_addr_octet[0] = ((user0 >> 0) & 0xff); ethaddr->ether_addr_octet[1] = ((user0 >> 8) & 0xff); diff --git a/configs/ekk-lm3s9b96/src/lm_leds.c b/configs/ekk-lm3s9b96/src/lm_leds.c index 0cee2dc4a83df3798743e89bb88c8b298b790481..f2e4022717de7c7f47ce9a8592e5775f197f94dc 100644 --- a/configs/ekk-lm3s9b96/src/lm_leds.c +++ b/configs/ekk-lm3s9b96/src/lm_leds.c @@ -56,21 +56,9 @@ * 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 - /* Dump GPIO registers */ -#ifdef CONFIG_DEBUG_LEDS +#ifdef CONFIG_DEBUG_LEDS_INFO # define led_dumpgpio(m) tiva_dumpgpio(LED_GPIO, m) #else # define led_dumpgpio(m) @@ -80,16 +68,12 @@ * Private Data ****************************************************************************/ -/**************************************************************************** - * Private Functions - ****************************************************************************/ +static uint8_t g_nest; /**************************************************************************** * Public Functions ****************************************************************************/ -static uint8_t g_nest; - /**************************************************************************** * Name: board_autoled_initialize ****************************************************************************/ @@ -97,7 +81,7 @@ static uint8_t g_nest; #ifdef CONFIG_ARCH_LEDS void board_autoled_initialize(void) { - leddbg("Initializing\n"); + ledinfo("Initializing\n"); /* Configure Port D, Bit 0 as an output, initial value=OFF */ diff --git a/configs/ekk-lm3s9b96/src/lm_ssi.c b/configs/ekk-lm3s9b96/src/lm_ssi.c index e2a26bc1b50ca233b97f4cf41b615fbc484b416a..911e923e848877fd146842a733a1c98c927621a1 100644 --- a/configs/ekk-lm3s9b96/src/lm_ssi.c +++ b/configs/ekk-lm3s9b96/src/lm_ssi.c @@ -58,38 +58,14 @@ * Pre-processor Definitions ************************************************************************************/ -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SSI_DEBUG /* Define to enable debug */ -#undef SSI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SSI_DEBUG -# define ssidbg lldbg -# ifdef SSI_VERBOSE -# define ssivdbg lldbg -# else -# define ssivdbg(x...) -# endif -#else -# undef SSI_VERBOSE -# define ssidbg(x...) -# define ssivdbg(x...) -#endif +/* CONFIG_DEBUG_SPI enables debug output from this file */ -/* Dump GPIO registers */ - -#ifdef SSI_VERBOSE -#if 0 +#ifdef CONFIG_DEBUG_SPI # define ssi_dumpgpio(m) tiva_dumpgpio(SDCCS_GPIO, m) -#endif #else # define ssi_dumpgpio(m) #endif -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -133,7 +109,7 @@ void weak_function lm_ssidev_initialize(void) void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - ssidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); ssi_dumpgpio("tiva_ssiselect() Entry"); if (devid == SPIDEV_MMCSD) { @@ -154,7 +130,7 @@ void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool select uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - ssidbg("Returning SPI_STATUS_PRESENT\n"); + spiinfo("Returning SPI_STATUS_PRESENT\n"); return SPI_STATUS_PRESENT; } #endif diff --git a/configs/ez80f910200kitg/ostest/defconfig b/configs/ez80f910200kitg/ostest/defconfig index 106998a223d69f96f4e320016ccab8b5833f9c85..cdd48e8e119f2736c03a38683742d2234c93d50c 100644 --- a/configs/ez80f910200kitg/ostest/defconfig +++ b/configs/ez80f910200kitg/ostest/defconfig @@ -46,9 +46,9 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_HEAPCHECK is not set -# CONFIG_DEBUG_VERBOSE is not set +# CONFIG_DEBUG_INFO is not set # # Subsystem Debug Options @@ -441,7 +441,7 @@ CONFIG_UART0_2STOP=0 # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -474,7 +474,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/ez80f910200zco/dhcpd/defconfig b/configs/ez80f910200zco/dhcpd/defconfig index 615994d436c0f79c09f3c77e0ab503afb9a93786..a46d8181611f064087b4d44e67c78c85a7c83ed3 100644 --- a/configs/ez80f910200zco/dhcpd/defconfig +++ b/configs/ez80f910200zco/dhcpd/defconfig @@ -46,9 +46,9 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_HEAPCHECK is not set -# CONFIG_DEBUG_VERBOSE is not set +# CONFIG_DEBUG_INFO is not set # # Subsystem Debug Options @@ -487,7 +487,7 @@ CONFIG_UART0_2STOP=0 # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -620,7 +620,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/ez80f910200zco/httpd/defconfig b/configs/ez80f910200zco/httpd/defconfig index fe55d601b7796bf758a8aa5fdf60bed8a702e269..1d8f5613c8836443970d6497fce4047fd5303c8d 100644 --- a/configs/ez80f910200zco/httpd/defconfig +++ b/configs/ez80f910200zco/httpd/defconfig @@ -46,9 +46,9 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_HEAPCHECK is not set -# CONFIG_DEBUG_VERBOSE is not set +# CONFIG_DEBUG_INFO is not set # # Subsystem Debug Options @@ -496,7 +496,7 @@ CONFIG_UART0_2STOP=0 # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -634,7 +634,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/ez80f910200zco/nettest/defconfig b/configs/ez80f910200zco/nettest/defconfig index 66eb97ef721233512b70adbbedf1de2d19c9acac..0975adabd05c7c4bac8076ceec021e2c323b96b3 100644 --- a/configs/ez80f910200zco/nettest/defconfig +++ b/configs/ez80f910200zco/nettest/defconfig @@ -46,9 +46,9 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_HEAPCHECK is not set -# CONFIG_DEBUG_VERBOSE is not set +# CONFIG_DEBUG_INFO is not set # # Subsystem Debug Options @@ -488,7 +488,7 @@ CONFIG_UART0_2STOP=0 # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -626,7 +626,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/ez80f910200zco/nsh/defconfig b/configs/ez80f910200zco/nsh/defconfig index 4ddd6319825d612e6233e33823ffc36cbd5963f0..241877ecd1bc85565876d3f6fb48092204d4f1ec 100644 --- a/configs/ez80f910200zco/nsh/defconfig +++ b/configs/ez80f910200zco/nsh/defconfig @@ -46,14 +46,13 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_HEAPCHECK is not set -# CONFIG_DEBUG_VERBOSE is not set +# CONFIG_DEBUG_INFO is not set # # Subsystem Debug Options # -# CONFIG_DEBUG_AUDIO is not set # CONFIG_DEBUG_BINFMT is not set # CONFIG_DEBUG_FS is not set # CONFIG_DEBUG_GRAPHICS is not set @@ -159,6 +158,8 @@ CONFIG_EZ80_UART0=y # CONFIG_EZ80_UART2 is not set CONFIG_EZ80_EMAC=y CONFIG_EZ80_TOOLCHAIN_ZDSII=y +# CONFIG_EZ80_ZDSII_V511 is not set +CONFIG_EZ80_ZDSII_V521=y CONFIG_EZ80_FIAD=0x1f CONFIG_EZ80_PHYCONFIG=1 CONFIG_EZ80_RAMADDR=0xf7c000 @@ -181,6 +182,7 @@ CONFIG_ARCH_TIMERHOOK=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 is not set # CONFIG_ARCH_HAVE_VFORK is not set # CONFIG_ARCH_HAVE_MMU is not set # CONFIG_ARCH_HAVE_MPU is not set @@ -375,12 +377,18 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD 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 @@ -461,10 +469,6 @@ CONFIG_UART0_SERIALDRIVER=y # 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 @@ -500,7 +504,7 @@ CONFIG_UART0_2STOP=0 # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -650,7 +654,6 @@ CONFIG_NET_HOSTNAME="" # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # @@ -673,6 +676,10 @@ CONFIG_HEAP2_SIZE=0 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -716,6 +723,7 @@ 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 is not set CONFIG_LIBC_NETDB=y CONFIG_NETDB_DNSCLIENT=y CONFIG_NETDB_DNSCLIENT_ENTRIES=4 @@ -752,14 +760,15 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_EXAMPLES_CONFIGDATA is not set # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -769,18 +778,19 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y 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_NXTERM 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_PPPD 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 @@ -788,17 +798,16 @@ CONFIG_EXAMPLES_NSH=y # 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_UDP is not set # 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_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # @@ -806,6 +815,11 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_FSUTILS_INIFILE is not set +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + # # Graphics Support # @@ -816,8 +830,8 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -830,20 +844,21 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -868,6 +883,7 @@ CONFIG_NSH_NESTDEPTH=3 # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_ARP is not set # CONFIG_NSH_DISABLE_BASENAME is not set # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set @@ -942,6 +958,7 @@ CONFIG_NSH_CONSOLE=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # CONFIG_NSH_NETINIT_DEBUG is not set @@ -987,12 +1004,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1001,6 +1018,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/ez80f910200zco/poll/defconfig b/configs/ez80f910200zco/poll/defconfig index b8effce8d09057c96914f52328c370b996fe13d9..f24325f5771ad97de34d67c7362db98567b8a041 100644 --- a/configs/ez80f910200zco/poll/defconfig +++ b/configs/ez80f910200zco/poll/defconfig @@ -46,9 +46,9 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_HEAPCHECK is not set -# CONFIG_DEBUG_VERBOSE is not set +# CONFIG_DEBUG_INFO is not set # # Subsystem Debug Options @@ -495,7 +495,7 @@ CONFIG_UART0_2STOP=0 # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -633,7 +633,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/fire-stm32v2/README.txt b/configs/fire-stm32v2/README.txt index 3af6249e505509a87651e64b831445f76b48898f..d0084461184c07b446132a6c7fb9d73e703d4fbe 100644 --- a/configs/fire-stm32v2/README.txt +++ b/configs/fire-stm32v2/README.txt @@ -758,7 +758,7 @@ M3 Wildfire-specific Configuration Options 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 + CONFIG_STM32_CAN_REGDEBUG - If CONFIG_DEBUG_FEATURES is set, this will generate an dump of all CAN registers. M3 Wildfire LCD Hardware Configuration diff --git a/configs/fire-stm32v2/include/board.h b/configs/fire-stm32v2/include/board.h index 880ea6d6c7de7f224cfe1a983790f4cf503ca59d..0f9e7c11aafed314146783d33735e54103893010 100644 --- a/configs/fire-stm32v2/include/board.h +++ b/configs/fire-stm32v2/include/board.h @@ -2,7 +2,7 @@ * configs/fire-stm32v2/include/board.h * include/arch/board/board.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 @@ -103,14 +103,14 @@ #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) */ +/* APB1 timers 2-7 will be twice 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) +#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) /* USB divider -- Divide PLL clock by 1.5 */ @@ -120,8 +120,14 @@ * 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 +#define BOARD_TIM1_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM2_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM3_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM4_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM5_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM6_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM7_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM8_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 diff --git a/configs/fire-stm32v2/nsh/defconfig b/configs/fire-stm32v2/nsh/defconfig index c45b204918de71bde09695eb5fe6cb088b150d7c..425af3af490fe6cf99f6ac83fc17cea333f4deea 100644 --- a/configs/fire-stm32v2/nsh/defconfig +++ b/configs/fire-stm32v2/nsh/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -209,6 +211,7 @@ CONFIG_SDIO_DMA=y CONFIG_ARCH_CHIP_STM32F103VE=y # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -424,6 +427,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_DMACAPABLE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -435,12 +442,20 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device 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 + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -721,6 +736,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -741,7 +758,12 @@ CONFIG_RTC=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -749,6 +771,7 @@ CONFIG_RTC=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -804,6 +827,8 @@ CONFIG_ENC28J60_FREQUENCY=20000000 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -902,15 +927,18 @@ CONFIG_USBMSC_SCSI_STACKSIZE=2048 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -1064,12 +1092,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -1153,6 +1175,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1182,15 +1205,16 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_CONFIGDATA is not set # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1200,17 +1224,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1218,8 +1242,8 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1227,11 +1251,10 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # 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_WEBSERVER is not set # # File System Utilities @@ -1255,8 +1278,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1269,21 +1292,21 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1385,6 +1408,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1429,11 +1453,11 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=1 CONFIG_I2CTOOL_MAXBUS=2 @@ -1441,7 +1465,7 @@ CONFIG_I2CTOOL_MINADDR=0x03 CONFIG_I2CTOOL_MAXADDR=0x77 CONFIG_I2CTOOL_MAXREGADDR=0xff CONFIG_I2CTOOL_DEFFREQ=100000 -# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1450,7 +1474,6 @@ 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_USBMSC=y CONFIG_SYSTEM_USBMSC_NLUNS=1 @@ -1463,4 +1486,5 @@ CONFIG_SYSTEM_USBMSC_DEVPATH3="/dev/mmcsd2" # CONFIG_SYSTEM_USBMSC_DEBUGMM is not set CONFIG_SYSTEM_USBMSC_CMD_STACKSIZE=768 CONFIG_SYSTEM_USBMSC_CMD_PRIORITY=100 +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/fire-stm32v2/src/stm32_appinit.c b/configs/fire-stm32v2/src/stm32_appinit.c index e8711ef204a3925fa0ed4b3f8b7cf9e83cdda6e4..aa962b5b77e84b955eeaf8d8bceb0360a9383c37 100644 --- a/configs/fire-stm32v2/src/stm32_appinit.c +++ b/configs/fire-stm32v2/src/stm32_appinit.c @@ -147,14 +147,14 @@ static void stm32_i2c_register(int bus) i2c = stm32_i2cbus_initialize(bus); if (i2c == NULL) { - dbg("ERROR: Failed to get I2C%d interface\n", bus); + _err("ERROR: Failed to get I2C%d interface\n", bus); } else { ret = i2c_register(i2c, bus); if (ret < 0) { - dbg("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); + _err("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); stm32_i2cbus_uninitialize(i2c); } } diff --git a/configs/fire-stm32v2/src/stm32_autoleds.c b/configs/fire-stm32v2/src/stm32_autoleds.c index 82501996013ccb66ca243d5712c8c2ca1fdff1b3..b61c84013b40729a26f49029ca30c7b58efc9c2c 100644 --- a/configs/fire-stm32v2/src/stm32_autoleds.c +++ b/configs/fire-stm32v2/src/stm32_autoleds.c @@ -57,18 +57,6 @@ * 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 - /* The following definitions map the encoded LED setting to GPIO settings. * * OFFBITS ONBITS diff --git a/configs/fire-stm32v2/src/stm32_enc28j60.c b/configs/fire-stm32v2/src/stm32_enc28j60.c index 40d7954b69cc818f178918d399dc1df9659a78a4..cd5ee2c6b31631b06c07c4fa913ba1a0d62ffc81 100644 --- a/configs/fire-stm32v2/src/stm32_enc28j60.c +++ b/configs/fire-stm32v2/src/stm32_enc28j60.c @@ -188,7 +188,7 @@ void up_netinitialize(void) spi = stm32_spibus_initialize(ENC28J60_SPI_PORTNO); if (!spi) { - nlldbg("Failed to initialize SPI port %d\n", ENC28J60_SPI_PORTNO); + nerr("ERROR: Failed to initialize SPI port %d\n", ENC28J60_SPI_PORTNO); return; } @@ -201,12 +201,12 @@ void up_netinitialize(void) ret = enc_initialize(spi, &g_enclower.lower, ENC28J60_DEVNO); if (ret < 0) { - nlldbg("Failed to bind SPI port %d ENC28J60 device %d: %d\n", - ENC28J60_SPI_PORTNO, ENC28J60_DEVNO, ret); + nerr("ERROR: Failed to bind SPI port %d ENC28J60 device %d: %d\n", + ENC28J60_SPI_PORTNO, ENC28J60_DEVNO, ret); return; } - nllvdbg("Bound SPI port %d to ENC28J60 device %d\n", + ninfo("Bound SPI port %d to ENC28J60 device %d\n", ENC28J60_SPI_PORTNO, ENC28J60_DEVNO); } diff --git a/configs/fire-stm32v2/src/stm32_mmcsd.c b/configs/fire-stm32v2/src/stm32_mmcsd.c index 356be40d55a0e64a8db2c80d15eebc13616135ce..a29276836c190a9535dfc3e05c19bf761f3264a1 100644 --- a/configs/fire-stm32v2/src/stm32_mmcsd.c +++ b/configs/fire-stm32v2/src/stm32_mmcsd.c @@ -93,22 +93,22 @@ int stm32_sdinitialize(int minor) sdio = sdio_initialize(STM32_MMCSDSLOTNO); if (!sdio) { - fdbg("Failed to initialize SDIO slot %d\n", STM32_MMCSDSLOTNO); + ferr("ERROR: Failed to initialize SDIO slot %d\n", STM32_MMCSDSLOTNO); return -ENODEV; } - fvdbg("Initialized SDIO slot %d\n", STM32_MMCSDSLOTNO); + finfo("Initialized SDIO slot %d\n", STM32_MMCSDSLOTNO); /* Now bind the SDIO interface to the MMC/SD driver */ ret = mmcsd_slotinitialize(minor, sdio); if (ret != OK) { - fdbg("Failed to bind SDIO slot %d to the MMC/SD driver, minor=%d\n", + ferr("ERROR: Failed to bind SDIO slot %d to the MMC/SD driver, minor=%d\n", STM32_MMCSDSLOTNO, minor); } - fvdbg("Bound SDIO slot %d to the MMC/SD driver, minor=%d\n", + finfo("Bound SDIO slot %d to the MMC/SD driver, minor=%d\n", STM32_MMCSDSLOTNO, minor); /* Then let's guess and say that there is a card in the slot. I need to check to diff --git a/configs/fire-stm32v2/src/stm32_spi.c b/configs/fire-stm32v2/src/stm32_spi.c index e5f049795728029ebfeb716bfbd135437f945349..8d28ceb07a551d7d675ae76b81d31a9c44f3859f 100644 --- a/configs/fire-stm32v2/src/stm32_spi.c +++ b/configs/fire-stm32v2/src/stm32_spi.c @@ -53,32 +53,6 @@ #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -159,7 +133,7 @@ void weak_function stm32_spidev_initialize(void) #ifdef CONFIG_STM32_SPI1 void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #if 0 /* Need to study this */ if (devid == SPIDEV_LCD) @@ -196,7 +170,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI2 void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); if (devid == SPIDEV_AUDIO) { diff --git a/configs/fire-stm32v2/src/stm32_usbdev.c b/configs/fire-stm32v2/src/stm32_usbdev.c index 5beea44b78ba620f2501536aa7606e2dec1320c0..ea3ee830545f849fafda28f4c119fdebb1443e1b 100644 --- a/configs/fire-stm32v2/src/stm32_usbdev.c +++ b/configs/fire-stm32v2/src/stm32_usbdev.c @@ -114,6 +114,5 @@ int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } - diff --git a/configs/fire-stm32v2/src/stm32_userleds.c b/configs/fire-stm32v2/src/stm32_userleds.c index 5d5adeb2ecb4630d7b24c22dc02dd5db015efb5e..a327df7fe80e396571503abbd91b98e051faad30 100644 --- a/configs/fire-stm32v2/src/stm32_userleds.c +++ b/configs/fire-stm32v2/src/stm32_userleds.c @@ -53,22 +53,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data ****************************************************************************/ @@ -79,10 +63,6 @@ static uint32_t g_ledcfg[BOARD_NLEDS] = GPIO_LED1, GPIO_LED2, GPIO_LED3 }; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/fire-stm32v2/src/stm32_w25.c b/configs/fire-stm32v2/src/stm32_w25.c index 3fad2929b24b183ae2448412f97b93a284f2805e..34940b5c62f122d6df8be34c464dc8994921b439 100644 --- a/configs/fire-stm32v2/src/stm32_w25.c +++ b/configs/fire-stm32v2/src/stm32_w25.c @@ -106,7 +106,7 @@ int stm32_w25initialize(int minor) spi = stm32_spibus_initialize(1); if (!spi) { - fdbg("ERROR: Failed to initialize SPI port 2\n"); + ferr("ERROR: Failed to initialize SPI port 2\n"); return -ENODEV; } @@ -115,7 +115,7 @@ int stm32_w25initialize(int minor) mtd = w25_initialize(spi); if (!mtd) { - fdbg("ERROR: Failed to bind SPI port 2 to the SST 25 FLASH driver\n"); + ferr("ERROR: Failed to bind SPI port 2 to the SST 25 FLASH driver\n"); return -ENODEV; } @@ -125,7 +125,7 @@ int stm32_w25initialize(int minor) ret = ftl_initialize(minor, mtd); if (ret < 0) { - fdbg("ERROR: Initialize the FTL layer\n"); + ferr("ERROR: Initialize the FTL layer\n"); return ret; } #else @@ -134,7 +134,7 @@ int stm32_w25initialize(int minor) ret = nxffs_initialize(mtd); if (ret < 0) { - fdbg("ERROR: NXFFS initialization failed: %d\n", -ret); + ferr("ERROR: NXFFS initialization failed: %d\n", -ret); return ret; } @@ -144,7 +144,7 @@ int stm32_w25initialize(int minor) ret = mount(NULL, devname, "nxffs", 0, NULL); if (ret < 0) { - fdbg("ERROR: Failed to mount the NXFFS volume: %d\n", errno); + ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno); return ret; } #endif diff --git a/configs/freedom-kl25z/README.txt b/configs/freedom-kl25z/README.txt index 23390503de5619959df6e77195d80267334cacc2..a4a806dd4822e9302ac44c592ec1e8bcd3d3bf5c 100644 --- a/configs/freedom-kl25z/README.txt +++ b/configs/freedom-kl25z/README.txt @@ -301,6 +301,91 @@ Where is one of the following: configuration. This configuration has far fewer features than the nsh configuration but is also a fraction of the size. + 2016-06-21: + $ arm-none-eabi-size nuttx + text data bss dec hex filename + 12282 196 736 13214 339e nuttx + + This minnsh configuration is a "proof-of-concept" and not very usable in + its current state. This configuration was created by disabling + everything possible INCLUDING file system support. Without file system + support, NuttX is pretty much crippled. Here are some of the + consequences of disabling the file system: + + - All features that depend on the file system are lost: device drivers, + mountpoints, message queues, named semaphores. + + - Without device drivers, you cannot interact with the RTOS using POSIX + interfaces. You would have to work with NuttX as with those other + tiny RTOSs: As a scheduler and a callable hardare abstraction layer + (HAL). + + - You cannot use any of the NuttX upper half device drivers since they + depend on the pseudo-file system and device nodes. You can, of + course, continue to use the lower half drivers either directly. Or, + perhaps, you could write some custom minnsh upper half drivers that + do not depend on a file system and expose a HAL interface. + + There is a special version of readline() the NSH uses when there is no + file system. It uses a special up_putc() to write data to the console + and a special function up_getc() to read data from the console. + + - The current up_getc() implementationsa are a kludge. They are + analogous to the up_putc() implementations: They directly poll the + hardware for serial availability, locking up all lower priority tasks + in the entire system while they poll. So a version of NSH that uses + up_getc() essentially blocks the system until a character is received. + + This, of course, could be fixed by creating a special, upper half + implementation of the interrupt-driven serial lower half (like + stm32_serial) that just supports single character console I/O + (perhaps called up_putc and up_getc?). The NSH could wait for serial + input without blocking the system. But then that would increase the + footprint too. + + So although the minnsh configurations are a good starting point for + making things small, they not are really very practical. Why might + you want a NuttX minnsh solution? Perhaps you have software that runs + on a family of chips including some very tiny MCUs. Then perhaps having + the RTOS compatibility would justify the loss of functionality? + + You can re-enable the file system and (true) serial console with + these settings: + + Enable the file system: + CONFIG_NFILE_DESCRIPTORS=5 + CONFIG_NFILE_STREAMS=5 + + Enable the console device: + CONFIG_DEV_CONSOLE=y + + Disable most new NSH commands. Some like 'ls' are really mandatory + with a file system: + CONFIG_NSH_DISABLE_xxx=y + + Enable the upper half serial driver: + CONFIG_SERIAL=y + CONFIG_STANDARD_SERIAL=y + + Enable the USART1 serial driver: + CONFIG_STM32_USART1=y + CONFIG_STM32_USART1_SERIALDRIVER=y + CONFIG_USART1_SERIAL_CONSOLE=y + + CONFIG_USART1_2STOP=0 + CONFIG_USART1_BAUD=115200 + CONFIG_USART1_BITS=8 + CONFIG_USART1_PARITY=0 + CONFIG_USART1_RXBUFSIZE=16 + CONFIG_USART1_TXBUFSIZE=16 + + With these changes, NSH should behave better and we preserve the device + driver interface. But this result in a total size increase of about + 7KB: That is about 5KB of additional OS support for the file system and + serial console PLUS about 2KB for the 'ls' command logic (including OS + support for opendir(), readdir(), closedir(), stat(), and probably other + things). + nsh: --- Configures the NuttShell (nsh) located at apps/examples/nsh. The diff --git a/configs/freedom-kl25z/minnsh/defconfig b/configs/freedom-kl25z/minnsh/defconfig index 753da383ba15156eba3a67e897e077e411ef8e1c..0b7545d9c15ab4fd4a647c3916c637bf57bfac52 100644 --- a/configs/freedom-kl25z/minnsh/defconfig +++ b/configs/freedom-kl25z/minnsh/defconfig @@ -37,12 +37,15 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_ALERT is not set +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y @@ -74,10 +77,12 @@ 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=y # 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 @@ -86,22 +91,42 @@ CONFIG_ARCH_CHIP_KL=y # 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=y # 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 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="armv6-m" CONFIG_ARCH_CHIP="kl" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set # # ARMV6M Configuration Options @@ -115,7 +140,9 @@ CONFIG_ARMV6M_TOOLCHAIN_GNU_EABIL=y # # Kinetis Configuration Options # +# CONFIG_ARCH_CHIP_MKL25Z64 is not set CONFIG_ARCH_CHIP_MKL25Z128=y +# CONFIG_ARCH_CHIP_MKL26Z128 is not set CONFIG_ARCH_FAMILY_KL2X=y # @@ -174,11 +201,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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=y # CONFIG_ARCH_IRQPRIO is not set # CONFIG_ARCH_STACKDUMP is not set # CONFIG_ENDIAN_BIG is not set @@ -232,6 +262,7 @@ CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_LIB_BOARDCTL is not set # # RTOS Features @@ -261,11 +292,13 @@ CONFIG_PREALLOC_TIMERS=0 # # Tasks and Scheduling # +# CONFIG_SPINLOCK is not set # CONFIG_INIT_NONE is not set CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="nsh_main" CONFIG_RR_INTERVAL=0 +# CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=0 CONFIG_MAX_TASKS=8 # CONFIG_SCHED_HAVE_PARENT is not set @@ -296,9 +329,10 @@ CONFIG_NAME_MAX=32 # CONFIG_SCHED_STARTHOOK is not set # CONFIG_SCHED_ATEXIT is not set # CONFIG_SCHED_ONEXIT is not set +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # @@ -326,24 +360,50 @@ CONFIG_DISABLE_POLL=y # 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=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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL 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_TIMER 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -352,6 +412,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -375,14 +437,11 @@ CONFIG_UART0_SERIALDRIVER=y # 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 is not set # 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_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -399,18 +458,22 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_NONE=y +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -438,12 +501,7 @@ CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y # CONFIG_FS_NAMED_SEMAPHORES is not set # CONFIG_FS_RAMMAP is not set # CONFIG_FS_PROCFS is not set - -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -463,6 +521,11 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# +# CONFIG_WIRELESS is not set + # # Binary Loader # @@ -499,13 +562,18 @@ CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=1536 # CONFIG_LIBC_STRERROR is not set # CONFIG_LIBC_PERROR_STDOUT is not set CONFIG_ARCH_LOWPUTC=y +# 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_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -520,14 +588,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -535,11 +602,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -547,36 +614,44 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 # 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 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_UDP 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -588,35 +663,28 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_MICROPYTHON is not set # CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # # 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 # CONFIG_NETUTILS_SMTP is not set -# CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_NETLIB is not set -# CONFIG_NETUTILS_WEBCLIENT is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -634,13 +702,16 @@ CONFIG_NSH_NESTDEPTH=3 # Disable Individual commands # CONFIG_NSH_DISABLE_ADDROUTE=y +CONFIG_NSH_DISABLE_BASENAME=y # CONFIG_NSH_DISABLE_CAT is not set CONFIG_NSH_DISABLE_CD=y CONFIG_NSH_DISABLE_CP=y # CONFIG_NSH_DISABLE_CMP is not set +CONFIG_NSH_DISABLE_DATE=y CONFIG_NSH_DISABLE_DD=y 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 @@ -649,8 +720,10 @@ CONFIG_NSH_DISABLE_GET=y # 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=y @@ -658,6 +731,7 @@ CONFIG_NSH_DISABLE_MKDIR=y CONFIG_NSH_DISABLE_MKRD=y # CONFIG_NSH_DISABLE_MH is not set CONFIG_NSH_DISABLE_MOUNT=y +# 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=y @@ -667,8 +741,10 @@ CONFIG_NSH_DISABLE_RMDIR=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=y # CONFIG_NSH_DISABLE_TEST is not set CONFIG_NSH_DISABLE_UMOUNT=y +CONFIG_NSH_DISABLE_UNAME=y # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set CONFIG_NSH_DISABLE_WGET=y @@ -692,6 +768,8 @@ CONFIG_NSH_DISABLESCRIPT=y 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 @@ -705,116 +783,19 @@ CONFIG_NSH_CONSOLE=y # # System Libraries and NSH Add-Ons # - -# -# Custom Free Memory Command -# -# CONFIG_SYSTEM_FREE is not set - -# -# EMACS-like Command Line Editor -# # CONFIG_SYSTEM_CLE is not set - -# -# CU Minimal Terminal -# # CONFIG_SYSTEM_CUTERM is not set - -# -# FLASH Program Installation -# -# CONFIG_SYSTEM_INSTALL is not set - -# -# FLASH Erase-all Command -# - -# -# Intel HEX to binary conversion -# +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set - -# -# I2C tool -# - -# -# INI File Parser -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# NxPlayer media player library / command Line -# - -# -# RAM test -# +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set - -# -# readline() -# +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y - -# -# P-Code Support -# - -# -# PHY Tool -# - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sudoku -# +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set - -# -# Sysinfo -# - -# -# VI Work-Alike Editor -# +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set - -# -# Stack Monitor -# - -# -# USB CDC/ACM Device Commands -# - -# -# USB Composite Device Commands -# - -# -# USB Mass Storage Device Commands -# - -# -# USB Monitor -# - -# -# Zmodem Commands -# # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/freedom-kl25z/nsh/defconfig b/configs/freedom-kl25z/nsh/defconfig index 7a97b9a5bb540e1159af15eaa2e7c8f375ac0499..932777e5023e970d75fa8c535a9270bf223f9d82 100644 --- a/configs/freedom-kl25z/nsh/defconfig +++ b/configs/freedom-kl25z/nsh/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,10 +77,12 @@ 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=y # 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 @@ -87,10 +91,15 @@ CONFIG_ARCH_CHIP_KL=y # 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 @@ -100,13 +109,24 @@ CONFIG_ARCH_CORTEXM0=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="armv6-m" CONFIG_ARCH_CHIP="kl" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set # # ARMV6M Configuration Options @@ -120,6 +140,7 @@ CONFIG_ARMV6M_TOOLCHAIN_GNU_EABIL=y # # Kinetis Configuration Options # +# CONFIG_ARCH_CHIP_MKL25Z64 is not set CONFIG_ARCH_CHIP_MKL25Z128=y # CONFIG_ARCH_CHIP_MKL26Z128 is not set CONFIG_ARCH_FAMILY_KL2X=y @@ -182,11 +203,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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=y # CONFIG_ARCH_IRQPRIO is not set CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set @@ -241,8 +265,11 @@ 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=y # CONFIG_BOARDCTL_GRAPHICS is not set # CONFIG_BOARDCTL_IOCTL is not set @@ -279,6 +306,7 @@ 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=8 # CONFIG_SCHED_HAVE_PARENT is not set @@ -323,9 +351,10 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGCONDTIMEDOUT=16 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # CONFIG_SCHED_WORKQUEUE is not set # CONFIG_SCHED_HPWORK is not set @@ -356,6 +385,7 @@ CONFIG_DEV_NULL=y # 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=y # CONFIG_ARCH_HAVE_I2CRESET is not set # CONFIG_I2C is not set @@ -373,8 +403,23 @@ CONFIG_PWM=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -384,6 +429,8 @@ CONFIG_PWM=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -407,14 +454,11 @@ CONFIG_UART0_SERIALDRIVER=y # 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 is not set CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -431,19 +475,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -472,12 +520,7 @@ CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y # CONFIG_FS_RAMMAP is not set # CONFIG_FS_BINFS is not set # CONFIG_FS_PROCFS is not set - -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -497,6 +540,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -537,10 +584,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -559,11 +610,14 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -571,11 +625,11 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -583,40 +637,50 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_POSIXSPAWN is not set +# CONFIG_EXAMPLES_PPPD is not set CONFIG_EXAMPLES_PWM=y CONFIG_EXAMPLES_PWM_DEVPATH="/dev/pwm0" CONFIG_EXAMPLES_PWM_FREQUENCY=100 -CONFIG_EXAMPLES_PWM_DUTYPCT=50 CONFIG_EXAMPLES_PWM_DURATION=5 -# CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +CONFIG_EXAMPLES_PWM_DUTYPCT=50 +# CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set -# CONFIG_EXAMPLES_ROMFS 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_SMART_TEST 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 # 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -628,32 +692,28 @@ CONFIG_EXAMPLES_PWM_DURATION=5 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_PPPD is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -672,13 +732,16 @@ CONFIG_NSH_BUILTIN_APPS=y # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +CONFIG_NSH_DISABLE_BASENAME=y # CONFIG_NSH_DISABLE_CAT is not set CONFIG_NSH_DISABLE_CD=y CONFIG_NSH_DISABLE_CP=y # CONFIG_NSH_DISABLE_CMP is not set +CONFIG_NSH_DISABLE_DATE=y CONFIG_NSH_DISABLE_DD=y CONFIG_NSH_DISABLE_DF=y # CONFIG_NSH_DISABLE_DELROUTE is not set +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 @@ -687,8 +750,10 @@ CONFIG_NSH_DISABLE_GET=y # 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=y @@ -706,8 +771,10 @@ CONFIG_NSH_DISABLE_RMDIR=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=y # CONFIG_NSH_DISABLE_TEST is not set CONFIG_NSH_DISABLE_UMOUNT=y +CONFIG_NSH_DISABLE_UNAME=y # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set CONFIG_NSH_DISABLE_WGET=y @@ -731,6 +798,8 @@ CONFIG_NSH_DISABLESCRIPT=y 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 @@ -744,16 +813,19 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y -# CONFIG_SYSTEM_POWEROFF is not set +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/freedom-kl25z/src/kl_adxl345.c b/configs/freedom-kl25z/src/kl_adxl345.c index 0b68d7a8326ca49aa16f8531b23e7df257fd2d55..3560e3d7fa176a85b1e1f31ffe33bd01e69159cd 100644 --- a/configs/freedom-kl25z/src/kl_adxl345.c +++ b/configs/freedom-kl25z/src/kl_adxl345.c @@ -183,7 +183,7 @@ static int adxl345_attach(FAR struct adxl345_config_s *state, { FAR struct kl_adxl345config_s *priv = (FAR struct kl_adxl345config_s *)state; - snvdbg("Saving handler %p\n", handler); + sninfo("Saving handler %p\n", handler); DEBUGASSERT(priv); /* Just save the handler and its argument. We will use it when interrupts @@ -257,14 +257,14 @@ int adxl345_archinitialize(int minor) FAR struct spi_dev_s *dev; int ret; - sndbg("minor %d\n", minor); + sninfo("minor %d\n", minor); DEBUGASSERT(minor == 0); /* Check if we are already initialized */ if (!g_adxl345config.handle) { - snvdbg("Initializing\n"); + sninfo("Initializing\n"); /* Configure the ADXL345 interrupt pin as an input */ @@ -275,7 +275,7 @@ int adxl345_archinitialize(int minor) dev = kl_spibus_initialize(CONFIG_ADXL345_SPIDEV); if (!dev) { - sndbg("Failed to initialize SPI bus %d\n", CONFIG_ADXL345_SPIDEV); + snerr("ERROR: Failed to initialize SPI bus %d\n", CONFIG_ADXL345_SPIDEV); return -ENODEV; } @@ -285,7 +285,7 @@ int adxl345_archinitialize(int minor) adxl345_instantiate(dev, (FAR struct adxl345_config_s *)&g_adxl345config); if (!g_adxl345config.handle) { - sndbg("Failed to instantiate the ADXL345 driver\n"); + snerr("ERROR: Failed to instantiate the ADXL345 driver\n"); return -ENODEV; } @@ -294,7 +294,7 @@ int adxl345_archinitialize(int minor) ret = adxl345_register(g_adxl345config.handle, CONFIG_ADXL345_DEVMINOR); if (ret < 0) { - sndbg("Failed to register ADXL345 driver: %d\n", ret); + snerr("ERROR: Failed to register ADXL345 driver: %d\n", ret); return ret; } } diff --git a/configs/freedom-kl25z/src/kl_appinit.c b/configs/freedom-kl25z/src/kl_appinit.c index a00e675cdd87acef4e96afc65eafc46eb5cd6c14..1f0d218ece2fae59a780b7b1835f14c22be855e7 100644 --- a/configs/freedom-kl25z/src/kl_appinit.c +++ b/configs/freedom-kl25z/src/kl_appinit.c @@ -86,7 +86,7 @@ int board_app_initialize(uintptr_t arg) ret = adxl345_archinitialize(0); if (ret < 0) { - dbg("ERROR: adxl345_archinitialize failed: %d\n", ret); + _err("ERROR: adxl345_archinitialize failed: %d\n", ret); } #endif return OK; diff --git a/configs/freedom-kl25z/src/kl_led.c b/configs/freedom-kl25z/src/kl_led.c index 6a40bb48b5588c6b7ff0cf650c0f1bacfe0528af..19b7a41983268a4c2deab7a60fa6a7bb7121e0db 100644 --- a/configs/freedom-kl25z/src/kl_led.c +++ b/configs/freedom-kl25z/src/kl_led.c @@ -81,38 +81,14 @@ * 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 -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /* Dump GPIO registers */ -#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_LEDS) +#ifdef CONFIG_DEBUG_LEDS_INFO # define led_dumpgpio(m) kl_dumpgpio(GPIO_LED_B, m) #else # define led_dumpgpio(m) #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/freedom-kl25z/src/kl_pwm.c b/configs/freedom-kl25z/src/kl_pwm.c index 0d0a73aeb9944de1b08c981de462fa046ff65930..e00d1ca52b956e0e7ef3a46efbbc3f8289f4b2c8 100644 --- a/configs/freedom-kl25z/src/kl_pwm.c +++ b/configs/freedom-kl25z/src/kl_pwm.c @@ -98,7 +98,7 @@ int board_pwm_setup(void) pwm = kl_pwminitialize(0); if (!pwm) { - adbg("Failed to get the KL25 PWM lower half\n"); + aerr("ERROR: Failed to get the KL25 PWM lower half\n"); return -ENODEV; } @@ -107,7 +107,7 @@ int board_pwm_setup(void) ret = pwm_register("/dev/pwm0", pwm); if (ret < 0) { - adbg("pwm_register failed: %d\n", ret); + aerr("ERROR: pwm_register failed: %d\n", ret); return ret; } diff --git a/configs/freedom-kl25z/src/kl_spi.c b/configs/freedom-kl25z/src/kl_spi.c index c674bd45278d87f51b0000eb533275c8cd57c505..5c41ae348c4903b602c8c46e0f271c0a6795113e 100644 --- a/configs/freedom-kl25z/src/kl_spi.c +++ b/configs/freedom-kl25z/src/kl_spi.c @@ -51,28 +51,6 @@ #if defined(CONFIG_KL_SPI0) || defined(CONFIG_KL_SPI1) -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -164,7 +142,7 @@ void weak_function kl_spidev_initialize(void) void kl_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spivdbg("devid: %d CS: %s\n", + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #ifdef CONFIG_ADXL345_SPI @@ -190,7 +168,7 @@ void kl_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, void kl_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spivdbg("devid: %d CS: %s\n", + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } #endif diff --git a/configs/freedom-kl25z/src/kl_tsi.c b/configs/freedom-kl25z/src/kl_tsi.c index e030caa9e8c737e039901392c5cf86de82fdd895..9f7f1f70cca2138349aabc817afaa76fa44e93c3 100644 --- a/configs/freedom-kl25z/src/kl_tsi.c +++ b/configs/freedom-kl25z/src/kl_tsi.c @@ -135,7 +135,7 @@ static void tsi_calibrate(void) while (!(getreg32(KL_TSI_GENCS) & TSI_GENCS_EOSF)); g_defcap[i] = getreg32(KL_TSI_DATA) & TSI_DATA_TSICNT_MASK; - ivdbg("Sensor %d = %d\n", i+1, g_defcap[i]); + iinfo("Sensor %d = %d\n", i+1, g_defcap[i]); } } @@ -187,7 +187,7 @@ static ssize_t tsi_read(FAR struct file *filep, FAR char *buf, size_t buflen) g_currdelta = (uint16_t)deltacap; - ivdbg("Delta for g_channel %d = %d\n", g_channel, g_currdelta); + iinfo("Delta for g_channel %d = %d\n", g_channel, g_currdelta); buf[0] = g_currdelta & 0xff; buf[1] = (g_currdelta & 0xff00) >> 8; diff --git a/configs/freedom-kl25z/src/kl_wifi.c b/configs/freedom-kl25z/src/kl_wifi.c index 461a681f8850381fa81d38a84ca5efa2101cedf9..56873885718df1bcc54ed61dd51df483f8bfe3b0 100644 --- a/configs/freedom-kl25z/src/kl_wifi.c +++ b/configs/freedom-kl25z/src/kl_wifi.c @@ -204,7 +204,7 @@ static void wl_enable_irq(FAR struct cc3000_config_s *state, bool enable) /* Attach and enable, or detach and disable */ - ivdbg("enable:%d\n", enable); + iinfo("enable:%d\n", enable); if (enable) { (void)kl_gpioirqattach(GPIO_WIFI_INT, priv->handler); @@ -219,7 +219,7 @@ static void wl_enable_irq(FAR struct cc3000_config_s *state, bool enable) static void wl_enable_power(FAR struct cc3000_config_s *state, bool enable) { - ivdbg("enable:%d\n", enable); + iinfo("enable:%d\n", enable); /* Active high enable */ @@ -228,7 +228,7 @@ static void wl_enable_power(FAR struct cc3000_config_s *state, bool enable) static void wl_select(FAR struct cc3000_config_s *state, bool enable) { - ivdbg("enable:%d\n", enable); + iinfo("enable:%d\n", enable); /* Active high enable */ @@ -289,7 +289,7 @@ int wireless_archinitialize(size_t max_rx_size) /* Init SPI bus */ - idbg("minor %d\n", minor); + iinfo("minor %d\n", minor); DEBUGASSERT(CONFIG_CC3000_DEVMINOR == 0); #ifdef CONFIG_CC3000_PROBES @@ -304,7 +304,7 @@ int wireless_archinitialize(size_t max_rx_size) spi = kl_spibus_initialize(CONFIG_CC3000_SPIDEV); if (!spi) { - idbg("Failed to initialize SPI bus %d\n", CONFIG_CC3000_SPIDEV); + ierr("ERROR: Failed to initialize SPI bus %d\n", CONFIG_CC3000_SPIDEV); return -ENODEV; } @@ -314,7 +314,7 @@ int wireless_archinitialize(size_t max_rx_size) int ret = cc3000_register(spi, &g_cc3000_info.dev, CONFIG_CC3000_DEVMINOR); if (ret < 0) { - idbg("Failed to initialize SPI bus %d\n", CONFIG_CC3000_SPIDEV); + ierr("ERROR: Failed to initialize SPI bus %d\n", CONFIG_CC3000_SPIDEV); return -ENODEV; } diff --git a/configs/freedom-kl26z/README.txt b/configs/freedom-kl26z/README.txt index 260ee1b6be13b359133463bd83794a5ecc28e93f..55f593c7d07cf5c681e4ad3e2b4ceeb76f89af16 100644 --- a/configs/freedom-kl26z/README.txt +++ b/configs/freedom-kl26z/README.txt @@ -279,6 +279,86 @@ Where is one of the following: configuration. This configuration has far fewer features than the nsh configuration but is also a fraction of the size. + This minnsh configuration is a "proof-of-concept" and not very usable in + its current state. This configuration was created by disabling + everything possible INCLUDING file system support. Without file system + support, NuttX is pretty much crippled. Here are some of the + consequences of disabling the file system: + + - All features that depend on the file system are lost: device drivers, + mountpoints, message queues, named semaphores. + + - Without device drivers, you cannot interact with the RTOS using POSIX + interfaces. You would have to work with NuttX as with those other + tiny RTOSs: As a scheduler and a callable hardare abstraction layer + (HAL). + + - You cannot use any of the NuttX upper half device drivers since they + depend on the pseudo-file system and device nodes. You can, of + course, continue to use the lower half drivers either directly. Or, + perhaps, you could write some custom minnsh upper half drivers that + do not depend on a file system and expose a HAL interface. + + There is a special version of readline() the NSH uses when there is no + file system. It uses a special up_putc() to write data to the console + and a special function up_getc() to read data from the console. + + - The current up_getc() implementationsa are a kludge. They are + analogous to the up_putc() implementations: They directly poll the + hardware for serial availability, locking up all lower priority tasks + in the entire system while they poll. So a version of NSH that uses + up_getc() essentially blocks the system until a character is received. + + This, of course, could be fixed by creating a special, upper half + implementation of the interrupt-driven serial lower half (like + stm32_serial) that just supports single character console I/O + (perhaps called up_putc and up_getc?). The NSH could wait for serial + input without blocking the system. But then that would increase the + footprint too. + + So although the minnsh configurations are a good starting point for + making things small, they not are really very practical. Why might + you want a NuttX minnsh solution? Perhaps you have software that runs + on a family of chips including some very tiny MCUs. Then perhaps having + the RTOS compatibility would justify the loss of functionality? + + You can re-enable the file system and (true) serial console with + these settings: + + Enable the file system: + CONFIG_NFILE_DESCRIPTORS=5 + CONFIG_NFILE_STREAMS=5 + + Enable the console device: + CONFIG_DEV_CONSOLE=y + + Disable most new NSH commands. Some like 'ls' are really mandatory + with a file system: + CONFIG_NSH_DISABLE_xxx=y + + Enable the upper half serial driver: + CONFIG_SERIAL=y + CONFIG_STANDARD_SERIAL=y + + Enable the USART1 serial driver: + CONFIG_STM32_USART1=y + CONFIG_STM32_USART1_SERIALDRIVER=y + CONFIG_USART1_SERIAL_CONSOLE=y + + CONFIG_USART1_2STOP=0 + CONFIG_USART1_BAUD=115200 + CONFIG_USART1_BITS=8 + CONFIG_USART1_PARITY=0 + CONFIG_USART1_RXBUFSIZE=16 + CONFIG_USART1_TXBUFSIZE=16 + + With these changes, NSH should behave better and we preserve the device + driver interface. But this result in a total size increase of about + 7KB: That is about 5KB of additional OS support for the file system and + serial console PLUS about 2KB for the 'ls' command logic (including OS + support for opendir(), readdir(), closedir(), stat(), and probably other + things). + nsh: --- Configures the NuttShell (nsh) located at apps/examples/nsh. The diff --git a/configs/freedom-kl26z/minnsh/defconfig b/configs/freedom-kl26z/minnsh/defconfig index 843bd482e053eab389cb3614ef6c776ec5a70338..d68ba77924b4776eefc966cc26065d92b06b46ae 100644 --- a/configs/freedom-kl26z/minnsh/defconfig +++ b/configs/freedom-kl26z/minnsh/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +# CONFIG_DEBUG_ALERT is not set +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,10 +77,12 @@ 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=y # 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 @@ -87,22 +91,42 @@ CONFIG_ARCH_CHIP_KL=y # 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=y # 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 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="armv6-m" CONFIG_ARCH_CHIP="kl" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set # # ARMV6M Configuration Options @@ -116,6 +140,7 @@ CONFIG_ARMV6M_TOOLCHAIN_GNU_EABIL=y # # Kinetis Configuration Options # +# CONFIG_ARCH_CHIP_MKL25Z64 is not set # CONFIG_ARCH_CHIP_MKL25Z128 is not set CONFIG_ARCH_CHIP_MKL26Z128=y CONFIG_ARCH_FAMILY_KL2X=y @@ -176,11 +201,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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=y # CONFIG_ARCH_IRQPRIO is not set # CONFIG_ARCH_STACKDUMP is not set # CONFIG_ENDIAN_BIG is not set @@ -220,7 +248,6 @@ CONFIG_RAM_SIZE=16384 # # Board Selection # -# CONFIG_ARCH_BOARD_FREEDOM_KL25Z is not set CONFIG_ARCH_BOARD_FREEDOM_KL26Z=y # CONFIG_ARCH_BOARD_CUSTOM is not set CONFIG_ARCH_BOARD="freedom-kl26z" @@ -235,6 +262,7 @@ CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_LIB_BOARDCTL is not set # # RTOS Features @@ -264,11 +292,13 @@ CONFIG_PREALLOC_TIMERS=0 # # Tasks and Scheduling # +# CONFIG_SPINLOCK is not set # CONFIG_INIT_NONE is not set CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="nsh_main" CONFIG_RR_INTERVAL=0 +# CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=0 CONFIG_MAX_TASKS=8 # CONFIG_SCHED_HAVE_PARENT is not set @@ -299,9 +329,10 @@ CONFIG_NAME_MAX=32 # CONFIG_SCHED_STARTHOOK is not set # CONFIG_SCHED_ATEXIT is not set # CONFIG_SCHED_ONEXIT is not set +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # @@ -329,24 +360,50 @@ CONFIG_DISABLE_POLL=y # 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=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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL 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_TIMER 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -355,6 +412,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -378,14 +437,11 @@ CONFIG_UART0_SERIALDRIVER=y # 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 is not set # 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_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -402,18 +458,22 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_NONE=y +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -441,12 +501,7 @@ CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y # CONFIG_FS_NAMED_SEMAPHORES is not set # CONFIG_FS_RAMMAP is not set # CONFIG_FS_PROCFS is not set - -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -466,6 +521,11 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# +# CONFIG_WIRELESS is not set + # # Binary Loader # @@ -502,13 +562,18 @@ CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=1536 # CONFIG_LIBC_STRERROR is not set # CONFIG_LIBC_PERROR_STDOUT is not set CONFIG_ARCH_LOWPUTC=y +# 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_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -523,14 +588,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -538,11 +602,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -550,35 +614,44 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 # 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 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 # 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -590,35 +663,28 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # # CONFIG_NETUTILS_CODECS 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 # CONFIG_NETUTILS_SMTP is not set -# CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_NETLIB is not set -# CONFIG_NETUTILS_WEBCLIENT is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -636,13 +702,16 @@ CONFIG_NSH_NESTDEPTH=3 # Disable Individual commands # CONFIG_NSH_DISABLE_ADDROUTE=y +CONFIG_NSH_DISABLE_BASENAME=y # CONFIG_NSH_DISABLE_CAT is not set CONFIG_NSH_DISABLE_CD=y CONFIG_NSH_DISABLE_CP=y # CONFIG_NSH_DISABLE_CMP is not set +CONFIG_NSH_DISABLE_DATE=y CONFIG_NSH_DISABLE_DD=y 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 @@ -651,8 +720,10 @@ CONFIG_NSH_DISABLE_GET=y # 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=y @@ -660,6 +731,7 @@ CONFIG_NSH_DISABLE_MKDIR=y CONFIG_NSH_DISABLE_MKRD=y # CONFIG_NSH_DISABLE_MH is not set CONFIG_NSH_DISABLE_MOUNT=y +# 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=y @@ -669,8 +741,10 @@ CONFIG_NSH_DISABLE_RMDIR=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=y # CONFIG_NSH_DISABLE_TEST is not set CONFIG_NSH_DISABLE_UMOUNT=y +CONFIG_NSH_DISABLE_UNAME=y # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set CONFIG_NSH_DISABLE_WGET=y @@ -694,6 +768,8 @@ CONFIG_NSH_DISABLESCRIPT=y 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 @@ -707,120 +783,19 @@ CONFIG_NSH_CONSOLE=y # # System Libraries and NSH Add-Ons # - -# -# Custom Free Memory Command -# -# CONFIG_SYSTEM_FREE is not set - -# -# EMACS-like Command Line Editor -# # CONFIG_SYSTEM_CLE is not set - -# -# CU Minimal Terminal -# # CONFIG_SYSTEM_CUTERM is not set - -# -# FLASH Program Installation -# -# CONFIG_SYSTEM_INSTALL is not set - -# -# FLASH Erase-all Command -# - -# -# Intel HEX to binary conversion -# +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set - -# -# I2C tool -# - -# -# INI File Parser -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# NxPlayer media player library / command Line -# - -# -# RAM test -# +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set - -# -# readline() -# +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y - -# -# P-Code Support -# - -# -# PHY Tool -# - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sudoku -# +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set - -# -# Sysinfo -# - -# -# Temperature -# - -# -# VI Work-Alike Editor -# +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set - -# -# Stack Monitor -# - -# -# USB CDC/ACM Device Commands -# - -# -# USB Composite Device Commands -# - -# -# USB Mass Storage Device Commands -# - -# -# USB Monitor -# - -# -# Zmodem Commands -# # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/freedom-kl26z/nsh/defconfig b/configs/freedom-kl26z/nsh/defconfig index 40157e1b53ba948be24e35c0c525af8024bf512a..c6c7dc985fb610761bb6cd943f924a9f06cd1c45 100644 --- a/configs/freedom-kl26z/nsh/defconfig +++ b/configs/freedom-kl26z/nsh/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,10 +77,12 @@ 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=y # 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 @@ -87,10 +91,15 @@ CONFIG_ARCH_CHIP_KL=y # 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 @@ -100,13 +109,24 @@ CONFIG_ARCH_CORTEXM0=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="armv6-m" CONFIG_ARCH_CHIP="kl" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set # # ARMV6M Configuration Options @@ -120,6 +140,7 @@ CONFIG_ARMV6M_TOOLCHAIN_GNU_EABIL=y # # Kinetis Configuration Options # +# CONFIG_ARCH_CHIP_MKL25Z64 is not set # CONFIG_ARCH_CHIP_MKL25Z128 is not set CONFIG_ARCH_CHIP_MKL26Z128=y CONFIG_ARCH_FAMILY_KL2X=y @@ -182,11 +203,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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=y # CONFIG_ARCH_IRQPRIO is not set CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set @@ -241,8 +265,11 @@ 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=y # CONFIG_BOARDCTL_GRAPHICS is not set # CONFIG_BOARDCTL_IOCTL is not set @@ -279,6 +306,7 @@ 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=8 # CONFIG_SCHED_HAVE_PARENT is not set @@ -323,9 +351,10 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGCONDTIMEDOUT=16 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # CONFIG_SCHED_WORKQUEUE is not set # CONFIG_SCHED_HPWORK is not set @@ -356,6 +385,7 @@ CONFIG_DEV_NULL=y # 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=y # CONFIG_ARCH_HAVE_I2CRESET is not set # CONFIG_I2C is not set @@ -373,8 +403,23 @@ CONFIG_PWM=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -384,6 +429,8 @@ CONFIG_PWM=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -407,14 +454,11 @@ CONFIG_UART0_SERIALDRIVER=y # 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 is not set CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -431,19 +475,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -472,12 +520,7 @@ CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y # CONFIG_FS_RAMMAP is not set # CONFIG_FS_BINFS is not set # CONFIG_FS_PROCFS is not set - -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -497,6 +540,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -537,10 +584,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -559,11 +610,14 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -571,11 +625,11 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -583,40 +637,50 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_POSIXSPAWN is not set +# CONFIG_EXAMPLES_PPPD is not set CONFIG_EXAMPLES_PWM=y CONFIG_EXAMPLES_PWM_DEVPATH="/dev/pwm0" CONFIG_EXAMPLES_PWM_FREQUENCY=100 -CONFIG_EXAMPLES_PWM_DUTYPCT=50 CONFIG_EXAMPLES_PWM_DURATION=5 -# CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +CONFIG_EXAMPLES_PWM_DUTYPCT=50 +# CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set -# CONFIG_EXAMPLES_ROMFS 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_SMART_TEST 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 # 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -628,32 +692,28 @@ CONFIG_EXAMPLES_PWM_DURATION=5 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_PPPD is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -672,13 +732,16 @@ CONFIG_NSH_BUILTIN_APPS=y # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +CONFIG_NSH_DISABLE_BASENAME=y # CONFIG_NSH_DISABLE_CAT is not set CONFIG_NSH_DISABLE_CD=y CONFIG_NSH_DISABLE_CP=y # CONFIG_NSH_DISABLE_CMP is not set +CONFIG_NSH_DISABLE_DATE=y CONFIG_NSH_DISABLE_DD=y CONFIG_NSH_DISABLE_DF=y # CONFIG_NSH_DISABLE_DELROUTE is not set +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 @@ -687,8 +750,10 @@ CONFIG_NSH_DISABLE_GET=y # 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=y @@ -706,8 +771,10 @@ CONFIG_NSH_DISABLE_RMDIR=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=y # CONFIG_NSH_DISABLE_TEST is not set CONFIG_NSH_DISABLE_UMOUNT=y +CONFIG_NSH_DISABLE_UNAME=y # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set CONFIG_NSH_DISABLE_WGET=y @@ -731,6 +798,8 @@ CONFIG_NSH_DISABLESCRIPT=y 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 @@ -744,16 +813,19 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y -# CONFIG_SYSTEM_POWEROFF is not set +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/freedom-kl26z/src/kl_led.c b/configs/freedom-kl26z/src/kl_led.c index a729917dca471b3e302ec79c28fff097256d76ad..3c8d07ab20968d08ac62f6b21117514fa0edff77 100644 --- a/configs/freedom-kl26z/src/kl_led.c +++ b/configs/freedom-kl26z/src/kl_led.c @@ -81,38 +81,14 @@ * 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 -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /* Dump GPIO registers */ -#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_LEDS) +#ifdef CONFIG_DEBUG_LEDS_INFO # define led_dumpgpio(m) kl_dumpgpio(GPIO_LED_B, m) #else # define led_dumpgpio(m) #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/freedom-kl26z/src/kl_pwm.c b/configs/freedom-kl26z/src/kl_pwm.c index 4faf9cabe8d07eb233c51392ce607091be9cb42e..672d49e70e8cb7045d4a29b0e1eaf97d4b0de14f 100644 --- a/configs/freedom-kl26z/src/kl_pwm.c +++ b/configs/freedom-kl26z/src/kl_pwm.c @@ -98,7 +98,7 @@ int board_pwm_setup(void) pwm = kl_pwminitialize(0); if (!pwm) { - adbg("Failed to get the KL26 PWM lower half\n"); + aerr("ERROR: Failed to get the KL26 PWM lower half\n"); return -ENODEV; } @@ -107,7 +107,7 @@ int board_pwm_setup(void) ret = pwm_register("/dev/pwm0", pwm); if (ret < 0) { - adbg("pwm_register failed: %d\n", ret); + aerr("ERROR: pwm_register failed: %d\n", ret); return ret; } diff --git a/configs/freedom-kl26z/src/kl_spi.c b/configs/freedom-kl26z/src/kl_spi.c index 21d4052e82b616b6bb7259a107b6cc7dd16bfe3d..9b3cd6ff24090c2a54395e201fcd6d57bb948596 100644 --- a/configs/freedom-kl26z/src/kl_spi.c +++ b/configs/freedom-kl26z/src/kl_spi.c @@ -51,28 +51,6 @@ #if defined(CONFIG_KL_SPI0) || defined(CONFIG_KL_SPI1) -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -155,7 +133,7 @@ void weak_function kl_spidev_initialize(void) void kl_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spivdbg("devid: %d CS: %s\n", + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } #endif @@ -164,7 +142,7 @@ void kl_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, void kl_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spivdbg("devid: %d CS: %s\n", + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } #endif diff --git a/configs/freedom-kl26z/src/kl_tsi.c b/configs/freedom-kl26z/src/kl_tsi.c index 95392082e0bb91ed44de9962ade3658e1983c7b8..1d4a283772006557b6e827bdd758d3b91722e92a 100644 --- a/configs/freedom-kl26z/src/kl_tsi.c +++ b/configs/freedom-kl26z/src/kl_tsi.c @@ -135,7 +135,7 @@ static void tsi_calibrate(void) while (!(getreg32(KL_TSI_GENCS) & TSI_GENCS_EOSF)); g_defcap[i] = getreg32(KL_TSI_DATA) & TSI_DATA_TSICNT_MASK; - ivdbg("Sensor %d = %d\n", i+1, g_defcap[i]); + iinfo("Sensor %d = %d\n", i+1, g_defcap[i]); } } @@ -187,7 +187,7 @@ static ssize_t tsi_read(FAR struct file *filep, FAR char *buf, size_t buflen) g_currdelta = (uint16_t)deltacap; - ivdbg("Delta for g_channel %d = %d\n", g_channel, g_currdelta); + iinfo("Delta for g_channel %d = %d\n", g_channel, g_currdelta); buf[0] = g_currdelta & 0xff; buf[1] = (g_currdelta & 0xff00) >> 8; diff --git a/configs/hymini-stm32v/README.txt b/configs/hymini-stm32v/README.txt index b808bad2c745863cb845b4f47d488b50c9e44b16..2ec1c04353582abaa70484ce04ee345395e84c67 100644 --- a/configs/hymini-stm32v/README.txt +++ b/configs/hymini-stm32v/README.txt @@ -502,7 +502,7 @@ HY-Mini specific Configuration Options 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 + CONFIG_STM32_CAN_REGDEBUG - If CONFIG_DEBUG_FEATURES is set, this will generate an dump of all CAN registers. HY-MiniSTM32V LCD Hardware Configuration. The HY-Mini board may be delivered with @@ -650,7 +650,6 @@ Where is one of the following: 1. 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 @@ -702,11 +701,11 @@ Where is one of the following: USB debug output can be enabled as by changing the following settings in the configuration file: - -CONFIG_DEBUG=n - -CONFIG_DEBUG_VERBOSE=n + -CONFIG_DEBUG_FEATURES=n + -CONFIG_DEBUG_INFO=n -CONFIG_DEBUG_USB=n - +CONFIG_DEBUG=y - +CONFIG_DEBUG_VERBOSE=y + +CONFIG_DEBUG_FEATURES=y + +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_USB=y -CONFIG_EXAMPLES_USBSERIAL_TRACEINIT=n diff --git a/configs/hymini-stm32v/buttons/defconfig b/configs/hymini-stm32v/buttons/defconfig index 3141e0c160594740550ed8e9aa98a8ef5bd87d02..bed31efc27f13305ce95d73de60d45f8c187b2ce 100644 --- a/configs/hymini-stm32v/buttons/defconfig +++ b/configs/hymini-stm32v/buttons/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARCH_CHIP_STM32F103VC=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -408,6 +411,10 @@ CONFIG_STM32_JTAG_DISABLE=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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -419,9 +426,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -667,7 +682,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -675,6 +695,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -686,6 +707,8 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -735,15 +758,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -780,12 +806,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -853,6 +873,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -894,10 +915,10 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -906,18 +927,18 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -931,9 +952,9 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -955,8 +976,8 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -989,18 +1010,18 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set # CONFIG_READLINE_HAVE_EXTMATCH is not set CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y # 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/hymini-stm32v/include/board.h b/configs/hymini-stm32v/include/board.h index ba55bdecdfad2f44ee07e1794dbd1a03acc86d36..dd39fde960fdd23ea6c628486b6ffcd7e6a01cf5 100644 --- a/configs/hymini-stm32v/include/board.h +++ b/configs/hymini-stm32v/include/board.h @@ -1,9 +1,10 @@ /************************************************************************************ * configs/hymini-stm32v/include/board.h - * include/arch/board/board.h * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Copyright (C) 2011 Laurent Latil. All rights reserved. * Author: Laurent Latil + * Gregory Nutt * * Derives, in part, from configs/stm3210e-eval/include/board.h * @@ -98,14 +99,14 @@ #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) */ +/* APB1 timers 2-7 will be twice 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) +#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) /* USB divider -- Divide PLL clock by 1.5 */ @@ -115,8 +116,14 @@ * 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 +#define BOARD_TIM1_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM2_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM3_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM4_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM5_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM6_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM7_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM8_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 diff --git a/configs/hymini-stm32v/nsh/defconfig b/configs/hymini-stm32v/nsh/defconfig index 69662e887c434b57814cc47bd44e5613f7ac1d4d..44bc062c76d2c033a08406ad2ec7d0906877fa89 100644 --- a/configs/hymini-stm32v/nsh/defconfig +++ b/configs/hymini-stm32v/nsh/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -201,6 +203,7 @@ CONFIG_ARCH_CHIP_STM32F103VC=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -411,6 +414,10 @@ CONFIG_STM32_JTAG_DISABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_DMACAPABLE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -422,9 +429,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -684,7 +699,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -692,6 +712,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -715,6 +736,8 @@ CONFIG_SDIO_PREFLIGHT=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -764,15 +787,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -815,12 +841,6 @@ CONFIG_FAT_LCNAMES=y # 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 # @@ -891,6 +911,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -921,10 +942,10 @@ CONFIG_ARCH_HAVE_TLS=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -933,18 +954,18 @@ CONFIG_ARCH_HAVE_TLS=y 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -958,10 +979,10 @@ CONFIG_EXAMPLES_NSH=y # 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_WEBSERVER is not set # # File System Utilities @@ -985,8 +1006,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1110,12 +1131,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1123,6 +1144,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/hymini-stm32v/nsh2/defconfig b/configs/hymini-stm32v/nsh2/defconfig index e36492fc6aa6dcfa5d27377944b53b1fef5a4796..6613d88a845b236f2ca40a52c30aafe657df1b83 100644 --- a/configs/hymini-stm32v/nsh2/defconfig +++ b/configs/hymini-stm32v/nsh2/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -201,6 +203,7 @@ CONFIG_ARCH_CHIP_STM32F103VC=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -417,6 +420,10 @@ CONFIG_STM32_JTAG_DISABLE=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_DMACAPABLE is not set # CONFIG_STM32_FSMC_SRAM is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM3_PWM is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -429,9 +436,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -694,6 +709,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -730,10 +747,14 @@ CONFIG_ADS7843E_THRESHY=12 # CONFIG_DJOYSTICK is not set # CONFIG_AJOYSTICK is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set # CONFIG_LCD_NOGETRUN is not set @@ -765,11 +786,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set - -# -# Alphanumeric/Segment LCD Devices -# -# CONFIG_LCD_LCD1602 is not set +# CONFIG_SLCD is not set # # LED Support @@ -777,6 +794,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -803,6 +821,8 @@ CONFIG_SDIO_PREFLIGHT=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -889,15 +909,18 @@ CONFIG_USBMSC_SCSI_STACKSIZE=2048 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -942,12 +965,6 @@ CONFIG_FS_ROMFS=y # 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 # @@ -1109,6 +1126,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1156,10 +1174,10 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -1177,7 +1195,6 @@ CONFIG_EXAMPLES_NX_BPP=16 # 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 CONFIG_EXAMPLES_NXHELLO_VPLANE=0 @@ -1208,12 +1225,13 @@ CONFIG_EXAMPLES_NXIMAGE_YSCALE1p0=y # CONFIG_EXAMPLES_NXIMAGE_YSCALE1p5 is not set # CONFIG_EXAMPLES_NXIMAGE_YSCALE2p0 is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_ROMFS is not set @@ -1222,8 +1240,8 @@ CONFIG_EXAMPLES_NXIMAGE_YSCALE1p0=y # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1234,11 +1252,11 @@ CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0 CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0" # CONFIG_EXAMPLES_TOUCHSCREEN_MOUSE is not set CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y -# 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -1262,8 +1280,8 @@ CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1394,12 +1412,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1407,8 +1425,8 @@ 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_USBMONITOR is not set CONFIG_SYSTEM_USBMSC=y CONFIG_SYSTEM_USBMSC_NLUNS=1 CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 @@ -1420,5 +1438,5 @@ CONFIG_SYSTEM_USBMSC_DEVPATH3="/dev/mmcsd2" # CONFIG_SYSTEM_USBMSC_DEBUGMM is not set CONFIG_SYSTEM_USBMSC_CMD_STACKSIZE=768 CONFIG_SYSTEM_USBMSC_CMD_PRIORITY=100 -# CONFIG_SYSTEM_USBMONITOR is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/hymini-stm32v/src/stm32_appinit.c b/configs/hymini-stm32v/src/stm32_appinit.c index 4a7b2206337c53b4dbe3558e0a23ddb02eae8c27..725a2126190960afcd03c0635145db28bf844070 100644 --- a/configs/hymini-stm32v/src/stm32_appinit.c +++ b/configs/hymini-stm32v/src/stm32_appinit.c @@ -216,7 +216,7 @@ int board_app_initialize(uintptr_t arg) /* Use SD card detect pin to check if a card is inserted */ cd_status = !stm32_gpioread(GPIO_SD_CD); - vdbg("Card detect : %hhu\n", cd_status); + _info("Card detect : %hhu\n", cd_status); sdio_mediachange(g_sdiodev, cd_status); #endif diff --git a/configs/hymini-stm32v/src/stm32_leds.c b/configs/hymini-stm32v/src/stm32_leds.c index f65b7a21e2ddc6ab80d4f87d1e7fd6c3b51f7798..22f724ef1f9f5f4ce7421f1b69c3e1b9c00256f0 100644 --- a/configs/hymini-stm32v/src/stm32_leds.c +++ b/configs/hymini-stm32v/src/stm32_leds.c @@ -57,18 +57,6 @@ * 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 - /* The following definitions map the encoded LED setting to GPIO settings */ #define HYMINI_STM32_LED1 (1 << 0) @@ -90,48 +78,56 @@ #define OFF_CLRBITS(v) (CLRBITS(OFF_BITS(v)) /* On: !LED1 + !LED2 Off: - */ + #define LED_STARTED_ON_SETBITS ((0) << ON_SETBITS_SHIFT) #define LED_STARTED_ON_CLRBITS ((HYMINI_STM32_LED1|HYMINI_STM32_LED2) << ON_CLRBITS_SHIFT) #define LED_STARTED_OFF_SETBITS (0 << OFF_SETBITS_SHIFT) #define LED_STARTED_OFF_CLRBITS (0 << OFF_CLRBITS_SHIFT) /* On: LED1+!LED2 Off: N/A */ + #define LED_HEAPALLOCATE_ON_SETBITS ((HYMINI_STM32_LED1) << ON_SETBITS_SHIFT) #define LED_HEAPALLOCATE_ON_CLRBITS ((HYMINI_STM32_LED2) << ON_CLRBITS_SHIFT) #define LED_HEAPALLOCATE_OFF_SETBITS (0) #define LED_HEAPALLOCATE_OFF_CLRBITS (0) /* On: LED2+!LED1 Off: N/A */ + #define LED_IRQSENABLED_ON_SETBITS ((HYMINI_STM32_LED2) << ON_SETBITS_SHIFT) #define LED_IRQSENABLED_ON_CLRBITS ((HYMINI_STM32_LED1) << ON_CLRBITS_SHIFT) #define LED_IRQSENABLED_OFF_SETBITS (0) #define LED_IRQSENABLED_OFF_CLRBITS (0) /* On: LED1+!LED2 Off: N/A */ + #define LED_STACKCREATED_ON_SETBITS ((HYMINI_STM32_LED1) << ON_SETBITS_SHIFT) #define LED_STACKCREATED_ON_CLRBITS ((HYMINI_STM32_LED2) << ON_CLRBITS_SHIFT) #define LED_STACKCREATED_OFF_SETBITS (0) #define LED_STACKCREATED_OFF_CLRBITS (0) /* On: !LED1 Off: LED1 */ + #define LED_INIRQ_ON_SETBITS ((0) << ON_SETBITS_SHIFT) #define LED_INIRQ_ON_CLRBITS ((HYMINI_STM32_LED1) << ON_CLRBITS_SHIFT) #define LED_INIRQ_OFF_SETBITS ((HYMINI_STM32_LED1) << OFF_SETBITS_SHIFT) #define LED_INIRQ_OFF_CLRBITS ((0) << OFF_CLRBITS_SHIFT) /* On: LED2 Off: !LED2 */ + #define LED_SIGNAL_ON_SETBITS ((HYMINI_STM32_LED2) << ON_SETBITS_SHIFT) #define LED_SIGNAL_ON_CLRBITS ((0) << ON_CLRBITS_SHIFT) #define LED_SIGNAL_OFF_SETBITS ((0) << OFF_SETBITS_SHIFT) #define LED_SIGNAL_OFF_CLRBITS ((HYMINI_STM32_LED2) << OFF_CLRBITS_SHIFT) /* On: LED1+LED2 Off: - */ + #define LED_ASSERTION_ON_SETBITS ((HYMINI_STM32_LED2|HYMINI_STM32_LED2) << ON_SETBITS_SHIFT) #define LED_ASSERTION_ON_CLRBITS ((0) << ON_CLRBITS_SHIFT) #define LED_ASSERTION_OFF_SETBITS ((0) << OFF_SETBITS_SHIFT) #define LED_ASSERTION_OFF_CLRBITS ((0) << OFF_CLRBITS_SHIFT) /* On: LED1 Off: LED2 */ + #define LED_PANIC_ON_SETBITS ((HYMINI_STM32_LED1) << ON_SETBITS_SHIFT) #define LED_PANIC_ON_CLRBITS ((HYMINI_STM32_LED2) << ON_CLRBITS_SHIFT) #define LED_PANIC_OFF_SETBITS ((HYMINI_STM32_LED2) << OFF_SETBITS_SHIFT) diff --git a/configs/hymini-stm32v/src/stm32_r61505u.c b/configs/hymini-stm32v/src/stm32_r61505u.c index be67d14ac93e8f548ddd86256289c0557b064fa7..cb787eae4a9f1c5031ff96c3556fac58efc5d58a 100644 --- a/configs/hymini-stm32v/src/stm32_r61505u.c +++ b/configs/hymini-stm32v/src/stm32_r61505u.c @@ -91,14 +91,6 @@ #define LCD_ID 0x1505 -/* Debug ******************************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg(format, ...) vdbg(format, ##__VA_ARGS__) -#else -# define lcddbg(x...) -#endif - /* This should be put elsewhere (possibly include/nuttx/compiler.h) */ #ifdef __CC_ARM /* ARM Compiler */ @@ -562,7 +554,7 @@ static int lcd_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); - gvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n", + ginfo("fmt: %d xres: %d yres: %d nplanes: %d\n", g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes); memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s)); @@ -581,7 +573,7 @@ static int lcd_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, FAR struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(dev && pinfo && planeno == 0); - gvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); + ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); return OK; @@ -598,7 +590,7 @@ static int lcd_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, static int lcd_getpower(struct lcd_dev_s *dev) { - gvdbg("power: %d\n", 0); + ginfo("power: %d\n", 0); return g_lcddev.power; } @@ -618,7 +610,7 @@ static int lcd_setpower(struct lcd_dev_s *dev, int power) return OK; } - gvdbg("power: %d\n", power); + ginfo("power: %d\n", power); DEBUGASSERT(power <= CONFIG_LCD_MAXPOWER); /* Set new power level */ @@ -639,7 +631,7 @@ static int lcd_setpower(struct lcd_dev_s *dev, int power) duty = LCD_BL_TIMER_PERIOD - 1; } - gvdbg("PWM duty: %d\n", duty); + ginfo("PWM duty: %d\n", duty); putreg16((uint16_t)duty, STM32_TIM3_CCR2); #endif /* TODO turn the display on */ @@ -648,7 +640,7 @@ static int lcd_setpower(struct lcd_dev_s *dev, int power) { /* FIXME: Turn display off ? */ - gvdbg("Force PWM to 0\n"); + ginfo("Force PWM to 0\n"); putreg16((uint16_t)0, STM32_TIM3_CCR2); } @@ -666,7 +658,7 @@ static int lcd_setpower(struct lcd_dev_s *dev, int power) static int lcd_getcontrast(struct lcd_dev_s *dev) { - gvdbg("Not implemented\n"); + ginfo("Not implemented\n"); return -ENOSYS; } @@ -680,7 +672,7 @@ static int lcd_getcontrast(struct lcd_dev_s *dev) static int lcd_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) { - gvdbg("Not implemented\n"); + ginfo("Not implemented\n"); return -ENOSYS; } @@ -880,26 +872,26 @@ static void lcd_backlight(void) /* Dump timer3 registers */ - lcddbg("APB1ENR: %08x\n", getreg32(STM32_RCC_APB1ENR)); - lcddbg("CR1: %04x\n", getreg32(STM32_TIM3_CR1)); - lcddbg("CR2: %04x\n", getreg32(STM32_TIM3_CR2)); - lcddbg("SMCR: %04x\n", getreg32(STM32_TIM3_SMCR)); - lcddbg("DIER: %04x\n", getreg32(STM32_TIM3_DIER)); - lcddbg("SR: %04x\n", getreg32(STM32_TIM3_SR)); - lcddbg("EGR: %04x\n", getreg32(STM32_TIM3_EGR)); - lcddbg("CCMR1: %04x\n", getreg32(STM32_TIM3_CCMR1)); - lcddbg("CCMR2: %04x\n", getreg32(STM32_TIM3_CCMR2)); - lcddbg("CCER: %04x\n", getreg32(STM32_TIM3_CCER)); - lcddbg("CNT: %04x\n", getreg32(STM32_TIM3_CNT)); - lcddbg("PSC: %04x\n", getreg32(STM32_TIM3_PSC)); - lcddbg("ARR: %04x\n", getreg32(STM32_TIM3_ARR)); - lcddbg("CCR1: %04x\n", getreg32(STM32_TIM3_CCR1)); - lcddbg("CCR2: %04x\n", getreg32(STM32_TIM3_CCR2)); - lcddbg("CCR3: %04x\n", getreg32(STM32_TIM3_CCR3)); - lcddbg("CCR4: %04x\n", getreg32(STM32_TIM3_CCR4)); - lcddbg("CCR4: %04x\n", getreg32(STM32_TIM3_CCR4)); - lcddbg("CCR4: %04x\n", getreg32(STM32_TIM3_CCR4)); - lcddbg("DMAR: %04x\n", getreg32(STM32_TIM3_DMAR)); + lcdinfo("APB1ENR: %08x\n", getreg32(STM32_RCC_APB1ENR)); + lcdinfo("CR1: %04x\n", getreg32(STM32_TIM3_CR1)); + lcdinfo("CR2: %04x\n", getreg32(STM32_TIM3_CR2)); + lcdinfo("SMCR: %04x\n", getreg32(STM32_TIM3_SMCR)); + lcdinfo("DIER: %04x\n", getreg32(STM32_TIM3_DIER)); + lcdinfo("SR: %04x\n", getreg32(STM32_TIM3_SR)); + lcdinfo("EGR: %04x\n", getreg32(STM32_TIM3_EGR)); + lcdinfo("CCMR1: %04x\n", getreg32(STM32_TIM3_CCMR1)); + lcdinfo("CCMR2: %04x\n", getreg32(STM32_TIM3_CCMR2)); + lcdinfo("CCER: %04x\n", getreg32(STM32_TIM3_CCER)); + lcdinfo("CNT: %04x\n", getreg32(STM32_TIM3_CNT)); + lcdinfo("PSC: %04x\n", getreg32(STM32_TIM3_PSC)); + lcdinfo("ARR: %04x\n", getreg32(STM32_TIM3_ARR)); + lcdinfo("CCR1: %04x\n", getreg32(STM32_TIM3_CCR1)); + lcdinfo("CCR2: %04x\n", getreg32(STM32_TIM3_CCR2)); + lcdinfo("CCR3: %04x\n", getreg32(STM32_TIM3_CCR3)); + lcdinfo("CCR4: %04x\n", getreg32(STM32_TIM3_CCR4)); + lcdinfo("CCR4: %04x\n", getreg32(STM32_TIM3_CCR4)); + lcdinfo("CCR4: %04x\n", getreg32(STM32_TIM3_CCR4)); + lcdinfo("DMAR: %04x\n", getreg32(STM32_TIM3_DMAR)); } #endif @@ -921,7 +913,7 @@ int board_lcd_initialize(void) { unsigned short id; - gvdbg("Initializing\n"); + ginfo("Initializing\n"); /* Configure GPIO pins and configure the FSMC to support the LCD */ @@ -938,7 +930,7 @@ int board_lcd_initialize(void) { /* Not a R61505U ? */ - gdbg("board_lcd_initialize: LCD ctrl is not a R61505U"); + lcderr("ERROR: board_lcd_initialize: LCD ctrl is not a R61505U"); return ERROR; } diff --git a/configs/hymini-stm32v/src/stm32_spi.c b/configs/hymini-stm32v/src/stm32_spi.c index 0f1852dd061cb032606cce8fa080a7a3d00de91c..25f18c961e4eef0298759b80cdb80382e860482b 100644 --- a/configs/hymini-stm32v/src/stm32_spi.c +++ b/configs/hymini-stm32v/src/stm32_spi.c @@ -54,32 +54,6 @@ #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#define SPI_DEBUG /* Define to enable debug */ -#define SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -102,7 +76,7 @@ void stm32_spidev_initialize(void) #ifdef CONFIG_STM32_SPI1 /* Configure the SPI-based touch screen CS GPIO */ - spivdbg("Configure GPIO for SPI1/CS\n"); + spiinfo("Configure GPIO for SPI1/CS\n"); stm32_configgpio(GPIO_TS_CS); #endif } @@ -135,7 +109,7 @@ void stm32_spidev_initialize(void) #ifdef CONFIG_STM32_SPI1 void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); if (devid == SPIDEV_TOUCHSCREEN) { @@ -154,7 +128,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI2 void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -166,7 +140,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI3 void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) diff --git a/configs/hymini-stm32v/src/stm32_ssd1289.c b/configs/hymini-stm32v/src/stm32_ssd1289.c index c8889c38a5911cda06b850b16440e3b0c061bae7..d55964bb12b7bb995a60cb9d2bd239f98a435fa2 100644 --- a/configs/hymini-stm32v/src/stm32_ssd1289.c +++ b/configs/hymini-stm32v/src/stm32_ssd1289.c @@ -65,20 +65,6 @@ # error "CONFIG_STM32_FSMC is required to use the LCD" #endif -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must - * also be enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif - /* Color depth and format */ #define LCD_BPP 16 @@ -102,22 +88,10 @@ #define LCD_INDEX 0x60000000 /* RS = 0 */ #define LCD_DATA 0x60020000 /* RS = 1 */ -/* Debug ******************************************************************************/ -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - -/************************************************************************************** - * Private Type Definition - **************************************************************************************/ - /************************************************************************************** * Private Function Prototypes **************************************************************************************/ + /* Low Level LCD access */ static void stm32_select(FAR struct ssd1289_lcd_s *dev); @@ -359,26 +333,26 @@ static void init_lcd_backlight(void) /* Dump timer3 registers */ - lcddbg("APB1ENR: %08x\n", getreg32(STM32_RCC_APB1ENR)); - lcddbg("CR1: %04x\n", getreg32(STM32_TIM3_CR1)); - lcddbg("CR2: %04x\n", getreg32(STM32_TIM3_CR2)); - lcddbg("SMCR: %04x\n", getreg32(STM32_TIM3_SMCR)); - lcddbg("DIER: %04x\n", getreg32(STM32_TIM3_DIER)); - lcddbg("SR: %04x\n", getreg32(STM32_TIM3_SR)); - lcddbg("EGR: %04x\n", getreg32(STM32_TIM3_EGR)); - lcddbg("CCMR1: %04x\n", getreg32(STM32_TIM3_CCMR1)); - lcddbg("CCMR2: %04x\n", getreg32(STM32_TIM3_CCMR2)); - lcddbg("CCER: %04x\n", getreg32(STM32_TIM3_CCER)); - lcddbg("CNT: %04x\n", getreg32(STM32_TIM3_CNT)); - lcddbg("PSC: %04x\n", getreg32(STM32_TIM3_PSC)); - lcddbg("ARR: %04x\n", getreg32(STM32_TIM3_ARR)); - lcddbg("CCR1: %04x\n", getreg32(STM32_TIM3_CCR1)); - lcddbg("CCR2: %04x\n", getreg32(STM32_TIM3_CCR2)); - lcddbg("CCR3: %04x\n", getreg32(STM32_TIM3_CCR3)); - lcddbg("CCR4: %04x\n", getreg32(STM32_TIM3_CCR4)); - lcddbg("CCR4: %04x\n", getreg32(STM32_TIM3_CCR4)); - lcddbg("CCR4: %04x\n", getreg32(STM32_TIM3_CCR4)); - lcddbg("DMAR: %04x\n", getreg32(STM32_TIM3_DMAR)); + lcdinfo("APB1ENR: %08x\n", getreg32(STM32_RCC_APB1ENR)); + lcdinfo("CR1: %04x\n", getreg32(STM32_TIM3_CR1)); + lcdinfo("CR2: %04x\n", getreg32(STM32_TIM3_CR2)); + lcdinfo("SMCR: %04x\n", getreg32(STM32_TIM3_SMCR)); + lcdinfo("DIER: %04x\n", getreg32(STM32_TIM3_DIER)); + lcdinfo("SR: %04x\n", getreg32(STM32_TIM3_SR)); + lcdinfo("EGR: %04x\n", getreg32(STM32_TIM3_EGR)); + lcdinfo("CCMR1: %04x\n", getreg32(STM32_TIM3_CCMR1)); + lcdinfo("CCMR2: %04x\n", getreg32(STM32_TIM3_CCMR2)); + lcdinfo("CCER: %04x\n", getreg32(STM32_TIM3_CCER)); + lcdinfo("CNT: %04x\n", getreg32(STM32_TIM3_CNT)); + lcdinfo("PSC: %04x\n", getreg32(STM32_TIM3_PSC)); + lcdinfo("ARR: %04x\n", getreg32(STM32_TIM3_ARR)); + lcdinfo("CCR1: %04x\n", getreg32(STM32_TIM3_CCR1)); + lcdinfo("CCR2: %04x\n", getreg32(STM32_TIM3_CCR2)); + lcdinfo("CCR3: %04x\n", getreg32(STM32_TIM3_CCR3)); + lcdinfo("CCR4: %04x\n", getreg32(STM32_TIM3_CCR4)); + lcdinfo("CCR4: %04x\n", getreg32(STM32_TIM3_CCR4)); + lcdinfo("CCR4: %04x\n", getreg32(STM32_TIM3_CCR4)); + lcdinfo("DMAR: %04x\n", getreg32(STM32_TIM3_DMAR)); } /************************************************************************************ @@ -482,7 +456,7 @@ int board_lcd_initialize(void) if (!g_ssd1289drvr) { - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); init_lcd_backlight(); @@ -496,7 +470,7 @@ int board_lcd_initialize(void) g_ssd1289drvr = ssd1289_lcdinitialize(&g_ssd1289); if (!g_ssd1289drvr) { - lcddbg("ERROR: ssd1289_lcdinitialize failed\n"); + lcderr("ERROR: ssd1289_lcdinitialize failed\n"); return -ENODEV; } } diff --git a/configs/hymini-stm32v/src/stm32_ts.c b/configs/hymini-stm32v/src/stm32_ts.c index 1344c245cd5c8570d5ca5fefb49ce64483192a8e..16f91c3fd0e0007f44f16d16018c44a18645b2d4 100644 --- a/configs/hymini-stm32v/src/stm32_ts.c +++ b/configs/hymini-stm32v/src/stm32_ts.c @@ -95,7 +95,7 @@ static xcpt_t tc_isr; /* Attach the ADS7843E interrupt handler to the GPIO interrupt */ static int hymini_ts_irq_attach(FAR struct ads7843e_config_s *state, xcpt_t isr) { - ivdbg("hymini_ts_irq_attach\n"); + iinfo("hymini_ts_irq_attach\n"); tc_isr = isr; stm32_gpiosetevent(GPIO_TS_IRQ, true, true, true, isr); @@ -106,7 +106,7 @@ static int hymini_ts_irq_attach(FAR struct ads7843e_config_s *state, xcpt_t isr) static void hymini_ts_irq_enable(FAR struct ads7843e_config_s *state, bool enable) { - illvdbg("%d\n", enable); + iinfo("%d\n", enable); stm32_gpiosetevent(GPIO_TS_IRQ, true, true, true, enable? tc_isr:NULL); } @@ -153,12 +153,12 @@ int board_tsc_setup(int minor) { FAR struct spi_dev_s *dev; - idbg("minor %d\n", minor); + iinfo("minor %d\n", minor); dev = stm32_spibus_initialize(1); if (!dev) { - idbg("Failed to initialize SPI bus\n"); + ierr("ERROR: Failed to initialize SPI bus\n"); return -ENODEV; } diff --git a/configs/hymini-stm32v/src/stm32_usbdev.c b/configs/hymini-stm32v/src/stm32_usbdev.c index d7e868c9031e0661f442f64f0d75518ce473eb65..4a60528b42abe9a4eaf1240e12d9347d17d2722e 100644 --- a/configs/hymini-stm32v/src/stm32_usbdev.c +++ b/configs/hymini-stm32v/src/stm32_usbdev.c @@ -73,7 +73,7 @@ void stm32_usbinitialize(void) { - ulldbg("called\n"); + uinfo("called\n"); /* USB Soft Connect Pullup */ stm32_configgpio(GPIO_USB_PULLUP); @@ -111,6 +111,5 @@ int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } - diff --git a/configs/hymini-stm32v/usbmsc/defconfig b/configs/hymini-stm32v/usbmsc/defconfig index a38efa7b82fb3d12afacce7111a84cb3b4259ddb..75652b23a63ce049109f9ba051f62b65438ab0d5 100644 --- a/configs/hymini-stm32v/usbmsc/defconfig +++ b/configs/hymini-stm32v/usbmsc/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -201,6 +203,7 @@ CONFIG_ARCH_CHIP_STM32F103VC=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -413,6 +416,10 @@ CONFIG_STM32_JTAG_DISABLE=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_DMACAPABLE is not set # CONFIG_STM32_FSMC_SRAM is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -424,12 +431,20 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device 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 + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -688,7 +703,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -696,6 +716,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -719,6 +740,8 @@ CONFIG_SDIO_PREFLIGHT=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -817,15 +840,18 @@ CONFIG_USBMSC_SCSI_STACKSIZE=2048 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -862,12 +888,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -943,6 +963,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -972,10 +993,10 @@ CONFIG_ARCH_HAVE_TLS=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -984,18 +1005,18 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1009,10 +1030,10 @@ CONFIG_ARCH_HAVE_TLS=y # 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_WEBSERVER is not set # # File System Utilities @@ -1036,8 +1057,8 @@ CONFIG_ARCH_HAVE_TLS=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1070,17 +1091,16 @@ CONFIG_ARCH_HAVE_TLS=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_USBMSC=y CONFIG_SYSTEM_USBMSC_NLUNS=1 @@ -1091,4 +1111,5 @@ CONFIG_SYSTEM_USBMSC_DEVPATH2="/dev/mmcsd1" CONFIG_SYSTEM_USBMSC_DEVMINOR3=2 CONFIG_SYSTEM_USBMSC_DEVPATH3="/dev/mmcsd2" # CONFIG_SYSTEM_USBMSC_DEBUGMM is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/hymini-stm32v/usbnsh/defconfig b/configs/hymini-stm32v/usbnsh/defconfig index d744b1a2ca9e1eaca82e12f6c68ffcf505873d6f..5ac1d3cc08fa34de27101413237d33b24bcf27cc 100644 --- a/configs/hymini-stm32v/usbnsh/defconfig +++ b/configs/hymini-stm32v/usbnsh/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARCH_CHIP_STM32F103VC=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -408,6 +411,10 @@ CONFIG_STM32_JTAG_DISABLE=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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -419,9 +426,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -676,7 +691,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -684,6 +704,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -696,6 +717,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y +# CONFIG_SERIAL_CONSOLE is not set # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -785,15 +807,21 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +CONFIG_SYSLOG_CHAR=y # CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set +# CONFIG_CONSOLE_SYSLOG is not set +CONFIG_SYSLOG_CHAR_CRLF=y +CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" # # Networking Support @@ -830,14 +858,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_PROCFS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -CONFIG_SYSLOG=y -# CONFIG_SYSLOG_TIMESTAMP is not set -CONFIG_SYSLOG_CHAR=y -CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" - # # Graphics Support # @@ -905,6 +925,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -946,10 +967,10 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -958,18 +979,18 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -983,10 +1004,10 @@ CONFIG_EXAMPLES_NSH=y # 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_WEBSERVER is not set # # File System Utilities @@ -1008,8 +1029,8 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1133,12 +1154,13 @@ CONFIG_NSH_CONSOLE=y # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CDCACM is not set # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1146,7 +1168,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/hymini-stm32v/usbserial/defconfig b/configs/hymini-stm32v/usbserial/defconfig index 6183ec98d4fb6ee6cf08f2aea868c284041b8042..8f3d549fe20e8c0c7cc1499fe06f1e9c9e7605aa 100644 --- a/configs/hymini-stm32v/usbserial/defconfig +++ b/configs/hymini-stm32v/usbserial/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARCH_CHIP_STM32F103VC=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -409,6 +412,10 @@ CONFIG_STM32_JTAG_DISABLE=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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -420,12 +427,20 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device 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 + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -674,7 +689,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -682,6 +702,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -694,6 +715,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -791,15 +813,18 @@ CONFIG_PL2303_PRODUCTSTR="USBdev Serial" # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -830,12 +855,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -908,6 +927,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -936,10 +956,10 @@ CONFIG_ARCH_HAVE_TLS=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -948,18 +968,18 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -973,11 +993,11 @@ CONFIG_ARCH_HAVE_TLS=y # 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=y CONFIG_EXAMPLES_USBSERIAL_BUFSIZE=512 # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -999,8 +1019,8 @@ CONFIG_EXAMPLES_USBSERIAL_BUFSIZE=512 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1033,16 +1053,16 @@ CONFIG_EXAMPLES_USBSERIAL_BUFSIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/kwikstik-k40/ostest/defconfig b/configs/kwikstik-k40/ostest/defconfig index 51b5c56a7a424db619fa90b77d80738e527d3abe..dcf0bda3c3074b89c61753a5a61c94fbfb39bbbe 100644 --- a/configs/kwikstik-k40/ostest/defconfig +++ b/configs/kwikstik-k40/ostest/defconfig @@ -37,14 +37,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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=y # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_KINETIS=y # 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 @@ -102,12 +109,23 @@ 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="kinetis" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI 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 # @@ -117,6 +135,7 @@ CONFIG_ARCH_HAVE_FPU=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 @@ -128,6 +147,14 @@ CONFIG_ARMV7M_OABI_TOOLCHAIN=y # # Kinetis Configuration Options # +# CONFIG_ARCH_CHIP_MK20DN32VLH5 is not set +# CONFIG_ARCH_CHIP_MK20DX32VLH5 is not set +# CONFIG_ARCH_CHIP_MK20DN64VLH5 is not set +# CONFIG_ARCH_CHIP_MK20DX64VLH5 is not set +# CONFIG_ARCH_CHIP_MK20DN128VLH5 is not set +# CONFIG_ARCH_CHIP_MK20DX128VLH5 is not set +# CONFIG_ARCH_CHIP_MK20DX64VLH7 is not set +# CONFIG_ARCH_CHIP_MK20DX128VLH7 is not set # CONFIG_ARCH_CHIP_MK20DX256VLH7 is not set # CONFIG_ARCH_CHIP_MK40N512VLQ100 is not set # CONFIG_ARCH_CHIP_MK40N512VMD100 is not set @@ -137,6 +164,7 @@ CONFIG_ARCH_CHIP_MK40X256VLQ100=y # CONFIG_ARCH_CHIP_MK40X256VMD100 is not set # CONFIG_ARCH_CHIP_MK60N256VLQ100 is not set # CONFIG_ARCH_CHIP_MK60N256VMD100 is not set +# CONFIG_ARCH_CHIP_MK60N512VLL100 is not set # CONFIG_ARCH_CHIP_MK60N512VLQ100 is not set # CONFIG_ARCH_CHIP_MK60N512VMD100 is not set # CONFIG_ARCH_CHIP_MK60X256VLQ100 is not set @@ -209,11 +237,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -308,6 +339,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="ostest_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 @@ -358,9 +390,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -391,6 +424,7 @@ CONFIG_DEV_NULL=y # 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 @@ -408,8 +442,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -419,6 +468,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -442,13 +493,10 @@ CONFIG_UART5_SERIALDRIVER=y # 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_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_UART5_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -465,19 +513,23 @@ CONFIG_UART5_PARITY=0 CONFIG_UART5_2STOP=0 # CONFIG_UART5_IFLOWCONTROL is not set # CONFIG_UART5_OFLOWCONTROL is not set +# CONFIG_UART5_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -508,12 +560,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -532,6 +578,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -572,10 +622,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -590,14 +644,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -605,11 +658,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -617,11 +670,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM is not set # CONFIG_EXAMPLES_NXTEXT is not set CONFIG_EXAMPLES_OSTEST=y CONFIG_EXAMPLES_OSTEST_LOOPS=1 @@ -629,11 +682,12 @@ CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048 CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3 CONFIG_EXAMPLES_OSTEST_RR_RANGE=10000 CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 +# 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_PPPD 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 @@ -641,14 +695,24 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -660,26 +724,23 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # @@ -697,15 +758,16 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_POWEROFF is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/kwikstik-k40/src/k40_lcd.c b/configs/kwikstik-k40/src/k40_lcd.c index bd955fb4fac0afe3312860064319680f1f040ec6..9200e2333cc2c675fb2a919dc8400430c70c1463 100644 --- a/configs/kwikstik-k40/src/k40_lcd.c +++ b/configs/kwikstik-k40/src/k40_lcd.c @@ -49,39 +49,6 @@ #include "up_arch.h" #include "kwikstik-k40.h" - -/************************************************************************************** - * Pre-processor Definitions - **************************************************************************************/ - -/* Configuration **********************************************************************/ - -/* Display/Color Properties ***********************************************************/ - -/* Debug ******************************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg(format, ...) vdbg(format, ##__VA_ARGS__) -#else -# define lcddbg(x...) -#endif - -/************************************************************************************** - * Private Type Definition - **************************************************************************************/ - -/************************************************************************************** - * Private Function Prototypes - **************************************************************************************/ - -/************************************************************************************** - * Private Data - **************************************************************************************/ - -/************************************************************************************** - * Private Functions - **************************************************************************************/ - /************************************************************************************** * Public Functions **************************************************************************************/ @@ -98,7 +65,7 @@ int board_lcd_initialize(void) { - gvdbg("Initializing\n"); + ginfo("Initializing\n"); #warning "Missing logic" return OK; } diff --git a/configs/kwikstik-k40/src/k40_leds.c b/configs/kwikstik-k40/src/k40_leds.c index 8a5cfe69ab0bbffe3a7643320f985639699c28e1..0164327070b3dddd25786d3da14825703e139fac 100644 --- a/configs/kwikstik-k40/src/k40_leds.c +++ b/configs/kwikstik-k40/src/k40_leds.c @@ -43,30 +43,6 @@ #include -/**************************************************************************** - * 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/kwikstik-k40/src/k40_spi.c b/configs/kwikstik-k40/src/k40_spi.c index 7b14ea57b8b8ee2c78ef39120c20a831903cffd6..e8e2da248b0ff22ff78fc82d8ff5e5f2e4a32ed7 100644 --- a/configs/kwikstik-k40/src/k40_spi.c +++ b/configs/kwikstik-k40/src/k40_spi.c @@ -53,29 +53,6 @@ #if defined(CONFIG_KINETIS_SPI1) || defined(CONFIG_KINETIS_SPI2) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef CONFIG_DEBUG_SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -121,7 +98,7 @@ void weak_function kinetis_spidev_initialize(void) #ifdef CONFIG_KINETIS_SPI1 void kinetis_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); # warning "Missing logic" } @@ -135,7 +112,7 @@ uint8_t kinetis_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_KINETIS_SPI2 void kinetis_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); # warning "Missing logic" } @@ -149,7 +126,7 @@ uint8_t kinetis_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_KINETIS_SPI3 void kinetis_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); # warning "Missing logic" } diff --git a/configs/kwikstik-k40/src/k40_usbdev.c b/configs/kwikstik-k40/src/k40_usbdev.c index cfd9f071e8a91be9aa20a1fa8a76db7a9549895c..d21bd39adea3f0b7688424718d89bc0edb819622 100644 --- a/configs/kwikstik-k40/src/k40_usbdev.c +++ b/configs/kwikstik-k40/src/k40_usbdev.c @@ -108,6 +108,6 @@ int kinetis_usbpullup(FAR struct usbdev_s *dev, bool enable) void kinetis_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); #warning "Missing logic" } diff --git a/configs/launchxl-tms57004/nsh/defconfig b/configs/launchxl-tms57004/nsh/defconfig index 082be95f2bd8f1964a61078df9692fdd8107cb4e..ce89fc88bf351b55b2afddc244d4cdc596dcfa98 100644 --- a/configs/launchxl-tms57004/nsh/defconfig +++ b/configs/launchxl-tms57004/nsh/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH="arm" # 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=y # CONFIG_ARCH_CHIP_MOXART is not set @@ -110,6 +113,7 @@ CONFIG_ARCH_CHIP_TMS570=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=y # CONFIG_ARCH_CORTEXR4F is not set # CONFIG_ARCH_CORTEXR5 is not set @@ -118,8 +122,11 @@ CONFIG_ARCH_CORTEXR4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-r" CONFIG_ARCH_CHIP="tms570" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set # CONFIG_ARM_MPU is not set CONFIG_ARCH_HAVE_LOWVECTORS=y @@ -178,6 +185,7 @@ CONFIG_TMS570_GIO_IRQ=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set CONFIG_ARCH_HAVE_MPU=y @@ -390,6 +398,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -405,13 +415,20 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support # # CONFIG_USERLED is not set +# CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -423,6 +440,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -446,10 +465,6 @@ CONFIG_SCI1_SERIALDRIVER=y # 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 @@ -473,15 +488,18 @@ CONFIG_SCI1_2STOP=1 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -515,7 +533,9 @@ 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 is not set # CONFIG_FS_TMPFS is not set @@ -532,12 +552,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -556,6 +570,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -601,12 +619,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -642,10 +663,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -654,33 +675,35 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -688,6 +711,11 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + # # Graphics Support # @@ -699,8 +727,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -711,6 +739,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 @@ -825,13 +854,13 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_I2CTOOL is not set +# CONFIG_SYSTEM_INSTALL is not set CONFIG_SYSTEM_RAMTEST=y CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -839,6 +868,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/launchxl-tms57004/src/tms570_autoleds.c b/configs/launchxl-tms57004/src/tms570_autoleds.c index 761986041d703f1804fc42bffe9eb54204f8dc3e..05cfa40d1bc5aca54df7a8e839f13f74977b50b4 100644 --- a/configs/launchxl-tms57004/src/tms570_autoleds.c +++ b/configs/launchxl-tms57004/src/tms570_autoleds.c @@ -89,22 +89,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 - /**************************************************************************** * Name: board_autoled_initialize ****************************************************************************/ diff --git a/configs/lincoln60/README.txt b/configs/lincoln60/README.txt index 1bea5b5bfb066b128d4e2b9f56b08f67ce349d32..b5320549c0123403913d1d2750c2698bd037c12c 100644 --- a/configs/lincoln60/README.txt +++ b/configs/lincoln60/README.txt @@ -386,9 +386,9 @@ Lincoln 60 Configuration Options CONFIG_NET_NRXDESC - Configured number of Rx descriptors. Default: 18 CONFIG_NET_WOL - Enable Wake-up on Lan (not fully implemented). CONFIG_NET_REGDEBUG - Enabled low level register debug. Also needs - CONFIG_DEBUG. + CONFIG_DEBUG_FEATURES. CONFIG_NET_DUMPPACKET - Dump all received and transmitted packets. - Also needs CONFIG_DEBUG. + Also needs CONFIG_DEBUG_FEATURES. CONFIG_NET_HASH - Enable receipt of near-perfect match frames. CONFIG_LPC17_MULTICAST - Enable receipt of multicast (and unicast) frames. Automatically set if CONFIG_NET_IGMP is selected. diff --git a/configs/lincoln60/netnsh/defconfig b/configs/lincoln60/netnsh/defconfig index 95feb4b7f4d34645e34efebcbb6a5084bcc1cf25..265907de16ff8bfbc9425be36382d7e46e973633 100644 --- a/configs/lincoln60/netnsh/defconfig +++ b/configs/lincoln60/netnsh/defconfig @@ -41,14 +41,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -79,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 @@ -97,7 +100,9 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -108,14 +113,25 @@ CONFIG_ARCH_CORTEXM3=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="lpc17xx" +# 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 # @@ -125,6 +141,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -233,6 +250,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set CONFIG_ARCH_HAVE_MPU=y @@ -378,6 +396,7 @@ CONFIG_NAME_MAX=32 # 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 @@ -393,9 +412,10 @@ CONFIG_SIG_SIGWORK=17 # CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_HPWORK=y @@ -447,8 +467,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y @@ -501,6 +536,8 @@ CONFIG_ETH0_PHY_KSZ8041=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -524,10 +561,6 @@ CONFIG_UART0_SERIALDRIVER=y # 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 @@ -554,15 +587,18 @@ CONFIG_UART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -706,7 +742,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_NFS is not set # CONFIG_FS_NXFFS is not set # CONFIG_FS_ROMFS is not set @@ -715,12 +753,6 @@ CONFIG_FS_FAT=y # 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 # @@ -739,6 +771,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -784,6 +820,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 @@ -791,12 +829,14 @@ CONFIG_NETDB_DNSCLIENT_ENTRIES=8 CONFIG_NETDB_DNSCLIENT_NAMESIZE=32 CONFIG_NETDB_DNSCLIENT_LIFESEC=3600 CONFIG_NETDB_DNSCLIENT_MAXRESPONSE=96 +# CONFIG_NETDB_RESOLVCONF is not set CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_NETDB_DNSSERVER_IPv4 is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -817,18 +857,20 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # 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_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -838,18 +880,19 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y 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_NXTERM 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_PPPD 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 @@ -857,22 +900,29 @@ CONFIG_EXAMPLES_NSH=y # 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_UDP is not set # 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_WEBSERVER is not set # CONFIG_EXAMPLES_WGET 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 @@ -885,8 +935,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -899,25 +949,27 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CODECS is not set CONFIG_NETUTILS_DHCPC=y # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -936,6 +988,7 @@ CONFIG_NSH_NESTDEPTH=3 # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_ARP is not set # CONFIG_NSH_DISABLE_BASENAME is not set # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set @@ -978,6 +1031,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 @@ -1010,6 +1064,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1039,6 +1094,8 @@ CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048 CONFIG_NSH_TELNETD_CLIENTPRIO=100 CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048 CONFIG_NSH_IOBUFFER_SIZE=512 +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # CONFIG_NSH_TELNET_LOGIN is not set # @@ -1053,13 +1110,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1068,5 +1124,6 @@ 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/lincoln60/nsh/defconfig b/configs/lincoln60/nsh/defconfig index 54c6ad3f8cc1ba901a9e22b6391e080446bc2104..223015351e30a27f7514e9d7823b540c941e25ce 100644 --- a/configs/lincoln60/nsh/defconfig +++ b/configs/lincoln60/nsh/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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 @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -102,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="lpc17xx" +# 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 # @@ -119,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -212,11 +231,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -277,6 +299,8 @@ 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 @@ -316,6 +340,7 @@ 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 @@ -366,9 +391,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -399,6 +425,7 @@ CONFIG_DEV_NULL=y # 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 @@ -416,8 +443,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -427,6 +469,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -450,14 +494,11 @@ CONFIG_UART0_SERIALDRIVER=y # 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_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -474,19 +515,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -519,17 +564,15 @@ 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 # CONFIG_FS_SMARTFS is not set # CONFIG_FS_PROCFS is not set - -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -549,6 +592,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -594,10 +641,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -612,26 +664,26 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -639,19 +691,19 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD 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 @@ -659,15 +711,26 @@ CONFIG_EXAMPLES_NSH=y # 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_THTTPD 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_WEBSERVER 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 @@ -680,30 +743,28 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -722,6 +783,7 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -730,6 +792,7 @@ 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 @@ -738,8 +801,10 @@ CONFIG_NSH_DISABLE_DATE=y # 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 @@ -758,8 +823,10 @@ CONFIG_NSH_DISABLE_DATE=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 # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set @@ -786,6 +853,8 @@ CONFIG_NSH_FILEIOSIZE=512 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 @@ -799,16 +868,19 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y -# CONFIG_SYSTEM_POWEROFF is not set +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/lincoln60/src/lpc17_leds.c b/configs/lincoln60/src/lpc17_leds.c index c3c4b515a6fd133f2971c8857a335054f4b23382..b1ce7eb8e054362f02284c1ed721cde736170f34 100644 --- a/configs/lincoln60/src/lpc17_leds.c +++ b/configs/lincoln60/src/lpc17_leds.c @@ -60,25 +60,9 @@ * 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 -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /* Dump GPIO registers */ -#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_LEDS) +#ifdef CONFIG_DEBUG_LEDS_INFO # define led_dumpgpio(m) lpc17_dumpgpio(LINCOLN60_LED2, m) #else # define led_dumpgpio(m) diff --git a/configs/lincoln60/thttpd-binfs/defconfig b/configs/lincoln60/thttpd-binfs/defconfig index a752c4c72ffcaef339a402a1d494f03917c018ba..a59c0d2ee566dc28347ac4bcb9984b0646f8d069 100644 --- a/configs/lincoln60/thttpd-binfs/defconfig +++ b/configs/lincoln60/thttpd-binfs/defconfig @@ -41,14 +41,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -79,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 @@ -96,7 +99,11 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -106,14 +113,25 @@ CONFIG_ARCH_CORTEXM3=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="lpc17xx" +# 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 # @@ -123,6 +141,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -231,11 +250,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -329,6 +351,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="thttp_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 @@ -359,6 +382,7 @@ CONFIG_NAME_MAX=32 # 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 @@ -367,9 +391,10 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGWORK=17 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_HPWORK=y @@ -403,6 +428,7 @@ CONFIG_DEV_NULL=y # 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 @@ -420,8 +446,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y @@ -429,7 +470,11 @@ CONFIG_NETDEVICES=y # # General Ethernet MAC Driver Options # +# CONFIG_NETDEV_LOOPBACK is not set +# CONFIG_NETDEV_TELNET is not set # CONFIG_NETDEV_MULTINIC is not set +CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y +# CONFIG_NETDEV_LATEINIT is not set # # External Ethernet MAC Device Support @@ -439,6 +484,7 @@ CONFIG_NETDEVICES=y # CONFIG_ENCX24J600 is not set # CONFIG_NET_E1000 is not set # CONFIG_NET_SLIP is not set +# CONFIG_NET_FTMAC100 is not set # CONFIG_NET_VNET is not set # @@ -457,6 +503,7 @@ CONFIG_ETH0_PHY_KSZ8041=y # CONFIG_ETH0_PHY_LAN8720 is not set # CONFIG_ETH0_PHY_LAN8740 is not set # CONFIG_ETH0_PHY_LAN8740A is not set +# CONFIG_ETH0_PHY_LAN8742A is not set # CONFIG_ETH0_PHY_DM9161 is not set # CONFIG_PIPES is not set # CONFIG_PM is not set @@ -465,6 +512,8 @@ CONFIG_ETH0_PHY_KSZ8041=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -488,13 +537,10 @@ CONFIG_UART0_SERIALDRIVER=y # 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_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_SERIAL_DMA is not set CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -511,19 +557,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -547,6 +597,7 @@ CONFIG_NET_GUARDSIZE=2 # # CONFIG_NET_MULTILINK is not set CONFIG_NET_ETHERNET=y +# CONFIG_NET_LOOPBACK is not set # CONFIG_NET_TUN is not set # @@ -635,6 +686,7 @@ CONFIG_IOB_THROTTLE=8 # Routing Table Configuration # # CONFIG_NET_ROUTE is not set +CONFIG_NET_HOSTNAME="" # # Crypto API @@ -658,17 +710,12 @@ CONFIG_FS_READABLE=y # CONFIG_FS_FAT 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 is not set CONFIG_FS_UNIONFS=y -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -687,6 +734,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -730,10 +781,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -752,11 +808,14 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -764,11 +823,11 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -777,18 +836,19 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD 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 @@ -797,6 +857,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_THTTPD=y @@ -805,14 +866,24 @@ CONFIG_EXAMPLES_THTTPD_DRIPADDR=0x0a000001 CONFIG_EXAMPLES_THTTPD_NETMASK=0xffffff00 # CONFIG_EXAMPLES_TIFF is not set # 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # CONFIG_EXAMPLES_XMLRPC 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 # @@ -824,20 +895,24 @@ CONFIG_EXAMPLES_THTTPD_NETMASK=0xffffff00 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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_FTPD is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set CONFIG_NETUTILS_THTTPD=y @@ -872,16 +947,10 @@ CONFIG_THTTPD_IDLE_SEND_LIMIT_SEC=300 CONFIG_THTTPD_TILDE_MAP_NONE=y # CONFIG_THTTPD_GENERATE_INDICES is not set # CONFIG_THTTPD_USE_URLPATTERN is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # @@ -899,15 +968,16 @@ CONFIG_NETUTILS_NETLIB=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_POWEROFF is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/lm3s6432-s2e/nsh/defconfig b/configs/lm3s6432-s2e/nsh/defconfig index e2984929334238087d77dd5f406638bf25239bda..36f502dc4d26bbe4c45c04c8b5e1ab164660a7f7 100644 --- a/configs/lm3s6432-s2e/nsh/defconfig +++ b/configs/lm3s6432-s2e/nsh/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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=y @@ -93,7 +96,9 @@ CONFIG_ARCH_CHIP_LM=y # 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 @@ -104,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="tiva" +# 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 # @@ -121,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -242,6 +259,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set CONFIG_ARCH_HAVE_MPU=y @@ -398,9 +416,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -449,8 +468,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y @@ -484,6 +518,8 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -507,10 +543,6 @@ CONFIG_UART1_SERIALDRIVER=y # 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 @@ -551,15 +583,18 @@ CONFIG_UART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -705,12 +740,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -729,6 +758,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -772,6 +805,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 @@ -784,6 +819,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -804,17 +840,19 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # 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_DISCOVER 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -824,18 +862,19 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y 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_NXTERM 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_PPPD 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 @@ -843,22 +882,28 @@ CONFIG_EXAMPLES_NSH=y # 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_UDP is not set # 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_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # # File System Utilities # +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -870,8 +915,8 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -884,25 +929,27 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -921,6 +968,7 @@ CONFIG_NSH_NESTDEPTH=3 # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_ARP is not set # CONFIG_NSH_DISABLE_BASENAME is not set # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set @@ -962,6 +1010,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 @@ -994,6 +1043,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1020,6 +1070,8 @@ CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048 CONFIG_NSH_TELNETD_CLIENTPRIO=100 CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048 CONFIG_NSH_IOBUFFER_SIZE=512 +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # CONFIG_NSH_TELNET_LOGIN is not set # @@ -1034,13 +1086,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1049,5 +1100,6 @@ 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/lm3s6432-s2e/src/lm_ethernet.c b/configs/lm3s6432-s2e/src/lm_ethernet.c index 2d6bb5a08866699085fd87f26569e01514bdff3b..6aeb02b3fc09590f035737391dba7b0d0efb0765 100644 --- a/configs/lm3s6432-s2e/src/lm_ethernet.c +++ b/configs/lm3s6432-s2e/src/lm_ethernet.c @@ -83,10 +83,10 @@ void tiva_ethernetmac(struct ether_addr *ethaddr) user0 = getreg32(TIVA_FLASH_USERREG0); user1 = getreg32(TIVA_FLASH_USERREG1); - nlldbg("user: %06x:%06x\n", user1 & 0x00ffffff, user0 & 0x00ffffff); + ninfo("user: %06x:%06x\n", user1 & 0x00ffffff, user0 & 0x00ffffff); DEBUGASSERT(user0 != 0xffffffff && user1 != 0xffffffff); - /* Re-format that MAC address the way that uIP expects to see it */ + /* Re-format that MAC address the way that the network expects to see it */ ethaddr->ether_addr_octet[0] = ((user0 >> 0) & 0xff); ethaddr->ether_addr_octet[1] = ((user0 >> 8) & 0xff); diff --git a/configs/lm3s6432-s2e/src/lm_leds.c b/configs/lm3s6432-s2e/src/lm_leds.c index 54bc5c188ff2864f48594d85138068b733374988..047a2e92d85f45ddd558f5a22512bc62b915de79 100644 --- a/configs/lm3s6432-s2e/src/lm_leds.c +++ b/configs/lm3s6432-s2e/src/lm_leds.c @@ -55,21 +55,9 @@ * 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 - /* Dump GPIO registers */ -#ifdef CONFIG_DEBUG_LEDS +#ifdef CONFIG_DEBUG_LEDS_INFO # define led_dumpgpio(m) tiva_dumpgpio(LED_GPIO, m) #else # define led_dumpgpio(m) @@ -96,7 +84,7 @@ static uint8_t g_nest; #ifdef CONFIG_ARCH_LEDS void board_autoled_initialize(void) { - leddbg("Initializing\n"); + ledinfo("Initializing\n"); /* Configure Port F, Bit 2 as an output, initial value=OFF */ diff --git a/configs/lm3s6432-s2e/src/lm_ssi.c b/configs/lm3s6432-s2e/src/lm_ssi.c index 66882e7f10a4552191b40c68c104d8ae0a3ff9db..5c0e771a5450faf9b942e83dc0f9dc2381c05cd8 100644 --- a/configs/lm3s6432-s2e/src/lm_ssi.c +++ b/configs/lm3s6432-s2e/src/lm_ssi.c @@ -57,36 +57,14 @@ * Pre-processor Definitions ************************************************************************************/ -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SSI_DEBUG /* Define to enable debug */ -#undef SSI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SSI_DEBUG -# define ssidbg lldbg -# ifdef SSI_VERBOSE -# define ssivdbg lldbg -# else -# define ssivdbg(x...) -# endif -#else -# undef SSI_VERBOSE -# define ssidbg(x...) -# define ssivdbg(x...) -#endif - -/* Dump GPIO registers */ +/* CONFIG_DEBUG_SPI enables debug output from this file */ -#ifdef SSI_VERBOSE +#ifdef CONFIG_DEBUG_SPI # define ssi_dumpgpio(m) tiva_dumpgpio(SDCCS_GPIO, m) #else # define ssi_dumpgpio(m) #endif -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -129,7 +107,7 @@ void weak_function lm_ssidev_initialize(void) void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - ssidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); ssi_dumpgpio("tiva_ssiselect() Entry"); if (devid == SPIDEV_MMCSD) @@ -144,7 +122,7 @@ void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool select uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - ssidbg("Returning SPI_STATUS_PRESENT\n"); + spiinfo("Returning SPI_STATUS_PRESENT\n"); return SPI_STATUS_PRESENT; } diff --git a/configs/lm3s6965-ek/discover/defconfig b/configs/lm3s6965-ek/discover/defconfig index b43f67b956bc4ab65edb0eee3b9bba7e65548396..a7c640c03d30f5fed4dbd655a4ef5e3aa394516b 100644 --- a/configs/lm3s6965-ek/discover/defconfig +++ b/configs/lm3s6965-ek/discover/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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=y @@ -93,7 +96,9 @@ CONFIG_ARCH_CHIP_LM=y # 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 @@ -104,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="tiva" +# 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 # @@ -121,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -252,6 +269,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set CONFIG_ARCH_HAVE_MPU=y @@ -410,9 +428,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -453,6 +472,10 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_CMDDATA is not set CONFIG_SPI_CALLBACK=y # CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_HWFEATURES is not set +# CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -466,7 +489,21 @@ CONFIG_SPI_CALLBACK=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -478,6 +515,7 @@ CONFIG_MMCSD_SPICLOCK=12500000 CONFIG_MMCSD_SPIMODE=0 # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set # CONFIG_MTD is not set # CONFIG_EEPROM is not set CONFIG_NETDEVICES=y @@ -511,6 +549,8 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -534,10 +574,6 @@ CONFIG_UART0_SERIALDRIVER=y # 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 @@ -564,15 +600,18 @@ CONFIG_UART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -713,7 +752,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_NFS is not set # CONFIG_FS_NXFFS is not set # CONFIG_FS_ROMFS is not set @@ -722,12 +763,6 @@ CONFIG_FS_FAT=y # 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 # @@ -746,6 +781,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -791,6 +830,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 @@ -798,12 +839,14 @@ CONFIG_NETDB_DNSCLIENT_ENTRIES=4 CONFIG_NETDB_DNSCLIENT_NAMESIZE=32 CONFIG_NETDB_DNSCLIENT_LIFESEC=3600 CONFIG_NETDB_DNSCLIENT_MAXRESPONSE=96 +# CONFIG_NETDB_RESOLVCONF is not set CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_NETDB_DNSSERVER_IPv4 is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -824,18 +867,20 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # 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_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -845,18 +890,19 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y 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_NXTERM 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_PPPD 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 @@ -864,22 +910,29 @@ CONFIG_EXAMPLES_NSH=y # 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_UDP is not set # 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_WEBSERVER is not set # CONFIG_EXAMPLES_WGET 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 @@ -892,8 +945,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -906,25 +959,27 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CODECS is not set CONFIG_NETUTILS_DHCPC=y # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -943,6 +998,7 @@ CONFIG_NSH_NESTDEPTH=3 # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_ARP is not set # CONFIG_NSH_DISABLE_BASENAME is not set # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set @@ -985,6 +1041,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 @@ -1017,6 +1074,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1046,6 +1104,8 @@ CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048 CONFIG_NSH_TELNETD_CLIENTPRIO=100 CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048 CONFIG_NSH_IOBUFFER_SIZE=512 +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # CONFIG_NSH_TELNET_LOGIN is not set # @@ -1060,13 +1120,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1075,5 +1134,6 @@ 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/lm3s6965-ek/nsh/defconfig b/configs/lm3s6965-ek/nsh/defconfig index b43f67b956bc4ab65edb0eee3b9bba7e65548396..a7c640c03d30f5fed4dbd655a4ef5e3aa394516b 100644 --- a/configs/lm3s6965-ek/nsh/defconfig +++ b/configs/lm3s6965-ek/nsh/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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=y @@ -93,7 +96,9 @@ CONFIG_ARCH_CHIP_LM=y # 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 @@ -104,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="tiva" +# 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 # @@ -121,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -252,6 +269,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set CONFIG_ARCH_HAVE_MPU=y @@ -410,9 +428,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -453,6 +472,10 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_CMDDATA is not set CONFIG_SPI_CALLBACK=y # CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_HWFEATURES is not set +# CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -466,7 +489,21 @@ CONFIG_SPI_CALLBACK=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -478,6 +515,7 @@ CONFIG_MMCSD_SPICLOCK=12500000 CONFIG_MMCSD_SPIMODE=0 # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set # CONFIG_MTD is not set # CONFIG_EEPROM is not set CONFIG_NETDEVICES=y @@ -511,6 +549,8 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -534,10 +574,6 @@ CONFIG_UART0_SERIALDRIVER=y # 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 @@ -564,15 +600,18 @@ CONFIG_UART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -713,7 +752,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_NFS is not set # CONFIG_FS_NXFFS is not set # CONFIG_FS_ROMFS is not set @@ -722,12 +763,6 @@ CONFIG_FS_FAT=y # 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 # @@ -746,6 +781,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -791,6 +830,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 @@ -798,12 +839,14 @@ CONFIG_NETDB_DNSCLIENT_ENTRIES=4 CONFIG_NETDB_DNSCLIENT_NAMESIZE=32 CONFIG_NETDB_DNSCLIENT_LIFESEC=3600 CONFIG_NETDB_DNSCLIENT_MAXRESPONSE=96 +# CONFIG_NETDB_RESOLVCONF is not set CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_NETDB_DNSSERVER_IPv4 is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -824,18 +867,20 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # 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_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -845,18 +890,19 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y 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_NXTERM 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_PPPD 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 @@ -864,22 +910,29 @@ CONFIG_EXAMPLES_NSH=y # 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_UDP is not set # 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_WEBSERVER is not set # CONFIG_EXAMPLES_WGET 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 @@ -892,8 +945,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -906,25 +959,27 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CODECS is not set CONFIG_NETUTILS_DHCPC=y # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -943,6 +998,7 @@ CONFIG_NSH_NESTDEPTH=3 # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_ARP is not set # CONFIG_NSH_DISABLE_BASENAME is not set # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set @@ -985,6 +1041,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 @@ -1017,6 +1074,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1046,6 +1104,8 @@ CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048 CONFIG_NSH_TELNETD_CLIENTPRIO=100 CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048 CONFIG_NSH_IOBUFFER_SIZE=512 +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # CONFIG_NSH_TELNET_LOGIN is not set # @@ -1060,13 +1120,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1075,5 +1134,6 @@ 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/lm3s6965-ek/nx/defconfig b/configs/lm3s6965-ek/nx/defconfig index 3d779630f9d0f67312d43b7e2cf8f85fb406e77e..25f91bb2a394ba16df7be47bccb927525f84df11 100644 --- a/configs/lm3s6965-ek/nx/defconfig +++ b/configs/lm3s6965-ek/nx/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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=y @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_LM=y # 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 @@ -102,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="tiva" +# 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 # @@ -119,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -236,11 +255,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -297,6 +319,8 @@ CONFIG_ARCH_LEDS=y # 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 @@ -336,6 +360,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="nx_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 @@ -386,9 +411,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -419,14 +445,20 @@ CONFIG_DEV_NULL=y # 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=y +# CONFIG_SPI_SLAVE is not set CONFIG_SPI_EXCHANGE=y CONFIG_SPI_CMDDATA=y # 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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -440,10 +472,15 @@ CONFIG_SPI_CMDDATA=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set # CONFIG_LCD_NOGETRUN is not set @@ -464,6 +501,7 @@ CONFIG_P14201_FRAMEBUFFER=y # CONFIG_LCD_UG9664HSWAG01 is not set # CONFIG_LCD_UG2864HSWEG01 is not set # CONFIG_LCD_UG2832HSWEG04 is not set +# CONFIG_LCD_SSD1351 is not set # CONFIG_LCD_ST7565 is not set # CONFIG_LCD_ST7567 is not set # CONFIG_LCD_UG2864AMBAG01 is not set @@ -475,12 +513,17 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set +# CONFIG_SLCD is not set # -# Alphanumeric/Segment LCD Devices +# LED Support # -# CONFIG_LCD_LCD1602 is not set +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -490,6 +533,8 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -513,14 +558,11 @@ CONFIG_UART0_SERIALDRIVER=y # 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 is not set CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -537,19 +579,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -580,12 +626,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -594,6 +634,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 @@ -692,6 +733,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -732,10 +777,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -750,14 +799,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -765,12 +813,12 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW 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 @@ -791,18 +839,19 @@ CONFIG_EXAMPLES_NX_BPP=4 # CONFIG_EXAMPLES_NX_RAWWINDOWS is not set CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 CONFIG_EXAMPLES_NX_EXTERNINIT=y -# 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_NXTERM 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_PPPD 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 @@ -810,14 +859,25 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=y # 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -829,26 +889,23 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # @@ -866,15 +923,16 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_POWEROFF is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/lm3s6965-ek/src/lm_ethernet.c b/configs/lm3s6965-ek/src/lm_ethernet.c index 6d4d62f5fa037569607321c8282a2ef0bda43912..882c18c8811187a764040df722eb7d416bb2133a 100644 --- a/configs/lm3s6965-ek/src/lm_ethernet.c +++ b/configs/lm3s6965-ek/src/lm_ethernet.c @@ -83,10 +83,10 @@ void tiva_ethernetmac(struct ether_addr *ethaddr) user0 = getreg32(TIVA_FLASH_USERREG0); user1 = getreg32(TIVA_FLASH_USERREG1); - nlldbg("user: %06x:%06x\n", user1 & 0x00ffffff, user0 & 0x00ffffff); + ninfo("user: %06x:%06x\n", user1 & 0x00ffffff, user0 & 0x00ffffff); DEBUGASSERT(user0 != 0xffffffff && user1 != 0xffffffff); - /* Re-format that MAC address the way that uIP expects to see it */ + /* Re-format that MAC address the way that the network expects to see it */ ethaddr->ether_addr_octet[0] = ((user0 >> 0) & 0xff); ethaddr->ether_addr_octet[1] = ((user0 >> 8) & 0xff); diff --git a/configs/lm3s6965-ek/src/lm_leds.c b/configs/lm3s6965-ek/src/lm_leds.c index 764304281769307cd98fc5ff0742037d667a0b03..4d1a92e8a54ef04b282ea6e2963ed57e028ab2f0 100644 --- a/configs/lm3s6965-ek/src/lm_leds.c +++ b/configs/lm3s6965-ek/src/lm_leds.c @@ -55,34 +55,12 @@ * 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 - -/* Dump GPIO registers */ - -#ifdef CONFIG_DEBUG_LEDS +#ifdef CONFIG_DEBUG_LEDS_INFO # define led_dumpgpio(m) tiva_dumpgpio(LED_GPIO, m) #else # define led_dumpgpio(m) #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -96,7 +74,7 @@ static uint8_t g_nest; #ifdef CONFIG_ARCH_LEDS void board_autoled_initialize(void) { - leddbg("Initializing\n"); + ledinfo("Initializing\n"); /* Configure Port E, Bit 1 as an output, initial value=OFF */ diff --git a/configs/lm3s6965-ek/src/lm_oled.c b/configs/lm3s6965-ek/src/lm_oled.c index 6eee4e35ed4e3fb510a486ec3ed328c2360ccec2..2d72db7c1ea8d66238f6cda7fd12c02e23342d47 100644 --- a/configs/lm3s6965-ek/src/lm_oled.c +++ b/configs/lm3s6965-ek/src/lm_oled.c @@ -63,21 +63,21 @@ * Verbose debug must also be enabled */ -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE +#ifndef CONFIG_DEBUG_FEATURES +# undef CONFIG_DEBUG_INFO # undef CONFIG_DEBUG_GRAPHICS #endif -#ifndef CONFIG_DEBUG_VERBOSE +#ifndef CONFIG_DEBUG_INFO # undef CONFIG_LCD_RITDEBUG #endif #ifdef CONFIG_LCD_RITDEBUG -# define ritdbg(format, ...) vdbg(format, ##__VA_ARGS__) +# define riterr(format, ...) _info(format, ##__VA_ARGS__) # define oleddc_dumpgpio(m) tiva_dumpgpio(OLEDDC_GPIO, m) # define oledcs_dumpgpio(m) tiva_dumpgpio(OLEDCS_GPIO, m) #else -# define ritdbg(x...) +# define riterr(x...) # define oleddc_dumpgpio(m) # define oledcs_dumpgpio(m) #endif @@ -114,7 +114,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) spi = tiva_ssibus_initialize(0); if (!spi) { - glldbg("Failed to initialize SSI port 0\n"); + gerr("ERROR: Failed to initialize SSI port 0\n"); } else { @@ -123,11 +123,11 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) dev = rit_initialize(spi, devno); if (!dev) { - glldbg("Failed to bind SSI port 0 to OLED %d: %d\n", devno); + gerr("ERROR: Failed to bind SSI port 0 to OLED %d: %d\n", devno); } else { - gllvdbg("Bound SSI port 0 to OLED %d\n", devno); + ginfo("Bound SSI port 0 to OLED %d\n", devno); /* And turn the OLED on (CONFIG_LCD_MAXPOWER should be 1) */ diff --git a/configs/lm3s6965-ek/src/lm_ssi.c b/configs/lm3s6965-ek/src/lm_ssi.c index 5b105fed348594d2418e0b34356e83a6d73ab4e5..8cdf0b0122394c35a2244493438ee6711412c5a0 100644 --- a/configs/lm3s6965-ek/src/lm_ssi.c +++ b/configs/lm3s6965-ek/src/lm_ssi.c @@ -59,36 +59,14 @@ * Pre-processor Definitions ************************************************************************************/ -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SSI_DEBUG /* Define to enable debug */ -#undef SSI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SSI_DEBUG -# define ssidbg lldbg -# ifdef SSI_VERBOSE -# define ssivdbg lldbg -# else -# define ssivdbg(x...) -# endif -#else -# undef SSI_VERBOSE -# define ssidbg(x...) -# define ssivdbg(x...) -#endif - -/* Dump GPIO registers */ +/* CONFIG_DEBUG_SPI enables debug output from this file */ -#ifdef SSI_VERBOSE +#ifdef CONFIG_DEBUG_SPI # define ssi_dumpgpio(m) tiva_dumpgpio(SDCCS_GPIO, m) #else # define ssi_dumpgpio(m) #endif -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -134,7 +112,7 @@ void weak_function lm_ssidev_initialize(void) void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - ssidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); ssi_dumpgpio("tiva_ssiselect() Entry"); if (devid == SPIDEV_MMCSD) @@ -156,7 +134,7 @@ void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool select uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - ssidbg("Returning SPI_STATUS_PRESENT\n"); + spiinfo("Returning SPI_STATUS_PRESENT\n"); return SPI_STATUS_PRESENT; } diff --git a/configs/lm3s6965-ek/tcpecho/defconfig b/configs/lm3s6965-ek/tcpecho/defconfig index e655d4d6c13b99856a39718b4fdfcec70cbc66d1..a0b8bd8847f2379ce39ee50142b85c69c6a4f6d9 100644 --- a/configs/lm3s6965-ek/tcpecho/defconfig +++ b/configs/lm3s6965-ek/tcpecho/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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=y @@ -93,7 +96,9 @@ CONFIG_ARCH_CHIP_LM=y # 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 @@ -104,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="tiva" +# 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 # @@ -121,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -251,6 +268,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set CONFIG_ARCH_HAVE_MPU=y @@ -394,9 +412,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -445,8 +464,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y @@ -480,6 +514,8 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -503,10 +539,6 @@ CONFIG_UART0_SERIALDRIVER=y # 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 @@ -534,15 +566,18 @@ CONFIG_UART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -683,7 +718,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_NFS is not set # CONFIG_FS_NXFFS is not set # CONFIG_FS_ROMFS is not set @@ -692,12 +729,6 @@ CONFIG_FS_FAT=y # 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 # @@ -716,6 +747,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -761,6 +796,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 @@ -768,12 +805,14 @@ CONFIG_NETDB_DNSCLIENT_ENTRIES=4 CONFIG_NETDB_DNSCLIENT_NAMESIZE=32 CONFIG_NETDB_DNSCLIENT_LIFESEC=3600 CONFIG_NETDB_DNSCLIENT_MAXRESPONSE=96 +# CONFIG_NETDB_RESOLVCONF is not set CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_NETDB_DNSSERVER_IPv4 is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -794,18 +833,20 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # 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_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -815,18 +856,19 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD 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 @@ -834,6 +876,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # 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=y CONFIG_EXAMPLES_TCPECHO_PORT=80 CONFIG_EXAMPLES_TCPECHO_BACKLOG=8 @@ -848,17 +891,22 @@ CONFIG_EXAMPLES_TCPECHO_NETMASK=0xffffff00 # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # 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_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # CONFIG_EXAMPLES_XMLRPC 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 @@ -871,8 +919,8 @@ CONFIG_EXAMPLES_TCPECHO_NETMASK=0xffffff00 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -882,24 +930,26 @@ CONFIG_EXAMPLES_TCPECHO_NETMASK=0xffffff00 # # Network Utilities # +# CONFIG_NETUTILS_CHAT is not set # CONFIG_NETUTILS_CODECS is not set CONFIG_NETUTILS_DHCPC=y # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER 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 +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -918,13 +968,12 @@ CONFIG_WEBCLIENT_TIMEOUT=10 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set # CONFIG_READLINE_HAVE_EXTMATCH is not set @@ -932,5 +981,6 @@ CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y # CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/lm3s8962-ek/nsh/defconfig b/configs/lm3s8962-ek/nsh/defconfig index 48aac15aa0226343a6c647e82d3e85a366d630de..6cf80ae026e7071f4332b0c312d34119f07d8b6f 100644 --- a/configs/lm3s8962-ek/nsh/defconfig +++ b/configs/lm3s8962-ek/nsh/defconfig @@ -41,14 +41,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -79,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=y @@ -97,7 +100,9 @@ CONFIG_ARCH_CHIP_LM=y # 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 @@ -108,14 +113,25 @@ CONFIG_ARCH_CORTEXM3=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="tiva" +# 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 # @@ -125,6 +141,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -262,6 +279,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set CONFIG_ARCH_HAVE_MPU=y @@ -420,9 +438,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -463,6 +482,10 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_CMDDATA is not set CONFIG_SPI_CALLBACK=y # CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_HWFEATURES is not set +# CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -476,7 +499,21 @@ CONFIG_SPI_CALLBACK=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -488,6 +525,7 @@ CONFIG_MMCSD_SPICLOCK=12500000 CONFIG_MMCSD_SPIMODE=0 # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set # CONFIG_MTD is not set # CONFIG_EEPROM is not set CONFIG_NETDEVICES=y @@ -521,6 +559,8 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -544,10 +584,6 @@ CONFIG_UART0_SERIALDRIVER=y # 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 @@ -574,15 +610,18 @@ CONFIG_UART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -723,7 +762,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_NFS is not set # CONFIG_FS_NXFFS is not set # CONFIG_FS_ROMFS is not set @@ -732,12 +773,6 @@ CONFIG_FS_FAT=y # 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 # @@ -756,6 +791,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -801,6 +840,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 @@ -808,12 +849,14 @@ CONFIG_NETDB_DNSCLIENT_ENTRIES=4 CONFIG_NETDB_DNSCLIENT_NAMESIZE=32 CONFIG_NETDB_DNSCLIENT_LIFESEC=3600 CONFIG_NETDB_DNSCLIENT_MAXRESPONSE=96 +# CONFIG_NETDB_RESOLVCONF is not set CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_NETDB_DNSSERVER_IPv4 is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -834,18 +877,20 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # 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_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -855,18 +900,19 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y 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_NXTERM 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_PPPD 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 @@ -874,22 +920,29 @@ CONFIG_EXAMPLES_NSH=y # 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_UDP is not set # 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_WEBSERVER is not set # CONFIG_EXAMPLES_WGET 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 @@ -902,8 +955,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -916,25 +969,27 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -953,6 +1008,7 @@ CONFIG_NSH_NESTDEPTH=3 # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_ARP is not set # CONFIG_NSH_DISABLE_BASENAME is not set # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set @@ -995,6 +1051,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 @@ -1027,6 +1084,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1055,6 +1113,8 @@ CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048 CONFIG_NSH_TELNETD_CLIENTPRIO=100 CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048 CONFIG_NSH_IOBUFFER_SIZE=512 +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # CONFIG_NSH_TELNET_LOGIN is not set # @@ -1069,13 +1129,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1084,5 +1143,6 @@ 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/lm3s8962-ek/nx/defconfig b/configs/lm3s8962-ek/nx/defconfig index c72dc447b56e7f069b33f0c16347953359a2494f..30bf76afc80ce85302b71ab7e293316c045c4e59 100644 --- a/configs/lm3s8962-ek/nx/defconfig +++ b/configs/lm3s8962-ek/nx/defconfig @@ -41,14 +41,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -79,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=y @@ -96,7 +99,11 @@ CONFIG_ARCH_CHIP_LM=y # 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 @@ -106,14 +113,25 @@ CONFIG_ARCH_CORTEXM3=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="tiva" +# 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 # @@ -123,6 +141,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -246,11 +265,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -307,6 +329,8 @@ CONFIG_ARCH_LEDS=y # 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 @@ -346,6 +370,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="nx_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 @@ -396,9 +421,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -429,14 +455,20 @@ CONFIG_DEV_NULL=y # 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=y +# CONFIG_SPI_SLAVE is not set CONFIG_SPI_EXCHANGE=y CONFIG_SPI_CMDDATA=y # 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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -450,10 +482,15 @@ CONFIG_SPI_CMDDATA=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set # CONFIG_LCD_NOGETRUN is not set @@ -474,6 +511,7 @@ CONFIG_P14201_FRAMEBUFFER=y # CONFIG_LCD_UG9664HSWAG01 is not set # CONFIG_LCD_UG2864HSWEG01 is not set # CONFIG_LCD_UG2832HSWEG04 is not set +# CONFIG_LCD_SSD1351 is not set # CONFIG_LCD_ST7565 is not set # CONFIG_LCD_ST7567 is not set # CONFIG_LCD_UG2864AMBAG01 is not set @@ -485,12 +523,17 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set +# CONFIG_SLCD is not set # -# Alphanumeric/Segment LCD Devices +# LED Support # -# CONFIG_LCD_LCD1602 is not set +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -500,6 +543,8 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -523,14 +568,11 @@ CONFIG_UART0_SERIALDRIVER=y # 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 is not set CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -547,19 +589,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -590,12 +636,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -604,6 +644,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 @@ -702,6 +743,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -742,10 +787,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -760,14 +809,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -775,12 +823,12 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW 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 @@ -801,18 +849,19 @@ CONFIG_EXAMPLES_NX_BPP=4 # CONFIG_EXAMPLES_NX_RAWWINDOWS is not set CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 CONFIG_EXAMPLES_NX_EXTERNINIT=y -# 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_NXTERM 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_PPPD 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 @@ -820,14 +869,25 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=y # 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -839,26 +899,23 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # @@ -876,15 +933,16 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_POWEROFF is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/lm3s8962-ek/src/lm_ethernet.c b/configs/lm3s8962-ek/src/lm_ethernet.c index fb5db9e152504d318a5291e7ff1c7321c3a24aea..1c337358899dddc4980e8617699e251ac9126aa4 100644 --- a/configs/lm3s8962-ek/src/lm_ethernet.c +++ b/configs/lm3s8962-ek/src/lm_ethernet.c @@ -83,10 +83,10 @@ void tiva_ethernetmac(struct ether_addr *ethaddr) user0 = getreg32(TIVA_FLASH_USERREG0); user1 = getreg32(TIVA_FLASH_USERREG1); - nlldbg("user: %06x:%06x\n", user1 & 0x00ffffff, user0 & 0x00ffffff); + ninfo("user: %06x:%06x\n", user1 & 0x00ffffff, user0 & 0x00ffffff); DEBUGASSERT(user0 != 0xffffffff && user1 != 0xffffffff); - /* Re-format that MAC address the way that uIP expects to see it */ + /* Re-format that MAC address the way that the network expects to see it */ ethaddr->ether_addr_octet[0] = ((user0 >> 0) & 0xff); ethaddr->ether_addr_octet[1] = ((user0 >> 8) & 0xff); diff --git a/configs/lm3s8962-ek/src/lm_leds.c b/configs/lm3s8962-ek/src/lm_leds.c index 28f925d26e021514d2fdbf7bbb0bff5001e6e83a..3309dfc993b544848f978cfb7f7330dca4f56e90 100644 --- a/configs/lm3s8962-ek/src/lm_leds.c +++ b/configs/lm3s8962-ek/src/lm_leds.c @@ -55,21 +55,7 @@ * 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 - -/* Dump GPIO registers */ - -#ifdef CONFIG_DEBUG_LEDS +#ifdef CONFIG_DEBUG_LEDS_INFO # define led_dumpgpio(m) tiva_dumpgpio(LED_GPIO, m) #else # define led_dumpgpio(m) @@ -79,16 +65,12 @@ * Private Data ****************************************************************************/ -/**************************************************************************** - * Private Functions - ****************************************************************************/ +static uint8_t g_nest; /**************************************************************************** * Public Functions ****************************************************************************/ -static uint8_t g_nest; - /**************************************************************************** * Name: board_autoled_initialize ****************************************************************************/ @@ -96,7 +78,7 @@ static uint8_t g_nest; #ifdef CONFIG_ARCH_LEDS void board_autoled_initialize(void) { - leddbg("Initializing\n"); + ledinfo("Initializing\n"); /* Configure Port E, Bit 1 as an output, initial value=OFF */ diff --git a/configs/lm3s8962-ek/src/lm_oled.c b/configs/lm3s8962-ek/src/lm_oled.c index 197a614e790a2bc7b3313b0538fb5742818c7be3..6e557a1220821d1d63ed92f29b5d2f2e36526cc3 100644 --- a/configs/lm3s8962-ek/src/lm_oled.c +++ b/configs/lm3s8962-ek/src/lm_oled.c @@ -62,21 +62,21 @@ * Verbose debug must also be enabled */ -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE +#ifndef CONFIG_DEBUG_FEATURES +# undef CONFIG_DEBUG_INFO # undef CONFIG_DEBUG_GRAPHICS #endif -#ifndef CONFIG_DEBUG_VERBOSE +#ifndef CONFIG_DEBUG_INFO # undef CONFIG_LCD_RITDEBUG #endif #ifdef CONFIG_LCD_RITDEBUG -# define ritdbg(format, ...) vdbg(format, ##__VA_ARGS__) +# define riterr(format, ...) _info(format, ##__VA_ARGS__) # define oleddc_dumpgpio(m) tiva_dumpgpio(OLEDDC_GPIO, m) # define oledcs_dumpgpio(m) tiva_dumpgpio(OLEDCS_GPIO, m) #else -# define ritdbg(x...) +# define riterr(x...) # define oleddc_dumpgpio(m) # define oledcs_dumpgpio(m) #endif @@ -113,7 +113,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) spi = tiva_ssibus_initialize(0); if (!spi) { - glldbg("Failed to initialize SSI port 0\n"); + gerr("ERROR: Failed to initialize SSI port 0\n"); } else { @@ -122,11 +122,11 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) dev = rit_initialize(spi, devno); if (!dev) { - glldbg("Failed to bind SSI port 0 to OLED %d: %d\n", devno); + gerr("ERROR: Failed to bind SSI port 0 to OLED %d: %d\n", devno); } else { - gllvdbg("Bound SSI port 0 to OLED %d\n", devno); + ginfo("Bound SSI port 0 to OLED %d\n", devno); /* And turn the OLED on (CONFIG_LCD_MAXPOWER should be 1) */ diff --git a/configs/lm3s8962-ek/src/lm_ssi.c b/configs/lm3s8962-ek/src/lm_ssi.c index fc9a1efb24e171f4ad17a41105615f43531ab6bb..234789550361c04ad98bf94f290a2e968cfe177b 100644 --- a/configs/lm3s8962-ek/src/lm_ssi.c +++ b/configs/lm3s8962-ek/src/lm_ssi.c @@ -59,36 +59,14 @@ * Pre-processor Definitions ************************************************************************************/ -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SSI_DEBUG /* Define to enable debug */ -#undef SSI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SSI_DEBUG -# define ssidbg lldbg -# ifdef SSI_VERBOSE -# define ssivdbg lldbg -# else -# define ssivdbg(x...) -# endif -#else -# undef SSI_VERBOSE -# define ssidbg(x...) -# define ssivdbg(x...) -#endif - -/* Dump GPIO registers */ +/* CONFIG_DEBUG_SPI enables debug output from this file */ -#ifdef SSI_VERBOSE +#ifdef CONFIG_DEBUG_SPI # define ssi_dumpgpio(m) tiva_dumpgpio(SDCCS_GPIO, m) #else # define ssi_dumpgpio(m) #endif -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -134,7 +112,7 @@ void weak_function lm_ssidev_initialize(void) void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - ssidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); ssi_dumpgpio("tiva_ssiselect() Entry"); if (devid == SPIDEV_MMCSD) @@ -156,7 +134,7 @@ void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool select uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - ssidbg("Returning SPI_STATUS_PRESENT\n"); + spiinfo("Returning SPI_STATUS_PRESENT\n"); return SPI_STATUS_PRESENT; } diff --git a/configs/lm4f120-launchpad/nsh/defconfig b/configs/lm4f120-launchpad/nsh/defconfig index 61ff3481e35cb4fe995c98319c3b6b499f5e1627..6d41ced7f3e9216717a74a914628a369ae33569b 100644 --- a/configs/lm4f120-launchpad/nsh/defconfig +++ b/configs/lm4f120-launchpad/nsh/defconfig @@ -17,6 +17,7 @@ CONFIG_HOST_LINUX=y # Build Configuration # # CONFIG_APPS_DIR="../apps" +CONFIG_BUILD_FLAT=y # CONFIG_BUILD_2PASS is not set # @@ -26,6 +27,7 @@ CONFIG_HOST_LINUX=y # 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 @@ -35,12 +37,15 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y @@ -70,11 +75,14 @@ CONFIG_ARCH="arm" # 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=y # 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 @@ -83,35 +91,61 @@ CONFIG_ARCH_CHIP_LM=y # 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=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="tiva" +# 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_MPU=y +# 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=y # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set # CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL is not set CONFIG_ARMV7M_OABI_TOOLCHAIN=y +# CONFIG_ARMV7M_HAVE_STACKCHECK is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set # # Tiva/Stellaris Configuration Options @@ -124,10 +158,49 @@ CONFIG_ARMV7M_OABI_TOOLCHAIN=y CONFIG_ARCH_CHIP_LM4F120=y CONFIG_ARCH_CHIP_LM4F=y # CONFIG_LM_REVA2 is not set +# CONFIG_TIVA_BOARD_EARLYINIT is not set # # Tiva/Stellaris Peripheral Support # +# CONFIG_TIVA_ADC is not set +# CONFIG_TIVA_HAVE_ADC0 is not set +# CONFIG_TIVA_HAVE_ADC1 is not set +# CONFIG_TIVA_I2C is not set +CONFIG_TIVA_HAVE_I2C1=y +CONFIG_TIVA_HAVE_I2C2=y +CONFIG_TIVA_HAVE_I2C3=y +# CONFIG_TIVA_HAVE_I2C4 is not set +# CONFIG_TIVA_HAVE_I2C5 is not set +# CONFIG_TIVA_HAVE_I2C6 is not set +# CONFIG_TIVA_HAVE_I2C7 is not set +# CONFIG_TIVA_HAVE_I2C8 is not set +# CONFIG_TIVA_HAVE_I2C9 is not set +CONFIG_TIVA_HAVE_UART3=y +CONFIG_TIVA_HAVE_UART4=y +CONFIG_TIVA_HAVE_UART5=y +CONFIG_TIVA_HAVE_UART6=y +CONFIG_TIVA_HAVE_UART7=y +CONFIG_TIVA_HAVE_SSI0=y +CONFIG_TIVA_HAVE_SSI1=y +CONFIG_TIVA_HAVE_SSI2=y +CONFIG_TIVA_HAVE_SSI3=y +# CONFIG_TIVA_HAVE_ETHERNET is not set +CONFIG_TIVA_SSI=y +# CONFIG_TIVA_TIMER is not set +# CONFIG_TIVA_HAVE_TIMER0 is not set +# CONFIG_TIVA_HAVE_TIMER1 is not set +# CONFIG_TIVA_HAVE_TIMER2 is not set +CONFIG_TIVA_HAVE_TIMER3=y +CONFIG_TIVA_HAVE_TIMER4=y +CONFIG_TIVA_HAVE_TIMER5=y +# CONFIG_TIVA_HAVE_TIMER6 is not set +# CONFIG_TIVA_HAVE_TIMER7 is not set +# CONFIG_TIVA_ADC0 is not set +# CONFIG_TIVA_I2C0 is not set +# CONFIG_TIVA_I2C1 is not set +# CONFIG_TIVA_I2C2 is not set +# CONFIG_TIVA_I2C3 is not set CONFIG_TIVA_UART0=y # CONFIG_TIVA_UART1 is not set # CONFIG_TIVA_UART2 is not set @@ -138,12 +211,35 @@ CONFIG_TIVA_UART0=y # CONFIG_TIVA_UART7 is not set CONFIG_TIVA_SSI0=y # CONFIG_TIVA_SSI1 is not set -# CONFIG_TIVA_ETHERNET is not set +# CONFIG_TIVA_SSI2 is not set +# CONFIG_TIVA_SSI3 is not set +# CONFIG_TIVA_TIMER3 is not set +# CONFIG_TIVA_TIMER4 is not set +# CONFIG_TIVA_TIMER5 is not set # CONFIG_TIVA_FLASH is not set # -# Disable GPIO Interrupts -# +# Enable GPIO Interrupts +# +CONFIG_TIVA_GPIO_IRQS=y +CONFIG_TIVA_HAVE_GPIOA_IRQS=y +CONFIG_TIVA_HAVE_GPIOB_IRQS=y +CONFIG_TIVA_HAVE_GPIOC_IRQS=y +CONFIG_TIVA_HAVE_GPIOD_IRQS=y +CONFIG_TIVA_HAVE_GPIOE_IRQS=y +CONFIG_TIVA_HAVE_GPIOF_IRQS=y +CONFIG_TIVA_HAVE_GPIOG_IRQS=y +CONFIG_TIVA_HAVE_GPIOH_IRQS=y +# CONFIG_TIVA_HAVE_GPIOJ_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOK_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOL_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOM_IRQS is not set +# CONFIG_TIVA_HAVE_GPION_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOP_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOQ_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOR_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOS_IRQS is not set +# CONFIG_TIVA_HAVE_GPIOT_IRQS is not set CONFIG_TIVA_GPIOA_IRQS=y CONFIG_TIVA_GPIOB_IRQS=y CONFIG_TIVA_GPIOC_IRQS=y @@ -152,7 +248,6 @@ CONFIG_TIVA_GPIOE_IRQS=y CONFIG_TIVA_GPIOF_IRQS=y CONFIG_TIVA_GPIOG_IRQS=y # CONFIG_TIVA_GPIOH_IRQS is not set -# CONFIG_TIVA_GPIOJ_IRQS is not set # # Tiva/Stellaris SSI Configuration @@ -167,10 +262,19 @@ CONFIG_SSI_TXLIMIT=4 # CONFIG_ARCH_VECNOTIRQ is not set # CONFIG_ARCH_DMA is not set CONFIG_ARCH_HAVE_IRQPRIO=y -# CONFIG_ARCH_ADDRENV is not set +# 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 @@ -229,39 +333,78 @@ CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_LIB_BOARDCTL is not set # # RTOS Features # -# CONFIG_BOARD_INITIALIZE is not set +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_RR_INTERVAL=200 -# CONFIG_SCHED_CPULOAD is not set -# CONFIG_SCHED_INSTRUMENTATION is not set -CONFIG_TASK_NAME_SIZE=0 -# CONFIG_SCHED_HAVE_PARENT is not set +# CONFIG_CLOCK_MONOTONIC is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=3 CONFIG_START_DAY=24 -CONFIG_DEV_CONSOLE=y +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_PRIORITY_INHERITANCE 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_SCHED_WAITPID=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_USER_ENTRYPOINT="nsh_main" -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 # # Signal Numbers @@ -272,19 +415,18 @@ CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGCONDTIMEDOUT=16 # -# Sizes of configurable things (0 disables) +# POSIX Message Queue Options # -CONFIG_MAX_TASKS=16 -CONFIG_NPTHREAD_KEYS=4 -CONFIG_NFILE_DESCRIPTORS=8 -CONFIG_NFILE_STREAMS=8 -CONFIG_NAME_MAX=32 CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 -CONFIG_MAX_WDOGPARMS=2 -CONFIG_PREALLOC_WDOGS=4 -CONFIG_WDOG_INTRESERVE=0 -CONFIG_PREALLOC_TIMERS=4 +# 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 @@ -293,6 +435,7 @@ 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 @@ -301,14 +444,26 @@ 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 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 @@ -316,9 +471,25 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -326,6 +497,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -348,13 +521,15 @@ CONFIG_UART0_SERIALDRIVER=y # CONFIG_USART6_SERIALDRIVER is not set # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set - -# -# USART Configuration -# +# 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 is not set CONFIG_UART0_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set # CONFIG_NO_SERIAL_CONSOLE is not set # @@ -368,20 +543,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -390,6 +568,11 @@ CONFIG_UART0_2STOP=0 # CONFIG_ARCH_HAVE_PHY is not set # CONFIG_NET is not set +# +# Crypto API +# +# CONFIG_CRYPTO is not set + # # File Systems # @@ -398,22 +581,21 @@ CONFIG_UART0_2STOP=0 # 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 - -# -# System Logging -# - -# CONFIG_SYSLOG is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -434,7 +616,11 @@ CONFIG_MM_REGIONS=1 # CONFIG_AUDIO is not set # -# Binary Formats +# Wireless Support +# + +# +# Binary Loader # # CONFIG_BINFMT_DISABLE is not set # CONFIG_BINFMT_EXEPATH is not set @@ -459,6 +645,7 @@ CONFIG_LIB_HOMEDIR="/" # 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 @@ -470,14 +657,19 @@ 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_SCHED_WORKQUEUE is not set +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -496,23 +688,26 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # 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 # 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_LCDRW is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -520,89 +715,106 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM is not set # CONFIG_EXAMPLES_NXTEXT is not set # CONFIG_EXAMPLES_OSTEST is not set -# CONFIG_EXAMPLES_PASHELLO is not set +# CONFIG_EXAMPLES_PCA9635 is not set # CONFIG_EXAMPLES_PIPE is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 +# 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_SMART_TEST 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_UDP 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_WEBSERVER 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_MICROPYTHON is not set # CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # # 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 # CONFIG_NETUTILS_SMTP is not set -# CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_NETLIB is not set -# CONFIG_NETUTILS_WEBCLIENT is not set # -# FreeModBus +# NSH Library # -# CONFIG_MODBUS is not set +CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # -# NSH Library +# Command Line Configuration # -CONFIG_NSH_LIBRARY=y 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=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 @@ -611,8 +823,10 @@ CONFIG_NSH_BUILTIN_APPS=y # 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 @@ -620,6 +834,7 @@ CONFIG_NSH_BUILTIN_APPS=y # 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 @@ -629,8 +844,10 @@ CONFIG_NSH_BUILTIN_APPS=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 # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set @@ -643,24 +860,22 @@ CONFIG_NSH_CMDOPT_DF_H=y CONFIG_NSH_CODECS_BUFSIZE=128 CONFIG_NSH_CMDOPT_HEXDUMP=y CONFIG_NSH_FILEIOSIZE=512 -CONFIG_NSH_LINELEN=64 -# CONFIG_NSH_DISABLE_SEMICOLON is not set -CONFIG_NSH_CMDPARMS=y -CONFIG_NSH_TMPDIR="/tmp" -CONFIG_NSH_MAXARGUMENTS=6 -CONFIG_NSH_ARGCAT=y -CONFIG_NSH_NESTDEPTH=3 + +# +# Scripting Support +# # CONFIG_NSH_DISABLESCRIPT is not set # CONFIG_NSH_DISABLE_ITEF is not set # CONFIG_NSH_DISABLE_LOOPS is not set -# CONFIG_NSH_DISABLEBG is not set -CONFIG_NSH_CONSOLE=y # -# USB Trace Support +# 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 @@ -674,94 +889,19 @@ CONFIG_NSH_CONSOLE=y # # System Libraries and NSH Add-Ons # - -# -# USB CDC/ACM Device Commands -# - -# -# USB Composite Device Commands -# - -# -# Custom Free Memory Command -# +# CONFIG_SYSTEM_CLE is not set +# CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set - -# -# I2C tool -# - -# -# INI File Parser -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# FLASH Program Installation -# +# CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set # CONFIG_SYSTEM_INSTALL is not set - -# -# FLASH Erase-all Command -# - -# -# NxPlayer media player library / command Line -# -# CONFIG_SYSTEM_NXPLAYER is not set - -# -# RAM test -# # CONFIG_SYSTEM_RAMTEST is not set - -# -# readline() -# +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sysinfo -# - -# -# USB Monitor -# - -# -# EMACS-like Command Line Editor -# -# CONFIG_SYSTEM_CLE is not set - -# -# VI Work-Alike Editor -# +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set +# CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set - -# -# Stack Monitor -# - -# -# USB Mass Storage Device Commands -# - -# -# Zmodem Commands -# # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/lm4f120-launchpad/src/lm4f_autoleds.c b/configs/lm4f120-launchpad/src/lm4f_autoleds.c index 9ffcd0fa314909137bcf4b096a9d94939c0d03a2..a01f8fc970d81f36ada6d682ace5bf72532e43d9 100644 --- a/configs/lm4f120-launchpad/src/lm4f_autoleds.c +++ b/configs/lm4f120-launchpad/src/lm4f_autoleds.c @@ -97,34 +97,14 @@ * LED_PANIC 4 ON OFF OFF (flashing 2Hz) */ -/* 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 - /* Dump GPIO registers */ -#ifdef CONFIG_DEBUG_LEDS +#ifdef CONFIG_DEBUG_LEDS_INFO # define led_dumpgpio(m) tiva_dumpgpio(LED_GPIO, m) #else # define led_dumpgpio(m) #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -140,7 +120,7 @@ #ifdef CONFIG_ARCH_LEDS void lm4f_led_initialize(void) { - leddbg("Initializing\n"); + ledinfo("Initializing\n"); /* Configure Port E, Bit 1 as an output, initial value=OFF */ diff --git a/configs/lm4f120-launchpad/src/lm4f_ssi.c b/configs/lm4f120-launchpad/src/lm4f_ssi.c index 683b29249ccbd81677072bd0ba776f2834d2633d..2e8d3e49b5b413a1ba7f27196b0259ee115eabfa 100644 --- a/configs/lm4f120-launchpad/src/lm4f_ssi.c +++ b/configs/lm4f120-launchpad/src/lm4f_ssi.c @@ -60,28 +60,14 @@ * Pre-processor Definitions ************************************************************************************/ -/* CONFIG_DEBUG_SPI enables debug output from this file (needs CONFIG_DEBUG too) */ +/* CONFIG_DEBUG_SPI enables debug output from this file */ #ifdef CONFIG_DEBUG_SPI -# define ssidbg lldbg -#else -# define ssidbg(x...) -#endif - -/* Dump GPIO registers */ - -#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_VERBOSE) -# define ssivdbg lldbg # define ssi_dumpgpio(m) tiva_dumpgpio(SDCCS_GPIO, m) #else -# define ssivdbg(x...) # define ssi_dumpgpio(m) #endif -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -119,14 +105,14 @@ void weak_function lm4f_spidev_initialize(void) void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - ssidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); ssi_dumpgpio("tiva_ssiselect() Entry"); ssi_dumpgpio("tiva_ssiselect() Exit"); } uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - ssidbg("Returning SPI_STATUS_PRESENT\n"); + spiinfo("Returning SPI_STATUS_PRESENT\n"); return SPI_STATUS_PRESENT; } diff --git a/configs/lpc4330-xplorer/README.txt b/configs/lpc4330-xplorer/README.txt index 2a95f43456de34ed3c917aea7ebc7ed3e4d82009..3afbe967ff052c3a4969a440e9ba073170812e03 100644 --- a/configs/lpc4330-xplorer/README.txt +++ b/configs/lpc4330-xplorer/README.txt @@ -362,14 +362,14 @@ Code Red IDE/Tools in debugging symbols. NOTE 3: There are few things that NuttX has to do differently if you - are using a debugger. Make sure that you also set CONFIG_DEBUG=y. Nothing + are using a debugger. Make sure that you also set CONFIG_DEBUG_FEATURES=y. Nothing also is needed and no debug output will be generated; but NuttX will - use CONFIG_DEBUG=y to mean that a debugger is attached and will deal + use CONFIG_DEBUG_FEATURES=y to mean that a debugger is attached and will deal with certain resets and debug controls appropriately. So you should have: - CONFIG_DEBUG=y + CONFIG_DEBUG_FEATURES=y CONFIG_DEBUG_SYMBOLS=y NOTE 4: Every time that you control-C out of the command line GDB, you @@ -817,9 +817,9 @@ LPC4330-Xplorer Configuration Options CONFIG_NET_NRXDESC - Configured number of Rx descriptors. Default: 18 CONFIG_NET_WOL - Enable Wake-up on Lan (not fully implemented). CONFIG_NET_REGDEBUG - Enabled low level register debug. Also needs - CONFIG_DEBUG. + CONFIG_DEBUG_FEATURES. CONFIG_NET_DUMPPACKET - Dump all received and transmitted packets. - Also needs CONFIG_DEBUG. + Also needs CONFIG_DEBUG_FEATURES. CONFIG_NET_HASH - Enable receipt of near-perfect match frames. LPC43xx USB Device Configuration @@ -928,7 +928,7 @@ Where is one of the following: from the SPI address space after each write. CONFIG_DEBUG_SPIFI_DUMP - Debug option to dump read/write buffers. You probably do not want to enable this unless you want to dig through a - *lot* of debug output! Also required CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, + *lot* of debug output! Also required CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_FS, 5. In my experience, there were some missing function pointers in the LPC43xx diff --git a/configs/lpc4330-xplorer/nsh/defconfig b/configs/lpc4330-xplorer/nsh/defconfig index a6a461ba6c9bdbc554c40cee20e382c59d9de86d..045cd709d0b8b4fa7f8c0cf841b879c214a411bd 100644 --- a/configs/lpc4330-xplorer/nsh/defconfig +++ b/configs/lpc4330-xplorer/nsh/defconfig @@ -46,10 +46,11 @@ CONFIG_ARCH_STDARG_H=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH_CHIP_LPC43XX=y # 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 @@ -110,6 +113,7 @@ 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 @@ -118,6 +122,8 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="lpc43xx" +# 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 @@ -125,6 +131,7 @@ CONFIG_ARMV7M_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 @@ -135,6 +142,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=y @@ -159,6 +167,7 @@ CONFIG_ARCH_CHIP_LPC4330FET100=y # CONFIG_ARCH_CHIP_LPC4330FET180 is not set # CONFIG_ARCH_CHIP_LPC4330FET256 is not set # CONFIG_ARCH_CHIP_LPC4337JBD144 is not set +# CONFIG_ARCH_CHIP_LPC4337JET100 is not set # CONFIG_ARCH_CHIP_LPC4350FBD208 is not set # CONFIG_ARCH_CHIP_LPC4350FET180 is not set # CONFIG_ARCH_CHIP_LPC4350FET256 is not set @@ -219,6 +228,7 @@ CONFIG_LPC43_USART0=y # CONFIG_LPC43_USB0 is not set # CONFIG_LPC43_USB1 is not set # CONFIG_LPC43_WWDT is not set +# CONFIG_LPC43_GPIO_IRQ is not set # # RS-485 Configuration @@ -452,13 +462,20 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support # # CONFIG_USERLED is not set +# CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -470,6 +487,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -493,10 +512,6 @@ CONFIG_USART0_SERIALDRIVER=y # 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 @@ -524,15 +539,18 @@ CONFIG_USART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -566,7 +584,9 @@ 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 is not set # CONFIG_FS_TMPFS is not set @@ -574,12 +594,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -598,6 +612,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -643,12 +661,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -678,10 +699,10 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -690,18 +711,19 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 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_NXTERM 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_PPPD 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 @@ -709,14 +731,15 @@ CONFIG_EXAMPLES_NSH=y # 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_WEBSERVER is not set # # File System Utilities @@ -724,6 +747,11 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + # # Graphics Support # @@ -735,8 +763,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -748,6 +776,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 @@ -860,12 +889,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -873,6 +902,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/lpc4330-xplorer/src/lpc43_appinit.c b/configs/lpc4330-xplorer/src/lpc43_appinit.c index 48225e0dde44389663abfbf7f35f837c19cf4da0..751daad9015ba4399768f0f55252894c3f295a20 100644 --- a/configs/lpc4330-xplorer/src/lpc43_appinit.c +++ b/configs/lpc4330-xplorer/src/lpc43_appinit.c @@ -90,7 +90,7 @@ static int nsh_spifi_initialize(void) mtd = lpc43_spifi_initialize(); if (!mtd) { - fdbg("ERROR: lpc43_spifi_initialize failed\n"); + ferr("ERROR: lpc43_spifi_initialize failed\n"); return -ENODEV; } @@ -100,7 +100,7 @@ static int nsh_spifi_initialize(void) ret = ftl_initialize(CONFIG_SPIFI_DEVNO, mtd); if (ret < 0) { - fdbg("ERROR: Initializing the FTL layer: %d\n", ret); + ferr("ERROR: Initializing the FTL layer: %d\n", ret); return ret; } #else @@ -109,7 +109,7 @@ static int nsh_spifi_initialize(void) ret = nxffs_initialize(mtd); if (ret < 0) { - fdbg("ERROR: NXFFS initialization failed: %d\n", ret); + ferr("ERROR: NXFFS initialization failed: %d\n", ret); return ret; } @@ -118,7 +118,7 @@ static int nsh_spifi_initialize(void) ret = mount(NULL, "/mnt/spifi", "nxffs", 0, NULL); if (ret < 0) { - fdbg("ERROR: Failed to mount the NXFFS volume: %d\n", errno); + ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno); return ret; } #endif diff --git a/configs/lpc4330-xplorer/src/lpc43_autoleds.c b/configs/lpc4330-xplorer/src/lpc43_autoleds.c index afe5ecd23fe20df04de01b55dad5b5efc601077c..37fbcddc0bbc4ddfd12e253e1964fbe1880b393f 100644 --- a/configs/lpc4330-xplorer/src/lpc43_autoleds.c +++ b/configs/lpc4330-xplorer/src/lpc43_autoleds.c @@ -54,9 +54,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ /* LED definitions **********************************************************/ /* The LPC4330-Xplorer has 2 user-controllable LEDs labeled D2 an D3 in the * schematic and on but referred to has LED1 and LED2 here, respectively. @@ -89,30 +86,6 @@ * void board_userled_all(uint8_t ledset); */ -/* Debug 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 -# ifdef CONFIG_DEBUG_VERBOSE -# define LED_VERBOSE 1 -# define ledvdbg lldbg -# else -# undef LED_VERBOSE -# define ledvdbg(x...) -# endif -#else -# undef LED_VERBOSE -# define leddbg(x...) -# define ledvdbg(x...) -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ diff --git a/configs/lpc4330-xplorer/src/lpc43_userleds.c b/configs/lpc4330-xplorer/src/lpc43_userleds.c index 8075aae7ed02a5f4a1186fc849a31c16bd156d4b..cfa22479d992ae4b90b556c950853ab03484a97b 100644 --- a/configs/lpc4330-xplorer/src/lpc43_userleds.c +++ b/configs/lpc4330-xplorer/src/lpc43_userleds.c @@ -66,30 +66,6 @@ * LEDs are pulled high to a low output illuminates the LED. */ -/* Debug 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 -# ifdef CONFIG_DEBUG_VERBOSE -# define LED_VERBOSE 1 -# define ledvdbg lldbg -# else -# undef LED_VERBOSE -# define ledvdbg(x...) -# endif -#else -# undef LED_VERBOSE -# define leddbg(x...) -# define ledvdbg(x...) -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ diff --git a/configs/lpc4337-ws/README.txt b/configs/lpc4337-ws/README.txt index 9a0d2cb99b09fa16251bbf13e4d816e51740a21b..a62558a8a08a023ffa3fca424176f1c578596d93 100644 --- a/configs/lpc4337-ws/README.txt +++ b/configs/lpc4337-ws/README.txt @@ -358,14 +358,14 @@ Code Red IDE/Tools in debugging symbols. NOTE 3: There are few things that NuttX has to do differently if you - are using a debugger. Make sure that you also set CONFIG_DEBUG=y. Nothing + are using a debugger. Make sure that you also set CONFIG_DEBUG_FEATURES=y. Nothing also is needed and no debug output will be generated; but NuttX will - use CONFIG_DEBUG=y to mean that a debugger is attached and will deal + use CONFIG_DEBUG_FEATURES=y to mean that a debugger is attached and will deal with certain resets and debug controls appropriately. So you should have: - CONFIG_DEBUG=y + CONFIG_DEBUG_FEATURES=y CONFIG_DEBUG_SYMBOLS=y NOTE 4: Every time that you control-C out of the command line GDB, you @@ -856,9 +856,9 @@ LPC4337-ws Configuration Options CONFIG_NET_NRXDESC - Configured number of Rx descriptors. Default: 18 CONFIG_NET_WOL - Enable Wake-up on Lan (not fully implemented). CONFIG_NET_REGDEBUG - Enabled low level register debug. Also needs - CONFIG_DEBUG. + CONFIG_DEBUG_FEATURES. CONFIG_NET_DUMPPACKET - Dump all received and transmitted packets. - Also needs CONFIG_DEBUG. + Also needs CONFIG_DEBUG_FEATURES. CONFIG_NET_HASH - Enable receipt of near-perfect match frames. LPC43xx USB Device Configuration @@ -967,7 +967,7 @@ Where is one of the following: from the SPI address space after each write. CONFIG_DEBUG_SPIFI_DUMP - Debug option to dump read/write buffers. You probably do not want to enable this unless you want to dig through a - *lot* of debug output! Also required CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, + *lot* of debug output! Also required CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_FS, 5. In my experience, there were some missing function pointers in the LPC43xx diff --git a/configs/lpc4337-ws/nsh/defconfig b/configs/lpc4337-ws/nsh/defconfig index 4f36719c26fe0dc2fff0541efc0ed33817e87837..ebe47a6fc981e9f2b60aef10da3e7414d0c05eaa 100644 --- a/configs/lpc4337-ws/nsh/defconfig +++ b/configs/lpc4337-ws/nsh/defconfig @@ -42,10 +42,11 @@ CONFIG_ARCH_STDARG_H=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -76,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 @@ -94,6 +96,7 @@ CONFIG_ARCH_CHIP_LPC43XX=y # 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 @@ -106,6 +109,7 @@ 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 @@ -114,6 +118,8 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="lpc43xx" +# 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 @@ -121,6 +127,7 @@ CONFIG_ARMV7M_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 @@ -131,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 is not set @@ -151,6 +159,7 @@ CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y # CONFIG_ARCH_CHIP_LPC4330FET180 is not set # CONFIG_ARCH_CHIP_LPC4330FET256 is not set CONFIG_ARCH_CHIP_LPC4337JBD144=y +# CONFIG_ARCH_CHIP_LPC4337JET100 is not set # CONFIG_ARCH_CHIP_LPC4350FBD208 is not set # CONFIG_ARCH_CHIP_LPC4350FET180 is not set # CONFIG_ARCH_CHIP_LPC4350FET256 is not set @@ -185,7 +194,6 @@ CONFIG_LPC43_ADC0=y # CONFIG_LPC43_EVNTMNTR is not set # CONFIG_LPC43_GPDMA is not set CONFIG_LPC43_I2C0=y -# CONFIG_LPC43_I2C0_SUPERFAST is not set # CONFIG_LPC43_I2C1 is not set # CONFIG_LPC43_I2S0 is not set # CONFIG_LPC43_I2S1 is not set @@ -212,6 +220,23 @@ CONFIG_LPC43_USART2=y CONFIG_LPC43_USB0=y # CONFIG_LPC43_USB1 is not set # CONFIG_LPC43_WWDT is not set +# CONFIG_LPC43_GPIO_IRQ is not set + +# +# RS-485 Configuration +# +# CONFIG_USART2_RS485MODE is not set +# CONFIG_USART2_RS485_DTRDIR is not set + +# +# I2C Configution +# +# CONFIG_LPC43_I2C0_SUPERFAST is not set + +# +# USB device controller driver (DCD) options +# +# CONFIG_LPC43_USB0DEV_NOVBUS is not set # # Architecture Options @@ -224,6 +249,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set CONFIG_ARCH_HAVE_MPU=y @@ -424,12 +450,17 @@ CONFIG_I2C=y # CONFIG_I2C_SLAVE is not set # CONFIG_I2C_POLLED is not set # CONFIG_I2C_TRACE is not set +CONFIG_I2C_DRIVER=y 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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -442,6 +473,7 @@ CONFIG_SPI_EXCHANGE=y CONFIG_ANALOG=y CONFIG_ADC=y CONFIG_ADC_FIFOSIZE=8 +# CONFIG_ADC_ADS1242 is not set # CONFIG_ADC_ADS125X is not set # CONFIG_ADC_PGA11X is not set # CONFIG_DAC is not set @@ -450,13 +482,21 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support # +# CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -467,6 +507,7 @@ CONFIG_ADC_FIFOSIZE=8 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -490,10 +531,6 @@ CONFIG_USART2_SERIALDRIVER=y # 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 @@ -548,8 +585,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=512 CONFIG_CDCACM_TXBUFSIZE=2048 @@ -561,15 +598,18 @@ CONFIG_CDCACM_PRODUCTSTR="lpc4337-ws" # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -603,7 +643,9 @@ 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 is not set # CONFIG_FS_TMPFS is not set @@ -612,12 +654,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -636,6 +672,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -681,12 +721,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -713,6 +756,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # Examples # # CONFIG_EXAMPLES_ADC is not set +# CONFIG_EXAMPLES_CHAT is not set # CONFIG_EXAMPLES_CONFIGDATA is not set # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_DHCPD is not set @@ -721,10 +765,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -733,38 +777,46 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD 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_SMART_TEST 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_WEBSERVER 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 @@ -777,8 +829,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -788,7 +840,9 @@ CONFIG_EXAMPLES_NSH=y # # 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 @@ -797,6 +851,7 @@ CONFIG_EXAMPLES_NSH=y # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -887,6 +942,8 @@ CONFIG_NSH_CONSOLE=y # CONFIG_NSH_USBCONSOLE is not set # 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 @@ -900,11 +957,13 @@ CONFIG_NSH_ARCHINIT=y # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set +CONFIG_SYSTEM_CDCACM=y +CONFIG_SYSTEM_CDCACM_DEVMINOR=0 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=0 CONFIG_I2CTOOL_MAXBUS=1 @@ -912,8 +971,7 @@ CONFIG_I2CTOOL_MINADDR=0x03 CONFIG_I2CTOOL_MAXADDR=0x77 CONFIG_I2CTOOL_MAXREGADDR=0xff CONFIG_I2CTOOL_DEFFREQ=100000 -# CONFIG_FSUTILS_INIFILE is not set -# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -921,7 +979,6 @@ 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set -CONFIG_SYSTEM_CDCACM=y -CONFIG_SYSTEM_CDCACM_DEVMINOR=0 # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/lpc4337-ws/src/lpc43_adc.c b/configs/lpc4337-ws/src/lpc43_adc.c index 0bb398369aa9a8a0dad61218fea182289e9cd456..c1cb491f61a12c07d70dd2c5fad4f43b402d969d 100644 --- a/configs/lpc4337-ws/src/lpc43_adc.c +++ b/configs/lpc4337-ws/src/lpc43_adc.c @@ -86,7 +86,7 @@ int board_adc_setup(void) adc = lpc43_adcinitialize(); if (adc == NULL) { - adbg("ERROR: Failed to get ADC interface\n"); + aerr("ERROR: Failed to get ADC interface\n"); return -ENODEV; } @@ -95,7 +95,7 @@ int board_adc_setup(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - adbg("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } diff --git a/configs/lpc4337-ws/src/lpc43_appinit.c b/configs/lpc4337-ws/src/lpc43_appinit.c index 976b78a4181ae7919ee1fbe272c616fdbd1f801d..3ae071fe122881407c1151e114cd2dde583d92bd 100644 --- a/configs/lpc4337-ws/src/lpc43_appinit.c +++ b/configs/lpc4337-ws/src/lpc43_appinit.c @@ -70,14 +70,14 @@ static void lpc43_i2c_register(int bus) i2c = lpc43_i2cbus_initialize(bus); if (i2c == NULL) { - dbg("ERROR: Failed to get I2C%d interface\n", bus); + _err("ERROR: Failed to get I2C%d interface\n", bus); } else { ret = i2c_register(i2c, bus); if (ret < 0) { - dbg("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); + _err("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); lpc43_i2cbus_uninitialize(i2c); } } diff --git a/configs/lpc4357-evb/README.txt b/configs/lpc4357-evb/README.txt index db2c2611d2fca32e099fcdd1d83a48947b2b318a..c3febbec039b8eded8718fb988af20c00bd9bd4e 100644 --- a/configs/lpc4357-evb/README.txt +++ b/configs/lpc4357-evb/README.txt @@ -355,14 +355,14 @@ Code Red IDE/Tools in debugging symbols. NOTE 3: There are few things that NuttX has to do differently if you - are using a debugger. Make sure that you also set CONFIG_DEBUG=y. Nothing + are using a debugger. Make sure that you also set CONFIG_DEBUG_FEATURES=y. Nothing also is needed and no debug output will be generated; but NuttX will - use CONFIG_DEBUG=y to mean that a debugger is attached and will deal + use CONFIG_DEBUG_FEATURES=y to mean that a debugger is attached and will deal with certain resets and debug controls appropriately. So you should have: - CONFIG_DEBUG=y + CONFIG_DEBUG_FEATURES=y CONFIG_DEBUG_SYMBOLS=y NOTE 4: Every time that you control-C out of the command line GDB, you @@ -853,9 +853,9 @@ LPC4357-EVB Configuration Options CONFIG_NET_NRXDESC - Configured number of Rx descriptors. Default: 18 CONFIG_NET_WOL - Enable Wake-up on Lan (not fully implemented). CONFIG_NET_REGDEBUG - Enabled low level register debug. Also needs - CONFIG_DEBUG. + CONFIG_DEBUG_FEATURES. CONFIG_NET_DUMPPACKET - Dump all received and transmitted packets. - Also needs CONFIG_DEBUG. + Also needs CONFIG_DEBUG_FEATURES. CONFIG_NET_HASH - Enable receipt of near-perfect match frames. LPC43xx USB Device Configuration @@ -964,7 +964,7 @@ Where is one of the following: from the SPI address space after each write. CONFIG_DEBUG_SPIFI_DUMP - Debug option to dump read/write buffers. You probably do not want to enable this unless you want to dig through a - *lot* of debug output! Also required CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, + *lot* of debug output! Also required CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_FS, 5. In my experience, there were some missing function pointers in the LPC43xx diff --git a/configs/lpc4357-evb/nsh/defconfig b/configs/lpc4357-evb/nsh/defconfig index e1f25c97d57b21d692a307f4fc96e54685ee62b3..a94de720c8a21f5549e5c2bfdc6c9ff22737c963 100644 --- a/configs/lpc4357-evb/nsh/defconfig +++ b/configs/lpc4357-evb/nsh/defconfig @@ -37,12 +37,15 @@ CONFIG_RAW_BINARY=y # CONFIG_ARCH_MATH_H is not set # CONFIG_ARCH_FLOAT_H is not set CONFIG_ARCH_STDARG_H=y +# CONFIG_ARCH_DEBUG_H is not set # # Debug Options # -# CONFIG_DEBUG is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y @@ -74,10 +77,12 @@ 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 # 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 @@ -86,34 +91,61 @@ CONFIG_ARCH_CHIP_LPC43XX=y # 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=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="lpc43xx" +# 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 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 is not set # CONFIG_ARMV7M_ITMSYSLOG is not set +# CONFIG_SERIAL_TERMIOS is not set # # LPC43xx Configuration Options @@ -126,6 +158,8 @@ CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y # CONFIG_ARCH_CHIP_LPC4330FET100 is not set # CONFIG_ARCH_CHIP_LPC4330FET180 is not set # CONFIG_ARCH_CHIP_LPC4330FET256 is not set +# CONFIG_ARCH_CHIP_LPC4337JBD144 is not set +# CONFIG_ARCH_CHIP_LPC4337JET100 is not set # CONFIG_ARCH_CHIP_LPC4350FBD208 is not set # CONFIG_ARCH_CHIP_LPC4350FET180 is not set # CONFIG_ARCH_CHIP_LPC4350FET256 is not set @@ -135,6 +169,7 @@ CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y # CONFIG_ARCH_CHIP_LPC4357FET180 is not set # CONFIG_ARCH_CHIP_LPC4357FBD208 is not set CONFIG_ARCH_CHIP_LPC4357FET256=y +# CONFIG_ARCH_CHIP_LPC4370FET100 is not set CONFIG_ARCH_FAMILY_LPC4357=y # CONFIG_LPC43_BOOT_SRAM is not set # CONFIG_LPC43_BOOT_SPIFI is not set @@ -181,9 +216,17 @@ CONFIG_LPC43_USART0=y # CONFIG_LPC43_UART1 is not set # CONFIG_LPC43_USART2 is not set # CONFIG_LPC43_USART3 is not set +# CONFIG_LPC43_USBOTG is not set # CONFIG_LPC43_USB0 is not set # CONFIG_LPC43_USB1 is not set # CONFIG_LPC43_WWDT is not set +# CONFIG_LPC43_GPIO_IRQ is not set + +# +# RS-485 Configuration +# +# CONFIG_USART0_RS485MODE is not set +# CONFIG_USART0_RS485_DTRDIR is not set # # Architecture Options @@ -196,11 +239,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -260,6 +306,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_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 @@ -296,6 +350,7 @@ 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 @@ -346,9 +401,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -379,22 +435,43 @@ CONFIG_DEV_NULL=y # 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_TIMER 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -402,6 +479,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -425,15 +504,13 @@ CONFIG_USART0_SERIALDRIVER=y # 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=y -# CONFIG_SERIAL_TERMIOS is not set CONFIG_USART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set # CONFIG_NO_SERIAL_CONSOLE is not set @@ -449,20 +526,23 @@ CONFIG_USART0_PARITY=0 CONFIG_USART0_2STOP=0 # CONFIG_USART0_IFLOWCONTROL is not set # CONFIG_USART0_OFLOWCONTROL is not set -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_USART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -496,17 +576,15 @@ 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 is not set +# CONFIG_FS_TMPFS is not set # CONFIG_FS_SMARTFS is not set # CONFIG_FS_PROCFS is not set - -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -526,6 +604,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -552,6 +634,7 @@ CONFIG_LIB_HOMEDIR="/" # 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 @@ -566,13 +649,19 @@ CONFIG_LIBC_TMPDIR="/tmp" CONFIG_LIBC_MAX_TMPFILE=32 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_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -587,26 +676,26 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -614,76 +703,81 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 # 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 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_UDP 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_WEBSERVER 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_FICL is not set # CONFIG_INTERPRETERS_BAS is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_MICROPYTHON is not set # CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # +# 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 # CONFIG_NETUTILS_SMTP is not set -# CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_NETLIB is not set -# CONFIG_NETUTILS_WEBCLIENT is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -702,13 +796,16 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -717,8 +814,10 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -727,6 +826,7 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -736,8 +836,10 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -764,7 +866,8 @@ CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_CONSOLE=y # CONFIG_NSH_ALTCONDEV is not set CONFIG_NSH_ARCHINIT=y -CONFIG_LIB_BOARDCTL=y +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # # NxWidgets/NxWM @@ -778,111 +881,19 @@ CONFIG_LIB_BOARDCTL=y # # System Libraries and NSH Add-Ons # - -# -# Custom Free Memory Command -# -# CONFIG_SYSTEM_FREE is not set - -# -# EMACS-like Command Line Editor -# # CONFIG_SYSTEM_CLE is not set - -# -# FLASH Program Installation -# -# CONFIG_SYSTEM_INSTALL is not set - -# -# FLASH Erase-all Command -# - -# -# Intel HEX to binary conversion -# +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set - -# -# I2C tool -# - -# -# INI File Parser -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# NxPlayer media player library / command Line -# - -# -# RAM test -# +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set - -# -# readline() -# +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y - -# -# P-Code Support -# - -# -# PHY Tool -# - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sudoku -# +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set - -# -# Sysinfo -# - -# -# VI Work-Alike Editor -# +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set - -# -# Stack Monitor -# - -# -# USB CDC/ACM Device Commands -# - -# -# USB Composite Device Commands -# - -# -# USB Mass Storage Device Commands -# - -# -# USB Monitor -# - -# -# Zmodem Commands -# # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/lpc4357-evb/src/lpc43_appinit.c b/configs/lpc4357-evb/src/lpc43_appinit.c index 43efc040ceeff200a56cf9080e858514ea283090..aea4aaaa19b264dee22ad508ba4cacd689ba4ca7 100644 --- a/configs/lpc4357-evb/src/lpc43_appinit.c +++ b/configs/lpc4357-evb/src/lpc43_appinit.c @@ -90,7 +90,7 @@ static int nsh_spifi_initialize(void) mtd = lpc43_spifi_initialize(); if (!mtd) { - fdbg("ERROR: lpc43_spifi_initialize failed\n"); + ferr("ERROR: lpc43_spifi_initialize failed\n"); return -ENODEV; } @@ -100,7 +100,7 @@ static int nsh_spifi_initialize(void) ret = ftl_initialize(CONFIG_SPIFI_DEVNO, mtd); if (ret < 0) { - fdbg("ERROR: Initializing the FTL layer: %d\n", ret); + ferr("ERROR: Initializing the FTL layer: %d\n", ret); return ret; } #else @@ -109,7 +109,7 @@ static int nsh_spifi_initialize(void) ret = nxffs_initialize(mtd); if (ret < 0) { - fdbg("ERROR: NXFFS initialization failed: %d\n", ret); + ferr("ERROR: NXFFS initialization failed: %d\n", ret); return ret; } @@ -118,7 +118,7 @@ static int nsh_spifi_initialize(void) ret = mount(NULL, "/mnt/spifi", "nxffs", 0, NULL); if (ret < 0) { - fdbg("ERROR: Failed to mount the NXFFS volume: %d\n", errno); + ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno); return ret; } #endif diff --git a/configs/lpc4357-evb/src/lpc43_autoleds.c b/configs/lpc4357-evb/src/lpc43_autoleds.c index acb63b2554bcc7a02ac492db52221b7a2d7c7696..0a92d582aa50d706f345dc52a51f719ddb84806c 100644 --- a/configs/lpc4357-evb/src/lpc43_autoleds.c +++ b/configs/lpc4357-evb/src/lpc43_autoleds.c @@ -86,30 +86,6 @@ * -------------------------- -------- */ -/* Debug 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 -# ifdef CONFIG_DEBUG_VERBOSE -# define LED_VERBOSE 1 -# define ledvdbg lldbg -# else -# undef LED_VERBOSE -# define ledvdbg(x...) -# endif -#else -# undef LED_VERBOSE -# define leddbg(x...) -# define ledvdbg(x...) -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ diff --git a/configs/lpc4357-evb/src/lpc43_userleds.c b/configs/lpc4357-evb/src/lpc43_userleds.c index 0e8af7c10e6033bcbee72fec5924cc898da98917..5a27a61e8faec9e5bffe47fb102b76252a606689 100644 --- a/configs/lpc4357-evb/src/lpc43_userleds.c +++ b/configs/lpc4357-evb/src/lpc43_userleds.c @@ -77,30 +77,6 @@ * void board_userled_all(uint8_t ledset); */ -/* Debug 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 -# ifdef CONFIG_DEBUG_VERBOSE -# define LED_VERBOSE 1 -# define ledvdbg lldbg -# else -# undef LED_VERBOSE -# define ledvdbg(x...) -# endif -#else -# undef LED_VERBOSE -# define leddbg(x...) -# define ledvdbg(x...) -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ diff --git a/configs/lpc4370-link2/README.txt b/configs/lpc4370-link2/README.txt index 110b02fd018d3228f3fdcb1549640d1b1bd1ecb1..9280b3258bd87758c06ed651301354bab07432f8 100644 --- a/configs/lpc4370-link2/README.txt +++ b/configs/lpc4370-link2/README.txt @@ -358,14 +358,14 @@ Code Red IDE/Tools in debugging symbols. NOTE 3: There are few things that NuttX has to do differently if you - are using a debugger. Make sure that you also set CONFIG_DEBUG=y. Nothing + are using a debugger. Make sure that you also set CONFIG_DEBUG_FEATURES=y. Nothing also is needed and no debug output will be generated; but NuttX will - use CONFIG_DEBUG=y to mean that a debugger is attached and will deal + use CONFIG_DEBUG_FEATURES=y to mean that a debugger is attached and will deal with certain resets and debug controls appropriately. So you should have: - CONFIG_DEBUG=y + CONFIG_DEBUG_FEATURES=y CONFIG_DEBUG_SYMBOLS=y NOTE 4: Every time that you control-C out of the command line GDB, you @@ -856,9 +856,9 @@ LPC4370-Link2 Configuration Options CONFIG_NET_NRXDESC - Configured number of Rx descriptors. Default: 18 CONFIG_NET_WOL - Enable Wake-up on Lan (not fully implemented). CONFIG_NET_REGDEBUG - Enabled low level register debug. Also needs - CONFIG_DEBUG. + CONFIG_DEBUG_FEATURES. CONFIG_NET_DUMPPACKET - Dump all received and transmitted packets. - Also needs CONFIG_DEBUG. + Also needs CONFIG_DEBUG_FEATURES. CONFIG_NET_HASH - Enable receipt of near-perfect match frames. LPC43xx USB Device Configuration @@ -967,7 +967,7 @@ Where is one of the following: from the SPI address space after each write. CONFIG_DEBUG_SPIFI_DUMP - Debug option to dump read/write buffers. You probably do not want to enable this unless you want to dig through a - *lot* of debug output! Also required CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, + *lot* of debug output! Also required CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_FS, 5. In my experience, there were some missing function pointers in the LPC43xx diff --git a/configs/lpc4370-link2/nsh/defconfig b/configs/lpc4370-link2/nsh/defconfig index 8a14cef0675d1e9367d8e207684913a14f6e8a1e..96822e9ab23d8b829d7bff1f53989e955b0d88af 100644 --- a/configs/lpc4370-link2/nsh/defconfig +++ b/configs/lpc4370-link2/nsh/defconfig @@ -42,10 +42,11 @@ CONFIG_ARCH_STDARG_H=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -76,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 @@ -94,6 +96,7 @@ CONFIG_ARCH_CHIP_LPC43XX=y # 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 @@ -106,6 +109,7 @@ 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 @@ -114,6 +118,8 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="lpc43xx" +# 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 @@ -121,6 +127,7 @@ CONFIG_ARMV7M_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 @@ -131,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 is not set @@ -151,6 +159,7 @@ CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y # CONFIG_ARCH_CHIP_LPC4330FET180 is not set # CONFIG_ARCH_CHIP_LPC4330FET256 is not set # CONFIG_ARCH_CHIP_LPC4337JBD144 is not set +# CONFIG_ARCH_CHIP_LPC4337JET100 is not set # CONFIG_ARCH_CHIP_LPC4350FBD208 is not set # CONFIG_ARCH_CHIP_LPC4350FET180 is not set # CONFIG_ARCH_CHIP_LPC4350FET256 is not set @@ -185,7 +194,6 @@ CONFIG_LPC43_BOOT_SPIFI=y # CONFIG_LPC43_EVNTMNTR is not set # CONFIG_LPC43_GPDMA is not set CONFIG_LPC43_I2C0=y -# CONFIG_LPC43_I2C0_SUPERFAST is not set # CONFIG_LPC43_I2C1 is not set # CONFIG_LPC43_I2S0 is not set # CONFIG_LPC43_I2S1 is not set @@ -212,6 +220,23 @@ CONFIG_LPC43_USART2=y CONFIG_LPC43_USB0=y # CONFIG_LPC43_USB1 is not set # CONFIG_LPC43_WWDT is not set +# CONFIG_LPC43_GPIO_IRQ is not set + +# +# RS-485 Configuration +# +# CONFIG_USART2_RS485MODE is not set +# CONFIG_USART2_RS485_DTRDIR is not set + +# +# I2C Configution +# +# CONFIG_LPC43_I2C0_SUPERFAST is not set + +# +# USB device controller driver (DCD) options +# +# CONFIG_LPC43_USB0DEV_NOVBUS is not set # # Architecture Options @@ -224,6 +249,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set CONFIG_ARCH_HAVE_MPU=y @@ -426,12 +452,17 @@ CONFIG_I2C=y # CONFIG_I2C_SLAVE is not set # CONFIG_I2C_POLLED is not set # CONFIG_I2C_TRACE is not set +CONFIG_I2C_DRIVER=y CONFIG_SPI=y # CONFIG_SPI_SLAVE is not set # CONFIG_SPI_EXCHANGE is not set # 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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -447,14 +478,22 @@ CONFIG_SPI=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support # # CONFIG_USERLED is not set +# CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -465,6 +504,7 @@ CONFIG_SPI=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -488,10 +528,6 @@ CONFIG_USART2_SERIALDRIVER=y # 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 @@ -546,8 +582,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=512 CONFIG_CDCACM_TXBUFSIZE=2048 @@ -559,15 +595,18 @@ CONFIG_CDCACM_PRODUCTSTR="lpc4370-link2" # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -601,7 +640,9 @@ 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 is not set # CONFIG_FS_TMPFS is not set @@ -610,12 +651,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -634,6 +669,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -679,12 +718,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -710,6 +752,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 @@ -718,10 +761,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -730,38 +773,46 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD 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_SMART_TEST 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_WEBSERVER 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 @@ -774,8 +825,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -785,7 +836,9 @@ CONFIG_EXAMPLES_NSH=y # # 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 @@ -794,6 +847,7 @@ CONFIG_EXAMPLES_NSH=y # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -884,6 +938,8 @@ CONFIG_NSH_CONSOLE=y # CONFIG_NSH_USBCONSOLE is not set # 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 @@ -897,11 +953,13 @@ CONFIG_NSH_ARCHINIT=y # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set +CONFIG_SYSTEM_CDCACM=y +CONFIG_SYSTEM_CDCACM_DEVMINOR=0 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=0 CONFIG_I2CTOOL_MAXBUS=1 @@ -909,8 +967,7 @@ CONFIG_I2CTOOL_MINADDR=0x03 CONFIG_I2CTOOL_MAXADDR=0x77 CONFIG_I2CTOOL_MAXREGADDR=0xff CONFIG_I2CTOOL_DEFFREQ=100000 -# CONFIG_FSUTILS_INIFILE is not set -# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -918,7 +975,6 @@ 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set -CONFIG_SYSTEM_CDCACM=y -CONFIG_SYSTEM_CDCACM_DEVMINOR=0 # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/lpc4370-link2/src/lpc43_adc.c b/configs/lpc4370-link2/src/lpc43_adc.c index 531b25ad7e6ee8d5af6eea8f8ab3a7c44fb17f9e..def52a5748142c002e1c89677b19e384d1c102a4 100644 --- a/configs/lpc4370-link2/src/lpc43_adc.c +++ b/configs/lpc4370-link2/src/lpc43_adc.c @@ -86,7 +86,7 @@ int board_adc_setup(void) adc = lpc43_adcinitialize(); if (adc == NULL) { - adbg("ERROR: Failed to get ADC interface\n"); + aerr("ERROR: Failed to get ADC interface\n"); return -ENODEV; } @@ -95,7 +95,7 @@ int board_adc_setup(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - adbg("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } diff --git a/configs/lpc4370-link2/src/lpc43_appinit.c b/configs/lpc4370-link2/src/lpc43_appinit.c index 660fb2e5f7cdce461a1f6dd5990e987081e92e10..8493fb391d63a70902403f8a4e4e582aaefb3b72 100644 --- a/configs/lpc4370-link2/src/lpc43_appinit.c +++ b/configs/lpc4370-link2/src/lpc43_appinit.c @@ -70,14 +70,14 @@ static void lpc43_i2c_register(int bus) i2c = lpc43_i2cbus_initialize(bus); if (i2c == NULL) { - dbg("ERROR: Failed to get I2C%d interface\n", bus); + _err("ERROR: Failed to get I2C%d interface\n", bus); } else { ret = i2c_register(i2c, bus); if (ret < 0) { - dbg("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); + _err("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); lpc43_i2cbus_uninitialize(i2c); } } diff --git a/configs/lpc4370-link2/src/lpc43_autoleds.c b/configs/lpc4370-link2/src/lpc43_autoleds.c index f9458b0e57587786b86bcdd876ccbf403bea110c..b69407d7b539460abf99fccc60f4af209c8f7f62 100644 --- a/configs/lpc4370-link2/src/lpc43_autoleds.c +++ b/configs/lpc4370-link2/src/lpc43_autoleds.c @@ -54,34 +54,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Debug 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 -# ifdef CONFIG_DEBUG_VERBOSE -# define LED_VERBOSE 1 -# define ledvdbg lldbg -# else -# undef LED_VERBOSE -# define ledvdbg(x...) -# endif -#else -# undef LED_VERBOSE -# define leddbg(x...) -# define ledvdbg(x...) -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ diff --git a/configs/lpc4370-link2/src/lpc43_userleds.c b/configs/lpc4370-link2/src/lpc43_userleds.c index c2953a361794522a86c67901d3ca45d11a5af176..39d01a1b8291881d681f6a9aa4c75e6b2d8fdb3d 100644 --- a/configs/lpc4370-link2/src/lpc43_userleds.c +++ b/configs/lpc4370-link2/src/lpc43_userleds.c @@ -53,36 +53,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* LED definitions **********************************************************/ - - -/* Debug 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 -# ifdef CONFIG_DEBUG_VERBOSE -# define LED_VERBOSE 1 -# define ledvdbg lldbg -# else -# undef LED_VERBOSE -# define ledvdbg(x...) -# endif -#else -# undef LED_VERBOSE -# define leddbg(x...) -# define ledvdbg(x...) -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ diff --git a/configs/lpcxpresso-lpc1115/README.txt b/configs/lpcxpresso-lpc1115/README.txt index 3a0beb1e7fc70b1444918d9def06d8faee772afc..bfe29dc6d50d5e3a7f114d0a54b5a9f30f331ada 100644 --- a/configs/lpcxpresso-lpc1115/README.txt +++ b/configs/lpcxpresso-lpc1115/README.txt @@ -687,6 +687,86 @@ Where is one of the following: configuration. This configuration has far fewer features than the nsh configuration but is also a fraction of the size. + This minnsh configuration is a "proof-of-concept" and not very usable in + its current state. This configuration was created by disabling + everything possible INCLUDING file system support. Without file system + support, NuttX is pretty much crippled. Here are some of the + consequences of disabling the file system: + + - All features that depend on the file system are lost: device drivers, + mountpoints, message queues, named semaphores. + + - Without device drivers, you cannot interact with the RTOS using POSIX + interfaces. You would have to work with NuttX as with those other + tiny RTOSs: As a scheduler and a callable hardare abstraction layer + (HAL). + + - You cannot use any of the NuttX upper half device drivers since they + depend on the pseudo-file system and device nodes. You can, of + course, continue to use the lower half drivers either directly. Or, + perhaps, you could write some custom minnsh upper half drivers that + do not depend on a file system and expose a HAL interface. + + There is a special version of readline() the NSH uses when there is no + file system. It uses a special up_putc() to write data to the console + and a special function up_getc() to read data from the console. + + - The current up_getc() implementationsa are a kludge. They are + analogous to the up_putc() implementations: They directly poll the + hardware for serial availability, locking up all lower priority tasks + in the entire system while they poll. So a version of NSH that uses + up_getc() essentially blocks the system until a character is received. + + This, of course, could be fixed by creating a special, upper half + implementation of the interrupt-driven serial lower half (like + stm32_serial) that just supports single character console I/O + (perhaps called up_putc and up_getc?). The NSH could wait for serial + input without blocking the system. But then that would increase the + footprint too. + + So although the minnsh configurations are a good starting point for + making things small, they not are really very practical. Why might + you want a NuttX minnsh solution? Perhaps you have software that runs + on a family of chips including some very tiny MCUs. Then perhaps having + the RTOS compatibility would justify the loss of functionality? + + You can re-enable the file system and (true) serial console with + these settings: + + Enable the file system: + CONFIG_NFILE_DESCRIPTORS=5 + CONFIG_NFILE_STREAMS=5 + + Enable the console device: + CONFIG_DEV_CONSOLE=y + + Disable most new NSH commands. Some like 'ls' are really mandatory + with a file system: + CONFIG_NSH_DISABLE_xxx=y + + Enable the upper half serial driver: + CONFIG_SERIAL=y + CONFIG_STANDARD_SERIAL=y + + Enable the USART1 serial driver: + CONFIG_STM32_USART1=y + CONFIG_STM32_USART1_SERIALDRIVER=y + CONFIG_USART1_SERIAL_CONSOLE=y + + CONFIG_USART1_2STOP=0 + CONFIG_USART1_BAUD=115200 + CONFIG_USART1_BITS=8 + CONFIG_USART1_PARITY=0 + CONFIG_USART1_RXBUFSIZE=16 + CONFIG_USART1_TXBUFSIZE=16 + + With these changes, NSH should behave better and we preserve the device + driver interface. But this result in a total size increase of about + 7KB: That is about 5KB of additional OS support for the file system and + serial console PLUS about 2KB for the 'ls' command logic (including OS + support for opendir(), readdir(), closedir(), stat(), and probably other + things). + STATUS: 2015-6-10 The nuttx.bin minnsh firmware file size: diff --git a/configs/lpcxpresso-lpc1115/minnsh/defconfig b/configs/lpcxpresso-lpc1115/minnsh/defconfig index 58ea587ca6b9833f2eee30b9c65c87ea48294aff..6a1ef9c5e39b8f159b38552e3eefb47237281be2 100644 --- a/configs/lpcxpresso-lpc1115/minnsh/defconfig +++ b/configs/lpcxpresso-lpc1115/minnsh/defconfig @@ -42,10 +42,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +# CONFIG_DEBUG_ALERT is not set +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -76,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 @@ -94,6 +96,7 @@ CONFIG_ARCH_CHIP_LPC11XX=y # 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 @@ -106,6 +109,7 @@ CONFIG_ARCH_CORTEXM0=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 @@ -114,11 +118,14 @@ CONFIG_ARCH_CORTEXM0=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv6-m" CONFIG_ARCH_CHIP="lpc11xx" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set # @@ -173,6 +180,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # CONFIG_ARCH_HAVE_MPU is not set @@ -349,13 +357,20 @@ CONFIG_DISABLE_POLL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support # # CONFIG_USERLED is not set +# CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -366,6 +381,8 @@ CONFIG_DISABLE_POLL=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -389,10 +406,6 @@ CONFIG_UART0_SERIALDRIVER=y # 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 is not set # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -419,14 +432,17 @@ CONFIG_UART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_NONE=y +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -456,12 +472,6 @@ CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y # 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 # @@ -480,6 +490,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -520,11 +534,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -553,10 +570,10 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -565,18 +582,19 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 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_NXTERM 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_PPPD 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 @@ -584,20 +602,25 @@ CONFIG_EXAMPLES_NSH=y # 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_WEBSERVER is not set # # File System Utilities # # CONFIG_FSUTILS_INIFILE is not set +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + # # Graphics Support # @@ -608,8 +631,8 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -620,6 +643,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 @@ -727,12 +751,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -740,5 +764,6 @@ 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/lpcxpresso-lpc1115/nsh/defconfig b/configs/lpcxpresso-lpc1115/nsh/defconfig index fc7f470f6da667017d2dceb26c0f94222403dc31..26382b3c070790781f4b00648e831af145124971 100644 --- a/configs/lpcxpresso-lpc1115/nsh/defconfig +++ b/configs/lpcxpresso-lpc1115/nsh/defconfig @@ -42,10 +42,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -76,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 @@ -94,6 +96,7 @@ CONFIG_ARCH_CHIP_LPC11XX=y # 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 @@ -106,6 +109,7 @@ CONFIG_ARCH_CORTEXM0=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 @@ -114,11 +118,14 @@ CONFIG_ARCH_CORTEXM0=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv6-m" CONFIG_ARCH_CHIP="lpc11xx" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set # @@ -173,6 +180,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # CONFIG_ARCH_HAVE_MPU is not set @@ -366,13 +374,20 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support # # CONFIG_USERLED is not set +# CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -384,6 +399,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -407,10 +424,6 @@ CONFIG_UART0_SERIALDRIVER=y # 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 @@ -437,15 +450,18 @@ CONFIG_UART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -476,12 +492,6 @@ CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y # 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 # @@ -500,6 +510,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -540,11 +554,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -578,10 +595,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -590,39 +607,45 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities # # CONFIG_FSUTILS_INIFILE is not set +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + # # Graphics Support # @@ -633,8 +656,8 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -645,6 +668,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 @@ -754,12 +778,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -767,5 +791,6 @@ 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/lpcxpresso-lpc1115/src/lpc11_adc.c b/configs/lpcxpresso-lpc1115/src/lpc11_adc.c index 0b76f0c41c2ae14505dc977bf381c66ff039ff86..75936ee338f58da9c67f9a3df06280058fa1242e 100644 --- a/configs/lpcxpresso-lpc1115/src/lpc11_adc.c +++ b/configs/lpcxpresso-lpc1115/src/lpc11_adc.c @@ -98,7 +98,7 @@ int adc_devinit(void) adc = lpc11_adcinitialize(); if (adc == NULL) { - adbg("ERROR: Failed to get ADC interface\n"); + aerr("ERROR: Failed to get ADC interface\n"); return -ENODEV; } @@ -107,7 +107,7 @@ int adc_devinit(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - adbg("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } diff --git a/configs/lpcxpresso-lpc1115/src/lpc11_dac.c b/configs/lpcxpresso-lpc1115/src/lpc11_dac.c index 3447f330362dc7274171612df6cd36343fc8abc7..93730ed0782222e6a3b708056037824f78539481 100644 --- a/configs/lpcxpresso-lpc1115/src/lpc11_dac.c +++ b/configs/lpcxpresso-lpc1115/src/lpc11_dac.c @@ -83,14 +83,14 @@ int dac_devinit(void) dac = lpc11_dacinitialize(); if (dac == NULL) { - adbg("ERROR: Failed to get dac interface\n"); + aerr("ERROR: Failed to get dac interface\n"); return -ENODEV; } ret = dac_register("/dev/dac0", dac); if (ret < 0) { - adbg("dac_register failed: %d\n", ret); + aerr("ERROR: dac_register failed: %d\n", ret); return ret; } diff --git a/configs/lpcxpresso-lpc1115/src/lpc11_leds.c b/configs/lpcxpresso-lpc1115/src/lpc11_leds.c index a112b4e267ada7224bd4f14215a20611518f343c..2c032cd087338ccef08358cc3ee3ff5484e159ba 100644 --- a/configs/lpcxpresso-lpc1115/src/lpc11_leds.c +++ b/configs/lpcxpresso-lpc1115/src/lpc11_leds.c @@ -52,36 +52,12 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /**************************************************************************** * Private Data ****************************************************************************/ static bool g_ncstate; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/lpcxpresso-lpc1115/src/lpc11_pwm.c b/configs/lpcxpresso-lpc1115/src/lpc11_pwm.c index d42ff511c0c24cd7388c71fbebc053a2aa9dcddd..6f303e5f5e4d0589409f45d5897a7aabe94b8d2a 100644 --- a/configs/lpcxpresso-lpc1115/src/lpc11_pwm.c +++ b/configs/lpcxpresso-lpc1115/src/lpc11_pwm.c @@ -96,7 +96,7 @@ int pwm_devinit(void) pwm = lpc11_pwminitialize(0); if (!pwm) { - adbg("Failed to get the LPC17XX PWM lower half\n"); + aerr("ERROR: Failed to get the LPC17XX PWM lower half\n"); return -ENODEV; } @@ -105,14 +105,14 @@ int pwm_devinit(void) ret = pwm_register("/dev/pwm0", pwm); if (ret < 0) { - adbg("pwm_register failed: %d\n", ret); + aerr("ERROR: pwm_register failed: %d\n", ret); return ret; } mcpwm = lpc11_mcpwminitialize(0); if (!mcpwm) { - adbg("Failed to get the LPC17XX MOTOR PWM lower half\n"); + aerr("ERROR: Failed to get the LPC17XX MOTOR PWM lower half\n"); return -ENODEV; } @@ -121,14 +121,14 @@ int pwm_devinit(void) ret = pwm_register("/dev/mcpwm0", mcpwm); if (ret < 0) { - adbg("mcpwm_register failed: %d\n", ret); + aerr("ERROR: mcpwm_register failed: %d\n", ret); return ret; } timer = lpc11_timerinitialize(0); if (!timer) { - adbg("Failed to get the LPC17XX TIMER lower half\n"); + aerr("ERROR: Failed to get the LPC17XX TIMER lower half\n"); return -ENODEV; } @@ -137,7 +137,7 @@ int pwm_devinit(void) ret = pwm_register("/dev/timer0", timer); if (ret < 0) { - adbg("timer_register failed: %d\n", ret); + aerr("ERROR: timer_register failed: %d\n", ret); return ret; } diff --git a/configs/lpcxpresso-lpc1115/src/lpc11_ssp.c b/configs/lpcxpresso-lpc1115/src/lpc11_ssp.c index b88d9088e74fb83c776cb971fd032aba143fa54e..0d7be5f71e374274f029fb82e2e0c8f45eb32505 100644 --- a/configs/lpcxpresso-lpc1115/src/lpc11_ssp.c +++ b/configs/lpcxpresso-lpc1115/src/lpc11_ssp.c @@ -58,36 +58,14 @@ * Pre-processor Definitions ************************************************************************************/ -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SSP_DEBUG /* Define to enable debug */ -#undef SSP_VERBOSE /* Define to enable verbose debug */ - -#ifdef SSP_DEBUG -# define sspdbg lldbg -# ifdef SSP_VERBOSE -# define sspvdbg lldbg -# else -# define sspvdbg(x...) -# endif -#else -# undef SSP_VERBOSE -# define sspdbg(x...) -# define sspvdbg(x...) -#endif - /* Dump GPIO registers */ -#ifdef SSP_VERBOSE +#ifdef CONFIG_DEBUG_GPIO_INFO # define ssp_dumpgpio(m) lpc11_dumpgpio(SDCCS_GPIO, m) #else # define ssp_dumpgpio(m) #endif -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -154,7 +132,7 @@ void weak_function lpcxpresso_sspdev_initialize(void) #ifdef CONFIG_LPC17_SSP0 void lpc11_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - sspdbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); ssp_dumpgpio("lpc11_ssp0select() Entry"); #warning "Assert CS here (false)" @@ -164,7 +142,7 @@ void lpc11_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel uint8_t lpc11_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - sspdbg("Returning SPI_STATUS_PRESENT\n"); + spiinfo("Returning SPI_STATUS_PRESENT\n"); return SPI_STATUS_PRESENT; } #endif @@ -172,7 +150,7 @@ uint8_t lpc11_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_LPC17_SSP1 void lpc11_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - sspdbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); ssp_dumpgpio("lpc11_ssp1select() Entry"); if (devid == SPIDEV_MMCSD) @@ -200,12 +178,12 @@ uint8_t lpc11_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) if (lpc11_gpioread(LPCXPRESSO_SD_CD) == 0) { - sspdbg("Returning SPI_STATUS_PRESENT\n"); + spiinfo("Returning SPI_STATUS_PRESENT\n"); return SPI_STATUS_PRESENT; } } - sspdbg("Returning zero\n"); + spiinfo("Returning zero\n"); return 0; } #endif diff --git a/configs/lpcxpresso-lpc1768/README.txt b/configs/lpcxpresso-lpc1768/README.txt index 4d00330a14101e5b099fc0f6d2367fd8bacf3f6f..36d5eead96feb86ea33471cd26a99fdce31cd0e3 100644 --- a/configs/lpcxpresso-lpc1768/README.txt +++ b/configs/lpcxpresso-lpc1768/README.txt @@ -676,9 +676,9 @@ LPCXpresso Configuration Options CONFIG_NET_NRXDESC - Configured number of Rx descriptors. Default: 18 CONFIG_NET_WOL - Enable Wake-up on Lan (not fully implemented). CONFIG_NET_REGDEBUG - Enabled low level register debug. Also needs - CONFIG_DEBUG. + CONFIG_DEBUG_FEATURES. CONFIG_NET_DUMPPACKET - Dump all received and transmitted packets. - Also needs CONFIG_DEBUG. + Also needs CONFIG_DEBUG_FEATURES. CONFIG_NET_HASH - Enable receipt of near-perfect match frames. CONFIG_LPC17_MULTICAST - Enable receipt of multicast (and unicast) frames. Automatically set if CONFIG_NET_IGMP is selected. diff --git a/configs/lpcxpresso-lpc1768/dhcpd/defconfig b/configs/lpcxpresso-lpc1768/dhcpd/defconfig index aca1a2a69b5f386354e4abb0a9e3eaa7b097ceb3..1ab45ab5e9d582a77a6c308b832eca25d4fa296e 100644 --- a/configs/lpcxpresso-lpc1768/dhcpd/defconfig +++ b/configs/lpcxpresso-lpc1768/dhcpd/defconfig @@ -37,14 +37,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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 @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -102,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="lpc17xx" +# 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 # @@ -119,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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=y # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -223,11 +242,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -272,6 +294,7 @@ CONFIG_RAM_SIZE=32768 # CONFIG_ARCH_BOARD_LPCXPRESSO=y # CONFIG_ARCH_BOARD_MBED is not set +# CONFIG_ARCH_BOARD_U_BLOX_C027 is not set # CONFIG_ARCH_BOARD_ZKITARM is not set # CONFIG_ARCH_BOARD_CUSTOM is not set CONFIG_ARCH_BOARD="lpcxpresso-lpc1768" @@ -320,6 +343,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="dhcpd_main" CONFIG_RR_INTERVAL=200 +# CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=0 CONFIG_MAX_TASKS=8 # CONFIG_SCHED_HAVE_PARENT is not set @@ -350,6 +374,7 @@ CONFIG_NAME_MAX=32 # 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 @@ -358,9 +383,10 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGWORK=17 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_HPWORK=y @@ -394,6 +420,7 @@ CONFIG_DEV_NULL=y # 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 @@ -411,8 +438,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y @@ -420,7 +462,10 @@ CONFIG_NETDEVICES=y # # General Ethernet MAC Driver Options # +# CONFIG_NETDEV_LOOPBACK is not set # CONFIG_NETDEV_MULTINIC is not set +CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y +# CONFIG_NETDEV_LATEINIT is not set # # External Ethernet MAC Device Support @@ -430,6 +475,7 @@ CONFIG_NETDEVICES=y # CONFIG_ENCX24J600 is not set # CONFIG_NET_E1000 is not set # CONFIG_NET_SLIP is not set +# CONFIG_NET_FTMAC100 is not set # CONFIG_NET_VNET is not set # @@ -448,6 +494,7 @@ CONFIG_NETDEVICES=y CONFIG_ETH0_PHY_LAN8720=y # CONFIG_ETH0_PHY_LAN8740 is not set # CONFIG_ETH0_PHY_LAN8740A is not set +# CONFIG_ETH0_PHY_LAN8742A is not set # CONFIG_ETH0_PHY_DM9161 is not set # CONFIG_PIPES is not set # CONFIG_PM is not set @@ -456,6 +503,8 @@ CONFIG_ETH0_PHY_LAN8720=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -479,14 +528,11 @@ CONFIG_UART3_SERIALDRIVER=y # 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_UART3_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -503,19 +549,23 @@ CONFIG_UART3_PARITY=0 CONFIG_UART3_2STOP=0 # CONFIG_UART3_IFLOWCONTROL is not set # CONFIG_UART3_OFLOWCONTROL is not set +# CONFIG_UART3_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -538,6 +588,7 @@ CONFIG_NET_GUARDSIZE=2 # # CONFIG_NET_MULTILINK is not set CONFIG_NET_ETHERNET=y +# CONFIG_NET_LOOPBACK is not set # CONFIG_NET_TUN is not set # @@ -619,6 +670,7 @@ CONFIG_IOB_NCHAINS=8 # Routing Table Configuration # # CONFIG_NET_ROUTE is not set +CONFIG_NET_HOSTNAME="" # # Crypto API @@ -641,12 +693,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # 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 # @@ -665,6 +711,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -705,10 +755,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -723,14 +778,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 CONFIG_EXAMPLES_DHCPD=y @@ -738,15 +792,16 @@ CONFIG_EXAMPLES_DHCPD_NOMAC=y CONFIG_EXAMPLES_DHCPD_IPADDR=0x0a000001 CONFIG_EXAMPLES_DHCPD_DRIPADDR=0x0a000001 CONFIG_EXAMPLES_DHCPD_NETMASK=0xffffff00 +# CONFIG_EXAMPLES_DISCOVER 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -754,18 +809,19 @@ CONFIG_EXAMPLES_DHCPD_NETMASK=0xffffff00 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD 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 @@ -773,16 +829,26 @@ CONFIG_EXAMPLES_DHCPD_NETMASK=0xffffff00 # 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_UDP is not set -# CONFIG_EXAMPLES_DISCOVER is not set -# CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set +# CONFIG_EXAMPLES_UDPBLASTER is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -794,15 +860,16 @@ CONFIG_EXAMPLES_DHCPD_NETMASK=0xffffff00 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set @@ -819,20 +886,15 @@ CONFIG_NETUTILS_DHCPD_NETMASK=0xffffff00 CONFIG_NETUTILS_DHCPD_DNSIP=0x08080808 CONFIG_NETUTILS_DHCPD_OFFERTIME=3600 CONFIG_NETUTILS_DHCPD_DECLINETIME=3600 +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set -# CONFIG_NETDB_DNSCLIENT is not set -# CONFIG_NETUTILS_SMTP is not set -# CONFIG_NETUTILS_TFTPC is not set CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_PPPD is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set +# CONFIG_NETUTILS_SMTP is not set +# CONFIG_NETUTILS_TFTPC is not set # # NSH Library @@ -851,15 +913,16 @@ CONFIG_NETUTILS_NETLIB=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_POWEROFF is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/lpcxpresso-lpc1768/nsh/defconfig b/configs/lpcxpresso-lpc1768/nsh/defconfig index 082098ca9fdb7729a0c733f61a4f5e12c93ea7f7..d50765a4286d1a5d947f585495287b0163a3d0f8 100644 --- a/configs/lpcxpresso-lpc1768/nsh/defconfig +++ b/configs/lpcxpresso-lpc1768/nsh/defconfig @@ -37,14 +37,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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 @@ -93,7 +96,9 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -104,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="lpc17xx" +# 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 # @@ -121,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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=y # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -225,6 +242,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set CONFIG_ARCH_HAVE_MPU=y @@ -276,6 +294,7 @@ CONFIG_RAM_SIZE=32768 # CONFIG_ARCH_BOARD_LPCXPRESSO=y # CONFIG_ARCH_BOARD_MBED is not set +# CONFIG_ARCH_BOARD_U_BLOX_C027 is not set # CONFIG_ARCH_BOARD_ZKITARM is not set # CONFIG_ARCH_BOARD_CUSTOM is not set CONFIG_ARCH_BOARD="lpcxpresso-lpc1768" @@ -371,6 +390,7 @@ CONFIG_NAME_MAX=32 # 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 @@ -386,9 +406,10 @@ CONFIG_SIG_SIGWORK=17 # CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_HPWORK=y @@ -432,6 +453,10 @@ CONFIG_SPI=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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -445,7 +470,21 @@ CONFIG_SPI=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -457,6 +496,7 @@ CONFIG_MMCSD_SPICLOCK=20000000 CONFIG_MMCSD_SPIMODE=0 # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set CONFIG_MTD=y # @@ -477,12 +517,15 @@ CONFIG_MTD=y # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP 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 @@ -536,6 +579,8 @@ CONFIG_ETH0_PHY_LAN8720=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -559,10 +604,6 @@ CONFIG_UART3_SERIALDRIVER=y # 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 @@ -589,15 +630,18 @@ CONFIG_UART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -738,7 +782,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_NFS is not set # CONFIG_FS_NXFFS is not set # CONFIG_FS_ROMFS is not set @@ -747,12 +793,6 @@ CONFIG_FS_FAT=y # 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 # @@ -771,6 +811,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -816,6 +860,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 @@ -823,12 +869,14 @@ CONFIG_NETDB_DNSCLIENT_ENTRIES=4 CONFIG_NETDB_DNSCLIENT_NAMESIZE=32 CONFIG_NETDB_DNSCLIENT_LIFESEC=3600 CONFIG_NETDB_DNSCLIENT_MAXRESPONSE=96 +# CONFIG_NETDB_RESOLVCONF is not set CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_NETDB_DNSSERVER_IPv4 is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -849,18 +897,20 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # 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_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -870,18 +920,19 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y 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_NXTERM 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_PPPD 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 @@ -889,22 +940,30 @@ CONFIG_EXAMPLES_NSH=y # 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_UDP is not set # 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_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set +# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_FSUTILS_PASSWD is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -917,8 +976,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -931,25 +990,27 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -968,6 +1029,7 @@ CONFIG_NSH_NESTDEPTH=3 # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_ARP is not set # CONFIG_NSH_DISABLE_BASENAME is not set # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set @@ -1010,6 +1072,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 @@ -1042,6 +1105,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1070,6 +1134,8 @@ CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048 CONFIG_NSH_TELNETD_CLIENTPRIO=100 CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048 CONFIG_NSH_IOBUFFER_SIZE=512 +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # CONFIG_NSH_TELNET_LOGIN is not set # @@ -1084,13 +1150,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1099,5 +1164,6 @@ 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/lpcxpresso-lpc1768/nx/defconfig b/configs/lpcxpresso-lpc1768/nx/defconfig index e604f2997f8089d03facb1785b1041b962168789..62553fce52317f05f99e82766312947be3daa3d1 100644 --- a/configs/lpcxpresso-lpc1768/nx/defconfig +++ b/configs/lpcxpresso-lpc1768/nx/defconfig @@ -37,14 +37,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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 @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -102,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="lpc17xx" +# 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 # @@ -119,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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=y # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -212,11 +231,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -261,6 +283,7 @@ CONFIG_RAM_SIZE=32768 # CONFIG_ARCH_BOARD_LPCXPRESSO=y # CONFIG_ARCH_BOARD_MBED is not set +# CONFIG_ARCH_BOARD_U_BLOX_C027 is not set # CONFIG_ARCH_BOARD_ZKITARM is not set # CONFIG_ARCH_BOARD_CUSTOM is not set CONFIG_ARCH_BOARD="lpcxpresso-lpc1768" @@ -275,6 +298,8 @@ CONFIG_ARCH_LEDS=y # 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 @@ -314,6 +339,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="nx_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 @@ -364,9 +390,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -397,14 +424,20 @@ CONFIG_DEV_NULL=y # 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=y +# CONFIG_SPI_SLAVE is not set # CONFIG_SPI_EXCHANGE is not set CONFIG_SPI_CMDDATA=y # 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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -418,10 +451,15 @@ CONFIG_SPI_CMDDATA=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set # CONFIG_LCD_NOGETRUN is not set @@ -442,6 +480,7 @@ CONFIG_UG9664HSWAG01_NINTERFACES=1 CONFIG_UG9664HSWAG01_POWER=y # CONFIG_LCD_UG2864HSWEG01 is not set # CONFIG_LCD_UG2832HSWEG04 is not set +# CONFIG_LCD_SSD1351 is not set # CONFIG_LCD_ST7565 is not set # CONFIG_LCD_ST7567 is not set # CONFIG_LCD_UG2864AMBAG01 is not set @@ -453,12 +492,17 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set +# CONFIG_SLCD is not set # -# Alphanumeric/Segment LCD Devices +# LED Support # -# CONFIG_LCD_LCD1602 is not set +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -468,6 +512,8 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -491,14 +537,11 @@ CONFIG_UART3_SERIALDRIVER=y # 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_UART3_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -515,19 +558,23 @@ CONFIG_UART3_PARITY=0 CONFIG_UART3_2STOP=0 # CONFIG_UART3_IFLOWCONTROL is not set # CONFIG_UART3_OFLOWCONTROL is not set +# CONFIG_UART3_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -558,12 +605,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -572,6 +613,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 @@ -670,6 +712,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -710,10 +756,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -728,14 +778,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -743,12 +792,12 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW 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 @@ -769,18 +818,19 @@ CONFIG_EXAMPLES_NX_BPP=1 # CONFIG_EXAMPLES_NX_RAWWINDOWS is not set CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=4 CONFIG_EXAMPLES_NX_EXTERNINIT=y -# 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_NXTERM 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_PPPD 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 @@ -788,14 +838,25 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=y # 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -807,26 +868,23 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # @@ -844,15 +902,16 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_POWEROFF is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/lpcxpresso-lpc1768/src/lpc17_adc.c b/configs/lpcxpresso-lpc1768/src/lpc17_adc.c index dd7fc837ea3ba20e5d3d8791728d69c9fbf1cfa7..b7d1b6ddb98f632c23538000510e1fd8e47a7d5b 100644 --- a/configs/lpcxpresso-lpc1768/src/lpc17_adc.c +++ b/configs/lpcxpresso-lpc1768/src/lpc17_adc.c @@ -99,7 +99,7 @@ int board_adc_setup(void) adc = lpc17_adcinitialize(); if (adc == NULL) { - adbg("ERROR: Failed to get ADC interface\n"); + aerr("ERROR: Failed to get ADC interface\n"); return -ENODEV; } @@ -108,7 +108,7 @@ int board_adc_setup(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - adbg("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } diff --git a/configs/lpcxpresso-lpc1768/src/lpc17_dac.c b/configs/lpcxpresso-lpc1768/src/lpc17_dac.c index f27c4edf61bf11493fd576cdaf086e5093d036f8..1948b4312c287b7b3729ef596588a2a15c081fb1 100644 --- a/configs/lpcxpresso-lpc1768/src/lpc17_dac.c +++ b/configs/lpcxpresso-lpc1768/src/lpc17_dac.c @@ -79,14 +79,14 @@ int dac_devinit(void) dac = lpc17_dacinitialize(); if (dac == NULL) { - adbg("ERROR: Failed to get dac interface\n"); + aerr("ERROR: Failed to get dac interface\n"); return -ENODEV; } ret = dac_register("/dev/dac0", dac); if (ret < 0) { - adbg("dac_register failed: %d\n", ret); + aerr("ERROR: dac_register failed: %d\n", ret); return ret; } diff --git a/configs/lpcxpresso-lpc1768/src/lpc17_leds.c b/configs/lpcxpresso-lpc1768/src/lpc17_leds.c index 0b56fdc148b00e3dc57c27ff1d02d38a209555de..c0ed65821f706c63fb4df7b28463852e3157b592 100644 --- a/configs/lpcxpresso-lpc1768/src/lpc17_leds.c +++ b/configs/lpcxpresso-lpc1768/src/lpc17_leds.c @@ -52,36 +52,12 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /**************************************************************************** * Private Data ****************************************************************************/ static bool g_ncstate; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/lpcxpresso-lpc1768/src/lpc17_oled.c b/configs/lpcxpresso-lpc1768/src/lpc17_oled.c index a6845e1dab114e4c4b1824424b055419c9c594ed..063af42b2dcae2cdbe166ab96f5fac1df9c6a245 100644 --- a/configs/lpcxpresso-lpc1768/src/lpc17_oled.c +++ b/configs/lpcxpresso-lpc1768/src/lpc17_oled.c @@ -69,27 +69,11 @@ #endif /* Debug ********************************************************************/ -/* Define the CONFIG_DEBUG_LCD to enable detailed debug output (stuff you - * would never want to see unless you are debugging this file). - * - * Verbose debug must also be enabled - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif #ifdef CONFIG_DEBUG_LCD -# define ugdbg(format, ...) vdbg(format, ##__VA_ARGS__) # define oleddc_dumpgpio(m) lpc17_dumpgpio(LPCXPRESSO_OLED_POWER, m) # define oledcs_dumpgpio(m) lpc17_dumpgpio(LPCXPRESSO_OLED_CS, m) #else -# define ugdbg(x...) # define oleddc_dumpgpio(m) # define oledcs_dumpgpio(m) #endif @@ -128,7 +112,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) spi = lpc17_sspbus_initialize(1); if (!spi) { - glldbg("Failed to initialize SPI port 1\n"); + gerr("ERROR: Failed to initialize SPI port 1\n"); } else { @@ -137,11 +121,11 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) dev = ug_initialize(spi, devno); if (!dev) { - glldbg("Failed to bind SPI port 1 to OLED %d: %d\n", devno); + gerr("ERROR: Failed to bind SPI port 1 to OLED %d: %d\n", devno); } else { - gllvdbg("Bound SPI port 1 to OLED %d\n", devno); + ginfo("Bound SPI port 1 to OLED %d\n", devno); /* And turn the OLED on (dim) */ @@ -209,7 +193,7 @@ int lpc17_ssp1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) #ifdef CONFIG_UG9664HSWAG01_POWER void ug_power(unsigned int devno, bool on) { - gllvdbg("power %s\n", on ? "ON" : "OFF"); + ginfo("power %s\n", on ? "ON" : "OFF"); (void)lpc17_gpiowrite(LPCXPRESSO_OLED_POWER, on); } #endif diff --git a/configs/lpcxpresso-lpc1768/src/lpc17_pwm.c b/configs/lpcxpresso-lpc1768/src/lpc17_pwm.c index 565c33a1817a04d728cfb2c7b3a396b281a92605..4b261555cb67bbbf01cb7de13bb446c46899ff17 100644 --- a/configs/lpcxpresso-lpc1768/src/lpc17_pwm.c +++ b/configs/lpcxpresso-lpc1768/src/lpc17_pwm.c @@ -98,7 +98,7 @@ int board_pwm_setup(void) pwm = lpc17_pwminitialize(0); if (!pwm) { - adbg("Failed to get the LPC17XX PWM lower half\n"); + aerr("ERROR: Failed to get the LPC17XX PWM lower half\n"); return -ENODEV; } @@ -107,14 +107,14 @@ int board_pwm_setup(void) ret = pwm_register("/dev/pwm0", pwm); if (ret < 0) { - adbg("pwm_register failed: %d\n", ret); + aerr("ERROR: pwm_register failed: %d\n", ret); return ret; } mcpwm = lpc17_mcpwminitialize(0); if (!mcpwm) { - adbg("Failed to get the LPC17XX MOTOR PWM lower half\n"); + aerr("ERROR: Failed to get the LPC17XX MOTOR PWM lower half\n"); return -ENODEV; } @@ -123,14 +123,14 @@ int board_pwm_setup(void) ret = pwm_register("/dev/mcpwm0", mcpwm); if (ret < 0) { - adbg("mcpwm_register failed: %d\n", ret); + aerr("ERROR: mcpwm_register failed: %d\n", ret); return ret; } timer = lpc17_timerinitialize(0); if (!timer) { - adbg("Failed to get the LPC17XX TIMER lower half\n"); + aerr("ERROR: Failed to get the LPC17XX TIMER lower half\n"); return -ENODEV; } @@ -139,7 +139,7 @@ int board_pwm_setup(void) ret = pwm_register("/dev/timer0", timer); if (ret < 0) { - adbg("timer_register failed: %d\n", ret); + aerr("ERROR: timer_register failed: %d\n", ret); return ret; } diff --git a/configs/lpcxpresso-lpc1768/src/lpc17_ssp.c b/configs/lpcxpresso-lpc1768/src/lpc17_ssp.c index 9de1a6b86cf722e583375b307efe68a50771fdf5..c56ab469398952633bf2ae6217f99a6b26ea5d3d 100644 --- a/configs/lpcxpresso-lpc1768/src/lpc17_ssp.c +++ b/configs/lpcxpresso-lpc1768/src/lpc17_ssp.c @@ -58,36 +58,14 @@ * Pre-processor Definitions ************************************************************************************/ -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SSP_DEBUG /* Define to enable debug */ -#undef SSP_VERBOSE /* Define to enable verbose debug */ - -#ifdef SSP_DEBUG -# define sspdbg lldbg -# ifdef SSP_VERBOSE -# define sspvdbg lldbg -# else -# define sspvdbg(x...) -# endif -#else -# undef SSP_VERBOSE -# define sspdbg(x...) -# define sspvdbg(x...) -#endif - /* Dump GPIO registers */ -#ifdef SSP_VERBOSE +#ifdef CONFIG_DEBUG_GPIO_INFO # define ssp_dumpgpio(m) lpc17_dumpgpio(SDCCS_GPIO, m) #else # define ssp_dumpgpio(m) #endif -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -154,7 +132,7 @@ void weak_function lpcxpresso_sspdev_initialize(void) #ifdef CONFIG_LPC17_SSP0 void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - sspdbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); ssp_dumpgpio("lpc17_ssp0select() Entry"); #warning "Assert CS here (false)" @@ -164,7 +142,7 @@ void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - sspdbg("Returning SPI_STATUS_PRESENT\n"); + spiinfo("Returning SPI_STATUS_PRESENT\n"); return SPI_STATUS_PRESENT; } #endif @@ -172,7 +150,7 @@ uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_LPC17_SSP1 void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - sspdbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); ssp_dumpgpio("lpc17_ssp1select() Entry"); if (devid == SPIDEV_MMCSD) @@ -200,12 +178,12 @@ uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) if (lpc17_gpioread(LPCXPRESSO_SD_CD) == 0) { - sspdbg("Returning SPI_STATUS_PRESENT\n"); + spiinfo("Returning SPI_STATUS_PRESENT\n"); return SPI_STATUS_PRESENT; } } - sspdbg("Returning zero\n"); + spiinfo("Returning zero\n"); return 0; } #endif diff --git a/configs/lpcxpresso-lpc1768/thttpd/defconfig b/configs/lpcxpresso-lpc1768/thttpd/defconfig index 69b2148fdfcf62c73bf26a03bf73630709260bea..be0fb5fbaf4bd0c65f6d902411cd7b146beacc51 100644 --- a/configs/lpcxpresso-lpc1768/thttpd/defconfig +++ b/configs/lpcxpresso-lpc1768/thttpd/defconfig @@ -37,14 +37,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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 @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -102,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="lpc17xx" +# 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 # @@ -119,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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=y # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -223,11 +242,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -272,6 +294,7 @@ CONFIG_RAM_SIZE=32768 # CONFIG_ARCH_BOARD_LPCXPRESSO=y # CONFIG_ARCH_BOARD_MBED is not set +# CONFIG_ARCH_BOARD_U_BLOX_C027 is not set # CONFIG_ARCH_BOARD_ZKITARM is not set # CONFIG_ARCH_BOARD_CUSTOM is not set CONFIG_ARCH_BOARD="lpcxpresso-lpc1768" @@ -320,6 +343,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="thttp_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 @@ -350,6 +374,7 @@ CONFIG_NAME_MAX=32 # 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 @@ -358,9 +383,10 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGWORK=17 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_HPWORK=y @@ -394,6 +420,7 @@ CONFIG_DEV_NULL=y # 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 @@ -411,8 +438,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y @@ -420,7 +462,11 @@ CONFIG_NETDEVICES=y # # General Ethernet MAC Driver Options # +# CONFIG_NETDEV_LOOPBACK is not set +# CONFIG_NETDEV_TELNET is not set # CONFIG_NETDEV_MULTINIC is not set +CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y +# CONFIG_NETDEV_LATEINIT is not set # # External Ethernet MAC Device Support @@ -430,6 +476,7 @@ CONFIG_NETDEVICES=y # CONFIG_ENCX24J600 is not set # CONFIG_NET_E1000 is not set # CONFIG_NET_SLIP is not set +# CONFIG_NET_FTMAC100 is not set # CONFIG_NET_VNET is not set # @@ -448,6 +495,7 @@ CONFIG_NETDEVICES=y CONFIG_ETH0_PHY_LAN8720=y # CONFIG_ETH0_PHY_LAN8740 is not set # CONFIG_ETH0_PHY_LAN8740A is not set +# CONFIG_ETH0_PHY_LAN8742A is not set # CONFIG_ETH0_PHY_DM9161 is not set # CONFIG_PIPES is not set # CONFIG_PM is not set @@ -456,6 +504,8 @@ CONFIG_ETH0_PHY_LAN8720=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -479,13 +529,10 @@ CONFIG_UART3_SERIALDRIVER=y # 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_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_SERIAL_DMA is not set CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y CONFIG_UART3_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -502,19 +549,23 @@ CONFIG_UART3_PARITY=0 CONFIG_UART3_2STOP=0 # CONFIG_UART3_IFLOWCONTROL is not set # CONFIG_UART3_OFLOWCONTROL is not set +# CONFIG_UART3_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -538,6 +589,7 @@ CONFIG_NET_GUARDSIZE=2 # # CONFIG_NET_MULTILINK is not set CONFIG_NET_ETHERNET=y +# CONFIG_NET_LOOPBACK is not set # CONFIG_NET_TUN is not set # @@ -623,6 +675,7 @@ CONFIG_IOB_NCHAINS=8 # Routing Table Configuration # # CONFIG_NET_ROUTE is not set +CONFIG_NET_HOSTNAME="" # # Crypto API @@ -646,16 +699,11 @@ CONFIG_FS_READABLE=y # CONFIG_FS_FAT 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_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 # @@ -674,6 +722,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -717,10 +769,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -735,14 +792,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -750,11 +806,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -763,19 +819,20 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_NSH is not set # 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD 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 @@ -784,6 +841,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_THTTPD=y @@ -792,14 +850,24 @@ CONFIG_EXAMPLES_THTTPD_DRIPADDR=0x0a000001 CONFIG_EXAMPLES_THTTPD_NETMASK=0xffffff00 # CONFIG_EXAMPLES_TIFF is not set # 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # CONFIG_EXAMPLES_XMLRPC 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 # @@ -811,20 +879,24 @@ CONFIG_EXAMPLES_THTTPD_NETMASK=0xffffff00 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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_FTPD is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set CONFIG_NETUTILS_THTTPD=y @@ -859,16 +931,10 @@ CONFIG_THTTPD_IDLE_SEND_LIMIT_SEC=300 CONFIG_THTTPD_TILDE_MAP_NONE=y # CONFIG_THTTPD_GENERATE_INDICES is not set # CONFIG_THTTPD_USE_URLPATTERN is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # @@ -886,15 +952,16 @@ CONFIG_NETUTILS_NETLIB=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_POWEROFF is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/lpcxpresso-lpc1768/usbmsc/defconfig b/configs/lpcxpresso-lpc1768/usbmsc/defconfig index a6d2fa0c3da170998ba24ae0ffc0797546bcf291..405c185791568e8a694be0f6b5fa6cd2d4619ba8 100644 --- a/configs/lpcxpresso-lpc1768/usbmsc/defconfig +++ b/configs/lpcxpresso-lpc1768/usbmsc/defconfig @@ -37,14 +37,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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 @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -102,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="lpc17xx" +# 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 # @@ -119,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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=y # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -223,11 +242,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -272,6 +294,7 @@ CONFIG_RAM_SIZE=32768 # CONFIG_ARCH_BOARD_LPCXPRESSO=y # CONFIG_ARCH_BOARD_MBED is not set +# CONFIG_ARCH_BOARD_U_BLOX_C027 is not set # CONFIG_ARCH_BOARD_ZKITARM is not set # CONFIG_ARCH_BOARD_CUSTOM is not set CONFIG_ARCH_BOARD="lpcxpresso-lpc1768" @@ -286,7 +309,14 @@ CONFIG_ARCH_LEDS=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 @@ -321,6 +351,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="msconn_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 @@ -371,9 +402,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -404,14 +436,20 @@ CONFIG_DEV_NULL=y # 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=y +# CONFIG_SPI_SLAVE is not set # CONFIG_SPI_EXCHANGE is not set # 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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -425,7 +463,21 @@ CONFIG_SPI=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -437,6 +489,7 @@ CONFIG_MMCSD_SPICLOCK=12500000 CONFIG_MMCSD_SPIMODE=0 # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set # CONFIG_MTD is not set # CONFIG_EEPROM is not set # CONFIG_PIPES is not set @@ -446,6 +499,8 @@ CONFIG_MMCSD_SPIMODE=0 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -469,14 +524,11 @@ CONFIG_UART3_SERIALDRIVER=y # 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_UART3_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -493,6 +545,7 @@ CONFIG_UART3_PARITY=0 CONFIG_UART3_2STOP=0 # CONFIG_UART3_IFLOWCONTROL is not set # CONFIG_UART3_OFLOWCONTROL is not set +# CONFIG_UART3_DMA is not set CONFIG_USBDEV=y # @@ -532,15 +585,18 @@ CONFIG_USBMSC_SCSI_STACKSIZE=2048 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -572,16 +628,11 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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_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 # @@ -600,6 +651,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -645,10 +700,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -663,26 +723,26 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -690,18 +750,19 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD 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 @@ -709,14 +770,26 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_WEBSERVER 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 @@ -729,26 +802,23 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # @@ -766,17 +836,17 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_POWEROFF is not set # CONFIG_SYSTEM_SUDOKU is not set -# CONFIG_SYSTEM_VI is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set CONFIG_SYSTEM_USBMSC=y CONFIG_SYSTEM_USBMSC_NLUNS=1 CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 @@ -786,4 +856,5 @@ CONFIG_SYSTEM_USBMSC_DEVPATH2="/dev/mmcsd1" CONFIG_SYSTEM_USBMSC_DEVMINOR3=2 CONFIG_SYSTEM_USBMSC_DEVPATH3="/dev/mmcsd2" # CONFIG_SYSTEM_USBMSC_DEBUGMM is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/maple/include/board.h b/configs/maple/include/board.h index 8b4da7dd35c6a754ccf124c8a074936592a4bb05..c45cef1005f6c7060364762c5e83d621a0c2133d 100644 --- a/configs/maple/include/board.h +++ b/configs/maple/include/board.h @@ -2,7 +2,7 @@ * configs/maple/include/board.h * include/arch/board/board.h * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Authors: Gregory Nutt * Librae * @@ -94,14 +94,14 @@ #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) */ +/* APB1 timers 2-7 will be twice 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) +#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) /* USB divider -- Divide PLL clock by 1.5 */ @@ -111,8 +111,14 @@ * 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 +#define BOARD_TIM1_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM2_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM3_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM4_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM5_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM6_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM7_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM8_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 diff --git a/configs/maple/nsh/defconfig b/configs/maple/nsh/defconfig index 54ebb6d22ea3177a3b01c91cb44748df1f3da417..47b1e70d77d938a3131abd21f86d941f7d861946 100644 --- a/configs/maple/nsh/defconfig +++ b/configs/maple/nsh/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARCH_CHIP_STM32F103CB=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -405,6 +408,10 @@ CONFIG_STM32_JTAG_DISABLE=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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -416,9 +423,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -657,7 +672,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -665,6 +685,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -676,6 +697,8 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -747,15 +770,18 @@ CONFIG_USBDEV_TRACE_NRECORDS=32 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -793,12 +819,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -871,6 +891,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -904,10 +925,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -916,17 +937,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -934,16 +955,16 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -965,8 +986,8 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1094,12 +1115,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1107,7 +1128,7 @@ 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_USBMONITOR is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/maple/nx/defconfig b/configs/maple/nx/defconfig index b60f26e071e25715c2f8e341aae5e0e7b198a06f..8b166644149285507bcd13fd858436d9d18f56d7 100644 --- a/configs/maple/nx/defconfig +++ b/configs/maple/nx/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARCH_CHIP_STM32F103CB=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -413,6 +416,10 @@ CONFIG_STM32_JTAG_DISABLE=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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM2_PWM is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -425,9 +432,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -688,6 +703,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -703,10 +720,14 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set # CONFIG_LCD_NOGETRUN is not set @@ -740,12 +761,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set - -# -# Alphanumeric/Segment LCD Devices -# -# CONFIG_LCD_LCD1602 is not set -# CONFIG_LCD_BACKPACK is not set +# CONFIG_SLCD is not set # # LED Support @@ -753,6 +769,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -764,6 +781,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -855,14 +873,17 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_NONE=y +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -900,12 +921,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -1064,6 +1079,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1097,10 +1113,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -1118,7 +1134,6 @@ 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 CONFIG_EXAMPLES_NXHELLO_VPLANE=0 @@ -1137,12 +1152,13 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1150,17 +1166,17 @@ CONFIG_EXAMPLES_NXHELLO_DEFAULT_FONT=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -1182,8 +1198,8 @@ CONFIG_EXAMPLES_NXHELLO_DEFAULT_FONT=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1313,13 +1329,14 @@ CONFIG_USBDEV_MINOR=0 # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CDCACM is not set # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_I2CTOOL is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1327,8 +1344,7 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/maple/src/stm32_lcd.c b/configs/maple/src/stm32_lcd.c index 71108039f4f3b9785802f0cb04a4a88450cb8953..64f506563ba41d731e56b46b9209fe607a512169 100644 --- a/configs/maple/src/stm32_lcd.c +++ b/configs/maple/src/stm32_lcd.c @@ -67,28 +67,6 @@ #define EXTCOMIN_FREQ 24 #define TIMER_FREQ 1200 /* 72000000/60000 */ -/* Debug ********************************************************************/ - -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must - * also be enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg(format, ...) vdbg(format, ##__VA_ARGS__) -#else -# define lcddbg(x...) -#endif - /**************************************************************************** * Private Data ****************************************************************************/ @@ -107,7 +85,7 @@ static int up_lcdextcominisr(int irq, void *context) STM32_TIM_ACKINT(tim, 0); if (g_isr == NULL) { - lcddbg("error, irq not attached, disabled\n"); + lcderr("ERROR: error, irq not attached, disabled\n"); STM32_TIM_DISABLEINT(tim, 0); return OK; } @@ -117,7 +95,7 @@ static int up_lcdextcominisr(int irq, void *context) static int up_lcdirqattach(xcpt_t isr) { - lcddbg("%s IRQ\n", isr == NULL ? "Detach" : "Attach"); + lcdinfo("%s IRQ\n", isr == NULL ? "Detach" : "Attach"); if (isr != NULL) { @@ -135,7 +113,7 @@ static int up_lcdirqattach(xcpt_t isr) static void up_lcddispcontrol(bool on) { - lcddbg("set: %s\n", on ? "on" : "off"); + lcdinfo("set: %s\n", on ? "on" : "off"); if (on) { @@ -159,7 +137,7 @@ static void up_lcdsetpolarity(bool pol) static void up_lcdsetvcomfreq(unsigned int freq) { - lcddbg("freq: %d\n", freq); + lcdinfo("freq: %d\n", freq); DEBUGASSERT(freq >= 1 && freq <= 60); STM32_TIM_SETPERIOD(tim, TIMER_FREQ / freq); } @@ -190,17 +168,17 @@ static FAR struct memlcd_priv_s memlcd_priv = FAR int board_lcd_initialize(void) { - lcddbg("Initializing lcd\n"); + lcdinfo("Initializing lcd\n"); - lcddbg("init spi1\n"); + lcdinfo("init spi1\n"); spi = stm32_spibus_initialize(1); DEBUGASSERT(spi); - lcddbg("configure related io\n"); + lcdinfo("configure related io\n"); stm32_configgpio(GPIO_MEMLCD_EXTCOMIN); stm32_configgpio(GPIO_MEMLCD_DISP); - lcddbg("configure EXTCOMIN timer\n"); + lcdinfo("configure EXTCOMIN timer\n"); if (tim == NULL) { tim = stm32_tim_init(2); @@ -210,7 +188,7 @@ FAR int board_lcd_initialize(void) STM32_TIM_SETMODE(tim, STM32_TIM_MODE_UP); } - lcddbg("init lcd\n"); + lcdinfo("init lcd\n"); l_lcddev = memlcd_initialize(spi, &memlcd_priv, 0); DEBUGASSERT(l_lcddev); diff --git a/configs/maple/src/stm32_leds.c b/configs/maple/src/stm32_leds.c index c54d91e642bd0d41b0abd879029f78e332fc19a7..0423027fd0b252e76588be925a106dd22cb36d96 100644 --- a/configs/maple/src/stm32_leds.c +++ b/configs/maple/src/stm32_leds.c @@ -53,33 +53,13 @@ #include "stm32.h" #include "maple.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 Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ static inline void set_led(bool v) { - ledvdbg("Turn LED %s\n", v? "on":"off"); + ledinfo("Turn LED %s\n", v? "on":"off"); stm32_gpiowrite(GPIO_LED, v); } @@ -105,7 +85,7 @@ void board_autoled_initialize(void) void board_autoled_on(int led) { - ledvdbg("board_autoled_on(%d)\n", led); + ledinfo("board_autoled_on(%d)\n", led); switch (led) { case LED_STARTED: @@ -134,7 +114,7 @@ void board_autoled_on(int led) void board_autoled_off(int led) { - ledvdbg("board_autoled_off(%d)\n", led); + ledinfo("board_autoled_off(%d)\n", led); switch (led) { diff --git a/configs/maple/src/stm32_spi.c b/configs/maple/src/stm32_spi.c index 22c106a1e4a70f40c2294fd9b3225b491db5177f..95040a67bf7148ceac200435e02a6e2c416fbac7 100644 --- a/configs/maple/src/stm32_spi.c +++ b/configs/maple/src/stm32_spi.c @@ -55,33 +55,6 @@ #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_SPI -#endif - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -134,7 +107,7 @@ void weak_function stm32_spidev_initialize(void) void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); # if defined(CONFIG_LCD_SHARP_MEMLCD) if (devid == SPIDEV_DISPLAY) diff --git a/configs/maple/src/stm32_usbdev.c b/configs/maple/src/stm32_usbdev.c index 5c007477084331e50a2e9130ac3a0283d5208260..104624d6450f1b86a82b9c9789902170ba21d794 100644 --- a/configs/maple/src/stm32_usbdev.c +++ b/configs/maple/src/stm32_usbdev.c @@ -74,7 +74,7 @@ void stm32_usbinitialize(void) { - ulldbg("called\n"); + uinfo("called\n"); /* USB Soft Connect Pullup */ @@ -113,5 +113,5 @@ int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } diff --git a/configs/maple/usbnsh/defconfig b/configs/maple/usbnsh/defconfig index fe4466fd04549127f2501f3a8e594e4ef32c2683..4976608c7f47b111ac293177855864668db585eb 100644 --- a/configs/maple/usbnsh/defconfig +++ b/configs/maple/usbnsh/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARCH_CHIP_STM32F103CB=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -405,6 +408,10 @@ CONFIG_STM32_JTAG_DISABLE=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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -416,9 +423,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -671,7 +686,12 @@ CONFIG_I2C=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -679,6 +699,7 @@ CONFIG_I2C=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -690,6 +711,7 @@ CONFIG_I2C=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -781,14 +803,17 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_NONE=y +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -826,12 +851,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -904,6 +923,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -937,10 +957,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -949,17 +969,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -967,17 +987,17 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -999,8 +1019,8 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1130,13 +1150,14 @@ CONFIG_USBDEV_MINOR=0 # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CDCACM is not set # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_I2CTOOL is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1144,8 +1165,7 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/mbed/README.txt b/configs/mbed/README.txt index 8385d563f5d21e8a8a044b898e1aaef7eab5444e..734ff3883dbe0dd79cb76e9eb32927ffee1c18d5 100644 --- a/configs/mbed/README.txt +++ b/configs/mbed/README.txt @@ -349,9 +349,9 @@ mbed Configuration Options CONFIG_NET_NRXDESC - Configured number of Rx descriptors. Default: 18 CONFIG_NET_WOL - Enable Wake-up on Lan (not fully implemented). CONFIG_NET_REGDEBUG - Enabled low level register debug. Also needs - CONFIG_DEBUG. + CONFIG_DEBUG_FEATURES. CONFIG_NET_DUMPPACKET - Dump all received and transmitted packets. - Also needs CONFIG_DEBUG. + Also needs CONFIG_DEBUG_FEATURES. CONFIG_NET_HASH - Enable receipt of near-perfect match frames. CONFIG_LPC17_MULTICAST - Enable receipt of multicast (and unicast) frames. Automatically set if CONFIG_NET_IGMP is selected. diff --git a/configs/mbed/hidkbd/defconfig b/configs/mbed/hidkbd/defconfig index ef889a041181c912a2415f62410a54aff99f191e..58136eab01dd099faae003abc48e20feb58029bc 100644 --- a/configs/mbed/hidkbd/defconfig +++ b/configs/mbed/hidkbd/defconfig @@ -7,6 +7,7 @@ # 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 @@ -16,6 +17,7 @@ CONFIG_HOST_LINUX=y # Build Configuration # # CONFIG_APPS_DIR="../apps" +CONFIG_BUILD_FLAT=y # CONFIG_BUILD_2PASS is not set # @@ -25,20 +27,25 @@ CONFIG_HOST_LINUX=y # 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_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y @@ -68,10 +75,14 @@ CONFIG_ARCH="arm" # 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=y # CONFIG_ARCH_CHIP_LPC214X is not set # CONFIG_ARCH_CHIP_LPC2378 is not set @@ -80,35 +91,62 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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=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="lpc17xx" +# 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_MPU=y +# 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=y # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set # CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL is not set # CONFIG_ARMV7M_OABI_TOOLCHAIN is not set +# CONFIG_ARMV7M_HAVE_STACKCHECK is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set # CONFIG_GPIO_IRQ is not set +# CONFIG_SERIAL_TERMIOS is not set # # LPC17xx Configuration Options @@ -165,6 +203,7 @@ CONFIG_LPC17_UART0=y # CONFIG_LPC17_TMR3 is not set # CONFIG_LPC17_RIT is not set # CONFIG_LPC17_PWM0 is not set +# CONFIG_LPC17_PWM1 is not set # CONFIG_LPC17_MCPWM is not set # CONFIG_LPC17_QEI is not set # CONFIG_LPC17_RTC is not set @@ -181,7 +220,6 @@ CONFIG_LPC17_UART0=y # # Serial driver options # -# CONFIG_SERIAL_TERMIOS is not set # # USB host driver options @@ -192,6 +230,7 @@ CONFIG_USBHOST_NTDS=3 CONFIG_USBHOST_TDBUFFERS=3 CONFIG_USBHOST_TDBUFSIZE=128 CONFIG_USBHOST_IOBUFSIZE=512 +CONFIG_LPC17_USBHOST_NPREALLOC=4 CONFIG_USBHOST_BULK_DISABLE=y # CONFIG_USBHOST_INT_DISABLE is not set CONFIG_USBHOST_ISOC_DISABLE=y @@ -203,13 +242,23 @@ CONFIG_USBHOST_ISOC_DISABLE=y # CONFIG_ARCH_VECNOTIRQ is not set # CONFIG_ARCH_DMA is not set CONFIG_ARCH_HAVE_IRQPRIO=y -# CONFIG_ARCH_ADDRENV is not set +# 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 @@ -249,6 +298,7 @@ CONFIG_RAM_SIZE=32768 # # CONFIG_ARCH_BOARD_LPCXPRESSO is not set CONFIG_ARCH_BOARD_MBED=y +# CONFIG_ARCH_BOARD_U_BLOX_C027 is not set # CONFIG_ARCH_BOARD_ZKITARM is not set # CONFIG_ARCH_BOARD_CUSTOM is not set CONFIG_ARCH_BOARD="mbed" @@ -262,38 +312,79 @@ CONFIG_ARCH_LEDS=y # # Board-Specific Options # +# CONFIG_LIB_BOARDCTL is not set # # RTOS Features # -# CONFIG_BOARD_INITIALIZE is not set +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_RR_INTERVAL=200 -# CONFIG_SCHED_INSTRUMENTATION is not set -CONFIG_TASK_NAME_SIZE=0 -# CONFIG_SCHED_HAVE_PARENT is not set +# CONFIG_CLOCK_MONOTONIC is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2010 CONFIG_START_MONTH=11 CONFIG_START_DAY=10 -CONFIG_DEV_CONSOLE=y +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="hidkbd_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 is not set + +# +# Pthread Options +# # CONFIG_MUTEX_TYPES is not set -# CONFIG_PRIORITY_INHERITANCE 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_SCHED_WAITPID 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_USER_ENTRYPOINT="hidkbd_main" -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 +# CONFIG_SIG_EVTHREAD is not set # # Signal Numbers @@ -305,19 +396,21 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 CONFIG_SIG_SIGWORK=17 # -# Sizes of configurable things (0 disables) +# POSIX Message Queue Options # -CONFIG_MAX_TASKS=16 -CONFIG_NPTHREAD_KEYS=4 -CONFIG_NFILE_DESCRIPTORS=8 -CONFIG_NFILE_STREAMS=8 -CONFIG_NAME_MAX=32 CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 -CONFIG_MAX_WDOGPARMS=2 -CONFIG_PREALLOC_WDOGS=8 -CONFIG_WDOG_INTRESERVE=1 -CONFIG_PREALLOC_TIMERS=4 +# 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=1024 +# CONFIG_SCHED_LPWORK is not set # # Stack and heap information @@ -326,6 +419,7 @@ 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 @@ -334,14 +428,26 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 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 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 @@ -349,9 +455,25 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -359,16 +481,40 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set +# CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y - -# -# USART Configuration -# +# 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=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_UART0_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set # CONFIG_NO_SERIAL_CONSOLE is not set # @@ -382,11 +528,13 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_UART0_DMA is not set # CONFIG_USBDEV is not set CONFIG_USBHOST=y CONFIG_USBHOST_NPREALLOC=0 +CONFIG_USBHOST_HAVE_ASYNCH=y +# CONFIG_USBHOST_ASYNCH is not set +# CONFIG_USBHOST_HUB is not set # CONFIG_USBHOST_MSC is not set CONFIG_USBHOST_HIDKBD=y CONFIG_HIDKBD_POLLUSEC=100000 @@ -401,14 +549,18 @@ CONFIG_HIDKBD_NPOLLWAITERS=2 # CONFIG_USBHOST_TRACE is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -417,6 +569,11 @@ CONFIG_HIDKBD_NPOLLWAITERS=2 # CONFIG_ARCH_HAVE_PHY is not set # CONFIG_NET is not set +# +# Crypto API +# +# CONFIG_CRYPTO is not set + # # File Systems # @@ -425,20 +582,20 @@ CONFIG_HIDKBD_NPOLLWAITERS=2 # 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_PROCFS is not set - -# -# System Logging -# - -# CONFIG_SYSLOG is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -459,7 +616,11 @@ CONFIG_MM_REGIONS=2 # CONFIG_AUDIO is not set # -# Binary Formats +# Wireless Support +# + +# +# Binary Loader # # CONFIG_BINFMT_DISABLE is not set # CONFIG_BINFMT_EXEPATH is not set @@ -484,6 +645,7 @@ CONFIG_LIB_HOMEDIR="/" # 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 @@ -495,19 +657,19 @@ 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_SCHED_WORKQUEUE=y -CONFIG_SCHED_HPWORK=y -CONFIG_SCHED_HPWORKPRIORITY=192 -CONFIG_SCHED_HPWORKPERIOD=50000 -CONFIG_SCHED_HPWORKSTACKSIZE=1024 -# CONFIG_SCHED_LPWORK is not set +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -522,29 +684,28 @@ CONFIG_SCHED_HPWORKSTACKSIZE=1024 # # -# Built-In Applications +# CAN Utilities # # # 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 # 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=y CONFIG_EXAMPLES_HIDKBD_DEFPRIO=50 CONFIG_EXAMPLES_HIDKBD_STACKSIZE=1024 CONFIG_EXAMPLES_HIDKBD_DEVNAME="/dev/kbda" -# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_IGMP is not set -# CONFIG_EXAMPLES_LCDRW is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -552,69 +713,72 @@ CONFIG_EXAMPLES_HIDKBD_DEVNAME="/dev/kbda" # CONFIG_EXAMPLES_NSH is not set # 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM is not set # CONFIG_EXAMPLES_NXTEXT is not set # CONFIG_EXAMPLES_OSTEST is not set -# CONFIG_EXAMPLES_PASHELLO is not set +# CONFIG_EXAMPLES_PCA9635 is not set # CONFIG_EXAMPLES_PIPE is not set # CONFIG_EXAMPLES_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 +# 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 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_UDP 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_WEBSERVER 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_MICROPYTHON is not set # CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # +# 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 # CONFIG_NETUTILS_SMTP is not set -# CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_NETLIB is not set -# CONFIG_NETUTILS_WEBCLIENT is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library @@ -633,93 +797,16 @@ CONFIG_EXAMPLES_HIDKBD_DEVNAME="/dev/kbda" # # System Libraries and NSH Add-Ons # - -# -# USB CDC/ACM Device Commands -# - -# -# USB Composite Device Commands -# - -# -# Custom Free Memory Command -# +# CONFIG_SYSTEM_CLE is not set +# CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set - -# -# I2C tool -# - -# -# INI File Parser -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# FLASH Program Installation -# +# CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set # CONFIG_SYSTEM_INSTALL is not set - -# -# FLASH Erase-all Command -# - -# -# NxPlayer media player library / command Line -# -# CONFIG_SYSTEM_NXPLAYER is not set - -# -# RAM test -# # CONFIG_SYSTEM_RAMTEST is not set - -# -# readline() -# +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sysinfo -# - -# -# USB Monitor -# - -# -# EMACS-like Command Line Editor -# -# CONFIG_SYSTEM_CLE is not set - -# -# VI Work-Alike Editor -# +# CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set - -# -# Stack Monitor -# - -# -# USB Mass Storage Device Commands -# - -# -# Zmodem Commands -# # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/mbed/nsh/defconfig b/configs/mbed/nsh/defconfig index dcfda7b8c9beea3c43fb92408024c4d39a4965f2..95999a5e5618d7cc8d815e43fdbe4fd6848d4638 100644 --- a/configs/mbed/nsh/defconfig +++ b/configs/mbed/nsh/defconfig @@ -12,10 +12,6 @@ CONFIG_HOST_LINUX=y # CONFIG_HOST_OSX is not set # CONFIG_HOST_WINDOWS is not set # CONFIG_HOST_OTHER is not set -# CONFIG_WINDOWS_NATIVE is not set -# CONFIG_WINDOWS_CYGWIN is not set -# CONFIG_WINDOWS_MSYS is not set -# CONFIG_WINDOWS_OTHER is not set # # Build Configuration @@ -41,12 +37,15 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y @@ -78,10 +77,12 @@ 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 # CONFIG_ARCH_CHIP_TIVA is not set +# CONFIG_ARCH_CHIP_LPC11XX is not set CONFIG_ARCH_CHIP_LPC17XX=y # CONFIG_ARCH_CHIP_LPC214X is not set # CONFIG_ARCH_CHIP_LPC2378 is not set @@ -90,41 +91,62 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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=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="lpc17xx" +# 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_TOOLCHAIN_ATOLLIC is not set +# 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=y # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set -# CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set -# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW is not set -# CONFIG_ARMV7M_TOOLCHAIN_DEVKITARM is not set # CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL is not set -# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW is not set -# CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE is not set # CONFIG_ARMV7M_OABI_TOOLCHAIN is not set +# CONFIG_ARMV7M_HAVE_STACKCHECK is not set # CONFIG_ARMV7M_ITMSYSLOG is not set # CONFIG_GPIO_IRQ is not set +# CONFIG_SERIAL_TERMIOS is not set # # LPC17xx Configuration Options @@ -210,11 +232,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -259,6 +284,7 @@ CONFIG_RAM_SIZE=32768 # # CONFIG_ARCH_BOARD_LPCXPRESSO is not set CONFIG_ARCH_BOARD_MBED=y +# CONFIG_ARCH_BOARD_U_BLOX_C027 is not set # CONFIG_ARCH_BOARD_ZKITARM is not set # CONFIG_ARCH_BOARD_CUSTOM is not set CONFIG_ARCH_BOARD="mbed" @@ -275,6 +301,14 @@ CONFIG_NSH_MMCSDSPIPORTNO=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 @@ -309,6 +343,7 @@ 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 @@ -359,9 +394,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -392,23 +428,48 @@ CONFIG_DEV_NULL=y # 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=y +# CONFIG_SPI_SLAVE is not set # CONFIG_SPI_EXCHANGE is not set # CONFIG_SPI_CMDDATA is not set +CONFIG_SPI_CALLBACK=y # CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_HWFEATURES is not set +# CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL 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_TIMER 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -419,6 +480,8 @@ CONFIG_MMCSD_SPI=y CONFIG_MMCSD_SPICLOCK=12500000 CONFIG_MMCSD_SPIMODE=0 # CONFIG_ARCH_HAVE_SDIO is not set +# CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set CONFIG_MTD=y # @@ -427,6 +490,7 @@ CONFIG_MTD=y # CONFIG_MTD_PARTITION is not set # CONFIG_MTD_SECT512 is not set # CONFIG_MTD_BYTE_WRITE is not set +# CONFIG_MTD_PROGMEM is not set # CONFIG_MTD_CONFIG is not set # @@ -434,14 +498,19 @@ CONFIG_MTD=y # # CONFIG_MTD_NAND is not set # CONFIG_RAMMTD is not set +# CONFIG_FILEMTD is not set # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP 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 @@ -452,6 +521,8 @@ CONFIG_MTD=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -475,16 +546,12 @@ CONFIG_UART0_SERIALDRIVER=y # 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_SERIAL_TERMIOS is not set CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set # CONFIG_NO_SERIAL_CONSOLE is not set @@ -500,18 +567,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -544,17 +616,15 @@ 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 # CONFIG_FS_SMARTFS is not set # CONFIG_FS_PROCFS is not set - -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -574,6 +644,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -615,13 +689,19 @@ CONFIG_LIBC_TMPDIR="/tmp" CONFIG_LIBC_MAX_TMPFILE=32 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_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -636,26 +716,26 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -663,36 +743,47 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 # 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 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_UDP 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_FLASH_ERASEALL is not set +# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_FSUTILS_PASSWD is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -703,37 +794,30 @@ CONFIG_EXAMPLES_NSH=y # # Interpreters # -# CONFIG_INTERPRETERS_FICL is not set # CONFIG_INTERPRETERS_BAS is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_MICROPYTHON is not set # CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # # 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 # CONFIG_NETUTILS_SMTP is not set -# CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_NETLIB is not set -# CONFIG_NETUTILS_WEBCLIENT is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -752,13 +836,16 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -767,8 +854,10 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -777,6 +866,7 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -786,8 +876,10 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -814,7 +906,8 @@ CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_CONSOLE=y # CONFIG_NSH_ALTCONDEV is not set CONFIG_NSH_ARCHINIT=y -CONFIG_LIB_BOARDCTL=y +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # # NxWidgets/NxWM @@ -828,116 +921,19 @@ CONFIG_LIB_BOARDCTL=y # # System Libraries and NSH Add-Ons # - -# -# Custom Free Memory Command -# -# CONFIG_SYSTEM_FREE is not set - -# -# EMACS-like Command Line Editor -# # CONFIG_SYSTEM_CLE is not set - -# -# CU Minimal Terminal -# # CONFIG_SYSTEM_CUTERM is not set - -# -# FLASH Program Installation -# -# CONFIG_SYSTEM_INSTALL is not set - -# -# FLASH Erase-all Command -# - -# -# Intel HEX to binary conversion -# +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set - -# -# I2C tool -# - -# -# INI File Parser -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# NxPlayer media player library / command Line -# - -# -# RAM test -# +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set - -# -# readline() -# +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y - -# -# P-Code Support -# - -# -# PHY Tool -# - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sudoku -# +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set - -# -# Sysinfo -# - -# -# VI Work-Alike Editor -# +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set - -# -# Stack Monitor -# - -# -# USB CDC/ACM Device Commands -# - -# -# USB Composite Device Commands -# - -# -# USB Mass Storage Device Commands -# - -# -# USB Monitor -# - -# -# Zmodem Commands -# # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/mbed/src/lpc17_adc.c b/configs/mbed/src/lpc17_adc.c index aea44427e07237d60e8cb58200b82efbf4f88a92..4cc9b6ad8da62ac9345967fb2c088a7ca2d24844 100644 --- a/configs/mbed/src/lpc17_adc.c +++ b/configs/mbed/src/lpc17_adc.c @@ -101,7 +101,7 @@ int board_adc_setup(void) adc = lpc17_adcinitialize(); if (adc == NULL) { - adbg("ERROR: Failed to get ADC interface\n"); + aerr("ERROR: Failed to get ADC interface\n"); return -ENODEV; } @@ -110,7 +110,7 @@ int board_adc_setup(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - adbg("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } diff --git a/configs/mbed/src/lpc17_dac.c b/configs/mbed/src/lpc17_dac.c index 6f18a1411d8b74e6b4f5f9b395600ca7be693509..dccdbb92f5a33cda2f8fc59c3b1299dd1c5ca397 100644 --- a/configs/mbed/src/lpc17_dac.c +++ b/configs/mbed/src/lpc17_dac.c @@ -81,14 +81,14 @@ int dac_devinit(void) dac = lpc17_dacinitialize(); if (dac == NULL) { - adbg("ERROR: Failed to get dac interface\n"); + aerr("ERROR: Failed to get dac interface\n"); return -ENODEV; } ret = dac_register("/dev/dac0", dac); if (ret < 0) { - adbg("dac_register failed: %d\n", ret); + aerr("ERROR: dac_register failed: %d\n", ret); return ret; } diff --git a/configs/mbed/src/lpc17_hidkbd.c b/configs/mbed/src/lpc17_hidkbd.c index 38fbca903346e4b14dbe2aa9a88e0d24d577bfce..fc17d82de7c8d8cdb203dbf7930276779c25de48 100644 --- a/configs/mbed/src/lpc17_hidkbd.c +++ b/configs/mbed/src/lpc17_hidkbd.c @@ -76,7 +76,7 @@ struct usbhost_connection_s *arch_usbhost_initialize(void) ret = usbhost_hub_initialize(); if (ret < 0) { - udbg("ERROR: usbhost_hub_initialize failed: %d\n", ret); + uerr("ERROR: usbhost_hub_initialize failed: %d\n", ret); } #endif diff --git a/configs/mbed/src/lpc17_leds.c b/configs/mbed/src/lpc17_leds.c index 4a0c4116c6a54d2895fbc64563caa6a3d85deceb..f1f9978d40c29529cc191956e668a7c2368d4751 100644 --- a/configs/mbed/src/lpc17_leds.c +++ b/configs/mbed/src/lpc17_leds.c @@ -60,25 +60,9 @@ * 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 -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /* Dump GPIO registers */ -#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_LEDS) +#ifdef CONFIG_DEBUG_LEDS_INFO # define led_dumpgpio(m) lpc17_dumpgpio(MBED_LED3, m) #else # define led_dumpgpio(m) diff --git a/configs/mbed/src/lpc17_pwm.c b/configs/mbed/src/lpc17_pwm.c index d3021d7063f1c8f417c5f7979acd72744934c363..c8b6881dc9bd45d26594da3da7dd8d71a39affdc 100644 --- a/configs/mbed/src/lpc17_pwm.c +++ b/configs/mbed/src/lpc17_pwm.c @@ -100,7 +100,7 @@ int board_pwm_setup(void) pwm = lpc17_pwminitialize(0); if (!pwm) { - adbg("Failed to get the LPC17XX PWM lower half\n"); + aerr("ERROR: Failed to get the LPC17XX PWM lower half\n"); return -ENODEV; } @@ -109,14 +109,14 @@ int board_pwm_setup(void) ret = pwm_register("/dev/pwm0", pwm); if (ret < 0) { - adbg("pwm_register failed: %d\n", ret); + aerr("ERROR: pwm_register failed: %d\n", ret); return ret; } mcpwm = lpc17_mcpwminitialize(0); if (!mcpwm) { - adbg("Failed to get the LPC17XX MOTOR PWM lower half\n"); + aerr("ERROR: Failed to get the LPC17XX MOTOR PWM lower half\n"); return -ENODEV; } @@ -125,14 +125,14 @@ int board_pwm_setup(void) ret = pwm_register("/dev/mcpwm0", mcpwm); if (ret < 0) { - adbg("mcpwm_register failed: %d\n", ret); + aerr("ERROR: mcpwm_register failed: %d\n", ret); return ret; } timer = lpc17_timerinitialize(0); if (!timer) { - adbg("Failed to get the LPC17XX TIMER lower half\n"); + aerr("ERROR: Failed to get the LPC17XX TIMER lower half\n"); return -ENODEV; } @@ -141,7 +141,7 @@ int board_pwm_setup(void) ret = pwm_register("/dev/timer0", timer); if (ret < 0) { - adbg("timer_register failed: %d\n", ret); + aerr("ERROR: timer_register failed: %d\n", ret); return ret; } diff --git a/configs/mcu123-lpc214x/composite/Make.defs b/configs/mcu123-lpc214x/composite/Make.defs index a1d22707cc34151a1261a48884d6f2abd132a178..8d1cd5305eab2e42d96460fe623c517d8b747ef8 100644 --- a/configs/mcu123-lpc214x/composite/Make.defs +++ b/configs/mcu123-lpc214x/composite/Make.defs @@ -71,7 +71,7 @@ ifneq ($(HOSTOS),Cygwin) endif endif -ifeq ("${CONFIG_DEBUG}","y") +ifeq ("${CONFIG_DEBUG_FEATURES}","y") ARCHOPTIMIZATION = -g endif @@ -115,7 +115,7 @@ EXEEXT = ifneq ($(CROSSDEV),arm-nuttx-elf-) LDFLAGS += -nostartfiles -nodefaultlibs endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) LDFLAGS += -g endif diff --git a/configs/mcu123-lpc214x/composite/defconfig b/configs/mcu123-lpc214x/composite/defconfig index 73d1c5912dc5c2952a7cc30d77b5bd4102605f98..f98119041d0ce80c0438fa20c4596f9457d82902 100644 --- a/configs/mcu123-lpc214x/composite/defconfig +++ b/configs/mcu123-lpc214x/composite/defconfig @@ -37,14 +37,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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 @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_LPC214X=y # 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=y # CONFIG_ARCH_ARM926EJS is not set # CONFIG_ARCH_ARM920T is not set @@ -102,10 +109,21 @@ CONFIG_ARCH_ARM7TDMI=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="arm" CONFIG_ARCH_CHIP="lpc214x" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y # CONFIG_ARCH_LOWVECTORS is not set @@ -167,11 +185,14 @@ CONFIG_LPC214X_USBDEV=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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_STACKDUMP=y # CONFIG_ARCH_USBDUMP is not set # CONFIG_ENDIAN_BIG is not set @@ -226,7 +247,13 @@ CONFIG_ARCH_LEDS=y # Board-Specific Options # CONFIG_LIB_BOARDCTL=y +# 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 @@ -261,6 +288,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="conn_main" CONFIG_RR_INTERVAL=0 +# CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=0 CONFIG_MAX_TASKS=16 # CONFIG_SCHED_HAVE_PARENT is not set @@ -311,9 +339,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -344,14 +373,20 @@ CONFIG_DEV_NULL=y # 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=y +# CONFIG_SPI_SLAVE is not set # CONFIG_SPI_EXCHANGE is not set # CONFIG_SPI_CMDDATA is not set CONFIG_SPI_CALLBACK=y # CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_HWFEATURES is not set +# CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -365,7 +400,21 @@ CONFIG_SPI_CALLBACK=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -377,6 +426,7 @@ CONFIG_MMCSD_SPICLOCK=20000000 CONFIG_MMCSD_SPIMODE=0 # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set # CONFIG_MTD is not set # CONFIG_EEPROM is not set # CONFIG_PIPES is not set @@ -387,6 +437,7 @@ CONFIG_MMCSD_SPIMODE=0 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -410,14 +461,11 @@ CONFIG_UART1_SERIALDRIVER=y # 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 is not set CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_UART1_SERIAL_CONSOLE is not set @@ -435,6 +483,7 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_DMA is not set # # UART1 Configuration @@ -447,6 +496,7 @@ 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=y # @@ -461,7 +511,7 @@ 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 # # USB Device Class Driver Options @@ -492,8 +542,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 @@ -523,15 +573,18 @@ CONFIG_USBMSC_SCSI_STACKSIZE=2048 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -563,16 +616,11 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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_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 # @@ -591,6 +639,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -636,10 +688,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -654,26 +711,26 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -681,18 +738,19 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD 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 @@ -700,14 +758,26 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_WEBSERVER 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 @@ -720,26 +790,23 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # @@ -757,18 +824,8 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # 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_FSUTILS_INIFILE is not set -# CONFIG_SYSTEM_RAMTEST is not set -# CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_POWEROFF is not set -# CONFIG_SYSTEM_SUDOKU is not set -# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_CDCACM is not set +# CONFIG_SYSTEM_CLE is not set CONFIG_SYSTEM_COMPOSITE=y CONFIG_SYSTEM_COMPOSITE_NLUNS=1 CONFIG_SYSTEM_COMPOSITE_DEVMINOR1=0 @@ -786,6 +843,17 @@ CONFIG_SYSTEM_COMPOSITE_BUFSIZE=256 # CONFIG_SYSTEM_COMPOSITE_TRACECONTROLLER is not set # CONFIG_SYSTEM_COMPOSITE_TRACEINTERRUPTS is not set # CONFIG_SYSTEM_COMPOSITE_DEBUGMM is not set -# CONFIG_SYSTEM_USBMSC is not set +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set # CONFIG_SYSTEM_USBMONITOR is not set +# CONFIG_SYSTEM_USBMSC is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/mcu123-lpc214x/nsh/Make.defs b/configs/mcu123-lpc214x/nsh/Make.defs index 35984af465b8035330edbe62b23a3b447d3330c5..e7f4792f8a064dbb3b1adca0e8000a256250ec48 100644 --- a/configs/mcu123-lpc214x/nsh/Make.defs +++ b/configs/mcu123-lpc214x/nsh/Make.defs @@ -71,7 +71,7 @@ ifneq ($(HOSTOS),Cygwin) endif endif -ifeq ("${CONFIG_DEBUG}","y") +ifeq ("${CONFIG_DEBUG_FEATURES}","y") ARCHOPTIMIZATION = -g endif @@ -115,7 +115,7 @@ EXEEXT = ifneq ($(CROSSDEV),arm-nuttx-elf-) LDFLAGS += -nostartfiles -nodefaultlibs endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) LDFLAGS += -g endif diff --git a/configs/mcu123-lpc214x/nsh/defconfig b/configs/mcu123-lpc214x/nsh/defconfig index 4d7bbb44e84dac930c0943155cc418de59ed91a6..9b7c8536eae403ce427d6c3109abd0e49bd1802c 100644 --- a/configs/mcu123-lpc214x/nsh/defconfig +++ b/configs/mcu123-lpc214x/nsh/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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 @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_LPC214X=y # 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=y # CONFIG_ARCH_ARM926EJS is not set # CONFIG_ARCH_ARM920T is not set @@ -102,10 +109,21 @@ CONFIG_ARCH_ARM7TDMI=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="arm" CONFIG_ARCH_CHIP="lpc214x" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y # CONFIG_ARCH_LOWVECTORS is not set @@ -159,11 +177,14 @@ CONFIG_LPC214X_UART1=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set # CONFIG_ARCH_IDLE_CUSTOM is not set @@ -220,6 +241,7 @@ CONFIG_NSH_MMCSDSPIPORTNO=1 # 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 @@ -259,6 +281,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="nsh_main" CONFIG_RR_INTERVAL=0 +# CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=0 CONFIG_MAX_TASKS=16 # CONFIG_SCHED_HAVE_PARENT is not set @@ -309,9 +332,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -342,14 +366,20 @@ CONFIG_DEV_NULL=y # 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=y +# CONFIG_SPI_SLAVE is not set # CONFIG_SPI_EXCHANGE is not set # CONFIG_SPI_CMDDATA is not set CONFIG_SPI_CALLBACK=y # CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_HWFEATURES is not set +# CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -363,7 +393,21 @@ CONFIG_SPI_CALLBACK=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -375,6 +419,7 @@ CONFIG_MMCSD_SPICLOCK=20000000 CONFIG_MMCSD_SPIMODE=0 # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set # CONFIG_MTD is not set # CONFIG_EEPROM is not set # CONFIG_PIPES is not set @@ -384,6 +429,8 @@ CONFIG_MMCSD_SPIMODE=0 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -407,14 +454,11 @@ CONFIG_UART1_SERIALDRIVER=y # 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 is not set CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_UART1_SERIAL_CONSOLE is not set @@ -432,6 +476,7 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_DMA is not set # # UART1 Configuration @@ -444,19 +489,23 @@ 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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -490,19 +539,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 is not set +# CONFIG_FS_TMPFS is not set # CONFIG_FS_SMARTFS 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 # @@ -521,6 +567,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -566,10 +616,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -584,26 +639,26 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -611,18 +666,19 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 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_NXTERM 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_PPPD 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 @@ -630,14 +686,26 @@ CONFIG_EXAMPLES_NSH=y # 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_WEBSERVER 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 @@ -650,30 +718,28 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -692,6 +758,7 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -700,6 +767,7 @@ 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 @@ -708,8 +776,10 @@ CONFIG_NSH_DISABLE_DATE=y # 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 @@ -728,8 +798,10 @@ CONFIG_NSH_DISABLE_DATE=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 # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set @@ -756,6 +828,8 @@ CONFIG_NSH_FILEIOSIZE=512 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 @@ -769,16 +843,19 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y -# CONFIG_SYSTEM_POWEROFF is not set +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/mcu123-lpc214x/src/lpc2148_spi1.c b/configs/mcu123-lpc214x/src/lpc2148_spi1.c index 4990a6418515c1a2a0dcc7576fd21cfc48e14731..72f4b12ccba4a03b5e30bc4f111ce362c8821abf 100644 --- a/configs/mcu123-lpc214x/src/lpc2148_spi1.c +++ b/configs/mcu123-lpc214x/src/lpc2148_spi1.c @@ -86,20 +86,6 @@ * Pre-processor Definitions ****************************************************************************/ -/* Enables debug output from this file */ - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - /* Clocking */ #define LPC214X_CCLKFREQ (LPC214X_FOSC*LPC214X_PLL_M) @@ -232,14 +218,14 @@ static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel { /* Enable slave select (low enables) */ - spidbg("CS asserted\n"); + spiinfo("CS asserted\n"); putreg32(bit, CS_CLR_REGISTER); } else { /* Disable slave select (low enables) */ - spidbg("CS de-asserted\n"); + spiinfo("CS de-asserted\n"); putreg32(bit, CS_SET_REGISTER); /* Wait for the TX FIFO not full indication */ @@ -296,7 +282,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) divisor = (divisor + 1) & ~1; putreg8(divisor, LPC214X_SPI1_CPSR); - spidbg("Frequency %d->%d\n", frequency, LPC214X_PCLKFREQ / divisor); + spiinfo("Frequency %d->%d\n", frequency, LPC214X_PCLKFREQ / divisor); return LPC214X_PCLKFREQ / divisor; } @@ -321,7 +307,7 @@ static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) * board. */ - spidbg("Return SPI_STATUS_PRESENT\n"); + spiinfo("Return SPI_STATUS_PRESENT\n"); return SPI_STATUS_PRESENT; } @@ -392,7 +378,7 @@ static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd) /* Get the value from the RX FIFO and return it */ regval = getreg16(LPC214X_SPI1_DR); - spidbg("%04x->%04x\n", wd, regval); + spiinfo("%04x->%04x\n", wd, regval); return regval; } @@ -422,7 +408,7 @@ static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size /* Loop while thre are bytes remaining to be sent */ - spidbg("nwords: %d\n", nwords); + spiinfo("nwords: %d\n", nwords); while (nwords > 0) { /* While the TX FIFO is not full and there are bytes left to send */ @@ -439,7 +425,7 @@ static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size /* Then discard all card responses until the RX & TX FIFOs are emptied. */ - spidbg("discarding\n"); + spiinfo("discarding\n"); do { /* Is there anything in the RX fifo? */ @@ -493,7 +479,7 @@ static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nw /* While there is remaining to be sent (and no synchronization error has occurred) */ - spidbg("nwords: %d\n", nwords); + spiinfo("nwords: %d\n", nwords); while (nwords || rxpending) { /* Fill the transmit FIFO with 0xff... @@ -502,7 +488,7 @@ static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nw * and (3) there are more bytes to be sent. */ - spivdbg("TX: rxpending: %d nwords: %d\n", rxpending, nwords); + spiinfo("TX: rxpending: %d nwords: %d\n", rxpending, nwords); while ((getreg8(LPC214X_SPI1_SR) & LPC214X_SPI1SR_TNF) && (rxpending < LPC214X_SPI1_FIFOSZ) && nwords) { @@ -513,7 +499,7 @@ static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nw /* Now, read the RX data from the RX FIFO while the RX FIFO is not empty */ - spivdbg("RX: rxpending: %d\n", rxpending); + spiinfo("RX: rxpending: %d\n", rxpending); while (getreg8(LPC214X_SPI1_SR) & LPC214X_SPI1SR_RNE) { *ptr++ = (uint8_t)getreg16(LPC214X_SPI1_DR); @@ -548,7 +534,7 @@ FAR struct spi_dev_s *lpc214x_spibus_initialize(int port) /* Only the SPI1 interface is supported */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (port != 1) { return NULL; diff --git a/configs/mcu123-lpc214x/usbmsc/Make.defs b/configs/mcu123-lpc214x/usbmsc/Make.defs index 09495f17e274a3244afdc91e1fc4ce8e7a66ed29..cbdb32871ac7a99173615cfd3e6e40e36fe51126 100644 --- a/configs/mcu123-lpc214x/usbmsc/Make.defs +++ b/configs/mcu123-lpc214x/usbmsc/Make.defs @@ -71,7 +71,7 @@ ifneq ($(HOSTOS),Cygwin) endif endif -ifeq ("${CONFIG_DEBUG}","y") +ifeq ("${CONFIG_DEBUG_FEATURES}","y") ARCHOPTIMIZATION = -g endif @@ -115,7 +115,7 @@ EXEEXT = ifneq ($(CROSSDEV),arm-nuttx-elf-) LDFLAGS += -nostartfiles -nodefaultlibs endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) LDFLAGS += -g endif diff --git a/configs/mcu123-lpc214x/usbmsc/defconfig b/configs/mcu123-lpc214x/usbmsc/defconfig index 5d58f0bba799d40ec2950738bf5868ccc3dd650e..250bab2762c413574f7c4ef20877ca83d9a08691 100644 --- a/configs/mcu123-lpc214x/usbmsc/defconfig +++ b/configs/mcu123-lpc214x/usbmsc/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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 @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_LPC214X=y # 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=y # CONFIG_ARCH_ARM926EJS is not set # CONFIG_ARCH_ARM920T is not set @@ -102,10 +109,21 @@ CONFIG_ARCH_ARM7TDMI=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="arm" CONFIG_ARCH_CHIP="lpc214x" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y # CONFIG_ARCH_LOWVECTORS is not set @@ -167,11 +185,14 @@ CONFIG_LPC214X_USBDEV=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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_STACKDUMP=y # CONFIG_ARCH_USBDUMP is not set # CONFIG_ENDIAN_BIG is not set @@ -226,7 +247,13 @@ CONFIG_ARCH_LEDS=y # Board-Specific Options # CONFIG_LIB_BOARDCTL=y +# 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 @@ -261,6 +288,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="msconn_main" CONFIG_RR_INTERVAL=0 +# CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=0 CONFIG_MAX_TASKS=16 # CONFIG_SCHED_HAVE_PARENT is not set @@ -311,9 +339,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -344,14 +373,20 @@ CONFIG_DEV_NULL=y # 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=y +# CONFIG_SPI_SLAVE is not set # CONFIG_SPI_EXCHANGE is not set # 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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -365,7 +400,21 @@ CONFIG_SPI=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -377,6 +426,7 @@ CONFIG_MMCSD_SPICLOCK=20000000 CONFIG_MMCSD_SPIMODE=0 # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set # CONFIG_MTD is not set # CONFIG_EEPROM is not set # CONFIG_PIPES is not set @@ -386,6 +436,8 @@ CONFIG_MMCSD_SPIMODE=0 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -409,14 +461,11 @@ CONFIG_UART1_SERIALDRIVER=y # 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 is not set CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_UART1_SERIAL_CONSOLE is not set @@ -434,6 +483,7 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_DMA is not set # # UART1 Configuration @@ -446,6 +496,7 @@ 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=y # @@ -460,7 +511,7 @@ 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 # # USB Device Class Driver Options @@ -487,15 +538,18 @@ CONFIG_USBMSC_SCSI_STACKSIZE=2048 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -527,16 +581,11 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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_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 # @@ -555,6 +604,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -600,10 +653,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -618,26 +676,26 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -645,18 +703,19 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD 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 @@ -664,14 +723,26 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_WEBSERVER 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 @@ -684,26 +755,23 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # @@ -721,17 +789,18 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_POWEROFF is not set # CONFIG_SYSTEM_SUDOKU is not set -# CONFIG_SYSTEM_VI is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_USBMONITOR is not set CONFIG_SYSTEM_USBMSC=y CONFIG_SYSTEM_USBMSC_NLUNS=1 CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 @@ -742,5 +811,5 @@ CONFIG_SYSTEM_USBMSC_DEVMINOR3=2 CONFIG_SYSTEM_USBMSC_DEVPATH3="/dev/mmcsd2" # CONFIG_SYSTEM_USBMSC_DEBUGMM is not set # CONFIG_SYSTEM_USBMSC_TRACE is not set -# CONFIG_SYSTEM_USBMONITOR is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/mcu123-lpc214x/usbserial/Make.defs b/configs/mcu123-lpc214x/usbserial/Make.defs index 54c6f3ffe48e7dcef539d685c98103a0047a335b..5e6d6aa799a6c993bfa8e394544e298e12dd3518 100644 --- a/configs/mcu123-lpc214x/usbserial/Make.defs +++ b/configs/mcu123-lpc214x/usbserial/Make.defs @@ -71,7 +71,7 @@ ifneq ($(HOSTOS),Cygwin) endif endif -ifeq ("${CONFIG_DEBUG}","y") +ifeq ("${CONFIG_DEBUG_FEATURES}","y") ARCHOPTIMIZATION = -g endif @@ -115,7 +115,7 @@ EXEEXT = ifneq ($(CROSSDEV),arm-nuttx-elf-) LDFLAGS += -nostartfiles -nodefaultlibs endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) LDFLAGS += -g endif diff --git a/configs/mcu123-lpc214x/usbserial/defconfig b/configs/mcu123-lpc214x/usbserial/defconfig index e13970db02d837568c6e21f85c268954decd7a78..f682875dd6a8d0bf196d8291c02e11308daac120 100644 --- a/configs/mcu123-lpc214x/usbserial/defconfig +++ b/configs/mcu123-lpc214x/usbserial/defconfig @@ -42,10 +42,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -117,6 +118,8 @@ CONFIG_ARCH_ARM7TDMI=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="arm" CONFIG_ARCH_CHIP="lpc214x" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_HAVE_TRUSTZONE is not set @@ -388,7 +391,12 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -396,6 +404,7 @@ CONFIG_DEV_NULL=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -408,6 +417,7 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -431,10 +441,6 @@ CONFIG_UART1_SERIALDRIVER=y # 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 @@ -509,15 +515,18 @@ CONFIG_PL2303_PRODUCTSTR="USBdev Serial" # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -548,12 +557,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -626,6 +629,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -654,10 +658,10 @@ CONFIG_ARCH_HAVE_TLS=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -666,18 +670,18 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -691,11 +695,11 @@ CONFIG_ARCH_HAVE_TLS=y # 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=y CONFIG_EXAMPLES_USBSERIAL_BUFSIZE=512 # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -717,8 +721,8 @@ CONFIG_EXAMPLES_USBSERIAL_BUFSIZE=512 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -729,6 +733,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 @@ -750,16 +755,16 @@ CONFIG_EXAMPLES_USBSERIAL_BUFSIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/micropendous3/hello/defconfig b/configs/micropendous3/hello/defconfig index a1a6f7ceecac66e1cca566f0f921ab151cad9f92..a1de9375e28f5f45cd3929eb96c4fef76d0d56ae 100644 --- a/configs/micropendous3/hello/defconfig +++ b/configs/micropendous3/hello/defconfig @@ -42,7 +42,7 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set @@ -306,7 +306,6 @@ CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/mikroe-stm32f4/README.txt b/configs/mikroe-stm32f4/README.txt index e71797ffb128c6b4299d4ab482c196327ea48848..ace80f20fbda9d9b5304157b46c3ee1c08df5fc3 100644 --- a/configs/mikroe-stm32f4/README.txt +++ b/configs/mikroe-stm32f4/README.txt @@ -660,7 +660,7 @@ Mikroe-STM32F4-specific Configuration Options 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 + CONFIG_STM32_CAN_REGDEBUG - If CONFIG_DEBUG_FEATURES is set, this will generate an dump of all CAN registers. Mikroe-STM32F4 SPI Configuration @@ -703,9 +703,9 @@ Mikroe-STM32F4-specific Configuration Options CONFIG_STM32_OTGFS_SOFINTR - Enable SOF interrupts. Why would you ever want to do that? CONFIG_STM32_USBHOST_REGDEBUG - Enable very low-level register access - debug. Depends on CONFIG_DEBUG. + debug. Depends on CONFIG_DEBUG_FEATURES. CONFIG_STM32_USBHOST_PKTDUMP - Dump all incoming and outgoing USB - packets. Depends on CONFIG_DEBUG. + packets. Depends on CONFIG_DEBUG_FEATURES. Configurations ============== @@ -908,7 +908,6 @@ Where is one of the following: 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 diff --git a/configs/mikroe-stm32f4/fulldemo/defconfig b/configs/mikroe-stm32f4/fulldemo/defconfig index 65b3ac8069f9baca838384eec967e839a7e09532..828f56c1aafdae7711e99e315c75cb162b4f6cb4 100644 --- a/configs/mikroe-stm32f4/fulldemo/defconfig +++ b/configs/mikroe-stm32f4/fulldemo/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y CONFIG_DEBUG_NOOPT=y @@ -200,6 +202,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -430,6 +433,10 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y # CONFIG_STM32_CCMEXCLUDE is not set CONFIG_STM32_DMACAPABLE=y + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_PWM is not set # CONFIG_STM32_TIM1_ADC is not set # CONFIG_STM32_TIM1_CAP is not set @@ -454,10 +461,18 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device 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 + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -720,6 +735,8 @@ CONFIG_SPI_CALLBACK=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -753,10 +770,14 @@ CONFIG_INPUT=y # CONFIG_DJOYSTICK is not set # CONFIG_AJOYSTICK is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set # CONFIG_LCD_NOGETRUN is not set @@ -785,17 +806,14 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set - -# -# Alphanumeric/Segment LCD Devices -# -# CONFIG_LCD_LCD1602 is not set +# CONFIG_SLCD is not set # # LED Support # # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -834,6 +852,7 @@ CONFIG_RAMMTD_ERASESTATE=0xff # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set CONFIG_MTD_M25P=y CONFIG_M25P_SPIMODE=0 CONFIG_M25P_SPIFREQUENCY=20000000 @@ -865,6 +884,7 @@ CONFIG_MTD_SMART_WEAR_LEVEL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y +# CONFIG_SERIAL_CONSOLE is not set # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -954,14 +974,19 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +CONFIG_SYSLOG_CHAR=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set +CONFIG_SYSLOG_CHAR_CRLF=y +CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" # # Networking Support @@ -1009,14 +1034,6 @@ CONFIG_FS_BINFS=y # CONFIG_FS_PROCFS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -CONFIG_SYSLOG=y -# CONFIG_SYSLOG_TIMESTAMP is not set -CONFIG_SYSLOG_CHAR=y -CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" - # # Graphics Support # @@ -1236,6 +1253,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1274,15 +1292,16 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FLASH_TEST is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -1311,17 +1330,17 @@ CONFIG_EXAMPLES_NX_CLIENTPRIO=100 CONFIG_EXAMPLES_NX_SERVERPRIO=120 CONFIG_EXAMPLES_NX_LISTENERPRIO=80 CONFIG_EXAMPLES_NX_NOTIFYSIGNO=4 -# 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RANDOM is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set @@ -1331,9 +1350,8 @@ CONFIG_EXAMPLES_NX_NOTIFYSIGNO=4 # CONFIG_EXAMPLES_SERIALRX is not set # CONFIG_EXAMPLES_SERLOOP is not set # CONFIG_EXAMPLES_SLCD is not set -# CONFIG_EXAMPLES_FLASH_TEST is not set -# CONFIG_EXAMPLES_SMART_TEST is not set # CONFIG_EXAMPLES_SMART is not set +# CONFIG_EXAMPLES_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1344,15 +1362,16 @@ CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0 CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0" # CONFIG_EXAMPLES_TOUCHSCREEN_MOUSE is not set CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y -# 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities # +CONFIG_FSUTILS_FLASH_ERASEALL=y # CONFIG_FSUTILS_INIFILE is not set CONFIG_FSUTILS_MKSMARTFS=y # CONFIG_FSUTILS_PASSWD is not set @@ -1373,8 +1392,8 @@ CONFIG_FSUTILS_MKSMARTFS=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1711,20 +1730,18 @@ CONFIG_NXWM_MEDIAPLAYER_MINVOLUMEHEIGHT=6 # Platform-specific Support # CONFIG_PLATFORM_CONFIGDATA=y -CONFIG_MIKROE_STM32F4_CONFIGDATA_PART=y -# CONFIG_MIKROE_STM32F4_CONFIGDATA_FS is not set -# CONFIG_MIKROE_STM32F4_CONFIGDATA_ROM is not set # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CDCACM is not set # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set CONFIG_SYSTEM_FLASH_ERASEALL=y +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set CONFIG_SYSTEM_NXPLAYER=y CONFIG_NXPLAYER_PLAYTHREAD_STACKSIZE=1500 CONFIG_NXPLAYER_COMMAND_LINE=y @@ -1744,7 +1761,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/mikroe-stm32f4/include/board.h b/configs/mikroe-stm32f4/include/board.h index 796b6a62b40dd8711b83b62f9b8f0546845fd0a8..a985f31e5048cef124e7c3220c58d49c03d50fa7 100644 --- a/configs/mikroe-stm32f4/include/board.h +++ b/configs/mikroe-stm32f4/include/board.h @@ -2,7 +2,7 @@ * configs/mikroe-stm32f4/include/board.h * include/arch/board/board.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 @@ -154,8 +154,14 @@ * Note: TIM1,8 are on APB2, others on APB1 */ -#define STM32_TIM18_FREQUENCY STM32_HCLK_FREQUENCY -#define STM32_TIM27_FREQUENCY (STM32_HCLK_FREQUENCY/2) +#define BOARD_TIM1_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM2_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM3_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM4_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM5_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM6_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM7_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM8_FREQUENCY STM32_HCLK_FREQUENCY /* LED definitions ******************************************************************/ /* If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs in any diff --git a/configs/mikroe-stm32f4/kostest/defconfig b/configs/mikroe-stm32f4/kostest/defconfig index 53c51bc66f8734309ac505f16295dcd29b07d1fd..a190dc6c565c5e7721acb6ff5a90c8645c9e48e6 100644 --- a/configs/mikroe-stm32f4/kostest/defconfig +++ b/configs/mikroe-stm32f4/kostest/defconfig @@ -47,10 +47,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y CONFIG_DEBUG_NOOPT=y @@ -206,6 +208,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -435,6 +438,10 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # CONFIG_STM32_FORCEPOWER is not set CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_PWM is not set # CONFIG_STM32_TIM1_ADC is not set # CONFIG_STM32_TIM1_CAP is not set @@ -459,9 +466,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -723,6 +738,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -742,13 +759,19 @@ CONFIG_RTC_NALARMS=1 # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support # # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -785,6 +808,7 @@ CONFIG_RAMMTD_ERASESTATE=0xff # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set CONFIG_MTD_M25P=y CONFIG_M25P_SPIMODE=0 CONFIG_M25P_SPIFREQUENCY=20000000 @@ -816,6 +840,7 @@ CONFIG_MTD_SMART_WEAR_LEVEL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y +# CONFIG_SERIAL_CONSOLE is not set # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -905,14 +930,19 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +CONFIG_SYSLOG_CHAR=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set +CONFIG_SYSLOG_CHAR_CRLF=y +CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" # # Networking Support @@ -959,14 +989,6 @@ CONFIG_SMARTFS_MAXNAMLEN=16 # CONFIG_FS_PROCFS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -CONFIG_SYSLOG=y -# CONFIG_SYSLOG_TIMESTAMP is not set -CONFIG_SYSLOG_CHAR=y -CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" - # # Graphics Support # @@ -1044,6 +1066,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_USRWORK is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1083,9 +1106,9 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_FTPD is not set # CONFIG_EXAMPLES_HELLO is not set # CONFIG_EXAMPLES_HELLOXX is not set +# CONFIG_EXAMPLES_IGMP is not set # CONFIG_EXAMPLES_JSON 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 @@ -1095,11 +1118,11 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_NSH_CXXINITIALIZE is not set # 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_NXTERM is not set # CONFIG_EXAMPLES_NXTEXT is not set CONFIG_EXAMPLES_OSTEST=y CONFIG_EXAMPLES_OSTEST_LOOPS=1 @@ -1111,8 +1134,8 @@ CONFIG_EXAMPLES_OSTEST_WAITRESULT=y # 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_PPPD is not set # CONFIG_EXAMPLES_RANDOM is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set @@ -1127,14 +1150,15 @@ CONFIG_EXAMPLES_OSTEST_WAITRESULT=y # 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set CONFIG_FSUTILS_MKSMARTFS=y # CONFIG_FSUTILS_PASSWD is not set @@ -1155,8 +1179,8 @@ CONFIG_FSUTILS_MKSMARTFS=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1284,12 +1308,13 @@ CONFIG_NSH_ARCHINIT=y # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CDCACM is not set # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1297,7 +1322,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/mikroe-stm32f4/nsh/defconfig b/configs/mikroe-stm32f4/nsh/defconfig index ed18e9a0b9c94ef0a6709939c08f95b075e73f3d..75d7044beae993c871b7c09216558c6e05fa408d 100644 --- a/configs/mikroe-stm32f4/nsh/defconfig +++ b/configs/mikroe-stm32f4/nsh/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -200,6 +202,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -428,6 +431,10 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # CONFIG_STM32_FORCEPOWER is not set CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -446,9 +453,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -695,6 +710,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -709,13 +726,19 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support # # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -752,6 +775,7 @@ CONFIG_RAMMTD_ERASESTATE=0xff # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set CONFIG_MTD_M25P=y CONFIG_M25P_SPIMODE=0 CONFIG_M25P_SPIFREQUENCY=20000000 @@ -782,6 +806,8 @@ CONFIG_MTD_SMART_WEAR_LEVEL=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -831,14 +857,19 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +CONFIG_SYSLOG_CHAR=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set +CONFIG_SYSLOG_CHAR_CRLF=y +CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" # # Networking Support @@ -886,14 +917,6 @@ CONFIG_SMARTFS_MAXNAMLEN=16 # CONFIG_FS_PROCFS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -CONFIG_SYSLOG=y -# CONFIG_SYSLOG_TIMESTAMP is not set -CONFIG_SYSLOG_CHAR=y -CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" - # # Graphics Support # @@ -970,6 +993,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1008,15 +1032,16 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FLASH_TEST is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1027,17 +1052,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RANDOM is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set @@ -1047,24 +1072,24 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_SERIALRX is not set # CONFIG_EXAMPLES_SERLOOP is not set # CONFIG_EXAMPLES_SLCD is not set -# CONFIG_EXAMPLES_FLASH_TEST is not set -# CONFIG_EXAMPLES_SMART_TEST is not set # CONFIG_EXAMPLES_SMART is not set +# CONFIG_EXAMPLES_SMART_TEST 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 # CONFIG_EXAMPLES_TIFF is not set # 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities # +CONFIG_FSUTILS_FLASH_ERASEALL=y # CONFIG_FSUTILS_INIFILE is not set CONFIG_FSUTILS_MKSMARTFS=y # CONFIG_FSUTILS_PASSWD is not set @@ -1085,8 +1110,8 @@ CONFIG_FSUTILS_MKSMARTFS=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1214,13 +1239,13 @@ CONFIG_NSH_ARCHINIT=y # # 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_FLASH_ERASEALL=y +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1228,6 +1253,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/mikroe-stm32f4/nx/defconfig b/configs/mikroe-stm32f4/nx/defconfig index e0bd19efdd3e58326312056d5a6f4da384be4352..461a9672d03db17d0c1276659576f400c2356162 100644 --- a/configs/mikroe-stm32f4/nx/defconfig +++ b/configs/mikroe-stm32f4/nx/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -426,6 +429,10 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # CONFIG_STM32_FORCEPOWER is not set CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -679,10 +686,14 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set # CONFIG_LCD_NOGETRUN is not set @@ -710,17 +721,14 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set - -# -# Alphanumeric/Segment LCD Devices -# -# CONFIG_LCD_LCD1602 is not set +# CONFIG_SLCD is not set # # LED Support # # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -735,14 +743,19 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +CONFIG_SYSLOG_CHAR=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set +CONFIG_SYSLOG_CHAR_CRLF=y +CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" # # Networking Support @@ -780,14 +793,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_PROCFS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -CONFIG_SYSLOG=y -# CONFIG_SYSLOG_TIMESTAMP is not set -CONFIG_SYSLOG_CHAR=y -CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" - # # Graphics Support # @@ -950,6 +955,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -992,10 +998,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -1013,17 +1019,17 @@ CONFIG_EXAMPLES_NX_BPP=16 # 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 is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1031,17 +1037,17 @@ CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -1063,8 +1069,8 @@ CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1190,12 +1196,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1203,6 +1209,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/mikroe-stm32f4/nxlines/defconfig b/configs/mikroe-stm32f4/nxlines/defconfig index 61f68f82d86e3f4824e9ad9d0d5cb162a0390236..e290831de838658e2d34d11ae9d3f67aa3536a7f 100644 --- a/configs/mikroe-stm32f4/nxlines/defconfig +++ b/configs/mikroe-stm32f4/nxlines/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -426,6 +429,10 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # CONFIG_STM32_FORCEPOWER is not set CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -679,10 +686,14 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set CONFIG_LCD_NOGETRUN=y @@ -710,17 +721,14 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set - -# -# Alphanumeric/Segment LCD Devices -# -# CONFIG_LCD_LCD1602 is not set +# CONFIG_SLCD is not set # # LED Support # # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -735,14 +743,19 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +CONFIG_SYSLOG_CHAR=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set +CONFIG_SYSLOG_CHAR_CRLF=y +CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" # # Networking Support @@ -780,14 +793,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_PROCFS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -CONFIG_SYSLOG=y -# CONFIG_SYSLOG_TIMESTAMP is not set -CONFIG_SYSLOG_CHAR=y -CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" - # # Graphics Support # @@ -949,6 +954,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -991,10 +997,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -1004,7 +1010,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_NSH is not set # 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 @@ -1020,12 +1025,13 @@ CONFIG_EXAMPLES_NXLINES_BORDERCOLOR=0xFFE0 CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR=0x87F0 CONFIG_EXAMPLES_NXLINES_BPP=16 # CONFIG_EXAMPLES_NXLINES_EXTERNINIT is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1033,17 +1039,17 @@ CONFIG_EXAMPLES_NXLINES_BPP=16 # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -1065,8 +1071,8 @@ CONFIG_EXAMPLES_NXLINES_BPP=16 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1191,12 +1197,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1204,6 +1210,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/mikroe-stm32f4/nxtext/defconfig b/configs/mikroe-stm32f4/nxtext/defconfig index 06e3ab7ab25e85044561185dac8f87ad82381075..d2cd5abd8b78b9a54e712c4c62e6d3d364fd6a21 100644 --- a/configs/mikroe-stm32f4/nxtext/defconfig +++ b/configs/mikroe-stm32f4/nxtext/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y CONFIG_DEBUG_NOOPT=y @@ -199,6 +201,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -426,6 +429,10 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # CONFIG_STM32_FORCEPOWER is not set CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -679,10 +686,14 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set # CONFIG_LCD_NOGETRUN is not set @@ -710,17 +721,14 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set - -# -# Alphanumeric/Segment LCD Devices -# -# CONFIG_LCD_LCD1602 is not set +# CONFIG_SLCD is not set # # LED Support # # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -735,14 +743,19 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +CONFIG_SYSLOG_CHAR=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set +CONFIG_SYSLOG_CHAR_CRLF=y +CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" # # Networking Support @@ -780,14 +793,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_PROCFS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -CONFIG_SYSLOG=y -# CONFIG_SYSLOG_TIMESTAMP is not set -CONFIG_SYSLOG_CHAR=y -CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" - # # Graphics Support # @@ -949,6 +954,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -991,10 +997,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -1004,11 +1010,11 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM is not set CONFIG_EXAMPLES_NXTEXT=y # @@ -1033,8 +1039,8 @@ CONFIG_EXAMPLES_NXTEXT_DEFAULT_FONT=y # 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1042,17 +1048,17 @@ CONFIG_EXAMPLES_NXTEXT_DEFAULT_FONT=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -1074,8 +1080,8 @@ CONFIG_EXAMPLES_NXTEXT_DEFAULT_FONT=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1200,12 +1206,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1213,6 +1219,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/mikroe-stm32f4/src/stm32_idle.c b/configs/mikroe-stm32f4/src/stm32_idle.c index 12c855b49790630cfe29c824420e28b805dfac22..140de1b15f0f46a27a2c415536b191c15c9aa97c 100644 --- a/configs/mikroe-stm32f4/src/stm32_idle.c +++ b/configs/mikroe-stm32f4/src/stm32_idle.c @@ -125,7 +125,7 @@ static void up_idlepm(void) if (newstate != oldstate) { - lldbg("newstate= %d oldstate=%d\n", newstate, oldstate); + _info("newstate= %d oldstate=%d\n", newstate, oldstate); flags = enter_critical_section(); diff --git a/configs/mikroe-stm32f4/src/stm32_mio283qt2.c b/configs/mikroe-stm32f4/src/stm32_mio283qt2.c index 028330762367a59a0990844c01ed6b2313da561b..46ee2a54d691066f5e9fca8706e9df7af9b0af29 100644 --- a/configs/mikroe-stm32f4/src/stm32_mio283qt2.c +++ b/configs/mikroe-stm32f4/src/stm32_mio283qt2.c @@ -67,21 +67,6 @@ /************************************************************************************** * Pre-processor Definitions **************************************************************************************/ -/* Configuration **********************************************************************/ - -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must - * also be enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif /* Mikroe-STM32F4 Hardware Definitions ************************************************/ /* --- ---------------------------------- -------------------- ------------------------ @@ -117,16 +102,6 @@ * 96 PB9 DRIVEB TFT display */ -/* Debug ******************************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /************************************************************************************** * Private Type Definition **************************************************************************************/ @@ -502,7 +477,7 @@ int board_lcd_initialize(void) if (!g_stm32f4_lcd.drvr) { - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); /* Hold the LCD in reset (active low) */ @@ -519,7 +494,7 @@ int board_lcd_initialize(void) g_stm32f4_lcd.drvr = mio283qt2_lcdinitialize(&g_stm32f4_lcd.dev); if (!g_stm32f4_lcd.drvr) { - lcddbg("ERROR: mio283qt2_lcdinitialize failed\n"); + lcderr("ERROR: mio283qt2_lcdinitialize failed\n"); return -ENODEV; } } diff --git a/configs/mikroe-stm32f4/src/stm32_mio283qt9a.c b/configs/mikroe-stm32f4/src/stm32_mio283qt9a.c index e474514c3a10ff1b93d5f00c6e3dc7de72a23a63..9ea31f5571688caedc96a35c9b057e826136bcf2 100644 --- a/configs/mikroe-stm32f4/src/stm32_mio283qt9a.c +++ b/configs/mikroe-stm32f4/src/stm32_mio283qt9a.c @@ -68,21 +68,6 @@ /************************************************************************************** * Pre-processor Definitions **************************************************************************************/ -/* Configuration **********************************************************************/ - -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must - * also be enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif /* Mikroe-STM32F4 Hardware Definitions ************************************************/ /* --- ---------------------------------- -------------------- ------------------------ @@ -118,16 +103,6 @@ * 96 PB9 DRIVEB TFT display */ -/* Debug ******************************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /************************************************************************************** * Private Type Definition **************************************************************************************/ @@ -503,7 +478,7 @@ int board_lcd_initialize(void) if (!g_stm32f4_lcd.drvr) { - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); /* Hold the LCD in reset (active low) */ @@ -520,7 +495,7 @@ int board_lcd_initialize(void) g_stm32f4_lcd.drvr = mio283qt9a_lcdinitialize(&g_stm32f4_lcd.dev); if (!g_stm32f4_lcd.drvr) { - lcddbg("ERROR: mio283qt9a_lcdinitialize failed\n"); + lcderr("ERROR: mio283qt9a_lcdinitialize failed\n"); return -ENODEV; } } diff --git a/configs/mikroe-stm32f4/src/stm32_pwm.c b/configs/mikroe-stm32f4/src/stm32_pwm.c index 11f0ea7c25399a30cf0937764327f39d30187408..0710d42f8b2685fb338e7842c148a4af90080b62 100644 --- a/configs/mikroe-stm32f4/src/stm32_pwm.c +++ b/configs/mikroe-stm32f4/src/stm32_pwm.c @@ -119,7 +119,7 @@ int board_pwm_setup(void) pwm = stm32_pwminitialize(STM32F4DISCOVERY_PWMTIMER); if (!pwm) { - dbg("Failed to get the STM32 PWM lower half\n"); + _err("ERROR: Failed to get the STM32 PWM lower half\n"); return -ENODEV; } @@ -128,7 +128,7 @@ int board_pwm_setup(void) ret = pwm_register("/dev/pwm0", pwm); if (ret < 0) { - adbg("pwm_register failed: %d\n", ret); + aerr("ERROR: pwm_register failed: %d\n", ret); return ret; } diff --git a/configs/mikroe-stm32f4/src/stm32_qencoder.c b/configs/mikroe-stm32f4/src/stm32_qencoder.c index bcbb5dc438c9b1d61e85a9c91eef3fe26c4c9114..33855fbaf5ca7c45aba3014b611410eb1eeccaac 100644 --- a/configs/mikroe-stm32f4/src/stm32_qencoder.c +++ b/configs/mikroe-stm32f4/src/stm32_qencoder.c @@ -145,11 +145,11 @@ int qe_devinit(void) { /* Initialize a quadrature encoder interface. */ - snvdbg("Initializing the quadrature encoder using TIM%d\n", TIMID); + sninfo("Initializing the quadrature encoder using TIM%d\n", TIMID); ret = stm32_qeinitialize("/dev/qe0", TIMID); if (ret < 0) { - sndbg("stm32_qeinitialize failed: %d\n", ret); + snerr("ERROR: stm32_qeinitialize failed: %d\n", ret); return ret; } diff --git a/configs/mikroe-stm32f4/src/stm32_spi.c b/configs/mikroe-stm32f4/src/stm32_spi.c index f56a075849164a7653a82eecaf4ce907e42c227b..3831378ece417e50864e635f18f68e7c36a639a4 100644 --- a/configs/mikroe-stm32f4/src/stm32_spi.c +++ b/configs/mikroe-stm32f4/src/stm32_spi.c @@ -59,32 +59,6 @@ #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -150,7 +124,7 @@ void weak_function stm32_spidev_initialize(void) void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spivdbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #if defined(CONFIG_VS1053) if (devid == SPIDEV_AUDIO_DATA) @@ -211,7 +185,7 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI2 void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -223,7 +197,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI1 void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) diff --git a/configs/mikroe-stm32f4/src/stm32_touchscreen.c b/configs/mikroe-stm32f4/src/stm32_touchscreen.c index b9bba5f57a046770acf2419884c5aa400233d592..ea863e8f3d066e600babfe8052e1fbb5224297ee 100644 --- a/configs/mikroe-stm32f4/src/stm32_touchscreen.c +++ b/configs/mikroe-stm32f4/src/stm32_touchscreen.c @@ -530,7 +530,7 @@ static uint16_t tc_adc_read_sample(void) if (count > 0) { - idbg("Count = %d\n", count); + iinfo("Count = %d\n", count); } return retval; @@ -623,7 +623,7 @@ static void tc_notify(FAR struct tc_dev_s *priv) if (fds) { fds->revents |= POLLIN; - ivdbg("Report events: %02x\n", fds->revents); + iinfo("Report events: %02x\n", fds->revents); sem_post(fds->sem); } } @@ -899,7 +899,7 @@ static void tc_worker(FAR void *arg) priv->newy = value / CONFIG_TOUCHSCREEN_AVG_SAMPLES; priv->value = 0; priv->sampcount = 0; - ivdbg("Y=%d\n", priv->newy); + iinfo("Y=%d\n", priv->newy); /* Configure YU and YD with drive voltages and disable XR drive. Note that * this is configuring the DRIVEA and DRIVEB outputs to enable the on-board @@ -978,7 +978,7 @@ static void tc_worker(FAR void *arg) } newx = value / CONFIG_TOUCHSCREEN_AVG_SAMPLES; - ivdbg("X=%d\n", newx); + iinfo("X=%d\n", newx); /* Samples are available */ @@ -1017,7 +1017,7 @@ static void tc_worker(FAR void *arg) /* Notify any waiters that new touchscreen data is available */ - idbg("1:X=%d, Y=%d\n", priv->sample.x, priv->sample.y); + iinfo("1:X=%d, Y=%d\n", priv->sample.x, priv->sample.y); tc_notify(priv); } @@ -1089,7 +1089,7 @@ static void tc_worker(FAR void *arg) /* Notify any waiters that nes touchscreen data is available */ - idbg("2:X=%d, Y=%d\n", priv->sample.x, priv->sample.y); + iinfo("2:X=%d, Y=%d\n", priv->sample.x, priv->sample.y); tc_notify(priv); } @@ -1335,14 +1335,14 @@ errout: static int tc_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { #if 1 - ivdbg("cmd: %d arg: %ld\n", cmd, arg); + iinfo("cmd: %d arg: %ld\n", cmd, arg); return -ENOTTY; /* None yet supported */ #else FAR struct inode *inode; FAR struct tc_dev_s *priv; int ret; - ivdbg("cmd: %d arg: %ld\n", cmd, arg); + iinfo("cmd: %d arg: %ld\n", cmd, arg); DEBUGASSERT(filep); inode = filep->f_inode; @@ -1389,7 +1389,7 @@ static int tc_poll(FAR struct file *filep, FAR struct pollfd *fds, int ret; int i; - ivdbg("setup: %d\n", (int)setup); + iinfo("setup: %d\n", (int)setup); DEBUGASSERT(filep && fds); inode = filep->f_inode; @@ -1413,7 +1413,7 @@ static int tc_poll(FAR struct file *filep, FAR struct pollfd *fds, if ((fds->events & POLLIN) == 0) { - idbg("Missing POLLIN: revents: %08x\n", fds->revents); + ierr("ERROR: Missing POLLIN: revents: %08x\n", fds->revents); ret = -EDEADLK; goto errout; } @@ -1438,7 +1438,7 @@ static int tc_poll(FAR struct file *filep, FAR struct pollfd *fds, if (i >= CONFIG_TOUCHSCREEN_NPOLLWAITERS) { - idbg("No availabled slot found: %d\n", i); + ierr("ERROR: No availabled slot found: %d\n", i); fds->priv = NULL; ret = -EBUSY; goto errout; @@ -1501,7 +1501,7 @@ int board_tsc_setup(int minor) #endif int ret; - ivdbg("minor: %d\n", minor); + iinfo("minor: %d\n", minor); DEBUGASSERT(minor >= 0 && minor < 100); /* If we only have one touchscreen, check if we already did init */ @@ -1533,7 +1533,7 @@ int board_tsc_setup(int minor) priv = (FAR struct tc_dev_s *)kmm_malloc(sizeof(struct tc_dev_s)); if (!priv) { - idbg("kmm_malloc(%d) failed\n", sizeof(struct tc_dev_s)); + ierr("ERROR: kmm_malloc(%d) failed\n", sizeof(struct tc_dev_s)); return -ENOMEM; } #endif @@ -1547,12 +1547,12 @@ int board_tsc_setup(int minor) /* Register the device as an input device */ (void)snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor); - ivdbg("Registering %s\n", devname); + iinfo("Registering %s\n", devname); ret = register_driver(devname, &tc_fops, 0666, priv); if (ret < 0) { - idbg("register_driver() failed: %d\n", ret); + ierr("ERROR: register_driver() failed: %d\n", ret); goto errout_with_priv; } @@ -1564,7 +1564,7 @@ int board_tsc_setup(int minor) ret = work_queue(HPWORK, &priv->work, tc_worker, priv, 0); if (ret != 0) { - idbg("Failed to queue work: %d\n", ret); + ierr("ERROR: Failed to queue work: %d\n", ret); goto errout_with_priv; } diff --git a/configs/mikroe-stm32f4/src/stm32_usb.c b/configs/mikroe-stm32f4/src/stm32_usb.c index 876fb19d9bcd1ee6dfed786de45e94a0b72167fd..001d6e0930ad54c5cd09eb02d721844fadec2c5d 100644 --- a/configs/mikroe-stm32f4/src/stm32_usb.c +++ b/configs/mikroe-stm32f4/src/stm32_usb.c @@ -106,13 +106,13 @@ static int usbhost_waiter(int argc, char *argv[]) { struct usbhost_hubport_s *hport; - uvdbg("Running\n"); + uinfo("Running\n"); for (;;) { /* Wait for the device to change state */ DEBUGVERIFY(CONN_WAIT(g_usbconn, &hport)); - uvdbg("%s\n", hport->connected ? "connected" : "disconnected"); + uinfo("%s\n", hport->connected ? "connected" : "disconnected"); /* Did we just become connected? */ @@ -176,7 +176,7 @@ int stm32_usbhost_initialize(void) * that we care about: */ - uvdbg("Register class drivers\n"); + uinfo("Register class drivers\n"); #ifdef CONFIG_USBHOST_MSC /* Register the USB host Mass Storage Class */ @@ -184,7 +184,7 @@ int stm32_usbhost_initialize(void) ret = usbhost_msc_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the mass storage class: %d\n", ret); + uerr("ERROR: Failed to register the mass storage class: %d\n", ret); } #endif @@ -194,19 +194,19 @@ int stm32_usbhost_initialize(void) ret = usbhost_cdcacm_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret); + uerr("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret); } #endif /* Then get an instance of the USB host interface */ - uvdbg("Initialize USB host\n"); + uinfo("Initialize USB host\n"); g_usbconn = stm32_otgfshost_initialize(0); if (g_usbconn) { /* Start a thread to handle device connection. */ - uvdbg("Start usbhost_waiter\n"); + uinfo("Start usbhost_waiter\n"); pid = task_create("usbhost", CONFIG_USBHOST_DEFPRIO, CONFIG_USBHOST_STACKSIZE, @@ -300,7 +300,7 @@ xcpt_t stm32_setup_overcurrent(xcpt_t handler) #ifdef CONFIG_USBDEV void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } #endif diff --git a/configs/mikroe-stm32f4/src/stm32_vs1053.c b/configs/mikroe-stm32f4/src/stm32_vs1053.c index 08e92695129416e313456e49f03618c821c99d01..74e7d4310c173fb7f784040d01e32d2640d9752c 100644 --- a/configs/mikroe-stm32f4/src/stm32_vs1053.c +++ b/configs/mikroe-stm32f4/src/stm32_vs1053.c @@ -187,7 +187,7 @@ void up_vs1053initialize(FAR struct spi_dev_s* spi) pVs1053 = vs1053_initialize(spi, &g_vs1053lower.lower, VS1053_DEVNO); if (pVs1053 == NULL) { - audlldbg("Failed to bind SPI port %d VS1053 device\n", VS1053_DEVNO); + auderr("ERROR: Failed to bind SPI port %d VS1053 device\n", VS1053_DEVNO); return; } @@ -197,10 +197,10 @@ void up_vs1053initialize(FAR struct spi_dev_s* spi) ret = audio_register(name, pVs1053); if (ret < 0) { - auddbg("up_vs1053initialize: Failed to register VS1053 Audio device\n"); + auderr("ERROR: Failed to register VS1053 Audio device\n"); } - audllvdbg("Bound SPI port to VS1053 device %s\n", name); + audinfo("Bound SPI port to VS1053 device %s\n", name); } #endif /* CONFIG_VS1053 */ diff --git a/configs/mikroe-stm32f4/usbnsh/defconfig b/configs/mikroe-stm32f4/usbnsh/defconfig index ae0211b6adeb7f3b511d7f16fa497e7a8f562e68..8f1a3901061353cf696a2c7900a347e880b36275 100644 --- a/configs/mikroe-stm32f4/usbnsh/defconfig +++ b/configs/mikroe-stm32f4/usbnsh/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -200,6 +202,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -428,6 +431,10 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # CONFIG_STM32_FORCEPOWER is not set CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -446,9 +453,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -703,6 +718,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -717,13 +734,19 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support # # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -760,6 +783,7 @@ CONFIG_RAMMTD_ERASESTATE=0xff # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set CONFIG_MTD_M25P=y CONFIG_M25P_SPIMODE=0 CONFIG_M25P_SPIFREQUENCY=20000000 @@ -791,6 +815,7 @@ CONFIG_MTD_SMART_WEAR_LEVEL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y +# CONFIG_SERIAL_CONSOLE is not set # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -880,14 +905,19 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +CONFIG_SYSLOG_CHAR=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set +CONFIG_SYSLOG_CHAR_CRLF=y +CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" # # Networking Support @@ -935,14 +965,6 @@ CONFIG_SMARTFS_MAXNAMLEN=16 # CONFIG_FS_PROCFS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -CONFIG_SYSLOG=y -# CONFIG_SYSLOG_TIMESTAMP is not set -CONFIG_SYSLOG_CHAR=y -CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" - # # Graphics Support # @@ -1019,6 +1041,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1057,15 +1080,16 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FLASH_TEST is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1076,17 +1100,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RANDOM is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set @@ -1096,24 +1120,24 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_SERIALRX is not set # CONFIG_EXAMPLES_SERLOOP is not set # CONFIG_EXAMPLES_SLCD is not set -# CONFIG_EXAMPLES_FLASH_TEST is not set -# CONFIG_EXAMPLES_SMART_TEST is not set # CONFIG_EXAMPLES_SMART is not set +# CONFIG_EXAMPLES_SMART_TEST 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 # CONFIG_EXAMPLES_TIFF is not set # 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities # +CONFIG_FSUTILS_FLASH_ERASEALL=y # CONFIG_FSUTILS_INIFILE is not set CONFIG_FSUTILS_MKSMARTFS=y # CONFIG_FSUTILS_PASSWD is not set @@ -1134,8 +1158,8 @@ CONFIG_FSUTILS_MKSMARTFS=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1264,13 +1288,14 @@ CONFIG_NSH_ARCHINIT=y # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CDCACM is not set # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set CONFIG_SYSTEM_FLASH_ERASEALL=y +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1278,7 +1303,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/mirtoo/README.txt b/configs/mirtoo/README.txt index 483e1d50a241d648d5c88afcffebf59bab8b4ed1..d97e6d198cc20b5d08138f044f4128e59d0b8e65 100644 --- a/configs/mirtoo/README.txt +++ b/configs/mirtoo/README.txt @@ -592,7 +592,7 @@ Analog Input spi = pic32mx_spibus_initialize(2); if (!spi) { - dbg("ERROR: Failed to initialize SPI port 2\n"); + _err("ERROR: Failed to initialize SPI port 2\n"); return -ENODEV; } @@ -601,7 +601,7 @@ Analog Input handle = pga11x_initialize(spi); if (!handle) { - dbg("ERROR: Failed to bind SPI port 2 to the PGA117 driver\n"); + _err("ERROR: Failed to bind SPI port 2 to the PGA117 driver\n"); return -ENODEV; } @@ -617,7 +617,7 @@ Analog Input ret = pga11x_select(handle, &settings); if (ret < 0) { - dbg("ERROR: Failed to select channel 2, gain 2\n"); + _err("ERROR: Failed to select channel 2, gain 2\n"); return -EIO; } diff --git a/configs/mirtoo/nsh/defconfig b/configs/mirtoo/nsh/defconfig index 1925e947cf0dbe12bb95506165741b13d8a947ef..924327ea7bad7eb3e5db1aef68ef841b05e6be5a 100644 --- a/configs/mirtoo/nsh/defconfig +++ b/configs/mirtoo/nsh/defconfig @@ -41,13 +41,15 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -267,12 +269,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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_IRQPRIO is not set CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set @@ -363,6 +367,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="nsh_main" CONFIG_RR_INTERVAL=0 +# CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=0 CONFIG_MAX_TASKS=16 # CONFIG_SCHED_HAVE_PARENT is not set @@ -413,9 +418,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -446,6 +452,7 @@ CONFIG_DEV_NULL=y # 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 @@ -463,8 +470,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -474,6 +496,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -497,14 +521,11 @@ CONFIG_UART1_SERIALDRIVER=y # 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_UART1_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -521,19 +542,23 @@ 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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -564,12 +589,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -588,6 +607,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -628,10 +651,13 @@ 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 is not set +# CONFIG_LIBC_NETDB is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -646,14 +672,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -661,11 +686,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -673,18 +698,19 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 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_NXTERM 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_PPPD 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 @@ -692,14 +718,24 @@ CONFIG_EXAMPLES_NSH=y # 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -711,30 +747,28 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -752,6 +786,7 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -760,6 +795,7 @@ CONFIG_NSH_DISABLE_DATE=y CONFIG_NSH_DISABLE_DD=y 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=y CONFIG_NSH_DISABLE_EXIT=y @@ -768,8 +804,10 @@ CONFIG_NSH_DISABLE_GET=y # CONFIG_NSH_DISABLE_HELP is not set CONFIG_NSH_DISABLE_HEXDUMP=y # CONFIG_NSH_DISABLE_IFCONFIG is not set +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 @@ -787,8 +825,10 @@ CONFIG_NSH_DISABLE_PUT=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=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=y @@ -813,6 +853,8 @@ CONFIG_NSH_DISABLE_LOOPS=y 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 @@ -826,15 +868,19 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/mirtoo/nxffs/defconfig b/configs/mirtoo/nxffs/defconfig index 876d762db04e5929d1e8d7958f3b488be4bdd982..2f82da56da6387d904f404c43178ae69d69fe5f7 100644 --- a/configs/mirtoo/nxffs/defconfig +++ b/configs/mirtoo/nxffs/defconfig @@ -41,13 +41,15 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -272,12 +274,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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_IRQPRIO is not set CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set @@ -334,6 +338,7 @@ CONFIG_NSH_MMCSDMINOR=0 # CONFIG_MIRTOO_RELEASE=2 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 @@ -373,6 +378,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="nsh_main" CONFIG_RR_INTERVAL=0 +# CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=0 CONFIG_MAX_TASKS=16 # CONFIG_SCHED_HAVE_PARENT is not set @@ -410,9 +416,10 @@ CONFIG_NAME_MAX=32 CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # CONFIG_SCHED_WORKQUEUE is not set # CONFIG_SCHED_HPWORK is not set @@ -443,14 +450,20 @@ CONFIG_DEV_NULL=y # 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=y +# CONFIG_SPI_SLAVE is not set # CONFIG_SPI_EXCHANGE is not set # 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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -464,8 +477,23 @@ CONFIG_SPI=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set +# CONFIG_MODEM is not set CONFIG_MTD=y # @@ -474,6 +502,7 @@ CONFIG_MTD=y # CONFIG_MTD_PARTITION is not set # CONFIG_MTD_SECT512 is not set # CONFIG_MTD_BYTE_WRITE is not set +# CONFIG_MTD_PROGMEM is not set # CONFIG_MTD_CONFIG is not set # @@ -481,10 +510,14 @@ CONFIG_MTD=y # # CONFIG_MTD_NAND is not set # CONFIG_RAMMTD is not set +# CONFIG_FILEMTD is not set # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP 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 @@ -495,6 +528,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 @@ -505,6 +539,8 @@ CONFIG_SST25_SPIFREQUENCY=20000000 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -528,14 +564,11 @@ CONFIG_UART1_SERIALDRIVER=y # 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_UART1_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -552,19 +585,23 @@ 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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -601,16 +638,11 @@ CONFIG_NXFFS_PACKTHRESHOLD=32 CONFIG_NXFFS_MAXNAMLEN=255 CONFIG_NXFFS_TAILTHRESHOLD=8192 # CONFIG_FS_ROMFS is not set +# CONFIG_FS_TMPFS is not set # CONFIG_FS_SMARTFS 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 # @@ -629,6 +661,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -674,10 +710,14 @@ 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 is not set +# CONFIG_LIBC_NETDB is not set +# CONFIG_NETDB_HOSTFILE is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -692,26 +732,26 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -719,18 +759,19 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 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_NXTERM 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_PPPD 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 @@ -738,14 +779,27 @@ CONFIG_EXAMPLES_NSH=y # 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_FLASH_ERASEALL is not set +# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_FSUTILS_PASSWD is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -758,30 +812,28 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -800,6 +852,7 @@ CONFIG_NSH_DISABLEBG=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 @@ -808,6 +861,7 @@ CONFIG_NSH_DISABLE_DATE=y CONFIG_NSH_DISABLE_DD=y 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=y CONFIG_NSH_DISABLE_EXIT=y @@ -816,8 +870,10 @@ CONFIG_NSH_DISABLE_GET=y # CONFIG_NSH_DISABLE_HELP is not set CONFIG_NSH_DISABLE_HEXDUMP=y CONFIG_NSH_DISABLE_IFCONFIG=y +CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_DISABLE_KILL=y # 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 @@ -835,8 +891,10 @@ CONFIG_NSH_DISABLE_PUT=y # CONFIG_NSH_DISABLE_SET is not set CONFIG_NSH_DISABLE_SH=y # CONFIG_NSH_DISABLE_SLEEP is not set +CONFIG_NSH_DISABLE_TIME=y CONFIG_NSH_DISABLE_TEST=y # 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=y @@ -859,6 +917,8 @@ CONFIG_NSH_DISABLESCRIPT=y 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 @@ -872,15 +932,19 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/mirtoo/src/pic32_appinit.c b/configs/mirtoo/src/pic32_appinit.c index 9fad1495bfaba1068ff136f5e32cb5b86f862a26..2cf57476dd46ddfc9a4398291aa3170a727700c8 100644 --- a/configs/mirtoo/src/pic32_appinit.c +++ b/configs/mirtoo/src/pic32_appinit.c @@ -125,7 +125,7 @@ int board_app_initialize(uintptr_t arg) spi = pic32mx_spibus_initialize(2); if (!spi) { - fdbg("ERROR: Failed to initialize SPI port 2\n"); + ferr("ERROR: Failed to initialize SPI port 2\n"); return -ENODEV; } @@ -134,7 +134,7 @@ int board_app_initialize(uintptr_t arg) mtd = sst25_initialize(spi); if (!mtd) { - fdbg("ERROR: Failed to bind SPI port 2 to the SST 25 FLASH driver\n"); + ferr("ERROR: Failed to bind SPI port 2 to the SST 25 FLASH driver\n"); return -ENODEV; } @@ -144,7 +144,7 @@ int board_app_initialize(uintptr_t arg) ret = ftl_initialize(CONFIG_NSH_MMCSDMINOR, mtd); if (ret < 0) { - fdbg("ERROR: Initialize the FTL layer\n"); + ferr("ERROR: Initialize the FTL layer\n"); return ret; } #else @@ -153,7 +153,7 @@ int board_app_initialize(uintptr_t arg) ret = nxffs_initialize(mtd); if (ret < 0) { - fdbg("ERROR: NXFFS initialization failed: %d\n", -ret); + ferr("ERROR: NXFFS initialization failed: %d\n", -ret); return ret; } @@ -162,7 +162,7 @@ int board_app_initialize(uintptr_t arg) ret = mount(NULL, "/mnt/sst25", "nxffs", 0, NULL); if (ret < 0) { - fdbg("ERROR: Failed to mount the NXFFS volume: %d\n", errno); + ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno); return ret; } #endif diff --git a/configs/mirtoo/src/pic32_leds.c b/configs/mirtoo/src/pic32_leds.c index 97fe553ab6f13ef75adf1488df17f5a49cb50eac..e1c89178edde2df928526df9b0d4550e9b62494b 100644 --- a/configs/mirtoo/src/pic32_leds.c +++ b/configs/mirtoo/src/pic32_leds.c @@ -91,22 +91,6 @@ # define LED_NC 2 #endif -/* Debug ********************************************************************/ - -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_LEDS) -# define leddbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# undef CONFIG_DEBUG_LEDS -# undef CONFIG_DEBUG_VERBOSE -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /**************************************************************************** * Private types ****************************************************************************/ diff --git a/configs/mirtoo/src/pic32_spi2.c b/configs/mirtoo/src/pic32_spi2.c index 682ebfc88ef1ba23d104d68e1bf12a6d607b43a3..3c1d513b833042831fca384907cb3f7b5099764f 100644 --- a/configs/mirtoo/src/pic32_spi2.c +++ b/configs/mirtoo/src/pic32_spi2.c @@ -92,23 +92,6 @@ #define GPIO_PGA117_CS (GPIO_OUTPUT|GPIO_VALUE_ONE|GPIO_PORTB|GPIO_PIN7) #define GPIO_SST25VF032B_CS (GPIO_OUTPUT|GPIO_VALUE_ONE|GPIO_PORTB|GPIO_PIN13) -/* The following enable debug output from this file (needs CONFIG_DEBUG too). - * - * CONFIG_DEBUG_SPI - Define to enable basic SPI debug - */ - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# define spivdbg llvdbg -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -175,7 +158,7 @@ enum spi_dev_e; void pic32mx_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); if (devid == SPIDEV_FLASH) { diff --git a/configs/moteino-mega/hello/defconfig b/configs/moteino-mega/hello/defconfig index 92218c71f215e48b228e52ba9310665c1547f516..ddc57e49e37e615fc931f03e04dedec76594d3e1 100644 --- a/configs/moteino-mega/hello/defconfig +++ b/configs/moteino-mega/hello/defconfig @@ -40,7 +40,7 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set @@ -362,7 +362,6 @@ CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/moteino-mega/nsh/defconfig b/configs/moteino-mega/nsh/defconfig index 3625027ae2662c41634902cc345c7aafba635fd4..f2590d782dda8dadca39601e30cc1a960c825b7e 100644 --- a/configs/moteino-mega/nsh/defconfig +++ b/configs/moteino-mega/nsh/defconfig @@ -40,7 +40,7 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set @@ -371,7 +371,6 @@ CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/moteino-mega/src/avr_leds.c b/configs/moteino-mega/src/avr_leds.c index 4a41600fbfe183bbe63ef592306abdfe59a10ddb..14f5bec04c08eb9a75647c0ef607082dcf3148a4 100644 --- a/configs/moteino-mega/src/avr_leds.c +++ b/configs/moteino-mega/src/avr_leds.c @@ -53,36 +53,12 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /**************************************************************************** * Private Data ****************************************************************************/ static bool g_ncoff; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/moxa/nsh/defconfig b/configs/moxa/nsh/defconfig index f4e067940729a0c6564db387dea300aa14ba33ae..2408d18fdb7f84842ca01d547783ce4db2df9a0f 100644 --- a/configs/moxa/nsh/defconfig +++ b/configs/moxa/nsh/defconfig @@ -42,10 +42,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -76,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 @@ -94,6 +96,7 @@ CONFIG_ARCH="arm" # 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=y @@ -106,6 +109,7 @@ CONFIG_ARCH_ARM7TDMI=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 @@ -114,8 +118,11 @@ CONFIG_ARCH_ARM7TDMI=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="arm" CONFIG_ARCH_CHIP="moxart" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set # @@ -145,6 +152,7 @@ CONFIG_UART_MOXA_SHARED_IRQ=31 # 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 is not set @@ -240,6 +248,7 @@ CONFIG_PREALLOC_TIMERS=4 # # Tasks and Scheduling # +# CONFIG_SPINLOCK is not set # CONFIG_INIT_NONE is not set CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set @@ -358,13 +367,21 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support # +# CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y @@ -403,6 +420,8 @@ CONFIG_FTMAC100_MAC0_ENV_ADDR=0x80000050 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y CONFIG_16550_UART=y CONFIG_16550_UART0=y CONFIG_16550_UART0_BASE=0x98200000 @@ -448,10 +467,6 @@ CONFIG_16550_ADDRWIDTH=32 # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set # CONFIG_OTHER_UART_SERIALDRIVER is not set - -# -# USART Configuration -# # CONFIG_MCU_SERIAL is not set CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 @@ -463,15 +478,18 @@ CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -618,12 +636,6 @@ CONFIG_FS_BINFS=y # CONFIG_FS_PROCFS is not set CONFIG_FS_UNIONFS=y -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -642,6 +654,11 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# +# CONFIG_WIRELESS is not set + # # Binary Loader # @@ -685,12 +702,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -723,6 +743,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_CXXTEST is not set @@ -732,10 +753,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -745,17 +766,18 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD 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 @@ -763,18 +785,19 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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 # CONFIG_EXAMPLES_TIFF is not set # 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_XMLRPC is not set # @@ -783,6 +806,11 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + # # Graphics Support # @@ -794,8 +822,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -805,14 +833,16 @@ CONFIG_EXAMPLES_NSH=y # # 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_FTPD is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y # CONFIG_NETUTILS_THTTPD is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set # CONFIG_NETUTILS_XMLRPC is not set @@ -841,6 +871,7 @@ CONFIG_NSH_BUILTIN_APPS=y # Disable Individual commands # CONFIG_NSH_DISABLE_ADDROUTE=y +CONFIG_NSH_DISABLE_ARP=y CONFIG_NSH_DISABLE_BASENAME=y # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set @@ -917,6 +948,7 @@ CONFIG_NSH_CONSOLE=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -964,12 +996,12 @@ CONFIG_NSH_LOGIN_FAILCOUNT=3 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -978,5 +1010,6 @@ 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/mx1ads/ostest/defconfig b/configs/mx1ads/ostest/defconfig index 0740d2a158b1cf7564bf55b77550366614c0d8f4..6c09f16ac809df55da16ecf38b114cd3154cec68 100644 --- a/configs/mx1ads/ostest/defconfig +++ b/configs/mx1ads/ostest/defconfig @@ -37,12 +37,15 @@ 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 # -# CONFIG_DEBUG is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y @@ -72,11 +75,14 @@ CONFIG_ARCH="arm" # 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=y +# 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 @@ -85,24 +91,51 @@ CONFIG_ARCH_CHIP_IMX1=y # 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=y # 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 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="arm" CONFIG_ARCH_CHIP="imx1" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y CONFIG_ARCH_LOWVECTORS=y # CONFIG_ARCH_ROMPGTABLE is not set +# +# ARM Configuration Options +# +# CONFIG_ARM_TOOLCHAIN_BUILDROOT is not set +# CONFIG_ARM_TOOLCHAIN_CODESOURCERYL is not set +CONFIG_ARM_TOOLCHAIN_GNU_EABIL=y +# CONFIG_ARM_TOOLCHAIN_GNU_OABI is not set + # # iMX.1 Peripheral Selection # @@ -124,11 +157,14 @@ CONFIG_RAM_NUTTXENTRY=0x01004000 # 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=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_PAGING is not set CONFIG_ARCH_STACKDUMP=y @@ -186,6 +222,7 @@ CONFIG_ARCH_LEDS=y # # Board-Specific Options # +# CONFIG_LIB_BOARDCTL is not set # # RTOS Features @@ -215,8 +252,12 @@ CONFIG_PREALLOC_TIMERS=8 # # Tasks and Scheduling # +# CONFIG_INIT_NONE is not set +CONFIG_INIT_ENTRYPOINT=y +# CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="ostest_main" CONFIG_RR_INTERVAL=200 +# CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=0 CONFIG_MAX_TASKS=64 # CONFIG_SCHED_HAVE_PARENT is not set @@ -267,6 +308,14 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=32 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 @@ -293,25 +342,52 @@ CONFIG_DEV_NULL=y # 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=y +# CONFIG_SPI_SLAVE is not set # CONFIG_SPI_EXCHANGE is not set # 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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL 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_TIMER 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -319,6 +395,8 @@ CONFIG_SPI=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -341,13 +419,15 @@ CONFIG_UART1_SERIALDRIVER=y # CONFIG_USART6_SERIALDRIVER is not set # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set - -# -# USART Configuration -# +# 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 is not set CONFIG_UART1_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set # CONFIG_NO_SERIAL_CONSOLE is not set # @@ -361,20 +441,23 @@ CONFIG_UART1_PARITY=0 CONFIG_UART1_2STOP=0 # CONFIG_UART1_IFLOWCONTROL is not set # CONFIG_UART1_OFLOWCONTROL is not set -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -399,14 +482,11 @@ CONFIG_DISABLE_MOUNTPOINT=y # 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_PROCFS is not set - -# -# System Logging -# - -# CONFIG_SYSLOG is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -430,7 +510,11 @@ CONFIG_HEAP2_SIZE=0 # CONFIG_AUDIO is not set # -# Binary Formats +# Wireless Support +# + +# +# Binary Loader # # CONFIG_BINFMT_DISABLE is not set # CONFIG_NXFLAT is not set @@ -453,6 +537,7 @@ CONFIG_NUNGET_CHARS=2 # 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 @@ -464,14 +549,18 @@ CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 # CONFIG_LIBC_STRERROR is not set # CONFIG_LIBC_PERROR_STDOUT is not set CONFIG_ARCH_LOWPUTC=y +# 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_SCHED_WORKQUEUE is not set +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -486,14 +575,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -501,11 +589,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -513,12 +601,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_NSH is not set # 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM is not set # CONFIG_EXAMPLES_NXTEXT is not set CONFIG_EXAMPLES_OSTEST=y CONFIG_EXAMPLES_OSTEST_LOOPS=1 @@ -526,62 +613,64 @@ CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048 CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=8 CONFIG_EXAMPLES_OSTEST_RR_RANGE=10000 CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 +# CONFIG_EXAMPLES_PCA9635 is not set # CONFIG_EXAMPLES_PIPE is not set # CONFIG_EXAMPLES_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 # 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 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_UDP 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_WEBSERVER 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_MICROPYTHON is not set # CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # # 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 # CONFIG_NETUTILS_SMTP is not set -# CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_NETLIB is not set -# CONFIG_NETUTILS_WEBCLIENT is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library @@ -600,111 +689,16 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # # System Libraries and NSH Add-Ons # - -# -# Custom Free Memory Command -# -# CONFIG_SYSTEM_FREE is not set - -# -# EMACS-like Command Line Editor -# # CONFIG_SYSTEM_CLE is not set - -# -# FLASH Program Installation -# -# CONFIG_SYSTEM_INSTALL is not set - -# -# FLASH Erase-all Command -# - -# -# Intel HEX to binary conversion -# +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set - -# -# I2C tool -# - -# -# INI File Parser -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# NxPlayer media player library / command Line -# -# CONFIG_SYSTEM_NXPLAYER is not set - -# -# RAM test -# +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set - -# -# readline() -# +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set - -# -# P-Code Support -# - -# -# PHY Tool -# - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sudoku -# # CONFIG_SYSTEM_SUDOKU is not set - -# -# Sysinfo -# - -# -# VI Work-Alike Editor -# +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set - -# -# Stack Monitor -# - -# -# USB CDC/ACM Device Commands -# - -# -# USB Composite Device Commands -# - -# -# USB Mass Storage Device Commands -# - -# -# USB Monitor -# - -# -# Zmodem Commands -# # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/ne64badge/ostest/defconfig b/configs/ne64badge/ostest/defconfig index f13118e580399c7f501fc373edde47d218f503fe..8566d4ab1fa27e62ad890f6005bba3c814a6ca66 100644 --- a/configs/ne64badge/ostest/defconfig +++ b/configs/ne64badge/ostest/defconfig @@ -38,7 +38,7 @@ CONFIG_MOTOROLA_SREC=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set @@ -292,7 +292,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/ne64badge/src/m9s12_buttons.c b/configs/ne64badge/src/m9s12_buttons.c index 587cf884ec29a62bdbe12da0655ee65ebe67f11e..522d402c49173fdfa7de4068ba8d3ff2ee465c15 100644 --- a/configs/ne64badge/src/m9s12_buttons.c +++ b/configs/ne64badge/src/m9s12_buttons.c @@ -53,42 +53,23 @@ * Pre-processor Definitions ****************************************************************************/ -/* Enables debug output from this file (needs CONFIG_DEBUG with - * CONFIG_DEBUG_VERBOSE too) - */ - -#undef BUTTON_DEBUG /* Define to enable debug */ -#undef BUTTON_VERBOSE /* Define to enable verbose debug */ - -#ifdef BUTTON_DEBUG -# define btndbg lldbg -# ifdef BUTTON_VERBOSE -# define btnvdbg lldbg -# else -# define btnvdbg(x...) +#ifdef CONFIG_DEBUG_INPUT +# define btnerr _err +# define btninfo(x...) _info # endif #else -# undef BUTTON_VERBOSE -# define btndbg(x...) -# define btnvdbg(x...) +# define btnerr(x...) +# define btninfo(x...) #endif /* Dump GPIO registers */ -#ifdef BUTTON_VERBOSE +#ifdef CONFIG_DEBUG_INPUT # define btn_dumpgpio(m) m9s12_dumpgpio(m) #else # define btn_dumpgpio(m) #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/ne64badge/src/m9s12_leds.c b/configs/ne64badge/src/m9s12_leds.c index 22fa22272ea65abe99fda2d61d1a9608c9513d41..cc30ec32a388596142af68f5e47ed3811166a076 100644 --- a/configs/ne64badge/src/m9s12_leds.c +++ b/configs/ne64badge/src/m9s12_leds.c @@ -52,25 +52,9 @@ * 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 -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /* Dump GPIO registers */ -#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_LEDS) +#ifdef CONFIG_DEBUG_LEDS_INFO # define led_dumpgpio(m) m9s12_dumpgpio(m) #else # define led_dumpgpio(m) diff --git a/configs/ne64badge/src/m9s12_spi.c b/configs/ne64badge/src/m9s12_spi.c index bb4e3bc6967369f2a21c67765de255d6e314127f..1539d0ca475448474b9e55b6d17240b4f1d8d254 100644 --- a/configs/ne64badge/src/m9s12_spi.c +++ b/configs/ne64badge/src/m9s12_spi.c @@ -50,32 +50,6 @@ #if defined(CONFIG_HCS12_SPI) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ diff --git a/configs/ntosd-dm320/nettest/defconfig b/configs/ntosd-dm320/nettest/defconfig index 9b2875545063ebfcffaf7dfd035d1220fd2a30ee..560e82a279ee0899e450ea5d2347eaea9713e361 100644 --- a/configs/ntosd-dm320/nettest/defconfig +++ b/configs/ntosd-dm320/nettest/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +# CONFIG_DEBUG_ALERT is not set +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,6 +77,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_CHIP_DM320=y # 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 @@ -93,7 +96,9 @@ CONFIG_ARCH_CHIP_DM320=y # 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=y @@ -104,10 +109,21 @@ CONFIG_ARCH_ARM926EJS=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="arm" CONFIG_ARCH_CHIP="dm320" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y # CONFIG_ARCH_LOWVECTORS is not set # CONFIG_ARCH_ROMPGTABLE is not set @@ -141,6 +157,7 @@ CONFIG_DM320_UART1=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 is not set CONFIG_ARCH_HAVE_VFORK=y CONFIG_ARCH_HAVE_MMU=y # CONFIG_ARCH_HAVE_MPU is not set @@ -275,9 +292,10 @@ CONFIG_NAME_MAX=32 CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # CONFIG_SCHED_WORKQUEUE is not set # CONFIG_SCHED_HPWORK is not set @@ -308,6 +326,7 @@ CONFIG_DEV_NULL=y # 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 @@ -326,8 +345,22 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y @@ -336,7 +369,9 @@ CONFIG_NETDEVICES=y # General Ethernet MAC Driver Options # # CONFIG_NETDEV_LOOPBACK is not set +# CONFIG_NETDEV_TELNET is not set # CONFIG_NETDEV_MULTINIC is not set +CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y # CONFIG_NETDEV_LATEINIT is not set # @@ -355,7 +390,6 @@ CONFIG_DM9X_MODE_AUTO=y # CONFIG_DM9X_MODE_10MFD is not set # CONFIG_DM9X_MODE_100MHD is not set # CONFIG_DM9X_MODE_100MFD is not set -# CONFIG_DM9X_STATS is not set # CONFIG_ENC28J60 is not set # CONFIG_ENCX24J600 is not set # CONFIG_NET_E1000 is not set @@ -369,6 +403,8 @@ CONFIG_DM9X_MODE_AUTO=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -392,14 +428,11 @@ CONFIG_UART1_SERIALDRIVER=y # 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 is not set CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_UART1_SERIAL_CONSOLE is not set @@ -417,6 +450,7 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_DMA is not set # # UART1 Configuration @@ -429,19 +463,23 @@ 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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -574,12 +612,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # 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 # @@ -599,6 +631,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -639,11 +675,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -657,10 +696,14 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # Application Configuration # +# +# 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_DHCPD is not set @@ -668,11 +711,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -694,18 +737,19 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD 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 @@ -713,16 +757,26 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # 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_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + # # Graphics Support # @@ -733,8 +787,8 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -745,11 +799,12 @@ 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_NETLIB=y # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set # CONFIG_NETUTILS_XMLRPC is not set @@ -771,15 +826,16 @@ CONFIG_NETUTILS_NETLIB=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/ntosd-dm320/nsh/defconfig b/configs/ntosd-dm320/nsh/defconfig index 5a4b54b2e7f13d352387f85e14f533f391b863d0..7ec57fecca3cceeeafbc2e6d4ab1a4e5a0145437 100644 --- a/configs/ntosd-dm320/nsh/defconfig +++ b/configs/ntosd-dm320/nsh/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +# CONFIG_DEBUG_ALERT is not set +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,6 +77,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_CHIP_DM320=y # 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 @@ -93,7 +96,9 @@ CONFIG_ARCH_CHIP_DM320=y # 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=y @@ -104,10 +109,21 @@ CONFIG_ARCH_ARM926EJS=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="arm" CONFIG_ARCH_CHIP="dm320" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y # CONFIG_ARCH_LOWVECTORS is not set # CONFIG_ARCH_ROMPGTABLE is not set @@ -141,6 +157,7 @@ CONFIG_DM320_UART1=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 is not set CONFIG_ARCH_HAVE_VFORK=y CONFIG_ARCH_HAVE_MMU=y # CONFIG_ARCH_HAVE_MPU is not set @@ -284,9 +301,10 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGCONDTIMEDOUT=16 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # CONFIG_SCHED_WORKQUEUE is not set # CONFIG_SCHED_HPWORK is not set @@ -335,7 +353,21 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -344,6 +376,7 @@ CONFIG_MMCSD_MMCSUPPORT=y CONFIG_MMCSD_HAVECARDDETECT=y # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set # CONFIG_MTD is not set # CONFIG_EEPROM is not set CONFIG_NETDEVICES=y @@ -388,6 +421,8 @@ CONFIG_DM9X_MODE_AUTO=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -411,10 +446,6 @@ CONFIG_UART1_SERIALDRIVER=y # 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 @@ -455,15 +486,18 @@ CONFIG_UART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -603,7 +637,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_NFS is not set # CONFIG_FS_NXFFS is not set CONFIG_FS_ROMFS=y @@ -612,12 +648,6 @@ CONFIG_FS_ROMFS=y # 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 # @@ -637,6 +667,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -682,6 +716,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 @@ -689,12 +725,14 @@ CONFIG_NETDB_DNSCLIENT_ENTRIES=4 CONFIG_NETDB_DNSCLIENT_NAMESIZE=32 CONFIG_NETDB_DNSCLIENT_LIFESEC=3600 CONFIG_NETDB_DNSCLIENT_MAXRESPONSE=96 +# CONFIG_NETDB_RESOLVCONF is not set CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_NETDB_DNSSERVER_IPv4 is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -715,18 +753,21 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # 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_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -736,18 +777,19 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y 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_NXTERM 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_PPPD 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 @@ -756,6 +798,7 @@ CONFIG_EXAMPLES_NSH=y # 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_THTTPD is not set @@ -763,17 +806,22 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UDPBLASTER is not set -# CONFIG_EXAMPLES_DISCOVER 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_WGET 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 @@ -786,8 +834,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -800,25 +848,27 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -837,6 +887,7 @@ CONFIG_NSH_NESTDEPTH=3 # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_ARP is not set # CONFIG_NSH_DISABLE_BASENAME is not set # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set @@ -879,6 +930,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 @@ -924,6 +976,7 @@ CONFIG_NSH_CONSOLE=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -950,6 +1003,8 @@ CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048 CONFIG_NSH_TELNETD_CLIENTPRIO=100 CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048 CONFIG_NSH_IOBUFFER_SIZE=512 +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # CONFIG_NSH_TELNET_LOGIN is not set # @@ -964,13 +1019,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -979,5 +1033,6 @@ 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/ntosd-dm320/poll/defconfig b/configs/ntosd-dm320/poll/defconfig index 82d918604f10e2e74371ab854e8ff77f28a47139..4bf627a38a71440a48584c81bc2450e3a2df98bb 100644 --- a/configs/ntosd-dm320/poll/defconfig +++ b/configs/ntosd-dm320/poll/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +# CONFIG_DEBUG_ALERT is not set +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,6 +77,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_CHIP_DM320=y # 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 @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_DM320=y # 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=y # CONFIG_ARCH_ARM920T is not set @@ -102,10 +109,21 @@ CONFIG_ARCH_ARM926EJS=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="arm" CONFIG_ARCH_CHIP="dm320" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y # CONFIG_ARCH_LOWVECTORS is not set # CONFIG_ARCH_ROMPGTABLE is not set @@ -139,11 +157,14 @@ CONFIG_DM320_UART1=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 is not set 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_PAGING is not set # CONFIG_ARCH_STACKDUMP is not set @@ -233,6 +254,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="poll_main" CONFIG_RR_INTERVAL=200 +# CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=0 CONFIG_MAX_TASKS=64 # CONFIG_SCHED_HAVE_PARENT is not set @@ -277,9 +299,10 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGCONDTIMEDOUT=16 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # CONFIG_SCHED_WORKQUEUE is not set # CONFIG_SCHED_HPWORK is not set @@ -310,6 +333,7 @@ CONFIG_DEV_NULL=y # 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 @@ -327,8 +351,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y @@ -336,7 +375,11 @@ CONFIG_NETDEVICES=y # # General Ethernet MAC Driver Options # +# CONFIG_NETDEV_LOOPBACK is not set +# CONFIG_NETDEV_TELNET is not set # CONFIG_NETDEV_MULTINIC is not set +CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y +# CONFIG_NETDEV_LATEINIT is not set # # External Ethernet MAC Device Support @@ -354,11 +397,11 @@ CONFIG_DM9X_MODE_AUTO=y # CONFIG_DM9X_MODE_10MFD is not set # CONFIG_DM9X_MODE_100MHD is not set # CONFIG_DM9X_MODE_100MFD is not set -# CONFIG_DM9X_STATS is not set # CONFIG_ENC28J60 is not set # CONFIG_ENCX24J600 is not set # CONFIG_NET_E1000 is not set # CONFIG_NET_SLIP is not set +# CONFIG_NET_FTMAC100 is not set # CONFIG_NET_VNET is not set # CONFIG_PIPES is not set # CONFIG_PM is not set @@ -367,6 +410,8 @@ CONFIG_DM9X_MODE_AUTO=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -390,15 +435,12 @@ CONFIG_UART1_SERIALDRIVER=y # 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_UART0_SERIAL_CONSOLE=y # CONFIG_UART1_SERIAL_CONSOLE is not set @@ -416,6 +458,7 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_DMA is not set # # UART1 Configuration @@ -428,19 +471,23 @@ 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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -464,6 +511,7 @@ CONFIG_NET_GUARDSIZE=2 # # CONFIG_NET_MULTILINK is not set CONFIG_NET_ETHERNET=y +# CONFIG_NET_LOOPBACK is not set # CONFIG_NET_TUN is not set # @@ -549,6 +597,7 @@ CONFIG_IOB_NCHAINS=8 # Routing Table Configuration # # CONFIG_NET_ROUTE is not set +CONFIG_NET_HOSTNAME="" # # Crypto API @@ -571,12 +620,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # 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 # @@ -596,6 +639,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -636,10 +683,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -654,14 +705,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -669,11 +719,12 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -682,22 +733,23 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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=y # CONFIG_EXAMPLES_POLL_NOMAC is not set CONFIG_EXAMPLES_POLL_IPADDR=0x0a000002 CONFIG_EXAMPLES_POLL_DRIPADDR=0x0a000001 CONFIG_EXAMPLES_POLL_NETMASK=0xffffff00 -# CONFIG_EXAMPLES_PPPD is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 @@ -705,17 +757,27 @@ CONFIG_EXAMPLES_POLL_NETMASK=0xffffff00 # 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_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # CONFIG_EXAMPLES_XMLRPC is not set +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + # # Graphics Support # @@ -726,32 +788,30 @@ CONFIG_EXAMPLES_POLL_NETMASK=0xffffff00 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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_FTPD is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # @@ -769,15 +829,16 @@ CONFIG_NETUTILS_NETLIB=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_POWEROFF is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/ntosd-dm320/src/dm320_network.c b/configs/ntosd-dm320/src/dm320_network.c index 5edeb32f3907ebe64eec355d738c1b58c10b9334..80911ff5fe1438388e12d9c7cf73f9f2d5ed1207 100644 --- a/configs/ntosd-dm320/src/dm320_network.c +++ b/configs/ntosd-dm320/src/dm320_network.c @@ -52,18 +52,6 @@ extern void dm9x_initialize(void); -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -79,8 +67,8 @@ void up_netinitialize(void) * width is 16-bits. */ - nlldbg("CS4CTRL1=%04x CS4CTRL2=%04x\n", - getreg16(DM320_EMIF_CS4CTRL1), getreg16(DM320_EMIF_CS4CTRL2)); + ninfo("CS4CTRL1=%04x CS4CTRL2=%04x\n", + getreg16(DM320_EMIF_CS4CTRL1), getreg16(DM320_EMIF_CS4CTRL2)); /* It is assumed that bootloader has already configured CS4. Here, * we will only make certain that the GIO is properly configured @@ -91,9 +79,9 @@ void up_netinitialize(void) GIO_INTERRUPT(GIO_DM9000A_INT); GIO_RISINGEDGE(GIO_DM9000A_INT); - nlldbg("GIO DIR0=%04x INV0=%04x IRQPORT=%04x IRQEDGE=%04x\n", - getreg16(DM320_GIO_DIR0), getreg16(DM320_GIO_INV0), - getreg16(DM320_GIO_IRQPORT), getreg16(DM320_GIO_IRQEDGE)); + ninfo("GIO DIR0=%04x INV0=%04x IRQPORT=%04x IRQEDGE=%04x\n", + getreg16(DM320_GIO_DIR0), getreg16(DM320_GIO_INV0), + getreg16(DM320_GIO_IRQPORT), getreg16(DM320_GIO_IRQEDGE)); /* Then initialize the driver */ diff --git a/configs/ntosd-dm320/thttpd/defconfig b/configs/ntosd-dm320/thttpd/defconfig index 55c20c37906aa73b98b68a74eb41d79f9d72be38..04dcca72bd4153bfca69447a8e8e58049adf38a3 100644 --- a/configs/ntosd-dm320/thttpd/defconfig +++ b/configs/ntosd-dm320/thttpd/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +# CONFIG_DEBUG_ALERT is not set +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,6 +77,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_CHIP_DM320=y # 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 @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_DM320=y # 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=y # CONFIG_ARCH_ARM920T is not set @@ -102,10 +109,21 @@ CONFIG_ARCH_ARM926EJS=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="arm" CONFIG_ARCH_CHIP="dm320" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y # CONFIG_ARCH_LOWVECTORS is not set # CONFIG_ARCH_ROMPGTABLE is not set @@ -139,11 +157,14 @@ CONFIG_DM320_UART1=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 is not set 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_PAGING is not set # CONFIG_ARCH_STACKDUMP is not set @@ -233,6 +254,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="thttp_main" CONFIG_RR_INTERVAL=200 +# CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=0 CONFIG_MAX_TASKS=64 # CONFIG_SCHED_HAVE_PARENT is not set @@ -270,9 +292,10 @@ CONFIG_NAME_MAX=32 CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # CONFIG_SCHED_WORKQUEUE is not set # CONFIG_SCHED_HPWORK is not set @@ -303,6 +326,7 @@ CONFIG_DEV_NULL=y # 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 @@ -320,8 +344,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y @@ -329,7 +368,11 @@ CONFIG_NETDEVICES=y # # General Ethernet MAC Driver Options # +# CONFIG_NETDEV_LOOPBACK is not set +# CONFIG_NETDEV_TELNET is not set # CONFIG_NETDEV_MULTINIC is not set +CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y +# CONFIG_NETDEV_LATEINIT is not set # # External Ethernet MAC Device Support @@ -347,11 +390,11 @@ CONFIG_DM9X_MODE_AUTO=y # CONFIG_DM9X_MODE_10MFD is not set # CONFIG_DM9X_MODE_100MHD is not set # CONFIG_DM9X_MODE_100MFD is not set -# CONFIG_DM9X_STATS is not set # CONFIG_ENC28J60 is not set # CONFIG_ENCX24J600 is not set # CONFIG_NET_E1000 is not set # CONFIG_NET_SLIP is not set +# CONFIG_NET_FTMAC100 is not set # CONFIG_NET_VNET is not set # CONFIG_PIPES is not set # CONFIG_PM is not set @@ -360,6 +403,8 @@ CONFIG_DM9X_MODE_AUTO=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -383,15 +428,12 @@ CONFIG_UART1_SERIALDRIVER=y # 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_UART0_SERIAL_CONSOLE=y # CONFIG_UART1_SERIAL_CONSOLE is not set @@ -409,6 +451,7 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_DMA is not set # # UART1 Configuration @@ -421,19 +464,23 @@ 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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -457,6 +504,7 @@ CONFIG_NET_GUARDSIZE=2 # # CONFIG_NET_MULTILINK is not set CONFIG_NET_ETHERNET=y +# CONFIG_NET_LOOPBACK is not set # CONFIG_NET_TUN is not set # @@ -542,6 +590,7 @@ CONFIG_IOB_NCHAINS=8 # Routing Table Configuration # # CONFIG_NET_ROUTE is not set +CONFIG_NET_HOSTNAME="" # # Crypto API @@ -565,14 +614,10 @@ CONFIG_FS_READABLE=y # CONFIG_FS_FAT 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_PROCFS is not set - -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -593,6 +638,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -636,10 +685,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -654,14 +708,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -669,11 +722,12 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -682,19 +736,20 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_NSH is not set # 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD 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 @@ -703,6 +758,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_THTTPD=y @@ -711,13 +767,24 @@ CONFIG_EXAMPLES_THTTPD_DRIPADDR=0x0a000001 CONFIG_EXAMPLES_THTTPD_NETMASK=0xffffff00 # 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_UNIONFS is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # CONFIG_EXAMPLES_XMLRPC 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 # @@ -729,20 +796,24 @@ CONFIG_EXAMPLES_THTTPD_NETMASK=0xffffff00 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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_FTPD is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set CONFIG_NETUTILS_THTTPD=y @@ -777,16 +848,10 @@ CONFIG_THTTPD_IDLE_SEND_LIMIT_SEC=300 CONFIG_THTTPD_TILDE_MAP_NONE=y # CONFIG_THTTPD_GENERATE_INDICES is not set # CONFIG_THTTPD_USE_URLPATTERN is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # @@ -804,15 +869,16 @@ CONFIG_NETUTILS_NETLIB=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_POWEROFF is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/ntosd-dm320/udp/defconfig b/configs/ntosd-dm320/udp/defconfig index 906bc57eabd5b19e699b906f37d9798da06bf231..6b37219e6865fa3328e40e4d6409c15c9eef6f48 100644 --- a/configs/ntosd-dm320/udp/defconfig +++ b/configs/ntosd-dm320/udp/defconfig @@ -37,12 +37,15 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_ALERT is not set +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y @@ -72,11 +75,14 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_C5471 is not set # CONFIG_ARCH_CHIP_CALYPSO is not set CONFIG_ARCH_CHIP_DM320=y +# 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 @@ -85,20 +91,39 @@ CONFIG_ARCH_CHIP_DM320=y # 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=y # 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 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="arm" CONFIG_ARCH_CHIP="dm320" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y # CONFIG_ARCH_LOWVECTORS is not set # CONFIG_ARCH_ROMPGTABLE is not set @@ -132,11 +157,14 @@ CONFIG_DM320_UART1=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 is not set 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_PAGING is not set # CONFIG_ARCH_STACKDUMP is not set @@ -191,6 +219,7 @@ CONFIG_ARCH_HAVE_LEDS=y # # Board-Specific Options # +# CONFIG_LIB_BOARDCTL is not set # # RTOS Features @@ -225,6 +254,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="udp_main" CONFIG_RR_INTERVAL=200 +# CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=0 CONFIG_MAX_TASKS=64 # CONFIG_SCHED_HAVE_PARENT is not set @@ -262,6 +292,14 @@ CONFIG_NAME_MAX=32 CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 +# 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 @@ -288,28 +326,52 @@ CONFIG_DEV_NULL=y # 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_TIMER 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y # # General Ethernet MAC Driver Options # +# CONFIG_NETDEV_LOOPBACK is not set # CONFIG_NETDEV_MULTINIC is not set +CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y +# CONFIG_NETDEV_LATEINIT is not set # # External Ethernet MAC Device Support @@ -327,11 +389,11 @@ CONFIG_DM9X_MODE_AUTO=y # CONFIG_DM9X_MODE_10MFD is not set # CONFIG_DM9X_MODE_100MHD is not set # CONFIG_DM9X_MODE_100MFD is not set -# CONFIG_DM9X_STATS is not set # CONFIG_ENC28J60 is not set # CONFIG_ENCX24J600 is not set # CONFIG_NET_E1000 is not set # CONFIG_NET_SLIP is not set +# CONFIG_NET_FTMAC100 is not set # CONFIG_NET_VNET is not set # CONFIG_PIPES is not set # CONFIG_PM is not set @@ -340,6 +402,8 @@ CONFIG_DM9X_MODE_AUTO=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -362,14 +426,16 @@ CONFIG_UART1_SERIALDRIVER=y # CONFIG_USART6_SERIALDRIVER is not set # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set - -# -# USART Configuration -# +# 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 is not set CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_UART1_SERIAL_CONSOLE is not set +# CONFIG_OTHER_SERIAL_CONSOLE is not set # CONFIG_NO_SERIAL_CONSOLE is not set # @@ -383,6 +449,7 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_DMA is not set # # UART1 Configuration @@ -395,20 +462,23 @@ CONFIG_UART1_PARITY=0 CONFIG_UART1_2STOP=0 # CONFIG_UART1_IFLOWCONTROL is not set # CONFIG_UART1_OFLOWCONTROL is not set -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -417,13 +487,34 @@ CONFIG_ARCH_HAVE_NET=y # CONFIG_ARCH_HAVE_PHY is not set CONFIG_NET=y # CONFIG_NET_NOINTS is not set -CONFIG_NET_IPv4=y -# CONFIG_NET_MULTIBUFFER is not set # CONFIG_NET_PROMISCUOUS is not set -CONFIG_NET_ETH_MTU=562 -CONFIG_NET_ETH_TCP_RECVWNDO=536 + +# +# Driver buffer configuration +# +# CONFIG_NET_MULTIBUFFER is not set +CONFIG_NET_ETH_MTU=590 CONFIG_NET_GUARDSIZE=2 +# +# Data link support +# +# CONFIG_NET_MULTILINK is not set +CONFIG_NET_ETHERNET=y +# CONFIG_NET_LOOPBACK is not set +# CONFIG_NET_TUN is not set + +# +# Network Device Operations +# +# CONFIG_NETDEV_PHY_IOCTL is not set + +# +# Internet Protocol Selection +# +CONFIG_NET_IPv4=y +# CONFIG_NET_IPv6 is not set + # # Socket Support # @@ -433,14 +524,14 @@ CONFIG_NET_SOCKOPTS=y # CONFIG_NET_SOLINGER is not set # -# Network Device Operations +# Raw Socket Support # -# CONFIG_NETDEV_PHY_IOCTL is not set +# CONFIG_NET_PKT is not set # -# Raw Socket Support +# Unix Domain Socket Support # -# CONFIG_NET_PKT is not set +# CONFIG_NET_LOCAL is not set # # TCP/IP Networking @@ -455,6 +546,7 @@ CONFIG_NET_UDP_CHECKSUMS=y CONFIG_NET_UDP_CONNS=8 CONFIG_NET_BROADCAST=y # CONFIG_NET_RXAVAIL is not set +CONFIG_NET_UDP_READAHEAD=y # # ICMP Networking Support @@ -479,7 +571,10 @@ CONFIG_NET_ARP_MAXAGE=120 # # Network I/O Buffer Support # -# CONFIG_NET_IOB is not set +CONFIG_NET_IOB=y +CONFIG_IOB_NBUFFERS=8 +CONFIG_IOB_BUFSIZE=196 +CONFIG_IOB_NCHAINS=8 # CONFIG_NET_ARCH_INCR32 is not set # CONFIG_NET_ARCH_CHKSUM is not set # CONFIG_NET_STATISTICS is not set @@ -488,7 +583,7 @@ CONFIG_NET_ARP_MAXAGE=120 # Routing Table Configuration # # CONFIG_NET_ROUTE is not set -CONFIG_NET_ETHERNET=y +CONFIG_NET_HOSTNAME="" # # Crypto API @@ -506,14 +601,10 @@ CONFIG_DISABLE_MOUNTPOINT=y # 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_RAMMAP is not set # CONFIG_FS_PROCFS is not set - -# -# System Logging -# - -# CONFIG_SYSLOG is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -535,7 +626,11 @@ CONFIG_MM_REGIONS=1 # CONFIG_AUDIO is not set # -# Binary Formats +# Wireless Support +# + +# +# Binary Loader # # CONFIG_BINFMT_DISABLE is not set # CONFIG_NXFLAT is not set @@ -558,6 +653,7 @@ CONFIG_NUNGET_CHARS=2 # 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 @@ -569,14 +665,19 @@ CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 # CONFIG_LIBC_STRERROR is not set # CONFIG_LIBC_PERROR_STDOUT is not set CONFIG_ARCH_LOWPUTC=y +# 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_DNSCLIENT is not set # # Non-standard Library Support # -# CONFIG_SCHED_WORKQUEUE is not set +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -591,26 +692,27 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -618,80 +720,90 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_NSH is not set # 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 # 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 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set CONFIG_EXAMPLES_UDP=y # CONFIG_EXAMPLES_UDP_SERVER is not set +CONFIG_EXAMPLES_UDP_IPv4=y + +# +# IPv4 addresses +# CONFIG_EXAMPLES_UDP_IPADDR=0x0a000002 CONFIG_EXAMPLES_UDP_DRIPADDR=0x0a000001 CONFIG_EXAMPLES_UDP_NETMASK=0xffffff00 CONFIG_EXAMPLES_UDP_SERVERIP=0x0a000001 -# CONFIG_EXAMPLES_DISCOVER is not set -# CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set +# CONFIG_EXAMPLES_UDPBLASTER is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER 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_MICROPYTHON is not set # CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER 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 -# CONFIG_NETDB_DNSCLIENT is not set -# CONFIG_NETUTILS_SMTP is not set -# CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set CONFIG_NETUTILS_NETLIB=y -# CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set +# CONFIG_NETUTILS_PPPD is not set +# CONFIG_NETUTILS_SMTP is not set +# CONFIG_NETUTILS_TFTPC is not set # # NSH Library @@ -710,111 +822,16 @@ CONFIG_NETUTILS_NETLIB=y # # System Libraries and NSH Add-Ons # - -# -# Custom Free Memory Command -# -# CONFIG_SYSTEM_FREE is not set - -# -# EMACS-like Command Line Editor -# # CONFIG_SYSTEM_CLE is not set - -# -# FLASH Program Installation -# -# CONFIG_SYSTEM_INSTALL is not set - -# -# FLASH Erase-all Command -# - -# -# Intel HEX to binary conversion -# +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set - -# -# I2C tool -# - -# -# INI File Parser -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# NxPlayer media player library / command Line -# -# CONFIG_SYSTEM_NXPLAYER is not set - -# -# RAM test -# +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set - -# -# readline() -# +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set - -# -# P-Code Support -# - -# -# PHY Tool -# - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sudoku -# # CONFIG_SYSTEM_SUDOKU is not set - -# -# Sysinfo -# - -# -# VI Work-Alike Editor -# +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set - -# -# Stack Monitor -# - -# -# USB CDC/ACM Device Commands -# - -# -# USB Composite Device Commands -# - -# -# USB Mass Storage Device Commands -# - -# -# USB Monitor -# - -# -# Zmodem Commands -# # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/ntosd-dm320/webserver/defconfig b/configs/ntosd-dm320/webserver/defconfig index 7173e67561002ac0bb6b033e8f0955187dc94174..dd23e42cf97ab0e57ac6126f62d2db423616144c 100644 --- a/configs/ntosd-dm320/webserver/defconfig +++ b/configs/ntosd-dm320/webserver/defconfig @@ -12,10 +12,6 @@ CONFIG_HOST_LINUX=y # CONFIG_HOST_OSX is not set # CONFIG_HOST_WINDOWS is not set # CONFIG_HOST_OTHER is not set -# CONFIG_WINDOWS_NATIVE is not set -# CONFIG_WINDOWS_CYGWIN is not set -# CONFIG_WINDOWS_MSYS is not set -# CONFIG_WINDOWS_OTHER is not set # # Build Configuration @@ -41,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +# CONFIG_DEBUG_ALERT is not set +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -79,6 +77,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_CHIP_DM320=y # 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 @@ -96,7 +95,11 @@ CONFIG_ARCH_CHIP_DM320=y # 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=y # CONFIG_ARCH_ARM920T is not set @@ -106,10 +109,21 @@ CONFIG_ARCH_ARM926EJS=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="arm" CONFIG_ARCH_CHIP="dm320" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y # CONFIG_ARCH_LOWVECTORS is not set # CONFIG_ARCH_ROMPGTABLE is not set @@ -119,10 +133,7 @@ CONFIG_ARCH_HAVE_LOWVECTORS=y # # CONFIG_ARM_TOOLCHAIN_BUILDROOT is not set CONFIG_ARM_TOOLCHAIN_CODESOURCERYL=y -# CONFIG_ARM_TOOLCHAIN_CODESOURCERYW is not set -# CONFIG_ARM_TOOLCHAIN_DEVKITARM is not set # CONFIG_ARM_TOOLCHAIN_GNU_EABIL is not set -# CONFIG_ARM_TOOLCHAIN_GNU_EABIW is not set # CONFIG_ARM_TOOLCHAIN_GNU_OABI is not set # @@ -146,11 +157,14 @@ CONFIG_DM320_UART1=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 is not set 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_PAGING is not set # CONFIG_ARCH_STACKDUMP is not set @@ -240,6 +254,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="webserver_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 @@ -284,9 +299,10 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGCONDTIMEDOUT=16 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # CONFIG_SCHED_WORKQUEUE is not set # CONFIG_SCHED_HPWORK is not set @@ -317,6 +333,7 @@ CONFIG_DEV_NULL=y # 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 @@ -334,8 +351,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y @@ -343,7 +375,11 @@ CONFIG_NETDEVICES=y # # General Ethernet MAC Driver Options # +# CONFIG_NETDEV_LOOPBACK is not set +# CONFIG_NETDEV_TELNET is not set # CONFIG_NETDEV_MULTINIC is not set +CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y +# CONFIG_NETDEV_LATEINIT is not set # # External Ethernet MAC Device Support @@ -361,11 +397,11 @@ CONFIG_DM9X_MODE_AUTO=y # CONFIG_DM9X_MODE_10MFD is not set # CONFIG_DM9X_MODE_100MHD is not set # CONFIG_DM9X_MODE_100MFD is not set -# CONFIG_DM9X_STATS is not set # CONFIG_ENC28J60 is not set # CONFIG_ENCX24J600 is not set # CONFIG_NET_E1000 is not set # CONFIG_NET_SLIP is not set +# CONFIG_NET_FTMAC100 is not set # CONFIG_NET_VNET is not set # CONFIG_PIPES is not set # CONFIG_PM is not set @@ -374,6 +410,8 @@ CONFIG_DM9X_MODE_AUTO=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -397,14 +435,11 @@ CONFIG_UART1_SERIALDRIVER=y # 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 is not set CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_UART1_SERIAL_CONSOLE is not set @@ -422,6 +457,7 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_DMA is not set # # UART1 Configuration @@ -434,19 +470,23 @@ 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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -470,6 +510,7 @@ CONFIG_NET_GUARDSIZE=2 # # CONFIG_NET_MULTILINK is not set CONFIG_NET_ETHERNET=y +# CONFIG_NET_LOOPBACK is not set # CONFIG_NET_TUN is not set # @@ -555,6 +596,7 @@ CONFIG_IOB_NCHAINS=8 # Routing Table Configuration # # CONFIG_NET_ROUTE is not set +CONFIG_NET_HOSTNAME="" # # Crypto API @@ -577,12 +619,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # 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 # @@ -602,6 +638,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -642,10 +682,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -660,14 +704,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -675,11 +718,12 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -688,18 +732,19 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD 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 @@ -707,20 +752,30 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_USBTERM is not set +# CONFIG_EXAMPLES_WATCHDOG is not set CONFIG_EXAMPLES_WEBSERVER=y CONFIG_EXAMPLES_WEBSERVER_IPADDR=0x0a000002 CONFIG_EXAMPLES_WEBSERVER_DRIPADDR=0x0a000001 CONFIG_EXAMPLES_WEBSERVER_NETMASK=0xffffff00 CONFIG_EXAMPLES_WEBSERVER_NOMAC=y -# CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBTERM is not set -# CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WGET is not set +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + # # Graphics Support # @@ -731,22 +786,24 @@ CONFIG_EXAMPLES_WEBSERVER_NOMAC=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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_NETLIB=y # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set CONFIG_NETUTILS_WEBSERVER=y # CONFIG_NETUTILS_HTTPD_SINGLECONNECT is not set @@ -762,11 +819,6 @@ CONFIG_NETUTILS_HTTPD_CLASSIC=y CONFIG_NETUTILS_HTTPD_KEEPALIVE_DISABLE=y # CONFIG_NETUTILS_XMLRPC is not set -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # @@ -784,15 +836,16 @@ CONFIG_NETUTILS_HTTPD_KEEPALIVE_DISABLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_POWEROFF is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/nucleo-144/Kconfig b/configs/nucleo-144/Kconfig index 57585efaff09ef6d275fcb64af9fada473ab9e05..96427a9a5e287490b9ccb16223a3b04c512f3130 100644 --- a/configs/nucleo-144/Kconfig +++ b/configs/nucleo-144/Kconfig @@ -5,4 +5,219 @@ if ARCH_BOARD_NUCLEO_144 +choice + prompt "Select Console wiring." + default NUCLEO_ARDUINO + ---help--- + Select where you will connect the console. + + Virtual COM Port: + + Advantage: Use the ST-Link as a console. No Extra wiring + neded. + + Disdvantage: Not the best choice for initanl bring up. + + ARDUINO Connector: + + Advantage: You have a shield so it is + easy. + + Disdvantage: You loose the use of the + other functions on PC6, PC7 + + STM32F7 + ARDUIONO FUNCTION GPIO + -- ----- --------- ---- + DO RX USART6_RX PG9 + D1 TX USART6_TX PG14 + -- ----- --------- --- + + OR + + Morpho Connector: + + STM32F7 + MORPHO FUNCTION GPIO + -------- --------- ----- + CN12-64 USART8_RX PE0 + CN11-61 USART8_TX PE1 + -------- --------- ----- + +config NUCLEO_CONSOLE_ARDUINO + bool "ARDUINO Connector" + select STM32F7_USART6 + select USART6_SERIALDRIVER + select USART6_SERIAL_CONSOLE + +config NUCLEO_CONSOLE_VIRTUAL + bool "Virtual Comport" + select STM32F7_USART3 + select USART3_SERIALDRIVER + select USART3_SERIAL_CONSOLE + +config NUCLEO_CONSOLE_MORPHO + bool "Morpho Connector" + select STM32F7_UART8 + select UART8_SERIALDRIVER + select UART8_SERIAL_CONSOLE + +config NUCLEO_CONSOLE_NONE + bool "No Console" + +endchoice # "Select Console wiring" + +config NUCLEO_SPI_TEST + bool "Enable SPI test" + default n + ---help--- + Enable Spi test - initalize and configure SPI to send + NUCLEO_SPI_TEST_MESSAGE text. The text is sent on the + selected SPI Buses with the configured parameters. + Note the CS lines will not be asserted. + +if NUCLEO_SPI_TEST + +config NUCLEO_SPI_TEST_MESSAGE + string "Text to Send on SPI Bus(es)" + default "Hello World" + depends on NUCLEO_SPI_TEST + ---help--- + Text to sent on SPI bus(es) + +config NUCLEO_SPI1_TEST + bool "Test SPI bus 1" + default n + depends on NUCLEO_SPI_TEST + ---help--- + Enable Spi test - on SPI BUS 1 + +if NUCLEO_SPI1_TEST + +config NUCLEO_SPI1_TEST_FREQ + int "SPI 1 Clock Freq in Hz" + default 1000000 + depends on NUCLEO_SPI1_TEST + ---help--- + Sets SPI 1 Clock Freq + +config NUCLEO_SPI1_TEST_BITS + int "SPI 1 number of bits" + default 8 + depends on NUCLEO_SPI1_TEST + ---help--- + Sets SPI 1 bit length + +choice + prompt "SPI BUS 1 Clock Mode" + default NUCLEO_SPI1_TEST_MODE3 + ---help--- + Sets SPI 1 clock mode + +config NUCLEO_SPI1_TEST_MODE0 + bool "CPOL=0 CHPHA=0" + +config NUCLEO_SPI1_TEST_MODE1 + bool "CPOL=0 CHPHA=1" + +config NUCLEO_SPI1_TEST_MODE2 + bool "CPOL=1 CHPHA=0" + +config NUCLEO_SPI1_TEST_MODE3 + bool "CPOL=1 CHPHA=1" + +endchoice # "SPI BUS 1 Clock Mode" + +endif # NUCLEO_SPI1_TEST + +config NUCLEO_SPI2_TEST + bool "Test SPI bus 2" + default n + depends on NUCLEO_SPI_TEST + ---help--- + Enable Spi test - on SPI BUS 2 + +if NUCLEO_SPI2_TEST + +config NUCLEO_SPI2_TEST_FREQ + int "SPI 2 Clock Freq in Hz" + default 12000000 + depends on NUCLEO_SPI2_TEST + ---help--- + Sets SPI 2 Clock Freq + +config NUCLEO_SPI2_TEST_BITS + int "SPI 2 number of bits" + default 8 + depends on NUCLEO_SPI2_TEST + ---help--- + Sets SPI 2 bit length + +choice + prompt "SPI BUS 2 Clock Mode" + default NUCLEO_SPI2_TEST_MODE3 + ---help--- + Sets SPI 2 clock mode + +config NUCLEO_SPI2_TEST_MODE0 + bool "CPOL=0 CHPHA=0" + +config NUCLEO_SPI2_TEST_MODE1 + bool "CPOL=0 CHPHA=1" + +config NUCLEO_SPI2_TEST_MODE2 + bool "CPOL=1 CHPHA=0" + +config NUCLEO_SPI2_TEST_MODE3 + bool "CPOL=1 CHPHA=1" + +endchoice # "SPI BUS 2 Clock Mode" + +endif # NUCLEO_SPI2_TEST + +config NUCLEO_SPI3_TEST + bool "Test SPI bus 3" + default n + depends on NUCLEO_SPI_TEST + ---help--- + Enable Spi test - on SPI BUS 3 + +if NUCLEO_SPI3_TEST + +config NUCLEO_SPI3_TEST_FREQ + int "SPI 3 Clock Freq in Hz" + default 40000000 + depends on NUCLEO_SPI3_TEST + ---help--- + Sets SPI 3 Clock Freq + +config NUCLEO_SPI3_TEST_BITS + int "SPI 3 number of bits" + default 8 + depends on NUCLEO_SPI3_TEST + ---help--- + Sets SPI 3 bit length + +choice + prompt "SPI BUS 3 Clock Mode" + default NUCLEO_SPI3_TEST_MODE3 + ---help--- + Sets SPI 3 clock mode + +config NUCLEO_SPI3_TEST_MODE0 + bool "CPOL=0 CHPHA=0" + +config NUCLEO_SPI3_TEST_MODE1 + bool "CPOL=0 CHPHA=1" + +config NUCLEO_SPI3_TEST_MODE2 + bool "CPOL=1 CHPHA=0" + +config NUCLEO_SPI3_TEST_MODE3 + bool "CPOL=1 CHPHA=1" + +endchoice # "SPI BUS 3 Clock Mode" + +endif # NUCLEO_SPI3_TEST +endif # NUCLEO_SPI_TEST endif # ARCH_BOARD_NUCLEO_144 diff --git a/configs/nucleo-144/README.txt b/configs/nucleo-144/README.txt index e99cd427de3c9e0a39d3f573a8fa9c375cab7fda..6226299546a4e2d04b4501464a530571acec072a 100644 --- a/configs/nucleo-144/README.txt +++ b/configs/nucleo-144/README.txt @@ -11,6 +11,7 @@ Contents - Nucleo-144 Boards - Nucleo F746ZG + - Nucleo F767ZI - Development Environment - IDEs - Basic configuaration & build steps @@ -18,7 +19,12 @@ Contents - Button - LED - U[S]ARTs and Serial Consoles + - SPI + - SDIO - MMC + - SPI Test - Configurations + f7xx-nsh + f7xx-evalos Nucleo-144 Boards: ================= @@ -63,7 +69,7 @@ Common Board Features: Nucleo F746ZG ============= -At present only the ST Nucleo F746ZG board from ST Micro is supported. See +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 @@ -80,7 +86,7 @@ NUCLEO-F746ZG Features: + 16KB of instruction TCM RAM + 4KB of backup SRAM ADC: 3×12-bit, 2.4 MSPS ADC: up to 24 channels and 7.2 MSPS in triple interleaved mode - DMA: 16-stream DMA controllers with FIFOs and burst support + DMA: 2 X 16-stream DMA controllers with FIFOs and burst support Timers: Up to 18 timers: up to thirteen 16-bit (1x 16-bit lowpower), two 32-bit timers, 2x watchdogs, SysTick GPIO: 114 I/O ports with interrupt capability @@ -105,9 +111,58 @@ NUCLEO-F746ZG Features: TRG: True random number generator RTC -See https://developer.mbed.org/platforms/ST-Nucleo-F746ZG form additional +See https://developer.mbed.org/platforms/ST-Nucleo-F746ZG for additional information about this board. +Nucleo F767ZI +============= + +ST Nucleo F7467ZI 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-f767zi.html + +The Nucleo F767ZI order part number is NUCLEO-F767ZI. It is one member of +the STM32 Nucleo-144 board family. + +NUCLEO-F767ZI Features: +---------------------- + + Microprocessor: STM32F767ZIT6 Core: ARM 32-bit Cortex®-M7 CPU with DPFPU, + L1-cache: 16KB data cache and 16KB instruction cache, up to + 216 MHz, MPU, and DSP instructions. + Memory: 2048 KB Flash 512KB of SRAM (including 128KB of data TCM RAM) + + 16KB of instruction TCM RAM + 4KB of backup SRAM + ADC: 3×12-bit, 2.4 MSPS ADC: up to 24 channels and 7.2 MSPS in + triple interleaved mode + DMA: 2 X 16-stream DMA controllers with FIFOs and burst support + Timers: Up to 18 timers: up to thirteen 16-bit (1x 16-bit lowpower), + two 32-bit timers, 2x watchdogs, SysTick + GPIO: 114 I/O ports with interrupt capability + LCD: LCD-TFT Controllerwith (DMA2D), Parallel interface + I2C: 4 × I2C interfaces (SMBus/PMBus) + U[S]ARTs: 4 USARTs, 4 UARTs (27 Mbit/s, ISO7816 interface, LIN, IrDA, + modem control) + SPI/12Ss: 6/3 (simplex) (up to 50 Mbit/s), 3 with muxed simplex I2S + for audio class accuracy via internal audio PLL or external + clock + QSPI: Dual mode Quad-SPI + SAIs: 2 Serial Audio Interfaces + CAN: 3 X CAN interface + SDMMC interface + SPDIFRX interface + USB: USB 2.0 full/High-speed device/host/OTG controller with on-chip + PHY + 10/100 Ethernet: MAC with dedicated DMA: supports IEEE 1588v2 hardware, + MII/RMII + Camera Interface: 8/14 Bit + CRC calculation unit + TRG: True random number generator + RTC subsecond accuracy, hardware calendar + +As of this writting the NUCLEO-F767ZI is not available on developer.mbed.org +However, See https://developer.mbed.org/platforms/ST-Nucleo-F746ZG for additional +useful information. + Development Environment ======================= @@ -154,8 +209,8 @@ Basic configuration & build steps Hardware ======== - GPIO - there are 144 I/O lines on the STM32F746ZGT6 with various pins pined out - on the Nucleo F746ZG. + GPIO - there are 144 I/O lines on the STM32F7xxZxT6 with various pins pined out + on the Nucleo 144. See https://developer.mbed.org/platforms/ST-Nucleo-F746ZG/ for slick graphic pinouts. @@ -168,19 +223,47 @@ Hardware Our main concern is establishing a console and LED utilization for debugging. Because so many pins can be multiplexed with so many functions, - the above mentioned graphic is super helpful in indentifying a serial port - that will not rob us of another IO feature. Namely Serial Port 8 (UART8) - with TX on PE1 and RX on PE0. Of course if your design has used those - pins you can choose another IO configuration to bring out Serial Port 8 - or choose a completely different U[S]ART to use as the console. - In that Case, You will need to edit the include/board.h to select different - U[S]ART and / or pin selections. - - Serial - ------ + the above mentioned graphic may be helpful in indentifying a serial port. + + There are 4 choices that can be made from the menuconfig: + + CONFIG_NUCLEO_CONSOLE_ARDUINO or CONFIG_NUCLEO_CONSOLE_MORPHO or + CONFIG_NUCLEO_CONSOLE_VIRTUAL or CONFIG_NUCLEO_CONSOLE_NONE + + The CONFIG_NUCLEO_CONSOLE_NONE makes no preset for the console. YOu shuld still visit + the U[S]ART selection and Device Drivers to disable any U[S]ART reamaing. + + The CONFIG_NUCLEO_CONSOLE_ARDUINO configurations assume that you are using a + standard Arduio RS-232 shield with the serial interface with RX on pin D0 and + TX on pin D1 from USART6: + + -------- --------------- + STM32F7 + ARDUIONO FUNCTION GPIO + -- ----- --------- ----- + DO RX USART6_RX PG9 + D1 TX USART6_TX PG14 + -- ----- --------- ----- + + The CONFIG_NUCLEO_CONSOLE_MORPHO configurations uses Serial Port 8 (USART8) + with TX on PE1 and RX on PE0. + Serial + ------ + SERIAL_RX PE_0 + SERIAL_TX PE_1 + + The CONFIG_NUCLEO_CONSOLE_VIRTUAL configurations uses Serial Port 3 (USART3) + with TX on PD8 and RX on PD9. + Serial + ------ + SERIAL_RX PD9 + SERIAL_TX PD8 + + These signals are internalaly connected to the on board ST-Link - SERIAL_RX PE_0 - SERIAL_TX PE_1 + Of course if your design has used those pins you can choose a completely + different U[S]ART to use as the console. In that Case, you will need to edit + the include/board.h to select different U[S]ART and / or pin selections. Buttons ------- @@ -202,32 +285,36 @@ Hardware include/board.h and src/stm32_autoleds.c. The LEDs are used to encode OS related events as follows when the LEDs are available: - SYMBOL Meaning RED GREEN BLUE - ------------------- ----------------------- ----------- + SYMBOL Meaning RED GREEN BLUE + ------------------- ----------------------- --- ----- ---- - LED_STARTED 0 OFF OFF OFF - LED_HEAPALLOCATE 0 OFF OFF OFF - LED_IRQSENABLED 0 OFF OFF OFF - LED_STACKCREATED 1 OFF ON OFF - LED_INIRQ 2 NC NC ON (momentary) - LED_SIGNAL 2 NC NC ON (momentary) - LED_ASSERTION 3 ON NC NC (momentary) - LED_PANIC 4 ON OFF OFF (flashing 2Hz) + LED_STARTED NuttX has been started OFF OFF OFF + LED_HEAPALLOCATE Heap has been allocated OFF OFF ON + LED_IRQSENABLED Interrupts enabled OFF ON OFF + LED_STACKCREATED Idle stack created OFF ON ON + LED_INIRQ In an interrupt NC NC ON (momentary) + LED_SIGNAL In a signal handler NC ON OFF (momentary) + LED_ASSERTION An assertion failed ON NC ON (momentary) + LED_PANIC The system has crashed ON OFF OFF (flashing 2Hz) + LED_IDLE MCU is is sleep mode ON OFF OFF -OFF - means that the OS is still initializing. Initialization is very fast so - if you see this at all, it probably means that the system is hanging up - somewhere in the initialization phases. -GREEN - This means that the OS completed initialization. +OFF - means that the OS is still initializing. Initialization is very fast + so if you see this at all, it probably means that the system is + hanging up somewhere in the initialization phases. -BLUE - Whenever and interrupt or signal handler is entered, the BLUE LED is - illuminated and extinguished when the interrupt or signal handler exits. +GREEN - This means that the OS completed initialization. -RED - If a recovered assertion occurs, the RED LED will be illuminated - briefly while the assertion is handled. You will probably never see this. +BLUE - Whenever and interrupt or signal handler is entered, the BLUE LED is + illuminated and extinguished when the interrupt or signal handler + exits. + +VIOLET - If a recovered assertion occurs, the RED and blue LED will be + illuminated briefly while the assertion is handled. You will + probably never see this. Flashing RED - In the event of a fatal crash, all other LEDs will be -extinguished and RED LED will FLASH at a 2Hz rate. + extinguished and RED LED will FLASH at a 2Hz rate. Thus if the GREEN LED is lit, NuttX has successfully booted and is, @@ -238,30 +325,67 @@ extinguished and RED LED will FLASH at a 2Hz rate. Serial Consoles =============== - USART8 + USART6 (CONFIG_NUCLEO_CONSOLE_ARDUINO) ------ + STM32F7 + ARDUIONO FUNCTION GPIO + -- ----- --------- ----- + DO RX USART6_RX PG9 + D1 TX USART6_TX PG14 + -- ----- --------- ----- + + You must use a 3.3 TTL to RS-232 converter or a USB to 3.3V TTL + + Nucleo 144 FTDI TTL-232R-3V3 + ------------- ------------------- + TXD - D1-TXD - RXD - Pin 5 (Yellow) + RXD - D0-RXD - TXD - Pin 4 (Orange) + GND GND - GND Pin 1 (Black) + ------------- ------------------- + + *Note you will be reverse RX/TX + + Use make menuconfig to configure USART6 as the console: + + CONFIG_STM32F7_USART6=y + CONFIG_USARTs_SERIALDRIVER=y + CONFIG_USARTS_SERIAL_CONSOLE=y + CONFIG_USART6_RXBUFSIZE=256 + CONFIG_USART6_TXBUFSIZE=256 + CONFIG_USART6_BAUD=115200 + CONFIG_USART6_BITS=8 + CONFIG_USART6_PARITY=0 + CONFIG_USART6_2STOP=0 + + USART8 (CONFIG_NUCLEO_CONSOLE_MORPHO) + ------ + Pins and Connectors: - GPIO Connector NAME - RXD: PE0 CN11 pin 64, PE0 - CN10 pin 33, D34 + FUNC GPIO Connector + Pin NAME + ---- --- ------- ---- + TXD: PE1 CN11-61, PE1 + RXD: PE0 CN12-64, PE0 + CN10-33, D34 + ---- --- ------- ---- - TXD: PE1 CN11 pin 61, PE1 You must use a 3.3 TTL to RS-232 converter or a USB to 3.3V TTL Nucleo 144 FTDI TTL-232R-3V3 - ----------- ------------ - TXD - CN11 pin 64 - RXD - Pin 5 (Yellow) - RXD - CN11 pin 61 - TXD - Pin 4 (Orange) - GND CN11 pin 63 GND Pin 1 (Black) + ------------- ------------------- + TXD - CN11-61 - RXD - Pin 5 (Yellow) + RXD - CN12-64 - TXD - Pin 4 (Orange) + GND CN12-63 - GND Pin 1 (Black) + ------------- ------------------- *Note you will be reverse RX/TX Use make menuconfig to configure USART8 as the console: CONFIG_STM32F7_UART8=y - CONFIG_USART8_SERIALDRIVER=y - CONFIG_USART8_SERIAL_CONSOLE=y + CONFIG_UART8_SERIALDRIVER=y + CONFIG_UART8_SERIAL_CONSOLE=y CONFIG_UART8_RXBUFSIZE=256 CONFIG_UART8_TXBUFSIZE=256 CONFIG_UART8_BAUD=115200 @@ -269,7 +393,7 @@ Serial Consoles CONFIG_UART8_PARITY=0 CONFIG_UART8_2STOP=0 - Virtual COM Port + Virtual COM Port (CONFIG_NUCLEO_CONSOLE_VIRTUAL) ---------------- Yet another option is to use USART3 and the USB virtual COM port. This option may be more convenient for long term development, but is painful @@ -290,14 +414,72 @@ Serial Consoles As shipped, SB4 and SB7 are open and SB5 and SB6 closed, so the virtual COM port is enabled. + +SPI +--- + Since this board is so generic, having a quick way to vet the SPI + configuration seams in order. So the board provides a quick test + that can be selected vi CONFIG_NUCLEO_SPI_TEST that will initalise + the selected buses (SPI1-SPI3) and send some text on the bus at + application initalization time board_app_initialize. + +SDIO +---- + To test the SD performace one can use a SparkFun microSD Sniffer + from https://www.sparkfun.com/products/9419 or similar board + and connect it as follows: + + VCC V3.3 CN11 16 + GND GND CN11-8 + CMD PD2 CN11-4 + CLK PC12 CN11-3 + DAT0 - PC8 CN12-2 + DAT1 - PC9 CN12-1 + DAT2 PC10 CN11-1 + CD PC11 CN11-2 + +SPI Test +======== + + The builtin SPI test facility can be enabled with the following settings: + + +CONFIG_STM32F7_SPI=y + +CONFIG_STM32F7_SPI1=y + +CONFIG_STM32F7_SPI2=y + +CONFIG_STM32F7_SPI3=y + + +# CONFIG_STM32F7_SPI_INTERRUPTS is not set + +# CONFIG_STM32F7_SPI_DMA is not set + # CONFIG_STM32F7_CUSTOM_CLOCKCONFIG is not set + + +CONFIG_NUCLEO_SPI_TEST=y + +CONFIG_NUCLEO_SPI_TEST_MESSAGE="Hello World" + +CONFIG_NUCLEO_SPI1_TEST=y + +CONFIG_NUCLEO_SPI1_TEST_FREQ=1000000 + +CONFIG_NUCLEO_SPI1_TEST_BITS=8 + +CONFIG_NUCLEO_SPI1_TEST_MODE3=y + + +CONFIG_NUCLEO_SPI2_TEST=y + +CONFIG_NUCLEO_SPI2_TEST_FREQ=12000000 + +CONFIG_NUCLEO_SPI2_TEST_BITS=8 + +CONFIG_NUCLEO_SPI2_TEST_MODE3=y + + +CONFIG_NUCLEO_SPI3_TEST=y + +CONFIG_NUCLEO_SPI3_TEST_FREQ=40000000 + +CONFIG_NUCLEO_SPI3_TEST_BITS=8 + +CONFIG_NUCLEO_SPI3_TEST_MODE3=y + + +CONFIG_LIB_BOARDCTL=y + +CONFIG_NSH_ARCHINIT=y + Configurations ============== -nsh: +f7xx-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 + on USART6. Support for builtin applications is enabled, but in the base configuration no builtin applications are selected (see NOTES below). NOTES: @@ -333,7 +515,7 @@ nsh: device configured for UART8 (see instruction above under "Serial Consoles). -evalos: +f7xx-evalos: ------- This configuration is designed to test the features of the board. - Configures the NuttShell (nsh) located at apps/examples/nsh for the diff --git a/configs/nucleo-144/f746-evalos/Make.defs b/configs/nucleo-144/f746-evalos/Make.defs new file mode 100644 index 0000000000000000000000000000000000000000..62c52e12f473e895de441805e9af17d070f74aec --- /dev/null +++ b/configs/nucleo-144/f746-evalos/Make.defs @@ -0,0 +1,114 @@ +############################################################################ +# configs/nucleo-144/f746-evalos/Make.defs +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Authors: Gregory Nutt +# Mark Olsson +# 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. +# +############################################################################ + +include ${TOPDIR}/.config +include ${TOPDIR}/tools/Config.mk +include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs + +LDSCRIPT = f746-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/f746-evalos/defconfig similarity index 78% rename from configs/nucleo-144/evalos/defconfig rename to configs/nucleo-144/f746-evalos/defconfig index 9944952cac6adde942f3502c56f7382b5ad68b5d..e95085b7c84d3c95716185a2c3bf95c48c99ff71 100644 --- a/configs/nucleo-144/evalos/defconfig +++ b/configs/nucleo-144/f746-evalos/defconfig @@ -16,7 +16,7 @@ CONFIG_HOST_LINUX=y # # Build Configuration # -CONFIG_APPS_DIR="../apps" +# CONFIG_APPS_DIR="../apps" CONFIG_BUILD_FLAT=y # CONFIG_BUILD_2PASS is not set @@ -24,7 +24,7 @@ CONFIG_BUILD_FLAT=y # Binary Output Formats # # CONFIG_RRLOAD_BINARY is not set -CONFIG_INTELHEX_BINARY=y +# CONFIG_INTELHEX_BINARY is not set # CONFIG_MOTOROLA_SREC is not set CONFIG_RAW_BINARY=y # CONFIG_UBOOT_UIMAGE is not set @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y -# CONFIG_STACK_COLORATION is not set +CONFIG_STACK_COLORATION=y +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y CONFIG_DEBUG_NOOPT=y @@ -124,7 +126,7 @@ 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_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set # CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y @@ -152,23 +154,120 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # 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 +CONFIG_SERIAL_DISABLE_REORDERING=y # # STM32 F7 Configuration Options # -# CONFIG_ARCH_CHIP_STM32F745 is not set -CONFIG_ARCH_CHIP_STM32F746=y -# CONFIG_ARCH_CHIP_STM32F756 is not set +# CONFIG_ARCH_CHIP_STM32F745VG is not set +# CONFIG_ARCH_CHIP_STM32F745VE is not set +# CONFIG_ARCH_CHIP_STM32F745IG is not set +# CONFIG_ARCH_CHIP_STM32F745IE is not set +# CONFIG_ARCH_CHIP_STM32F745ZE is not set +# CONFIG_ARCH_CHIP_STM32F745ZG is not set +# CONFIG_ARCH_CHIP_STM32F746BG is not set +# CONFIG_ARCH_CHIP_STM32F746VG is not set +# CONFIG_ARCH_CHIP_STM32F746VE is not set +# CONFIG_ARCH_CHIP_STM32F746BE is not set +CONFIG_ARCH_CHIP_STM32F746ZG=y +# CONFIG_ARCH_CHIP_STM32F746IE is not set +# CONFIG_ARCH_CHIP_STM32F746NG is not set +# CONFIG_ARCH_CHIP_STM32F746NE is not set +# CONFIG_ARCH_CHIP_STM32F746ZE is not set +# CONFIG_ARCH_CHIP_STM32F746IG is not set +# CONFIG_ARCH_CHIP_STM32F756NG is not set +# CONFIG_ARCH_CHIP_STM32F756BG is not set +# CONFIG_ARCH_CHIP_STM32F756IG is not set +# CONFIG_ARCH_CHIP_STM32F756VG is not set +# CONFIG_ARCH_CHIP_STM32F756ZG is not set +# CONFIG_ARCH_CHIP_STM32F765NI is not set +# CONFIG_ARCH_CHIP_STM32F765VI is not set +# CONFIG_ARCH_CHIP_STM32F765VG is not set +# CONFIG_ARCH_CHIP_STM32F765BI is not set +# CONFIG_ARCH_CHIP_STM32F765NG is not set +# CONFIG_ARCH_CHIP_STM32F765ZG is not set +# CONFIG_ARCH_CHIP_STM32F765ZI is not set +# CONFIG_ARCH_CHIP_STM32F765IG is not set +# CONFIG_ARCH_CHIP_STM32F765BG is not set +# CONFIG_ARCH_CHIP_STM32F765II is not set +# CONFIG_ARCH_CHIP_STM32F767NG is not set +# CONFIG_ARCH_CHIP_STM32F767IG is not set +# CONFIG_ARCH_CHIP_STM32F767VG is not set +# CONFIG_ARCH_CHIP_STM32F767ZG is not set +# CONFIG_ARCH_CHIP_STM32F767NI is not set +# CONFIG_ARCH_CHIP_STM32F767VI is not set +# CONFIG_ARCH_CHIP_STM32F767BG is not set +# CONFIG_ARCH_CHIP_STM32F767ZI is not set +# CONFIG_ARCH_CHIP_STM32F767II is not set +# CONFIG_ARCH_CHIP_STM32F769BI is not set +# CONFIG_ARCH_CHIP_STM32F769II is not set +# CONFIG_ARCH_CHIP_STM32F769BG is not set +# CONFIG_ARCH_CHIP_STM32F769NI is not set +# CONFIG_ARCH_CHIP_STM32F769AI is not set +# CONFIG_ARCH_CHIP_STM32F769NG is not set +# CONFIG_ARCH_CHIP_STM32F769IG is not set +# CONFIG_ARCH_CHIP_STM32F777ZI is not set +# CONFIG_ARCH_CHIP_STM32F777VI is not set +# CONFIG_ARCH_CHIP_STM32F777NI is not set +# CONFIG_ARCH_CHIP_STM32F777BI is not set +# CONFIG_ARCH_CHIP_STM32F777II is not set +# CONFIG_ARCH_CHIP_STM32F778AI is not set +# CONFIG_ARCH_CHIP_STM32F779II is not set +# CONFIG_ARCH_CHIP_STM32F779NI is not set +# CONFIG_ARCH_CHIP_STM32F779BI is not set +# CONFIG_ARCH_CHIP_STM32F779AI 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 +# CONFIG_STM32F7_STM32F76XX is not set +# CONFIG_STM32F7_STM32F77XX is not set +# CONFIG_STM32F7_IO_CONFIG_V is not set +# CONFIG_STM32F7_IO_CONFIG_I is not set +CONFIG_STM32F7_IO_CONFIG_Z=y +# CONFIG_STM32F7_IO_CONFIG_N is not set +# CONFIG_STM32F7_IO_CONFIG_B is not set +# CONFIG_STM32F7_IO_CONFIG_A is not set +# CONFIG_STM32F7_STM32F745XX is not set +CONFIG_STM32F7_STM32F746XX=y +# CONFIG_STM32F7_STM32F756XX is not set +# CONFIG_STM32F7_STM32F765XX is not set +# CONFIG_STM32F7_STM32F767XX is not set +# CONFIG_STM32F7_STM32F768XX is not set +# CONFIG_STM32F7_STM32F768AX is not set +# CONFIG_STM32F7_STM32F769XX is not set +# CONFIG_STM32F7_STM32F769AX is not set +# CONFIG_STM32F7_STM32F777XX is not set +# CONFIG_STM32F7_STM32F778XX is not set +# CONFIG_STM32F7_STM32F778AX is not set +# CONFIG_STM32F7_STM32F779XX is not set +# CONFIG_STM32F7_STM32F779AX is not set +# CONFIG_STM32F7_FLASH_CONFIG_E is not set +# CONFIG_STM32F7_FLASH_CONFIG_I is not set +CONFIG_STM32F7_FLASH_OVERRIDE_DEFAULT=y +# CONFIG_STM32F7_FLASH_OVERRIDE_E is not set +# CONFIG_STM32F7_FLASH_OVERRIDE_G is not set +# CONFIG_STM32F7_FLASH_OVERRIDE_I is not set # # STM32 Peripheral Support # CONFIG_STM32F7_HAVE_LTDC=y +CONFIG_STM32F7_HAVE_FSMC=y +CONFIG_STM32F7_HAVE_ETHRNET=y +CONFIG_STM32F7_HAVE_RNG=y +CONFIG_STM32F7_HAVE_SPI5=y +CONFIG_STM32F7_HAVE_SPI6=y +# CONFIG_STM32F7_HAVE_SDMMC2 is not set +# CONFIG_STM32F7_HAVE_ADC1_DMA is not set +# CONFIG_STM32F7_HAVE_ADC2_DMA is not set +# CONFIG_STM32F7_HAVE_ADC3_DMA is not set +# CONFIG_STM32F7_HAVE_CAN3 is not set +CONFIG_STM32F7_HAVE_DCMI=y +# CONFIG_STM32F7_HAVE_DSIHOST is not set +CONFIG_STM32F7_HAVE_DMA2D=y +# CONFIG_STM32F7_HAVE_JPEG is not set +# CONFIG_STM32F7_HAVE_CRYP is not set +# CONFIG_STM32F7_HAVE_HASH is not set +# CONFIG_STM32F7_HAVE_DFSDM1 is not set # CONFIG_STM32F7_ADC is not set # CONFIG_STM32F7_CAN is not set # CONFIG_STM32F7_DAC is not set @@ -176,6 +275,7 @@ CONFIG_STM32F7_HAVE_LTDC=y # CONFIG_STM32F7_I2C is not set # CONFIG_STM32F7_SAI is not set # CONFIG_STM32F7_SPI is not set +# CONFIG_STM32F7_TIM is not set CONFIG_STM32F7_USART=y # CONFIG_STM32F7_ADC1 is not set # CONFIG_STM32F7_ADC2 is not set @@ -185,25 +285,25 @@ CONFIG_STM32F7_USART=y # 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_DMA2D 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_I2C4 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_SAI1 is not set # CONFIG_STM32F7_SAI2 is not set # CONFIG_STM32F7_SDMMC1 is not set # CONFIG_STM32F7_SPDIFRX is not set @@ -227,7 +327,6 @@ CONFIG_STM32F7_USART=y # 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 @@ -242,10 +341,15 @@ CONFIG_STM32F7_USART3=y # # U[S]ART Configuration # -# CONFIG_STM32F7_FLOWCONTROL_BROKEN is not set -# CONFIG_STM32F7_USART_BREAKS is not set +CONFIG_STM32F7_FLOWCONTROL_BROKEN=y +CONFIG_STM32F7_USART_BREAKS=y +CONFIG_STM32F7_SERIALBRK_BSDCOMPAT=y # CONFIG_STM32F7_CUSTOM_CLOCKCONFIG is not set +# +# Timer Configuration +# + # # Architecture Options # @@ -308,7 +412,6 @@ CONFIG_RAM_SIZE=245760 # 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" @@ -326,6 +429,11 @@ CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_NUCLEO_CONSOLE_ARDUINO is not set +CONFIG_NUCLEO_CONSOLE_VIRTUAL=y +# CONFIG_NUCLEO_CONSOLE_MORPHO is not set +# CONFIG_NUCLEO_CONSOLE_NONE is not set +# CONFIG_NUCLEO_SPI_TEST is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_UNIQUEID is not set # CONFIG_BOARDCTL_TSCTEST is not set @@ -337,12 +445,7 @@ CONFIG_LIB_BOARDCTL=y # # 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 +# CONFIG_DISABLE_OS_API is not set # # Clocks and Timers @@ -351,9 +454,9 @@ 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_START_YEAR=2015 +CONFIG_START_MONTH=11 +CONFIG_START_DAY=30 CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=4 CONFIG_WDOG_INTRESERVE=0 @@ -395,7 +498,9 @@ CONFIG_SDCLONE_DISABLE=y CONFIG_NFILE_DESCRIPTORS=8 CONFIG_NFILE_STREAMS=8 CONFIG_NAME_MAX=32 -# CONFIG_PRIORITY_INHERITANCE is not set +CONFIG_PRIORITY_INHERITANCE=y +CONFIG_SEM_PREALLOCHOLDERS=16 +CONFIG_SEM_NNESTPRIO=16 # # RTOS hooks @@ -404,6 +509,7 @@ CONFIG_NAME_MAX=32 # 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 @@ -412,6 +518,7 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGCONDTIMEDOUT=16 +CONFIG_SIG_SIGWORK=17 # # POSIX Message Queue Options @@ -423,9 +530,17 @@ CONFIG_MQ_MAXMSGSIZE=32 # # Work queue support # -# CONFIG_SCHED_WORKQUEUE is not set -# CONFIG_SCHED_HPWORK is not set -# CONFIG_SCHED_LPWORK is not set +CONFIG_SCHED_WORKQUEUE=y +CONFIG_SCHED_HPWORK=y +CONFIG_SCHED_HPWORKPRIORITY=224 +CONFIG_SCHED_HPWORKPERIOD=100000 +CONFIG_SCHED_HPWORKSTACKSIZE=2048 +CONFIG_SCHED_LPWORK=y +CONFIG_SCHED_LPNTHREADS=1 +CONFIG_SCHED_LPWORKPRIORITY=50 +CONFIG_SCHED_LPWORKPRIOMAX=176 +CONFIG_SCHED_LPWORKPERIOD=50000 +CONFIG_SCHED_LPWORKSTACKSIZE=2048 # # Stack and heap information @@ -464,6 +579,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -478,7 +595,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -487,6 +609,7 @@ CONFIG_USERLED=y CONFIG_USERLED_LOWER=y # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -498,6 +621,8 @@ CONFIG_USERLED_LOWER=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -521,10 +646,6 @@ CONFIG_USART3_SERIALDRIVER=y # 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 @@ -551,15 +672,18 @@ CONFIG_USART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -585,6 +709,7 @@ CONFIG_USART3_2STOP=0 # CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set # CONFIG_FS_READABLE is not set # CONFIG_FS_WRITABLE is not set +# CONFIG_FS_AIO is not set # CONFIG_FS_NAMED_SEMAPHORES is not set CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_RAMMAP is not set @@ -597,12 +722,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -675,6 +794,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -695,10 +815,6 @@ CONFIG_HAVE_CXXINITIALIZE=y # Application Configuration # -# -# NxWidgets/NxWM -# - # # Built-In Applications # @@ -723,10 +839,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set CONFIG_EXAMPLES_LEDS=y CONFIG_EXAMPLES_LEDS_PRIORITY=100 CONFIG_EXAMPLES_LEDS_STACKSIZE=2048 @@ -741,17 +857,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -759,17 +875,17 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -791,8 +907,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -803,6 +919,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 @@ -903,6 +1020,10 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_NSH_LOGIN is not set # CONFIG_NSH_CONSOLE_LOGIN is not set +# +# NxWidgets/NxWM +# + # # Platform-specific Support # @@ -911,12 +1032,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -927,7 +1048,8 @@ CONFIG_READLINE_MAX_EXTCMDS=64 CONFIG_READLINE_CMD_HISTORY=y CONFIG_READLINE_CMD_HISTORY_LINELEN=80 CONFIG_READLINE_CMD_HISTORY_LEN=16 +# CONFIG_SYSTEM_STACKMONITOR is not set # CONFIG_SYSTEM_SUDOKU is not set -# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/nucleo-144/evalos/setenv.sh b/configs/nucleo-144/f746-evalos/setenv.sh similarity index 98% rename from configs/nucleo-144/evalos/setenv.sh rename to configs/nucleo-144/f746-evalos/setenv.sh index 0f767948bf43e9a32c7b27bc348ae1e2632de10f..84db5f90ee303d48005822c3fb42213452ddcf4d 100644 --- a/configs/nucleo-144/evalos/setenv.sh +++ b/configs/nucleo-144/f746-evalos/setenv.sh @@ -1,5 +1,5 @@ #!/bin/bash -# configs/nucleo-144/evalos/setenv.sh +# configs/nucleo-144/f746-evalos/setenv.sh # # Copyright (C) 2016 Gregory Nutt. All rights reserved. # Author: Gregory Nutt diff --git a/configs/nucleo-144/evalos/Make.defs b/configs/nucleo-144/f746-nsh/Make.defs similarity index 96% rename from configs/nucleo-144/evalos/Make.defs rename to configs/nucleo-144/f746-nsh/Make.defs index 210c5ff0743db9315d6939deaf18515b3c934dcb..758b9eadb855356fa0f6d3daf159e321d3ea0a2d 100644 --- a/configs/nucleo-144/evalos/Make.defs +++ b/configs/nucleo-144/f746-nsh/Make.defs @@ -1,9 +1,9 @@ ############################################################################ -# configs/nucleo-144/evalos/Make.defs +# configs/nucleo-144/f746-nsh/Make.defs # # Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# Author: Mark Olsson +# Authors: Gregory Nutt +# David Sidrane # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -38,7 +38,7 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs -LDSCRIPT = flash.ld +LDSCRIPT = f746-flash.ld ifeq ($(WINTOOL),y) # Windows-native toolchains @@ -111,3 +111,4 @@ HOSTCC = gcc HOSTINCLUDES = -I. HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe HOSTLDFLAGS = + diff --git a/configs/nucleo-144/nsh/defconfig b/configs/nucleo-144/f746-nsh/defconfig similarity index 79% rename from configs/nucleo-144/nsh/defconfig rename to configs/nucleo-144/f746-nsh/defconfig index cb59abca25ccc44bc79bf7e29845bd4abc3bdf44..d20123a2f0eb48814e5059d05106e012eda5f7ee 100644 --- a/configs/nucleo-144/nsh/defconfig +++ b/configs/nucleo-144/f746-nsh/defconfig @@ -16,7 +16,7 @@ CONFIG_HOST_LINUX=y # # Build Configuration # -CONFIG_APPS_DIR="../apps" +# CONFIG_APPS_DIR="../apps" CONFIG_BUILD_FLAT=y # CONFIG_BUILD_2PASS is not set @@ -24,7 +24,7 @@ CONFIG_BUILD_FLAT=y # Binary Output Formats # # CONFIG_RRLOAD_BINARY is not set -CONFIG_INTELHEX_BINARY=y +# CONFIG_INTELHEX_BINARY is not set # CONFIG_MOTOROLA_SREC is not set CONFIG_RAW_BINARY=y # CONFIG_UBOOT_UIMAGE is not set @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y -# CONFIG_STACK_COLORATION is not set +CONFIG_STACK_COLORATION=y +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y CONFIG_DEBUG_NOOPT=y @@ -124,7 +126,7 @@ 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_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set # CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y @@ -151,22 +153,121 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARMV7M_STACKCHECK is not set # CONFIG_ARMV7M_ITMSYSLOG is not set # CONFIG_SERIAL_TERMIOS is not set +# CONFIG_USART6_RS485 is not set +CONFIG_SERIAL_DISABLE_REORDERING=y # # STM32 F7 Configuration Options # -# CONFIG_ARCH_CHIP_STM32F745 is not set -CONFIG_ARCH_CHIP_STM32F746=y -# CONFIG_ARCH_CHIP_STM32F756 is not set +# CONFIG_ARCH_CHIP_STM32F745VG is not set +# CONFIG_ARCH_CHIP_STM32F745VE is not set +# CONFIG_ARCH_CHIP_STM32F745IG is not set +# CONFIG_ARCH_CHIP_STM32F745IE is not set +# CONFIG_ARCH_CHIP_STM32F745ZE is not set +# CONFIG_ARCH_CHIP_STM32F745ZG is not set +# CONFIG_ARCH_CHIP_STM32F746BG is not set +# CONFIG_ARCH_CHIP_STM32F746VG is not set +# CONFIG_ARCH_CHIP_STM32F746VE is not set +# CONFIG_ARCH_CHIP_STM32F746BE is not set +CONFIG_ARCH_CHIP_STM32F746ZG=y +# CONFIG_ARCH_CHIP_STM32F746IE is not set +# CONFIG_ARCH_CHIP_STM32F746NG is not set +# CONFIG_ARCH_CHIP_STM32F746NE is not set +# CONFIG_ARCH_CHIP_STM32F746ZE is not set +# CONFIG_ARCH_CHIP_STM32F746IG is not set +# CONFIG_ARCH_CHIP_STM32F756NG is not set +# CONFIG_ARCH_CHIP_STM32F756BG is not set +# CONFIG_ARCH_CHIP_STM32F756IG is not set +# CONFIG_ARCH_CHIP_STM32F756VG is not set +# CONFIG_ARCH_CHIP_STM32F756ZG is not set +# CONFIG_ARCH_CHIP_STM32F765NI is not set +# CONFIG_ARCH_CHIP_STM32F765VI is not set +# CONFIG_ARCH_CHIP_STM32F765VG is not set +# CONFIG_ARCH_CHIP_STM32F765BI is not set +# CONFIG_ARCH_CHIP_STM32F765NG is not set +# CONFIG_ARCH_CHIP_STM32F765ZG is not set +# CONFIG_ARCH_CHIP_STM32F765ZI is not set +# CONFIG_ARCH_CHIP_STM32F765IG is not set +# CONFIG_ARCH_CHIP_STM32F765BG is not set +# CONFIG_ARCH_CHIP_STM32F765II is not set +# CONFIG_ARCH_CHIP_STM32F767NG is not set +# CONFIG_ARCH_CHIP_STM32F767IG is not set +# CONFIG_ARCH_CHIP_STM32F767VG is not set +# CONFIG_ARCH_CHIP_STM32F767ZG is not set +# CONFIG_ARCH_CHIP_STM32F767NI is not set +# CONFIG_ARCH_CHIP_STM32F767VI is not set +# CONFIG_ARCH_CHIP_STM32F767BG is not set +# CONFIG_ARCH_CHIP_STM32F767ZI is not set +# CONFIG_ARCH_CHIP_STM32F767II is not set +# CONFIG_ARCH_CHIP_STM32F769BI is not set +# CONFIG_ARCH_CHIP_STM32F769II is not set +# CONFIG_ARCH_CHIP_STM32F769BG is not set +# CONFIG_ARCH_CHIP_STM32F769NI is not set +# CONFIG_ARCH_CHIP_STM32F769AI is not set +# CONFIG_ARCH_CHIP_STM32F769NG is not set +# CONFIG_ARCH_CHIP_STM32F769IG is not set +# CONFIG_ARCH_CHIP_STM32F777ZI is not set +# CONFIG_ARCH_CHIP_STM32F777VI is not set +# CONFIG_ARCH_CHIP_STM32F777NI is not set +# CONFIG_ARCH_CHIP_STM32F777BI is not set +# CONFIG_ARCH_CHIP_STM32F777II is not set +# CONFIG_ARCH_CHIP_STM32F778AI is not set +# CONFIG_ARCH_CHIP_STM32F779II is not set +# CONFIG_ARCH_CHIP_STM32F779NI is not set +# CONFIG_ARCH_CHIP_STM32F779BI is not set +# CONFIG_ARCH_CHIP_STM32F779AI 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 +# CONFIG_STM32F7_STM32F76XX is not set +# CONFIG_STM32F7_STM32F77XX is not set +# CONFIG_STM32F7_IO_CONFIG_V is not set +# CONFIG_STM32F7_IO_CONFIG_I is not set +CONFIG_STM32F7_IO_CONFIG_Z=y +# CONFIG_STM32F7_IO_CONFIG_N is not set +# CONFIG_STM32F7_IO_CONFIG_B is not set +# CONFIG_STM32F7_IO_CONFIG_A is not set +# CONFIG_STM32F7_STM32F745XX is not set +CONFIG_STM32F7_STM32F746XX=y +# CONFIG_STM32F7_STM32F756XX is not set +# CONFIG_STM32F7_STM32F765XX is not set +# CONFIG_STM32F7_STM32F767XX is not set +# CONFIG_STM32F7_STM32F768XX is not set +# CONFIG_STM32F7_STM32F768AX is not set +# CONFIG_STM32F7_STM32F769XX is not set +# CONFIG_STM32F7_STM32F769AX is not set +# CONFIG_STM32F7_STM32F777XX is not set +# CONFIG_STM32F7_STM32F778XX is not set +# CONFIG_STM32F7_STM32F778AX is not set +# CONFIG_STM32F7_STM32F779XX is not set +# CONFIG_STM32F7_STM32F779AX is not set +# CONFIG_STM32F7_FLASH_CONFIG_E is not set +# CONFIG_STM32F7_FLASH_CONFIG_I is not set +CONFIG_STM32F7_FLASH_OVERRIDE_DEFAULT=y +# CONFIG_STM32F7_FLASH_OVERRIDE_E is not set +# CONFIG_STM32F7_FLASH_OVERRIDE_G is not set +# CONFIG_STM32F7_FLASH_OVERRIDE_I is not set # # STM32 Peripheral Support # CONFIG_STM32F7_HAVE_LTDC=y +CONFIG_STM32F7_HAVE_FSMC=y +CONFIG_STM32F7_HAVE_ETHRNET=y +CONFIG_STM32F7_HAVE_RNG=y +CONFIG_STM32F7_HAVE_SPI5=y +CONFIG_STM32F7_HAVE_SPI6=y +# CONFIG_STM32F7_HAVE_SDMMC2 is not set +# CONFIG_STM32F7_HAVE_ADC1_DMA is not set +# CONFIG_STM32F7_HAVE_ADC2_DMA is not set +# CONFIG_STM32F7_HAVE_ADC3_DMA is not set +# CONFIG_STM32F7_HAVE_CAN3 is not set +CONFIG_STM32F7_HAVE_DCMI=y +# CONFIG_STM32F7_HAVE_DSIHOST is not set +CONFIG_STM32F7_HAVE_DMA2D=y +# CONFIG_STM32F7_HAVE_JPEG is not set +# CONFIG_STM32F7_HAVE_CRYP is not set +# CONFIG_STM32F7_HAVE_HASH is not set +# CONFIG_STM32F7_HAVE_DFSDM1 is not set # CONFIG_STM32F7_ADC is not set # CONFIG_STM32F7_CAN is not set # CONFIG_STM32F7_DAC is not set @@ -174,6 +275,7 @@ CONFIG_STM32F7_HAVE_LTDC=y # CONFIG_STM32F7_I2C is not set # CONFIG_STM32F7_SAI is not set # CONFIG_STM32F7_SPI is not set +# CONFIG_STM32F7_TIM is not set CONFIG_STM32F7_USART=y # CONFIG_STM32F7_ADC1 is not set # CONFIG_STM32F7_ADC2 is not set @@ -183,25 +285,25 @@ CONFIG_STM32F7_USART=y # 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_DMA2D 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_I2C4 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_SAI1 is not set # CONFIG_STM32F7_SAI2 is not set # CONFIG_STM32F7_SDMMC1 is not set # CONFIG_STM32F7_SPDIFRX is not set @@ -225,7 +327,6 @@ CONFIG_STM32F7_USART=y # 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 is not set @@ -236,8 +337,19 @@ CONFIG_STM32F7_USART6=y # 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=y +CONFIG_STM32F7_USART_BREAKS=y +CONFIG_STM32F7_SERIALBRK_BSDCOMPAT=y # CONFIG_STM32F7_CUSTOM_CLOCKCONFIG is not set +# +# Timer Configuration +# + # # Architecture Options # @@ -299,7 +411,6 @@ CONFIG_RAM_SIZE=245760 # # Board Selection # -# CONFIG_ARCH_BOARD_STM32F746G_DISCO is not set CONFIG_ARCH_BOARD_NUCLEO_144=y # CONFIG_ARCH_BOARD_CUSTOM is not set CONFIG_ARCH_BOARD="nucleo-144" @@ -318,6 +429,11 @@ CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +CONFIG_NUCLEO_CONSOLE_ARDUINO=y +# CONFIG_NUCLEO_CONSOLE_VIRTUAL is not set +# CONFIG_NUCLEO_CONSOLE_MORPHO is not set +# CONFIG_NUCLEO_CONSOLE_NONE is not set +# CONFIG_NUCLEO_SPI_TEST is not set # CONFIG_LIB_BOARDCTL is not set # @@ -337,9 +453,9 @@ 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_START_YEAR=2015 +CONFIG_START_MONTH=11 +CONFIG_START_DAY=30 CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=4 CONFIG_WDOG_INTRESERVE=0 @@ -450,6 +566,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -464,7 +582,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -472,6 +595,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -483,6 +607,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -506,10 +632,6 @@ 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_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -536,15 +658,18 @@ CONFIG_USART6_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -582,12 +707,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -660,6 +779,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -703,10 +823,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -716,17 +836,17 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_NSH_CXXINITIALIZE is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -734,16 +854,16 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -765,8 +885,8 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -777,6 +897,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 @@ -889,19 +1010,20 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_STACKMONITOR is not set # CONFIG_SYSTEM_SUDOKU is not set -# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/nucleo-144/nsh/setenv.sh b/configs/nucleo-144/f746-nsh/setenv.sh similarity index 98% rename from configs/nucleo-144/nsh/setenv.sh rename to configs/nucleo-144/f746-nsh/setenv.sh index 8498950aed9b16d4a935113de6d9f2a8d9e0baf5..6a5fa6c8011c878b2a67adec5ac57fee59e89bcf 100644 --- a/configs/nucleo-144/nsh/setenv.sh +++ b/configs/nucleo-144/f746-nsh/setenv.sh @@ -1,5 +1,5 @@ #!/bin/bash -# configs/nucleo-144/nsh/setenv.sh +# configs/nucleo-144/f746-nsh/setenv.sh # # Copyright (C) 2016 Gregory Nutt. All rights reserved. # Author: Gregory Nutt diff --git a/configs/nucleo-144/f767-evalos/Make.defs b/configs/nucleo-144/f767-evalos/Make.defs new file mode 100644 index 0000000000000000000000000000000000000000..3e25864217f4c8131239c01e65e701c5db329f0b --- /dev/null +++ b/configs/nucleo-144/f767-evalos/Make.defs @@ -0,0 +1,114 @@ +############################################################################ +# configs/nucleo-144/f767-evalos/Make.defs +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Authors: Gregory Nutt +# Mark Olsson +# 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. +# +############################################################################ + +include ${TOPDIR}/.config +include ${TOPDIR}/tools/Config.mk +include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs + +LDSCRIPT = f767-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/f767-evalos/defconfig b/configs/nucleo-144/f767-evalos/defconfig new file mode 100644 index 0000000000000000000000000000000000000000..6393ea7d181880d7ccbca6f4b129e9a0f2618032 --- /dev/null +++ b/configs/nucleo-144/f767-evalos/defconfig @@ -0,0 +1,1059 @@ +# +# 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 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_ALERT=y +# CONFIG_DEBUG_FEATURES is not set +CONFIG_ARCH_HAVE_STACKCHECK=y +CONFIG_STACK_COLORATION=y +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_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=y + +# +# STM32 F7 Configuration Options +# +# CONFIG_ARCH_CHIP_STM32F745VG is not set +# CONFIG_ARCH_CHIP_STM32F745VE is not set +# CONFIG_ARCH_CHIP_STM32F745IG is not set +# CONFIG_ARCH_CHIP_STM32F745IE is not set +# CONFIG_ARCH_CHIP_STM32F745ZE is not set +# CONFIG_ARCH_CHIP_STM32F745ZG is not set +# CONFIG_ARCH_CHIP_STM32F746BG is not set +# CONFIG_ARCH_CHIP_STM32F746VG is not set +# CONFIG_ARCH_CHIP_STM32F746VE is not set +# CONFIG_ARCH_CHIP_STM32F746BE is not set +# CONFIG_ARCH_CHIP_STM32F746ZG is not set +# CONFIG_ARCH_CHIP_STM32F746IE is not set +# CONFIG_ARCH_CHIP_STM32F746NG is not set +# CONFIG_ARCH_CHIP_STM32F746NE is not set +# CONFIG_ARCH_CHIP_STM32F746ZE is not set +# CONFIG_ARCH_CHIP_STM32F746IG is not set +# CONFIG_ARCH_CHIP_STM32F756NG is not set +# CONFIG_ARCH_CHIP_STM32F756BG is not set +# CONFIG_ARCH_CHIP_STM32F756IG is not set +# CONFIG_ARCH_CHIP_STM32F756VG is not set +# CONFIG_ARCH_CHIP_STM32F756ZG is not set +# CONFIG_ARCH_CHIP_STM32F765NI is not set +# CONFIG_ARCH_CHIP_STM32F765VI is not set +# CONFIG_ARCH_CHIP_STM32F765VG is not set +# CONFIG_ARCH_CHIP_STM32F765BI is not set +# CONFIG_ARCH_CHIP_STM32F765NG is not set +# CONFIG_ARCH_CHIP_STM32F765ZG is not set +# CONFIG_ARCH_CHIP_STM32F765ZI is not set +# CONFIG_ARCH_CHIP_STM32F765IG is not set +# CONFIG_ARCH_CHIP_STM32F765BG is not set +# CONFIG_ARCH_CHIP_STM32F765II is not set +# CONFIG_ARCH_CHIP_STM32F767NG is not set +# CONFIG_ARCH_CHIP_STM32F767IG is not set +# CONFIG_ARCH_CHIP_STM32F767VG is not set +# CONFIG_ARCH_CHIP_STM32F767ZG is not set +# CONFIG_ARCH_CHIP_STM32F767NI is not set +# CONFIG_ARCH_CHIP_STM32F767VI is not set +# CONFIG_ARCH_CHIP_STM32F767BG is not set +CONFIG_ARCH_CHIP_STM32F767ZI=y +# CONFIG_ARCH_CHIP_STM32F767II is not set +# CONFIG_ARCH_CHIP_STM32F769BI is not set +# CONFIG_ARCH_CHIP_STM32F769II is not set +# CONFIG_ARCH_CHIP_STM32F769BG is not set +# CONFIG_ARCH_CHIP_STM32F769NI is not set +# CONFIG_ARCH_CHIP_STM32F769AI is not set +# CONFIG_ARCH_CHIP_STM32F769NG is not set +# CONFIG_ARCH_CHIP_STM32F769IG is not set +# CONFIG_ARCH_CHIP_STM32F777ZI is not set +# CONFIG_ARCH_CHIP_STM32F777VI is not set +# CONFIG_ARCH_CHIP_STM32F777NI is not set +# CONFIG_ARCH_CHIP_STM32F777BI is not set +# CONFIG_ARCH_CHIP_STM32F777II is not set +# CONFIG_ARCH_CHIP_STM32F778AI is not set +# CONFIG_ARCH_CHIP_STM32F779II is not set +# CONFIG_ARCH_CHIP_STM32F779NI is not set +# CONFIG_ARCH_CHIP_STM32F779BI is not set +# CONFIG_ARCH_CHIP_STM32F779AI is not set +# CONFIG_STM32F7_STM32F74XX is not set +# CONFIG_STM32F7_STM32F75XX is not set +CONFIG_STM32F7_STM32F76XX=y +# CONFIG_STM32F7_STM32F77XX is not set +# CONFIG_STM32F7_IO_CONFIG_V is not set +# CONFIG_STM32F7_IO_CONFIG_I is not set +CONFIG_STM32F7_IO_CONFIG_Z=y +# CONFIG_STM32F7_IO_CONFIG_N is not set +# CONFIG_STM32F7_IO_CONFIG_B is not set +# CONFIG_STM32F7_IO_CONFIG_A is not set +# CONFIG_STM32F7_STM32F745XX is not set +# CONFIG_STM32F7_STM32F746XX is not set +# CONFIG_STM32F7_STM32F756XX is not set +# CONFIG_STM32F7_STM32F765XX is not set +CONFIG_STM32F7_STM32F767XX=y +# CONFIG_STM32F7_STM32F768XX is not set +# CONFIG_STM32F7_STM32F768AX is not set +# CONFIG_STM32F7_STM32F769XX is not set +# CONFIG_STM32F7_STM32F769AX is not set +# CONFIG_STM32F7_STM32F777XX is not set +# CONFIG_STM32F7_STM32F778XX is not set +# CONFIG_STM32F7_STM32F778AX is not set +# CONFIG_STM32F7_STM32F779XX is not set +# CONFIG_STM32F7_STM32F779AX is not set +# CONFIG_STM32F7_FLASH_CONFIG_E is not set +CONFIG_STM32F7_FLASH_CONFIG_I=y +CONFIG_STM32F7_FLASH_OVERRIDE_DEFAULT=y +# CONFIG_STM32F7_FLASH_OVERRIDE_E is not set +# CONFIG_STM32F7_FLASH_OVERRIDE_G is not set +# CONFIG_STM32F7_FLASH_OVERRIDE_I is not set + +# +# STM32 Peripheral Support +# +CONFIG_STM32F7_HAVE_LTDC=y +CONFIG_STM32F7_HAVE_FSMC=y +CONFIG_STM32F7_HAVE_ETHRNET=y +CONFIG_STM32F7_HAVE_RNG=y +CONFIG_STM32F7_HAVE_SPI5=y +CONFIG_STM32F7_HAVE_SPI6=y +CONFIG_STM32F7_HAVE_SDMMC2=y +# CONFIG_STM32F7_HAVE_ADC1_DMA is not set +# CONFIG_STM32F7_HAVE_ADC2_DMA is not set +# CONFIG_STM32F7_HAVE_ADC3_DMA is not set +CONFIG_STM32F7_HAVE_CAN3=y +CONFIG_STM32F7_HAVE_DCMI=y +# CONFIG_STM32F7_HAVE_DSIHOST is not set +CONFIG_STM32F7_HAVE_DMA2D=y +CONFIG_STM32F7_HAVE_JPEG=y +# CONFIG_STM32F7_HAVE_CRYP is not set +# CONFIG_STM32F7_HAVE_HASH is not set +CONFIG_STM32F7_HAVE_DFSDM1=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_TIM 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_CAN3 is not set +# CONFIG_STM32F7_CEC is not set +# CONFIG_STM32F7_CRC is not set +# CONFIG_STM32F7_DFSDM1 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_DMA2D is not set +# CONFIG_STM32F7_JPEG 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_I2C4 is not set +# CONFIG_STM32F7_LPTIM1 is not set +# CONFIG_STM32F7_LTDC is not set +# CONFIG_STM32F7_OTGFS is not set +# CONFIG_STM32F7_OTGHS is not set +# CONFIG_STM32F7_QUADSPI is not set +# CONFIG_STM32F7_RNG is not set +# CONFIG_STM32F7_SAI1 is not set +# CONFIG_STM32F7_SAI2 is not set +# CONFIG_STM32F7_SDMMC1 is not set +# CONFIG_STM32F7_SDMMC2 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_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=y +CONFIG_STM32F7_USART_BREAKS=y +CONFIG_STM32F7_SERIALBRK_BSDCOMPAT=y +# CONFIG_STM32F7_CUSTOM_CLOCKCONFIG is not set + +# +# Timer 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 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_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_NUCLEO_CONSOLE_ARDUINO is not set +CONFIG_NUCLEO_CONSOLE_VIRTUAL=y +# CONFIG_NUCLEO_CONSOLE_MORPHO is not set +# CONFIG_NUCLEO_CONSOLE_NONE is not set +# CONFIG_NUCLEO_SPI_TEST is not set +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 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=2015 +CONFIG_START_MONTH=11 +CONFIG_START_DAY=30 +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=y +CONFIG_SEM_PREALLOCHOLDERS=16 +CONFIG_SEM_NNESTPRIO=16 + +# +# 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=224 +CONFIG_SCHED_HPWORKPERIOD=100000 +CONFIG_SCHED_HPWORKSTACKSIZE=2048 +CONFIG_SCHED_LPWORK=y +CONFIG_SCHED_LPNTHREADS=1 +CONFIG_SCHED_LPWORKPRIORITY=50 +CONFIG_SCHED_LPWORKPRIOMAX=176 +CONFIG_SCHED_LPWORKPERIOD=50000 +CONFIG_SCHED_LPWORKSTACKSIZE=2048 + +# +# 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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL 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 + +# +# LCD Driver Support +# +# CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +CONFIG_USERLED=y +CONFIG_USERLED_LOWER=y +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=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 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 +# 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 +# +# CONFIG_ARCH_SYSLOG is not set +# CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE 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_AIO 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 + +# +# 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_CRC64_FAST is not set +# 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=y +CONFIG_EXAMPLES_HELLOXX_CXXINITIALIZE=y +# CONFIG_EXAMPLES_HIDKBD is not set +# CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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_NXFFS is not set +# CONFIG_EXAMPLES_NXHELLO is not set +# CONFIG_EXAMPLES_NXIMAGE is not set +# CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_POSIXSPAWN is not set +# CONFIG_EXAMPLES_PPPD 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 is not set +# CONFIG_EXAMPLES_SMART_TEST 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_USBSERIAL is not set +# CONFIG_EXAMPLES_USBTERM is not set +# CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER 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_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE 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=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 + +# +# NxWidgets/NxWM +# + +# +# Platform-specific Support +# +# CONFIG_PLATFORM_CONFIGDATA is not set + +# +# System Libraries and NSH Add-Ons +# +# CONFIG_SYSTEM_CLE is not set +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_STACKMONITOR is not set +# CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_VI is not set +# CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/nucleo-144/f767-evalos/setenv.sh b/configs/nucleo-144/f767-evalos/setenv.sh new file mode 100644 index 0000000000000000000000000000000000000000..cf10804e8411846506457c53b70d345849977ea5 --- /dev/null +++ b/configs/nucleo-144/f767-evalos/setenv.sh @@ -0,0 +1,78 @@ +#!/bin/bash +# configs/nucleo-144/f767-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/stm32f746g-disco/knsh/Make.defs b/configs/nucleo-144/f767-nsh/Make.defs similarity index 95% rename from configs/stm32f746g-disco/knsh/Make.defs rename to configs/nucleo-144/f767-nsh/Make.defs index c3735a3848f514c22cd4427d222f6b7bf6907816..9b667c97efcb23e1df7ee9ea1ed0debd965b5d27 100644 --- a/configs/stm32f746g-disco/knsh/Make.defs +++ b/configs/nucleo-144/f767-nsh/Make.defs @@ -1,8 +1,9 @@ ############################################################################ -# configs/stm32f746g-disco/knsh/Make.defs +# configs/nucleo-144/f767-nsh/Make.defs # -# Copyright (C) 2015 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Authors: Gregory Nutt +# David Sidrane # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -37,7 +38,7 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs -LDSCRIPT = flash.ld +LDSCRIPT = f767-flash.ld ifeq ($(WINTOOL),y) # Windows-native toolchains diff --git a/configs/stm32f746g-disco/knsh/defconfig b/configs/nucleo-144/f767-nsh/defconfig similarity index 76% rename from configs/stm32f746g-disco/knsh/defconfig rename to configs/nucleo-144/f767-nsh/defconfig index 6edc370a2365da71288ef0a95dd866606deb8c77..c7eb54a599951d19ebe92e62995dcb18aac7e499 100644 --- a/configs/stm32f746g-disco/knsh/defconfig +++ b/configs/nucleo-144/f767-nsh/defconfig @@ -8,32 +8,23 @@ # # CONFIG_EXPERIMENTAL is not set # CONFIG_DEFAULT_SMALL is not set -# CONFIG_HOST_LINUX is not set +CONFIG_HOST_LINUX=y # CONFIG_HOST_OSX is not set -CONFIG_HOST_WINDOWS=y +# CONFIG_HOST_WINDOWS is not set # 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 is not set -CONFIG_BUILD_PROTECTED=y -CONFIG_BUILD_2PASS=y -CONFIG_PASS1_TARGET="all" -CONFIG_PASS1_BUILDIR="configs/stm32f746g-disco/kernel" -CONFIG_PASS1_OBJECT="" -CONFIG_NUTTX_USERSPACE=0x08020000 +CONFIG_BUILD_FLAT=y +# CONFIG_BUILD_2PASS is not set # # Binary Output Formats # # CONFIG_RRLOAD_BINARY is not set -CONFIG_INTELHEX_BINARY=y +# CONFIG_INTELHEX_BINARY is not set # CONFIG_MOTOROLA_SREC is not set CONFIG_RAW_BINARY=y # CONFIG_UBOOT_UIMAGE is not set @@ -51,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y -# CONFIG_STACK_COLORATION is not set +CONFIG_STACK_COLORATION=y +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y CONFIG_DEBUG_NOOPT=y @@ -85,6 +78,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 +97,7 @@ CONFIG_ARCH="arm" # 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 @@ -124,6 +119,7 @@ CONFIG_ARCH_CORTEXM7=y # 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 @@ -132,9 +128,9 @@ CONFIG_ARMV7M_CMNVECTOR=y 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=y -CONFIG_ARM_MPU_NREGIONS=16 +# CONFIG_ARM_MPU is not set # # ARMV7M Configuration Options @@ -148,34 +144,130 @@ CONFIG_ARMV7M_HAVE_ITCM=y CONFIG_ARMV7M_HAVE_DTCM=y # CONFIG_ARMV7M_ITCM is not set CONFIG_ARMV7M_DTCM=y -# CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set -# CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set -# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW is not set -# CONFIG_ARMV7M_TOOLCHAIN_DEVKITARM is not set -# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL is not set -CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW=y -# CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE 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_USART6_RS485 is not set +CONFIG_SERIAL_DISABLE_REORDERING=y # # 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_ARCH_CHIP_STM32F745VG is not set +# CONFIG_ARCH_CHIP_STM32F745VE is not set +# CONFIG_ARCH_CHIP_STM32F745IG is not set +# CONFIG_ARCH_CHIP_STM32F745IE is not set +# CONFIG_ARCH_CHIP_STM32F745ZE is not set +# CONFIG_ARCH_CHIP_STM32F745ZG is not set +# CONFIG_ARCH_CHIP_STM32F746BG is not set +# CONFIG_ARCH_CHIP_STM32F746VG is not set +# CONFIG_ARCH_CHIP_STM32F746VE is not set +# CONFIG_ARCH_CHIP_STM32F746BE is not set +# CONFIG_ARCH_CHIP_STM32F746ZG is not set +# CONFIG_ARCH_CHIP_STM32F746IE is not set +# CONFIG_ARCH_CHIP_STM32F746NG is not set +# CONFIG_ARCH_CHIP_STM32F746NE is not set +# CONFIG_ARCH_CHIP_STM32F746ZE is not set +# CONFIG_ARCH_CHIP_STM32F746IG is not set +# CONFIG_ARCH_CHIP_STM32F756NG is not set +# CONFIG_ARCH_CHIP_STM32F756BG is not set +# CONFIG_ARCH_CHIP_STM32F756IG is not set +# CONFIG_ARCH_CHIP_STM32F756VG is not set +# CONFIG_ARCH_CHIP_STM32F756ZG is not set +# CONFIG_ARCH_CHIP_STM32F765NI is not set +# CONFIG_ARCH_CHIP_STM32F765VI is not set +# CONFIG_ARCH_CHIP_STM32F765VG is not set +# CONFIG_ARCH_CHIP_STM32F765BI is not set +# CONFIG_ARCH_CHIP_STM32F765NG is not set +# CONFIG_ARCH_CHIP_STM32F765ZG is not set +# CONFIG_ARCH_CHIP_STM32F765ZI is not set +# CONFIG_ARCH_CHIP_STM32F765IG is not set +# CONFIG_ARCH_CHIP_STM32F765BG is not set +# CONFIG_ARCH_CHIP_STM32F765II is not set +# CONFIG_ARCH_CHIP_STM32F767NG is not set +# CONFIG_ARCH_CHIP_STM32F767IG is not set +# CONFIG_ARCH_CHIP_STM32F767VG is not set +# CONFIG_ARCH_CHIP_STM32F767ZG is not set +# CONFIG_ARCH_CHIP_STM32F767NI is not set +# CONFIG_ARCH_CHIP_STM32F767VI is not set +# CONFIG_ARCH_CHIP_STM32F767BG is not set +CONFIG_ARCH_CHIP_STM32F767ZI=y +# CONFIG_ARCH_CHIP_STM32F767II is not set +# CONFIG_ARCH_CHIP_STM32F769BI is not set +# CONFIG_ARCH_CHIP_STM32F769II is not set +# CONFIG_ARCH_CHIP_STM32F769BG is not set +# CONFIG_ARCH_CHIP_STM32F769NI is not set +# CONFIG_ARCH_CHIP_STM32F769AI is not set +# CONFIG_ARCH_CHIP_STM32F769NG is not set +# CONFIG_ARCH_CHIP_STM32F769IG is not set +# CONFIG_ARCH_CHIP_STM32F777ZI is not set +# CONFIG_ARCH_CHIP_STM32F777VI is not set +# CONFIG_ARCH_CHIP_STM32F777NI is not set +# CONFIG_ARCH_CHIP_STM32F777BI is not set +# CONFIG_ARCH_CHIP_STM32F777II is not set +# CONFIG_ARCH_CHIP_STM32F778AI is not set +# CONFIG_ARCH_CHIP_STM32F779II is not set +# CONFIG_ARCH_CHIP_STM32F779NI is not set +# CONFIG_ARCH_CHIP_STM32F779BI is not set +# CONFIG_ARCH_CHIP_STM32F779AI is not set +# CONFIG_STM32F7_STM32F74XX is not set # CONFIG_STM32F7_STM32F75XX is not set -# CONFIG_STM32F7_FLASH_512KB is not set -CONFIG_STM32F7_FLASH_1024KB=y +CONFIG_STM32F7_STM32F76XX=y +# CONFIG_STM32F7_STM32F77XX is not set +# CONFIG_STM32F7_IO_CONFIG_V is not set +# CONFIG_STM32F7_IO_CONFIG_I is not set +CONFIG_STM32F7_IO_CONFIG_Z=y +# CONFIG_STM32F7_IO_CONFIG_N is not set +# CONFIG_STM32F7_IO_CONFIG_B is not set +# CONFIG_STM32F7_IO_CONFIG_A is not set +# CONFIG_STM32F7_STM32F745XX is not set +# CONFIG_STM32F7_STM32F746XX is not set +# CONFIG_STM32F7_STM32F756XX is not set +# CONFIG_STM32F7_STM32F765XX is not set +CONFIG_STM32F7_STM32F767XX=y +# CONFIG_STM32F7_STM32F768XX is not set +# CONFIG_STM32F7_STM32F768AX is not set +# CONFIG_STM32F7_STM32F769XX is not set +# CONFIG_STM32F7_STM32F769AX is not set +# CONFIG_STM32F7_STM32F777XX is not set +# CONFIG_STM32F7_STM32F778XX is not set +# CONFIG_STM32F7_STM32F778AX is not set +# CONFIG_STM32F7_STM32F779XX is not set +# CONFIG_STM32F7_STM32F779AX is not set +# CONFIG_STM32F7_FLASH_CONFIG_E is not set +CONFIG_STM32F7_FLASH_CONFIG_I=y +CONFIG_STM32F7_FLASH_OVERRIDE_DEFAULT=y +# CONFIG_STM32F7_FLASH_OVERRIDE_E is not set +# CONFIG_STM32F7_FLASH_OVERRIDE_G is not set +# CONFIG_STM32F7_FLASH_OVERRIDE_I is not set # # STM32 Peripheral Support # CONFIG_STM32F7_HAVE_LTDC=y +CONFIG_STM32F7_HAVE_FSMC=y +CONFIG_STM32F7_HAVE_ETHRNET=y +CONFIG_STM32F7_HAVE_RNG=y +CONFIG_STM32F7_HAVE_SPI5=y +CONFIG_STM32F7_HAVE_SPI6=y +CONFIG_STM32F7_HAVE_SDMMC2=y +# CONFIG_STM32F7_HAVE_ADC1_DMA is not set +# CONFIG_STM32F7_HAVE_ADC2_DMA is not set +# CONFIG_STM32F7_HAVE_ADC3_DMA is not set +CONFIG_STM32F7_HAVE_CAN3=y +CONFIG_STM32F7_HAVE_DCMI=y +# CONFIG_STM32F7_HAVE_DSIHOST is not set +CONFIG_STM32F7_HAVE_DMA2D=y +CONFIG_STM32F7_HAVE_JPEG=y +# CONFIG_STM32F7_HAVE_CRYP is not set +# CONFIG_STM32F7_HAVE_HASH is not set +CONFIG_STM32F7_HAVE_DFSDM1=y # CONFIG_STM32F7_ADC is not set # CONFIG_STM32F7_CAN is not set # CONFIG_STM32F7_DAC is not set @@ -183,6 +275,7 @@ CONFIG_STM32F7_HAVE_LTDC=y # CONFIG_STM32F7_I2C is not set # CONFIG_STM32F7_SAI is not set # CONFIG_STM32F7_SPI is not set +# CONFIG_STM32F7_TIM is not set CONFIG_STM32F7_USART=y # CONFIG_STM32F7_ADC1 is not set # CONFIG_STM32F7_ADC2 is not set @@ -190,29 +283,33 @@ CONFIG_STM32F7_USART=y # CONFIG_STM32F7_BKPSRAM is not set # CONFIG_STM32F7_CAN1 is not set # CONFIG_STM32F7_CAN2 is not set +# CONFIG_STM32F7_CAN3 is not set # CONFIG_STM32F7_CEC is not set # CONFIG_STM32F7_CRC is not set -# CONFIG_STM32F7_CRYP is not set +# CONFIG_STM32F7_DFSDM1 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_DMA2D is not set +# CONFIG_STM32F7_JPEG 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_I2C4 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_SAI1 is not set # CONFIG_STM32F7_SAI2 is not set # CONFIG_STM32F7_SDMMC1 is not set +# CONFIG_STM32F7_SDMMC2 is not set # CONFIG_STM32F7_SPDIFRX is not set # CONFIG_STM32F7_SPI1 is not set # CONFIG_STM32F7_SPI2 is not set @@ -234,7 +331,6 @@ CONFIG_STM32F7_USART=y # 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 is not set @@ -245,8 +341,19 @@ CONFIG_STM32F7_USART6=y # 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=y +CONFIG_STM32F7_USART_BREAKS=y +CONFIG_STM32F7_SERIALBRK_BSDCOMPAT=y # CONFIG_STM32F7_CUSTOM_CLOCKCONFIG is not set +# +# Timer Configuration +# + # # Architecture Options # @@ -266,7 +373,7 @@ CONFIG_ARCH_HAVE_MPU=y # 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=y +# CONFIG_ARCH_USE_MPU is not set # CONFIG_ARCH_IRQPRIO is not set CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set @@ -308,9 +415,9 @@ CONFIG_RAM_SIZE=245760 # # Board Selection # -CONFIG_ARCH_BOARD_STM32F746G_DISCO=y +CONFIG_ARCH_BOARD_NUCLEO_144=y # CONFIG_ARCH_BOARD_CUSTOM is not set -CONFIG_ARCH_BOARD="stm32f746g-disco" +CONFIG_ARCH_BOARD="nucleo-144" # # Common Board Options @@ -326,6 +433,11 @@ CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +CONFIG_NUCLEO_CONSOLE_ARDUINO=y +# CONFIG_NUCLEO_CONSOLE_VIRTUAL is not set +# CONFIG_NUCLEO_CONSOLE_MORPHO is not set +# CONFIG_NUCLEO_CONSOLE_NONE is not set +# CONFIG_NUCLEO_SPI_TEST is not set # CONFIG_LIB_BOARDCTL is not set # @@ -345,9 +457,9 @@ 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_START_YEAR=2015 +CONFIG_START_MONTH=11 +CONFIG_START_DAY=30 CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=4 CONFIG_WDOG_INTRESERVE=0 @@ -428,9 +540,7 @@ CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_DEFAULT=2048 -CONFIG_LIB_SYSCALL=y -CONFIG_SYS_RESERVED=8 -CONFIG_SYS_NNEST=2 +# CONFIG_LIB_SYSCALL is not set # # Device Drivers @@ -460,6 +570,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -474,7 +586,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -482,6 +599,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -493,6 +611,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -516,10 +636,6 @@ 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_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -546,15 +662,18 @@ CONFIG_USART6_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -588,15 +707,10 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -605,8 +719,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # # Memory Management # -CONFIG_MM_KERNEL_HEAP=y -CONFIG_MM_KERNEL_HEAPSIZE=8192 # CONFIG_MM_SMALL is not set CONFIG_MM_REGIONS=2 # CONFIG_ARCH_HAVE_HEAP2 is not set @@ -628,6 +740,7 @@ CONFIG_MM_REGIONS=2 # 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 @@ -663,12 +776,14 @@ 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 # # Non-standard Library Support # -# CONFIG_LIB_USRWORK is not set +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -689,6 +804,11 @@ CONFIG_HAVE_CXXINITIALIZE=y # Application Configuration # +# +# Built-In Applications +# +CONFIG_BUILTIN_PROXY_STACKSIZE=1024 + # # CAN Utilities # @@ -696,6 +816,7 @@ CONFIG_HAVE_CXXINITIALIZE=y # # 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 @@ -706,30 +827,30 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_FTPD is not set # CONFIG_EXAMPLES_HELLO is not set # CONFIG_EXAMPLES_HELLOXX is not set +# CONFIG_EXAMPLES_HIDKBD is not set +# CONFIG_EXAMPLES_IGMP is not set # CONFIG_EXAMPLES_JSON 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_NSH_CXXINITIALIZE is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -738,15 +859,15 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_SERLOOP is not set # CONFIG_EXAMPLES_SLCD is not set # CONFIG_EXAMPLES_SMART is not set +# CONFIG_EXAMPLES_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -768,8 +889,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -780,6 +901,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 @@ -802,6 +924,7 @@ 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 @@ -838,7 +961,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # 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=y +# 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 @@ -891,19 +1014,20 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_STACKMONITOR is not set # CONFIG_SYSTEM_SUDOKU is not set -# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f746g-disco/knsh/setenv.sh b/configs/nucleo-144/f767-nsh/setenv.sh old mode 100755 new mode 100644 similarity index 97% rename from configs/stm32f746g-disco/knsh/setenv.sh rename to configs/nucleo-144/f767-nsh/setenv.sh index 38d86c72e5a26662d63f67444c46a2615d7286d7..e6eabd1f70fe1fcb84e1b00248257946861095ac --- a/configs/stm32f746g-disco/knsh/setenv.sh +++ b/configs/nucleo-144/f767-nsh/setenv.sh @@ -1,7 +1,7 @@ #!/bin/bash -# configs/stm32f746g-disco/knsh/setenv.sh +# configs/nucleo-144/f767-nsh/setenv.sh # -# Copyright (C) 2015 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 diff --git a/configs/nucleo-144/include/board.h b/configs/nucleo-144/include/board.h index 63eb5df084e099399e3275d829ad180db75a7885..1561ad8cc684fd01dedf968840914689fbdd28ad 100644 --- a/configs/nucleo-144/include/board.h +++ b/configs/nucleo-144/include/board.h @@ -2,8 +2,9 @@ * configs/nucleo-144/include/board.h * * Copyright (C) 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * Author: Mark Olsson + * Authors: Gregory Nutt + * Mark Olsson + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -59,17 +60,17 @@ ************************************************************************************/ /* Clocking *************************************************************************/ -/* The STM32F7 Discovery board provides the following clock sources: +/* The Nucleo-144 board provides the following clock sources: * - * X1: 24 MHz oscillator for USB OTG HS PHY and camera module (daughter board) - * X2: 25 MHz oscillator for STM32F746NGH6 microcontroller and Ethernet PHY. - * X3: 32.768 KHz crystal for STM32F746NGH6 embedded RTC + * MCO: 8 MHz from MCO output of ST-LINK is used as input clock + * X2: 32.768 KHz crystal for LSE + * X3: HSE crystal oscillator (not provided) * * So we have these clock source available within the STM32 * * HSI: 16 MHz RC factory-trimmed * LSI: 32 KHz RC - * HSE: On-board crystal frequency is 25MHz + * HSE: 8 MHz from MCO output of ST-LINK * LSE: 32.768 kHz */ @@ -106,56 +107,71 @@ * 2 <= PLLQ <= 15 */ -#if defined(CONFIG_STM32F7_USBOTHFS) /* Highest SYSCLK with USB OTG FS clock = 48 MHz * - * PLL_VCO = (8,000,000 / 8) * 384 = 384 MHz - * SYSCLK = 384 MHz / 2 = 192 MHz - * USB OTG FS, SDMMC and RNG Clock = 384 MHz / 8 = 48MHz - */ - -#define STM32_PLLCFG_PLLM RCC_PLLCFG_PLLM(8) -#define STM32_PLLCFG_PLLN RCC_PLLCFG_PLLN(384) -#define STM32_PLLCFG_PLLP RCC_PLLCFG_PLLP_2 -#define STM32_PLLCFG_PLLQ RCC_PLLCFG_PLLQ(8) - -#define STM32_VCO_FREQUENCY ((STM32_HSE_FREQUENCY / 8) * 384) -#define STM32_SYSCLK_FREQUENCY (STM32_VCO_FREQUENCY / 2) -#define STM32_OTGFS_FREQUENCY (STM32_VCO_FREQUENCY / 8) - -#elif defined(CONFIG_STM32F7_SDMMC1) || defined(CONFIG_STM32F7_RNG) -/* Highest SYSCLK with USB OTG FS clock <= 48MHz - * - * PLL_VCO = (8,000,000 / 8) * 432 = 432 MHz + * PLL_VCO = (8,000,000 / 4) * 216 = 432 MHz * SYSCLK = 432 MHz / 2 = 216 MHz - * USB OTG FS, SDMMC and RNG Clock = 432 MHz / 10 = 43.2 MHz + * USB OTG FS, SDMMC and RNG Clock = 432 MHz / 9 = 48 MHz */ -#define STM32_PLLCFG_PLLM RCC_PLLCFG_PLLM(8) -#define STM32_PLLCFG_PLLN RCC_PLLCFG_PLLN(432) +#define STM32_PLLCFG_PLLM RCC_PLLCFG_PLLM(4) +#define STM32_PLLCFG_PLLN RCC_PLLCFG_PLLN(216) #define STM32_PLLCFG_PLLP RCC_PLLCFG_PLLP_2 -#define STM32_PLLCFG_PLLQ RCC_PLLCFG_PLLQ(10) +#define STM32_PLLCFG_PLLQ RCC_PLLCFG_PLLQ(9) -#define STM32_VCO_FREQUENCY ((STM32_HSE_FREQUENCY / 8) * 432) +#define STM32_VCO_FREQUENCY ((STM32_HSE_FREQUENCY / 4) * 216) #define STM32_SYSCLK_FREQUENCY (STM32_VCO_FREQUENCY / 2) -#define STM32_OTGFS_FREQUENCY (STM32_VCO_FREQUENCY / 10) - -#else -/* Highest SYSCLK - * - * PLL_VCO = (8,000,000 / 8) * 432 = 432 MHz - * SYSCLK = 432 MHz / 2 = 216 MHz - */ +#define STM32_OTGFS_FREQUENCY (STM32_VCO_FREQUENCY / 9) + +/* Configure factors for PLLSAI clock */ + +#define CONFIG_STM32F7_PLLSAI 1 +#define STM32_RCC_PLLSAICFGR_PLLSAIN RCC_PLLSAICFGR_PLLSAIN(192) +#define STM32_RCC_PLLSAICFGR_PLLSAIP RCC_PLLSAICFGR_PLLSAIP(2) +#define STM32_RCC_PLLSAICFGR_PLLSAIQ RCC_PLLSAICFGR_PLLSAIQ(2) +#define STM32_RCC_PLLSAICFGR_PLLSAIR RCC_PLLSAICFGR_PLLSAIR(2) + +/* Configure Dedicated Clock Configuration Register */ + +#define STM32_RCC_DCKCFGR1_PLLI2SDIVQ RCC_DCKCFGR1_PLLI2SDIVQ(1) +#define STM32_RCC_DCKCFGR1_PLLSAIDIVQ RCC_DCKCFGR1_PLLSAIDIVQ(1) +#define STM32_RCC_DCKCFGR1_PLLSAIDIVR RCC_DCKCFGR1_PLLSAIDIVR(0) +#define STM32_RCC_DCKCFGR1_SAI1SRC RCC_DCKCFGR1_SAI1SEL(0) +#define STM32_RCC_DCKCFGR1_SAI2SRC RCC_DCKCFGR1_SAI2SEL(0) +#define STM32_RCC_DCKCFGR1_TIMPRESRC 0 +#define STM32_RCC_DCKCFGR1_DFSDM1SRC 0 +#define STM32_RCC_DCKCFGR1_ADFSDM1SRC 0 + + + +/* Configure factors for PLLI2S clock */ + +#define CONFIG_STM32F7_PLLI2S 1 +#define STM32_RCC_PLLI2SCFGR_PLLI2SN RCC_PLLI2SCFGR_PLLI2SN(192) +#define STM32_RCC_PLLI2SCFGR_PLLI2SP RCC_PLLI2SCFGR_PLLI2SP(2) +#define STM32_RCC_PLLI2SCFGR_PLLI2SQ RCC_PLLI2SCFGR_PLLI2SQ(2) +#define STM32_RCC_PLLI2SCFGR_PLLI2SR RCC_PLLI2SCFGR_PLLI2SR(2) + +/* Configure Dedicated Clock Configuration Register 2 */ + +#define STM32_RCC_DCKCFGR2_USART1SRC RCC_DCKCFGR2_USART1SEL_APB +#define STM32_RCC_DCKCFGR2_USART2SRC RCC_DCKCFGR2_USART2SEL_APB +#define STM32_RCC_DCKCFGR2_UART4SRC RCC_DCKCFGR2_UART4SEL_APB +#define STM32_RCC_DCKCFGR2_UART5SRC RCC_DCKCFGR2_UART5SEL_APB +#define STM32_RCC_DCKCFGR2_USART6SRC RCC_DCKCFGR2_USART6SEL_APB +#define STM32_RCC_DCKCFGR2_UART7SRC RCC_DCKCFGR2_UART7SEL_APB +#define STM32_RCC_DCKCFGR2_UART8SRC RCC_DCKCFGR2_UART8SEL_APB +#define STM32_RCC_DCKCFGR2_I2C1SRC RCC_DCKCFGR2_I2C1SEL_HSI +#define STM32_RCC_DCKCFGR2_I2C2SRC RCC_DCKCFGR2_I2C2SEL_HSI +#define STM32_RCC_DCKCFGR2_I2C3SRC RCC_DCKCFGR2_I2C3SEL_HSI +#define STM32_RCC_DCKCFGR2_I2C4SRC RCC_DCKCFGR2_I2C4SEL_HSI +#define STM32_RCC_DCKCFGR2_LPTIM1SRC RCC_DCKCFGR2_LPTIM1SEL_APB +#define STM32_RCC_DCKCFGR2_CECSRC RCC_DCKCFGR2_CECSEL_HSI +#define STM32_RCC_DCKCFGR2_CK48MSRC RCC_DCKCFGR2_CK48MSEL_PLLSAI +#define STM32_RCC_DCKCFGR2_SDMMCSRC RCC_DCKCFGR2_SDMMCSEL_48MHZ +#define STM32_RCC_DCKCFGR2_SDMMC2SRC RCC_DCKCFGR2_SDMMC2SEL_48MHZ +#define STM32_RCC_DCKCFGR2_DSISRC RCC_DCKCFGR2_DSISEL_48MHZ -#define STM32_PLLCFG_PLLM RCC_PLLCFG_PLLM(8) -#define STM32_PLLCFG_PLLN RCC_PLLCFG_PLLN(432) -#define STM32_PLLCFG_PLLP RCC_PLLCFG_PLLP_2 -#define STM32_PLLCFG_PLLQ RCC_PLLCFG_PLLQ(10) - -#define STM32_VCO_FREQUENCY ((STM32_HSE_FREQUENCY / 8) * 432) -#define STM32_SYSCLK_FREQUENCY (STM32_VCO_FREQUENCY / 2) -#define STM32_OTGFS_FREQUENCY (STM32_VCO_FREQUENCY / 10) -#endif /* Several prescalers allow the configuration of the two AHB buses, the * high-speed APB (APB2) and the low-speed APB (APB1) domains. The maximum @@ -215,12 +231,9 @@ #define BOARD_FLASH_WAITSTATES 7 /* LED definitions ******************************************************************/ -/* The STM32F746G-DISCO board has numerous LEDs but only one, LD1 located near the - * reset button, that can be controlled by software (LD2 is a power indicator, LD3-6 - * indicate USB status, LD7 is controlled by the ST-Link). - * - * LD1 is controlled by PI1 which is also the SPI2_SCK at the Arduino interface. - * One end of LD1 is grounded so a high output on PI1 will illuminate the LED. +/* The Nucleo-144 board has numerous LEDs but only three, LD1 a Green LED, LD2 a Blue + * LED and LD3 a Red LED, that can be controlled by software. The following + * definitions assume the default Solder Bridges are installed. * * If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs in any way. * The following definitions are used to access individual LEDs. @@ -233,9 +246,9 @@ #define BOARD_LED3 2 #define BOARD_NLEDS 3 -#define BOARD_LD1 BOARD_LED1 -#define BOARD_LD2 BOARD_LED2 -#define BOARD_LD3 BOARD_LED3 +#define BOARD_LED_GREEN BOARD_LED1 +#define BOARD_LED_BLUE BOARD_LED2 +#define BOARD_LED_RED BOARD_LED3 /* LED bits for use with board_userled_all() */ @@ -247,33 +260,29 @@ * include/board.h and src/stm32_leds.c. The LEDs are used to encode OS-related * events as follows: * - * SYMBOL Meaning LD1 - * ------------------- ----------------------- ------ - * LED_STARTED NuttX has been started OFF - * LED_HEAPALLOCATE Heap has been allocated OFF - * LED_IRQSENABLED Interrupts enabled OFF - * LED_STACKCREATED Idle stack created ON - * LED_INIRQ In an interrupt N/C - * LED_SIGNAL In a signal handler N/C - * LED_ASSERTION An assertion failed N/C - * LED_PANIC The system has crashed FLASH - * - * Thus is LD1 is statically on, NuttX has successfully booted and is, - * apparently, running normally. If LD1 is flashing at approximately - * 2Hz, then a fatal error has been detected and the system has halted. + * + * SYMBOL Meaning LED state + * Red Green Blue + * ---------------------- -------------------------- ------ ------ ----*/ + +#define LED_STARTED 0 /* NuttX has been started OFF OFF OFF */ +#define LED_HEAPALLOCATE 1 /* Heap has been allocated OFF OFF ON */ +#define LED_IRQSENABLED 2 /* Interrupts enabled OFF ON OFF */ +#define LED_STACKCREATED 3 /* Idle stack created OFF ON ON */ +#define LED_INIRQ 4 /* In an interrupt N/C N/C GLOW */ +#define LED_SIGNAL 5 /* In a signal handler N/C GLOW N/C */ +#define LED_ASSERTION 6 /* An assertion failed GLOW N/C GLOW */ +#define LED_PANIC 7 /* The system has crashed Blink OFF N/C */ +#define LED_IDLE 8 /* MCU is is sleep mode ON OFF OFF */ + +/* Thus if the Green LED is statically on, NuttX has successfully booted and + * is, apparently, running normally. If the Red LED is flashing at + * approximately 2Hz, then a fatal error has been detected and the system + * has halted. */ -#define LED_STARTED 0 /* LD1=OFF */ -#define LED_HEAPALLOCATE 0 /* LD1=OFF */ -#define LED_IRQSENABLED 0 /* LD1=OFF */ -#define LED_STACKCREATED 1 /* LD1=ON */ -#define LED_INIRQ 2 /* LD1=no change */ -#define LED_SIGNAL 2 /* LD1=no change */ -#define LED_ASSERTION 2 /* LD1=no change */ -#define LED_PANIC 3 /* LD1=flashing */ - /* Button definitions ***************************************************************/ -/* The STM32F7 Discovery supports one button: Pushbutton B1, labelled "User", is +/* The STM32F7 Discovery supports one button: Pushbutton B1, labeled "User", is * connected to GPIO PI11. A high value will be sensed when the button is depressed. */ @@ -283,6 +292,7 @@ /* Alternate function pin selections ************************************************/ +#if defined(CONFIG_NUCLEO_CONSOLE_ARDUINO) /* USART6: * * These configurations assume that you are using a standard Arduio RS-232 shield @@ -292,16 +302,90 @@ * STM32F7 * ARDUIONO FUNCTION GPIO * -- ----- --------- ----- - * DO RX USART6_RX PC7 - * D1 TX USART6_TX PC6 + * DO RX USART6_RX PG9 + * D1 TX USART6_TX PG14 * -- ----- --------- ----- */ - #define GPIO_USART6_RX GPIO_USART6_RX_1 - #define GPIO_USART6_TX GPIO_USART6_TX_1 + # define GPIO_USART6_RX GPIO_USART6_RX_2 + # define GPIO_USART6_TX GPIO_USART6_TX_2 +#endif + +/* USART3: + * Use USART3 and the USB virtual COM port +*/ + +#if defined(CONFIG_NUCLEO_CONSOLE_VIRTUAL) + # define GPIO_USART3_RX GPIO_USART3_RX_3 + # define GPIO_USART3_TX GPIO_USART3_TX_3 +#endif + +/* USART8: + * + * This configurations assume that you are connecting to the Morpho connector + * with the serial interface with the adaptor's RX on pin CN11 pin 64 and + * TX on pin CN11 pin 61 + * + * USART8: has no remap + */ + +/* DMA channels *************************************************************/ +/* ADC */ + +#define ADC1_DMA_CHAN DMAMAP_ADC1_1 +#define ADC2_DMA_CHAN DMAMAP_ADC2_1 +#define ADC3_DMA_CHAN DMAMAP_ADC3_1 + +/* SPI + * + * + * PA6 SPI1_MISO CN12-13 + * PA7 SPI1_MOSI CN12-15 + * PA5 SPI1_SCK CN12-11 + * + * PB14 SPI2_MISO CN12-28 + * PB15 SPI2_MOSI CN12-26 + * PB13 SPI2_SCK CN12-30 + * + * PB4 SPI3_MISO CN12-27 + * PB5 SPI3_MOSI CN12-29 + * PB3 SPI3_SCK CN12-31 + */ + +#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_3 + +#define GPIO_SPI3_MISO GPIO_SPI3_MISO_1 +#define GPIO_SPI3_MOSI GPIO_SPI3_MOSI_2 +#define GPIO_SPI3_SCK GPIO_SPI3_SCK_1 + +/* I2C + * + * + * PB8 I2C1_SCL CN12-3 + * PB9 I2C1_SDA CN12-5 + + * PB10 I2C2_SCL CN11-51 + * PB11 I2C2_SDA CN12-18 + * + * PA8 I2C3_SCL CN12-23 + * PC9 I2C3_SDA CN12-1 + * + */ + +#define GPIO_I2C1_SCL GPIO_I2C1_SCL_2 +#define GPIO_I2C1_SDA GPIO_I2C1_SDA_2 + +#define GPIO_I2C2_SCL GPIO_I2C2_SCL_1 +#define GPIO_I2C2_SDA GPIO_I2C2_SDA_1 - #define GPIO_USART3_RX GPIO_USART3_RX_3 - #define GPIO_USART3_TX GPIO_USART3_TX_3 +#define GPIO_I2C3_SCL GPIO_I2C3_SCL_1 +#define GPIO_I2C3_SDA GPIO_I2C3_SDA_1 /* The STM32 F7 connects to a SMSC LAN8742A PHY using these pins: * diff --git a/configs/nucleo-144/scripts/f746-flash.ld b/configs/nucleo-144/scripts/f746-flash.ld new file mode 100644 index 0000000000000000000000000000000000000000..bc8b07e4fa856ca0722aeaea5f34ec9de21df3d6 --- /dev/null +++ b/configs/nucleo-144/scripts/f746-flash.ld @@ -0,0 +1,146 @@ +/**************************************************************************** + * configs/nucleo-144/scripts/f746-flash.ld + * + * 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. + * + ****************************************************************************/ + +/* The STM32F746ZGT6 has 1024 KiB of main FLASH memory. This FLASH memory + * can be accessed from either the AXIM interface at address 0x0800:0000 or + * from the ITCM interface at address 0x0020:0000. + * + * Additional information, including the option bytes, is available at at + * FLASH at address 0x1ff0:0000 (AXIM) or 0x0010:0000 (ITCM). + * + * In the STM32F746ZGT6, two different boot spaces can be selected through + * the BOOT pin and the boot base address programmed in the BOOT_ADD0 and + * BOOT_ADD1 option bytes: + * + * 1) BOOT=0: Boot address defined by user option byte BOOT_ADD0[15:0]. + * ST programmed value: Flash on ITCM at 0x0020:0000 + * 2) BOOT=1: Boot address defined by user option byte BOOT_ADD1[15:0]. + * ST programmed value: System bootloader at 0x0010:0000 + * + * NuttX does not modify these option byes. On the unmodified NUCLEO-144 + * board, the BOOT0 pin is at ground so by default, the STM32F746ZGT6 will + * boot from address 0x0020:0000 in ITCM FLASH. + * + * The STM32F746ZGT6 also has 320 KiB of data SRAM (in addition to ITCM SRAM). + * SRAM is split up into three blocks: + * + * 1) 64 KiB of DTCM SRM beginning at address 0x2000:0000 + * 2) 240 KiB of SRAM1 beginning at address 0x2001:0000 + * 3) 16 KiB of SRAM2 beginning at address 0x2004:c000 + * + * 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 +{ + itcm (rwx) : ORIGIN = 0x00200000, LENGTH = 1024K + flash (rx) : ORIGIN = 0x08000000, LENGTH = 1024K + dtcm (rwx) : ORIGIN = 0x20000000, LENGTH = 64K + sram1 (rwx) : ORIGIN = 0x20010000, LENGTH = 240K + sram2 (rwx) : ORIGIN = 0x2004c000, LENGTH = 16K +} + +OUTPUT_ARCH(arm) +EXTERN(_vectors) +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(.); + + .data : { + _sdata = ABSOLUTE(.); + *(.data .data.*) + *(.gnu.linkonce.d.*) + CONSTRUCTORS + _edata = ABSOLUTE(.); + } > sram1 AT > flash + + .bss : { + _sbss = ABSOLUTE(.); + *(.bss .bss.*) + *(.gnu.linkonce.b.*) + *(COMMON) + _ebss = ABSOLUTE(.); + } > sram1 + + /* 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/nucleo-144/scripts/f767-flash.ld b/configs/nucleo-144/scripts/f767-flash.ld new file mode 100644 index 0000000000000000000000000000000000000000..6654a139feebe5bd22e71f470633f6c98a3f70a3 --- /dev/null +++ b/configs/nucleo-144/scripts/f767-flash.ld @@ -0,0 +1,146 @@ +/**************************************************************************** + * configs/nucleo-144/scripts/f767-flash.ld + * + * 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. + * + ****************************************************************************/ + +/* The STM32F767ZIT6 has 2048 KiB of main FLASH memory. This FLASH memory + * can be accessed from either the AXIM interface at address 0x0800:0000 or + * from the ITCM interface at address 0x0020:0000. + * + * Additional information, including the option bytes, is available at at + * FLASH at address 0x1ff0:0000 (AXIM) or 0x0010:0000 (ITCM). + * + * In the STM32F767ZIT6, two different boot spaces can be selected through + * the BOOT pin and the boot base address programmed in the BOOT_ADD0 and + * BOOT_ADD1 option bytes: + * + * 1) BOOT=0: Boot address defined by user option byte BOOT_ADD0[15:0]. + * ST programmed value: Flash on ITCM at 0x0020:0000 + * 2) BOOT=1: Boot address defined by user option byte BOOT_ADD1[15:0]. + * ST programmed value: System bootloader at 0x0010:0000 + * + * NuttX does not modify these option byes. On the unmodified NUCLEO-144 + * board, the BOOT0 pin is at ground so by default, the STM32F767ZIT6 will + * boot from address 0x0020:0000 in ITCM FLASH. + * + * The STM32F767ZIT6 also has 512 KiB of data SRAM (in addition to ITCM SRAM). + * SRAM is split up into three blocks: + * + * 1) 128 KiB of DTCM SRM beginning at address 0x2000:0000 + * 2) 368 KiB of SRAM1 beginning at address 0x2002:0000 + * 3) 16 KiB of SRAM2 beginning at address 0x2007:c000 + * + * 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 +{ + itcm (rwx) : ORIGIN = 0x00200000, LENGTH = 2048K + flash (rx) : ORIGIN = 0x08000000, LENGTH = 2048K + dtcm (rwx) : ORIGIN = 0x20000000, LENGTH = 128K + sram1 (rwx) : ORIGIN = 0x20020000, LENGTH = 368K + sram2 (rwx) : ORIGIN = 0x2007c000, LENGTH = 16K +} + +OUTPUT_ARCH(arm) +EXTERN(_vectors) +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(.); + + .data : { + _sdata = ABSOLUTE(.); + *(.data .data.*) + *(.gnu.linkonce.d.*) + CONSTRUCTORS + _edata = ABSOLUTE(.); + } > sram1 AT > flash + + .bss : { + _sbss = ABSOLUTE(.); + *(.bss .bss.*) + *(.gnu.linkonce.b.*) + *(COMMON) + _ebss = ABSOLUTE(.); + } > sram1 + + /* 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/nucleo-144/src/Makefile b/configs/nucleo-144/src/Makefile index 2f742b273bb1c6bbbe6d0d4c91e378b6e53c4eb2..e4e02750bd4f7fee4dd8b5dc9cb33f0d3ba3d6a9 100644 --- a/configs/nucleo-144/src/Makefile +++ b/configs/nucleo-144/src/Makefile @@ -3,6 +3,7 @@ # # Copyright (C) 2015 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 @@ -36,7 +37,7 @@ -include $(TOPDIR)/Make.defs ASRCS = -CSRCS = stm32_boot.c stm32_spi.c +CSRCS = stm32_boot.c ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += stm32_autoleds.c @@ -52,4 +53,15 @@ ifeq ($(CONFIG_LIB_BOARDCTL),y) CSRCS += stm32_appinitialize.c endif +ifeq ($(CONFIG_SPI),y) +CSRCS += stm32_spi.c +endif +ifeq ($(CONFIG_ADC),y) +CSRCS += stm32_adc.c +endif + +ifeq ($(HAVE_SDIO),y) +CSRCS += stm32_sdio.c +endif + include $(TOPDIR)/configs/Board.mk diff --git a/configs/nucleo-144/src/nucleo-144.h b/configs/nucleo-144/src/nucleo-144.h index a5766c4497c22e293501399402d38fd20077d057..48a6f9f11a38c3ca19635b841a0f64a188517ec7 100644 --- a/configs/nucleo-144/src/nucleo-144.h +++ b/configs/nucleo-144/src/nucleo-144.h @@ -1,9 +1,10 @@ -/**************************************************************************************************** +/************************************************************************************ * configs/nucleo-144/src/nucleo-144.h * * Copyright (C) 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * Author: Mark Olsson + * Authors: Gregory Nutt + * Mark Olsson + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -32,22 +33,25 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ****************************************************************************************************/ + ************************************************************************************/ #ifndef __CONFIGS_NUCLEO_144_SRC_NUCLEO_144_H #define __CONFIGS_NUCLEO_144_SRC_NUCLEO_144_H -/**************************************************************************************************** +/************************************************************************************ * Included Files - ****************************************************************************************************/ + ************************************************************************************/ #include #include #include -/**************************************************************************************************** +/************************************************************************************ * Pre-processor Definitions - ****************************************************************************************************/ + ************************************************************************************/ + +/* Configuration ********************************************************************/ + /* procfs File System */ #ifdef CONFIG_FS_PROCFS @@ -58,49 +62,139 @@ # endif #endif -/* STM32F736G Discovery GPIOs ***********************************************************************/ -/* The STM32F746G-DISCO board has numerous LEDs but only one, LD1 located near the reset button, that - * can be controlled by software (LD2 is a power indicator, LD3-6 indicate USB status, LD7 is - * controlled by the ST-Link). +/* Nucleo-144 GPIO Pin Definitions **************************************************/ +/* LED * - * LD1 is controlled by PI1 which is also the SPI2_SCK at the Arduino interface. One end of LD1 is - * grounded so a high output on PI1 will illuminate the LED. + * The Nucleo-144 board has numerous LEDs but only three, LD1 a Green LED, LD2 a + * Blue LED and LD3 a Red LED, that can be controlled by software. The following definitions assume + * the default Solder Bridges are installed. */ -#define GPIO_LD1 (GPIO_OUTPUT | GPIO_PUSHPULL | GPIO_SPEED_50MHz | GPIO_OUTPUT_CLEAR | \ - 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) +#define GPIO_LD1 (GPIO_OUTPUT | GPIO_PUSHPULL | GPIO_SPEED_50MHz | GPIO_OUTPUT_CLEAR | \ + 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) + +#define GPIO_LED_GREEN GPIO_LD1 +#define GPIO_LED_BLUE GPIO_LD2 +#define GPIO_LED_RED GPIO_LD3 #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. +/* BUTTONS + * + * The Blue pushbutton B1, labeled "User", is connected to GPIO PC13. A high value + * will be sensed when the button is depressed. + * Note: + * 1) That the EXTI is included in the definition to enable an interrupt on this + * IO. + * 2) The following definitions assume the default Solder Bridges are installed. */ -#define GPIO_BTN_USER (GPIO_INPUT | GPIO_FLOAT | GPIO_EXTI | GPIO_PORTC | GPIO_PIN13) +#define GPIO_BTN_USER (GPIO_INPUT | GPIO_FLOAT | GPIO_EXTI | GPIO_PORTC | GPIO_PIN13) + +/* SPI ***************************************************************************/ + +#define GPIO_SPI_CS (GPIO_OUTPUT | GPIO_PUSHPULL | GPIO_SPEED_50MHz | \ + GPIO_OUTPUT_SET) + +#define GPIO_SPI1_CS0 (GPIO_SPI_CS | GPIO_PORTA | GPIO_PIN15) +#define GPIO_SPI1_CS1 (GPIO_SPI_CS | GPIO_PORTC | GPIO_PIN15) +#define GPIO_SPI1_CS2 (GPIO_SPI_CS | GPIO_PORTC | GPIO_PIN14) +#define GPIO_SPI1_CS3 (GPIO_SPI_CS | GPIO_PORTC | GPIO_PIN2) +#define GPIO_SPI2_CS0 (GPIO_SPI_CS | GPIO_PORTD | GPIO_PIN7) +#define GPIO_SPI2_CS1 (GPIO_SPI_CS | GPIO_PORTG | GPIO_PIN1) +#define GPIO_SPI2_CS2 (GPIO_SPI_CS | GPIO_PORTG | GPIO_PIN2) +#define GPIO_SPI2_CS3 (GPIO_SPI_CS | GPIO_PORTG | GPIO_PIN3) +#define GPIO_SPI3_CS0 (GPIO_SPI_CS | GPIO_PORTG | GPIO_PIN4) +#define GPIO_SPI3_CS1 (GPIO_SPI_CS | GPIO_PORTG | GPIO_PIN5) +#define GPIO_SPI3_CS2 (GPIO_SPI_CS | GPIO_PORTG | GPIO_PIN6) +#define GPIO_SPI3_CS3 (GPIO_SPI_CS | GPIO_PORTG | GPIO_PIN7) + +/* Logical SPI Chip Selects used to index */ + +#define NUCLEO_SPI_BUS1_CS0 0 +#define NUCLEO_SPI_BUS1_CS1 1 +#define NUCLEO_SPI_BUS1_CS2 2 +#define NUCLEO_SPI_BUS1_CS3 3 +#define NUCLEO_SPI_BUS2_CS0 4 +#define NUCLEO_SPI_BUS2_CS1 5 +#define NUCLEO_SPI_BUS2_CS2 6 +#define NUCLEO_SPI_BUS2_CS3 7 +#define NUCLEO_SPI_BUS3_CS0 8 +#define NUCLEO_SPI_BUS3_CS1 9 +#define NUCLEO_SPI_BUS3_CS2 10 +#define NUCLEO_SPI_BUS3_CS3 11 + +#if defined(CONFIG_STM32_SDIO) +#define GPIO_SDIO_NCD (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI | GPIO_PORTB | GPIO_PIN15) +#endif -/**************************************************************************************************** +/************************************************************************************ * Public data - ****************************************************************************************************/ + ************************************************************************************/ #ifndef __ASSEMBLY__ -/**************************************************************************************************** +/************************************************************************************ * Public Functions - ****************************************************************************************************/ + ************************************************************************************/ -/**************************************************************************************************** +/************************************************************************************ * Name: stm32_spidev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the stm32f746g-disco board. + * Called to configure SPI chip select GPIO pins for the Nucleo-144 board. + * + ************************************************************************************/ + +#if defined(CONFIG_SPI) +void stm32_spidev_initialize(void); +#endif + +/************************************************************************************ + * Name: stm32_spidev_bus_test + * + * Description: + * Called to create the defined SPI buses and test them by initializing them + * and sending the NUCLEO_SPI_TEST (no chip select). + * + ************************************************************************************/ + +#if defined(CONFIG_NUCLEO_SPI_TEST) +int stm32_spidev_bus_test(void); +#endif + +/************************************************************************************ + * Name: stm32_dma_alloc_init + * + * Description: + * Called to create a FAT DMA allocator * - ****************************************************************************************************/ + * Returned Value: + * 0 on success or -ENOMEM + * + ************************************************************************************/ + +void stm32_dma_alloc_init(void); -void weak_function stm32_spidev_initialize(void); +#if defined (CONFIG_FAT_DMAMEMORY) +int stm32_dma_alloc_init(void); +#endif + +/**************************************************************************** + * Name: stm32_adc_initialize + * + * Description: + * Called at application startup time to initialize the ADC functionality. + * + ****************************************************************************/ + +#ifdef CONFIG_ADC +int board_adc_initialize(void); +#endif #endif /* __ASSEMBLY__ */ #endif /* __CONFIGS_NUCLEO_144_SRC_NUCLEO_144_H */ diff --git a/configs/nucleo-144/src/stm32_adc.c b/configs/nucleo-144/src/stm32_adc.c new file mode 100644 index 0000000000000000000000000000000000000000..f185335a7a104462de6463d683e81edb8e468bc0 --- /dev/null +++ b/configs/nucleo-144/src/stm32_adc.c @@ -0,0 +1,188 @@ +/************************************************************************************ + * configs/nucleo-144/src/stm32_adc.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 "chip.h" +#include "stm32_gpio.h" +#include "stm32_adc.h" +#include "nucleo-144.h" + +#ifdef CONFIG_ADC + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Configuration ********************************************************************/ +/* Up to 3 ADC interfaces are supported */ + +#if STM32F7_NADC < 3 +# undef CONFIG_STM32F7_ADC3 +#endif + +#if STM32F7_NADC < 2 +# undef CONFIG_STM32F7_ADC2 +#endif + +#if STM32F7_NADC < 1 +# undef CONFIG_STM32F7_ADC1 +#endif + +#if defined(CONFIG_STM32F7_ADC1) || defined(CONFIG_STM32F7_ADC2) || defined(CONFIG_STM32F7_ADC3) +#ifndef CONFIG_STM32F7_ADC1 +# warning "Channel information only available for ADC1" +#endif + +/* The number of ADC channels in the conversion list */ + +#define ADC1_NCHANNELS 1 + +/************************************************************************************ + * Private Data + ************************************************************************************/ + +/* Identifying number of each ADC channel: Variable Resistor. + * + * {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15}; + */ + +#ifdef CONFIG_STM32F7_ADC1 +static const uint8_t g_chanlist[ADC1_NCHANNELS] = {3}; + +/* Configurations of pins used byte each ADC channels + * + * {GPIO_ADC1_IN1, GPIO_ADC1_IN2, GPIO_ADC1_IN3, GPIO_ADC1_IN4, GPIO_ADC1_IN5, + * GPIO_ADC1_IN6, GPIO_ADC1_IN7, GPIO_ADC1_IN8, GPIO_ADC1_IN9, GPIO_ADC1_IN10, + * GPIO_ADC1_IN11, GPIO_ADC1_IN12, GPIO_ADC1_IN13, GPIO_ADC1_IN15}; + */ + +static const uint32_t g_pinlist[ADC1_NCHANNELS] = {GPIO_ADC1_IN3}; +#endif + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: board_adc_setup + * + * Description: + * All STM32 architectures must provide the following interface to work with + * examples/adc. + * + ************************************************************************************/ + +int board_adc_setup(void) +{ + return board_adc_initialize(); +} + +/************************************************************************************ + * Name: stm32_adc_initialize + * + * Description: + * Called at application startup time to initialize the ADC functionality. + * + ************************************************************************************/ + +int board_adc_initialize(void) +{ +#ifdef CONFIG_STM32F7_ADC1 + static bool initialized = false; + struct adc_dev_s *adc; + int ret; + int i; + + /* Check if we have already initialized */ + + if (!initialized) + { + /* Configure the pins as analog inputs for the selected channels */ + + for (i = 0; i < ADC1_NCHANNELS; i++) + { + if (g_pinlist[i] != 0) + { + stm32_configgpio(g_pinlist[i]); + } + } + + /* Call stm32_adcinitialize() to get an instance of the ADC interface */ + + adc = stm32_adc_initialize(1, g_chanlist, ADC1_NCHANNELS); + if (adc == NULL) + { + aerr("ERROR: Failed to get ADC interface\n"); + return -ENODEV; + } + + /* Register the ADC driver at "/dev/adc0" */ + + ret = adc_register("/dev/adc0", adc); + if (ret < 0) + { + aerr("ERROR: adc_register failed: %d\n", ret); + return ret; + } + + /* Now we are initialized */ + + initialized = true; + } + + return OK; +#else + return -ENOSYS; +#endif +} + +#endif /* CONFIG_STM32F7_ADC1 || CONFIG_STM32F7_ADC2 || CONFIG_STM32F7_ADC3 */ +#endif /* CONFIG_ADC */ diff --git a/configs/nucleo-144/src/stm32_appinitialize.c b/configs/nucleo-144/src/stm32_appinitialize.c index e1b318684c87fb8a85c7cb6614f8f3f6ddad0707..9daf02a3ff050f54abe88ade5290afeff7a6aa36 100644 --- a/configs/nucleo-144/src/stm32_appinitialize.c +++ b/configs/nucleo-144/src/stm32_appinitialize.c @@ -2,8 +2,9 @@ * config/nucleo-144/src/stm32_appinitilaize.c * * Copyright (C) 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * Author: Mark Olsson + * Authors: Gregory Nutt + * Mark Olsson + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -39,6 +40,8 @@ ****************************************************************************/ #include + +#include #include #include "nucleo-144.h" @@ -75,9 +78,20 @@ int board_app_initialize(uintptr_t arg) { -#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) int ret; +#ifdef CONFIG_FS_PROCFS + /* Mount the procfs file system */ + + ret = mount(NULL, STM32_PROCFS_MOUNTPOINT, "procfs", 0, NULL); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to mount procfs at %s: %d\n", + STM32_PROCFS_MOUNTPOINT, ret); + } +#endif + +#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) /* Register the LED driver */ ret = userled_lower_initialize(LED_DRIVER_PATH); @@ -87,5 +101,36 @@ int board_app_initialize(uintptr_t arg) } #endif +#if defined(CONFIG_FAT_DMAMEMORY) + if (stm32_dma_alloc_init() < 0) + { + syslog(LOG_ERR, "DMA alloc FAILED"); + } +#endif + +#if defined(CONFIG_NUCLEO_SPI_TEST) + /* Create SPI interfaces */ + + ret = stm32_spidev_bus_test(); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: Failed to initialize SPI interfaces: %d\n", ret); + return ret; + } +#endif + +#if defined(CONFIG_MMCSD) + /* Configure SDIO */ + /* Initialize the SDIO block driver */ + + ret = stm32_sdio_initialize(); + if (ret != OK) + { + ferr("ERROR: Failed to initialize MMC/SD driver: %d\n", ret); + return ret; + } +#endif + + UNUSED(ret); return OK; } diff --git a/configs/nucleo-144/src/stm32_autoleds.c b/configs/nucleo-144/src/stm32_autoleds.c index e9114391aff8f6428e308b066835a94454b5bc50..64c3cccb8c0de7eb7045be38f6c4882d899db78d 100644 --- a/configs/nucleo-144/src/stm32_autoleds.c +++ b/configs/nucleo-144/src/stm32_autoleds.c @@ -2,7 +2,8 @@ * configs/nucleo-144/src/stm32_autoleds.c * * Copyright (C) 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -43,27 +44,43 @@ #include #include +#include #include "stm32_gpio.h" #include "nucleo-144.h" - #ifdef CONFIG_ARCH_LEDS /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ -/* CONFIG_DEBUG_LEDS enables debug output from this file (needs CONFIG_DEBUG - * with CONFIG_DEBUG_VERBOSE too) - */ +#define ArraySize(x) (sizeof((x)) / sizeof((x)[0])) + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* Indexed by BOARD_LED_ */ -#ifdef CONFIG_DEBUG_LEDS -# define leddbg lldbg -# define ledvdbg llvdbg -#else -# define leddbg(x...) -# define ledvdbg(x...) -#endif +static const uint32_t g_ledmap[BOARD_NLEDS] = +{ + GPIO_LED_GREEN, + GPIO_LED_BLUE, + GPIO_LED_RED, +}; + +static bool g_initialized; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +static void phy_set_led(int led, bool state) +{ + /* Active High */ + + stm32_gpiowrite(g_ledmap[led], state); +} /**************************************************************************** * Public Functions @@ -75,9 +92,14 @@ void board_autoled_initialize(void) { + int i; + /* Configure the LD1 GPIO for output. Initial state is OFF */ - stm32_configgpio(GPIO_LD1); + for (i = 0; i < ArraySize(g_ledmap); i++) + { + stm32_configgpio(g_ledmap[i]); + } } /**************************************************************************** @@ -86,28 +108,47 @@ void board_autoled_initialize(void) void board_autoled_on(int led) { - bool ledstate = false; - 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 */ - 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 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; - } - stm32_gpiowrite(GPIO_LD1, ledstate); + case LED_HEAPALLOCATE: + phy_set_led(BOARD_LED_BLUE, true); + break; + + case LED_IRQSENABLED: + phy_set_led(BOARD_LED_BLUE, false); + phy_set_led(BOARD_LED_GREEN, true); + break; + + case LED_STACKCREATED: + phy_set_led(BOARD_LED_GREEN, true); + phy_set_led(BOARD_LED_BLUE, true); + g_initialized = true; + break; + + case LED_INIRQ: + phy_set_led(BOARD_LED_BLUE, true); + break; + + case LED_SIGNAL: + phy_set_led(BOARD_LED_GREEN, true); + break; + + case LED_ASSERTION: + phy_set_led(BOARD_LED_RED, true); + phy_set_led(BOARD_LED_BLUE, true); + break; + + case LED_PANIC: + phy_set_led(BOARD_LED_RED, true); + break; + + case LED_IDLE : /* IDLE */ + phy_set_led(BOARD_LED_RED, true); + break; + } } /**************************************************************************** @@ -118,26 +159,29 @@ void board_autoled_off(int led) { switch (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 */ + break; - /* These result in no-change */ + case LED_SIGNAL: + phy_set_led(BOARD_LED_GREEN, false); + break; - 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 LED_INIRQ: + phy_set_led(BOARD_LED_BLUE, false); + break; - /* Turn STATUS LED off set driving the output high */ + case LED_ASSERTION: + phy_set_led(BOARD_LED_RED, false); + phy_set_led(BOARD_LED_BLUE, false); + break; - case 3: /* LED_PANIC: The system has crashed STATUS LED=FLASH */ - stm32_gpiowrite(GPIO_LD1, false); + case LED_PANIC: + phy_set_led(BOARD_LED_RED, false); break; + + case LED_IDLE : /* IDLE */ + phy_set_led(BOARD_LED_RED, false); + break; } } diff --git a/configs/nucleo-144/src/stm32_boot.c b/configs/nucleo-144/src/stm32_boot.c index 210c0982a3da4f264780236928e4d987c6e4aeaa..6e767a2975f212840b71efc9ce0b7ea0f3566cae 100644 --- a/configs/nucleo-144/src/stm32_boot.c +++ b/configs/nucleo-144/src/stm32_boot.c @@ -2,7 +2,8 @@ * configs/nucleo-144/src/stm32_boot.c * * Copyright (C) 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -63,24 +64,17 @@ void stm32_boardinitialize(void) { -#if defined(CONFIG_STM32F7_SPI1) || defined(CONFIG_STM32F7_SPI2) || \ - defined(CONFIG_STM32F7_SPI3) || defined(CONFIG_STM32F7_SPI4) || \ - defined(CONFIG_STM32F7_SPI5) - /* 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 (stm32_spidev_initialize) - { - stm32_spidev_initialize(); - } -#endif - #ifdef CONFIG_ARCH_LEDS /* Configure on-board LEDs if LED support has been selected. */ board_autoled_initialize(); #endif + +#if defined(CONFIG_SPI) + /* Configure SPI chip selects */ + + stm32_spidev_initialize(); +#endif } /************************************************************************************ diff --git a/configs/nucleo-144/src/stm32_buttons.c b/configs/nucleo-144/src/stm32_buttons.c index 54a7dafbfba1dbec86c590eae5a170933e3c27f3..c2d16e50b1b628b9e15cc99a214b19ae8b86dc12 100644 --- a/configs/nucleo-144/src/stm32_buttons.c +++ b/configs/nucleo-144/src/stm32_buttons.c @@ -2,7 +2,8 @@ * configs/nucleo-144/src/stm32_buttons.c * * Copyright (C) 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -102,7 +103,14 @@ uint8_t board_buttons(void) #ifdef CONFIG_ARCH_IRQBUTTONS xcpt_t board_button_irq(int id, xcpt_t irqhandler) { -#warning Missing logic + xcpt_t oldhandler = NULL; + + if (id == BUTTON_USER) + { + oldhandler = stm32_gpiosetevent(GPIO_BTN_USER, true, true, true, irqhandler); + } + + return oldhandler; } #endif #endif /* CONFIG_ARCH_BUTTONS */ diff --git a/configs/nucleo-144/src/stm32_dma_alloc.c b/configs/nucleo-144/src/stm32_dma_alloc.c new file mode 100644 index 0000000000000000000000000000000000000000..7ce0af1790dd4620ea6bb6637d07d8d016e8c171 --- /dev/null +++ b/configs/nucleo-144/src/stm32_dma_alloc.c @@ -0,0 +1,117 @@ +/**************************************************************************** + * configs/nucleo-144/stc/stm32_dma_alloc.c + * + * Copyright (C) 2016 PX4 Development Team. All rights reserved. + * + * 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 PX4 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 "nucleo-144.h" + +#if defined(CONFIG_FAT_DMAMEMORY) + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +#if !defined(CONFIG_GRAN) +# error microSD DMA support requires CONFIG_GRAN +#endif + +#define BOARD_DMA_ALLOC_POOL_SIZE (8*512) + +/************************************************************************************ + * Private Data + ************************************************************************************/ + +static GRAN_HANDLE dma_allocator; + +/* The DMA heap size constrains the total number of things that can be + * ready to do DMA at a time. + * + * For example, FAT DMA depends on one sector-sized buffer per filesystem plus + * one sector-sized buffer per file. + * + * We use a fundamental alignment / granule size of 64B; this is sufficient + * to guarantee alignment for the largest STM32 DMA burst (16 beats x 32bits). + */ + +static uint8_t g_dma_heap[BOARD_DMA_ALLOC_POOL_SIZE] __attribute__((aligned(64))); + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32_dma_alloc_init + * + * Description: + * All boards may optionally provide this API to instantiate a pool of + * memory for uses with FAST FS DMA operations. + * + ************************************************************************************/ + +int stm32_dma_alloc_init(void) +{ + dma_allocator = gran_initialize(g_dma_heap, + sizeof(g_dma_heap), + 7, /* 128B granule - must be > alignment (XXX bug?) */ + 6); /* 64B alignment */ + + if (dma_allocator == NULL) + { + return -ENOMEM; + } + + return OK; +} + +/* DMA-aware allocator stubs for the FAT filesystem. */ + +void *fat_dma_alloc(size_t size) +{ + return gran_alloc(dma_allocator, size); +} + +void fat_dma_free(FAR void *memory, size_t size) +{ + gran_free(dma_allocator, memory, size); +} + +#endif /* CONFIG_FAT_DMAMEMORY */ diff --git a/configs/nucleo-144/src/stm32_sdio.c b/configs/nucleo-144/src/stm32_sdio.c new file mode 100644 index 0000000000000000000000000000000000000000..87b316be2e062fc8a318e53a7901d057dd67376b --- /dev/null +++ b/configs/nucleo-144/src/stm32_sdio.c @@ -0,0 +1,176 @@ +/**************************************************************************** + * config/nucleo-144/src/stm32_sdio.c + * + * Copyright (C) 2014, 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 "stm32.h" +#include "nucleo-144.h" + +#ifdef HAVE_SDIO + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +/* Card detections requires card support and a card detection GPIO */ + +#define HAVE_NCD 1 +#if !defined(CONFIG_STM32_SDIO) || !defined(GPIO_SDIO_NCD) +# undef HAVE_NCD +#endif + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static FAR struct sdio_dev_s *g_sdio_dev; +#ifdef HAVE_NCD +static bool g_sd_inserted = 0xff; /* Impossible value */ +#endif + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_ncd_interrupt + * + * Description: + * Card detect interrupt handler. + * + ****************************************************************************/ + +#ifdef HAVE_NCD +static int stm32_ncd_interrupt(int irq, FAR void *context) +{ + bool present; + + present = !stm32_gpioread(GPIO_SDIO_NCD); + if (present != g_sd_inserted) + { + sdio_mediachange(g_sdio_dev, present); + g_sd_inserted = present; + } + + return OK; +} +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_sdio_initialize + * + * Description: + * Initialize SDIO-based MMC/SD card support + * + ****************************************************************************/ + +int stm32_sdio_initialize(void) +{ + int ret; + +#ifdef HAVE_NCD + /* Card detect */ + + bool cd_status; + + /* Configure the card detect GPIO */ + + stm32_configgpio(GPIO_SDIO_NCD); + + /* Register an interrupt handler for the card detect pin */ + + stm32_gpiosetevent(GPIO_SDIO_NCD, true, true, true, stm32_ncd_interrupt); +#endif + + /* Mount the SDIO-based MMC/SD block driver */ + /* First, get an instance of the SDIO interface */ + + finfo("Initializing SDIO slot %d\n", SDIO_SLOTNO); + + g_sdio_dev = sdio_initialize(SDIO_SLOTNO); + if (!g_sdio_dev) + { + ferr("ERROR: Failed to initialize SDIO slot %d\n", SDIO_SLOTNO); + return -ENODEV; + } + + /* Now bind the SDIO interface to the MMC/SD driver */ + + finfo("Bind SDIO to the MMC/SD driver, minor=%d\n", SDIO_MINOR); + + ret = mmcsd_slotinitialize(SDIO_MINOR, g_sdio_dev); + if (ret != OK) + { + ferr("ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); + return ret; + } + + finfo("Successfully bound SDIO to the MMC/SD driver\n"); + +#ifdef HAVE_NCD + /* Use SD card detect pin to check if a card is g_sd_inserted */ + + cd_status = !stm32_gpioread(GPIO_SDIO_NCD); + finfo("Card detect : %d\n", cd_status); + + sdio_mediachange(g_sdio_dev, cd_status); +#else + /* Assume that the SD card is inserted. What choice do we have? */ + + sdio_mediachange(g_sdio_dev, true); +#endif + + return OK; +} + +#endif /* HAVE_SDIO */ diff --git a/configs/nucleo-144/src/stm32_spi.c b/configs/nucleo-144/src/stm32_spi.c index e31a63a11de89140ec3e3f1a1234408327117075..9a1f28a94e2493c562ffd06712f912620dbefe68 100644 --- a/configs/nucleo-144/src/stm32_spi.c +++ b/configs/nucleo-144/src/stm32_spi.c @@ -3,6 +3,7 @@ * * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Authors: Gregory Nutt + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -49,29 +50,117 @@ #include "up_arch.h" #include "chip.h" +#include "stm32_gpio.h" #include "stm32_spi.h" #include "nucleo-144.h" -#if defined(CONFIG_STM32F7_SPI1) || defined(CONFIG_STM32F7_SPI2) || \ - defined(CONFIG_STM32F7_SPI3) || defined(CONFIG_STM32F7_SPI4) || \ - defined(CONFIG_STM32F7_SPI5) +#if defined(CONFIG_SPI) /************************************************************************************ * Pre-processor Definitions ************************************************************************************/ -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg +#define ArraySize(x) (sizeof((x)) / sizeof((x)[0])) + +#if defined(CONFIG_NUCLEO_SPI1_TEST) +# if defined(CONFIG_NUCLEO_SPI1_TEST_MODE0) +# define CONFIG_NUCLEO_SPI1_TEST_MODE SPIDEV_MODE0 +# elif defined(CONFIG_NUCLEO_SPI1_TEST_MODE1) +# define CONFIG_NUCLEO_SPI1_TEST_MODE SPIDEV_MODE1 +# elif defined(CONFIG_NUCLEO_SPI1_TEST_MODE2) +# define CONFIG_NUCLEO_SPI1_TEST_MODE SPIDEV_MODE2 +# elif defined(CONFIG_NUCLEO_SPI1_TEST_MODE3) +# define CONFIG_NUCLEO_SPI1_TEST_MODE SPIDEV_MODE3 # else -# define spivdbg(x...) +# error "No CONFIG_NUCLEO_SPI1_TEST_MODEx defined" +# endif +#endif + +#if defined(CONFIG_NUCLEO_SPI2_TEST) +# if defined(CONFIG_NUCLEO_SPI2_TEST_MODE0) +# define CONFIG_NUCLEO_SPI2_TEST_MODE SPIDEV_MODE0 +# elif defined(CONFIG_NUCLEO_SPI2_TEST_MODE1) +# define CONFIG_NUCLEO_SPI2_TEST_MODE SPIDEV_MODE1 +# elif defined(CONFIG_NUCLEO_SPI2_TEST_MODE2) +# define CONFIG_NUCLEO_SPI2_TEST_MODE SPIDEV_MODE2 +# elif defined(CONFIG_NUCLEO_SPI2_TEST_MODE3) +# define CONFIG_NUCLEO_SPI2_TEST_MODE SPIDEV_MODE3 +# else +# error "No CONFIG_NUCLEO_SPI2_TEST_MODEx defined" +# endif +#endif + +#if defined(CONFIG_NUCLEO_SPI3_TEST) +# if defined(CONFIG_NUCLEO_SPI3_TEST_MODE0) +# define CONFIG_NUCLEO_SPI3_TEST_MODE SPIDEV_MODE0 +# elif defined(CONFIG_NUCLEO_SPI3_TEST_MODE1) +# define CONFIG_NUCLEO_SPI3_TEST_MODE SPIDEV_MODE1 +# elif defined(CONFIG_NUCLEO_SPI3_TEST_MODE2) +# define CONFIG_NUCLEO_SPI3_TEST_MODE SPIDEV_MODE2 +# elif defined(CONFIG_NUCLEO_SPI3_TEST_MODE3) +# define CONFIG_NUCLEO_SPI3_TEST_MODE SPIDEV_MODE3 +# else +# error "No CONFIG_NUCLEO_SPI3_TEST_MODEx defined" +# endif +#endif + +/************************************************************************************ + * Private Data + ************************************************************************************/ + +/* Indexed by NUCLEO_SPI_BUSx_CSx */ + +static const uint32_t g_spigpio[] = +{ +#if defined(GPIO_SPI1_CS0) + GPIO_SPI1_CS0, +#endif +#if defined(GPIO_SPI1_CS1) + GPIO_SPI1_CS1, +#endif +#if defined(GPIO_SPI1_CS2) + GPIO_SPI1_CS2, +#endif +#if defined(GPIO_SPI1_CS3) + GPIO_SPI1_CS3, +#endif +#if defined(GPIO_SPI2_CS0) + GPIO_SPI2_CS0, +#endif +#if defined(GPIO_SPI2_CS1) + GPIO_SPI2_CS1, +#endif +#if defined(GPIO_SPI2_CS2) + GPIO_SPI2_CS2, +#endif +#if defined(GPIO_SPI2_CS3) + GPIO_SPI2_CS3, +#endif +#if defined(GPIO_SPI3_CS0) + GPIO_SPI3_CS0, +#endif +#if defined(GPIO_SPI3_CS1) + GPIO_SPI3_CS1, +#endif +#if defined(GPIO_SPI3_CS2) + GPIO_SPI3_CS2, +#endif +#if defined(GPIO_SPI3_CS3) + GPIO_SPI3_CS3, +#endif +}; + +#if defined(CONFIG_NUCLEO_SPI_TEST) +# if defined(CONFIG_STM32F7_SPI1) +struct spi_dev_s *spi1; +# endif +# if defined(CONFIG_STM32F7_SPI2) +struct spi_dev_s *spi2; +# endif +# if defined(CONFIG_STM32F7_SPI3) +struct spi_dev_s *spi3; # endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) #endif /************************************************************************************ @@ -82,12 +171,20 @@ * Name: stm32_spidev_initialize * * Description: - * Called to configure SPI chip select GPIO pins for the stm32f746g-disco board. + * Called to configure SPI chip select GPIO pins for the Nucleo-144 board. * ************************************************************************************/ void weak_function stm32_spidev_initialize(void) { + int i; + + /* Configure SPI CS GPIO for output */ + + for (i = 0; i < ArraySize(g_spigpio); i++) + { + stm32_configgpio(g_spigpio[i]); + } } /**************************************************************************** @@ -118,7 +215,8 @@ void weak_function stm32_spidev_initialize(void) #ifdef CONFIG_STM32F7_SPI1 void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + stm32_gpiowrite(g_spigpio[devid], !selected); } uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -130,7 +228,8 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32F7_SPI2 void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + stm32_gpiowrite(g_spigpio[devid], !selected); } uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -142,7 +241,8 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32F7_SPI3 void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + stm32_gpiowrite(g_spigpio[devid], !selected); } uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -152,9 +252,14 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #endif #ifdef CONFIG_STM32F7_SPI4 +# ifndef NUCLEO_SPI_BUS4_CS0 +# error "NUCLEO_SPI_BUS4_CSn Are not defined" +# endif + void stm32_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + stm32_gpiowrite(g_spigpio[devid], !selected); } uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -164,9 +269,30 @@ uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #endif #ifdef CONFIG_STM32F7_SPI5 +# ifndef NUCLEO_SPI_BUS5_CS0 +# error "NUCLEO_SPI_BUS4_CSn Are not defined" +# endif + +void stm32_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +{ + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + stm32_gpiowrite(g_spigpio[devid], !selected); +} + +uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +{ + return 0; +} +#endif + +#ifdef CONFIG_STM32F7_SPI6 +# ifndef NUCLEO_SPI_BUS6_CS +# error "NUCLEO_SPI_BUS4_CSn Are not defined" +# endif void stm32_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + stm32_gpiowrite(g_spigpio[devid], !selected); } uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -234,5 +360,74 @@ int stm32_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) } #endif +#ifdef CONFIG_STM32F7_SPI6 +int stm32_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +{ + return -ENODEV; +} +#endif + #endif /* CONFIG_SPI_CMDDATA */ -#endif /* CONFIG_STM32F7_SPI1 || ... CONFIG_STM32F7_SPI5 */ + +#if defined(CONFIG_NUCLEO_SPI_TEST) +int stm32_spidev_bus_test(void) +{ + /* Configure and test SPI-*/ + + uint8_t *tx = (uint8_t *)CONFIG_NUCLEO_SPI_TEST_MESSAGE; + +#if defined(CONFIG_NUCLEO_SPI1_TEST) + spi1 = stm32_spibus_initialize(1); + + if (!spi1) + { + syslog(LOG_ERR, "ERROR Failed to initialize SPI port 1\n"); + return -ENODEV; + } + + /* Default SPI1 to NUCLEO_SPI1_FREQ and mode */ + + SPI_SETFREQUENCY(spi1, CONFIG_NUCLEO_SPI1_TEST_FREQ); + SPI_SETBITS(spi1, CONFIG_NUCLEO_SPI1_TEST_BITS); + SPI_SETMODE(spi1, CONFIG_NUCLEO_SPI1_TEST_MODE); + SPI_EXCHANGE(spi1, tx, NULL, ArraySize(CONFIG_NUCLEO_SPI_TEST_MESSAGE)); +#endif + +#if defined(CONFIG_NUCLEO_SPI2_TEST) + spi2 = stm32_spibus_initialize(2); + + if (!spi2) + { + syslog(LOG_ERR, "ERROR Failed to initialize SPI port 2\n"); + return -ENODEV; + } + + /* Default SPI2 to NUCLEO_SPI2_FREQ and mode */ + + SPI_SETFREQUENCY(spi2, CONFIG_NUCLEO_SPI2_TEST_FREQ); + SPI_SETBITS(spi2, CONFIG_NUCLEO_SPI2_TEST_BITS); + SPI_SETMODE(spi2, CONFIG_NUCLEO_SPI2_TEST_MODE); + SPI_EXCHANGE(spi2, tx, NULL, ArraySize(CONFIG_NUCLEO_SPI_TEST_MESSAGE)); +#endif + +#if defined(CONFIG_NUCLEO_SPI3_TEST) + spi3 = stm32_spibus_initialize(3); + + if (!spi3) + { + syslog(LOG_ERR, "ERROR Failed to initialize SPI port 2\n"); + return -ENODEV; + } + + /* Default SPI3 to NUCLEO_SPI3_FREQ and mode */ + + SPI_SETFREQUENCY(spi3, CONFIG_NUCLEO_SPI3_TEST_FREQ); + SPI_SETBITS(spi3, CONFIG_NUCLEO_SPI3_TEST_BITS); + SPI_SETMODE(spi3, CONFIG_NUCLEO_SPI3_TEST_MODE); + SPI_EXCHANGE(spi3, tx, NULL, ArraySize(CONFIG_NUCLEO_SPI_TEST_MESSAGE)); +#endif + + return OK; +} +#endif /* NUCLEO_SPI_TEST */ +#endif /* defined(CONFIG_SPI) */ diff --git a/configs/nucleo-144/src/stm32_userleds.c b/configs/nucleo-144/src/stm32_userleds.c index 4ec9f209479e6a94dadd9b3171fd44c5163c8b86..a5dfaea3e7b8285f3196f051c459722d3dc10acb 100644 --- a/configs/nucleo-144/src/stm32_userleds.c +++ b/configs/nucleo-144/src/stm32_userleds.c @@ -2,8 +2,9 @@ * configs/nucleo-144/src/stm32_userleds.c * * Copyright (C) 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * Author: Mark Olsson + * Authors: Gregory Nutt + * Mark Olsson + * David Sidrane * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -43,6 +44,7 @@ #include #include +#include #include #include "stm32_gpio.h" @@ -54,27 +56,21 @@ * 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 +#define ArraySize(x) (sizeof((x)) / sizeof((x)[0])) /**************************************************************************** * Private Data ****************************************************************************/ -/* This array maps an LED number to GPIO pin configuration */ +/* This array maps an LED number to GPIO pin configuration and is indexed by + * BOARD_LED_ + */ -static const uint32_t g_ledcfg[3] = +static const uint32_t g_ledcfg[BOARD_NLEDS] = { - GPIO_LD1, GPIO_LD2, GPIO_LD3 + GPIO_LED_GREEN, + GPIO_LED_BLUE, + GPIO_LED_RED, }; /**************************************************************************** @@ -98,7 +94,7 @@ void board_userled_initialize(void) /* Configure LED1-3 GPIOs for output */ - for (i = 0; i < 3; i++) + for (i = 0; i < ArraySize(g_ledcfg); i++) { stm32_configgpio(g_ledcfg[i]); } @@ -116,10 +112,10 @@ void board_userled_initialize(void) void board_userled(int led, bool ledon) { - if ((unsigned)led < 3) - { - stm32_gpiowrite(g_ledcfg[led], ledon); - } + if ((unsigned)led < ArraySize(g_ledcfg)) + { + stm32_gpiowrite(g_ledcfg[led], ledon); + } } /**************************************************************************** @@ -139,7 +135,7 @@ void board_userled_all(uint8_t ledset) /* Configure LED1-3 GPIOs for output */ - for (i = 0; i < 3; i++) + for (i = 0; i < ArraySize(g_ledcfg); i++) { stm32_gpiowrite(g_ledcfg[i], (ledset & (1 << i)) != 0); } diff --git a/configs/nucleo-f303re/adc/defconfig b/configs/nucleo-f303re/adc/defconfig index 4a26a328f99fe129cb3ef245df2db8bbfbf0f13b..d8aeb57c2879ae8c4068c21489cd00a1a5bffc19 100644 --- a/configs/nucleo-f303re/adc/defconfig +++ b/configs/nucleo-f303re/adc/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -415,6 +418,10 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set CONFIG_STM32_CCMEXCLUDE=y # CONFIG_STM32_DMACAPABLE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -674,7 +681,12 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -682,6 +694,7 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -696,14 +709,17 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_NONE=y +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -740,12 +756,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -818,6 +828,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -852,10 +863,10 @@ CONFIG_EXAMPLES_ADC_SWTRIG=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -864,18 +875,18 @@ CONFIG_EXAMPLES_ADC_SWTRIG=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -889,10 +900,10 @@ CONFIG_EXAMPLES_ADC_SWTRIG=y # 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_WEBSERVER is not set # # File System Utilities @@ -914,8 +925,8 @@ CONFIG_EXAMPLES_ADC_SWTRIG=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -948,16 +959,16 @@ CONFIG_EXAMPLES_ADC_SWTRIG=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/nucleo-f303re/can/defconfig b/configs/nucleo-f303re/can/defconfig index 3fe7a7e6ffde2ab2413197885a4b125a1273c6a2..d25a894c12e261d5965a0665b31c20cadf34d5c2 100644 --- a/configs/nucleo-f303re/can/defconfig +++ b/configs/nucleo-f303re/can/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -204,6 +206,7 @@ CONFIG_CAN_TSEG2=7 # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -419,6 +422,10 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -676,7 +683,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -684,6 +696,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -698,14 +711,17 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_NONE=y +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -742,12 +758,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -820,6 +830,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -854,10 +865,10 @@ CONFIG_EXAMPLES_CAN_READWRITE=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -866,18 +877,18 @@ CONFIG_EXAMPLES_CAN_READWRITE=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -891,10 +902,10 @@ CONFIG_EXAMPLES_CAN_READWRITE=y # 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_WEBSERVER is not set # # File System Utilities @@ -916,8 +927,8 @@ CONFIG_EXAMPLES_CAN_READWRITE=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -950,16 +961,16 @@ CONFIG_EXAMPLES_CAN_READWRITE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/nucleo-f303re/include/board.h b/configs/nucleo-f303re/include/board.h index c645b46b8082d332416a9eb0d7e000b4d17638aa..3a8d91c6c463ca7c9e2d351f6777b2f340d4de97 100644 --- a/configs/nucleo-f303re/include/board.h +++ b/configs/nucleo-f303re/include/board.h @@ -2,7 +2,7 @@ * configs/nucleo-f303re/include/board.h * include/arch/board/board.h * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Copyright (C) 2015 Omni Hoverboards Inc. All rights reserved. * Authors: Gregory Nutt * Paul Alexander Patience @@ -96,13 +96,14 @@ #define STM32_RCC_CFGR_PPRE2 RCC_CFGR_PPRE2_HCLK #define STM32_PCLK2_FREQUENCY STM32_HCLK_FREQUENCY -#define STM32_APB2_CLKIN (STM32_PCLK2_FREQUENCY) /* Timers 2-7, 12-14 */ +#define STM32_APB2_CLKIN (STM32_PCLK2_FREQUENCY) /* Timers 1 and 8, 15-17 */ -/* APB2 timers 1 and 8 will receive PCLK2. */ +/* APB2 timers 1 and 8, 15-17 will receive PCLK2. */ + +/* Timers driven from APB2 will be PCLK2 */ #define STM32_APB2_TIM1_CLKIN (STM32_PCLK2_FREQUENCY) #define STM32_APB2_TIM8_CLKIN (STM32_PCLK2_FREQUENCY) - #define STM32_APB1_TIM15_CLKIN (STM32_PCLK2_FREQUENCY) #define STM32_APB1_TIM16_CLKIN (STM32_PCLK2_FREQUENCY) #define STM32_APB1_TIM17_CLKIN (STM32_PCLK2_FREQUENCY) @@ -112,50 +113,38 @@ #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 (REVISIT) */ +/* APB1 timers 2-7 will be twice 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_TIM6_CLKIN (STM32_PCLK1_FREQUENCY) -#define STM32_APB1_TIM7_CLKIN (STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM6_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM7_CLKIN (2*STM32_PCLK1_FREQUENCY) /* USB divider -- Divide PLL clock by 1.5 */ #define STM32_CFGR_USBPRE 0 -/* Timers driven from APB1 will be twice 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 (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/2 (84MHz) */ #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_PCLK2_FREQUENCY) -#define STM32_APB2_TIM10_CLKIN (2*STM32_PCLK2_FREQUENCY) -#define STM32_APB2_TIM11_CLKIN (2*STM32_PCLK2_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 */ -#define STM32_TIM18_FREQUENCY STM32_HCLK_FREQUENCY -#define STM32_TIM27_FREQUENCY (STM32_HCLK_FREQUENCY/2) +#define BOARD_TIM1_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM2_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM3_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM4_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM5_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM6_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM7_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM8_FREQUENCY STM32_HCLK_FREQUENCY /* LED definitions **********************************************************/ /* The Nucleo F303RE board has three LEDs. Two of these are controlled by diff --git a/configs/nucleo-f303re/nxlines/defconfig b/configs/nucleo-f303re/nxlines/defconfig index 6ea676faa0e0efd12555fa8973f79039d7145851..aa42977bb4d476be9b51540c9fdcb61e77edd075 100644 --- a/configs/nucleo-f303re/nxlines/defconfig +++ b/configs/nucleo-f303re/nxlines/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -201,6 +203,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -416,6 +419,10 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -668,6 +675,8 @@ CONFIG_SPI_CMDDATA=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -682,10 +691,14 @@ CONFIG_SPI_CMDDATA=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set # CONFIG_LCD_NOGETRUN is not set @@ -738,11 +751,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set - -# -# Alphanumeric/Segment LCD Devices -# -# CONFIG_LCD_LCD1602 is not set +# CONFIG_SLCD is not set # # LED Support @@ -750,6 +759,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -764,18 +774,21 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set CONFIG_RAMLOG=y -CONFIG_RAMLOG_SYSLOG=y CONFIG_RAMLOG_BUFSIZE=1024 # CONFIG_RAMLOG_CRLF is not set CONFIG_RAMLOG_NONBLOCKING=y +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_RAMLOG_SYSLOG=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -812,13 +825,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_PROCFS 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 # @@ -977,6 +983,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1007,10 +1014,10 @@ CONFIG_ARCH_HAVE_TLS=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -1020,7 +1027,6 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_EXAMPLES_NSH is not set # 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 @@ -1032,13 +1038,14 @@ CONFIG_EXAMPLES_NXLINES_LINEWIDTH=16 CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=16 CONFIG_EXAMPLES_NXLINES_BPP=8 CONFIG_EXAMPLES_NXLINES_EXTERNINIT=y +# CONFIG_EXAMPLES_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1052,10 +1059,10 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=y # 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_WEBSERVER is not set # # File System Utilities @@ -1077,8 +1084,8 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1111,16 +1118,16 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/nucleo-f303re/pwm/defconfig b/configs/nucleo-f303re/pwm/defconfig index 08973aff2a7ac5f620b3dcda993341756f1ee02d..bb9fdd51789360732f5cc70596c866bcdf674eec 100644 --- a/configs/nucleo-f303re/pwm/defconfig +++ b/configs/nucleo-f303re/pwm/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -413,6 +416,10 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# CONFIG_STM32_TIM3_PWM=y CONFIG_STM32_TIM3_MODE=0 CONFIG_STM32_TIM3_CHANNEL1=y @@ -675,7 +682,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -683,6 +695,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -697,18 +710,21 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set CONFIG_RAMLOG=y -CONFIG_RAMLOG_SYSLOG=y CONFIG_RAMLOG_BUFSIZE=1024 # CONFIG_RAMLOG_CRLF is not set CONFIG_RAMLOG_NONBLOCKING=y +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_RAMLOG_SYSLOG=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -746,13 +762,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_PROCFS 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 # @@ -825,6 +834,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -859,10 +869,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -871,15 +881,16 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set CONFIG_EXAMPLES_PWM=y CONFIG_EXAMPLES_PWM_DEVPATH="/dev/pwm0" @@ -889,7 +900,6 @@ CONFIG_EXAMPLES_PWM_DUTYPCT1=50 CONFIG_EXAMPLES_PWM_CHANNEL1=1 CONFIG_EXAMPLES_PWM_DUTYPCT2=50 CONFIG_EXAMPLES_PWM_CHANNEL2=2 -# CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -897,17 +907,17 @@ CONFIG_EXAMPLES_PWM_CHANNEL2=2 # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -929,8 +939,8 @@ CONFIG_EXAMPLES_PWM_CHANNEL2=2 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1054,17 +1064,17 @@ CONFIG_NSH_CONSOLE=y # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set CONFIG_SYSTEM_CLE=y CONFIG_SYSTEM_CLE_DEBUGLEVEL=0 # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y # 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/nucleo-f303re/serialrx/defconfig b/configs/nucleo-f303re/serialrx/defconfig index 2203ccbe87e82080f8fa63cc00d2504690cd9f46..e758d84d1fc50c08c09edbaddab778516e413a8d 100644 --- a/configs/nucleo-f303re/serialrx/defconfig +++ b/configs/nucleo-f303re/serialrx/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -200,6 +202,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -414,6 +417,10 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -424,9 +431,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_UART4_SERIALDRIVER=y # CONFIG_STM32_UART4_1WIREDRIVER is not set # CONFIG_UART4_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -681,7 +696,12 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -689,6 +709,7 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -699,6 +720,8 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y +# CONFIG_SERIAL_REMOVABLE is not set +# CONFIG_SERIAL_CONSOLE is not set # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -748,14 +771,17 @@ CONFIG_UART4_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_NONE=y +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -792,12 +818,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -870,6 +890,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -900,10 +921,10 @@ CONFIG_ARCH_HAVE_TLS=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -912,18 +933,18 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -945,10 +966,10 @@ CONFIG_EXAMPLES_SERIALRX_PRINTSTR=y # 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_WEBSERVER is not set # # File System Utilities @@ -970,8 +991,8 @@ CONFIG_EXAMPLES_SERIALRX_PRINTSTR=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1004,16 +1025,16 @@ CONFIG_EXAMPLES_SERIALRX_PRINTSTR=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/nucleo-f303re/src/stm32_adc.c b/configs/nucleo-f303re/src/stm32_adc.c index 35d8ad5c3f1730ea37bee5defea047ae838bdc12..10871a82da639a9b763298a6d4939450a59b79cf 100644 --- a/configs/nucleo-f303re/src/stm32_adc.c +++ b/configs/nucleo-f303re/src/stm32_adc.c @@ -222,7 +222,7 @@ int board_adc_setup(void) adc = stm32_adcinitialize(ADC_PORT, g_chanlist, ADC_NCHANNELS); if (adc == NULL) { - adbg("ERROR: Failed to get ADC interface\n"); + aerr("ERROR: Failed to get ADC interface\n"); return -ENODEV; } @@ -231,7 +231,7 @@ int board_adc_setup(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - adbg("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } diff --git a/configs/nucleo-f303re/src/stm32_autoleds.c b/configs/nucleo-f303re/src/stm32_autoleds.c index db170d7b2cdf6cf5fdf66f4117c183a2358f40dd..d7571a88e937328e6bb0fe1b8677ddb5cc64f538 100644 --- a/configs/nucleo-f303re/src/stm32_autoleds.c +++ b/configs/nucleo-f303re/src/stm32_autoleds.c @@ -53,34 +53,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/nucleo-f303re/src/stm32_can.c b/configs/nucleo-f303re/src/stm32_can.c index 430be9c69d19acca0529d375cd9dbba42140dbb5..41eae2ff92bc1926577d499867a5f322c402c57b 100644 --- a/configs/nucleo-f303re/src/stm32_can.c +++ b/configs/nucleo-f303re/src/stm32_can.c @@ -52,37 +52,6 @@ #if defined(CONFIG_CAN) && defined(CONFIG_STM32_CAN1) -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* 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 - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -111,7 +80,7 @@ int board_can_initialize(void) can = stm32_caninitialize(1); if (can == NULL) { - candbg("ERROR: Failed to get CAN interface\n"); + canerr("ERROR: Failed to get CAN interface\n"); return -ENODEV; } @@ -120,7 +89,7 @@ int board_can_initialize(void) ret = can_register("/dev/can0", can); if (ret < 0) { - candbg("ERROR: can_register failed: %d\n", ret); + canerr("ERROR: can_register failed: %d\n", ret); return ret; } diff --git a/configs/nucleo-f303re/src/stm32_pwm.c b/configs/nucleo-f303re/src/stm32_pwm.c index 57e734d78b3b2243f81989070366e65879e7a14e..6b940e8879fb71baf0bb72f55ac5af6083cb2a53 100644 --- a/configs/nucleo-f303re/src/stm32_pwm.c +++ b/configs/nucleo-f303re/src/stm32_pwm.c @@ -53,37 +53,6 @@ #ifdef CONFIG_PWM -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing PWM */ - -#ifdef CONFIG_DEBUG_PWM -# define pwmdbg dbg -# define pwmvdbg vdbg -# define pwmlldbg lldbg -# define pwmllvdbg llvdbg -#else -# define pwmdbg(x...) -# define pwmvdbg(x...) -# define pwmlldbg(x...) -# define pwmllvdbg(x...) -#endif - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -112,7 +81,7 @@ int board_pwm_setup(void) pwm = stm32_pwminitialize(NUCLEO_F303RE_PWMTIMER); if (pwm == NULL) { - pwmdbg("Failed to get the STM32 PWM lower half\n"); + pwmerr("ERROR: Failed to get the STM32 PWM lower half\n"); return -ENODEV; } @@ -121,7 +90,7 @@ int board_pwm_setup(void) ret = pwm_register("/dev/pwm0", pwm); if (ret < 0) { - pwmdbg("pwm_register failed: %d\n", ret); + pwmerr("ERROR: pwm_register failed: %d\n", ret); return ret; } diff --git a/configs/nucleo-f303re/src/stm32_spi.c b/configs/nucleo-f303re/src/stm32_spi.c index 51297ba4260ad96b3c372ee484b93f17a5877bf2..6251ede1da3b2a558783ab3907e7e3fe9eb53b34 100644 --- a/configs/nucleo-f303re/src/stm32_spi.c +++ b/configs/nucleo-f303re/src/stm32_spi.c @@ -56,32 +56,6 @@ #ifdef CONFIG_SPI -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -132,7 +106,7 @@ void weak_function stm32_spidev_initialize(void) void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #if defined(CONFIG_LCD_SSD1351) if (devid == SPIDEV_DISPLAY) @@ -152,7 +126,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -165,7 +139,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) diff --git a/configs/nucleo-f303re/src/stm32_ssd1351.c b/configs/nucleo-f303re/src/stm32_ssd1351.c index 417c4f4e8bbe8a7b4c2b53ba9ca8e957aab85056..01461fa06ab4e89fe2c7800db299ea356cc99b8d 100644 --- a/configs/nucleo-f303re/src/stm32_ssd1351.c +++ b/configs/nucleo-f303re/src/stm32_ssd1351.c @@ -71,16 +71,6 @@ # error "The configuration requires the SPI 4-wire interface" #endif -/* Debug ********************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__) -# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -114,7 +104,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) spi = stm32_spibus_initialize(1); if (spi == NULL) { - lcddbg("Failed to initialize SPI port 1\n"); + lcderr("ERROR: Failed to initialize SPI port 1\n"); } else { @@ -123,11 +113,11 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) dev = ssd1351_initialize(spi, devno); if (dev == NULL) { - lcddbg("Failed to bind SPI port 1 to OLED %d: %d\n", devno); + lcderr("ERROR: Failed to bind SPI port 1 to OLED %d: %d\n", devno); } else { - lcdvdbg("Bound SPI port 1 to OLED %d\n", devno); + lcdinfo("Bound SPI port 1 to OLED %d\n", devno); /* And turn the OLED on */ diff --git a/configs/nucleo-f303re/src/stm32_userleds.c b/configs/nucleo-f303re/src/stm32_userleds.c index 8644973dbc14fcb39b9340511eba123389262511..a9fa8f1ff0d0b4b5e479f53705efc6746794e607 100644 --- a/configs/nucleo-f303re/src/stm32_userleds.c +++ b/configs/nucleo-f303re/src/stm32_userleds.c @@ -52,22 +52,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/nucleo-f303re/uavcan/defconfig b/configs/nucleo-f303re/uavcan/defconfig index c68b048740a91e645035dfc065629b079948dca5..9dd992e89d9d59133371c8c4da8a8cc2437f100c 100644 --- a/configs/nucleo-f303re/uavcan/defconfig +++ b/configs/nucleo-f303re/uavcan/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -413,6 +416,10 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -653,7 +660,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -661,6 +673,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -675,14 +688,17 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_NONE=y +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -719,12 +735,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -797,6 +807,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -865,10 +876,10 @@ CONFIG_LIBUAVCAN_INIT_RETRIES=0 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -877,18 +888,18 @@ CONFIG_LIBUAVCAN_INIT_RETRIES=0 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -906,9 +917,9 @@ CONFIG_EXAMPLES_UAVCAN=y 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_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -930,8 +941,8 @@ CONFIG_EXAMPLES_UAVCAN_NODE_NAME="org.nuttx.apps.examples.uavcan" # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -965,16 +976,16 @@ CONFIG_EXAMPLES_UAVCAN_NODE_NAME="org.nuttx.apps.examples.uavcan" # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/nucleo-f4x1re/f401-nsh/defconfig b/configs/nucleo-f4x1re/f401-nsh/defconfig index bdacfd5723e09ce7a5cc12be27f8814212058023..e52ef7184c6f5d31f78e1477e3ed701676a3973b 100644 --- a/configs/nucleo-f4x1re/f401-nsh/defconfig +++ b/configs/nucleo-f4x1re/f401-nsh/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -200,6 +202,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -408,6 +411,10 @@ 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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -421,9 +428,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -658,6 +673,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -672,7 +689,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -680,6 +702,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -691,6 +714,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -740,15 +765,18 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -786,12 +814,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -864,6 +886,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -907,10 +930,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -920,17 +943,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -938,16 +961,16 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -969,8 +992,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1094,12 +1117,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1107,6 +1130,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/nucleo-f4x1re/f411-nsh/defconfig b/configs/nucleo-f4x1re/f411-nsh/defconfig index 1192acfa94b34f5ade220dc89dc4a3d0fda94757..fa44765d45e30d9613797a5e116daa60d34897d9 100644 --- a/configs/nucleo-f4x1re/f411-nsh/defconfig +++ b/configs/nucleo-f4x1re/f411-nsh/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -200,6 +202,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -410,6 +413,10 @@ 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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -423,9 +430,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -660,6 +675,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -674,7 +691,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -682,6 +704,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -693,6 +716,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -742,15 +767,18 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -788,12 +816,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -866,6 +888,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -909,10 +932,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -922,17 +945,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -940,16 +963,16 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -971,8 +994,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1096,12 +1119,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1109,6 +1132,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/nucleo-f4x1re/include/board.h b/configs/nucleo-f4x1re/include/board.h index cd6db041bd0150df0951a5a3f1c07a833cf2e996..8580b8045a05952f4dbe3fc9ee6ac4e9e0253d48 100644 --- a/configs/nucleo-f4x1re/include/board.h +++ b/configs/nucleo-f4x1re/include/board.h @@ -1,7 +1,7 @@ /************************************************************************************ * configs/nucleo-f4x1re/include/board.h * - * 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 diff --git a/configs/nucleo-f4x1re/include/nucleo-f401re.h b/configs/nucleo-f4x1re/include/nucleo-f401re.h index 581c154e70679a96f2554abdc4b13b9d1c99ed5a..1460f5c3cc37839f21e3849263dd9c109f2f2dba 100644 --- a/configs/nucleo-f4x1re/include/nucleo-f401re.h +++ b/configs/nucleo-f4x1re/include/nucleo-f401re.h @@ -1,7 +1,7 @@ /************************************************************************************ * configs/nucleo-f4x1re/include/nucleo-f401re.h * - * 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 @@ -168,8 +168,14 @@ */ /* REVISIT */ -#define STM32_TIM18_FREQUENCY (2*STM32_PCLK2_FREQUENCY) -#define STM32_TIM27_FREQUENCY (2*STM32_PCLK1_FREQUENCY) +#define BOARD_TIM1_FREQUENCY (2*STM32_PCLK2_FREQUENCY) +#define BOARD_TIM2_FREQUENCY (2*STM32_PCLK1_FREQUENCY) +#define BOARD_TIM3_FREQUENCY (2*STM32_PCLK1_FREQUENCY) +#define BOARD_TIM4_FREQUENCY (2*STM32_PCLK1_FREQUENCY) +#define BOARD_TIM5_FREQUENCY (2*STM32_PCLK1_FREQUENCY) +#define BOARD_TIM6_FREQUENCY (2*STM32_PCLK1_FREQUENCY) +#define BOARD_TIM7_FREQUENCY (2*STM32_PCLK1_FREQUENCY) +#define BOARD_TIM8_FREQUENCY (2*STM32_PCLK2_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 diff --git a/configs/nucleo-f4x1re/include/nucleo-f411re.h b/configs/nucleo-f4x1re/include/nucleo-f411re.h index 84018f7d4be6adb995bb0e17ed2f7d74503ff7cc..1d6908bae52cb1c7b889d7a93cfe8a3b704a6629 100644 --- a/configs/nucleo-f4x1re/include/nucleo-f411re.h +++ b/configs/nucleo-f4x1re/include/nucleo-f411re.h @@ -1,7 +1,7 @@ /************************************************************************************ * configs/nucleo-f4x1re/include/nucleo-f411re.h * - * 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 @@ -164,8 +164,14 @@ */ /* REVISIT */ -#define STM32_TIM18_FREQUENCY (2*STM32_PCLK2_FREQUENCY) -#define STM32_TIM27_FREQUENCY (2*STM32_PCLK1_FREQUENCY) +#define BOARD_TIM1_FREQUENCY (2*STM32_PCLK2_FREQUENCY) +#define BOARD_TIM2_FREQUENCY (2*STM32_PCLK1_FREQUENCY) +#define BOARD_TIM3_FREQUENCY (2*STM32_PCLK1_FREQUENCY) +#define BOARD_TIM4_FREQUENCY (2*STM32_PCLK1_FREQUENCY) +#define BOARD_TIM5_FREQUENCY (2*STM32_PCLK1_FREQUENCY) +#define BOARD_TIM6_FREQUENCY (2*STM32_PCLK1_FREQUENCY) +#define BOARD_TIM7_FREQUENCY (2*STM32_PCLK1_FREQUENCY) +#define BOARD_TIM8_FREQUENCY (2*STM32_PCLK2_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 diff --git a/configs/nucleo-f4x1re/src/stm32_adc.c b/configs/nucleo-f4x1re/src/stm32_adc.c index e6aaf7cc4ce416910218514956057503a02487f8..3b55e7ef7d1c855b01561dac0fc380f6224dfcff 100644 --- a/configs/nucleo-f4x1re/src/stm32_adc.c +++ b/configs/nucleo-f4x1re/src/stm32_adc.c @@ -137,7 +137,7 @@ int board_adc_initialize(void) adc = stm32_adcinitialize(1, g_adc1_chanlist, ADC1_NCHANNELS); if (adc == NULL) { - adbg("ERROR: Failed to get ADC interface\n"); + aerr("ERROR: Failed to get ADC interface\n"); return -ENODEV; } @@ -146,7 +146,7 @@ int board_adc_initialize(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - adbg("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } #endif diff --git a/configs/nucleo-f4x1re/src/stm32_ajoystick.c b/configs/nucleo-f4x1re/src/stm32_ajoystick.c index 61eaccf244ff58e970b6298e0b42c2ed8f3cfb95..432d91667b4a42286a14847af56f9085a23aab37 100644 --- a/configs/nucleo-f4x1re/src/stm32_ajoystick.c +++ b/configs/nucleo-f4x1re/src/stm32_ajoystick.c @@ -179,7 +179,7 @@ static FAR void *g_ajoyarg; static ajoy_buttonset_t ajoy_supported(FAR const struct ajoy_lowerhalf_s *lower) { - ivdbg("Supported: %02x\n", AJOY_SUPPORTED); + iinfo("Supported: %02x\n", AJOY_SUPPORTED); return (ajoy_buttonset_t)AJOY_SUPPORTED; } @@ -212,14 +212,14 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower, int errcode = get_errno(); if (errcode != EINTR) { - idbg("ERROR: read failed: %d\n", errcode); + ierr("ERROR: read failed: %d\n", errcode); } return -errcode; } else if (nread < NJOYSTICK_CHANNELS * sizeof(struct adc_msg_s)) { - idbg("ERROR: read too small: %ld\n", (long)nread); + ierr("ERROR: read too small: %ld\n", (long)nread); return -EIO; } @@ -249,7 +249,7 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower, sample->as_x = (int16_t)tmp; have |= 1; - ivdbg("X sample: %ld -> %d\n", (long)tmp, (int)sample->as_x); + iinfo("X sample: %ld -> %d\n", (long)tmp, (int)sample->as_x); } #ifdef CONFIG_ADC_DMA @@ -259,14 +259,14 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower, sample->as_y = (int16_t)tmp; have |= 2; - ivdbg("Y sample: %ld -> %d\n", (long)tmp, (int)sample->as_y); + iinfo("Y sample: %ld -> %d\n", (long)tmp, (int)sample->as_y); } #endif } if (have != 3) { - idbg("ERROR: Could not find joystick channels\n"); + ierr("ERROR: Could not find joystick channels\n"); return -EIO; } @@ -280,7 +280,7 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower, /* Sample the discrete button inputs */ sample->as_buttons = ajoy_buttons(lower); - ivdbg("Returning: %02x\n", sample->as_buttons); + iinfo("Returning: %02x\n", sample->as_buttons); return OK; } @@ -311,7 +311,7 @@ static ajoy_buttonset_t ajoy_buttons(FAR const struct ajoy_lowerhalf_s *lower) } } - ivdbg("Returning: %02x\n", ret); + iinfo("Returning: %02x\n", ret); return ret; } @@ -340,8 +340,8 @@ static void ajoy_enable(FAR const struct ajoy_lowerhalf_s *lower, flags = enter_critical_section(); ajoy_disable(); - illvdbg("press: %02x release: %02x handler: %p arg: %p\n", - press, release, handler, arg); + iinfo("press: %02x release: %02x handler: %p arg: %p\n", + press, release, handler, arg); /* If no events are indicated or if no handler is provided, then this * must really be a request to disable interrupts. @@ -372,8 +372,8 @@ static void ajoy_enable(FAR const struct ajoy_lowerhalf_s *lower, falling = ((press & bit) != 0); rising = ((release & bit) != 0); - illvdbg("GPIO %d: rising: %d falling: %d\n", - i, rising, falling); + iinfo("GPIO %d: rising: %d falling: %d\n", + i, rising, falling); (void)stm32_gpiosetevent(g_joygpio[i], rising, falling, true, ajoy_interrupt); @@ -453,14 +453,14 @@ int board_ajoy_initialize(void) #ifndef NO_JOYSTICK_ADC int fd; - ivdbg("Initialize ADC driver: /dev/adc0\n"); + iinfo("Initialize ADC driver: /dev/adc0\n"); /* Initialize ADC. We will need this to read the ADC inputs */ ret = board_adc_initialize(); if (ret < 0) { - idbg("ERROR: board_adc_initialize() failed: %d\n", ret); + ierr("ERROR: board_adc_initialize() failed: %d\n", ret); return ret; } @@ -470,7 +470,7 @@ int board_ajoy_initialize(void) if (fd < 0) { int errcode = get_errno(); - idbg("ERROR: Failed to open /dev/adc0: %d\n", errcode); + ierr("ERROR: Failed to open /dev/adc0: %d\n", errcode); return -errcode; } @@ -481,7 +481,7 @@ int board_ajoy_initialize(void) ret = file_detach(fd, &g_adcfile); if (ret < 0) { - idbg("ERROR: Failed to detach from file descriptor: %d\n", ret); + ierr("ERROR: Failed to detach from file descriptor: %d\n", ret); (void)close(fd); return ret; } @@ -501,12 +501,12 @@ int board_ajoy_initialize(void) /* Register the joystick device as /dev/ajoy0 */ - ivdbg("Initialize joystick driver: /dev/ajoy0\n"); + iinfo("Initialize joystick driver: /dev/ajoy0\n"); ret = ajoy_register("/dev/ajoy0", &g_ajoylower); if (ret < 0) { - idbg("ERROR: ajoy_register failed: %d\n", ret); + ierr("ERROR: ajoy_register failed: %d\n", ret); #ifndef NO_JOYSTICK_ADC file_close_detached(&g_adcfile); #endif diff --git a/configs/nucleo-f4x1re/src/stm32_autoleds.c b/configs/nucleo-f4x1re/src/stm32_autoleds.c index 90a28ae0f12d1697da892ca64cfb8b7b79de0988..c37d1b016b10f46b24133f576ae76de0c3a3e4e2 100644 --- a/configs/nucleo-f4x1re/src/stm32_autoleds.c +++ b/configs/nucleo-f4x1re/src/stm32_autoleds.c @@ -54,30 +54,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/nucleo-f4x1re/src/stm32_spi.c b/configs/nucleo-f4x1re/src/stm32_spi.c index 9a1a0a17f31d453e064225cab69f9e029f0c7922..82026a0d26a2fd49c183787c6a72c65d51bb7137 100644 --- a/configs/nucleo-f4x1re/src/stm32_spi.c +++ b/configs/nucleo-f4x1re/src/stm32_spi.c @@ -55,29 +55,6 @@ #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_SPI -# undef CONFIG_DEBUG_VERBOSE -#endif - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - /************************************************************************************ * Public Data ************************************************************************************/ @@ -111,7 +88,7 @@ void weak_function stm32_spidev_initialize(void) g_spi1 = stm32_spibus_initialize(1); if (!g_spi1) { - spidbg("[boot] FAILED to initialize SPI port 1\n"); + spierr("ERROR: FAILED to initialize SPI port 1\n"); } #ifdef CONFIG_WL_CC3000 @@ -166,7 +143,7 @@ void weak_function stm32_spidev_initialize(void) #ifdef CONFIG_STM32_SPI1 void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #ifdef CONFIG_WL_CC3000 if (devid == SPIDEV_WIRELESS) @@ -192,7 +169,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI2 void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #ifdef CONFIG_WL_CC3000 if (devid == SPIDEV_WIRELESS) @@ -211,7 +188,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI3 void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) diff --git a/configs/nucleo-f4x1re/src/stm32_userleds.c b/configs/nucleo-f4x1re/src/stm32_userleds.c index 9b02b9af7492ba4c666bc4a3c41765fd8deda142..dd7750071188086c559662d2107b29e3d727932c 100644 --- a/configs/nucleo-f4x1re/src/stm32_userleds.c +++ b/configs/nucleo-f4x1re/src/stm32_userleds.c @@ -54,26 +54,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data - ****************************************************************************/ - /**************************************************************************** * Private Function Prototypes ****************************************************************************/ diff --git a/configs/nucleo-f4x1re/src/stm32_wireless.c b/configs/nucleo-f4x1re/src/stm32_wireless.c index 7b90d024c661a8fd7ae3846e030cfcfe22f836e0..0cd4e2e0662c71de403eab50d80c17c07d30b8be 100644 --- a/configs/nucleo-f4x1re/src/stm32_wireless.c +++ b/configs/nucleo-f4x1re/src/stm32_wireless.c @@ -197,7 +197,7 @@ static void wl_enable_irq(FAR struct cc3000_config_s *state, bool enable) /* Attach and enable, or detach and disable */ - ivdbg("enable:%d\n", enable); + iinfo("enable:%d\n", enable); if (enable) { (void)stm32_gpiosetevent(GPIO_WIFI_INT, false, true, false, priv->handler); @@ -210,7 +210,7 @@ static void wl_enable_irq(FAR struct cc3000_config_s *state, bool enable) static void wl_enable_power(FAR struct cc3000_config_s *state, bool enable) { - ivdbg("enable:%d\n", enable); + iinfo("enable:%d\n", enable); /* Active high enable */ @@ -219,7 +219,7 @@ static void wl_enable_power(FAR struct cc3000_config_s *state, bool enable) static void wl_select(FAR struct cc3000_config_s *state, bool enable) { - ivdbg("enable:%d\n", enable); + iinfo("enable:%d\n", enable); /* Active high enable */ @@ -280,7 +280,7 @@ int wireless_archinitialize(size_t max_rx_size) /* Init SPI bus */ - idbg("minor %d\n", minor); + iinfo("minor %d\n", minor); DEBUGASSERT(CONFIG_CC3000_DEVMINOR == 0); #ifdef CONFIG_CC3000_PROBES @@ -295,7 +295,7 @@ int wireless_archinitialize(size_t max_rx_size) spi = stm32_spibus_initialize(CONFIG_CC3000_SPIDEV); if (!spi) { - idbg("Failed to initialize SPI bus %d\n", CONFIG_CC3000_SPIDEV); + ierr("ERROR: Failed to initialize SPI bus %d\n", CONFIG_CC3000_SPIDEV); return -ENODEV; } @@ -305,7 +305,7 @@ int wireless_archinitialize(size_t max_rx_size) int ret = cc3000_register(spi, &g_cc3000_info.dev, CONFIG_CC3000_DEVMINOR); if (ret < 0) { - idbg("Failed to initialize SPI bus %d\n", CONFIG_CC3000_SPIDEV); + ierr("ERROR: Failed to initialize SPI bus %d\n", CONFIG_CC3000_SPIDEV); return -ENODEV; } diff --git a/configs/nucleo-l476rg/nsh/defconfig b/configs/nucleo-l476rg/nsh/defconfig index 4f2c7c8da4e70e9eb03bfc261199ab839fd78fae..4556a51c97e79ff2d37a1a1d0512b1246df582eb 100644 --- a/configs/nucleo-l476rg/nsh/defconfig +++ b/configs/nucleo-l476rg/nsh/defconfig @@ -42,9 +42,14 @@ CONFIG_RAW_BINARY=y # # Debug Options # -CONFIG_DEBUG=y -CONFIG_ARCH_HAVE_HEAPCHECK=y -CONFIG_DEBUG_VERBOSE=y +CONFIG_DEBUG_ALERT=y +CONFIG_DEBUG_FEATURES=y + +# +# Debug SYSLOG Output Controls +# +# CONFIG_DEBUG_ERROR is not set +# CONFIG_DEBUG_ASSERTIONS is not set # # Subsystem Debug Options @@ -60,19 +65,19 @@ CONFIG_DEBUG_LIB=y # OS Function Debug Options # # CONFIG_DEBUG_DMA is not set -# CONFIG_DEBUG_HEAP is not set # CONFIG_DEBUG_IRQ is not set # # Driver Debug Options # CONFIG_DEBUG_LEDS=y -CONFIG_DEBUG_ANALOG=y CONFIG_DEBUG_GPIO=y # CONFIG_DEBUG_RTC is not set CONFIG_DEBUG_SPI=y CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y CONFIG_DEBUG_NOOPT=y @@ -519,6 +524,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -539,7 +546,12 @@ CONFIG_RTC_IOCTL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -547,6 +559,7 @@ CONFIG_RTC_IOCTL=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -558,6 +571,8 @@ CONFIG_RTC_IOCTL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -581,10 +596,6 @@ CONFIG_USART2_SERIALDRIVER=y # 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 @@ -612,15 +623,18 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -658,12 +672,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -736,6 +744,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -783,10 +792,10 @@ CONFIG_EXAMPLES_ALARM_SIGNO=1 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -796,11 +805,11 @@ 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_NXTERM is not set # CONFIG_EXAMPLES_NXTEXT is not set CONFIG_EXAMPLES_OSTEST=y CONFIG_EXAMPLES_OSTEST_LOOPS=1 @@ -811,8 +820,8 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 CONFIG_EXAMPLES_OSTEST_WAITRESULT=y # 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_PPPD is not set CONFIG_EXAMPLES_RANDOM=y CONFIG_EXAMPLES_MAXSAMPLES=64 CONFIG_EXAMPLES_NSAMPLES=8 @@ -823,17 +832,17 @@ CONFIG_EXAMPLES_NSAMPLES=8 # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -855,8 +864,8 @@ CONFIG_EXAMPLES_NSAMPLES=8 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -867,6 +876,7 @@ CONFIG_EXAMPLES_NSAMPLES=8 # 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 @@ -979,12 +989,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -992,7 +1002,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set -# CONFIG_SYSTEM_DISCOTEST is not set diff --git a/configs/nucleo-l476rg/src/stm32_adc.c b/configs/nucleo-l476rg/src/stm32_adc.c index 45329b381785f2073d721e080e90bab5f13adc48..77ed219a312752603b8b96216111c7e13f98db6a 100644 --- a/configs/nucleo-l476rg/src/stm32_adc.c +++ b/configs/nucleo-l476rg/src/stm32_adc.c @@ -137,7 +137,7 @@ int board_adc_initialize(void) adc = stm32_adcinitialize(1, g_adc1_chanlist, ADC1_NCHANNELS); if (adc == NULL) { - adbg("ERROR: Failed to get ADC interface\n"); + aerr("ERROR: Failed to get ADC interface\n"); return -ENODEV; } @@ -146,7 +146,7 @@ int board_adc_initialize(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - adbg("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } #endif diff --git a/configs/nucleo-l476rg/src/stm32_ajoystick.c b/configs/nucleo-l476rg/src/stm32_ajoystick.c index bd57040a78f91a8cbf899f7c902f72845476ef83..6f49fd9823d2f3940b508cfcf2ef550a8a8ff690 100644 --- a/configs/nucleo-l476rg/src/stm32_ajoystick.c +++ b/configs/nucleo-l476rg/src/stm32_ajoystick.c @@ -178,7 +178,7 @@ static FAR void *g_ajoyarg; static ajoy_buttonset_t ajoy_supported(FAR const struct ajoy_lowerhalf_s *lower) { - ivdbg("Supported: %02x\n", AJOY_SUPPORTED); + iinfo("Supported: %02x\n", AJOY_SUPPORTED); return (ajoy_buttonset_t)AJOY_SUPPORTED; } @@ -211,14 +211,14 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower, int errcode = get_errno(); if (errcode != EINTR) { - idbg("ERROR: read failed: %d\n", errcode); + ierr("ERROR: read failed: %d\n", errcode); } return -errcode; } else if (nread < NJOYSTICK_CHANNELS * sizeof(struct adc_msg_s)) { - idbg("ERROR: read too small: %ld\n", (long)nread); + ierr("ERROR: read too small: %ld\n", (long)nread); return -EIO; } @@ -248,7 +248,7 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower, sample->as_x = (int16_t)tmp; have |= 1; - ivdbg("X sample: %ld -> %d\n", (long)tmp, (int)sample->as_x); + iinfo("X sample: %ld -> %d\n", (long)tmp, (int)sample->as_x); } #ifdef CONFIG_ADC_DMA @@ -258,14 +258,14 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower, sample->as_y = (int16_t)tmp; have |= 2; - ivdbg("Y sample: %ld -> %d\n", (long)tmp, (int)sample->as_y); + iinfo("Y sample: %ld -> %d\n", (long)tmp, (int)sample->as_y); } #endif } if (have != 3) { - idbg("ERROR: Could not find joystick channels\n"); + ierr("ERROR: Could not find joystick channels\n"); return -EIO; } @@ -279,7 +279,7 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower, /* Sample the discrete button inputs */ sample->as_buttons = ajoy_buttons(lower); - ivdbg("Returning: %02x\n", sample->as_buttons); + iinfo("Returning: %02x\n", sample->as_buttons); return OK; } @@ -310,7 +310,7 @@ static ajoy_buttonset_t ajoy_buttons(FAR const struct ajoy_lowerhalf_s *lower) } } - ivdbg("Returning: %02x\n", ret); + iinfo("Returning: %02x\n", ret); return ret; } @@ -339,8 +339,8 @@ static void ajoy_enable(FAR const struct ajoy_lowerhalf_s *lower, flags = enter_critical_section(); ajoy_disable(); - illvdbg("press: %02x release: %02x handler: %p arg: %p\n", - press, release, handler, arg); + iinfo("press: %02x release: %02x handler: %p arg: %p\n", + press, release, handler, arg); /* If no events are indicated or if no handler is provided, then this * must really be a request to disable interrupts. @@ -371,8 +371,8 @@ static void ajoy_enable(FAR const struct ajoy_lowerhalf_s *lower, falling = ((press & bit) != 0); rising = ((release & bit) != 0); - illvdbg("GPIO %d: rising: %d falling: %d\n", - i, rising, falling); + iinfo("GPIO %d: rising: %d falling: %d\n", + i, rising, falling); (void)stm32_gpiosetevent(g_joygpio[i], rising, falling, true, ajoy_interrupt); @@ -452,14 +452,14 @@ int board_ajoy_initialize(void) #ifndef NO_JOYSTICK_ADC int fd; - ivdbg("Initialize ADC driver: /dev/adc0\n"); + iinfo("Initialize ADC driver: /dev/adc0\n"); /* Initialize ADC. We will need this to read the ADC inputs */ ret = board_adc_initialize(); if (ret < 0) { - idbg("ERROR: board_adc_initialize() failed: %d\n", ret); + ierr("ERROR: board_adc_initialize() failed: %d\n", ret); return ret; } @@ -469,7 +469,7 @@ int board_ajoy_initialize(void) if (fd < 0) { int errcode = get_errno(); - idbg("ERROR: Failed to open /dev/adc0: %d\n", errcode); + ierr("ERROR: Failed to open /dev/adc0: %d\n", errcode); return -errcode; } @@ -480,7 +480,7 @@ int board_ajoy_initialize(void) ret = file_detach(fd, &g_adcfile); if (ret < 0) { - idbg("ERROR: Failed to detach from file descriptor: %d\n", ret); + ierr("ERROR: Failed to detach from file descriptor: %d\n", ret); (void)close(fd); return ret; } @@ -500,12 +500,12 @@ int board_ajoy_initialize(void) /* Register the joystick device as /dev/ajoy0 */ - ivdbg("Initialize joystick driver: /dev/ajoy0\n"); + iinfo("Initialize joystick driver: /dev/ajoy0\n"); ret = ajoy_register("/dev/ajoy0", &g_ajoylower); if (ret < 0) { - idbg("ERROR: ajoy_register failed: %d\n", ret); + ierr("ERROR: ajoy_register failed: %d\n", ret); #ifndef NO_JOYSTICK_ADC 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 96190c07c5414b72fe5088ef544c092177834ece..9910184bf82d8ef4ade4caa0474d4eb6c5f7a2aa 100644 --- a/configs/nucleo-l476rg/src/stm32_appinit.c +++ b/configs/nucleo-l476rg/src/stm32_appinit.c @@ -143,7 +143,7 @@ int board_app_initialize(uintptr_t arg) rtclower = stm32l4_rtc_lowerhalf(); if (!rtclower) { - sdbg("ERROR: Failed to instantiate the RTC lower-half driver\n"); + serr("ERROR: Failed to instantiate the RTC lower-half driver\n"); return -ENOMEM; } else @@ -155,7 +155,7 @@ int board_app_initialize(uintptr_t arg) ret = rtc_initialize(0, rtclower); if (ret < 0) { - sdbg("ERROR: Failed to bind/register the RTC driver: %d\n", ret); + serr("ERROR: Failed to bind/register the RTC driver: %d\n", ret); return ret; } } diff --git a/configs/nucleo-l476rg/src/stm32_autoleds.c b/configs/nucleo-l476rg/src/stm32_autoleds.c index a280311138c31364ec93b81223d78eba77a3a69e..eb1a1381c8df344ed55121832f73a1e76783db2c 100644 --- a/configs/nucleo-l476rg/src/stm32_autoleds.c +++ b/configs/nucleo-l476rg/src/stm32_autoleds.c @@ -54,30 +54,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/nucleo-l476rg/src/stm32_spi.c b/configs/nucleo-l476rg/src/stm32_spi.c index 5dad71caf5c47f4a9835fc51f95e185f55f1fd5a..a400cd52677f904f208cc367ff362df786c0bffb 100644 --- a/configs/nucleo-l476rg/src/stm32_spi.c +++ b/configs/nucleo-l476rg/src/stm32_spi.c @@ -55,29 +55,6 @@ #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_SPI -# undef CONFIG_DEBUG_VERBOSE -#endif - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - /************************************************************************************ * Public Data ************************************************************************************/ @@ -111,7 +88,7 @@ void weak_function stm32_spiinitialize(void) g_spi1 = up_spiinitialize(1); if (!g_spi1) { - spidbg("[boot] FAILED to initialize SPI port 1\n"); + spierr("ERROR: FAILED to initialize SPI port 1\n"); } #ifdef CONFIG_WL_CC3000 @@ -166,7 +143,7 @@ void weak_function stm32_spiinitialize(void) #ifdef CONFIG_STM32_SPI1 void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #ifdef CONFIG_WL_CC3000 if (devid == SPIDEV_WIRELESS) @@ -192,7 +169,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI2 void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #ifdef CONFIG_WL_CC3000 if (devid == SPIDEV_WIRELESS) @@ -211,7 +188,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI3 void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) diff --git a/configs/nucleo-l476rg/src/stm32_userleds.c b/configs/nucleo-l476rg/src/stm32_userleds.c index 01d60f55edcb8184029fa0688c3719f7007a5892..53d9193230ab20d528488f0f83a8e17c20e8f764 100644 --- a/configs/nucleo-l476rg/src/stm32_userleds.c +++ b/configs/nucleo-l476rg/src/stm32_userleds.c @@ -54,26 +54,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data - ****************************************************************************/ - /**************************************************************************** * Private Function Prototypes ****************************************************************************/ diff --git a/configs/nucleo-l476rg/src/stm32_wireless.c b/configs/nucleo-l476rg/src/stm32_wireless.c index 228749c5e55eca7abf9342399879ae4ba7fd3c01..c17da677feb8ef459fb6d47b6fdf6755b55b5b46 100644 --- a/configs/nucleo-l476rg/src/stm32_wireless.c +++ b/configs/nucleo-l476rg/src/stm32_wireless.c @@ -197,7 +197,7 @@ static void wl_enable_irq(FAR struct cc3000_config_s *state, bool enable) /* Attach and enable, or detach and disable */ - ivdbg("enable:%d\n", enable); + iinfo("enable:%d\n", enable); if (enable) { (void)stm32_gpiosetevent(GPIO_WIFI_INT, false, true, false, priv->handler); @@ -210,7 +210,7 @@ static void wl_enable_irq(FAR struct cc3000_config_s *state, bool enable) static void wl_enable_power(FAR struct cc3000_config_s *state, bool enable) { - ivdbg("enable:%d\n", enable); + iinfo("enable:%d\n", enable); /* Active high enable */ @@ -219,7 +219,7 @@ static void wl_enable_power(FAR struct cc3000_config_s *state, bool enable) static void wl_select(FAR struct cc3000_config_s *state, bool enable) { - ivdbg("enable:%d\n", enable); + iinfo("enable:%d\n", enable); /* Active high enable */ @@ -280,7 +280,7 @@ int wireless_archinitialize(size_t max_rx_size) /* Init SPI bus */ - idbg("minor %d\n", minor); + iinfo("minor %d\n", minor); DEBUGASSERT(CONFIG_CC3000_DEVMINOR == 0); #ifdef CONFIG_CC3000_PROBES @@ -295,7 +295,7 @@ int wireless_archinitialize(size_t max_rx_size) spi = up_spiinitialize(CONFIG_CC3000_SPIDEV); if (!spi) { - idbg("Failed to initialize SPI bus %d\n", CONFIG_CC3000_SPIDEV); + ierr("ERROR: Failed to initialize SPI bus %d\n", CONFIG_CC3000_SPIDEV); return -ENODEV; } @@ -305,7 +305,7 @@ int wireless_archinitialize(size_t max_rx_size) int ret = cc3000_register(spi, &g_cc3000_info.dev, CONFIG_CC3000_DEVMINOR); if (ret < 0) { - idbg("Failed to initialize SPI bus %d\n", CONFIG_CC3000_SPIDEV); + ierr("ERROR: Failed to initialize SPI bus %d\n", CONFIG_CC3000_SPIDEV); return -ENODEV; } diff --git a/configs/nutiny-nuc120/nsh/defconfig b/configs/nutiny-nuc120/nsh/defconfig index 9c73cbc043c1fd704a6da59fc70e4f1e76a01ca5..f86db749b4eef609100565d303056edefa6ce9c1 100644 --- a/configs/nutiny-nuc120/nsh/defconfig +++ b/configs/nutiny-nuc120/nsh/defconfig @@ -21,6 +21,7 @@ CONFIG_WINDOWS_CYGWIN=y # Build Configuration # # CONFIG_APPS_DIR="../apps" +CONFIG_BUILD_FLAT=y # CONFIG_BUILD_2PASS is not set # @@ -30,20 +31,31 @@ CONFIG_WINDOWS_CYGWIN=y 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_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set +CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK 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 @@ -63,27 +75,62 @@ 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=y -# CONFIG_ARCH_CHIP_SAM3U 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=y +# 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 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="armv6-m" CONFIG_ARCH_CHIP="nuc1xx" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU is not set CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_CMNVECTOR is not set -# CONFIG_ARCH_HAVE_MPU 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 is not set # # ARMV6M Configuration Options @@ -94,6 +141,8 @@ CONFIG_ARMV6M_TOOLCHAIN_BUILDROOT=y # CONFIG_ARMV6M_TOOLCHAIN_CODESOURCERYW is not set # CONFIG_ARMV6M_TOOLCHAIN_DEVKITARM is not set # CONFIG_ARMV6M_TOOLCHAIN_GNU_EABIL is not set +# CONFIG_ARMV6M_TOOLCHAIN_GNU_EABIW is not set +# CONFIG_SERIAL_TERMIOS is not set # # NUC100/120 Configuration Options @@ -171,32 +220,44 @@ CONFIG_NUC_SYSTICK_CORECLK=y # CONFIG_NUC_UARTCLK_PLL is not set CONFIG_NUC_UARTCLK_INTHI=y -# -# External Memory Configuration -# - # # Architecture Options # # CONFIG_ARCH_NOINTC is not set # CONFIG_ARCH_VECNOTIRQ is not set # CONFIG_ARCH_DMA is not set -# CONFIG_ARCH_IRQPRIO is not set -# CONFIG_ARCH_ADDRENV 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 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=y +# 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 is not set # # Board Settings # CONFIG_BOARD_LOOPSPERMSEC=2988 # CONFIG_ARCH_CALIBRATION is not set -CONFIG_RAM_START=0x20000000 -CONFIG_RAM_SIZE=16384 + +# +# Interrupt options +# CONFIG_ARCH_HAVE_INTERRUPTSTACK=y CONFIG_ARCH_INTERRUPTSTACK=0 +# CONFIG_ARCH_HAVE_HIPRI_INTERRUPT is not set # # Boot options @@ -207,6 +268,13 @@ CONFIG_BOOT_RUNFROMFLASH=y # CONFIG_BOOT_RUNFROMSDRAM is not set # CONFIG_BOOT_COPYTORAM is not set +# +# Boot Memory Configuration +# +CONFIG_RAM_START=0x20000000 +CONFIG_RAM_SIZE=16384 +# CONFIG_ARCH_HAVE_SDRAM is not set + # # Board Selection # @@ -224,38 +292,77 @@ CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_LIB_BOARDCTL is not set # # RTOS Features # -# CONFIG_BOARD_INITIALIZE is not set +CONFIG_DISABLE_OS_API=y +CONFIG_DISABLE_POSIX_TIMERS=y +# CONFIG_DISABLE_PTHREAD is not set +# CONFIG_DISABLE_SIGNALS is not set +CONFIG_DISABLE_MQUEUE=y +CONFIG_DISABLE_ENVIRON=y + +# +# Clocks and Timers +# CONFIG_USEC_PER_TICK=10000 -CONFIG_RR_INTERVAL=200 -# CONFIG_SCHED_INSTRUMENTATION is not set -CONFIG_TASK_NAME_SIZE=0 -# CONFIG_SCHED_HAVE_PARENT is not set +# CONFIG_SYSTEM_TIME64 is not set +# CONFIG_CLOCK_MONOTONIC is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=2 CONFIG_START_DAY=26 -CONFIG_DEV_CONSOLE=y +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=4 +CONFIG_WDOG_INTRESERVE=0 +CONFIG_PREALLOC_TIMERS=0 + +# +# Tasks and Scheduling +# +# CONFIG_INIT_NONE is not set +CONFIG_INIT_ENTRYPOINT=y +CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_RR_INTERVAL=200 +# CONFIG_SCHED_SPORADIC is not set +CONFIG_TASK_NAME_SIZE=0 +CONFIG_MAX_TASKS=8 +# CONFIG_SCHED_HAVE_PARENT is not set +CONFIG_SCHED_WAITPID=y + +# +# Pthread Options +# # CONFIG_MUTEX_TYPES is not set -# CONFIG_PRIORITY_INHERITANCE is not set +CONFIG_NPTHREAD_KEYS=0 + +# +# 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_SCHED_WORKQUEUE is not set -CONFIG_SCHED_WAITPID=y +CONFIG_NFILE_DESCRIPTORS=6 +CONFIG_NFILE_STREAMS=6 +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_USER_ENTRYPOINT="nsh_main" -CONFIG_DISABLE_OS_API=y -CONFIG_DISABLE_POSIX_TIMERS=y -# CONFIG_DISABLE_PTHREAD is not set -# CONFIG_DISABLE_SIGNALS is not set -CONFIG_DISABLE_MQUEUE=y -CONFIG_DISABLE_ENVIRON=y # # Signal Numbers @@ -264,21 +371,14 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGCONDTIMEDOUT=16 +# CONFIG_MODULE is not set # -# Sizes of configurable things (0 disables) +# Work queue support # -CONFIG_MAX_TASKS=8 -CONFIG_NPTHREAD_KEYS=0 -CONFIG_NFILE_DESCRIPTORS=6 -CONFIG_NFILE_STREAMS=6 -CONFIG_NAME_MAX=32 -CONFIG_PREALLOC_MQ_MSGS=0 -CONFIG_MQ_MAXMSGSIZE=0 -CONFIG_MAX_WDOGPARMS=2 -CONFIG_PREALLOC_WDOGS=4 -CONFIG_WDOG_INTRESERVE=0 -CONFIG_PREALLOC_TIMERS=0 +# CONFIG_SCHED_WORKQUEUE is not set +# CONFIG_SCHED_HPWORK is not set +# CONFIG_SCHED_LPWORK is not set # # Stack and heap information @@ -287,6 +387,7 @@ CONFIG_IDLETHREAD_STACKSIZE=1024 CONFIG_USERMAIN_STACKSIZE=1536 CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_DEFAULT=1536 +# CONFIG_LIB_SYSCALL is not set # # Device Drivers @@ -295,19 +396,52 @@ 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 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -315,11 +449,39 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # 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 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_UART1_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set # CONFIG_NO_SERIAL_CONSOLE is not set # @@ -331,24 +493,38 @@ 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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE 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 # @@ -357,13 +533,13 @@ CONFIG_UART1_2STOP=0 # File system configuration # CONFIG_DISABLE_MOUNTPOINT=y +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_RAMMAP is not set - -# -# System Logging -# - -# CONFIG_SYSLOG is not set +# CONFIG_FS_PROCFS is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -375,10 +551,20 @@ CONFIG_DISABLE_MOUNTPOINT=y # CONFIG_MM_SMALL=y CONFIG_MM_REGIONS=1 +# CONFIG_ARCH_HAVE_HEAP2 is not set # CONFIG_GRAN is not set # -# Binary Formats +# Audio Support +# +# CONFIG_AUDIO is not set + +# +# Wireless Support +# + +# +# Binary Loader # CONFIG_BINFMT_DISABLE=y # CONFIG_PIC is not set @@ -398,6 +584,8 @@ CONFIG_NUNGET_CHARS=0 # 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 @@ -407,14 +595,20 @@ CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=1536 # CONFIG_LIBC_STRERROR is not set # CONFIG_LIBC_PERROR_STDOUT is not set CONFIG_ARCH_LOWPUTC=y +# 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 Helper Functions +# Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set +# CONFIG_LIB_SLCDCODEC is not set # # Basic CXX Support @@ -427,106 +621,130 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # Examples # -# CONFIG_EXAMPLES_BUTTONS is not set -# CONFIG_EXAMPLES_CAN is not set -# CONFIG_SYSTEM_COMPOSITE is not set +# 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_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_LCDRW is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set +# CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set -# CONFIG_EXAMPLES_MOUNT 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM is not set # CONFIG_EXAMPLES_NXTEXT is not set # CONFIG_EXAMPLES_OSTEST is not set -# CONFIG_EXAMPLES_PASHELLO is not set +# CONFIG_EXAMPLES_PCA9635 is not set # CONFIG_EXAMPLES_PIPE is not set # CONFIG_EXAMPLES_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 +# 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 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_UDP is not set -# CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_SYSTEM_USBMSC is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER 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_MICROPYTHON is not set # CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # # 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 -# CONFIG_NETDB_DNSCLIENT is not set # CONFIG_NETUTILS_SMTP is not set -# CONFIG_NETUTILS_TELNETD is not set -# CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_NETLIB is not set -# CONFIG_NETUTILS_WEBCLIENT is not set # -# FreeModBus +# NSH Library # -# CONFIG_MODBUS is not set +CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # -# NSH Library +# Command Line Configuration # -CONFIG_NSH_LIBRARY=y CONFIG_NSH_READLINE=y # CONFIG_NSH_CLE is not set +CONFIG_NSH_LINELEN=80 +CONFIG_NSH_DISABLE_SEMICOLON=y +CONFIG_NSH_MAXARGUMENTS=6 +# CONFIG_NSH_ARGCAT is not set +CONFIG_NSH_NESTDEPTH=3 +# CONFIG_NSH_DISABLEBG is not set # # Disable Individual commands # +CONFIG_NSH_DISABLE_ADDROUTE=y +CONFIG_NSH_DISABLE_BASENAME=y # CONFIG_NSH_DISABLE_CAT is not set CONFIG_NSH_DISABLE_CD=y CONFIG_NSH_DISABLE_CP=y +CONFIG_NSH_DISABLE_CMP=y +CONFIG_NSH_DISABLE_DATE=y CONFIG_NSH_DISABLE_DD=y +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 @@ -535,20 +753,20 @@ CONFIG_NSH_DISABLE_GET=y # 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=y -CONFIG_NSH_DISABLE_MKFATFS=y # CONFIG_NSH_DISABLE_MKFIFO is not set CONFIG_NSH_DISABLE_MKRD=y # CONFIG_NSH_DISABLE_MH is not set CONFIG_NSH_DISABLE_MOUNT=y +# CONFIG_NSH_DISABLE_MV is not set # CONFIG_NSH_DISABLE_MW is not set -CONFIG_NSH_DISABLE_NSFMOUNT=y # CONFIG_NSH_DISABLE_PS is not set -CONFIG_NSH_DISABLE_PING=y CONFIG_NSH_DISABLE_PUT=y # CONFIG_NSH_DISABLE_PWD is not set CONFIG_NSH_DISABLE_RM=y @@ -556,71 +774,61 @@ CONFIG_NSH_DISABLE_RMDIR=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=y # CONFIG_NSH_DISABLE_TEST is not set CONFIG_NSH_DISABLE_UMOUNT=y +CONFIG_NSH_DISABLE_UNAME=y # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set CONFIG_NSH_DISABLE_WGET=y # 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=64 -CONFIG_NSH_LINELEN=80 -CONFIG_NSH_NESTDEPTH=3 + +# +# Scripting Support +# CONFIG_NSH_DISABLESCRIPT=y -# CONFIG_NSH_DISABLEBG is not set -CONFIG_NSH_CONSOLE=y # -# USB Trace Support +# 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 # # -# System NSH Add-Ons +# Platform-specific Support # +# CONFIG_PLATFORM_CONFIGDATA is not set # -# Custom Free Memory Command +# System Libraries and NSH Add-Ons # +# CONFIG_SYSTEM_CLE is not set +# CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set - -# -# I2C tool -# - -# -# FLASH Program Installation -# +# CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set # CONFIG_SYSTEM_INSTALL is not set - -# -# readline() -# +# CONFIG_SYSTEM_RAMTEST is not set +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sysinfo -# - -# -# USB Monitor -# +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set +# CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_VI is not set +# CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/nutiny-nuc120/src/nuc_led.c b/configs/nutiny-nuc120/src/nuc_led.c index 87a08c7c8f6269e1433702eb7e8a70227515c5a6..840858eaee38c3207fede24f13c414720b466c47 100644 --- a/configs/nutiny-nuc120/src/nuc_led.c +++ b/configs/nutiny-nuc120/src/nuc_led.c @@ -76,38 +76,14 @@ * 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 -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /* Dump GPIO registers */ -#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_LEDS) +#ifdef CONFIG_DEBUG_LEDS_INFO # define led_dumpgpio(m) nuc_dumpgpio(GPIO_LED, m) #else # define led_dumpgpio(m) #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/olimex-efm32g880f128-stk/nsh/defconfig b/configs/olimex-efm32g880f128-stk/nsh/defconfig index 99b47aac95b4ad0c7b7d16fd826c278cf65bbd89..0949f6717cd95343d87a4bbd8486e3ead27e5de0 100644 --- a/configs/olimex-efm32g880f128-stk/nsh/defconfig +++ b/configs/olimex-efm32g880f128-stk/nsh/defconfig @@ -41,12 +41,15 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y @@ -78,10 +81,12 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set CONFIG_ARCH_CHIP_EFM32=y # 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 @@ -90,27 +95,52 @@ CONFIG_ARCH_CHIP_EFM32=y # 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=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="efm32" +# 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 is not set +# CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set +# CONFIG_ARM_HAVE_MPU_UNIFIED 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_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 @@ -119,6 +149,8 @@ CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y # CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL is not set # CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW is not set # CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE is not set +# CONFIG_ARMV7M_HAVE_STACKCHECK is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set # # EFM32 Configuration Options @@ -127,6 +159,7 @@ CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y CONFIG_ARCH_CHIP_EFM32G880F128=y # CONFIG_ARCH_CHIP_EFM32G890F128 is not set # CONFIG_ARCH_CHIP_EFM32GG332F1024 is not set +# CONFIG_ARCH_CHIP_EFM32GG990F1024 is not set # CONFIG_EFM32_EFM32TG is not set CONFIG_EFM32_EFM32G=y # CONFIG_EFM32_EFM32GG is not set @@ -138,9 +171,17 @@ CONFIG_EFM32_HAVE_USART2=y CONFIG_EFM32_HAVE_UART0=y # CONFIG_EFM32_HAVE_UART1 is not set CONFIG_EFM32_HAVE_LEUART1=y -# CONFIG_EFM32_USART is not set +# CONFIG_EFM32_HAVE_OTGFS is not set +# CONFIG_EFM32_USART_ISUART is not set +# CONFIG_EFM32_USART_ISSPI is not set # CONFIG_EFM32_UART is not set CONFIG_EFM32_LEUART=y +# CONFIG_EFM32_DMA is not set +# CONFIG_EFM32_RMU is not set +# CONFIG_EFM32_FLASHPROG is not set +# CONFIG_EFM32_I2C0 is not set +# CONFIG_EFM32_I2C1 is not set +# CONFIG_EFM32_BITBAND is not set # CONFIG_EFM32_USART0 is not set # CONFIG_EFM32_USART1 is not set # CONFIG_EFM32_USART2 is not set @@ -148,7 +189,12 @@ CONFIG_EFM32_LEUART=y # CONFIG_EFM32_UART1 is not set # CONFIG_EFM32_LEUART0 is not set CONFIG_EFM32_LEUART1=y +# CONFIG_EFM32_TIMER0 is not set +# CONFIG_EFM32_TIMER1 is not set +# CONFIG_EFM32_TIMER2 is not set +# CONFIG_EFM32_TIMER3 is not set CONFIG_EFM32_GPIO_IRQ=y +# CONFIG_EFM32_LECLOCK is not set CONFIG_LEUART1_SERIAL_CONSOLE=y # CONFIG_NO_LEUART_SERIAL_CONSOLE is not set @@ -161,6 +207,7 @@ CONFIG_LEUART1_BAUD=2400 CONFIG_LEUART1_BITS=8 CONFIG_LEUART1_PARITY=0 CONFIG_LEUART1_2STOP=0 +# CONFIG_EFM32_RTC_BURTC is not set # # Architecture Options @@ -173,11 +220,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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=y # CONFIG_ARCH_IRQPRIO is not set CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set @@ -228,11 +278,13 @@ CONFIG_ARCH_BOARD="olimex-efm32g880f128-stk" # 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 @@ -267,6 +319,7 @@ 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 @@ -317,9 +370,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -350,22 +404,42 @@ CONFIG_DEV_NULL=y # 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_TIMER 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -373,6 +447,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -396,29 +472,30 @@ CONFIG_SERIAL=y # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set CONFIG_OTHER_UART_SERIALDRIVER=y - -# -# USART Configuration -# CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y -# CONFIG_UART0_SERIAL_CONSOLE is not set -CONFIG_OTHER_SERIAL_CONSOLE=y -# CONFIG_NO_SERIAL_CONSOLE is not set # 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_OTHER_SERIAL_CONSOLE=y +# CONFIG_NO_SERIAL_CONSOLE 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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -447,11 +524,7 @@ CONFIG_DISABLE_MOUNTPOINT=y CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_RAMMAP is not set # CONFIG_FS_PROCFS is not set - -# -# System Logging -# -# CONFIG_SYSLOG is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -471,6 +544,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -495,6 +572,7 @@ CONFIG_NUNGET_CHARS=2 # 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 @@ -506,13 +584,18 @@ CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 # CONFIG_LIBC_STRERROR is not set # CONFIG_LIBC_PERROR_STDOUT is not set CONFIG_ARCH_LOWPUTC=y +# 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_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -527,14 +610,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -542,11 +624,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -554,75 +636,77 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 # 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 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_UDP 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_WEBSERVER 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_MICROPYTHON is not set # CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # # 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 # CONFIG_NETUTILS_SMTP is not set -# CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_NETLIB is not set -# CONFIG_NETUTILS_WEBCLIENT is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -640,13 +724,16 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -655,8 +742,10 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -664,6 +753,7 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -673,8 +763,10 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -701,6 +793,8 @@ CONFIG_NSH_FILEIOSIZE=256 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 @@ -714,113 +808,20 @@ CONFIG_NSH_CONSOLE=y # # System Libraries and NSH Add-Ons # - -# -# Custom Free Memory Command -# -# CONFIG_SYSTEM_FREE is not set - -# -# EMACS-like Command Line Editor -# CONFIG_SYSTEM_CLE=y CONFIG_SYSTEM_CLE_DEBUGLEVEL=0 - -# -# FLASH Program Installation -# -# CONFIG_SYSTEM_INSTALL is not set - -# -# FLASH Erase-all Command -# - -# -# Intel HEX to binary conversion -# +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set - -# -# I2C tool -# - -# -# INI File Parser -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# NxPlayer media player library / command Line -# -# CONFIG_SYSTEM_NXPLAYER is not set - -# -# RAM test -# +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set - -# -# readline() -# +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y - -# -# P-Code Support -# - -# -# PHY Tool -# - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sudoku -# +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set - -# -# Sysinfo -# - -# -# VI Work-Alike Editor -# +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set - -# -# Stack Monitor -# - -# -# USB CDC/ACM Device Commands -# - -# -# USB Composite Device Commands -# - -# -# USB Mass Storage Device Commands -# - -# -# USB Monitor -# - -# -# Zmodem Commands -# # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimex-lpc-h3131/nsh/defconfig b/configs/olimex-lpc-h3131/nsh/defconfig index f3463176647605dd732a4c06a69288fdaa86998d..fa56b2ff44df8475fd6234ed63c47977b13fc63e 100644 --- a/configs/olimex-lpc-h3131/nsh/defconfig +++ b/configs/olimex-lpc-h3131/nsh/defconfig @@ -41,14 +41,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -79,10 +81,12 @@ 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 # 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 @@ -91,10 +95,15 @@ CONFIG_ARCH_CHIP_LPC31XX=y # 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=y # CONFIG_ARCH_ARM920T is not set @@ -104,10 +113,21 @@ CONFIG_ARCH_ARM926EJS=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="arm" CONFIG_ARCH_CHIP="lpc31xx" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y CONFIG_ARCH_LOWVECTORS=y CONFIG_ARCH_ROMPGTABLE=y @@ -170,11 +190,14 @@ CONFIG_ARCH_HAVE_EXTSRAM1=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 is not set 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_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set @@ -231,6 +254,7 @@ 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 @@ -270,6 +294,7 @@ 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 @@ -320,9 +345,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -353,6 +379,7 @@ CONFIG_DEV_NULL=y # 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 @@ -370,8 +397,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -381,6 +423,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set CONFIG_UART_SERIALDRIVER=y # CONFIG_UART0_SERIALDRIVER is not set @@ -404,14 +448,11 @@ CONFIG_UART_SERIALDRIVER=y # 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 is not set CONFIG_UART_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -428,19 +469,23 @@ CONFIG_UART_PARITY=0 CONFIG_UART_2STOP=0 # CONFIG_UART_IFLOWCONTROL is not set # CONFIG_UART_OFLOWCONTROL is not set +# CONFIG_UART_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -474,17 +519,15 @@ 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 is not set +# CONFIG_FS_TMPFS is not set # CONFIG_FS_SMARTFS is not set # CONFIG_FS_PROCFS is not set - -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -505,6 +548,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -550,10 +597,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -568,26 +620,26 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -595,19 +647,19 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD 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 @@ -615,15 +667,26 @@ CONFIG_EXAMPLES_NSH=y # 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_THTTPD 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_WEBSERVER 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 @@ -636,32 +699,28 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_PPPD is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -680,6 +739,7 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -688,6 +748,7 @@ 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 @@ -696,8 +757,10 @@ CONFIG_NSH_DISABLE_DATE=y # 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 @@ -716,8 +779,10 @@ CONFIG_NSH_DISABLE_DATE=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 # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set @@ -744,6 +809,8 @@ CONFIG_NSH_FILEIOSIZE=512 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 @@ -757,16 +824,19 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y -# CONFIG_SYSTEM_POWEROFF is not set +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimex-lpc-h3131/src/lpc31_leds.c b/configs/olimex-lpc-h3131/src/lpc31_leds.c index 7c484df2bef42c470fac48196ad3f6e992472194..0603ba51b449c7a0006f7befbc14d01b159b8dc1 100644 --- a/configs/olimex-lpc-h3131/src/lpc31_leds.c +++ b/configs/olimex-lpc-h3131/src/lpc31_leds.c @@ -53,30 +53,6 @@ #include "lpc_h3131.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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/olimex-lpc-h3131/src/lpc31_mmcsd.c b/configs/olimex-lpc-h3131/src/lpc31_mmcsd.c index 9b974f083fba6a2272a46c9811d96ba8d4cb5af4..e5ccb3691acf14f9471f36e9b63f0550df6d7d8f 100644 --- a/configs/olimex-lpc-h3131/src/lpc31_mmcsd.c +++ b/configs/olimex-lpc-h3131/src/lpc31_mmcsd.c @@ -76,25 +76,25 @@ int lpc31_mmcsd_initialize(int slot, int minor) /* First, get an instance of the SDIO interface */ - fvdbg("Initializing SDIO slot %d\n", slot); + finfo("Initializing SDIO slot %d\n", slot); sdio = sdio_initialize(slot); if (!sdio) { - fdbg("ERROR: Failed to initialize SDIO slot %d\n", slot); + ferr("ERROR: Failed to initialize SDIO slot %d\n", slot); return -ENODEV; } /* Now bind the SPI interface to the MMC/SD driver */ - fvdbg("Bind SDIO to the MMC/SD driver, minor=%d\n", minor); + finfo("Bind SDIO to the MMC/SD driver, minor=%d\n", minor); ret = mmcsd_slotinitialize(minor, sdio); if (ret != OK) { - fdbg("ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); + ferr("ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); return ret; } - fvdbg("Successfully bound SDIO to the MMC/SD driver\n"); + finfo("Successfully bound SDIO to the MMC/SD driver\n"); /* Then let's guess and say that there is a card in the slot. I need to check to * see if the LPC-H3131 board supports a GPIO to detect if there is a card in diff --git a/configs/olimex-lpc-h3131/src/lpc31_spi.c b/configs/olimex-lpc-h3131/src/lpc31_spi.c index 91145242edd855c34d6880eb798588391bfc52f8..c9e9c6eec5272cf9f8848fb2a7e2b376e4b0ffac 100644 --- a/configs/olimex-lpc-h3131/src/lpc31_spi.c +++ b/configs/olimex-lpc-h3131/src/lpc31_spi.c @@ -55,32 +55,6 @@ #if 0 /* At present, LPC-H3131 specific logic is hard-coded in the file lpc31_spi.c * in arch/arm/src/lpc31xx */ -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -127,7 +101,7 @@ void weak_function lpc31_spidev_intialize(void) void lpc31_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #warning "Missing logic" } diff --git a/configs/olimex-lpc-h3131/src/lpc31_usbhost.c b/configs/olimex-lpc-h3131/src/lpc31_usbhost.c index f333af6049f2d27a668a2b16c51d78d54878440b..a52f94d458231471d8d4ae986dfea1ae628393d1 100644 --- a/configs/olimex-lpc-h3131/src/lpc31_usbhost.c +++ b/configs/olimex-lpc-h3131/src/lpc31_usbhost.c @@ -104,7 +104,7 @@ static int ehci_waiter(int argc, char *argv[]) { FAR struct usbhost_hubport_s *hport; - uvdbg("ehci_waiter: Running\n"); + uinfo("ehci_waiter: Running\n"); for (;;) { /* Wait for the device to change state */ @@ -195,7 +195,7 @@ int lpc31_usbhost_initialize(void) ret = usbhost_msc_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the mass storage class: %d\n", ret); + uerr("ERROR: Failed to register the mass storage class: %d\n", ret); } #endif @@ -205,7 +205,7 @@ int lpc31_usbhost_initialize(void) ret = usbhost_cdcacm_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the CDC/ACM serial class\n"); + uerr("ERROR: Failed to register the CDC/ACM serial class\n"); } #endif @@ -215,7 +215,7 @@ int lpc31_usbhost_initialize(void) ret = usbhost_kbdinit(); if (ret != OK) { - udbg("ERROR: Failed to register the KBD class\n"); + uerr("ERROR: Failed to register the KBD class\n"); } #endif @@ -224,7 +224,7 @@ int lpc31_usbhost_initialize(void) g_ehciconn = lpc31_ehci_initialize(0); if (!g_ehciconn) { - udbg("ERROR: lpc31_ehci_initialize failed\n"); + uerr("ERROR: lpc31_ehci_initialize failed\n"); return -ENODEV; } @@ -234,7 +234,7 @@ int lpc31_usbhost_initialize(void) (main_t)ehci_waiter, (FAR char * const *)NULL); if (pid < 0) { - udbg("ERROR: Failed to create ehci_waiter task: %d\n", ret); + uerr("ERROR: Failed to create ehci_waiter task: %d\n", ret); return -ENODEV; } @@ -261,7 +261,7 @@ int lpc31_usbhost_initialize(void) void lpc31_usbhost_vbusdrive(int rhport, bool enable) { - uvdbg("RHPort%d: enable=%d\n", rhport+1, enable); + uinfo("RHPort%d: enable=%d\n", rhport+1, enable); /* The LPC3131 has only a single root hub port */ diff --git a/configs/olimex-lpc1766stk/README.txt b/configs/olimex-lpc1766stk/README.txt index f4a3155edeb6991dffc3d5e6a583195a77c4129b..9e88edd8771af25287d3f9aa87031752a45dded5 100644 --- a/configs/olimex-lpc1766stk/README.txt +++ b/configs/olimex-lpc1766stk/README.txt @@ -773,9 +773,9 @@ Olimex LPC1766-STK Configuration Options CONFIG_NET_NRXDESC - Configured number of Rx descriptors. Default: 18 CONFIG_NET_WOL - Enable Wake-up on Lan (not fully implemented). CONFIG_NET_REGDEBUG - Enabled low level register debug. Also needs - CONFIG_DEBUG. + CONFIG_DEBUG_FEATURES. CONFIG_NET_DUMPPACKET - Dump all received and transmitted packets. - Also needs CONFIG_DEBUG. + Also needs CONFIG_DEBUG_FEATURES. CONFIG_NET_HASH - Enable receipt of near-perfect match frames. CONFIG_LPC17_MULTICAST - Enable receipt of multicast (and unicast) frames. Automatically set if CONFIG_NET_IGMP is selected. @@ -929,8 +929,8 @@ Configuration Sub-Directories 2. You may also want to define the following in your configuration file. Otherwise, you will have not feedback about what is going on: - CONFIG_DEBUG=y - CONFIG_DEBUG_VERBOSE=y + CONFIG_DEBUG_FEATURES=y + CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FTPC=y hidkbd: diff --git a/configs/olimex-lpc1766stk/ftpc/defconfig b/configs/olimex-lpc1766stk/ftpc/defconfig index 6239b8e2700b08c5cb1ffe761a5ca92e5124e5b6..441fb62dbf0caa4dd6e1d810abe2015631ceca06 100644 --- a/configs/olimex-lpc1766stk/ftpc/defconfig +++ b/configs/olimex-lpc1766stk/ftpc/defconfig @@ -37,14 +37,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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 @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -102,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="lpc17xx" +# 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 # @@ -119,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -223,11 +242,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -290,6 +312,8 @@ CONFIG_NSH_MMCSDSPIPORTNO=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 @@ -329,6 +353,7 @@ 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 @@ -365,6 +390,7 @@ CONFIG_NAME_MAX=32 # 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 @@ -380,9 +406,10 @@ CONFIG_SIG_SIGWORK=17 # CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_HPWORK=y @@ -416,14 +443,20 @@ CONFIG_DEV_NULL=y # 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=y +# CONFIG_SPI_SLAVE is not set # CONFIG_SPI_EXCHANGE is not set # CONFIG_SPI_CMDDATA is not set CONFIG_SPI_CALLBACK=y # CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_HWFEATURES is not set +# CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -437,7 +470,21 @@ CONFIG_SPI_CALLBACK=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -449,6 +496,7 @@ CONFIG_MMCSD_SPICLOCK=20000000 CONFIG_MMCSD_SPIMODE=0 # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set # CONFIG_MTD is not set # CONFIG_EEPROM is not set CONFIG_NETDEVICES=y @@ -456,7 +504,11 @@ CONFIG_NETDEVICES=y # # General Ethernet MAC Driver Options # +# CONFIG_NETDEV_LOOPBACK is not set +# CONFIG_NETDEV_TELNET is not set # CONFIG_NETDEV_MULTINIC is not set +CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y +# CONFIG_NETDEV_LATEINIT is not set # # External Ethernet MAC Device Support @@ -466,6 +518,7 @@ CONFIG_NETDEVICES=y # CONFIG_ENCX24J600 is not set # CONFIG_NET_E1000 is not set # CONFIG_NET_SLIP is not set +# CONFIG_NET_FTMAC100 is not set # CONFIG_NET_VNET is not set # @@ -475,6 +528,7 @@ CONFIG_NETDEVICES=y # CONFIG_ETH0_PHY_NONE is not set # CONFIG_ETH0_PHY_AM79C874 is not set CONFIG_ETH0_PHY_KS8721=y +# CONFIG_ETH0_PHY_KSZ8041 is not set # CONFIG_ETH0_PHY_KSZ8051 is not set # CONFIG_ETH0_PHY_KSZ8061 is not set # CONFIG_ETH0_PHY_KSZ8081 is not set @@ -483,6 +537,7 @@ CONFIG_ETH0_PHY_KS8721=y # CONFIG_ETH0_PHY_LAN8720 is not set # CONFIG_ETH0_PHY_LAN8740 is not set # CONFIG_ETH0_PHY_LAN8740A is not set +# CONFIG_ETH0_PHY_LAN8742A is not set # CONFIG_ETH0_PHY_DM9161 is not set # CONFIG_PIPES is not set # CONFIG_PM is not set @@ -491,6 +546,8 @@ CONFIG_ETH0_PHY_KS8721=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -514,15 +571,12 @@ CONFIG_UART0_SERIALDRIVER=y # 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=y CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -539,19 +593,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -575,6 +633,7 @@ CONFIG_NET_GUARDSIZE=2 # # CONFIG_NET_MULTILINK is not set CONFIG_NET_ETHERNET=y +# CONFIG_NET_LOOPBACK is not set # CONFIG_NET_TUN is not set # @@ -665,6 +724,7 @@ CONFIG_IOB_NCHAINS=8 # Routing Table Configuration # # CONFIG_NET_ROUTE is not set +CONFIG_NET_HOSTNAME="" # # Crypto API @@ -691,19 +751,17 @@ 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_NFS 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 - -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -723,6 +781,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -768,10 +830,24 @@ 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 +CONFIG_NETDB_DNSCLIENT_ENTRIES=4 +CONFIG_NETDB_DNSCLIENT_NAMESIZE=32 +CONFIG_NETDB_DNSCLIENT_LIFESEC=3600 +CONFIG_NETDB_DNSCLIENT_MAXRESPONSE=96 +# CONFIG_NETDB_RESOLVCONF is not set +# CONFIG_NETDB_DNSSERVER_NOADDR is not set +CONFIG_NETDB_DNSSERVER_IPv4=y +CONFIG_NETDB_DNSSERVER_IPv4ADDR=0x0a000001 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -790,23 +866,28 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # 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 # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -815,39 +896,51 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD 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_SMART_TEST 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set -# CONFIG_EXAMPLES_DISCOVER is not set -# CONFIG_EXAMPLES_WEBSERVER is not set +# CONFIG_EXAMPLES_UDPBLASTER is not set # CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_XMLRPC 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 # @@ -859,47 +952,42 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # +# CONFIG_NETUTILS_CHAT is not set # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set CONFIG_NETUTILS_FTPC=y # CONFIG_NETUTILS_FTPD is not set # CONFIG_NETUTILS_JSON is not set -CONFIG_LIBC_NETDB=y -CONFIG_NETDB_DNSCLIENT=y -CONFIG_NETDB_DNSCLIENT_ENTRIES=4 -CONFIG_NETDB_DNSCLIENT_MAXRESPONSE=96 +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set # CONFIG_NETUTILS_TFTPC is not set # CONFIG_NETUTILS_THTTPD is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -919,6 +1007,8 @@ CONFIG_NSH_BUILTIN_APPS=y # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_ARP 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 @@ -927,6 +1017,7 @@ 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 @@ -935,8 +1026,10 @@ CONFIG_NSH_DISABLE_GET=y # 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 @@ -947,6 +1040,7 @@ CONFIG_NSH_DISABLE_GET=y # CONFIG_NSH_DISABLE_MOUNT is not set # CONFIG_NSH_DISABLE_MV is not set # CONFIG_NSH_DISABLE_MW is not set +# CONFIG_NSH_DISABLE_NSLOOKUP is not set # CONFIG_NSH_DISABLE_PS is not set # CONFIG_NSH_DISABLE_PING is not set CONFIG_NSH_DISABLE_PUT=y @@ -956,8 +1050,10 @@ CONFIG_NSH_DISABLE_PUT=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 # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set CONFIG_NSH_DISABLE_WGET=y @@ -988,6 +1084,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1005,6 +1102,8 @@ CONFIG_NSH_NOMAC=y CONFIG_NSH_SWMAC=y CONFIG_NSH_MACADDR=0x00e0deadbeef CONFIG_NSH_MAX_ROUNDTRIP=20 +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # # NxWidgets/NxWM @@ -1018,16 +1117,20 @@ CONFIG_NSH_MAX_ROUNDTRIP=20 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y -# CONFIG_SYSTEM_POWEROFF is not set +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimex-lpc1766stk/hidkbd/defconfig b/configs/olimex-lpc1766stk/hidkbd/defconfig index 995016cfd6e55c760e35dacb844439c46f89db8d..5d8034a214ba09513ad80a042425089cc5d3983c 100644 --- a/configs/olimex-lpc1766stk/hidkbd/defconfig +++ b/configs/olimex-lpc1766stk/hidkbd/defconfig @@ -41,14 +41,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -79,10 +81,12 @@ 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 # CONFIG_ARCH_CHIP_TIVA is not set +# CONFIG_ARCH_CHIP_LPC11XX is not set CONFIG_ARCH_CHIP_LPC17XX=y # CONFIG_ARCH_CHIP_LPC214X is not set # CONFIG_ARCH_CHIP_LPC2378 is not set @@ -91,10 +95,15 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -104,14 +113,25 @@ CONFIG_ARCH_CORTEXM3=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="lpc17xx" +# 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 # @@ -121,6 +141,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -132,6 +153,7 @@ CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y # CONFIG_ARMV7M_HAVE_STACKCHECK is not set # CONFIG_ARMV7M_ITMSYSLOG is not set # CONFIG_GPIO_IRQ is not set +# CONFIG_SERIAL_TERMIOS is not set # # LPC17xx Configuration Options @@ -215,6 +237,7 @@ CONFIG_USBHOST_NTDS=3 CONFIG_USBHOST_TDBUFFERS=3 CONFIG_USBHOST_TDBUFSIZE=128 CONFIG_USBHOST_IOBUFSIZE=512 +CONFIG_LPC17_USBHOST_NPREALLOC=4 CONFIG_USBHOST_BULK_DISABLE=y # CONFIG_USBHOST_INT_DISABLE is not set CONFIG_USBHOST_ISOC_DISABLE=y @@ -230,11 +253,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -293,6 +319,8 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # # Board-Specific Options # +CONFIG_LPC1766STK_USBHOST_STACKSIZE=1024 +CONFIG_LPC1766STK_USBHOST_PRIO=100 # CONFIG_LIB_BOARDCTL is not set # @@ -328,6 +356,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="hidkbd_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 @@ -364,6 +393,7 @@ CONFIG_NAME_MAX=32 # 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 @@ -379,9 +409,10 @@ CONFIG_SIG_SIGWORK=17 # CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_HPWORK=y @@ -415,6 +446,7 @@ CONFIG_DEV_NULL=y # 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 @@ -438,9 +470,24 @@ CONFIG_INPUT=y # CONFIG_INPUT_ADS7843E is not set # CONFIG_INPUT_MXT is not set # CONFIG_INPUT_STMPE811 is not set +# CONFIG_BUTTONS is not set # CONFIG_DJOYSTICK is not set # CONFIG_AJOYSTICK is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -449,6 +496,7 @@ CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_HAVECARDDETECT is not set # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set # CONFIG_MTD is not set # CONFIG_EEPROM is not set # CONFIG_PIPES is not set @@ -458,6 +506,8 @@ CONFIG_MMCSD_NSLOTS=1 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -481,17 +531,13 @@ CONFIG_UART0_SERIALDRIVER=y # 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=y -# CONFIG_SERIAL_TERMIOS is not set CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set # CONFIG_NO_SERIAL_CONSOLE is not set @@ -507,6 +553,7 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_DMA is not set # CONFIG_USBDEV is not set CONFIG_USBHOST=y CONFIG_USBHOST_NPREALLOC=0 @@ -528,15 +575,18 @@ CONFIG_HIDKBD_ENCODED=y # CONFIG_USBHOST_TRACE is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -568,14 +618,10 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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_PROCFS is not set - -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -595,6 +641,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -638,10 +688,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set CONFIG_LIB_KBDCODEC=y # CONFIG_LIB_SLCDCODEC is not set @@ -656,14 +710,13 @@ CONFIG_LIB_KBDCODEC=y # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -671,15 +724,15 @@ CONFIG_LIB_KBDCODEC=y # 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=y CONFIG_EXAMPLES_HIDKBD_DEFPRIO=50 CONFIG_EXAMPLES_HIDKBD_STACKSIZE=1024 CONFIG_EXAMPLES_HIDKBD_DEVNAME="/dev/kbda" CONFIG_EXAMPLES_HIDKBD_ENCODED=y -# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -687,19 +740,19 @@ CONFIG_EXAMPLES_HIDKBD_ENCODED=y # CONFIG_EXAMPLES_NSH is not set # 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD 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 @@ -707,15 +760,24 @@ CONFIG_EXAMPLES_HIDKBD_ENCODED=y # 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_THTTPD 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -727,27 +789,23 @@ CONFIG_EXAMPLES_HIDKBD_ENCODED=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_PPPD is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library @@ -766,15 +824,16 @@ CONFIG_EXAMPLES_HIDKBD_ENCODED=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_POWEROFF is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimex-lpc1766stk/hidmouse/defconfig b/configs/olimex-lpc1766stk/hidmouse/defconfig index 152d049b7d088a55461a66375e3e485e5df2da62..1f504dd9d885cdc915db556bc06daeb21ca4aee0 100644 --- a/configs/olimex-lpc1766stk/hidmouse/defconfig +++ b/configs/olimex-lpc1766stk/hidmouse/defconfig @@ -41,14 +41,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -79,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 @@ -97,7 +100,9 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -108,14 +113,25 @@ CONFIG_ARCH_CORTEXM3=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="lpc17xx" +# 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 # @@ -125,6 +141,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -210,7 +227,6 @@ CONFIG_LPC17_UART0=y # # Serial driver options # -# CONFIG_LPC17_MULTICAST is not set # # USB host driver options @@ -237,6 +253,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set CONFIG_ARCH_HAVE_MPU=y @@ -384,6 +401,7 @@ CONFIG_NAME_MAX=32 # 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 @@ -399,9 +417,10 @@ CONFIG_SIG_SIGWORK=17 # CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_HPWORK=y @@ -463,8 +482,23 @@ CONFIG_MOUSE=y # CONFIG_BUTTONS is not set # CONFIG_DJOYSTICK is not set # CONFIG_AJOYSTICK is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -477,6 +511,8 @@ CONFIG_NETDEV_TELNET=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -500,10 +536,6 @@ CONFIG_UART0_SERIALDRIVER=y # 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 @@ -551,15 +583,18 @@ CONFIG_HIDMOUSE_THRESHY=12 # CONFIG_USBHOST_TRACE is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -702,7 +737,9 @@ 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_NFS is not set # CONFIG_FS_NXFFS is not set # CONFIG_FS_ROMFS is not set @@ -712,12 +749,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -736,6 +767,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -781,6 +816,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 @@ -788,12 +825,14 @@ CONFIG_NETDB_DNSCLIENT_ENTRIES=8 CONFIG_NETDB_DNSCLIENT_NAMESIZE=32 CONFIG_NETDB_DNSCLIENT_LIFESEC=3600 CONFIG_NETDB_DNSCLIENT_MAXRESPONSE=96 +# CONFIG_NETDB_RESOLVCONF is not set CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_NETDB_DNSSERVER_IPv4 is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -819,18 +858,20 @@ 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 +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -840,26 +881,28 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD 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_SMART_TEST 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 @@ -870,15 +913,21 @@ CONFIG_EXAMPLES_TOUCHSCREEN_MOUSE=y CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y # CONFIG_EXAMPLES_UDP is not set # 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_WEBSERVER 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 @@ -891,8 +940,8 @@ CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -905,25 +954,27 @@ CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y # CONFIG_NETUTILS_CODECS is not set CONFIG_NETUTILS_DHCPC=y # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -943,6 +994,7 @@ CONFIG_NSH_BUILTIN_APPS=y # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_ARP is not set # CONFIG_NSH_DISABLE_BASENAME is not set # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set @@ -985,6 +1037,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 @@ -1017,6 +1070,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1046,6 +1100,8 @@ CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048 CONFIG_NSH_TELNETD_CLIENTPRIO=100 CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048 CONFIG_NSH_IOBUFFER_SIZE=512 +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # CONFIG_NSH_TELNET_LOGIN is not set # @@ -1060,13 +1116,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1075,5 +1130,6 @@ 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimex-lpc1766stk/nettest/defconfig b/configs/olimex-lpc1766stk/nettest/defconfig index d9b5662152346ca3d379511bbb1d8160ae7f1928..90de87d3f043293f15d9be84494a1ac9bd48c26e 100644 --- a/configs/olimex-lpc1766stk/nettest/defconfig +++ b/configs/olimex-lpc1766stk/nettest/defconfig @@ -37,14 +37,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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 @@ -93,7 +96,9 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -104,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="lpc17xx" +# 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 # @@ -121,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -226,6 +243,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set CONFIG_ARCH_HAVE_MPU=y @@ -357,6 +375,7 @@ CONFIG_NAME_MAX=32 # 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 @@ -365,9 +384,10 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGWORK=17 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_HPWORK=y @@ -401,6 +421,7 @@ CONFIG_DEV_NULL=y # 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 @@ -419,8 +440,22 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y @@ -429,7 +464,9 @@ CONFIG_NETDEVICES=y # General Ethernet MAC Driver Options # # CONFIG_NETDEV_LOOPBACK is not set +# CONFIG_NETDEV_TELNET is not set # CONFIG_NETDEV_MULTINIC is not set +CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y # CONFIG_NETDEV_LATEINIT is not set # @@ -468,6 +505,8 @@ CONFIG_ETH0_PHY_KS8721=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -491,13 +530,10 @@ CONFIG_UART0_SERIALDRIVER=y # 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_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_SERIAL_DMA is not set CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -514,19 +550,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -659,12 +699,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # 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 # @@ -683,6 +717,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -723,11 +761,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -741,10 +782,14 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # Application Configuration # +# +# 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_DHCPD is not set @@ -752,11 +797,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -778,18 +823,19 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD 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 @@ -797,16 +843,26 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # 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_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + # # Graphics Support # @@ -817,8 +873,8 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -829,11 +885,12 @@ 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_NETLIB=y # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set # CONFIG_NETUTILS_XMLRPC is not set @@ -855,15 +912,16 @@ CONFIG_NETUTILS_NETLIB=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimex-lpc1766stk/nsh/defconfig b/configs/olimex-lpc1766stk/nsh/defconfig index 5f83abd29a1b470526d958d09f0ecf9e8014db43..0a6e134afc6c18fae06697aeb5645e87215df375 100644 --- a/configs/olimex-lpc1766stk/nsh/defconfig +++ b/configs/olimex-lpc1766stk/nsh/defconfig @@ -42,10 +42,11 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -76,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 @@ -94,6 +96,7 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -106,6 +109,7 @@ CONFIG_ARCH_CORTEXM3=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 @@ -114,12 +118,15 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="lpc17xx" +# 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 @@ -130,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 @@ -448,6 +456,8 @@ CONFIG_SPI=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -462,7 +472,12 @@ CONFIG_SPI=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -470,6 +485,7 @@ CONFIG_SPI=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -533,6 +549,8 @@ CONFIG_ETH0_PHY_KS8721=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -556,10 +574,6 @@ CONFIG_UART0_SERIALDRIVER=y # 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 @@ -586,15 +600,18 @@ CONFIG_UART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -749,12 +766,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -773,6 +784,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -818,6 +833,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 @@ -832,6 +849,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -861,15 +879,16 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_CONFIGDATA is not set # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -879,18 +898,18 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -898,8 +917,8 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -907,11 +926,10 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # 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_WEBSERVER is not set # # File System Utilities @@ -935,8 +953,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -949,20 +967,21 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CODECS is not set CONFIG_NETUTILS_DHCPC=y # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1064,6 +1083,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1109,12 +1129,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1123,6 +1143,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimex-lpc1766stk/nx/defconfig b/configs/olimex-lpc1766stk/nx/defconfig index 34b2d4c3f07e9422bd0f0f2afd4e03408cb03adc..ccad8743ea028b37b38f05ba635798407f6a9c86 100644 --- a/configs/olimex-lpc1766stk/nx/defconfig +++ b/configs/olimex-lpc1766stk/nx/defconfig @@ -41,14 +41,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -79,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 @@ -96,7 +99,11 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -106,14 +113,25 @@ CONFIG_ARCH_CORTEXM3=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="lpc17xx" +# 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 # @@ -123,6 +141,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -221,11 +240,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -285,6 +307,8 @@ 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_TSCTEST is not set # CONFIG_BOARDCTL_ADCTEST is not set # CONFIG_BOARDCTL_PWMTEST is not set @@ -324,6 +348,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="nx_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 @@ -374,9 +399,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -407,6 +433,7 @@ CONFIG_DEV_NULL=y # 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 @@ -424,10 +451,15 @@ 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 + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set # CONFIG_LCD_NOGETRUN is not set @@ -454,6 +486,9 @@ CONFIG_NOKIA6100_ML=0 CONFIG_NOKIA6100_RGBORD=0 # CONFIG_LCD_MIO283QT2 is not set # CONFIG_LCD_MIO283QT9A is not set +# CONFIG_LCD_UG2864HSWEG01 is not set +# CONFIG_LCD_UG2832HSWEG04 is not set +# CONFIG_LCD_SSD1351 is not set # CONFIG_LCD_ST7565 is not set # CONFIG_LCD_ST7567 is not set # CONFIG_LCD_UG2864AMBAG01 is not set @@ -465,12 +500,17 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set +# CONFIG_SLCD is not set # -# Alphanumeric/Segment LCD Devices +# LED Support # -# CONFIG_LCD_LCD1602 is not set +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -480,6 +520,8 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -503,14 +545,11 @@ CONFIG_UART0_SERIALDRIVER=y # 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_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -527,19 +566,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -570,12 +613,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -584,6 +621,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 @@ -682,6 +720,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -722,10 +764,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -740,14 +786,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -755,12 +800,12 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW 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 @@ -781,18 +826,19 @@ CONFIG_EXAMPLES_NX_BPP=8 # CONFIG_EXAMPLES_NX_RAWWINDOWS is not set CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 CONFIG_EXAMPLES_NX_EXTERNINIT=y -# 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_NXTERM 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_PPPD 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 @@ -800,14 +846,25 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=y # 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -819,26 +876,23 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # @@ -856,15 +910,16 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_POWEROFF is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimex-lpc1766stk/slip-httpd/defconfig b/configs/olimex-lpc1766stk/slip-httpd/defconfig index bf9a212683fa661182ebeea1f7cf9569bbda18d7..a19664a5ed180f9c24d4842632edd78643bb26a4 100644 --- a/configs/olimex-lpc1766stk/slip-httpd/defconfig +++ b/configs/olimex-lpc1766stk/slip-httpd/defconfig @@ -37,14 +37,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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 @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -102,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="lpc17xx" +# 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 # @@ -119,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -202,7 +221,6 @@ CONFIG_LPC17_UART1=y # Serial driver options # # CONFIG_UART1_RINGINDICATOR is not set -# CONFIG_LPC17_MULTICAST is not set # # Architecture Options @@ -215,11 +233,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -313,6 +334,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="thttp_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 @@ -350,9 +372,10 @@ CONFIG_NAME_MAX=32 CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # CONFIG_SCHED_WORKQUEUE is not set # CONFIG_SCHED_HPWORK is not set @@ -383,6 +406,7 @@ CONFIG_DEV_NULL=y # 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 @@ -400,8 +424,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -413,6 +452,8 @@ CONFIG_NET_SLIP=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -436,15 +477,12 @@ CONFIG_UART1_SERIALDRIVER=y # 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=y CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_UART1_SERIAL_CONSOLE is not set @@ -462,6 +500,7 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_DMA is not set # # UART1 Configuration @@ -474,19 +513,23 @@ 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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -510,9 +553,10 @@ CONFIG_NET_GUARDSIZE=2 # # CONFIG_NET_MULTILINK is not set # CONFIG_NET_ETHERNET is not set -CONFIG_NET_SLIPNINTERFACES=1 -CONFIG_NET_SLIPSTACKSIZE=2048 -CONFIG_NET_SLIPDEFPRIO=128 +# CONFIG_NET_LOOPBACK is not set +CONFIG_SLIP_NINTERFACES=1 +CONFIG_SLIP_STACKSIZE=2048 +CONFIG_SLIP_DEFPRIO=128 # CONFIG_NET_TUN is not set # @@ -593,6 +637,7 @@ CONFIG_IOB_NCHAINS=8 # Routing Table Configuration # # CONFIG_NET_ROUTE is not set +CONFIG_NET_HOSTNAME="" # # Crypto API @@ -616,14 +661,10 @@ CONFIG_FS_READABLE=y # CONFIG_FS_FAT 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_PROCFS is not set - -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -643,6 +684,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -686,10 +731,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -704,14 +754,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -719,11 +768,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -732,19 +781,20 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_NSH is not set # 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD 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 @@ -753,6 +803,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_THTTPD=y @@ -761,13 +812,24 @@ CONFIG_EXAMPLES_THTTPD_DRIPADDR=0x0a000001 CONFIG_EXAMPLES_THTTPD_NETMASK=0xffffff00 # 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_UNIONFS is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # CONFIG_EXAMPLES_XMLRPC 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 # @@ -779,20 +841,24 @@ CONFIG_EXAMPLES_THTTPD_NETMASK=0xffffff00 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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_FTPD is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set CONFIG_NETUTILS_THTTPD=y @@ -827,16 +893,10 @@ CONFIG_THTTPD_IDLE_SEND_LIMIT_SEC=300 CONFIG_THTTPD_TILDE_MAP_NONE=y # CONFIG_THTTPD_GENERATE_INDICES is not set # CONFIG_THTTPD_USE_URLPATTERN is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # @@ -854,15 +914,16 @@ CONFIG_NETUTILS_NETLIB=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_POWEROFF is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimex-lpc1766stk/src/lpc17_can.c b/configs/olimex-lpc1766stk/src/lpc17_can.c index ca0f8b05f1ee0e4ef434a9d7e6e8df62017e682e..3282587dd4270d86efc4a6faefdcd5a26e18ef33 100644 --- a/configs/olimex-lpc1766stk/src/lpc17_can.c +++ b/configs/olimex-lpc1766stk/src/lpc17_can.c @@ -73,25 +73,6 @@ # define CAN_PORT 2 #endif -/* 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 - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -120,7 +101,7 @@ int board_can_initialize(void) can = lpc17_caninitialize(CAN_PORT); if (can == NULL) { - candbg("ERROR: Failed to get CAN interface\n"); + canerr("ERROR: Failed to get CAN interface\n"); return -ENODEV; } @@ -129,7 +110,7 @@ int board_can_initialize(void) ret = can_register("/dev/can0", can); if (ret < 0) { - candbg("ERROR: can_register failed: %d\n", ret); + canerr("ERROR: can_register failed: %d\n", ret); return ret; } diff --git a/configs/olimex-lpc1766stk/src/lpc17_hidkbd.c b/configs/olimex-lpc1766stk/src/lpc17_hidkbd.c index 7c0d304fd11505366587a618a5e32e4610788ea1..a92e00774e6a5e149085f53f132aa61fe144aa17 100644 --- a/configs/olimex-lpc1766stk/src/lpc17_hidkbd.c +++ b/configs/olimex-lpc1766stk/src/lpc17_hidkbd.c @@ -76,7 +76,7 @@ struct usbhost_connection_s *arch_usbhost_initialize(void) ret = usbhost_hub_initialize(); if (ret < 0) { - udbg("ERROR: usbhost_hub_initialize failed: %d\n", ret); + uerr("ERROR: usbhost_hub_initialize failed: %d\n", ret); } #endif diff --git a/configs/olimex-lpc1766stk/src/lpc17_hidmouse.c b/configs/olimex-lpc1766stk/src/lpc17_hidmouse.c index 8c8f6f38add793fa0a5eee833f15e5a5c5f72e1d..f583d52679213d618ac69e0ae3a99e4a19dd06cf 100644 --- a/configs/olimex-lpc1766stk/src/lpc17_hidmouse.c +++ b/configs/olimex-lpc1766stk/src/lpc17_hidmouse.c @@ -60,32 +60,12 @@ */ #ifndef CONFIG_DEBUG_INPUT -# undef idbg -# define idbg udbg -# undef illdbg -# define illdbg ulldbg -# undef ivdbg -# define ivdbg uvdbg -# undef illvdbg -# define illvdbg ullvdbg +# undef ierr +# define ierr uerr +# undef iinfo +# define iinfo uinfo #endif -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -114,7 +94,7 @@ int board_tsc_setup(int minor) static bool initialized = false; int ret; - idbg("minor %d\n", minor); + iinfo("minor %d\n", minor); DEBUGASSERT(minor == 0); /* Have we already initialized? Since we never uninitialize we must prevent @@ -131,7 +111,7 @@ int board_tsc_setup(int minor) ret = usbhost_hub_initialize(); if (ret < 0) { - idbg("ERROR: usbhost_hub_initialize failed: %d\n", ret); + ierr("ERROR: usbhost_hub_initialize failed: %d\n", ret); } #endif @@ -140,7 +120,7 @@ int board_tsc_setup(int minor) ret = usbhost_mouse_init(); if (ret < 0) { - idbg("Failed to register USB HID mouse device class\n"); + ierr("ERROR: Failed to register USB HID mouse device class\n"); return -ENODEV; } diff --git a/configs/olimex-lpc1766stk/src/lpc17_lcd.c b/configs/olimex-lpc1766stk/src/lpc17_lcd.c index 26de717fad4f693a18096415621c1b659873e350..2bde4f2ddf612feb9d4b05e5af376ba0c2773f1d 100644 --- a/configs/olimex-lpc1766stk/src/lpc17_lcd.c +++ b/configs/olimex-lpc1766stk/src/lpc17_lcd.c @@ -75,24 +75,15 @@ /* Define the CONFIG_LCD_NOKIADBG to enable detailed debug output (stuff you * would never want to see unless you are debugging this file). - * - * Verbose debug must also be enabled */ -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -#endif - -#ifndef CONFIG_DEBUG_VERBOSE +#ifndef CONFIG_DEBUG_INFO # undef CONFIG_LCD_NOKIADBG #endif #ifdef CONFIG_LCD_NOKIADBG -# define lcddbg(format, ...) vdbg(format, ##__VA_ARGS__) # define lcd_dumpgpio(m) lpc17_dumpgpio(LPC1766STK_LCD_RST, m) #else -# define lcddbg(x...) # define lcd_dumpgpio(m) #endif @@ -214,7 +205,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) spi = lpc17_sspbus_initialize(0); if (!spi) { - glldbg("Failed to initialize SSP port 0\n"); + gerr("ERROR: Failed to initialize SSP port 0\n"); } else { @@ -223,11 +214,11 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) dev = nokia_lcdinitialize(spi, devno); if (!dev) { - glldbg("Failed to bind SSP port 0 to LCD %d: %d\n", devno); + gerr("ERROR: Failed to bind SSP port 0 to LCD %d: %d\n", devno); } else { - gllvdbg("Bound SSP port 0 to LCD %d\n", devno); + ginfo("Bound SSP port 0 to LCD %d\n", devno); /* And turn the LCD on (CONFIG_LCD_MAXPOWER should be 1) */ diff --git a/configs/olimex-lpc1766stk/src/lpc17_leds.c b/configs/olimex-lpc1766stk/src/lpc17_leds.c index 8f83ca967c6f752f351164aec423ced994de6d80..14914c0d941dd4da78b72c75d82c30edfcd223ff 100644 --- a/configs/olimex-lpc1766stk/src/lpc17_leds.c +++ b/configs/olimex-lpc1766stk/src/lpc17_leds.c @@ -58,25 +58,9 @@ * 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 -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /* Dump GPIO registers */ -#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_LEDS) +#ifdef CONFIG_DEBUG_LEDS_INFO # define led_dumpgpio(m) lpc17_dumpgpio(LPC1766STK_LED1, m) #else # define led_dumpgpio(m) diff --git a/configs/olimex-lpc1766stk/src/lpc17_ssp.c b/configs/olimex-lpc1766stk/src/lpc17_ssp.c index 14d426ed375026137a9f39d79550751c7edc4fbe..9bb9b563bb96e5ef30c785890da8f84a391089e8 100644 --- a/configs/olimex-lpc1766stk/src/lpc17_ssp.c +++ b/configs/olimex-lpc1766stk/src/lpc17_ssp.c @@ -74,28 +74,9 @@ #endif /* Debug ********************************************************************/ -/* The following enable debug output from this file (needs CONFIG_DEBUG too). - * - * CONFIG_SSP_DEBUG - Define to enable basic SSP debug - * CONFIG_SSP_VERBOSE - Define to enable verbose SSP debug - */ - -#ifdef CONFIG_SSP_DEBUG -# define sspdbg lldbg -# ifdef CONFIG_SSP_VERBOSE -# define sspvdbg lldbg -# else -# define sspvdbg(x...) -# endif -#else -# undef CONFIG_SSP_VERBOSE -# define sspdbg(x...) -# define sspvdbg(x...) -#endif - /* Dump GPIO registers */ -#ifdef CONFIG_SSP_VERBOSE +#ifdef CONFIG_DEBUG_GPIO_INFO # define ssp_dumpssp0gpio(m) lpc17_dumpgpio(LPC1766STK_LCD_CS, m) # define ssp_dumpssp1gpio(m) lpc17_dumpgpio(LPC1766STK_MMC_CS, m) #else @@ -284,7 +265,7 @@ void weak_function lpc1766stk_sspdev_initialize(void) #ifdef CONFIG_LPC17_SSP0 void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - sspdbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); if (devid == SPIDEV_DISPLAY) { /* Assert/de-assert the CS pin to the card */ @@ -297,7 +278,7 @@ void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - sspdbg("Returning nothing\n"); + spiinfo("Returning nothing\n"); return 0; } #endif @@ -305,7 +286,7 @@ uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_LPC17_SSP1 void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - sspdbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); if (devid == SPIDEV_MMCSD) { /* Assert/de-assert the CS pin to the card */ @@ -318,7 +299,7 @@ void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - sspdbg("Returning SPI_STATUS_PRESENT\n"); + spiinfo("Returning SPI_STATUS_PRESENT\n"); return SPI_STATUS_PRESENT; } #endif diff --git a/configs/olimex-lpc1766stk/thttpd-binfs/defconfig b/configs/olimex-lpc1766stk/thttpd-binfs/defconfig index da3dca2d7e3000e6d4b39aade5beefaddbf6530f..ed2da29d9e2d48453ef40e1cbdb9357f9fa31a22 100644 --- a/configs/olimex-lpc1766stk/thttpd-binfs/defconfig +++ b/configs/olimex-lpc1766stk/thttpd-binfs/defconfig @@ -41,14 +41,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -79,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 @@ -96,7 +99,11 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -106,14 +113,25 @@ CONFIG_ARCH_CORTEXM3=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="lpc17xx" +# 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 # @@ -123,6 +141,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -231,11 +250,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -329,6 +351,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="thttp_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 @@ -359,6 +382,7 @@ CONFIG_NAME_MAX=32 # 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 @@ -367,9 +391,10 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGWORK=17 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_HPWORK=y @@ -403,6 +428,7 @@ CONFIG_DEV_NULL=y # 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 @@ -420,8 +446,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y @@ -429,7 +470,11 @@ CONFIG_NETDEVICES=y # # General Ethernet MAC Driver Options # +# CONFIG_NETDEV_LOOPBACK is not set +# CONFIG_NETDEV_TELNET is not set # CONFIG_NETDEV_MULTINIC is not set +CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y +# CONFIG_NETDEV_LATEINIT is not set # # External Ethernet MAC Device Support @@ -439,6 +484,7 @@ CONFIG_NETDEVICES=y # CONFIG_ENCX24J600 is not set # CONFIG_NET_E1000 is not set # CONFIG_NET_SLIP is not set +# CONFIG_NET_FTMAC100 is not set # CONFIG_NET_VNET is not set # @@ -457,6 +503,7 @@ CONFIG_ETH0_PHY_KS8721=y # CONFIG_ETH0_PHY_LAN8720 is not set # CONFIG_ETH0_PHY_LAN8740 is not set # CONFIG_ETH0_PHY_LAN8740A is not set +# CONFIG_ETH0_PHY_LAN8742A is not set # CONFIG_ETH0_PHY_DM9161 is not set # CONFIG_PIPES is not set # CONFIG_PM is not set @@ -465,6 +512,8 @@ CONFIG_ETH0_PHY_KS8721=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -488,13 +537,10 @@ CONFIG_UART0_SERIALDRIVER=y # 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_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_SERIAL_DMA is not set CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -511,19 +557,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -547,6 +597,7 @@ CONFIG_NET_GUARDSIZE=2 # # CONFIG_NET_MULTILINK is not set CONFIG_NET_ETHERNET=y +# CONFIG_NET_LOOPBACK is not set # CONFIG_NET_TUN is not set # @@ -632,6 +683,7 @@ CONFIG_IOB_NCHAINS=8 # Routing Table Configuration # # CONFIG_NET_ROUTE is not set +CONFIG_NET_HOSTNAME="" # # Crypto API @@ -655,17 +707,12 @@ CONFIG_FS_READABLE=y # CONFIG_FS_FAT 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 is not set CONFIG_FS_UNIONFS=y -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -684,6 +731,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -727,10 +778,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -749,11 +805,14 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -761,11 +820,11 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -774,19 +833,19 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_NSH is not set # 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD 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 @@ -795,6 +854,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_THTTPD=y @@ -803,14 +863,24 @@ CONFIG_EXAMPLES_THTTPD_DRIPADDR=0x0a000001 CONFIG_EXAMPLES_THTTPD_NETMASK=0xffffff00 # CONFIG_EXAMPLES_TIFF is not set # 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # CONFIG_EXAMPLES_XMLRPC 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 # @@ -822,20 +892,24 @@ CONFIG_EXAMPLES_THTTPD_NETMASK=0xffffff00 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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_FTPD is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set CONFIG_NETUTILS_THTTPD=y @@ -870,16 +944,10 @@ CONFIG_THTTPD_IDLE_SEND_LIMIT_SEC=300 CONFIG_THTTPD_TILDE_MAP_NONE=y # CONFIG_THTTPD_GENERATE_INDICES is not set # CONFIG_THTTPD_USE_URLPATTERN is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # @@ -897,15 +965,16 @@ CONFIG_NETUTILS_NETLIB=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_POWEROFF is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimex-lpc1766stk/thttpd-nxflat/defconfig b/configs/olimex-lpc1766stk/thttpd-nxflat/defconfig index ae4b8bfd3e221a7f0c6043a768f7105c96778a4d..2db964db3254abc8664b64c6d0f95cbc08bf05ce 100644 --- a/configs/olimex-lpc1766stk/thttpd-nxflat/defconfig +++ b/configs/olimex-lpc1766stk/thttpd-nxflat/defconfig @@ -37,14 +37,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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 @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -102,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="lpc17xx" +# 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 # @@ -119,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -224,11 +243,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -322,6 +344,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="thttp_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 @@ -352,6 +375,7 @@ CONFIG_NAME_MAX=32 # 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 @@ -360,9 +384,10 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGWORK=17 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_HPWORK=y @@ -396,6 +421,7 @@ CONFIG_DEV_NULL=y # 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 @@ -413,8 +439,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y @@ -422,7 +463,11 @@ CONFIG_NETDEVICES=y # # General Ethernet MAC Driver Options # +# CONFIG_NETDEV_LOOPBACK is not set +# CONFIG_NETDEV_TELNET is not set # CONFIG_NETDEV_MULTINIC is not set +CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y +# CONFIG_NETDEV_LATEINIT is not set # # External Ethernet MAC Device Support @@ -432,6 +477,7 @@ CONFIG_NETDEVICES=y # CONFIG_ENCX24J600 is not set # CONFIG_NET_E1000 is not set # CONFIG_NET_SLIP is not set +# CONFIG_NET_FTMAC100 is not set # CONFIG_NET_VNET is not set # @@ -441,6 +487,7 @@ CONFIG_NETDEVICES=y # CONFIG_ETH0_PHY_NONE is not set # CONFIG_ETH0_PHY_AM79C874 is not set CONFIG_ETH0_PHY_KS8721=y +# CONFIG_ETH0_PHY_KSZ8041 is not set # CONFIG_ETH0_PHY_KSZ8051 is not set # CONFIG_ETH0_PHY_KSZ8061 is not set # CONFIG_ETH0_PHY_KSZ8081 is not set @@ -449,6 +496,7 @@ CONFIG_ETH0_PHY_KS8721=y # CONFIG_ETH0_PHY_LAN8720 is not set # CONFIG_ETH0_PHY_LAN8740 is not set # CONFIG_ETH0_PHY_LAN8740A is not set +# CONFIG_ETH0_PHY_LAN8742A is not set # CONFIG_ETH0_PHY_DM9161 is not set # CONFIG_PIPES is not set # CONFIG_PM is not set @@ -457,6 +505,8 @@ CONFIG_ETH0_PHY_KS8721=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -480,13 +530,10 @@ CONFIG_UART0_SERIALDRIVER=y # 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_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_SERIAL_DMA is not set CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -503,19 +550,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -539,6 +590,7 @@ CONFIG_NET_GUARDSIZE=2 # # CONFIG_NET_MULTILINK is not set CONFIG_NET_ETHERNET=y +# CONFIG_NET_LOOPBACK is not set # CONFIG_NET_TUN is not set # @@ -624,6 +676,7 @@ CONFIG_IOB_NCHAINS=8 # Routing Table Configuration # # CONFIG_NET_ROUTE is not set +CONFIG_NET_HOSTNAME="" # # Crypto API @@ -647,14 +700,10 @@ CONFIG_FS_READABLE=y # CONFIG_FS_FAT 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_PROCFS is not set - -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -674,6 +723,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -717,10 +770,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -735,14 +793,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -750,11 +807,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -763,19 +820,20 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_NSH is not set # 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD 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 @@ -784,6 +842,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_THTTPD=y @@ -792,13 +851,24 @@ CONFIG_EXAMPLES_THTTPD_DRIPADDR=0x0a000001 CONFIG_EXAMPLES_THTTPD_NETMASK=0xffffff00 # 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_UNIONFS is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # CONFIG_EXAMPLES_XMLRPC 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 # @@ -810,20 +880,24 @@ CONFIG_EXAMPLES_THTTPD_NETMASK=0xffffff00 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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_FTPD is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set CONFIG_NETUTILS_THTTPD=y @@ -831,6 +905,7 @@ CONFIG_THTTPD_PORT=80 CONFIG_THTTPD_IPADDR=0x0a000002 CONFIG_THTTPD_SERVER_ADDRESS="http://www.nuttx.org" CONFIG_THTTPD_SERVER_SOFTWARE="thttpd/2.25b 29dec2003-NuttX" +CONFIG_THTTPD_NXFLAT=y CONFIG_THTTPD_PATH="/mnt/www" CONFIG_THTTPD_CGI_PATH="/mnt/www/cgi-bin" CONFIG_THTTPD_CGI_PATTERN="/mnt/www/cgi-bin/*" @@ -857,16 +932,10 @@ CONFIG_THTTPD_IDLE_SEND_LIMIT_SEC=300 CONFIG_THTTPD_TILDE_MAP_NONE=y # CONFIG_THTTPD_GENERATE_INDICES is not set # CONFIG_THTTPD_USE_URLPATTERN is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # @@ -884,15 +953,16 @@ CONFIG_NETUTILS_NETLIB=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_POWEROFF is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimex-lpc1766stk/usbmsc/defconfig b/configs/olimex-lpc1766stk/usbmsc/defconfig index f499036204d37f35d378ce0d0d8bcfac4ed08742..35799df9109728dcb8b8ccb9e721f3f3fd0efd0e 100644 --- a/configs/olimex-lpc1766stk/usbmsc/defconfig +++ b/configs/olimex-lpc1766stk/usbmsc/defconfig @@ -37,14 +37,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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 @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -102,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="lpc17xx" +# 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 # @@ -119,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -224,11 +243,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -288,7 +310,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 @@ -323,6 +352,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="msconn_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 @@ -373,9 +403,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -406,14 +437,20 @@ CONFIG_DEV_NULL=y # 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=y +# CONFIG_SPI_SLAVE is not set # CONFIG_SPI_EXCHANGE is not set # 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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -427,7 +464,21 @@ CONFIG_SPI=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -439,6 +490,7 @@ CONFIG_MMCSD_SPICLOCK=12500000 CONFIG_MMCSD_SPIMODE=0 # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set # CONFIG_MTD is not set # CONFIG_EEPROM is not set # CONFIG_PIPES is not set @@ -448,6 +500,8 @@ CONFIG_MMCSD_SPIMODE=0 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -471,14 +525,11 @@ CONFIG_UART0_SERIALDRIVER=y # 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_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -495,6 +546,7 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_DMA is not set CONFIG_USBDEV=y # @@ -534,15 +586,18 @@ CONFIG_USBMSC_SCSI_STACKSIZE=2048 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -574,16 +629,11 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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_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 # @@ -602,6 +652,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -647,10 +701,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -665,26 +724,26 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -692,18 +751,19 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD 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 @@ -711,14 +771,26 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_WEBSERVER 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 @@ -731,26 +803,23 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # @@ -768,17 +837,17 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_POWEROFF is not set # CONFIG_SYSTEM_SUDOKU is not set -# CONFIG_SYSTEM_VI is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set CONFIG_SYSTEM_USBMSC=y CONFIG_SYSTEM_USBMSC_NLUNS=1 CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 @@ -788,4 +857,5 @@ CONFIG_SYSTEM_USBMSC_DEVPATH2="/dev/mmcsd1" CONFIG_SYSTEM_USBMSC_DEVMINOR3=2 CONFIG_SYSTEM_USBMSC_DEVPATH3="/dev/mmcsd2" # CONFIG_SYSTEM_USBMSC_DEBUGMM is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimex-lpc1766stk/usbserial/defconfig b/configs/olimex-lpc1766stk/usbserial/defconfig index 28806b7c2b275b02a2d29f6864a0e34df319accb..2daf97a61ccef9a08e0cb1065c9bdf3d5c99398f 100644 --- a/configs/olimex-lpc1766stk/usbserial/defconfig +++ b/configs/olimex-lpc1766stk/usbserial/defconfig @@ -42,10 +42,11 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -117,6 +118,8 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="lpc17xx" +# 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 @@ -134,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 @@ -452,7 +456,12 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -460,6 +469,7 @@ CONFIG_DEV_NULL=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -472,6 +482,7 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -495,10 +506,6 @@ CONFIG_UART0_SERIALDRIVER=y # 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 @@ -559,15 +566,18 @@ CONFIG_PL2303_PRODUCTSTR="USBdev Serial" # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -598,12 +608,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -676,6 +680,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -704,10 +709,10 @@ CONFIG_ARCH_HAVE_TLS=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -716,18 +721,18 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -741,11 +746,11 @@ CONFIG_ARCH_HAVE_TLS=y # 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=y CONFIG_EXAMPLES_USBSERIAL_BUFSIZE=512 # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -767,8 +772,8 @@ CONFIG_EXAMPLES_USBSERIAL_BUFSIZE=512 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -779,6 +784,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 @@ -800,16 +806,16 @@ CONFIG_EXAMPLES_USBSERIAL_BUFSIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimex-lpc1766stk/zmodem/defconfig b/configs/olimex-lpc1766stk/zmodem/defconfig index f0880d4d32b71ebd959489f4cd6b956b1e097e0a..fbcfccd1444c6a72a26547073a618432b0005f3b 100644 --- a/configs/olimex-lpc1766stk/zmodem/defconfig +++ b/configs/olimex-lpc1766stk/zmodem/defconfig @@ -37,14 +37,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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 @@ -93,7 +96,9 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -104,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="lpc17xx" +# 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 # @@ -121,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -227,6 +244,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set CONFIG_ARCH_HAVE_MPU=y @@ -374,6 +392,7 @@ CONFIG_NAME_MAX=32 # 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 @@ -389,9 +408,10 @@ CONFIG_SIG_SIGWORK=17 # CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_HPWORK=y @@ -435,6 +455,10 @@ CONFIG_SPI=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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -448,7 +472,21 @@ CONFIG_SPI=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -460,6 +498,7 @@ CONFIG_MMCSD_SPICLOCK=12500000 CONFIG_MMCSD_SPIMODE=0 # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set # CONFIG_MTD is not set # CONFIG_EEPROM is not set CONFIG_NETDEVICES=y @@ -511,6 +550,8 @@ CONFIG_ETH0_PHY_KS8721=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -534,10 +575,6 @@ CONFIG_UART1_SERIALDRIVER=y # 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 @@ -578,15 +615,18 @@ CONFIG_UART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -729,7 +769,9 @@ 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_NFS is not set # CONFIG_FS_NXFFS is not set # CONFIG_FS_ROMFS is not set @@ -739,12 +781,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -763,6 +799,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -808,6 +848,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 @@ -815,12 +857,14 @@ CONFIG_NETDB_DNSCLIENT_ENTRIES=8 CONFIG_NETDB_DNSCLIENT_NAMESIZE=32 CONFIG_NETDB_DNSCLIENT_LIFESEC=3600 CONFIG_NETDB_DNSCLIENT_MAXRESPONSE=96 +# CONFIG_NETDB_RESOLVCONF is not set CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_NETDB_DNSSERVER_IPv4 is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -846,18 +890,20 @@ 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 +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -867,41 +913,49 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD 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_SMART_TEST 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_UDP is not set # 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_WEBSERVER 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 @@ -914,8 +968,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -927,25 +981,27 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -965,6 +1021,7 @@ CONFIG_NSH_BUILTIN_APPS=y # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_ARP is not set # CONFIG_NSH_DISABLE_BASENAME is not set # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set @@ -1007,6 +1064,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 @@ -1039,6 +1097,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1067,6 +1126,8 @@ CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048 CONFIG_NSH_TELNETD_CLIENTPRIO=100 CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048 CONFIG_NSH_IOBUFFER_SIZE=512 +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # CONFIG_NSH_TELNET_LOGIN is not set # @@ -1081,13 +1142,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1096,6 +1156,7 @@ 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set CONFIG_SYSTEM_ZMODEM=y CONFIG_SYSTEM_ZMODEM_DEVNAME="/dev/ttyS1" diff --git a/configs/olimex-lpc2378/nsh/Make.defs b/configs/olimex-lpc2378/nsh/Make.defs index d5c026545c47873aba5ff6874fdeb9981038c5d4..e623ef3b858938436f6e1ccad889834583d9e58f 100644 --- a/configs/olimex-lpc2378/nsh/Make.defs +++ b/configs/olimex-lpc2378/nsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(HOSTOS),Cygwin) endif endif -ifeq ("${CONFIG_DEBUG}","y") +ifeq ("${CONFIG_DEBUG_FEATURES}","y") ARCHOPTIMIZATION = -g endif @@ -120,7 +120,7 @@ EXEEXT = ifneq ($(CROSSDEV),arm-nuttx-elf-) LDFLAGS += -nostartfiles -nodefaultlibs endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) LDFLAGS += -g endif diff --git a/configs/olimex-lpc2378/nsh/defconfig b/configs/olimex-lpc2378/nsh/defconfig index 207ae574d59e3ec1c9dd494a23253b81bcd2c01e..226f178aaef5e57db59ed9909281cb58f1367e9f 100644 --- a/configs/olimex-lpc2378/nsh/defconfig +++ b/configs/olimex-lpc2378/nsh/defconfig @@ -42,10 +42,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -76,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 @@ -94,6 +96,7 @@ CONFIG_ARCH_CHIP_LPC2378=y # 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 @@ -106,6 +109,7 @@ CONFIG_ARCH_ARM7TDMI=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 @@ -114,8 +118,11 @@ CONFIG_ARCH_ARM7TDMI=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="arm" CONFIG_ARCH_CHIP="lpc2378" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y # CONFIG_ARCH_LOWVECTORS is not set @@ -162,6 +169,7 @@ CONFIG_LPC2378_UART2=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # CONFIG_ARCH_HAVE_MPU is not set @@ -360,13 +368,20 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support # # CONFIG_USERLED is not set +# CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -378,6 +393,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -401,10 +418,6 @@ CONFIG_UART2_SERIALDRIVER=y # 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 @@ -445,15 +458,18 @@ CONFIG_UART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -490,12 +506,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -514,6 +524,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -557,11 +571,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -590,10 +607,10 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -602,18 +619,19 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 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_NXTERM 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_PPPD 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 @@ -621,20 +639,25 @@ CONFIG_EXAMPLES_NSH=y # 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_WEBSERVER is not set # # File System Utilities # # CONFIG_FSUTILS_INIFILE is not set +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + # # Graphics Support # @@ -645,8 +668,8 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -657,6 +680,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 @@ -768,12 +792,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -781,5 +805,6 @@ 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimex-stm32-h405/include/board.h b/configs/olimex-stm32-h405/include/board.h index 462d34751d8890443f12a344c5a495cc4201742e..86d98da3fab8b5727584ffc378b6188ca289a036 100644 --- a/configs/olimex-stm32-h405/include/board.h +++ b/configs/olimex-stm32-h405/include/board.h @@ -1,7 +1,7 @@ /************************************************************************************ * configs/olimex-stm32-h405/include/board.h * - * 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 @@ -129,8 +129,14 @@ * Note: TIM1,8 are on APB2, others on APB1 */ -#define STM32_TIM18_FREQUENCY STM32_HCLK_FREQUENCY -#define STM32_TIM27_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM1_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM2_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM3_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM4_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM5_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM6_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM7_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM8_FREQUENCY STM32_HCLK_FREQUENCY /* LED definitions ******************************************************************/ /* If CONFIG_ARCH_LEDS is not defined, then the user can control the status LED in any diff --git a/configs/olimex-stm32-h405/src/stm32_adc.c b/configs/olimex-stm32-h405/src/stm32_adc.c index cc3a9ef0edbe795a6c6424af236b1f8b124ec7ae..f7cee47b8b86fb6c0342a780269c75201565522e 100644 --- a/configs/olimex-stm32-h405/src/stm32_adc.c +++ b/configs/olimex-stm32-h405/src/stm32_adc.c @@ -159,7 +159,7 @@ int stm32_adc_initialize(void) adc = stm32_adcinitialize(1, g_chanlist, ADC1_NCHANNELS); if (adc == NULL) { - adbg("ERROR: Failed to get ADC interface\n"); + aerr("ERROR: Failed to get ADC interface\n"); return -ENODEV; } @@ -168,7 +168,7 @@ int stm32_adc_initialize(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - adbg("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } diff --git a/configs/olimex-stm32-h405/src/stm32_autoleds.c b/configs/olimex-stm32-h405/src/stm32_autoleds.c index 32117cdf276131cca1c8e3ac46b76f745a52e817..6fefa2c9cdcd8f72dbc83b4fbbad70672cca4ebb 100644 --- a/configs/olimex-stm32-h405/src/stm32_autoleds.c +++ b/configs/olimex-stm32-h405/src/stm32_autoleds.c @@ -51,30 +51,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/olimex-stm32-h405/src/stm32_can.c b/configs/olimex-stm32-h405/src/stm32_can.c index 6443bdb88d9ee1bb87b323fe7576a30461a8be22..ed2ee4a069d02a8f825e1fe0f9f33a8a0e6fb1cf 100644 --- a/configs/olimex-stm32-h405/src/stm32_can.c +++ b/configs/olimex-stm32-h405/src/stm32_can.c @@ -65,25 +65,6 @@ # define CAN_PORT 2 #endif -/* 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 - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -125,7 +106,7 @@ int stm32_can_initialize(void) can = stm32_caninitialize(CAN_PORT); if (can == NULL) { - candbg("ERROR: Failed to get CAN interface\n"); + canerr("ERROR: Failed to get CAN interface\n"); return -ENODEV; } @@ -134,7 +115,7 @@ int stm32_can_initialize(void) ret = can_register("/dev/can0", can); if (ret < 0) { - candbg("ERROR: can_register failed: %d\n", ret); + canerr("ERROR: can_register failed: %d\n", ret); return ret; } diff --git a/configs/olimex-stm32-h405/src/stm32_usb.c b/configs/olimex-stm32-h405/src/stm32_usb.c index 438821fec29764e746c73a6ad11a3ab2b671b3b7..7680452af0792206213025e42ebcc121c85af5cf 100644 --- a/configs/olimex-stm32-h405/src/stm32_usb.c +++ b/configs/olimex-stm32-h405/src/stm32_usb.c @@ -110,7 +110,7 @@ void stm32_usbinitialize(void) #ifdef CONFIG_USBDEV void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } #endif diff --git a/configs/olimex-stm32-h405/src/stm32_userleds.c b/configs/olimex-stm32-h405/src/stm32_userleds.c index 8cbbcbd27d920524868c2e6cce8e9e58d0f53dab..aa00a80bddbfbeb9078d94bb9bdf4a6f09ed17e0 100644 --- a/configs/olimex-stm32-h405/src/stm32_userleds.c +++ b/configs/olimex-stm32-h405/src/stm32_userleds.c @@ -48,22 +48,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data ****************************************************************************/ diff --git a/configs/olimex-stm32-h405/usbnsh/defconfig b/configs/olimex-stm32-h405/usbnsh/defconfig index 5ba6d946fc59dad9ad170963f92f27fe63cd3f54..ef7d128fb99ca33d67ca889cee9786ee71780fbb 100644 --- a/configs/olimex-stm32-h405/usbnsh/defconfig +++ b/configs/olimex-stm32-h405/usbnsh/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y CONFIG_DEBUG_NOOPT=y @@ -206,6 +208,7 @@ CONFIG_CAN_TSEG2=8 # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -434,6 +437,10 @@ 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_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_PWM is not set CONFIG_STM32_TIM1_ADC=y CONFIG_STM32_TIM1_ADC1=y @@ -461,9 +468,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART3_SERIALDRIVER=y # CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -736,7 +751,12 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -744,6 +764,7 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -755,6 +776,7 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y +# CONFIG_SERIAL_CONSOLE is not set # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -844,14 +866,17 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_NONE=y +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -889,12 +914,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -967,6 +986,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1032,10 +1052,10 @@ CONFIG_EXAMPLES_CAN_READWRITE=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1045,17 +1065,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1063,17 +1083,17 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -1095,8 +1115,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1221,12 +1241,13 @@ CONFIG_NSH_CONSOLE=y # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CDCACM is not set # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1234,7 +1255,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimex-stm32-h407/include/board.h b/configs/olimex-stm32-h407/include/board.h index a116f5bb65aaef7b2e65bdc23c4af9fbb6d30735..9418619164f92841b14667d9b0a71250aefdcc5e 100644 --- a/configs/olimex-stm32-h407/include/board.h +++ b/configs/olimex-stm32-h407/include/board.h @@ -164,8 +164,14 @@ * Note: TIM1,8 are on APB2, others on APB1 */ -#define STM32_TIM18_FREQUENCY STM32_HCLK_FREQUENCY -#define STM32_TIM27_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM1_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM2_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM3_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM4_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM5_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM6_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM7_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM8_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 diff --git a/configs/olimex-stm32-h407/nsh/defconfig b/configs/olimex-stm32-h407/nsh/defconfig index 808193295bde34904fb79b5b9a3b2ff88f37ace2..4acf5a553f66b1dbfa17d14b71293680b4038bc4 100644 --- a/configs/olimex-stm32-h407/nsh/defconfig +++ b/configs/olimex-stm32-h407/nsh/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -200,6 +202,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -427,6 +430,10 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -445,9 +452,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -682,6 +697,8 @@ CONFIG_SPI=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -696,7 +713,12 @@ CONFIG_SPI=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -704,6 +726,7 @@ CONFIG_SPI=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -715,6 +738,8 @@ CONFIG_SPI=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -764,15 +789,18 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -818,12 +846,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -897,6 +919,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -940,10 +963,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -953,17 +976,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -971,16 +994,16 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -1004,8 +1027,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1130,12 +1153,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1143,6 +1166,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimex-stm32-h407/src/stm32_adc.c b/configs/olimex-stm32-h407/src/stm32_adc.c index a7f3e6aa32380c6e4461e1f9444fdca5b746389c..9fa020954c53cf6d285e69121f93cc98a4b314e2 100644 --- a/configs/olimex-stm32-h407/src/stm32_adc.c +++ b/configs/olimex-stm32-h407/src/stm32_adc.c @@ -159,7 +159,7 @@ int stm32_adc_initialize(void) adc = stm32_adcinitialize(1, g_chanlist, ADC1_NCHANNELS); if (adc == NULL) { - adbg("ERROR: Failed to get ADC interface\n"); + aerr("ERROR: Failed to get ADC interface\n"); return -ENODEV; } @@ -168,7 +168,7 @@ int stm32_adc_initialize(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - adbg("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } diff --git a/configs/olimex-stm32-h407/src/stm32_autoleds.c b/configs/olimex-stm32-h407/src/stm32_autoleds.c index 01bc2b5dae9e9045ae81d98443c90e9d9e15899f..b883e393df98bfaf2930f5b38cf5ccb103476523 100644 --- a/configs/olimex-stm32-h407/src/stm32_autoleds.c +++ b/configs/olimex-stm32-h407/src/stm32_autoleds.c @@ -54,22 +54,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/olimex-stm32-h407/src/stm32_can.c b/configs/olimex-stm32-h407/src/stm32_can.c index 521c4445110143ccc4cc3817d890c7d412c90bb9..d293ee960c0e7652a385154bae15f4af762dbeae 100644 --- a/configs/olimex-stm32-h407/src/stm32_can.c +++ b/configs/olimex-stm32-h407/src/stm32_can.c @@ -65,21 +65,6 @@ # define CAN_PORT 2 #endif -/* 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 - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -121,7 +106,7 @@ int stm32_can_initialize(void) can = stm32_caninitialize(CAN_PORT); if (can == NULL) { - candbg("ERROR: Failed to get CAN interface\n"); + canerr("ERROR: Failed to get CAN interface\n"); return -ENODEV; } @@ -130,7 +115,7 @@ int stm32_can_initialize(void) ret = can_register("/dev/can0", can); if (ret < 0) { - candbg("ERROR: can_register failed: %d\n", ret); + canerr("ERROR: can_register failed: %d\n", ret); return ret; } diff --git a/configs/olimex-stm32-h407/src/stm32_sdio.c b/configs/olimex-stm32-h407/src/stm32_sdio.c index 919c503252fcfb1c6b5b523da09559813ffc647e..05df07dee81aa99de070ee9fda3ccbb0ea12e3c2 100644 --- a/configs/olimex-stm32-h407/src/stm32_sdio.c +++ b/configs/olimex-stm32-h407/src/stm32_sdio.c @@ -134,33 +134,33 @@ int stm32_sdio_initialize(void) /* Mount the SDIO-based MMC/SD block driver */ /* First, get an instance of the SDIO interface */ - fvdbg("Initializing SDIO slot %d\n", SDIO_SLOTNO); + finfo("Initializing SDIO slot %d\n", SDIO_SLOTNO); g_sdio_dev = sdio_initialize(SDIO_SLOTNO); if (!g_sdio_dev) { - fdbg("Failed to initialize SDIO slot %d\n", SDIO_SLOTNO); + ferr("ERROR: Failed to initialize SDIO slot %d\n", SDIO_SLOTNO); return -ENODEV; } /* Now bind the SDIO interface to the MMC/SD driver */ - fvdbg("Bind SDIO to the MMC/SD driver, minor=%d\n", SDIO_MINOR); + finfo("Bind SDIO to the MMC/SD driver, minor=%d\n", SDIO_MINOR); ret = mmcsd_slotinitialize(SDIO_MINOR, g_sdio_dev); if (ret != OK) { - fdbg("Failed to bind SDIO to the MMC/SD driver: %d\n", ret); + ferr("ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); return ret; } - fvdbg("Successfully bound SDIO to the MMC/SD driver\n"); + finfo("Successfully bound SDIO to the MMC/SD driver\n"); #ifdef HAVE_NCD /* Use SD card detect pin to check if a card is g_sd_inserted */ cd_status = !stm32_gpioread(GPIO_SDIO_NCD); - fvdbg("Card detect : %d\n", cd_status); + finfo("Card detect : %d\n", cd_status); sdio_mediachange(g_sdio_dev, cd_status); #else diff --git a/configs/olimex-stm32-h407/src/stm32_usb.c b/configs/olimex-stm32-h407/src/stm32_usb.c index 22b246af381db0ea5bc08c0976686120b4287f0f..d948604a3b2e2cc004ed7726b68a12414299a8ea 100644 --- a/configs/olimex-stm32-h407/src/stm32_usb.c +++ b/configs/olimex-stm32-h407/src/stm32_usb.c @@ -103,13 +103,13 @@ static int usbhost_waiter(int argc, char *argv[]) { struct usbhost_hubport_s *hport; - uvdbg("Running\n"); + uinfo("Running\n"); for (;;) { /* Wait for the device to change state */ DEBUGVERIFY(CONN_WAIT(g_usbconn, &hport)); - uvdbg("%s\n", hport->connected ? "connected" : "disconnected"); + uinfo("%s\n", hport->connected ? "connected" : "disconnected"); /* Did we just become connected? */ @@ -173,7 +173,7 @@ int stm32_usbhost_initialize(void) * that we care about: */ - uvdbg("Register class drivers\n"); + uinfo("Register class drivers\n"); #ifdef CONFIG_USBHOST_HUB /* Initialize USB hub class support */ @@ -181,7 +181,7 @@ int stm32_usbhost_initialize(void) ret = usbhost_hub_initialize(); if (ret < 0) { - udbg("ERROR: usbhost_hub_initialize failed: %d\n", ret); + uerr("ERROR: usbhost_hub_initialize failed: %d\n", ret); } #endif @@ -191,7 +191,7 @@ int stm32_usbhost_initialize(void) ret = usbhost_msc_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the mass storage class: %d\n", ret); + uerr("ERROR: Failed to register the mass storage class: %d\n", ret); } #endif @@ -201,19 +201,19 @@ int stm32_usbhost_initialize(void) ret = usbhost_cdcacm_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret); + uerr("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret); } #endif /* Then get an instance of the USB host interface */ - uvdbg("Initialize USB host\n"); + uinfo("Initialize USB host\n"); g_usbconn = stm32_otghshost_initialize(0); if (g_usbconn) { /* Start a thread to handle device connection. */ - uvdbg("Start usbhost_waiter\n"); + uinfo("Start usbhost_waiter\n"); pid = task_create("usbhost", CONFIG_STM32H407_USBHOST_PRIO, CONFIG_STM32H407_USBHOST_STACKSIZE, @@ -307,7 +307,7 @@ xcpt_t stm32_setup_overcurrent(xcpt_t handler) #ifdef CONFIG_USBDEV void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } #endif diff --git a/configs/olimex-stm32-h407/src/stm32_userleds.c b/configs/olimex-stm32-h407/src/stm32_userleds.c index 44d85989e6765f55a8dbe2a906c06763454fb59f..ef430a3d868d8e691de37d3332b5d5eb99764e99 100644 --- a/configs/olimex-stm32-h407/src/stm32_userleds.c +++ b/configs/olimex-stm32-h407/src/stm32_userleds.c @@ -53,22 +53,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data ****************************************************************************/ diff --git a/configs/olimex-stm32-p107/include/board.h b/configs/olimex-stm32-p107/include/board.h index e82a41cb1ca797b96cd45aa8e622d92437098328..c6d0aa873b77c31587c8defd53b80f913440e0bc 100644 --- a/configs/olimex-stm32-p107/include/board.h +++ b/configs/olimex-stm32-p107/include/board.h @@ -98,14 +98,14 @@ #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) */ +/* APB1 timers 2-7 will be twice 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) +#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) /* MCO output driven by PLL3. From above, we already have PLL3 input frequency as: * diff --git a/configs/olimex-stm32-p107/nsh/defconfig b/configs/olimex-stm32-p107/nsh/defconfig index 6f02ee2d93d3a38c96d2e2ee39cf61a3a99bf00c..1065df7ce9a9d135318d4d8d8b13d2ba64d24873 100644 --- a/configs/olimex-stm32-p107/nsh/defconfig +++ b/configs/olimex-stm32-p107/nsh/defconfig @@ -42,10 +42,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -201,6 +203,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set CONFIG_ARCH_CHIP_STM32F107VC=y # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -409,6 +412,10 @@ CONFIG_STM32_JTAG_FULL_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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -420,9 +427,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -670,6 +685,7 @@ CONFIG_CAN=y CONFIG_CAN_FIFOSIZE=8 CONFIG_CAN_NPENDINGRTR=4 # CONFIG_CAN_TXREADY is not set +CONFIG_CAN_NPOLLWAITERS=2 # CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set # CONFIG_ARCH_HAVE_PWM_MULTICHAN is not set # CONFIG_PWM is not set @@ -690,13 +706,19 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support # # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -726,6 +748,7 @@ CONFIG_MTD=y # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set # CONFIG_MTD_N25QXXX is not set @@ -784,6 +807,8 @@ CONFIG_ETH0_PHY_KS8721=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -834,15 +859,18 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -989,12 +1017,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -1075,6 +1097,7 @@ CONFIG_NETDB_DNSSERVER_IPv4ADDR=0x0a000001 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1104,14 +1127,15 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_CONFIGDATA is not set # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1121,17 +1145,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1139,8 +1163,8 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1148,15 +1172,15 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UDPBLASTER is not set -# CONFIG_EXAMPLES_DISCOVER is not set -# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_XMLRPC is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # @@ -1174,8 +1198,8 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1188,22 +1212,22 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CHAT is not set # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER 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 +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1305,6 +1329,7 @@ CONFIG_NSH_CONSOLE=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1337,13 +1362,13 @@ CONFIG_NSH_MAX_ROUNDTRIP=20 # # 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_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1352,6 +1377,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimex-stm32-p107/src/stm32_can.c b/configs/olimex-stm32-p107/src/stm32_can.c index 690417f9f50f9ea187763e6127995ddb8aaa9ce9..b292036f14fd3a3e7b6354ce795abc9b2ff28668 100644 --- a/configs/olimex-stm32-p107/src/stm32_can.c +++ b/configs/olimex-stm32-p107/src/stm32_can.c @@ -61,25 +61,6 @@ #define CAN_PORT 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 - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -108,7 +89,7 @@ int board_can_initialize(void) can = stm32_caninitialize(CAN_PORT); if (can == NULL) { - candbg("ERROR: Failed to get CAN interface\n"); + canerr("ERROR: Failed to get CAN interface\n"); return -ENODEV; } @@ -117,7 +98,7 @@ int board_can_initialize(void) ret = can_register("/dev/can0", can); if (ret < 0) { - candbg("ERROR: can_register failed: %d\n", ret); + canerr("ERROR: can_register failed: %d\n", ret); return ret; } diff --git a/configs/olimex-stm32-p107/src/stm32_encx24j600.c b/configs/olimex-stm32-p107/src/stm32_encx24j600.c index 9f37781990979401fd00612621bffa059e3e719e..c5ec3b9663686651aaba16efbd1eabb0357d9dc7 100644 --- a/configs/olimex-stm32-p107/src/stm32_encx24j600.c +++ b/configs/olimex-stm32-p107/src/stm32_encx24j600.c @@ -180,7 +180,7 @@ void up_netinitialize(void) spi = stm32_spibus_initialize(ENCX24J600_SPI_PORTNO); if (!spi) { - nlldbg("Failed to initialize SPI port %d\n", ENCX24J600_SPI_PORTNO); + nerr("ERROR: Failed to initialize SPI port %d\n", ENCX24J600_SPI_PORTNO); return; } @@ -190,13 +190,13 @@ void up_netinitialize(void) if (ret < 0) { - nlldbg("Failed to bind SPI port %d ENCX24J600 device %d: %d\n", - ENCX24J600_SPI_PORTNO, ENCX24J600_DEVNO, ret); + nerr("ERROR: Failed to bind SPI port %d ENCX24J600 device %d: %d\n", + ENCX24J600_SPI_PORTNO, ENCX24J600_DEVNO, ret); return; } - nllvdbg("Bound SPI port %d to ENCX24J600 device %d\n", - ENCX24J600_SPI_PORTNO, ENCX24J600_DEVNO); + ninfo("Bound SPI port %d to ENCX24J600 device %d\n", + ENCX24J600_SPI_PORTNO, ENCX24J600_DEVNO); } #endif /* CONFIG_ENCX24J600 */ diff --git a/configs/olimex-stm32-p107/src/stm32_spi.c b/configs/olimex-stm32-p107/src/stm32_spi.c index 8fea7b1ac9a0d4df45ee3fa59540c7953b8167f3..9a454cfcfa66a167bb0f80c1958672395b915487 100644 --- a/configs/olimex-stm32-p107/src/stm32_spi.c +++ b/configs/olimex-stm32-p107/src/stm32_spi.c @@ -54,32 +54,6 @@ #if defined(CONFIG_STM32_SPI3) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -136,7 +110,7 @@ void weak_function stm32_spidev_initialize(void) #ifdef CONFIG_STM32_SPI3 void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); if (devid == SPIDEV_ETHERNET) { diff --git a/configs/olimex-stm32-p207/include/board.h b/configs/olimex-stm32-p207/include/board.h index c00053690543b1a71e286ea2ae566132387bd8f9..62cb143755305a3e06517491b40aea38bde2fedf 100644 --- a/configs/olimex-stm32-p207/include/board.h +++ b/configs/olimex-stm32-p207/include/board.h @@ -1,7 +1,7 @@ /************************************************************************************ * configs/olimex-stm32-p207/include/board.h * - * 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 @@ -129,8 +129,14 @@ * Note: TIM1,8 are on APB2, others on APB1 */ -#define STM32_TIM18_FREQUENCY STM32_HCLK_FREQUENCY -#define STM32_TIM27_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM1_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM2_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM3_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM4_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM5_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM6_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM7_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM8_FREQUENCY STM32_HCLK_FREQUENCY /* LED definitions ******************************************************************/ /* If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs in any diff --git a/configs/olimex-stm32-p207/nsh/defconfig b/configs/olimex-stm32-p207/nsh/defconfig index cd9c9a3aebcbf2dc14ed0cc0808fcda302755ba9..ec99e3837a89bc3268421fd3410348a811af591c 100644 --- a/configs/olimex-stm32-p207/nsh/defconfig +++ b/configs/olimex-stm32-p207/nsh/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y CONFIG_DEBUG_NOOPT=y @@ -208,6 +210,7 @@ CONFIG_CAN_TSEG2=8 # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -435,6 +438,10 @@ CONFIG_STM32_JTAG_SW_ENABLE=y CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_PWM is not set CONFIG_STM32_TIM1_ADC=y CONFIG_STM32_TIM1_ADC1=y @@ -462,9 +469,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART3_SERIALDRIVER=y # CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -508,8 +523,6 @@ CONFIG_STM32_OTGFS_DESCSIZE=128 # # USB Host Debug Configuration # -# CONFIG_STM32_USBHOST_REGDEBUG is not set -# CONFIG_STM32_USBHOST_PKTDUMP is not set # # USB Device Configuration @@ -763,7 +776,12 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -771,6 +789,7 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -822,6 +841,8 @@ CONFIG_ETH0_PHY_KS8721=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -881,15 +902,18 @@ CONFIG_USBHOST_HAVE_ASYNCH=y # CONFIG_USBHOST_TRACE is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -1036,12 +1060,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -1122,6 +1140,7 @@ CONFIG_NETDB_DNSSERVER_IPv4ADDR=0x0a000001 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1177,15 +1196,16 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1196,17 +1216,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1214,8 +1234,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1223,11 +1243,10 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # 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_WEBSERVER is not set # # File System Utilities @@ -1249,8 +1268,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1262,19 +1281,19 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set # CONFIG_NETUTILS_TFTPC is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1376,6 +1395,7 @@ CONFIG_NSH_CONSOLE=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1408,12 +1428,12 @@ CONFIG_NSH_MAX_ROUNDTRIP=20 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1422,6 +1442,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimex-stm32-p207/src/stm32_adc.c b/configs/olimex-stm32-p207/src/stm32_adc.c index 96fc837b9718e97deda2f8d9342bbf1bd186bbe6..75a451176ab39934306fd43b01d8213c083beec5 100644 --- a/configs/olimex-stm32-p207/src/stm32_adc.c +++ b/configs/olimex-stm32-p207/src/stm32_adc.c @@ -151,7 +151,7 @@ int stm32_adc_initialize(void) adc = stm32_adcinitialize(1, g_chanlist, ADC1_NCHANNELS); if (adc == NULL) { - adbg("ERROR: Failed to get ADC interface\n"); + aerr("ERROR: Failed to get ADC interface\n"); return -ENODEV; } @@ -160,7 +160,7 @@ int stm32_adc_initialize(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - adbg("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } diff --git a/configs/olimex-stm32-p207/src/stm32_autoleds.c b/configs/olimex-stm32-p207/src/stm32_autoleds.c index a46bfcc970bae84e7338259de30a373495aaa52f..972eed5a8901f4b745a0ceac8fd6f0c9a5402dc2 100644 --- a/configs/olimex-stm32-p207/src/stm32_autoleds.c +++ b/configs/olimex-stm32-p207/src/stm32_autoleds.c @@ -55,18 +55,6 @@ * 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 - /* The following definitions map the encoded LED setting to GPIO settings */ #define LED_STARTED_BITS (BOARD_LED1_BIT) diff --git a/configs/olimex-stm32-p207/src/stm32_can.c b/configs/olimex-stm32-p207/src/stm32_can.c index 9728422aeafcc86defa53526f872739743b93704..16c71ae43e7de6daaa6718896128664d9e6b7cf2 100644 --- a/configs/olimex-stm32-p207/src/stm32_can.c +++ b/configs/olimex-stm32-p207/src/stm32_can.c @@ -65,25 +65,6 @@ # define CAN_PORT 2 #endif -/* 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 - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -125,7 +106,7 @@ int stm32_can_initialize(void) can = stm32_caninitialize(CAN_PORT); if (can == NULL) { - candbg("ERROR: Failed to get CAN interface\n"); + canerr("ERROR: Failed to get CAN interface\n"); return -ENODEV; } @@ -134,7 +115,7 @@ int stm32_can_initialize(void) ret = can_register("/dev/can0", can); if (ret < 0) { - candbg("ERROR: can_register failed: %d\n", ret); + canerr("ERROR: can_register failed: %d\n", ret); return ret; } diff --git a/configs/olimex-stm32-p207/src/stm32_usb.c b/configs/olimex-stm32-p207/src/stm32_usb.c index c9b2c968aaef5e7ac7a8ba3c771019184abb5e8c..65198bf004167b25656e91bb9c777103a29108ad 100644 --- a/configs/olimex-stm32-p207/src/stm32_usb.c +++ b/configs/olimex-stm32-p207/src/stm32_usb.c @@ -105,13 +105,13 @@ static int usbhost_waiter(int argc, char *argv[]) { struct usbhost_hubport_s *hport; - uvdbg("Running\n"); + uinfo("Running\n"); for (;;) { /* Wait for the device to change state */ DEBUGVERIFY(CONN_WAIT(g_usbconn, &hport)); - uvdbg("%s\n", hport->connected ? "connected" : "disconnected"); + uinfo("%s\n", hport->connected ? "connected" : "disconnected"); /* Did we just become connected? */ @@ -177,7 +177,7 @@ int stm32_usbhost_initialize(void) * that we care about: */ - uvdbg("Register class drivers\n"); + uinfo("Register class drivers\n"); #ifdef CONFIG_USBHOST_HUB /* Initialize USB hub class support */ @@ -185,7 +185,7 @@ int stm32_usbhost_initialize(void) ret = usbhost_hub_initialize(); if (ret < 0) { - udbg("ERROR: usbhost_hub_initialize failed: %d\n", ret); + uerr("ERROR: usbhost_hub_initialize failed: %d\n", ret); } #endif @@ -195,7 +195,7 @@ int stm32_usbhost_initialize(void) ret = usbhost_msc_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the mass storage class: %d\n", ret); + uerr("ERROR: Failed to register the mass storage class: %d\n", ret); } #endif @@ -205,19 +205,19 @@ int stm32_usbhost_initialize(void) ret = usbhost_cdcacm_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret); + uerr("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret); } #endif /* Then get an instance of the USB host interface */ - uvdbg("Initialize USB host\n"); + uinfo("Initialize USB host\n"); g_usbconn = stm32_otgfshost_initialize(0); if (g_usbconn) { /* Start a thread to handle device connection. */ - uvdbg("Start usbhost_waiter\n"); + uinfo("Start usbhost_waiter\n"); pid = task_create("usbhost", CONFIG_USBHOST_DEFPRIO, CONFIG_USBHOST_STACKSIZE, @@ -311,7 +311,7 @@ void stm32_usbhost_vbusdrive(int iface, bool enable) #ifdef CONFIG_USBDEV void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } #endif diff --git a/configs/olimex-stm32-p207/src/stm32_userleds.c b/configs/olimex-stm32-p207/src/stm32_userleds.c index 289c6beec8431ac624027c7cbe02a76c74db9730..a3647a81480321aed3d9cfedd03be99e2092896d 100644 --- a/configs/olimex-stm32-p207/src/stm32_userleds.c +++ b/configs/olimex-stm32-p207/src/stm32_userleds.c @@ -48,22 +48,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data ****************************************************************************/ diff --git a/configs/olimex-strp711/nettest/Make.defs b/configs/olimex-strp711/nettest/Make.defs index ca1550a6edd05e43f9ce3f3e4e48c8035c503048..67f4f77d6712f7982e90055b1eeadf6cae0322d1 100644 --- a/configs/olimex-strp711/nettest/Make.defs +++ b/configs/olimex-strp711/nettest/Make.defs @@ -71,7 +71,7 @@ ifneq ($(HOSTOS),Cygwin) endif endif -ifeq ("${CONFIG_DEBUG}","y") +ifeq ("${CONFIG_DEBUG_FEATURES}","y") ARCHOPTIMIZATION = -g endif @@ -115,7 +115,7 @@ EXEEXT = ifneq ($(CROSSDEV),arm-nuttx-elf-) LDFLAGS += -nostartfiles -nodefaultlibs endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) LDFLAGS += -g endif diff --git a/configs/olimex-strp711/nettest/defconfig b/configs/olimex-strp711/nettest/defconfig index 2f698cc8bdcae048ecf310a9acca8786988ae746..1dc02704630a6626a8f15ca849d7c72c73ffa140 100644 --- a/configs/olimex-strp711/nettest/defconfig +++ b/configs/olimex-strp711/nettest/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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 @@ -93,7 +96,9 @@ CONFIG_ARCH="arm" # 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=y +# CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set CONFIG_ARCH_ARM7TDMI=y # CONFIG_ARCH_ARM926EJS is not set @@ -104,10 +109,21 @@ CONFIG_ARCH_ARM7TDMI=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="arm" CONFIG_ARCH_CHIP="str71x" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y # CONFIG_ARCH_LOWVECTORS is not set @@ -170,6 +186,7 @@ CONFIG_STR71X_XTI=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # CONFIG_ARCH_HAVE_MPU is not set @@ -302,6 +319,7 @@ CONFIG_NAME_MAX=32 # 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 @@ -317,9 +335,10 @@ CONFIG_SIG_SIGWORK=17 # CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_HPWORK=y @@ -353,6 +372,7 @@ CONFIG_DEV_NULL=y # 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 @@ -362,6 +382,10 @@ CONFIG_SPI=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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -376,8 +400,22 @@ CONFIG_SPI=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y @@ -386,7 +424,10 @@ CONFIG_NETDEVICES=y # General Ethernet MAC Driver Options # # CONFIG_NETDEV_LOOPBACK is not set +# CONFIG_NETDEV_TELNET is not set # CONFIG_NETDEV_MULTINIC is not set +CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y +# CONFIG_NETDEV_STATISTICS is not set # CONFIG_NETDEV_LATEINIT is not set # @@ -397,7 +438,6 @@ CONFIG_ENC28J60=y CONFIG_ENC28J60_NINTERFACES=1 CONFIG_ENC28J60_SPIMODE=0 CONFIG_ENC28J60_FREQUENCY=20000000 -CONFIG_ENC28J60_STATS=y # CONFIG_ENC28J60_HALFDUPPLEX is not set # CONFIG_ENC28J60_DUMPPACKET is not set # CONFIG_ENCX24J600 is not set @@ -412,6 +452,8 @@ CONFIG_ENC28J60_STATS=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -435,13 +477,10 @@ CONFIG_UART1_SERIALDRIVER=y # 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_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_UART0_SERIAL_CONSOLE=y # CONFIG_UART1_SERIAL_CONSOLE is not set @@ -459,6 +498,7 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_DMA is not set # # UART1 Configuration @@ -471,19 +511,23 @@ 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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -617,12 +661,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -641,6 +679,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -681,11 +723,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -699,10 +744,15 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # Application Configuration # +# +# 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_DHCPD is not set @@ -710,11 +760,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -736,18 +786,19 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD 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 @@ -755,16 +806,26 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # 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_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + # # Graphics Support # @@ -775,8 +836,8 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -787,11 +848,12 @@ 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_NETLIB=y # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set # CONFIG_NETUTILS_XMLRPC is not set @@ -813,15 +875,16 @@ CONFIG_NETUTILS_NETLIB=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimex-strp711/nsh/Make.defs b/configs/olimex-strp711/nsh/Make.defs index 268e6039ebdb0e53754dc16cc7fb0f394d866f7f..d2750fb667fca0b1f8ccad85b2dd8c41c0e536a5 100644 --- a/configs/olimex-strp711/nsh/Make.defs +++ b/configs/olimex-strp711/nsh/Make.defs @@ -71,7 +71,7 @@ ifneq ($(HOSTOS),Cygwin) endif endif -ifeq ("${CONFIG_DEBUG}","y") +ifeq ("${CONFIG_DEBUG_FEATURES}","y") ARCHOPTIMIZATION = -g endif @@ -115,7 +115,7 @@ EXEEXT = ifneq ($(CROSSDEV),arm-nuttx-elf-) LDFLAGS += -nostartfiles -nodefaultlibs endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) LDFLAGS += -g endif diff --git a/configs/olimex-strp711/nsh/defconfig b/configs/olimex-strp711/nsh/defconfig index 790273c42202bdaaa1128a08da024b8302ea1f37..ed9e622b0df417b3b16da66b6aac2a5a7cd94834 100644 --- a/configs/olimex-strp711/nsh/defconfig +++ b/configs/olimex-strp711/nsh/defconfig @@ -17,6 +17,7 @@ CONFIG_HOST_LINUX=y # Build Configuration # # CONFIG_APPS_DIR="../apps" +CONFIG_BUILD_FLAT=y # CONFIG_BUILD_2PASS is not set # @@ -26,20 +27,25 @@ CONFIG_HOST_LINUX=y # 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_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y @@ -69,10 +75,14 @@ CONFIG_ARCH="arm" # 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 @@ -81,21 +91,39 @@ CONFIG_ARCH="arm" # 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=y +# CONFIG_ARCH_CHIP_TMS570 is not set +# CONFIG_ARCH_CHIP_MOXART is not set CONFIG_ARCH_ARM7TDMI=y # 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 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="arm" CONFIG_ARCH_CHIP="str71x" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU is not set # CONFIG_ARCH_HAVE_FPU is not set -# CONFIG_ARCH_HAVE_MPU is not set +# CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set +# CONFIG_ARM_HAVE_MPU_UNIFIED is not set CONFIG_ARCH_HAVE_LOWVECTORS=y # CONFIG_ARCH_LOWVECTORS is not set @@ -154,10 +182,18 @@ CONFIG_STR71X_UART1=y # CONFIG_ARCH_VECNOTIRQ is not set # CONFIG_ARCH_DMA is not set # CONFIG_ARCH_HAVE_IRQPRIO is not set -# CONFIG_ARCH_ADDRENV is not set +# 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 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_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set # CONFIG_ARCH_IDLE_CUSTOM is not set @@ -214,39 +250,84 @@ CONFIG_NSH_MMCSDSPIPORTNO=1 # # 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_BOARD_INITIALIZE is not set +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_RR_INTERVAL=0 -# CONFIG_SCHED_CPULOAD is not set -# CONFIG_SCHED_INSTRUMENTATION is not set -CONFIG_TASK_NAME_SIZE=0 -# CONFIG_SCHED_HAVE_PARENT is not set +# CONFIG_CLOCK_MONOTONIC is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2009 CONFIG_START_MONTH=6 CONFIG_START_DAY=5 -CONFIG_DEV_CONSOLE=y +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=0 +# 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 is not set + +# +# Pthread Options +# # CONFIG_MUTEX_TYPES is not set -# CONFIG_PRIORITY_INHERITANCE 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_SCHED_WAITPID 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_USER_ENTRYPOINT="nsh_main" -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 # # Signal Numbers @@ -257,19 +338,18 @@ CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGCONDTIMEDOUT=16 # -# Sizes of configurable things (0 disables) +# POSIX Message Queue Options # -CONFIG_MAX_TASKS=16 -CONFIG_NPTHREAD_KEYS=4 -CONFIG_NFILE_DESCRIPTORS=8 -CONFIG_NFILE_STREAMS=8 -CONFIG_NAME_MAX=32 CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 -CONFIG_MAX_WDOGPARMS=2 -CONFIG_PREALLOC_WDOGS=4 -CONFIG_WDOG_INTRESERVE=0 -CONFIG_PREALLOC_TIMERS=4 +# 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 @@ -278,6 +358,7 @@ CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_DEFAULT=2048 +# CONFIG_LIB_SYSCALL is not set # # Device Drivers @@ -286,17 +367,35 @@ 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 is not set # CONFIG_I2C is not set CONFIG_SPI=y +# CONFIG_SPI_SLAVE is not set # CONFIG_SPI_EXCHANGE is not set # CONFIG_SPI_CMDDATA is not set +CONFIG_SPI_CALLBACK=y # CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_HWFEATURES is not set +# CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL 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 @@ -304,7 +403,21 @@ CONFIG_SPI=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -315,7 +428,10 @@ CONFIG_MMCSD_SPI=y CONFIG_MMCSD_SPICLOCK=20000000 CONFIG_MMCSD_SPIMODE=0 # CONFIG_ARCH_HAVE_SDIO is not set +# CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE 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 @@ -323,17 +439,40 @@ CONFIG_MMCSD_SPIMODE=0 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set +# CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y CONFIG_UART1_SERIALDRIVER=y - -# -# USART Configuration -# +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER 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 +# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_SERIAL_DMA is not set +# CONFIG_ARCH_HAVE_SERIAL_TERMIOS is not set CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_UART1_SERIAL_CONSOLE is not set +# CONFIG_OTHER_SERIAL_CONSOLE is not set # CONFIG_NO_SERIAL_CONSOLE is not set # @@ -347,6 +486,7 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_DMA is not set # # UART1 Configuration @@ -359,20 +499,23 @@ CONFIG_UART1_PARITY=0 CONFIG_UART1_2STOP=0 # CONFIG_UART1_IFLOWCONTROL is not set # CONFIG_UART1_OFLOWCONTROL is not set -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -381,6 +524,11 @@ CONFIG_UART1_2STOP=0 # CONFIG_ARCH_HAVE_PHY is not set # CONFIG_NET is not set +# +# Crypto API +# +# CONFIG_CRYPTO is not set + # # File Systems # @@ -389,25 +537,26 @@ CONFIG_UART1_2STOP=0 # 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=y +# CONFIG_FS_NAMED_SEMAPHORES is not set +CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_RAMMAP is not set 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 # CONFIG_FS_SMARTFS is not set # CONFIG_FS_PROCFS is not set - -# -# System Logging -# - -# CONFIG_SYSLOG is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -428,7 +577,11 @@ CONFIG_MM_REGIONS=1 # CONFIG_AUDIO is not set # -# Binary Formats +# Wireless Support +# + +# +# Binary Loader # # CONFIG_BINFMT_DISABLE is not set # CONFIG_BINFMT_EXEPATH is not set @@ -453,6 +606,7 @@ CONFIG_LIB_HOMEDIR="/" # 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 @@ -463,15 +617,23 @@ 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_LIBC_TMPDIR="/tmp" +CONFIG_LIBC_MAX_TMPFILE=32 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_SCHED_WORKQUEUE is not set +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -486,26 +648,27 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FSTEST 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_LCDRW is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -513,88 +676,108 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM is not set # CONFIG_EXAMPLES_NXTEXT is not set # CONFIG_EXAMPLES_OSTEST is not set -# CONFIG_EXAMPLES_PASHELLO is not set +# CONFIG_EXAMPLES_PCA9635 is not set # CONFIG_EXAMPLES_PIPE is not set # CONFIG_EXAMPLES_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 +# 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 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_UDP 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_WEBSERVER 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_MICROPYTHON is not set # CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # # 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 # CONFIG_NETUTILS_SMTP is not set -# CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_NETLIB is not set -# CONFIG_NETUTILS_WEBCLIENT is not set # -# FreeModBus +# NSH Library # -# CONFIG_MODBUS is not set +CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # -# NSH Library +# Command Line Configuration # -CONFIG_NSH_LIBRARY=y 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 # # 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 @@ -603,8 +786,10 @@ CONFIG_NSH_READLINE=y # 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 @@ -613,6 +798,7 @@ CONFIG_NSH_READLINE=y # 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 @@ -622,8 +808,10 @@ CONFIG_NSH_READLINE=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 # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set @@ -636,25 +824,22 @@ CONFIG_NSH_CMDOPT_DF_H=y CONFIG_NSH_CODECS_BUFSIZE=128 CONFIG_NSH_CMDOPT_HEXDUMP=y CONFIG_NSH_FILEIOSIZE=512 -CONFIG_NSH_LINELEN=64 -# CONFIG_NSH_DISABLE_SEMICOLON is not set -CONFIG_NSH_CMDPARMS=y -CONFIG_NSH_TMPDIR="/tmp" -CONFIG_NSH_MAXARGUMENTS=6 -CONFIG_NSH_ARGCAT=y -CONFIG_NSH_NESTDEPTH=3 + +# +# Scripting Support +# # CONFIG_NSH_DISABLESCRIPT is not set # CONFIG_NSH_DISABLE_ITEF is not set # CONFIG_NSH_DISABLE_LOOPS is not set -# CONFIG_NSH_DISABLEBG is not set -CONFIG_NSH_CONSOLE=y # -# USB Trace Support +# Console Configuration # +CONFIG_NSH_CONSOLE=y # CONFIG_NSH_ALTCONDEV is not set CONFIG_NSH_ARCHINIT=y -CONFIG_LIB_BOARDCTL=y +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # # NxWidgets/NxWM @@ -668,94 +853,19 @@ CONFIG_LIB_BOARDCTL=y # # System Libraries and NSH Add-Ons # - -# -# USB CDC/ACM Device Commands -# - -# -# USB Composite Device Commands -# - -# -# Custom Free Memory Command -# +# CONFIG_SYSTEM_CLE is not set +# CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set - -# -# I2C tool -# - -# -# INI File Parser -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# FLASH Program Installation -# +# CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set # CONFIG_SYSTEM_INSTALL is not set - -# -# FLASH Erase-all Command -# - -# -# NxPlayer media player library / command Line -# -# CONFIG_SYSTEM_NXPLAYER is not set - -# -# RAM test -# # CONFIG_SYSTEM_RAMTEST is not set - -# -# readline() -# +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sysinfo -# - -# -# USB Monitor -# - -# -# EMACS-like Command Line Editor -# -# CONFIG_SYSTEM_CLE is not set - -# -# VI Work-Alike Editor -# +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set +# CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set - -# -# Stack Monitor -# - -# -# USB Mass Storage Device Commands -# - -# -# Zmodem Commands -# # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimex-strp711/src/str71_enc28j60.c b/configs/olimex-strp711/src/str71_enc28j60.c index d36f61000ad31fb4100fb3dc589645e735bd423c..73d16f1eadc493842ab4d37f57707f4deef41f78 100644 --- a/configs/olimex-strp711/src/str71_enc28j60.c +++ b/configs/olimex-strp711/src/str71_enc28j60.c @@ -216,7 +216,7 @@ void up_netinitialize(void) spi = str71_spibus_initialize(ENC28J60_SPI_PORTNO); if (!spi) { - nlldbg("Failed to initialize SPI port %d\n", ENC28J60_SPI_PORTNO); + nerr("ERROR: Failed to initialize SPI port %d\n", ENC28J60_SPI_PORTNO); return; } @@ -225,7 +225,7 @@ void up_netinitialize(void) ret = str71x_xticonfig(ENC28J60_IRQ, false); if (ret < 0) { - nlldbg("Failed configure interrupt for IRQ %d: %d\n", ENC28J60_IRQ, ret); + nerr("ERROR: Failed configure interrupt for IRQ %d: %d\n", ENC28J60_IRQ, ret); return; } @@ -240,12 +240,12 @@ void up_netinitialize(void) ret = enc_initialize(spi, &g_enclower, ENC28J60_DEVNO); if (ret < 0) { - nlldbg("Failed to bind SPI port %d ENC28J60 device %d: %d\n", - ENC28J60_SPI_PORTNO, ENC28J60_DEVNO, ret); + nerr("ERROR: Failed to bind SPI port %d ENC28J60 device %d: %d\n", + ENC28J60_SPI_PORTNO, ENC28J60_DEVNO, ret); return; } - nllvdbg("Bound SPI port %d to ENC28J60 device %d\n", + ninfo("Bound SPI port %d to ENC28J60 device %d\n", ENC28J60_SPI_PORTNO, ENC28J60_DEVNO); } #endif /* CONFIG_ENC28J60 */ diff --git a/configs/olimexino-stm32/can/defconfig b/configs/olimexino-stm32/can/defconfig index 866967575efbf029e9196e06307517faca4dd9a8..9366accf055adca387545542830eb1e964898a15 100644 --- a/configs/olimexino-stm32/can/defconfig +++ b/configs/olimexino-stm32/can/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y CONFIG_STACK_COLORATION=y +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -204,6 +206,7 @@ CONFIG_ARCH_CHIP_STM32F103RB=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -423,6 +426,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y CONFIG_STM32_FORCEPOWER=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_PWM is not set # CONFIG_STM32_TIM3_PWM is not set # CONFIG_STM32_TIM1_ADC is not set @@ -442,9 +449,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# CONFIG_SERIAL_DISABLE_REORDERING=y CONFIG_STM32_FLOWCONTROL_BROKEN=y # CONFIG_STM32_USART_BREAKS is not set @@ -698,6 +713,7 @@ CONFIG_CAN=y CONFIG_CAN_FIFOSIZE=8 CONFIG_CAN_NPENDINGRTR=4 # CONFIG_CAN_TXREADY is not set +CONFIG_CAN_NPOLLWAITERS=2 # CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set # CONFIG_ARCH_HAVE_PWM_MULTICHAN is not set # CONFIG_PWM is not set @@ -716,6 +732,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -733,7 +751,12 @@ CONFIG_ANALOG=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -741,6 +764,7 @@ CONFIG_ANALOG=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -752,6 +776,8 @@ CONFIG_ANALOG=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -802,15 +828,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -856,12 +885,6 @@ CONFIG_FS_FATTIME=y # 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 # @@ -937,6 +960,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -989,10 +1013,10 @@ CONFIG_EXAMPLES_CAN_READWRITE=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1002,17 +1026,17 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_NSH_CXXINITIALIZE is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1020,17 +1044,17 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -1054,8 +1078,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1179,21 +1203,21 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_I2CTOOL is not set +# CONFIG_SYSTEM_INSTALL 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_STACKMONITOR is not set +# CONFIG_SYSTEM_SUDOKU is not set # CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimexino-stm32/composite/defconfig b/configs/olimexino-stm32/composite/defconfig index bb7055ac6862df940e6ea7ab7c7538e1176ad1fc..a58f83346f97f5bbfae4682a63c4c9dcf75c376c 100644 --- a/configs/olimexino-stm32/composite/defconfig +++ b/configs/olimexino-stm32/composite/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y CONFIG_STACK_COLORATION=y +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARCH_CHIP_STM32F103RB=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -417,6 +420,10 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y CONFIG_STM32_FORCEPOWER=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set CONFIG_STM32_DMACAPABLE=y + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_PWM is not set # CONFIG_STM32_TIM3_PWM is not set # CONFIG_STM32_TIM1_ADC is not set @@ -437,6 +444,10 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set @@ -445,6 +456,10 @@ CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_USART2_RXDMA is not set + +# +# Serial Driver Configuration +# CONFIG_SERIAL_DISABLE_REORDERING=y CONFIG_STM32_FLOWCONTROL_BROKEN=y # CONFIG_STM32_USART_BREAKS is not set @@ -704,6 +719,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -726,7 +743,12 @@ CONFIG_ANALOG=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -734,6 +756,7 @@ CONFIG_ANALOG=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -756,6 +779,7 @@ CONFIG_MMCSD_SPIMODE=0 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -890,15 +914,18 @@ CONFIG_USBMSC_SCSI_STACKSIZE=340 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -944,12 +971,6 @@ CONFIG_FS_FATTIME=y # 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 # @@ -1025,6 +1046,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1083,10 +1105,10 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1096,17 +1118,17 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_NSH_CXXINITIALIZE is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1114,17 +1136,17 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -1148,8 +1170,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1276,22 +1298,8 @@ CONFIG_NSH_ARCHINIT=y # # System Libraries and NSH Add-Ons # -CONFIG_SYSTEM_FREE=y -# 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_STACKMONITOR is not set # CONFIG_SYSTEM_CDCACM is not set +# CONFIG_SYSTEM_CLE is not set CONFIG_SYSTEM_COMPOSITE=y CONFIG_SYSTEM_COMPOSITE_NLUNS=1 CONFIG_SYSTEM_COMPOSITE_DEVMINOR1=0 @@ -1304,6 +1312,20 @@ CONFIG_SYSTEM_COMPOSITE_TTYUSB=0 CONFIG_SYSTEM_COMPOSITE_SERDEV="/dev/ttyACM0" CONFIG_SYSTEM_COMPOSITE_BUFSIZE=256 # CONFIG_SYSTEM_COMPOSITE_DEBUGMM is not set +# CONFIG_SYSTEM_CUTERM is not set +CONFIG_SYSTEM_FREE=y +# CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_STACKMONITOR is not set +# CONFIG_SYSTEM_SUDOKU is not set # CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_USBMSC is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimexino-stm32/include/board.h b/configs/olimexino-stm32/include/board.h index ac695f9710d3efc5817ce6b0c36c44dea4831fca..997dcfe7bea8729f3427a464b7aa5d7a468bc0f2 100644 --- a/configs/olimexino-stm32/include/board.h +++ b/configs/olimexino-stm32/include/board.h @@ -1,7 +1,7 @@ /************************************************************************************ * configs/olimexino-stm32/include/board.h * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * David Sidrane * @@ -102,14 +102,14 @@ #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) */ +/* APB1 timers 2-7 will be twice 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) +#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) /* USB divider -- Divide PLL clock by 1.5 */ @@ -119,8 +119,14 @@ * 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 +#define BOARD_TIM1_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM2_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM3_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM4_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM5_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM6_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM7_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM8_FREQUENCY STM32_HCLK_FREQUENCY /* Buttons *************************************************************************/ diff --git a/configs/olimexino-stm32/nsh/defconfig b/configs/olimexino-stm32/nsh/defconfig index bff7b461199aa9df3215d8745c5ac0a0f03a0fcd..e963472cb3c4cac9b6158587d5e14f8a3aef0bbe 100644 --- a/configs/olimexino-stm32/nsh/defconfig +++ b/configs/olimexino-stm32/nsh/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y CONFIG_STACK_COLORATION=y +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARCH_CHIP_STM32F103RB=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -417,6 +420,10 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y CONFIG_STM32_FORCEPOWER=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set CONFIG_STM32_DMACAPABLE=y + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_PWM is not set # CONFIG_STM32_TIM3_PWM is not set # CONFIG_STM32_TIM1_ADC is not set @@ -437,6 +444,10 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set @@ -445,6 +456,10 @@ CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_USART2_RXDMA is not set + +# +# Serial Driver Configuration +# CONFIG_SERIAL_DISABLE_REORDERING=y CONFIG_STM32_FLOWCONTROL_BROKEN=y # CONFIG_STM32_USART_BREAKS is not set @@ -703,6 +718,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -725,7 +742,12 @@ CONFIG_ANALOG=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -733,6 +755,7 @@ CONFIG_ANALOG=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -754,6 +777,8 @@ CONFIG_MMCSD_SPIMODE=0 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -818,15 +843,18 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -872,12 +900,6 @@ CONFIG_FS_FATTIME=y # 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 # @@ -953,6 +975,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1011,10 +1034,10 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1024,17 +1047,17 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_NSH_CXXINITIALIZE is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1042,17 +1065,17 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -1076,8 +1099,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1203,20 +1226,20 @@ CONFIG_NSH_ARCHINIT=y # # System Libraries and NSH Add-Ons # -CONFIG_SYSTEM_FREE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set +CONFIG_SYSTEM_FREE=y # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_STACKMONITOR is not set +# CONFIG_SYSTEM_SUDOKU is not set # CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimexino-stm32/smallnsh/defconfig b/configs/olimexino-stm32/smallnsh/defconfig index 1429b4c2b492a96350da170f0a3d7d962942677e..6a870a7f6e982bb3c62ffa837a5c9f4d200f917b 100644 --- a/configs/olimexino-stm32/smallnsh/defconfig +++ b/configs/olimexino-stm32/smallnsh/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y CONFIG_STACK_COLORATION=y +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -204,6 +206,7 @@ CONFIG_ARCH_CHIP_STM32F103RB=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -421,6 +424,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y CONFIG_STM32_FORCEPOWER=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_PWM is not set # CONFIG_STM32_TIM3_PWM is not set # CONFIG_STM32_TIM1_CAP is not set @@ -434,9 +441,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# CONFIG_SERIAL_DISABLE_REORDERING=y # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -684,6 +699,7 @@ CONFIG_CAN=y CONFIG_CAN_FIFOSIZE=8 CONFIG_CAN_NPENDINGRTR=4 # CONFIG_CAN_TXREADY is not set +CONFIG_CAN_NPOLLWAITERS=2 # CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set # CONFIG_ARCH_HAVE_PWM_MULTICHAN is not set # CONFIG_PWM is not set @@ -697,6 +713,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -711,7 +729,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -719,6 +742,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -730,6 +754,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -780,15 +806,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -826,12 +855,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -904,6 +927,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -953,10 +977,10 @@ CONFIG_EXAMPLES_CAN_READWRITE=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -966,17 +990,17 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_NSH_CXXINITIALIZE is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -984,17 +1008,17 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -1016,8 +1040,8 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1139,20 +1163,20 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_STACKMONITOR is not set +# CONFIG_SYSTEM_SUDOKU is not set # CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/olimexino-stm32/src/stm32_can.c b/configs/olimexino-stm32/src/stm32_can.c index 00e5c374de2efb6d492fd38bc9f2c8a1b5f13ebf..483d561f9f1fd28d5dc89ea5d2cfde6dc2a2b85d 100644 --- a/configs/olimexino-stm32/src/stm32_can.c +++ b/configs/olimexino-stm32/src/stm32_can.c @@ -64,25 +64,6 @@ #define CAN_PORT 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 - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -111,7 +92,7 @@ int board_can_initialize(void) can = stm32_caninitialize(CAN_PORT); if (can == NULL) { - candbg("ERROR: Failed to get CAN interface\n"); + canerr("ERROR: Failed to get CAN interface\n"); return -ENODEV; } @@ -120,7 +101,7 @@ int board_can_initialize(void) ret = can_register("/dev/can0", can); if (ret < 0) { - candbg("ERROR: can_register failed: %d\n", ret); + canerr("ERROR: can_register failed: %d\n", ret); return ret; } diff --git a/configs/olimexino-stm32/src/stm32_leds.c b/configs/olimexino-stm32/src/stm32_leds.c index 4e41af6ad3836125ee844cb09a26db52a6194c1c..0440162844361dd094b3bdd8b0ad413d3e4d1a9e 100644 --- a/configs/olimexino-stm32/src/stm32_leds.c +++ b/configs/olimexino-stm32/src/stm32_leds.c @@ -54,25 +54,9 @@ * 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 -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /* Dump GPIO registers */ -#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_LEDS) +#ifdef CONFIG_DEBUG_LEDS_INFO # define led_dumpgpio(m) stm32_dumpgpio(GPIO_LED_GREEN, m) #else # define led_dumpgpio(m) diff --git a/configs/olimexino-stm32/src/stm32_spi.c b/configs/olimexino-stm32/src/stm32_spi.c index 59dc0db8922c21826bb96532cca8e5d7e70014ae..249a3b39d84866726f46bc4bcec325cc2d95a8c4 100644 --- a/configs/olimexino-stm32/src/stm32_spi.c +++ b/configs/olimexino-stm32/src/stm32_spi.c @@ -55,32 +55,6 @@ #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -135,7 +109,7 @@ void weak_function stm32_spidev_initialize(void) #ifdef CONFIG_STM32_SPI1 void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); if (devid == SPIDEV_USER) { stm32_gpiowrite(USER_CSn, !selected); @@ -151,7 +125,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI2 void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #if defined(CONFIG_MMCSD) if (devid == SPIDEV_MMCSD) { @@ -171,7 +145,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI3 void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) diff --git a/configs/olimexino-stm32/src/stm32_usbdev.c b/configs/olimexino-stm32/src/stm32_usbdev.c index 8e600c508fb6424f1c7fb1d30a2c861b41d10021..dd0846ae48ce2f913526e8cd4f04647efb4eb84a 100644 --- a/configs/olimexino-stm32/src/stm32_usbdev.c +++ b/configs/olimexino-stm32/src/stm32_usbdev.c @@ -90,7 +90,7 @@ void stm32_usb_set_pwr_callback(xcpt_t pwr_changed_handler) void stm32_usbinitialize(void) { - ulldbg("called\n"); + uinfo("called\n"); /* USB Soft Connect Pullup */ @@ -129,5 +129,5 @@ int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } diff --git a/configs/olimexino-stm32/tiny/defconfig b/configs/olimexino-stm32/tiny/defconfig index 4fe4bb5a90146f5ce194fc0fc6922daa68f04ad4..0e5679272c88b72cd20cc7d0574e2bd7c0926d60 100644 --- a/configs/olimexino-stm32/tiny/defconfig +++ b/configs/olimexino-stm32/tiny/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y CONFIG_STACK_COLORATION=y +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -204,6 +206,7 @@ CONFIG_ARCH_CHIP_STM32F103RB=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -421,6 +424,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y CONFIG_STM32_FORCEPOWER=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_PWM is not set # CONFIG_STM32_TIM3_PWM is not set # CONFIG_STM32_TIM1_CAP is not set @@ -434,9 +441,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# CONFIG_SERIAL_DISABLE_REORDERING=y CONFIG_STM32_FLOWCONTROL_BROKEN=y # CONFIG_STM32_USART_BREAKS is not set @@ -688,6 +703,7 @@ CONFIG_CAN=y CONFIG_CAN_FIFOSIZE=8 CONFIG_CAN_NPENDINGRTR=4 # CONFIG_CAN_TXREADY is not set +CONFIG_CAN_NPOLLWAITERS=2 # CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set # CONFIG_ARCH_HAVE_PWM_MULTICHAN is not set # CONFIG_PWM is not set @@ -701,6 +717,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -715,7 +733,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -723,6 +746,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -734,6 +758,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -782,15 +808,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -823,12 +852,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -901,6 +924,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -949,10 +973,10 @@ CONFIG_EXAMPLES_CAN_READWRITE=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LEDS is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -962,18 +986,18 @@ CONFIG_EXAMPLES_CAN_READWRITE=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -987,10 +1011,10 @@ CONFIG_EXAMPLES_CAN_READWRITE=y # 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_WEBSERVER is not set # # File System Utilities @@ -1012,8 +1036,8 @@ CONFIG_EXAMPLES_CAN_READWRITE=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1047,20 +1071,20 @@ CONFIG_EXAMPLES_CAN_READWRITE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set # CONFIG_READLINE_HAVE_EXTMATCH is not set 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_STACKMONITOR is not set +# CONFIG_SYSTEM_SUDOKU is not set # CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/open1788/README.txt b/configs/open1788/README.txt index 7d46f0e5cdf6374991452f93a484f05799d24b87..8edd78ab132984fa8f4abf68abf28deeef87d79d 100644 --- a/configs/open1788/README.txt +++ b/configs/open1788/README.txt @@ -438,8 +438,8 @@ CONFIGURATION debug output can be enabled with: Build Setup: - CONFIG_DEBUG=y : Enable debug features - CONFIG_DEBUG_VERBOSE=y : Enable verbose debug output + CONFIG_DEBUG_FEATURES=y : Enable debug features + CONFIG_DEBUG_INFO=y : Enable verbose debug output CONFIG_DEBUG_INPUT=y : Enable debug output from input devices c) You will also have to disable SD card support to use this test. The @@ -463,8 +463,8 @@ CONFIGURATION For touchscreen debug output: Build Setup: - CONFIG_DEBUG=y - CONFIG_DEBUG_VERBOSE=y + CONFIG_DEBUG_FEATURES=y + CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INPUT=y 7. The button test (apps/examples/buttons) can be built-in by adding diff --git a/configs/open1788/knsh/defconfig b/configs/open1788/knsh/defconfig index 566df000ae0a47916c5a85ba1d6baf3473227643..aa2c88fd4a933d6e5d6c631134f53974e9ecd74d 100644 --- a/configs/open1788/knsh/defconfig +++ b/configs/open1788/knsh/defconfig @@ -42,12 +42,15 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y @@ -77,11 +80,14 @@ CONFIG_ARCH="arm" # 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=y # CONFIG_ARCH_CHIP_LPC214X is not set # CONFIG_ARCH_CHIP_LPC2378 is not set @@ -90,35 +96,63 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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=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="lpc17xx" +# 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=y CONFIG_ARM_MPU_NREGIONS=8 # # 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=y # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set # CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL is not set CONFIG_ARMV7M_OABI_TOOLCHAIN=y +# CONFIG_ARMV7M_HAVE_STACKCHECK is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set # CONFIG_GPIO_IRQ is not set +# CONFIG_SERIAL_TERMIOS is not set # # LPC17xx Configuration Options @@ -196,13 +230,11 @@ CONFIG_LPC17_GPDMA=y # # Serial driver options # -# CONFIG_SERIAL_TERMIOS is not set # # SDIO Configuration # CONFIG_SDIO_DMA=y -CONFIG_SDIO_DMAPRIO=0x0 # CONFIG_SDIO_WIDTH_D1_ONLY is not set # @@ -216,11 +248,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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=y # CONFIG_ARCH_IRQPRIO is not set CONFIG_ARCH_STACKDUMP=y @@ -282,6 +317,7 @@ CONFIG_NSH_MMCSDSLOTNO=0 # # Board-Specific Options # +# CONFIG_LIB_BOARDCTL is not set # # RTOS Features @@ -311,8 +347,12 @@ 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 @@ -346,6 +386,7 @@ CONFIG_NAME_MAX=32 # RTOS hooks # CONFIG_BOARD_INITIALIZE=y +# CONFIG_BOARD_INITTHREAD is not set # CONFIG_SCHED_STARTHOOK is not set # CONFIG_SCHED_ATEXIT is not set # CONFIG_SCHED_ONEXIT is not set @@ -364,6 +405,17 @@ CONFIG_SIG_SIGWORK=17 # 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 @@ -392,20 +444,39 @@ CONFIG_DEV_LOOP=y # 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_TIMER is not set # CONFIG_ANALOG is not set # CONFIG_AUDIO_DEVICES is not set # CONFIG_VIDEO_DEVICES is not set CONFIG_BCH=y # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -413,11 +484,14 @@ CONFIG_MMCSD_NSLOTS=1 CONFIG_MMCSD_MMCSUPPORT=y CONFIG_MMCSD_HAVECARDDETECT=y CONFIG_ARCH_HAVE_SDIO=y +# CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set CONFIG_MMCSD_SDIO=y # CONFIG_SDIO_PREFLIGHT is not set # CONFIG_SDIO_MUXBUS is not set CONFIG_SDIO_BLOCKSETUP=y +# CONFIG_MODEM is not set # CONFIG_MTD is not set +# CONFIG_EEPROM is not set CONFIG_PIPES=y # CONFIG_PM is not set # CONFIG_POWER is not set @@ -425,6 +499,8 @@ CONFIG_PIPES=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -447,13 +523,15 @@ CONFIG_UART0_SERIALDRIVER=y # CONFIG_USART6_SERIALDRIVER is not set # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set - -# -# USART Configuration -# +# 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_UART0_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set # CONFIG_NO_SERIAL_CONSOLE is not set # @@ -467,20 +545,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -506,23 +587,23 @@ CONFIG_UART0_2STOP=0 # CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set CONFIG_FS_READABLE=y CONFIG_FS_WRITABLE=y +# CONFIG_FS_NAMED_SEMAPHORES is not set +CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_RAMMAP is not set CONFIG_FS_FAT=y 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_PROCFS is not set - -# -# System Logging -# - -# CONFIG_SYSLOG is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -545,7 +626,11 @@ CONFIG_MM_REGIONS=2 # CONFIG_AUDIO is not set # -# Binary Formats +# Wireless Support +# + +# +# Binary Loader # # CONFIG_BINFMT_DISABLE is not set # CONFIG_BINFMT_EXEPATH is not set @@ -569,6 +654,7 @@ CONFIG_LIB_HOMEDIR="/" # 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 @@ -579,21 +665,23 @@ 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_LIBC_TMPDIR="/tmp" +CONFIG_LIBC_MAX_TMPFILE=32 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_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 +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_USRWORK is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -609,26 +697,25 @@ CONFIG_SCHED_HPWORKSTACKSIZE=2048 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FSTEST 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_IGMP 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 @@ -636,75 +723,79 @@ CONFIG_SCHED_HPWORKSTACKSIZE=2048 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 # 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 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_UDP 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_WEBSERVER 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_MICROPYTHON is not set # CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # # 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 # CONFIG_NETUTILS_SMTP is not set -# CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_NETLIB is not set -# CONFIG_NETUTILS_WEBCLIENT is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -723,13 +814,16 @@ CONFIG_NSH_NESTDEPTH=3 # 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=y # 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 @@ -738,8 +832,10 @@ CONFIG_NSH_DISABLE_DD=y # 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=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 @@ -748,7 +844,9 @@ CONFIG_NSH_DISABLE_MKFATFS=y CONFIG_NSH_DISABLE_MKRD=y # 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=y # CONFIG_NSH_DISABLE_PUT is not set # CONFIG_NSH_DISABLE_PWD is not set # CONFIG_NSH_DISABLE_RM is not set @@ -756,8 +854,10 @@ CONFIG_NSH_DISABLE_MKRD=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 # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set @@ -785,6 +885,8 @@ CONFIG_NSH_FILEIOSIZE=512 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 @@ -798,112 +900,19 @@ CONFIG_NSH_CONSOLE=y # # System Libraries and NSH Add-Ons # - -# -# Custom Free Memory Command -# -# CONFIG_SYSTEM_FREE is not set - -# -# EMACS-like Command Line Editor -# # CONFIG_SYSTEM_CLE is not set - -# -# FLASH Program Installation -# -# CONFIG_SYSTEM_INSTALL is not set - -# -# FLASH Erase-all Command -# - -# -# Intel HEX to binary conversion -# +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set - -# -# I2C tool -# - -# -# INI File Parser -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# NxPlayer media player library / command Line -# -# CONFIG_SYSTEM_NXPLAYER is not set - -# -# RAM test -# +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set - -# -# readline() -# +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y - -# -# P-Code Support -# - -# -# PHY Tool -# - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sudoku -# +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set - -# -# Sysinfo -# - -# -# VI Work-Alike Editor -# +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set - -# -# Stack Monitor -# - -# -# USB CDC/ACM Device Commands -# - -# -# USB Composite Device Commands -# - -# -# USB Mass Storage Device Commands -# - -# -# USB Monitor -# - -# -# Zmodem Commands -# # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/open1788/nsh/defconfig b/configs/open1788/nsh/defconfig index 82a8f975de530fb4074c1ecce7709617365df42a..53981b180c8909d9ae55844047c77cb924585241 100644 --- a/configs/open1788/nsh/defconfig +++ b/configs/open1788/nsh/defconfig @@ -37,14 +37,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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 @@ -93,7 +96,9 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -104,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="lpc17xx" +# 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 # @@ -121,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -225,6 +242,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set CONFIG_ARCH_HAVE_MPU=y @@ -371,6 +389,7 @@ CONFIG_NAME_MAX=32 # 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 @@ -386,9 +405,10 @@ CONFIG_SIG_SIGWORK=17 # CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_HPWORK=y @@ -440,7 +460,21 @@ CONFIG_DEV_LOOP=y # CONFIG_VIDEO_DEVICES is not set CONFIG_BCH=y # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -453,6 +487,7 @@ CONFIG_MMCSD_SDIO=y # CONFIG_SDIO_PREFLIGHT is not set # CONFIG_SDIO_MUXBUS is not set # CONFIG_SDIO_BLOCKSETUP is not set +# CONFIG_MODEM is not set # CONFIG_MTD is not set # CONFIG_EEPROM is not set CONFIG_PIPES=y @@ -462,6 +497,8 @@ CONFIG_PIPES=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -485,10 +522,6 @@ CONFIG_UART0_SERIALDRIVER=y # 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 @@ -516,15 +549,18 @@ CONFIG_UART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -558,7 +594,9 @@ 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 @@ -567,12 +605,6 @@ CONFIG_FS_ROMFS=y # 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 # @@ -591,6 +623,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -636,12 +672,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -667,6 +706,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 @@ -675,10 +715,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -687,17 +727,18 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD 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 @@ -705,22 +746,30 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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 # CONFIG_EXAMPLES_TIFF is not set # 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 +# CONFIG_EXAMPLES_WEBSERVER 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 @@ -733,8 +782,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -744,7 +793,9 @@ CONFIG_EXAMPLES_NSH=y # # 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 @@ -753,6 +804,7 @@ CONFIG_EXAMPLES_NSH=y # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -790,8 +842,10 @@ CONFIG_NSH_DISABLE_DATE=y # 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 @@ -810,6 +864,7 @@ CONFIG_NSH_DISABLE_DATE=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 @@ -840,6 +895,8 @@ CONFIG_NSH_FILEIOSIZE=512 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 @@ -853,13 +910,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -867,5 +923,6 @@ 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/open1788/nxlines/defconfig b/configs/open1788/nxlines/defconfig index 486cc41cb0fa82694644f24e60af1a9909094363..38f0eb053d316590665fea4a3fcb239689c034ff 100644 --- a/configs/open1788/nxlines/defconfig +++ b/configs/open1788/nxlines/defconfig @@ -7,6 +7,7 @@ # 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 @@ -16,6 +17,7 @@ CONFIG_HOST_LINUX=y # Build Configuration # # CONFIG_APPS_DIR="../apps" +CONFIG_BUILD_FLAT=y # CONFIG_BUILD_2PASS is not set # @@ -25,20 +27,31 @@ CONFIG_HOST_LINUX=y CONFIG_INTELHEX_BINARY=y # CONFIG_MOTOROLA_SREC is not set # CONFIG_RAW_BINARY is not set +# 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_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set +CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK 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 @@ -58,39 +71,82 @@ 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=y # 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_SAM3U 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=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="lpc17xx" +# 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_ARCH_HAVE_MPU=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 # # 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=y # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set # CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL is not set CONFIG_ARMV7M_OABI_TOOLCHAIN=y +# CONFIG_ARMV7M_HAVE_STACKCHECK is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set # CONFIG_GPIO_IRQ is not set +# CONFIG_SERIAL_TERMIOS is not set # # LPC17xx Configuration Options @@ -117,7 +173,6 @@ CONFIG_ARMV7M_OABI_TOOLCHAIN=y # CONFIG_ARCH_CHIP_LPC1787 is not set CONFIG_ARCH_CHIP_LPC1788=y CONFIG_ARCH_FAMILY_LPC178X=y -CONFIG_ARCH_HAVE_SDIO=y # # LPC17xx Peripheral Support @@ -162,17 +217,31 @@ CONFIG_LPC17_GPDMA=y # CONFIG_LPC17_FLASH is not set # CONFIG_LPC17_EEPROM is not set +# +# External Memory Configuration +# +CONFIG_ARCH_HAVE_EXTNAND=y +CONFIG_ARCH_HAVE_EXTNOR=y +CONFIG_ARCH_HAVE_EXTDRAM=y +CONFIG_ARCH_HAVE_EXTSRAM0=y +# CONFIG_LPC17_EXTNAND is not set +# CONFIG_LPC17_EXTNOR is not set +CONFIG_LPC17_EXTDRAM=y +CONFIG_LPC17_EXTDRAMSIZE=67108864 +# CONFIG_LPC17_SDRAM_8BIT is not set +CONFIG_LPC17_SDRAM_16BIT=y +# CONFIG_LPC17_SDRAM_32BIT is not set +CONFIG_LPC17_EXTDRAMHEAP=y +# CONFIG_LPC17_EXTSRAM0 is not set + # # Serial driver options # -# CONFIG_SERIAL_TERMIOS is not set -# CONFIG_UART0_FLOWCONTROL is not set # # SDIO Configuration # # CONFIG_SDIO_DMA is not set -CONFIG_SDIO_DMAPRIO=0x0 # CONFIG_SDIO_WIDTH_D1_ONLY is not set # @@ -200,31 +269,30 @@ CONFIG_LPC17_LCD_VPULSE=2 CONFIG_LPC17_LCD_VFRONTPORCH=8 CONFIG_LPC17_LCD_VBACKPORCH=8 -# -# External Memory Configuration -# -CONFIG_ARCH_HAVE_EXTNAND=y -CONFIG_ARCH_HAVE_EXTNOR=y -CONFIG_ARCH_HAVE_EXTDRAM=y -CONFIG_ARCH_HAVE_EXTSRAM0=y -# CONFIG_LPC17_EXTNAND is not set -# CONFIG_LPC17_EXTNOR is not set -CONFIG_LPC17_EXTDRAM=y -CONFIG_LPC17_EXTDRAMSIZE=67108864 -CONFIG_LPC17_EXTDRAMHEAP=y -# CONFIG_LPC17_EXTSRAM0 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_IRQPRIO is not set -# CONFIG_ARCH_ADDRENV is not set +CONFIG_ARCH_DMA=y +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 @@ -234,10 +302,14 @@ CONFIG_ARCH_HAVE_RAMVECTORS=y # CONFIG_BOARD_LOOPSPERMSEC=11934 # CONFIG_ARCH_CALIBRATION is not set -CONFIG_RAM_START=0x10000000 -CONFIG_RAM_SIZE=65536 + +# +# 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 @@ -248,6 +320,14 @@ CONFIG_BOOT_RUNFROMFLASH=y # CONFIG_BOOT_RUNFROMSDRAM is not set # CONFIG_BOOT_COPYTORAM is not set +# +# Boot Memory Configuration +# +CONFIG_RAM_START=0x10000000 +CONFIG_RAM_SIZE=65536 +CONFIG_ARCH_HAVE_SDRAM=y +# CONFIG_BOOT_SDRAM_DATA is not set + # # Board Selection # @@ -267,37 +347,79 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # # Board-Specific Options # +# CONFIG_LIB_BOARDCTL is not set # # RTOS Features # -# CONFIG_BOARD_INITIALIZE is not set +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_RR_INTERVAL=200 -# CONFIG_SCHED_INSTRUMENTATION is not set -CONFIG_TASK_NAME_SIZE=0 -# CONFIG_SCHED_HAVE_PARENT is not set +# CONFIG_SYSTEM_TIME64 is not set +# CONFIG_CLOCK_MONOTONIC is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=3 CONFIG_START_DAY=4 -CONFIG_DEV_CONSOLE=y +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="nxlines_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_PRIORITY_INHERITANCE 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_SCHED_WAITPID=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_USER_ENTRYPOINT="nxlines_main" -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 +# CONFIG_SIG_EVTHREAD is not set # # Signal Numbers @@ -309,19 +431,21 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 CONFIG_SIG_SIGWORK=17 # -# Sizes of configurable things (0 disables) +# POSIX Message Queue Options # -CONFIG_MAX_TASKS=16 -CONFIG_NPTHREAD_KEYS=4 -CONFIG_NFILE_DESCRIPTORS=8 -CONFIG_NFILE_STREAMS=8 -CONFIG_NAME_MAX=32 CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 -CONFIG_MAX_WDOGPARMS=2 -CONFIG_PREALLOC_WDOGS=4 -CONFIG_WDOG_INTRESERVE=0 -CONFIG_PREALLOC_TIMERS=4 +# 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 @@ -330,6 +454,7 @@ 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 @@ -338,27 +463,63 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set CONFIG_DEV_LOOP=y + +# +# 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=y # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set # CONFIG_MMCSD_MULTIBLOCK_DISABLE is not set CONFIG_MMCSD_MMCSUPPORT=y CONFIG_MMCSD_HAVECARDDETECT=y +CONFIG_ARCH_HAVE_SDIO=y +# CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set CONFIG_MMCSD_SDIO=y +# CONFIG_SDIO_PREFLIGHT is not set # CONFIG_SDIO_MUXBUS is not set # CONFIG_SDIO_BLOCKSETUP is not set +# CONFIG_MODEM is not set # CONFIG_MTD is not set +# CONFIG_EEPROM is not set CONFIG_PIPES=y # CONFIG_PM is not set # CONFIG_POWER is not set @@ -366,12 +527,40 @@ CONFIG_PIPES=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_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 CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y -CONFIG_CONFIG_SERIAL_NPOLLWAITERS=2 +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_UART0_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set # CONFIG_NO_SERIAL_CONSOLE is not set # @@ -383,24 +572,38 @@ CONFIG_UART0_BAUD=115200 CONFIG_UART0_BITS=8 CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 +# CONFIG_UART0_IFLOWCONTROL is not set +# CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE 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 # @@ -409,29 +612,38 @@ CONFIG_UART0_2STOP=0 # 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=y +# CONFIG_FS_NAMED_SEMAPHORES is not set +CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_RAMMAP is not set CONFIG_FS_FAT=y 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 is not set - -# -# System Logging -# - -# CONFIG_SYSLOG is not set +# CONFIG_FS_PROCFS is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support # CONFIG_NX=y 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 @@ -449,15 +661,16 @@ CONFIG_NX_PACKEDMSFIRST=y # Input Devices # # CONFIG_NX_XYINPUT is not set +CONFIG_NX_XYINPUT_NONE=y +# CONFIG_NX_XYINPUT_MOUSE is not set +# CONFIG_NX_XYINPUT_TOUCHSCREEN is not set # CONFIG_NX_KBD is not set # # Framed Window Borders # CONFIG_NXTK_BORDERWIDTH=4 -CONFIG_NXTK_BORDERCOLOR1=0 -CONFIG_NXTK_BORDERCOLOR2=0 -CONFIG_NXTK_BORDERCOLOR3=0 +CONFIG_NXTK_DEFAULT_BORDERCOLORS=y # CONFIG_NXTK_AUTORAISE is not set # @@ -482,6 +695,30 @@ CONFIG_NXFONT_SANS28X37B=y # CONFIG_NXFONT_SERIF22X28B is not set # CONFIG_NXFONT_SERIF27X38B is not set # CONFIG_NXFONT_SERIF38X49B is not set +# CONFIG_NXFONT_PIXEL_UNICODE is not set +# CONFIG_NXFONT_PIXEL_LCD_MACHINE is not set +# CONFIG_NXFONT_X11_MISC_FIXED_4X6 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_5X7 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_5X8 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_6X9 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_6X10 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_6X12 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_6X13 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_6X13B is not set +# CONFIG_NXFONT_X11_MISC_FIXED_6X13O is not set +# CONFIG_NXFONT_X11_MISC_FIXED_7X13 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_7X13B is not set +# CONFIG_NXFONT_X11_MISC_FIXED_7X13O is not set +# CONFIG_NXFONT_X11_MISC_FIXED_7X14 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_7X14B is not set +# CONFIG_NXFONT_X11_MISC_FIXED_8X13 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_8X13B is not set +# CONFIG_NXFONT_X11_MISC_FIXED_8X13O is not set +# CONFIG_NXFONT_X11_MISC_FIXED_9X15 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_9X15B is not set +# CONFIG_NXFONT_X11_MISC_FIXED_9X18 is not set +# CONFIG_NXFONT_X11_MISC_FIXED_9X18B is not set +# CONFIG_NXFONT_X11_MISC_FIXED_10X20 is not set # CONFIG_NXTERM is not set # @@ -494,10 +731,20 @@ CONFIG_NXFONT_SANS28X37B=y # # CONFIG_MM_SMALL is not set CONFIG_MM_REGIONS=2 +# CONFIG_ARCH_HAVE_HEAP2 is not set # CONFIG_GRAN is not set # -# Binary Formats +# Audio Support +# +# CONFIG_AUDIO is not set + +# +# Wireless Support +# + +# +# Binary Loader # # CONFIG_BINFMT_DISABLE is not set # CONFIG_BINFMT_EXEPATH is not set @@ -522,6 +769,8 @@ CONFIG_LIB_HOMEDIR="/" # 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 @@ -531,21 +780,25 @@ 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_LIBC_TMPDIR="/tmp" +CONFIG_LIBC_MAX_TMPFILE=32 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_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 +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set +# CONFIG_LIB_SLCDCODEC is not set # # Basic CXX Support @@ -562,103 +815,111 @@ CONFIG_SCHED_HPWORKSTACKSIZE=2048 # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # Examples # -# CONFIG_EXAMPLES_BUTTONS is not set -# CONFIG_EXAMPLES_CAN is not set -# CONFIG_SYSTEM_COMPOSITE is not set +# 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_FSTEST 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_LCDRW is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set +# CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set -# CONFIG_EXAMPLES_MOUNT is not set # CONFIG_EXAMPLES_MODBUS is not set +# CONFIG_EXAMPLES_MOUNT is not set +# CONFIG_EXAMPLES_NRF24L01TERM is not set # CONFIG_EXAMPLES_NSH is not set # 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set CONFIG_EXAMPLES_NXLINES=y CONFIG_EXAMPLES_NXLINES_VPLANE=0 CONFIG_EXAMPLES_NXLINES_DEVNO=0 -CONFIG_EXAMPLES_NXLINES_BGCOLOR=0x00006400 +CONFIG_EXAMPLES_NXLINES_DEFAULT_COLORS=y CONFIG_EXAMPLES_NXLINES_LINEWIDTH=16 -CONFIG_EXAMPLES_NXLINES_LINECOLOR=0x00ffff00 CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=16 -CONFIG_EXAMPLES_NXLINES_BORDERCOLOR=0x00ffff00 -CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR=0x00f5f5dc CONFIG_EXAMPLES_NXLINES_BPP=32 -# CONFIG_EXAMPLES_NXLINES_EXTERNINIT is not set +# CONFIG_EXAMPLES_NXTERM is not set # CONFIG_EXAMPLES_NXTEXT is not set # CONFIG_EXAMPLES_OSTEST is not set -# CONFIG_EXAMPLES_PASHELLO is not set +# CONFIG_EXAMPLES_PCA9635 is not set # CONFIG_EXAMPLES_PIPE is not set # CONFIG_EXAMPLES_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 +# 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 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_UDP is not set -# CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_SYSTEM_USBMSC is not set +# CONFIG_EXAMPLES_UNIONFS is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER 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_MICROPYTHON is not set # CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # +# CONFIG_NETUTILS_CHAT is not set # 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 -# CONFIG_NETDB_DNSCLIENT is not set # CONFIG_NETUTILS_SMTP is not set -# CONFIG_NETUTILS_TELNETD is not set -# CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_NETLIB is not set -# CONFIG_NETUTILS_WEBCLIENT is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library @@ -670,51 +931,26 @@ CONFIG_EXAMPLES_NXLINES_BPP=32 # # -# System NSH Add-Ons +# Platform-specific Support # +# CONFIG_PLATFORM_CONFIGDATA is not set # -# Custom Free Memory Command +# System Libraries and NSH Add-Ons # +# CONFIG_SYSTEM_CLE is not set +# CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set - -# -# I2C tool -# - -# -# FLASH Program Installation -# +# CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set # CONFIG_SYSTEM_INSTALL is not set - -# -# RAM Test -# # CONFIG_SYSTEM_RAMTEST is not set - -# -# readline() -# +# CONFIG_READLINE_HAVE_EXTMATCH is not set CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sysinfo -# - -# -# USB Monitor -# +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set +# CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_VI is not set +# CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/open1788/src/lpc17_autoleds.c b/configs/open1788/src/lpc17_autoleds.c index b2d5f997c309acde1e12e8cd951e23341f717c87..e49b76867770fdb4e05ed422a901e0dce0d6dae3 100644 --- a/configs/open1788/src/lpc17_autoleds.c +++ b/configs/open1788/src/lpc17_autoleds.c @@ -134,25 +134,9 @@ #define LED_IDLE_OFF_SETBITS ((OPEN1788_LED4) << OFF_SETBITS_SHIFT) #define LED_IDLE_OFF_CLRBITS ((0) << OFF_CLRBITS_SHIFT) -/* CONFIG_DEBUG_LEDS enables debug output from this file (needs CONFIG_DEBUG - * with CONFIG_DEBUG_VERBOSE too) - */ - -#ifdef CONFIG_DEBUG_LEDS -# define leddbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /* Dump GPIO registers */ -#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_LEDS) +#ifdef CONFIG_DEBUG_LEDS_INFO # define led_dumpgpio(m) lpc17_dumpgpio(???, m) #else # define led_dumpgpio(m) diff --git a/configs/open1788/src/lpc17_ssp.c b/configs/open1788/src/lpc17_ssp.c index 033d7933f14da0896d9e1825cebbf06d0aa95c10..600b04474da768b4f30635f8b8761af397586694 100644 --- a/configs/open1788/src/lpc17_ssp.c +++ b/configs/open1788/src/lpc17_ssp.c @@ -61,40 +61,14 @@ * Pre-processor Definitions ****************************************************************************/ -/* Debug ********************************************************************/ - -#ifdef CONFIG_DEBUG_SPI -# define sspdbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define sspvdbg lldbg -# else -# define sspvdbg(x...) -# endif -#else -# define sspdbg(x...) -# define sspvdbg(x...) -#endif - /* Dump GPIO registers */ -#ifdef CONFIG_DEBUG_VERBOSE +#ifdef CONFIG_DEBUG_GPIO_INFO # define ssp_dumpgpio(p,m) lpc17_dumpgpio(p,m) #else # define ssp_dumpgpio(p,m) #endif -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -158,12 +132,12 @@ void weak_function open1788_sspdev_initialize(void) #ifdef CONFIG_LPC17_SSP0 void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - sspdbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - sspdbg("Returning nothing\n"); + spiinfo("Returning nothing\n"); return 0; } #endif @@ -171,7 +145,7 @@ uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_LPC17_SSP1 void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - sspdbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); if (devid == SPIDEV_TOUCHSCREEN) { /* Assert/de-assert the CS pin to the touchscreen */ @@ -184,7 +158,7 @@ void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - sspdbg("Returning nothing\n"); + spiinfo("Returning nothing\n"); return 0; } #endif @@ -192,12 +166,12 @@ uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_LPC17_SSP2 void lpc17_ssp2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - sspdbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t lpc17_ssp2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - sspdbg("Returning nothing\n"); + spiinfo("Returning nothing\n"); return 0; } #endif diff --git a/configs/open1788/src/lpc17_touchscreen.c b/configs/open1788/src/lpc17_touchscreen.c index 933fc3c3a51f50ff557f7349c85e56c6d5bd35b6..1d1af3ff8bcec5e86582c3ee3bdcf92403709860 100644 --- a/configs/open1788/src/lpc17_touchscreen.c +++ b/configs/open1788/src/lpc17_touchscreen.c @@ -175,7 +175,7 @@ static int tsc_attach(FAR struct ads7843e_config_s *state, xcpt_t handler) static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable) { - ivdbg("enable:%d\n", enable); + iinfo("enable:%d\n", enable); if (enable) { /* Enable PENIRQ interrupts. NOTE: The pin interrupt is enabled from worker thread @@ -217,17 +217,17 @@ static bool tsc_busy(FAR struct ads7843e_config_s *state) #else /* XPT2046_NO_BUSY */ -#if defined(CONFIG_DEBUG_INPUT) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_INPUT) && defined(CONFIG_DEBUG_INFO) static bool last = (bool)-1; #endif /* REVISIT: This might need to be inverted */ bool busy = lpc17_gpioread(GPIO_TC_BUSY); -#if defined(CONFIG_DEBUG_INPUT) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_INPUT) && defined(CONFIG_DEBUG_INFO) if (busy != last) { - ivdbg("busy:%d\n", busy); + iinfo("busy:%d\n", busy); last = busy; } #endif @@ -245,7 +245,7 @@ static bool tsc_pendown(FAR struct ads7843e_config_s *state) */ bool pendown = !lpc17_gpioread(GPIO_TC_PENIRQ); - ivdbg("pendown:%d\n", pendown); + iinfo("pendown:%d\n", pendown); return pendown; } @@ -277,7 +277,7 @@ int board_tsc_setup(int minor) FAR struct spi_dev_s *dev; int ret; - idbg("initialized:%d minor:%d\n", initialized, minor); + iinfo("initialized:%d minor:%d\n", initialized, minor); DEBUGASSERT(minor == 0); /* Since there is no uninitialized logic, this initialization can be @@ -301,7 +301,7 @@ int board_tsc_setup(int minor) dev = lpc17_sspbus_initialize(CONFIG_ADS7843E_SPIDEV); if (!dev) { - idbg("Failed to initialize SPI bus %d\n", CONFIG_ADS7843E_SPIDEV); + ierr("ERROR: Failed to initialize SPI bus %d\n", CONFIG_ADS7843E_SPIDEV); return -ENODEV; } @@ -310,7 +310,7 @@ int board_tsc_setup(int minor) ret = ads7843e_register(dev, &g_tscinfo, CONFIG_ADS7843E_DEVMINOR); if (ret < 0) { - idbg("Failed to register touchscreen device minor=%d\n", + ierr("ERROR: Failed to register touchscreen device minor=%d\n", CONFIG_ADS7843E_DEVMINOR); /* up_spiuninitialize(dev); */ return -ENODEV; diff --git a/configs/open1788/src/lpc17_userleds.c b/configs/open1788/src/lpc17_userleds.c index 077cdc994abca4d930431d300f67144969e061e8..f8e350dd120dedfe820cc7d918fa10cfe62e4c6d 100644 --- a/configs/open1788/src/lpc17_userleds.c +++ b/configs/open1788/src/lpc17_userleds.c @@ -60,25 +60,9 @@ * 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 -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /* Dump GPIO registers */ -#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_LEDS) +#ifdef CONFIG_DEBUG_LEDS_INFO # define led_dumpgpio(m) lpc17_dumpgpio(???, m) #else # define led_dumpgpio(m) diff --git a/configs/p112/ostest/defconfig b/configs/p112/ostest/defconfig index 4e2ebbff0839dba585f7d18b62b4b4800ba9e4e0..21e3034674667d10f88ef20fbd1c95e882b8bb14 100644 --- a/configs/p112/ostest/defconfig +++ b/configs/p112/ostest/defconfig @@ -43,7 +43,7 @@ CONFIG_WINDOWS_NATIVE=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_DEBUG_SYMBOLS is not set # @@ -306,7 +306,6 @@ CONFIG_DEV_LOWCONSOLE=y # # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/pcblogic-pic32mx/README.txt b/configs/pcblogic-pic32mx/README.txt index 50657c8cb1e42b066bde8540a2e712559127e3e1..c98882584b8c4930352cafbaaae2d7c24dd6fe00 100644 --- a/configs/pcblogic-pic32mx/README.txt +++ b/configs/pcblogic-pic32mx/README.txt @@ -626,8 +626,8 @@ Configuration sub-directories To enable LCD debug output: Build Setup: - CONFIG_DEBUG=y : Enable debug features - CONFIG_DEBUG_VERBOSE=y : Enable LCD debug + CONFIG_DEBUG_FEATURES=y : Enable debug features + CONFIG_DEBUG_INFO=y : Enable LCD debug NOTES: a. I do not have the LCD1602 working. I may just be getting lost in the diff --git a/configs/pcblogic-pic32mx/nsh/defconfig b/configs/pcblogic-pic32mx/nsh/defconfig index 7a3de04abac0b5ffcb7eb8da5fe74df56bc38475..0d6bffa7a9c54f03c1d692d1873aa0b05f1306d4 100644 --- a/configs/pcblogic-pic32mx/nsh/defconfig +++ b/configs/pcblogic-pic32mx/nsh/defconfig @@ -41,13 +41,15 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -266,12 +268,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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_IRQPRIO is not set CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set @@ -360,6 +364,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="nsh_main" CONFIG_RR_INTERVAL=0 +# CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=0 CONFIG_MAX_TASKS=16 # CONFIG_SCHED_HAVE_PARENT is not set @@ -410,9 +415,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -443,6 +449,7 @@ CONFIG_DEV_NULL=y # 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 @@ -460,8 +467,22 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -471,6 +492,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -494,14 +517,11 @@ CONFIG_UART1_SERIALDRIVER=y # 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_UART1_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -518,19 +538,23 @@ 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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -562,17 +586,12 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -591,6 +610,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -634,10 +657,13 @@ 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 is not set +# CONFIG_LIBC_NETDB is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -656,11 +682,14 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -668,11 +697,11 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -680,33 +709,44 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD 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_SMART_TEST 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -718,30 +758,28 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -761,6 +799,7 @@ 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 @@ -769,6 +808,7 @@ 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 @@ -777,8 +817,10 @@ CONFIG_NSH_DISABLE_DATE=y # 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 @@ -796,8 +838,10 @@ CONFIG_NSH_DISABLE_DATE=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 # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set @@ -824,6 +868,8 @@ CONFIG_NSH_FILEIOSIZE=512 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 @@ -837,15 +883,19 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/pcblogic-pic32mx/src/pic32mx_lcd1602.c b/configs/pcblogic-pic32mx/src/pic32mx_lcd1602.c index d63543eabecc02f6b151f81425021ab4c22730dc..4c4ca65951f0b7919ea51eaa642c07d7ed6605a6 100644 --- a/configs/pcblogic-pic32mx/src/pic32mx_lcd1602.c +++ b/configs/pcblogic-pic32mx/src/pic32mx_lcd1602.c @@ -102,20 +102,6 @@ # error "CONFIG_PIC32MX_PMP is required to use the LCD" #endif -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must - * also be enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif - /* The ever-present MIN/MAX macros ******************************************/ #ifndef MIN @@ -137,16 +123,6 @@ #define LCD_NCOLUMNS 16 #define LCD_NCHARS (LCD_NROWS * LCD_NCOLUMNS) -/* Debug ********************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /**************************************************************************** * Private Type Definition ****************************************************************************/ @@ -174,7 +150,7 @@ struct lcd1602_2 ****************************************************************************/ /* Debug */ -#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_LCD_INFO static void lcd_dumpstate(FAR const char *msg); static void lcd_dumpstream(FAR const char *msg, FAR const struct lcd_instream_s *stream); @@ -234,7 +210,7 @@ static struct lcd1602_2 g_lcd1602; * Name: lcd_dumpstate ****************************************************************************/ -#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_LCD_INFO static void lcd_dumpstate(FAR const char *msg) { uint8_t buffer[LCD_NCOLUMNS]; @@ -242,8 +218,8 @@ static void lcd_dumpstate(FAR const char *msg) int row; int column; - lcdvdbg("%s:\n", msg); - lcdvdbg(" currow: %d curcol: %d\n", + lcdinfo("%s:\n", msg); + lcdinfo(" currow: %d curcol: %d\n", g_lcd1602.currow, g_lcd1602.curcol); for (row = 0, column = 0; row < LCD_NROWS; ) @@ -252,7 +228,7 @@ static void lcd_dumpstate(FAR const char *msg) buffer[column] = isprint(ch) ? ch : '.'; if (++column >= LCD_NCOLUMNS) { - lcdvdbg(" [%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c]\n", + lcdinfo(" [%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c]\n", buffer[0], buffer[1], buffer[2], buffer[3], buffer[4], buffer[5], buffer[6], buffer[7], buffer[8], buffer[9], buffer[10], buffer[11], @@ -269,12 +245,12 @@ static void lcd_dumpstate(FAR const char *msg) * Name: lcd_dumpstate ****************************************************************************/ -#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_LCD_INFO static void lcd_dumpstream(FAR const char *msg, FAR const struct lcd_instream_s *stream) { - lcdvdbg("%s:\n", msg); - lcdvdbg(" nget: %d nbytes: %d\n", + lcdinfo("%s:\n", msg); + lcdinfo(" nget: %d nbytes: %d\n", stream->stream.nget, stream->nbytes); lib_dumpbuffer("STREAM", stream->buffer, stream->nbytes); } @@ -437,7 +413,7 @@ static void lcd_appendch(uint8_t ch) static void lcd_action(enum slcdcode_e code, uint8_t count) { - lcdvdbg("Action: %d count: %d\n", code, count); + lcdinfo("Action: %d count: %d\n", code, count); lcd_dumpstate("BEFORE ACTION"); switch (code) @@ -719,7 +695,7 @@ static ssize_t lcd_write(FAR struct file *filep, FAR const char *buffer, memset(&state, 0, sizeof(struct slcdstate_s)); while ((result = slcd_decode(&instream.stream, &state, &ch, &count)) != SLCDRET_EOF) { - lcdvdbg("slcd_decode returned result=%d char=%d count=%d\n", + lcdinfo("slcd_decode returned result=%d char=%d count=%d\n", result, ch, count); if (result == SLCDRET_CHAR) /* A normal character was returned */ @@ -796,7 +772,7 @@ static int lcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { FAR struct slcd_attributes_s *attr = (FAR struct slcd_attributes_s *)((uintptr_t)arg); - lcdvdbg("SLCDIOC_GETATTRIBUTES:\n"); + lcdinfo("SLCDIOC_GETATTRIBUTES:\n"); if (!attr) { @@ -822,7 +798,7 @@ static int lcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { FAR struct slcd_curpos_s *curpos = (FAR struct slcd_curpos_s *)((uintptr_t)arg); - lcdvdbg("SLCDIOC_CURPOS: row=%d column=%d\n", g_lcd1602.currow, g_lcd1602.curcol); + lcdinfo("SLCDIOC_CURPOS: row=%d column=%d\n", g_lcd1602.currow, g_lcd1602.curcol); if (!curpos) { @@ -890,7 +866,7 @@ int up_lcd1602_initialize(void) if (!g_lcd1602.initialized) { - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); /* PMP Master mode configuration */ /* Make sure that interrupts are disabled */ diff --git a/configs/pcduino-a10/nsh/defconfig b/configs/pcduino-a10/nsh/defconfig index 95833160ff638f2b72cad820f0ee9117c57d2148..3fbc6318cf001dd97007ae78ba645ebdf6221e1b 100644 --- a/configs/pcduino-a10/nsh/defconfig +++ b/configs/pcduino-a10/nsh/defconfig @@ -41,12 +41,15 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y @@ -76,11 +79,14 @@ CONFIG_ARCH_CHIP_A1X=y # 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 @@ -89,21 +95,40 @@ CONFIG_ARCH_CHIP_A1X=y # 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=y +# 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-a" CONFIG_ARCH_CHIP="a1x" +# 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 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 @@ -111,6 +136,9 @@ CONFIG_ARCH_LOWVECTORS=y # # ARMv7-A Configuration Options # +# CONFIG_ARMV7A_HAVE_GICv2 is not set +# CONFIG_ARMV7A_HAVE_GTM is not set +# CONFIG_ARMV7A_HAVE_PTM is not set # CONFIG_ARMV7A_HAVE_L2CC is not set # CONFIG_ARMV7A_HAVE_L2CC_PL310 is not set # CONFIG_ARMV7A_TOOLCHAIN_BUILDROOT is not set @@ -206,6 +234,7 @@ CONFIG_A1X_BOOT_SDCARD=y # CONFIG_A1X_BOOT_USB is not set CONFIG_A1X_DDR_MAPOFFSET=0 CONFIG_A1X_DDR_MAPSIZE=1073741824 +# CONFIG_SERIAL_TERMIOS is not set # # Architecture Options @@ -218,11 +247,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=y # CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set CONFIG_ARCH_HAVE_ADDRENV=y CONFIG_ARCH_NEED_ADDRENV_MAPPING=y +# CONFIG_ARCH_HAVE_MULTICPU is not set 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 @@ -283,6 +315,7 @@ CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_LIB_BOARDCTL is not set # # RTOS Features @@ -312,10 +345,12 @@ 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=31 CONFIG_MAX_TASKS=16 # CONFIG_SCHED_HAVE_PARENT is not set @@ -366,6 +401,14 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # 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 @@ -392,22 +435,43 @@ CONFIG_DEV_NULL=y # 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_TIMER 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -415,6 +479,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -437,13 +503,15 @@ CONFIG_UART0_SERIALDRIVER=y # CONFIG_USART6_SERIALDRIVER is not set # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set - -# -# USART Configuration -# +# 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_UART0_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set # CONFIG_NO_SERIAL_CONSOLE is not set # @@ -457,20 +525,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -496,24 +567,24 @@ CONFIG_UART0_2STOP=0 # CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set CONFIG_FS_READABLE=y CONFIG_FS_WRITABLE=y +# CONFIG_FS_NAMED_SEMAPHORES is not set +CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_RAMMAP is not set CONFIG_FS_FAT=y 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 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 - -# -# System Logging -# - -# CONFIG_SYSLOG is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -535,7 +606,11 @@ CONFIG_MM_REGIONS=1 # CONFIG_AUDIO is not set # -# Binary Formats +# Wireless Support +# + +# +# Binary Loader # # CONFIG_BINFMT_DISABLE is not set # CONFIG_NXFLAT is not set @@ -558,6 +633,7 @@ CONFIG_NUNGET_CHARS=2 # 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 @@ -568,15 +644,22 @@ 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_LIBC_TMPDIR="/tmp" +CONFIG_LIBC_MAX_TMPFILE=32 CONFIG_ARCH_LOWPUTC=y +# 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_SCHED_WORKQUEUE is not set +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -602,24 +685,29 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # 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 # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -628,75 +716,79 @@ 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 # 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_SMART_TEST 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_UDP 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_WEBSERVER 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_MICROPYTHON is not set # CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # # 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 # CONFIG_NETUTILS_SMTP is not set -# CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_NETLIB is not set -# CONFIG_NETUTILS_WEBCLIENT is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -716,13 +808,16 @@ 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 @@ -731,8 +826,10 @@ CONFIG_NSH_BUILTIN_APPS=y # 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 @@ -741,6 +838,7 @@ CONFIG_NSH_BUILTIN_APPS=y # 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 @@ -750,8 +848,10 @@ CONFIG_NSH_BUILTIN_APPS=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 # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set @@ -778,6 +878,8 @@ CONFIG_NSH_FILEIOSIZE=512 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 @@ -791,112 +893,19 @@ CONFIG_NSH_CONSOLE=y # # System Libraries and NSH Add-Ons # - -# -# Custom Free Memory Command -# -# CONFIG_SYSTEM_FREE is not set - -# -# EMACS-like Command Line Editor -# # CONFIG_SYSTEM_CLE is not set - -# -# FLASH Program Installation -# -# CONFIG_SYSTEM_INSTALL is not set - -# -# FLASH Erase-all Command -# - -# -# Intel HEX to binary conversion -# +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set - -# -# I2C tool -# - -# -# INI File Parser -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# NxPlayer media player library / command Line -# -# CONFIG_SYSTEM_NXPLAYER is not set - -# -# RAM test -# +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set - -# -# readline() -# +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y - -# -# P-Code Support -# - -# -# PHY Tool -# - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sudoku -# +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set - -# -# Sysinfo -# - -# -# VI Work-Alike Editor -# +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set - -# -# Stack Monitor -# - -# -# USB CDC/ACM Device Commands -# - -# -# USB Composite Device Commands -# - -# -# USB Mass Storage Device Commands -# - -# -# USB Monitor -# - -# -# Zmodem Commands -# # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/pcduino-a10/nsh/pcduino-140107.patch b/configs/pcduino-a10/nsh/pcduino-140107.patch index 1d0b6651844a8ab85b6d6eb82a0402c1d709f745..2dcd324a7d8f025f3695771b913901d7b9c8a68f 100644 --- a/configs/pcduino-a10/nsh/pcduino-140107.patch +++ b/configs/pcduino-a10/nsh/pcduino-140107.patch @@ -6,14 +6,14 @@ index 3cc6323..ad42790 100644 * for all IO regions (Including the vector region). */ -+lowsyslog(LOG_INFO, "Calling a1x_setupmappings\n"); // REMOVE ME ++syslog(LOG_INFO, "Calling a1x_setupmappings\n"); // REMOVE ME a1x_setupmappings(); /* Provide a special mapping for the IRAM interrupt vector positioned in * high memory. */ -+lowsyslog(LOG_INFO, "Calling a1x_vectormapping\n"); // REMOVE ME ++syslog(LOG_INFO, "Calling a1x_vectormapping\n"); // REMOVE ME a1x_vectormapping(); #endif /* CONFIG_ARCH_ROMPGTABLE */ @@ -21,19 +21,19 @@ index 3cc6323..ad42790 100644 * arm_vector.S */ -+lowsyslog(LOG_INFO, "Calling a1x_copyvectorblock\n"); // REMOVE ME ++syslog(LOG_INFO, "Calling a1x_copyvectorblock\n"); // REMOVE ME a1x_copyvectorblock(); /* Initialize the FPU */ #ifdef CONFIG_ARCH_FPU -+lowsyslog(LOG_INFO, "Calling arm_fpuconfig\n"); // REMOVE ME ++syslog(LOG_INFO, "Calling arm_fpuconfig\n"); // REMOVE ME arm_fpuconfig(); #endif /* Perform common, low-level chip initialization (might do nothing) */ -+lowsyslog(LOG_INFO, "Calling a1x_lowsetup\n"); // REMOVE ME ++syslog(LOG_INFO, "Calling a1x_lowsetup\n"); // REMOVE ME a1x_lowsetup(); /* Perform early serial initialization if we are going to use the serial @@ -41,7 +41,7 @@ index 3cc6323..ad42790 100644 */ #ifdef USE_EARLYSERIALINIT -+lowsyslog(LOG_INFO, "Calling up_earlyserialinit\n"); // REMOVE ME ++syslog(LOG_INFO, "Calling up_earlyserialinit\n"); // REMOVE ME up_earlyserialinit(); #endif @@ -49,7 +49,7 @@ index 3cc6323..ad42790 100644 */ #ifdef CONFIG_BUILD_PROTECTED -+lowsyslog(LOG_INFO, "Calling a1x_userspace\n"); // REMOVE ME ++syslog(LOG_INFO, "Calling a1x_userspace\n"); // REMOVE ME a1x_userspace(); #endif @@ -57,9 +57,9 @@ index 3cc6323..ad42790 100644 * - Configuration of board specific resources (PIOs, LEDs, etc). */ -+lowsyslog(LOG_INFO, "Calling a1x_boardinitialize\n"); // REMOVE ME ++syslog(LOG_INFO, "Calling a1x_boardinitialize\n"); // REMOVE ME a1x_boardinitialize(); -+lowsyslog(LOG_INFO, "Returning\n"); // REMOVE ME ++syslog(LOG_INFO, "Returning\n"); // REMOVE ME } diff --git a/nuttx/arch/arm/src/armv7-a/arm_head.S b/nuttx/arch/arm/src/armv7-a/arm_head.S index bce82d5..924bd24 100644 diff --git a/configs/pcduino-a10/src/a1x_leds.c b/configs/pcduino-a10/src/a1x_leds.c index 1801625f51668cc8b5f0642567a48b248526b182..4e2bc33ccd3e23c1558aa03cad85e599026f4734 100644 --- a/configs/pcduino-a10/src/a1x_leds.c +++ b/configs/pcduino-a10/src/a1x_leds.c @@ -52,9 +52,6 @@ #include "pcduino_a10.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ /* The pcDuino v1 has four green LEDs; three can be controlled from software. * Two are tied to ground and, hence, illuminated by driving the output pins * to a high value: @@ -90,26 +87,6 @@ * application if CONFIG_ARCH_LEDS is not defined. */ -/* 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/pic32mx-starterkit/README.txt b/configs/pic32mx-starterkit/README.txt index f89cf1466342999a406d716618e97bf890bd580e..62f1309a62ec1c825a3927bd890ec2f78dcdffa2 100644 --- a/configs/pic32mx-starterkit/README.txt +++ b/configs/pic32mx-starterkit/README.txt @@ -991,9 +991,9 @@ PIC32MX specific PHY/Ethernet device driver settings CONFIG_NET_NRXDESC - Configured number of Rx descriptors. Default: 4 CONFIG_NET_WOL - Enable Wake-up on Lan (not fully implemented). CONFIG_NET_DUMPPACKET - Dump all received and transmitted packets. - Also needs CONFIG_DEBUG. + Also needs CONFIG_DEBUG_FEATURES. CONFIG_NET_REGDEBUG - Enabled low level register debug. Also needs - CONFIG_DEBUG. + CONFIG_DEBUG_FEATURES. CONFIG_NET_HASH - Enable receipt of near-perfect match frames. CONFIG_PIC32MX_MULTICAST - Enable receipt of multicast (and unicast) frames. Automatically set if CONFIG_NET_IGMP is selected. @@ -1137,7 +1137,6 @@ Where is one of the following: 3. The RAM log is enabled" - CONFIG_SYSLOG=y : Enables the System Logging feature. CONFIG_RAMLOG=y : Enable the RAM-based logging feature. CONFIG_RAMLOG_CONSOLE=n : (there is no default console device) CONFIG_RAMLOG_SYSLOG=y : This enables the RAM-based logger as the diff --git a/configs/pic32mx-starterkit/nsh/defconfig b/configs/pic32mx-starterkit/nsh/defconfig index 34d57a29fdb7d34866555ec50c8c9a36d8f241cd..1586dd3bd39a770f91d49e37e405b14883a5bae2 100644 --- a/configs/pic32mx-starterkit/nsh/defconfig +++ b/configs/pic32mx-starterkit/nsh/defconfig @@ -41,13 +41,15 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -266,12 +268,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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_IRQPRIO is not set CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set @@ -329,6 +333,7 @@ CONFIG_NSH_MMCSDSLOTNO=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 @@ -368,6 +373,7 @@ 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 @@ -418,9 +424,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -451,6 +458,7 @@ CONFIG_DEV_NULL=y # 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 @@ -468,7 +476,21 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -477,6 +499,7 @@ CONFIG_MMCSD_MMCSUPPORT=y CONFIG_MMCSD_HAVECARDDETECT=y # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set CONFIG_MTD=y # @@ -485,6 +508,7 @@ CONFIG_MTD=y # CONFIG_MTD_PARTITION is not set # CONFIG_MTD_SECT512 is not set # CONFIG_MTD_BYTE_WRITE is not set +# CONFIG_MTD_PROGMEM is not set # CONFIG_MTD_CONFIG is not set # @@ -492,14 +516,19 @@ CONFIG_MTD=y # # CONFIG_MTD_NAND is not set # CONFIG_RAMMTD is not set +# CONFIG_FILEMTD is not set # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP 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 @@ -510,6 +539,8 @@ CONFIG_MTD=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -533,14 +564,11 @@ CONFIG_UART1_SERIALDRIVER=y # 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_UART1_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -557,19 +585,23 @@ 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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -603,20 +635,17 @@ 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 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 # @@ -635,6 +664,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -680,10 +713,14 @@ 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 is not set +# CONFIG_LIBC_NETDB is not set +# CONFIG_NETDB_HOSTFILE is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -702,23 +739,27 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # 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 # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -726,33 +767,47 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD 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_SMART_TEST 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_FLASH_ERASEALL is not set +# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_FSUTILS_PASSWD is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -765,30 +820,28 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -808,6 +861,7 @@ 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 @@ -816,6 +870,7 @@ 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 @@ -824,8 +879,10 @@ CONFIG_NSH_DISABLE_DATE=y # 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 @@ -844,8 +901,10 @@ CONFIG_NSH_DISABLE_DATE=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 # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set @@ -872,6 +931,8 @@ CONFIG_NSH_FILEIOSIZE=512 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 @@ -885,16 +946,20 @@ CONFIG_NSH_ARCHINIT=y # # 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_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/pic32mx-starterkit/nsh2/defconfig b/configs/pic32mx-starterkit/nsh2/defconfig index 60935ce1ac5e4ce4250758108012e455a2f3078e..d10280cc5c0f6878610a21fca039ff5648fd1cea 100644 --- a/configs/pic32mx-starterkit/nsh2/defconfig +++ b/configs/pic32mx-starterkit/nsh2/defconfig @@ -41,13 +41,15 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -77,7 +79,6 @@ CONFIG_NET_NRXDESC=7 CONFIG_NET_PRIORITY=28 # CONFIG_NET_WOL is not set # CONFIG_NET_HASH is not set -# CONFIG_PIC32MX_MULTICAST is not set CONFIG_ARCH_CHIP_PIC32MX=y # CONFIG_ARCH_CHIP_PIC32MZ is not set CONFIG_ARCH_MIPS32=y @@ -242,6 +243,7 @@ CONFIG_PIC32MX_T1PRIO=16 # # PIC32MX PHY/Ethernet device driver settings # +# CONFIG_PIC32MX_MULTICAST is not set # # Device Configuration 0 (DEVCFG0) @@ -276,6 +278,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # CONFIG_ARCH_HAVE_MPU is not set @@ -431,9 +434,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -482,7 +486,21 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -491,6 +509,7 @@ CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_HAVECARDDETECT is not set # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set CONFIG_MTD=y # @@ -511,12 +530,15 @@ CONFIG_MTD=y # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP 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 @@ -569,6 +591,8 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +# CONFIG_SERIAL_CONSOLE is not set # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -592,10 +616,6 @@ CONFIG_SERIAL=y # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set # CONFIG_OTHER_UART_SERIALDRIVER is not set - -# -# USART Configuration -# # CONFIG_MCU_SERIAL is not set # CONFIG_STANDARD_SERIAL is not set # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -606,21 +626,25 @@ CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set 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_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_RAMLOG_SYSLOG=y # CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -762,7 +786,9 @@ 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_NFS is not set # CONFIG_FS_NXFFS is not set # CONFIG_FS_ROMFS is not set @@ -772,13 +798,6 @@ CONFIG_FAT_MAXFNAME=32 # CONFIG_FS_PROCFS 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 # @@ -797,6 +816,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -842,6 +865,7 @@ 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 is not set CONFIG_LIBC_NETDB=y # CONFIG_NETDB_HOSTFILE is not set CONFIG_NETDB_DNSCLIENT=y @@ -849,12 +873,14 @@ CONFIG_NETDB_DNSCLIENT_ENTRIES=4 CONFIG_NETDB_DNSCLIENT_NAMESIZE=32 CONFIG_NETDB_DNSCLIENT_LIFESEC=3600 CONFIG_NETDB_DNSCLIENT_MAXRESPONSE=96 +# CONFIG_NETDB_RESOLVCONF is not set CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_NETDB_DNSSERVER_IPv4 is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -880,18 +906,20 @@ 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 +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -901,41 +929,50 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD 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_SMART_TEST 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_UDP is not set # 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_WEBSERVER is not set # CONFIG_EXAMPLES_XMLRPC is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set +# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_FSUTILS_PASSWD is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -948,8 +985,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -959,29 +996,32 @@ CONFIG_EXAMPLES_NSH=y # # Network Utilities # +# CONFIG_NETUTILS_CHAT is not set # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER 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 +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -1001,6 +1041,7 @@ CONFIG_NSH_BUILTIN_APPS=y # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_ARP is not set # CONFIG_NSH_DISABLE_BASENAME is not set # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set @@ -1043,6 +1084,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 @@ -1075,6 +1117,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1101,6 +1144,8 @@ CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048 CONFIG_NSH_TELNETD_CLIENTPRIO=100 CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048 CONFIG_NSH_IOBUFFER_SIZE=512 +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # CONFIG_NSH_TELNET_LOGIN is not set # @@ -1115,14 +1160,13 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1131,5 +1175,6 @@ 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/pic32mx-starterkit/src/pic32mx_leds.c b/configs/pic32mx-starterkit/src/pic32mx_leds.c index 0c29d08c53a37b5f711eb6abeec0f00ab406d944..671811631d317795654d19d84724d1cc2008523f 100644 --- a/configs/pic32mx-starterkit/src/pic32mx_leds.c +++ b/configs/pic32mx-starterkit/src/pic32mx_leds.c @@ -95,22 +95,6 @@ # define LED_NC 2 #endif -/* Debug ********************************************************************/ - -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_LEDS) -# define leddbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# undef CONFIG_DEBUG_LEDS -# undef CONFIG_DEBUG_VERBOSE -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /**************************************************************************** * Private types ****************************************************************************/ diff --git a/configs/pic32mx-starterkit/src/pic32mx_spi.c b/configs/pic32mx-starterkit/src/pic32mx_spi.c index a9e2df2e6adc1e8ea464a8d67b3afaad1b276494..4c0e2d2261e3412f3300dac1a033a6e107939564 100644 --- a/configs/pic32mx-starterkit/src/pic32mx_spi.c +++ b/configs/pic32mx-starterkit/src/pic32mx_spi.c @@ -54,33 +54,6 @@ #if defined(CONFIG_PIC32MX_SPI1) || defined(CONFIG_PIC32MX_SPI2) || \ defined(CONFIG_PIC32MX_SPI3) || defined(CONFIG_PIC32MX_SPI4) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* The following enable debug output from this file (needs CONFIG_DEBUG too). - * - * CONFIG_SPI_DEBUG - Define to enable basic SPI debug - * CONFIG_SPI_VERBOSE - Define to enable verbose SPI debug - */ - -#ifdef CONFIG_SPI_DEBUG -# define spidbg lldbg -# ifdef CONFIG_SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef CONFIG_SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -134,13 +107,13 @@ enum spi_dev_e; #ifdef CONFIG_PIC32MX_SPI1 void pic32mx_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #warning "Missing logic" } uint8_t pic32mx_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - spidbg("Returning nothing\n"); + spiinfo("Returning nothing\n"); #warning "Missing logic" return 0; } @@ -156,13 +129,13 @@ int pic32mx_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cm #ifdef CONFIG_PIC32MX_SPI1 void pic32mx_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #warning "Missing logic" } uint8_t pic32mx_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - spidbg("Returning nothing\n"); + spiinfo("Returning nothing\n"); #warning "Missing logic" return 0; } @@ -178,13 +151,13 @@ int pic32mx_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cm #ifdef CONFIG_PIC32MX_SPI3 void pic32mx_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #warning "Missing logic" } uint8_t pic32mx_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - spidbg("Returning nothing\n"); + spiinfo("Returning nothing\n"); #warning "Missing logic" return 0; } @@ -200,13 +173,13 @@ int pic32mx_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cm #ifdef CONFIG_PIC32MX_SPI4 void pic32mx_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #warning "Missing logic" } uint8_t pic32mx_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - spidbg("Returning nothing\n"); + spiinfo("Returning nothing\n"); #warning "Missing logic" return 0; } diff --git a/configs/pic32mx7mmb/README.txt b/configs/pic32mx7mmb/README.txt index 641f15902445a80dad8be8d8d88f1b675912d71d..29fb0acbc1f0d29ec8a1e2135cf3fee88837e861 100644 --- a/configs/pic32mx7mmb/README.txt +++ b/configs/pic32mx7mmb/README.txt @@ -569,9 +569,9 @@ PIC32MX specific PHY/Ethernet device driver settings CONFIG_NET_NRXDESC - Configured number of Rx descriptors. Default: 4 CONFIG_NET_WOL - Enable Wake-up on Lan (not fully implemented). CONFIG_NET_DUMPPACKET - Dump all received and transmitted packets. - Also needs CONFIG_DEBUG. + Also needs CONFIG_DEBUG_FEATURES. CONFIG_NET_REGDEBUG - Enabled low level register debug. Also needs - CONFIG_DEBUG. + CONFIG_DEBUG_FEATURES. CONFIG_NET_HASH - Enable receipt of near-perfect match frames. CONFIG_PIC32MX_MULTICAST - Enable receipt of multicast (and unicast) frames. Automatically set if CONFIG_NET_IGMP is selected. diff --git a/configs/pic32mx7mmb/nsh/defconfig b/configs/pic32mx7mmb/nsh/defconfig index 492a3f054ed9783beb6e32c23a3637d0a9740ed0..6812086deaa7ee647dfc04bf18b39f1c4404bba2 100644 --- a/configs/pic32mx7mmb/nsh/defconfig +++ b/configs/pic32mx7mmb/nsh/defconfig @@ -41,13 +41,15 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -77,7 +79,6 @@ CONFIG_NET_NRXDESC=7 CONFIG_NET_PRIORITY=28 # CONFIG_NET_WOL is not set # CONFIG_NET_HASH is not set -# CONFIG_PIC32MX_MULTICAST is not set CONFIG_ARCH_CHIP_PIC32MX=y # CONFIG_ARCH_CHIP_PIC32MZ is not set CONFIG_ARCH_MIPS32=y @@ -250,6 +251,7 @@ CONFIG_PIC32MX_USBPRIO=16 # # PIC32MX PHY/Ethernet device driver settings # +# CONFIG_PIC32MX_MULTICAST is not set # # Device Configuration 0 (DEVCFG0) @@ -284,6 +286,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # CONFIG_ARCH_HAVE_MPU is not set @@ -441,9 +444,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -484,6 +488,10 @@ CONFIG_SPI=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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -497,7 +505,21 @@ CONFIG_SPI=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -509,6 +531,7 @@ CONFIG_MMCSD_SPICLOCK=12500000 CONFIG_MMCSD_SPIMODE=0 # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set CONFIG_MTD=y # @@ -529,12 +552,15 @@ CONFIG_MTD=y # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP 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 @@ -587,6 +613,8 @@ CONFIG_ETH0_PHY_LAN8720=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -610,10 +638,6 @@ CONFIG_UART1_SERIALDRIVER=y # 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 @@ -675,15 +699,18 @@ CONFIG_USBMSC_SCSI_STACKSIZE=2048 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -825,7 +852,9 @@ 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_NFS is not set # CONFIG_FS_NXFFS is not set # CONFIG_FS_ROMFS is not set @@ -835,12 +864,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -859,6 +882,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -904,6 +931,7 @@ 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 is not set CONFIG_LIBC_NETDB=y # CONFIG_NETDB_HOSTFILE is not set CONFIG_NETDB_DNSCLIENT=y @@ -911,12 +939,14 @@ CONFIG_NETDB_DNSCLIENT_ENTRIES=4 CONFIG_NETDB_DNSCLIENT_NAMESIZE=32 CONFIG_NETDB_DNSCLIENT_LIFESEC=3600 CONFIG_NETDB_DNSCLIENT_MAXRESPONSE=96 +# CONFIG_NETDB_RESOLVCONF is not set CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_NETDB_DNSSERVER_IPv4 is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -942,18 +972,20 @@ 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 +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -963,40 +995,49 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD 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_SMART_TEST 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_UDP is not set # 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set +# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_FSUTILS_PASSWD is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -1009,8 +1050,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1023,25 +1064,27 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -1061,6 +1104,7 @@ CONFIG_NSH_BUILTIN_APPS=y # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_ARP is not set # CONFIG_NSH_DISABLE_BASENAME is not set # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set @@ -1103,6 +1147,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 @@ -1135,6 +1180,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1161,6 +1207,8 @@ CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048 CONFIG_NSH_TELNETD_CLIENTPRIO=100 CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048 CONFIG_NSH_IOBUFFER_SIZE=512 +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # CONFIG_NSH_TELNET_LOGIN is not set # @@ -1175,14 +1223,13 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1191,7 +1238,7 @@ 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_USBMSC=y CONFIG_SYSTEM_USBMSC_NLUNS=1 CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 @@ -1203,4 +1250,5 @@ CONFIG_SYSTEM_USBMSC_DEVPATH3="/dev/mmcsd2" # CONFIG_SYSTEM_USBMSC_DEBUGMM is not set CONFIG_SYSTEM_USBMSC_CMD_STACKSIZE=768 CONFIG_SYSTEM_USBMSC_CMD_PRIORITY=100 +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/pic32mx7mmb/src/pic32_leds.c b/configs/pic32mx7mmb/src/pic32_leds.c index 1b462996292f28fee50fc6c80ac9898775a4f7c1..d76fc7a4e5a95ebef4ee5a515277f83464c6bc83 100644 --- a/configs/pic32mx7mmb/src/pic32_leds.c +++ b/configs/pic32mx7mmb/src/pic32_leds.c @@ -98,22 +98,6 @@ # define LED_NC 2 #endif -/* Debug ********************************************************************/ - -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_LEDS) -# define leddbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# undef CONFIG_DEBUG_LEDS -# undef CONFIG_DEBUG_VERBOSE -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /**************************************************************************** * Private types ****************************************************************************/ diff --git a/configs/pic32mx7mmb/src/pic32_mio283qt2.c b/configs/pic32mx7mmb/src/pic32_mio283qt2.c index 061fd20d28c1708496b12710913531bde6502700..16b1c7518ad7c54969276559fdd2c669cd5c2542 100644 --- a/configs/pic32mx7mmb/src/pic32_mio283qt2.c +++ b/configs/pic32mx7mmb/src/pic32_mio283qt2.c @@ -69,20 +69,6 @@ # error "CONFIG_PIC32MX_PMP is required to use the LCD" #endif -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must - * also be enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif - /* PIC32MX7MMB LCD Hardware Definitions ***********************************************/ /* --- ---------------------------------- -------------------- ------------------------ * PIN CONFIGURATIONS SIGNAL NAME ON-BOARD CONNECTIONS @@ -136,16 +122,6 @@ #define GPIO_LCD_RS (GPIO_OUTPUT|GPIO_VALUE_ZERO|GPIO_PORTB|GPIO_PIN15) -/* Debug ******************************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - #ifdef CONFIG_LCD_MIO283QT2 /************************************************************************************** @@ -430,7 +406,7 @@ int board_lcd_initialize(void) if (!g_pic32mx7mmb_lcd.drvr) { - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); /* Hold the LCD in reset (active low) */ @@ -468,7 +444,7 @@ int board_lcd_initialize(void) g_pic32mx7mmb_lcd.drvr = mio283qt2_lcdinitialize(&g_pic32mx7mmb_lcd.dev); if (!g_pic32mx7mmb_lcd.drvr) { - lcddbg("ERROR: mio283qt2_lcdinitialize failed\n"); + lcderr("ERROR: mio283qt2_lcdinitialize failed\n"); return -ENODEV; } } diff --git a/configs/pic32mx7mmb/src/pic32_spi.c b/configs/pic32mx7mmb/src/pic32_spi.c index f89b06d93b0bbadbd674aced34566c63c00a5ecc..3cce76d53e27e5381f41196bdfbea7772f7986c1 100644 --- a/configs/pic32mx7mmb/src/pic32_spi.c +++ b/configs/pic32mx7mmb/src/pic32_spi.c @@ -75,23 +75,6 @@ #define GPIO_SD_WP (GPIO_INPUT|GPIO_PORTG|GPIO_PIN6) #define GPIO_SD_CD (GPIO_INPUT|GPIO_INT|GPIO_PORTG|GPIO_PIN7) -/* The following enable debug output from this file (needs CONFIG_DEBUG too). - * - * CONFIG_DEBUG_SPI - Define to enable basic SPI debug - */ - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# define spivdbg llvdbg -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -150,7 +133,7 @@ enum spi_dev_e; #ifdef CONFIG_PIC32MX_SPI1 void pic32mx_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); if (devid == SPIDEV_MMCSD) { @@ -179,7 +162,7 @@ uint8_t pic32mx_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) } } - spidbg("Returning %02x\n", ret); + spiinfo("Returning %02x\n", ret); return ret; } #ifdef CONFIG_SPI_CMDDATA @@ -194,13 +177,13 @@ int pic32mx_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cm #ifdef CONFIG_PIC32MX_SPI2 void pic31mx_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #warning "Missing logic" } uint8_t pic31mx_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - spidbg("Returning nothing\n"); + spiinfo("Returning nothing\n"); #warning "Missing logic" return 0; } @@ -217,13 +200,13 @@ int pic31mx_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cm #ifdef CONFIG_PIC32MX_SPI3 void pic32mx_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #warning "Missing logic" } uint8_t pic32mx_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - spidbg("Returning nothing\n"); + spiinfo("Returning nothing\n"); #warning "Missing logic" return 0; } @@ -240,13 +223,13 @@ int pic32mx_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cm #ifdef CONFIG_PIC32MX_SPI4 void pic32mx_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #warning "Missing logic" } uint8_t pic32mx_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - spidbg("Returning nothing\n"); + spiinfo("Returning nothing\n"); #warning "Missing logic" return 0; } diff --git a/configs/pic32mx7mmb/src/pic32_touchscreen.c b/configs/pic32mx7mmb/src/pic32_touchscreen.c index 333325622edaa6a3682716011bfad4ead644651e..95b51479e73f6663ebbd4a6889313ba6486c2ada 100644 --- a/configs/pic32mx7mmb/src/pic32_touchscreen.c +++ b/configs/pic32mx7mmb/src/pic32_touchscreen.c @@ -509,7 +509,7 @@ static void tc_notify(FAR struct tc_dev_s *priv) if (fds) { fds->revents |= POLLIN; - ivdbg("Report events: %02x\n", fds->revents); + iinfo("Report events: %02x\n", fds->revents); sem_post(fds->sem); } } @@ -771,7 +771,7 @@ static void tc_worker(FAR void *arg) { value = MAX_ADC - value; priv->newy = (value + priv->value) >> 1; - ivdbg("Y-=%d Y+=%d[%d] Y=%d\n", priv->value, value, MAX_ADC - value, priv->newy); + iinfo("Y-=%d Y+=%d[%d] Y=%d\n", priv->value, value, MAX_ADC - value, priv->newy); /* Start X+ sampling */ @@ -857,7 +857,7 @@ static void tc_worker(FAR void *arg) value = MAX_ADC - value; newx = (value + priv->value) >> 1; - ivdbg("X+=%d X-=%d[%d] X=%d\n", priv->value, value, MAX_ADC - value, newx); + iinfo("X+=%d X-=%d[%d] X=%d\n", priv->value, value, MAX_ADC - value, newx); /* Samples are available */ @@ -1204,14 +1204,14 @@ errout: static int tc_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { #if 1 - ivdbg("cmd: %d arg: %ld\n", cmd, arg); + iinfo("cmd: %d arg: %ld\n", cmd, arg); return -ENOTTY; /* None yet supported */ #else FAR struct inode *inode; FAR struct tc_dev_s *priv; int ret; - ivdbg("cmd: %d arg: %ld\n", cmd, arg); + iinfo("cmd: %d arg: %ld\n", cmd, arg); DEBUGASSERT(filep); inode = filep->f_inode; @@ -1258,7 +1258,7 @@ static int tc_poll(FAR struct file *filep, FAR struct pollfd *fds, int ret; int i; - ivdbg("setup: %d\n", (int)setup); + iinfo("setup: %d\n", (int)setup); DEBUGASSERT(filep && fds); inode = filep->f_inode; @@ -1282,7 +1282,7 @@ static int tc_poll(FAR struct file *filep, FAR struct pollfd *fds, if ((fds->events & POLLIN) == 0) { - idbg("Missing POLLIN: revents: %08x\n", fds->revents); + ierr("ERROR: Missing POLLIN: revents: %08x\n", fds->revents); ret = -EDEADLK; goto errout; } @@ -1307,7 +1307,7 @@ static int tc_poll(FAR struct file *filep, FAR struct pollfd *fds, if (i >= CONFIG_TOUCHSCREEN_NPOLLWAITERS) { - idbg("No availabled slot found: %d\n", i); + ierr("ERROR: No available slot found: %d\n", i); fds->priv = NULL; ret = -EBUSY; goto errout; @@ -1367,7 +1367,7 @@ int board_tsc_setup(int minor) char devname[DEV_NAMELEN]; int ret; - ivdbg("minor: %d\n", minor); + iinfo("minor: %d\n", minor); DEBUGASSERT(minor >= 0 && minor < 100); /* Configure all touchscreen pins as inputs, undriven */ @@ -1389,7 +1389,7 @@ int board_tsc_setup(int minor) priv = (FAR struct tc_dev_s *)kmm_malloc(sizeof(struct tc_dev_s)); if (!priv) { - idbg("kmm_malloc(%d) failed\n", sizeof(struct tc_dev_s)); + ierr("ERROR: kmm_malloc(%d) failed\n", sizeof(struct tc_dev_s)); return -ENOMEM; } #endif @@ -1403,12 +1403,12 @@ int board_tsc_setup(int minor) /* Register the device as an input device */ (void)snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor); - ivdbg("Registering %s\n", devname); + iinfo("Registering %s\n", devname); ret = register_driver(devname, &tc_fops, 0666, priv); if (ret < 0) { - idbg("register_driver() failed: %d\n", ret); + ierr("ERROR: register_driver() failed: %d\n", ret); goto errout_with_priv; } @@ -1420,7 +1420,7 @@ int board_tsc_setup(int minor) ret = work_queue(HPWORK, &priv->work, tc_worker, priv, 0); if (ret != 0) { - idbg("Failed to queue work: %d\n", ret); + ierr("ERROR: Failed to queue work: %d\n", ret); goto errout_with_priv; } diff --git a/configs/pic32mz-starterkit/nsh/Make.defs b/configs/pic32mz-starterkit/nsh/Make.defs index 83d48045e88a5ef091d6ba43366880447c576656..ab082145f31007edda98c8bdaec3a996a1bf496b 100644 --- a/configs/pic32mz-starterkit/nsh/Make.defs +++ b/configs/pic32mz-starterkit/nsh/Make.defs @@ -103,7 +103,7 @@ ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = ifeq ($(CONFIG_MIPS32_TOOLCHAIN_MICROCHIPL_XC32),y) -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) ARCHCFLAGS += -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist endif endif diff --git a/configs/pic32mz-starterkit/nsh/defconfig b/configs/pic32mz-starterkit/nsh/defconfig index a6299b98a937783a28b68a694862fb155ebb26c3..4c31a821ae9e53ad64d06facea4cafb952be6c53 100644 --- a/configs/pic32mz-starterkit/nsh/defconfig +++ b/configs/pic32mz-starterkit/nsh/defconfig @@ -41,13 +41,15 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -192,12 +194,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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_IRQPRIO is not set CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set @@ -256,6 +260,7 @@ CONFIG_NSH_MMCSDSLOTNO=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 @@ -295,6 +300,7 @@ 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 @@ -345,9 +351,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -378,6 +385,7 @@ CONFIG_DEV_NULL=y # 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 @@ -395,7 +403,21 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -404,6 +426,7 @@ CONFIG_MMCSD_MMCSUPPORT=y CONFIG_MMCSD_HAVECARDDETECT=y # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set CONFIG_MTD=y # @@ -412,6 +435,7 @@ CONFIG_MTD=y # CONFIG_MTD_PARTITION is not set # CONFIG_MTD_SECT512 is not set # CONFIG_MTD_BYTE_WRITE is not set +# CONFIG_MTD_PROGMEM is not set # CONFIG_MTD_CONFIG is not set # @@ -419,14 +443,19 @@ CONFIG_MTD=y # # CONFIG_MTD_NAND is not set # CONFIG_RAMMTD is not set +# CONFIG_FILEMTD is not set # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP 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 @@ -437,6 +466,8 @@ CONFIG_MTD=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -460,14 +491,11 @@ CONFIG_UART1_SERIALDRIVER=y # 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_UART1_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -484,19 +512,23 @@ 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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -530,20 +562,17 @@ 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 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 # @@ -562,6 +591,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -607,10 +640,14 @@ 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 is not set +# CONFIG_LIBC_NETDB is not set +# CONFIG_NETDB_HOSTFILE is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -629,23 +666,27 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # 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 # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -653,33 +694,47 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD 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_SMART_TEST 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_FLASH_ERASEALL is not set +# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_FSUTILS_PASSWD is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -692,30 +747,28 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -735,6 +788,7 @@ 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 @@ -743,6 +797,7 @@ 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 @@ -751,8 +806,10 @@ CONFIG_NSH_DISABLE_DATE=y # 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 @@ -771,8 +828,10 @@ CONFIG_NSH_DISABLE_DATE=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 # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set @@ -799,6 +858,8 @@ CONFIG_NSH_FILEIOSIZE=512 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 @@ -812,16 +873,20 @@ CONFIG_NSH_ARCHINIT=y # # 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_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/pic32mz-starterkit/src/pic32mz_autoleds.c b/configs/pic32mz-starterkit/src/pic32mz_autoleds.c index ec77d3d1f9b9601c7812aecb266b2b842053f7b4..b94a0664e836d546c61baec76e979e9289c37fb5 100644 --- a/configs/pic32mz-starterkit/src/pic32mz_autoleds.c +++ b/configs/pic32mz-starterkit/src/pic32mz_autoleds.c @@ -91,22 +91,6 @@ #define LED_ON 1 #define LED_NC 2 -/* Debug ********************************************************************/ - -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_LEDS) -# define leddbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# undef CONFIG_DEBUG_LEDS -# undef CONFIG_DEBUG_VERBOSE -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /**************************************************************************** * Private types ****************************************************************************/ diff --git a/configs/pic32mz-starterkit/src/pic32mz_spi.c b/configs/pic32mz-starterkit/src/pic32mz_spi.c index 5a0b2599c670a1552e7d2d534c603b5b93867d58..f5093f9e6d09db8c8b1f9de479847f02b4a16dd2 100644 --- a/configs/pic32mz-starterkit/src/pic32mz_spi.c +++ b/configs/pic32mz-starterkit/src/pic32mz_spi.c @@ -52,29 +52,6 @@ #ifdef CONFIG_PIC32MZ_SPI -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Debug */ - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef CONFIG_SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -128,13 +105,13 @@ enum spi_dev_e; #ifdef CONFIG_PIC32MZ_SPI1 void pic32mz_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #warning "Missing logic" } uint8_t pic32mz_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - spidbg("Returning nothing\n"); + spiinfo("Returning nothing\n"); #warning "Missing logic" return 0; } @@ -150,13 +127,13 @@ int pic32mz_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cm #ifdef CONFIG_PIC32MZ_SPI2 void pic32mz_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #warning "Missing logic" } uint8_t pic32mz_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - spidbg("Returning nothing\n"); + spiinfo("Returning nothing\n"); #warning "Missing logic" return 0; } @@ -172,13 +149,13 @@ int pic32mz_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cm #ifdef CONFIG_PIC32MZ_SPI3 void pic32mz_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #warning "Missing logic" } uint8_t pic32mz_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - spidbg("Returning nothing\n"); + spiinfo("Returning nothing\n"); #warning "Missing logic" return 0; } @@ -194,13 +171,13 @@ int pic32mz_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cm #ifdef CONFIG_PIC32MZ_SPI4 void pic32mz_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #warning "Missing logic" } uint8_t pic32mz_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - spidbg("Returning nothing\n"); + spiinfo("Returning nothing\n"); #warning "Missing logic" return 0; } @@ -216,13 +193,13 @@ int pic32mz_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cm #ifdef CONFIG_PIC32MZ_SPI5 void pic32mz_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #warning "Missing logic" } uint8_t pic32mz_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - spidbg("Returning nothing\n"); + spiinfo("Returning nothing\n"); #warning "Missing logic" return 0; } @@ -238,13 +215,13 @@ int pic32mz_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cm #ifdef CONFIG_PIC32MZ_SPI6 void pic32mz_spi6select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #warning "Missing logic" } uint8_t pic32mz_spi6status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - spidbg("Returning nothing\n"); + spiinfo("Returning nothing\n"); #warning "Missing logic" return 0; } diff --git a/configs/pic32mz-starterkit/src/pic32mz_userleds.c b/configs/pic32mz-starterkit/src/pic32mz_userleds.c index 7defe1597711bcf5a1410ecaeb162dabd13f3fd6..b2b5afe303d5e5f00df8de524d1ecd5c731246c8 100644 --- a/configs/pic32mz-starterkit/src/pic32mz_userleds.c +++ b/configs/pic32mz-starterkit/src/pic32mz_userleds.c @@ -54,9 +54,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ /* LED Configuration ********************************************************/ /* The PIC32MZ Ethernet Starter kit has 3 user LEDs labelled LED1-3 on the * board: @@ -71,22 +68,6 @@ * LEDs through the functions provided in this file */ -/* Debug ********************************************************************/ - -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_LEDS) -# define leddbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# undef CONFIG_DEBUG_LEDS -# undef CONFIG_DEBUG_VERBOSE -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /**************************************************************************** * Private Data ****************************************************************************/ diff --git a/configs/pirelli_dpl10/nsh_highram/defconfig b/configs/pirelli_dpl10/nsh_highram/defconfig index d8eac38010b4dc6f46c671751c7037702cf6103a..a0008f818be9fe538e1b41784f988060454f85dc 100644 --- a/configs/pirelli_dpl10/nsh_highram/defconfig +++ b/configs/pirelli_dpl10/nsh_highram/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,6 +77,7 @@ CONFIG_ARCH_CHIP_CALYPSO=y # 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 @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_CALYPSO=y # 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=y # CONFIG_ARCH_ARM926EJS is not set # CONFIG_ARCH_ARM920T is not set @@ -102,10 +109,21 @@ CONFIG_ARCH_ARM7TDMI=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="arm" CONFIG_ARCH_CHIP="calypso" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y # CONFIG_ARCH_LOWVECTORS is not set @@ -159,12 +177,14 @@ CONFIG_SERIAL_IRDA_CONSOLE=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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=y +# CONFIG_ARCH_HAVE_RESET is not set CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set # CONFIG_ARCH_IDLE_CUSTOM is not set @@ -220,6 +240,7 @@ CONFIG_NSH_MMCSDMINOR=0 # CONFIG_LIB_BOARDCTL=y CONFIG_BOARDCTL_POWEROFF=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 @@ -259,6 +280,7 @@ 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 @@ -303,9 +325,10 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGCONDTIMEDOUT=16 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # CONFIG_SCHED_WORKQUEUE is not set # CONFIG_SCHED_HPWORK is not set @@ -336,14 +359,20 @@ CONFIG_DEV_NULL=y # 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=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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -357,8 +386,22 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -368,6 +411,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -391,14 +436,11 @@ CONFIG_SERIAL=y # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set CONFIG_OTHER_UART_SERIALDRIVER=y - -# -# USART Configuration -# CONFIG_MCU_SERIAL=y # CONFIG_STANDARD_SERIAL is not set # 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_OTHER_SERIAL_CONSOLE=y # CONFIG_NO_SERIAL_CONSOLE is not set @@ -406,15 +448,18 @@ CONFIG_OTHER_SERIAL_CONSOLE=y # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -445,17 +490,12 @@ CONFIG_OTHER_SERIAL_CONSOLE=y # 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 # @@ -476,6 +516,10 @@ CONFIG_HEAP2_SIZE=0 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -519,10 +563,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -541,11 +589,14 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -553,11 +604,13 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_FTPC is not set # CONFIG_EXAMPLES_FTPD is not set CONFIG_EXAMPLES_HELLO=y -# CONFIG_EXAMPLES_HELLOXX is not set -# CONFIG_EXAMPLES_JSON is not set +CONFIG_EXAMPLES_HELLO_PRIORITY=100 +CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 # CONFIG_EXAMPLES_HIDKBD is not set -# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -565,33 +618,45 @@ CONFIG_EXAMPLES_HELLO=y 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_NXTERM 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_PPPD 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_SMART_TEST 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -603,30 +668,28 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -646,6 +709,7 @@ 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 @@ -654,6 +718,7 @@ 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 @@ -662,8 +727,10 @@ CONFIG_NSH_DISABLE_DATE=y # 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 @@ -673,6 +740,7 @@ CONFIG_NSH_DISABLE_DATE=y # CONFIG_NSH_DISABLE_MOUNT is not set # CONFIG_NSH_DISABLE_MV is not set # CONFIG_NSH_DISABLE_MW is not set +# CONFIG_NSH_DISABLE_POWEROFF is not set # CONFIG_NSH_DISABLE_PS is not set # CONFIG_NSH_DISABLE_PUT is not set # CONFIG_NSH_DISABLE_PWD is not set @@ -680,9 +748,12 @@ CONFIG_NSH_DISABLE_DATE=y # CONFIG_NSH_DISABLE_RMDIR is not set # CONFIG_NSH_DISABLE_SET is not set # CONFIG_NSH_DISABLE_SH is not set +CONFIG_NSH_DISABLE_SHUTDOWN=y # 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 @@ -709,6 +780,8 @@ CONFIG_NSH_FILEIOSIZE=1024 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 @@ -722,15 +795,19 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/qemu-i486/nsh/defconfig b/configs/qemu-i486/nsh/defconfig index c07faea1dac810dbc541e5844c35d61e9ca3cf6d..a7c7b5d4e5242afb70913d6610d3b6be02317799 100644 --- a/configs/qemu-i486/nsh/defconfig +++ b/configs/qemu-i486/nsh/defconfig @@ -39,7 +39,7 @@ CONFIG_HOST_LINUX=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set @@ -339,7 +339,6 @@ CONFIG_FS_ROMFS=y # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/qemu-i486/ostest/defconfig b/configs/qemu-i486/ostest/defconfig index 9306bec0db819c94564ac7a77e665140c1c6ed10..5e8d9f74c1ff813783d6144bb7edbd8773176834 100644 --- a/configs/qemu-i486/ostest/defconfig +++ b/configs/qemu-i486/ostest/defconfig @@ -39,7 +39,7 @@ CONFIG_HOST_LINUX=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set @@ -316,7 +316,6 @@ CONFIG_FS_FAT=y # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/rgmp/arm/default/defconfig b/configs/rgmp/arm/default/defconfig index 4b1bf3a25ca5496172ff2c5c147bc85b2ca36978..6e6f76deeb9ff517c262b6ebdfeec3ba9f6b06a5 100644 --- a/configs/rgmp/arm/default/defconfig +++ b/configs/rgmp/arm/default/defconfig @@ -39,7 +39,7 @@ CONFIG_ARCH_MATH_H=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set @@ -365,7 +365,6 @@ CONFIG_NET_ETHERNET=y # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/rgmp/arm/nsh/defconfig b/configs/rgmp/arm/nsh/defconfig index 1d9e1737409bfa7169c4c06af4f2c371735b3546..c6466fabca1ba3e6077685fdc4d3bfde8b121848 100644 --- a/configs/rgmp/arm/nsh/defconfig +++ b/configs/rgmp/arm/nsh/defconfig @@ -39,10 +39,10 @@ CONFIG_ARCH_MATH_H=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_STACKCHECK is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set -# CONFIG_DEBUG_VERBOSE is not set +# CONFIG_DEBUG_INFO is not set # # Subsystem Debug Options @@ -387,7 +387,6 @@ CONFIG_NET_ETHERNET=y # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/rgmp/x86/cxxtest/defconfig b/configs/rgmp/x86/cxxtest/defconfig index 40ff45293e5183d55a4622736c551f0894bb680a..ddda0c478c2b53611a4ed537012f80153b85a545 100644 --- a/configs/rgmp/x86/cxxtest/defconfig +++ b/configs/rgmp/x86/cxxtest/defconfig @@ -39,10 +39,10 @@ CONFIG_ARCH_MATH_H=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_STACKCHECK is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set -CONFIG_DEBUG_VERBOSE=y +CONFIG_DEBUG_INFO=y # # Subsystem Debug Options @@ -394,7 +394,6 @@ CONFIG_NET_ETHERNET=y # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/rgmp/x86/default/defconfig b/configs/rgmp/x86/default/defconfig index 6f10a9ed0e44444e70e9982e5785966922542126..1416b2389378fc78179a87a4d52f4bba0e06bb6e 100644 --- a/configs/rgmp/x86/default/defconfig +++ b/configs/rgmp/x86/default/defconfig @@ -39,7 +39,7 @@ CONFIG_ARCH_MATH_H=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set CONFIG_DEBUG_SYMBOLS=y @@ -373,7 +373,6 @@ CONFIG_NET_ETHERNET=y # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/rgmp/x86/helloxx/defconfig b/configs/rgmp/x86/helloxx/defconfig index 039dd3aa9c7153fa967464bf493d277c86a7bca4..b581016e8c028c09c8e11a106bdd7f425bb59ea4 100644 --- a/configs/rgmp/x86/helloxx/defconfig +++ b/configs/rgmp/x86/helloxx/defconfig @@ -39,10 +39,10 @@ CONFIG_ARCH_MATH_H=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_STACKCHECK is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set -CONFIG_DEBUG_VERBOSE=y +CONFIG_DEBUG_INFO=y # # Subsystem Debug Options @@ -394,7 +394,6 @@ CONFIG_NET_ETHERNET=y # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/rgmp/x86/nsh/defconfig b/configs/rgmp/x86/nsh/defconfig index 8723d56a26d0d011123a9a2cc44299596b3373b6..4df54001cb7c9bf32760fbba52c6f63a27accf3f 100644 --- a/configs/rgmp/x86/nsh/defconfig +++ b/configs/rgmp/x86/nsh/defconfig @@ -39,10 +39,10 @@ CONFIG_ARCH_MATH_H=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_STACKCHECK is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set -# CONFIG_DEBUG_VERBOSE is not set +# CONFIG_DEBUG_INFO is not set # # Subsystem Debug Options @@ -395,7 +395,6 @@ CONFIG_NET_ETHERNET=y # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/sabre-6quad/README.txt b/configs/sabre-6quad/README.txt index 122f28e8d469b9502c2677a38003f379f1d21a15..f94614ae63dfc8d9435723ffa69667dbcd32a9db 100644 --- a/configs/sabre-6quad/README.txt +++ b/configs/sabre-6quad/README.txt @@ -79,8 +79,8 @@ Status 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_FEATURES=y + +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_SCHED=y +CONFIG_DEBUG_SYMBOLS=y @@ -95,34 +95,11 @@ Status -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; + debug output from CPU1. In drivers/syslog/vsyslog.c: + +if (up_cpu_index() == 0) return 17; // REMOVE ME - - /* Let vsyslog do the work */ Platform Features ================= @@ -653,7 +630,6 @@ Configuration sub-directories 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 diff --git a/configs/sabre-6quad/nsh/defconfig b/configs/sabre-6quad/nsh/defconfig index 25b14c99ff4775dcbf9efa0a79118377fac1cc76..fe2e625a2ddefdd04d8e8dddd292c71a3fcc666f 100644 --- a/configs/sabre-6quad/nsh/defconfig +++ b/configs/sabre-6quad/nsh/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -162,10 +163,16 @@ CONFIG_ARMV7A_TOOLCHAIN_GNU_EABIW=y # CONFIG_ARCH_CHIP_IMX6_6DUAL is not set CONFIG_ARCH_CHIP_IMX6_6QUAD=y # CONFIG_IMX6_HAVE_HDCP is not set +# CONFIG_IMX6_ECSPI is not set # # iMX.6 Peripheral Selection # +# CONFIG_IMX6_ECSPI1 is not set +# CONFIG_IMX6_ECSPI2 is not set +# CONFIG_IMX6_ECSPI3 is not set +# CONFIG_IMX6_ECSPI4 is not set +# CONFIG_IMX6_ECSPI5 is not set CONFIG_IMX6_UART1=y # CONFIG_IMX6_UART2 is not set # CONFIG_IMX6_UART3 is not set @@ -408,7 +415,12 @@ CONFIG_DEV_ZERO=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -416,6 +428,7 @@ CONFIG_DEV_ZERO=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -427,6 +440,8 @@ CONFIG_DEV_ZERO=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -450,10 +465,6 @@ CONFIG_UART1_SERIALDRIVER=y # 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 @@ -481,21 +492,25 @@ CONFIG_UART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set 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_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_RAMLOG_SYSLOG=y # CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -541,13 +556,6 @@ CONFIG_FS_PROCFS=y # 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 # @@ -622,6 +630,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -665,10 +674,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -678,17 +687,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -696,17 +705,17 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -730,8 +739,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -857,12 +866,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -870,6 +879,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sabre-6quad/smp/defconfig b/configs/sabre-6quad/smp/defconfig index 2cd36db12740316d7829623dc0bd869e5c6e2134..6028bfb91cae0cb77ebc9269ddd88e8a86ed49f6 100644 --- a/configs/sabre-6quad/smp/defconfig +++ b/configs/sabre-6quad/smp/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -165,10 +166,16 @@ CONFIG_ARMV7A_TOOLCHAIN_GNU_EABIW=y # CONFIG_ARCH_CHIP_IMX6_6DUAL is not set CONFIG_ARCH_CHIP_IMX6_6QUAD=y # CONFIG_IMX6_HAVE_HDCP is not set +# CONFIG_IMX6_ECSPI is not set # # iMX.6 Peripheral Selection # +# CONFIG_IMX6_ECSPI1 is not set +# CONFIG_IMX6_ECSPI2 is not set +# CONFIG_IMX6_ECSPI3 is not set +# CONFIG_IMX6_ECSPI4 is not set +# CONFIG_IMX6_ECSPI5 is not set CONFIG_IMX6_UART1=y # CONFIG_IMX6_UART2 is not set # CONFIG_IMX6_UART3 is not set @@ -415,7 +422,12 @@ CONFIG_DEV_ZERO=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -423,6 +435,7 @@ CONFIG_DEV_ZERO=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -434,6 +447,8 @@ CONFIG_DEV_ZERO=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -457,10 +472,6 @@ CONFIG_UART1_SERIALDRIVER=y # 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 @@ -488,21 +499,25 @@ CONFIG_UART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set 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_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_RAMLOG_SYSLOG=y # CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -548,13 +563,6 @@ CONFIG_FS_PROCFS=y # 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 # @@ -630,6 +638,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -673,10 +682,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -686,17 +695,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -704,17 +713,17 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -738,8 +747,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -865,12 +874,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -878,6 +887,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sabre-6quad/src/imx_autoleds.c b/configs/sabre-6quad/src/imx_autoleds.c index 10a3a556d9697a0b625a96d180ecdf7eacef9b97..9a9b1cd9e5e127cb2058d2a11927ddbc0b3b2c17 100644 --- a/configs/sabre-6quad/src/imx_autoleds.c +++ b/configs/sabre-6quad/src/imx_autoleds.c @@ -78,22 +78,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/sabre-6quad/src/imx_bringup.c b/configs/sabre-6quad/src/imx_bringup.c index d4ace48cd48a8d1119aac125e4a219440b5eaadb..13f1742c15407eac29a65a6bbe1b8da343356adf 100644 --- a/configs/sabre-6quad/src/imx_bringup.c +++ b/configs/sabre-6quad/src/imx_bringup.c @@ -44,22 +44,6 @@ #include "sabre-6quad.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Debug ********************************************************************/ - -#ifdef CONFIG_BOARD_INITIALIZE -# define SYSLOG lldbg -#else -# define SYSLOG dbg -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/sam3u-ek/README.txt b/configs/sam3u-ek/README.txt index 2a03890a2ca3237cc0ceec4183e6dfdfe7a13056..c4dadfe8097b10066e60853a9c66705732e50e9c 100644 --- a/configs/sam3u-ek/README.txt +++ b/configs/sam3u-ek/README.txt @@ -624,8 +624,8 @@ Configurations debug output on UART0 can be enabled with: Build Setup: - CONFIG_DEBUG=y : Enable debug features - CONFIG_DEBUG_VERBOSE=y : Enable verbose debug output + CONFIG_DEBUG_FEATURES=y : Enable debug features + CONFIG_DEBUG_INFO=y : Enable verbose debug output CONFIG_DEBUG_INPUT=y : Enable debug output from input devices 3. Enabling HSMCI support. The SAM3U-KE provides a an SD memory card diff --git a/configs/sam3u-ek/knsh/defconfig b/configs/sam3u-ek/knsh/defconfig index e7e5b4d898b291512b999896060d389a188fcd25..a14dcebcabafda8aed42c23adca34e79ff6fb9d4 100644 --- a/configs/sam3u-ek/knsh/defconfig +++ b/configs/sam3u-ek/knsh/defconfig @@ -47,10 +47,11 @@ CONFIG_NUTTX_USERSPACE=0x00090000 # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -81,6 +82,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 +101,7 @@ CONFIG_ARCH_CHIP_SAM34=y # 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 @@ -120,12 +123,15 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="sam34" +# 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=y CONFIG_ARM_MPU_NREGIONS=8 @@ -137,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=y # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -477,7 +484,12 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -485,6 +497,7 @@ CONFIG_DEV_NULL=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -503,6 +516,8 @@ CONFIG_MMCSD_NSLOTS=1 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -526,10 +541,6 @@ CONFIG_UART0_SERIALDRIVER=y # 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 @@ -556,15 +567,18 @@ CONFIG_UART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -607,12 +621,6 @@ CONFIG_FS_FAT=y # 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 # @@ -681,12 +689,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_USRWORK is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -717,9 +728,9 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_FTPC is not set # CONFIG_EXAMPLES_FTPD is not set # CONFIG_EXAMPLES_HELLO is not set +# CONFIG_EXAMPLES_IGMP is not set # CONFIG_EXAMPLES_JSON 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 @@ -728,18 +739,18 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -753,10 +764,9 @@ CONFIG_EXAMPLES_NSH=y # 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_WEBSERVER is not set # # File System Utilities @@ -780,8 +790,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -792,6 +802,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 @@ -904,12 +915,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -917,6 +928,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sam3u-ek/nsh/defconfig b/configs/sam3u-ek/nsh/defconfig index 028d86b604a8f70840c101f14ec2538d9d02f401..ceb2c36d2c62a0ca161fbfd674a1e2fe3f597985 100644 --- a/configs/sam3u-ek/nsh/defconfig +++ b/configs/sam3u-ek/nsh/defconfig @@ -42,10 +42,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -76,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 @@ -94,6 +96,7 @@ CONFIG_ARCH_CHIP_SAM34=y # 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 @@ -115,12 +118,15 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="sam34" +# 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 @@ -131,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 @@ -471,7 +478,12 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -479,6 +491,7 @@ CONFIG_DEV_NULL=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -490,6 +503,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -513,10 +528,6 @@ CONFIG_UART0_SERIALDRIVER=y # 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 @@ -543,15 +554,18 @@ CONFIG_UART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -595,12 +609,6 @@ CONFIG_FS_FAT=y # 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 # @@ -668,12 +676,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -709,10 +720,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -721,17 +732,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -739,17 +750,17 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -773,8 +784,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -785,6 +796,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 @@ -898,12 +910,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -911,6 +923,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sam3u-ek/nx/defconfig b/configs/sam3u-ek/nx/defconfig index 5a1d8b2466048c10b4620c25a12b0db207060f6c..86a492c3752eb2a431f5e339c01d21ebb5e30805 100644 --- a/configs/sam3u-ek/nx/defconfig +++ b/configs/sam3u-ek/nx/defconfig @@ -42,10 +42,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -76,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 @@ -94,6 +96,7 @@ CONFIG_ARCH_CHIP_SAM34=y # 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 @@ -115,12 +118,15 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="sam34" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +CONFIG_ARM_TOOLCHAIN_GNU=y CONFIG_ARMV7M_USEBASEPRI=y 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 @@ -131,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 @@ -463,10 +470,14 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set # CONFIG_LCD_NOGETRUN is not set @@ -494,11 +505,7 @@ CONFIG_LCD_PORTRAIT=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set - -# -# Alphanumeric/Segment LCD Devices -# -# CONFIG_LCD_LCD1602 is not set +# CONFIG_SLCD is not set # # LED Support @@ -506,6 +513,7 @@ CONFIG_LCD_PORTRAIT=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -517,6 +525,8 @@ CONFIG_LCD_PORTRAIT=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -540,10 +550,6 @@ CONFIG_UART0_SERIALDRIVER=y # 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 @@ -570,15 +576,18 @@ CONFIG_UART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -609,12 +618,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -623,6 +626,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 @@ -762,11 +766,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -796,10 +803,10 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -821,18 +828,18 @@ CONFIG_EXAMPLES_NX_DEFAULT_FONT=y CONFIG_EXAMPLES_NX_BPP=16 # CONFIG_EXAMPLES_NX_RAWWINDOWS is not set CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 -# 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -846,10 +853,9 @@ CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 # 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_WEBSERVER is not set # # File System Utilities @@ -871,8 +877,8 @@ CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -883,6 +889,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 @@ -904,16 +911,16 @@ CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sam3u-ek/nxwm/defconfig b/configs/sam3u-ek/nxwm/defconfig index fb8be1e62ed0aa07f7745ca3a147d43fb599cf23..3966522e3e213e9281897d116ea19fddab727443 100644 --- a/configs/sam3u-ek/nxwm/defconfig +++ b/configs/sam3u-ek/nxwm/defconfig @@ -42,10 +42,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -76,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 @@ -94,6 +96,7 @@ CONFIG_ARCH_CHIP_SAM34=y # 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 @@ -115,12 +118,15 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="sam34" +# 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 @@ -131,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 @@ -335,7 +342,7 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set -# CONFIG_BOARDCTL_TSCTEST is not set +CONFIG_BOARDCTL_TSCTEST=y # CONFIG_BOARDCTL_ADCTEST is not set # CONFIG_BOARDCTL_PWMTEST is not set # CONFIG_BOARDCTL_GRAPHICS is not set @@ -477,6 +484,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -508,10 +517,14 @@ CONFIG_ADS7843E_THRESHY=39 # CONFIG_DJOYSTICK is not set # CONFIG_AJOYSTICK is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set # CONFIG_LCD_NOGETRUN is not set @@ -540,11 +553,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set - -# -# Alphanumeric/Segment LCD Devices -# -# CONFIG_LCD_LCD1602 is not set +# CONFIG_SLCD is not set # # LED Support @@ -552,6 +561,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -563,6 +573,8 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -586,10 +598,6 @@ CONFIG_UART0_SERIALDRIVER=y # 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 @@ -616,15 +624,18 @@ CONFIG_UART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -661,12 +672,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -675,6 +680,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 @@ -838,11 +844,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -881,10 +890,10 @@ CONFIG_CXX_NEWLONG=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -894,18 +903,18 @@ CONFIG_CXX_NEWLONG=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -919,10 +928,10 @@ CONFIG_CXX_NEWLONG=y # 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_WEBSERVER is not set # # File System Utilities @@ -944,8 +953,8 @@ CONFIG_CXX_NEWLONG=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -956,6 +965,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 @@ -1078,6 +1088,7 @@ CONFIG_NXWIDGETS_LISTENERSTACK=1596 # NXWidget Configuration # CONFIG_NXWIDGETS_BPP=16 +# CONFIG_NXWIDGETS_GREYSCALE is not set CONFIG_NXWIDGETS_SIZEOFCHAR=1 # @@ -1239,12 +1250,12 @@ CONFIG_NXWM_HEXCALCULATOR_FONTID=5 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1252,6 +1263,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sam3u-ek/src/sam_lcd.c b/configs/sam3u-ek/src/sam_lcd.c index c2a13f115b034f60f04057460c40b7f5f41e79bf..25aa1822ae6c774b1032817a17b149459cab3209 100644 --- a/configs/sam3u-ek/src/sam_lcd.c +++ b/configs/sam3u-ek/src/sam_lcd.c @@ -142,12 +142,12 @@ /* Verbose debug must also be enabled */ -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE +#ifndef CONFIG_DEBUG_FEATURES +# undef CONFIG_DEBUG_INFO # undef CONFIG_DEBUG_LED #endif -#ifndef CONFIG_DEBUG_VERBOSE +#ifndef CONFIG_DEBUG_INFO # undef CONFIG_LCD_REGDEBUG #endif @@ -157,22 +157,6 @@ # error "CONFIG_LCD_MAXCONTRAST must be defined in the range 1 to 31" #endif -/* Debug ******************************************************************************/ - -#ifdef CONFIG_LCD_REGDEBUG -# define regdbg(format, ...) vdbg(format, ##__VA_ARGS__) -#else -# define regdbg(x...) -#endif - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__) -# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /* Graphics Capbilities ***************************************************************/ /* LCD resolution: 320 (columns) by 240 (rows). The physical dimensions of the device @@ -314,7 +298,7 @@ struct sam_dev_s /* Low-level HX834x Register access */ static void sam_putreg(uint16_t reg, uint16_t data); -#ifdef CONFIG_DEBUG_LCD +#ifdef CONFIG_DEBUG_LCD_INFO static uint16_t sam_getreg(uint16_t reg); #endif @@ -327,7 +311,7 @@ static inline uint16_t sam_rdram(void); static void sam_lcdon(void); static void sam_lcdoff(void); -#if 0 /* CONFIG_DEBUG_LCD */ +#if 0 /* CONFIG_DEBUG_LCD_INFO */ static void sam_dumpreg(uint8_t startreg, uint8_t endreg); #endif @@ -438,7 +422,8 @@ static struct sam_dev_s g_lcddev_s = static void sam_putreg(uint16_t reg, uint16_t data) { - regdbg("base: %08x RS: %04x data: %04x\n", LCD_BASE, LCD_BASE + HX843X_LCD_RS, data); + lcdinfo("base: %08x RS: %04x data: %04x\n", + LCD_BASE, LCD_BASE + HX843X_LCD_RS, data); putreg16(reg, LCD_BASE); putreg16(data, LCD_BASE + HX843X_LCD_RS); } @@ -451,13 +436,15 @@ static void sam_putreg(uint16_t reg, uint16_t data) * **************************************************************************************/ -#ifdef CONFIG_DEBUG_LCD +#ifdef CONFIG_DEBUG_LCD_INFO static uint16_t sam_getreg(uint16_t reg) { uint16_t data; + putreg16(reg, LCD_BASE); data = getreg16(LCD_BASE + HX843X_LCD_RS); - regdbg("base: %08x RS: %04x data: %04x\n", LCD_BASE, LCD_BASE + HX843X_LCD_RS, data); + lcdinfo("base: %08x RS: %04x data: %04x\n", + LCD_BASE, LCD_BASE + HX843X_LCD_RS, data); return data; } #endif @@ -544,7 +531,7 @@ static void sam_lcdon(void) { /* Display ON Setting */ - lcdvdbg("ON\n"); + lcdinfo("ON\n"); sam_putreg(HX8347_R90H, 0x7f); /* SAP=0111 1111 */ sam_putreg(HX8347_R26H, 0x04); /* GON=0 DTE=0 D=01 */ up_mdelay(100); @@ -564,7 +551,7 @@ static void sam_lcdon(void) static void sam_lcdoff(void) { - lcdvdbg("OFF\n"); + lcdinfo("OFF\n"); sam_putreg(HX8347_R90H, 0x00); /* SAP=0000 0000 */ sam_putreg(HX8347_R26H, 0x00); /* GON=0 DTE=0 D=00 */ } @@ -577,7 +564,7 @@ static void sam_lcdoff(void) * **************************************************************************************/ -#if 0 /* CONFIG_DEBUG_LCD */ +#if 0 /* CONFIG_DEBUG_LCD_INFO */ static void sam_dumpreg(uint8_t startreg, uint8_t endreg) { uint16_t value; @@ -586,7 +573,7 @@ static void sam_dumpreg(uint8_t startreg, uint8_t endreg) for (addr = startreg; addr <= endreg; addr++) { value = sam_getreg(addr); - lcddbg(" %02x: %04x\n", addr, value); + lcdinfo(" %02x: %04x\n", addr, value); } } #endif @@ -613,7 +600,7 @@ static int sam_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer, /* Buffer must be provided and aligned to a 16-bit address boundary */ - lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0); #ifdef CONFIG_LCD_PORTRAIT @@ -679,7 +666,7 @@ static int sam_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, /* Buffer must be provided and aligned to a 16-bit address boundary */ - lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0); #ifdef CONFIG_LCD_PORTRAIT @@ -730,7 +717,7 @@ static int sam_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); - lcdvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n", + lcdinfo("fmt: %d xres: %d yres: %d nplanes: %d\n", g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes); memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s)); return OK; @@ -748,7 +735,7 @@ static int sam_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, FAR struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(dev && pinfo && planeno == 0); - lcdvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); + lcdinfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); return OK; } @@ -766,7 +753,7 @@ static int sam_getpower(struct lcd_dev_s *dev) { struct sam_dev_s *priv = (struct sam_dev_s *)dev; DEBUGASSERT(dev); - lcdvdbg("power: %d\n", priv->power); + lcdinfo("power: %d\n", priv->power); return priv->power; } @@ -790,7 +777,7 @@ static int sam_setpower(struct lcd_dev_s *dev, int power) struct sam_dev_s *priv = (struct sam_dev_s *)dev; unsigned int i; - lcdvdbg("power: %d\n", power); + lcdinfo("power: %d\n", power); DEBUGASSERT(power <= CONFIG_LCD_MAXPOWER); /* Switch off backlight */ @@ -834,7 +821,7 @@ static int sam_setpower(struct lcd_dev_s *dev, int power) static int sam_getcontrast(struct lcd_dev_s *dev) { - lcdvdbg("Not implemented\n"); + lcdinfo("Not implemented\n"); return -ENOSYS; } @@ -848,7 +835,7 @@ static int sam_getcontrast(struct lcd_dev_s *dev) static int sam_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) { - lcdvdbg("contrast: %d\n", contrast); + lcdinfo("contrast: %d\n", contrast); return -ENOSYS; } @@ -868,13 +855,13 @@ static int sam_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) int board_lcd_initialize(void) { -#ifdef CONFIG_DEBUG_LCD +#ifdef CONFIG_DEBUG_LCD_INFO uint16_t hxregval; #endif uint32_t regval; unsigned int i; - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); /* Enable LCD EXTCS2 pins */ @@ -912,7 +899,8 @@ int board_lcd_initialize(void) /* Enable SMC peripheral clock */ putreg32((1 << SAM_PID_SMC), SAM_PMC_PCER); - regdbg("PMC PCSR: %08x SMC: %08x\n", getreg32(SAM_PMC_PCSR), (1 << SAM_PID_SMC)); + lcdinfo("PMC PCSR: %08x SMC: %08x\n", + getreg32(SAM_PMC_PCSR), (1 << SAM_PID_SMC)); /* Configure SMC CS2 */ @@ -932,21 +920,21 @@ int board_lcd_initialize(void) regval |= (SMCCS_MODE_READMODE) | (SMCCS_MODE_WRITEMODE) | (SMCCS_MODE_DBW_16BITS); putreg32(regval, SAM_SMCCS_MODE(2)); - regdbg("SMC SETUP[%08x]: %08x PULSE[%08x]: %08x\n", - SAM_SMCCS_SETUP(2), getreg32(SAM_SMCCS_SETUP(2)), - SAM_SMCCS_PULSE(2), getreg32(SAM_SMCCS_PULSE(2))); - regdbg(" CYCLE[%08x]: %08x MODE[%08x]: %08x\n", - SAM_SMCCS_CYCLE(2), getreg32(SAM_SMCCS_CYCLE(2)), - SAM_SMCCS_MODE(2), getreg32(SAM_SMCCS_MODE(2))); + lcdinfo("SMC SETUP[%08x]: %08x PULSE[%08x]: %08x\n", + SAM_SMCCS_SETUP(2), getreg32(SAM_SMCCS_SETUP(2)), + SAM_SMCCS_PULSE(2), getreg32(SAM_SMCCS_PULSE(2))); + lcdinfo(" CYCLE[%08x]: %08x MODE[%08x]: %08x\n", + SAM_SMCCS_CYCLE(2), getreg32(SAM_SMCCS_CYCLE(2)), + SAM_SMCCS_MODE(2), getreg32(SAM_SMCCS_MODE(2))); +#ifdef CONFIG_DEBUG_LCD_INFO /* Check HX8347 Chip ID */ -#ifdef CONFIG_DEBUG_LCD hxregval = sam_getreg(HX8347_R67H); - lcdvdbg("Chip ID: %04x\n", hxregval); + lcdinfo("Chip ID: %04x\n", hxregval); if (hxregval != HX8347_CHIPID) { - lcddbg("Bad chip ID: %04x Expected: %04x\n", hxregval, HX8347_CHIPID); + lcderr("ERROR: Bad chip ID: %04x Expected: %04x\n", hxregval, HX8347_CHIPID); return -ENODEV; } #endif @@ -1049,7 +1037,7 @@ int board_lcd_initialize(void) FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) { - lcdvdbg("lcddev: %d\n", lcddev); + lcdinfo("lcddev: %d\n", lcddev); return lcddev == 0 ? &g_lcddev_s.dev : NULL; } diff --git a/configs/sam3u-ek/src/sam_leds.c b/configs/sam3u-ek/src/sam_leds.c index ee31f1871673e4ad4a1a3b9543942048e39dc3e9..343f680876261e8611460f8bb6530124796decce 100644 --- a/configs/sam3u-ek/src/sam_leds.c +++ b/configs/sam3u-ek/src/sam_leds.c @@ -58,18 +58,6 @@ * 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 - #define LED_OFF 0 #define LED_ON 1 #define LED_NOCHANGE 2 diff --git a/configs/sam3u-ek/src/sam_mmcsd.c b/configs/sam3u-ek/src/sam_mmcsd.c index 2d44104cb0b60ae910af4cf1e5ab68332c331b7b..c411e2f3597791f2110dc4a4b74ec08b3e44119b 100644 --- a/configs/sam3u-ek/src/sam_mmcsd.c +++ b/configs/sam3u-ek/src/sam_mmcsd.c @@ -112,7 +112,7 @@ bool sam_cardinserted(unsigned char slot) { #ifdef GPIO_MCI_CD bool inserted = sam_gpioread(GPIO_MCI_CD); - fvdbg("inserted: %s\n", inserted ? "NO" : "YES"); + finfo("inserted: %s\n", inserted ? "NO" : "YES"); return !inserted; #else return true; @@ -135,7 +135,7 @@ bool sam_writeprotected(unsigned char slot) { #ifdef GPIO_MCI_WP bool protected = sam_gpioread(GPIO_MCI_WP); - fvdbg("protected: %s\n", inserted ? "YES" : "NO"); + finfo("protected: %s\n", inserted ? "YES" : "NO"); return protected; #else return false; diff --git a/configs/sam3u-ek/src/sam_spi.c b/configs/sam3u-ek/src/sam_spi.c index 014dff663559ae6802687091a02dafd217acf4ee..69215483606fb6e2a79660d08edbb86fb06874a8 100644 --- a/configs/sam3u-ek/src/sam_spi.c +++ b/configs/sam3u-ek/src/sam_spi.c @@ -55,32 +55,6 @@ #ifdef CONFIG_SAM34_SPI0 -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ diff --git a/configs/sam3u-ek/src/sam_touchscreen.c b/configs/sam3u-ek/src/sam_touchscreen.c index f45efa1ea7693bec389e8475e58022674dff26df..7dec7f8e7a3de83bdc6d8bac85322ccd20f172d4 100644 --- a/configs/sam3u-ek/src/sam_touchscreen.c +++ b/configs/sam3u-ek/src/sam_touchscreen.c @@ -156,7 +156,7 @@ static int tsc_attach(FAR struct ads7843e_config_s *state, xcpt_t isr) { /* Attach the ADS7843E interrupt */ - ivdbg("Attaching %p to IRQ %d\n", isr, SAM_TCS_IRQ); + iinfo("Attaching %p to IRQ %d\n", isr, SAM_TCS_IRQ); return irq_attach(SAM_TCS_IRQ, isr); } @@ -164,7 +164,7 @@ static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable) { /* Attach and enable, or detach and disable */ - ivdbg("IRQ:%d enable:%d\n", SAM_TCS_IRQ, enable); + iinfo("IRQ:%d enable:%d\n", SAM_TCS_IRQ, enable); if (enable) { sam_gpioirqenable(SAM_TCS_IRQ); @@ -182,7 +182,7 @@ static void tsc_clear(FAR struct ads7843e_config_s *state) static bool tsc_busy(FAR struct ads7843e_config_s *state) { -#if defined(CONFIG_DEBUG_INPUT) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_INPUT) && defined(CONFIG_DEBUG_INFO) static bool last = (bool)-1; #endif @@ -191,10 +191,10 @@ static bool tsc_busy(FAR struct ads7843e_config_s *state) */ bool busy = sam_gpioread(GPIO_TCS_BUSY); -#if defined(CONFIG_DEBUG_INPUT) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_INPUT) && defined(CONFIG_DEBUG_INFO) if (busy != last) { - ivdbg("busy:%d\n", busy); + iinfo("busy:%d\n", busy); last = busy; } #endif @@ -207,7 +207,7 @@ static bool tsc_pendown(FAR struct ads7843e_config_s *state) /* The /PENIRQ value is active low */ bool pendown = !sam_gpioread(GPIO_TCS_IRQ); - ivdbg("pendown:%d\n", pendown); + iinfo("pendown:%d\n", pendown); return pendown; } @@ -238,7 +238,7 @@ int board_tsc_setup(int minor) FAR struct spi_dev_s *dev; int ret; - idbg("minor %d\n", minor); + iinfo("minor %d\n", minor); DEBUGASSERT(minor == 0); /* Configure and enable the ADS7843E interrupt pin as an input */ @@ -255,7 +255,7 @@ int board_tsc_setup(int minor) dev = sam_spibus_initialize(TSC_CSNUM); if (!dev) { - idbg("Failed to initialize SPI chip select %d\n", TSC_CSNUM); + ierr("ERROR: Failed to initialize SPI chip select %d\n", TSC_CSNUM); return -ENODEV; } @@ -264,7 +264,7 @@ int board_tsc_setup(int minor) ret = ads7843e_register(dev, &g_tscinfo, CONFIG_ADS7843E_DEVMINOR); if (ret < 0) { - idbg("Failed to initialize SPI chip select %d\n", TSC_CSNUM); + ierr("ERROR: Failed to initialize SPI chip select %d\n", TSC_CSNUM); /* sam_spibus_uninitialize(dev); */ return -ENODEV; } diff --git a/configs/sam3u-ek/src/sam_usbdev.c b/configs/sam3u-ek/src/sam_usbdev.c index 6d189cee424427b21572c93a4f963a6d433e6b48..08a6c57bc86870e415f25c9dcc2450dfd3b6000a 100644 --- a/configs/sam3u-ek/src/sam_usbdev.c +++ b/configs/sam3u-ek/src/sam_usbdev.c @@ -75,5 +75,5 @@ void sam_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } diff --git a/configs/sam4e-ek/README.txt b/configs/sam4e-ek/README.txt index 90b979059ee30b87f4519cc28c4462bf467ee02a..6de1817b0155403bd22b67ca412cb02fa5711d73 100644 --- a/configs/sam4e-ek/README.txt +++ b/configs/sam4e-ek/README.txt @@ -815,7 +815,7 @@ USB Full-Speed Device -------------------- There is normal console debug output available that can be enabled with - CONFIG_DEBUG + CONFIG_DEBUG_USB. However, USB device operation is very + CONFIG_DEBUG_FEATURES + CONFIG_DEBUG_USB. However, USB device operation is very time critical and enabling this debug output WILL interfere with the operation of the UDP. USB device tracing is a less invasive way to get debug information: If tracing is enabled, the USB device will save @@ -943,9 +943,9 @@ Touchscreen debug output on UART0 can be enabled with: Build Setup: - CONFIG_DEBUG=y : Enable debug features - CONFIG_DEBUG_VERBOSE=y : Enable verbose debug output - CONFIG_DEBUG_INPUT=y : Enable debug output from input devices + CONFIG_DEBUG_FEATURES=y : Enable debug features + CONFIG_DEBUG_INFO=y : Enable verbose debug output + CONFIG_DEBUG_INPUT=y : Enable debug output from input devices STATUS: Verified 2014-05-14 @@ -1439,8 +1439,8 @@ Configurations debug output on UART0 can be enabled with: Build Setup: - CONFIG_DEBUG=y : Enable debug features - CONFIG_DEBUG_VERBOSE=y : Enable verbose debug output + CONFIG_DEBUG_FEATURES=y : Enable debug features + CONFIG_DEBUG_INFO=y : Enable verbose debug output CONFIG_DEBUG_INPUT=y : Enable debug output from input devices 10. This configuration can be re-configured to test the on-board LCD @@ -1554,7 +1554,6 @@ Configurations the system logging device: File Systems -> Advanced SYSLOG Features - 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" : UART0 will be /dev/ttyS0 diff --git a/configs/sam4e-ek/nsh/defconfig b/configs/sam4e-ek/nsh/defconfig index 869702660df91d516aa96c7e8a61b52a23a29ec3..8664c7d7a007b7136c0a780786044338c87d2574 100644 --- a/configs/sam4e-ek/nsh/defconfig +++ b/configs/sam4e-ek/nsh/defconfig @@ -42,10 +42,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -76,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 @@ -94,6 +96,7 @@ CONFIG_ARCH_CHIP_SAM34=y # 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 @@ -115,12 +118,15 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="sam34" +# 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 @@ -131,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 @@ -513,6 +520,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -527,7 +536,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -535,6 +549,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set CONFIG_MTD=y @@ -559,12 +574,15 @@ CONFIG_MTD_AT25=y CONFIG_AT25_SPIMODE=0 CONFIG_AT25_SPIFREQUENCY=20000000 # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP 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 @@ -617,6 +635,8 @@ CONFIG_ETH0_PHY_KSZ8051=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -640,10 +660,6 @@ CONFIG_USART1_SERIALDRIVER=y # 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 @@ -684,15 +700,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -849,12 +868,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -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=y # CONFIG_NETDB_HOSTFILE is not set CONFIG_NETDB_DNSCLIENT=y @@ -936,6 +951,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -966,15 +982,16 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_CONFIGDATA is not set # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -984,17 +1001,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1002,8 +1019,8 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1011,15 +1028,15 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -1039,8 +1056,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1053,20 +1070,21 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1168,6 +1186,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1212,13 +1231,13 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1227,6 +1246,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sam4e-ek/nxwm/defconfig b/configs/sam4e-ek/nxwm/defconfig index 5e2ebc17c0e5305202732e94d0c79fd46cdf14d4..5948ce08b8dd1a16abae7028f311748f8b255c21 100644 --- a/configs/sam4e-ek/nxwm/defconfig +++ b/configs/sam4e-ek/nxwm/defconfig @@ -42,10 +42,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -76,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 @@ -94,6 +96,7 @@ CONFIG_ARCH_CHIP_SAM34=y # 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 @@ -115,12 +118,15 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="sam34" +# 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 @@ -131,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 @@ -523,6 +530,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -554,10 +563,14 @@ CONFIG_ADS7843E_THRESHY=39 # CONFIG_DJOYSTICK is not set # CONFIG_AJOYSTICK is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set # CONFIG_LCD_NOGETRUN is not set @@ -586,11 +599,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set - -# -# Alphanumeric/Segment LCD Devices -# -# CONFIG_LCD_LCD1602 is not set +# CONFIG_SLCD is not set # # LED Support @@ -598,6 +607,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set CONFIG_MTD=y @@ -622,12 +632,15 @@ CONFIG_MTD_AT25=y CONFIG_AT25_SPIMODE=0 CONFIG_AT25_SPIFREQUENCY=20000000 # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP 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 @@ -680,6 +693,8 @@ CONFIG_ETH0_PHY_KSZ8051=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -703,10 +718,6 @@ CONFIG_USART1_SERIALDRIVER=y # 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 @@ -747,15 +758,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -911,12 +925,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -925,6 +933,7 @@ CONFIG_NX_LCDDRIVER=y CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x95fa # CONFIG_NX_WRITEONLY is not set +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -1090,6 +1099,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 @@ -1104,6 +1115,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1142,16 +1154,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -1162,17 +1175,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1180,8 +1193,8 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1189,15 +1202,15 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -1217,8 +1230,8 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1231,20 +1244,21 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1346,6 +1360,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1401,6 +1416,7 @@ CONFIG_NXWIDGETS_LISTENERSTACK=1596 # NXWidget Configuration # CONFIG_NXWIDGETS_BPP=16 +# CONFIG_NXWIDGETS_GREYSCALE is not set CONFIG_NXWIDGETS_SIZEOFCHAR=1 # @@ -1568,13 +1584,13 @@ CONFIG_NXWM_HEXCALCULATOR_FONTID=5 # # 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_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1583,6 +1599,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sam4e-ek/src/sam_ads7843e.c b/configs/sam4e-ek/src/sam_ads7843e.c index 70f83e94efc37848baf3a125770fd46ae428d13a..d4b555aa449622ae267038362a8153be702091fc 100644 --- a/configs/sam4e-ek/src/sam_ads7843e.c +++ b/configs/sam4e-ek/src/sam_ads7843e.c @@ -153,7 +153,7 @@ static int tsc_attach(FAR struct ads7843e_config_s *state, xcpt_t isr) { /* Attach the ADS7843E interrupt */ - ivdbg("Attaching %p to IRQ %d\n", isr, SAM_TCS_IRQ); + iinfo("Attaching %p to IRQ %d\n", isr, SAM_TCS_IRQ); return irq_attach(SAM_TCS_IRQ, isr); } @@ -161,7 +161,7 @@ static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable) { /* Attach and enable, or detach and disable */ - ivdbg("IRQ:%d enable:%d\n", SAM_TCS_IRQ, enable); + iinfo("IRQ:%d enable:%d\n", SAM_TCS_IRQ, enable); if (enable) { sam_gpioirqenable(SAM_TCS_IRQ); @@ -179,7 +179,7 @@ static void tsc_clear(FAR struct ads7843e_config_s *state) static bool tsc_busy(FAR struct ads7843e_config_s *state) { -#if defined(CONFIG_DEBUG_INPUT) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_INPUT) && defined(CONFIG_DEBUG_INFO) static bool last = (bool)-1; #endif @@ -188,10 +188,10 @@ static bool tsc_busy(FAR struct ads7843e_config_s *state) */ bool busy = sam_gpioread(GPIO_TCS_BUSY); -#if defined(CONFIG_DEBUG_INPUT) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_INPUT) && defined(CONFIG_DEBUG_INFO) if (busy != last) { - ivdbg("busy:%d\n", busy); + iinfo("busy:%d\n", busy); last = busy; } #endif @@ -204,7 +204,7 @@ static bool tsc_pendown(FAR struct ads7843e_config_s *state) /* The /PENIRQ value is active low */ bool pendown = !sam_gpioread(GPIO_TCS_IRQ); - ivdbg("pendown:%d\n", pendown); + iinfo("pendown:%d\n", pendown); return pendown; } @@ -235,7 +235,7 @@ int board_tsc_setup(int minor) FAR struct spi_dev_s *dev; int ret; - idbg("minor %d\n", minor); + iinfo("minor %d\n", minor); DEBUGASSERT(minor == 0); /* Configure and enable the ADS7843E interrupt pin as an input */ @@ -252,7 +252,7 @@ int board_tsc_setup(int minor) dev = sam_spibus_initialize(TSC_CSNUM); if (!dev) { - idbg("Failed to initialize SPI chip select %d\n", TSC_CSNUM); + ierr("ERROR: Failed to initialize SPI chip select %d\n", TSC_CSNUM); return -ENODEV; } @@ -261,7 +261,7 @@ int board_tsc_setup(int minor) ret = ads7843e_register(dev, &g_tscinfo, CONFIG_ADS7843E_DEVMINOR); if (ret < 0) { - idbg("Failed to initialize SPI chip select %d\n", TSC_CSNUM); + ierr("ERROR: Failed to initialize SPI chip select %d\n", TSC_CSNUM); /* sam_spibus_uninitialize(dev); */ return -ENODEV; } diff --git a/configs/sam4e-ek/src/sam_at25.c b/configs/sam4e-ek/src/sam_at25.c index 2b3473d6d9569405d226de52d1923c7259eb5755..27c61c7c9e05e3eff0e987d148811538ff25ec9d 100644 --- a/configs/sam4e-ek/src/sam_at25.c +++ b/configs/sam4e-ek/src/sam_at25.c @@ -88,7 +88,7 @@ int sam_at25_automount(int minor) spi = sam_spibus_initialize(FLASH_CSNUM); if (!spi) { - fdbg("ERROR: Failed to initialize SPI port %d\n", FLASH_CSNUM); + ferr("ERROR: Failed to initialize SPI port %d\n", FLASH_CSNUM); return -ENODEV; } @@ -97,7 +97,7 @@ int sam_at25_automount(int minor) mtd = at25_initialize(spi); if (!mtd) { - fdbg("ERROR: Failed to bind SPI port %d to the AT25 FLASH driver\n"); + ferr("ERROR: Failed to bind SPI port %d to the AT25 FLASH driver\n"); return -ENODEV; } @@ -109,7 +109,7 @@ int sam_at25_automount(int minor) ret = ftl_initialize(minor, mtd); if (ret < 0) { - fdbg("ERROR: Failed to initialize the FTL layer: %d\n", ret); + ferr("ERROR: Failed to initialize the FTL layer: %d\n", ret); return ret; } @@ -119,7 +119,7 @@ int sam_at25_automount(int minor) ret = nxffs_initialize(mtd); if (ret < 0) { - fdbg("ERROR: NXFFS initialization failed: %d\n", ret); + ferr("ERROR: NXFFS initialization failed: %d\n", ret); return ret; } @@ -128,7 +128,7 @@ int sam_at25_automount(int minor) ret = mount(NULL, "/mnt/at25", "nxffs", 0, NULL); if (ret < 0) { - fdbg("ERROR: Failed to mount the NXFFS volume: %d\n", errno); + ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno); return ret; } #endif diff --git a/configs/sam4e-ek/src/sam_ethernet.c b/configs/sam4e-ek/src/sam_ethernet.c index 0e1199307d31b11df4372b6285de25843413efe4..b15cf06107a524bc34bd9e4a397105bbdcd85ccd 100644 --- a/configs/sam4e-ek/src/sam_ethernet.c +++ b/configs/sam4e-ek/src/sam_ethernet.c @@ -42,8 +42,8 @@ /* Force verbose debug on in this file only to support unit-level testing. */ #ifdef CONFIG_NETDEV_PHY_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG_VERBOSE 1 +# undef CONFIG_DEBUG_INFO +# define CONFIG_DEBUG_INFO 1 # undef CONFIG_DEBUG_NET # define CONFIG_DEBUG_NET 1 #endif @@ -74,11 +74,13 @@ */ #ifdef CONFIG_NETDEV_PHY_DEBUG -# define phydbg dbg -# define phylldbg lldbg +# define phyerr _err +# define phywarn _warn +# define phyinfo _info #else -# define phydbg(x...) -# define phylldbg(x...) +# define phyerr(x...) +# define phywarn(x...) +# define phyinfo(x...) #endif /************************************************************************************ @@ -100,7 +102,7 @@ static xcpt_t g_emac_handler; #ifdef CONFIG_SAM34_GPIOD_IRQ static void sam_emac_phy_enable(bool enable) { - phydbg("IRQ%d: enable=%d\n", SAM_PHY_IRQ, enable); + phyinfo("IRQ%d: enable=%d\n", SAM_PHY_IRQ, enable); if (enable) { sam_gpioirqenable(SAM_PHY_IRQ); @@ -126,7 +128,7 @@ static void sam_emac_phy_enable(bool enable) void weak_function sam_netinitialize(void) { - phydbg("Configuring %08x\n", GPIO_PHY_IRQ); + phyinfo("Configuring %08x\n", GPIO_PHY_IRQ); sam_configgpio(GPIO_PHY_IRQ); } @@ -205,12 +207,12 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) DEBUGASSERT(intf); - nvdbg("%s: handler=%p\n", intf, handler); - phydbg("EMAC: devname=%s\n", SAM34_EMAC_DEVNAME); + ninfo("%s: handler=%p\n", intf, handler); + phyinfo("EMAC: devname=%s\n", SAM34_EMAC_DEVNAME); if (strcmp(intf, SAM34_EMAC_DEVNAME) == 0) { - phydbg("Select EMAC\n"); + phyinfo("Select EMAC\n"); phandler = &g_emac_handler; pinset = GPIO_PHY_IRQ; irq = SAM_PHY_IRQ; @@ -218,7 +220,7 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) } else { - ndbg("Unsupported interface: %s\n", intf); + nerr("ERROR: Unsupported interface: %s\n", intf); return NULL; } @@ -237,15 +239,15 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) if (handler) { - phydbg("Configure pin: %08x\n", pinset); + phyinfo("Configure pin: %08x\n", pinset); sam_gpioirq(pinset); - phydbg("Attach IRQ%d\n", irq); + phyinfo("Attach IRQ%d\n", irq); (void)irq_attach(irq, handler); } else { - phydbg("Detach IRQ%d\n", irq); + phyinfo("Detach IRQ%d\n", irq); (void)irq_detach(irq); enabler = NULL; } diff --git a/configs/sam4e-ek/src/sam_hsmci.c b/configs/sam4e-ek/src/sam_hsmci.c index 8577c0a318ee63ca461ed8669e9f16cb2105b7f5..e799cf0d1b94a3332b728b2e75144fa655e6d434 100644 --- a/configs/sam4e-ek/src/sam_hsmci.c +++ b/configs/sam4e-ek/src/sam_hsmci.c @@ -144,7 +144,7 @@ int sam_hsmci_initialize(int minor) g_hsmci.hsmci = sdio_initialize(0); if (!g_hsmci.hsmci) { - fdbg("Failed to initialize SDIO\n"); + ferr("ERROR: Failed to initialize SDIO\n"); return -ENODEV; } @@ -153,7 +153,7 @@ int sam_hsmci_initialize(int minor) ret = mmcsd_slotinitialize(minor, g_hsmci.hsmci); if (ret != OK) { - fdbg("Failed to bind SDIO to the MMC/SD driver: %d\n", ret); + ferr("ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); return ret; } @@ -194,7 +194,7 @@ bool sam_cardinserted(int slotno) /* Get the state of the GPIO pin */ removed = sam_gpioread(GPIO_MCI_CD); - fllvdbg("Slot %d inserted: %s\n", slotno, removed ? "NO" : "YES"); + finfo("Slot %d inserted: %s\n", slotno, removed ? "NO" : "YES"); return !removed; } diff --git a/configs/sam4e-ek/src/sam_ili9325.c b/configs/sam4e-ek/src/sam_ili9325.c index 532e208037790633b1f37f763cb6846f4429b14e..19c00ebd2d64efa0c51c698829580c7af7c322c8 100644 --- a/configs/sam4e-ek/src/sam_ili9325.c +++ b/configs/sam4e-ek/src/sam_ili9325.c @@ -197,21 +197,6 @@ # define CONFIG_SAM4EEK_LCD_BGCOLOR 0 #endif -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must - * also be enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -# undef CONFIG_LCD_REGDEBUG -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif - /* Display/Color Properties ***********************************************************/ /* Display Resolution */ @@ -266,16 +251,6 @@ #define BKL_ENABLE_DURATION (128*1024) #define BKL_DISABLE_DURATION (128*1024) -/* Debug ******************************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /************************************************************************************ * Private Type Definition ************************************************************************************/ @@ -703,7 +678,7 @@ static int sam_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer, /* Buffer must be provided and aligned to a 16-bit address boundary */ - lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0); /* Set the cursor position */ @@ -818,7 +793,7 @@ static int sam_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); - lcdvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n", + lcdinfo("fmt: %d xres: %d yres: %d nplanes: %d\n", g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes); memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s)); return OK; @@ -836,7 +811,7 @@ static int sam_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, FAR struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(dev && pinfo && planeno == 0); - lcdvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); + lcdinfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); return OK; } @@ -854,7 +829,7 @@ static int sam_getpower(struct lcd_dev_s *dev) { FAR struct sam_dev_s *priv = (FAR struct sam_dev_s *)dev; - lcdvdbg("power: %d\n", 0); + lcdinfo("power: %d\n", 0); return priv->power; } @@ -871,7 +846,7 @@ static int sam_setpower(struct lcd_dev_s *dev, int power) { FAR struct sam_dev_s *priv = (FAR struct sam_dev_s *)dev; - lcdvdbg("power: %d\n", power); + lcdinfo("power: %d\n", power); DEBUGASSERT((unsigned)power <= CONFIG_LCD_MAXPOWER); /* Set new power level */ @@ -910,7 +885,7 @@ static int sam_setpower(struct lcd_dev_s *dev, int power) static int sam_getcontrast(struct lcd_dev_s *dev) { - lcdvdbg("Not implemented\n"); + lcdinfo("Not implemented\n"); return -ENOSYS; } @@ -924,7 +899,7 @@ static int sam_getcontrast(struct lcd_dev_s *dev) static int sam_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) { - lcdvdbg("contrast: %d\n", contrast); + lcdinfo("contrast: %d\n", contrast); return -ENOSYS; } @@ -1286,13 +1261,13 @@ static inline int sam_lcd_initialize(void) /* Check the LCD ID */ id = sam_read_reg(ILI9325_DEVICE_CODE_REG); - lcdvdbg("LCD ID: %04x\n", id); + lcdinfo("LCD ID: %04x\n", id); /* Initialize the LCD hardware */ if (id != ILI9325_DEVICE_CODE) { - lcddbg("ERROR: Unsupported LCD: %04x\n", id); + lcderr("ERROR: Unsupported LCD: %04x\n", id); return -ENODEV; } @@ -1319,7 +1294,7 @@ int board_lcd_initialize(void) FAR struct sam_dev_s *priv = &g_lcddev; int ret; - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); /* Configure all LCD pins pins (backlight is initially off) */ diff --git a/configs/sam4e-ek/src/sam_ili9341.c b/configs/sam4e-ek/src/sam_ili9341.c index 4864e17c96d76e3d96900304e2006a67832f70c1..8b689123896220fa1f8d63ee788ce82e5c086534 100644 --- a/configs/sam4e-ek/src/sam_ili9341.c +++ b/configs/sam4e-ek/src/sam_ili9341.c @@ -198,21 +198,6 @@ # define CONFIG_SAM4EEK_LCD_BGCOLOR 0 #endif -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must - * also be enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -# undef CONFIG_LCD_REGDEBUG -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif - /* Display/Color Properties ***********************************************************/ /* Display Resolution */ @@ -269,16 +254,6 @@ #define BKL_ENABLE_DURATION (128*1024) #define BKL_DISABLE_DURATION (128*1024) -/* Debug ******************************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /************************************************************************************ * Private Type Definition ************************************************************************************/ @@ -503,7 +478,7 @@ static void sam_setwindow(sam_color_t row, sam_color_t col, { uint8_t buffer[4]; - lcdvdbg("row=%d col=%d width=%d height=%d\n", row, col, width, height); + lcdinfo("row=%d col=%d width=%d height=%d\n", row, col, width, height); /* Set Column Address Position */ @@ -654,7 +629,7 @@ static void sam_set_backlight(unsigned int power) unsigned int level; int i; - lcdvdbg("power=%d\n", power); + lcdinfo("power=%d\n", power); /* Scale the power setting to the range 1...BKL_LEVELS */ @@ -696,7 +671,7 @@ static void sam_set_backlight(unsigned int power) static int sam_poweroff(FAR struct sam_dev_s *priv) { - lcdvdbg("OFF\n"); + lcdinfo("OFF\n"); /* Turn the display off */ @@ -739,7 +714,7 @@ static int sam_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer, /* Buffer must be provided and aligned to a 16-bit address boundary */ - lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); #if defined(CONFIG_SAM4EEK_LCD_RGB565) DEBUGASSERT(src && ((uintptr_t)src & 1) == 0); @@ -797,7 +772,7 @@ static int sam_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, /* Buffer must be provided and aligned to a 16-bit address boundary */ - lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); #if defined(CONFIG_SAM4EEK_LCD_RGB565) DEBUGASSERT(dest && ((uintptr_t)dest & 1) == 0); @@ -840,7 +815,7 @@ static int sam_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); - lcdvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n", + lcdinfo("fmt: %d xres: %d yres: %d nplanes: %d\n", g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes); memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s)); return OK; @@ -858,7 +833,7 @@ static int sam_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, FAR struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(dev && pinfo && planeno == 0); - lcdvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); + lcdinfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); return OK; } @@ -876,7 +851,7 @@ static int sam_getpower(struct lcd_dev_s *dev) { FAR struct sam_dev_s *priv = (FAR struct sam_dev_s *)dev; - lcdvdbg("power: %d\n", 0); + lcdinfo("power: %d\n", 0); return priv->power; } @@ -893,7 +868,7 @@ static int sam_setpower(struct lcd_dev_s *dev, int power) { FAR struct sam_dev_s *priv = (FAR struct sam_dev_s *)dev; - lcdvdbg("power: %d\n", power); + lcdinfo("power: %d\n", power); DEBUGASSERT((unsigned)power <= CONFIG_LCD_MAXPOWER); /* Set new power level */ @@ -930,7 +905,7 @@ static int sam_setpower(struct lcd_dev_s *dev, int power) static int sam_getcontrast(struct lcd_dev_s *dev) { - lcdvdbg("Not implemented\n"); + lcdinfo("Not implemented\n"); return -ENOSYS; } @@ -944,7 +919,7 @@ static int sam_getcontrast(struct lcd_dev_s *dev) static int sam_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) { - lcdvdbg("contrast: %d\n", contrast); + lcdinfo("contrast: %d\n", contrast); return -ENOSYS; } @@ -1171,7 +1146,7 @@ static inline int sam_lcd_initialize(void) id = ((uint16_t)buffer[2] << 8) | (uint16_t)buffer[3]; if (id != ILI9341_DEVICE_CODE) { - lcddbg("ERROR: Unsupported LCD: %04x\n", id); + lcderr("ERROR: Unsupported LCD: %04x\n", id); return -ENODEV; } @@ -1198,7 +1173,7 @@ int board_lcd_initialize(void) FAR struct sam_dev_s *priv = &g_lcddev; int ret; - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); /* Configure all LCD pins pins (backlight is initially off) */ diff --git a/configs/sam4e-ek/src/sam_leds.c b/configs/sam4e-ek/src/sam_leds.c index 6f32ed2ae1b92328025f8f76e18e66bbc5365367..cb9f5910788c04fdc53aba4da0524edda8f7b3ff 100644 --- a/configs/sam4e-ek/src/sam_leds.c +++ b/configs/sam4e-ek/src/sam_leds.c @@ -98,18 +98,6 @@ #define D4_ON (LED_ON << D4_SHIFT) #define D4_NOCHANGE (LED_NOCHANGE << D4_SHIFT) -/* 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 Data ****************************************************************************/ diff --git a/configs/sam4e-ek/src/sam_spi.c b/configs/sam4e-ek/src/sam_spi.c index 01b38608280d906bdb9d6efcb4b944dc278d1913..a26a95c17dbd0ee49d8a82e046c4f4286f2458c3 100644 --- a/configs/sam4e-ek/src/sam_spi.c +++ b/configs/sam4e-ek/src/sam_spi.c @@ -55,32 +55,6 @@ #if defined(CONFIG_SAM34_SPI0) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ diff --git a/configs/sam4e-ek/src/sam_udp.c b/configs/sam4e-ek/src/sam_udp.c index 8c271ba90ac93c8263f75be4cf7fa044e4fd7400..8a2213f9d2a93e67c5dd6e5bd1a3a06f43be95ea 100644 --- a/configs/sam4e-ek/src/sam_udp.c +++ b/configs/sam4e-ek/src/sam_udp.c @@ -83,5 +83,5 @@ void sam_udp_suspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } diff --git a/configs/sam4e-ek/usbnsh/defconfig b/configs/sam4e-ek/usbnsh/defconfig index 58b643af0cb5c8876da28aec08f29e8e9aeafc34..0ea1481ce880eeb8c11875e04609ead0181c4b58 100644 --- a/configs/sam4e-ek/usbnsh/defconfig +++ b/configs/sam4e-ek/usbnsh/defconfig @@ -42,10 +42,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -76,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 @@ -94,6 +96,7 @@ CONFIG_ARCH_CHIP_SAM34=y # 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 @@ -115,12 +118,15 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="sam34" +# 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 @@ -131,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 @@ -514,6 +521,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -528,7 +537,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -536,6 +550,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set CONFIG_MTD=y @@ -560,12 +575,15 @@ CONFIG_MTD_AT25=y CONFIG_AT25_SPIMODE=0 CONFIG_AT25_SPIFREQUENCY=20000000 # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP 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 @@ -618,6 +636,7 @@ CONFIG_ETH0_PHY_KSZ8051=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y +# CONFIG_SERIAL_CONSOLE is not set # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -641,10 +660,6 @@ CONFIG_USART1_SERIALDRIVER=y # 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 @@ -712,8 +727,8 @@ CONFIG_CDCACM_EPBULKOUT_HSSIZE=512 CONFIG_CDCACM_EPBULKIN=3 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 @@ -725,14 +740,19 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +CONFIG_SYSLOG_CHAR=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set +CONFIG_SYSLOG_CHAR_CRLF=y +CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" # # Networking Support @@ -886,14 +906,6 @@ CONFIG_FAT_MAXFNAME=32 # CONFIG_FS_PROCFS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -CONFIG_SYSLOG=y -# CONFIG_SYSLOG_TIMESTAMP is not set -CONFIG_SYSLOG_CHAR=y -CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" - # # Graphics Support # @@ -961,6 +973,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 @@ -975,6 +989,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1005,15 +1020,16 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_CONFIGDATA is not set # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1023,17 +1039,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1041,8 +1057,8 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1050,15 +1066,15 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -1078,8 +1094,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1092,20 +1108,21 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1208,6 +1225,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1252,13 +1270,14 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CDCACM is not set # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1267,7 +1286,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sam4l-xplained/nsh/defconfig b/configs/sam4l-xplained/nsh/defconfig index 223ce701c654f49ef98b03333f28bf6a56a7c92f..c848386d6b3f1040f0b7ba55b943638d371a73dd 100644 --- a/configs/sam4l-xplained/nsh/defconfig +++ b/configs/sam4l-xplained/nsh/defconfig @@ -42,10 +42,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -76,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 @@ -94,6 +96,7 @@ CONFIG_ARCH_CHIP_SAM34=y # 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 @@ -115,12 +118,15 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="sam34" +# 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 @@ -131,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 @@ -487,7 +494,12 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -495,6 +507,7 @@ CONFIG_DEV_NULL=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -506,6 +519,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -529,10 +544,6 @@ CONFIG_USART0_SERIALDRIVER=y # 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 @@ -559,15 +570,18 @@ CONFIG_USART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -605,12 +619,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -673,11 +681,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -721,10 +732,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -734,17 +745,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -752,17 +763,16 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -784,8 +794,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -796,6 +806,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 @@ -908,12 +919,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -921,6 +932,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sam4l-xplained/src/sam_autoleds.c b/configs/sam4l-xplained/src/sam_autoleds.c index aa256593909a7cad6fb948f9b5c7339de9b0d73b..5f86fda6380c903e9a93203434f9ca729c0bc87d 100644 --- a/configs/sam4l-xplained/src/sam_autoleds.c +++ b/configs/sam4l-xplained/src/sam_autoleds.c @@ -77,30 +77,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/sam4l-xplained/src/sam_mmcsd.c b/configs/sam4l-xplained/src/sam_mmcsd.c index bc5fd368c737ba9ce1a4e34ef56340187264ce27..4cd42ab6c23215d360a76d446619127d6e61cf62 100644 --- a/configs/sam4l-xplained/src/sam_mmcsd.c +++ b/configs/sam4l-xplained/src/sam_mmcsd.c @@ -94,31 +94,31 @@ int sam_sdinitialize(int minor) /* Get the SPI driver instance for the SD chip select */ - fvdbg("Initializing SPI chip select %d\n", SD_CSNO); + finfo("Initializing SPI chip select %d\n", SD_CSNO); spi = sam_spibus_initialize(SD_CSNO); if (!spi) { - fdbg("Failed to initialize SPI chip select %d\n", SD_CSNO); + ferr("ERROR: Failed to initialize SPI chip select %d\n", SD_CSNO); return -ENODEV; } - fvdbg("Successfully initialized SPI chip select %d\n", SD_CSNO); + finfo("Successfully initialized SPI chip select %d\n", SD_CSNO); /* Bind the SPI device for the chip select to the slot */ - fvdbg("Binding SPI chip select %d to MMC/SD slot %d\n", + finfo("Binding SPI chip select %d to MMC/SD slot %d\n", SD_CSNO, SAM34_MMCSDSLOTNO); ret = mmcsd_spislotinitialize(minor, SAM34_MMCSDSLOTNO, spi); if (ret < 0) { - fdbg("Failed to bind SPI chip select %d to MMC/SD slot %d: %d\n", + ferr("ERROR: Failed to bind SPI chip select %d to MMC/SD slot %d: %d\n", SD_CSNO, SAM34_MMCSDSLOTNO, ret); return ret; } - fvdbg("Successfuly bound SPI chip select %d to MMC/SD slot %d\n", + finfo("Successfuly bound SPI chip select %d to MMC/SD slot %d\n", SD_CSNO, SAM34_MMCSDSLOTNO); return OK; diff --git a/configs/sam4l-xplained/src/sam_slcd.c b/configs/sam4l-xplained/src/sam_slcd.c index 3b0d61bc36bbbc04cf1a138c266d437324672ddd..28b86101c5e6c6bdaa2438bb516e382e8603b728 100644 --- a/configs/sam4l-xplained/src/sam_slcd.c +++ b/configs/sam4l-xplained/src/sam_slcd.c @@ -72,10 +72,6 @@ ****************************************************************************/ /* Configuration ************************************************************/ -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug - * must also be enabled. - */ - #ifndef CONFIG_LIB_SLCDCODEC # error This SLCD driver requires CONFIG_LIB_SLCDCODEC #endif @@ -85,16 +81,6 @@ # error CONFIG_SAM34_RC32K be selected in the board configuration #endif -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif - /* The ever-present MIN/MAX macros ******************************************/ #ifndef MIN @@ -248,16 +234,6 @@ #define SLCD_PM (&g_einfo[6]) #define SLCD_AM (&g_einfo[7]) -/* Debug ********************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /**************************************************************************** * Private Type Definition ****************************************************************************/ @@ -294,7 +270,7 @@ struct slcd_pixel_s ****************************************************************************/ /* Debug */ -#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_LCD_INFO static void slcd_dumpstate(FAR const char *msg); static void slcd_dumpslcd(FAR const char *msg); #else @@ -405,16 +381,16 @@ static const struct slcd_pixel_s g_einfo[SLCD_NE] = * Name: slcd_dumpstate ****************************************************************************/ -#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_LCD_INFO static void slcd_dumpstate(FAR const char *msg) { - lcdvdbg("%s:\n", msg); - lcdvdbg(" curpos: %d\n", + lcdinfo("%s:\n", msg); + lcdinfo(" curpos: %d\n", g_slcdstate.curpos); - lcdvdbg(" Display: [%c%c%c%c%c]\n", + lcdinfo(" Display: [%c%c%c%c%c]\n", g_slcdstate.buffer[0], g_slcdstate.buffer[1], g_slcdstate.buffer[2], g_slcdstate.buffer[3], g_slcdstate.buffer[4]); - lcdvdbg(" Options: [%d%d%d%d%d]\n", + lcdinfo(" Options: [%d%d%d%d%d]\n", g_slcdstate.options[0], g_slcdstate.options[1], g_slcdstate.options[2], g_slcdstate.options[3], g_slcdstate.options[4]); } @@ -424,23 +400,23 @@ static void slcd_dumpstate(FAR const char *msg) * Name: slcd_dumpslcd ****************************************************************************/ -#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_LCD_INFO static void slcd_dumpslcd(FAR const char *msg) { - lcdvdbg("%s:\n", msg); - lcdvdbg(" CFG: %08x TIM: %08x SR: %08x\n", + lcdinfo("%s:\n", msg); + lcdinfo(" CFG: %08x TIM: %08x SR: %08x\n", getreg32(SAM_LCDCA_CFG), getreg32(SAM_LCDCA_TIM), getreg32(SAM_LCDCA_SR)); - lcdvdbg(" DR0: %02x %08x DR1: %02x %08x\n", + lcdinfo(" DR0: %02x %08x DR1: %02x %08x\n", getreg32(SAM_LCDCA_DRH0), getreg32(SAM_LCDCA_DRL0), getreg32(SAM_LCDCA_DRH1), getreg32(SAM_LCDCA_DRL1)); - lcdvdbg(" DR2: %02x %08x DR3: %02x %08x\n", + lcdinfo(" DR2: %02x %08x DR3: %02x %08x\n", getreg32(SAM_LCDCA_DRH2), getreg32(SAM_LCDCA_DRL2), getreg32(SAM_LCDCA_DRH3), getreg32(SAM_LCDCA_DRL3)); - lcdvdbg(" BCFG: %08x CSRCFG: %08x CMCFG: %08x ACMCFG: %08x\n", + lcdinfo(" BCFG: %08x CSRCFG: %08x CMCFG: %08x ACMCFG: %08x\n", getreg32(SAM_LCDCA_BCFG), getreg32(SAM_LCDCA_CSRCFG), getreg32(SAM_LCDCA_CMCFG), getreg32(SAM_LCDCA_ACMCFG)); - lcdvdbg(" ABMCFG: %08x IMR: %08x VER: %08x\n", + lcdinfo(" ABMCFG: %08x IMR: %08x VER: %08x\n", getreg32(SAM_LCDCA_ABMCFG), getreg32(SAM_LCDCA_IMR), getreg32(SAM_LCDCA_VERSION)); } @@ -453,7 +429,7 @@ static void slcd_dumpslcd(FAR const char *msg) #if 0 /* Not used */ static void slcd_clear(void) { - lvdbg("Clearing\n"); + linfo("Clearing\n"); /* Clear display memory */ @@ -611,7 +587,7 @@ static int slcd_setcontrast(unsigned int contrast) regval |= LCDCA_CFG_FCST(scontrast); putreg32(regval, SAM_LCDCA_CFG); - lcdvdbg("contrast: %d CFG: %08x\n", contrast, getreg32(SAM_LCDCA_CFG)); + lcdinfo("contrast: %d CFG: %08x\n", contrast, getreg32(SAM_LCDCA_CFG)); return ret; } @@ -666,7 +642,7 @@ static void slcd_writech(uint8_t ch, uint8_t curpos, uint8_t options) static void slcd_action(enum slcdcode_e code, uint8_t count) { - lcdvdbg("Action: %d count: %d\n", code, count); + lcdinfo("Action: %d count: %d\n", code, count); slcd_dumpstate("BEFORE ACTION"); switch (code) @@ -918,7 +894,7 @@ static ssize_t slcd_write(FAR struct file *filep, options = 0; while ((result = slcd_decode(&instream.stream, &state, &ch, &count)) != SLCDRET_EOF) { - lcdvdbg("slcd_decode returned result=%d char=%d count=%d\n", + lcdinfo("slcd_decode returned result=%d char=%d count=%d\n", result, ch, count); if (result == SLCDRET_CHAR) /* A normal character was returned */ @@ -970,7 +946,7 @@ static ssize_t slcd_write(FAR struct file *filep, else if (ch < 128) { - lcdvdbg("ch: %c[%02x] options: %02x\n", ch, ch, options); + lcdinfo("ch: %c[%02x] options: %02x\n", ch, ch, options); /* Write the character at the current cursor position */ @@ -1021,7 +997,7 @@ static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { FAR struct slcd_attributes_s *attr = (FAR struct slcd_attributes_s *)((uintptr_t)arg); - lcdvdbg("SLCDIOC_GETATTRIBUTES:\n"); + lcdinfo("SLCDIOC_GETATTRIBUTES:\n"); if (!attr) { @@ -1046,7 +1022,7 @@ static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { FAR struct slcd_curpos_s *curpos = (FAR struct slcd_curpos_s *)((uintptr_t)arg); - lcdvdbg("SLCDIOC_CURPOS: row=0 column=%d\n", g_slcdstate.curpos); + lcdinfo("SLCDIOC_CURPOS: row=0 column=%d\n", g_slcdstate.curpos); if (!curpos) { @@ -1065,7 +1041,7 @@ static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SLCDIOC_SETBAR: { - lcdvdbg("SLCDIOC_SETBAR: arg=0x%02lx\n", arg); + lcdinfo("SLCDIOC_SETBAR: arg=0x%02lx\n", arg); if ((arg & 1) != 0) { @@ -1120,7 +1096,7 @@ static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg) } *contrast = (int)slcd_getcontrast(); - lcdvdbg("SLCDIOC_GETCONTRAST: contrast=%d\n", *contrast); + lcdinfo("SLCDIOC_GETCONTRAST: contrast=%d\n", *contrast); } break; @@ -1131,7 +1107,7 @@ static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SLCDIOC_SETCONTRAST: { - lcdvdbg("SLCDIOC_SETCONTRAST: arg=%ld\n", arg); + lcdinfo("SLCDIOC_SETCONTRAST: arg=%ld\n", arg); if (arg > SLCD_MAXCONTRAST) { @@ -1197,7 +1173,7 @@ int sam_slcd_initialize(void) if (!g_slcdstate.initialized) { - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); /* Configure LCD GPIO pins */ diff --git a/configs/sam4l-xplained/src/sam_spi.c b/configs/sam4l-xplained/src/sam_spi.c index 8c45e010e331d092395c8edf79f263abd8f8e6e9..47e7741e5024b9e7742a9e127dbf8a052415222c 100644 --- a/configs/sam4l-xplained/src/sam_spi.c +++ b/configs/sam4l-xplained/src/sam_spi.c @@ -51,31 +51,6 @@ #ifdef CONFIG_SAM34_SPI0 -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ diff --git a/configs/sam4l-xplained/src/sam_ug2832hsweg04.c b/configs/sam4l-xplained/src/sam_ug2832hsweg04.c index 1d60b6710c1cb15ac9a460a984cfbae141330b7b..a99aacc987159a2c6f8b608cc0fbb1217e15cc75 100644 --- a/configs/sam4l-xplained/src/sam_ug2832hsweg04.c +++ b/configs/sam4l-xplained/src/sam_ug2832hsweg04.c @@ -114,16 +114,6 @@ # error "The OLED driver requires CONFIG_SPI_CMDDATA in the configuration" #endif -/* Debug ********************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__) -# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -157,7 +147,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) spi = sam_spibus_initialize(OLED_CSNO); if (!spi) { - lcddbg("Failed to initialize SPI port 1\n"); + lcderr("ERROR: Failed to initialize SPI port 1\n"); } else { @@ -166,11 +156,11 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) dev = ssd1306_initialize(spi, devno); if (!dev) { - lcddbg("Failed to bind SPI port 1 to OLED %d: %d\n", devno); + lcderr("ERROR: Failed to bind SPI port 1 to OLED %d: %d\n", devno); } else { - lcdvdbg("Bound SPI port 1 to OLED %d\n", devno); + lcdinfo("Bound SPI port 1 to OLED %d\n", devno); /* And turn the OLED on */ diff --git a/configs/sam4l-xplained/src/sam_userleds.c b/configs/sam4l-xplained/src/sam_userleds.c index 8e053363ce53fc0fec1e5c24627d0256fa749247..ff14e0b21007cd856478f83ae0688779a10c0aad 100644 --- a/configs/sam4l-xplained/src/sam_userleds.c +++ b/configs/sam4l-xplained/src/sam_userleds.c @@ -62,22 +62,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/sam4s-xplained-pro/nsh/defconfig b/configs/sam4s-xplained-pro/nsh/defconfig index d5008bd41a2a794da99850e13e15745f017b0a0d..eae881f10a4c4c88eac7f072a7643b48d2a0e930 100644 --- a/configs/sam4s-xplained-pro/nsh/defconfig +++ b/configs/sam4s-xplained-pro/nsh/defconfig @@ -43,10 +43,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -77,6 +78,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 +97,7 @@ CONFIG_ARCH_CHIP_SAM34=y # 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 @@ -116,12 +119,15 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="sam34" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +CONFIG_ARM_TOOLCHAIN_GNU=y CONFIG_ARMV7M_USEBASEPRI=y 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=y CONFIG_ARM_MPU_NREGIONS=8 @@ -133,6 +139,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=y # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -517,6 +524,7 @@ CONFIG_RTC=y CONFIG_RTC_HIRES=y CONFIG_RTC_FREQUENCY=32768 CONFIG_RTC_ALARM=y +CONFIG_RTC_NALARMS=1 # CONFIG_RTC_DRIVER is not set # CONFIG_RTC_EXTERNAL is not set CONFIG_WATCHDOG=y @@ -527,7 +535,12 @@ CONFIG_WATCHDOG_DEVPATH="/dev/watchdog0" # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -535,6 +548,7 @@ CONFIG_WATCHDOG_DEVPATH="/dev/watchdog0" # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -558,6 +572,7 @@ CONFIG_PIPES=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -581,10 +596,6 @@ CONFIG_USART1_SERIALDRIVER=y # 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 @@ -666,8 +677,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=250 CONFIG_CDCACM_RXBUFSIZE=1024 CONFIG_CDCACM_TXBUFSIZE=1024 @@ -679,15 +690,18 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -740,12 +754,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -811,12 +819,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -862,10 +873,10 @@ CONFIG_EXAMPLES_CPUHOG_PRIORITY=50 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -875,17 +886,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -903,18 +914,18 @@ CONFIG_EXAMPLES_SERIALRX_PRINTHEX=y # CONFIG_EXAMPLES_SERIALRX_PRINTSTR 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set -# CONFIG_EXAMPLES_TIMER is not set # CONFIG_EXAMPLES_TIFF is not set +# CONFIG_EXAMPLES_TIMER 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_WEBSERVER is not set # # File System Utilities @@ -938,8 +949,8 @@ CONFIG_EXAMPLES_SERIALRX_PRINTHEX=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -950,6 +961,7 @@ CONFIG_EXAMPLES_SERIALRX_PRINTHEX=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 @@ -1066,12 +1078,13 @@ CONFIG_NSH_ARCHINIT=y # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CDCACM is not set # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1079,7 +1092,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sam4s-xplained-pro/src/sam_autoleds.c b/configs/sam4s-xplained-pro/src/sam_autoleds.c index 442e0ad7365508d5359368dcf275ff13cb6efbd3..2855559f129e13db6cea0992c080e7d036d55099 100644 --- a/configs/sam4s-xplained-pro/src/sam_autoleds.c +++ b/configs/sam4s-xplained-pro/src/sam_autoleds.c @@ -53,9 +53,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ /* If CONFIG_ARCH_LEDs is defined, then NuttX will control the LED on * board the SAM4S Xplained Pro. The following definitions describe how NuttX * controls the LEDs: @@ -74,26 +71,6 @@ * LED_IDLE MCU is is sleep mode Not used */ -/* 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/sam4s-xplained-pro/src/sam_hsmci.c b/configs/sam4s-xplained-pro/src/sam_hsmci.c index eedc7a475a2457999987514815fac3ad757fe163..e71e948de829c848f253b42af4fd5efeab6172b3 100644 --- a/configs/sam4s-xplained-pro/src/sam_hsmci.c +++ b/configs/sam4s-xplained-pro/src/sam_hsmci.c @@ -135,7 +135,7 @@ static int sam_hsmci_cardetect_int(int irq, void *regs) int sam_hsmci_initialize(void) { int ret; - fdbg("Initializing SDIO\n"); + finfo("Initializing SDIO\n"); /* Have we already initialized? */ @@ -147,7 +147,7 @@ int sam_hsmci_initialize(void) g_hsmci.hsmci = sdio_initialize(CONFIG_NSH_MMCSDSLOTNO); if (!g_hsmci.hsmci) { - fdbg("Failed to initialize SDIO\n"); + ferr("ERROR: Failed to initialize SDIO\n"); return -ENODEV; } @@ -156,7 +156,7 @@ int sam_hsmci_initialize(void) ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, g_hsmci.hsmci); if (ret != OK) { - fdbg("Failed to bind SDIO to the MMC/SD driver: %d\n", ret); + ferr("ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); return ret; } @@ -207,7 +207,7 @@ bool sam_cardinserted(int slotno) /* Get the state of the GPIO pin */ removed = sam_gpioread(GPIO_MCI_CD); - fllvdbg("Slot %d inserted: %s\n", slotno, removed ? "NO" : "YES"); + finfo("Slot %d inserted: %s\n", slotno, removed ? "NO" : "YES"); return !removed; } diff --git a/configs/sam4s-xplained-pro/src/sam_tc.c b/configs/sam4s-xplained-pro/src/sam_tc.c index afd92aacd8f43d6aa1ccaab27c79490333967eb9..f00fd42c04279eef4d7312157eceb54b547384cc 100644 --- a/configs/sam4s-xplained-pro/src/sam_tc.c +++ b/configs/sam4s-xplained-pro/src/sam_tc.c @@ -95,34 +95,6 @@ # define CONFIG_RTT_DEVPATH "/dev/rtt0" #endif -/* Timer Definitions ********************************************************/ - -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the watchdog - * timer - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_TIMER -#endif - -#ifdef CONFIG_DEBUG_TIMER -# define tcdbg dbg -# define tclldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define tcvdbg vdbg -# define tcllvdbg llvdbg -# else -# define tcvdbg(x...) -# define tcllvdbg(x...) -# endif -#else -# define tcdbg(x...) -# define tclldbg(x...) -# define tcvdbg(x...) -# define tcllvdbg(x...) -#endif - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -168,37 +140,37 @@ int sam_timerinitialize(void) /* Initialize and register the timer devices */ #if defined(CONFIG_SAM34_TC0) - tcvdbg("Initializing %s...\n", CONFIG_TIMER0_DEVPATH); + tmrinfo("Initializing %s...\n", CONFIG_TIMER0_DEVPATH); sam_tcinitialize(CONFIG_TIMER0_DEVPATH, SAM_IRQ_TC0); #endif #if defined(CONFIG_SAM34_TC1) - tcvdbg("Initializing %s...\n", CONFIG_TIMER1_DEVPATH); + tmrinfo("Initializing %s...\n", CONFIG_TIMER1_DEVPATH); sam_tcinitialize(CONFIG_TIMER1_DEVPATH, SAM_IRQ_TC1); #endif #if defined(CONFIG_SAM34_TC2) - tcvdbg("Initializing %s...\n", CONFIG_TIMER2_DEVPATH); + tmrinfo("Initializing %s...\n", CONFIG_TIMER2_DEVPATH); sam_tcinitialize(CONFIG_TIMER2_DEVPATH, SAM_IRQ_TC2); #endif #if defined(CONFIG_SAM34_TC3) - tcvdbg("Initializing %s...\n", CONFIG_TIMER3_DEVPATH); + tmrinfo("Initializing %s...\n", CONFIG_TIMER3_DEVPATH); sam_tcinitialize(CONFIG_TIMER3_DEVPATH, SAM_IRQ_TC3); #endif #if defined(CONFIG_SAM34_TC4) - tcvdbg("Initializing %s...\n", CONFIG_TIMER4_DEVPATH); + tmrinfo("Initializing %s...\n", CONFIG_TIMER4_DEVPATH); sam_tcinitialize(CONFIG_TIMER4_DEVPATH, SAM_IRQ_TC4); #endif #if defined(CONFIG_SAM34_TC5) - tcvdbg("Initializing %s...\n", CONFIG_TIMER5_DEVPATH); + tmrinfo("Initializing %s...\n", CONFIG_TIMER5_DEVPATH); sam_tcinitialize(CONFIG_TIMER5_DEVPATH, SAM_IRQ_TC5); #endif #if defined(CONFIG_SAM34_RTT) - tcvdbg("Initializing %s...\n", CONFIG_RTT_DEVPATH); + tmrinfo("Initializing %s...\n", CONFIG_RTT_DEVPATH); sam_rttinitialize(CONFIG_RTT_DEVPATH); #endif @@ -206,23 +178,23 @@ int sam_timerinitialize(void) !defined(CONFIG_SUPPRESS_TIMER_INTS) /* System Timer Initialization */ - tcvdbg("Opening %s\n", CONFIG_SAM4S_XPLAINED_PRO_SCHED_TIMER_DEVPATH); + tmrinfo("Opening %s\n", CONFIG_SAM4S_XPLAINED_PRO_SCHED_TIMER_DEVPATH); fd = open(CONFIG_SAM4S_XPLAINED_PRO_SCHED_TIMER_DEVPATH, O_RDONLY); if (fd < 0) { - tcdbg("open %s failed: %d\n", - CONFIG_SAM4S_XPLAINED_PRO_SCHED_TIMER_DEVPATH, errno); + tmrerr("ERROR: open %s failed: %d\n", + CONFIG_SAM4S_XPLAINED_PRO_SCHED_TIMER_DEVPATH, errno); goto errout; } /* Set the timeout */ - tcvdbg("Interval = %d us.\n", (unsigned long)USEC_PER_TICK); + tmrinfo("Interval = %d us.\n", (unsigned long)USEC_PER_TICK); ret = ioctl(fd, TCIOC_SETTIMEOUT, (unsigned long)USEC_PER_TICK); if (ret < 0) { - tcdbg("ioctl(TCIOC_SETTIMEOUT) failed: %d\n", errno); + tmrerr("ERROR: ioctl(TCIOC_SETTIMEOUT) failed: %d\n", errno); goto errout_with_dev; } @@ -235,18 +207,18 @@ int sam_timerinitialize(void) ret = ioctl(fd, TCIOC_SETHANDLER, (unsigned long)&tccb); if (ret < 0) { - tcdbg("ioctl(TCIOC_SETHANDLER) failed: %d\n", errno); + tmrerr("ERROR: ioctl(TCIOC_SETHANDLER) failed: %d\n", errno); goto errout_with_dev; } } /* Start the timer */ - tcvdbg("Starting.\n"); + tmrinfo("Starting.\n"); ret = ioctl(fd, TCIOC_START, 0); if (ret < 0) { - tcdbg("ioctl(TCIOC_START) failed: %d\n", errno); + tmrerr("ERROR: ioctl(TCIOC_START) failed: %d\n", errno); goto errout_with_dev; } #endif @@ -254,25 +226,25 @@ int sam_timerinitialize(void) #if defined(CONFIG_SCHED_CPULOAD) && defined(CONFIG_SCHED_CPULOAD_EXTCLK) /* CPU Load initialization */ - tcvdbg("Opening %s\n", CONFIG_SAM4S_XPLAINED_PRO_CPULOAD_TIMER_DEVPATH); + tmrinfo("Opening %s\n", CONFIG_SAM4S_XPLAINED_PRO_CPULOAD_TIMER_DEVPATH); fd = open(CONFIG_SAM4S_XPLAINED_PRO_CPULOAD_TIMER_DEVPATH, O_RDONLY); if (fd < 0) { - tcdbg("open %s failed: %d\n", - CONFIG_SAM4S_XPLAINED_PRO_CPULOAD_TIMER_DEVPATH, errno); + tmrerr("ERROR: open %s failed: %d\n", + CONFIG_SAM4S_XPLAINED_PRO_CPULOAD_TIMER_DEVPATH, errno); goto errout; } /* Set the timeout */ - tcvdbg("Interval = %d us.\n", (unsigned long)1000000 / CONFIG_SCHED_CPULOAD_TICKSPERSEC); + tmrinfo("Interval = %d us.\n", (unsigned long)1000000 / CONFIG_SCHED_CPULOAD_TICKSPERSEC); ret = ioctl(fd, TCIOC_SETTIMEOUT, (unsigned long)1000000 / CONFIG_SCHED_CPULOAD_TICKSPERSEC); if (ret < 0) { - tcdbg("ioctl(TCIOC_SETTIMEOUT) failed: %d\n", errno); + tmrerr("ERROR: ioctl(TCIOC_SETTIMEOUT) failed: %d\n", errno); goto errout_with_dev; } @@ -286,18 +258,18 @@ int sam_timerinitialize(void) ret = ioctl(fd, TCIOC_SETHANDLER, (unsigned long)&tccb); if (ret < 0) { - tcdbg("ioctl(TCIOC_SETHANDLER) failed: %d\n", errno); + tmrerr("ERROR: ioctl(TCIOC_SETHANDLER) failed: %d\n", errno); goto errout_with_dev; } } /* Start the timer */ - tcvdbg("Starting.\n"); + tmrinfo("Starting.\n"); ret = ioctl(fd, TCIOC_START, 0); if (ret < 0) { - tcdbg("ioctl(TCIOC_START) failed: %d\n", errno); + tmrerr("ERROR: ioctl(TCIOC_START) failed: %d\n", errno); goto errout_with_dev; } #endif diff --git a/configs/sam4s-xplained-pro/src/sam_udp.c b/configs/sam4s-xplained-pro/src/sam_udp.c index e47c37a9fba9ceb98a8aebecb2e7a3a0860a7b7b..13c1f72e02f87856f195386dd99e11644de42bd8 100644 --- a/configs/sam4s-xplained-pro/src/sam_udp.c +++ b/configs/sam4s-xplained-pro/src/sam_udp.c @@ -84,5 +84,5 @@ void sam_udp_suspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } diff --git a/configs/sam4s-xplained-pro/src/sam_userleds.c b/configs/sam4s-xplained-pro/src/sam_userleds.c index ca16d45cba3ba0cd9b9625d711314bf81c528095..daf4692bea62561f8823f39ed8efd6c3e202fcd9 100644 --- a/configs/sam4s-xplained-pro/src/sam_userleds.c +++ b/configs/sam4s-xplained-pro/src/sam_userleds.c @@ -52,22 +52,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/sam4s-xplained-pro/src/sam_wdt.c b/configs/sam4s-xplained-pro/src/sam_wdt.c index 4696db19eef3ff7d78cb3cc639c9c639890e5d1d..4223671f395b605c1f114e1c33b19d77d4eddba8 100644 --- a/configs/sam4s-xplained-pro/src/sam_wdt.c +++ b/configs/sam4s-xplained-pro/src/sam_wdt.c @@ -82,34 +82,6 @@ # error "WDT_THREAD_INTERVAL must be greater than or equal to WDT_MINTIME" #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 ************************************************************************************/ @@ -124,21 +96,21 @@ static int wdog_daemon(int argc, char *argv[]) /* Open the watchdog device for reading */ - wdgvdbg("Opening.\n"); + wdinfo("Opening.\n"); fd = open(CONFIG_WATCHDOG_DEVPATH, O_RDONLY); if (fd < 0) { - wdgdbg("open %s failed: %d\n", CONFIG_WATCHDOG_DEVPATH, errno); + wderr("ERROR: open %s failed: %d\n", CONFIG_WATCHDOG_DEVPATH, errno); goto errout; } /* Start the watchdog timer. */ - wdgvdbg("Starting.\n"); + wdinfo("Starting.\n"); ret = ioctl(fd, WDIOC_START, 0); if (ret < 0) { - wdgdbg("ioctl(WDIOC_START) failed: %d\n", errno); + wderr("ERROR: ioctl(WDIOC_START) failed: %d\n", errno); goto errout_with_dev; } @@ -147,11 +119,11 @@ static int wdog_daemon(int argc, char *argv[]) { usleep((CONFIG_WDT_THREAD_INTERVAL)*1000); - wdgvdbg("ping\n"); + wdinfo("ping\n"); ret = ioctl(fd, WDIOC_KEEPALIVE, 0); if (ret < 0) { - wdgdbg("ioctl(WDIOC_KEEPALIVE) failed: %d\n", errno); + wderr("ERROR: ioctl(WDIOC_KEEPALIVE) failed: %d\n", errno); goto errout_with_dev; } } @@ -181,36 +153,36 @@ int sam_watchdog_initialize(void) /* Initialize tha register the watchdog timer device */ - wdgvdbg("Initializing Watchdog driver...\n"); + wdinfo("Initializing Watchdog driver...\n"); sam_wdtinitialize(CONFIG_WATCHDOG_DEVPATH); /* Open the watchdog device */ - wdgvdbg("Opening.\n"); + wdinfo("Opening.\n"); fd = open(CONFIG_WATCHDOG_DEVPATH, O_RDONLY); if (fd < 0) { - wdgdbg("open %s failed: %d\n", CONFIG_WATCHDOG_DEVPATH, errno); + wderr("ERROR: open %s failed: %d\n", CONFIG_WATCHDOG_DEVPATH, errno); goto errout; } /* Set the watchdog timeout */ - wdgvdbg("Timeout = %d.\n", CONFIG_WDT_TIMEOUT); + wdinfo("Timeout = %d.\n", CONFIG_WDT_TIMEOUT); ret = ioctl(fd, WDIOC_SETTIMEOUT, (unsigned long)CONFIG_WDT_TIMEOUT); if (ret < 0) { - wdgdbg("ioctl(WDIOC_SETTIMEOUT) failed: %d\n", errno); + wderr("ERROR: ioctl(WDIOC_SETTIMEOUT) failed: %d\n", errno); goto errout_with_dev; } /* Set the watchdog minimum time */ - wdgvdbg("MinTime = %d.\n", CONFIG_WDT_MINTIME); + wdinfo("MinTime = %d.\n", CONFIG_WDT_MINTIME); ret = ioctl(fd, WDIOC_MINTIME, (unsigned long)CONFIG_WDT_MINTIME); if (ret < 0) { - wdgdbg("ioctl(WDIOC_MINTIME) failed: %d\n", errno); + wderr("ERROR: ioctl(WDIOC_MINTIME) failed: %d\n", errno); goto errout_with_dev; } diff --git a/configs/sam4s-xplained/nsh/defconfig b/configs/sam4s-xplained/nsh/defconfig index 583fa8d9269454add1aab3c751ad2dec406894bc..10afa826f1d9f3cb1a51c9efa7d0e896fc1eb665 100644 --- a/configs/sam4s-xplained/nsh/defconfig +++ b/configs/sam4s-xplained/nsh/defconfig @@ -42,10 +42,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -76,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 @@ -94,6 +96,7 @@ CONFIG_ARCH_CHIP_SAM34=y # 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 @@ -115,12 +118,15 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="sam34" +# 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 @@ -131,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 @@ -467,7 +474,12 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -475,6 +487,7 @@ CONFIG_DEV_NULL=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -486,6 +499,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -509,10 +524,6 @@ CONFIG_UART1_SERIALDRIVER=y # 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 @@ -539,15 +550,18 @@ CONFIG_UART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -579,12 +593,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -647,11 +655,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -695,10 +706,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -708,17 +719,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -726,17 +737,16 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -758,8 +768,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -770,6 +780,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 @@ -881,12 +892,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -894,6 +905,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sam4s-xplained/src/sam_autoleds.c b/configs/sam4s-xplained/src/sam_autoleds.c index 35eabd5bdb711fee269b4bcce2a8fc353427c709..d8b148c5d35207e567dd3ad091746c4f024562fa 100644 --- a/configs/sam4s-xplained/src/sam_autoleds.c +++ b/configs/sam4s-xplained/src/sam_autoleds.c @@ -52,9 +52,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ /* If CONFIG_ARCH_LEDs is defined, then NuttX will control the two LEDs on * board the SAM4S Xplained. The following definitions describe how NuttX * controls the LEDs: @@ -73,26 +70,6 @@ * LED_IDLE MCU is is sleep mode Not used */ -/* 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/sam4s-xplained/src/sam_userleds.c b/configs/sam4s-xplained/src/sam_userleds.c index f1e7c5f61b4d3c678de4168bd6bd2d7ee029f322..550cbc191e2832ec9ce63df1a92f643829a9bc15 100644 --- a/configs/sam4s-xplained/src/sam_userleds.c +++ b/configs/sam4s-xplained/src/sam_userleds.c @@ -51,22 +51,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/sama5d2-xult/README.txt b/configs/sama5d2-xult/README.txt index 9af903ada8694aebdea6228531126761c79fd5bd..8f11cc1db50c2586438f59f76913b14f8e2eb146 100644 --- a/configs/sama5d2-xult/README.txt +++ b/configs/sama5d2-xult/README.txt @@ -1032,7 +1032,6 @@ Configurations configuration settings are summarized below: File System: - CONFIG_SYSLOG=y : Enables the System Logging feature. Device Drivers: CONFIG_RAMLOG=y : Enable the RAM-based logging feature. diff --git a/configs/sama5d2-xult/nsh/defconfig b/configs/sama5d2-xult/nsh/defconfig index 537cb8d4ea1df837b4bd1b856f71a38dbc4256db..bbedda86974be5c0f8e2ad14160206ae310dd631 100644 --- a/configs/sama5d2-xult/nsh/defconfig +++ b/configs/sama5d2-xult/nsh/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH_CHIP_SAMA5=y # 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 @@ -119,9 +122,13 @@ CONFIG_ARCH_CORTEXA5=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-a" CONFIG_ARCH_CHIP="sama5" +# 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_ARM_HAVE_MPU_UNIFIED is not set CONFIG_ARCH_HAVE_LOWVECTORS=y CONFIG_ARCH_LOWVECTORS=y @@ -131,6 +138,8 @@ CONFIG_ARCH_LOWVECTORS=y # ARMv7-A Configuration Options # # CONFIG_ARMV7A_HAVE_GICv2 is not set +# CONFIG_ARMV7A_HAVE_GTM is not set +# CONFIG_ARMV7A_HAVE_PTM is not set CONFIG_ARMV7A_HAVE_L2CC=y CONFIG_ARMV7A_HAVE_L2CC_PL310=y @@ -189,7 +198,6 @@ CONFIG_SAMA5_HAVE_SPI2=y # CONFIG_SAMA5_HAVE_TC is not set CONFIG_SAMA5_HAVE_TC1=y # CONFIG_SAMA5_HAVE_TC2 is not set -CONFIG_ARCH_HAVE_TRUSTZONE=y # CONFIG_SAMA5_HAVE_TWI3 is not set # CONFIG_SAMA5_HAVE_VDEC is not set CONFIG_SAMA5_FLEXCOM=y @@ -551,7 +559,12 @@ CONFIG_RTC_DATETIME=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -559,6 +572,7 @@ CONFIG_RTC_DATETIME=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -570,6 +584,8 @@ CONFIG_RTC_DATETIME=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -593,10 +609,6 @@ CONFIG_USART4_SERIALDRIVER=y # 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 @@ -641,21 +653,25 @@ CONFIG_HIDKBD_NPOLLWAITERS=2 # CONFIG_USBHOST_TRACE is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set 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_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_RAMLOG_SYSLOG=y # CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -708,13 +724,6 @@ CONFIG_FS_PROCFS=y # 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 # @@ -816,12 +825,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -866,10 +878,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -879,17 +891,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RANDOM is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set @@ -898,17 +910,17 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -932,8 +944,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -945,6 +957,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 @@ -1060,12 +1073,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set CONFIG_SYSTEM_NXPLAYER=y CONFIG_NXPLAYER_PLAYTHREAD_STACKSIZE=1500 CONFIG_NXPLAYER_COMMAND_LINE=y @@ -1085,6 +1098,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sama5d2-xult/src/sam_autoleds.c b/configs/sama5d2-xult/src/sam_autoleds.c index 08f48811f13db23c26e6b452835513b5361aea04..d49913e2f6c12389b80723882ac46d1d9103d6a2 100644 --- a/configs/sama5d2-xult/src/sam_autoleds.c +++ b/configs/sama5d2-xult/src/sam_autoleds.c @@ -85,30 +85,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/sama5d2-xult/src/sam_bringup.c b/configs/sama5d2-xult/src/sam_bringup.c index 3603c51d9a9bd7ae8ffaa8e322ee1627be0a938e..6d758e5f8adc9acedf387581a544234d5361afb4 100644 --- a/configs/sama5d2-xult/src/sam_bringup.c +++ b/configs/sama5d2-xult/src/sam_bringup.c @@ -45,16 +45,6 @@ #include "sama5d2-xult.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#ifdef CONFIG_BOARD_INITIALIZE -# define SYSLOG lldbg -#else -# define SYSLOG dbg -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -77,8 +67,8 @@ int sam_bringup(void) ret = mount(NULL, SAMA5_PROCFS_MOUNTPOINT, "procfs", 0, NULL); if (ret < 0) { - syslog(LOG_ERR, "ERROR: Failed to mount procfs at %s: %d\n", - SAMA5_PROCFS_MOUNTPOINT, ret); + _err("ERROR: Failed to mount procfs at %s: %d\n", + SAMA5_PROCFS_MOUNTPOINT, ret); } #endif diff --git a/configs/sama5d2-xult/src/sam_userleds.c b/configs/sama5d2-xult/src/sam_userleds.c index 1de7aaf6a4693311e1f9182a26ea20ece2e90b43..2361d14263d4c181551f23b860d140ee8fd244ad 100644 --- a/configs/sama5d2-xult/src/sam_userleds.c +++ b/configs/sama5d2-xult/src/sam_userleds.c @@ -61,22 +61,6 @@ #include "sam_pio.h" #include "sama5d2-xult.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 - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/sama5d3-xplained/README.txt b/configs/sama5d3-xplained/README.txt index 93cfb9a6c2e6dd072f841ea3dea9a702f603f02a..336008da1eb077f299f45a9265ebe3f2d54b2b0f 100644 --- a/configs/sama5d3-xplained/README.txt +++ b/configs/sama5d3-xplained/README.txt @@ -1356,7 +1356,7 @@ USB High-Speed Device -------------------- There is normal console debug output available that can be enabled with - CONFIG_DEBUG + CONFIG_DEBUG_USB. However, USB device operation is very + CONFIG_DEBUG_FEATURES + CONFIG_DEBUG_USB. However, USB device operation is very time critical and enabling this debug output WILL interfere with the operation of the UDPHS. USB device tracing is a less invasive way to get debug information: If tracing is enabled, the USB device will save @@ -1550,7 +1550,7 @@ file1: CONFIG_USBHOST_ISOC_DISABLE=y ------------------ There is normal console debug output available that can be enabled with - CONFIG_DEBUG + CONFIG_DEBUG_USB. However, USB host operation is very time + CONFIG_DEBUG_FEATURES + CONFIG_DEBUG_USB. However, USB host operation is very time critical and enabling this debug output might interfere with the operation of the UDPHS. USB host tracing is a less invasive way to get debug information: If tracing is enabled, the USB host will save encoded trace diff --git a/configs/sama5d3-xplained/bridge/defconfig b/configs/sama5d3-xplained/bridge/defconfig index 59d6feb7a207ff52854b5eeb4a775c12b8d71d6c..a32be2985d23494165e845eb953c83f6fd6d420f 100644 --- a/configs/sama5d3-xplained/bridge/defconfig +++ b/configs/sama5d3-xplained/bridge/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH_CHIP_SAMA5=y # 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 @@ -119,9 +122,12 @@ CONFIG_ARCH_CORTEXA5=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-a" CONFIG_ARCH_CHIP="sama5" +# 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 is not set # CONFIG_ARM_HAVE_MPU_UNIFIED is not set CONFIG_ARCH_HAVE_LOWVECTORS=y CONFIG_ARCH_LOWVECTORS=y @@ -131,6 +137,8 @@ CONFIG_ARCH_LOWVECTORS=y # ARMv7-A Configuration Options # # CONFIG_ARMV7A_HAVE_GICv2 is not set +# CONFIG_ARMV7A_HAVE_GTM is not set +# CONFIG_ARMV7A_HAVE_PTM is not set # CONFIG_ARMV7A_HAVE_L2CC is not set # CONFIG_ARMV7A_HAVE_L2CC_PL310 is not set # CONFIG_ARMV7A_TOOLCHAIN_BUILDROOT is not set @@ -181,7 +189,6 @@ CONFIG_SAMA5_HAVE_PIOE=y # CONFIG_SAMA5_HAVE_TC is not set CONFIG_SAMA5_HAVE_TC1=y # CONFIG_SAMA5_HAVE_TC2 is not set -# CONFIG_ARCH_HAVE_TRUSTZONE is not set # CONFIG_SAMA5_HAVE_TWI3 is not set # CONFIG_SAMA5_HAVE_VDEC is not set # CONFIG_SAMA5_FLEXCOM is not set @@ -537,7 +544,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -545,6 +557,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -605,6 +618,8 @@ CONFIG_ETH1_PHY_KSZ8081=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -628,10 +643,6 @@ CONFIG_SERIAL=y # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set CONFIG_OTHER_UART_SERIALDRIVER=y - -# -# USART Configuration -# CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 @@ -645,15 +656,18 @@ CONFIG_OTHER_SERIAL_CONSOLE=y # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -796,12 +810,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -870,6 +878,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 # CONFIG_NETDB_DNSCLIENT is not set @@ -877,6 +887,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -949,16 +960,17 @@ CONFIG_EXAMPLES_BRIDGE_NET2_PRIORITY=100 # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -967,18 +979,18 @@ CONFIG_EXAMPLES_BRIDGE_NET2_PRIORITY=100 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -994,11 +1006,9 @@ CONFIG_EXAMPLES_BRIDGE_NET2_PRIORITY=100 # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # 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_WEBSERVER is not set # # File System Utilities @@ -1022,8 +1032,8 @@ CONFIG_EXAMPLES_BRIDGE_NET2_PRIORITY=100 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1037,14 +1047,15 @@ CONFIG_EXAMPLES_BRIDGE_NET2_PRIORITY=100 # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER 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 -# CONFIG_NETUTILS_TFTPC is not set CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_PPPD is not set +# CONFIG_NETUTILS_SMTP is not set +# CONFIG_NETUTILS_TFTPC is not set # # NSH Library @@ -1063,12 +1074,12 @@ CONFIG_NETUTILS_NETLIB=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set CONFIG_SYSTEM_RAMTEST=y # CONFIG_READLINE_HAVE_EXTMATCH is not set CONFIG_SYSTEM_READLINE=y @@ -1076,6 +1087,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sama5d3-xplained/nsh/defconfig b/configs/sama5d3-xplained/nsh/defconfig index 9e517d9edb508a731a79d6462baf9c34a31dbdb9..7733b5bd3959a015e96457b5a79f65c7e3249062 100644 --- a/configs/sama5d3-xplained/nsh/defconfig +++ b/configs/sama5d3-xplained/nsh/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH_CHIP_SAMA5=y # 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 @@ -119,9 +122,12 @@ CONFIG_ARCH_CORTEXA5=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-a" CONFIG_ARCH_CHIP="sama5" +# 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 is not set # CONFIG_ARM_HAVE_MPU_UNIFIED is not set CONFIG_ARCH_HAVE_LOWVECTORS=y CONFIG_ARCH_LOWVECTORS=y @@ -131,6 +137,8 @@ CONFIG_ARCH_LOWVECTORS=y # ARMv7-A Configuration Options # # CONFIG_ARMV7A_HAVE_GICv2 is not set +# CONFIG_ARMV7A_HAVE_GTM is not set +# CONFIG_ARMV7A_HAVE_PTM is not set # CONFIG_ARMV7A_HAVE_L2CC is not set # CONFIG_ARMV7A_HAVE_L2CC_PL310 is not set # CONFIG_ARMV7A_TOOLCHAIN_BUILDROOT is not set @@ -181,7 +189,6 @@ CONFIG_SAMA5_HAVE_PIOE=y # CONFIG_SAMA5_HAVE_TC is not set CONFIG_SAMA5_HAVE_TC1=y # CONFIG_SAMA5_HAVE_TC2 is not set -# CONFIG_ARCH_HAVE_TRUSTZONE is not set # CONFIG_SAMA5_HAVE_TWI3 is not set # CONFIG_SAMA5_HAVE_VDEC is not set # CONFIG_SAMA5_FLEXCOM is not set @@ -505,7 +512,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -513,6 +525,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -524,6 +537,8 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -547,10 +562,6 @@ CONFIG_SERIAL=y # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set CONFIG_OTHER_UART_SERIALDRIVER=y - -# -# USART Configuration -# CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -563,15 +574,18 @@ CONFIG_OTHER_SERIAL_CONSOLE=y # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -624,12 +638,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -695,12 +703,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -744,10 +755,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -757,17 +768,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -775,17 +786,16 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -809,8 +819,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -821,6 +831,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 @@ -935,12 +946,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -948,6 +959,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sama5d3-xplained/src/sam_adc.c b/configs/sama5d3-xplained/src/sam_adc.c index f770ba5d22bb1eeb9b2a61bc44c3b9cc735668ec..797dbe182e1321d0130c37d639b7427542aff30d 100644 --- a/configs/sama5d3-xplained/src/sam_adc.c +++ b/configs/sama5d3-xplained/src/sam_adc.c @@ -88,7 +88,7 @@ int board_adc_initialize(void) adc = sam_adc_initialize(); if (adc == NULL) { - adbg("ERROR: Failed to get ADC interface\n"); + aerr("ERROR: Failed to get ADC interface\n"); return -ENODEV; } @@ -97,7 +97,7 @@ int board_adc_initialize(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - adbg("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } diff --git a/configs/sama5d3-xplained/src/sam_ajoystick.c b/configs/sama5d3-xplained/src/sam_ajoystick.c index d05f46eeaf33bea876f1a016cc4d5fddd2dea54f..15b53d3f70d7f9002759a568d18fe007bf8de8cc 100644 --- a/configs/sama5d3-xplained/src/sam_ajoystick.c +++ b/configs/sama5d3-xplained/src/sam_ajoystick.c @@ -161,7 +161,7 @@ static FAR void *g_ajoyarg; static ajoy_buttonset_t ajoy_supported(FAR const struct ajoy_lowerhalf_s *lower) { - ivdbg("Supported: %02x\n", AJOY_SUPPORTED); + iinfo("Supported: %02x\n", AJOY_SUPPORTED); return (ajoy_buttonset_t)AJOY_SUPPORTED; } @@ -193,14 +193,14 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower, int errcode = get_errno(); if (errcode != EINTR) { - idbg("ERROR: read failed: %d\n", errcode); + ierr("ERROR: read failed: %d\n", errcode); } return -errcode; } else if (nread < 2 * sizeof(struct adc_msg_s)) { - idbg("ERROR: read too small: %ld\n", (long)nread); + ierr("ERROR: read too small: %ld\n", (long)nread); return -EIO; } @@ -220,7 +220,7 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower, sample->as_x = (int16_t)tmp; have |= 1; - ivdbg("X sample: %ld -> %d\n", (long)tmp, (int)sample->as_x); + iinfo("X sample: %ld -> %d\n", (long)tmp, (int)sample->as_x); } if ((have & 2) == 0 && ptr->am_channel == 1) @@ -229,13 +229,13 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower, sample->as_y = (int16_t)tmp; have |= 2; - ivdbg("Y sample: %ld -> %d\n", (long)tmp, (int)sample->as_y); + iinfo("Y sample: %ld -> %d\n", (long)tmp, (int)sample->as_y); } } if (have != 3) { - idbg("ERROR: Could not find joystack channels\n"); + ierr("ERROR: Could not find joystack channels\n"); return -EIO; } @@ -243,7 +243,7 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower, /* Sample the discrete button inputs */ sample->as_buttons = ajoy_buttons(lower); - ivdbg("Returning: %02x\n", AJOY_SUPPORTED); + iinfo("Returning: %02x\n", AJOY_SUPPORTED); return OK; } @@ -274,7 +274,7 @@ static ajoy_buttonset_t ajoy_buttons(FAR const struct ajoy_lowerhalf_s *lower) } } - ivdbg("Returning: %02x\n", ret); + iinfo("Returning: %02x\n", ret); return ret; } @@ -301,8 +301,8 @@ static void ajoy_enable(FAR const struct ajoy_lowerhalf_s *lower, flags = enter_critical_section(); ajoy_disable(); - illvdbg("press: %02x release: %02x handler: %p arg: %p\n", - press, release, handler, arg); + iinfo("press: %02x release: %02x handler: %p arg: %p\n", + press, release, handler, arg); /* If no events are indicated or if no handler is provided, then this * must really be a request to disable interrupts. @@ -410,7 +410,7 @@ int sam_ajoy_initialization(void) ret = board_adc_initialize(); if (ret < 0) { - idbg("ERROR: board_adc_initialize() failed: %d\n", ret); + ierr("ERROR: board_adc_initialize() failed: %d\n", ret); return ret; } @@ -420,7 +420,7 @@ int sam_ajoy_initialization(void) if (fd < 0) { int errcode = get_errno(); - idbg("ERROR: Failed to open /dev/adc0: %d\n", errcode); + ierr("ERROR: Failed to open /dev/adc0: %d\n", errcode); return -errcode; } @@ -431,7 +431,7 @@ int sam_ajoy_initialization(void) ret = file_detach(fd, &g_adcfile); if (ret < 0) { - idbg("ERROR: Failed to detach from file descriptor: %d\n", ret); + ierr("ERROR: Failed to detach from file descriptor: %d\n", ret); (void)close(fd); return ret; } @@ -458,7 +458,7 @@ int sam_ajoy_initialization(void) ret = ajoy_register("/dev/ajoy0", &g_ajoylower); if (ret < 0) { - idbg("ERROR: ajoy_register failed: %d\n", ret); + ierr("ERROR: ajoy_register failed: %d\n", ret); file_close_detached(&g_adcfile); } diff --git a/configs/sama5d3-xplained/src/sam_at25.c b/configs/sama5d3-xplained/src/sam_at25.c index a6ef86fc06e90e9f9d45fe49a7fccabca58ddc05..6e8302911951bcd44ec308f648433716a6d46252 100644 --- a/configs/sama5d3-xplained/src/sam_at25.c +++ b/configs/sama5d3-xplained/src/sam_at25.c @@ -87,7 +87,7 @@ int sam_at25_automount(int minor) spi = sam_spibus_initialize(AT25_PORT); if (!spi) { - fdbg("ERROR: Failed to initialize SPI port %d\n", AT25_PORT); + ferr("ERROR: Failed to initialize SPI port %d\n", AT25_PORT); return -ENODEV; } @@ -96,7 +96,7 @@ int sam_at25_automount(int minor) mtd = at25_initialize(spi); if (!mtd) { - fdbg("ERROR: Failed to bind SPI port %d to the AT25 FLASH driver\n"); + ferr("ERROR: Failed to bind SPI port %d to the AT25 FLASH driver\n"); return -ENODEV; } @@ -106,7 +106,7 @@ int sam_at25_automount(int minor) ret = ftl_initialize(AT25_MINOR, mtd); if (ret < 0) { - fdbg("ERROR: Failed to initialize the FTL layer: %d\n", ret); + ferr("ERROR: Failed to initialize the FTL layer: %d\n", ret); return ret; } @@ -116,7 +116,7 @@ int sam_at25_automount(int minor) ret = nxffs_initialize(mtd); if (ret < 0) { - fdbg("ERROR: NXFFS initialization failed: %d\n", ret); + ferr("ERROR: NXFFS initialization failed: %d\n", ret); return ret; } @@ -125,7 +125,7 @@ int sam_at25_automount(int minor) ret = mount(NULL, "/mnt/at25", "nxffs", 0, NULL); if (ret < 0) { - fdbg("ERROR: Failed to mount the NXFFS volume: %d\n", errno); + ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno); return ret; } #endif diff --git a/configs/sama5d3-xplained/src/sam_autoleds.c b/configs/sama5d3-xplained/src/sam_autoleds.c index 553cccc3706a3776993a8c37307666630f883d16..e435531d7c308db2696b91bff902300e1bc82d1c 100644 --- a/configs/sama5d3-xplained/src/sam_autoleds.c +++ b/configs/sama5d3-xplained/src/sam_autoleds.c @@ -87,30 +87,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/sama5d3-xplained/src/sam_can.c b/configs/sama5d3-xplained/src/sam_can.c index 9fc10f9d2b3a7aea5caed8176255c5689fb5bb94..7befbcee65f2f3db6d52ac839efdd7c82150f454 100644 --- a/configs/sama5d3-xplained/src/sam_can.c +++ b/configs/sama5d3-xplained/src/sam_can.c @@ -69,25 +69,6 @@ # define CAN_PORT 1 #endif -/* 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 - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -116,7 +97,7 @@ int board_can_initialize(void) can = sam_caninitialize(CAN_PORT); if (can == NULL) { - candbg("ERROR: Failed to get CAN interface\n"); + canerr("ERROR: Failed to get CAN interface\n"); return -ENODEV; } @@ -125,7 +106,7 @@ int board_can_initialize(void) ret = can_register("/dev/can0", can); if (ret < 0) { - candbg("ERROR: can_register failed: %d\n", ret); + canerr("ERROR: can_register failed: %d\n", ret); return ret; } diff --git a/configs/sama5d3-xplained/src/sam_ethernet.c b/configs/sama5d3-xplained/src/sam_ethernet.c index ed022800f1cdc5fe1726637152b2d76f80f69b0f..8505711302af3693677ef3996a0c5d23b0053a84 100644 --- a/configs/sama5d3-xplained/src/sam_ethernet.c +++ b/configs/sama5d3-xplained/src/sam_ethernet.c @@ -42,8 +42,8 @@ /* Force verbose debug on in this file only to support unit-level testing. */ #ifdef CONFIG_NETDEV_PHY_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG_VERBOSE 1 +# undef CONFIG_DEBUG_INFO +# define CONFIG_DEBUG_INFO 1 # undef CONFIG_DEBUG_NET # define CONFIG_DEBUG_NET 1 #endif @@ -84,11 +84,13 @@ */ #ifdef CONFIG_NETDEV_PHY_DEBUG -# define phydbg dbg -# define phylldbg lldbg +# define phyerr _err +# define phywarn _warn +# define phyinfo _info #else -# define phydbg(x...) -# define phylldbg(x...) +# define phyerr(x...) +# define phywarn(x...) +# define phyinfo(x...) #endif /************************************************************************************ @@ -116,7 +118,7 @@ static xcpt_t g_gmac_handler; #ifdef CONFIG_SAMA5_EMACA static void sam_emac_phy_enable(bool enable) { - phydbg("IRQ%d: enable=%d\n", IRQ_INT_ETH1, enable); + phyinfo("IRQ%d: enable=%d\n", IRQ_INT_ETH1, enable); if (enable) { sam_pioirqenable(IRQ_INT_ETH1); @@ -132,7 +134,7 @@ static void sam_emac_phy_enable(bool enable) #ifdef CONFIG_SAMA5_GMAC static void sam_gmac_phy_enable(bool enable) { - phydbg("IRQ%d: enable=%d\n", IRQ_INT_ETH0, enable); + phyinfo("IRQ%d: enable=%d\n", IRQ_INT_ETH0, enable); if (enable) { sam_pioirqenable(IRQ_INT_ETH0); @@ -179,7 +181,7 @@ void weak_function sam_netinitialize(void) * The KSZ8051 PHY interrupt is available on PE30 INT_ETH1 */ - phydbg("Configuring %08x\n", PIO_INT_ETH1); + phyinfo("Configuring %08x\n", PIO_INT_ETH1); sam_configpio(PIO_INT_ETH1); #endif @@ -196,7 +198,7 @@ void weak_function sam_netinitialize(void) * The KSZ9021/31 interrupt is available on PB35 INT_GETH0 */ - phydbg("Configuring %08x\n", PIO_INT_ETH0); + phyinfo("Configuring %08x\n", PIO_INT_ETH0); sam_configpio(PIO_INT_ETH0); #endif } @@ -276,18 +278,18 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) DEBUGASSERT(intf); - nvdbg("%s: handler=%p\n", intf, handler); + ninfo("%s: handler=%p\n", intf, handler); #ifdef CONFIG_SAMA5_EMACA - phydbg("EMAC: devname=%s\n", SAMA5_EMAC_DEVNAME); + phyinfo("EMAC: devname=%s\n", SAMA5_EMAC_DEVNAME); #endif #ifdef CONFIG_SAMA5_GMAC - phydbg("GMAC: devname=%s\n", SAMA5_GMAC_DEVNAME); + phyinfo("GMAC: devname=%s\n", SAMA5_GMAC_DEVNAME); #endif #ifdef CONFIG_SAMA5_EMACA if (strcmp(intf, SAMA5_EMAC_DEVNAME) == 0) { - phydbg("Select EMAC\n"); + phyinfo("Select EMAC\n"); phandler = &g_emac_handler; pinset = PIO_INT_ETH1; irq = IRQ_INT_ETH1; @@ -298,7 +300,7 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) #ifdef CONFIG_SAMA5_GMAC if (strcmp(intf, SAMA5_GMAC_DEVNAME) == 0) { - phydbg("Select GMAC\n"); + phyinfo("Select GMAC\n"); phandler = &g_gmac_handler; pinset = PIO_INT_ETH0; irq = IRQ_INT_ETH0; @@ -307,7 +309,7 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) else #endif { - ndbg("Unsupported interface: %s\n", intf); + nerr("ERROR: Unsupported interface: %s\n", intf); return NULL; } @@ -326,15 +328,15 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) if (handler) { - phydbg("Configure pin: %08x\n", pinset); + phyinfo("Configure pin: %08x\n", pinset); sam_pioirq(pinset); - phydbg("Attach IRQ%d\n", irq); + phyinfo("Attach IRQ%d\n", irq); (void)irq_attach(irq, handler); } else { - phydbg("Detach IRQ%d\n", irq); + phyinfo("Detach IRQ%d\n", irq); (void)irq_detach(irq); enabler = NULL; } diff --git a/configs/sama5d3-xplained/src/sam_hsmci.c b/configs/sama5d3-xplained/src/sam_hsmci.c index 4ba3e529d1bd5775d0bd5a4408647502d2b85b4e..27db3addacf075251d51d5946bb3b72fd64c2ef6 100644 --- a/configs/sama5d3-xplained/src/sam_hsmci.c +++ b/configs/sama5d3-xplained/src/sam_hsmci.c @@ -154,7 +154,7 @@ bool sam_cardinserted_internal(struct sam_hsmci_state_s *state) /* Get the state of the PIO pin */ inserted = sam_pioread(state->pincfg); - fllvdbg("Slot %d inserted: %s\n", state->slotno, inserted ? "NO" : "YES"); + finfo("Slot %d inserted: %s\n", state->slotno, inserted ? "NO" : "YES"); return !inserted; } @@ -257,7 +257,7 @@ int sam_hsmci_initialize(int slotno, int minor) state = sam_hsmci_state(slotno); if (!state) { - fdbg("No state for slotno %d\n", slotno); + ferr("ERROR: No state for slotno %d\n", slotno); return -EINVAL; } @@ -271,7 +271,7 @@ int sam_hsmci_initialize(int slotno, int minor) state->hsmci = sdio_initialize(slotno); if (!state->hsmci) { - fdbg("Failed to initialize SDIO slot %d\n", slotno); + ferr("ERROR: Failed to initialize SDIO slot %d\n", slotno); return -ENODEV; } @@ -280,7 +280,7 @@ int sam_hsmci_initialize(int slotno, int minor) ret = mmcsd_slotinitialize(minor, state->hsmci); if (ret != OK) { - fdbg("Failed to bind SDIO to the MMC/SD driver: %d\n", ret); + ferr("ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); return ret; } @@ -317,7 +317,7 @@ bool sam_cardinserted(int slotno) state = sam_hsmci_state(slotno); if (!state) { - fdbg("No state for slotno %d\n", slotno); + ferr("ERROR: No state for slotno %d\n", slotno); return false; } diff --git a/configs/sama5d3-xplained/src/sam_i2schar.c b/configs/sama5d3-xplained/src/sam_i2schar.c index 8842c1046f1c13f9b5ed7a1c5d364e6851d1c38b..51510b4e6ecfeb1fdd0eb83b22074173e8f21393 100644 --- a/configs/sama5d3-xplained/src/sam_i2schar.c +++ b/configs/sama5d3-xplained/src/sam_i2schar.c @@ -99,7 +99,7 @@ int i2schar_devinit(void) i2s = sam_ssc_initialize(CONFIG_SAMA5D3XPLAINED_SSC_PORT); if (!i2s) { - dbg("ERROR: Failed to get the SAMA5 SSC/I2S driver for SSC%d\n", + _err("ERROR: Failed to get the SAMA5 SSC/I2S driver for SSC%d\n", CONFIG_SAMA5D3XPLAINED_SSC_PORT); return -ENODEV; } @@ -109,7 +109,7 @@ int i2schar_devinit(void) ret = i2schar_register(i2s, CONFIG_SAMA5D3XPLAINED_I2SCHAR_MINOR); if (ret < 0) { - adbg("ERROR: i2schar_register failed: %d\n", ret); + aerr("ERROR: i2schar_register failed: %d\n", ret); return ret; } diff --git a/configs/sama5d3-xplained/src/sam_nandflash.c b/configs/sama5d3-xplained/src/sam_nandflash.c index 270b3624daa461a146aee3f3a286a4fe24452c20..69157cc3faa7a251d93a51608b1f4dbd5ac9a32c 100644 --- a/configs/sama5d3-xplained/src/sam_nandflash.c +++ b/configs/sama5d3-xplained/src/sam_nandflash.c @@ -186,7 +186,7 @@ int sam_nand_automount(int minor) mtd = sam_nand_initialize(HSMC_CS3); if (!mtd) { - fdbg("ERROR: Failed to create the NAND driver on CS%d\n", HSMC_CS3); + ferr("ERROR: Failed to create the NAND driver on CS%d\n", HSMC_CS3); return -ENODEV; } @@ -196,7 +196,7 @@ int sam_nand_automount(int minor) ret = ftl_initialize(NAND_MINOR, mtd); if (ret < 0) { - fdbg("ERROR: Failed to initialize the FTL layer: %d\n", ret); + ferr("ERROR: Failed to initialize the FTL layer: %d\n", ret); return ret; } @@ -206,7 +206,7 @@ int sam_nand_automount(int minor) ret = nxffs_initialize(mtd); if (ret < 0) { - fdbg("ERROR: NXFFS initialization failed: %d\n", ret); + ferr("ERROR: NXFFS initialization failed: %d\n", ret); return ret; } @@ -215,7 +215,7 @@ int sam_nand_automount(int minor) ret = mount(NULL, "/mnt/nand", "nxffs", 0, NULL); if (ret < 0) { - fdbg("ERROR: Failed to mount the NXFFS volume: %d\n", errno); + ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno); return ret; } #endif diff --git a/configs/sama5d3-xplained/src/sam_pwm.c b/configs/sama5d3-xplained/src/sam_pwm.c index 59eca5189c7a621b2d39fd9910801ce7ebd9b891..91664c1d2103c6ae8e9863942fa939f3b3e3b0cd 100644 --- a/configs/sama5d3-xplained/src/sam_pwm.c +++ b/configs/sama5d3-xplained/src/sam_pwm.c @@ -139,7 +139,7 @@ int board_pwm_setup(void) pwm = sam_pwminitialize(CONFIG_SAMA5D3XPLAINED_CHANNEL); if (!pwm) { - dbg("Failed to get the SAMA5 PWM lower half\n"); + _err("ERROR: Failed to get the SAMA5 PWM lower half\n"); return -ENODEV; } @@ -148,7 +148,7 @@ int board_pwm_setup(void) ret = pwm_register("/dev/pwm0", pwm); if (ret < 0) { - adbg("pwm_register failed: %d\n", ret); + aerr("ERROR: pwm_register failed: %d\n", ret); return ret; } diff --git a/configs/sama5d3-xplained/src/sam_spi.c b/configs/sama5d3-xplained/src/sam_spi.c index 24672d8c334c082568a02ac65df090bccd6274af..9c42a10d656e16f423f733da887b0a2fa89d661e 100644 --- a/configs/sama5d3-xplained/src/sam_spi.c +++ b/configs/sama5d3-xplained/src/sam_spi.c @@ -55,32 +55,6 @@ #if defined(CONFIG_SAMA5_SPI0) || defined(CONFIG_SAMA5_SPI1) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ diff --git a/configs/sama5d3-xplained/src/sam_usb.c b/configs/sama5d3-xplained/src/sam_usb.c index ac747277ffe444d1a36af04f27d4de94e637123c..b04c4eeb2eed3693ede3ad5b24f0261307db925c 100644 --- a/configs/sama5d3-xplained/src/sam_usb.c +++ b/configs/sama5d3-xplained/src/sam_usb.c @@ -115,13 +115,13 @@ static int usbhost_waiter(struct usbhost_connection_s *dev) { struct usbhost_hubport_s *hport; - uvdbg("Running\n"); + uinfo("Running\n"); for (;;) { /* Wait for the device to change state */ DEBUGVERIFY(CONN_WAIT(dev, &hport)); - uvdbg("%s\n", hport->connected ? "connected" : "disconnected"); + uinfo("%s\n", hport->connected ? "connected" : "disconnected"); /* Did we just become connected? */ @@ -309,7 +309,7 @@ int sam_usbhost_initialize(void) ret = usbhost_hub_initialize(); if (ret < 0) { - udbg("ERROR: usbhost_hub_initialize failed: %d\n", ret); + uerr("ERROR: usbhost_hub_initialize failed: %d\n", ret); } #endif @@ -319,7 +319,7 @@ int sam_usbhost_initialize(void) ret = usbhost_msc_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the mass storage class: %d\n", ret); + uerr("ERROR: Failed to register the mass storage class: %d\n", ret); } #endif @@ -329,7 +329,7 @@ int sam_usbhost_initialize(void) ret = usbhost_cdcacm_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret); + uerr("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret); } #endif @@ -339,7 +339,7 @@ int sam_usbhost_initialize(void) ret = usbhost_kbdinit(); if (ret != OK) { - udbg("ERROR: Failed to register the KBD class\n"); + uerr("ERROR: Failed to register the KBD class\n"); } #endif @@ -351,7 +351,7 @@ int sam_usbhost_initialize(void) g_ohciconn = sam_ohci_initialize(0); if (!g_ohciconn) { - udbg("ERROR: sam_ohci_initialize failed\n"); + uerr("ERROR: sam_ohci_initialize failed\n"); return -ENODEV; } @@ -362,7 +362,7 @@ int sam_usbhost_initialize(void) (main_t)ohci_waiter, (FAR char * const *)NULL); if (pid < 0) { - udbg("ERROR: Failed to create ohci_waiter task: %d\n", ret); + uerr("ERROR: Failed to create ohci_waiter task: %d\n", ret); return -ENODEV; } #endif @@ -373,7 +373,7 @@ int sam_usbhost_initialize(void) g_ehciconn = sam_ehci_initialize(0); if (!g_ehciconn) { - udbg("ERROR: sam_ehci_initialize failed\n"); + uerr("ERROR: sam_ehci_initialize failed\n"); return -ENODEV; } @@ -384,7 +384,7 @@ int sam_usbhost_initialize(void) (main_t)ehci_waiter, (FAR char * const *)NULL); if (pid < 0) { - udbg("ERROR: Failed to create ehci_waiter task: %d\n", ret); + uerr("ERROR: Failed to create ehci_waiter task: %d\n", ret); return -ENODEV; } #endif @@ -415,7 +415,7 @@ void sam_usbhost_vbusdrive(int rhport, bool enable) { pio_pinset_t pinset = 0; - uvdbg("RHPort%d: enable=%d\n", rhport+1, enable); + uinfo("RHPort%d: enable=%d\n", rhport+1, enable); /* Pick the PIO configuration associated with the selected root hub port */ @@ -423,13 +423,13 @@ void sam_usbhost_vbusdrive(int rhport, bool enable) { case SAM_RHPORT1: #if !defined(CONFIG_SAMA5_UHPHS_RHPORT1) - udbg("ERROR: RHPort1 is not available in this configuration\n"); + uerr("ERROR: RHPort1 is not available in this configuration\n"); return; #elif !defined(PIO_USBA_VBUS_ENABLE) /* SAMA5D3-Xplained has no port A VBUS enable */ - udbg("ERROR: RHPort1 has no VBUS enable\n"); + uerr("ERROR: RHPort1 has no VBUS enable\n"); return; #else pinset = PIO_USBA_VBUS_ENABLE; @@ -438,7 +438,7 @@ void sam_usbhost_vbusdrive(int rhport, bool enable) case SAM_RHPORT2: #ifndef CONFIG_SAMA5_UHPHS_RHPORT2 - udbg("ERROR: RHPort2 is not available in this configuration\n"); + uerr("ERROR: RHPort2 is not available in this configuration\n"); return; #else pinset = PIO_USBB_VBUS_ENABLE; @@ -447,7 +447,7 @@ void sam_usbhost_vbusdrive(int rhport, bool enable) case SAM_RHPORT3: #ifndef CONFIG_SAMA5_UHPHS_RHPORT3 - udbg("ERROR: RHPort3 is not available in this configuration\n"); + uerr("ERROR: RHPort3 is not available in this configuration\n"); return; #else pinset = PIO_USBC_VBUS_ENABLE; @@ -455,7 +455,7 @@ void sam_usbhost_vbusdrive(int rhport, bool enable) #endif default: - udbg("ERROR: RHPort%d is not supported\n", rhport+1); + uerr("ERROR: RHPort%d is not supported\n", rhport+1); return; } @@ -546,7 +546,7 @@ xcpt_t sam_setup_overcurrent(xcpt_t handler) #ifdef CONFIG_USBDEV void sam_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } #endif diff --git a/configs/sama5d3-xplained/src/sam_userleds.c b/configs/sama5d3-xplained/src/sam_userleds.c index ae103f242c29d70cd283c9a6de159372443d03c5..bff302f3641baffcdb9a4baf4ae1f164e39b53ec 100644 --- a/configs/sama5d3-xplained/src/sam_userleds.c +++ b/configs/sama5d3-xplained/src/sam_userleds.c @@ -63,22 +63,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/sama5d3x-ek/Kconfig b/configs/sama5d3x-ek/Kconfig index a4ec696250742cb864f085a83a34ffd6118b5da4..553d05bb9b2ab5323290e0aff90ea7cdfedb36cb 100644 --- a/configs/sama5d3x-ek/Kconfig +++ b/configs/sama5d3x-ek/Kconfig @@ -51,7 +51,7 @@ config SAMA5D3xEK_NOREDLED config SAMA5D3xEK_NOR_MAIN bool "Build nor_main" default n - depends on SAMA5_BOOT_ISRAM + depends on SAMA5_BOOT_ISRAM && BUILD_FLAT ---help--- nor_main is a tiny program that runs in ISRAM. nor_main will enable NOR flash then either (1) jump to the program in NOR flash or (2) diff --git a/configs/sama5d3x-ek/README.txt b/configs/sama5d3x-ek/README.txt index 82a5c2fd4cc71670be5810a16352828f05f7d453..f6601d26533d96c821ef206e46717b3f1a705957 100644 --- a/configs/sama5d3x-ek/README.txt +++ b/configs/sama5d3x-ek/README.txt @@ -1534,7 +1534,7 @@ USB High-Speed Device -------------------- There is normal console debug output available that can be enabled with - CONFIG_DEBUG + CONFIG_DEBUG_USB. However, USB device operation is very + CONFIG_DEBUG_FEATURES + CONFIG_DEBUG_USB. However, USB device operation is very time critical and enabling this debug output WILL interfere with the operation of the UDPHS. USB device tracing is a less invasive way to get debug information: If tracing is enabled, the USB device will save @@ -1718,7 +1718,7 @@ USB High-Speed Host ------------------ There is normal console debug output available that can be enabled with - CONFIG_DEBUG + CONFIG_DEBUG_USB. However, USB host operation is very time + CONFIG_DEBUG_FEATURES + CONFIG_DEBUG_USB. However, USB host operation is very time critical and enabling this debug output might interfere with the operation of the UDPHS. USB host tracing is a less invasive way to get debug information: If tracing is enabled, the USB host will save encoded trace diff --git a/configs/sama5d3x-ek/demo/defconfig b/configs/sama5d3x-ek/demo/defconfig index fc3d188f8975f9adb789072951b98983744f9a95..318b920ec84b13228329d4238f9c650a042b3f09 100644 --- a/configs/sama5d3x-ek/demo/defconfig +++ b/configs/sama5d3x-ek/demo/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH_CHIP_SAMA5=y # 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 @@ -119,9 +122,12 @@ CONFIG_ARCH_CORTEXA5=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-a" CONFIG_ARCH_CHIP="sama5" +# 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 is not set # CONFIG_ARM_HAVE_MPU_UNIFIED is not set CONFIG_ARCH_HAVE_LOWVECTORS=y CONFIG_ARCH_LOWVECTORS=y @@ -131,6 +137,8 @@ CONFIG_ARCH_LOWVECTORS=y # ARMv7-A Configuration Options # # CONFIG_ARMV7A_HAVE_GICv2 is not set +# CONFIG_ARMV7A_HAVE_GTM is not set +# CONFIG_ARMV7A_HAVE_PTM is not set # CONFIG_ARMV7A_HAVE_L2CC is not set # CONFIG_ARMV7A_HAVE_L2CC_PL310 is not set # CONFIG_ARMV7A_TOOLCHAIN_BUILDROOT is not set @@ -187,7 +195,6 @@ CONFIG_SAMA5_HAVE_PIOE=y # CONFIG_SAMA5_HAVE_TC is not set # CONFIG_SAMA5_HAVE_TC1 is not set # CONFIG_SAMA5_HAVE_TC2 is not set -# CONFIG_ARCH_HAVE_TRUSTZONE is not set # CONFIG_SAMA5_HAVE_TWI3 is not set # CONFIG_SAMA5_HAVE_VDEC is not set # CONFIG_SAMA5_FLEXCOM is not set @@ -569,6 +576,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -587,7 +596,12 @@ CONFIG_RTC_DATETIME=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -595,6 +609,7 @@ CONFIG_RTC_DATETIME=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -631,12 +646,15 @@ CONFIG_MTD_AT25=y CONFIG_AT25_SPIMODE=0 CONFIG_AT25_SPIFREQUENCY=10000000 # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP 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 @@ -647,6 +665,8 @@ CONFIG_AT25_SPIFREQUENCY=10000000 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -670,10 +690,6 @@ CONFIG_USART1_SERIALDRIVER=y # 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 @@ -752,15 +768,18 @@ CONFIG_HIDKBD_BUFSIZE=64 # CONFIG_USBHOST_TRACE is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -814,12 +833,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_MTD is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -885,12 +898,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -934,10 +950,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -947,17 +963,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RANDOM is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set @@ -966,21 +982,22 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -1000,8 +1017,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1012,6 +1029,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 @@ -1127,13 +1145,13 @@ CONFIG_NSH_ARCHINIT=y # # 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_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1141,7 +1159,6 @@ 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_USBMSC=y CONFIG_SYSTEM_USBMSC_NLUNS=1 @@ -1154,4 +1171,5 @@ CONFIG_SYSTEM_USBMSC_DEVPATH3="/dev/mmcsd2" # CONFIG_SYSTEM_USBMSC_DEBUGMM is not set CONFIG_SYSTEM_USBMSC_CMD_STACKSIZE=768 CONFIG_SYSTEM_USBMSC_CMD_PRIORITY=100 +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sama5d3x-ek/hello/defconfig b/configs/sama5d3x-ek/hello/defconfig index 0be49453e11983fcc2c1a473d8eaeeb39f163533..711ff3aab8c262001a89e4b5edd909a415ffe659 100644 --- a/configs/sama5d3x-ek/hello/defconfig +++ b/configs/sama5d3x-ek/hello/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH_CHIP_SAMA5=y # 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 @@ -119,9 +122,12 @@ CONFIG_ARCH_CORTEXA5=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-a" CONFIG_ARCH_CHIP="sama5" +# 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 is not set # CONFIG_ARM_HAVE_MPU_UNIFIED is not set CONFIG_ARCH_HAVE_LOWVECTORS=y CONFIG_ARCH_LOWVECTORS=y @@ -131,6 +137,8 @@ CONFIG_ARCH_LOWVECTORS=y # ARMv7-A Configuration Options # # CONFIG_ARMV7A_HAVE_GICv2 is not set +# CONFIG_ARMV7A_HAVE_GTM is not set +# CONFIG_ARMV7A_HAVE_PTM is not set # CONFIG_ARMV7A_HAVE_L2CC is not set # CONFIG_ARMV7A_HAVE_L2CC_PL310 is not set # CONFIG_ARMV7A_TOOLCHAIN_BUILDROOT is not set @@ -182,7 +190,6 @@ CONFIG_SAMA5_HAVE_PIOE=y # CONFIG_SAMA5_HAVE_TC is not set # CONFIG_SAMA5_HAVE_TC1 is not set # CONFIG_SAMA5_HAVE_TC2 is not set -# CONFIG_ARCH_HAVE_TRUSTZONE is not set # CONFIG_SAMA5_HAVE_TWI3 is not set # CONFIG_SAMA5_HAVE_VDEC is not set # CONFIG_SAMA5_FLEXCOM is not set @@ -486,7 +493,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -494,6 +506,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -505,6 +518,8 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -528,10 +543,6 @@ CONFIG_USART1_SERIALDRIVER=y # 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_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set @@ -557,15 +568,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -596,12 +610,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -665,11 +673,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -700,10 +711,10 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 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 # CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -712,18 +723,18 @@ CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -737,10 +748,9 @@ CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 # 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_WEBSERVER is not set # # File System Utilities @@ -762,8 +772,8 @@ CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -774,6 +784,7 @@ CONFIG_EXAMPLES_HELLO_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 @@ -795,16 +806,16 @@ CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sama5d3x-ek/norboot/defconfig b/configs/sama5d3x-ek/norboot/defconfig index 56b211c95f5cf12cd65e2b9a52852431d046f28e..f09730318886d3da079cb1d43a846cd0c587f4d8 100644 --- a/configs/sama5d3x-ek/norboot/defconfig +++ b/configs/sama5d3x-ek/norboot/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH_CHIP_SAMA5=y # 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 @@ -119,9 +122,12 @@ CONFIG_ARCH_CORTEXA5=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-a" CONFIG_ARCH_CHIP="sama5" +# 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 is not set # CONFIG_ARM_HAVE_MPU_UNIFIED is not set CONFIG_ARCH_HAVE_LOWVECTORS=y CONFIG_ARCH_LOWVECTORS=y @@ -131,6 +137,8 @@ CONFIG_ARCH_LOWVECTORS=y # ARMv7-A Configuration Options # # CONFIG_ARMV7A_HAVE_GICv2 is not set +# CONFIG_ARMV7A_HAVE_GTM is not set +# CONFIG_ARMV7A_HAVE_PTM is not set # CONFIG_ARMV7A_HAVE_L2CC is not set # CONFIG_ARMV7A_HAVE_L2CC_PL310 is not set # CONFIG_ARMV7A_TOOLCHAIN_BUILDROOT is not set @@ -182,7 +190,6 @@ CONFIG_SAMA5_HAVE_PIOE=y # CONFIG_SAMA5_HAVE_TC is not set # CONFIG_SAMA5_HAVE_TC1 is not set # CONFIG_SAMA5_HAVE_TC2 is not set -# CONFIG_ARCH_HAVE_TRUSTZONE is not set # CONFIG_SAMA5_HAVE_TWI3 is not set # CONFIG_SAMA5_HAVE_VDEC is not set # CONFIG_SAMA5_FLEXCOM is not set @@ -500,7 +507,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -508,6 +520,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -519,6 +532,8 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -542,10 +557,6 @@ CONFIG_USART1_SERIALDRIVER=y # 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_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set @@ -571,15 +582,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -610,12 +624,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -679,11 +687,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -714,10 +725,10 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 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 # CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -726,18 +737,18 @@ CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -751,10 +762,9 @@ CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 # 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_WEBSERVER is not set # # File System Utilities @@ -776,8 +786,8 @@ CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -788,6 +798,7 @@ CONFIG_EXAMPLES_HELLO_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 @@ -809,16 +820,16 @@ CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sama5d3x-ek/nsh/defconfig b/configs/sama5d3x-ek/nsh/defconfig index 78c20734934ab571745491caa058b12107305d16..a83632746f33a319a85e998c72b512750d2da506 100644 --- a/configs/sama5d3x-ek/nsh/defconfig +++ b/configs/sama5d3x-ek/nsh/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH_CHIP_SAMA5=y # 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 @@ -119,9 +122,12 @@ CONFIG_ARCH_CORTEXA5=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-a" CONFIG_ARCH_CHIP="sama5" +# 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 is not set # CONFIG_ARM_HAVE_MPU_UNIFIED is not set CONFIG_ARCH_HAVE_LOWVECTORS=y CONFIG_ARCH_LOWVECTORS=y @@ -131,6 +137,8 @@ CONFIG_ARCH_LOWVECTORS=y # ARMv7-A Configuration Options # # CONFIG_ARMV7A_HAVE_GICv2 is not set +# CONFIG_ARMV7A_HAVE_GTM is not set +# CONFIG_ARMV7A_HAVE_PTM is not set # CONFIG_ARMV7A_HAVE_L2CC is not set # CONFIG_ARMV7A_HAVE_L2CC_PL310 is not set # CONFIG_ARMV7A_TOOLCHAIN_BUILDROOT is not set @@ -182,7 +190,6 @@ CONFIG_SAMA5_HAVE_PIOE=y # CONFIG_SAMA5_HAVE_TC is not set # CONFIG_SAMA5_HAVE_TC1 is not set # CONFIG_SAMA5_HAVE_TC2 is not set -# CONFIG_ARCH_HAVE_TRUSTZONE is not set # CONFIG_SAMA5_HAVE_TWI3 is not set # CONFIG_SAMA5_HAVE_VDEC is not set # CONFIG_SAMA5_FLEXCOM is not set @@ -504,7 +511,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -512,6 +524,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -523,6 +536,8 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -546,10 +561,6 @@ CONFIG_USART1_SERIALDRIVER=y # 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 @@ -576,15 +587,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -637,12 +651,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -708,12 +716,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -757,10 +768,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -770,17 +781,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -788,17 +799,16 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -822,8 +832,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -834,6 +844,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 @@ -948,12 +959,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -961,6 +972,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sama5d3x-ek/nx/defconfig b/configs/sama5d3x-ek/nx/defconfig index 7a4734bead85c26f64d31cb30b2d0387336fa2f9..a9110cb25781cb0763ec36e5d4bbd055b67f449f 100644 --- a/configs/sama5d3x-ek/nx/defconfig +++ b/configs/sama5d3x-ek/nx/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH_CHIP_SAMA5=y # 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 @@ -119,9 +122,12 @@ CONFIG_ARCH_CORTEXA5=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-a" CONFIG_ARCH_CHIP="sama5" +# 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 is not set # CONFIG_ARM_HAVE_MPU_UNIFIED is not set CONFIG_ARCH_HAVE_LOWVECTORS=y CONFIG_ARCH_LOWVECTORS=y @@ -131,6 +137,8 @@ CONFIG_ARCH_LOWVECTORS=y # ARMv7-A Configuration Options # # CONFIG_ARMV7A_HAVE_GICv2 is not set +# CONFIG_ARMV7A_HAVE_GTM is not set +# CONFIG_ARMV7A_HAVE_PTM is not set # CONFIG_ARMV7A_HAVE_L2CC is not set # CONFIG_ARMV7A_HAVE_L2CC_PL310 is not set # CONFIG_ARMV7A_TOOLCHAIN_BUILDROOT is not set @@ -182,7 +190,6 @@ CONFIG_SAMA5_HAVE_PIOE=y # CONFIG_SAMA5_HAVE_TC is not set # CONFIG_SAMA5_HAVE_TC1 is not set # CONFIG_SAMA5_HAVE_TC2 is not set -# CONFIG_ARCH_HAVE_TRUSTZONE is not set # CONFIG_SAMA5_HAVE_TWI3 is not set # CONFIG_SAMA5_HAVE_VDEC is not set # CONFIG_SAMA5_FLEXCOM is not set @@ -545,7 +552,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -553,6 +565,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -564,6 +577,8 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -587,10 +602,6 @@ CONFIG_USART1_SERIALDRIVER=y # 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 @@ -617,15 +628,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -663,12 +677,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -677,6 +685,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 @@ -817,11 +826,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -864,10 +876,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -883,18 +895,18 @@ CONFIG_EXAMPLES_NX_DEFAULT_FONT=y CONFIG_EXAMPLES_NX_BPP=16 # CONFIG_EXAMPLES_NX_RAWWINDOWS is not set CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 -# 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -908,10 +920,9 @@ CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 # 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_WEBSERVER is not set # # File System Utilities @@ -933,8 +944,8 @@ CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -945,6 +956,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 @@ -967,12 +979,12 @@ CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set # CONFIG_READLINE_HAVE_EXTMATCH is not set CONFIG_SYSTEM_READLINE=y @@ -980,6 +992,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sama5d3x-ek/nxplayer/defconfig b/configs/sama5d3x-ek/nxplayer/defconfig index 7a1878be00b8698d55b008ab723338cd4ea2ef66..222d4832fe55a21c54a80c32e8b189784c62ca71 100644 --- a/configs/sama5d3x-ek/nxplayer/defconfig +++ b/configs/sama5d3x-ek/nxplayer/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH_CHIP_SAMA5=y # 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 @@ -119,9 +122,12 @@ CONFIG_ARCH_CORTEXA5=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-a" CONFIG_ARCH_CHIP="sama5" +# 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 is not set # CONFIG_ARM_HAVE_MPU_UNIFIED is not set CONFIG_ARCH_HAVE_LOWVECTORS=y CONFIG_ARCH_LOWVECTORS=y @@ -131,6 +137,8 @@ CONFIG_ARCH_LOWVECTORS=y # ARMv7-A Configuration Options # # CONFIG_ARMV7A_HAVE_GICv2 is not set +# CONFIG_ARMV7A_HAVE_GTM is not set +# CONFIG_ARMV7A_HAVE_PTM is not set # CONFIG_ARMV7A_HAVE_L2CC is not set # CONFIG_ARMV7A_HAVE_L2CC_PL310 is not set # CONFIG_ARMV7A_TOOLCHAIN_BUILDROOT is not set @@ -184,7 +192,6 @@ CONFIG_SAMA5_HAVE_PIOE=y # CONFIG_SAMA5_HAVE_TC is not set # CONFIG_SAMA5_HAVE_TC1 is not set # CONFIG_SAMA5_HAVE_TC2 is not set -# CONFIG_ARCH_HAVE_TRUSTZONE is not set # CONFIG_SAMA5_HAVE_TWI3 is not set # CONFIG_SAMA5_HAVE_VDEC is not set # CONFIG_SAMA5_FLEXCOM is not set @@ -592,7 +599,12 @@ CONFIG_WM8904_WORKER_STACKSIZE=1536 # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -600,6 +612,7 @@ CONFIG_WM8904_WORKER_STACKSIZE=1536 # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -622,6 +635,8 @@ CONFIG_SDIO_BLOCKSETUP=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -645,10 +660,6 @@ CONFIG_USART1_SERIALDRIVER=y # 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 @@ -675,15 +686,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -736,12 +750,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -840,12 +848,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -889,10 +900,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -902,17 +913,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -920,17 +931,17 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -954,8 +965,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -966,6 +977,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 @@ -1080,13 +1092,13 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_I2CTOOL is not set +# CONFIG_SYSTEM_INSTALL is not set CONFIG_SYSTEM_NXPLAYER=y CONFIG_NXPLAYER_PLAYTHREAD_STACKSIZE=1500 CONFIG_NXPLAYER_COMMAND_LINE=y @@ -1106,6 +1118,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sama5d3x-ek/nxwm/defconfig b/configs/sama5d3x-ek/nxwm/defconfig index 5e533abf0da8ece2290ebd80f6ac0e27ca8cab4e..d9ca7a557674ef63f4dd2e59c854a4b23d5f23ac 100644 --- a/configs/sama5d3x-ek/nxwm/defconfig +++ b/configs/sama5d3x-ek/nxwm/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH_CHIP_SAMA5=y # 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 @@ -119,9 +122,12 @@ CONFIG_ARCH_CORTEXA5=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-a" CONFIG_ARCH_CHIP="sama5" +# 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 is not set # CONFIG_ARM_HAVE_MPU_UNIFIED is not set CONFIG_ARCH_HAVE_LOWVECTORS=y CONFIG_ARCH_LOWVECTORS=y @@ -131,6 +137,8 @@ CONFIG_ARCH_LOWVECTORS=y # ARMv7-A Configuration Options # # CONFIG_ARMV7A_HAVE_GICv2 is not set +# CONFIG_ARMV7A_HAVE_GTM is not set +# CONFIG_ARMV7A_HAVE_PTM is not set # CONFIG_ARMV7A_HAVE_L2CC is not set # CONFIG_ARMV7A_HAVE_L2CC_PL310 is not set # CONFIG_ARMV7A_TOOLCHAIN_BUILDROOT is not set @@ -182,7 +190,6 @@ CONFIG_SAMA5_HAVE_PIOE=y # CONFIG_SAMA5_HAVE_TC is not set # CONFIG_SAMA5_HAVE_TC1 is not set # CONFIG_SAMA5_HAVE_TC2 is not set -# CONFIG_ARCH_HAVE_TRUSTZONE is not set # CONFIG_SAMA5_HAVE_TWI3 is not set # CONFIG_SAMA5_HAVE_VDEC is not set # CONFIG_SAMA5_FLEXCOM is not set @@ -437,7 +444,7 @@ CONFIG_SAMA5D3xEK_TSD_DEVMINOR=0 # CONFIG_SAMA5D3xEK_SLOWCLOCK is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_UNIQUEID is not set -# CONFIG_BOARDCTL_TSCTEST is not set +CONFIG_BOARDCTL_TSCTEST=y # CONFIG_BOARDCTL_ADCTEST is not set # CONFIG_BOARDCTL_PWMTEST is not set # CONFIG_BOARDCTL_GRAPHICS is not set @@ -603,7 +610,12 @@ CONFIG_INPUT=y # CONFIG_DJOYSTICK is not set # CONFIG_AJOYSTICK is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -611,6 +623,7 @@ CONFIG_INPUT=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -622,6 +635,8 @@ CONFIG_INPUT=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -645,10 +660,6 @@ CONFIG_USART1_SERIALDRIVER=y # 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 @@ -675,15 +686,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -729,12 +743,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -743,6 +751,7 @@ CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x95fa # CONFIG_NX_ANTIALIASING is not set # CONFIG_NX_WRITEONLY is not set +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -907,12 +916,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -945,6 +957,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # +# CONFIG_EXAMPLES_ADC is not set # CONFIG_EXAMPLES_CHAT is not set # CONFIG_EXAMPLES_CONFIGDATA is not set # CONFIG_EXAMPLES_CPUHOG is not set @@ -955,10 +968,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -967,18 +980,18 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -992,10 +1005,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_WEBSERVER is not set # # File System Utilities @@ -1019,8 +1032,8 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1031,6 +1044,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -1155,6 +1169,7 @@ CONFIG_NXWIDGETS_LISTENERSTACK=1596 # NXWidget Configuration # CONFIG_NXWIDGETS_BPP=16 +# CONFIG_NXWIDGETS_GREYSCALE is not set CONFIG_NXWIDGETS_SIZEOFCHAR=1 # @@ -1323,12 +1338,12 @@ CONFIG_NXWM_HEXCALCULATOR_FONTID=6 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1336,6 +1351,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sama5d3x-ek/ov2640/defconfig b/configs/sama5d3x-ek/ov2640/defconfig index c058dd759b8691d5217094dcbbe7bc8717c62a22..62fc4177eb0df4f7c6d5ed626614402f7fe56fe7 100644 --- a/configs/sama5d3x-ek/ov2640/defconfig +++ b/configs/sama5d3x-ek/ov2640/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH_CHIP_SAMA5=y # 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 @@ -119,9 +122,12 @@ CONFIG_ARCH_CORTEXA5=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-a" CONFIG_ARCH_CHIP="sama5" +# 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 is not set # CONFIG_ARM_HAVE_MPU_UNIFIED is not set CONFIG_ARCH_HAVE_LOWVECTORS=y CONFIG_ARCH_LOWVECTORS=y @@ -131,6 +137,8 @@ CONFIG_ARCH_LOWVECTORS=y # ARMv7-A Configuration Options # # CONFIG_ARMV7A_HAVE_GICv2 is not set +# CONFIG_ARMV7A_HAVE_GTM is not set +# CONFIG_ARMV7A_HAVE_PTM is not set # CONFIG_ARMV7A_HAVE_L2CC is not set # CONFIG_ARMV7A_HAVE_L2CC_PL310 is not set # CONFIG_ARMV7A_TOOLCHAIN_BUILDROOT is not set @@ -182,7 +190,6 @@ CONFIG_SAMA5_HAVE_PIOE=y # CONFIG_SAMA5_HAVE_TC is not set # CONFIG_SAMA5_HAVE_TC1 is not set # CONFIG_SAMA5_HAVE_TC2 is not set -# CONFIG_ARCH_HAVE_TRUSTZONE is not set # CONFIG_SAMA5_HAVE_TWI3 is not set # CONFIG_SAMA5_HAVE_VDEC is not set # CONFIG_SAMA5_FLEXCOM is not set @@ -571,7 +578,12 @@ CONFIG_OV2640_SVGA_RESOLUTION=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -579,6 +591,7 @@ CONFIG_OV2640_SVGA_RESOLUTION=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -590,6 +603,8 @@ CONFIG_OV2640_SVGA_RESOLUTION=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -613,10 +628,6 @@ CONFIG_USART1_SERIALDRIVER=y # 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_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set @@ -642,15 +653,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -681,12 +695,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -750,11 +758,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -783,10 +794,10 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -795,18 +806,18 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -820,10 +831,9 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_WEBSERVER is not set # # File System Utilities @@ -845,8 +855,8 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -857,6 +867,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 @@ -878,17 +889,17 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_I2CTOOL is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sama5d3x-ek/src/sam_adc.c b/configs/sama5d3x-ek/src/sam_adc.c index f27ba7be0de65ea0f37e8ddbe720edcd2567c3a7..2600ffd09887b64c9245e94151f737bf5afe0db6 100644 --- a/configs/sama5d3x-ek/src/sam_adc.c +++ b/configs/sama5d3x-ek/src/sam_adc.c @@ -92,7 +92,7 @@ int board_adc_setup(void) adc = sam_adc_initialize(); if (adc == NULL) { - adbg("ERROR: Failed to get ADC interface\n"); + aerr("ERROR: Failed to get ADC interface\n"); return -ENODEV; } @@ -101,7 +101,7 @@ int board_adc_setup(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - adbg("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } diff --git a/configs/sama5d3x-ek/src/sam_at24.c b/configs/sama5d3x-ek/src/sam_at24.c index ea59b48b33f1542bee356c860e28598469b3301d..cd8b8cade789b8fba01929806a9080401d3e36b8 100644 --- a/configs/sama5d3x-ek/src/sam_at24.c +++ b/configs/sama5d3x-ek/src/sam_at24.c @@ -102,21 +102,21 @@ int sam_at24_automount(int minor) { /* No.. Get the I2C bus driver */ - fvdbg("Initialize TWI%d\n", AT24_BUS); + finfo("Initialize TWI%d\n", AT24_BUS); i2c = sam_i2cbus_initialize(AT24_BUS); if (!i2c) { - fdbg("ERROR: Failed to initialize TWI%d\n", AT24_BUS); + ferr("ERROR: Failed to initialize TWI%d\n", AT24_BUS); return -ENODEV; } /* Now bind the I2C interface to the AT24 I2C EEPROM driver */ - fvdbg("Bind the AT24 EEPROM driver to TWI%d\n", AT24_BUS); + finfo("Bind the AT24 EEPROM driver to TWI%d\n", AT24_BUS); mtd = at24c_initialize(i2c); if (!mtd) { - fdbg("ERROR: Failed to bind TWI%d to the AT24 EEPROM driver\n", + ferr("ERROR: Failed to bind TWI%d to the AT24 EEPROM driver\n", AT24_BUS); return -ENODEV; } @@ -124,32 +124,32 @@ int sam_at24_automount(int minor) #if defined(CONFIG_SAMA5D3xEK_AT24_FTL) /* And finally, use the FTL layer to wrap the MTD driver as a block driver */ - fvdbg("Initialize the FTL layer to create /dev/mtdblock%d\n", AT24_MINOR); + finfo("Initialize the FTL layer to create /dev/mtdblock%d\n", AT24_MINOR); ret = ftl_initialize(AT24_MINOR, mtd); if (ret < 0) { - fdbg("ERROR: Failed to initialize the FTL layer: %d\n", ret); + ferr("ERROR: Failed to initialize the FTL layer: %d\n", ret); return ret; } #elif defined(CONFIG_SAMA5D3xEK_AT24_NXFFS) /* Initialize to provide NXFFS on the MTD interface */ - fvdbg("Initialize the NXFFS file system\n"); + finfo("Initialize the NXFFS file system\n"); ret = nxffs_initialize(mtd); if (ret < 0) { - fdbg("ERROR: NXFFS initialization failed: %d\n", ret); + ferr("ERROR: NXFFS initialization failed: %d\n", ret); return ret; } /* Mount the file system at /mnt/at24 */ - fvdbg("Mount the NXFFS file system at /dev/at24\n"); + finfo("Mount the NXFFS file system at /dev/at24\n"); ret = mount(NULL, "/mnt/at24", "nxffs", 0, NULL); if (ret < 0) { - fdbg("ERROR: Failed to mount the NXFFS volume: %d\n", errno); + ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno); return ret; } #endif diff --git a/configs/sama5d3x-ek/src/sam_at25.c b/configs/sama5d3x-ek/src/sam_at25.c index 14a77b94934a28e72989863c9e7d9ef186a3f4fa..8c86d3ccaaba1e5f7125d49b4f739091a73da12f 100644 --- a/configs/sama5d3x-ek/src/sam_at25.c +++ b/configs/sama5d3x-ek/src/sam_at25.c @@ -87,7 +87,7 @@ int sam_at25_automount(int minor) spi = sam_spibus_initialize(AT25_PORT); if (!spi) { - fdbg("ERROR: Failed to initialize SPI port %d\n", AT25_PORT); + ferr("ERROR: Failed to initialize SPI port %d\n", AT25_PORT); return -ENODEV; } @@ -96,7 +96,7 @@ int sam_at25_automount(int minor) mtd = at25_initialize(spi); if (!mtd) { - fdbg("ERROR: Failed to bind SPI port %d to the AT25 FLASH driver\n"); + ferr("ERROR: Failed to bind SPI port %d to the AT25 FLASH driver\n"); return -ENODEV; } @@ -106,7 +106,7 @@ int sam_at25_automount(int minor) ret = ftl_initialize(AT25_MINOR, mtd); if (ret < 0) { - fdbg("ERROR: Failed to initialize the FTL layer: %d\n", ret); + ferr("ERROR: Failed to initialize the FTL layer: %d\n", ret); return ret; } @@ -116,7 +116,7 @@ int sam_at25_automount(int minor) ret = nxffs_initialize(mtd); if (ret < 0) { - fdbg("ERROR: NXFFS initialization failed: %d\n", ret); + ferr("ERROR: NXFFS initialization failed: %d\n", ret); return ret; } @@ -125,7 +125,7 @@ int sam_at25_automount(int minor) ret = mount(NULL, "/mnt/at25", "nxffs", 0, NULL); if (ret < 0) { - fdbg("ERROR: Failed to mount the NXFFS volume: %d\n", errno); + ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno); return ret; } #endif diff --git a/configs/sama5d3x-ek/src/sam_autoleds.c b/configs/sama5d3x-ek/src/sam_autoleds.c index 7e612dde9d3145ad210a54fe9cf2514250504606..ae4b1a32a35374ce84cfee0c1ed174724c463402 100644 --- a/configs/sama5d3x-ek/src/sam_autoleds.c +++ b/configs/sama5d3x-ek/src/sam_autoleds.c @@ -87,30 +87,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/sama5d3x-ek/src/sam_can.c b/configs/sama5d3x-ek/src/sam_can.c index d904d12d832ccc843756b33522ee359bb7c58445..dae9f4e61e7ede6f77c5c8c4b6b196f809e107cd 100644 --- a/configs/sama5d3x-ek/src/sam_can.c +++ b/configs/sama5d3x-ek/src/sam_can.c @@ -69,25 +69,6 @@ # define CAN_PORT 1 #endif -/* 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 - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -116,7 +97,7 @@ int board_can_initialize(void) can = sam_caninitialize(CAN_PORT); if (can == NULL) { - candbg("ERROR: Failed to get CAN interface\n"); + canerr("ERROR: Failed to get CAN interface\n"); return -ENODEV; } @@ -125,7 +106,7 @@ int board_can_initialize(void) ret = can_register("/dev/can0", can); if (ret < 0) { - candbg("ERROR: can_register failed: %d\n", ret); + canerr("ERROR: can_register failed: %d\n", ret); return ret; } diff --git a/configs/sama5d3x-ek/src/sam_ethernet.c b/configs/sama5d3x-ek/src/sam_ethernet.c index 1ac9640c693c3ce0c16465fa8d6e94308576db08..87ee620ba7b9a8f762a19b334732dd474ddb3eb6 100644 --- a/configs/sama5d3x-ek/src/sam_ethernet.c +++ b/configs/sama5d3x-ek/src/sam_ethernet.c @@ -42,8 +42,8 @@ /* Force verbose debug on in this file only to support unit-level testing. */ #ifdef CONFIG_NETDEV_PHY_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG_VERBOSE 1 +# undef CONFIG_DEBUG_INFO +# define CONFIG_DEBUG_INFO 1 # undef CONFIG_DEBUG_NET # define CONFIG_DEBUG_NET 1 #endif @@ -84,11 +84,13 @@ */ #ifdef CONFIG_NETDEV_PHY_DEBUG -# define phydbg dbg -# define phylldbg lldbg +# define phyerr _err +# define phywarn _warn +# define phyinfo _info #else -# define phydbg(x...) -# define phylldbg(x...) +# define phyerr(x...) +# define phywarn(x...) +# define phyinfo(x...) #endif /************************************************************************************ @@ -116,7 +118,7 @@ static xcpt_t g_gmac_handler; #ifdef CONFIG_SAMA5_EMACA static void sam_emac_phy_enable(bool enable) { - phydbg("IRQ%d: enable=%d\n", IRQ_INT_ETH1, enable); + phyinfo("IRQ%d: enable=%d\n", IRQ_INT_ETH1, enable); if (enable) { sam_pioirqenable(IRQ_INT_ETH1); @@ -132,7 +134,7 @@ static void sam_emac_phy_enable(bool enable) #ifdef CONFIG_SAMA5_GMAC static void sam_gmac_phy_enable(bool enable) { - phydbg("IRQ%d: enable=%d\n", IRQ_INT_ETH0, enable); + phyinfo("IRQ%d: enable=%d\n", IRQ_INT_ETH0, enable); if (enable) { sam_pioirqenable(IRQ_INT_ETH0); @@ -179,7 +181,7 @@ void weak_function sam_netinitialize(void) * The KSZ8051 PHY interrupt is available on PE30 INT_ETH1 */ - phydbg("Configuring %08x\n", PIO_INT_ETH1); + phyinfo("Configuring %08x\n", PIO_INT_ETH1); sam_configpio(PIO_INT_ETH1); #endif @@ -196,7 +198,7 @@ void weak_function sam_netinitialize(void) * The KSZ9021/31 interrupt is available on PB35 INT_GETH0 */ - phydbg("Configuring %08x\n", PIO_INT_ETH0); + phyinfo("Configuring %08x\n", PIO_INT_ETH0); sam_configpio(PIO_INT_ETH0); #endif } @@ -276,18 +278,18 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) DEBUGASSERT(intf); - nvdbg("%s: handler=%p\n", intf, handler); + ninfo("%s: handler=%p\n", intf, handler); #ifdef CONFIG_SAMA5_EMACA - phydbg("EMAC: devname=%s\n", SAMA5_EMAC_DEVNAME); + phyinfo("EMAC: devname=%s\n", SAMA5_EMAC_DEVNAME); #endif #ifdef CONFIG_SAMA5_GMAC - phydbg("GMAC: devname=%s\n", SAMA5_GMAC_DEVNAME); + phyinfo("GMAC: devname=%s\n", SAMA5_GMAC_DEVNAME); #endif #ifdef CONFIG_SAMA5_EMACA if (strcmp(intf, SAMA5_EMAC_DEVNAME) == 0) { - phydbg("Select EMAC\n"); + phyinfo("Select EMAC\n"); phandler = &g_emac_handler; pinset = PIO_INT_ETH1; irq = IRQ_INT_ETH1; @@ -298,7 +300,7 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) #ifdef CONFIG_SAMA5_GMAC if (strcmp(intf, SAMA5_GMAC_DEVNAME) == 0) { - phydbg("Select GMAC\n"); + phyinfo("Select GMAC\n"); phandler = &g_gmac_handler; pinset = PIO_INT_ETH0; irq = IRQ_INT_ETH0; @@ -307,7 +309,7 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) else #endif { - ndbg("Unsupported interface: %s\n", intf); + nerr("ERROR: Unsupported interface: %s\n", intf); return NULL; } @@ -326,15 +328,15 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) if (handler) { - phydbg("Configure pin: %08x\n", pinset); + phyinfo("Configure pin: %08x\n", pinset); sam_pioirq(pinset); - phydbg("Attach IRQ%d\n", irq); + phyinfo("Attach IRQ%d\n", irq); (void)irq_attach(irq, handler); } else { - phydbg("Detach IRQ%d\n", irq); + phyinfo("Detach IRQ%d\n", irq); (void)irq_detach(irq); enabler = NULL; } diff --git a/configs/sama5d3x-ek/src/sam_hsmci.c b/configs/sama5d3x-ek/src/sam_hsmci.c index a999da2f9a0ad611deeed9d706049f20923bb325..89a0307d8900e19b3ccd3fb3eb466c3b2dddad9e 100644 --- a/configs/sama5d3x-ek/src/sam_hsmci.c +++ b/configs/sama5d3x-ek/src/sam_hsmci.c @@ -154,7 +154,7 @@ bool sam_cardinserted_internal(struct sam_hsmci_state_s *state) /* Get the state of the PIO pin */ inserted = sam_pioread(state->pincfg); - fllvdbg("Slot %d inserted: %s\n", state->slotno, inserted ? "NO" : "YES"); + finfo("Slot %d inserted: %s\n", state->slotno, inserted ? "NO" : "YES"); return !inserted; } @@ -257,7 +257,7 @@ int sam_hsmci_initialize(int slotno, int minor) state = sam_hsmci_state(slotno); if (!state) { - fdbg("No state for slotno %d\n", slotno); + ferr("ERROR: No state for slotno %d\n", slotno); return -EINVAL; } @@ -271,7 +271,7 @@ int sam_hsmci_initialize(int slotno, int minor) state->hsmci = sdio_initialize(slotno); if (!state->hsmci) { - fdbg("Failed to initialize SDIO slot %d\n", slotno); + ferr("ERROR: Failed to initialize SDIO slot %d\n", slotno); return -ENODEV; } @@ -280,7 +280,7 @@ int sam_hsmci_initialize(int slotno, int minor) ret = mmcsd_slotinitialize(minor, state->hsmci); if (ret != OK) { - fdbg("Failed to bind SDIO to the MMC/SD driver: %d\n", ret); + ferr("ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); return ret; } @@ -317,7 +317,7 @@ bool sam_cardinserted(int slotno) state = sam_hsmci_state(slotno); if (!state) { - fdbg("No state for slotno %d\n", slotno); + ferr("ERROR: No state for slotno %d\n", slotno); return false; } diff --git a/configs/sama5d3x-ek/src/sam_i2schar.c b/configs/sama5d3x-ek/src/sam_i2schar.c index 5fa7c324db87c8c052f189c2ad57fa4bea7c2f7f..86c06aafa7886aeeaf13cd98b6de506fa05782e6 100644 --- a/configs/sama5d3x-ek/src/sam_i2schar.c +++ b/configs/sama5d3x-ek/src/sam_i2schar.c @@ -99,7 +99,7 @@ int i2schar_devinit(void) i2s = sam_ssc_initialize(CONFIG_SAMA5D3xEK_SSC_PORT); if (!i2s) { - dbg("ERROR: Failed to get the SAMA5 SSC/I2S driver for SSC%d\n", + _err("ERROR: Failed to get the SAMA5 SSC/I2S driver for SSC%d\n", CONFIG_SAMA5D3xEK_SSC_PORT); return -ENODEV; } @@ -109,7 +109,7 @@ int i2schar_devinit(void) ret = i2schar_register(i2s, CONFIG_SAMA5D3xEK_I2SCHAR_MINOR); if (ret < 0) { - adbg("ERROR: i2schar_register failed: %d\n", ret); + aerr("ERROR: i2schar_register failed: %d\n", ret); return ret; } diff --git a/configs/sama5d3x-ek/src/sam_nandflash.c b/configs/sama5d3x-ek/src/sam_nandflash.c index 709d3c240c956e838a7a6a05a76ae7f8fbf58d6c..50c327e9f3e9109515fa10a2c2ea3f60f5c7d56e 100644 --- a/configs/sama5d3x-ek/src/sam_nandflash.c +++ b/configs/sama5d3x-ek/src/sam_nandflash.c @@ -186,7 +186,7 @@ int sam_nand_automount(int minor) mtd = sam_nand_initialize(HSMC_CS3); if (!mtd) { - fdbg("ERROR: Failed to create the NAND driver on CS%d\n", HSMC_CS3); + ferr("ERROR: Failed to create the NAND driver on CS%d\n", HSMC_CS3); return -ENODEV; } @@ -196,7 +196,7 @@ int sam_nand_automount(int minor) ret = ftl_initialize(NAND_MINOR, mtd); if (ret < 0) { - fdbg("ERROR: Failed to initialize the FTL layer: %d\n", ret); + ferr("ERROR: Failed to initialize the FTL layer: %d\n", ret); return ret; } @@ -206,7 +206,7 @@ int sam_nand_automount(int minor) ret = nxffs_initialize(mtd); if (ret < 0) { - fdbg("ERROR: NXFFS initialization failed: %d\n", ret); + ferr("ERROR: NXFFS initialization failed: %d\n", ret); return ret; } @@ -215,7 +215,7 @@ int sam_nand_automount(int minor) ret = mount(NULL, "/mnt/nand", "nxffs", 0, NULL); if (ret < 0) { - fdbg("ERROR: Failed to mount the NXFFS volume: %d\n", errno); + ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno); return ret; } #endif diff --git a/configs/sama5d3x-ek/src/sam_ov2640.c b/configs/sama5d3x-ek/src/sam_ov2640.c index ad55d0a4a6bbe9e64e79894de2d5cd1b5e1f313e..dfaf2dbfc106d341d6edb907f2f9678454f2a0dc 100644 --- a/configs/sama5d3x-ek/src/sam_ov2640.c +++ b/configs/sama5d3x-ek/src/sam_ov2640.c @@ -88,14 +88,14 @@ static inline FAR struct fb_vtable_s *ov2640_lcd_initialize(void) ret = up_fbinitialize(0); if (ret < 0) { - gdbg("ERROR: up_fbinitialize failed: %d\n", -ret); + gerr("ERROR: up_fbinitialize failed: %d\n", -ret); return NULL; } vplane = up_fbgetvplane(0, 0); if (!vplane) { - gdbg("ERROR: up_fbgetvplane failed\n"); + gerr("ERROR: up_fbgetvplane failed\n"); } return vplane; @@ -161,7 +161,7 @@ static inline int ov2640_camera_initialize(void) i2c = sam_i2cbus_initialize(OV2640_BUS); if (!i2c) { - gdbg("ERROR: Failed to initialize TWI%d\n", OV2640_BUS); + gerr("ERROR: Failed to initialize TWI%d\n", OV2640_BUS); return EXIT_FAILURE; } @@ -196,7 +196,7 @@ static inline int ov2640_camera_initialize(void) /* Configure and enable the PCK1 output */ actual = sam_pck_configure(PCK1, PCKSRC_MCK, OV2640_FREQUENCY); - gvdbg("Desired PCK1 frequency: %ld Actual: %ld\n", + ginfo("Desired PCK1 frequency: %ld Actual: %ld\n", (long)OV2640_FREQUENCY, (long)actual); UNUSED(actual); @@ -210,7 +210,7 @@ static inline int ov2640_camera_initialize(void) ret = ov2640_initialize(i2c); if (ret < 0) { - gdbg("ERROR: Failed to initialize the OV2640: %d\n", ret); + gerr("ERROR: Failed to initialize the OV2640: %d\n", ret); return EXIT_FAILURE; } @@ -239,7 +239,7 @@ int ov2640_main(int argc, char *argv[]) vplane = ov2640_lcd_initialize(); if (!vplane) { - gdbg("ERROR: ov2640_lcd_initialize failed\n"); + gerr("ERROR: ov2640_lcd_initialize failed\n"); return EXIT_FAILURE; } @@ -248,7 +248,7 @@ int ov2640_main(int argc, char *argv[]) ret = ov2640_camera_initialize(); if (ret != EXIT_SUCCESS) { - gdbg("ERROR: ov2640_camera_initialize failed\n"); + gerr("ERROR: ov2640_camera_initialize failed\n"); return EXIT_FAILURE; } diff --git a/configs/sama5d3x-ek/src/sam_pwm.c b/configs/sama5d3x-ek/src/sam_pwm.c index 79ff78e337c34f3a2765ae7d78fb5f6dfbb57bbd..ef908554516730881205ec6abf2f9775ff842659 100644 --- a/configs/sama5d3x-ek/src/sam_pwm.c +++ b/configs/sama5d3x-ek/src/sam_pwm.c @@ -139,7 +139,7 @@ int board_pwm_setup(void) pwm = sam_pwminitialize(CONFIG_SAMA5D3xEK_CHANNEL); if (!pwm) { - dbg("Failed to get the SAMA5 PWM lower half\n"); + _err("ERROR: Failed to get the SAMA5 PWM lower half\n"); return -ENODEV; } @@ -148,7 +148,7 @@ int board_pwm_setup(void) ret = pwm_register("/dev/pwm0", pwm); if (ret < 0) { - adbg("pwm_register failed: %d\n", ret); + aerr("ERROR: pwm_register failed: %d\n", ret); return ret; } diff --git a/configs/sama5d3x-ek/src/sam_spi.c b/configs/sama5d3x-ek/src/sam_spi.c index 9a0ba344a8598ae7b5c07ace9152bf6a15dfee3a..f2932e5fb8df0c5ae198417c108cf498598a61c2 100644 --- a/configs/sama5d3x-ek/src/sam_spi.c +++ b/configs/sama5d3x-ek/src/sam_spi.c @@ -55,32 +55,6 @@ #if defined(CONFIG_SAMA5_SPI0) || defined(CONFIG_SAMA5_SPI1) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ diff --git a/configs/sama5d3x-ek/src/sam_touchscreen.c b/configs/sama5d3x-ek/src/sam_touchscreen.c index 4b69d561ac121ac1c207080acc0491d1054a9f23..ba5126643ae7ed0afc669b8dc374a32fb35d4f56 100644 --- a/configs/sama5d3x-ek/src/sam_touchscreen.c +++ b/configs/sama5d3x-ek/src/sam_touchscreen.c @@ -108,7 +108,7 @@ int board_tsc_setup(int minor) static bool initialized = false; int ret; - idbg("initialized:%d minor:%d\n", initialized, minor); + iinfo("initialized:%d minor:%d\n", initialized, minor); DEBUGASSERT(minor == 0); /* Since there is no uninitialized logic, this initialization can be @@ -122,7 +122,7 @@ int board_tsc_setup(int minor) adc = sam_adc_initialize(); if (!adc) { - idbg("ERROR: Failed to initialize the ADC driver\n"); + ierr("ERROR: Failed to initialize the ADC driver\n"); return -ENODEV; } @@ -131,7 +131,7 @@ int board_tsc_setup(int minor) ret = sam_tsd_register(adc, CONFIG_SAMA5D3xEK_TSD_DEVMINOR); if (ret < 0) { - idbg("ERROR: Failed to register touchscreen device /dev/input%d: %d\n", + ierr("ERROR: Failed to register touchscreen device /dev/input%d: %d\n", CONFIG_SAMA5D3xEK_TSD_DEVMINOR, ret); return -ENODEV; } diff --git a/configs/sama5d3x-ek/src/sam_usb.c b/configs/sama5d3x-ek/src/sam_usb.c index b9883e8561cb560acf26ddeedbd16ab849db8364..93fec3623109df8f9310afec28a8fd2092a92521 100644 --- a/configs/sama5d3x-ek/src/sam_usb.c +++ b/configs/sama5d3x-ek/src/sam_usb.c @@ -115,13 +115,13 @@ static int usbhost_waiter(struct usbhost_connection_s *dev) { struct usbhost_hubport_s *hport; - uvdbg("Running\n"); + uinfo("Running\n"); for (;;) { /* Wait for the device to change state */ DEBUGVERIFY(CONN_WAIT(dev, &hport)); - uvdbg("%s\n", hport->connected ? "connected" : "disconnected"); + uinfo("%s\n", hport->connected ? "connected" : "disconnected"); /* Did we just become connected? */ @@ -307,7 +307,7 @@ int sam_usbhost_initialize(void) ret = usbhost_hub_initialize(); if (ret < 0) { - udbg("ERROR: usbhost_hub_initialize failed: %d\n", ret); + uerr("ERROR: usbhost_hub_initialize failed: %d\n", ret); } #endif @@ -317,7 +317,7 @@ int sam_usbhost_initialize(void) ret = usbhost_msc_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the mass storage class: %d\n", ret); + uerr("ERROR: Failed to register the mass storage class: %d\n", ret); } #endif @@ -327,7 +327,7 @@ int sam_usbhost_initialize(void) ret = usbhost_cdcacm_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret); + uerr("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret); } #endif @@ -337,7 +337,7 @@ int sam_usbhost_initialize(void) ret = usbhost_kbdinit(); if (ret != OK) { - udbg("ERROR: Failed to register the KBD class\n"); + uerr("ERROR: Failed to register the KBD class\n"); } #endif @@ -349,7 +349,7 @@ int sam_usbhost_initialize(void) g_ohciconn = sam_ohci_initialize(0); if (!g_ohciconn) { - udbg("ERROR: sam_ohci_initialize failed\n"); + uerr("ERROR: sam_ohci_initialize failed\n"); return -ENODEV; } @@ -360,7 +360,7 @@ int sam_usbhost_initialize(void) (main_t)ohci_waiter, (FAR char * const *)NULL); if (pid < 0) { - udbg("ERROR: Failed to create ohci_waiter task: %d\n", ret); + uerr("ERROR: Failed to create ohci_waiter task: %d\n", ret); return -ENODEV; } #endif @@ -371,7 +371,7 @@ int sam_usbhost_initialize(void) g_ehciconn = sam_ehci_initialize(0); if (!g_ehciconn) { - udbg("ERROR: sam_ehci_initialize failed\n"); + uerr("ERROR: sam_ehci_initialize failed\n"); return -ENODEV; } @@ -382,7 +382,7 @@ int sam_usbhost_initialize(void) (main_t)ehci_waiter, (FAR char * const *)NULL); if (pid < 0) { - udbg("ERROR: Failed to create ehci_waiter task: %d\n", ret); + uerr("ERROR: Failed to create ehci_waiter task: %d\n", ret); return -ENODEV; } #endif @@ -413,7 +413,7 @@ void sam_usbhost_vbusdrive(int rhport, bool enable) { pio_pinset_t pinset = 0; - uvdbg("RHPort%d: enable=%d\n", rhport+1, enable); + uinfo("RHPort%d: enable=%d\n", rhport+1, enable); /* Pick the PIO configuration associated with the selected root hub port */ @@ -421,7 +421,7 @@ void sam_usbhost_vbusdrive(int rhport, bool enable) { case SAM_RHPORT1: #ifndef CONFIG_SAMA5_UHPHS_RHPORT1 - udbg("ERROR: RHPort1 is not available in this configuration\n"); + uerr("ERROR: RHPort1 is not available in this configuration\n"); return; #else pinset = PIO_USBA_VBUS_ENABLE; @@ -430,7 +430,7 @@ void sam_usbhost_vbusdrive(int rhport, bool enable) case SAM_RHPORT2: #ifndef CONFIG_SAMA5_UHPHS_RHPORT2 - udbg("ERROR: RHPort2 is not available in this configuration\n"); + uerr("ERROR: RHPort2 is not available in this configuration\n"); return; #else pinset = PIO_USBB_VBUS_ENABLE; @@ -439,7 +439,7 @@ void sam_usbhost_vbusdrive(int rhport, bool enable) case SAM_RHPORT3: #ifndef CONFIG_SAMA5_UHPHS_RHPORT3 - udbg("ERROR: RHPort3 is not available in this configuration\n"); + uerr("ERROR: RHPort3 is not available in this configuration\n"); return; #else pinset = PIO_USBC_VBUS_ENABLE; @@ -447,7 +447,7 @@ void sam_usbhost_vbusdrive(int rhport, bool enable) #endif default: - udbg("ERROR: RHPort%d is not supported\n", rhport+1); + uerr("ERROR: RHPort%d is not supported\n", rhport+1); return; } @@ -538,7 +538,7 @@ xcpt_t sam_setup_overcurrent(xcpt_t handler) #ifdef CONFIG_USBDEV void sam_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } #endif diff --git a/configs/sama5d3x-ek/src/sam_userleds.c b/configs/sama5d3x-ek/src/sam_userleds.c index 19f6da340efa36891afcc4a76f3c0241cbcb255a..cd738625e3d538366078e0f2ce94a478e8d38966 100644 --- a/configs/sama5d3x-ek/src/sam_userleds.c +++ b/configs/sama5d3x-ek/src/sam_userleds.c @@ -63,22 +63,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/sama5d3x-ek/src/sam_wm8904.c b/configs/sama5d3x-ek/src/sam_wm8904.c index 5639a5a4021ea4387163170f5850433043e85ffa..7727afcd353b05ba20edcd0a6754127c9a0b1cb1 100644 --- a/configs/sama5d3x-ek/src/sam_wm8904.c +++ b/configs/sama5d3x-ek/src/sam_wm8904.c @@ -157,13 +157,13 @@ static int wm8904_attach(FAR const struct wm8904_lower_s *lower, * new handler will called via wm8904_interrupt() when the interrupt occurs. */ - audvdbg("Attaching %p\n", isr); + audinfo("Attaching %p\n", isr); g_wm8904info.handler = isr; g_wm8904info.arg = arg; } else { - audvdbg("Detaching %p\n", g_wm8904info.handler); + audinfo("Detaching %p\n", g_wm8904info.handler); (void)wm8904_enable(lower, false); g_wm8904info.handler = NULL; g_wm8904info.arg = NULL; @@ -187,13 +187,13 @@ static bool wm8904_enable(FAR const struct wm8904_lower_s *lower, bool enable) if (enable && g_wm8904info.handler) { - audvdbg("Enabling\n"); + audinfo("Enabling\n"); sam_pioirqenable(IRQ_INT_WM8904); enabled = true; } else { - audvdbg("Disabling\n"); + audinfo("Disabling\n"); sam_pioirqdisable(IRQ_INT_WM8904); enabled = false; } @@ -208,7 +208,7 @@ static int wm8904_interrupt(int irq, FAR void *context) { /* Just forward the interrupt to the WM8904 driver */ - audvdbg("handler %p\n", g_wm8904info.handler); + audinfo("handler %p\n", g_wm8904info.handler); if (g_wm8904info.handler) { return g_wm8904info.handler(&g_wm8904info.lower, g_wm8904info.arg); @@ -253,7 +253,7 @@ int sam_wm8904_initialize(int minor) char devname[12]; int ret; - auddbg("minor %d\n", minor); + audinfo("minor %d\n", minor); DEBUGASSERT(minor >= 0 && minor <= 25); /* Have we already initialized? Since we never uninitialize we must prevent @@ -273,7 +273,7 @@ int sam_wm8904_initialize(int minor) i2c = sam_i2cbus_initialize(WM8904_TWI_BUS); if (!i2c) { - auddbg("Failed to initialize TWI%d\n", WM8904_TWI_BUS); + auderr("ERROR: Failed to initialize TWI%d\n", WM8904_TWI_BUS); ret = -ENODEV; goto errout; } @@ -283,7 +283,7 @@ int sam_wm8904_initialize(int minor) i2s = sam_ssc_initialize(WM8904_SSC_BUS); if (!i2s) { - auddbg("Failed to initialize SSC%d\n", WM8904_SSC_BUS); + auderr("ERROR: Failed to initialize SSC%d\n", WM8904_SSC_BUS); ret = -ENODEV; goto errout_with_i2c; } @@ -314,7 +314,7 @@ int sam_wm8904_initialize(int minor) ret = irq_attach(IRQ_INT_WM8904, wm8904_interrupt); if (ret < 0) { - auddbg("ERROR: Failed to attach WM8904 interrupt: %d\n", ret); + auderr("ERROR: Failed to attach WM8904 interrupt: %d\n", ret); goto errout_with_i2s; } @@ -325,7 +325,7 @@ int sam_wm8904_initialize(int minor) wm8904 = wm8904_initialize(i2c, i2s, &g_wm8904info.lower); if (!wm8904) { - auddbg("Failed to initialize the WM8904\n"); + auderr("ERROR: Failed to initialize the WM8904\n"); ret = -ENODEV; goto errout_with_irq; } @@ -338,7 +338,7 @@ int sam_wm8904_initialize(int minor) pcm = pcm_decode_initialize(wm8904); if (!pcm) { - auddbg("ERROR: Failed create the PCM decoder\n"); + auderr("ERROR: Failed create the PCM decoder\n"); ret = -ENODEV; goto errout_with_wm8904; } @@ -355,7 +355,7 @@ int sam_wm8904_initialize(int minor) ret = audio_register(devname, pcm); if (ret < 0) { - auddbg("ERROR: Failed to register /dev/%s device: %d\n", devname, ret); + auderr("ERROR: Failed to register /dev/%s device: %d\n", devname, ret); goto errout_with_pcm; } diff --git a/configs/sama5d4-ek/Kconfig b/configs/sama5d4-ek/Kconfig index d204951b04a2cba706ad84a9ee367441e7085f8c..caec053c0851d9a31fb2e71cb7bbb1fa8a73cccc 100644 --- a/configs/sama5d4-ek/Kconfig +++ b/configs/sama5d4-ek/Kconfig @@ -52,7 +52,7 @@ endchoice # SAMA4D4-EK DRAM Type config SAMA5D4EK_DRAM_MAIN bool "Build dram_main" default n - depends on SAMA5_BOOT_ISRAM + depends on SAMA5_BOOT_ISRAM && BUILD_FLAT ---help--- dram_main is a tiny program that runs in ISRAM. dram_main will enable SDRAM and load an Intel HEX program into SDRAM over the @@ -78,7 +78,7 @@ config SAMA5D4EK_DRAM_START config SAMA5D4EK_AT25_MAIN bool "Build at25_main" default n - depends on SAMA5_BOOT_ISRAM + depends on SAMA5_BOOT_ISRAM && BUILD_FLAT ---help--- at25_main is a tiny program that runs in ISRAM. at25_main will enable SDRAM and configure the AT25 Serial FLASH. It will prompt diff --git a/configs/sama5d4-ek/README.txt b/configs/sama5d4-ek/README.txt index 7e3f33bd3bbfdae6534d3b8659b19faef3128afb..ee5408b0d0f2e552ebfc355f1176d1c7fdceb240 100644 --- a/configs/sama5d4-ek/README.txt +++ b/configs/sama5d4-ek/README.txt @@ -1910,7 +1910,7 @@ USB High-Speed Device -------------------- There is normal console debug output available that can be enabled with - CONFIG_DEBUG + CONFIG_DEBUG_USB. However, USB device operation is very + CONFIG_DEBUG_FEATURES + CONFIG_DEBUG_USB. However, USB device operation is very time critical and enabling this debug output WILL interfere with the operation of the UDPHS. USB device tracing is a less invasive way to get debug information: If tracing is enabled, the USB device will save @@ -2102,7 +2102,7 @@ USB High-Speed Host ------------------ There is normal console debug output available that can be enabled with - CONFIG_DEBUG + CONFIG_DEBUG_USB. However, USB host operation is very time + CONFIG_DEBUG_FEATURES + CONFIG_DEBUG_USB. However, USB host operation is very time critical and enabling this debug output might interfere with the operation of the UDPHS. USB host tracing is a less invasive way to get debug information: If tracing is enabled, the USB host will save encoded trace @@ -4272,7 +4272,6 @@ Configurations configuration settings are summarized below: File System: - CONFIG_SYSLOG=y : Enables the System Logging feature. Device Drivers: CONFIG_RAMLOG=y : Enable the RAM-based logging feature. diff --git a/configs/sama5d4-ek/at25boot/defconfig b/configs/sama5d4-ek/at25boot/defconfig index 64151008f58879ae6c09455e3e50c4f316f54e2f..7fec0ba4aac11322fc54f6a6fb307f8c35ec1b48 100644 --- a/configs/sama5d4-ek/at25boot/defconfig +++ b/configs/sama5d4-ek/at25boot/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH_CHIP_SAMA5=y # 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 @@ -119,9 +122,13 @@ CONFIG_ARCH_CORTEXA5=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-a" CONFIG_ARCH_CHIP="sama5" +# 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_ARM_HAVE_MPU_UNIFIED is not set CONFIG_ARCH_HAVE_LOWVECTORS=y CONFIG_ARCH_LOWVECTORS=y @@ -131,6 +138,8 @@ CONFIG_ARCH_LOWVECTORS=y # ARMv7-A Configuration Options # # CONFIG_ARMV7A_HAVE_GICv2 is not set +# CONFIG_ARMV7A_HAVE_GTM is not set +# CONFIG_ARMV7A_HAVE_PTM is not set CONFIG_ARMV7A_HAVE_L2CC=y CONFIG_ARMV7A_HAVE_L2CC_PL310=y @@ -186,7 +195,6 @@ CONFIG_SAMA5_HAVE_SPI2=y # CONFIG_SAMA5_HAVE_TC is not set CONFIG_SAMA5_HAVE_TC1=y CONFIG_SAMA5_HAVE_TC2=y -CONFIG_ARCH_HAVE_TRUSTZONE=y CONFIG_SAMA5_HAVE_TWI3=y CONFIG_SAMA5_HAVE_VDEC=y # CONFIG_SAMA5_FLEXCOM is not set @@ -521,6 +529,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -535,7 +545,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -543,6 +558,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set CONFIG_MTD=y @@ -567,12 +583,15 @@ CONFIG_MTD_AT25=y CONFIG_AT25_SPIMODE=0 CONFIG_AT25_SPIFREQUENCY=20000000 # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP 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 @@ -583,6 +602,8 @@ CONFIG_AT25_SPIFREQUENCY=20000000 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -606,10 +627,6 @@ CONFIG_USART3_SERIALDRIVER=y # 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 @@ -636,15 +653,18 @@ CONFIG_USART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -689,12 +709,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -760,12 +774,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -809,10 +826,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -821,18 +838,18 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -846,14 +863,14 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -873,8 +890,8 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -885,6 +902,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -906,13 +924,13 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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_FREE is not set CONFIG_SYSTEM_HEX2BIN=y # CONFIG_SYSTEM_HEX2BIN_DEBUG is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set # CONFIG_READLINE_HAVE_EXTMATCH is not set CONFIG_SYSTEM_READLINE=y @@ -920,6 +938,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sama5d4-ek/bridge/defconfig b/configs/sama5d4-ek/bridge/defconfig index e777febe93be2d63d76c9ac181a47d4338c65390..76a5894a9d5724de49995bdd180d4acea0ef7f6c 100644 --- a/configs/sama5d4-ek/bridge/defconfig +++ b/configs/sama5d4-ek/bridge/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH_CHIP_SAMA5=y # 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 @@ -119,9 +122,13 @@ CONFIG_ARCH_CORTEXA5=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-a" CONFIG_ARCH_CHIP="sama5" +# 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_ARM_HAVE_MPU_UNIFIED is not set CONFIG_ARCH_HAVE_LOWVECTORS=y CONFIG_ARCH_LOWVECTORS=y @@ -131,6 +138,8 @@ CONFIG_ARCH_LOWVECTORS=y # ARMv7-A Configuration Options # # CONFIG_ARMV7A_HAVE_GICv2 is not set +# CONFIG_ARMV7A_HAVE_GTM is not set +# CONFIG_ARMV7A_HAVE_PTM is not set CONFIG_ARMV7A_HAVE_L2CC=y CONFIG_ARMV7A_HAVE_L2CC_PL310=y @@ -186,7 +195,6 @@ CONFIG_SAMA5_HAVE_SPI2=y # CONFIG_SAMA5_HAVE_TC is not set CONFIG_SAMA5_HAVE_TC1=y CONFIG_SAMA5_HAVE_TC2=y -CONFIG_ARCH_HAVE_TRUSTZONE=y CONFIG_SAMA5_HAVE_TWI3=y CONFIG_SAMA5_HAVE_VDEC=y # CONFIG_SAMA5_FLEXCOM is not set @@ -555,7 +563,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -563,6 +576,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -623,6 +637,8 @@ CONFIG_ETH1_PHY_KSZ8081=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -646,10 +662,6 @@ CONFIG_USART3_SERIALDRIVER=y # 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 @@ -677,15 +689,18 @@ CONFIG_USART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -828,12 +843,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -902,6 +911,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 # CONFIG_NETDB_DNSCLIENT is not set @@ -909,6 +920,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -981,16 +993,17 @@ CONFIG_EXAMPLES_BRIDGE_NET2_PRIORITY=100 # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -999,18 +1012,18 @@ CONFIG_EXAMPLES_BRIDGE_NET2_PRIORITY=100 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1026,11 +1039,9 @@ CONFIG_EXAMPLES_BRIDGE_NET2_PRIORITY=100 # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # 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_WEBSERVER is not set # # File System Utilities @@ -1054,8 +1065,8 @@ CONFIG_EXAMPLES_BRIDGE_NET2_PRIORITY=100 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1069,14 +1080,15 @@ CONFIG_EXAMPLES_BRIDGE_NET2_PRIORITY=100 # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER 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 -# CONFIG_NETUTILS_TFTPC is not set CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_PPPD is not set +# CONFIG_NETUTILS_SMTP is not set +# CONFIG_NETUTILS_TFTPC is not set # # NSH Library @@ -1095,12 +1107,12 @@ CONFIG_NETUTILS_NETLIB=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set CONFIG_SYSTEM_RAMTEST=y # CONFIG_READLINE_HAVE_EXTMATCH is not set CONFIG_SYSTEM_READLINE=y @@ -1108,6 +1120,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sama5d4-ek/dramboot/defconfig b/configs/sama5d4-ek/dramboot/defconfig index f12701c0c512996883ede62b300807d9fb43fc79..20692044399511de9cd4b82086fc3ad4a2b37ea1 100644 --- a/configs/sama5d4-ek/dramboot/defconfig +++ b/configs/sama5d4-ek/dramboot/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH_CHIP_SAMA5=y # 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 @@ -119,9 +122,13 @@ CONFIG_ARCH_CORTEXA5=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-a" CONFIG_ARCH_CHIP="sama5" +# 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_ARM_HAVE_MPU_UNIFIED is not set CONFIG_ARCH_HAVE_LOWVECTORS=y CONFIG_ARCH_LOWVECTORS=y @@ -131,6 +138,8 @@ CONFIG_ARCH_LOWVECTORS=y # ARMv7-A Configuration Options # # CONFIG_ARMV7A_HAVE_GICv2 is not set +# CONFIG_ARMV7A_HAVE_GTM is not set +# CONFIG_ARMV7A_HAVE_PTM is not set CONFIG_ARMV7A_HAVE_L2CC=y CONFIG_ARMV7A_HAVE_L2CC_PL310=y @@ -186,7 +195,6 @@ CONFIG_SAMA5_HAVE_SPI2=y # CONFIG_SAMA5_HAVE_TC is not set CONFIG_SAMA5_HAVE_TC1=y CONFIG_SAMA5_HAVE_TC2=y -CONFIG_ARCH_HAVE_TRUSTZONE=y CONFIG_SAMA5_HAVE_TWI3=y CONFIG_SAMA5_HAVE_VDEC=y # CONFIG_SAMA5_FLEXCOM is not set @@ -521,7 +529,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -529,6 +542,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -540,6 +554,8 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -563,10 +579,6 @@ CONFIG_USART3_SERIALDRIVER=y # 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 @@ -593,15 +605,18 @@ CONFIG_USART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -646,12 +661,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -717,12 +726,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -766,10 +778,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -778,18 +790,18 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -803,10 +815,9 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_WEBSERVER is not set # # File System Utilities @@ -830,8 +841,8 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -842,6 +853,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -863,13 +875,13 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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_FREE is not set CONFIG_SYSTEM_HEX2BIN=y # CONFIG_SYSTEM_HEX2BIN_DEBUG is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set # CONFIG_READLINE_HAVE_EXTMATCH is not set CONFIG_SYSTEM_READLINE=y @@ -877,6 +889,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sama5d4-ek/elf/defconfig b/configs/sama5d4-ek/elf/defconfig index b598b3f7cc9e1af4385e780ee6634e4b289a474a..7b2b355e2da0fc42eb360627ecea5d62c1200cfe 100644 --- a/configs/sama5d4-ek/elf/defconfig +++ b/configs/sama5d4-ek/elf/defconfig @@ -47,10 +47,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -100,6 +101,7 @@ CONFIG_ARCH_CHIP_SAMA5=y # 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 @@ -121,9 +123,15 @@ CONFIG_ARCH_CORTEXA5=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-a" CONFIG_ARCH_CHIP="sama5" +# 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 @@ -133,6 +141,8 @@ CONFIG_ARCH_LOWVECTORS=y # ARMv7-A Configuration Options # # CONFIG_ARMV7A_HAVE_GICv2 is not set +# CONFIG_ARMV7A_HAVE_GTM is not set +# CONFIG_ARMV7A_HAVE_PTM is not set CONFIG_ARMV7A_HAVE_L2CC=y CONFIG_ARMV7A_HAVE_L2CC_PL310=y @@ -189,7 +199,6 @@ CONFIG_SAMA5_HAVE_SPI2=y # CONFIG_SAMA5_HAVE_TC is not set CONFIG_SAMA5_HAVE_TC1=y CONFIG_SAMA5_HAVE_TC2=y -CONFIG_ARCH_HAVE_TRUSTZONE=y CONFIG_SAMA5_HAVE_TWI3=y CONFIG_SAMA5_HAVE_VDEC=y # CONFIG_SAMA5_FLEXCOM is not set @@ -547,7 +556,12 @@ CONFIG_AUDIO_DEVICES=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -555,6 +569,7 @@ CONFIG_AUDIO_DEVICES=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -566,6 +581,8 @@ CONFIG_AUDIO_DEVICES=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -589,10 +606,6 @@ CONFIG_USART4_SERIALDRIVER=y # 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 @@ -634,15 +647,18 @@ CONFIG_USART4_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -680,12 +696,6 @@ CONFIG_FS_ROMFS=y # 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 # @@ -759,12 +769,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -813,10 +826,10 @@ CONFIG_EXAMPLES_ELF_CXXINITIALIZE=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -825,18 +838,18 @@ CONFIG_EXAMPLES_ELF_CXXINITIALIZE=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RANDOM is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set @@ -853,11 +866,10 @@ CONFIG_EXAMPLES_ELF_CXXINITIALIZE=y # CONFIG_EXAMPLES_THTTPD is not set # CONFIG_EXAMPLES_TIFF is not set # 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -881,8 +893,8 @@ CONFIG_EXAMPLES_ELF_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -894,6 +906,7 @@ CONFIG_EXAMPLES_ELF_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 @@ -915,13 +928,13 @@ CONFIG_EXAMPLES_ELF_CXXINITIALIZE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_I2CTOOL is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set # CONFIG_READLINE_HAVE_EXTMATCH is not set CONFIG_SYSTEM_READLINE=y @@ -929,6 +942,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sama5d4-ek/ipv6/defconfig b/configs/sama5d4-ek/ipv6/defconfig index 347761f235e181f1eabedbe8533d22e0e60a3673..a5400f4e90e9853fd85dfc3fb9b1b03c513a5504 100644 --- a/configs/sama5d4-ek/ipv6/defconfig +++ b/configs/sama5d4-ek/ipv6/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH_CHIP_SAMA5=y # 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 @@ -119,9 +122,13 @@ CONFIG_ARCH_CORTEXA5=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-a" CONFIG_ARCH_CHIP="sama5" +# 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_ARM_HAVE_MPU_UNIFIED is not set CONFIG_ARCH_HAVE_LOWVECTORS=y CONFIG_ARCH_LOWVECTORS=y @@ -131,6 +138,8 @@ CONFIG_ARCH_LOWVECTORS=y # ARMv7-A Configuration Options # # CONFIG_ARMV7A_HAVE_GICv2 is not set +# CONFIG_ARMV7A_HAVE_GTM is not set +# CONFIG_ARMV7A_HAVE_PTM is not set CONFIG_ARMV7A_HAVE_L2CC=y CONFIG_ARMV7A_HAVE_L2CC_PL310=y @@ -191,7 +200,6 @@ CONFIG_SAMA5_HAVE_SPI2=y # CONFIG_SAMA5_HAVE_TC is not set CONFIG_SAMA5_HAVE_TC1=y CONFIG_SAMA5_HAVE_TC2=y -CONFIG_ARCH_HAVE_TRUSTZONE=y CONFIG_SAMA5_HAVE_TWI3=y CONFIG_SAMA5_HAVE_VDEC=y # CONFIG_SAMA5_FLEXCOM is not set @@ -697,7 +705,12 @@ CONFIG_MXT_NPOLLWAITERS=4 # CONFIG_DJOYSTICK is not set # CONFIG_AJOYSTICK is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -705,6 +718,7 @@ CONFIG_MXT_NPOLLWAITERS=4 # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -767,6 +781,8 @@ CONFIG_ETH0_PHY_KSZ8081=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -790,10 +806,6 @@ CONFIG_USART4_SERIALDRIVER=y # 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 @@ -853,21 +865,25 @@ CONFIG_HIDKBD_NPOLLWAITERS=2 # CONFIG_USBHOST_TRACE is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set 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_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_RAMLOG_SYSLOG=y # CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -1031,13 +1047,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_NET 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 # @@ -1046,6 +1055,7 @@ CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x7b5d # CONFIG_NX_ANTIALIASING is not set # CONFIG_NX_WRITEONLY is not set +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -1224,6 +1234,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 @@ -1231,6 +1243,7 @@ CONFIG_LIBC_NETDB=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1281,16 +1294,17 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1309,17 +1323,17 @@ CONFIG_EXAMPLES_NX_BPP=16 # 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 is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RANDOM is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set @@ -1329,8 +1343,8 @@ CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1343,12 +1357,11 @@ CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0" CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UDPBLASTER is not set -# CONFIG_EXAMPLES_DISCOVER 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_XMLRPC is not set # @@ -1373,8 +1386,8 @@ CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1386,19 +1399,20 @@ CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y # # CONFIG_NETUTILS_CHAT is not set # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_DISCOVER 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 +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set # CONFIG_NETUTILS_TFTPC is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1513,6 +1527,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y CONFIG_NSH_NETINIT_THREAD=y CONFIG_NSH_NETINIT_THREAD_STACKSIZE=1568 CONFIG_NSH_NETINIT_THREAD_PRIORITY=80 @@ -1576,11 +1591,11 @@ CONFIG_NSH_MAX_ROUNDTRIP=20 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=0 CONFIG_I2CTOOL_MAXBUS=0 @@ -1588,7 +1603,7 @@ CONFIG_I2CTOOL_MINADDR=0x03 CONFIG_I2CTOOL_MAXADDR=0x77 CONFIG_I2CTOOL_MAXREGADDR=0xff CONFIG_I2CTOOL_DEFFREQ=100000 -# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set CONFIG_SYSTEM_NXPLAYER=y CONFIG_NXPLAYER_PLAYTHREAD_STACKSIZE=1500 @@ -1609,6 +1624,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sama5d4-ek/knsh/defconfig b/configs/sama5d4-ek/knsh/defconfig index 1992f4004bc4ccdffc4c7c3d5835688e9dca505f..d08f54cfd0e63df6923031f381510942e90e7abf 100644 --- a/configs/sama5d4-ek/knsh/defconfig +++ b/configs/sama5d4-ek/knsh/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -99,6 +100,7 @@ CONFIG_ARCH_CHIP_SAMA5=y # 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 @@ -120,9 +122,15 @@ CONFIG_ARCH_CORTEXA5=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-a" CONFIG_ARCH_CHIP="sama5" +# 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 @@ -132,6 +140,8 @@ CONFIG_ARCH_LOWVECTORS=y # ARMv7-A Configuration Options # # CONFIG_ARMV7A_HAVE_GICv2 is not set +# CONFIG_ARMV7A_HAVE_GTM is not set +# CONFIG_ARMV7A_HAVE_PTM is not set CONFIG_ARMV7A_HAVE_L2CC=y CONFIG_ARMV7A_HAVE_L2CC_PL310=y @@ -190,7 +200,6 @@ CONFIG_SAMA5_HAVE_SPI2=y # CONFIG_SAMA5_HAVE_TC is not set CONFIG_SAMA5_HAVE_TC1=y CONFIG_SAMA5_HAVE_TC2=y -CONFIG_ARCH_HAVE_TRUSTZONE=y CONFIG_SAMA5_HAVE_TWI3=y CONFIG_SAMA5_HAVE_VDEC=y # CONFIG_SAMA5_FLEXCOM is not set @@ -565,7 +574,12 @@ CONFIG_RTC_DATETIME=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -573,6 +587,7 @@ CONFIG_RTC_DATETIME=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -595,6 +610,8 @@ CONFIG_SDIO_BLOCKSETUP=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -618,10 +635,6 @@ CONFIG_USART4_SERIALDRIVER=y # 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 @@ -663,15 +676,18 @@ CONFIG_USART4_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -725,12 +741,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -810,12 +820,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_USRWORK is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -863,9 +876,9 @@ CONFIG_EXAMPLES_HELLO_PROGNAME="hello" CONFIG_EXAMPLES_HELLO_PRIORITY=100 CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 # CONFIG_EXAMPLES_HELLOXX is not set +# CONFIG_EXAMPLES_IGMP is not set # CONFIG_EXAMPLES_JSON 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 @@ -876,18 +889,18 @@ CONFIG_EXAMPLES_NSH_PROGNAME="init" # CONFIG_EXAMPLES_NSH_CXXINITIALIZE is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RANDOM is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set @@ -902,10 +915,9 @@ CONFIG_EXAMPLES_NSH_PROGNAME="init" # 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_WEBSERVER is not set # # File System Utilities @@ -929,8 +941,8 @@ CONFIG_EXAMPLES_NSH_PROGNAME="init" # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -942,6 +954,7 @@ CONFIG_EXAMPLES_NSH_PROGNAME="init" # # 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 @@ -1058,12 +1071,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1071,6 +1084,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sama5d4-ek/knsh/defconfig.ROMFS b/configs/sama5d4-ek/knsh/defconfig.ROMFS index a069c2d2a7daf7c2d0c54a15da50086fa5dda432..38e1643c966e0dce7b308ff80fd0824e08424eee 100644 --- a/configs/sama5d4-ek/knsh/defconfig.ROMFS +++ b/configs/sama5d4-ek/knsh/defconfig.ROMFS @@ -45,7 +45,7 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set @@ -596,7 +596,6 @@ CONFIG_FS_ROMFS=y # # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/sama5d4-ek/nsh/defconfig b/configs/sama5d4-ek/nsh/defconfig index eeab2f01314d598daaafc3e8e2177417917dcdb9..bf72a2a86b21a8926d6f7dc83ebdb0a10a58ea38 100644 --- a/configs/sama5d4-ek/nsh/defconfig +++ b/configs/sama5d4-ek/nsh/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH_CHIP_SAMA5=y # 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 @@ -119,9 +122,13 @@ CONFIG_ARCH_CORTEXA5=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-a" CONFIG_ARCH_CHIP="sama5" +# 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_ARM_HAVE_MPU_UNIFIED is not set CONFIG_ARCH_HAVE_LOWVECTORS=y CONFIG_ARCH_LOWVECTORS=y @@ -131,6 +138,8 @@ CONFIG_ARCH_LOWVECTORS=y # ARMv7-A Configuration Options # # CONFIG_ARMV7A_HAVE_GICv2 is not set +# CONFIG_ARMV7A_HAVE_GTM is not set +# CONFIG_ARMV7A_HAVE_PTM is not set CONFIG_ARMV7A_HAVE_L2CC=y CONFIG_ARMV7A_HAVE_L2CC_PL310=y @@ -191,7 +200,6 @@ CONFIG_SAMA5_HAVE_SPI2=y # CONFIG_SAMA5_HAVE_TC is not set CONFIG_SAMA5_HAVE_TC1=y CONFIG_SAMA5_HAVE_TC2=y -CONFIG_ARCH_HAVE_TRUSTZONE=y CONFIG_SAMA5_HAVE_TWI3=y CONFIG_SAMA5_HAVE_VDEC=y # CONFIG_SAMA5_FLEXCOM is not set @@ -697,7 +705,12 @@ CONFIG_MXT_NPOLLWAITERS=4 # CONFIG_DJOYSTICK is not set # CONFIG_AJOYSTICK is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -705,6 +718,7 @@ CONFIG_MXT_NPOLLWAITERS=4 # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -769,6 +783,8 @@ CONFIG_ETH0_PHY_KSZ8081=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -792,10 +808,6 @@ CONFIG_USART4_SERIALDRIVER=y # 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 @@ -855,21 +867,25 @@ CONFIG_HIDKBD_NPOLLWAITERS=2 # CONFIG_USBHOST_TRACE is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set 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_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_RAMLOG_SYSLOG=y # CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -1035,13 +1051,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_NET 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 # @@ -1050,6 +1059,7 @@ CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x7b5d # CONFIG_NX_ANTIALIASING is not set # CONFIG_NX_WRITEONLY is not set +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -1228,6 +1238,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 @@ -1242,6 +1254,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1292,16 +1305,17 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1320,17 +1334,17 @@ CONFIG_EXAMPLES_NX_BPP=16 # 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 is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RANDOM is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set @@ -1340,8 +1354,8 @@ CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1354,12 +1368,11 @@ CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0" CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UDPBLASTER is not set -# CONFIG_EXAMPLES_DISCOVER 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_XMLRPC is not set # @@ -1384,8 +1397,8 @@ CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1399,21 +1412,22 @@ CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER 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 +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1530,6 +1544,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y CONFIG_NSH_NETINIT_THREAD=y CONFIG_NSH_NETINIT_THREAD_STACKSIZE=1568 CONFIG_NSH_NETINIT_THREAD_PRIORITY=80 @@ -1577,11 +1592,11 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=0 CONFIG_I2CTOOL_MAXBUS=0 @@ -1589,7 +1604,7 @@ CONFIG_I2CTOOL_MINADDR=0x03 CONFIG_I2CTOOL_MAXADDR=0x77 CONFIG_I2CTOOL_MAXREGADDR=0xff CONFIG_I2CTOOL_DEFFREQ=100000 -# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set CONFIG_SYSTEM_NXPLAYER=y CONFIG_NXPLAYER_PLAYTHREAD_STACKSIZE=1500 @@ -1610,6 +1625,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sama5d4-ek/nxwm/defconfig b/configs/sama5d4-ek/nxwm/defconfig index 33173d299dc4433953676a17b39988a80289b4b6..add09daf5fb7d9c39da6323bc4b1e125b185c27e 100644 --- a/configs/sama5d4-ek/nxwm/defconfig +++ b/configs/sama5d4-ek/nxwm/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH_CHIP_SAMA5=y # 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 @@ -119,9 +122,13 @@ CONFIG_ARCH_CORTEXA5=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-a" CONFIG_ARCH_CHIP="sama5" +# 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_ARM_HAVE_MPU_UNIFIED is not set CONFIG_ARCH_HAVE_LOWVECTORS=y CONFIG_ARCH_LOWVECTORS=y @@ -131,6 +138,8 @@ CONFIG_ARCH_LOWVECTORS=y # ARMv7-A Configuration Options # # CONFIG_ARMV7A_HAVE_GICv2 is not set +# CONFIG_ARMV7A_HAVE_GTM is not set +# CONFIG_ARMV7A_HAVE_PTM is not set CONFIG_ARMV7A_HAVE_L2CC=y CONFIG_ARMV7A_HAVE_L2CC_PL310=y @@ -191,7 +200,6 @@ CONFIG_SAMA5_HAVE_SPI2=y # CONFIG_SAMA5_HAVE_TC is not set CONFIG_SAMA5_HAVE_TC1=y CONFIG_SAMA5_HAVE_TC2=y -CONFIG_ARCH_HAVE_TRUSTZONE=y CONFIG_SAMA5_HAVE_TWI3=y CONFIG_SAMA5_HAVE_VDEC=y # CONFIG_SAMA5_FLEXCOM is not set @@ -666,7 +674,12 @@ CONFIG_MXT_NPOLLWAITERS=4 # CONFIG_DJOYSTICK is not set # CONFIG_AJOYSTICK is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -674,6 +687,7 @@ CONFIG_MXT_NPOLLWAITERS=4 # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -738,6 +752,8 @@ CONFIG_ETH0_PHY_KSZ8081=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -761,10 +777,6 @@ CONFIG_USART4_SERIALDRIVER=y # 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 @@ -824,21 +836,25 @@ CONFIG_HIDKBD_NPOLLWAITERS=2 # CONFIG_USBHOST_TRACE is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set 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_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_RAMLOG_SYSLOG=y # CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -1002,13 +1018,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_NET 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 # @@ -1017,6 +1026,7 @@ CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x95fa # CONFIG_NX_ANTIALIASING is not set # CONFIG_NX_WRITEONLY is not set +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -1216,6 +1226,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 @@ -1230,6 +1242,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1280,16 +1293,17 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1299,17 +1313,17 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RANDOM is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set @@ -1319,8 +1333,8 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1329,12 +1343,11 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UDPBLASTER is not set -# CONFIG_EXAMPLES_DISCOVER 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_XMLRPC is not set # @@ -1359,8 +1372,8 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1374,21 +1387,22 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER 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 +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1505,6 +1519,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y CONFIG_NSH_NETINIT_THREAD=y CONFIG_NSH_NETINIT_THREAD_STACKSIZE=1568 CONFIG_NSH_NETINIT_THREAD_PRIORITY=80 @@ -1562,6 +1577,7 @@ CONFIG_NXWIDGETS_LISTENERSTACK=1596 # NXWidget Configuration # CONFIG_NXWIDGETS_BPP=16 +# CONFIG_NXWIDGETS_GREYSCALE is not set CONFIG_NXWIDGETS_SIZEOFCHAR=1 # @@ -1765,11 +1781,11 @@ CONFIG_NXWM_MEDIAPLAYER_MINVOLUMEHEIGHT=6 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=0 CONFIG_I2CTOOL_MAXBUS=0 @@ -1777,7 +1793,7 @@ CONFIG_I2CTOOL_MINADDR=0x03 CONFIG_I2CTOOL_MAXADDR=0x77 CONFIG_I2CTOOL_MAXREGADDR=0xff CONFIG_I2CTOOL_DEFFREQ=100000 -# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set CONFIG_SYSTEM_NXPLAYER=y CONFIG_NXPLAYER_PLAYTHREAD_STACKSIZE=1500 @@ -1797,6 +1813,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sama5d4-ek/ramtest/defconfig b/configs/sama5d4-ek/ramtest/defconfig index 4490b66233ce431817691fca9461dac42622a615..00c135747eefcb4063219d633702314cd46e956a 100644 --- a/configs/sama5d4-ek/ramtest/defconfig +++ b/configs/sama5d4-ek/ramtest/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH_CHIP_SAMA5=y # 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 @@ -119,9 +122,13 @@ CONFIG_ARCH_CORTEXA5=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-a" CONFIG_ARCH_CHIP="sama5" +# 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_ARM_HAVE_MPU_UNIFIED is not set CONFIG_ARCH_HAVE_LOWVECTORS=y CONFIG_ARCH_LOWVECTORS=y @@ -131,6 +138,8 @@ CONFIG_ARCH_LOWVECTORS=y # ARMv7-A Configuration Options # # CONFIG_ARMV7A_HAVE_GICv2 is not set +# CONFIG_ARMV7A_HAVE_GTM is not set +# CONFIG_ARMV7A_HAVE_PTM is not set CONFIG_ARMV7A_HAVE_L2CC=y CONFIG_ARMV7A_HAVE_L2CC_PL310=y @@ -186,7 +195,6 @@ CONFIG_SAMA5_HAVE_SPI2=y # CONFIG_SAMA5_HAVE_TC is not set CONFIG_SAMA5_HAVE_TC1=y CONFIG_SAMA5_HAVE_TC2=y -CONFIG_ARCH_HAVE_TRUSTZONE=y CONFIG_SAMA5_HAVE_TWI3=y CONFIG_SAMA5_HAVE_VDEC=y # CONFIG_SAMA5_FLEXCOM is not set @@ -521,7 +529,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -529,6 +542,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -540,6 +554,8 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -563,10 +579,6 @@ CONFIG_USART3_SERIALDRIVER=y # 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 @@ -593,15 +605,18 @@ CONFIG_USART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -654,12 +669,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -725,12 +734,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -774,10 +786,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -787,17 +799,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -805,17 +817,16 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -839,8 +850,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -851,6 +862,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 @@ -961,12 +973,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set CONFIG_SYSTEM_RAMTEST=y CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -974,6 +986,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sama5d4-ek/src/sam_adc.c b/configs/sama5d4-ek/src/sam_adc.c index 13346a91b90f2ce4d65e8d9f68494a9ad2d1c7f4..762caccd20259b89e01f6f599aae8db15a825209 100644 --- a/configs/sama5d4-ek/src/sam_adc.c +++ b/configs/sama5d4-ek/src/sam_adc.c @@ -91,7 +91,7 @@ int board_adc_setup(void) adc = sam_adc_initialize(); if (adc == NULL) { - adbg("ERROR: Failed to get ADC interface\n"); + aerr("ERROR: Failed to get ADC interface\n"); return -ENODEV; } @@ -100,7 +100,7 @@ int board_adc_setup(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - adbg("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } diff --git a/configs/sama5d4-ek/src/sam_at25.c b/configs/sama5d4-ek/src/sam_at25.c index f2a4c4d1d83f8c139f8a4564d5dc8cfc8d119074..4df4e631e5767a9519297270f5d9fe37d0be4fbc 100644 --- a/configs/sama5d4-ek/src/sam_at25.c +++ b/configs/sama5d4-ek/src/sam_at25.c @@ -92,7 +92,7 @@ int sam_at25_automount(int minor) spi = sam_spibus_initialize(AT25_PORT); if (!spi) { - fdbg("ERROR: Failed to initialize SPI port %d\n", AT25_PORT); + ferr("ERROR: Failed to initialize SPI port %d\n", AT25_PORT); return -ENODEV; } @@ -101,7 +101,7 @@ int sam_at25_automount(int minor) mtd = at25_initialize(spi); if (!mtd) { - fdbg("ERROR: Failed to bind SPI port %d to the AT25 FLASH driver\n"); + ferr("ERROR: Failed to bind SPI port %d to the AT25 FLASH driver\n"); return -ENODEV; } @@ -113,7 +113,7 @@ int sam_at25_automount(int minor) ret = ftl_initialize(minor, mtd); if (ret < 0) { - fdbg("ERROR: Failed to initialize the FTL layer: %d\n", ret); + ferr("ERROR: Failed to initialize the FTL layer: %d\n", ret); return ret; } @@ -123,7 +123,7 @@ int sam_at25_automount(int minor) ret = ftl_initialize(minor, mtd); if (ret < 0) { - fdbg("ERROR: Failed to initialize the FTL layer: %d\n", ret); + ferr("ERROR: Failed to initialize the FTL layer: %d\n", ret); return ret; } @@ -137,7 +137,7 @@ int sam_at25_automount(int minor) ret = bchdev_register(blockdev, chardev, false); if (ret < 0) { - fdbg("ERROR: bchdev_register %s failed: %d\n", chardev, ret); + ferr("ERROR: bchdev_register %s failed: %d\n", chardev, ret); return ret; } @@ -147,7 +147,7 @@ int sam_at25_automount(int minor) ret = nxffs_initialize(mtd); if (ret < 0) { - fdbg("ERROR: NXFFS initialization failed: %d\n", ret); + ferr("ERROR: NXFFS initialization failed: %d\n", ret); return ret; } @@ -156,7 +156,7 @@ int sam_at25_automount(int minor) ret = mount(NULL, "/mnt/at25", "nxffs", 0, NULL); if (ret < 0) { - fdbg("ERROR: Failed to mount the NXFFS volume: %d\n", errno); + ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno); return ret; } diff --git a/configs/sama5d4-ek/src/sam_audio_null.c b/configs/sama5d4-ek/src/sam_audio_null.c index 654fea6011efa0944e08796924cba7f016d5097e..2777298deb64198aa53bcafb793c00544eb8511c 100644 --- a/configs/sama5d4-ek/src/sam_audio_null.c +++ b/configs/sama5d4-ek/src/sam_audio_null.c @@ -100,7 +100,7 @@ int sam_audio_null_initialize(int minor) char devname[12]; int ret; - auddbg("minor %d\n", minor); + audinfo("minor %d\n", minor); DEBUGASSERT(minor >= 0 && minor <= 25); /* Have we already initialized? Since we never uninitialize we must prevent @@ -117,7 +117,7 @@ int sam_audio_null_initialize(int minor) nullaudio = audio_null_initialize(); if (!nullaudio) { - auddbg("Failed to get the NULL audio interface\n"); + auderr("ERROR: Failed to get the NULL audio interface\n"); ret = -ENODEV; goto errout; } @@ -130,7 +130,7 @@ int sam_audio_null_initialize(int minor) pcm = pcm_decode_initialize(nullaudio); if (!pcm) { - auddbg("ERROR: Failed create the PCM decoder\n"); + auderr("ERROR: Failed create the PCM decoder\n"); ret = -ENODEV; goto errout_with_nullaudio; } @@ -144,7 +144,7 @@ int sam_audio_null_initialize(int minor) ret = audio_register(devname, pcm); if (ret < 0) { - auddbg("ERROR: Failed to register /dev/%s device: %d\n", devname, ret); + auderr("ERROR: Failed to register /dev/%s device: %d\n", devname, ret); goto errout_with_pcm; } diff --git a/configs/sama5d4-ek/src/sam_autoleds.c b/configs/sama5d4-ek/src/sam_autoleds.c index 178000a3cc5514bf102053dcb49e9c9277cee2ee..62e930dfb822d3e9ae4fa1b93b5360176b2fe055 100644 --- a/configs/sama5d4-ek/src/sam_autoleds.c +++ b/configs/sama5d4-ek/src/sam_autoleds.c @@ -92,30 +92,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/sama5d4-ek/src/sam_automount.c b/configs/sama5d4-ek/src/sam_automount.c index e4890687cba27883449264a164278d393ecfc7ad..b838e693d97098eeaa8dd69dff0af45416b222ef 100644 --- a/configs/sama5d4-ek/src/sam_automount.c +++ b/configs/sama5d4-ek/src/sam_automount.c @@ -285,7 +285,7 @@ void sam_automount_initialize(void) { FAR void *handle; - fvdbg("Initializing automounter(s)\n"); + finfo("Initializing automounter(s)\n"); #ifdef CONFIG_SAMA5D4EK_HSMCI0_AUTOMOUNT /* Initialize the HSMCI0 auto-mounter */ @@ -293,7 +293,7 @@ void sam_automount_initialize(void) handle = automount_initialize(&g_hsmci0config.lower); if (!handle) { - fdbg("ERROR: Failed to initialize auto-mounter for HSMCI0\n"); + ferr("ERROR: Failed to initialize auto-mounter for HSMCI0\n"); } #endif @@ -303,7 +303,7 @@ void sam_automount_initialize(void) handle = automount_initialize(&g_hsmci1config.lower); if (!handle) { - fdbg("ERROR: Failed to initialize auto-mounter for HSMCI1\n"); + ferr("ERROR: Failed to initialize auto-mounter for HSMCI1\n"); } #endif } @@ -363,7 +363,7 @@ void sam_automount_event(int slotno, bool inserted) else #endif { - fdbg("ERROR: Unsupported HSCMI%d\n", slotno); + ferr("ERROR: Unsupported HSCMI%d\n", slotno); return; } diff --git a/configs/sama5d4-ek/src/sam_bringup.c b/configs/sama5d4-ek/src/sam_bringup.c index 2c0ca5cc8da7386a91d83da6981041993fb4ec6e..bc32caa21057e9cd7b8de37a306585922bdd9ad5 100644 --- a/configs/sama5d4-ek/src/sam_bringup.c +++ b/configs/sama5d4-ek/src/sam_bringup.c @@ -69,14 +69,6 @@ (((n)+CONFIG_SAMA5D4EK_ROMFS_ROMDISK_SECTSIZE-1) / \ CONFIG_SAMA5D4EK_ROMFS_ROMDISK_SECTSIZE) -/* Debug ********************************************************************/ - -#ifdef CONFIG_BOARD_INITIALIZE -# define SYSLOG lldbg -#else -# define SYSLOG dbg -#endif - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -98,14 +90,14 @@ static void sam_i2c_register(int bus) i2c = sam_i2cbus_initialize(bus); if (i2c == NULL) { - dbg("ERROR: Failed to get I2C%d interface\n", bus); + _err("ERROR: Failed to get I2C%d interface\n", bus); } else { ret = i2c_register(i2c, bus); if (ret < 0) { - dbg("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); + _err("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); sam_i2cbus_uninitialize(i2c); } } @@ -171,7 +163,7 @@ int sam_bringup(void) ret = sam_nand_automount(NAND_MINOR); if (ret < 0) { - SYSLOG("ERROR: sam_nand_automount failed: %d\n", ret); + _err("ERROR: sam_nand_automount failed: %d\n", ret); } #endif @@ -181,7 +173,7 @@ int sam_bringup(void) ret = sam_at25_automount(AT25_MINOR); if (ret < 0) { - SYSLOG("ERROR: sam_at25_automount failed: %d\n", ret); + _err("ERROR: sam_at25_automount failed: %d\n", ret); } #endif @@ -192,8 +184,8 @@ int sam_bringup(void) ret = sam_hsmci_initialize(HSMCI0_SLOTNO, HSMCI0_MINOR); if (ret < 0) { - SYSLOG("ERROR: sam_hsmci_initialize(%d,%d) failed: %d\n", - HSMCI0_SLOTNO, HSMCI0_MINOR, ret); + _err("ERROR: sam_hsmci_initialize(%d,%d) failed: %d\n", + HSMCI0_SLOTNO, HSMCI0_MINOR, ret); } #ifdef CONFIG_SAMA5D4EK_HSMCI0_MOUNT @@ -209,8 +201,8 @@ int sam_bringup(void) if (ret < 0) { - SYSLOG("ERROR: Failed to mount %s: %d\n", - CONFIG_SAMA5D4EK_HSMCI0_MOUNT_MOUNTPOINT, errno); + _err("ERROR: Failed to mount %s: %d\n", + CONFIG_SAMA5D4EK_HSMCI0_MOUNT_MOUNTPOINT, errno); } } #endif @@ -222,8 +214,8 @@ int sam_bringup(void) ret = sam_hsmci_initialize(HSMCI1_SLOTNO, HSMCI1_MINOR); if (ret < 0) { - SYSLOG("ERROR: sam_hsmci_initialize(%d,%d) failed: %d\n", - HSMCI1_SLOTNO, HSMCI1_MINOR, ret); + _err("ERROR: sam_hsmci_initialize(%d,%d) failed: %d\n", + HSMCI1_SLOTNO, HSMCI1_MINOR, ret); } #ifdef CONFIG_SAMA5D4EK_HSMCI1_MOUNT @@ -239,8 +231,8 @@ int sam_bringup(void) if (ret < 0) { - SYSLOG("ERROR: Failed to mount %s: %d\n", - CONFIG_SAMA5D4EK_HSMCI1_MOUNT_MOUNTPOINT, errno); + _err("ERROR: Failed to mount %s: %d\n", + CONFIG_SAMA5D4EK_HSMCI1_MOUNT_MOUNTPOINT, errno); } } #endif @@ -261,7 +253,7 @@ int sam_bringup(void) CONFIG_SAMA5D4EK_ROMFS_ROMDISK_SECTSIZE); if (ret < 0) { - SYSLOG("ERROR: romdisk_register failed: %d\n", -ret); + _err("ERROR: romdisk_register failed: %d\n", -ret); } else { @@ -272,9 +264,9 @@ int sam_bringup(void) "romfs", MS_RDONLY, NULL); if (ret < 0) { - SYSLOG("ERROR: mount(%s,%s,romfs) failed: %d\n", - CONFIG_SAMA5D4EK_ROMFS_ROMDISK_DEVNAME, - CONFIG_SAMA5D4EK_ROMFS_MOUNT_MOUNTPOINT, errno); + _err("ERROR: mount(%s,%s,romfs) failed: %d\n", + CONFIG_SAMA5D4EK_ROMFS_ROMDISK_DEVNAME, + CONFIG_SAMA5D4EK_ROMFS_MOUNT_MOUNTPOINT, errno); } } #endif @@ -287,7 +279,7 @@ int sam_bringup(void) ret = sam_usbhost_initialize(); if (ret != OK) { - SYSLOG("ERROR: Failed to initialize USB host: %d\n", ret); + _err("ERROR: Failed to initialize USB host: %d\n", ret); } #endif @@ -297,7 +289,7 @@ int sam_bringup(void) ret = usbmonitor_start(0, NULL); if (ret != OK) { - SYSLOG("ERROR: Failed to start the USB monitor: %d\n", ret); + _err("ERROR: Failed to start the USB monitor: %d\n", ret); } #endif @@ -307,7 +299,7 @@ int sam_bringup(void) ret = sam_wm8904_initialize(0); if (ret != OK) { - SYSLOG("ERROR: Failed to initialize WM8904 audio: %d\n", ret); + _err("ERROR: Failed to initialize WM8904 audio: %d\n", ret); } #endif @@ -317,18 +309,18 @@ int sam_bringup(void) ret = sam_audio_null_initialize(0); if (ret != OK) { - SYSLOG("ERROR: Failed to initialize the NULL audio device: %d\n", ret); + _err("ERROR: Failed to initialize the NULL audio device: %d\n", ret); } #endif #ifdef HAVE_ELF /* Initialize the ELF binary loader */ - SYSLOG("Initializing the ELF binary loader\n"); + _err("Initializing the ELF binary loader\n"); ret = elf_initialize(); if (ret < 0) { - SYSLOG("ERROR: Initialization of the ELF loader failed: %d\n", ret); + _err("ERROR: Initialization of the ELF loader failed: %d\n", ret); } #endif @@ -338,8 +330,8 @@ int sam_bringup(void) ret = mount(NULL, SAMA5_PROCFS_MOUNTPOINT, "procfs", 0, NULL); if (ret < 0) { - SYSLOG("ERROR: Failed to mount procfs at %s: %d\n", - SAMA5_PROCFS_MOUNTPOINT, ret); + _err("ERROR: Failed to mount procfs at %s: %d\n", + SAMA5_PROCFS_MOUNTPOINT, ret); } #endif diff --git a/configs/sama5d4-ek/src/sam_ethernet.c b/configs/sama5d4-ek/src/sam_ethernet.c index 48edbbe5f8a576b110b017d975cf59dc0e3ab645..edda5f686a2e8899a88d746472461de81bbb5ac3 100644 --- a/configs/sama5d4-ek/src/sam_ethernet.c +++ b/configs/sama5d4-ek/src/sam_ethernet.c @@ -42,8 +42,8 @@ /* Force verbose debug on in this file only to support unit-level testing. */ #ifdef CONFIG_NETDEV_PHY_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG_VERBOSE 1 +# undef CONFIG_DEBUG_INFO +# define CONFIG_DEBUG_INFO 1 # undef CONFIG_DEBUG_NET # define CONFIG_DEBUG_NET 1 #endif @@ -84,11 +84,13 @@ */ #ifdef CONFIG_NETDEV_PHY_DEBUG -# define phydbg dbg -# define phylldbg lldbg +# define phyerr _err +# define phywarn _warn +# define phyinfo _info #else -# define phydbg(x...) -# define phylldbg(x...) +# define phyerr(x...) +# define phywarn(x...) +# define phyinfo(x...) #endif /************************************************************************************ @@ -116,7 +118,7 @@ static xcpt_t g_emac1_handler; #ifdef CONFIG_SAMA5_EMAC0 static void sam_emac0_phy_enable(bool enable) { - phydbg("IRQ%d: enable=%d\n", IRQ_INT_ETH0, enable); + phyinfo("IRQ%d: enable=%d\n", IRQ_INT_ETH0, enable); if (enable) { sam_pioirqenable(IRQ_INT_ETH0); @@ -132,7 +134,7 @@ static void sam_emac0_phy_enable(bool enable) #ifdef CONFIG_SAMA5_EMAC1 static void sam_emac1_phy_enable(bool enable) { - phydbg("IRQ%d: enable=%d\n", IRQ_INT_ETH1, enable); + phyinfo("IRQ%d: enable=%d\n", IRQ_INT_ETH1, enable); if (enable) { sam_pioirqenable(IRQ_INT_ETH1); @@ -160,12 +162,12 @@ static void sam_emac1_phy_enable(bool enable) void weak_function sam_netinitialize(void) { #ifdef CONFIG_SAMA5_EMAC0 - phydbg("Configuring %08x\n", PIO_INT_ETH0); + phyinfo("Configuring %08x\n", PIO_INT_ETH0); sam_configpio(PIO_INT_ETH0); #endif #ifdef CONFIG_SAMA5_EMAC1 - phydbg("Configuring %08x\n", PIO_INT_ETH1); + phyinfo("Configuring %08x\n", PIO_INT_ETH1); sam_configpio(PIO_INT_ETH1); #endif } @@ -245,18 +247,18 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) DEBUGASSERT(intf); - nvdbg("%s: handler=%p\n", intf, handler); + ninfo("%s: handler=%p\n", intf, handler); #ifdef CONFIG_SAMA5_EMAC0 - phydbg("EMAC0: devname=%s\n", SAMA5_EMAC0_DEVNAME); + phyinfo("EMAC0: devname=%s\n", SAMA5_EMAC0_DEVNAME); #endif #ifdef CONFIG_SAMA5_EMAC1 - phydbg("EMAC1: devname=%s\n", SAMA5_EMAC1_DEVNAME); + phyinfo("EMAC1: devname=%s\n", SAMA5_EMAC1_DEVNAME); #endif #ifdef CONFIG_SAMA5_EMAC0 if (strcmp(intf, SAMA5_EMAC0_DEVNAME) == 0) { - phydbg("Select EMAC0\n"); + phyinfo("Select EMAC0\n"); phandler = &g_emac0_handler; pinset = PIO_INT_ETH0; irq = IRQ_INT_ETH0; @@ -267,7 +269,7 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) #ifdef CONFIG_SAMA5_EMAC1 if (strcmp(intf, SAMA5_EMAC1_DEVNAME) == 0) { - phydbg("Select EMAC1\n"); + phyinfo("Select EMAC1\n"); phandler = &g_emac1_handler; pinset = PIO_INT_ETH1; irq = IRQ_INT_ETH1; @@ -276,7 +278,7 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) else #endif { - ndbg("Unsupported interface: %s\n", intf); + nerr("ERROR: Unsupported interface: %s\n", intf); return NULL; } @@ -295,15 +297,15 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) if (handler) { - phydbg("Configure pin: %08x\n", pinset); + phyinfo("Configure pin: %08x\n", pinset); sam_pioirq(pinset); - phydbg("Attach IRQ%d\n", irq); + phyinfo("Attach IRQ%d\n", irq); (void)irq_attach(irq, handler); } else { - phydbg("Detach IRQ%d\n", irq); + phyinfo("Detach IRQ%d\n", irq); (void)irq_detach(irq); enabler = NULL; } diff --git a/configs/sama5d4-ek/src/sam_hsmci.c b/configs/sama5d4-ek/src/sam_hsmci.c index fe74bcf5284196a2b3d3359799a1168c3d4919b6..5af7468a5ec933fa8c7b3eee07840c9a20ffe811 100644 --- a/configs/sama5d4-ek/src/sam_hsmci.c +++ b/configs/sama5d4-ek/src/sam_hsmci.c @@ -167,7 +167,7 @@ bool sam_cardinserted_internal(struct sam_hsmci_state_s *state) /* Get the state of the PIO pin */ inserted = sam_pioread(state->cdcfg); - fllvdbg("Slot %d inserted: %s\n", state->slotno, inserted ? "NO" : "YES"); + finfo("Slot %d inserted: %s\n", state->slotno, inserted ? "NO" : "YES"); return !inserted; } @@ -300,7 +300,7 @@ int sam_hsmci_initialize(int slotno, int minor) state = sam_hsmci_state(slotno); if (!state) { - fdbg("ERROR: No state for slotno %d\n", slotno); + ferr("ERROR: No state for slotno %d\n", slotno); return -EINVAL; } @@ -321,7 +321,7 @@ int sam_hsmci_initialize(int slotno, int minor) state->hsmci = sdio_initialize(slotno); if (!state->hsmci) { - fdbg("ERROR: Failed to initialize SDIO slot %d\n", slotno); + ferr("ERROR: Failed to initialize SDIO slot %d\n", slotno); return -ENODEV; } @@ -330,7 +330,7 @@ int sam_hsmci_initialize(int slotno, int minor) ret = mmcsd_slotinitialize(minor, state->hsmci); if (ret != OK) { - fdbg("ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); + ferr("ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); return ret; } @@ -367,7 +367,7 @@ bool sam_cardinserted(int slotno) state = sam_hsmci_state(slotno); if (!state) { - fdbg("ERROR: No state for slotno %d\n", slotno); + ferr("ERROR: No state for slotno %d\n", slotno); return false; } diff --git a/configs/sama5d4-ek/src/sam_maxtouch.c b/configs/sama5d4-ek/src/sam_maxtouch.c index 391e7b0b80faa8d359594a6f4543a855647eb4a2..adc98320ade243939a408acd6c91e66696925e79 100644 --- a/configs/sama5d4-ek/src/sam_maxtouch.c +++ b/configs/sama5d4-ek/src/sam_maxtouch.c @@ -163,13 +163,13 @@ static int mxt_attach(FAR const struct mxt_lower_s *lower, mxt_handler_t isr, * new handler will called via mxt_interrupt() when the interrupt occurs. */ - ivdbg("Attaching %p\n", isr); + iinfo("Attaching %p\n", isr); g_mxtinfo.handler = isr; g_mxtinfo.arg = arg; } else { - ivdbg("Detaching %p\n", g_mxtinfo.handler); + iinfo("Detaching %p\n", g_mxtinfo.handler); mxt_enable(lower, false); g_mxtinfo.handler = NULL; g_mxtinfo.arg = NULL; @@ -242,7 +242,7 @@ int board_tsc_setup(int minor) static bool initialized = false; int ret; - idbg("minor %d\n", minor); + iinfo("minor %d\n", minor); DEBUGASSERT(minor == 0); /* Have we already initialized? Since we never uninitialize we must prevent @@ -262,7 +262,7 @@ int board_tsc_setup(int minor) i2c = sam_i2cbus_initialize(MXT_TWI_BUS); if (!i2c) { - idbg("Failed to initialize I2C%d\n", MXT_TWI_BUS); + ierr("ERROR: Failed to initialize I2C%d\n", MXT_TWI_BUS); return -ENODEV; } @@ -276,7 +276,7 @@ int board_tsc_setup(int minor) ret = mxt_register(i2c, &g_mxtinfo.lower, CONFIG_SAMA5D4EK_MXT_DEVMINOR); if (ret < 0) { - idbg("ERROR: Failed to register touchscreen device\n"); + ierr("ERROR: Failed to register touchscreen device\n"); irq_detach(IRQ_CHG_MXT); /* sam_i2cbus_uninitialize(i2c); */ return -ENODEV; diff --git a/configs/sama5d4-ek/src/sam_nandflash.c b/configs/sama5d4-ek/src/sam_nandflash.c index 9044526b3bfcdd3ce05ee17ca69e3dd6777e9204..6a5c90db285a11e0624f1290df8dea3595a3902d 100644 --- a/configs/sama5d4-ek/src/sam_nandflash.c +++ b/configs/sama5d4-ek/src/sam_nandflash.c @@ -186,7 +186,7 @@ int sam_nand_automount(int minor) mtd = sam_nand_initialize(HSMC_CS3); if (!mtd) { - fdbg("ERROR: Failed to create the NAND driver on CS%d\n", HSMC_CS3); + ferr("ERROR: Failed to create the NAND driver on CS%d\n", HSMC_CS3); return -ENODEV; } @@ -196,7 +196,7 @@ int sam_nand_automount(int minor) ret = ftl_initialize(NAND_MINOR, mtd); if (ret < 0) { - fdbg("ERROR: Failed to initialize the FTL layer: %d\n", ret); + ferr("ERROR: Failed to initialize the FTL layer: %d\n", ret); return ret; } @@ -206,7 +206,7 @@ int sam_nand_automount(int minor) ret = nxffs_initialize(mtd); if (ret < 0) { - fdbg("ERROR: NXFFS initialization failed: %d\n", ret); + ferr("ERROR: NXFFS initialization failed: %d\n", ret); return ret; } @@ -215,7 +215,7 @@ int sam_nand_automount(int minor) ret = mount(NULL, "/mnt/nand", "nxffs", 0, NULL); if (ret < 0) { - fdbg("ERROR: Failed to mount the NXFFS volume: %d\n", errno); + ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno); return ret; } #endif diff --git a/configs/sama5d4-ek/src/sam_pmic.c b/configs/sama5d4-ek/src/sam_pmic.c index 0b6344dbf751ac9c50d3e3ccd23923411e819839..63e6967141419876acdcb5f2c0a83a79eb61971e 100644 --- a/configs/sama5d4-ek/src/sam_pmic.c +++ b/configs/sama5d4-ek/src/sam_pmic.c @@ -80,7 +80,7 @@ void sam_pmic_initialize(void) i2c = sam_i2cbus_initialize(PMIC_TWI_BUS); if (!i2c) { - dbg("ERROR: Failed to initialize TWI%d\n", PMIC_TWI_BUS); + _err("ERROR: Failed to initialize TWI%d\n", PMIC_TWI_BUS); } else { diff --git a/configs/sama5d4-ek/src/sam_pwm.c b/configs/sama5d4-ek/src/sam_pwm.c index e15e70c5a0d9a5496e00770f8303e14a40e14a4a..b69d8f5e5a877a5ca736b2d33846b47c57d56ef1 100644 --- a/configs/sama5d4-ek/src/sam_pwm.c +++ b/configs/sama5d4-ek/src/sam_pwm.c @@ -139,7 +139,7 @@ int board_pwm_setup(void) pwm = sam_pwminitialize(CONFIG_SAMA5D4EK_CHANNEL); if (!pwm) { - dbg("Failed to get the SAMA5 PWM lower half\n"); + _err("ERROR: Failed to get the SAMA5 PWM lower half\n"); return -ENODEV; } @@ -148,7 +148,7 @@ int board_pwm_setup(void) ret = pwm_register("/dev/pwm0", pwm); if (ret < 0) { - adbg("pwm_register failed: %d\n", ret); + aerr("ERROR: pwm_register failed: %d\n", ret); return ret; } diff --git a/configs/sama5d4-ek/src/sam_spi.c b/configs/sama5d4-ek/src/sam_spi.c index a56c4775071fa51d4d63e923f88848a6ddaebb53..4b24a4b1cefc8a7727ee307d359d0ff5df78c333 100644 --- a/configs/sama5d4-ek/src/sam_spi.c +++ b/configs/sama5d4-ek/src/sam_spi.c @@ -55,32 +55,6 @@ #if defined(CONFIG_SAMA5_SPI0) || defined(CONFIG_SAMA5_SPI1) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ diff --git a/configs/sama5d4-ek/src/sam_usb.c b/configs/sama5d4-ek/src/sam_usb.c index c043e057a938b5854efce844bcd64caa897e47ac..1f4d3aff62a22278f097e96de6e2aba76a2971b0 100644 --- a/configs/sama5d4-ek/src/sam_usb.c +++ b/configs/sama5d4-ek/src/sam_usb.c @@ -115,13 +115,13 @@ static int usbhost_waiter(struct usbhost_connection_s *dev) { struct usbhost_hubport_s *hport; - uvdbg("Running\n"); + uinfo("Running\n"); for (;;) { /* Wait for the device to change state */ DEBUGVERIFY(CONN_WAIT(dev, &hport)); - uvdbg("%s\n", hport->connected ? "connected" : "disconnected"); + uinfo("%s\n", hport->connected ? "connected" : "disconnected"); /* Did we just become connected? */ @@ -308,7 +308,7 @@ int sam_usbhost_initialize(void) ret = usbhost_hub_initialize(); if (ret < 0) { - udbg("ERROR: usbhost_hub_initialize failed: %d\n", ret); + uerr("ERROR: usbhost_hub_initialize failed: %d\n", ret); } #endif @@ -318,7 +318,7 @@ int sam_usbhost_initialize(void) ret = usbhost_msc_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the mass storage class: %d\n", ret); + uerr("ERROR: Failed to register the mass storage class: %d\n", ret); } #endif @@ -328,7 +328,7 @@ int sam_usbhost_initialize(void) ret = usbhost_cdcacm_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret); + uerr("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret); } #endif @@ -338,7 +338,7 @@ int sam_usbhost_initialize(void) ret = usbhost_kbdinit(); if (ret != OK) { - udbg("ERROR: Failed to register the KBD class\n"); + uerr("ERROR: Failed to register the KBD class\n"); } #endif @@ -350,7 +350,7 @@ int sam_usbhost_initialize(void) g_ohciconn = sam_ohci_initialize(0); if (!g_ohciconn) { - udbg("ERROR: sam_ohci_initialize failed\n"); + uerr("ERROR: sam_ohci_initialize failed\n"); return -ENODEV; } @@ -361,7 +361,7 @@ int sam_usbhost_initialize(void) (main_t)ohci_waiter, (FAR char * const *)NULL); if (pid < 0) { - udbg("ERROR: Failed to create ohci_waiter task: %d\n", ret); + uerr("ERROR: Failed to create ohci_waiter task: %d\n", ret); return -ENODEV; } #endif @@ -372,7 +372,7 @@ int sam_usbhost_initialize(void) g_ehciconn = sam_ehci_initialize(0); if (!g_ehciconn) { - udbg("ERROR: sam_ehci_initialize failed\n"); + uerr("ERROR: sam_ehci_initialize failed\n"); return -ENODEV; } @@ -383,7 +383,7 @@ int sam_usbhost_initialize(void) (main_t)ehci_waiter, (FAR char * const *)NULL); if (pid < 0) { - udbg("ERROR: Failed to create ehci_waiter task: %d\n", ret); + uerr("ERROR: Failed to create ehci_waiter task: %d\n", ret); return -ENODEV; } #endif @@ -414,7 +414,7 @@ void sam_usbhost_vbusdrive(int rhport, bool enable) { pio_pinset_t pinset = 0; - uvdbg("RHPort%d: enable=%d\n", rhport+1, enable); + uinfo("RHPort%d: enable=%d\n", rhport+1, enable); /* Pick the PIO configuration associated with the selected root hub port */ @@ -422,7 +422,7 @@ void sam_usbhost_vbusdrive(int rhport, bool enable) { case SAM_RHPORT1: #ifndef CONFIG_SAMA5_UHPHS_RHPORT1 - udbg("ERROR: RHPort1 is not available in this configuration\n"); + uerr("ERROR: RHPort1 is not available in this configuration\n"); return; #else pinset = PIO_USBA_VBUS_ENABLE; @@ -431,7 +431,7 @@ void sam_usbhost_vbusdrive(int rhport, bool enable) case SAM_RHPORT2: #ifndef CONFIG_SAMA5_UHPHS_RHPORT2 - udbg("ERROR: RHPort2 is not available in this configuration\n"); + uerr("ERROR: RHPort2 is not available in this configuration\n"); return; #else pinset = PIO_USBB_VBUS_ENABLE; @@ -440,7 +440,7 @@ void sam_usbhost_vbusdrive(int rhport, bool enable) case SAM_RHPORT3: #ifndef CONFIG_SAMA5_UHPHS_RHPORT3 - udbg("ERROR: RHPort3 is not available in this configuration\n"); + uerr("ERROR: RHPort3 is not available in this configuration\n"); return; #else pinset = PIO_USBC_VBUS_ENABLE; @@ -448,7 +448,7 @@ void sam_usbhost_vbusdrive(int rhport, bool enable) #endif default: - udbg("ERROR: RHPort%d is not supported\n", rhport+1); + uerr("ERROR: RHPort%d is not supported\n", rhport+1); return; } @@ -539,7 +539,7 @@ xcpt_t sam_setup_overcurrent(xcpt_t handler) #ifdef CONFIG_USBDEV void sam_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } #endif diff --git a/configs/sama5d4-ek/src/sam_userleds.c b/configs/sama5d4-ek/src/sam_userleds.c index ac7fae8d00efe0d6a5b8bca7affde14ca7289162..8e17e839bfecd6923c23de49c89db205dede4349 100644 --- a/configs/sama5d4-ek/src/sam_userleds.c +++ b/configs/sama5d4-ek/src/sam_userleds.c @@ -67,22 +67,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/sama5d4-ek/src/sam_wm8904.c b/configs/sama5d4-ek/src/sam_wm8904.c index de0a2194d5f4f6ec368f0302594cc8137657a4c2..7afb4b85af4f3b6b353f8aa4d4543471ac24bde8 100644 --- a/configs/sama5d4-ek/src/sam_wm8904.c +++ b/configs/sama5d4-ek/src/sam_wm8904.c @@ -157,13 +157,13 @@ static int wm8904_attach(FAR const struct wm8904_lower_s *lower, * new handler will called via wm8904_interrupt() when the interrupt occurs. */ - audvdbg("Attaching %p\n", isr); + audinfo("Attaching %p\n", isr); g_wm8904info.handler = isr; g_wm8904info.arg = arg; } else { - audvdbg("Detaching %p\n", g_wm8904info.handler); + audinfo("Detaching %p\n", g_wm8904info.handler); (void)wm8904_enable(lower, false); g_wm8904info.handler = NULL; g_wm8904info.arg = NULL; @@ -187,13 +187,13 @@ static bool wm8904_enable(FAR const struct wm8904_lower_s *lower, bool enable) if (enable && g_wm8904info.handler) { - audvdbg("Enabling\n"); + audinfo("Enabling\n"); sam_pioirqenable(IRQ_INT_WM8904); enabled = true; } else { - audvdbg("Disabling\n"); + audinfo("Disabling\n"); sam_pioirqdisable(IRQ_INT_WM8904); enabled = false; } @@ -208,7 +208,7 @@ static int wm8904_interrupt(int irq, FAR void *context) { /* Just forward the interrupt to the WM8904 driver */ - audvdbg("handler %p\n", g_wm8904info.handler); + audinfo("handler %p\n", g_wm8904info.handler); if (g_wm8904info.handler) { return g_wm8904info.handler(&g_wm8904info.lower, g_wm8904info.arg); @@ -253,7 +253,7 @@ int sam_wm8904_initialize(int minor) char devname[12]; int ret; - auddbg("minor %d\n", minor); + audinfo("minor %d\n", minor); DEBUGASSERT(minor >= 0 && minor <= 25); /* Have we already initialized? Since we never uninitialize we must prevent @@ -273,7 +273,7 @@ int sam_wm8904_initialize(int minor) i2c = sam_i2cbus_initialize(WM8904_TWI_BUS); if (!i2c) { - auddbg("Failed to initialize TWI%d\n", WM8904_TWI_BUS); + auderr("ERROR: Failed to initialize TWI%d\n", WM8904_TWI_BUS); ret = -ENODEV; goto errout; } @@ -283,7 +283,7 @@ int sam_wm8904_initialize(int minor) i2s = sam_ssc_initialize(WM8904_SSC_BUS); if (!i2s) { - auddbg("Failed to initialize SSC%d\n", WM8904_SSC_BUS); + auderr("ERROR: Failed to initialize SSC%d\n", WM8904_SSC_BUS); ret = -ENODEV; goto errout_with_i2c; } @@ -314,7 +314,7 @@ int sam_wm8904_initialize(int minor) ret = irq_attach(IRQ_INT_WM8904, wm8904_interrupt); if (ret < 0) { - auddbg("ERROR: Failed to attach WM8904 interrupt: %d\n", ret); + auderr("ERROR: Failed to attach WM8904 interrupt: %d\n", ret); goto errout_with_i2s; } @@ -325,7 +325,7 @@ int sam_wm8904_initialize(int minor) wm8904 = wm8904_initialize(i2c, i2s, &g_wm8904info.lower); if (!wm8904) { - auddbg("Failed to initialize the WM8904\n"); + auderr("ERROR: Failed to initialize the WM8904\n"); ret = -ENODEV; goto errout_with_irq; } @@ -338,7 +338,7 @@ int sam_wm8904_initialize(int minor) pcm = pcm_decode_initialize(wm8904); if (!pcm) { - auddbg("ERROR: Failed create the PCM decoder\n"); + auderr("ERROR: Failed create the PCM decoder\n"); ret = -ENODEV; goto errout_with_wm8904; } @@ -355,7 +355,7 @@ int sam_wm8904_initialize(int minor) ret = audio_register(devname, pcm); if (ret < 0) { - auddbg("ERROR: Failed to register /dev/%s device: %d\n", devname, ret); + auderr("ERROR: Failed to register /dev/%s device: %d\n", devname, ret); goto errout_with_pcm; } diff --git a/configs/samd20-xplained/nsh/defconfig b/configs/samd20-xplained/nsh/defconfig index 5df5b16c4d08614111b6541f3d28ca77cbc5a762..5b77260e57e63b7e16314d94f5a6f37d861afdce 100644 --- a/configs/samd20-xplained/nsh/defconfig +++ b/configs/samd20-xplained/nsh/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH_CHIP_SAMD=y # 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 @@ -119,11 +122,14 @@ CONFIG_ARCH_CORTEXM0=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv6-m" CONFIG_ARCH_CHIP="samdl" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set # @@ -450,7 +456,12 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -458,6 +469,7 @@ CONFIG_DEV_NULL=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -469,6 +481,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -492,10 +506,6 @@ CONFIG_USART4_SERIALDRIVER=y # 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 @@ -536,15 +546,18 @@ CONFIG_USART4_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -582,12 +595,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -650,11 +657,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -698,10 +708,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -711,17 +721,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -729,17 +739,16 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -761,8 +770,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -773,6 +782,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 @@ -884,12 +894,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -897,6 +907,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/samd20-xplained/src/sam_autoleds.c b/configs/samd20-xplained/src/sam_autoleds.c index 7b88426aee7be6c99f855294848fe3804d8a9029..6e6407753c789e59e18eae65d8993d1bb03efca6 100644 --- a/configs/samd20-xplained/src/sam_autoleds.c +++ b/configs/samd20-xplained/src/sam_autoleds.c @@ -77,30 +77,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/samd20-xplained/src/sam_mmcsd.c b/configs/samd20-xplained/src/sam_mmcsd.c index b183eda7426e8763c53b05e44d365dfbd5c82beb..1470db2a1aa0b90607f40cbf06e11679f134282c 100644 --- a/configs/samd20-xplained/src/sam_mmcsd.c +++ b/configs/samd20-xplained/src/sam_mmcsd.c @@ -95,30 +95,30 @@ int sam_sdinitialize(int port, int minor) /* Get the SPI driver instance for the SD chip select */ - fvdbg("Initializing SERCOM SPI%d\n", port); + finfo("Initializing SERCOM SPI%d\n", port); spi = sam_spibus_initialize(port); if (!spi) { - fdbg("Failed to initialize SPI%d\n", port); + ferr("ERROR: Failed to initialize SPI%d\n", port); return -ENODEV; } - fvdbg("Successfully initialized SPI%d\n", port); + finfo("Successfully initialized SPI%d\n", port); /* Bind the SPI device for the chip select to the slot */ - fvdbg("Binding SPI%d to MMC/SD slot %d\n", port, SAMDL_MMCSDSLOTNO); + finfo("Binding SPI%d to MMC/SD slot %d\n", port, SAMDL_MMCSDSLOTNO); ret = mmcsd_spislotinitialize(minor, SAMDL_MMCSDSLOTNO, spi); if (ret < 0) { - fdbg("Failed to bind SPI%d to MMC/SD slot %d: %d\n", + ferr("ERROR: Failed to bind SPI%d to MMC/SD slot %d: %d\n", port, SAMDL_MMCSDSLOTNO, ret); return ret; } - fvdbg("Successfuly bound SPI%d to MMC/SD slot %d\n", + finfo("Successfuly bound SPI%d to MMC/SD slot %d\n", port, SAMDL_MMCSDSLOTNO); return OK; diff --git a/configs/samd20-xplained/src/sam_spi.c b/configs/samd20-xplained/src/sam_spi.c index 21a9f681fa3d3d4e3325b451803ba75a0a0f9022..3ec3469adbedc148bcd7a7b88e623f35693d0bcb 100644 --- a/configs/samd20-xplained/src/sam_spi.c +++ b/configs/samd20-xplained/src/sam_spi.c @@ -53,32 +53,6 @@ #ifdef SAMDL_HAVE_SPI -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/samd20-xplained/src/sam_ug2832hsweg04.c b/configs/samd20-xplained/src/sam_ug2832hsweg04.c index ee1f37d0f665fe9b5a276863dee038f0dc42c75a..33755c18ad7960a503212d17e7a732f7632a3db7 100644 --- a/configs/samd20-xplained/src/sam_ug2832hsweg04.c +++ b/configs/samd20-xplained/src/sam_ug2832hsweg04.c @@ -144,16 +144,6 @@ # error "The OLED driver requires CONFIG_SPI_CMDDATA in the configuration" #endif -/* Debug ********************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__) -# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -187,7 +177,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) spi = sam_spibus_initialize(OLED_CSNO); if (!spi) { - lcddbg("Failed to initialize SPI port 1\n"); + lcderr("ERROR: Failed to initialize SPI port 1\n"); } else { @@ -196,11 +186,11 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) dev = ssd1306_initialize(spi, devno); if (!dev) { - lcddbg("Failed to bind SPI port 1 to OLED %d: %d\n", devno); + lcderr("ERROR: Failed to bind SPI port 1 to OLED %d: %d\n", devno); } else { - lcdvdbg("Bound SPI port 1 to OLED %d\n", devno); + lcdinfo("Bound SPI port 1 to OLED %d\n", devno); /* And turn the OLED on */ diff --git a/configs/samd20-xplained/src/sam_userleds.c b/configs/samd20-xplained/src/sam_userleds.c index 985ae1dbba9fbf27946d53e11111a360629c993b..cd98135cf5b78cdff4cfc7c8229039a2dafc4fcf 100644 --- a/configs/samd20-xplained/src/sam_userleds.c +++ b/configs/samd20-xplained/src/sam_userleds.c @@ -62,30 +62,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/samd21-xplained/nsh/defconfig b/configs/samd21-xplained/nsh/defconfig index 1610bf7397e203a60a837608e32afbfb08ba4875..4b5a9b44ce9540461e361e3d3361e98bce6fcb2c 100644 --- a/configs/samd21-xplained/nsh/defconfig +++ b/configs/samd21-xplained/nsh/defconfig @@ -46,10 +46,11 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH_CHIP_SAMD=y # 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 @@ -119,11 +122,14 @@ CONFIG_ARCH_CORTEXM0=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv6-m" CONFIG_ARCH_CHIP="samdl" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set # @@ -448,7 +454,12 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -456,6 +467,7 @@ CONFIG_DEV_NULL=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -467,6 +479,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -490,10 +504,6 @@ CONFIG_USART4_SERIALDRIVER=y # 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 @@ -534,15 +544,18 @@ CONFIG_USART4_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -580,12 +593,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -648,11 +655,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -696,10 +706,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -709,17 +719,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -727,17 +737,16 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -759,8 +768,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -771,6 +780,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 @@ -882,12 +892,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -895,6 +905,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/samd21-xplained/src/sam_autoleds.c b/configs/samd21-xplained/src/sam_autoleds.c index 9a559df4192b50baecb2ed4d1f42a1085933044c..b10ab464fe740c62d2f83208a7b1fe9d9beee289 100644 --- a/configs/samd21-xplained/src/sam_autoleds.c +++ b/configs/samd21-xplained/src/sam_autoleds.c @@ -77,30 +77,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/samd21-xplained/src/sam_mmcsd.c b/configs/samd21-xplained/src/sam_mmcsd.c index f763f44c0a421a1039d1e40018457460b0428a7d..caa2c32a233e506f76ce047df8c43083c917e14d 100644 --- a/configs/samd21-xplained/src/sam_mmcsd.c +++ b/configs/samd21-xplained/src/sam_mmcsd.c @@ -95,30 +95,30 @@ int sam_sdinitialize(int port, int minor) /* Get the SPI driver instance for the SD chip select */ - fvdbg("Initializing SERCOM SPI%d\n", port); + finfo("Initializing SERCOM SPI%d\n", port); spi = sam_spibus_initialize(port); if (!spi) { - fdbg("Failed to initialize SPI%d\n", port); + ferr("ERROR: Failed to initialize SPI%d\n", port); return -ENODEV; } - fvdbg("Successfully initialized SPI%d\n", port); + finfo("Successfully initialized SPI%d\n", port); /* Bind the SPI device for the chip select to the slot */ - fvdbg("Binding SPI%d to MMC/SD slot %d\n", port, SAMDL_MMCSDSLOTNO); + finfo("Binding SPI%d to MMC/SD slot %d\n", port, SAMDL_MMCSDSLOTNO); ret = mmcsd_spislotinitialize(minor, SAMDL_MMCSDSLOTNO, spi); if (ret < 0) { - fdbg("Failed to bind SPI%d to MMC/SD slot %d: %d\n", + ferr("ERROR: Failed to bind SPI%d to MMC/SD slot %d: %d\n", port, SAMDL_MMCSDSLOTNO, ret); return ret; } - fvdbg("Successfuly bound SPI%d to MMC/SD slot %d\n", + finfo("Successfuly bound SPI%d to MMC/SD slot %d\n", port, SAMDL_MMCSDSLOTNO); return OK; diff --git a/configs/samd21-xplained/src/sam_spi.c b/configs/samd21-xplained/src/sam_spi.c index 6352367dcc403d1c42a435a13145f523a05c9168..eaf17020ec056b46621fa6cbc0a8657c35849ccd 100644 --- a/configs/samd21-xplained/src/sam_spi.c +++ b/configs/samd21-xplained/src/sam_spi.c @@ -53,32 +53,6 @@ #ifdef SAMDL_HAVE_SPI -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/samd21-xplained/src/sam_ug2832hsweg04.c b/configs/samd21-xplained/src/sam_ug2832hsweg04.c index b5cfcf26e7ae0db58e27c7acf6526b5a316f417d..3414df2c28f44f35d0b102bd77718f9cb580dbdb 100644 --- a/configs/samd21-xplained/src/sam_ug2832hsweg04.c +++ b/configs/samd21-xplained/src/sam_ug2832hsweg04.c @@ -144,16 +144,6 @@ # error "The OLED driver requires CONFIG_SPI_CMDDATA in the configuration" #endif -/* Debug ********************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__) -# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -187,7 +177,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) spi = sam_spibus_initialize(OLED_CSNO); if (!spi) { - lcddbg("Failed to initialize SPI port 1\n"); + lcderr("ERROR: Failed to initialize SPI port 1\n"); } else { @@ -196,11 +186,11 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) dev = ssd1306_initialize(spi, devno); if (!dev) { - lcddbg("Failed to bind SPI port 1 to OLED %d: %d\n", devno); + lcderr("ERROR: Failed to bind SPI port 1 to OLED %d: %d\n", devno); } else { - lcdvdbg("Bound SPI port 1 to OLED %d\n", devno); + lcdinfo("Bound SPI port 1 to OLED %d\n", devno); /* And turn the OLED on */ diff --git a/configs/samd21-xplained/src/sam_userleds.c b/configs/samd21-xplained/src/sam_userleds.c index 7b7e87bf7c3d5b60b1d0fc77ea0d7c7554483c42..1d54a192950f87ad15ac10a3e27dc1f9aeaf188b 100644 --- a/configs/samd21-xplained/src/sam_userleds.c +++ b/configs/samd21-xplained/src/sam_userleds.c @@ -62,30 +62,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/same70-xplained/README.txt b/configs/same70-xplained/README.txt index 548e496e0a3336f862c035fb4d45c156ea41fe7c..6f84f024fa64f1f71711af3d1446d50f2a6797b5 100644 --- a/configs/same70-xplained/README.txt +++ b/configs/same70-xplained/README.txt @@ -745,9 +745,9 @@ MCAN1 Loopback Test Enabling CAN Debug Output ------------------------- Build Setup -> Debug Options - CONFIG_DEBUG=y # Enables general debug features - CONFIG_DEBUG_VERBOSE=y # Enables verbose output - CONFIG_DEBUG_CAN=y # Enables debug output from CAN + CONFIG_DEBUG_FEATURES=y # Enables general debug features + CONFIG_DEBUG_INFO=y # Enables verbose output + CONFIG_DEBUG_CAN_INFO=y # Enables debug output from CAN CONFIG_STACK_COLORATION=y # Monitor stack usage CONFIG_DEBUG_SYMBOLS=y # Needed only for use with a debugger diff --git a/configs/same70-xplained/netnsh/defconfig b/configs/same70-xplained/netnsh/defconfig index 17951d79a84c86060b53dfb7155a051fd59106df..0f03d530c1db9ebe94fc194b7d116976d024371a 100644 --- a/configs/same70-xplained/netnsh/defconfig +++ b/configs/same70-xplained/netnsh/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_CHIP_SAMV7=y # 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 @@ -119,6 +122,8 @@ CONFIG_ARCH_CORTEXM7=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="samv7" +# 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 @@ -127,6 +132,7 @@ CONFIG_ARCH_HAVE_FPU=y CONFIG_ARCH_HAVE_DPFPU=y CONFIG_ARCH_FPU=y CONFIG_ARCH_DPFPU=y +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -142,6 +148,7 @@ CONFIG_ARMV7M_HAVE_ITCM=y CONFIG_ARMV7M_HAVE_DTCM=y # CONFIG_ARMV7M_ITCM is not set # CONFIG_ARMV7M_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 @@ -257,6 +264,13 @@ CONFIG_SAMV7_USART1=y # CONFIG_SAMV7_USART2 is not set # CONFIG_SAMV7_WDT is not set # CONFIG_SAMV7_RSWDT is not set +# CONFIG_SAMV7_JTAG_DISABLE is not set +CONFIG_SAMV7_JTAG_FULL_ENABLE=y +# CONFIG_SAMV7_JTAG_FULL_SW_ENABLE is not set +# CONFIG_SAMV7_JTAG_SW_ENABLE is not set +# CONFIG_SAMV7_ERASE_DISABLE is not set +CONFIG_SAMV7_ERASE_ENABLE=y +# CONFIG_SAMV7_SYSTEMRESET is not set CONFIG_SAMV7_GPIO_IRQ=y CONFIG_SAMV7_GPIOA_IRQ=y # CONFIG_SAMV7_GPIOB_IRQ is not set @@ -528,6 +542,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -543,7 +559,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -551,6 +572,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -595,12 +617,15 @@ CONFIG_MTD_AT25=y CONFIG_AT25_SPIMODE=0 CONFIG_AT25_SPIFREQUENCY=20000000 # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP 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 @@ -654,6 +679,8 @@ CONFIG_ETH0_PHY_KSZ8081=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -677,10 +704,6 @@ CONFIG_USART1_SERIALDRIVER=y # 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 @@ -707,15 +730,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -882,12 +908,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_MTD is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -955,6 +975,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 @@ -969,6 +991,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1011,15 +1034,16 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # CONFIG_EXAMPLES_CONFIGDATA is not set # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1029,17 +1053,17 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1047,8 +1071,8 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1056,15 +1080,15 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -1084,8 +1108,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1098,20 +1122,21 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1214,6 +1239,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y CONFIG_NSH_NETINIT_THREAD=y CONFIG_NSH_NETINIT_MONITOR=y CONFIG_NSH_NETINIT_SIGNO=18 @@ -1261,12 +1287,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=0 CONFIG_I2CTOOL_MAXBUS=0 @@ -1274,7 +1300,8 @@ CONFIG_I2CTOOL_MINADDR=0x03 CONFIG_I2CTOOL_MAXADDR=0x77 CONFIG_I2CTOOL_MAXREGADDR=0xff CONFIG_I2CTOOL_DEFFREQ=400000 -# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_MDIO is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1282,8 +1309,7 @@ CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y # CONFIG_READLINE_TABCOMPLETION is not set # CONFIG_READLINE_CMD_HISTORY is not set -# CONFIG_SYSTEM_MDIO is not set # CONFIG_SYSTEM_SUDOKU is not set -# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/same70-xplained/nsh/defconfig b/configs/same70-xplained/nsh/defconfig index 7a425dcb802a15a8c90059f489122c2d48068e96..cb89c826f118328f9ec8e0a304589ef12bca34e3 100644 --- a/configs/same70-xplained/nsh/defconfig +++ b/configs/same70-xplained/nsh/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_CHIP_SAMV7=y # 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 @@ -119,6 +122,8 @@ CONFIG_ARCH_CORTEXM7=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="samv7" +# 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 @@ -127,6 +132,7 @@ CONFIG_ARCH_HAVE_FPU=y CONFIG_ARCH_HAVE_DPFPU=y CONFIG_ARCH_FPU=y CONFIG_ARCH_DPFPU=y +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -142,6 +148,7 @@ CONFIG_ARMV7M_HAVE_ITCM=y CONFIG_ARMV7M_HAVE_DTCM=y # CONFIG_ARMV7M_ITCM is not set # CONFIG_ARMV7M_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 @@ -257,6 +264,13 @@ CONFIG_SAMV7_USART1=y # CONFIG_SAMV7_USART2 is not set # CONFIG_SAMV7_WDT is not set # CONFIG_SAMV7_RSWDT is not set +# CONFIG_SAMV7_JTAG_DISABLE is not set +CONFIG_SAMV7_JTAG_FULL_ENABLE=y +# CONFIG_SAMV7_JTAG_FULL_SW_ENABLE is not set +# CONFIG_SAMV7_JTAG_SW_ENABLE is not set +# CONFIG_SAMV7_ERASE_DISABLE is not set +CONFIG_SAMV7_ERASE_ENABLE=y +# CONFIG_SAMV7_SYSTEMRESET is not set CONFIG_SAMV7_GPIO_IRQ=y CONFIG_SAMV7_GPIOA_IRQ=y # CONFIG_SAMV7_GPIOB_IRQ is not set @@ -513,6 +527,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -528,7 +544,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -536,6 +557,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -580,12 +602,15 @@ CONFIG_MTD_AT25=y CONFIG_AT25_SPIMODE=0 CONFIG_AT25_SPIFREQUENCY=20000000 # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP 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 @@ -596,6 +621,8 @@ CONFIG_AT25_SPIFREQUENCY=20000000 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -619,10 +646,6 @@ CONFIG_USART1_SERIALDRIVER=y # 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 @@ -649,15 +672,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -711,12 +737,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_MTD is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -784,12 +804,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -837,10 +860,10 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -849,17 +872,17 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -867,21 +890,22 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -901,8 +925,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -913,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 @@ -1027,12 +1052,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=0 CONFIG_I2CTOOL_MAXBUS=0 @@ -1040,7 +1065,7 @@ CONFIG_I2CTOOL_MINADDR=0x03 CONFIG_I2CTOOL_MAXADDR=0x77 CONFIG_I2CTOOL_MAXREGADDR=0xff CONFIG_I2CTOOL_DEFFREQ=400000 -# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set CONFIG_SYSTEM_RAMTEST=y CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1048,6 +1073,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/same70-xplained/src/sam_at24config.c b/configs/same70-xplained/src/sam_at24config.c index aac1de3571d5651add08b32d1a2cc89b191d7903..69d27a02cedce513068f17d65c7763cd9828951f 100644 --- a/configs/same70-xplained/src/sam_at24config.c +++ b/configs/same70-xplained/src/sam_at24config.c @@ -75,7 +75,7 @@ int sam_at24config(void) i2c = sam_i2cbus_initialize(0); if (!i2c) { - fdbg("ERROR: Failed to initialize TWI0\n"); + ferr("ERROR: Failed to initialize TWI0\n"); return -ENODEV; } @@ -84,7 +84,7 @@ int sam_at24config(void) at24 = at24c_initialize(i2c); if (!at24) { - fdbg("ERROR: Failed to initialize the AT24 driver\n"); + ferr("ERROR: Failed to initialize the AT24 driver\n"); (void)sam_i2cbus_uninitialize(i2c); return -ENODEV; } @@ -94,7 +94,7 @@ int sam_at24config(void) ret = at24->ioctl(at24, MTDIOC_EXTENDED, 0); if (ret < 0) { - fdbg("ERROR: AT24 ioctl(MTDIOC_EXTENDED) failed: %d\n", ret); + ferr("ERROR: AT24 ioctl(MTDIOC_EXTENDED) failed: %d\n", ret); } /* Bind the instance of an MTD device to the /dev/config device. */ @@ -102,7 +102,7 @@ int sam_at24config(void) ret = mtdconfig_register(at24); if (ret < 0) { - fdbg("ERROR: Failed to bind AT24 driver to the MTD config device\n"); + ferr("ERROR: Failed to bind AT24 driver to the MTD config device\n"); (void)sam_i2cbus_uninitialize(i2c); } diff --git a/configs/same70-xplained/src/sam_autoleds.c b/configs/same70-xplained/src/sam_autoleds.c index 8fda597e74128d0f8a17bcadf0a932a788fb5a0f..64fd6b663c388f5a426047dc3c468830126d6b24 100644 --- a/configs/same70-xplained/src/sam_autoleds.c +++ b/configs/same70-xplained/src/sam_autoleds.c @@ -77,30 +77,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/same70-xplained/src/sam_bringup.c b/configs/same70-xplained/src/sam_bringup.c index e5631b893080e6a3b83782ef3df367aa813b7ebb..759811328e625d8a9ed82c677732a345f41a28ed 100644 --- a/configs/same70-xplained/src/sam_bringup.c +++ b/configs/same70-xplained/src/sam_bringup.c @@ -76,14 +76,6 @@ (((n)+CONFIG_SAME70XPLAINED_ROMFS_ROMDISK_SECTSIZE-1) / \ CONFIG_SAME70XPLAINED_ROMFS_ROMDISK_SECTSIZE) -/* Debug ********************************************************************/ - -#ifdef CONFIG_BOARD_INITIALIZE -# define SYSLOG lldbg -#else -# define SYSLOG dbg -#endif - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -105,14 +97,14 @@ static void sam_i2c_register(int bus) i2c = sam_i2cbus_initialize(bus); if (i2c == NULL) { - dbg("ERROR: Failed to get I2C%d interface\n", bus); + _err("ERROR: Failed to get I2C%d interface\n", bus); } else { ret = i2c_register(i2c, bus); if (ret < 0) { - dbg("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); + _err("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); sam_i2cbus_uninitialize(i2c); } } @@ -177,7 +169,7 @@ int sam_bringup(void) ret = sam_emac0_setmac(); if (ret < 0) { - SYSLOG("ERROR: sam_emac0_setmac() failed: %d\n", ret); + _err("ERROR: sam_emac0_setmac() failed: %d\n", ret); } #endif @@ -187,8 +179,8 @@ int sam_bringup(void) ret = mount(NULL, SAME70_PROCFS_MOUNTPOINT, "procfs", 0, NULL); if (ret < 0) { - SYSLOG("ERROR: Failed to mount procfs at %s: %d\n", - SAME70_PROCFS_MOUNTPOINT, ret); + _err("ERROR: Failed to mount procfs at %s: %d\n", + SAME70_PROCFS_MOUNTPOINT, ret); } #endif @@ -200,7 +192,7 @@ int sam_bringup(void) ret = sam_at24config(); if (ret < 0) { - SYSLOG("ERROR: sam_at24config() failed: %d\n", ret); + _err("ERROR: sam_at24config() failed: %d\n", ret); } #endif @@ -210,8 +202,8 @@ int sam_bringup(void) ret = sam_hsmci_initialize(HSMCI0_SLOTNO, HSMCI0_MINOR); if (ret < 0) { - SYSLOG("ERROR: sam_hsmci_initialize(%d,%d) failed: %d\n", - HSMCI0_SLOTNO, HSMCI0_MINOR, ret); + _err("ERROR: sam_hsmci_initialize(%d,%d) failed: %d\n", + HSMCI0_SLOTNO, HSMCI0_MINOR, ret); } #ifdef CONFIG_SAME70XPLAINED_HSMCI0_MOUNT @@ -227,8 +219,8 @@ int sam_bringup(void) if (ret < 0) { - SYSLOG("ERROR: Failed to mount %s: %d\n", - CONFIG_SAME70XPLAINED_HSMCI0_MOUNT_MOUNTPOINT, errno); + _err("ERROR: Failed to mount %s: %d\n", + CONFIG_SAME70XPLAINED_HSMCI0_MOUNT_MOUNTPOINT, errno); } } @@ -249,7 +241,7 @@ int sam_bringup(void) CONFIG_SAME70XPLAINED_ROMFS_ROMDISK_SECTSIZE); if (ret < 0) { - SYSLOG("ERROR: romdisk_register failed: %d\n", -ret); + _err("ERROR: romdisk_register failed: %d\n", -ret); } else { @@ -260,9 +252,9 @@ int sam_bringup(void) "romfs", MS_RDONLY, NULL); if (ret < 0) { - SYSLOG("ERROR: mount(%s,%s,romfs) failed: %d\n", - CONFIG_SAME70XPLAINED_ROMFS_ROMDISK_DEVNAME, - CONFIG_SAME70XPLAINED_ROMFS_MOUNT_MOUNTPOINT, errno); + _err("ERROR: mount(%s,%s,romfs) failed: %d\n", + CONFIG_SAME70XPLAINED_ROMFS_ROMDISK_DEVNAME, + CONFIG_SAME70XPLAINED_ROMFS_MOUNT_MOUNTPOINT, errno); } } #endif @@ -277,7 +269,7 @@ int sam_bringup(void) mtd = progmem_initialize(); if (!mtd) { - SYSLOG("ERROR: progmem_initialize failed\n"); + _err("ERROR: progmem_initialize failed\n"); } /* Use the FTL layer to wrap the MTD driver as a block driver */ @@ -285,7 +277,7 @@ int sam_bringup(void) ret = ftl_initialize(PROGMEM_MTD_MINOR, mtd); if (ret < 0) { - SYSLOG("ERROR: Failed to initialize the FTL layer: %d\n", ret); + _err("ERROR: Failed to initialize the FTL layer: %d\n", ret); return ret; } @@ -299,7 +291,7 @@ int sam_bringup(void) ret = bchdev_register(blockdev, chardev, false); if (ret < 0) { - SYSLOG("ERROR: bchdev_register %s failed: %d\n", chardev, ret); + _err("ERROR: bchdev_register %s failed: %d\n", chardev, ret); return ret; } #endif @@ -312,7 +304,7 @@ int sam_bringup(void) ret = sam_usbhost_initialize(); if (ret != OK) { - SYSLOG("ERROR: Failed to initialize USB host: %d\n", ret); + _err("ERROR: Failed to initialize USB host: %d\n", ret); } #endif @@ -322,18 +314,18 @@ int sam_bringup(void) ret = usbmonitor_start(0, NULL); if (ret != OK) { - SYSLOG("ERROR: Failed to start the USB monitor: %d\n", ret); + _err("ERROR: Failed to start the USB monitor: %d\n", ret); } #endif #ifdef HAVE_ELF /* Initialize the ELF binary loader */ - SYSLOG("Initializing the ELF binary loader\n"); + _err("Initializing the ELF binary loader\n"); ret = elf_initialize(); if (ret < 0) { - SYSLOG("ERROR: Initialization of the ELF loader failed: %d\n", ret); + _err("ERROR: Initialization of the ELF loader failed: %d\n", ret); } #endif diff --git a/configs/same70-xplained/src/sam_ethernet.c b/configs/same70-xplained/src/sam_ethernet.c index f435028837bcd64f3da3c3e5cef1d461496d982d..8f427e8c97a1c7ee438eea2ca80a1a0365ff95cb 100644 --- a/configs/same70-xplained/src/sam_ethernet.c +++ b/configs/same70-xplained/src/sam_ethernet.c @@ -42,8 +42,8 @@ /* Force verbose debug on in this file only to support unit-level testing. */ #ifdef CONFIG_NETDEV_PHY_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG_VERBOSE 1 +# undef CONFIG_DEBUG_INFO +# define CONFIG_DEBUG_INFO 1 # undef CONFIG_DEBUG_NET # define CONFIG_DEBUG_NET 1 #endif @@ -80,11 +80,13 @@ */ #ifdef CONFIG_NETDEV_PHY_DEBUG -# define phydbg dbg -# define phylldbg lldbg +# define phyerr _err +# define phywarn _warn +# define phyinfo _info #else -# define phydbg(x...) -# define phylldbg(x...) +# define phyerr(x...) +# define phywarn(x...) +# define phyinfo(x...) #endif /************************************************************************************ @@ -106,7 +108,7 @@ static xcpt_t g_emac0_handler; #ifdef CONFIG_SAMV7_GPIOA_IRQ static void sam_emac0_phy_enable(bool enable) { - phydbg("IRQ%d: enable=%d\n", IRQ_EMAC0_INT, enable); + phyinfo("IRQ%d: enable=%d\n", IRQ_EMAC0_INT, enable); if (enable) { sam_gpioirqenable(IRQ_EMAC0_INT); @@ -134,7 +136,7 @@ void weak_function sam_netinitialize(void) { /* Configure the PHY interrupt GPIO */ - phydbg("Configuring %08x\n", GPIO_EMAC0_INT); + phyinfo("Configuring %08x\n", GPIO_EMAC0_INT); sam_configgpio(GPIO_EMAC0_INT); /* Configure PHY /RESET output */ @@ -165,7 +167,7 @@ int sam_emac0_setmac(void) i2c = sam_i2cbus_initialize(0); if (!i2c) { - ndbg("ERROR: Failed to initialize TWI0\n"); + nerr("ERROR: Failed to initialize TWI0\n"); return -ENODEV; } @@ -174,7 +176,7 @@ int sam_emac0_setmac(void) at24 = at24c_initialize(i2c); if (!at24) { - ndbg("ERROR: Failed to initialize the AT24 driver\n"); + nerr("ERROR: Failed to initialize the AT24 driver\n"); (void)sam_i2cbus_uninitialize(i2c); return -ENODEV; } @@ -184,7 +186,7 @@ int sam_emac0_setmac(void) ret = at24->ioctl(at24, MTDIOC_EXTENDED, 1); if (ret < 0) { - ndbg("ERROR: AT24 ioctl(MTDIOC_EXTENDED) failed: %d\n", ret); + nerr("ERROR: AT24 ioctl(MTDIOC_EXTENDED) failed: %d\n", ret); (void)sam_i2cbus_uninitialize(i2c); return ret; } @@ -194,7 +196,7 @@ int sam_emac0_setmac(void) nread = at24->read(at24, AT24XX_MACADDR_OFFSET, 6, mac); if (nread < 6) { - ndbg("ERROR: AT24 read(AT24XX_MACADDR_OFFSET) failed: ld\n", (long)nread); + nerr("ERROR: AT24 read(AT24XX_MACADDR_OFFSET) failed: ld\n", (long)nread); (void)sam_i2cbus_uninitialize(i2c); return (int)nread; } @@ -204,7 +206,7 @@ int sam_emac0_setmac(void) ret = at24->ioctl(at24, MTDIOC_EXTENDED, 0); if (ret < 0) { - ndbg("ERROR: AT24 ioctl(MTDIOC_EXTENDED) failed: %d\n", ret); + nerr("ERROR: AT24 ioctl(MTDIOC_EXTENDED) failed: %d\n", ret); } /* Release the I2C instance. @@ -214,10 +216,10 @@ int sam_emac0_setmac(void) ret = sam_i2cbus_uninitialize(i2c); if (ret < 0) { - ndbg("ERROR: Failed to release the I2C interface: %d\n", ret); + nerr("ERROR: Failed to release the I2C interface: %d\n", ret); } - nvdbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); /* Now configure the EMAC driver to use this MAC address */ @@ -225,7 +227,7 @@ int sam_emac0_setmac(void) ret = sam_emac_setmacaddr(EMAC0_INTF, mac); if (ret < 0) { - ndbg("ERROR: Failed to set MAC address: %d\n", ret); + nerr("ERROR: Failed to set MAC address: %d\n", ret); } return ret; @@ -309,12 +311,12 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) DEBUGASSERT(intf); - nvdbg("%s: handler=%p\n", intf, handler); - phydbg("EMAC0: devname=%s\n", SAMV7_EMAC0_DEVNAME); + ninfo("%s: handler=%p\n", intf, handler); + phyinfo("EMAC0: devname=%s\n", SAMV7_EMAC0_DEVNAME); if (strcmp(intf, SAMV7_EMAC0_DEVNAME) == 0) { - phydbg("Select EMAC0\n"); + phyinfo("Select EMAC0\n"); phandler = &g_emac0_handler; pinset = GPIO_EMAC0_INT; irq = IRQ_EMAC0_INT; @@ -322,7 +324,7 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) } else { - ndbg("Unsupported interface: %s\n", intf); + nerr("ERROR: Unsupported interface: %s\n", intf); return NULL; } @@ -341,15 +343,15 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) if (handler) { - phydbg("Configure pin: %08x\n", pinset); + phyinfo("Configure pin: %08x\n", pinset); sam_gpioirq(pinset); - phydbg("Attach IRQ%d\n", irq); + phyinfo("Attach IRQ%d\n", irq); (void)irq_attach(irq, handler); } else { - phydbg("Detach IRQ%d\n", irq); + phyinfo("Detach IRQ%d\n", irq); (void)irq_detach(irq); enabler = NULL; } diff --git a/configs/same70-xplained/src/sam_hsmci.c b/configs/same70-xplained/src/sam_hsmci.c index 6c134309deed71f8905632e6293bed99c795c335..56df5830bd9837b3b8da20f51980f0d934c4a559 100644 --- a/configs/same70-xplained/src/sam_hsmci.c +++ b/configs/same70-xplained/src/sam_hsmci.c @@ -129,7 +129,7 @@ bool sam_cardinserted_internal(struct sam_hsmci_state_s *state) /* Get the state of the PIO pin */ inserted = sam_gpioread(state->cdcfg); - fllvdbg("Slot %d inserted: %s\n", state->slotno, inserted ? "NO" : "YES"); + finfo("Slot %d inserted: %s\n", state->slotno, inserted ? "NO" : "YES"); return !inserted; } @@ -226,7 +226,7 @@ int sam_hsmci_initialize(int slotno, int minor) state = sam_hsmci_state(slotno); if (!state) { - fdbg("ERROR: No state for slotno %d\n", slotno); + ferr("ERROR: No state for slotno %d\n", slotno); return -EINVAL; } @@ -247,7 +247,7 @@ int sam_hsmci_initialize(int slotno, int minor) state->hsmci = sdio_initialize(slotno); if (!state->hsmci) { - fdbg("ERROR: Failed to initialize SDIO slot %d\n", slotno); + ferr("ERROR: Failed to initialize SDIO slot %d\n", slotno); return -ENODEV; } @@ -256,7 +256,7 @@ int sam_hsmci_initialize(int slotno, int minor) ret = mmcsd_slotinitialize(minor, state->hsmci); if (ret != OK) { - fdbg("ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); + ferr("ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); return ret; } @@ -293,7 +293,7 @@ bool sam_cardinserted(int slotno) state = sam_hsmci_state(slotno); if (!state) { - fdbg("ERROR: No state for slotno %d\n", slotno); + ferr("ERROR: No state for slotno %d\n", slotno); return false; } diff --git a/configs/same70-xplained/src/sam_mcan.c b/configs/same70-xplained/src/sam_mcan.c index d0430ed1ceef8845f169420d11df535b9d3858b5..722e83c3613e08537b45722abc1876d60ab20cae 100644 --- a/configs/same70-xplained/src/sam_mcan.c +++ b/configs/same70-xplained/src/sam_mcan.c @@ -67,21 +67,6 @@ # define CAN_PORT 1 #endif -/* 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 - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -110,7 +95,7 @@ int board_can_initialize(void) can = sam_mcan_initialize(CAN_PORT); if (can == NULL) { - candbg("ERROR: Failed to get CAN interface\n"); + canerr("ERROR: Failed to get CAN interface\n"); return -ENODEV; } @@ -119,7 +104,7 @@ int board_can_initialize(void) ret = can_register("/dev/can0", can); if (ret < 0) { - candbg("ERROR: can_register failed: %d\n", ret); + canerr("ERROR: can_register failed: %d\n", ret); return ret; } diff --git a/configs/same70-xplained/src/sam_spi.c b/configs/same70-xplained/src/sam_spi.c index df0ba7b489acf495516273af60cf43ec4e8e7e47..c21979060b7ceeb2df562c6c4eeeb23effc3bcdb 100644 --- a/configs/same70-xplained/src/sam_spi.c +++ b/configs/same70-xplained/src/sam_spi.c @@ -55,32 +55,6 @@ #ifdef CONFIG_SAMV7_SPI -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ diff --git a/configs/same70-xplained/src/sam_usbdev.c b/configs/same70-xplained/src/sam_usbdev.c index e75322a37d3580259d9e4ff884c7eb5599df02c9..ae0f54f3e0e95d095bdf89ce16ccc9d2e9e480ab 100644 --- a/configs/same70-xplained/src/sam_usbdev.c +++ b/configs/same70-xplained/src/sam_usbdev.c @@ -94,5 +94,5 @@ void sam_usbinitialize(void) void sam_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } diff --git a/configs/saml21-xplained/nsh/defconfig b/configs/saml21-xplained/nsh/defconfig index c44ddac15aa0d9660900ad1f0a33bec2876443e8..7d37c41d4e49c48f5a89172b606a0fa67ee20f76 100644 --- a/configs/saml21-xplained/nsh/defconfig +++ b/configs/saml21-xplained/nsh/defconfig @@ -46,10 +46,11 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH_CHIP_SAML=y # 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 @@ -119,11 +122,14 @@ CONFIG_ARCH_CORTEXM0=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv6-m" CONFIG_ARCH_CHIP="samdl" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set # @@ -436,7 +442,12 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -444,6 +455,7 @@ CONFIG_DEV_NULL=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -455,6 +467,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -478,10 +492,6 @@ CONFIG_USART4_SERIALDRIVER=y # 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 @@ -522,15 +532,18 @@ CONFIG_USART4_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -568,12 +581,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -636,11 +643,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -684,10 +694,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -697,17 +707,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -715,17 +725,16 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -747,8 +756,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -759,6 +768,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 @@ -870,12 +880,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -883,6 +893,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/saml21-xplained/src/sam_autoleds.c b/configs/saml21-xplained/src/sam_autoleds.c index 73716879c13dbeca549668893662a7c73bf28fa3..53bff4eab0d9eb9d8625f62d1add6d59fc5e0f48 100644 --- a/configs/saml21-xplained/src/sam_autoleds.c +++ b/configs/saml21-xplained/src/sam_autoleds.c @@ -77,30 +77,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/saml21-xplained/src/sam_mmcsd.c b/configs/saml21-xplained/src/sam_mmcsd.c index a8ca098282fe1a9e2649fe1413b1a786831b3415..b57f1d58ffba77fc72552e3cf22c5cfab0a354f3 100644 --- a/configs/saml21-xplained/src/sam_mmcsd.c +++ b/configs/saml21-xplained/src/sam_mmcsd.c @@ -95,30 +95,30 @@ int sam_sdinitialize(int port, int minor) /* Get the SPI driver instance for the SD chip select */ - fvdbg("Initializing SERCOM SPI%d\n", port); + finfo("Initializing SERCOM SPI%d\n", port); spi = sam_spibus_initialize(port); if (!spi) { - fdbg("Failed to initialize SPI%d\n", port); + ferr("ERROR: Failed to initialize SPI%d\n", port); return -ENODEV; } - fvdbg("Successfully initialized SPI%d\n", port); + finfo("Successfully initialized SPI%d\n", port); /* Bind the SPI device for the chip select to the slot */ - fvdbg("Binding SPI%d to MMC/SD slot %d\n", port, SAMDL_MMCSDSLOTNO); + finfo("Binding SPI%d to MMC/SD slot %d\n", port, SAMDL_MMCSDSLOTNO); ret = mmcsd_spislotinitialize(minor, SAMDL_MMCSDSLOTNO, spi); if (ret < 0) { - fdbg("Failed to bind SPI%d to MMC/SD slot %d: %d\n", + ferr("ERROR: Failed to bind SPI%d to MMC/SD slot %d: %d\n", port, SAMDL_MMCSDSLOTNO, ret); return ret; } - fvdbg("Successfuly bound SPI%d to MMC/SD slot %d\n", + finfo("Successfuly bound SPI%d to MMC/SD slot %d\n", port, SAMDL_MMCSDSLOTNO); return OK; diff --git a/configs/saml21-xplained/src/sam_spi.c b/configs/saml21-xplained/src/sam_spi.c index 00eea22563262fd42e1dfb2e10c2ef9b677a10c3..ae1238eb2d504dbd6c46324cf8a8f58e0390ef33 100644 --- a/configs/saml21-xplained/src/sam_spi.c +++ b/configs/saml21-xplained/src/sam_spi.c @@ -53,32 +53,6 @@ #ifdef SAMDL_HAVE_SPI -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/saml21-xplained/src/sam_ug2832hsweg04.c b/configs/saml21-xplained/src/sam_ug2832hsweg04.c index 3e67622d16a4015e897f57a751eb37b8e353b02a..0cbdb6f7953921de3bfef67ab6442405c6d042a7 100644 --- a/configs/saml21-xplained/src/sam_ug2832hsweg04.c +++ b/configs/saml21-xplained/src/sam_ug2832hsweg04.c @@ -144,16 +144,6 @@ # error "The OLED driver requires CONFIG_SPI_CMDDATA in the configuration" #endif -/* Debug ********************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__) -# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -187,7 +177,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) spi = sam_spibus_initialize(OLED_CSNO); if (!spi) { - lcddbg("Failed to initialize SPI port 1\n"); + lcderr("ERROR: Failed to initialize SPI port 1\n"); } else { @@ -196,11 +186,11 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) dev = ssd1306_initialize(spi, devno); if (!dev) { - lcddbg("Failed to bind SPI port 1 to OLED %d: %d\n", devno); + lcderr("ERROR: Failed to bind SPI port 1 to OLED %d: %d\n", devno); } else { - lcdvdbg("Bound SPI port 1 to OLED %d\n", devno); + lcdinfo("Bound SPI port 1 to OLED %d\n", devno); /* And turn the OLED on */ diff --git a/configs/saml21-xplained/src/sam_userleds.c b/configs/saml21-xplained/src/sam_userleds.c index ab22a0408e5bba59438b42045c966283df8b8a27..94cf3550eb39aa2870e0f2502af84a6f4007f58a 100644 --- a/configs/saml21-xplained/src/sam_userleds.c +++ b/configs/saml21-xplained/src/sam_userleds.c @@ -62,30 +62,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/samv71-xult/README.txt b/configs/samv71-xult/README.txt index bbde3150da1ae743264bfb46a87cfb206a916120..d51f23dfe173e9d94e826a30f0675bda1549eb11 100644 --- a/configs/samv71-xult/README.txt +++ b/configs/samv71-xult/README.txt @@ -1335,9 +1335,9 @@ MCAN1 Loopback Test Enabling CAN Debug Output ------------------------- Build Setup -> Debug Options - CONFIG_DEBUG=y # Enables general debug features - CONFIG_DEBUG_VERBOSE=y # Enables verbose output - CONFIG_DEBUG_CAN=y # Enables debug output from CAN + CONFIG_DEBUG_FEATURES=y # Enables general debug features + CONFIG_DEBUG_INFO=y # Enables verbose output + CONFIG_DEBUG_CAN_INFO=y # Enables debug output from CAN CONFIG_STACK_COLORATION=y # Monitor stack usage CONFIG_DEBUG_SYMBOLS=y # Needed only for use with a debugger diff --git a/configs/samv71-xult/knsh/defconfig b/configs/samv71-xult/knsh/defconfig index de6d5d57f67a26822707b622ad575ea6d46c82c0..64d931ab93216519b737a11c6a465b8aeeabbdaa 100644 --- a/configs/samv71-xult/knsh/defconfig +++ b/configs/samv71-xult/knsh/defconfig @@ -51,10 +51,11 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -270,6 +271,13 @@ CONFIG_SAMV7_UART3=y # CONFIG_SAMV7_USART2 is not set # CONFIG_SAMV7_WDT is not set # CONFIG_SAMV7_RSWDT is not set +# CONFIG_SAMV7_JTAG_DISABLE is not set +CONFIG_SAMV7_JTAG_FULL_ENABLE=y +# CONFIG_SAMV7_JTAG_FULL_SW_ENABLE is not set +# CONFIG_SAMV7_JTAG_SW_ENABLE is not set +# CONFIG_SAMV7_ERASE_DISABLE is not set +CONFIG_SAMV7_ERASE_ENABLE=y +# CONFIG_SAMV7_SYSTEMRESET is not set CONFIG_SAMV7_GPIO_IRQ=y CONFIG_SAMV7_GPIOA_IRQ=y CONFIG_SAMV7_GPIOB_IRQ=y @@ -528,6 +536,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -543,7 +553,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -551,6 +566,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -595,12 +611,15 @@ CONFIG_MTD_AT25=y CONFIG_AT25_SPIMODE=0 CONFIG_AT25_SPIFREQUENCY=20000000 # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP 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 @@ -611,6 +630,8 @@ CONFIG_AT25_SPIFREQUENCY=20000000 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -634,10 +655,6 @@ CONFIG_UART3_SERIALDRIVER=y # 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 @@ -664,15 +681,18 @@ CONFIG_UART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -726,12 +746,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_MTD is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -808,6 +822,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_USRWORK is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -838,9 +853,9 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_EXAMPLES_FTPC is not set # CONFIG_EXAMPLES_FTPD is not set # CONFIG_EXAMPLES_HELLO is not set +# CONFIG_EXAMPLES_IGMP is not set # CONFIG_EXAMPLES_JSON 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 @@ -849,18 +864,18 @@ CONFIG_ARCH_HAVE_TLS=y 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -874,14 +889,15 @@ CONFIG_EXAMPLES_NSH=y # 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -901,8 +917,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -913,6 +929,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 @@ -1026,11 +1043,11 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=0 CONFIG_I2CTOOL_MAXBUS=0 @@ -1038,7 +1055,7 @@ CONFIG_I2CTOOL_MINADDR=0x03 CONFIG_I2CTOOL_MAXADDR=0x77 CONFIG_I2CTOOL_MAXREGADDR=0xff CONFIG_I2CTOOL_DEFFREQ=400000 -# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set CONFIG_SYSTEM_RAMTEST=y CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1046,6 +1063,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/samv71-xult/module/defconfig b/configs/samv71-xult/module/defconfig index b55a4699a4cf527c3a68407610d143b10887f3bb..dcd165c2aede59ff6abfdc74176e2e2792dfc827 100644 --- a/configs/samv71-xult/module/defconfig +++ b/configs/samv71-xult/module/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -262,6 +263,13 @@ CONFIG_SAMV7_UART3=y # CONFIG_SAMV7_USART2 is not set # CONFIG_SAMV7_WDT is not set # CONFIG_SAMV7_RSWDT is not set +# CONFIG_SAMV7_JTAG_DISABLE is not set +CONFIG_SAMV7_JTAG_FULL_ENABLE=y +# CONFIG_SAMV7_JTAG_FULL_SW_ENABLE is not set +# CONFIG_SAMV7_JTAG_SW_ENABLE is not set +# CONFIG_SAMV7_ERASE_DISABLE is not set +CONFIG_SAMV7_ERASE_ENABLE=y +# CONFIG_SAMV7_SYSTEMRESET is not set CONFIG_SAMV7_GPIO_IRQ=y CONFIG_SAMV7_GPIOA_IRQ=y CONFIG_SAMV7_GPIOB_IRQ=y @@ -508,7 +516,12 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -516,6 +529,7 @@ CONFIG_DEV_NULL=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -527,6 +541,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -550,10 +566,6 @@ CONFIG_UART3_SERIALDRIVER=y # 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 @@ -580,15 +592,18 @@ CONFIG_UART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -642,12 +657,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -724,6 +733,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -759,10 +769,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -776,17 +786,17 @@ CONFIG_EXAMPLES_MODULE_DEVPATH="/dev/ram0" 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_ROMFS is not set @@ -795,19 +805,19 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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 # CONFIG_EXAMPLES_TIFF is not set # 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -831,8 +841,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -843,6 +853,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 @@ -959,12 +970,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -972,6 +983,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/samv71-xult/mxtxplnd/defconfig b/configs/samv71-xult/mxtxplnd/defconfig index 93136214deceb1b44b4f78154e5a760c7ea088fb..24970c51a2ff5842f15032faaa801637e663d1da 100644 --- a/configs/samv71-xult/mxtxplnd/defconfig +++ b/configs/samv71-xult/mxtxplnd/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -80,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 @@ -98,6 +100,7 @@ CONFIG_ARCH="arm" CONFIG_ARCH_CHIP_SAMV7=y # 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 @@ -119,6 +122,8 @@ CONFIG_ARCH_CORTEXM7=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="samv7" +# 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 @@ -127,6 +132,7 @@ CONFIG_ARCH_HAVE_FPU=y CONFIG_ARCH_HAVE_DPFPU=y CONFIG_ARCH_FPU=y CONFIG_ARCH_DPFPU=y +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -142,6 +148,7 @@ CONFIG_ARMV7M_HAVE_ITCM=y CONFIG_ARMV7M_HAVE_DTCM=y # CONFIG_ARMV7M_ITCM is not set # CONFIG_ARMV7M_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 @@ -258,6 +265,13 @@ CONFIG_SAMV7_USART0=y # CONFIG_SAMV7_USART2 is not set # CONFIG_SAMV7_WDT is not set # CONFIG_SAMV7_RSWDT is not set +# CONFIG_SAMV7_JTAG_DISABLE is not set +CONFIG_SAMV7_JTAG_FULL_ENABLE=y +# CONFIG_SAMV7_JTAG_FULL_SW_ENABLE is not set +# CONFIG_SAMV7_JTAG_SW_ENABLE is not set +# CONFIG_SAMV7_ERASE_DISABLE is not set +CONFIG_SAMV7_ERASE_ENABLE=y +# CONFIG_SAMV7_SYSTEMRESET is not set CONFIG_SAMV7_GPIO_IRQ=y CONFIG_SAMV7_GPIOA_IRQ=y CONFIG_SAMV7_GPIOB_IRQ=y @@ -514,6 +528,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -540,10 +556,14 @@ CONFIG_MXT_THRESHY=8 # CONFIG_DJOYSTICK is not set # CONFIG_AJOYSTICK is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set # CONFIG_LCD_NOGETRUN is not set @@ -572,11 +592,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set - -# -# Alphanumeric/Segment LCD Devices -# -# CONFIG_LCD_LCD1602 is not set +# CONFIG_SLCD is not set # # LED Support @@ -584,6 +600,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -628,12 +645,15 @@ CONFIG_MTD_AT25=y CONFIG_AT25_SPIMODE=0 CONFIG_AT25_SPIFREQUENCY=20000000 # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP 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 @@ -644,6 +664,8 @@ CONFIG_AT25_SPIFREQUENCY=20000000 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -667,10 +689,6 @@ CONFIG_USART0_SERIALDRIVER=y # 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 @@ -697,15 +715,18 @@ CONFIG_USART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -759,12 +780,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_MTD is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -773,6 +788,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 @@ -917,12 +933,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -970,10 +989,10 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -983,7 +1002,6 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" 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 @@ -995,12 +1013,13 @@ CONFIG_EXAMPLES_NXLINES_LINEWIDTH=16 CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=16 CONFIG_EXAMPLES_NXLINES_BPP=16 # CONFIG_EXAMPLES_NXLINES_EXTERNINIT is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1008,8 +1027,8 @@ CONFIG_EXAMPLES_NXLINES_BPP=16 # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1019,14 +1038,15 @@ CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0 CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0" # CONFIG_EXAMPLES_TOUCHSCREEN_MOUSE is not set CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y -# 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -1046,8 +1066,8 @@ CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1058,6 +1078,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 @@ -1172,12 +1193,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=0 CONFIG_I2CTOOL_MAXBUS=0 @@ -1185,7 +1206,7 @@ CONFIG_I2CTOOL_MINADDR=0x03 CONFIG_I2CTOOL_MAXADDR=0x77 CONFIG_I2CTOOL_MAXREGADDR=0xff CONFIG_I2CTOOL_DEFFREQ=400000 -# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1193,6 +1214,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/samv71-xult/netnsh/defconfig b/configs/samv71-xult/netnsh/defconfig index ccc9adb0d800c8af7af6184ae5816c60226b5038..90595673e0175f1aab30a96bed05601be2605bd5 100644 --- a/configs/samv71-xult/netnsh/defconfig +++ b/configs/samv71-xult/netnsh/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -265,6 +266,13 @@ CONFIG_SAMV7_UART3=y # CONFIG_SAMV7_USART2 is not set # CONFIG_SAMV7_WDT is not set # CONFIG_SAMV7_RSWDT is not set +# CONFIG_SAMV7_JTAG_DISABLE is not set +CONFIG_SAMV7_JTAG_FULL_ENABLE=y +# CONFIG_SAMV7_JTAG_FULL_SW_ENABLE is not set +# CONFIG_SAMV7_JTAG_SW_ENABLE is not set +# CONFIG_SAMV7_ERASE_DISABLE is not set +CONFIG_SAMV7_ERASE_ENABLE=y +# CONFIG_SAMV7_SYSTEMRESET is not set CONFIG_SAMV7_GPIO_IRQ=y CONFIG_SAMV7_GPIOA_IRQ=y CONFIG_SAMV7_GPIOB_IRQ=y @@ -537,6 +545,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -552,7 +562,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -560,6 +575,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -604,12 +620,15 @@ CONFIG_MTD_AT25=y CONFIG_AT25_SPIMODE=0 CONFIG_AT25_SPIFREQUENCY=20000000 # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP 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 @@ -663,6 +682,8 @@ CONFIG_ETH0_PHY_KSZ8061=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -686,10 +707,6 @@ CONFIG_UART3_SERIALDRIVER=y # 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 @@ -716,15 +733,18 @@ CONFIG_UART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -891,12 +911,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_MTD is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -981,6 +995,7 @@ CONFIG_NETDB_DNSSERVER_IPv4ADDR=0x0a000001 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1023,15 +1038,16 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # CONFIG_EXAMPLES_CONFIGDATA is not set # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1041,17 +1057,17 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1059,8 +1075,8 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1068,15 +1084,15 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -1096,8 +1112,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1110,20 +1126,21 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1226,6 +1243,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y CONFIG_NSH_NETINIT_THREAD=y CONFIG_NSH_NETINIT_MONITOR=y CONFIG_NSH_NETINIT_SIGNO=18 @@ -1273,12 +1291,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=0 CONFIG_I2CTOOL_MAXBUS=0 @@ -1286,7 +1304,8 @@ CONFIG_I2CTOOL_MINADDR=0x03 CONFIG_I2CTOOL_MAXADDR=0x77 CONFIG_I2CTOOL_MAXREGADDR=0xff CONFIG_I2CTOOL_DEFFREQ=400000 -# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_MDIO is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1294,8 +1313,7 @@ CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y # CONFIG_READLINE_TABCOMPLETION is not set # CONFIG_READLINE_CMD_HISTORY is not set -# CONFIG_SYSTEM_MDIO is not set # CONFIG_SYSTEM_SUDOKU is not set -# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/samv71-xult/nsh/defconfig b/configs/samv71-xult/nsh/defconfig index 8734da85815a77f424bc8d3e16e94b311c6219b1..03913ee6a10e549747ae5c062679c4a29f3f03d2 100644 --- a/configs/samv71-xult/nsh/defconfig +++ b/configs/samv71-xult/nsh/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -264,6 +265,13 @@ CONFIG_SAMV7_UART3=y # CONFIG_SAMV7_USART2 is not set # CONFIG_SAMV7_WDT is not set # CONFIG_SAMV7_RSWDT is not set +# CONFIG_SAMV7_JTAG_DISABLE is not set +CONFIG_SAMV7_JTAG_FULL_ENABLE=y +# CONFIG_SAMV7_JTAG_FULL_SW_ENABLE is not set +# CONFIG_SAMV7_JTAG_SW_ENABLE is not set +# CONFIG_SAMV7_ERASE_DISABLE is not set +CONFIG_SAMV7_ERASE_ENABLE=y +# CONFIG_SAMV7_SYSTEMRESET is not set CONFIG_SAMV7_GPIO_IRQ=y CONFIG_SAMV7_GPIOA_IRQ=y CONFIG_SAMV7_GPIOB_IRQ=y @@ -521,6 +529,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -536,7 +546,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -544,6 +559,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -588,12 +604,15 @@ CONFIG_MTD_AT25=y CONFIG_AT25_SPIMODE=0 CONFIG_AT25_SPIFREQUENCY=20000000 # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP 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 @@ -604,6 +623,8 @@ CONFIG_AT25_SPIFREQUENCY=20000000 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -627,10 +648,6 @@ CONFIG_UART3_SERIALDRIVER=y # 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 @@ -657,15 +674,18 @@ CONFIG_UART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -719,12 +739,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_MTD is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -800,6 +814,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -847,10 +862,10 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -859,17 +874,17 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -877,21 +892,22 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -911,8 +927,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -923,6 +939,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 @@ -1037,12 +1054,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=0 CONFIG_I2CTOOL_MAXBUS=0 @@ -1050,7 +1067,7 @@ CONFIG_I2CTOOL_MINADDR=0x03 CONFIG_I2CTOOL_MAXADDR=0x77 CONFIG_I2CTOOL_MAXREGADDR=0xff CONFIG_I2CTOOL_DEFFREQ=400000 -# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set CONFIG_SYSTEM_RAMTEST=y CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1058,6 +1075,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/samv71-xult/nxwm/defconfig b/configs/samv71-xult/nxwm/defconfig index 7bba67ff6e2c3068000bfcc0196b337f11fdf110..c6e14be293ab344a9362878e3db5ffe80e0ea6d4 100644 --- a/configs/samv71-xult/nxwm/defconfig +++ b/configs/samv71-xult/nxwm/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -264,6 +265,13 @@ CONFIG_SAMV7_USART0=y # CONFIG_SAMV7_USART2 is not set # CONFIG_SAMV7_WDT is not set # CONFIG_SAMV7_RSWDT is not set +# CONFIG_SAMV7_JTAG_DISABLE is not set +CONFIG_SAMV7_JTAG_FULL_ENABLE=y +# CONFIG_SAMV7_JTAG_FULL_SW_ENABLE is not set +# CONFIG_SAMV7_JTAG_SW_ENABLE is not set +# CONFIG_SAMV7_ERASE_DISABLE is not set +CONFIG_SAMV7_ERASE_ENABLE=y +# CONFIG_SAMV7_SYSTEMRESET is not set CONFIG_SAMV7_GPIO_IRQ=y CONFIG_SAMV7_GPIOA_IRQ=y CONFIG_SAMV7_GPIOB_IRQ=y @@ -523,6 +531,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -549,10 +559,14 @@ CONFIG_MXT_THRESHY=8 # CONFIG_DJOYSTICK is not set # CONFIG_AJOYSTICK is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set CONFIG_LCD_NOGETRUN=y @@ -581,11 +595,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set - -# -# Alphanumeric/Segment LCD Devices -# -# CONFIG_LCD_LCD1602 is not set +# CONFIG_SLCD is not set # # LED Support @@ -593,6 +603,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -637,12 +648,15 @@ CONFIG_MTD_AT25=y CONFIG_AT25_SPIMODE=0 CONFIG_AT25_SPIFREQUENCY=20000000 # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP 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 @@ -653,6 +667,8 @@ CONFIG_AT25_SPIFREQUENCY=20000000 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -676,10 +692,6 @@ CONFIG_USART0_SERIALDRIVER=y # 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 @@ -706,15 +718,18 @@ CONFIG_USART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -759,12 +774,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -773,6 +782,7 @@ CONFIG_NX_LCDDRIVER=y CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x95fa CONFIG_NX_WRITEONLY=y +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -946,6 +956,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -990,10 +1001,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -1003,17 +1014,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1021,21 +1032,22 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -1055,8 +1067,8 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1067,6 +1079,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -1191,6 +1204,7 @@ CONFIG_NXWIDGETS_LISTENERSTACK=2048 # NXWidget Configuration # CONFIG_NXWIDGETS_BPP=16 +# CONFIG_NXWIDGETS_GREYSCALE is not set CONFIG_NXWIDGETS_SIZEOFCHAR=1 # @@ -1359,12 +1373,12 @@ CONFIG_NXWM_HEXCALCULATOR_FONTID=5 # # 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_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=0 CONFIG_I2CTOOL_MAXBUS=0 @@ -1372,7 +1386,7 @@ CONFIG_I2CTOOL_MINADDR=0x03 CONFIG_I2CTOOL_MAXADDR=0x77 CONFIG_I2CTOOL_MAXREGADDR=0xff CONFIG_I2CTOOL_DEFFREQ=400000 -# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1380,6 +1394,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/samv71-xult/src/sam_at24config.c b/configs/samv71-xult/src/sam_at24config.c index 7191454e47288bcd0e3844d09f1f7538960f9624..4a324ac07bee9953a38f820672df3ce942e3a41b 100644 --- a/configs/samv71-xult/src/sam_at24config.c +++ b/configs/samv71-xult/src/sam_at24config.c @@ -75,7 +75,7 @@ int sam_at24config(void) i2c = sam_i2cbus_initialize(0); if (!i2c) { - fdbg("ERROR: Failed to initialize TWI0\n"); + ferr("ERROR: Failed to initialize TWI0\n"); return -ENODEV; } @@ -84,7 +84,7 @@ int sam_at24config(void) at24 = at24c_initialize(i2c); if (!at24) { - fdbg("ERROR: Failed to initialize the AT24 driver\n"); + ferr("ERROR: Failed to initialize the AT24 driver\n"); (void)sam_i2cbus_uninitialize(i2c); return -ENODEV; } @@ -94,7 +94,7 @@ int sam_at24config(void) ret = at24->ioctl(at24, MTDIOC_EXTENDED, 0); if (ret < 0) { - fdbg("ERROR: AT24 ioctl(MTDIOC_EXTENDED) failed: %d\n", ret); + ferr("ERROR: AT24 ioctl(MTDIOC_EXTENDED) failed: %d\n", ret); } /* Bind the instance of an MTD device to the /dev/config device. */ @@ -102,7 +102,7 @@ int sam_at24config(void) ret = mtdconfig_register(at24); if (ret < 0) { - fdbg("ERROR: Failed to bind AT24 driver to the MTD config device\n"); + ferr("ERROR: Failed to bind AT24 driver to the MTD config device\n"); (void)sam_i2cbus_uninitialize(i2c); } diff --git a/configs/samv71-xult/src/sam_audio_null.c b/configs/samv71-xult/src/sam_audio_null.c index 2dedb31eba353bae65a18f18fe83105481a3f808..a1edbc5019ea0ec6be2adb06ced62d90fa6752a4 100644 --- a/configs/samv71-xult/src/sam_audio_null.c +++ b/configs/samv71-xult/src/sam_audio_null.c @@ -100,7 +100,7 @@ int sam_audio_null_initialize(int minor) char devname[12]; int ret; - auddbg("minor %d\n", minor); + audinfo("minor %d\n", minor); DEBUGASSERT(minor >= 0 && minor <= 25); /* Have we already initialized? Since we never uninitialize we must prevent @@ -117,7 +117,7 @@ int sam_audio_null_initialize(int minor) nullaudio = audio_null_initialize(); if (!nullaudio) { - auddbg("Failed to get the NULL audio interface\n"); + auderr("ERROR: Failed to get the NULL audio interface\n"); ret = -ENODEV; goto errout; } @@ -130,7 +130,7 @@ int sam_audio_null_initialize(int minor) pcm = pcm_decode_initialize(nullaudio); if (!pcm) { - auddbg("ERROR: Failed create the PCM decoder\n"); + auderr("ERROR: Failed create the PCM decoder\n"); ret = -ENODEV; goto errout_with_nullaudio; } @@ -144,7 +144,7 @@ int sam_audio_null_initialize(int minor) ret = audio_register(devname, pcm); if (ret < 0) { - auddbg("ERROR: Failed to register /dev/%s device: %d\n", devname, ret); + auderr("ERROR: Failed to register /dev/%s device: %d\n", devname, ret); goto errout_with_pcm; } diff --git a/configs/samv71-xult/src/sam_autoleds.c b/configs/samv71-xult/src/sam_autoleds.c index 1009489cf16c4635c66f0dbfbd61d1f7be3af4a0..a528c1db6ef43def6c8c3f847750716857e38b66 100644 --- a/configs/samv71-xult/src/sam_autoleds.c +++ b/configs/samv71-xult/src/sam_autoleds.c @@ -93,30 +93,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/samv71-xult/src/sam_bringup.c b/configs/samv71-xult/src/sam_bringup.c index dce34997e50e93ef603996678e373042d0766e42..b6a33379722791e64d595e8a3b60548e2a0aa63d 100644 --- a/configs/samv71-xult/src/sam_bringup.c +++ b/configs/samv71-xult/src/sam_bringup.c @@ -99,14 +99,6 @@ (((n)+CONFIG_SAMV71XULT_ROMFS_ROMDISK_SECTSIZE-1) / \ CONFIG_SAMV71XULT_ROMFS_ROMDISK_SECTSIZE) -/* Debug ********************************************************************/ - -#ifdef CONFIG_BOARD_INITIALIZE -# define SYSLOG lldbg -#else -# define SYSLOG dbg -#endif - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -128,14 +120,14 @@ static void sam_i2c_register(int bus) i2c = sam_i2cbus_initialize(bus); if (i2c == NULL) { - dbg("ERROR: Failed to get I2C%d interface\n", bus); + _err("ERROR: Failed to get I2C%d interface\n", bus); } else { ret = i2c_register(i2c, bus); if (ret < 0) { - dbg("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); + _err("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); sam_i2cbus_uninitialize(i2c); } } @@ -206,7 +198,7 @@ int sam_bringup(void) ret = userled_lower_initialize(LED_DRIVER_PATH); if (ret < 0) { - SYSLOG("ERROR: userled_lower_initialize() failed: %d\n", ret); + _err("ERROR: userled_lower_initialize() failed: %d\n", ret); } #endif @@ -216,7 +208,7 @@ int sam_bringup(void) i2c = sam_i2cbus_initialize(PCF85263_TWI_BUS); if (i2c == NULL) { - SYSLOG("ERROR: sam_i2cbus_initialize(%d) failed\n", PCF85263_TWI_BUS); + _err("ERROR: sam_i2cbus_initialize(%d) failed\n", PCF85263_TWI_BUS); } else { @@ -225,7 +217,7 @@ int sam_bringup(void) ret = pcf85263_rtc_initialize(i2c); if (ret < 0) { - SYSLOG("ERROR: pcf85263_rtc_initialize() failed: %d\n", ret); + _err("ERROR: pcf85263_rtc_initialize() failed: %d\n", ret); } else { @@ -241,7 +233,7 @@ int sam_bringup(void) i2c = sam_i2cbus_initialize(DSXXXX_TWI_BUS); if (i2c == NULL) { - SYSLOG("ERROR: sam_i2cbus_initialize(%d) failed\n", DSXXXX_TWI_BUS); + _err("ERROR: sam_i2cbus_initialize(%d) failed\n", DSXXXX_TWI_BUS); } else { @@ -250,7 +242,7 @@ int sam_bringup(void) ret = dsxxxx_rtc_initialize(i2c); if (ret < 0) { - SYSLOG("ERROR: dsxxxx_rtc_initialize() failed: %d\n", ret); + _err("ERROR: dsxxxx_rtc_initialize() failed: %d\n", ret); } else { @@ -269,7 +261,7 @@ int sam_bringup(void) ret = sam_emac0_setmac(); if (ret < 0) { - SYSLOG("ERROR: sam_emac0_setmac() failed: %d\n", ret); + _err("ERROR: sam_emac0_setmac() failed: %d\n", ret); } #endif @@ -279,8 +271,8 @@ int sam_bringup(void) ret = mount(NULL, SAMV71_PROCFS_MOUNTPOINT, "procfs", 0, NULL); if (ret < 0) { - SYSLOG("ERROR: Failed to mount procfs at %s: %d\n", - SAMV71_PROCFS_MOUNTPOINT, ret); + _err("ERROR: Failed to mount procfs at %s: %d\n", + SAMV71_PROCFS_MOUNTPOINT, ret); } #endif @@ -292,7 +284,7 @@ int sam_bringup(void) ret = sam_at24config(); if (ret < 0) { - SYSLOG("ERROR: sam_at24config() failed: %d\n", ret); + _err("ERROR: sam_at24config() failed: %d\n", ret); } #endif @@ -302,8 +294,8 @@ int sam_bringup(void) ret = sam_hsmci_initialize(HSMCI0_SLOTNO, HSMCI0_MINOR); if (ret < 0) { - SYSLOG("ERROR: sam_hsmci_initialize(%d,%d) failed: %d\n", - HSMCI0_SLOTNO, HSMCI0_MINOR, ret); + _err("ERROR: sam_hsmci_initialize(%d,%d) failed: %d\n", + HSMCI0_SLOTNO, HSMCI0_MINOR, ret); } #ifdef CONFIG_SAMV71XULT_HSMCI0_MOUNT @@ -319,8 +311,8 @@ int sam_bringup(void) if (ret < 0) { - SYSLOG("ERROR: Failed to mount %s: %d\n", - CONFIG_SAMV71XULT_HSMCI0_MOUNT_MOUNTPOINT, errno); + _err("ERROR: Failed to mount %s: %d\n", + CONFIG_SAMV71XULT_HSMCI0_MOUNT_MOUNTPOINT, errno); } } @@ -341,7 +333,7 @@ int sam_bringup(void) CONFIG_SAMV71XULT_ROMFS_ROMDISK_SECTSIZE); if (ret < 0) { - SYSLOG("ERROR: romdisk_register failed: %d\n", -ret); + _err("ERROR: romdisk_register failed: %d\n", -ret); } else { @@ -352,9 +344,9 @@ int sam_bringup(void) "romfs", MS_RDONLY, NULL); if (ret < 0) { - SYSLOG("ERROR: mount(%s,%s,romfs) failed: %d\n", - CONFIG_SAMV71XULT_ROMFS_ROMDISK_DEVNAME, - CONFIG_SAMV71XULT_ROMFS_MOUNT_MOUNTPOINT, errno); + _err("ERROR: mount(%s,%s,romfs) failed: %d\n", + CONFIG_SAMV71XULT_ROMFS_ROMDISK_DEVNAME, + CONFIG_SAMV71XULT_ROMFS_MOUNT_MOUNTPOINT, errno); } } #endif @@ -365,7 +357,7 @@ int sam_bringup(void) qspi = sam_qspi_initialize(0); if (!qspi) { - SYSLOG("ERROR: sam_qspi_initialize failed\n"); + _err("ERROR: sam_qspi_initialize failed\n"); } else { @@ -376,7 +368,7 @@ int sam_bringup(void) mtd = s25fl1_initialize(qspi, true); if (!mtd) { - SYSLOG("ERROR: s25fl1_initialize failed\n"); + _err("ERROR: s25fl1_initialize failed\n"); } #ifdef HAVE_S25FL1_SMARTFS @@ -385,7 +377,7 @@ int sam_bringup(void) ret = smart_initialize(S25FL1_SMART_MINOR, mtd, NULL); if (ret != OK) { - SYSLOG("ERROR: Failed to initialize SmartFS: %d\n", ret); + _err("ERROR: Failed to initialize SmartFS: %d\n", ret); } #elif defined(HAVE_S25FL1_NXFFS) @@ -394,7 +386,7 @@ int sam_bringup(void) ret = nxffs_initialize(mtd); if (ret < 0) { - SYSLOG("ERROR: NXFFS initialization failed: %d\n", ret); + _err("ERROR: NXFFS initialization failed: %d\n", ret); } /* Mount the file system at /mnt/s25fl1 */ @@ -402,7 +394,7 @@ int sam_bringup(void) ret = mount(NULL, "/mnt/s25fl1", "nxffs", 0, NULL); if (ret < 0) { - SYSLOG("ERROR: Failed to mount the NXFFS volume: %d\n", errno); + _err("ERROR: Failed to mount the NXFFS volume: %d\n", errno); return ret; } @@ -412,7 +404,7 @@ int sam_bringup(void) ret = ftl_initialize(S25FL1_MTD_MINOR, mtd); if (ret < 0) { - SYSLOG("ERROR: Failed to initialize the FTL layer: %d\n", ret); + _err("ERROR: Failed to initialize the FTL layer: %d\n", ret); return ret; } @@ -426,7 +418,7 @@ int sam_bringup(void) ret = bchdev_register(blockdev, chardev, false); if (ret < 0) { - SYSLOG("ERROR: bchdev_register %s failed: %d\n", chardev, ret); + _err("ERROR: bchdev_register %s failed: %d\n", chardev, ret); return ret; } #endif @@ -443,7 +435,7 @@ int sam_bringup(void) mtd = progmem_initialize(); if (!mtd) { - SYSLOG("ERROR: progmem_initialize failed\n"); + _err("ERROR: progmem_initialize failed\n"); } /* Use the FTL layer to wrap the MTD driver as a block driver */ @@ -451,7 +443,7 @@ int sam_bringup(void) ret = ftl_initialize(PROGMEM_MTD_MINOR, mtd); if (ret < 0) { - SYSLOG("ERROR: Failed to initialize the FTL layer: %d\n", ret); + _err("ERROR: Failed to initialize the FTL layer: %d\n", ret); return ret; } @@ -465,7 +457,7 @@ int sam_bringup(void) ret = bchdev_register(blockdev, chardev, false); if (ret < 0) { - SYSLOG("ERROR: bchdev_register %s failed: %d\n", chardev, ret); + _err("ERROR: bchdev_register %s failed: %d\n", chardev, ret); return ret; } #endif @@ -478,7 +470,7 @@ int sam_bringup(void) ret = sam_usbhost_initialize(); if (ret != OK) { - SYSLOG("ERROR: Failed to initialize USB host: %d\n", ret); + _err("ERROR: Failed to initialize USB host: %d\n", ret); } #endif @@ -488,7 +480,7 @@ int sam_bringup(void) ret = usbmonitor_start(0, NULL); if (ret != OK) { - SYSLOG("ERROR: Failed to start the USB monitor: %d\n", ret); + _err("ERROR: Failed to start the USB monitor: %d\n", ret); } #endif @@ -498,7 +490,7 @@ int sam_bringup(void) ret = sam_wm8904_initialize(0); if (ret != OK) { - SYSLOG("ERROR: Failed to initialize WM8904 audio: %d\n", ret); + _err("ERROR: Failed to initialize WM8904 audio: %d\n", ret); } #endif @@ -508,18 +500,18 @@ int sam_bringup(void) ret = sam_audio_null_initialize(0); if (ret != OK) { - SYSLOG("ERROR: Failed to initialize the NULL audio device: %d\n", ret); + _err("ERROR: Failed to initialize the NULL audio device: %d\n", ret); } #endif #ifdef HAVE_ELF /* Initialize the ELF binary loader */ - SYSLOG("Initializing the ELF binary loader\n"); + _err("Initializing the ELF binary loader\n"); ret = elf_initialize(); if (ret < 0) { - SYSLOG("ERROR: Initialization of the ELF loader failed: %d\n", ret); + _err("ERROR: Initialization of the ELF loader failed: %d\n", ret); } #endif diff --git a/configs/samv71-xult/src/sam_ethernet.c b/configs/samv71-xult/src/sam_ethernet.c index e6d36ad4cfbae1eef49f25d686bac0f7a7a07dc5..2714eab3beb0fbb9fc77b72e1149fc95bc72e00e 100644 --- a/configs/samv71-xult/src/sam_ethernet.c +++ b/configs/samv71-xult/src/sam_ethernet.c @@ -42,8 +42,8 @@ /* Force verbose debug on in this file only to support unit-level testing. */ #ifdef CONFIG_NETDEV_PHY_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG_VERBOSE 1 +# undef CONFIG_DEBUG_INFO +# define CONFIG_DEBUG_INFO 1 # undef CONFIG_DEBUG_NET # define CONFIG_DEBUG_NET 1 #endif @@ -80,11 +80,13 @@ */ #ifdef CONFIG_NETDEV_PHY_DEBUG -# define phydbg dbg -# define phylldbg lldbg +# define phyerr _err +# define phywarn _warn +# define phyinfo _info #else -# define phydbg(x...) -# define phylldbg(x...) +# define phyerr(x...) +# define phywarn(x...) +# define phyinfo(x...) #endif /************************************************************************************ @@ -106,7 +108,7 @@ static xcpt_t g_emac0_handler; #ifdef CONFIG_SAMV7_GPIOA_IRQ static void sam_emac0_phy_enable(bool enable) { - phydbg("IRQ%d: enable=%d\n", IRQ_EMAC0_INT, enable); + phyinfo("IRQ%d: enable=%d\n", IRQ_EMAC0_INT, enable); if (enable) { sam_gpioirqenable(IRQ_EMAC0_INT); @@ -134,7 +136,7 @@ void weak_function sam_netinitialize(void) { /* Configure the PHY interrupt GPIO */ - phydbg("Configuring %08x\n", GPIO_EMAC0_INT); + phyinfo("Configuring %08x\n", GPIO_EMAC0_INT); sam_configgpio(GPIO_EMAC0_INT); /* Configure the PHY SIGDET input */ @@ -169,7 +171,7 @@ int sam_emac0_setmac(void) i2c = sam_i2cbus_initialize(0); if (!i2c) { - ndbg("ERROR: Failed to initialize TWI0\n"); + nerr("ERROR: Failed to initialize TWI0\n"); return -ENODEV; } @@ -178,7 +180,7 @@ int sam_emac0_setmac(void) at24 = at24c_initialize(i2c); if (!at24) { - ndbg("ERROR: Failed to initialize the AT24 driver\n"); + nerr("ERROR: Failed to initialize the AT24 driver\n"); (void)sam_i2cbus_uninitialize(i2c); return -ENODEV; } @@ -188,7 +190,7 @@ int sam_emac0_setmac(void) ret = at24->ioctl(at24, MTDIOC_EXTENDED, 1); if (ret < 0) { - ndbg("ERROR: AT24 ioctl(MTDIOC_EXTENDED) failed: %d\n", ret); + nerr("ERROR: AT24 ioctl(MTDIOC_EXTENDED) failed: %d\n", ret); (void)sam_i2cbus_uninitialize(i2c); return ret; } @@ -198,7 +200,7 @@ int sam_emac0_setmac(void) nread = at24->read(at24, AT24XX_MACADDR_OFFSET, 6, mac); if (nread < 6) { - ndbg("ERROR: AT24 read(AT24XX_MACADDR_OFFSET) failed: ld\n", (long)nread); + nerr("ERROR: AT24 read(AT24XX_MACADDR_OFFSET) failed: ld\n", (long)nread); (void)sam_i2cbus_uninitialize(i2c); return (int)nread; } @@ -208,7 +210,7 @@ int sam_emac0_setmac(void) ret = at24->ioctl(at24, MTDIOC_EXTENDED, 0); if (ret < 0) { - ndbg("ERROR: AT24 ioctl(MTDIOC_EXTENDED) failed: %d\n", ret); + nerr("ERROR: AT24 ioctl(MTDIOC_EXTENDED) failed: %d\n", ret); } /* Release the I2C instance. @@ -218,10 +220,10 @@ int sam_emac0_setmac(void) ret = sam_i2cbus_uninitialize(i2c); if (ret < 0) { - ndbg("ERROR: Failed to release the I2C interface: %d\n", ret); + nerr("ERROR: Failed to release the I2C interface: %d\n", ret); } - nvdbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); /* Now configure the EMAC driver to use this MAC address */ @@ -229,7 +231,7 @@ int sam_emac0_setmac(void) ret = sam_emac_setmacaddr(EMAC0_INTF, mac); if (ret < 0) { - ndbg("ERROR: Failed to set MAC address: %d\n", ret); + nerr("ERROR: Failed to set MAC address: %d\n", ret); } return ret; @@ -313,12 +315,13 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) DEBUGASSERT(intf); - nvdbg("%s: handler=%p\n", intf, handler); - phydbg("EMAC0: devname=%s\n", SAMV7_EMAC0_DEVNAME); + ninfo("%s: handler=%p\n", intf, handler); + phyinfo("EMAC0: devname=%s\n", SAMV7_EMAC0_DEVNAME); if (strcmp(intf, SAMV7_EMAC0_DEVNAME) == 0) { - phydbg("Select EMAC0\n"); + phyinfo("Select EMAC0\n"); + phandler = &g_emac0_handler; pinset = GPIO_EMAC0_INT; irq = IRQ_EMAC0_INT; @@ -326,7 +329,7 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) } else { - ndbg("Unsupported interface: %s\n", intf); + nerr("ERROR: Unsupported interface: %s\n", intf); return NULL; } @@ -345,15 +348,15 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) if (handler) { - phydbg("Configure pin: %08x\n", pinset); + phyinfo("Configure pin: %08x\n", pinset); sam_gpioirq(pinset); - phydbg("Attach IRQ%d\n", irq); + phyinfo("Attach IRQ%d\n", irq); (void)irq_attach(irq, handler); } else { - phydbg("Detach IRQ%d\n", irq); + phyinfo("Detach IRQ%d\n", irq); (void)irq_detach(irq); enabler = NULL; } diff --git a/configs/samv71-xult/src/sam_hsmci.c b/configs/samv71-xult/src/sam_hsmci.c index f4e26ff016d4708a1485da96f2856dabd9901061..85e66b048d56a110e63c9758d4eff526a4afbada 100644 --- a/configs/samv71-xult/src/sam_hsmci.c +++ b/configs/samv71-xult/src/sam_hsmci.c @@ -129,7 +129,7 @@ bool sam_cardinserted_internal(struct sam_hsmci_state_s *state) /* Get the state of the PIO pin */ inserted = sam_gpioread(state->cdcfg); - fllvdbg("Slot %d inserted: %s\n", state->slotno, inserted ? "NO" : "YES"); + finfo("Slot %d inserted: %s\n", state->slotno, inserted ? "NO" : "YES"); return !inserted; } @@ -226,7 +226,7 @@ int sam_hsmci_initialize(int slotno, int minor) state = sam_hsmci_state(slotno); if (!state) { - fdbg("ERROR: No state for slotno %d\n", slotno); + ferr("ERROR: No state for slotno %d\n", slotno); return -EINVAL; } @@ -247,7 +247,7 @@ int sam_hsmci_initialize(int slotno, int minor) state->hsmci = sdio_initialize(slotno); if (!state->hsmci) { - fdbg("ERROR: Failed to initialize SDIO slot %d\n", slotno); + ferr("ERROR: Failed to initialize SDIO slot %d\n", slotno); return -ENODEV; } @@ -256,7 +256,7 @@ int sam_hsmci_initialize(int slotno, int minor) ret = mmcsd_slotinitialize(minor, state->hsmci); if (ret != OK) { - fdbg("ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); + ferr("ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); return ret; } @@ -293,7 +293,7 @@ bool sam_cardinserted(int slotno) state = sam_hsmci_state(slotno); if (!state) { - fdbg("ERROR: No state for slotno %d\n", slotno); + ferr("ERROR: No state for slotno %d\n", slotno); return false; } diff --git a/configs/samv71-xult/src/sam_ili9488.c b/configs/samv71-xult/src/sam_ili9488.c index 61742b3fd634e5925f476c8bf219e508a07b6378..313dcac4192937470602db1b44102816e272396f 100644 --- a/configs/samv71-xult/src/sam_ili9488.c +++ b/configs/samv71-xult/src/sam_ili9488.c @@ -203,21 +203,6 @@ # define CONFIG_SAMV71XULT_LCD_BGCOLOR 0 #endif -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must - * also be enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -# undef CONFIG_LCD_REGDEBUG -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif - /* Display/Color Properties **************************************************/ /* Display Resolution */ @@ -300,14 +285,6 @@ /* Debug *********************************************************************/ -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - #ifdef CONFIG_DEBUG_DMA # define SAMPLENDX_BEFORE_SETUP 0 # define SAMPLENDX_AFTER_SETUP 1 @@ -548,7 +525,7 @@ static int sam_sendcmd(FAR struct sam_dev_s *priv, uint16_t cmd) ret = sam_lcd_txtransfer(priv, &cmd, sizeof(uint16_t)); if (ret < 0) { - lcddbg("ERROR: Failed to send command %02x: %d\n", cmd, ret); + lcderr("ERROR: Failed to send command %02x: %d\n", cmd, ret); } /* Make sure that the CMD/DATA GPIO is reset for commands. I don't understand @@ -592,7 +569,7 @@ static int sam_lcd_put(FAR struct sam_dev_s *priv, uint16_t cmd, ret = sam_lcd_txtransfer(priv, buffer, buflen); if (ret < 0) { - lcddbg("ERROR: Failed to send command %02x data: %d\n", cmd, ret); + lcderr("ERROR: Failed to send command %02x data: %d\n", cmd, ret); } } @@ -674,7 +651,7 @@ static int sam_setwindow(FAR struct sam_dev_s *priv, sam_color_t row, uint16_t buffer[4]; int ret; - lcdvdbg("row=%d col=%d width=%d height=%d\n", row, col, width, height); + lcdinfo("row=%d col=%d width=%d height=%d\n", row, col, width, height); /* Set Column Address Position */ @@ -770,7 +747,7 @@ static void sam_disable_backlight(void) static int sam_set_backlight(unsigned int power) { - lcdvdbg("power=%d\n", power); + lcdinfo("power=%d\n", power); /* PWM support is not yet available. Backlight is currently just * configured as a GPIO output. @@ -803,7 +780,7 @@ static int sam_poweroff(FAR struct sam_dev_s *priv) { int ret; - lcdvdbg("OFF\n"); + lcdinfo("OFF\n"); /* Turn the display off */ @@ -874,7 +851,7 @@ static void sam_lcd_dumpone(struct sam_dev_s *priv, int index, } else { - fdbg("%s: Not collected\n", msg); + finfo("%s: Not collected\n", msg); } } #endif @@ -994,7 +971,7 @@ static int sam_lcd_dmawait(FAR struct sam_dev_s *priv, uint32_t timeout) 1, (uint32_t)priv); if (ret < 0) { - lcddbg("ERROR: wd_start failed: %d\n", errno); + lcderr("ERROR: wd_start failed: %d\n", errno); } /* Loop until the event (or the timeout occurs). */ @@ -1152,7 +1129,7 @@ static int sam_putrun(fb_coord_t row, fb_coord_t col, /* Buffer must be provided and aligned to a 16-bit address boundary */ - lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0); /* Determine the refresh window area */ @@ -1160,7 +1137,7 @@ static int sam_putrun(fb_coord_t row, fb_coord_t col, ret = sam_setwindow(priv, row, col, npixels, 1); if (ret < 0) { - lcddbg("ERROR: sam_setwindow failed: %d\n", ret); + lcderr("ERROR: sam_setwindow failed: %d\n", ret); return ret; } @@ -1193,7 +1170,7 @@ static int sam_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, /* Buffer must be provided and aligned to a 16-bit address boundary */ - lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0); /* Determine the refresh window area */ @@ -1201,7 +1178,7 @@ static int sam_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, ret = sam_setwindow(priv, row, col, npixels, 1); if (ret < 0) { - lcddbg("ERROR: sam_setwindow failed: %d\n", ret); + lcderr("ERROR: sam_setwindow failed: %d\n", ret); return ret; } @@ -1223,7 +1200,7 @@ static int sam_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); - lcdvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n", + lcdinfo("fmt: %d xres: %d yres: %d nplanes: %d\n", g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes); @@ -1243,7 +1220,7 @@ static int sam_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, FAR struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(dev && pinfo && planeno == 0); - lcdvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); + lcdinfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); return OK; } @@ -1262,7 +1239,7 @@ static int sam_getpower(struct lcd_dev_s *dev) { FAR struct sam_dev_s *priv = (FAR struct sam_dev_s *)dev; - lcdvdbg("power: %d\n", 0); + lcdinfo("power: %d\n", 0); return priv->power; } @@ -1281,7 +1258,7 @@ static int sam_setpower(struct lcd_dev_s *dev, int power) FAR struct sam_dev_s *priv = (FAR struct sam_dev_s *)dev; int ret; - lcdvdbg("power: %d\n", power); + lcdinfo("power: %d\n", power); DEBUGASSERT((unsigned)power <= CONFIG_LCD_MAXPOWER); /* Set new power level */ @@ -1340,7 +1317,7 @@ static int sam_setpower(struct lcd_dev_s *dev, int power) static int sam_getcontrast(struct lcd_dev_s *dev) { - lcdvdbg("Not implemented\n"); + lcdinfo("Not implemented\n"); return -ENOSYS; } @@ -1354,7 +1331,7 @@ static int sam_getcontrast(struct lcd_dev_s *dev) static int sam_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) { - lcdvdbg("contrast: %d\n", contrast); + lcdinfo("contrast: %d\n", contrast); return -ENOSYS; } @@ -1480,11 +1457,11 @@ static inline int sam_lcd_initialize(void) } id = ((uint16_t)buffer[2] << 8) | ((uint16_t)buffer[3] & 0xff); - lcdvdbg("ID: %04x\n", id); + lcdinfo("ID: %04x\n", id); if (id != ILI9488_DEVICE_CODE) { - lcddbg("ERROR: Unsupported LCD ID: %04x (vs. %04x)\n", + lcderr("ERROR: Unsupported LCD ID: %04x (vs. %04x)\n", id, ILI9488_DEVICE_CODE); return -ENODEV; } @@ -1556,7 +1533,7 @@ int board_lcd_initialize(void) FAR struct sam_dev_s *priv = &g_lcddev; int ret; - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); /* Configure all LCD pins pins (backlight is initially off) */ @@ -1575,7 +1552,7 @@ int board_lcd_initialize(void) priv->dmach = sam_dmachannel(0, DMA_FLAGS); if (!priv->dmach) { - lcddbg("ERROR: Failed to allocate a DMA channel\n"); + lcderr("ERROR: Failed to allocate a DMA channel\n"); ret = -EAGAIN; goto errout_with_waitsem; } @@ -1585,7 +1562,7 @@ int board_lcd_initialize(void) priv->dmadog = wd_create(); if (!priv->dmadog) { - lcddbg("ERROR: Failed to allocate a timer\n"); + lcderr("ERROR: Failed to allocate a timer\n"); ret = -EAGAIN; goto errout_with_dmach; } @@ -1596,7 +1573,7 @@ int board_lcd_initialize(void) ret = sam_lcd_initialize(); if (ret < 0) { - lcddbg("ERROR: sam_lcd_initialize failed: %d\n", ret); + lcderr("ERROR: sam_lcd_initialize failed: %d\n", ret); goto errout_with_dmadog; } @@ -1609,7 +1586,7 @@ int board_lcd_initialize(void) ret = sam_poweroff(priv); if (ret < 0) { - lcddbg("ERROR: sam_poweroff failed: %d\n", ret); + lcderr("ERROR: sam_poweroff failed: %d\n", ret); goto errout_with_dmadog; } @@ -1705,7 +1682,7 @@ void sam_lcdclear(uint16_t color) ret = sam_setwindow(priv, 0, 0, SAM_XRES, SAM_YRES); if (ret < 0) { - lcddbg("ERROR: sam_setwindow failed: %d\n", ret); + lcderr("ERROR: sam_setwindow failed: %d\n", ret); return; } @@ -1714,7 +1691,7 @@ void sam_lcdclear(uint16_t color) ret = sam_putrun(row, 0, (FAR const uint8_t *)g_runbuffer, SAM_XRES); if (ret < 0) { - lcddbg("ERROR: sam_putrun failed on row %d: %d\n", row, ret); + lcderr("ERROR: sam_putrun failed on row %d: %d\n", row, ret); return; } } diff --git a/configs/samv71-xult/src/sam_maxtouch.c b/configs/samv71-xult/src/sam_maxtouch.c index e9512e98d31292fb9fc6389856bc323991ab09c9..7bce968fcd0bdcb3dabc6cbc142d8a8f4fe7b28a 100644 --- a/configs/samv71-xult/src/sam_maxtouch.c +++ b/configs/samv71-xult/src/sam_maxtouch.c @@ -162,13 +162,13 @@ static int mxt_attach(FAR const struct mxt_lower_s *lower, mxt_handler_t isr, * new handler will called via mxt_interrupt() when the interrupt occurs. */ - ivdbg("Attaching %p\n", isr); + iinfo("Attaching %p\n", isr); g_mxtinfo.handler = isr; g_mxtinfo.arg = arg; } else { - ivdbg("Detaching %p\n", g_mxtinfo.handler); + iinfo("Detaching %p\n", g_mxtinfo.handler); mxt_enable(lower, false); g_mxtinfo.handler = NULL; g_mxtinfo.arg = NULL; @@ -241,7 +241,7 @@ int board_tsc_setup(int minor) static bool initialized = false; int ret; - idbg("minor %d\n", minor); + iinfo("minor %d\n", minor); DEBUGASSERT(minor == 0); /* Have we already initialized? Since we never uninitialize we must prevent @@ -261,7 +261,7 @@ int board_tsc_setup(int minor) i2c = sam_i2cbus_initialize(MXT_TWI_BUS); if (!i2c) { - idbg("Failed to initialize I2C%d\n", MXT_TWI_BUS); + ierr("ERROR: Failed to initialize I2C%d\n", MXT_TWI_BUS); return -ENODEV; } @@ -275,7 +275,7 @@ int board_tsc_setup(int minor) ret = mxt_register(i2c, &g_mxtinfo.lower, CONFIG_SAMV71XULT_MXT_DEVMINOR); if (ret < 0) { - idbg("ERROR: Failed to register touchscreen device\n"); + ierr("ERROR: Failed to register touchscreen device\n"); irq_detach(IRQ_MXT_CHG); /* sam_i2cbus_uninitialize(i2c); */ return -ENODEV; diff --git a/configs/samv71-xult/src/sam_mcan.c b/configs/samv71-xult/src/sam_mcan.c index dd4e8e7c3a609257ea8373d8a97619681f9840af..e692eb401338a20f7b5a63f4823598da34f4a9bc 100644 --- a/configs/samv71-xult/src/sam_mcan.c +++ b/configs/samv71-xult/src/sam_mcan.c @@ -67,21 +67,6 @@ # define CAN_PORT 1 #endif -/* 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 - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -110,7 +95,7 @@ int board_can_initialize(void) can = sam_mcan_initialize(CAN_PORT); if (can == NULL) { - candbg("ERROR: Failed to get CAN interface\n"); + canerr("ERROR: Failed to get CAN interface\n"); return -ENODEV; } @@ -119,7 +104,7 @@ int board_can_initialize(void) ret = can_register("/dev/can0", can); if (ret < 0) { - candbg("ERROR: can_register failed: %d\n", ret); + canerr("ERROR: can_register failed: %d\n", ret); return ret; } diff --git a/configs/samv71-xult/src/sam_spi.c b/configs/samv71-xult/src/sam_spi.c index 03dd5ead1e33b1cfb63a41ed39e6b13add93cdce..58a4d30e24e4bc3f812762d69b462bdd5ce576b9 100644 --- a/configs/samv71-xult/src/sam_spi.c +++ b/configs/samv71-xult/src/sam_spi.c @@ -55,32 +55,6 @@ #ifdef CONFIG_SAMV7_SPI -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ diff --git a/configs/samv71-xult/src/sam_usbdev.c b/configs/samv71-xult/src/sam_usbdev.c index 1e8173790c8cad5fc7543a553154ad69f339dea7..9dec15110348db5f471b433c351e1d1f01d691a1 100644 --- a/configs/samv71-xult/src/sam_usbdev.c +++ b/configs/samv71-xult/src/sam_usbdev.c @@ -94,5 +94,5 @@ void sam_usbinitialize(void) void sam_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } diff --git a/configs/samv71-xult/src/sam_wm8904.c b/configs/samv71-xult/src/sam_wm8904.c index dff1f695194fffa6506e23cb66f726878dcad287..abb920bd0b77f1d027b8fa29c8dfbe0775289652 100644 --- a/configs/samv71-xult/src/sam_wm8904.c +++ b/configs/samv71-xult/src/sam_wm8904.c @@ -157,13 +157,13 @@ static int wm8904_attach(FAR const struct wm8904_lower_s *lower, * new handler will called via wm8904_interrupt() when the interrupt occurs. */ - audvdbg("Attaching %p\n", isr); + audinfo("Attaching %p\n", isr); g_wm8904info.handler = isr; g_wm8904info.arg = arg; } else { - audvdbg("Detaching %p\n", g_wm8904info.handler); + audinfo("Detaching %p\n", g_wm8904info.handler); (void)wm8904_enable(lower, false); g_wm8904info.handler = NULL; g_wm8904info.arg = NULL; @@ -187,13 +187,13 @@ static bool wm8904_enable(FAR const struct wm8904_lower_s *lower, bool enable) if (enable && g_wm8904info.handler) { - audvdbg("Enabling\n"); + audinfo("Enabling\n"); sam_gpioirqenable(IRQ_INT_WM8904); enabled = true; } else { - audvdbg("Disabling\n"); + audinfo("Disabling\n"); sam_gpioirqdisable(IRQ_INT_WM8904); enabled = false; } @@ -208,7 +208,7 @@ static int wm8904_interrupt(int irq, FAR void *context) { /* Just forward the interrupt to the WM8904 driver */ - audvdbg("handler %p\n", g_wm8904info.handler); + audinfo("handler %p\n", g_wm8904info.handler); if (g_wm8904info.handler) { return g_wm8904info.handler(&g_wm8904info.lower, g_wm8904info.arg); @@ -253,7 +253,7 @@ int sam_wm8904_initialize(int minor) char devname[12]; int ret; - auddbg("minor %d\n", minor); + audinfo("minor %d\n", minor); DEBUGASSERT(minor >= 0 && minor <= 25); /* Have we already initialized? Since we never uninitialize we must prevent @@ -273,7 +273,7 @@ int sam_wm8904_initialize(int minor) i2c = sam_i2cbus_initialize(WM8904_TWI_BUS); if (!i2c) { - auddbg("Failed to initialize TWI%d\n", WM8904_TWI_BUS); + auderr("ERROR: Failed to initialize TWI%d\n", WM8904_TWI_BUS); ret = -ENODEV; goto errout; } @@ -283,7 +283,7 @@ int sam_wm8904_initialize(int minor) i2s = sam_ssc_initialize(WM8904_SSC_BUS); if (!i2s) { - auddbg("Failed to initialize SSC%d\n", WM8904_SSC_BUS); + auderr("ERROR: Failed to initialize SSC%d\n", WM8904_SSC_BUS); ret = -ENODEV; goto errout_with_i2c; } @@ -314,7 +314,7 @@ int sam_wm8904_initialize(int minor) ret = irq_attach(IRQ_INT_WM8904, wm8904_interrupt); if (ret < 0) { - auddbg("ERROR: Failed to attach WM8904 interrupt: %d\n", ret); + auderr("ERROR: Failed to attach WM8904 interrupt: %d\n", ret); goto errout_with_i2s; } @@ -325,7 +325,7 @@ int sam_wm8904_initialize(int minor) wm8904 = wm8904_initialize(i2c, i2s, &g_wm8904info.lower); if (!wm8904) { - auddbg("Failed to initialize the WM8904\n"); + auderr("ERROR: Failed to initialize the WM8904\n"); ret = -ENODEV; goto errout_with_irq; } @@ -338,7 +338,7 @@ int sam_wm8904_initialize(int minor) pcm = pcm_decode_initialize(wm8904); if (!pcm) { - auddbg("ERROR: Failed create the PCM decoder\n"); + auderr("ERROR: Failed create the PCM decoder\n"); ret = -ENODEV; goto errout_with_wm8904; } @@ -355,7 +355,7 @@ int sam_wm8904_initialize(int minor) ret = audio_register(devname, pcm); if (ret < 0) { - auddbg("ERROR: Failed to register /dev/%s device: %d\n", devname, ret); + auderr("ERROR: Failed to register /dev/%s device: %d\n", devname, ret); goto errout_with_pcm; } diff --git a/configs/samv71-xult/vnc/defconfig b/configs/samv71-xult/vnc/defconfig index 8aad6db72b80801ea27b1664703eb66dcf937163..df447f54cf6d02fedfbca11bd65a47364124990d 100644 --- a/configs/samv71-xult/vnc/defconfig +++ b/configs/samv71-xult/vnc/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -264,6 +265,13 @@ CONFIG_SAMV7_UART3=y # CONFIG_SAMV7_USART2 is not set # CONFIG_SAMV7_WDT is not set # CONFIG_SAMV7_RSWDT is not set +# CONFIG_SAMV7_JTAG_DISABLE is not set +CONFIG_SAMV7_JTAG_FULL_ENABLE=y +# CONFIG_SAMV7_JTAG_FULL_SW_ENABLE is not set +# CONFIG_SAMV7_JTAG_SW_ENABLE is not set +# CONFIG_SAMV7_ERASE_DISABLE is not set +CONFIG_SAMV7_ERASE_ENABLE=y +# CONFIG_SAMV7_SYSTEMRESET is not set CONFIG_SAMV7_GPIO_IRQ=y CONFIG_SAMV7_GPIOA_IRQ=y CONFIG_SAMV7_GPIOB_IRQ=y @@ -537,6 +545,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -552,7 +562,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -560,6 +575,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -604,6 +620,7 @@ CONFIG_MTD_AT25=y CONFIG_AT25_SPIMODE=0 CONFIG_AT25_SPIFREQUENCY=20000000 # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set # CONFIG_MTD_N25QXXX is not set @@ -611,6 +628,7 @@ CONFIG_AT25_SPIFREQUENCY=20000000 # 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 @@ -665,6 +683,8 @@ CONFIG_ETH0_PHY_KSZ8061=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -688,10 +708,6 @@ CONFIG_UART3_SERIALDRIVER=y # 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 @@ -718,15 +734,18 @@ CONFIG_UART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -889,12 +908,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_MTD is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -1074,6 +1087,7 @@ CONFIG_LIBC_NETDB=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1109,10 +1123,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1122,7 +1136,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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=y @@ -1139,12 +1152,13 @@ CONFIG_EXAMPLES_NXIMAGE_YSCALE1p0=y # CONFIG_EXAMPLES_NXIMAGE_YSCALE1p5 is not set # CONFIG_EXAMPLES_NXIMAGE_YSCALE2p0 is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1152,21 +1166,22 @@ CONFIG_EXAMPLES_NXIMAGE_YSCALE1p0=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -1186,8 +1201,8 @@ CONFIG_EXAMPLES_NXIMAGE_YSCALE1p0=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1198,11 +1213,12 @@ CONFIG_EXAMPLES_NXIMAGE_YSCALE1p0=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_NETLIB=y # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 @@ -1311,6 +1327,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y CONFIG_NSH_NETINIT_THREAD=y CONFIG_NSH_NETINIT_THREAD_STACKSIZE=1568 CONFIG_NSH_NETINIT_THREAD_PRIORITY=80 @@ -1354,14 +1371,15 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_I2CTOOL is not set +# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_MDIO is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1369,8 +1387,7 @@ CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y # CONFIG_READLINE_TABCOMPLETION is not set # CONFIG_READLINE_CMD_HISTORY is not set -# CONFIG_SYSTEM_MDIO is not set # CONFIG_SYSTEM_SUDOKU is not set -# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/samv71-xult/vnxwm/defconfig b/configs/samv71-xult/vnxwm/defconfig index 6e9f662f49e5e93edec5d52d43eeaadaefccfede..f4327906b8b3ef6393df57038b2ec747918464b8 100644 --- a/configs/samv71-xult/vnxwm/defconfig +++ b/configs/samv71-xult/vnxwm/defconfig @@ -46,10 +46,11 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -264,6 +265,13 @@ CONFIG_SAMV7_UART3=y # CONFIG_SAMV7_USART2 is not set # CONFIG_SAMV7_WDT is not set # CONFIG_SAMV7_RSWDT is not set +# CONFIG_SAMV7_JTAG_DISABLE is not set +CONFIG_SAMV7_JTAG_FULL_ENABLE=y +# CONFIG_SAMV7_JTAG_FULL_SW_ENABLE is not set +# CONFIG_SAMV7_JTAG_SW_ENABLE is not set +# CONFIG_SAMV7_ERASE_DISABLE is not set +CONFIG_SAMV7_ERASE_ENABLE=y +# CONFIG_SAMV7_SYSTEMRESET is not set CONFIG_SAMV7_GPIO_IRQ=y CONFIG_SAMV7_GPIOA_IRQ=y CONFIG_SAMV7_GPIOB_IRQ=y @@ -540,6 +548,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -555,7 +565,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -563,6 +578,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -607,6 +623,7 @@ CONFIG_MTD_AT25=y CONFIG_AT25_SPIMODE=0 CONFIG_AT25_SPIFREQUENCY=20000000 # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set # CONFIG_MTD_N25QXXX is not set @@ -614,6 +631,7 @@ CONFIG_AT25_SPIFREQUENCY=20000000 # 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 @@ -668,6 +686,8 @@ CONFIG_ETH0_PHY_KSZ8061=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -691,10 +711,6 @@ CONFIG_UART3_SERIALDRIVER=y # 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 @@ -721,15 +737,18 @@ CONFIG_UART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -892,12 +911,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_MTD is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -1098,6 +1111,7 @@ CONFIG_LIBC_NETDB=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1142,10 +1156,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1155,17 +1169,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1173,21 +1187,22 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -1207,8 +1222,8 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1219,11 +1234,12 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_NETLIB=y # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 @@ -1332,6 +1348,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y CONFIG_NSH_NETINIT_THREAD=y CONFIG_NSH_NETINIT_THREAD_STACKSIZE=1568 CONFIG_NSH_NETINIT_THREAD_PRIORITY=80 @@ -1545,14 +1562,15 @@ CONFIG_NXWM_HEXCALCULATOR_FONTID=5 # # 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_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_I2CTOOL is not set +# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_MDIO is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1560,8 +1578,7 @@ CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y # CONFIG_READLINE_TABCOMPLETION is not set # CONFIG_READLINE_CMD_HISTORY is not set -# CONFIG_SYSTEM_MDIO is not set # CONFIG_SYSTEM_SUDOKU is not set -# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/shenzhou/README.txt b/configs/shenzhou/README.txt index f310f2f7b7175ca97c80b2c760d023f36f4a416d..1eeedcd252d16ca9882f5992165d79e521d47b7e 100644 --- a/configs/shenzhou/README.txt +++ b/configs/shenzhou/README.txt @@ -668,7 +668,7 @@ Shenzhou-specific Configuration Options 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 + CONFIG_STM32_CAN_REGDEBUG - If CONFIG_DEBUG_FEATURES is set, this will generate an dump of all CAN registers. Shenzhou LCD Hardware Configuration @@ -725,9 +725,9 @@ Shenzhou-specific Configuration Options CONFIG_STM32_OTGFS_SOFINTR - Enable SOF interrupts. Why would you ever want to do that? CONFIG_STM32_USBHOST_REGDEBUG - Enable very low-level register access - debug. Depends on CONFIG_DEBUG. + debug. Depends on CONFIG_DEBUG_FEATURES. CONFIG_STM32_USBHOST_PKTDUMP - Dump all incoming and outgoing USB - packets. Depends on CONFIG_DEBUG. + packets. Depends on CONFIG_DEBUG_FEATURES. Configurations ============== diff --git a/configs/shenzhou/include/board.h b/configs/shenzhou/include/board.h index c7b60a9ca3d3d5ff7c4045fbb5245bf2e7198fde..f55ca113dfb863c330e420b386ebfa5febc9f1da 100644 --- a/configs/shenzhou/include/board.h +++ b/configs/shenzhou/include/board.h @@ -100,14 +100,14 @@ #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) */ +/* APB1 timers 2-7 will be twice 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) +#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) /* MCO output driven by PLL3. From above, we already have PLL3 input frequency as: * diff --git a/configs/shenzhou/nsh/defconfig b/configs/shenzhou/nsh/defconfig index 3ae18ae27e58de92a496e06c55a1fc95dd4e0d5c..af9e9154390028b2039f170beabe795c613ef73a 100644 --- a/configs/shenzhou/nsh/defconfig +++ b/configs/shenzhou/nsh/defconfig @@ -42,10 +42,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set CONFIG_ARCH_CHIP_STM32F107VC=y # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -409,6 +412,10 @@ CONFIG_STM32_JTAG_FULL_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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -420,9 +427,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -693,6 +708,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -712,7 +729,12 @@ CONFIG_RTC=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -720,6 +742,7 @@ CONFIG_RTC=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -783,6 +806,8 @@ CONFIG_ETH0_PHY_DM9161=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -832,15 +857,18 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -994,12 +1022,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -1083,6 +1105,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1120,16 +1143,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1139,17 +1163,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1157,8 +1181,8 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1166,11 +1190,10 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # 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_WEBSERVER is not set # # File System Utilities @@ -1194,8 +1217,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1207,21 +1230,21 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1323,6 +1346,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1367,12 +1391,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1381,6 +1405,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/shenzhou/nxwm/defconfig b/configs/shenzhou/nxwm/defconfig index a59049abedd0e289bdc93511551e851fd29ed307..dd76d669aa82955ff036fa4fca239401cf64b30b 100644 --- a/configs/shenzhou/nxwm/defconfig +++ b/configs/shenzhou/nxwm/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -207,6 +209,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set CONFIG_ARCH_CHIP_STM32F107VC=y # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -417,6 +420,10 @@ CONFIG_STM32_JTAG_FULL_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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -428,9 +435,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -579,7 +594,7 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set -# CONFIG_BOARDCTL_TSCTEST is not set +CONFIG_BOARDCTL_TSCTEST=y # CONFIG_BOARDCTL_ADCTEST is not set # CONFIG_BOARDCTL_PWMTEST is not set # CONFIG_BOARDCTL_GRAPHICS is not set @@ -721,6 +736,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -739,7 +756,7 @@ CONFIG_INPUT=y # CONFIG_INPUT_TSC2007 is not set CONFIG_INPUT_ADS7843E=y # CONFIG_ADS7843E_MULTIPLE is not set -CONFIG_ADS7843E_SPIDEV=0 +CONFIG_ADS7843E_SPIDEV=3 CONFIG_ADS7843E_DEVMINOR=0 CONFIG_ADS7843E_SPIMODE=0 CONFIG_ADS7843E_FREQUENCY=100000 @@ -752,10 +769,14 @@ CONFIG_ADS7843E_THRESHY=51 # CONFIG_DJOYSTICK is not set # CONFIG_AJOYSTICK is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set CONFIG_LCD_NOGETRUN=y @@ -787,11 +808,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set - -# -# Alphanumeric/Segment LCD Devices -# -# CONFIG_LCD_LCD1602 is not set +# CONFIG_SLCD is not set # # LED Support @@ -799,6 +816,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -852,6 +870,8 @@ CONFIG_ETH0_PHY_DM9161=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -901,15 +921,18 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -1055,12 +1078,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -1250,6 +1267,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1282,15 +1300,16 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -1301,18 +1320,18 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1328,11 +1347,10 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # 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_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # @@ -1355,8 +1373,8 @@ CONFIG_HAVE_CXXINITIALIZE=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1368,21 +1386,21 @@ CONFIG_HAVE_CXXINITIALIZE=y # # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1482,6 +1500,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1649,7 +1668,7 @@ CONFIG_NXWM_TOUCHSCREEN_DEVINIT=y CONFIG_NXWM_TOUCHSCREEN_DEVNO=0 CONFIG_NXWM_TOUCHSCREEN_DEVPATH="/dev/input0" CONFIG_NXWM_TOUCHSCREEN_SIGNO=5 -CONFIG_NXWM_TOUCHSCREEN_LISTENERPRIO=100 +CONFIG_NXWM_TOUCHSCREEN_LISTENERPRIO=101 CONFIG_NXWM_TOUCHSCREEN_LISTENERSTACK=1596 # @@ -1699,12 +1718,12 @@ CONFIG_NXWM_HEXCALCULATOR_FONTID=5 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1713,6 +1732,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/shenzhou/src/stm32_adc.c b/configs/shenzhou/src/stm32_adc.c index bd54100a09b9f9d67b1dc499f3c2728aac152533..0b61b68f8e5f8570697d508139efe90ab58b8776 100644 --- a/configs/shenzhou/src/stm32_adc.c +++ b/configs/shenzhou/src/stm32_adc.c @@ -145,7 +145,7 @@ int board_adc_setup(void) adc = stm32_adcinitialize(1, g_chanlist, ADC1_NCHANNELS); if (adc == NULL) { - adbg("ERROR: Failed to get ADC interface\n"); + aerr("ERROR: Failed to get ADC interface\n"); return -ENODEV; } @@ -154,7 +154,7 @@ int board_adc_setup(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - adbg("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } diff --git a/configs/shenzhou/src/stm32_autoleds.c b/configs/shenzhou/src/stm32_autoleds.c index ebc161f643b5579258c0f5d0d04210ab377016e7..71f7b5e88861336d995500db8f464a8713dc061e 100644 --- a/configs/shenzhou/src/stm32_autoleds.c +++ b/configs/shenzhou/src/stm32_autoleds.c @@ -57,18 +57,6 @@ * 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 - /* The following definitions map the encoded LED setting to GPIO settings */ #define SHENZHOU_LED1 (1 << 0) diff --git a/configs/shenzhou/src/stm32_can.c b/configs/shenzhou/src/stm32_can.c index fa05af42fa288a65e789d68b54eba2fe9545a312..8bfe95ac09819b9347f07f1b89c7dfed1b230af3 100644 --- a/configs/shenzhou/src/stm32_can.c +++ b/configs/shenzhou/src/stm32_can.c @@ -62,25 +62,6 @@ #define CAN_PORT 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 - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -109,7 +90,7 @@ int board_can_initialize(void) can = stm32_caninitialize(CAN_PORT); if (can == NULL) { - candbg("ERROR: Failed to get CAN interface\n"); + canerr("ERROR: Failed to get CAN interface\n"); return -ENODEV; } @@ -118,7 +99,7 @@ int board_can_initialize(void) ret = can_register("/dev/can0", can); if (ret < 0) { - candbg("ERROR: can_register failed: %d\n", ret); + canerr("ERROR: can_register failed: %d\n", ret); return ret; } diff --git a/configs/shenzhou/src/stm32_ili93xx.c b/configs/shenzhou/src/stm32_ili93xx.c index c9c33c0a203021a2d45715ee5e024c25b940afab..553e847bd3b5563077a720fc60f338290181e94b 100644 --- a/configs/shenzhou/src/stm32_ili93xx.c +++ b/configs/shenzhou/src/stm32_ili93xx.c @@ -202,21 +202,6 @@ #undef CONFIG_LCD_FASTCONFIG #define CONFIG_LCD_FASTCONFIG 1 -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must - * also be enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -# undef CONFIG_LCD_REGDEBUG -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif - /* Display/Color Properties ***********************************************************/ /* Display Resolution */ @@ -368,16 +353,6 @@ #define ILI9331_ID 0x9331 #define ILI9919_ID 0x9919 -/* Debug ******************************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /************************************************************************************ * Private Type Definition ************************************************************************************/ @@ -594,18 +569,18 @@ static struct stm32_dev_s g_lcddev = #ifdef CONFIG_LCD_REGDEBUG static void stm32_lcdshow(FAR struct stm32_lower_s *priv, FAR const char *msg) { - dbg("%s:\n", msg); - dbg(" CRTL RS: %d CS: %d RD: %d WR: %d LE: %d\n", - getreg32(LCD_RS_READ), getreg32(LCD_CS_READ), getreg32(LCD_RD_READ), - getreg32(LCD_WR_READ), getreg32(LCD_LE_READ)); - dbg(" DATA CR: %08x %08x\n", getreg32(LCD_CRL), getreg32(LCD_CRH)); + _info("%s:\n", msg); + _info(" CRTL RS: %d CS: %d RD: %d WR: %d LE: %d\n", + getreg32(LCD_RS_READ), getreg32(LCD_CS_READ), getreg32(LCD_RD_READ), + getreg32(LCD_WR_READ), getreg32(LCD_LE_READ)); + _info(" DATA CR: %08x %08x\n", getreg32(LCD_CRL), getreg32(LCD_CRH)); if (priv->output) { - dbg(" OUTPUT: %08x\n", getreg32(LCD_ODR)); + _info(" OUTPUT: %08x\n", getreg32(LCD_ODR)); } else { - dbg(" INPUT: %08x\n", getreg32(LCD_IDR)); + _info(" INPUT: %08x\n", getreg32(LCD_IDR)); } } #endif @@ -870,7 +845,7 @@ static int stm32_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffe /* Buffer must be provided and aligned to a 16-bit address boundary */ - lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0); /* Write the run to GRAM */ @@ -979,7 +954,7 @@ static int stm32_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, /* Buffer must be provided and aligned to a 16-bit address boundary */ - lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0); /* Configure according to the LCD type. Kind of silly with only one LCD type */ @@ -1106,7 +1081,7 @@ static int stm32_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); - lcdvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n", + lcdinfo("fmt: %d xres: %d yres: %d nplanes: %d\n", g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes); memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s)); return OK; @@ -1124,7 +1099,7 @@ static int stm32_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, FAR struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(dev && pinfo && planeno == 0); - lcdvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); + lcdinfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); return OK; } @@ -1142,7 +1117,7 @@ static int stm32_getpower(struct lcd_dev_s *dev) { FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev; - lcdvdbg("power: %d\n", 0); + lcdinfo("power: %d\n", 0); return priv->power; } @@ -1180,7 +1155,7 @@ static int stm32_setpower(struct lcd_dev_s *dev, int power) { FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev; - lcdvdbg("power: %d\n", power); + lcdinfo("power: %d\n", power); DEBUGASSERT((unsigned)power <= CONFIG_LCD_MAXPOWER); /* Set new power level */ @@ -1254,7 +1229,7 @@ static int stm32_setpower(struct lcd_dev_s *dev, int power) else #endif { - gdbg("Unsupported LCD: %d\n", priv->type); + lcderr("ERROR: Unsupported LCD: %d\n", priv->type); } up_mdelay(50); @@ -1280,7 +1255,7 @@ static int stm32_setpower(struct lcd_dev_s *dev, int power) static int stm32_getcontrast(struct lcd_dev_s *dev) { - lcdvdbg("Not implemented\n"); + lcdinfo("Not implemented\n"); return -ENOSYS; } @@ -1294,7 +1269,7 @@ static int stm32_getcontrast(struct lcd_dev_s *dev) static int stm32_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) { - lcdvdbg("contrast: %d\n", contrast); + lcdinfo("contrast: %d\n", contrast); return -ENOSYS; } @@ -1780,7 +1755,7 @@ static inline int stm32_lcdinitialize(FAR struct stm32_dev_s *priv) up_mdelay(50); id = stm32_readreg(priv, LCD_REG_0); /* Read the ID register */ - lcddbg("LCD ID: %04x\n", id); + lcdinfo("LCD ID: %04x\n", id); stm32_lcdoutput(priv); up_mdelay(10); @@ -1852,11 +1827,11 @@ static inline int stm32_lcdinitialize(FAR struct stm32_dev_s *priv) else #endif { - lcddbg("Unsupported LCD type\n"); + lcderr("ERROR: Unsupported LCD type\n"); ret = -ENODEV; } - lcddbg("LCD type: %d\n", priv->type); + lcdinfo("LCD type: %d\n", priv->type); return ret; } @@ -1880,7 +1855,7 @@ int board_lcd_initialize(void) int ret; int i; - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); /* Configure GPIO pins. The initial state of priv->output is false, so * we need to configure pins for output initially. diff --git a/configs/shenzhou/src/stm32_mmcsd.c b/configs/shenzhou/src/stm32_mmcsd.c index a585e31ad390568e46ec909a51e7c50fd68ff4e3..3621c655eaaf8bb250ecc44c0f234ebea82319aa 100644 --- a/configs/shenzhou/src/stm32_mmcsd.c +++ b/configs/shenzhou/src/stm32_mmcsd.c @@ -95,31 +95,31 @@ int stm32_sdinitialize(int minor) /* Get the SPI port */ - fvdbg("Initializing SPI port %d\n", STM32_MMCSDSPIPORTNO); + finfo("Initializing SPI port %d\n", STM32_MMCSDSPIPORTNO); spi = stm32_spibus_initialize(STM32_MMCSDSPIPORTNO); if (!spi) { - fdbg("Failed to initialize SPI port %d\n", STM32_MMCSDSPIPORTNO); + ferr("ERROR: Failed to initialize SPI port %d\n", STM32_MMCSDSPIPORTNO); return -ENODEV; } - fvdbg("Successfully initialized SPI port %d\n", STM32_MMCSDSPIPORTNO); + finfo("Successfully initialized SPI port %d\n", STM32_MMCSDSPIPORTNO); /* Bind the SPI port to the slot */ - fvdbg("Binding SPI port %d to MMC/SD slot %d\n", + finfo("Binding SPI port %d to MMC/SD slot %d\n", STM32_MMCSDSPIPORTNO, STM32_MMCSDSLOTNO); ret = mmcsd_spislotinitialize(minor, STM32_MMCSDSLOTNO, spi); if (ret < 0) { - fdbg("Failed to bind SPI port %d to MMC/SD slot %d: %d\n", + ferr("ERROR: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", STM32_MMCSDSPIPORTNO, STM32_MMCSDSLOTNO, ret); return ret; } - fvdbg("Successfuly bound SPI port %d to MMC/SD slot %d\n", + finfo("Successfuly bound SPI port %d to MMC/SD slot %d\n", STM32_MMCSDSPIPORTNO, STM32_MMCSDSLOTNO); #endif return OK; diff --git a/configs/shenzhou/src/stm32_spi.c b/configs/shenzhou/src/stm32_spi.c index 48949d686a4caa6e020c6b8ea1ab8b45a60b79d1..1f6a45ed8189c6e11d565eb54bc35311e35d5de8 100644 --- a/configs/shenzhou/src/stm32_spi.c +++ b/configs/shenzhou/src/stm32_spi.c @@ -53,32 +53,6 @@ #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI3) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_SPI -#endif - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -145,7 +119,7 @@ void weak_function stm32_spidev_initialize(void) #ifdef CONFIG_STM32_SPI1 void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); /* SPI1 connects to the SD CARD and to the SPI FLASH */ @@ -181,7 +155,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI3 void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); /* SPI3 connects to TFT LCD (for touchscreen and SD) and the RF24L01 2.4G * wireless module. diff --git a/configs/shenzhou/src/stm32_ssd1289.c b/configs/shenzhou/src/stm32_ssd1289.c index bddfa1c8b0a50e8320499f47267166aea1c680e4..413a49c9e441abbe2ba13cdac0a3c50bdcfdd8c5 100644 --- a/configs/shenzhou/src/stm32_ssd1289.c +++ b/configs/shenzhou/src/stm32_ssd1289.c @@ -67,35 +67,10 @@ * Pre-processor Definitions ************************************************************************************/ /* Configuration ********************************************************************/ -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must - * also be enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -# undef CONFIG_LCD_REGDEBUG -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif #undef CONFIG_LCD_FASTCONFIG #define CONFIG_LCD_FASTCONFIG 1 -/* Shenzhou LCD Hardware Definitions ************************************************/ -/* Debug ****************************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /************************************************************************************ * Private Type Definition ************************************************************************************/ @@ -277,18 +252,18 @@ static struct stm32_lower_s g_lcdlower = #ifdef CONFIG_LCD_REGDEBUG static void stm32_lcdshow(FAR struct stm32_lower_s *priv, FAR const char *msg) { - dbg("%s:\n", msg); - dbg(" CRTL RS: %d CS: %d RD: %d WR: %d LE: %d\n", - getreg32(LCD_RS_READ), getreg32(LCD_CS_READ), getreg32(LCD_RD_READ), - getreg32(LCD_WR_READ), getreg32(LCD_LE_READ)); - dbg(" DATA CR: %08x %08x\n", getreg32(LCD_CRL), getreg32(LCD_CRH)); + _info("%s:\n", msg); + _info(" CRTL RS: %d CS: %d RD: %d WR: %d LE: %d\n", + getreg32(LCD_RS_READ), getreg32(LCD_CS_READ), getreg32(LCD_RD_READ), + getreg32(LCD_WR_READ), getreg32(LCD_LE_READ)); + _info(" DATA CR: %08x %08x\n", getreg32(LCD_CRL), getreg32(LCD_CRH)); if (priv->output) { - dbg(" OUTPUT: %08x\n", getreg32(LCD_ODR)); + _info(" OUTPUT: %08x\n", getreg32(LCD_ODR)); } else { - dbg(" INPUT: %08x\n", getreg32(LCD_IDR)); + _info(" INPUT: %08x\n", getreg32(LCD_IDR)); } } #endif @@ -548,7 +523,7 @@ int board_lcd_initialize(void) if (!priv->drvr) { - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); /* Configure GPIO pins */ @@ -563,7 +538,7 @@ int board_lcd_initialize(void) priv->drvr = ssd1289_lcdinitialize(&priv->dev); if (!priv->drvr) { - lcddbg("ERROR: ssd1289_lcdinitialize failed\n"); + lcderr("ERROR: ssd1289_lcdinitialize failed\n"); return -ENODEV; } } diff --git a/configs/shenzhou/src/stm32_touchscreen.c b/configs/shenzhou/src/stm32_touchscreen.c index abfe6ebdd7b2b459d1f724ed7ffe796a67f66a23..dec42e95ffab924c0c4d6652eed98bc51d7f3599 100644 --- a/configs/shenzhou/src/stm32_touchscreen.c +++ b/configs/shenzhou/src/stm32_touchscreen.c @@ -181,7 +181,7 @@ static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable) /* Attach and enable, or detach and disable */ - ivdbg("enable:%d\n", enable); + iinfo("enable:%d\n", enable); if (enable) { (void)stm32_gpiosetevent(GPIO_TP_INT, true, true, false, @@ -220,7 +220,7 @@ static bool tsc_pendown(FAR struct ads7843e_config_s *state) */ bool pendown = !stm32_gpioread(GPIO_TP_INT); - ivdbg("pendown:%d\n", pendown); + iinfo("pendown:%d\n", pendown); return pendown; } @@ -251,7 +251,7 @@ int board_tsc_setup(int minor) FAR struct spi_dev_s *dev; int ret; - idbg("minor %d\n", minor); + iinfo("minor %d\n", minor); DEBUGASSERT(minor == 0); /* Configure and enable the ADS7843E interrupt pin as an input. */ @@ -263,7 +263,7 @@ int board_tsc_setup(int minor) dev = stm32_spibus_initialize(CONFIG_ADS7843E_SPIDEV); if (!dev) { - idbg("Failed to initialize SPI bus %d\n", CONFIG_ADS7843E_SPIDEV); + ierr("ERROR: Failed to initialize SPI bus %d\n", CONFIG_ADS7843E_SPIDEV); return -ENODEV; } @@ -272,7 +272,7 @@ int board_tsc_setup(int minor) ret = ads7843e_register(dev, &g_tscinfo.dev, CONFIG_ADS7843E_DEVMINOR); if (ret < 0) { - idbg("Failed to initialize SPI bus %d\n", CONFIG_ADS7843E_SPIDEV); + ierr("ERROR: Failed to initialize SPI bus %d\n", CONFIG_ADS7843E_SPIDEV); /* up_spiuninitialize(dev); */ return -ENODEV; } diff --git a/configs/shenzhou/src/stm32_usb.c b/configs/shenzhou/src/stm32_usb.c index 80ed3c53dda69c69bbe5319b7b20582df93a5bca..ce32772207b94ce36410c83868d78d3e8a5ef06b 100644 --- a/configs/shenzhou/src/stm32_usb.c +++ b/configs/shenzhou/src/stm32_usb.c @@ -106,13 +106,13 @@ static int usbhost_waiter(int argc, char *argv[]) { struct usbhost_hubport_s *hport; - uvdbg("Running\n"); + uinfo("Running\n"); for (;;) { /* Wait for the device to change state */ DEBUGVERIFY(CONN_WAIT(g_usbconn, &hport)); - uvdbg("%s\n", hport->connected ? "connected" : "disconnected"); + uinfo("%s\n", hport->connected ? "connected" : "disconnected"); /* Did we just become connected? */ @@ -176,7 +176,7 @@ int stm32_usbhost_initialize(void) * that we care about: */ - uvdbg("Register class drivers\n"); + uinfo("Register class drivers\n"); #ifdef CONFIG_USBHOST_MSC /* Register the USB mass storage class class */ @@ -184,7 +184,7 @@ int stm32_usbhost_initialize(void) ret = usbhost_msc_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the mass storage class: %d\n", ret); + uerr("ERROR: Failed to register the mass storage class: %d\n", ret); } #endif @@ -194,19 +194,19 @@ int stm32_usbhost_initialize(void) ret = usbhost_cdcacm_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret); + uerr("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret); } #endif /* Then get an instance of the USB host interface */ - uvdbg("Initialize USB host\n"); + uinfo("Initialize USB host\n"); g_usbconn = stm32_otgfshost_initialize(0); if (g_usbconn) { /* Start a thread to handle device connection. */ - uvdbg("Start usbhost_waiter\n"); + uinfo("Start usbhost_waiter\n"); pid = task_create("usbhost", CONFIG_USBHOST_DEFPRIO, CONFIG_USBHOST_STACKSIZE, @@ -300,7 +300,7 @@ xcpt_t stm32_setup_overcurrent(xcpt_t handler) #ifdef CONFIG_USBDEV void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } #endif diff --git a/configs/shenzhou/src/stm32_userleds.c b/configs/shenzhou/src/stm32_userleds.c index e96fb9afda5bbe116378dc89dac9bc3e39f8da71..4beb5de5e8ade2994dc21967e1fa02c76428f268 100644 --- a/configs/shenzhou/src/stm32_userleds.c +++ b/configs/shenzhou/src/stm32_userleds.c @@ -53,22 +53,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data ****************************************************************************/ diff --git a/configs/shenzhou/src/stm32_w25.c b/configs/shenzhou/src/stm32_w25.c index fe27c8a1d7bd954a53c5d02665eafbbc83fc5b7d..68db581ce3ceb2b196582cd8353123b8563573ef 100644 --- a/configs/shenzhou/src/stm32_w25.c +++ b/configs/shenzhou/src/stm32_w25.c @@ -107,7 +107,7 @@ int stm32_w25initialize(int minor) spi = stm32_spibus_initialize(1); if (!spi) { - fdbg("ERROR: Failed to initialize SPI port 2\n"); + ferr("ERROR: Failed to initialize SPI port 2\n"); return -ENODEV; } @@ -116,7 +116,7 @@ int stm32_w25initialize(int minor) mtd = w25_initialize(spi); if (!mtd) { - fdbg("ERROR: Failed to bind SPI port 2 to the SST 25 FLASH driver\n"); + ferr("ERROR: Failed to bind SPI port 2 to the SST 25 FLASH driver\n"); return -ENODEV; } @@ -126,7 +126,7 @@ int stm32_w25initialize(int minor) ret = ftl_initialize(minor, mtd); if (ret < 0) { - fdbg("ERROR: Initialize the FTL layer\n"); + ferr("ERROR: Initialize the FTL layer\n"); return ret; } #else @@ -135,7 +135,7 @@ int stm32_w25initialize(int minor) ret = nxffs_initialize(mtd); if (ret < 0) { - fdbg("ERROR: NXFFS initialization failed: %d\n", -ret); + ferr("ERROR: NXFFS initialization failed: %d\n", -ret); return ret; } @@ -145,7 +145,7 @@ int stm32_w25initialize(int minor) ret = mount(NULL, devname, "nxffs", 0, NULL); if (ret < 0) { - fdbg("ERROR: Failed to mount the NXFFS volume: %d\n", errno); + ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno); return ret; } #endif diff --git a/configs/shenzhou/thttpd/defconfig b/configs/shenzhou/thttpd/defconfig index 89c3735931762c714520bb3b3e970e492ba3907d..a1150884ef1ab89ae80f6187bdf711ace213f4b4 100644 --- a/configs/shenzhou/thttpd/defconfig +++ b/configs/shenzhou/thttpd/defconfig @@ -42,9 +42,14 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -CONFIG_DEBUG=y -CONFIG_ARCH_HAVE_HEAPCHECK=y -# CONFIG_DEBUG_VERBOSE is not set +CONFIG_DEBUG_ALERT=y +CONFIG_DEBUG_FEATURES=y + +# +# Debug SYSLOG Output Controls +# +# CONFIG_DEBUG_ERROR is not set +# CONFIG_DEBUG_ASSERTIONS is not set # # Subsystem Debug Options @@ -60,19 +65,19 @@ CONFIG_ARCH_HAVE_HEAPCHECK=y # # OS Function Debug Options # -# CONFIG_DEBUG_HEAP is not set # CONFIG_DEBUG_IRQ is not set # # Driver Debug Options # # CONFIG_DEBUG_LEDS is not set -# CONFIG_DEBUG_ANALOG is not set # CONFIG_DEBUG_GPIO is not set # CONFIG_DEBUG_RTC is not set # CONFIG_DEBUG_SPI is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -228,6 +233,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set CONFIG_ARCH_CHIP_STM32F107VC=y # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -438,6 +444,10 @@ CONFIG_STM32_JTAG_FULL_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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -449,9 +459,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -486,7 +504,6 @@ CONFIG_STM32_PHYSR_100FD=0x8000 CONFIG_STM32_RMII=y CONFIG_STM32_RMII_MCO=y # CONFIG_STM32_RMII_EXTCLK is not set -# CONFIG_STM32_ETHMAC_REGDEBUG is not set # # USB FS Host Configuration @@ -721,6 +738,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -740,7 +759,12 @@ CONFIG_RTC=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -748,6 +772,7 @@ CONFIG_RTC=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set CONFIG_MTD=y @@ -770,6 +795,7 @@ CONFIG_MTD=y # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set # CONFIG_MTD_N25QXXX is not set @@ -837,6 +863,8 @@ CONFIG_ETH0_PHY_DM9161=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -888,15 +916,18 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -995,7 +1026,6 @@ CONFIG_NET_ARPTAB_SIZE=16 CONFIG_NET_ARP_MAXAGE=120 # CONFIG_NET_ARP_IPIN is not set # CONFIG_NET_ARP_SEND is not set -# CONFIG_NET_ARP_DUMP is not set # # Network I/O Buffer Support @@ -1051,12 +1081,6 @@ CONFIG_FS_ROMFS=y # 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 # @@ -1140,6 +1164,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1177,16 +1202,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1196,18 +1222,18 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_ROMFS is not set @@ -1216,8 +1242,8 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1229,17 +1255,17 @@ CONFIG_EXAMPLES_THTTPD_NETMASK=0xffffff00 # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UDPBLASTER is not set -# CONFIG_EXAMPLES_DISCOVER 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_XMLRPC is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -1259,8 +1285,8 @@ CONFIG_EXAMPLES_THTTPD_NETMASK=0xffffff00 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1274,10 +1300,14 @@ 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_DISCOVER 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 +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y @@ -1313,15 +1343,11 @@ CONFIG_THTTPD_IDLE_SEND_LIMIT_SEC=300 CONFIG_THTTPD_TILDE_MAP_NONE=y # CONFIG_THTTPD_GENERATE_INDICES is not set # CONFIG_THTTPD_USE_URLPATTERN is not set -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1423,6 +1449,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # CONFIG_NSH_NETINIT_DEBUG is not set @@ -1468,13 +1495,13 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1483,6 +1510,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sim/bas/defconfig b/configs/sim/bas/defconfig index a20524034a8401d4c68d18b62b98a7081af5dc96..0045828f2e902991d2ea766ed40d62932c8a2ff5 100644 --- a/configs/sim/bas/defconfig +++ b/configs/sim/bas/defconfig @@ -41,7 +41,7 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set CONFIG_DEBUG_SYMBOLS=y @@ -349,7 +349,7 @@ CONFIG_SERIAL=y # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -403,7 +403,6 @@ CONFIG_FS_PROCFS=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/sim/configdata/defconfig b/configs/sim/configdata/defconfig index 3da0ca88e8fee8d754943e72548c1487f4882bc8..1f8af42edf55000dc2978d1fbd67bdeefde87409 100644 --- a/configs/sim/configdata/defconfig +++ b/configs/sim/configdata/defconfig @@ -41,9 +41,9 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_HEAPCHECK is not set -# CONFIG_DEBUG_VERBOSE is not set +# CONFIG_DEBUG_INFO is not set # # Subsystem Debug Options @@ -370,7 +370,7 @@ CONFIG_SERIAL=y # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -420,7 +420,6 @@ CONFIG_NXFFS_TAILTHRESHOLD=8192 # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/sim/cxxtest/defconfig b/configs/sim/cxxtest/defconfig index bd146760dc61ca73c2635b1c84df2205c6dc8d3c..aceb1fc38d89cda9681519df0517f00f342f4c67 100644 --- a/configs/sim/cxxtest/defconfig +++ b/configs/sim/cxxtest/defconfig @@ -41,9 +41,9 @@ CONFIG_ARCH_FLOAT_H=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_HEAPCHECK is not set -CONFIG_DEBUG_VERBOSE=y +CONFIG_DEBUG_INFO=y # # Subsystem Debug Options @@ -361,7 +361,7 @@ CONFIG_SERIAL=y # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -402,7 +402,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/sim/mount/defconfig b/configs/sim/mount/defconfig index e95d92e04a51b34b702d2381021ed49522bb7fc0..60d8ee2f281fb883091331d1f286cf5593c01037 100644 --- a/configs/sim/mount/defconfig +++ b/configs/sim/mount/defconfig @@ -41,9 +41,9 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_HEAPCHECK is not set -CONFIG_DEBUG_VERBOSE=y +CONFIG_DEBUG_INFO=y # # Subsystem Debug Options @@ -360,7 +360,7 @@ CONFIG_SERIAL=y # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -405,7 +405,6 @@ CONFIG_FS_FAT=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/sim/mtdpart/defconfig b/configs/sim/mtdpart/defconfig index ac90d3010b64bb6f36922bac0744b19a00414cba..df0f7c19a466171e46c62e9eb0089a2975045f26 100644 --- a/configs/sim/mtdpart/defconfig +++ b/configs/sim/mtdpart/defconfig @@ -41,9 +41,9 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_HEAPCHECK is not set -# CONFIG_DEBUG_VERBOSE is not set +# CONFIG_DEBUG_INFO is not set # # Subsystem Debug Options @@ -368,7 +368,7 @@ CONFIG_SERIAL=y # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -412,7 +412,6 @@ CONFIG_FS_FAT=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/sim/mtdrwb/defconfig b/configs/sim/mtdrwb/defconfig index 18f38462f0715727f6fb4ef3383c7442e6e0923b..f7da4507c064d71d923a690d837aa24a920f1664 100644 --- a/configs/sim/mtdrwb/defconfig +++ b/configs/sim/mtdrwb/defconfig @@ -41,9 +41,9 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_HEAPCHECK is not set -# CONFIG_DEBUG_VERBOSE is not set +# CONFIG_DEBUG_INFO is not set # # Subsystem Debug Options @@ -399,7 +399,7 @@ CONFIG_SERIAL=y # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -443,7 +443,6 @@ CONFIG_FS_FAT=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/sim/nettest/defconfig b/configs/sim/nettest/defconfig index d5a3b82651922d054d4b937238daf9f0da82c507..a5124f251aafb6e06609c2da12b48fda2fd5a4e2 100644 --- a/configs/sim/nettest/defconfig +++ b/configs/sim/nettest/defconfig @@ -42,7 +42,7 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set @@ -352,7 +352,7 @@ CONFIG_SERIAL=y # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -502,7 +502,6 @@ CONFIG_FS_FAT=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/sim/nsh/defconfig b/configs/sim/nsh/defconfig index d486dc1b47123083118d8c8295464b3ce0b47e20..b0eb7f0c9fb3e9ab00a95941ed2df97e4a4a7c41 100644 --- a/configs/sim/nsh/defconfig +++ b/configs/sim/nsh/defconfig @@ -42,7 +42,7 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set CONFIG_DEBUG_SYMBOLS=y @@ -74,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 @@ -88,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 @@ -296,11 +299,17 @@ CONFIG_DEV_LOOP=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD 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 @@ -336,10 +345,6 @@ CONFIG_SERIAL=y # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set # CONFIG_OTHER_UART_SERIALDRIVER is not set - -# -# USART Configuration -# # CONFIG_MCU_SERIAL is not set # CONFIG_STANDARD_SERIAL is not set # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -358,7 +363,7 @@ CONFIG_SERIAL=y # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -392,7 +397,9 @@ 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 @@ -413,7 +420,6 @@ CONFIG_FS_PROCFS=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # @@ -434,6 +440,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -483,6 +493,8 @@ CONFIG_TIME_EXTENDED=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 @@ -525,10 +537,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 CONFIG_EXAMPLES_HELLO=y CONFIG_EXAMPLES_HELLO_PRIORITY=100 CONFIG_EXAMPLES_HELLO_STACKSIZE=8192 -# 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -537,17 +549,18 @@ CONFIG_EXAMPLES_HELLO_STACKSIZE=8192 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_NXTERM 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_PPPD 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 @@ -555,18 +568,19 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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 # CONFIG_EXAMPLES_TIFF is not set # 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -581,6 +595,11 @@ CONFIG_FSUTILS_PASSWD_KEY2=0x9abcdef0 CONFIG_FSUTILS_PASSWD_KEY3=0x12345678 CONFIG_FSUTILS_PASSWD_KEY4=0x9abcdef0 +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + # # Graphics Support # @@ -592,8 +611,8 @@ CONFIG_FSUTILS_PASSWD_KEY4=0x9abcdef0 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -604,6 +623,7 @@ CONFIG_FSUTILS_PASSWD_KEY4=0x9abcdef0 # 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 @@ -741,12 +761,12 @@ CONFIG_NSH_LOGIN_FAILCOUNT=3 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -756,7 +776,7 @@ CONFIG_READLINE_MAX_BUILTINS=64 CONFIG_READLINE_MAX_EXTCMDS=64 # CONFIG_READLINE_CMD_HISTORY is not set # 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sim/nsh2/defconfig b/configs/sim/nsh2/defconfig index 4ff288e4844be7d777c30b01d557600ce9a35ce9..bc6571c458a53c245dbb77c9b55ce5a7f28bfd9b 100644 --- a/configs/sim/nsh2/defconfig +++ b/configs/sim/nsh2/defconfig @@ -41,7 +41,7 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set CONFIG_DEBUG_SYMBOLS=y @@ -358,7 +358,7 @@ CONFIG_SERIAL=y # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -411,7 +411,6 @@ CONFIG_FS_PROCFS=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/sim/nx/defconfig b/configs/sim/nx/defconfig index 14c4f1510567bd3364c9bf0bef830802a1ec6dd0..688161175d96a925ce5223cc105682a87aadca5e 100644 --- a/configs/sim/nx/defconfig +++ b/configs/sim/nx/defconfig @@ -41,9 +41,9 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_HEAPCHECK is not set -CONFIG_DEBUG_VERBOSE=y +CONFIG_DEBUG_INFO=y # # Subsystem Debug Options @@ -364,7 +364,7 @@ CONFIG_SERIAL=y # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -398,7 +398,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/sim/nx11/defconfig b/configs/sim/nx11/defconfig index 5db318657fb468ced069bf182f0603aee19b6b14..d1987dc8aba20011d784ed70ca0e2def5e3b3ef6 100644 --- a/configs/sim/nx11/defconfig +++ b/configs/sim/nx11/defconfig @@ -41,9 +41,9 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_HEAPCHECK is not set -CONFIG_DEBUG_VERBOSE=y +CONFIG_DEBUG_INFO=y # # Subsystem Debug Options @@ -365,7 +365,7 @@ CONFIG_SERIAL=y # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -399,7 +399,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/sim/nxffs/defconfig b/configs/sim/nxffs/defconfig index 167222da6c9eee2b1cd6eb29a7301ed938b0217f..1cd792167e30bb7546c61fadfe71569d776bb41a 100644 --- a/configs/sim/nxffs/defconfig +++ b/configs/sim/nxffs/defconfig @@ -41,7 +41,7 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set CONFIG_DEBUG_SYMBOLS=y @@ -345,7 +345,7 @@ CONFIG_SERIAL=y # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -396,7 +396,6 @@ CONFIG_NXFFS_TAILTHRESHOLD=8192 # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/sim/nxlines/defconfig b/configs/sim/nxlines/defconfig index b31cb37fa47a39ac60a77d31d84e6102d17c3d91..28f3880aedb24728f983fdfe1cdd5d0705be38e5 100644 --- a/configs/sim/nxlines/defconfig +++ b/configs/sim/nxlines/defconfig @@ -45,7 +45,7 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set CONFIG_DEBUG_SYMBOLS=y @@ -356,7 +356,7 @@ CONFIG_SERIAL=y # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -409,7 +409,6 @@ CONFIG_FS_PROCFS=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/sim/nxwm/defconfig b/configs/sim/nxwm/defconfig index 1c872a8792504fe798daef104cf1e0213e507cb6..9287f229bd6b424b0584294f6b248d6b5158a063 100644 --- a/configs/sim/nxwm/defconfig +++ b/configs/sim/nxwm/defconfig @@ -41,7 +41,7 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set CONFIG_DEBUG_SYMBOLS=y @@ -355,7 +355,7 @@ CONFIG_SERIAL=y # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -408,7 +408,6 @@ CONFIG_FS_PROCFS=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/sim/ostest/defconfig b/configs/sim/ostest/defconfig index b5065b098b579d65830f4a0fa856a074b8603066..8928a46a2e7199e36d5679443f8318859319f460 100644 --- a/configs/sim/ostest/defconfig +++ b/configs/sim/ostest/defconfig @@ -42,9 +42,9 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_HEAPCHECK is not set -CONFIG_DEBUG_VERBOSE=y +CONFIG_DEBUG_INFO=y # # Subsystem Debug Options @@ -372,7 +372,7 @@ CONFIG_SERIAL=y # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -414,7 +414,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/sim/pashello/defconfig b/configs/sim/pashello/defconfig index 2fed08f743caa1aaa476684c7ad95844096d1ec1..c82757a6aa8b1a2b637d9445f8ebf13324c492df 100644 --- a/configs/sim/pashello/defconfig +++ b/configs/sim/pashello/defconfig @@ -41,7 +41,7 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set @@ -337,7 +337,7 @@ CONFIG_SERIAL=y # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -382,7 +382,6 @@ CONFIG_FS_FAT=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/sim/src/sim_bringup.c b/configs/sim/src/sim_bringup.c index c22cd8138163e893b5f11ed7965e64e833be999d..d65d99edb3b8ab078c48627c70a0ccb9e2609204 100644 --- a/configs/sim/src/sim_bringup.c +++ b/configs/sim/src/sim_bringup.c @@ -53,18 +53,6 @@ int trv_mount_world(int minor, FAR const char *mountpoint); #endif -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Debug ********************************************************************/ - -#ifdef CONFIG_BOARD_INITIALIZE -# define SYSLOG lldbg -#else -# define SYSLOG dbg -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -107,8 +95,8 @@ int sim_bringup(void) ret = mount(NULL, SIM_PROCFS_MOUNTPOINT, "procfs", 0, NULL); if (ret < 0) { - SYSLOG("ERROR: Failed to mount procfs at %s: %d\n", - SIM_PROCFS_MOUNTPOINT, ret); + _err("ERROR: Failed to mount procfs at %s: %d\n", + SIM_PROCFS_MOUNTPOINT, ret); } #endif diff --git a/configs/sim/src/sim_touchscreen.c b/configs/sim/src/sim_touchscreen.c index c6afc35528415f85e773c250adcfe442eddd090b..c81c88325e74ecb04698b62b0f35a63c0aef5351 100644 --- a/configs/sim/src/sim_touchscreen.c +++ b/configs/sim/src/sim_touchscreen.c @@ -107,30 +107,30 @@ int board_tsc_setup(int minor) * X11 window to support the mouse-driven touchscreen simulation. */ - ivdbg("Initializing framebuffer\n"); + iinfo("Initializing framebuffer\n"); ret = up_fbinitialize(0); if (ret < 0) { - idbg("up_fbinitialize failed: %d\n", -ret); + ierr("ERROR: up_fbinitialize failed: %d\n", -ret); goto errout; } dev = up_fbgetvplane(0, 0); if (!dev) { - idbg("up_fbgetvplane 0 failed\n"); + ierr("ERROR: up_fbgetvplane 0 failed\n"); ret = -ENODEV; goto errout_with_fb; } /* Then open NX */ - ivdbg("Open NX\n"); + iinfo("Open NX\n"); g_simtc.hnx = nx_open(dev); if (!g_simtc.hnx) { ret = -errno; - idbg("nx_open failed: %d\n", ret); + ierr("ERROR: nx_open failed: %d\n", ret); goto errout_with_fb; } @@ -140,20 +140,20 @@ int board_tsc_setup(int minor) ret = vnc_default_fbinitialize(0, g_simtc.hnx); if (ret < 0) { - idbg("vnc_default_fbinitialize failed: %d\n", ret); + ierr("ERROR: vnc_default_fbinitialize failed: %d\n", ret); goto errout_with_fb; } #endif /* Set the background to the configured background color */ - ivdbg("Set background color=%d\n", CONFIG_EXAMPLES_TOUCHSCREEN_BGCOLOR); + iinfo("Set background color=%d\n", CONFIG_EXAMPLES_TOUCHSCREEN_BGCOLOR); color = CONFIG_EXAMPLES_TOUCHSCREEN_BGCOLOR; ret = nx_setbgcolor(g_simtc.hnx, &color); if (ret < 0) { - idbg("nx_setbgcolor failed: %d\n", ret); + ierr("ERROR: nx_setbgcolor failed: %d\n", ret); goto errout_with_nx; } @@ -162,7 +162,7 @@ int board_tsc_setup(int minor) ret = board_tsc_setup(minor); if (ret < 0) { - idbg("board_tsc_setup failed: %d\n", ret); + ierr("ERROR: board_tsc_setup failed: %d\n", ret); goto errout_with_nx; } return OK; diff --git a/configs/sim/touchscreen/defconfig b/configs/sim/touchscreen/defconfig index 5887fafd2a97b88ecc429a59ecc03f230695319a..01012d9eed0614e499f4549f2d8244db9a73588e 100644 --- a/configs/sim/touchscreen/defconfig +++ b/configs/sim/touchscreen/defconfig @@ -41,9 +41,9 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_HEAPCHECK is not set -CONFIG_DEBUG_VERBOSE=y +CONFIG_DEBUG_INFO=y # # Subsystem Debug Options @@ -387,7 +387,7 @@ CONFIG_SERIAL=y # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -421,7 +421,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/sim/traveler/defconfig b/configs/sim/traveler/defconfig index 86e5d9cc77312ceb993a2d04b84adbfa5289ced5..4c260ef8943d56808ebe269d866876701755adf1 100644 --- a/configs/sim/traveler/defconfig +++ b/configs/sim/traveler/defconfig @@ -41,9 +41,9 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_HEAPCHECK is not set -CONFIG_DEBUG_VERBOSE=y +CONFIG_DEBUG_INFO=y # # Subsystem Debug Options @@ -379,7 +379,7 @@ CONFIG_SERIAL=y # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -420,7 +420,6 @@ CONFIG_FS_ROMFS=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/sim/udgram/defconfig b/configs/sim/udgram/defconfig index e4b3854ac5f9ea3a350482436f5a2fc25318d624..2c747306d8907d250323920eb2f6ebeaaeb2f8eb 100644 --- a/configs/sim/udgram/defconfig +++ b/configs/sim/udgram/defconfig @@ -42,7 +42,7 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set CONFIG_DEBUG_SYMBOLS=y @@ -299,7 +299,12 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -342,10 +347,6 @@ CONFIG_SERIAL=y # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set # CONFIG_OTHER_UART_SERIALDRIVER is not set - -# -# USART Configuration -# # CONFIG_MCU_SERIAL is not set # CONFIG_STANDARD_SERIAL is not set # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -364,7 +365,7 @@ CONFIG_SERIAL=y # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -501,7 +502,6 @@ CONFIG_FS_PROCFS=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # @@ -619,10 +619,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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 # CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -631,17 +631,17 @@ CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_ROMFS is not set @@ -650,18 +650,14 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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 # CONFIG_EXAMPLES_TIFF is not set # 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_UDGRAM=y CONFIG_EXAMPLES_UDGRAM_ADDR="/dev/fifo" CONFIG_EXAMPLES_UDGRAM_SERVER_APPNAME="server" @@ -670,8 +666,12 @@ CONFIG_EXAMPLES_UDGRAM_SERVER_PRIORITY=100 CONFIG_EXAMPLES_UDGRAM_CLIENT_APPNAME="client" CONFIG_EXAMPLES_UDGRAM_CLIENT_STACKSIZE=4096 CONFIG_EXAMPLES_UDGRAM_CLIENT_PRIORITY=100 +# CONFIG_EXAMPLES_UNIONFS is not set +# CONFIG_EXAMPLES_USBSERIAL is not set +# CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_USTREAM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -695,8 +695,8 @@ CONFIG_EXAMPLES_UDGRAM_CLIENT_PRIORITY=100 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -707,10 +707,11 @@ CONFIG_EXAMPLES_UDGRAM_CLIENT_PRIORITY=100 # 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 CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_SMTP is not set # # NSH Library @@ -825,6 +826,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -847,12 +849,12 @@ CONFIG_NSH_MAX_ROUNDTRIP=20 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -861,7 +863,7 @@ 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_SYMTAB is not set # CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sim/unionfs/defconfig b/configs/sim/unionfs/defconfig index 5646c7bccde165efd0501b3afdb22e1463c450cf..7bfe0b1ec3b25d4b395d40838b0f8253084c9986 100644 --- a/configs/sim/unionfs/defconfig +++ b/configs/sim/unionfs/defconfig @@ -41,7 +41,7 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set CONFIG_DEBUG_SYMBOLS=y @@ -349,7 +349,7 @@ CONFIG_SERIAL=y # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -403,7 +403,6 @@ CONFIG_FS_UNIONFS=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/sim/ustream/defconfig b/configs/sim/ustream/defconfig index 14d9bde879783d559876a1b66daf449d2b261808..54a65071316165aa934453678cd8808b3d6bb341 100644 --- a/configs/sim/ustream/defconfig +++ b/configs/sim/ustream/defconfig @@ -42,7 +42,7 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set CONFIG_DEBUG_SYMBOLS=y @@ -299,7 +299,12 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -342,10 +347,6 @@ CONFIG_SERIAL=y # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set # CONFIG_OTHER_UART_SERIALDRIVER is not set - -# -# USART Configuration -# # CONFIG_MCU_SERIAL is not set # CONFIG_STANDARD_SERIAL is not set # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -364,7 +365,7 @@ CONFIG_SERIAL=y # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -501,7 +502,6 @@ CONFIG_FS_PROCFS=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # @@ -619,10 +619,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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 # CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -631,17 +631,17 @@ CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_ROMFS is not set @@ -650,23 +650,23 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_WEBSERVER is not set +# CONFIG_EXAMPLES_UDGRAM is not set # CONFIG_EXAMPLES_UNIONFS is not set # CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set -# CONFIG_EXAMPLES_UDGRAM is not set CONFIG_EXAMPLES_USTREAM=y CONFIG_EXAMPLES_USTREAM_ADDR="/dev/fifo" # CONFIG_EXAMPLES_USTREAM_USE_POLL is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -690,8 +690,8 @@ CONFIG_EXAMPLES_USTREAM_ADDR="/dev/fifo" # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -702,10 +702,11 @@ CONFIG_EXAMPLES_USTREAM_ADDR="/dev/fifo" # 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 CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_SMTP is not set # # NSH Library @@ -820,6 +821,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -842,12 +844,12 @@ CONFIG_NSH_MAX_ROUNDTRIP=20 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -856,7 +858,7 @@ 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_SYMTAB is not set # CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/skp16c26/ostest/defconfig b/configs/skp16c26/ostest/defconfig index da7c48a09d5d04c61c711d83cf15251039e82e88..cf950449245c53e296d9e2999ad63d2ef5004758 100644 --- a/configs/skp16c26/ostest/defconfig +++ b/configs/skp16c26/ostest/defconfig @@ -38,7 +38,7 @@ CONFIG_MOTOROLA_SREC=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set @@ -302,7 +302,6 @@ CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/spark/composite/defconfig b/configs/spark/composite/defconfig index 0db4b8554e6fb098a6963c395574c3a08e6a4682..1ef402810f6b1676fac8e1bc648ac3f970414b0a 100644 --- a/configs/spark/composite/defconfig +++ b/configs/spark/composite/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARCH_CHIP_STM32F103CB=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -407,6 +410,10 @@ 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_DMACAPABLE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -418,10 +425,18 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device 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 + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -672,6 +687,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -688,7 +705,12 @@ CONFIG_ANALOG=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -696,6 +718,7 @@ CONFIG_ANALOG=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set CONFIG_MTD=y @@ -718,6 +741,7 @@ CONFIG_MTD_BYTE_WRITE=y # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set # CONFIG_MTD_N25QXXX is not set @@ -743,6 +767,7 @@ CONFIG_SST25_SECTOR512=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -877,15 +902,18 @@ CONFIG_CC3000_UNSOLICED_STACKSIZE=264 # CONFIG_WL_NRF24L01 is not set # CONFIG_WL_PN532 is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -935,12 +963,6 @@ CONFIG_FS_FATTIME=y # 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 # @@ -1016,6 +1038,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1054,10 +1077,10 @@ CONFIG_EXAMPLES_CC3000BASIC=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1067,17 +1090,17 @@ CONFIG_EXAMPLES_CC3000BASIC=y 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1085,21 +1108,22 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -1119,8 +1143,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1248,22 +1272,8 @@ CONFIG_NSH_ARCHINIT=y # # 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_FLASH_ERASEALL 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_CLE is not set CONFIG_SYSTEM_COMPOSITE=y CONFIG_SYSTEM_COMPOSITE_NLUNS=1 CONFIG_SYSTEM_COMPOSITE_DEVMINOR1=0 @@ -1281,7 +1291,21 @@ CONFIG_SYSTEM_COMPOSITE_BUFSIZE=256 # CONFIG_SYSTEM_COMPOSITE_TRACECONTROLLER is not set # CONFIG_SYSTEM_COMPOSITE_TRACEINTERRUPTS is not set # CONFIG_SYSTEM_COMPOSITE_DEBUGMM is not set +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set -# CONFIG_SYSTEM_USBMSC is not set # CONFIG_SYSTEM_USBMONITOR is not set +# CONFIG_SYSTEM_USBMSC is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/spark/include/board.h b/configs/spark/include/board.h index 197f53ebb84c9a033809536c9708d87cf9e6d242..b44dce3aab73962a21269a9f2e70ff3a577d5395 100644 --- a/configs/spark/include/board.h +++ b/configs/spark/include/board.h @@ -2,7 +2,7 @@ * configs/spark/include/board.h * include/arch/board/board.h * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Authors: Gregory Nutt * Librae * @@ -98,14 +98,14 @@ #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) */ +/* APB1 timers 2-7 will be twice 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) +#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) /* USB divider -- Divide PLL clock by 1.5 */ @@ -115,8 +115,14 @@ * 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 +#define BOARD_TIM1_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM2_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM3_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM4_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM5_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM6_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM7_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM8_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 diff --git a/configs/spark/nsh/defconfig b/configs/spark/nsh/defconfig index a5f8963ab45a19ae015bd6a6204d43f42c61a0a5..749fdc5e65eec8fdd02dac06ccd3e4c8a479d41e 100644 --- a/configs/spark/nsh/defconfig +++ b/configs/spark/nsh/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARCH_CHIP_STM32F103CB=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -407,6 +410,10 @@ 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_DMACAPABLE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -418,10 +425,18 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device 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 + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -672,6 +687,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -688,7 +705,12 @@ CONFIG_ANALOG=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -696,6 +718,7 @@ CONFIG_ANALOG=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set CONFIG_MTD=y @@ -718,6 +741,7 @@ CONFIG_MTD_BYTE_WRITE=y # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set # CONFIG_MTD_N25QXXX is not set @@ -743,6 +767,7 @@ CONFIG_SST25_SECTOR512=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -877,15 +902,18 @@ CONFIG_CC3000_UNSOLICED_STACKSIZE=264 # CONFIG_WL_NRF24L01 is not set # CONFIG_WL_PN532 is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -935,12 +963,6 @@ CONFIG_FS_FATTIME=y # 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 # @@ -1016,6 +1038,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1054,10 +1077,10 @@ CONFIG_EXAMPLES_CC3000BASIC=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1067,17 +1090,17 @@ CONFIG_EXAMPLES_CC3000BASIC=y 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1085,21 +1108,22 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -1119,8 +1143,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1250,13 +1274,15 @@ CONFIG_NSH_ARCHINIT=y # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CDCACM is not set # CONFIG_SYSTEM_CLE is not set +# CONFIG_SYSTEM_COMPOSITE is not set # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1264,10 +1290,8 @@ 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_COMPOSITE is not set # CONFIG_SYSTEM_UBLOXMODEM is not set -# CONFIG_SYSTEM_USBMSC is not set # CONFIG_SYSTEM_USBMONITOR is not set +# CONFIG_SYSTEM_USBMSC is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/spark/src/stm32_appinit.c b/configs/spark/src/stm32_appinit.c index c91969cd590f415f4d111a19bf194b42593d5cda..ebb3518af77825507cd10c6540d55e0a65e5c8dc 100644 --- a/configs/spark/src/stm32_appinit.c +++ b/configs/spark/src/stm32_appinit.c @@ -206,7 +206,7 @@ int board_app_initialize(uintptr_t arg) ret = ftl_initialize(CONFIG_SPARK_FLASH_MINOR, mtd); if (ret < 0) { - fdbg("ERROR: Initialize the FTL layer\n"); + ferr("ERROR: Initialize the FTL layer\n"); return ret; } @@ -227,7 +227,7 @@ int board_app_initialize(uintptr_t arg) ret = mount(partname, mntpoint, "vfat", 0, NULL); if (ret < 0) { - fdbg("ERROR: Failed to mount the FAT volume: %d\n", errno); + ferr("ERROR: Failed to mount the FAT volume: %d\n", errno); return ret; } } @@ -261,7 +261,7 @@ int board_app_initialize(uintptr_t arg) ret = ftl_initialize(partno, mtd_part); if (ret < 0) { - fdbg("ERROR: Initialize the FTL layer\n"); + ferr("ERROR: Initialize the FTL layer\n"); return ret; } @@ -274,7 +274,7 @@ int board_app_initialize(uintptr_t arg) ret = mount(partname, mntpoint, "vfat", 0, NULL); if (ret < 0) { - fdbg("ERROR: Failed to mount the FAT volume: %d\n", errno); + ferr("ERROR: Failed to mount the FAT volume: %d\n", errno); return ret; } diff --git a/configs/spark/src/stm32_autoleds.c b/configs/spark/src/stm32_autoleds.c index e195ae1b940b81078e53fabb3d0b22bf797d3868..8d72a6678cb04061b14c8fd90adae40c081f610f 100644 --- a/configs/spark/src/stm32_autoleds.c +++ b/configs/spark/src/stm32_autoleds.c @@ -59,18 +59,6 @@ * 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 - /* The following definitions map the encoded LED setting to bit sets used to * manipulate the LEDs. All terms are in true logic, the led polarity is dealt * with in the phy_xxx operations diff --git a/configs/spark/src/stm32_composite.c b/configs/spark/src/stm32_composite.c index 2720de1af4f5a0b29da616011066c50f94bac04e..e38c769e64d147c5a1a239f404d00d15ea60600d 100644 --- a/configs/spark/src/stm32_composite.c +++ b/configs/spark/src/stm32_composite.c @@ -140,30 +140,30 @@ static int stm32_composite_initialize(void) /* Get the SPI port */ - fvdbg("Initializing SPI port %d\n", CONFIG_SPARK_FLASH_SPI); + finfo("Initializing SPI port %d\n", CONFIG_SPARK_FLASH_SPI); spi = stm32_spibus_initialize(CONFIG_SPARK_FLASH_SPI); if (!spi) { - fdbg("ERROR: Failed to initialize SPI port %d\n", + ferr("ERROR: Failed to initialize SPI port %d\n", CONFIG_SPARK_FLASH_SPI); return -ENODEV; } - fvdbg("Successfully initialized SPI port %d\n", CONFIG_SPARK_FLASH_SPI); + finfo("Successfully initialized SPI port %d\n", CONFIG_SPARK_FLASH_SPI); /* Now bind the SPI interface to the SST25 SPI FLASH driver */ - fvdbg("Bind SPI to the SPI flash driver\n"); + finfo("Bind SPI to the SPI flash driver\n"); mtd = sst25_initialize(spi); if (!mtd) { - fdbg("ERROR: Failed to bind SPI port %d to the SPI FLASH driver\n", + ferr("ERROR: Failed to bind SPI port %d to the SPI FLASH driver\n", CONFIG_SPARK_FLASH_SPI); } else { - fvdbg("Successfully bound SPI port %d to the SPI FLASH driver\n", + finfo("Successfully bound SPI port %d to the SPI FLASH driver\n", CONFIG_SPARK_FLASH_SPI); } @@ -174,7 +174,7 @@ static int stm32_composite_initialize(void) ret = ftl_initialize(CONFIG_SPARK_FLASH_MINOR, mtd); if (ret < 0) { - fdbg("ERROR: Initialize the FTL layer\n"); + ferr("ERROR: Initialize the FTL layer\n"); return ret; } @@ -194,7 +194,7 @@ static int stm32_composite_initialize(void) ret = mount(partname, mntpoint, "vfat", 0, NULL); if (ret < 0) { - fdbg("ERROR: Failed to mount the FAT volume: %d\n", errno); + ferr("ERROR: Failed to mount the FAT volume: %d\n", errno); return ret; } @@ -228,7 +228,7 @@ static int stm32_composite_initialize(void) ret = ftl_initialize(partno, mtd_part); if (ret < 0) { - fdbg("ERROR: Initialize the FTL layer\n"); + ferr("ERROR: Initialize the FTL layer\n"); return ret; } @@ -241,7 +241,7 @@ static int stm32_composite_initialize(void) ret = mount(partname, mntpoint, "vfat", 0, NULL); if (ret < 0) { - fdbg("ERROR: Failed to mount the FAT volume: %d\n", errno); + ferr("ERROR: Failed to mount the FAT volume: %d\n", errno); return ret; } @@ -272,7 +272,7 @@ static int stm32_composite_initialize(void) ret = usbmonitor_start(0, NULL); if (ret != OK) { - fdbg("ERROR: Failed to start USB monitor: %d\n", ret); + ferr("ERROR: Failed to start USB monitor: %d\n", ret); } #endif diff --git a/configs/spark/src/stm32_spi.c b/configs/spark/src/stm32_spi.c index 0dd71f1c16742d4381ed70a28bb161442bcd753d..f631052d313883a4251d08bc88982e16318ba1e1 100644 --- a/configs/spark/src/stm32_spi.c +++ b/configs/spark/src/stm32_spi.c @@ -59,32 +59,6 @@ #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -144,7 +118,7 @@ void weak_function stm32_spidev_initialize(void) #ifdef CONFIG_STM32_SPI1 void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -156,7 +130,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI2 void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #if defined(CONFIG_MTD_SST25) @@ -186,7 +160,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI3 void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } diff --git a/configs/spark/src/stm32_usbdev.c b/configs/spark/src/stm32_usbdev.c index 87af0a3bc787256d21aacafa0f874868ff14ccaf..ef59cef0c65a3213d122caccf743ba4b507a60df 100644 --- a/configs/spark/src/stm32_usbdev.c +++ b/configs/spark/src/stm32_usbdev.c @@ -74,7 +74,7 @@ void stm32_usbinitialize(void) { - ulldbg("called\n"); + uinfo("called\n"); /* USB Soft Connect Pullup */ @@ -113,5 +113,5 @@ int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } diff --git a/configs/spark/src/stm32_userleds.c b/configs/spark/src/stm32_userleds.c index 41641fd7f131704b32acb4882cccbf2af9b6d5ea..30cd9e1f4105e80ecb2e2192d968d03a08eb4746 100644 --- a/configs/spark/src/stm32_userleds.c +++ b/configs/spark/src/stm32_userleds.c @@ -54,22 +54,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data ****************************************************************************/ diff --git a/configs/spark/src/stm32_wireless.c b/configs/spark/src/stm32_wireless.c index 912670b9167bc12b4be49a82c9c302bb92c8564e..2d1f6855d82e9008f98d10497995304be46e85ef 100644 --- a/configs/spark/src/stm32_wireless.c +++ b/configs/spark/src/stm32_wireless.c @@ -197,7 +197,7 @@ static void wl_enable_irq(FAR struct cc3000_config_s *state, bool enable) /* Attach and enable, or detach and disable */ - ivdbg("enable:%d\n", enable); + iinfo("enable:%d\n", enable); if (enable) { (void)stm32_gpiosetevent(GPIO_WIFI_INT, false, true, false, priv->handler); @@ -210,7 +210,7 @@ static void wl_enable_irq(FAR struct cc3000_config_s *state, bool enable) static void wl_enable_power(FAR struct cc3000_config_s *state, bool enable) { - ivdbg("enable:%d\n", enable); + iinfo("enable:%d\n", enable); /* Active high enable */ @@ -219,7 +219,7 @@ static void wl_enable_power(FAR struct cc3000_config_s *state, bool enable) static void wl_select(FAR struct cc3000_config_s *state, bool enable) { - ivdbg("enable:%d\n", enable); + iinfo("enable:%d\n", enable); /* Active high enable */ @@ -281,7 +281,7 @@ int wireless_archinitialize(size_t max_rx_size) /* Init SPI bus */ - idbg("minor %d\n", minor); + iinfo("minor %d\n", minor); DEBUGASSERT(CONFIG_CC3000_DEVMINOR == 0); #ifdef CONFIG_CC3000_PROBES @@ -296,7 +296,7 @@ int wireless_archinitialize(size_t max_rx_size) spi = stm32_spibus_initialize(CONFIG_CC3000_SPIDEV); if (!spi) { - idbg("Failed to initialize SPI bus %d\n", CONFIG_CC3000_SPIDEV); + ierr("ERROR: Failed to initialize SPI bus %d\n", CONFIG_CC3000_SPIDEV); return -ENODEV; } @@ -305,7 +305,7 @@ int wireless_archinitialize(size_t max_rx_size) int ret = cc3000_register(spi, &g_cc3000_info.dev, CONFIG_CC3000_DEVMINOR); if (ret < 0) { - idbg("Failed to initialize SPI bus %d\n", CONFIG_CC3000_SPIDEV); + ierr("ERROR: Failed to initialize SPI bus %d\n", CONFIG_CC3000_SPIDEV); return -ENODEV; } diff --git a/configs/spark/usbmsc/defconfig b/configs/spark/usbmsc/defconfig index ae97bcd86c8bb329c653b48efa59b7860a3c0887..9e05a1f1b467a67ea92cf04fb46e91cc57efcb38 100644 --- a/configs/spark/usbmsc/defconfig +++ b/configs/spark/usbmsc/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARCH_CHIP_STM32F103CB=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -407,6 +410,10 @@ 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_DMACAPABLE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -418,10 +425,18 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device 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 + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -672,6 +687,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -688,7 +705,12 @@ CONFIG_ANALOG=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -696,6 +718,7 @@ CONFIG_ANALOG=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set CONFIG_MTD=y @@ -718,6 +741,7 @@ CONFIG_MTD_BYTE_WRITE=y # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set # CONFIG_MTD_N25QXXX is not set @@ -742,6 +766,8 @@ CONFIG_SST25_SECTOR512=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -841,15 +867,18 @@ CONFIG_CC3000_UNSOLICED_STACKSIZE=264 # CONFIG_WL_NRF24L01 is not set # CONFIG_WL_PN532 is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -899,12 +928,6 @@ CONFIG_FS_FATTIME=y # 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 # @@ -980,6 +1003,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1018,10 +1042,10 @@ CONFIG_EXAMPLES_CC3000BASIC=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1031,17 +1055,17 @@ CONFIG_EXAMPLES_CC3000BASIC=y 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1049,21 +1073,22 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -1083,8 +1108,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1213,13 +1238,13 @@ CONFIG_NSH_ARCHINIT=y # # 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_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1227,8 +1252,8 @@ 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_USBMONITOR is not set CONFIG_SYSTEM_USBMSC=y CONFIG_SYSTEM_USBMSC_NLUNS=1 CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 @@ -1240,5 +1265,5 @@ CONFIG_SYSTEM_USBMSC_DEVPATH3="/dev/mmcsd2" # CONFIG_SYSTEM_USBMSC_DEBUGMM is not set CONFIG_SYSTEM_USBMSC_CMD_STACKSIZE=768 CONFIG_SYSTEM_USBMSC_CMD_PRIORITY=100 -# CONFIG_SYSTEM_USBMONITOR is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/spark/usbnsh/defconfig b/configs/spark/usbnsh/defconfig index 5c7f49052dc1ceba0b08488dfee51cde4151a2cd..1316e8034d2d718deb85ea004ce9bee0c6bdd7cc 100644 --- a/configs/spark/usbnsh/defconfig +++ b/configs/spark/usbnsh/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARCH_CHIP_STM32F103CB=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -407,6 +410,10 @@ 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_DMACAPABLE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -418,10 +425,18 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device 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 + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -675,6 +690,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -689,7 +706,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -697,6 +719,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set CONFIG_MTD=y @@ -719,6 +742,7 @@ CONFIG_MTD_BYTE_WRITE=y # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set # CONFIG_MTD_N25QXXX is not set @@ -743,6 +767,7 @@ CONFIG_SST25_SPIFREQUENCY=20000000 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y +# CONFIG_SERIAL_CONSOLE is not set # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -834,14 +859,17 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_NONE=y +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -885,12 +913,6 @@ CONFIG_FS_FAT=y # 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 # @@ -966,6 +988,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1000,10 +1023,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1012,17 +1035,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1030,21 +1053,22 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -1064,8 +1088,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1196,13 +1220,14 @@ CONFIG_USBDEV_MINOR=0 # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CDCACM is not set # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1210,8 +1235,7 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/spark/usbserial/defconfig b/configs/spark/usbserial/defconfig index aba09edc98589c18e80163cab5188294055b6372..76625f70fa284c63efd4fd2e4328da0094114f89 100644 --- a/configs/spark/usbserial/defconfig +++ b/configs/spark/usbserial/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARCH_CHIP_STM32F103CB=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -407,6 +410,10 @@ 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_DMACAPABLE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -418,10 +425,18 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device 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 + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -676,6 +691,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -692,7 +709,12 @@ CONFIG_ANALOG=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -700,6 +722,7 @@ CONFIG_ANALOG=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set CONFIG_MTD=y @@ -722,6 +745,7 @@ CONFIG_MTD_BYTE_WRITE=y # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set # CONFIG_MTD_N25QXXX is not set @@ -747,6 +771,7 @@ CONFIG_SST25_SECTOR512=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -851,15 +876,18 @@ CONFIG_CC3000_PROBES=y # CONFIG_WL_NRF24L01 is not set # CONFIG_WL_PN532 is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -909,12 +937,6 @@ CONFIG_FS_FATTIME=y # 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 # @@ -990,6 +1012,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1028,10 +1051,10 @@ CONFIG_EXAMPLES_CC3000BASIC=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1041,18 +1064,18 @@ CONFIG_EXAMPLES_CC3000BASIC=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1066,7 +1089,6 @@ CONFIG_EXAMPLES_CC3000BASIC=y # 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=y CONFIG_EXAMPLES_USBSERIAL_BUFSIZE=512 CONFIG_EXAMPLES_USBSERIAL_TRACEINIT=y @@ -1076,10 +1098,12 @@ CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=y CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=y # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -1099,8 +1123,8 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1133,18 +1157,18 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=y # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CDCACM is not set # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_CDCACM is not set # CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_USBMONITOR is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3210e-eval/README.txt b/configs/stm3210e-eval/README.txt index a83f40875303205cf55ef56bb2f1396847a18f8f..1e70b125b5450e324553bf20fc10b55cf239c4eb 100644 --- a/configs/stm3210e-eval/README.txt +++ b/configs/stm3210e-eval/README.txt @@ -657,7 +657,7 @@ STM3210E-EVAL-specific Configuration Options 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 + CONFIG_STM32_CAN_REGDEBUG - If CONFIG_DEBUG_FEATURES is set, this will generate an dump of all CAN registers. STM3210E-EVAL LCD Hardware Configuration @@ -1064,11 +1064,11 @@ Where is one of the following: USB debug output can be enabled as by changing the following settings in the configuration file: - -CONFIG_DEBUG=n - -CONFIG_DEBUG_VERBOSE=n + -CONFIG_DEBUG_FEATURES=n + -CONFIG_DEBUG_INFO=n -CONFIG_DEBUG_USB=n - +CONFIG_DEBUG=y - +CONFIG_DEBUG_VERBOSE=y + +CONFIG_DEBUG_FEATURES=y + +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_USB=y -CONFIG_EXAMPLES_USBSERIAL_TRACEINIT=n diff --git a/configs/stm3210e-eval/buttons/defconfig b/configs/stm3210e-eval/buttons/defconfig index 11783f5652943bd32781d8965f87b2f9eb5d9639..6253cf21939652ccead6c663ecea4f307187d158 100644 --- a/configs/stm3210e-eval/buttons/defconfig +++ b/configs/stm3210e-eval/buttons/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -207,6 +209,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set CONFIG_ARCH_CHIP_STM32F103ZE=y # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -418,6 +421,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_FSMC_SRAM is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -429,12 +436,20 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device 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 + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -667,7 +682,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -675,6 +695,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -686,6 +707,8 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -748,15 +771,18 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -786,12 +812,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # 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 # @@ -861,6 +881,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -902,10 +923,10 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="UP" # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -914,18 +935,18 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="UP" # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -939,9 +960,9 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="UP" # 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -963,8 +984,8 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="UP" # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -997,16 +1018,16 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="UP" # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3210e-eval/composite/defconfig b/configs/stm3210e-eval/composite/defconfig index d4664da4222b57470d7db55f51fb7008fc3c2901..fa4db610c0c29896914afb0823d5e78233fb1b4e 100644 --- a/configs/stm3210e-eval/composite/defconfig +++ b/configs/stm3210e-eval/composite/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -209,6 +211,7 @@ CONFIG_SDIO_DMA=y # CONFIG_ARCH_CHIP_STM32F103VE is not set CONFIG_ARCH_CHIP_STM32F103ZE=y # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -421,6 +424,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_DMACAPABLE is not set # CONFIG_STM32_FSMC_SRAM is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -432,12 +439,20 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device 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 + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -700,7 +715,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -708,6 +728,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -742,6 +763,7 @@ CONFIG_MTD=y # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set # CONFIG_MTD_N25QXXX is not set @@ -761,6 +783,7 @@ CONFIG_MTD=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -894,15 +917,18 @@ CONFIG_USBMSC_SCSI_STACKSIZE=2048 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -939,12 +965,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -1020,6 +1040,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1049,10 +1070,10 @@ CONFIG_ARCH_HAVE_TLS=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1061,18 +1082,18 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1086,14 +1107,15 @@ CONFIG_ARCH_HAVE_TLS=y # 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -1113,8 +1135,8 @@ CONFIG_ARCH_HAVE_TLS=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1147,18 +1169,8 @@ CONFIG_ARCH_HAVE_TLS=y # # 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 is not set -# CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_SUDOKU is not set -# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_CDCACM is not set +# CONFIG_SYSTEM_CLE is not set CONFIG_SYSTEM_COMPOSITE=y CONFIG_SYSTEM_COMPOSITE_NLUNS=1 CONFIG_SYSTEM_COMPOSITE_DEVMINOR1=0 @@ -1171,6 +1183,16 @@ CONFIG_SYSTEM_COMPOSITE_TTYUSB=0 CONFIG_SYSTEM_COMPOSITE_SERDEV="/dev/ttyACM0" CONFIG_SYSTEM_COMPOSITE_BUFSIZE=256 # CONFIG_SYSTEM_COMPOSITE_DEBUGMM is not set +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set # CONFIG_SYSTEM_USBMSC is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3210e-eval/include/board.h b/configs/stm3210e-eval/include/board.h index 462d07ca538fac38da175313e1d2a870d94b2b69..087b762bc2c26497b21a0101fe27dcd8033b9c70 100644 --- a/configs/stm3210e-eval/include/board.h +++ b/configs/stm3210e-eval/include/board.h @@ -1,8 +1,7 @@ /************************************************************************************ * configs/stm3210e-eval/include/board.h - * include/arch/board/board.h * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -94,14 +93,14 @@ #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) */ +/* APB1 timers 2-7 will be twice 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) +#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) /* USB divider -- Divide PLL clock by 1.5 */ @@ -111,8 +110,14 @@ * 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 +#define BOARD_TIM1_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM2_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM3_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM4_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM5_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM6_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM7_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM8_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 diff --git a/configs/stm3210e-eval/nsh/defconfig b/configs/stm3210e-eval/nsh/defconfig index bc1df0013a4a2fbbaf73cb165b24fb2aedb56d5f..fc951bb2b63a413ae3e1c4a7e8d5b15ad6df28d1 100644 --- a/configs/stm3210e-eval/nsh/defconfig +++ b/configs/stm3210e-eval/nsh/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -210,6 +212,7 @@ CONFIG_SDIO_DMA=y # CONFIG_ARCH_CHIP_STM32F103VE is not set CONFIG_ARCH_CHIP_STM32F103ZE=y # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -422,6 +425,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_DMACAPABLE is not set # CONFIG_STM32_FSMC_SRAM is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -433,12 +440,20 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device 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 + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -703,7 +718,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -711,6 +731,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -745,6 +766,7 @@ CONFIG_MTD=y # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set # CONFIG_MTD_N25QXXX is not set @@ -763,6 +785,8 @@ CONFIG_MTD=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -846,15 +870,18 @@ CONFIG_USBDEV_MAXPOWER=100 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -897,12 +924,6 @@ CONFIG_FAT_LCNAMES=y # 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 # @@ -978,6 +999,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1007,10 +1029,10 @@ CONFIG_ARCH_HAVE_TLS=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1019,18 +1041,18 @@ CONFIG_ARCH_HAVE_TLS=y 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1044,14 +1066,15 @@ CONFIG_EXAMPLES_NSH=y # 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -1071,8 +1094,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1196,12 +1219,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1209,6 +1232,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3210e-eval/nsh2/defconfig b/configs/stm3210e-eval/nsh2/defconfig index c22258756197a7efc6580d15f932f740e9ffda4e..e5f10041dd97d2af53f35037c297d8e20d4dbcfd 100644 --- a/configs/stm3210e-eval/nsh2/defconfig +++ b/configs/stm3210e-eval/nsh2/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -209,6 +211,7 @@ CONFIG_SDIO_DMA=y # CONFIG_ARCH_CHIP_STM32F103VE is not set CONFIG_ARCH_CHIP_STM32F103ZE=y # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -423,6 +426,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_DMACAPABLE is not set # CONFIG_STM32_FSMC_SRAM is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -434,12 +441,20 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device 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 + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -725,10 +740,14 @@ CONFIG_I2C_DRIVER=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set CONFIG_LCD_NOGETRUN=y @@ -756,12 +775,7 @@ CONFIG_LCD_RPORTRAIT=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set - -# -# Alphanumeric/Segment LCD Devices -# -# CONFIG_LCD_LCD1602 is not set -# CONFIG_LCD_BACKPACK is not set +# CONFIG_SLCD is not set # # LED Support @@ -769,6 +783,7 @@ CONFIG_LCD_RPORTRAIT=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -803,6 +818,7 @@ CONFIG_MTD=y # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set # CONFIG_MTD_N25QXXX is not set @@ -821,6 +837,8 @@ CONFIG_MTD=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -919,15 +937,18 @@ CONFIG_USBMSC_SCSI_STACKSIZE=2048 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -972,12 +993,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -1142,6 +1157,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1176,10 +1192,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -1203,7 +1219,6 @@ CONFIG_EXAMPLES_NX_BPP=16 # 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 CONFIG_EXAMPLES_NXHELLO_VPLANE=0 @@ -1225,12 +1240,13 @@ CONFIG_EXAMPLES_NXHELLO_FONTID=6 # CONFIG_EXAMPLES_NXHELLO_EXTERNINIT is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1238,21 +1254,22 @@ CONFIG_EXAMPLES_NXHELLO_FONTID=6 # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -1272,8 +1289,8 @@ CONFIG_EXAMPLES_NXHELLO_FONTID=6 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1398,12 +1415,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=1 CONFIG_I2CTOOL_MAXBUS=2 @@ -1411,7 +1428,7 @@ CONFIG_I2CTOOL_MINADDR=0x03 CONFIG_I2CTOOL_MAXADDR=0x77 CONFIG_I2CTOOL_MAXREGADDR=0xff CONFIG_I2CTOOL_DEFFREQ=100000 -# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1419,7 +1436,6 @@ 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_USBMSC=y CONFIG_SYSTEM_USBMSC_NLUNS=1 @@ -1432,4 +1448,5 @@ CONFIG_SYSTEM_USBMSC_DEVPATH3="/dev/mmcsd2" # CONFIG_SYSTEM_USBMSC_DEBUGMM is not set CONFIG_SYSTEM_USBMSC_CMD_STACKSIZE=768 CONFIG_SYSTEM_USBMSC_CMD_PRIORITY=100 +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3210e-eval/nx/defconfig b/configs/stm3210e-eval/nx/defconfig index 2554b724aacdd853eaf2e058e92893be3ece8965..451e9024a9b1671e62563aab123d56d6991244e2 100644 --- a/configs/stm3210e-eval/nx/defconfig +++ b/configs/stm3210e-eval/nx/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -207,6 +209,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set CONFIG_ARCH_CHIP_STM32F103ZE=y # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -421,6 +424,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_DMACAPABLE is not set # CONFIG_STM32_FSMC_SRAM is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -432,12 +439,20 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device 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 + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -702,10 +717,14 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set CONFIG_LCD_NOGETRUN=y @@ -733,11 +752,7 @@ CONFIG_LCD_RPORTRAIT=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set - -# -# Alphanumeric/Segment LCD Devices -# -# CONFIG_LCD_LCD1602 is not set +# CONFIG_SLCD is not set # # LED Support @@ -745,6 +760,7 @@ CONFIG_LCD_RPORTRAIT=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -756,6 +772,8 @@ CONFIG_LCD_RPORTRAIT=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -838,15 +856,18 @@ CONFIG_USBDEV_MAXPOWER=100 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -877,12 +898,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -1041,6 +1056,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1069,10 +1085,10 @@ CONFIG_ARCH_HAVE_TLS=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -1095,18 +1111,18 @@ CONFIG_EXAMPLES_NX_FONTID=0 CONFIG_EXAMPLES_NX_BPP=16 # CONFIG_EXAMPLES_NX_RAWWINDOWS is not set CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 -# 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1120,9 +1136,9 @@ CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 # 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -1144,8 +1160,8 @@ CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1178,16 +1194,16 @@ CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3210e-eval/nxterm/defconfig b/configs/stm3210e-eval/nxterm/defconfig index 4a19b0a255cfebb43bd0550bdc46c99ae920b47d..02bf3d366a538cb9ba28de4bb3ba4c7fe4860b6e 100644 --- a/configs/stm3210e-eval/nxterm/defconfig +++ b/configs/stm3210e-eval/nxterm/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -207,6 +209,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set CONFIG_ARCH_CHIP_STM32F103ZE=y # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -419,6 +422,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_DMACAPABLE is not set # CONFIG_STM32_FSMC_SRAM is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -430,12 +437,20 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device 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 + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -698,10 +713,14 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set CONFIG_LCD_NOGETRUN=y @@ -729,11 +748,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set - -# -# Alphanumeric/Segment LCD Devices -# -# CONFIG_LCD_LCD1602 is not set +# CONFIG_SLCD is not set # # LED Support @@ -741,6 +756,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -752,6 +768,8 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -815,15 +833,18 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -861,12 +882,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -1049,6 +1064,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1082,10 +1098,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -1095,17 +1111,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_NSH is not set # CONFIG_EXAMPLES_NULL is not set # CONFIG_EXAMPLES_NX is not set -CONFIG_EXAMPLES_NXTERM=y # 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_NXTERM=y # 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1113,17 +1129,17 @@ CONFIG_EXAMPLES_NXTERM=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -1145,8 +1161,8 @@ CONFIG_EXAMPLES_NXTERM=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1270,12 +1286,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1283,6 +1299,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3210e-eval/pm/defconfig b/configs/stm3210e-eval/pm/defconfig index 4acbe0d3a7e82a161e8210346a7277c03e8b1b17..b23c795374b0eef7845c7155348e198f9a48f9e1 100644 --- a/configs/stm3210e-eval/pm/defconfig +++ b/configs/stm3210e-eval/pm/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -207,6 +209,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set CONFIG_ARCH_CHIP_STM32F103ZE=y # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -421,6 +424,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_FSMC_SRAM is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_PWM is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -433,12 +440,20 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device 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 + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -722,10 +737,14 @@ CONFIG_RTC_NALARMS=1 # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set CONFIG_LCD_NOGETRUN=y @@ -753,11 +772,7 @@ CONFIG_LCD_RPORTRAIT=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set - -# -# Alphanumeric/Segment LCD Devices -# -# CONFIG_LCD_LCD1602 is not set +# CONFIG_SLCD is not set # # LED Support @@ -765,6 +780,7 @@ CONFIG_LCD_RPORTRAIT=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -794,6 +810,8 @@ CONFIG_PM_SLEEPENTER_COUNT=70 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -857,15 +875,18 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -903,12 +924,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -1070,6 +1085,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1104,10 +1120,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -1131,7 +1147,6 @@ CONFIG_EXAMPLES_NX_BPP=16 # 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 CONFIG_EXAMPLES_NXHELLO_VPLANE=0 @@ -1153,12 +1168,13 @@ CONFIG_EXAMPLES_NXHELLO_FONTID=6 # CONFIG_EXAMPLES_NXHELLO_EXTERNINIT is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1166,17 +1182,17 @@ CONFIG_EXAMPLES_NXHELLO_FONTID=6 # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -1198,8 +1214,8 @@ CONFIG_EXAMPLES_NXHELLO_FONTID=6 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1323,12 +1339,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1336,6 +1352,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3210e-eval/src/stm32_adc.c b/configs/stm3210e-eval/src/stm32_adc.c index a3beeab10f796ed3b92a4031ed7a0d9bc58b93fd..a0c5b87fa36a7df0c72b4259b0ab7e4b9bd916b2 100644 --- a/configs/stm3210e-eval/src/stm32_adc.c +++ b/configs/stm3210e-eval/src/stm32_adc.c @@ -136,7 +136,7 @@ int board_adc_setup(void) adc = stm32_adcinitialize(1, g_chanlist, ADC1_NCHANNELS); if (adc == NULL) { - adbg("ERROR: Failed to get ADC interface\n"); + aerr("ERROR: Failed to get ADC interface\n"); return -ENODEV; } @@ -145,7 +145,7 @@ int board_adc_setup(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - adbg("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } diff --git a/configs/stm3210e-eval/src/stm32_appinit.c b/configs/stm3210e-eval/src/stm32_appinit.c index 4a5d55c9ebee583e8b36a4b6ea4d6a6af65aed59..10d617c0dac0cfa482b22714d59caa1291e78889 100644 --- a/configs/stm3210e-eval/src/stm32_appinit.c +++ b/configs/stm3210e-eval/src/stm32_appinit.c @@ -129,14 +129,14 @@ static void stm32_i2c_register(int bus) i2c = stm32_i2cbus_initialize(bus); if (i2c == NULL) { - dbg("ERROR: Failed to get I2C%d interface\n", bus); + _err("ERROR: Failed to get I2C%d interface\n", bus); } else { ret = i2c_register(i2c, bus); if (ret < 0) { - dbg("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); + _err("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); stm32_i2cbus_uninitialize(i2c); } } diff --git a/configs/stm3210e-eval/src/stm32_can.c b/configs/stm3210e-eval/src/stm32_can.c index 2efb493ca1c62b7c1d1a93dcfce6e37a3da2e07b..1d296be81c62ea1b48f4b5748cd563cd48239055 100644 --- a/configs/stm3210e-eval/src/stm32_can.c +++ b/configs/stm3210e-eval/src/stm32_can.c @@ -62,25 +62,6 @@ #define CAN_PORT 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 - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -109,7 +90,7 @@ int board_can_initialize(void) can = stm32_caninitialize(CAN_PORT); if (can == NULL) { - candbg("ERROR: Failed to get CAN interface\n"); + canerr("ERROR: Failed to get CAN interface\n"); return -ENODEV; } @@ -118,7 +99,7 @@ int board_can_initialize(void) ret = can_register("/dev/can0", can); if (ret < 0) { - candbg("ERROR: can_register failed: %d\n", ret); + canerr("ERROR: can_register failed: %d\n", ret); return ret; } diff --git a/configs/stm3210e-eval/src/stm32_djoystick.c b/configs/stm3210e-eval/src/stm32_djoystick.c index a8d9001f7e9eaf6d83694ae4dcd945652fd15781..72d5009e705cf206b1b7e59344d908d3ef63d888 100644 --- a/configs/stm3210e-eval/src/stm32_djoystick.c +++ b/configs/stm3210e-eval/src/stm32_djoystick.c @@ -120,7 +120,7 @@ static const struct djoy_lowerhalf_s g_djoylower = static djoy_buttonset_t djoy_supported(FAR const struct djoy_lowerhalf_s *lower) { - ivdbg("Supported: %02x\n", DJOY_SUPPORTED); + iinfo("Supported: %02x\n", DJOY_SUPPORTED); return (djoy_buttonset_t)DJOY_SUPPORTED; } @@ -148,7 +148,7 @@ static djoy_buttonset_t djoy_sample(FAR const struct djoy_lowerhalf_s *lower) } } - ivdbg("Retuning: %02x\n", DJOY_SUPPORTED); + iinfo("Retuning: %02x\n", DJOY_SUPPORTED); return ret; } @@ -177,8 +177,8 @@ static void djoy_enable(FAR const struct djoy_lowerhalf_s *lower, flags = enter_critical_section(); djoy_disable(); - illvdbg("press: %02x release: %02x handler: %p arg: %p\n", - press, release, handler, arg); + iinfo("press: %02x release: %02x handler: %p arg: %p\n", + press, release, handler, arg); /* If no events are indicated or if no handler is provided, then this * must really be a request to disable interrupts. @@ -209,8 +209,8 @@ static void djoy_enable(FAR const struct djoy_lowerhalf_s *lower, falling = ((press & bit) != 0); rising = ((release & bit) != 0); - illvdbg("GPIO %d: rising: %d falling: %d\n", - i, rising, falling); + iinfo("GPIO %d: rising: %d falling: %d\n", + i, rising, falling); (void)stm32_gpiosetevent(g_joygpio[i], rising, falling, true, djoy_interrupt); diff --git a/configs/stm3210e-eval/src/stm32_idle.c b/configs/stm3210e-eval/src/stm32_idle.c index aba327a64c94d245591c20f5cd8a2d0f9f9e7c20..e50aac3c8542d28174dc6320ef6a3b630765e888 100644 --- a/configs/stm3210e-eval/src/stm32_idle.c +++ b/configs/stm3210e-eval/src/stm32_idle.c @@ -229,7 +229,7 @@ static int stm32_rtc_alarm(time_t tv_sec, time_t tv_nsec, bool exti) ret = stm32_rtc_setalarm(&alarmtime, stm32_alarmcb); if (ret < 0) { - lldbg("Warning: The alarm is already set\n"); + serr("ERROR: Warning: The alarm is already set\n"); } return ret; @@ -290,7 +290,7 @@ static void stm32_idlepm(void) if (newstate != oldstate) { - llvdbg("newstate= %d oldstate=%d\n", newstate, oldstate); + _info("newstate= %d oldstate=%d\n", newstate, oldstate); sched_lock(); @@ -366,7 +366,7 @@ static void stm32_idlepm(void) ret = stm32_rtc_cancelalarm(); if (ret < 0) { - lldbg("Warning: Cancel alarm failed\n"); + swarn("WARNING: Cancel alarm failed\n"); } #endif /* Note: See the additional PM_STANDBY related logic at the diff --git a/configs/stm3210e-eval/src/stm32_lcd.c b/configs/stm3210e-eval/src/stm32_lcd.c index ed7ca1f2d8ff0de91ee5809cbe4f53e4964ee911..cc4f25d6b785d9e0e99bd8913adff17689443f60 100644 --- a/configs/stm3210e-eval/src/stm32_lcd.c +++ b/configs/stm3210e-eval/src/stm32_lcd.c @@ -36,6 +36,7 @@ * POSSIBILITY OF SUCH DAMAGE. * **************************************************************************************/ + /* This driver supports the following LCDs: * * 1. Ampire AM-240320LTNQW00H @@ -81,6 +82,7 @@ /************************************************************************************** * Pre-processor Definitions **************************************************************************************/ + /* Configuration **********************************************************************/ /* Check contrast selection */ @@ -157,20 +159,6 @@ #define SPFD5408B_RDSHIFT 5 -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must - * also be enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif - /* Display/Color Properties ***********************************************************/ /* Display Resolution */ @@ -309,14 +297,6 @@ #define SPFD5408B_ID 0x5408 #define R61580_ID 0x1580 -/* Debug ******************************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg(format, ...) vdbg(format, ##__VA_ARGS__) -#else -# define lcddbg(x...) -#endif - /************************************************************************************** * Private Type Definition **************************************************************************************/ @@ -742,7 +722,7 @@ static int stm3210e_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *bu /* Buffer must be provided and aligned to a 16-bit address boundary */ - lcddbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0); /* Write the run to GRAM. */ @@ -835,7 +815,7 @@ static int stm3210e_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, /* Buffer must be provided and aligned to a 16-bit address boundary */ - lcddbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0); /* Configure according to the LCD type */ @@ -952,7 +932,7 @@ static int stm3210e_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); - gvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n", + ginfo("fmt: %d xres: %d yres: %d nplanes: %d\n", g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes); memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s)); return OK; @@ -970,7 +950,7 @@ static int stm3210e_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno FAR struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(dev && pinfo && planeno == 0); - gvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); + ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); return OK; } @@ -986,7 +966,7 @@ static int stm3210e_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno static int stm3210e_getpower(struct lcd_dev_s *dev) { - gvdbg("power: %d\n", 0); + ginfo("power: %d\n", 0); return g_lcddev.power; } @@ -1038,7 +1018,7 @@ static int stm3210e_poweroff(void) static int stm3210e_setpower(struct lcd_dev_s *dev, int power) { - gvdbg("power: %d\n", power); + ginfo("power: %d\n", power); DEBUGASSERT((unsigned)power <= CONFIG_LCD_MAXPOWER); /* Set new power level */ @@ -1114,7 +1094,7 @@ static int stm3210e_setpower(struct lcd_dev_s *dev, int power) static int stm3210e_getcontrast(struct lcd_dev_s *dev) { - gvdbg("Not implemented\n"); + ginfo("Not implemented\n"); return -ENOSYS; } @@ -1128,7 +1108,7 @@ static int stm3210e_getcontrast(struct lcd_dev_s *dev) static int stm3210e_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) { - gvdbg("contrast: %d\n", contrast); + ginfo("contrast: %d\n", contrast); return -ENOSYS; } @@ -1321,7 +1301,7 @@ static inline void stm3210e_lcdinitialize(void) */ id = stm3210e_readreg(LCD_REG_0); - lcddbg("LCD ID: %04x\n", id); + lcdinfo("LCD ID: %04x\n", id); /* Check if the ID is for the SPFD5408B */ @@ -1331,7 +1311,7 @@ static inline void stm3210e_lcdinitialize(void) /* Set the LCD type for the SPFD5408B */ g_lcddev.type = LCD_TYPE_SPFD5408B; - lcddbg("LCD type: %d\n", g_lcddev.type); + lcdinfo("LCD type: %d\n", g_lcddev.type); /* Start Initial Sequence */ @@ -1436,7 +1416,7 @@ static inline void stm3210e_lcdinitialize(void) /* Set the LCD type for the R61580 */ g_lcddev.type = LCD_TYPE_R61580; - lcddbg("LCD type: %d\n", g_lcddev.type); + lcdinfo("LCD type: %d\n", g_lcddev.type); /* Start Initial Sequence */ @@ -1506,7 +1486,7 @@ static inline void stm3210e_lcdinitialize(void) /* Set the LCD type for the AM240320 */ g_lcddev.type = LCD_TYPE_AM240320; - lcddbg("LCD type: %d\n", g_lcddev.type); + lcdinfo("LCD type: %d\n", g_lcddev.type); /* Start Initial Sequence */ @@ -1595,7 +1575,7 @@ static inline void stm3210e_lcdinitialize(void) stm3210e_writereg(LCD_REG_3, 0x1018); stm3210e_writereg(LCD_REG_7, 0); /* Display off */ #else - lcddbg("Unsupported LCD type\n"); + lcderr("ERROR: Unsupported LCD type\n"); #endif } } @@ -1743,25 +1723,25 @@ static void stm3210e_backlight(void) /* Dump timer1 registers */ - lcddbg("APB2ENR: %08x\n", getreg32(STM32_RCC_APB2ENR)); - lcddbg("CR1: %04x\n", getreg32(STM32_TIM1_CR1)); - lcddbg("CR2: %04x\n", getreg32(STM32_TIM1_CR2)); - lcddbg("SMCR: %04x\n", getreg32(STM32_TIM1_SMCR)); - lcddbg("DIER: %04x\n", getreg32(STM32_TIM1_DIER)); - lcddbg("SR: %04x\n", getreg32(STM32_TIM1_SR)); - lcddbg("BDTR: %04x\n", getreg32(STM32_TIM1_BDTR)); - lcddbg("CCMR1: %04x\n", getreg32(STM32_TIM1_CCMR1)); - lcddbg("CCMR2: %04x\n", getreg32(STM32_TIM1_CCMR2)); - lcddbg("CCER: %04x\n", getreg32(STM32_TIM1_CCER)); - lcddbg("CNT: %04x\n", getreg32(STM32_TIM1_CNT)); - lcddbg("PSC: %04x\n", getreg32(STM32_TIM1_PSC)); - lcddbg("ARR: %04x\n", getreg32(STM32_TIM1_ARR)); - lcddbg("RCR: %04x\n", getreg32(STM32_TIM1_RCR)); - lcddbg("CCR1: %04x\n", getreg32(STM32_TIM1_CCR1)); - lcddbg("CCR2: %04x\n", getreg32(STM32_TIM1_CCR2)); - lcddbg("CCR3: %04x\n", getreg32(STM32_TIM1_CCR3)); - lcddbg("CCR4: %04x\n", getreg32(STM32_TIM1_CCR4)); - lcddbg("DMAR: %04x\n", getreg32(STM32_TIM1_DMAR)); + lcdinfo("APB2ENR: %08x\n", getreg32(STM32_RCC_APB2ENR)); + lcdinfo("CR1: %04x\n", getreg32(STM32_TIM1_CR1)); + lcdinfo("CR2: %04x\n", getreg32(STM32_TIM1_CR2)); + lcdinfo("SMCR: %04x\n", getreg32(STM32_TIM1_SMCR)); + lcdinfo("DIER: %04x\n", getreg32(STM32_TIM1_DIER)); + lcdinfo("SR: %04x\n", getreg32(STM32_TIM1_SR)); + lcdinfo("BDTR: %04x\n", getreg32(STM32_TIM1_BDTR)); + lcdinfo("CCMR1: %04x\n", getreg32(STM32_TIM1_CCMR1)); + lcdinfo("CCMR2: %04x\n", getreg32(STM32_TIM1_CCMR2)); + lcdinfo("CCER: %04x\n", getreg32(STM32_TIM1_CCER)); + lcdinfo("CNT: %04x\n", getreg32(STM32_TIM1_CNT)); + lcdinfo("PSC: %04x\n", getreg32(STM32_TIM1_PSC)); + lcdinfo("ARR: %04x\n", getreg32(STM32_TIM1_ARR)); + lcdinfo("RCR: %04x\n", getreg32(STM32_TIM1_RCR)); + lcdinfo("CCR1: %04x\n", getreg32(STM32_TIM1_CCR1)); + lcdinfo("CCR2: %04x\n", getreg32(STM32_TIM1_CCR2)); + lcdinfo("CCR3: %04x\n", getreg32(STM32_TIM1_CCR3)); + lcdinfo("CCR4: %04x\n", getreg32(STM32_TIM1_CCR4)); + lcdinfo("DMAR: %04x\n", getreg32(STM32_TIM1_DMAR)); #endif } #endif @@ -1786,16 +1766,16 @@ int board_lcd_initialize(void) int ret; #endif - gvdbg("Initializing\n"); + ginfo("Initializing\n"); /* Register to receive power management callbacks */ #ifdef CONFIG_PM ret = pm_register(&g_lcdcb); if (ret != OK) - { - lcddbg("ERROR: pm_register failed: %d\n", ret); - } + { + lcderr("ERROR: pm_register failed: %d\n", ret); + } #endif /* Configure GPIO pins and configure the FSMC to support the LCD */ diff --git a/configs/stm3210e-eval/src/stm32_leds.c b/configs/stm3210e-eval/src/stm32_leds.c index 66679b48a3247658d0fd35bf57afd54b780f2509..acdd62b1e584c70bc5782408a831606471df6e2c 100644 --- a/configs/stm3210e-eval/src/stm32_leds.c +++ b/configs/stm3210e-eval/src/stm32_leds.c @@ -57,18 +57,6 @@ * 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 - /* The following definitions map the encoded LED setting to GPIO settings */ #define STM3210E_LED1 (1 << 0) diff --git a/configs/stm3210e-eval/src/stm32_pmbuttons.c b/configs/stm3210e-eval/src/stm32_pmbuttons.c index 49be1db7e223cb8c4a2d243fe4d9207836f4a50e..3e723af37fb7441c2dd51e012a738fa50ee15e87 100644 --- a/configs/stm3210e-eval/src/stm32_pmbuttons.c +++ b/configs/stm3210e-eval/src/stm32_pmbuttons.c @@ -318,9 +318,9 @@ void stm32_pmbuttons(void) if (oldhandler != NULL) { - lowsyslog(LOG_WARNING, "WARNING: oldhandler:%p is not NULL! " - "Button events may be lost or aliased!\n", - oldhandler); + warn("WARNING: oldhandler:%p is not NULL! " + "Button events may be lost or aliased!\n", + oldhandler); } } #endif diff --git a/configs/stm3210e-eval/src/stm32_spi.c b/configs/stm3210e-eval/src/stm32_spi.c index b64df8d679a8c02330021f862ac7d9cca711ed31..4df6531cefbf5a7fd9554531c8d6c9b7dfa0dd71 100644 --- a/configs/stm3210e-eval/src/stm32_spi.c +++ b/configs/stm3210e-eval/src/stm32_spi.c @@ -53,32 +53,6 @@ #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -134,7 +108,7 @@ void weak_function stm32_spidev_initialize(void) #ifdef CONFIG_STM32_SPI1 void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); if (devid == SPIDEV_FLASH) { @@ -153,7 +127,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI2 void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -165,7 +139,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI3 void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) diff --git a/configs/stm3210e-eval/src/stm32_usbdev.c b/configs/stm3210e-eval/src/stm32_usbdev.c index 9864798835c786a5c775acafd23a08c8ce4674e4..89eed63bc9e971e5f81785e268cb74a0e25b8285 100644 --- a/configs/stm3210e-eval/src/stm32_usbdev.c +++ b/configs/stm3210e-eval/src/stm32_usbdev.c @@ -110,6 +110,5 @@ int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } - diff --git a/configs/stm3210e-eval/usbmsc/defconfig b/configs/stm3210e-eval/usbmsc/defconfig index 001c83e4f563a9d0dca2ef13d78ba241625cfdc9..4914b222edfb037c7ee4c437c1749ae1f54f42e2 100644 --- a/configs/stm3210e-eval/usbmsc/defconfig +++ b/configs/stm3210e-eval/usbmsc/defconfig @@ -42,10 +42,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -202,6 +204,7 @@ CONFIG_SDIO_DMA=y # CONFIG_ARCH_CHIP_STM32F103VE is not set CONFIG_ARCH_CHIP_STM32F103ZE=y # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -414,6 +417,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_DMACAPABLE is not set # CONFIG_STM32_FSMC_SRAM is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -425,12 +432,20 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device 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 + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -693,7 +708,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -701,6 +721,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -724,6 +745,8 @@ CONFIG_SDIO_PREFLIGHT=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -822,15 +845,18 @@ CONFIG_USBMSC_SCSI_STACKSIZE=2048 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -867,12 +893,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -948,6 +968,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -977,10 +998,10 @@ CONFIG_ARCH_HAVE_TLS=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -989,18 +1010,18 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1014,10 +1035,10 @@ CONFIG_ARCH_HAVE_TLS=y # 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_WEBSERVER is not set # # File System Utilities @@ -1041,8 +1062,8 @@ CONFIG_ARCH_HAVE_TLS=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1075,17 +1096,16 @@ CONFIG_ARCH_HAVE_TLS=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_USBMSC=y CONFIG_SYSTEM_USBMSC_NLUNS=1 @@ -1096,4 +1116,5 @@ CONFIG_SYSTEM_USBMSC_DEVPATH2="/dev/mmcsd1" CONFIG_SYSTEM_USBMSC_DEVMINOR3=2 CONFIG_SYSTEM_USBMSC_DEVPATH3="/dev/mmcsd2" # CONFIG_SYSTEM_USBMSC_DEBUGMM is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3210e-eval/usbserial/defconfig b/configs/stm3210e-eval/usbserial/defconfig index 4e6b606f27526993adb56f2ea866a5e11b67e832..f8223e3a144a823614c87f57af3efb345f3af80a 100644 --- a/configs/stm3210e-eval/usbserial/defconfig +++ b/configs/stm3210e-eval/usbserial/defconfig @@ -42,10 +42,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -200,6 +202,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set CONFIG_ARCH_CHIP_STM32F103ZE=y # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -411,6 +414,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_FSMC_SRAM is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -422,12 +429,20 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device 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 + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -680,7 +695,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -688,6 +708,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -700,6 +721,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -797,15 +819,18 @@ CONFIG_PL2303_PRODUCTSTR="USBdev Serial" # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -836,12 +861,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -914,6 +933,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -942,10 +962,10 @@ CONFIG_ARCH_HAVE_TLS=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -954,18 +974,18 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -979,11 +999,11 @@ CONFIG_ARCH_HAVE_TLS=y # 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=y CONFIG_EXAMPLES_USBSERIAL_BUFSIZE=512 # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -1005,8 +1025,8 @@ CONFIG_EXAMPLES_USBSERIAL_BUFSIZE=512 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1039,16 +1059,16 @@ CONFIG_EXAMPLES_USBSERIAL_BUFSIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3220g-eval/README.txt b/configs/stm3220g-eval/README.txt index c30383cbdfdddd21c6d69e5d5c95f014fa55992f..2ffb33194dafb5bae5e575aba4ab4b3c4633a2fa 100644 --- a/configs/stm3220g-eval/README.txt +++ b/configs/stm3220g-eval/README.txt @@ -486,7 +486,7 @@ Configuration Options: 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 + CONFIG_STM32_CAN_REGDEBUG - If CONFIG_DEBUG_FEATURES is set, this will generate an dump of all CAN registers. FSMC SRAM @@ -817,7 +817,7 @@ STM3220G-EVAL-specific Configuration Options 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 + CONFIG_STM32_CAN_REGDEBUG - If CONFIG_DEBUG_FEATURES is set, this will generate an dump of all CAN registers. STM3220G-EVAL LCD Hardware Configuration @@ -842,9 +842,9 @@ STM3220G-EVAL-specific Configuration Options CONFIG_STM32_OTGFS_SOFINTR - Enable SOF interrupts. Why would you ever want to do that? CONFIG_STM32_USBHOST_REGDEBUG - Enable very low-level register access - debug. Depends on CONFIG_DEBUG. + debug. Depends on CONFIG_DEBUG_FEATURES. CONFIG_STM32_USBHOST_PKTDUMP - Dump all incoming and outgoing USB - packets. Depends on CONFIG_DEBUG. + packets. Depends on CONFIG_DEBUG_FEATURES. Configurations ============== @@ -989,7 +989,7 @@ Where is one of the following: Special PWM-only debug options: - CONFIG_DEBUG_PWM + CONFIG_DEBUG_PWM_INFO 5. This example supports the CAN loopback test (apps/examples/can) but this must be manually enabled by selecting: @@ -1003,8 +1003,8 @@ Where is one of the following: Special CAN-only debug options: - CONFIG_DEBUG_CAN - CONFIG_CAN_REGDEBUG + CONFIG_DEBUG_CAN_INFO + CONFIG_STM32_CAN_REGDEBUG 6. This example can support an FTP client. In order to build in FTP client support simply reconfigure NuttX, adding: @@ -1087,7 +1087,6 @@ Where is one of the following: There are some special settings to make life with only a Telnet - CONFIG_SYSLOG=y - Enables the System Logging feature. CONFIG_RAMLOG=y - Enable the RAM-based logging feature. CONFIG_RAMLOG_CONSOLE=y - Use the RAM logger as the default console. This means that any console output from non-Telnet threads will diff --git a/configs/stm3220g-eval/dhcpd/defconfig b/configs/stm3220g-eval/dhcpd/defconfig index 1a09df8349a512112668e60ab24aae70bdcd76ef..0d999829eecbde5e2344feba801220309dd5acfe 100644 --- a/configs/stm3220g-eval/dhcpd/defconfig +++ b/configs/stm3220g-eval/dhcpd/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -207,6 +209,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set CONFIG_ARCH_CHIP_STM32F207IG=y @@ -432,6 +435,10 @@ CONFIG_STM32_JTAG_FULL_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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -449,9 +456,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART3_SERIALDRIVER=y # CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -696,7 +711,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -704,6 +724,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -754,6 +775,8 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -803,15 +826,18 @@ CONFIG_USART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -939,12 +965,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # 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 # @@ -1015,6 +1035,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1051,15 +1072,16 @@ CONFIG_EXAMPLES_DHCPD_NOMAC=y CONFIG_EXAMPLES_DHCPD_IPADDR=0x0a000001 CONFIG_EXAMPLES_DHCPD_DRIPADDR=0x0a000001 CONFIG_EXAMPLES_DHCPD_NETMASK=0xffffff00 +# CONFIG_EXAMPLES_DISCOVER 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1068,18 +1090,18 @@ CONFIG_EXAMPLES_DHCPD_NETMASK=0xffffff00 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1095,10 +1117,9 @@ CONFIG_EXAMPLES_DHCPD_NETMASK=0xffffff00 # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UDPBLASTER is not set -# CONFIG_EXAMPLES_DISCOVER is not set -# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -1120,8 +1141,8 @@ CONFIG_EXAMPLES_DHCPD_NETMASK=0xffffff00 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1146,15 +1167,15 @@ CONFIG_NETUTILS_DHCPD_NETMASK=0xffffff00 CONFIG_NETUTILS_DHCPD_DNSIP=0x08080808 CONFIG_NETUTILS_DHCPD_OFFERTIME=3600 CONFIG_NETUTILS_DHCPD_DECLINETIME=3600 +# CONFIG_NETUTILS_DISCOVER 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 -# CONFIG_NETUTILS_TFTPC is not set CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_PPPD is not set +# CONFIG_NETUTILS_SMTP is not set +# CONFIG_NETUTILS_TFTPC is not set # # NSH Library @@ -1173,16 +1194,16 @@ CONFIG_NETUTILS_NETLIB=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3220g-eval/ide/nsh/iar/libc.ewp b/configs/stm3220g-eval/ide/nsh/iar/libc.ewp index 8804fd90438463b9193f1934101e9fe4c40d8bbd..db57f8d8b93b3cd33d2328896827015e4bea2d0e 100644 --- a/configs/stm3220g-eval/ide/nsh/iar/libc.ewp +++ b/configs/stm3220g-eval/ide/nsh/iar/libc.ewp @@ -2631,9 +2631,6 @@ $PROJ_DIR$/../../../../../libc/syslog/lib_syslog.c - - $PROJ_DIR$/../../../../../libc/syslog/lib_lowsyslog.c - $PROJ_DIR$/../../../../../libc/syslog/lib_setlogmask.c diff --git a/configs/stm3220g-eval/ide/nsh/iar/libdrivers.ewp b/configs/stm3220g-eval/ide/nsh/iar/libdrivers.ewp index b009ac58d0feb304dc6691049489368fc90b90d0..0f2f399a3ec60b132b02f08bd491ec91b991dbff 100644 --- a/configs/stm3220g-eval/ide/nsh/iar/libdrivers.ewp +++ b/configs/stm3220g-eval/ide/nsh/iar/libdrivers.ewp @@ -1991,9 +1991,6 @@ $PROJ_DIR$/../../../../../drivers/mtd/at45db.c - - $PROJ_DIR$/../../../../../drivers/mtd/flash_eraseall.c - $PROJ_DIR$/../../../../../drivers/mtd/ftl.c diff --git a/configs/stm3220g-eval/ide/nsh/uvision/libc.uvproj b/configs/stm3220g-eval/ide/nsh/uvision/libc.uvproj index 5baf501cd84263ba625f5ca08fa3ca846febd708..31ee6e86a52c05f524c626d65fb714df32b41a19 100644 --- a/configs/stm3220g-eval/ide/nsh/uvision/libc.uvproj +++ b/configs/stm3220g-eval/ide/nsh/uvision/libc.uvproj @@ -1478,16 +1478,6 @@ 1 ../../../../../libc/symtab/symtab_findorderedbyvalue.c - - lib_syslog.c - 1 - ../../../../../libc/syslog/lib_syslog.c - - - lib_lowsyslog.c - 1 - ../../../../../libc/syslog/lib_lowsyslog.c - lib_setlogmask.c 1 diff --git a/configs/stm3220g-eval/ide/nsh/uvision/libdrivers.uvproj b/configs/stm3220g-eval/ide/nsh/uvision/libdrivers.uvproj index f1343317b79de9f97fd18bbc424477acd04864ef..f31ea50bf860b852db499b839ba5ed1177af70af 100644 --- a/configs/stm3220g-eval/ide/nsh/uvision/libdrivers.uvproj +++ b/configs/stm3220g-eval/ide/nsh/uvision/libdrivers.uvproj @@ -383,11 +383,6 @@ 1 ../../../../../drivers/mtd/at45db.c - - flash_eraseall.c - 1 - ../../../../../drivers/mtd/flash_eraseall.c - ftl.c 1 diff --git a/configs/stm3220g-eval/include/board.h b/configs/stm3220g-eval/include/board.h index d8dad32f74fe36ee01024f0ca22059cf655dad66..74d2b5bea787fc7afa5c16c8671dcf1b186fb734 100644 --- a/configs/stm3220g-eval/include/board.h +++ b/configs/stm3220g-eval/include/board.h @@ -1,8 +1,7 @@ /************************************************************************************ * configs/stm3220g-eval/include/board.h - * include/arch/board/board.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 @@ -162,8 +161,14 @@ * Note: TIM1,8 are on APB2, others on APB1 */ -#define STM32_TIM18_FREQUENCY STM32_HCLK_FREQUENCY -#define STM32_TIM27_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM1_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM2_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM3_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM4_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM5_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM6_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM7_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM8_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 diff --git a/configs/stm3220g-eval/nettest/defconfig b/configs/stm3220g-eval/nettest/defconfig index 59d9ac24fadb1178d3716c0faf7cb42cf4218644..061c77ea53e15c54553d27bec5af90e5dc6a6ffe 100644 --- a/configs/stm3220g-eval/nettest/defconfig +++ b/configs/stm3220g-eval/nettest/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -207,6 +209,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set CONFIG_ARCH_CHIP_STM32F207IG=y @@ -432,6 +435,10 @@ CONFIG_STM32_JTAG_FULL_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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -449,9 +456,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART3_SERIALDRIVER=y # CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -696,7 +711,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -704,6 +724,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -755,6 +776,8 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -803,15 +826,18 @@ CONFIG_USART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -944,12 +970,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # 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 # @@ -1019,6 +1039,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1056,10 +1077,10 @@ CONFIG_HAVE_CXXINITIALIZE=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1082,18 +1103,18 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1107,9 +1128,9 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # @@ -1132,8 +1153,8 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1147,9 +1168,9 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set # CONFIG_NETUTILS_XMLRPC is not set @@ -1171,16 +1192,16 @@ CONFIG_NETUTILS_NETLIB=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3220g-eval/nsh/defconfig b/configs/stm3220g-eval/nsh/defconfig index aca94bb076c967989608268f6190ab9d9cf77b61..fd7610f652cc344da997b9984f5f129024103304 100644 --- a/configs/stm3220g-eval/nsh/defconfig +++ b/configs/stm3220g-eval/nsh/defconfig @@ -42,10 +42,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set CONFIG_ARCH_CHIP_STM32F207IG=y @@ -425,6 +428,10 @@ CONFIG_STM32_JTAG_FULL_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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -442,9 +449,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART3_SERIALDRIVER=y # CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -726,7 +741,12 @@ CONFIG_RTC_DATETIME=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -734,6 +754,7 @@ CONFIG_RTC_DATETIME=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -763,6 +784,7 @@ CONFIG_MTD=y # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set # CONFIG_MTD_N25QXXX is not set @@ -821,6 +843,8 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -870,15 +894,18 @@ CONFIG_USART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -1032,12 +1059,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -1122,6 +1143,7 @@ CONFIG_NETDB_DNSSERVER_IPv4ADDR=0x0a000001 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1159,16 +1181,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1179,17 +1202,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1197,8 +1220,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1206,14 +1229,14 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UDPBLASTER is not set -# CONFIG_EXAMPLES_DISCOVER is not set -# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -1233,8 +1256,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1247,21 +1270,21 @@ 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_DISCOVER is not set # CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1364,6 +1387,7 @@ CONFIG_NSH_CONSOLE=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1394,14 +1418,14 @@ CONFIG_NSH_MAX_ROUNDTRIP=20 # # 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_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_I2CTOOL is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1410,6 +1434,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3220g-eval/nsh2/defconfig b/configs/stm3220g-eval/nsh2/defconfig index b689019b0163f1e1c3405f0aba730e7e5ddaa9d0..263355865c2789169e84f1ee6a0263c5f24cc31c 100644 --- a/configs/stm3220g-eval/nsh2/defconfig +++ b/configs/stm3220g-eval/nsh2/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -208,6 +210,7 @@ CONFIG_SDIO_DMA=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set CONFIG_ARCH_CHIP_STM32F207IG=y @@ -435,6 +438,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_DMACAPABLE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -740,7 +747,12 @@ CONFIG_RTC_DATETIME=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -748,6 +760,7 @@ CONFIG_RTC_DATETIME=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -782,6 +795,7 @@ CONFIG_MTD=y # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set # CONFIG_MTD_N25QXXX is not set @@ -841,6 +855,8 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y +# CONFIG_SERIAL_REMOVABLE is not set +# CONFIG_SERIAL_CONSOLE is not set # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -874,19 +890,22 @@ CONFIG_SERIAL=y # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set CONFIG_RAMLOG=y -CONFIG_RAMLOG_SYSLOG=y CONFIG_RAMLOG_BUFSIZE=1024 # CONFIG_RAMLOG_CRLF is not set CONFIG_RAMLOG_NONBLOCKING=y CONFIG_RAMLOG_NPOLLWAITERS=4 +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_RAMLOG_SYSLOG=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -1040,13 +1059,6 @@ CONFIG_FAT_MAXFNAME=32 # CONFIG_FS_PROCFS 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 # @@ -1130,6 +1142,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1167,16 +1180,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1187,17 +1201,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1205,8 +1219,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1214,16 +1228,16 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # 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_WEBSERVER is not set # CONFIG_EXAMPLES_XMLRPC is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -1243,8 +1257,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1258,22 +1272,22 @@ 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_DISCOVER 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 +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1375,6 +1389,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1419,12 +1434,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=1 CONFIG_I2CTOOL_MAXBUS=3 @@ -1432,7 +1447,7 @@ CONFIG_I2CTOOL_MINADDR=0x03 CONFIG_I2CTOOL_MAXADDR=0x77 CONFIG_I2CTOOL_MAXREGADDR=0xff CONFIG_I2CTOOL_DEFFREQ=100000 -# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1441,6 +1456,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3220g-eval/nxwm/defconfig b/configs/stm3220g-eval/nxwm/defconfig index fadce2d0abcdddbbe6892dd4926271b729132d20..1ab3afe8326225ba3ddf6b4d279cbaf3d73da394 100644 --- a/configs/stm3220g-eval/nxwm/defconfig +++ b/configs/stm3220g-eval/nxwm/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -207,6 +209,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set CONFIG_ARCH_CHIP_STM32F207IG=y @@ -434,6 +437,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_FSMC_SRAM is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -451,9 +458,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART3_SERIALDRIVER=y # CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -593,7 +608,14 @@ CONFIG_NSH_MMCSDSLOTNO=0 # CONFIG_STM32_ILI9325_DISABLE is not set CONFIG_STM3220G_LCD=y CONFIG_LCD_RDSHIFT=5 -# CONFIG_LIB_BOARDCTL is not set +CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_RESET is not set +# CONFIG_BOARDCTL_UNIQUEID is not set +CONFIG_BOARDCTL_TSCTEST=y +# 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 @@ -766,10 +788,14 @@ CONFIG_STMPE811_TEMP_DISABLE=y # CONFIG_DJOYSTICK is not set # CONFIG_AJOYSTICK is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set CONFIG_LCD_NOGETRUN=y @@ -797,12 +823,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set - -# -# Alphanumeric/Segment LCD Devices -# -# CONFIG_LCD_LCD1602 is not set -# CONFIG_LCD_BACKPACK is not set +# CONFIG_SLCD is not set # # LED Support @@ -810,6 +831,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -870,6 +892,8 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -919,15 +943,18 @@ CONFIG_USART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -1080,12 +1107,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -1272,6 +1293,7 @@ CONFIG_LIBC_NETDB=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1304,16 +1326,17 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -1324,18 +1347,18 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1351,10 +1374,10 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # 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_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # @@ -1379,8 +1402,8 @@ CONFIG_HAVE_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1392,21 +1415,21 @@ CONFIG_HAVE_CXXINITIALIZE=y # # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1506,6 +1529,7 @@ CONFIG_NSH_CONSOLE=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1546,6 +1570,7 @@ CONFIG_NXWIDGETS=y # NX Server/Device Configuration # CONFIG_NXWIDGETS_FLICKERFREE=y +# CONFIG_NXWIDGETS_EXTERNINIT is not set CONFIG_NXWIDGETS_DEVNO=0 CONFIG_NXWIDGET_SERVERINIT=y CONFIG_NXWIDGETS_SERVERPRIO=110 @@ -1726,13 +1751,13 @@ CONFIG_NXWM_HEXCALCULATOR_FONTID=5 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_I2CTOOL is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1741,6 +1766,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3220g-eval/src/stm32_adc.c b/configs/stm3220g-eval/src/stm32_adc.c index f79ca23c535f6046635765c0b7b65401b19f6f57..9db71d0bd06fd3b118d3049b3b98572c761b76e1 100644 --- a/configs/stm3220g-eval/src/stm32_adc.c +++ b/configs/stm3220g-eval/src/stm32_adc.c @@ -140,7 +140,7 @@ int board_adc_setup(void) adc = stm32_adcinitialize(3, g_chanlist, ADC3_NCHANNELS); if (adc == NULL) { - adbg("ERROR: Failed to get ADC interface\n"); + aerr("ERROR: Failed to get ADC interface\n"); return -ENODEV; } @@ -149,7 +149,7 @@ int board_adc_setup(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - adbg("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } diff --git a/configs/stm3220g-eval/src/stm32_appinit.c b/configs/stm3220g-eval/src/stm32_appinit.c index 89795b54d50a478650e660bf9f508140c81fb1d4..93ed87e3c4b932750ac57752fba73957fbcb40e4 100644 --- a/configs/stm3220g-eval/src/stm32_appinit.c +++ b/configs/stm3220g-eval/src/stm32_appinit.c @@ -142,14 +142,14 @@ static void stm32_i2c_register(int bus) i2c = stm32_i2cbus_initialize(bus); if (i2c == NULL) { - dbg("ERROR: Failed to get I2C%d interface\n", bus); + _err("ERROR: Failed to get I2C%d interface\n", bus); } else { ret = i2c_register(i2c, bus); if (ret < 0) { - dbg("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); + _err("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); stm32_i2cbus_uninitialize(i2c); } } diff --git a/configs/stm3220g-eval/src/stm32_autoleds.c b/configs/stm3220g-eval/src/stm32_autoleds.c index e2d5a67aa1a09634f7762a1e29f0dae1e81f50dd..476816cac11256148dea4c539d4b7b4d473b094e 100644 --- a/configs/stm3220g-eval/src/stm32_autoleds.c +++ b/configs/stm3220g-eval/src/stm32_autoleds.c @@ -58,18 +58,6 @@ * 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 - /* The following definitions map the encoded LED setting to GPIO settings */ #define STM3210E_LED1 (1 << 0) diff --git a/configs/stm3220g-eval/src/stm32_can.c b/configs/stm3220g-eval/src/stm32_can.c index 1c9b4fda7712d4b5f7b2fbf2daa3a48abba7d5cd..a7a7bf2e1778854d9ee6d199d50d73d076fab961 100644 --- a/configs/stm3220g-eval/src/stm32_can.c +++ b/configs/stm3220g-eval/src/stm32_can.c @@ -70,25 +70,6 @@ # define CAN_PORT 2 #endif -/* 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 - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -117,7 +98,7 @@ int board_can_initialize(void) can = stm32_caninitialize(CAN_PORT); if (can == NULL) { - candbg("ERROR: Failed to get CAN interface\n"); + canerr("ERROR: Failed to get CAN interface\n"); return -ENODEV; } @@ -126,7 +107,7 @@ int board_can_initialize(void) ret = can_register("/dev/can0", can); if (ret < 0) { - candbg("ERROR: can_register failed: %d\n", ret); + canerr("ERROR: can_register failed: %d\n", ret); return ret; } diff --git a/configs/stm3220g-eval/src/stm32_lcd.c b/configs/stm3220g-eval/src/stm32_lcd.c index 43ef81fe3eff10cb337fa979efba95e8018c6c6f..f2002c137131696603a963524e4fb5dbb213d0bc 100644 --- a/configs/stm3220g-eval/src/stm32_lcd.c +++ b/configs/stm3220g-eval/src/stm32_lcd.c @@ -33,6 +33,7 @@ * POSSIBILITY OF SUCH DAMAGE. * **************************************************************************************/ + /* This driver supports the following LCDs on the STM324xG_EVAL board: * * AM-240320L8TNQW00H (LCD_ILI9320 or LCD_ILI9321) OR @@ -109,20 +110,6 @@ # define CONFIG_LCD_LANDSCAPE 1 #endif -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must - * also be enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif - /* Display/Color Properties ***********************************************************/ /* Display Resolution */ @@ -262,16 +249,6 @@ #define ILI9321_ID 0x9321 #define ILI9325_ID 0x9325 -/* Debug ******************************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /************************************************************************************** * Private Type Definition **************************************************************************************/ @@ -586,7 +563,7 @@ static int stm3220g_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *bu /* Buffer must be provided and aligned to a 16-bit address boundary */ - lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0); /* Write the run to GRAM. */ @@ -704,7 +681,7 @@ static int stm3220g_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, /* Buffer must be provided and aligned to a 16-bit address boundary */ - lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0); /* Configure according to the LCD type. Kind of silly with only one LCD type. */ @@ -830,7 +807,7 @@ static int stm3220g_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); - lcdvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n", + lcdinfo("fmt: %d xres: %d yres: %d nplanes: %d\n", g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes); memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s)); return OK; @@ -848,7 +825,7 @@ static int stm3220g_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno FAR struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(dev && pinfo && planeno == 0); - lcdvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); + lcdinfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); return OK; } @@ -864,7 +841,7 @@ static int stm3220g_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno static int stm3220g_getpower(struct lcd_dev_s *dev) { - lcdvdbg("power: %d\n", 0); + lcdinfo("power: %d\n", 0); return g_lcddev.power; } @@ -900,7 +877,7 @@ static int stm3220g_poweroff(void) static int stm3220g_setpower(struct lcd_dev_s *dev, int power) { - lcdvdbg("power: %d\n", power); + lcdinfo("power: %d\n", power); DEBUGASSERT((unsigned)power <= CONFIG_LCD_MAXPOWER); /* Set new power level */ @@ -934,7 +911,7 @@ static int stm3220g_setpower(struct lcd_dev_s *dev, int power) static int stm3220g_getcontrast(struct lcd_dev_s *dev) { - lcdvdbg("Not implemented\n"); + lcdinfo("Not implemented\n"); return -ENOSYS; } @@ -948,7 +925,7 @@ static int stm3220g_getcontrast(struct lcd_dev_s *dev) static int stm3220g_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) { - lcdvdbg("contrast: %d\n", contrast); + lcdinfo("contrast: %d\n", contrast); return -ENOSYS; } @@ -967,7 +944,7 @@ static inline void stm3220g_lcdinitialize(void) /* Check LCD ID */ id = stm3220g_readreg(LCD_REG_0); - lcddbg("LCD ID: %04x\n", id); + lcdinfo("LCD ID: %04x\n", id); /* Check if the ID is for the STM32_ILI9320 (or ILI9321) or STM32_ILI9325 */ @@ -996,7 +973,7 @@ static inline void stm3220g_lcdinitialize(void) #else /* if !defined(CONFIG_STM32_ILI9325_DISABLE) */ g_lcddev.type = LCD_TYPE_ILI9325; #endif - lcddbg("LCD type: %d\n", g_lcddev.type); + lcdinfo("LCD type: %d\n", g_lcddev.type); /* Start Initial Sequence */ @@ -1114,7 +1091,7 @@ static inline void stm3220g_lcdinitialize(void) } else { - lcddbg("Unsupported LCD type\n"); + lcderr("ERROR: Unsupported LCD type\n"); } } @@ -1134,7 +1111,7 @@ static inline void stm3220g_lcdinitialize(void) int board_lcd_initialize(void) { - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); /* Configure GPIO pins and configure the FSMC to support the LCD */ diff --git a/configs/stm3220g-eval/src/stm32_pwm.c b/configs/stm3220g-eval/src/stm32_pwm.c index 9c0467138a924d7b327e76dc367d99f328aba8bc..b934120856c00559ef586cd9b7750760e44983cb 100644 --- a/configs/stm3220g-eval/src/stm32_pwm.c +++ b/configs/stm3220g-eval/src/stm32_pwm.c @@ -97,7 +97,7 @@ int board_pwm_setup(void) pwm = stm32_pwminitialize(STM3220G_EVAL_PWMTIMER); if (!pwm) { - dbg("Failed to get the STM32 PWM lower half\n"); + aerr("ERROR: Failed to get the STM32 PWM lower half\n"); return -ENODEV; } @@ -106,7 +106,7 @@ int board_pwm_setup(void) ret = pwm_register("/dev/pwm0", pwm); if (ret < 0) { - adbg("pwm_register failed: %d\n", ret); + aerr("ERROR: pwm_register failed: %d\n", ret); return ret; } diff --git a/configs/stm3220g-eval/src/stm32_spi.c b/configs/stm3220g-eval/src/stm32_spi.c index 5f6332c7fcaf7987987326946bae5093d295c381..9e171b9bfaf551eb61980d5789473c659c554791 100644 --- a/configs/stm3220g-eval/src/stm32_spi.c +++ b/configs/stm3220g-eval/src/stm32_spi.c @@ -53,32 +53,6 @@ #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -124,7 +98,7 @@ void weak_function stm32_spidev_initialize(void) #ifdef CONFIG_STM32_SPI1 void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -136,7 +110,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI2 void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -148,7 +122,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI3 void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) diff --git a/configs/stm3220g-eval/src/stm32_stmpe811.c b/configs/stm3220g-eval/src/stm32_stmpe811.c index c3fcf6de4b05833bab1ff8c4079867e242c2032b..5748600e9574dff469763ba981afb3e99ee03170 100644 --- a/configs/stm3220g-eval/src/stm32_stmpe811.c +++ b/configs/stm3220g-eval/src/stm32_stmpe811.c @@ -211,7 +211,7 @@ static int stmpe811_attach(FAR struct stmpe811_config_s *state, xcpt_t isr) { FAR struct stm32_stmpe811config_s *priv = (FAR struct stm32_stmpe811config_s *)state; - ivdbg("Saving handler %p\n", isr); + iinfo("Saving handler %p\n", isr); DEBUGASSERT(priv); /* Just save the handler. We will use it when EXTI interruptsare enabled */ @@ -279,14 +279,14 @@ int board_tsc_setup(int minor) FAR struct i2c_master_s *dev; int ret; - idbg("minor %d\n", minor); + iinfo("minor %d\n", minor); DEBUGASSERT(minor == 0); /* Check if we are already initialized */ if (!g_stmpe811config.handle) { - ivdbg("Initializing\n"); + iinfo("Initializing\n"); /* Configure the STMPE811 interrupt pin as an input */ @@ -297,7 +297,7 @@ int board_tsc_setup(int minor) dev = stm32_i2cbus_initialize(CONFIG_STMPE811_I2CDEV); if (!dev) { - idbg("Failed to initialize I2C bus %d\n", CONFIG_STMPE811_I2CDEV); + ierr("ERROR: Failed to initialize I2C bus %d\n", CONFIG_STMPE811_I2CDEV); return -ENODEV; } @@ -307,7 +307,7 @@ int board_tsc_setup(int minor) stmpe811_instantiate(dev, (FAR struct stmpe811_config_s *)&g_stmpe811config); if (!g_stmpe811config.handle) { - idbg("Failed to instantiate the STMPE811 driver\n"); + ierr("ERROR: Failed to instantiate the STMPE811 driver\n"); return -ENODEV; } @@ -316,7 +316,7 @@ int board_tsc_setup(int minor) ret = stmpe811_register(g_stmpe811config.handle, CONFIG_STMPE811_DEVMINOR); if (ret < 0) { - idbg("Failed to register STMPE driver: %d\n", ret); + ierr("ERROR: Failed to register STMPE driver: %d\n", ret); /* stm32_i2cbus_uninitialize(dev); */ return -ENODEV; } diff --git a/configs/stm3220g-eval/src/stm32_usb.c b/configs/stm3220g-eval/src/stm32_usb.c index 3d0e183b6118a8a1e5ac9d042918273c13a1d505..adecafb76df87b9d030a938fdbc791b24223887e 100644 --- a/configs/stm3220g-eval/src/stm32_usb.c +++ b/configs/stm3220g-eval/src/stm32_usb.c @@ -106,13 +106,13 @@ static int usbhost_waiter(int argc, char *argv[]) { struct usbhost_hubport_s *hport; - uvdbg("Running\n"); + uinfo("Running\n"); for (;;) { /* Wait for the device to change state */ DEBUGVERIFY(CONN_WAIT(g_usbconn, &hport)); - uvdbg("%s\n", hport->connected ? "connected" : "disconnected"); + uinfo("%s\n", hport->connected ? "connected" : "disconnected"); /* Did we just become connected? */ @@ -176,7 +176,7 @@ int stm32_usbhost_initialize(void) * that we care about: */ - uvdbg("Register class drivers\n"); + uinfo("Register class drivers\n"); #ifdef CONFIG_USBHOST_MSC /* Register the USB mass storage class class */ @@ -184,7 +184,7 @@ int stm32_usbhost_initialize(void) ret = usbhost_msc_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the mass storage class: %d\n", ret); + uerr("ERROR: Failed to register the mass storage class: %d\n", ret); } #endif @@ -194,19 +194,19 @@ int stm32_usbhost_initialize(void) ret = usbhost_cdcacm_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret); + uerr("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret); } #endif /* Then get an instance of the USB host interface */ - uvdbg("Initialize USB host\n"); + uinfo("Initialize USB host\n"); g_usbconn = stm32_otgfshost_initialize(0); if (g_usbconn) { /* Start a thread to handle device connection. */ - uvdbg("Start usbhost_waiter\n"); + uinfo("Start usbhost_waiter\n"); pid = task_create("usbhost", CONFIG_USBHOST_DEFPRIO, CONFIG_USBHOST_STACKSIZE, @@ -300,7 +300,7 @@ xcpt_t stm32_setup_overcurrent(xcpt_t handler) #ifdef CONFIG_USBDEV void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } #endif diff --git a/configs/stm3220g-eval/src/stm32_userleds.c b/configs/stm3220g-eval/src/stm32_userleds.c index 182e3b17529d08b4c8e16ade0ec1885d91b9cf2b..a94c8c360fc0d5b9aeb1c4d367944d237bb4c916 100644 --- a/configs/stm3220g-eval/src/stm32_userleds.c +++ b/configs/stm3220g-eval/src/stm32_userleds.c @@ -53,22 +53,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data ****************************************************************************/ diff --git a/configs/stm3220g-eval/telnetd/defconfig b/configs/stm3220g-eval/telnetd/defconfig index 2e65dced62706fb1e7729b16dafd60d99f070355..9e57584d8e913dbc18781bb4bff4bd2468e608b1 100644 --- a/configs/stm3220g-eval/telnetd/defconfig +++ b/configs/stm3220g-eval/telnetd/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -207,6 +209,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set CONFIG_ARCH_CHIP_STM32F207IG=y @@ -432,6 +435,10 @@ CONFIG_STM32_JTAG_FULL_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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -449,9 +456,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART3_SERIALDRIVER=y # CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -696,7 +711,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -704,6 +724,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -757,6 +778,8 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -805,15 +828,18 @@ CONFIG_USART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -946,12 +972,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # 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 # @@ -1021,6 +1041,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1058,10 +1079,10 @@ CONFIG_HAVE_CXXINITIALIZE=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1071,18 +1092,18 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1104,9 +1125,9 @@ CONFIG_EXAMPLES_TELNETD_CLIENTPRIO=128 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_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # @@ -1129,8 +1150,8 @@ CONFIG_EXAMPLES_TELNETD_CLIENTSTACKSIZE=2048 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1144,9 +1165,9 @@ CONFIG_EXAMPLES_TELNETD_CLIENTSTACKSIZE=2048 # CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set # CONFIG_NETUTILS_XMLRPC is not set @@ -1168,16 +1189,16 @@ CONFIG_NETUTILS_NETLIB=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3240g-eval/README.txt b/configs/stm3240g-eval/README.txt index e6dfe3cf53bd26fe95e31cef83bc6b2fa89ba657..9b2e6b97cc865fedafc6347cb698a9de0eed9fd7 100644 --- a/configs/stm3240g-eval/README.txt +++ b/configs/stm3240g-eval/README.txt @@ -382,7 +382,7 @@ Configuration Options: 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 + CONFIG_STM32_CAN_REGDEBUG - If CONFIG_DEBUG_FEATURES is set, this will generate an dump of all CAN registers. FPU @@ -810,7 +810,7 @@ STM3240G-EVAL-specific Configuration Options 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 + CONFIG_STM32_CAN_REGDEBUG - If CONFIG_DEBUG_FEATURES is set, this will generate an dump of all CAN registers. STM3240G-EVAL LCD Hardware Configuration @@ -877,9 +877,9 @@ STM3240G-EVAL-specific Configuration Options CONFIG_STM32_OTGFS_SOFINTR - Enable SOF interrupts. Why would you ever want to do that? CONFIG_STM32_USBHOST_REGDEBUG - Enable very low-level register access - debug. Depends on CONFIG_DEBUG. + debug. Depends on CONFIG_DEBUG_FEATURES. CONFIG_STM32_USBHOST_PKTDUMP - Dump all incoming and outgoing USB - packets. Depends on CONFIG_DEBUG. + packets. Depends on CONFIG_DEBUG_FEATURES. Configurations ============== @@ -1165,7 +1165,7 @@ Where is one of the following: Special PWM-only debug options: - CONFIG_DEBUG_PWM + CONFIG_DEBUG_PWM_INFO 5. This example supports the CAN loopback test (apps/examples/can) but this must be manually enabled by selecting: @@ -1179,8 +1179,8 @@ Where is one of the following: Special CAN-only debug options: - CONFIG_DEBUG_CAN - CONFIG_CAN_REGDEBUG + CONFIG_DEBUG_CAN_INFO + CONFIG_STM32_CAN_REGDEBUG 6. This example can support an FTP client. In order to build in FTP client support simply uncomment the following lines in the defconfig file (before @@ -1327,7 +1327,6 @@ Where is one of the following: There are some special settings to make life with only a Telnet - CONFIG_SYSLOG=y - Enables the System Logging feature. CONFIG_RAMLOG=y - Enable the RAM-based logging feature. CONFIG_RAMLOG_CONSOLE=y - Use the RAM logger as the default console. This means that any console output from non-Telnet threads will diff --git a/configs/stm3240g-eval/dhcpd/defconfig b/configs/stm3240g-eval/dhcpd/defconfig index e78e7312170eda05e4d877de58e14692196904d6..368ea6cf041c303f83f6902d71feecfdc5bbc100 100644 --- a/configs/stm3240g-eval/dhcpd/defconfig +++ b/configs/stm3240g-eval/dhcpd/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -208,6 +210,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -435,6 +438,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -453,9 +460,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART3_SERIALDRIVER=y # CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -700,7 +715,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -708,6 +728,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -758,6 +779,8 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -807,15 +830,18 @@ CONFIG_USART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -943,12 +969,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # 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 # @@ -1019,6 +1039,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1055,15 +1076,16 @@ CONFIG_EXAMPLES_DHCPD_NOMAC=y CONFIG_EXAMPLES_DHCPD_IPADDR=0x0a000001 CONFIG_EXAMPLES_DHCPD_DRIPADDR=0x0a000001 CONFIG_EXAMPLES_DHCPD_NETMASK=0xffffff00 +# CONFIG_EXAMPLES_DISCOVER 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1072,18 +1094,18 @@ CONFIG_EXAMPLES_DHCPD_NETMASK=0xffffff00 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1099,10 +1121,9 @@ CONFIG_EXAMPLES_DHCPD_NETMASK=0xffffff00 # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UDPBLASTER is not set -# CONFIG_EXAMPLES_DISCOVER is not set -# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -1124,8 +1145,8 @@ CONFIG_EXAMPLES_DHCPD_NETMASK=0xffffff00 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1150,15 +1171,15 @@ CONFIG_NETUTILS_DHCPD_NETMASK=0xffffff00 CONFIG_NETUTILS_DHCPD_DNSIP=0x08080808 CONFIG_NETUTILS_DHCPD_OFFERTIME=3600 CONFIG_NETUTILS_DHCPD_DECLINETIME=3600 +# CONFIG_NETUTILS_DISCOVER 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 -# CONFIG_NETUTILS_TFTPC is not set CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_PPPD is not set +# CONFIG_NETUTILS_SMTP is not set +# CONFIG_NETUTILS_TFTPC is not set # # NSH Library @@ -1177,16 +1198,16 @@ CONFIG_NETUTILS_NETLIB=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3240g-eval/discover/defconfig b/configs/stm3240g-eval/discover/defconfig index 6e6116857e0e94c8e186a57cfd05f3c8f63a0177..a6948166b70c9324d15093478b53ab310c185c41 100644 --- a/configs/stm3240g-eval/discover/defconfig +++ b/configs/stm3240g-eval/discover/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -200,6 +202,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -428,6 +431,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -446,9 +453,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART3_SERIALDRIVER=y # CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -722,7 +737,12 @@ CONFIG_I2C_POLLED=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -730,6 +750,7 @@ CONFIG_I2C_POLLED=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -781,6 +802,8 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -830,15 +853,18 @@ CONFIG_USART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -991,12 +1017,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -1081,6 +1101,7 @@ CONFIG_NETDB_DNSSERVER_IPv4ADDR=0x0a000001 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1113,16 +1134,21 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set +CONFIG_EXAMPLES_DISCOVER=y +CONFIG_EXAMPLES_DISCOVER_DHCPC=y +CONFIG_EXAMPLES_DISCOVER_NOMAC=y +CONFIG_EXAMPLES_DISCOVER_DRIPADDR=0xc0a80201 +CONFIG_EXAMPLES_DISCOVER_NETMASK=0xffffff00 # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1132,18 +1158,18 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1159,14 +1185,9 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UDPBLASTER is not set -CONFIG_EXAMPLES_DISCOVER=y -CONFIG_EXAMPLES_DISCOVER_DHCPC=y -CONFIG_EXAMPLES_DISCOVER_NOMAC=y -CONFIG_EXAMPLES_DISCOVER_DRIPADDR=0xc0a80201 -CONFIG_EXAMPLES_DISCOVER_NETMASK=0xffffff00 -# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # @@ -1191,8 +1212,8 @@ CONFIG_EXAMPLES_DISCOVER_NETMASK=0xffffff00 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1205,25 +1226,25 @@ CONFIG_EXAMPLES_DISCOVER_NETMASK=0xffffff00 # CONFIG_NETUTILS_CODECS is not set CONFIG_NETUTILS_DHCPC=y # CONFIG_NETUTILS_DHCPD is not set +CONFIG_NETUTILS_DISCOVER=y +CONFIG_DISCOVER_STACK_SIZE=1024 +CONFIG_DISCOVER_PRIORITY=50 +CONFIG_DISCOVER_PORT=96 +CONFIG_DISCOVER_INTERFACE="eth0" +CONFIG_DISCOVER_DEVICE_CLASS=0xff +CONFIG_DISCOVER_DESCR="STM3240G-EVAL" # CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set # CONFIG_NETUTILS_TFTPC is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -CONFIG_NETUTILS_DISCOVER=y -CONFIG_DISCOVER_STACK_SIZE=1024 -CONFIG_DISCOVER_PRIORITY=50 -CONFIG_DISCOVER_PORT=96 -CONFIG_DISCOVER_INTERFACE="eth0" -CONFIG_DISCOVER_DEVICE_CLASS=0xff -CONFIG_DISCOVER_DESCR="STM3240G-EVAL" # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1242,18 +1263,18 @@ CONFIG_DISCOVER_DESCR="STM3240G-EVAL" # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_I2CTOOL is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3240g-eval/include/board.h b/configs/stm3240g-eval/include/board.h index d693bdacf652c155c6789c2c79939072610c945b..674d58000e27b466b3255c68422652ad2b29e6b0 100644 --- a/configs/stm3240g-eval/include/board.h +++ b/configs/stm3240g-eval/include/board.h @@ -2,7 +2,7 @@ * configs/stm3240g-eval/include/board.h * include/arch/board/board.h * - * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -161,8 +161,14 @@ * Note: TIM1,8 are on APB2, others on APB1 */ -#define STM32_TIM18_FREQUENCY STM32_HCLK_FREQUENCY -#define STM32_TIM27_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM1_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM2_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM3_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM4_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM5_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM6_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM7_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM8_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 diff --git a/configs/stm3240g-eval/knxwm/defconfig b/configs/stm3240g-eval/knxwm/defconfig index fe098b72e1a16bbef465a5f219ebf985d5cfeb16..0c9c596c53f6e8644ac8ca884fb9d1f4d26c0185 100644 --- a/configs/stm3240g-eval/knxwm/defconfig +++ b/configs/stm3240g-eval/knxwm/defconfig @@ -51,10 +51,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -215,6 +217,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -444,6 +447,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set # CONFIG_STM32_FSMC_SRAM is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -462,9 +469,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART3_SERIALDRIVER=y # CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -586,7 +601,14 @@ CONFIG_STM3240G_LCD_RDSHIFT=5 # CONFIG_STM3240G_ILI9325_DISABLE is not set CONFIG_STM3240G_BOARDINIT_PRIO=196 CONFIG_STM3240G_BOARDINIT_STACK=2048 -# CONFIG_LIB_BOARDCTL is not set +CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_RESET is not set +# CONFIG_BOARDCTL_UNIQUEID is not set +CONFIG_BOARDCTL_TSCTEST=y +# 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 @@ -761,10 +783,14 @@ CONFIG_STMPE811_TEMP_DISABLE=y # CONFIG_DJOYSTICK is not set # CONFIG_AJOYSTICK is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set CONFIG_LCD_NOGETRUN=y @@ -792,12 +818,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set - -# -# Alphanumeric/Segment LCD Devices -# -# CONFIG_LCD_LCD1602 is not set -# CONFIG_LCD_BACKPACK is not set +# CONFIG_SLCD is not set # # LED Support @@ -805,6 +826,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -816,6 +838,8 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -865,15 +889,18 @@ CONFIG_USART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -917,12 +944,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -1096,6 +1117,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set CONFIG_LIB_USRWORK=y CONFIG_LIB_USRWORKPRIORITY=100 CONFIG_LIB_USRWORKPERIOD=100000 @@ -1138,9 +1160,9 @@ CONFIG_CXX_NEWLONG=y # CONFIG_EXAMPLES_FTPD is not set # CONFIG_EXAMPLES_HELLO is not set # CONFIG_EXAMPLES_HELLOXX is not set +# CONFIG_EXAMPLES_IGMP is not set # CONFIG_EXAMPLES_JSON is not set # CONFIG_EXAMPLES_KEYPADTEST is not set -# CONFIG_EXAMPLES_IGMP is not set # CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -1150,18 +1172,18 @@ CONFIG_CXX_NEWLONG=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1175,9 +1197,10 @@ CONFIG_CXX_NEWLONG=y # 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_WEBSERVER is not set # # File System Utilities @@ -1201,8 +1224,8 @@ CONFIG_CXX_NEWLONG=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1232,6 +1255,7 @@ CONFIG_NXWIDGETS=y # NX Server/Device Configuration # CONFIG_NXWIDGETS_FLICKERFREE=y +# CONFIG_NXWIDGETS_EXTERNINIT is not set CONFIG_NXWIDGETS_DEVNO=0 CONFIG_NXWIDGETS_CLIENTPRIO=100 CONFIG_NXWIDGETS_LISTENERPRIO=100 @@ -1403,19 +1427,19 @@ CONFIG_NXWM_HEXCALCULATOR_FONTID=5 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_I2CTOOL is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set # CONFIG_READLINE_HAVE_EXTMATCH is not set CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y # 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3240g-eval/nettest/defconfig b/configs/stm3240g-eval/nettest/defconfig index d8f93001ea3a523463f30e93a31510e72392560d..42672a45da38e8697516f366a2452015f8606e3a 100644 --- a/configs/stm3240g-eval/nettest/defconfig +++ b/configs/stm3240g-eval/nettest/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -208,6 +210,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -435,6 +438,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -453,9 +460,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART3_SERIALDRIVER=y # CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -700,7 +715,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -708,6 +728,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -759,6 +780,8 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -807,15 +830,18 @@ CONFIG_USART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -948,12 +974,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # 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 # @@ -1023,6 +1043,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1060,10 +1081,10 @@ CONFIG_HAVE_CXXINITIALIZE=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1086,18 +1107,18 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1111,9 +1132,9 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # @@ -1136,8 +1157,8 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1151,9 +1172,9 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set # CONFIG_NETUTILS_XMLRPC is not set @@ -1175,16 +1196,16 @@ CONFIG_NETUTILS_NETLIB=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3240g-eval/nsh/defconfig b/configs/stm3240g-eval/nsh/defconfig index 7456227bc7007c3b0b01156ccc31eb8ede14c769..82ba6591df93eeac8590af65a71c981f4389dacf 100644 --- a/configs/stm3240g-eval/nsh/defconfig +++ b/configs/stm3240g-eval/nsh/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -208,6 +210,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -436,6 +439,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -454,9 +461,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART3_SERIALDRIVER=y # CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -739,7 +754,12 @@ CONFIG_RTC_DATETIME=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -747,6 +767,7 @@ CONFIG_RTC_DATETIME=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -800,6 +821,8 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -849,15 +872,18 @@ CONFIG_USART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -1011,12 +1037,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -1100,6 +1120,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1137,16 +1158,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1157,17 +1179,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RANDOM is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set @@ -1176,8 +1198,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1185,10 +1207,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UDPBLASTER is not set -# CONFIG_EXAMPLES_DISCOVER is not set -# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -1212,8 +1233,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1226,21 +1247,21 @@ 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_DISCOVER is not set # CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1342,6 +1363,7 @@ CONFIG_NSH_CONSOLE=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1386,11 +1408,11 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=1 CONFIG_I2CTOOL_MAXBUS=3 @@ -1398,7 +1420,7 @@ CONFIG_I2CTOOL_MINADDR=0x03 CONFIG_I2CTOOL_MAXADDR=0x77 CONFIG_I2CTOOL_MAXREGADDR=0xff CONFIG_I2CTOOL_DEFFREQ=100000 -# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1407,6 +1429,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3240g-eval/nsh2/defconfig b/configs/stm3240g-eval/nsh2/defconfig index 1752213148f7ea8a5cd3c19481968c65b3243aab..2d7a66a331941714fb22b855915f1b398c37c704 100644 --- a/configs/stm3240g-eval/nsh2/defconfig +++ b/configs/stm3240g-eval/nsh2/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -209,6 +211,7 @@ CONFIG_SDIO_DMA=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -438,6 +441,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set CONFIG_STM32_CCMEXCLUDE=y # CONFIG_STM32_DMACAPABLE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -744,7 +751,12 @@ CONFIG_RTC_DATETIME=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -752,6 +764,7 @@ CONFIG_RTC_DATETIME=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -786,6 +799,7 @@ CONFIG_MTD=y # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set # CONFIG_MTD_N25QXXX is not set @@ -845,6 +859,8 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y +# CONFIG_SERIAL_REMOVABLE is not set +# CONFIG_SERIAL_CONSOLE is not set # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -878,19 +894,22 @@ CONFIG_SERIAL=y # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set CONFIG_RAMLOG=y -CONFIG_RAMLOG_SYSLOG=y CONFIG_RAMLOG_BUFSIZE=1024 # CONFIG_RAMLOG_CRLF is not set CONFIG_RAMLOG_NONBLOCKING=y CONFIG_RAMLOG_NPOLLWAITERS=4 +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_RAMLOG_SYSLOG=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -1044,13 +1063,6 @@ CONFIG_FAT_MAXFNAME=32 # CONFIG_FS_PROCFS 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 # @@ -1134,6 +1146,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1171,16 +1184,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1191,17 +1205,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1209,8 +1223,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1218,16 +1232,16 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # 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_WEBSERVER is not set # CONFIG_EXAMPLES_XMLRPC is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -1247,8 +1261,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1262,22 +1276,22 @@ 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_DISCOVER 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 +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1379,6 +1393,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1423,12 +1438,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=1 CONFIG_I2CTOOL_MAXBUS=3 @@ -1436,7 +1451,7 @@ CONFIG_I2CTOOL_MINADDR=0x03 CONFIG_I2CTOOL_MAXADDR=0x77 CONFIG_I2CTOOL_MAXREGADDR=0xff CONFIG_I2CTOOL_DEFFREQ=100000 -# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1445,6 +1460,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3240g-eval/nxterm/defconfig b/configs/stm3240g-eval/nxterm/defconfig index 8a947a2bb279271e9fc1d0465c52c564c5710b0f..9c793c79c6ad89d3095a0505f6dd596ffdd95122 100644 --- a/configs/stm3240g-eval/nxterm/defconfig +++ b/configs/stm3240g-eval/nxterm/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -208,6 +210,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -437,6 +440,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set CONFIG_STM32_FSMC_SRAM=y + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -455,9 +462,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART3_SERIALDRIVER=y # CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -742,10 +757,14 @@ CONFIG_RTC_DATETIME=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set CONFIG_LCD_NOGETRUN=y @@ -773,12 +792,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set - -# -# Alphanumeric/Segment LCD Devices -# -# CONFIG_LCD_LCD1602 is not set -# CONFIG_LCD_BACKPACK is not set +# CONFIG_SLCD is not set # # LED Support @@ -786,6 +800,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -839,6 +854,8 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -888,15 +905,18 @@ CONFIG_USART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -1043,12 +1063,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -1240,6 +1254,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1277,15 +1292,16 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -1296,17 +1312,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_NSH is not set # CONFIG_EXAMPLES_NULL is not set # CONFIG_EXAMPLES_NX is not set -CONFIG_EXAMPLES_NXTERM=y # 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_NXTERM=y # 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1314,8 +1330,8 @@ CONFIG_EXAMPLES_NXTERM=y # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1323,10 +1339,9 @@ CONFIG_EXAMPLES_NXTERM=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UDPBLASTER is not set -# CONFIG_EXAMPLES_DISCOVER is not set -# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -1348,8 +1363,8 @@ CONFIG_EXAMPLES_NXTERM=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1362,21 +1377,21 @@ CONFIG_EXAMPLES_NXTERM=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1477,6 +1492,7 @@ CONFIG_NSH_CONSOLE=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1522,11 +1538,11 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=1 CONFIG_I2CTOOL_MAXBUS=3 @@ -1534,7 +1550,7 @@ CONFIG_I2CTOOL_MINADDR=0x03 CONFIG_I2CTOOL_MAXADDR=0x77 CONFIG_I2CTOOL_MAXREGADDR=0xff CONFIG_I2CTOOL_DEFFREQ=100000 -# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1543,6 +1559,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3240g-eval/nxwm/defconfig b/configs/stm3240g-eval/nxwm/defconfig index e3e15ad43edd9e5c329f3ef5a0282b8bf2fd55a0..d12bd75e5399146e4bcf54182acd8419a3d8fcff 100644 --- a/configs/stm3240g-eval/nxwm/defconfig +++ b/configs/stm3240g-eval/nxwm/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -208,6 +210,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -437,6 +440,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set # CONFIG_STM32_FSMC_SRAM is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -455,9 +462,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART3_SERIALDRIVER=y # CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -596,7 +611,14 @@ CONFIG_STM3240G_LCD=y CONFIG_STM3240G_LCD_RDSHIFT=5 # CONFIG_STM3240G_ILI9320_DISABLE is not set # CONFIG_STM3240G_ILI9325_DISABLE is not set -# CONFIG_LIB_BOARDCTL is not set +CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_RESET is not set +# CONFIG_BOARDCTL_UNIQUEID is not set +CONFIG_BOARDCTL_TSCTEST=y +# 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 @@ -769,10 +791,14 @@ CONFIG_STMPE811_TEMP_DISABLE=y # CONFIG_DJOYSTICK is not set # CONFIG_AJOYSTICK is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set CONFIG_LCD_NOGETRUN=y @@ -800,12 +826,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set - -# -# Alphanumeric/Segment LCD Devices -# -# CONFIG_LCD_LCD1602 is not set -# CONFIG_LCD_BACKPACK is not set +# CONFIG_SLCD is not set # # LED Support @@ -813,6 +834,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -866,6 +888,8 @@ CONFIG_ETH0_PHY_NONE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -915,15 +939,18 @@ CONFIG_USART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -1076,12 +1103,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -1275,6 +1296,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1307,16 +1329,17 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -1327,18 +1350,18 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1354,10 +1377,10 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # 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_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # @@ -1382,8 +1405,8 @@ CONFIG_HAVE_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1395,21 +1418,21 @@ CONFIG_HAVE_CXXINITIALIZE=y # # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1510,6 +1533,7 @@ CONFIG_NSH_CONSOLE=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1551,6 +1575,7 @@ CONFIG_NXWIDGETS=y # NX Server/Device Configuration # CONFIG_NXWIDGETS_FLICKERFREE=y +# CONFIG_NXWIDGETS_EXTERNINIT is not set CONFIG_NXWIDGETS_DEVNO=0 CONFIG_NXWIDGET_SERVERINIT=y CONFIG_NXWIDGETS_SERVERPRIO=110 @@ -1731,13 +1756,13 @@ CONFIG_NXWM_HEXCALCULATOR_FONTID=5 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_I2CTOOL is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1746,6 +1771,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3240g-eval/src/stm32_adc.c b/configs/stm3240g-eval/src/stm32_adc.c index da37355e506d150501c1a268fbc4296811f696b2..1d7879704333dc36cebf6b532c0aa47cdaf083ec 100644 --- a/configs/stm3240g-eval/src/stm32_adc.c +++ b/configs/stm3240g-eval/src/stm32_adc.c @@ -140,7 +140,7 @@ int board_adc_setup(void) adc = stm32_adcinitialize(3, g_chanlist, ADC3_NCHANNELS); if (adc == NULL) { - adbg("ERROR: Failed to get ADC interface\n"); + aerr("ERROR: Failed to get ADC interface\n"); return -ENODEV; } @@ -149,7 +149,7 @@ int board_adc_setup(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - adbg("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } diff --git a/configs/stm3240g-eval/src/stm32_appinit.c b/configs/stm3240g-eval/src/stm32_appinit.c index 469180c390ce1f9892fa1e542a004b7f957abc9d..58938c9c2e05ac0fd8b7722813a7d89b6e4e21ea 100644 --- a/configs/stm3240g-eval/src/stm32_appinit.c +++ b/configs/stm3240g-eval/src/stm32_appinit.c @@ -160,14 +160,14 @@ static void stm32_i2c_register(int bus) i2c = stm32_i2cbus_initialize(bus); if (i2c == NULL) { - dbg("ERROR: Failed to get I2C%d interface\n", bus); + _err("ERROR: Failed to get I2C%d interface\n", bus); } else { ret = i2c_register(i2c, bus); if (ret < 0) { - dbg("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); + _err("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); stm32_i2cbus_uninitialize(i2c); } } @@ -254,7 +254,7 @@ int board_app_initialize(uintptr_t arg) lower = stm32_rtc_lowerhalf(); if (!lower) { - sdbg("ERROR: Failed to instantiate the RTC lower-half driver\n"); + serr("ERROR: Failed to instantiate the RTC lower-half driver\n"); return -ENOMEM; } else @@ -266,7 +266,7 @@ int board_app_initialize(uintptr_t arg) ret = rtc_initialize(0, lower); if (ret < 0) { - sdbg("ERROR: Failed to bind/register the RTC driver: %d\n", ret); + serr("ERROR: Failed to bind/register the RTC driver: %d\n", ret); return ret; } } diff --git a/configs/stm3240g-eval/src/stm32_autoleds.c b/configs/stm3240g-eval/src/stm32_autoleds.c index 410e944795424e391bf1ead37fc1daf7f2a5cea6..71fc384d5cf20ff86260079f2305a3df7bc1c808 100644 --- a/configs/stm3240g-eval/src/stm32_autoleds.c +++ b/configs/stm3240g-eval/src/stm32_autoleds.c @@ -58,18 +58,6 @@ * 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 - /* The following definitions map the encoded LED setting to GPIO settings */ #define STM3210E_LED1 (1 << 0) diff --git a/configs/stm3240g-eval/src/stm32_boot.c b/configs/stm3240g-eval/src/stm32_boot.c index 09b3b82eed4ec8fe9abfa9b3834f77c3df668082..bfab437e4ab9f6f2c8209676c2ef441aca44abfe 100644 --- a/configs/stm3240g-eval/src/stm32_boot.c +++ b/configs/stm3240g-eval/src/stm32_boot.c @@ -164,7 +164,7 @@ static int board_initthread(int argc, char *argv[]) ret = board_app_initialize(0); if (ret < 0) { - gdbg("ERROR: board_app_initialize failed: %d\n", ret); + gerr("ERROR: board_app_initialize failed: %d\n", ret); } #endif @@ -174,7 +174,7 @@ static int board_initthread(int argc, char *argv[]) ret = nx_start(); if (ret < 0) { - gdbg("ERROR: nx_start failed: %d\n", ret); + gerr("ERROR: nx_start failed: %d\n", ret); } #endif @@ -184,7 +184,7 @@ static int board_initthread(int argc, char *argv[]) ret = board_tsc_setup(CONFIG_NXWM_TOUCHSCREEN_DEVNO); if (ret < 0) { - gdbg("ERROR: board_tsc_setup failed: %d\n", ret); + gerr("ERROR: board_tsc_setup failed: %d\n", ret); } #endif diff --git a/configs/stm3240g-eval/src/stm32_can.c b/configs/stm3240g-eval/src/stm32_can.c index 40a29e50d8044fadeb7060d6edcfe4d777507f00..e5350615d231064fb9915bf129a67f3c498a6b26 100644 --- a/configs/stm3240g-eval/src/stm32_can.c +++ b/configs/stm3240g-eval/src/stm32_can.c @@ -70,25 +70,6 @@ # define CAN_PORT 2 #endif -/* 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 - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -117,7 +98,7 @@ int board_can_initialize(void) can = stm32_caninitialize(CAN_PORT); if (can == NULL) { - candbg("ERROR: Failed to get CAN interface\n"); + canerr("ERROR: Failed to get CAN interface\n"); return -ENODEV; } @@ -126,7 +107,7 @@ int board_can_initialize(void) ret = can_register("/dev/can0", can); if (ret < 0) { - candbg("ERROR: can_register failed: %d\n", ret); + canerr("ERROR: can_register failed: %d\n", ret); return ret; } diff --git a/configs/stm3240g-eval/src/stm32_lcd.c b/configs/stm3240g-eval/src/stm32_lcd.c index c358ffd1eb21fb19a546fcd178f605c117f8595d..1db56387063f78cc806c1be1afe0d5c30d90d62a 100644 --- a/configs/stm3240g-eval/src/stm32_lcd.c +++ b/configs/stm3240g-eval/src/stm32_lcd.c @@ -33,6 +33,7 @@ * POSSIBILITY OF SUCH DAMAGE. * **************************************************************************************/ + /* This driver supports the following LCDs on the STM324xG_EVAL board: * * AM-240320L8TNQW00H (LCD_ILI9320 or LCD_ILI9321) OR @@ -109,20 +110,6 @@ # define CONFIG_LCD_LANDSCAPE 1 #endif -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must - * also be enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif - /* Display/Color Properties ***********************************************************/ /* Display Resolution */ @@ -262,16 +249,6 @@ #define ILI9321_ID 0x9321 #define ILI9325_ID 0x9325 -/* Debug ******************************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /************************************************************************************** * Private Type Definition **************************************************************************************/ @@ -585,7 +562,7 @@ static int stm3240g_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *bu /* Buffer must be provided and aligned to a 16-bit address boundary */ - lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0); /* Write the run to GRAM. */ @@ -703,7 +680,7 @@ static int stm3240g_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, /* Buffer must be provided and aligned to a 16-bit address boundary */ - lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0); /* Configure according to the LCD type. Kind of silly with only one LCD type. */ @@ -829,7 +806,7 @@ static int stm3240g_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); - lcdvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n", + lcdinfo("fmt: %d xres: %d yres: %d nplanes: %d\n", g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes); memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s)); return OK; @@ -847,7 +824,7 @@ static int stm3240g_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno FAR struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(dev && pinfo && planeno == 0); - lcdvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); + lcdinfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); return OK; } @@ -863,7 +840,7 @@ static int stm3240g_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno static int stm3240g_getpower(struct lcd_dev_s *dev) { - lcdvdbg("power: %d\n", 0); + lcdinfo("power: %d\n", 0); return g_lcddev.power; } @@ -899,7 +876,7 @@ static int stm3240g_poweroff(void) static int stm3240g_setpower(struct lcd_dev_s *dev, int power) { - lcdvdbg("power: %d\n", power); + lcdinfo("power: %d\n", power); DEBUGASSERT((unsigned)power <= CONFIG_LCD_MAXPOWER); /* Set new power level */ @@ -933,7 +910,7 @@ static int stm3240g_setpower(struct lcd_dev_s *dev, int power) static int stm3240g_getcontrast(struct lcd_dev_s *dev) { - lcdvdbg("Not implemented\n"); + lcdinfo("Not implemented\n"); return -ENOSYS; } @@ -947,7 +924,7 @@ static int stm3240g_getcontrast(struct lcd_dev_s *dev) static int stm3240g_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) { - lcdvdbg("contrast: %d\n", contrast); + lcdinfo("contrast: %d\n", contrast); return -ENOSYS; } @@ -966,7 +943,7 @@ static inline void stm3240g_lcdinitialize(void) /* Check LCD ID */ id = stm3240g_readreg(LCD_REG_0); - lcddbg("LCD ID: %04x\n", id); + lcdinfo("LCD ID: %04x\n", id); /* Check if the ID is for the STM32_ILI9320 (or ILI9321) or STM32_ILI9325 */ @@ -995,7 +972,7 @@ static inline void stm3240g_lcdinitialize(void) #else /* if !defined(CONFIG_STM3240G_ILI9325_DISABLE) */ g_lcddev.type = LCD_TYPE_ILI9325; #endif - lcddbg("LCD type: %d\n", g_lcddev.type); + lcdinfo("LCD type: %d\n", g_lcddev.type); /* Start Initial Sequence */ @@ -1113,7 +1090,7 @@ static inline void stm3240g_lcdinitialize(void) } else { - lcddbg("Unsupported LCD type\n"); + lcderr("ERROR: Unsupported LCD type\n"); } } @@ -1133,7 +1110,7 @@ static inline void stm3240g_lcdinitialize(void) int board_lcd_initialize(void) { - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); /* Configure GPIO pins and configure the FSMC to support the LCD */ diff --git a/configs/stm3240g-eval/src/stm32_pwm.c b/configs/stm3240g-eval/src/stm32_pwm.c index c10853a1b9a66548c57147954fe5b7b90df018b7..4ccf6dad9c4bf5c01b2bc1a2689e208ffa937e89 100644 --- a/configs/stm3240g-eval/src/stm32_pwm.c +++ b/configs/stm3240g-eval/src/stm32_pwm.c @@ -97,7 +97,7 @@ int board_pwm_setup(void) pwm = stm32_pwminitialize(STM3240G_EVAL_PWMTIMER); if (!pwm) { - dbg("Failed to get the STM32 PWM lower half\n"); + aerr("ERROR: Failed to get the STM32 PWM lower half\n"); return -ENODEV; } @@ -106,7 +106,7 @@ int board_pwm_setup(void) ret = pwm_register("/dev/pwm0", pwm); if (ret < 0) { - adbg("pwm_register failed: %d\n", ret); + aerr("ERROR: pwm_register failed: %d\n", ret); return ret; } diff --git a/configs/stm3240g-eval/src/stm32_spi.c b/configs/stm3240g-eval/src/stm32_spi.c index 5e247d8c35783ce3ba12efc220d59a5bd611894d..45b7f894e14e4d33042d980a50cb800cf5771e2c 100644 --- a/configs/stm3240g-eval/src/stm32_spi.c +++ b/configs/stm3240g-eval/src/stm32_spi.c @@ -53,32 +53,6 @@ #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -124,7 +98,7 @@ void weak_function stm32_spidev_initialize(void) #ifdef CONFIG_STM32_SPI1 void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -136,7 +110,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI2 void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -148,7 +122,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI3 void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) diff --git a/configs/stm3240g-eval/src/stm32_stmpe811.c b/configs/stm3240g-eval/src/stm32_stmpe811.c index 30b06c12505ef926e8948cd94fcf4c097bb96b10..0bb25376fa36cca89e98929a3f80bfac481d5bfa 100644 --- a/configs/stm3240g-eval/src/stm32_stmpe811.c +++ b/configs/stm3240g-eval/src/stm32_stmpe811.c @@ -211,7 +211,7 @@ static int stmpe811_attach(FAR struct stmpe811_config_s *state, xcpt_t isr) { FAR struct stm32_stmpe811config_s *priv = (FAR struct stm32_stmpe811config_s *)state; - ivdbg("Saving handler %p\n", isr); + iinfo("Saving handler %p\n", isr); DEBUGASSERT(priv); /* Just save the handler. We will use it when EXTI interruptsare enabled */ @@ -279,14 +279,14 @@ int board_tsc_setup(int minor) FAR struct i2c_master_s *dev; int ret; - idbg("minor %d\n", minor); + iinfo("minor %d\n", minor); DEBUGASSERT(minor == 0); /* Check if we are already initialized */ if (!g_stmpe811config.handle) { - ivdbg("Initializing\n"); + iinfo("Initializing\n"); /* Configure the STMPE811 interrupt pin as an input */ @@ -297,7 +297,7 @@ int board_tsc_setup(int minor) dev = stm32_i2cbus_initialize(CONFIG_STMPE811_I2CDEV); if (!dev) { - idbg("Failed to initialize I2C bus %d\n", CONFIG_STMPE811_I2CDEV); + ierr("ERROR: Failed to initialize I2C bus %d\n", CONFIG_STMPE811_I2CDEV); return -ENODEV; } @@ -307,7 +307,7 @@ int board_tsc_setup(int minor) stmpe811_instantiate(dev, (FAR struct stmpe811_config_s *)&g_stmpe811config); if (!g_stmpe811config.handle) { - idbg("Failed to instantiate the STMPE811 driver\n"); + ierr("ERROR: Failed to instantiate the STMPE811 driver\n"); return -ENODEV; } @@ -316,7 +316,7 @@ int board_tsc_setup(int minor) ret = stmpe811_register(g_stmpe811config.handle, CONFIG_STMPE811_DEVMINOR); if (ret < 0) { - idbg("Failed to register STMPE driver: %d\n", ret); + ierr("ERROR: Failed to register STMPE driver: %d\n", ret); /* stm32_i2cbus_uninitialize(dev); */ return -ENODEV; } diff --git a/configs/stm3240g-eval/src/stm32_usb.c b/configs/stm3240g-eval/src/stm32_usb.c index 449c80af8ebbc3cb59c8d2e35a8861f8eecc8cbd..71d51ce9ed43a848182a6c9c21c9dec072816219 100644 --- a/configs/stm3240g-eval/src/stm32_usb.c +++ b/configs/stm3240g-eval/src/stm32_usb.c @@ -106,13 +106,13 @@ static int usbhost_waiter(int argc, char *argv[]) { struct usbhost_hubport_s *hport; - uvdbg("Running\n"); + uinfo("Running\n"); for (;;) { /* Wait for the device to change state */ DEBUGVERIFY(CONN_WAIT(g_usbconn, &hport)); - uvdbg("%s\n", hport->connected ? "connected" : "disconnected"); + uinfo("%s\n", hport->connected ? "connected" : "disconnected"); /* Did we just become connected? */ @@ -176,7 +176,7 @@ int stm32_usbhost_initialize(void) * that we care about: */ - uvdbg("Register class drivers\n"); + uinfo("Register class drivers\n"); #ifdef CONFIG_USBHOST_MSC /* Register the USB mass storage class class */ @@ -184,7 +184,7 @@ int stm32_usbhost_initialize(void) ret = usbhost_msc_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the mass storage class: %d\n", ret); + uerr("ERROR: Failed to register the mass storage class: %d\n", ret); } #endif @@ -194,19 +194,19 @@ int stm32_usbhost_initialize(void) ret = usbhost_cdcacm_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret); + uerr("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret); } #endif /* Then get an instance of the USB host interface */ - uvdbg("Initialize USB host\n"); + uinfo("Initialize USB host\n"); g_usbconn = stm32_otgfshost_initialize(0); if (g_usbconn) { /* Start a thread to handle device connection. */ - uvdbg("Start usbhost_waiter\n"); + uinfo("Start usbhost_waiter\n"); pid = task_create("usbhost", CONFIG_USBHOST_DEFPRIO, CONFIG_USBHOST_STACKSIZE, @@ -300,7 +300,7 @@ xcpt_t stm32_setup_overcurrent(xcpt_t handler) #ifdef CONFIG_USBDEV void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } #endif diff --git a/configs/stm3240g-eval/src/stm32_userleds.c b/configs/stm3240g-eval/src/stm32_userleds.c index eadca33b22794aae072525dabe53259ad61cfe87..18d380c99cb8030036bc6269a7dfd5beabf8d20b 100644 --- a/configs/stm3240g-eval/src/stm32_userleds.c +++ b/configs/stm3240g-eval/src/stm32_userleds.c @@ -53,22 +53,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data ****************************************************************************/ diff --git a/configs/stm3240g-eval/telnetd/defconfig b/configs/stm3240g-eval/telnetd/defconfig index b2cc945bdd467641091a78b3e04c2c4cf162d736..7a6aa7a884542c94ff936d6b0750ae81b8ff6ee9 100644 --- a/configs/stm3240g-eval/telnetd/defconfig +++ b/configs/stm3240g-eval/telnetd/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -208,6 +210,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -435,6 +438,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -453,9 +460,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART3_SERIALDRIVER=y # CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -700,7 +715,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -708,6 +728,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -761,6 +782,8 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -809,15 +832,18 @@ CONFIG_USART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -950,12 +976,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # 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 # @@ -1025,6 +1045,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1062,10 +1083,10 @@ CONFIG_HAVE_CXXINITIALIZE=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1075,18 +1096,18 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1108,9 +1129,9 @@ CONFIG_EXAMPLES_TELNETD_CLIENTPRIO=128 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_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # @@ -1133,8 +1154,8 @@ CONFIG_EXAMPLES_TELNETD_CLIENTSTACKSIZE=2048 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1148,9 +1169,9 @@ CONFIG_EXAMPLES_TELNETD_CLIENTSTACKSIZE=2048 # CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set # CONFIG_NETUTILS_XMLRPC is not set @@ -1172,16 +1193,16 @@ CONFIG_NETUTILS_NETLIB=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3240g-eval/webserver/defconfig b/configs/stm3240g-eval/webserver/defconfig index d6107112897814b25ccdb3b78f27c0104e98c325..916ec6c8d05ea6b47cd406fd9ccac2ff1a3487b7 100644 --- a/configs/stm3240g-eval/webserver/defconfig +++ b/configs/stm3240g-eval/webserver/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -200,6 +202,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -428,6 +431,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set CONFIG_STM32_CCMEXCLUDE=y + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -446,9 +453,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART3_SERIALDRIVER=y # CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -729,7 +744,12 @@ CONFIG_RTC_DATETIME=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -737,6 +757,7 @@ CONFIG_RTC_DATETIME=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set CONFIG_MTD=y @@ -759,6 +780,7 @@ CONFIG_MTD=y # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set # CONFIG_MTD_N25QXXX is not set @@ -819,6 +841,8 @@ CONFIG_ETH0_PHY_NONE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -868,15 +892,18 @@ CONFIG_USART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -1029,12 +1056,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -1111,6 +1132,7 @@ CONFIG_LIBC_NETDB=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1143,16 +1165,17 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1175,18 +1198,18 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1202,19 +1225,19 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UDPBLASTER is not set -# CONFIG_EXAMPLES_DISCOVER is not set +# CONFIG_EXAMPLES_USBTERM is not set +# CONFIG_EXAMPLES_WATCHDOG is not set CONFIG_EXAMPLES_WEBSERVER=y CONFIG_EXAMPLES_WEBSERVER_IPADDR=0x0a000002 CONFIG_EXAMPLES_WEBSERVER_DRIPADDR=0x0a000001 CONFIG_EXAMPLES_WEBSERVER_NETMASK=0xffffff00 CONFIG_EXAMPLES_WEBSERVER_NOMAC=y -# CONFIG_EXAMPLES_USBTERM is not set -# CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WGET is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -1234,8 +1257,8 @@ CONFIG_EXAMPLES_WEBSERVER_NOMAC=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1247,13 +1270,16 @@ CONFIG_EXAMPLES_WEBSERVER_NOMAC=y # # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y # CONFIG_NETUTILS_TFTPC is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set CONFIG_NETUTILS_WEBSERVER=y # CONFIG_NETUTILS_HTTPD_SINGLECONNECT is not set @@ -1267,10 +1293,7 @@ CONFIG_NETUTILS_HTTPD_CLASSIC=y # CONFIG_NETUTILS_HTTPD_MMAP is not set # CONFIG_NETUTILS_HTTPD_SENDFILE is not set CONFIG_NETUTILS_HTTPD_KEEPALIVE_DISABLE=y -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1370,6 +1393,7 @@ CONFIG_NSH_CONSOLE=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1413,13 +1437,13 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_I2CTOOL is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1428,6 +1452,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3240g-eval/xmlrpc/defconfig b/configs/stm3240g-eval/xmlrpc/defconfig index 010bb5d881cc5ae8bedf98e8548d73b7365414e5..24cc0a0c4d2fe33a92e1f41043835bf1e5ba063a 100644 --- a/configs/stm3240g-eval/xmlrpc/defconfig +++ b/configs/stm3240g-eval/xmlrpc/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -200,6 +202,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -428,6 +431,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -446,9 +453,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART3_SERIALDRIVER=y # CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -717,7 +732,12 @@ CONFIG_I2C_POLLED=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -725,6 +745,7 @@ CONFIG_I2C_POLLED=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -776,6 +797,8 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -826,15 +849,18 @@ CONFIG_USART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -987,12 +1013,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -1077,6 +1097,7 @@ CONFIG_NETDB_DNSSERVER_IPv4ADDR=0x0a000001 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1109,16 +1130,17 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1128,18 +1150,18 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1155,10 +1177,9 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UDPBLASTER is not set -# CONFIG_EXAMPLES_DISCOVER is not set -# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set CONFIG_EXAMPLES_XMLRPC=y CONFIG_EXAMPLES_XMLRPC_BUFFERSIZE=1024 @@ -1189,8 +1210,8 @@ CONFIG_EXAMPLES_XMLRPC_NETMASK=0xffffff00 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1204,21 +1225,21 @@ CONFIG_EXAMPLES_XMLRPC_NETMASK=0xffffff00 # CONFIG_NETUTILS_CODECS is not set CONFIG_NETUTILS_DHCPC=y # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER 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 +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set # CONFIG_NETUTILS_TFTPC is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set CONFIG_NETUTILS_XMLRPC=y CONFIG_XMLRPC_STRINGSIZE=64 -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1237,18 +1258,18 @@ CONFIG_XMLRPC_STRINGSIZE=64 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_I2CTOOL is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32_tiny/README.txt b/configs/stm32_tiny/README.txt index 1909b9dac8b4afed3679e5aee51dfb0321cbab7c..29a8cbb43ff14289277d3ad5c7cec02f7937aabd 100644 --- a/configs/stm32_tiny/README.txt +++ b/configs/stm32_tiny/README.txt @@ -493,7 +493,7 @@ STM32 Tiny - specific Configuration Options 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 + CONFIG_STM32_CAN_REGDEBUG - If CONFIG_DEBUG_FEATURES is set, this will generate an dump of all CAN registers. STM32Tiny SPI Configuration @@ -563,7 +563,7 @@ Where is one of the following: Special PWM-only debug options: - CONFIG_DEBUG_PWM + CONFIG_DEBUG_PWM_INFO 7. USB Support (CDC/ACM device) @@ -617,7 +617,7 @@ Where is one of the following: - /dev/console still exists and still refers to the serial port. So you can still use certain kinds of debug output (see include/debug.h, all - of the interfaces based on lowsyslog will work in this configuration). + of the debug output from interrupt handlers will be lost. - But don't enable USB debug output! Since USB is console is used for USB debug output and you are using a USB console, there will be @@ -657,7 +657,6 @@ Where is one of the following: 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 diff --git a/configs/stm32_tiny/include/board.h b/configs/stm32_tiny/include/board.h index d393437c50ca0655c5f8aa865f8e2262dec622ef..30b472ca186214af06de5345624c630ddd3c2fc0 100644 --- a/configs/stm32_tiny/include/board.h +++ b/configs/stm32_tiny/include/board.h @@ -1,8 +1,7 @@ /************************************************************************************ * configs/stm32_tiny/include/board.h - * include/arch/board/board.h * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Authors: Gregory Nutt * Laurent Latil * @@ -94,14 +93,14 @@ #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) */ +/* APB1 timers 2-7 will be twice 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) +#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) /* USB divider -- Divide PLL clock by 1.5 */ @@ -111,8 +110,14 @@ * 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 +#define BOARD_TIM1_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM2_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM3_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM4_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM5_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM6_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM7_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM8_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 diff --git a/configs/stm32_tiny/nsh/defconfig b/configs/stm32_tiny/nsh/defconfig index 488ebd637b05e6cd9cb71ca2ee6615622a270f9b..efa50a903f5a103590a60956033bbb0e2bb19e6d 100644 --- a/configs/stm32_tiny/nsh/defconfig +++ b/configs/stm32_tiny/nsh/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -200,6 +202,7 @@ CONFIG_ARCH_CHIP_STM32F103C8=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -407,6 +410,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -418,9 +425,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -665,6 +680,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -679,7 +696,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -687,6 +709,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -698,6 +721,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -756,15 +781,18 @@ CONFIG_WL_NRF24L01_RXSUPPORT=y CONFIG_WL_NRF24L01_RXFIFO_LEN=128 # CONFIG_WL_PN532 is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -802,12 +830,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -880,6 +902,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -913,10 +936,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -925,17 +948,17 @@ CONFIG_EXAMPLES_NRF24L01TERM=y 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -943,17 +966,17 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -975,8 +998,8 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1100,12 +1123,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1113,6 +1136,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32_tiny/src/stm32_leds.c b/configs/stm32_tiny/src/stm32_leds.c index b39f6b97ee9ee2b33d3a3ef77c2ec41440a5ea80..36b9a913adb885efa73f8f832d43c24ab8258d08 100644 --- a/configs/stm32_tiny/src/stm32_leds.c +++ b/configs/stm32_tiny/src/stm32_leds.c @@ -52,33 +52,13 @@ #include "stm32.h" #include "stm32_tiny.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 Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ static inline void set_led(bool v) { - ledvdbg("Turn LED %s\n", v? "on":"off"); + ledinfo("Turn LED %s\n", v? "on":"off"); stm32_gpiowrite(GPIO_LED, v); } @@ -103,7 +83,7 @@ void board_autoled_initialize(void) void board_autoled_on(int led) { - ledvdbg("board_autoled_on(%d)\n",led); + ledinfo("board_autoled_on(%d)\n",led); switch (led) { case LED_STARTED: diff --git a/configs/stm32_tiny/src/stm32_pwm.c b/configs/stm32_tiny/src/stm32_pwm.c index 715d8d3a700928de513c0deb395f14c5bbc1b738..8efec614b601605bcaab191c3fafb00e810bdcce 100644 --- a/configs/stm32_tiny/src/stm32_pwm.c +++ b/configs/stm32_tiny/src/stm32_pwm.c @@ -95,7 +95,7 @@ int board_pwm_setup(void) pwm = stm32_pwminitialize(STM32TINY_PWMTIMER); if (!pwm) { - adbg("Failed to get the STM32 PWM lower half\n"); + aerr("ERROR: Failed to get the STM32 PWM lower half\n"); return -ENODEV; } @@ -104,7 +104,7 @@ int board_pwm_setup(void) ret = pwm_register("/dev/pwm0", pwm); if (ret < 0) { - adbg("pwm_register failed: %d\n", ret); + aerr("ERROR: pwm_register failed: %d\n", ret); return ret; } diff --git a/configs/stm32_tiny/src/stm32_spi.c b/configs/stm32_tiny/src/stm32_spi.c index 0af605950843d06dd9da1215cb047a918ef3a26e..ac4e3eb68ed58f91d34a1e8a2f1c0adf3c18670e 100644 --- a/configs/stm32_tiny/src/stm32_spi.c +++ b/configs/stm32_tiny/src/stm32_spi.c @@ -54,33 +54,6 @@ #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_SPI -#endif - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -104,7 +77,7 @@ void stm32_spidev_initialize(void) #ifdef CONFIG_STM32_SPI2 # ifdef CONFIG_WL_NRF24L01 /* Configure the SPI-based NRF24L01 chip select GPIO */ - spivdbg("Configure GPIO for SPI2/CS\n"); + spiinfo("Configure GPIO for SPI2/CS\n"); stm32_configgpio(GPIO_NRF24L01_CS); # endif #endif @@ -153,7 +126,7 @@ void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele { #ifdef CONFIG_WL_NRF24L01 case SPIDEV_WIRELESS: - spivdbg("nRF24L01 device %s\n", selected ? "asserted" : "de-asserted"); + spiinfo("nRF24L01 device %s\n", selected ? "asserted" : "de-asserted"); /* Set the GPIO low to select and high to de-select */ diff --git a/configs/stm32_tiny/src/stm32_usbdev.c b/configs/stm32_tiny/src/stm32_usbdev.c index 80e3671e3bfd0e345608a41b7d86ac5435894f63..e9e76b4c2e21f47ff9043455076c0f1111c7397a 100644 --- a/configs/stm32_tiny/src/stm32_usbdev.c +++ b/configs/stm32_tiny/src/stm32_usbdev.c @@ -74,7 +74,7 @@ void stm32_usbinitialize(void) { - ulldbg("called\n"); + uinfo("called\n"); /* USB Soft Connect Pullup */ stm32_configgpio(GPIO_USB_PULLUP); @@ -112,6 +112,5 @@ int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } - diff --git a/configs/stm32_tiny/src/stm32_wireless.c b/configs/stm32_tiny/src/stm32_wireless.c index 5a8b6b0da95d98ed65145534bdedf42faa679bf5..bbfdedc13b1ddf722a2fd100f480086d224a7a2d 100644 --- a/configs/stm32_tiny/src/stm32_wireless.c +++ b/configs/stm32_tiny/src/stm32_wireless.c @@ -79,7 +79,7 @@ static xcpt_t g_isr; static int stm32tiny_wl_irq_attach(xcpt_t isr) { - vdbg("Attach IRQ\n"); + _info("Attach IRQ\n"); g_isr = isr; stm32_gpiosetevent(GPIO_NRF24L01_IRQ, false, true, false, g_isr); return OK; @@ -87,7 +87,7 @@ static int stm32tiny_wl_irq_attach(xcpt_t isr) static void stm32tiny_wl_chip_enable(bool enable) { - vdbg("CE:%d\n", enable); + _info("CE:%d\n", enable); stm32_gpiowrite(GPIO_NRF24L01_CE, enable); } @@ -114,14 +114,14 @@ void stm32_wlinitialize(void) spidev = stm32_spibus_initialize(2); if (!spidev) { - dbg("Failed to initialize SPI bus\n"); + _err("ERROR: Failed to initialize SPI bus\n"); return; } result = nrf24l01_register(spidev, &nrf_cfg); if (result != OK) { - dbg("Failed to register initialize SPI bus\n"); + _err("ERROR: Failed to register initialize SPI bus\n"); return; } } diff --git a/configs/stm32_tiny/usbnsh/defconfig b/configs/stm32_tiny/usbnsh/defconfig index 18a9cdab677664c022a5c16bb54e73e3a82fc4ec..847b090897a61a21fe4f2ea81a7e187c7941ff70 100644 --- a/configs/stm32_tiny/usbnsh/defconfig +++ b/configs/stm32_tiny/usbnsh/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARCH_CHIP_STM32F103C8=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -405,6 +408,10 @@ CONFIG_STM32_JTAG_FULL_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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -416,9 +423,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -661,7 +676,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -669,6 +689,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -680,6 +701,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -771,14 +793,17 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_NONE=y +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -816,12 +841,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -894,6 +913,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -927,10 +947,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -939,17 +959,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -957,17 +977,17 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -989,8 +1009,8 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1119,12 +1139,13 @@ CONFIG_NSH_CONSOLE=y # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CDCACM is not set # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1132,8 +1153,7 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f103-minimum/README.txt b/configs/stm32f103-minimum/README.txt index 59bef3ef6a89c56ec0b77d26a703f53abccef6ab..edd0fc92e1a3b3b071416168c29bef487208827d 100644 --- a/configs/stm32f103-minimum/README.txt +++ b/configs/stm32f103-minimum/README.txt @@ -392,7 +392,7 @@ STM32F103 Minimum - specific Configuration Options 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 + CONFIG_STM32_CAN_REGDEBUG - If CONFIG_DEBUG_FEATURES is set, this will generate an dump of all CAN registers. STM32F103 Minimum SPI Configuration @@ -421,6 +421,140 @@ instead of configure.sh: Where is one of the following: + minnsh: + ------ + + This is a experiment to see just how small we can get a usable NSH + configuration. This configuration has far fewer features than the nsh + configuration but is also a fraction of the size. + + This minnsh configuration is a "proof-of-concept" and not very usable in + its current state. This configuration was created by disabling + everything possible INCLUDING file system support. Without file system + support, NuttX is pretty much crippled. Here are some of the + consequences of disabling the file system: + + - All features that depend on the file system are lost: device drivers, + mountpoints, message queues, named semaphores. + + - Without device drivers, you cannot interact with the RTOS using POSIX + interfaces. You would have to work with NuttX as with those other + tiny RTOSs: As a scheduler and a callable hardare abstraction layer + (HAL). + + - You cannot use any of the NuttX upper half device drivers since they + depend on the pseudo-file system and device nodes. You can, of + course, continue to use the lower half drivers either directly. Or, + perhaps, you could write some custom minnsh upper half drivers that + do not depend on a file system and expose a HAL interface. + + There is a special version of readline() the NSH uses when there is no + file system. It uses a special up_putc() to write data to the console + and a special function up_getc() to read data from the console. + + - The current up_getc() implementationsa are a kludge. They are + analogous to the up_putc() implementations: They directly poll the + hardware for serial availability, locking up all lower priority tasks + in the entire system while they poll. So a version of NSH that uses + up_getc() essentially blocks the system until a character is received. + + This, of course, could be fixed by creating a special, upper half + implementation of the interrupt-driven serial lower half (like + stm32_serial) that just supports single character console I/O + (perhaps called up_putc and up_getc?). The NSH could wait for serial + input without blocking the system. But then that would increase the + footprint too. + + So although the minnsh configurations are a good starting point for + making things small, they not are really very practical. Why might + you want a NuttX minnsh solution? Perhaps you have software that runs + on a family of chips including some very tiny MCUs. Then perhaps having + the RTOS compatibility would justify the loss of functionality? + + STATUS: + 2016-06-03: Using that config I got this: + + $ ls -l nuttx.bin + -rwxr-xr-x 1 alan alan 12543 Jun 3 17:58 nuttx.bin + + $ arm-none-eabi-size nuttx + text data bss dec hex filename + 12542 1 816 13359 342f nuttx + + And this is free command from NuttX shell: + + NuttShell (NSH) + nsh> free + total used free largest + Mem: 18624 2328 16296 16296 + nsh> + + 2016-06-07: As another experiment, I tried enabling just (1) the file + system, (2) the console device, and (3) the upper half serial driver in + the minnsh configuration. With these changes, NSH should behave better + and we preserve the device driver interface. I made the following + configuration changes: + + Enable the file system: + CONFIG_NFILE_DESCRIPTORS=5 + CONFIG_NFILE_STREAMS=5 + + Enable the console device: + CONFIG_DEV_CONSOLE=y + + Disable most new NSH commands. Some like 'ls' are really mandatory + with a file system: + CONFIG_NSH_DISABLE_xxx=y + + Enable the upper half serial driver: + CONFIG_SERIAL=y + CONFIG_STANDARD_SERIAL=y + + Enable the USART1 serial driver: + CONFIG_STM32_USART1=y + CONFIG_STM32_USART1_SERIALDRIVER=y + CONFIG_USART1_SERIAL_CONSOLE=y + + CONFIG_USART1_2STOP=0 + CONFIG_USART1_BAUD=115200 + CONFIG_USART1_BITS=8 + CONFIG_USART1_PARITY=0 + CONFIG_USART1_RXBUFSIZE=16 + CONFIG_USART1_TXBUFSIZE=16 + + The resulting code was bigger as expected: + + $ arm-none-eabi-size nuttx + text data bss dec hex filename + 19853 88 876 20817 5151 nuttx + + I am sure that other things that could be disabled were also drawn into + the build, so perhaps this could be reduced. This amounts to a size + increase of around 7KB. + + One major part of this size increase is due to the addition of the NSH + 'ls' command. Now, if I disable the 'ls' command, I get: + + $ arm-none-eabi-size nuttx + text data bss dec hex filename + 17804 80 864 18748 493c nuttx + + Or an increase of only 5.1 KB. This, of course, not only excludes the + 'ls' command logic, but also the things that were drawn into the link + when 'ls' was enabled: opendir(), readdir(), closedir(), stat(), and + probably other things. + + So I think we can say that the cost of the file system and true serial + console device was about 5 KB (primarily OS support) and the cost of + the NSH 'ls' command (including OS support) is about 2KB. + + 2016-06-21: Just checking the size after some big system changes: The + size of the base configuration has actually dropped by a few bytes: + + $ arm-none-eabi-size nuttx + text data bss dec hex filename + 12526 4 816 13346 3422 nuttx + nsh: --- Configures the NuttShell (nsh) located at apps/examples/nsh. This @@ -456,7 +590,6 @@ Where is one of the following: 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 diff --git a/configs/stm32f103-minimum/include/board.h b/configs/stm32f103-minimum/include/board.h index 8c5385e45b4a33f563877846760e61db01d961dd..217e4dfd894b579c1a6a43abaa70f379266df0e1 100644 --- a/configs/stm32f103-minimum/include/board.h +++ b/configs/stm32f103-minimum/include/board.h @@ -93,14 +93,14 @@ #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) */ +/* APB1 timers 2-7 will be twice 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) +#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) /* USB divider -- Divide PLL clock by 1.5 */ @@ -110,8 +110,14 @@ * 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 +#define BOARD_TIM1_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM2_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM3_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM4_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM5_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM6_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM7_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM8_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 diff --git a/configs/stm32f103-minimum/minnsh/Make.defs b/configs/stm32f103-minimum/minnsh/Make.defs new file mode 100644 index 0000000000000000000000000000000000000000..b77741df2552a0967fa976703c5a841822f276b4 --- /dev/null +++ b/configs/stm32f103-minimum/minnsh/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/minnsh/defconfig b/configs/stm32f103-minimum/minnsh/defconfig new file mode 100644 index 0000000000000000000000000000000000000000..da3a0941ce3130216b7b9beef984a24eb10c0027 --- /dev/null +++ b/configs/stm32f103-minimum/minnsh/defconfig @@ -0,0 +1,1061 @@ +# +# 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_ALERT is not set +# CONFIG_DEBUG_FEATURES is not set +CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_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_STM32F105RB 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 + +# +# Timer Configuration +# +# 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 +# + +# +# U[S]ART Device Configuration +# +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set +# CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# +# 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 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 is not set + +# +# RTOS Features +# +CONFIG_DISABLE_OS_API=y +CONFIG_DISABLE_POSIX_TIMERS=y +CONFIG_DISABLE_PTHREAD=y +CONFIG_DISABLE_SIGNALS=y +CONFIG_DISABLE_MQUEUE=y +CONFIG_DISABLE_ENVIRON=y + +# +# 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=2013 +CONFIG_START_MONTH=2 +CONFIG_START_DAY=26 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=4 +CONFIG_WDOG_INTRESERVE=0 +CONFIG_PREALLOC_TIMERS=0 + +# +# 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=0 +# CONFIG_SCHED_SPORADIC is not set +CONFIG_TASK_NAME_SIZE=0 +CONFIG_MAX_TASKS=4 +# CONFIG_SCHED_HAVE_PARENT is not set +# CONFIG_SCHED_WAITPID is not set + +# +# 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=y +# CONFIG_FDCLONE_STDIO is not set +CONFIG_SDCLONE_DISABLE=y +CONFIG_NFILE_DESCRIPTORS=0 +CONFIG_NFILE_STREAMS=0 +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_MODULE is not set + +# +# Work queue support +# + +# +# 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 is not set +# 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 + +# +# LCD Driver Support +# +# CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 is not set +CONFIG_SERIAL_CONSOLE=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 is not set +# 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=64 +CONFIG_USART1_TXBUFSIZE=64 +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 +# +# CONFIG_ARCH_SYSLOG is not set +# CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_NONE=y +# CONFIG_SYSLOG_FILE 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=y +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_RAMMAP is not set +# CONFIG_FS_PROCFS is not set +# CONFIG_FS_UNIONFS is not set + +# +# Graphics Support +# +# CONFIG_NX is not set + +# +# Memory Management +# +CONFIG_MM_SMALL=y +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_NXFLAT is not set +# CONFIG_ELF is not set +# CONFIG_BUILTIN is not set +# CONFIG_PIC is not set +# CONFIG_SYMTAB_ORDEREDBYNAME is not set + +# +# Library Routines +# + +# +# Standard C Library Options +# +CONFIG_STDIO_BUFFER_SIZE=0 +CONFIG_STDIO_LINEBUFFER=y +CONFIG_NUNGET_CHARS=0 +# CONFIG_LIBM is not set +CONFIG_NOPRINTF_FIELDWIDTH=y +# 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_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_CRC64_FAST is not set +# 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 +# + +# +# 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_HIDKBD is not set +# CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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_NXFFS is not set +# CONFIG_EXAMPLES_NXHELLO is not set +# CONFIG_EXAMPLES_NXIMAGE is not set +# CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_POSIXSPAWN is not set +# CONFIG_EXAMPLES_PPPD 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 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_USBTERM is not set +# CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER 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_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE 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_MAXARGUMENTS=6 +# CONFIG_NSH_ARGCAT is not set +CONFIG_NSH_NESTDEPTH=3 +# CONFIG_NSH_DISABLEBG is not set + +# +# Disable Individual commands +# +CONFIG_NSH_DISABLE_ADDROUTE=y +CONFIG_NSH_DISABLE_BASENAME=y +# CONFIG_NSH_DISABLE_CAT is not set +CONFIG_NSH_DISABLE_CD=y +CONFIG_NSH_DISABLE_CP=y +# CONFIG_NSH_DISABLE_CMP is not set +CONFIG_NSH_DISABLE_DATE=y +CONFIG_NSH_DISABLE_DD=y +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=y +# 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=y +# CONFIG_NSH_DISABLE_MKFIFO is not set +CONFIG_NSH_DISABLE_MKRD=y +# CONFIG_NSH_DISABLE_MH is not set +CONFIG_NSH_DISABLE_MOUNT=y +CONFIG_NSH_DISABLE_MV=y +# CONFIG_NSH_DISABLE_MW is not set +# CONFIG_NSH_DISABLE_PS is not set +CONFIG_NSH_DISABLE_PUT=y +# CONFIG_NSH_DISABLE_PWD is not set +CONFIG_NSH_DISABLE_RM=y +CONFIG_NSH_DISABLE_RMDIR=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=y +# CONFIG_NSH_DISABLE_TEST is not set +CONFIG_NSH_DISABLE_UMOUNT=y +CONFIG_NSH_DISABLE_UNAME=y +# CONFIG_NSH_DISABLE_UNSET is not set +# CONFIG_NSH_DISABLE_USLEEP is not set +CONFIG_NSH_DISABLE_WGET=y +# 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=64 + +# +# Scripting Support +# +CONFIG_NSH_DISABLESCRIPT=y + +# +# 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_CLE is not set +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set +# CONFIG_SYSTEM_VI is not set +# CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f103-minimum/minnsh/setenv.sh b/configs/stm32f103-minimum/minnsh/setenv.sh new file mode 100644 index 0000000000000000000000000000000000000000..73dfab5a4d0b4ffc9b5d6cc3c7dd42df6131bd7e --- /dev/null +++ b/configs/stm32f103-minimum/minnsh/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/nsh/defconfig b/configs/stm32f103-minimum/nsh/defconfig index c489f2182c924813b11cc7f57c045af3af18e410..ee5bcaeee3b5bf3f38841402916b5a8377df1a22 100644 --- a/configs/stm32f103-minimum/nsh/defconfig +++ b/configs/stm32f103-minimum/nsh/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARCH_CHIP_STM32F103C8=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -405,6 +408,10 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -416,9 +423,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -664,7 +679,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -672,6 +692,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -683,6 +704,8 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -733,15 +756,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -779,12 +805,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -857,6 +877,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -890,10 +911,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -902,17 +923,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -920,17 +941,17 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -952,8 +973,8 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1077,12 +1098,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1090,6 +1111,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f103-minimum/src/stm32_autoleds.c b/configs/stm32f103-minimum/src/stm32_autoleds.c index 71d2bfdb05b50d65cc5635df37673d3571cc7044..b851c440535f5bcde2eda5ded10336b0b7460743 100644 --- a/configs/stm32f103-minimum/src/stm32_autoleds.c +++ b/configs/stm32f103-minimum/src/stm32_autoleds.c @@ -52,29 +52,13 @@ #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"); + ledinfo("Turn LED %s\n", v? "on":"off"); stm32_gpiowrite(GPIO_LED, !v); } @@ -100,7 +84,7 @@ void board_autoled_initialize(void) void board_autoled_on(int led) { - ledvdbg("board_autoled_on(%d)\n",led); + ledinfo("board_autoled_on(%d)\n",led); switch (led) { diff --git a/configs/stm32f103-minimum/src/stm32_spi.c b/configs/stm32f103-minimum/src/stm32_spi.c index 791bf94cc15d95de91f7d161e181239952496315..a1c8dbaadb14d4a98c2039ebac8f9de74d9fb8ba 100644 --- a/configs/stm32f103-minimum/src/stm32_spi.c +++ b/configs/stm32f103-minimum/src/stm32_spi.c @@ -54,29 +54,6 @@ #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_SPI -#endif - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - /************************************************************************************ * Public Functions ************************************************************************************/ diff --git a/configs/stm32f103-minimum/src/stm32_usbdev.c b/configs/stm32f103-minimum/src/stm32_usbdev.c index cc1d00df73b0070582e06a3271cd622143c3de6b..ecbd707fb764645ad93c1245ed2cc2145360bcb1 100644 --- a/configs/stm32f103-minimum/src/stm32_usbdev.c +++ b/configs/stm32f103-minimum/src/stm32_usbdev.c @@ -103,5 +103,5 @@ int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } diff --git a/configs/stm32f103-minimum/usbnsh/defconfig b/configs/stm32f103-minimum/usbnsh/defconfig index 84579e2f49f848e0ce7884cc18c81dc8c7a53947..9a0e98417776fdceacf2fb99de14082be3d19c62 100644 --- a/configs/stm32f103-minimum/usbnsh/defconfig +++ b/configs/stm32f103-minimum/usbnsh/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARCH_CHIP_STM32F103C8=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -405,6 +408,10 @@ CONFIG_STM32_JTAG_FULL_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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -416,9 +423,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -661,7 +676,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -669,6 +689,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -680,6 +701,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -771,14 +793,17 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_NONE=y +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -816,12 +841,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -894,6 +913,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -927,10 +947,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -939,17 +959,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -957,17 +977,17 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -989,8 +1009,8 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1119,12 +1139,13 @@ CONFIG_NSH_CONSOLE=y # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CDCACM is not set # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1132,8 +1153,7 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f3discovery/README.txt b/configs/stm32f3discovery/README.txt index 4c5a16c803e92b2de4a37286e7d786f0014ce057..64eb13ba18bed67c242c4c5c1116f0fe630b67d3 100644 --- a/configs/stm32f3discovery/README.txt +++ b/configs/stm32f3discovery/README.txt @@ -637,7 +637,7 @@ STM32F3Discovery-specific Configuration Options 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 + CONFIG_STM32_CAN_REGDEBUG - If CONFIG_DEBUG_FEATURES is set, this will generate an dump of all CAN registers. STM32F3Discovery SPI Configuration @@ -778,7 +778,6 @@ Where is one of the following: the system logging device: Device Drivers -> System Logging Device Options: - 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" : USART2 will be /dev/ttyS0 diff --git a/configs/stm32f3discovery/include/board.h b/configs/stm32f3discovery/include/board.h index e1fd1ed2a3dafc28e9acca9ac36a2e1e362e8de6..bde225476e19da1e7b8aed2a990acfbe27253b11 100644 --- a/configs/stm32f3discovery/include/board.h +++ b/configs/stm32f3discovery/include/board.h @@ -1,8 +1,7 @@ /************************************************************************************ * configs/stm32f3discovery/include/board.h - * include/arch/board/board.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 @@ -92,13 +91,14 @@ #define STM32_RCC_CFGR_PPRE2 RCC_CFGR_PPRE2_HCLK #define STM32_PCLK2_FREQUENCY STM32_HCLK_FREQUENCY -#define STM32_APB2_CLKIN (STM32_PCLK2_FREQUENCY) /* Timers 2-7, 12-14 */ +#define STM32_APB2_CLKIN (STM32_PCLK2_FREQUENCY) /* Timers 1 and 8, 15-17 */ -/* APB2 timers 1 and 8 will receive PCLK2. */ +/* APB2 timers 1 and 8, 15-17 will receive PCLK2. */ + +/* Timers driven from APB2 will be PCLK2 */ #define STM32_APB2_TIM1_CLKIN (STM32_PCLK2_FREQUENCY) #define STM32_APB2_TIM8_CLKIN (STM32_PCLK2_FREQUENCY) - #define STM32_APB1_TIM15_CLKIN (STM32_PCLK2_FREQUENCY) #define STM32_APB1_TIM16_CLKIN (STM32_PCLK2_FREQUENCY) #define STM32_APB1_TIM17_CLKIN (STM32_PCLK2_FREQUENCY) @@ -108,50 +108,32 @@ #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 (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_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 - -/* Timers driven from APB1 will be twice PCLK1 */ +/* APB1 timers 2-7 will be twice 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 (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/2 (84MHz) */ - -#define STM32_RCC_CFGR_PPRE2 RCC_CFGR_PPRE2_HCLKd2 /* PCLK2 = HCLK / 2 */ -#define STM32_PCLK2_FREQUENCY (STM32_HCLK_FREQUENCY/2) +/* USB divider -- Divide PLL clock by 1.5 */ -/* Timers driven from APB2 will be twice PCLK2 */ +#define STM32_CFGR_USBPRE 0 -#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_PCLK2_FREQUENCY) -#define STM32_APB2_TIM10_CLKIN (2*STM32_PCLK2_FREQUENCY) -#define STM32_APB2_TIM11_CLKIN (2*STM32_PCLK2_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 */ -#define STM32_TIM18_FREQUENCY STM32_HCLK_FREQUENCY -#define STM32_TIM27_FREQUENCY (STM32_HCLK_FREQUENCY/2) +#define BOARD_TIM1_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM2_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM3_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM4_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM5_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM6_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM7_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM8_FREQUENCY STM32_HCLK_FREQUENCY /* LED definitions ******************************************************************/ /* The STM32F3Discovery board has ten LEDs. Two of these are controlled by logic on diff --git a/configs/stm32f3discovery/nsh/defconfig b/configs/stm32f3discovery/nsh/defconfig index 9c48a2059a956de78493b9f7bb76d508d1a93cc5..4cb1dfd5e2091d71bc0bcedeb9b30fc0d5d1ff09 100644 --- a/configs/stm32f3discovery/nsh/defconfig +++ b/configs/stm32f3discovery/nsh/defconfig @@ -46,10 +46,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -208,6 +210,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -419,6 +422,10 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -429,9 +436,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -682,7 +697,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -690,6 +710,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -702,6 +723,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -791,15 +813,18 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -837,12 +862,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -915,6 +934,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -958,10 +978,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -971,17 +991,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -989,17 +1009,17 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -1021,8 +1041,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1147,12 +1167,14 @@ CONFIG_NSH_CONSOLE=y # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set +CONFIG_SYSTEM_CDCACM=y +CONFIG_SYSTEM_CDCACM_DEVMINOR=0 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1160,8 +1182,6 @@ 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=y -CONFIG_SYSTEM_CDCACM_DEVMINOR=0 # CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f3discovery/src/stm32_autoleds.c b/configs/stm32f3discovery/src/stm32_autoleds.c index d55a5835ce35c3d9e2bde3bc2dc499a6ded6f2c4..313176f561e201ffec4690580fead2a90087113a 100644 --- a/configs/stm32f3discovery/src/stm32_autoleds.c +++ b/configs/stm32f3discovery/src/stm32_autoleds.c @@ -52,22 +52,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data ****************************************************************************/ diff --git a/configs/stm32f3discovery/src/stm32_pwm.c b/configs/stm32f3discovery/src/stm32_pwm.c index 7b1dd6830a9f190344f32c5ffc3818533bc1c052..1cdfb8c9c40fddddca13d4cd223b07acfe5b5a20 100644 --- a/configs/stm32f3discovery/src/stm32_pwm.c +++ b/configs/stm32f3discovery/src/stm32_pwm.c @@ -119,7 +119,7 @@ int board_pwm_setup(void) pwm = stm32_pwminitialize(STM32F3DISCOVERY_PWMTIMER); if (!pwm) { - dbg("Failed to get the STM32 PWM lower half\n"); + aerr("ERROR: Failed to get the STM32 PWM lower half\n"); return -ENODEV; } @@ -128,7 +128,7 @@ int board_pwm_setup(void) ret = pwm_register("/dev/pwm0", pwm); if (ret < 0) { - adbg("pwm_register failed: %d\n", ret); + aerr("ERROR: pwm_register failed: %d\n", ret); return ret; } diff --git a/configs/stm32f3discovery/src/stm32_qencoder.c b/configs/stm32f3discovery/src/stm32_qencoder.c index 88a45c0722853b9c112e405f37696ed835b8a2fa..d4fa6051cc5ef7b0c76eb3374cf7fcd42a62a49a 100644 --- a/configs/stm32f3discovery/src/stm32_qencoder.c +++ b/configs/stm32f3discovery/src/stm32_qencoder.c @@ -145,11 +145,11 @@ int qe_devinit(void) { /* Initialize a quadrature encoder interface. */ - snvdbg("Initializing the quadrature encoder using TIM%d\n", TIMID); + sninfo("Initializing the quadrature encoder using TIM%d\n", TIMID); ret = stm32_qeinitialize("/dev/qe0", TIMID); if (ret < 0) { - sndbg("stm32_qeinitialize failed: %d\n", ret); + snerr("ERROR: stm32_qeinitialize failed: %d\n", ret); return ret; } diff --git a/configs/stm32f3discovery/src/stm32_spi.c b/configs/stm32f3discovery/src/stm32_spi.c index 6c8b28869eb6c658e8fa7346ecaeb9408a437db5..712db25d2dd50c74c9c90757b75b42fa70c5b0b9 100644 --- a/configs/stm32f3discovery/src/stm32_spi.c +++ b/configs/stm32f3discovery/src/stm32_spi.c @@ -54,32 +54,6 @@ #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -129,7 +103,7 @@ void weak_function stm32_spidev_initialize(void) #ifdef CONFIG_STM32_SPI1 void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); stm32_gpiowrite(GPIO_MEMS_CS, !selected); } @@ -143,7 +117,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI2 void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -155,7 +129,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI3 void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) diff --git a/configs/stm32f3discovery/src/stm32_usb.c b/configs/stm32f3discovery/src/stm32_usb.c index bdeef5886d5b71d642fa5bcc0af22e39b36d8393..d824090bad3a8bd04b923a26022450cd5e080d76 100644 --- a/configs/stm32f3discovery/src/stm32_usb.c +++ b/configs/stm32f3discovery/src/stm32_usb.c @@ -121,10 +121,7 @@ int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("Resume: %d\n", resume); } #endif /* CONFIG_STM32_USB */ - - - diff --git a/configs/stm32f3discovery/src/stm32_userleds.c b/configs/stm32f3discovery/src/stm32_userleds.c index 8c5d8065a95ec383a43bb8659962203c1f742600..b68e261d1290327bdd1e92bb8064b6a3186efb69 100644 --- a/configs/stm32f3discovery/src/stm32_userleds.c +++ b/configs/stm32f3discovery/src/stm32_userleds.c @@ -51,22 +51,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data ****************************************************************************/ diff --git a/configs/stm32f3discovery/usbnsh/defconfig b/configs/stm32f3discovery/usbnsh/defconfig index ed5e23a9d98201a8a10cfd2f3c5a21fcea2ca38d..3d771a5f9972fa285c1cb498be7cb47ba83d88b4 100644 --- a/configs/stm32f3discovery/usbnsh/defconfig +++ b/configs/stm32f3discovery/usbnsh/defconfig @@ -46,10 +46,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -208,6 +210,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -420,6 +423,10 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -430,9 +437,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -682,6 +697,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -696,7 +713,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -704,6 +726,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -715,6 +738,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y +# CONFIG_SERIAL_CONSOLE is not set # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -804,14 +828,19 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +CONFIG_SYSLOG_CHAR=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set +CONFIG_SYSLOG_CHAR_CRLF=y +CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" # # Networking Support @@ -849,14 +878,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_PROCFS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -CONFIG_SYSLOG=y -# CONFIG_SYSLOG_TIMESTAMP is not set -CONFIG_SYSLOG_CHAR=y -CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" - # # Graphics Support # @@ -929,6 +950,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -972,10 +994,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -985,17 +1007,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1003,17 +1025,17 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -1035,8 +1057,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1161,12 +1183,13 @@ CONFIG_NSH_ARCHINIT=y # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CDCACM is not set # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1174,7 +1197,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f411e-disco/include/board.h b/configs/stm32f411e-disco/include/board.h index 46d2df971e002172b4f1c5dbafa39f0670c16133..a50e2d3a5335c8f59774307c25c084667c9ae028 100644 --- a/configs/stm32f411e-disco/include/board.h +++ b/configs/stm32f411e-disco/include/board.h @@ -163,8 +163,14 @@ */ /* REVISIT */ -#define STM32_TIM18_FREQUENCY (2*STM32_PCLK2_FREQUENCY) -#define STM32_TIM27_FREQUENCY (2*STM32_PCLK1_FREQUENCY) +#define BOARD_TIM1_FREQUENCY (2 * STM32_PCLK2_FREQUENCY) +#define BOARD_TIM2_FREQUENCY (2 * STM32_PCLK1_FREQUENCY) +#define BOARD_TIM3_FREQUENCY (2 * STM32_PCLK1_FREQUENCY) +#define BOARD_TIM4_FREQUENCY (2 * STM32_PCLK1_FREQUENCY) +#define BOARD_TIM5_FREQUENCY (2 * STM32_PCLK1_FREQUENCY) +#define BOARD_TIM6_FREQUENCY (2 * STM32_PCLK1_FREQUENCY) +#define BOARD_TIM7_FREQUENCY (2 * STM32_PCLK1_FREQUENCY) +#define BOARD_TIM8_FREQUENCY (2 * STM32_PCLK2_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 diff --git a/configs/stm32f411e-disco/nsh/defconfig b/configs/stm32f411e-disco/nsh/defconfig index e9719959a96082e4cc065650b62e7c8d8a9682eb..1845e9d48a6499ed6b784533d824be901cb03f5f 100644 --- a/configs/stm32f411e-disco/nsh/defconfig +++ b/configs/stm32f411e-disco/nsh/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -200,6 +202,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -410,6 +413,10 @@ 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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -423,9 +430,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -661,7 +676,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -669,6 +689,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -680,6 +701,8 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -729,15 +752,18 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -775,12 +801,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -853,6 +873,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -895,10 +916,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LEDS is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -908,17 +929,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -926,16 +947,16 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -957,8 +978,8 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1082,12 +1103,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1095,6 +1116,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f429i-disco/README.txt b/configs/stm32f429i-disco/README.txt index 1a1960a0d24b1f7f7c1a3cfad878a7b3d4760531..d14134e068037f6e33e45fe6b5019122987f6711 100644 --- a/configs/stm32f429i-disco/README.txt +++ b/configs/stm32f429i-disco/README.txt @@ -533,7 +533,7 @@ STM32F429I-DISCO-specific Configuration Options 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 + CONFIG_STM32_CAN_REGDEBUG - If CONFIG_DEBUG_FEATURES is set, this will generate an dump of all CAN registers. STM32F429I-DISCO SPI Configuration @@ -576,9 +576,9 @@ STM32F429I-DISCO-specific Configuration Options CONFIG_STM32_OTGFS_SOFINTR - Enable SOF interrupts. Why would you ever want to do that? CONFIG_STM32_USBHOST_REGDEBUG - Enable very low-level register access - debug. Depends on CONFIG_DEBUG. + debug. Depends on CONFIG_DEBUG_FEATURES. CONFIG_STM32_USBHOST_PKTDUMP - Dump all incoming and outgoing USB - packets. Depends on CONFIG_DEBUG. + packets. Depends on CONFIG_DEBUG_FEATURES. Configurations ============== @@ -640,7 +640,7 @@ Where is one of the following: Special PWM-only debug options: - CONFIG_DEBUG_PWM + CONFIG_DEBUG_PWM_INFO 5. This example supports the Quadrature Encode test (apps/examples/qencoder) but this must be manually enabled by selecting: @@ -726,7 +726,7 @@ Where is one of the following: - /dev/console still exists and still refers to the serial port. So you can still use certain kinds of debug output (see include/debug.h, all - of the interfaces based on lowsyslog will work in this configuration). + debug output from interrupt handlers will be lost. - But don't enable USB debug output! Since USB is console is used for USB debug output and you are using a USB console, there will be diff --git a/configs/stm32f429i-disco/extflash/defconfig b/configs/stm32f429i-disco/extflash/defconfig index f1601ff527a7c792c42c8e1b812c9e0945725840..f4e687e9afb058a06c4166d0d8a1154f6acdd2e4 100644 --- a/configs/stm32f429i-disco/extflash/defconfig +++ b/configs/stm32f429i-disco/extflash/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y CONFIG_DEBUG_NOOPT=y @@ -200,6 +202,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -435,6 +438,10 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set CONFIG_STM32_FSMC_SRAM=y + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -451,9 +458,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -714,6 +729,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -728,7 +745,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -736,6 +758,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set CONFIG_MTD=y @@ -765,6 +788,7 @@ CONFIG_RAMMTD_ERASESTATE=0xff # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set # CONFIG_MTD_N25QXXX is not set @@ -795,6 +819,8 @@ CONFIG_SST25XX_MEMORY_TYPE=0x25 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -844,15 +870,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -905,12 +934,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_SMARTFS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -988,6 +1011,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1027,15 +1051,16 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FLASH_TEST is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1046,17 +1071,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RANDOM is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set @@ -1065,22 +1090,22 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_SERIALRX is not set # CONFIG_EXAMPLES_SERLOOP is not set # CONFIG_EXAMPLES_SLCD is not set -# CONFIG_EXAMPLES_FLASH_TEST is not set -# CONFIG_EXAMPLES_SMART_TEST is not set # CONFIG_EXAMPLES_SMART is not set +# CONFIG_EXAMPLES_SMART_TEST 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_WEBSERVER is not set # # File System Utilities # +CONFIG_FSUTILS_FLASH_ERASEALL=y # CONFIG_FSUTILS_INIFILE is not set CONFIG_FSUTILS_MKSMARTFS=y # CONFIG_FSUTILS_PASSWD is not set @@ -1101,8 +1126,8 @@ CONFIG_FSUTILS_MKSMARTFS=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1228,13 +1253,13 @@ CONFIG_PLATFORM_CONFIGDATA=y # # 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_FLASH_ERASEALL=y +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1242,6 +1267,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f429i-disco/ide/ltcd/uvision/libc.uvproj b/configs/stm32f429i-disco/ide/ltcd/uvision/libc.uvproj index 9a501a0b517d654199f0835c49a9d82385d48e1e..f7340f2ce7f94803f161d4ce45f2e596b099a62d 100644 --- a/configs/stm32f429i-disco/ide/ltcd/uvision/libc.uvproj +++ b/configs/stm32f429i-disco/ide/ltcd/uvision/libc.uvproj @@ -1425,11 +1425,6 @@ 1 ../../../../../libc/syslog/lib_syslog.c - - lib_lowsyslog.c - 1 - ../../../../../libc/syslog/lib_lowsyslog.c - lib_setlogmask.c 1 diff --git a/configs/stm32f429i-disco/include/board.h b/configs/stm32f429i-disco/include/board.h index adcd72adde2ef4094c4429cd3c066c91d8a1226b..723b3984928d8ae93114cd3ad892750014cee5bd 100644 --- a/configs/stm32f429i-disco/include/board.h +++ b/configs/stm32f429i-disco/include/board.h @@ -2,7 +2,7 @@ * configs/stm32f429i-disco/include/board.h * include/arch/board/board.h * - * 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 @@ -154,8 +154,14 @@ * Note: TIM1,8 are on APB2, others on APB1 */ -#define STM32_TIM18_FREQUENCY STM32_HCLK_FREQUENCY -#define STM32_TIM27_FREQUENCY (STM32_HCLK_FREQUENCY/2) +#define BOARD_TIM1_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM2_FREQUENCY (STM32_HCLK_FREQUENCY/2) +#define BOARD_TIM3_FREQUENCY (STM32_HCLK_FREQUENCY/2) +#define BOARD_TIM4_FREQUENCY (STM32_HCLK_FREQUENCY/2) +#define BOARD_TIM5_FREQUENCY (STM32_HCLK_FREQUENCY/2) +#define BOARD_TIM6_FREQUENCY (STM32_HCLK_FREQUENCY/2) +#define BOARD_TIM7_FREQUENCY (STM32_HCLK_FREQUENCY/2) +#define BOARD_TIM8_FREQUENCY STM32_HCLK_FREQUENCY /* LED definitions ******************************************************************/ /* If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs in any diff --git a/configs/stm32f429i-disco/lcd/defconfig b/configs/stm32f429i-disco/lcd/defconfig index 7d399bb399685b645026b234dc3eab0f81b934cb..cca650004b62aef768c6541618d91896d460936a 100644 --- a/configs/stm32f429i-disco/lcd/defconfig +++ b/configs/stm32f429i-disco/lcd/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -201,6 +203,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -435,6 +438,10 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set CONFIG_STM32_FSMC_SRAM=y + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -451,9 +458,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -704,10 +719,14 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set # CONFIG_LCD_NOGETRUN is not set @@ -742,11 +761,7 @@ CONFIG_LCD_ILI9341_IFACE0_LANDSCAPE=y # CONFIG_LCD_ILI9341_IFACE0_RPORTRAIT is not set CONFIG_LCD_ILI9341_IFACE0_RGB565=y # CONFIG_LCD_RA8875 is not set - -# -# Alphanumeric/Segment LCD Devices -# -# CONFIG_LCD_LCD1602 is not set +# CONFIG_SLCD is not set # # LED Support @@ -754,6 +769,7 @@ CONFIG_LCD_ILI9341_IFACE0_RGB565=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -765,6 +781,8 @@ CONFIG_LCD_ILI9341_IFACE0_RGB565=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -814,15 +832,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -860,12 +881,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -1030,6 +1045,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1073,10 +1089,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set CONFIG_EXAMPLES_LCDRW=y CONFIG_EXAMPLES_LDCRW_DEVNO=0 CONFIG_EXAMPLES_LDCRW_XRES=320 @@ -1106,17 +1122,17 @@ CONFIG_EXAMPLES_NX_CLIENTPRIO=100 CONFIG_EXAMPLES_NX_SERVERPRIO=120 CONFIG_EXAMPLES_NX_LISTENERPRIO=80 CONFIG_EXAMPLES_NX_NOTIFYSIGNO=4 -# 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1124,16 +1140,16 @@ CONFIG_EXAMPLES_NX_NOTIFYSIGNO=4 # 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_SMART_TEST 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -1155,8 +1171,8 @@ CONFIG_EXAMPLES_NX_NOTIFYSIGNO=4 # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1281,12 +1297,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1294,6 +1310,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f429i-disco/ltdc/defconfig b/configs/stm32f429i-disco/ltdc/defconfig index f4eb8234c756c9c943053342f5b66c3907720f1f..138dacd2e6a66cb67dc42e5c865600aca9c9e8bf 100644 --- a/configs/stm32f429i-disco/ltdc/defconfig +++ b/configs/stm32f429i-disco/ltdc/defconfig @@ -42,9 +42,14 @@ CONFIG_RAW_BINARY=y # # Debug Options # -CONFIG_DEBUG=y -CONFIG_ARCH_HAVE_HEAPCHECK=y -# CONFIG_DEBUG_VERBOSE is not set +CONFIG_DEBUG_ALERT=y +CONFIG_DEBUG_FEATURES=y + +# +# Debug SYSLOG Output Controls +# +# CONFIG_DEBUG_ERROR is not set +# CONFIG_DEBUG_ASSERTIONS is not set # # Subsystem Debug Options @@ -59,18 +64,18 @@ CONFIG_ARCH_HAVE_HEAPCHECK=y # # OS Function Debug Options # -# CONFIG_DEBUG_HEAP is not set # CONFIG_DEBUG_IRQ is not set # # Driver Debug Options # # CONFIG_DEBUG_LEDS is not set -# CONFIG_DEBUG_ANALOG is not set # CONFIG_DEBUG_GPIO is not set # CONFIG_DEBUG_SPI is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -227,6 +232,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -463,6 +469,10 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y CONFIG_STM32_CCMEXCLUDE=y CONFIG_STM32_CCM_PROCFS=y CONFIG_STM32_FSMC_SRAM=y + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -479,9 +489,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -774,6 +792,8 @@ CONFIG_SPI_CMDDATA=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -788,7 +808,12 @@ CONFIG_SPI_CMDDATA=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -796,6 +821,7 @@ CONFIG_SPI_CMDDATA=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -807,6 +833,8 @@ CONFIG_SPI_CMDDATA=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -857,15 +885,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -911,12 +942,6 @@ CONFIG_FS_PROCFS_REGISTER=y # CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -1078,6 +1103,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1121,10 +1147,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set CONFIG_EXAMPLES_LTDC=y # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -1142,17 +1168,17 @@ CONFIG_EXAMPLES_NX_DEFAULT_FONT=y CONFIG_EXAMPLES_NX_BPP=16 # CONFIG_EXAMPLES_NX_RAWWINDOWS is not set CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 -# 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1160,16 +1186,16 @@ CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 # 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_SMART_TEST 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -1193,8 +1219,8 @@ CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1320,12 +1346,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1333,6 +1359,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f429i-disco/nsh/defconfig b/configs/stm32f429i-disco/nsh/defconfig index 37e776417d66ef0a5a517f0e03647ee0de8fb80c..14893669401f1f44037a9bb4e9abe1e9f3686eed 100644 --- a/configs/stm32f429i-disco/nsh/defconfig +++ b/configs/stm32f429i-disco/nsh/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y CONFIG_DEBUG_NOOPT=y @@ -200,6 +202,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -434,6 +437,10 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set CONFIG_STM32_FSMC_SRAM=y + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -450,9 +457,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -690,6 +705,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -704,7 +721,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -712,6 +734,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -723,6 +746,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -772,15 +797,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -818,12 +846,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -898,6 +920,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -941,10 +964,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -954,17 +977,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -972,16 +995,16 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -1003,8 +1026,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1128,12 +1151,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1141,6 +1164,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f429i-disco/src/stm32_appinit.c b/configs/stm32f429i-disco/src/stm32_appinit.c index 29bbb24320db517d965b0c994a926353c2dae5e6..c7f1d4fb76597f83b95d2d49e000db1e76d57929 100644 --- a/configs/stm32f429i-disco/src/stm32_appinit.c +++ b/configs/stm32f429i-disco/src/stm32_appinit.c @@ -205,7 +205,7 @@ int board_app_initialize(uintptr_t arg) ret = mtd->ioctl(mtd, MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&geo)); if (ret < 0) { - fdbg("ERROR: mtd->ioctl failed: %d\n", ret); + ferr("ERROR: mtd->ioctl failed: %d\n", ret); return ret; } @@ -242,7 +242,7 @@ int board_app_initialize(uintptr_t arg) if (partszbytes < erasesize) { - fdbg("ERROR: Partition size is lesser than erasesize!\n"); + ferr("ERROR: Partition size is lesser than erasesize!\n"); return -1; } @@ -250,7 +250,7 @@ int board_app_initialize(uintptr_t arg) if ((partszbytes % erasesize) != 0) { - fdbg("ERROR: Partition size is not multiple of erasesize!\n"); + ferr("ERROR: Partition size is not multiple of erasesize!\n"); return -1; } @@ -284,7 +284,7 @@ int board_app_initialize(uintptr_t arg) if (mtd_part == NULL) { - dbg("Error: failed to create partition %s\n", partname); + ferr("ERROR: failed to create partition %s\n", partname); return -1; } diff --git a/configs/stm32f429i-disco/src/stm32_autoleds.c b/configs/stm32f429i-disco/src/stm32_autoleds.c index ce9d5bcb4029f19e3d2c22b2f828a1544c53c759..afe6f244db180d5b5c3d5db37a1a889c7fe08911 100644 --- a/configs/stm32f429i-disco/src/stm32_autoleds.c +++ b/configs/stm32f429i-disco/src/stm32_autoleds.c @@ -58,18 +58,6 @@ * 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 - /* The following definitions map the encoded LED setting to GPIO settings */ #define STM32F4_LED1 (1 << 0) diff --git a/configs/stm32f429i-disco/src/stm32_idle.c b/configs/stm32f429i-disco/src/stm32_idle.c index 1654e0fed23bafe0e1c120010c87be306456b3ee..03bf79db1a517455077cf7465b179962502c81a4 100644 --- a/configs/stm32f429i-disco/src/stm32_idle.c +++ b/configs/stm32f429i-disco/src/stm32_idle.c @@ -125,7 +125,7 @@ static void stm32_idlepm(void) if (newstate != oldstate) { - lldbg("newstate= %d oldstate=%d\n", newstate, oldstate); + sinfo("newstate= %d oldstate=%d\n", newstate, oldstate); flags = enter_critical_section(); diff --git a/configs/stm32f429i-disco/src/stm32_ili93414ws.c b/configs/stm32f429i-disco/src/stm32_ili93414ws.c index 58dad6eae23e8d5b403b0b69c9b371988ba0df91..04a24411f63b194673cf8c58a37595492f195105 100644 --- a/configs/stm32f429i-disco/src/stm32_ili93414ws.c +++ b/configs/stm32f429i-disco/src/stm32_ili93414ws.c @@ -132,16 +132,6 @@ # define ILI93414WS_SPI #endif -/* Debug option */ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /**************************************************************************** * Private Type Definition ****************************************************************************/ @@ -503,7 +493,6 @@ static int stm32_ili93414ws_sendblock(FAR struct ili93414ws_lcd_s *lcd, return OK; } - /**************************************************************************** * Name: stm32_ili93414ws_recvword * @@ -587,7 +576,7 @@ static uint16_t stm32_ili93414ws_recvword(void) } } - dbg("Timeout during receiving pixel word\n"); + lcdinfo("Timeout during receiving pixel word\n"); return 0; } @@ -1021,7 +1010,7 @@ static int stm32_ili93414ws_sendcmd( stm32_ili93414ws_set8bitmode(priv); - lcdvdbg("cmd=%04x\n", bw); + lcdinfo("cmd=%04x\n", bw); stm32_ili93414ws_cmddata(lcd, true); ret = stm32_ili93414ws_sendblock(priv, &bw, 1); stm32_ili93414ws_cmddata(lcd, false); @@ -1055,7 +1044,7 @@ static int stm32_ili93414ws_sendparam(FAR struct ili9341_lcd_s *lcd, stm32_ili93414ws_set8bitmode(priv); - lcdvdbg("param=%04x\n", bw); + lcdinfo("param=%04x\n", bw); return stm32_ili93414ws_sendblock(priv, &bw, 1); } @@ -1081,7 +1070,7 @@ static int stm32_ili93414ws_sendgram(FAR struct ili9341_lcd_s *lcd, { FAR struct ili93414ws_lcd_s *priv = (FAR struct ili93414ws_lcd_s *)lcd; - lcdvdbg("wd=%p, nwords=%d\n", wd, nwords); + lcdinfo("wd=%p, nwords=%d\n", wd, nwords); /* Set to 16-bit mode transfer mode, spi device is in disabled state */ @@ -1117,7 +1106,7 @@ static int stm32_ili93414ws_recvparam(FAR struct ili9341_lcd_s *lcd, stm32_ili93414ws_set8bitmode(priv); #endif - lcdvdbg("param=%04x\n", param); + lcdinfo("param=%04x\n", param); return stm32_ili93414ws_recvblock(priv, (uint16_t*)param, 1); } @@ -1143,7 +1132,7 @@ static int stm32_ili93414ws_recvgram(FAR struct ili9341_lcd_s *lcd, { FAR struct ili93414ws_lcd_s *priv = (FAR struct ili93414ws_lcd_s *)lcd; - lcdvdbg("wd=%p, nwords=%d\n", wd, nwords); + lcdinfo("wd=%p, nwords=%d\n", wd, nwords); /* Set to 16-bit mode in disabled state */ @@ -1174,9 +1163,9 @@ FAR struct ili9341_lcd_s *stm32_ili93414ws_initialize(void) FAR struct spi_dev_s *spi; FAR struct ili93414ws_lcd_s *priv = &g_lcddev; - lcddbg("initialize ili9341 4-wire serial subdriver\n"); + lcdinfo("initialize ili9341 4-wire serial subdriver\n"); - lcdvdbg("initialize spi device: %d\n", ILI93414WS_SPI_DEVICE); + lcdinfo("initialize spi device: %d\n", ILI93414WS_SPI_DEVICE); spi = stm32_spi5initialize(); if (spi) @@ -1206,7 +1195,7 @@ FAR struct ili9341_lcd_s *stm32_ili93414ws_initialize(void) uint32_t regval; FAR struct ili93414ws_lcd_s *priv = &g_lcddev; - lcddbg("initialize ili9341 4-wire serial subdriver\n"); + lcdinfo("initialize ili9341 4-wire serial subdriver\n"); /* Enable spi bus */ @@ -1236,7 +1225,7 @@ FAR struct ili9341_lcd_s *stm32_ili93414ws_initialize(void) /* Configure to bidirectional transfer mode */ - lcdvdbg("Configure spi device %d to bidirectional transfer mode\n", + lcdinfo("Configure spi device %d to bidirectional transfer mode\n", ILI93414WS_SPI_DEVICE); stm32_ili93414ws_spiconfig(&priv->dev); diff --git a/configs/stm32f429i-disco/src/stm32_lcd.c b/configs/stm32f429i-disco/src/stm32_lcd.c index 2f527abc81e883f53b6b6a9d7afd82012aaa301e..7aa094e57a3090c65742c7c22111c0a53289d8b6 100644 --- a/configs/stm32f429i-disco/src/stm32_lcd.c +++ b/configs/stm32f429i-disco/src/stm32_lcd.c @@ -57,6 +57,7 @@ /************************************************************************************ * Pre-processor Definitions ************************************************************************************/ + #ifdef CONFIG_STM32F429I_DISCO_ILI9341_LCDDEVICE # define ILI9341_LCD_DEVICE CONFIG_STM32F429I_DISCO_ILI9341_LCDDEVICE #else @@ -317,44 +318,46 @@ static int stm32_ili9341_initialize(void) /* Select spi device */ - dbg("Initialize ili9341 lcd driver\n"); + lcdinfo("Initialize ili9341 lcd driver\n"); lcd->select(lcd); -#ifdef CONFIG_DEBUG_LCD +#ifdef CONFIG_DEBUG_LCD_INFO /* Read display identification */ lcd->sendcmd(lcd, ILI9341_READ_ID1); lcd->recvparam(lcd, ¶m); - dbg("ili9341 LCD driver: LCD modules manufacturer ID: %d\n", param); + lcdinfo("ili9341 LCD driver: LCD modules manufacturer ID: %d\n", param); + lcd->sendcmd(lcd, ILI9341_READ_ID2); lcd->recvparam(lcd, ¶m); - dbg("ili9341 LCD driver: LCD modules driver version ID: %d\n", param); + lcdinfo("ili9341 LCD driver: LCD modules driver version ID: %d\n", param); + lcd->sendcmd(lcd, ILI9341_READ_ID3); lcd->recvparam(lcd, ¶m); - dbg("ili9341 LCD driver: LCD modules driver ID: %d\n", param); + lcdinfo("ili9341 LCD driver: LCD modules driver ID: %d\n", param); #endif /* Reset the lcd display to the default state */ - vdbg("ili9341 LCD driver: Software Reset\n"); + lcdinfo("ili9341 LCD driver: Software Reset\n"); lcd->sendcmd(lcd, ILI9341_SOFTWARE_RESET); up_mdelay(5); - vdbg("ili9341 LCD driver: set Memory Access Control %08x\n", + lcdinfo("ili9341 LCD driver: set Memory Access Control %08x\n", STM32_ILI9341_MADCTL_PARAM); lcd->sendcmd(lcd, ILI9341_MEMORY_ACCESS_CONTROL); lcd->sendparam(lcd, STM32_ILI9341_MADCTL_PARAM); /* Pixel Format */ - vdbg("ili9341 LCD driver: Set Pixel Format: %02x\n", + lcdinfo("ili9341 LCD driver: Set Pixel Format: %02x\n", STM32_ILI9341_PIXSET_PARAM); lcd->sendcmd(lcd, ILI9341_PIXEL_FORMAT_SET); lcd->sendparam(lcd, STM32_ILI9341_PIXSET_PARAM); /* Select column */ - vdbg("ili9341 LCD driver: Set Column Address\n"); + lcdinfo("ili9341 LCD driver: Set Column Address\n"); lcd->sendcmd(lcd, ILI9341_COLUMN_ADDRESS_SET); lcd->sendparam(lcd, 0); lcd->sendparam(lcd, 0); @@ -363,7 +366,7 @@ static int stm32_ili9341_initialize(void) /* Select page */ - vdbg("ili9341 LCD driver: Set Page Address\n"); + lcdinfo("ili9341 LCD driver: Set Page Address\n"); lcd->sendcmd(lcd, ILI9341_PAGE_ADDRESS_SET); lcd->sendparam(lcd, 0); lcd->sendparam(lcd, 0); @@ -372,14 +375,14 @@ static int stm32_ili9341_initialize(void) /* RGB Interface signal control */ - vdbg("ili9341 LCD driver: Set RGB Interface signal control: %02x\n", + lcdinfo("ili9341 LCD driver: Set RGB Interface signal control: %02x\n", STM32_ILI9341_IFMODE_PARAM); lcd->sendcmd(lcd, ILI9341_RGB_SIGNAL_CONTROL); lcd->sendparam(lcd, STM32_ILI9341_IFMODE_PARAM); /* Interface control */ - vdbg("ili9341 LCD driver: Set Interface control: %d:%d:%d\n", + lcdinfo("ili9341 LCD driver: Set Interface control: %d:%d:%d\n", STM32_ILI9341_IFCTL_PARAM1, STM32_ILI9341_IFCTL_PARAM2, STM32_ILI9341_IFCTL_PARAM3); @@ -391,13 +394,13 @@ static int stm32_ili9341_initialize(void) /* Sleep out set to the end */ - vdbg("ili9341 LCD driver: Sleep Out\n"); + lcdinfo("ili9341 LCD driver: Sleep Out\n"); lcd->sendcmd(lcd, ILI9341_SLEEP_OUT); up_mdelay(5); /* 120? */ /* Display on */ - vdbg("ili9341 LCD driver: Display On\n"); + lcdinfo("ili9341 LCD driver: Display On\n"); lcd->sendcmd(lcd, ILI9341_DISPLAY_ON); /* Deselect spi device */ diff --git a/configs/stm32f429i-disco/src/stm32_spi.c b/configs/stm32f429i-disco/src/stm32_spi.c index 5021da510898fc1046f674e36308cff17836210f..69d2de2997a913c2c1543a86d8f94d806ac979d9 100644 --- a/configs/stm32f429i-disco/src/stm32_spi.c +++ b/configs/stm32f429i-disco/src/stm32_spi.c @@ -56,28 +56,6 @@ #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3) ||\ defined(CONFIG_STM32_SPI4) || defined(CONFIG_STM32_SPI5) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - /************************************************************************************ * Private Data ************************************************************************************/ @@ -86,10 +64,6 @@ FAR struct spi_dev_s *g_spidev5 = NULL; #endif -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -143,7 +117,7 @@ void weak_function stm32_spidev_initialize(void) #ifdef CONFIG_STM32_SPI1 void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -155,7 +129,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI2 void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -167,7 +141,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI3 void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -196,7 +170,7 @@ uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI5 void stm32_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #if defined(CONFIG_STM32F429I_DISCO_ILI9341) if (devid == SPIDEV_DISPLAY) diff --git a/configs/stm32f429i-disco/src/stm32_usb.c b/configs/stm32f429i-disco/src/stm32_usb.c index 291c025730d54a89c4a5f0fbb284429bea1117bb..011726a69b1f39e3b048fe7b658a396464c186eb 100644 --- a/configs/stm32f429i-disco/src/stm32_usb.c +++ b/configs/stm32f429i-disco/src/stm32_usb.c @@ -102,13 +102,13 @@ static int usbhost_waiter(int argc, char *argv[]) { struct usbhost_hubport_s *hport; - uvdbg("Running\n"); + uinfo("Running\n"); for (;;) { /* Wait for the device to change state */ DEBUGVERIFY(CONN_WAIT(g_usbconn, &hport)); - uvdbg("%s\n", hport->connected ? "connected" : "disconnected"); + uinfo("%s\n", hport->connected ? "connected" : "disconnected"); /* Did we just become connected? */ @@ -172,7 +172,7 @@ int stm32_usbhost_initialize(void) * that we care about: */ - uvdbg("Register class drivers\n"); + uinfo("Register class drivers\n"); #ifdef CONFIG_USBHOST_HUB /* Initialize USB hub class support */ @@ -180,7 +180,7 @@ int stm32_usbhost_initialize(void) ret = usbhost_hub_initialize(); if (ret < 0) { - udbg("ERROR: usbhost_hub_initialize failed: %d\n", ret); + uerr("ERROR: usbhost_hub_initialize failed: %d\n", ret); } #endif @@ -190,7 +190,7 @@ int stm32_usbhost_initialize(void) ret = usbhost_msc_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the mass storage class: %d\n", ret); + uerr("ERROR: Failed to register the mass storage class: %d\n", ret); } #endif @@ -200,19 +200,19 @@ int stm32_usbhost_initialize(void) ret = usbhost_cdcacm_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret); + uerr("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret); } #endif /* Then get an instance of the USB host interface */ - uvdbg("Initialize USB host\n"); + uinfo("Initialize USB host\n"); g_usbconn = stm32_otghshost_initialize(0); if (g_usbconn) { /* Start a thread to handle device connection. */ - uvdbg("Start usbhost_waiter\n"); + uinfo("Start usbhost_waiter\n"); pid = task_create("usbhost", CONFIG_STM32F429IDISCO_USBHOST_PRIO, CONFIG_STM32F429IDISCO_USBHOST_STACKSIZE, @@ -306,7 +306,7 @@ xcpt_t stm32_setup_overcurrent(xcpt_t handler) #ifdef CONFIG_USBDEV void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } #endif diff --git a/configs/stm32f429i-disco/src/stm32_userleds.c b/configs/stm32f429i-disco/src/stm32_userleds.c index 682ccfd5f979450d55076310fc72c33c2701198b..6bb638889df5d1d49399a5a6c74a21ea04463d92 100644 --- a/configs/stm32f429i-disco/src/stm32_userleds.c +++ b/configs/stm32f429i-disco/src/stm32_userleds.c @@ -54,22 +54,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data ****************************************************************************/ diff --git a/configs/stm32f429i-disco/usbmsc/defconfig b/configs/stm32f429i-disco/usbmsc/defconfig index 802ff5915b9dabd8dd8aff1b6bbdf463d9536172..c041a1a207dccd25d2cdc7a8a452a543c9865d47 100644 --- a/configs/stm32f429i-disco/usbmsc/defconfig +++ b/configs/stm32f429i-disco/usbmsc/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y CONFIG_DEBUG_NOOPT=y @@ -203,6 +205,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -437,6 +440,10 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set CONFIG_STM32_FSMC_SRAM=y + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -453,9 +460,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -479,8 +494,6 @@ CONFIG_STM32_OTGHS_DESCSIZE=128 # # USB Host Debug Configuration # -# CONFIG_STM32_USBHOST_REGDEBUG is not set -# CONFIG_STM32_USBHOST_PKTDUMP is not set # # USB Device Configuration @@ -714,6 +727,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -728,7 +743,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -736,6 +756,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -747,6 +768,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -805,15 +828,18 @@ CONFIG_USBHOST_MSC=y # CONFIG_USBHOST_TRACE is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -857,12 +883,6 @@ CONFIG_FS_FAT=y # 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 # @@ -940,6 +960,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -984,10 +1005,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -997,17 +1018,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1015,17 +1036,17 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -1049,8 +1070,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1175,12 +1196,12 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1188,6 +1209,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f429i-disco/usbnsh/defconfig b/configs/stm32f429i-disco/usbnsh/defconfig index 0a9deac046188988c1894619785a9e05b34766c4..9b72f2bf72be00d599a8eed7fc6fd36580ec3936 100644 --- a/configs/stm32f429i-disco/usbnsh/defconfig +++ b/configs/stm32f429i-disco/usbnsh/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y CONFIG_DEBUG_NOOPT=y @@ -200,6 +202,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -434,6 +437,10 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set CONFIG_STM32_FSMC_SRAM=y + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -450,9 +457,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -698,6 +713,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -712,7 +729,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -720,6 +742,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -731,6 +754,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y +# CONFIG_SERIAL_CONSOLE is not set # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -820,14 +844,17 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_NONE=y +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -871,12 +898,6 @@ CONFIG_FS_FAT=y # 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 # @@ -955,6 +976,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -999,10 +1021,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1012,17 +1034,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1030,17 +1052,17 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -1064,8 +1086,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1192,12 +1214,13 @@ CONFIG_NSH_ARCHINIT=y # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CDCACM is not set # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set CONFIG_SYSTEM_RAMTEST=y CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1205,7 +1228,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f4discovery/README.txt b/configs/stm32f4discovery/README.txt index a5ce946ad7619c828c6a1b03372cb80a0ea53480..e0c912d16484b9bdba1e53af234c4cd70d8d112e 100644 --- a/configs/stm32f4discovery/README.txt +++ b/configs/stm32f4discovery/README.txt @@ -1024,7 +1024,7 @@ STM32F4Discovery-specific Configuration Options 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 + CONFIG_STM32_CAN_REGDEBUG - If CONFIG_DEBUG_FEATURES is set, this will generate an dump of all CAN registers. STM32F4Discovery SPI Configuration @@ -1067,9 +1067,9 @@ STM32F4Discovery-specific Configuration Options CONFIG_STM32_OTGFS_SOFINTR - Enable SOF interrupts. Why would you ever want to do that? CONFIG_STM32_USBHOST_REGDEBUG - Enable very low-level register access - debug. Depends on CONFIG_DEBUG. + debug. Depends on CONFIG_DEBUG_FEATURES. CONFIG_STM32_USBHOST_PKTDUMP - Dump all incoming and outgoing USB - packets. Depends on CONFIG_DEBUG. + packets. Depends on CONFIG_DEBUG_FEATURES. BASIC ===== @@ -1566,7 +1566,7 @@ Where is one of the following: Special PWM-only debug options: - CONFIG_DEBUG_PWM + CONFIG_DEBUG_PWM_INFO 5. This example supports the Quadrature Encode test (apps/examples/qencoder) but this must be manually enabled by selecting: @@ -1652,7 +1652,7 @@ Where is one of the following: - /dev/console still exists and still refers to the serial port. So you can still use certain kinds of debug output (see include/debug.h, all - of the interfaces based on lowsyslog will work in this configuration). + of the debug output from interrupt handlers will be lost. - But don't enable USB debug output! Since USB is console is used for USB debug output and you are using a USB console, there will be @@ -1979,7 +1979,6 @@ Where is one of the following: 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 diff --git a/configs/stm32f4discovery/cxxtest/defconfig b/configs/stm32f4discovery/cxxtest/defconfig index 7a4a6262adb7074df760a8c298b1a995e2ede872..ccb07593a897e580360552ed5a33f729f1d9f070 100644 --- a/configs/stm32f4discovery/cxxtest/defconfig +++ b/configs/stm32f4discovery/cxxtest/defconfig @@ -46,10 +46,12 @@ CONFIG_ARCH_FLOAT_H=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -208,6 +210,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -435,6 +438,10 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -453,9 +460,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -698,7 +713,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -706,6 +726,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -717,6 +738,8 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -766,15 +789,18 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -805,12 +831,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -880,6 +900,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -921,10 +942,10 @@ CONFIG_EXAMPLES_CXXTEST_CXXINITIALIZE=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -933,18 +954,18 @@ CONFIG_EXAMPLES_CXXTEST_CXXINITIALIZE=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -958,9 +979,9 @@ CONFIG_EXAMPLES_CXXTEST_CXXINITIALIZE=y # 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -982,8 +1003,8 @@ CONFIG_EXAMPLES_CXXTEST_CXXINITIALIZE=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1016,16 +1037,16 @@ CONFIG_EXAMPLES_CXXTEST_CXXINITIALIZE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f4discovery/elf/defconfig b/configs/stm32f4discovery/elf/defconfig index d31cbd08ca0dd0c3af697fa6b0161f3c773f98ec..fcf650368eca86cc9cf072558768413092e1092d 100644 --- a/configs/stm32f4discovery/elf/defconfig +++ b/configs/stm32f4discovery/elf/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -209,6 +211,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -436,6 +439,10 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set CONFIG_STM32_CCMEXCLUDE=y + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -454,9 +461,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -698,7 +713,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -706,6 +726,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -717,6 +738,8 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -765,15 +788,18 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -810,12 +836,6 @@ CONFIG_FS_ROMFS=y # 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 # @@ -895,6 +915,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -935,10 +956,10 @@ CONFIG_EXAMPLES_ELF_DEVPATH="/dev/ram0" # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -947,18 +968,18 @@ CONFIG_EXAMPLES_ELF_DEVPATH="/dev/ram0" # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_ROMFS is not set @@ -974,10 +995,10 @@ CONFIG_EXAMPLES_ELF_DEVPATH="/dev/ram0" # CONFIG_EXAMPLES_THTTPD is not set # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_UNIONFS is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -1001,8 +1022,8 @@ CONFIG_EXAMPLES_ELF_DEVPATH="/dev/ram0" # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1036,16 +1057,16 @@ CONFIG_EXAMPLES_ELF_DEVPATH="/dev/ram0" # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f4discovery/include/board.h b/configs/stm32f4discovery/include/board.h index 2ab3c99132fd1bebfb3a3704b8b78465aad49fc4..10cc583ab01f30b7e531eaadb9c6eb11ad0f8d68 100644 --- a/configs/stm32f4discovery/include/board.h +++ b/configs/stm32f4discovery/include/board.h @@ -156,8 +156,14 @@ * Note: TIM1,8 are on APB2, others on APB1 */ -#define STM32_TIM18_FREQUENCY STM32_HCLK_FREQUENCY -#define STM32_TIM27_FREQUENCY (STM32_HCLK_FREQUENCY/2) +#define BOARD_TIM1_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM2_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM3_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM4_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM5_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM6_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM7_FREQUENCY (STM32_HCLK_FREQUENCY / 2) +#define BOARD_TIM8_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 diff --git a/configs/stm32f4discovery/ipv6/defconfig b/configs/stm32f4discovery/ipv6/defconfig index 9c276b4e9bea82f3dd47ddd861187f041610d815..8e11faeb129763e36088fc9d3a52821b6fa4733c 100644 --- a/configs/stm32f4discovery/ipv6/defconfig +++ b/configs/stm32f4discovery/ipv6/defconfig @@ -46,10 +46,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -210,6 +212,7 @@ CONFIG_SDIO_DMA=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -439,6 +442,10 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set CONFIG_STM32_CCMEXCLUDE=y CONFIG_STM32_DMACAPABLE=y + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -457,10 +464,18 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device 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 + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -741,6 +756,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -755,7 +772,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -763,6 +785,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -827,6 +850,8 @@ CONFIG_ETH0_PHY_LAN8720=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -876,15 +901,18 @@ CONFIG_USART6_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -1048,12 +1076,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_NET is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -1130,6 +1152,7 @@ CONFIG_LIBC_NETDB=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1168,16 +1191,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1188,17 +1212,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1206,8 +1230,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1215,11 +1239,10 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # 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_WEBSERVER is not set # # File System Utilities @@ -1243,8 +1266,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1255,19 +1278,19 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set # CONFIG_NETUTILS_TFTPC is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1368,6 +1391,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1428,12 +1452,12 @@ CONFIG_NSH_MAX_ROUNDTRIP=20 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1442,6 +1466,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f4discovery/kostest/defconfig b/configs/stm32f4discovery/kostest/defconfig index c3f185487763c96e135ea46e0973fb8b72368577..1d1f1c310ce79de651f5c07f836c3076815fb735 100644 --- a/configs/stm32f4discovery/kostest/defconfig +++ b/configs/stm32f4discovery/kostest/defconfig @@ -51,10 +51,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -214,6 +216,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -441,6 +444,10 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -459,9 +466,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -706,7 +721,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -714,6 +734,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -725,6 +746,8 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -773,15 +796,18 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -812,12 +838,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -888,6 +908,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_USRWORK is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -917,9 +938,9 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_EXAMPLES_FTPC is not set # CONFIG_EXAMPLES_FTPD is not set # CONFIG_EXAMPLES_HELLO is not set +# CONFIG_EXAMPLES_IGMP is not set # CONFIG_EXAMPLES_JSON 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 @@ -928,11 +949,11 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM is not set # CONFIG_EXAMPLES_NXTEXT is not set CONFIG_EXAMPLES_OSTEST=y CONFIG_EXAMPLES_OSTEST_LOOPS=1 @@ -944,8 +965,8 @@ CONFIG_EXAMPLES_OSTEST_WAITRESULT=y # 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -959,9 +980,9 @@ CONFIG_EXAMPLES_OSTEST_WAITRESULT=y # 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -983,8 +1004,8 @@ CONFIG_EXAMPLES_OSTEST_WAITRESULT=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1017,16 +1038,16 @@ CONFIG_EXAMPLES_OSTEST_WAITRESULT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f4discovery/netnsh/defconfig b/configs/stm32f4discovery/netnsh/defconfig index 21fa2ec42ff36d5950f128f52f6374b29a39c0b9..0ba6e716798825492e157250a2ae54c6c5ff8a01 100644 --- a/configs/stm32f4discovery/netnsh/defconfig +++ b/configs/stm32f4discovery/netnsh/defconfig @@ -46,10 +46,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -210,6 +212,7 @@ CONFIG_SDIO_DMA=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -439,6 +442,10 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set CONFIG_STM32_CCMEXCLUDE=y CONFIG_STM32_DMACAPABLE=y + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -457,10 +464,18 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device 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 + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -741,6 +756,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -755,7 +772,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -763,6 +785,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -829,6 +852,8 @@ CONFIG_ETH0_PHY_LAN8720=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -878,15 +903,18 @@ CONFIG_USART6_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -1052,12 +1080,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_NET is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -1141,6 +1163,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1179,16 +1202,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1199,17 +1223,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1217,8 +1241,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1226,11 +1250,10 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # 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_WEBSERVER is not set # # File System Utilities @@ -1254,8 +1277,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1268,21 +1291,21 @@ 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_DISCOVER is not set # CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1387,6 +1410,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y CONFIG_NSH_NETINIT_THREAD=y CONFIG_NSH_NETINIT_THREAD_STACKSIZE=1568 CONFIG_NSH_NETINIT_THREAD_PRIORITY=80 @@ -1433,12 +1457,13 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_MDIO is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1446,8 +1471,7 @@ CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y # CONFIG_READLINE_TABCOMPLETION is not set # CONFIG_READLINE_CMD_HISTORY is not set -# CONFIG_SYSTEM_MDIO is not set # CONFIG_SYSTEM_SUDOKU is not set -# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f4discovery/nsh/defconfig b/configs/stm32f4discovery/nsh/defconfig index e57c9fd05e36de84d14e64b3060afa12f053c940..9db07e2797f3f0379ad4b07b4a5390a4bcb8da6e 100644 --- a/configs/stm32f4discovery/nsh/defconfig +++ b/configs/stm32f4discovery/nsh/defconfig @@ -46,10 +46,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -208,6 +210,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -436,6 +439,10 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -454,9 +461,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -699,6 +714,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -713,7 +730,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -721,6 +743,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -732,6 +755,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -781,15 +806,18 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -835,12 +863,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -914,6 +936,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -957,10 +980,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -970,17 +993,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -988,16 +1011,16 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -1021,8 +1044,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1147,12 +1170,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1160,6 +1183,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f4discovery/nxlines/defconfig b/configs/stm32f4discovery/nxlines/defconfig index 284eef1c4cf5f63306a0c7b005a6f157bf53e640..5c1a2c84387e45d23177ac56190ec3a38b59ed15 100644 --- a/configs/stm32f4discovery/nxlines/defconfig +++ b/configs/stm32f4discovery/nxlines/defconfig @@ -46,10 +46,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -208,6 +210,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -437,6 +440,10 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set # CONFIG_STM32_FSMC_SRAM is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -455,9 +462,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -700,6 +715,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -714,10 +731,14 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set # CONFIG_LCD_NOGETRUN is not set @@ -749,11 +770,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set - -# -# Alphanumeric/Segment LCD Devices -# -# CONFIG_LCD_LCD1602 is not set +# CONFIG_SLCD is not set # # LED Support @@ -761,6 +778,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -772,6 +790,8 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -821,15 +841,18 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -874,12 +897,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -1042,6 +1059,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1080,10 +1098,10 @@ CONFIG_HAVE_CXXINITIALIZE=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -1093,7 +1111,6 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_NSH is not set # 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 @@ -1108,13 +1125,14 @@ CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=4 CONFIG_EXAMPLES_NXLINES_BORDERCOLOR=0xffe0 CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR=0xf7bb CONFIG_EXAMPLES_NXLINES_BPP=16 +# CONFIG_EXAMPLES_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1128,9 +1146,9 @@ CONFIG_EXAMPLES_NXLINES_BPP=16 # 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -1154,8 +1172,8 @@ CONFIG_EXAMPLES_NXLINES_BPP=16 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1280,12 +1298,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1293,6 +1311,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f4discovery/pm/defconfig b/configs/stm32f4discovery/pm/defconfig index f9444cbdbeb4d5f865aaddaab075976acf9617fe..80912483b2d5832beb218bc4116b144da45afe75 100644 --- a/configs/stm32f4discovery/pm/defconfig +++ b/configs/stm32f4discovery/pm/defconfig @@ -46,10 +46,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -208,6 +210,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -435,6 +438,10 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_PWM is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set @@ -454,9 +461,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -720,7 +735,12 @@ CONFIG_RTC_NALARMS=1 # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -728,6 +748,7 @@ CONFIG_RTC_NALARMS=1 # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -757,6 +778,8 @@ CONFIG_PM_SLEEPENTER_COUNT=70 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -806,15 +829,18 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -860,12 +886,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -939,6 +959,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -982,10 +1003,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LEDS is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -996,17 +1017,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1014,16 +1035,16 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -1047,8 +1068,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1173,12 +1194,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1186,6 +1207,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f4discovery/posix_spawn/defconfig b/configs/stm32f4discovery/posix_spawn/defconfig index 2eaef4047318b967f3737249734b167e310d3525..54d5abeea9ae9c29635480bb661ab5c0bf90d1f4 100644 --- a/configs/stm32f4discovery/posix_spawn/defconfig +++ b/configs/stm32f4discovery/posix_spawn/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -209,6 +211,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -436,6 +439,10 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set CONFIG_STM32_CCMEXCLUDE=y + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -454,9 +461,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -698,7 +713,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -706,6 +726,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -717,6 +738,8 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -765,15 +788,18 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -810,12 +836,6 @@ CONFIG_FS_ROMFS=y # 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 # @@ -898,6 +918,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -935,10 +956,10 @@ CONFIG_HAVE_CXX=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -947,20 +968,20 @@ CONFIG_HAVE_CXX=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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=y CONFIG_EXAMPLES_POSIXSPAWN_DEVMINOR=0 CONFIG_EXAMPLES_POSIXSPAWN_DEVPATH="/dev/ram0" +# CONFIG_EXAMPLES_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_ROMFS is not set @@ -976,10 +997,10 @@ CONFIG_EXAMPLES_POSIXSPAWN_DEVPATH="/dev/ram0" # CONFIG_EXAMPLES_THTTPD is not set # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_UNIONFS is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -1003,8 +1024,8 @@ CONFIG_EXAMPLES_POSIXSPAWN_DEVPATH="/dev/ram0" # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1038,16 +1059,16 @@ CONFIG_EXAMPLES_POSIXSPAWN_DEVPATH="/dev/ram0" # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f4discovery/rgbled/defconfig b/configs/stm32f4discovery/rgbled/defconfig index 27023676715054162508eeca0ec7419cf4c390ea..d7f39c44ce3865944bd66bdc70178b37673abc1d 100644 --- a/configs/stm32f4discovery/rgbled/defconfig +++ b/configs/stm32f4discovery/rgbled/defconfig @@ -42,9 +42,14 @@ CONFIG_RAW_BINARY=y # # Debug Options # -CONFIG_DEBUG=y -CONFIG_ARCH_HAVE_HEAPCHECK=y -# CONFIG_DEBUG_VERBOSE is not set +CONFIG_DEBUG_ALERT=y +CONFIG_DEBUG_FEATURES=y + +# +# Debug SYSLOG Output Controls +# +# CONFIG_DEBUG_ERROR is not set +# CONFIG_DEBUG_ASSERTIONS is not set # # Subsystem Debug Options @@ -59,19 +64,19 @@ CONFIG_ARCH_HAVE_HEAPCHECK=y # # OS Function Debug Options # -# CONFIG_DEBUG_HEAP is not set # CONFIG_DEBUG_IRQ is not set # # Driver Debug Options # # CONFIG_DEBUG_LEDS is not set -# CONFIG_DEBUG_ANALOG is not set # CONFIG_DEBUG_GPIO is not set # CONFIG_DEBUG_PWM is not set # CONFIG_DEBUG_SPI is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -227,6 +232,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -455,6 +461,10 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# CONFIG_STM32_TIM1_PWM=y CONFIG_STM32_TIM1_MODE=0 CONFIG_STM32_TIM1_CHANNEL=1 @@ -486,9 +496,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -733,6 +751,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -747,7 +767,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -755,6 +780,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set CONFIG_RGBLED=y # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -766,6 +792,8 @@ CONFIG_RGBLED=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -816,15 +844,18 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -870,12 +901,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -949,6 +974,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -992,10 +1018,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1005,17 +1031,17 @@ 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_NXTERM 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_PPPD is not set CONFIG_EXAMPLES_RGBLED=y CONFIG_EXAMPLES_RGBLED_DEVNAME="/dev/rgbled0" CONFIG_EXAMPLES_RGBLED_PRIORITY=100 @@ -1026,16 +1052,16 @@ CONFIG_EXAMPLES_RGBLED_STACKSIZE=2048 # 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_SMART_TEST 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -1059,8 +1085,8 @@ CONFIG_EXAMPLES_RGBLED_STACKSIZE=2048 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1185,12 +1211,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1198,6 +1224,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f4discovery/src/stm32_autoleds.c b/configs/stm32f4discovery/src/stm32_autoleds.c index f4dd057b6688dce2a42b15dbe9d0135fa1e33c43..b7ebe06d6ff1b9c770eb9c709e2dc8788305cdcb 100644 --- a/configs/stm32f4discovery/src/stm32_autoleds.c +++ b/configs/stm32f4discovery/src/stm32_autoleds.c @@ -58,18 +58,6 @@ * 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 - /* The following definitions map the encoded LED setting to GPIO settings */ #define STM32F4_LED1 (1 << 0) diff --git a/configs/stm32f4discovery/src/stm32_bh1750fvi.c b/configs/stm32f4discovery/src/stm32_bh1750fvi.c index 5455c05ea318d5c988d6d8ccb1b7564264e3b11a..be896409644a99b1dbda757c5ae1363d9a203307 100644 --- a/configs/stm32f4discovery/src/stm32_bh1750fvi.c +++ b/configs/stm32f4discovery/src/stm32_bh1750fvi.c @@ -80,7 +80,7 @@ int stm32_bh1750initialize(FAR const char *devpath) FAR struct i2c_master_s *i2c; int ret; - sndbg("Initializing BH1750FVI!\n"); + sninfo("Initializing BH1750FVI!\n"); /* Initialize I2C */ @@ -96,7 +96,7 @@ int stm32_bh1750initialize(FAR const char *devpath) ret = bh1750fvi_register(devpath, i2c, BH1750FVI_I2C_ADDR); if (ret < 0) { - sndbg("Error registering BM180\n"); + snerr("ERROR: Error registering BM180\n"); } return ret; diff --git a/configs/stm32f4discovery/src/stm32_bmp180.c b/configs/stm32f4discovery/src/stm32_bmp180.c index 5f6aa85ac459b5843d6bcdbe60ea3c60a7faa1eb..bd90a808f77044b72e08abd6dec7afd8dff5511a 100644 --- a/configs/stm32f4discovery/src/stm32_bmp180.c +++ b/configs/stm32f4discovery/src/stm32_bmp180.c @@ -80,7 +80,7 @@ int stm32_bmp180initialize(FAR const char *devpath) FAR struct i2c_master_s *i2c; int ret; - sndbg("Initializing BMP180!\n"); + sninfo("Initializing BMP180!\n"); /* Initialize I2C */ @@ -96,7 +96,7 @@ int stm32_bmp180initialize(FAR const char *devpath) ret = bmp180_register(devpath, i2c); if (ret < 0) { - sndbg("Error registering BM180\n"); + snerr("ERROR: Error registering BM180\n"); } return ret; diff --git a/configs/stm32f4discovery/src/stm32_bringup.c b/configs/stm32f4discovery/src/stm32_bringup.c index fd4e7937515ba28f1eb9b713d473452efbd79c25..d958042ebda16bd22b8e9f97e8b180080fdcb6c1 100644 --- a/configs/stm32f4discovery/src/stm32_bringup.c +++ b/configs/stm32f4discovery/src/stm32_bringup.c @@ -120,7 +120,7 @@ int stm32_bringup(void) ret = stm32_pca9635_initialize(); if (ret < 0) { - sdbg("ERROR: stm32_pca9635_initialize failed: %d\n", ret); + serr("ERROR: stm32_pca9635_initialize failed: %d\n", ret); } #endif @@ -130,7 +130,7 @@ int stm32_bringup(void) ret = stm32_sdio_initialize(); if (ret != OK) { - fdbg("ERROR: Failed to initialize MMC/SD driver: %d\n", ret); + ferr("ERROR: Failed to initialize MMC/SD driver: %d\n", ret); return ret; } #endif @@ -143,7 +143,7 @@ int stm32_bringup(void) ret = stm32_usbhost_initialize(); if (ret != OK) { - udbg("ERROR: Failed to initialize USB host: %d\n", ret); + uerr("ERROR: Failed to initialize USB host: %d\n", ret); return ret; } #endif @@ -154,7 +154,7 @@ int stm32_bringup(void) ret = usbmonitor_start(0, NULL); if (ret != OK) { - udbg("ERROR: Failed to start USB monitor: %d\n", ret); + uerr("ERROR: Failed to start USB monitor: %d\n", ret); return ret; } #endif @@ -165,7 +165,7 @@ int stm32_bringup(void) lower = stm32_rtc_lowerhalf(); if (!lower) { - sdbg("ERROR: Failed to instantiate the RTC lower-half driver\n"); + serr("ERROR: Failed to instantiate the RTC lower-half driver\n"); return -ENOMEM; } else @@ -177,7 +177,7 @@ int stm32_bringup(void) ret = rtc_initialize(0, lower); if (ret < 0) { - sdbg("ERROR: Failed to bind/register the RTC driver: %d\n", ret); + serr("ERROR: Failed to bind/register the RTC driver: %d\n", ret); return ret; } } @@ -189,7 +189,7 @@ int stm32_bringup(void) ret = elf_initialize(); if (ret < 0) { - sdbg("ERROR: Initialization of the ELF loader failed: %d\n", ret); + serr("ERROR: Initialization of the ELF loader failed: %d\n", ret); } #endif @@ -207,7 +207,7 @@ int stm32_bringup(void) ret = mount(NULL, STM32_PROCFS_MOUNTPOINT, "procfs", 0, NULL); if (ret < 0) { - sdbg("ERROR: Failed to mount procfs at %s: %d\n", + serr("ERROR: Failed to mount procfs at %s: %d\n", STM32_PROCFS_MOUNTPOINT, ret); } #endif diff --git a/configs/stm32f4discovery/src/stm32_ethernet.c b/configs/stm32f4discovery/src/stm32_ethernet.c index 1d0d97d48ff2ac1a110cd71a3453c85e22088283..67b7b9e95e3a103a09c8f95ebc83187936a522d1 100644 --- a/configs/stm32f4discovery/src/stm32_ethernet.c +++ b/configs/stm32f4discovery/src/stm32_ethernet.c @@ -42,8 +42,8 @@ /* Force verbose debug on in this file only to support unit-level testing. */ #ifdef CONFIG_NETDEV_PHY_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG_VERBOSE 1 +# undef CONFIG_DEBUG_INFO +# define CONFIG_DEBUG_INFO 1 # undef CONFIG_DEBUG_NET # define CONFIG_DEBUG_NET 1 #endif @@ -79,11 +79,13 @@ */ #ifdef CONFIG_NETDEV_PHY_DEBUG -# define phydbg dbg -# define phylldbg lldbg +# define phyerr _err +# define phywarn _warn +# define phyinfo _info #else -# define phydbg(x...) -# define phylldbg(x...) +# define phyerr(x...) +# define phywarn(x...) +# define phyinfo(x...) #endif /************************************************************************************ @@ -105,7 +107,7 @@ static xcpt_t g_ethmac_handler; #ifdef HAVE_NETMONITOR static void stm32_emac0_phy_enable(bool enable) { - phydbg("enable=%d\n", enable); + phyinfo("enable=%d\n", enable); if (enable && g_ethmac_handler != NULL) { /* Attach and enable GPIO interrupt (and event) on the falling edge */ @@ -138,7 +140,7 @@ void weak_function stm32_netinitialize(void) #ifdef HAVE_NETMONITOR /* Configure the PHY interrupt GPIO */ - phydbg("Configuring %08x\n", GPIO_EMAC_NINT); + phyinfo("Configuring %08x\n", GPIO_EMAC_NINT); stm32_configgpio(GPIO_EMAC_NINT); #endif @@ -217,8 +219,8 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) xcpt_t oldhandler; irqstate_t flags; - nvdbg("%s: handler=%p\n", intf, handler); - phydbg("ETHMAC: devname=%s\n", STM32_ETHMAC_DEVNAME); + ninfo("%s: handler=%p\n", intf, handler); + phyinfo("ETHMAC: devname=%s\n", STM32_ETHMAC_DEVNAME); DEBUGASSERT(intf); @@ -227,13 +229,13 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable) if (strcmp(intf, STM32_ETHMAC_DEVNAME) == 0) { - phydbg("Select ETHMAC\n"); + phyinfo("Select ETHMAC\n"); g_ethmac_handler = handler; enabler = stm32_emac0_phy_enable; } else { - ndbg("Unsupported interface: %s\n", intf); + nerr("ERROR: Unsupported interface: %s\n", intf); enabler = NULL; } diff --git a/configs/stm32f4discovery/src/stm32_idle.c b/configs/stm32f4discovery/src/stm32_idle.c index 0e0ead83608934aafa3a3a06d77e9ee43e331617..a73ee49ba838dfdd6aecf0e314b108c1a0c42d71 100644 --- a/configs/stm32f4discovery/src/stm32_idle.c +++ b/configs/stm32f4discovery/src/stm32_idle.c @@ -122,7 +122,7 @@ static void stm32_idlepm(void) if (newstate != oldstate) { - lldbg("newstate= %d oldstate=%d\n", newstate, oldstate); + sinfo("newstate= %d oldstate=%d\n", newstate, oldstate); flags = enter_critical_section(); diff --git a/configs/stm32f4discovery/src/stm32_max31855.c b/configs/stm32f4discovery/src/stm32_max31855.c index 4422b5e7b3e998eae3c11a778565328d754f36f0..8b4539fa5bcdcf7ec5b0b344bbcb107ba31d4933 100644 --- a/configs/stm32f4discovery/src/stm32_max31855.c +++ b/configs/stm32f4discovery/src/stm32_max31855.c @@ -92,7 +92,7 @@ int stm32_max31855initialize(FAR const char *devpath) ret = max31855_register(devpath, spi); if (ret < 0) { - sndbg("Error registering MAX31855\n"); + snerr("ERROR: Error registering MAX31855\n"); } return ret; diff --git a/configs/stm32f4discovery/src/stm32_max6675.c b/configs/stm32f4discovery/src/stm32_max6675.c index 6f356aaaf8258cc22f1df31e11c5848d28237642..1b298daf9fa5f92e91514a64d665f00a4683b85f 100644 --- a/configs/stm32f4discovery/src/stm32_max6675.c +++ b/configs/stm32f4discovery/src/stm32_max6675.c @@ -92,7 +92,7 @@ int stm32_max6675initialize(FAR const char *devpath) ret = max6675_register(devpath, spi); if (ret < 0) { - sndbg("Error registering MAX6675\n"); + snerr("ERROR: Error registering MAX6675\n"); } return ret; diff --git a/configs/stm32f4discovery/src/stm32_pca9635.c b/configs/stm32f4discovery/src/stm32_pca9635.c index 7fcae301d14f551c34a949522e2772a776266a2d..dfea887d0ec335afb39acefd5ff888a33330f39c 100644 --- a/configs/stm32f4discovery/src/stm32_pca9635.c +++ b/configs/stm32f4discovery/src/stm32_pca9635.c @@ -86,14 +86,14 @@ int stm32_pca9635_initialize(void) i2c = stm32_i2cbus_initialize(PCA9635_I2CBUS); if (!i2c) { - dbg("ERROR: Failed to initialize I2C%d\n", PCA9635_I2CBUS); + _err("ERROR: Failed to initialize I2C%d\n", PCA9635_I2CBUS); return -1; } ret = pca9635pw_register("/dev/leddrv0", i2c, PCA9635_I2CADDR); if (ret < 0) { - sndbg("Failed to register PCA9635 driver: %d\n", ret); + snerr("ERROR: Failed to register PCA9635 driver: %d\n", ret); return ret; } diff --git a/configs/stm32f4discovery/src/stm32_pmbuttons.c b/configs/stm32f4discovery/src/stm32_pmbuttons.c index 0ca71c9dcdef6902c35bebaf0f46767f92c36153..750eaadbbe19dc1e82a09a6a72f7fa25ea902b27 100644 --- a/configs/stm32f4discovery/src/stm32_pmbuttons.c +++ b/configs/stm32f4discovery/src/stm32_pmbuttons.c @@ -41,13 +41,13 @@ #include #include +#include +#include + #include #include #include -#include -#include - #include "up_arch.h" #include "nvic.h" #include "stm32_pwr.h" @@ -75,10 +75,6 @@ #define PM_IDLE_DOMAIN 0 /* Revisit */ -/**************************************************************************** - * Private Types - ****************************************************************************/ - /**************************************************************************** * Private Function Prototypes ****************************************************************************/ @@ -87,10 +83,6 @@ static int button_handler(int irq, FAR void *context); #endif /* CONFIG_ARCH_IRQBUTTONS */ -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -142,9 +134,9 @@ void stm32_pm_buttons(void) if (oldhandler != NULL) { - lowsyslog(LOG_WARNING, "WARNING: oldhandler:%p is not NULL! " - "Button events may be lost or aliased!\n", - oldhandler); + _warn("WARNING: oldhandler:%p is not NULL! " + "Button events may be lost or aliased!\n", + oldhandler); } #endif } diff --git a/configs/stm32f4discovery/src/stm32_pwm.c b/configs/stm32f4discovery/src/stm32_pwm.c index b4a7eeba08d70c7fd09bc1652e427dd0ec62608b..9e80b06c7eae8b021dff07f85725a73ffcfc1c25 100644 --- a/configs/stm32f4discovery/src/stm32_pwm.c +++ b/configs/stm32f4discovery/src/stm32_pwm.c @@ -117,7 +117,7 @@ int board_pwm_setup(void) pwm = stm32_pwminitialize(STM32F4DISCOVERY_PWMTIMER); if (!pwm) { - adbg("Failed to get the STM32 PWM lower half\n"); + aerr("ERROR: Failed to get the STM32 PWM lower half\n"); return -ENODEV; } @@ -126,7 +126,7 @@ int board_pwm_setup(void) ret = pwm_register("/dev/pwm0", pwm); if (ret < 0) { - adbg("pwm_register failed: %d\n", ret); + aerr("ERROR: pwm_register failed: %d\n", ret); return ret; } diff --git a/configs/stm32f4discovery/src/stm32_qencoder.c b/configs/stm32f4discovery/src/stm32_qencoder.c index 823c846cf7361ef8c6817ed325791afa4aec1a25..5d0ae6460af061bcc9ea0ff2100ac7e08b565514 100644 --- a/configs/stm32f4discovery/src/stm32_qencoder.c +++ b/configs/stm32f4discovery/src/stm32_qencoder.c @@ -117,10 +117,6 @@ #ifdef HAVE_QENCODER -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -145,11 +141,11 @@ int qe_devinit(void) { /* Initialize a quadrature encoder interface. */ - snvdbg("Initializing the quadrature encoder using TIM%d\n", TIMID); + sninfo("Initializing the quadrature encoder using TIM%d\n", TIMID); ret = stm32_qeinitialize("/dev/qe0", TIMID); if (ret < 0) { - sndbg("stm32_qeinitialize failed: %d\n", ret); + snerr("ERROR: stm32_qeinitialize failed: %d\n", ret); return ret; } diff --git a/configs/stm32f4discovery/src/stm32_rgbled.c b/configs/stm32f4discovery/src/stm32_rgbled.c index 8391f445589c1bef827d9be5ef980baae1853e2f..66dc4fd0f1546b9fddb11e0320231f908c68c410 100644 --- a/configs/stm32f4discovery/src/stm32_rgbled.c +++ b/configs/stm32f4discovery/src/stm32_rgbled.c @@ -119,7 +119,7 @@ int stm32_rgbled_setup(void) ledr = stm32_pwminitialize(1); if (!ledr) { - dbg("Failed to get the STM32 PWM lower half to LEDR\n"); + lederr("ERROR: Failed to get the STM32 PWM lower half to LEDR\n"); return -ENODEV; } @@ -138,7 +138,7 @@ int stm32_rgbled_setup(void) ledg = stm32_pwminitialize(2); if (!ledg) { - dbg("Failed to get the STM32 PWM lower half to LEDG\n"); + lederr("ERROR: Failed to get the STM32 PWM lower half to LEDG\n"); return -ENODEV; } @@ -152,7 +152,7 @@ int stm32_rgbled_setup(void) ledb = stm32_pwminitialize(3); if (!ledb) { - dbg("Failed to get the STM32 PWM lower half to LEDB\n"); + lederr("ERROR: Failed to get the STM32 PWM lower half to LEDB\n"); return -ENODEV; } @@ -166,7 +166,7 @@ int stm32_rgbled_setup(void) ret = rgbled_register("/dev/rgbled0", ledr, ledg, ledb); if (ret < 0) { - dbg("rgbled_register failed: %d\n", ret); + lederr("ERROR: rgbled_register failed: %d\n", ret); return ret; } diff --git a/configs/stm32f4discovery/src/stm32_sdio.c b/configs/stm32f4discovery/src/stm32_sdio.c index 7d28442cf3b17a7b94598524752c498950d1ac97..a82a38d3488f23346e1c54291c99238e4df3452f 100644 --- a/configs/stm32f4discovery/src/stm32_sdio.c +++ b/configs/stm32f4discovery/src/stm32_sdio.c @@ -134,33 +134,33 @@ int stm32_sdio_initialize(void) /* Mount the SDIO-based MMC/SD block driver */ /* First, get an instance of the SDIO interface */ - fvdbg("Initializing SDIO slot %d\n", SDIO_SLOTNO); + finfo("Initializing SDIO slot %d\n", SDIO_SLOTNO); g_sdio_dev = sdio_initialize(SDIO_SLOTNO); if (!g_sdio_dev) { - fdbg("Failed to initialize SDIO slot %d\n", SDIO_SLOTNO); + ferr("ERROR: Failed to initialize SDIO slot %d\n", SDIO_SLOTNO); return -ENODEV; } /* Now bind the SDIO interface to the MMC/SD driver */ - fvdbg("Bind SDIO to the MMC/SD driver, minor=%d\n", SDIO_MINOR); + finfo("Bind SDIO to the MMC/SD driver, minor=%d\n", SDIO_MINOR); ret = mmcsd_slotinitialize(SDIO_MINOR, g_sdio_dev); if (ret != OK) { - fdbg("Failed to bind SDIO to the MMC/SD driver: %d\n", ret); + ferr("ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); return ret; } - fvdbg("Successfully bound SDIO to the MMC/SD driver\n"); + finfo("Successfully bound SDIO to the MMC/SD driver\n"); #ifdef HAVE_NCD /* Use SD card detect pin to check if a card is g_sd_inserted */ cd_status = !stm32_gpioread(GPIO_SDIO_NCD); - fvdbg("Card detect : %d\n", cd_status); + finfo("Card detect : %d\n", cd_status); sdio_mediachange(g_sdio_dev, cd_status); #else diff --git a/configs/stm32f4discovery/src/stm32_spi.c b/configs/stm32f4discovery/src/stm32_spi.c index f057b874d4e4aa828143acaf9499c2054d61cd84..c6d7506fc184b3f2d5a7b28b3e06e8b234c6aa64 100644 --- a/configs/stm32f4discovery/src/stm32_spi.c +++ b/configs/stm32f4discovery/src/stm32_spi.c @@ -55,32 +55,6 @@ #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -144,7 +118,7 @@ void weak_function stm32_spidev_initialize(void) #ifdef CONFIG_STM32_SPI1 void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #if defined(CONFIG_LCD_UG2864AMBAG01) || defined(CONFIG_LCD_UG2864HSWEG01) || \ defined(CONFIG_LCD_SSD1351) @@ -168,7 +142,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI2 void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #if defined(CONFIG_MAX31855) if (devid == SPIDEV_TEMPERATURE) @@ -193,7 +167,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI3 void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) diff --git a/configs/stm32f4discovery/src/stm32_ssd1289.c b/configs/stm32f4discovery/src/stm32_ssd1289.c index 588b9ee82bc2e7b03f4f31f61ef85cb4d4a962e6..488316763cc63c684a5e20fcf05153481357fcb4 100644 --- a/configs/stm32f4discovery/src/stm32_ssd1289.c +++ b/configs/stm32f4discovery/src/stm32_ssd1289.c @@ -72,20 +72,6 @@ # error "CONFIG_STM32_FSMC is required to use the LCD" #endif -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must - * also be enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif - /* STM32F4Discovery LCD Hardware Definitions ******************************************/ /* LCD /CS is CE1 == NOR/SRAM Bank 1 * @@ -107,23 +93,10 @@ #define LCD_NADDRLINES 1 /* A16 */ #define LCD_NDATALINES 16 /* D0-15 */ -/* Debug ******************************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - -/************************************************************************************** - * Private Type Definition - **************************************************************************************/ - /************************************************************************************** * Private Function Protototypes **************************************************************************************/ + /* Low Level LCD access */ static void stm32_select(FAR struct ssd1289_lcd_s *dev); @@ -355,7 +328,7 @@ int board_lcd_initialize(void) if (!g_ssd1289drvr) { - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); /* Configure GPIO pins and configure the FSMC to support the LCD */ @@ -373,7 +346,7 @@ int board_lcd_initialize(void) g_ssd1289drvr = ssd1289_lcdinitialize(&g_ssd1289); if (!g_ssd1289drvr) { - lcddbg("ERROR: ssd1289_lcdinitialize failed\n"); + lcderr("ERROR: ssd1289_lcdinitialize failed\n"); return -ENODEV; } } diff --git a/configs/stm32f4discovery/src/stm32_ssd1351.c b/configs/stm32f4discovery/src/stm32_ssd1351.c index 26e77e8ee05c9826c9915d12fe9816e50d2adea4..7df8510a35b8b069b5e556514c130fa21ac0dbf5 100644 --- a/configs/stm32f4discovery/src/stm32_ssd1351.c +++ b/configs/stm32f4discovery/src/stm32_ssd1351.c @@ -71,16 +71,6 @@ # error "The configuration requires the SPI 4-wire interface" #endif -/* Debug ********************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__) -# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -114,7 +104,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) spi = stm32_spibus_initialize(1); if (spi == NULL) { - lcddbg("Failed to initialize SPI port 1\n"); + lcderr("ERROR: Failed to initialize SPI port 1\n"); } else { @@ -123,11 +113,11 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) dev = ssd1351_initialize(spi, devno); if (dev == NULL) { - lcddbg("Failed to bind SPI port 1 to OLED %d: %d\n", devno); + lcderr("ERROR: Failed to bind SPI port 1 to OLED %d: %d\n", devno); } else { - lcdvdbg("Bound SPI port 1 to OLED %d\n", devno); + lcdinfo("Bound SPI port 1 to OLED %d\n", devno); /* And turn the OLED on */ diff --git a/configs/stm32f4discovery/src/stm32_ug2864ambag01.c b/configs/stm32f4discovery/src/stm32_ug2864ambag01.c index 24e5c840341518a37918d7395c738644d6296b29..c67a570388ae1e047fb79fae85c3ec0aa56f5036 100644 --- a/configs/stm32f4discovery/src/stm32_ug2864ambag01.c +++ b/configs/stm32f4discovery/src/stm32_ug2864ambag01.c @@ -93,16 +93,6 @@ /* Definitions in stm32f4discovery.h */ -/* Debug ********************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__) -# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -136,7 +126,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) spi = stm32_spibus_initialize(1); if (!spi) { - lcddbg("Failed to initialize SPI port 1\n"); + lcderr("ERROR: Failed to initialize SPI port 1\n"); } else { @@ -145,11 +135,11 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) dev = ug2864ambag01_initialize(spi, devno); if (!dev) { - lcddbg("Failed to bind SPI port 1 to OLED %d: %d\n", devno); + lcderr("ERROR: Failed to bind SPI port 1 to OLED %d: %d\n", devno); } else { - lcdvdbg("Bound SPI port 1 to OLED %d\n", devno); + lcdinfo("Bound SPI port 1 to OLED %d\n", devno); /* And turn the OLED on */ diff --git a/configs/stm32f4discovery/src/stm32_ug2864hsweg01.c b/configs/stm32f4discovery/src/stm32_ug2864hsweg01.c index 78c24bc368316c88014cef0396a58a776161023a..3723f3ecbc886880cc226bfd9b8e4d1d8b905b76 100644 --- a/configs/stm32f4discovery/src/stm32_ug2864hsweg01.c +++ b/configs/stm32f4discovery/src/stm32_ug2864hsweg01.c @@ -93,16 +93,6 @@ /* Definitions in stm32f4discovery.h */ -/* Debug ********************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__) -# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -136,7 +126,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) spi = stm32_spibus_initialize(1); if (!spi) { - lcddbg("Failed to initialize SPI port 1\n"); + lcderr("ERROR: Failed to initialize SPI port 1\n"); } else { @@ -145,11 +135,11 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) dev = ssd1306_initialize(spi, devno); if (!dev) { - lcddbg("Failed to bind SPI port 1 to OLED %d: %d\n", devno); + lcderr("ERROR: Failed to bind SPI port 1 to OLED %d: %d\n", devno); } else { - lcdvdbg("Bound SPI port 1 to OLED %d\n", devno); + lcdinfo("Bound SPI port 1 to OLED %d\n", devno); /* And turn the OLED on */ diff --git a/configs/stm32f4discovery/src/stm32_usb.c b/configs/stm32f4discovery/src/stm32_usb.c index 24f35f726a1d247e70610507b637645c33e649a3..397aaff76dfce140c76de2e500c82824bcb4b14f 100644 --- a/configs/stm32f4discovery/src/stm32_usb.c +++ b/configs/stm32f4discovery/src/stm32_usb.c @@ -102,13 +102,13 @@ static int usbhost_waiter(int argc, char *argv[]) { struct usbhost_hubport_s *hport; - uvdbg("Running\n"); + uinfo("Running\n"); for (;;) { /* Wait for the device to change state */ DEBUGVERIFY(CONN_WAIT(g_usbconn, &hport)); - uvdbg("%s\n", hport->connected ? "connected" : "disconnected"); + uinfo("%s\n", hport->connected ? "connected" : "disconnected"); /* Did we just become connected? */ @@ -175,7 +175,7 @@ int stm32_usbhost_initialize(void) * that we care about: */ - uvdbg("Register class drivers\n"); + uinfo("Register class drivers\n"); #ifdef CONFIG_USBHOST_HUB /* Initialize USB hub class support */ @@ -183,7 +183,7 @@ int stm32_usbhost_initialize(void) ret = usbhost_hub_initialize(); if (ret < 0) { - udbg("ERROR: usbhost_hub_initialize failed: %d\n", ret); + uerr("ERROR: usbhost_hub_initialize failed: %d\n", ret); } #endif @@ -193,7 +193,7 @@ int stm32_usbhost_initialize(void) ret = usbhost_msc_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the mass storage class: %d\n", ret); + uerr("ERROR: Failed to register the mass storage class: %d\n", ret); } #endif @@ -203,7 +203,7 @@ int stm32_usbhost_initialize(void) ret = usbhost_cdcacm_initialize(); if (ret != OK) { - udbg("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret); + uerr("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret); } #endif @@ -213,7 +213,7 @@ int stm32_usbhost_initialize(void) ret = usbhost_kbdinit(); if (ret != OK) { - udbg("Failed to register the HID keyboard class\n"); + uerr("ERROR: Failed to register the HID keyboard class\n"); } #endif @@ -223,19 +223,19 @@ int stm32_usbhost_initialize(void) ret = usbhost_mouse_init(); if (ret != OK) { - udbg("Failed to register the HID mouse class\n"); + uerr("ERROR: Failed to register the HID mouse class\n"); } #endif /* Then get an instance of the USB host interface */ - uvdbg("Initialize USB host\n"); + uinfo("Initialize USB host\n"); g_usbconn = stm32_otgfshost_initialize(0); if (g_usbconn) { /* Start a thread to handle device connection. */ - uvdbg("Start usbhost_waiter\n"); + uinfo("Start usbhost_waiter\n"); pid = task_create("usbhost", CONFIG_STM32F4DISCO_USBHOST_PRIO, CONFIG_STM32F4DISCO_USBHOST_STACKSIZE, @@ -329,7 +329,7 @@ xcpt_t stm32_setup_overcurrent(xcpt_t handler) #ifdef CONFIG_USBDEV void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } #endif diff --git a/configs/stm32f4discovery/src/stm32_userleds.c b/configs/stm32f4discovery/src/stm32_userleds.c index 1401ca2bb4cbe2a52b03c45852ee02ecdf038ed5..392b14f73e6b23e89a9c5a482d282c4748ab3de8 100644 --- a/configs/stm32f4discovery/src/stm32_userleds.c +++ b/configs/stm32f4discovery/src/stm32_userleds.c @@ -55,22 +55,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Data ****************************************************************************/ diff --git a/configs/stm32f4discovery/src/stm32_zerocross.c b/configs/stm32f4discovery/src/stm32_zerocross.c index 23154764487a0ab5b482610c9b504e52252f2902..af0b99b860a518180419546e36ccb4a159bc67f0 100644 --- a/configs/stm32f4discovery/src/stm32_zerocross.c +++ b/configs/stm32f4discovery/src/stm32_zerocross.c @@ -111,7 +111,7 @@ static void zcross_enable(FAR const struct zc_lowerhalf_s *lower, flags = enter_critical_section(); zcross_disable(); - snllvdbg("handler: %p arg: %p\n", handler, arg); + sninfo("handler: %p arg: %p\n", handler, arg); if (handler) { diff --git a/configs/stm32f4discovery/uavcan/defconfig b/configs/stm32f4discovery/uavcan/defconfig index 97db93590ef907e241f0f667dd393a6cf626b267..fcdac447bc7839c965534ce5e0fd766cfce0b57e 100644 --- a/configs/stm32f4discovery/uavcan/defconfig +++ b/configs/stm32f4discovery/uavcan/defconfig @@ -42,10 +42,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -199,6 +201,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -426,6 +429,10 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -676,7 +683,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -684,6 +696,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -698,19 +711,22 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set CONFIG_RAMLOG=y -CONFIG_RAMLOG_SYSLOG=y CONFIG_RAMLOG_BUFSIZE=1024 # CONFIG_RAMLOG_CRLF is not set CONFIG_RAMLOG_NONBLOCKING=y CONFIG_RAMLOG_NPOLLWAITERS=4 +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +# CONFIG_SYSLOG_CHAR is not set +CONFIG_RAMLOG_SYSLOG=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -747,13 +763,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_PROCFS 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 # @@ -826,6 +835,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -895,10 +905,10 @@ CONFIG_LIBUAVCAN_INIT_RETRIES=0 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -907,18 +917,18 @@ CONFIG_LIBUAVCAN_INIT_RETRIES=0 # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -936,9 +946,9 @@ CONFIG_EXAMPLES_UAVCAN=y 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_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -960,8 +970,8 @@ CONFIG_EXAMPLES_UAVCAN_NODE_NAME="org.nuttx.apps.examples.uavcan" # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -995,16 +1005,16 @@ CONFIG_EXAMPLES_UAVCAN_NODE_NAME="org.nuttx.apps.examples.uavcan" # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f4discovery/usbnsh/defconfig b/configs/stm32f4discovery/usbnsh/defconfig index 66134476b765b85c0971426242dcb7388c4a2ba8..b85e4d48690da423af30da878de8d94f1186f134 100644 --- a/configs/stm32f4discovery/usbnsh/defconfig +++ b/configs/stm32f4discovery/usbnsh/defconfig @@ -46,10 +46,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -208,6 +210,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -436,6 +439,10 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set # CONFIG_STM32_CCMEXCLUDE is not set + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -454,9 +461,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART2_SERIALDRIVER=y # CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -707,6 +722,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -721,7 +738,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -729,6 +751,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -740,6 +763,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y +# CONFIG_SERIAL_CONSOLE is not set # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -829,14 +853,19 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +CONFIG_SYSLOG_CHAR=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set +CONFIG_SYSLOG_CHAR_CRLF=y +CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" # # Networking Support @@ -882,14 +911,6 @@ CONFIG_FS_PROCFS=y # 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=y -CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" - # # Graphics Support # @@ -963,6 +984,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1006,10 +1028,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1019,17 +1041,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1037,17 +1059,17 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -1071,8 +1093,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1198,12 +1220,13 @@ CONFIG_NSH_ARCHINIT=y # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CDCACM is not set # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1211,7 +1234,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f4discovery/winbuild/defconfig b/configs/stm32f4discovery/winbuild/defconfig index 079f197c1ff76b0b08905966aaacfc7a930396da..e52bc101ae301bba7283aff37ca4557c8067ea2d 100644 --- a/configs/stm32f4discovery/winbuild/defconfig +++ b/configs/stm32f4discovery/winbuild/defconfig @@ -45,7 +45,7 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_HEAPCHECK=y CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set @@ -715,7 +715,7 @@ CONFIG_USART2_2STOP=0 # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -749,7 +749,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/stm32f746-ws/Kconfig b/configs/stm32f746-ws/Kconfig new file mode 100644 index 0000000000000000000000000000000000000000..03e46e8266abeadc4f9806af0953d388b281812e --- /dev/null +++ b/configs/stm32f746-ws/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_STM32F746_WS + +endif # ARCH_BOARD_STM32F746_WS diff --git a/configs/stm32f746-ws/include/board.h b/configs/stm32f746-ws/include/board.h new file mode 100644 index 0000000000000000000000000000000000000000..2a64e967fecb47683ea128d8ff7155db17c8f457 --- /dev/null +++ b/configs/stm32f746-ws/include/board.h @@ -0,0 +1,294 @@ +/************************************************************************************ + * configs/stm32f746-ws/include/board.h + * + * 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. + * + ************************************************************************************/ + +#ifndef __CONFIG_STM32F746_WS_INCLUDE_BOARD_H +#define __CONFIG_STM32F746_WS_INCLUDE_BOARD_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#ifndef __ASSEMBLY__ +# include +#endif + +#ifdef __KERNEL__ +#include "stm32_rcc.h" +#ifdef CONFIG_STM32F7_SDMMC1 +# include "stm32_sdmmc.h" +#endif +#endif + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Clocking *************************************************************************/ +/* The STM32F7 Discovery board provides the following clock sources: + * + * X1: 24 MHz oscillator for USB OTG HS PHY and camera module (daughter board) + * X2: 25 MHz oscillator for STM32F746NGH6 microcontroller and Ethernet PHY. + * X3: 32.768 KHz crystal for STM32F746NGH6 embedded RTC + * + * So we have these clock source available within the STM32 + * + * HSI: 16 MHz RC factory-trimmed + * LSI: 32 KHz RC + * HSE: On-board crystal frequency is 25MHz + * LSE: 32.768 kHz + */ + +#define STM32_BOARD_XTAL 8000000ul + +#define STM32_HSI_FREQUENCY 16000000ul +#define STM32_LSI_FREQUENCY 32000 +#define STM32_HSE_FREQUENCY STM32_BOARD_XTAL +#define STM32_LSE_FREQUENCY 32768 + +/* Main PLL Configuration. + * + * PLL source is HSE = 8,000,000 + * + * PLL_VCO = (STM32_HSE_FREQUENCY / PLLM) * PLLN + * Subject to: + * + * 2 <= PLLM <= 63 + * 192 <= PLLN <= 432 + * 192 MHz <= PLL_VCO <= 432MHz + * + * SYSCLK = PLL_VCO / PLLP + * Subject to + * + * PLLP = {2, 4, 6, 8} + * SYSCLK <= 216 MHz + * + * USB OTG FS, SDMMC and RNG Clock = PLL_VCO / PLLQ + * Subject to + * The USB OTG FS requires a 48 MHz clock to work correctly. The SDMMC + * and the random number generator need a frequency lower than or equal + * to 48 MHz to work correctly. + * + * 2 <= PLLQ <= 15 + */ + +/* Highest SYSCLK with USB OTG FS clock <= 48MHz + * + * PLL_VCO = (8,000,000 / 8) * 432 = 432 MHz + * SYSCLK = 432 MHz / 2 = 216 MHz + * USB OTG FS, SDMMC and RNG Clock = 432 MHz / 9 = 48 MHz + */ + +#define STM32_PLLCFG_PLLM RCC_PLLCFG_PLLM(8) +#define STM32_PLLCFG_PLLN RCC_PLLCFG_PLLN(432) +#define STM32_PLLCFG_PLLP RCC_PLLCFG_PLLP_2 +#define STM32_PLLCFG_PLLQ RCC_PLLCFG_PLLQ(9) + +#define STM32_VCO_FREQUENCY ((STM32_HSE_FREQUENCY / 8) * 432) +#define STM32_SYSCLK_FREQUENCY (STM32_VCO_FREQUENCY / 2) +#define STM32_OTGFS_FREQUENCY (STM32_VCO_FREQUENCY / 9) + +/* Configure factors for PLLSAI clock */ + + +#define STM32_RCC_PLLSAICFGR_PLLSAIN RCC_PLLSAICFGR_PLLSAIN(192) +#define STM32_RCC_PLLSAICFGR_PLLSAIP RCC_PLLSAICFGR_PLLSAIP(2) +#define STM32_RCC_PLLSAICFGR_PLLSAIQ RCC_PLLSAICFGR_PLLSAIQ(2) +#define STM32_RCC_PLLSAICFGR_PLLSAIR RCC_PLLSAICFGR_PLLSAIR(2) + +/* Configure Dedicated Clock Configuration Register */ + +#define STM32_RCC_DCKCFGR1_PLLI2SDIVQ RCC_DCKCFGR1_PLLI2SDIVQ(1) +#define STM32_RCC_DCKCFGR1_PLLSAIDIVQ RCC_DCKCFGR1_PLLSAIDIVQ(1) +#define STM32_RCC_DCKCFGR1_PLLSAIDIVR RCC_DCKCFGR1_PLLSAIDIVR(0) +#define STM32_RCC_DCKCFGR1_SAI1SRC RCC_DCKCFGR1_SAI1SEL(0) +#define STM32_RCC_DCKCFGR1_SAI2SRC RCC_DCKCFGR1_SAI2SEL(0) +#define STM32_RCC_DCKCFGR1_TIMPRESRC 0 +#define STM32_RCC_DCKCFGR1_DFSDM1SRC 0 +#define STM32_RCC_DCKCFGR1_ADFSDM1SRC 0 + + + +/* Configure factors for PLLI2S clock */ + +#define STM32_RCC_PLLI2SCFGR_PLLI2SN RCC_PLLI2SCFGR_PLLI2SN(192) +#define STM32_RCC_PLLI2SCFGR_PLLI2SP RCC_PLLI2SCFGR_PLLI2SP(2) +#define STM32_RCC_PLLI2SCFGR_PLLI2SQ RCC_PLLI2SCFGR_PLLI2SQ(2) +#define STM32_RCC_PLLI2SCFGR_PLLI2SR RCC_PLLI2SCFGR_PLLI2SR(2) + +/* Configure Dedicated Clock Configuration Register 2 */ + +#define STM32_RCC_DCKCFGR2_USART1SRC RCC_DCKCFGR2_USART1SEL_APB +#define STM32_RCC_DCKCFGR2_USART2SRC RCC_DCKCFGR2_USART2SEL_APB +#define STM32_RCC_DCKCFGR2_UART4SRC RCC_DCKCFGR2_UART4SEL_APB +#define STM32_RCC_DCKCFGR2_UART5SRC RCC_DCKCFGR2_UART5SEL_APB +#define STM32_RCC_DCKCFGR2_USART6SRC RCC_DCKCFGR2_USART6SEL_APB +#define STM32_RCC_DCKCFGR2_UART7SRC RCC_DCKCFGR2_UART7SEL_APB +#define STM32_RCC_DCKCFGR2_UART8SRC RCC_DCKCFGR2_UART8SEL_APB +#define STM32_RCC_DCKCFGR2_I2C1SRC RCC_DCKCFGR2_I2C1SEL_HSI +#define STM32_RCC_DCKCFGR2_I2C2SRC RCC_DCKCFGR2_I2C2SEL_HSI +#define STM32_RCC_DCKCFGR2_I2C3SRC RCC_DCKCFGR2_I2C3SEL_HSI +#define STM32_RCC_DCKCFGR2_I2C4SRC RCC_DCKCFGR2_I2C4SEL_HSI +#define STM32_RCC_DCKCFGR2_LPTIM1SRC RCC_DCKCFGR2_LPTIM1SEL_APB +#define STM32_RCC_DCKCFGR2_CECSRC RCC_DCKCFGR2_CECSEL_HSI +#define STM32_RCC_DCKCFGR2_CK48MSRC RCC_DCKCFGR2_CK48MSEL_PLLSAI +#define STM32_RCC_DCKCFGR2_SDMMCSRC RCC_DCKCFGR2_SDMMCSEL_48MHZ +#define STM32_RCC_DCKCFGR2_SDMMC2SRC RCC_DCKCFGR2_SDMMC2SEL_48MHZ +#define STM32_RCC_DCKCFGR2_DSISRC RCC_DCKCFGR2_DSISEL_48MHZ + + +/* Several prescalers allow the configuration of the two AHB buses, the + * high-speed APB (APB2) and the low-speed APB (APB1) domains. The maximum + * frequency of the two AHB buses is 216 MHz while the maximum frequency of + * the high-speed APB domains is 108 MHz. The maximum allowed frequency of + * the low-speed APB domain is 54 MHz. + */ + +/* AHB clock (HCLK) is SYSCLK (216 MHz) */ + +#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 (54 MHz) */ + +#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 */ + +#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/2 (108MHz) */ + +#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_PCLK2_FREQUENCY) +#define STM32_APB2_TIM10_CLKIN (2*STM32_PCLK2_FREQUENCY) +#define STM32_APB2_TIM11_CLKIN (2*STM32_PCLK2_FREQUENCY) + +/* FLASH wait states + * + * --------- ---------- ----------- + * VDD MAX SYSCLK WAIT STATES + * --------- ---------- ----------- + * 1.7-2.1 V 180 MHz 8 + * 2.1-2.4 V 216 MHz 9 + * 2.4-2.7 V 216 MHz 8 + * 2.7-3.6 V 216 MHz 7 + * --------- ---------- ----------- + */ + +#define BOARD_FLASH_WAITSTATES 7 + +/* Alternate function pin selections ************************************************/ + +/* USART6: + * + * These configurations assume that you are using a standard Arduio RS-232 shield + * with the serial interface with RX on pin D0 and TX on pin D1: + * + * -------- --------------- + * STM32F7 + * ARDUIONO FUNCTION GPIO + * -- ----- --------- ----- + * DO RX USART6_RX PC7 + * D1 TX USART6_TX PC6 + * -- ----- --------- ----- + */ + +#define GPIO_USART6_RX GPIO_USART6_RX_1 +#define GPIO_USART6_TX GPIO_USART6_TX_1 + +#define GPIO_SPI1_SCK GPIO_SPI1_SCK_1 +#define GPIO_SPI1_MISO GPIO_SPI1_MISO_1 +#define GPIO_SPI1_MOSI GPIO_SPI1_MOSI_1 + +#define GPIO_I2C1_SCL GPIO_I2C1_SCL_1 +#define GPIO_I2C1_SDA GPIO_I2C1_SDA_1 + +/************************************************************************************ + * 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 /* __CONFIG_STM32F746_WS_INCLUDE_BOARD_H */ diff --git a/configs/nucleo-144/nsh/Make.defs b/configs/stm32f746-ws/nsh/Make.defs similarity index 99% rename from configs/nucleo-144/nsh/Make.defs rename to configs/stm32f746-ws/nsh/Make.defs index 45b3f5f4aee98b1defe940c9560d22d8d92aadda..f2aa3a4d62bddae1dd778c96982e514de6e4e90b 100644 --- a/configs/nucleo-144/nsh/Make.defs +++ b/configs/stm32f746-ws/nsh/Make.defs @@ -1,5 +1,5 @@ ############################################################################ -# configs/nucleo-144/nsh/Make.defs +# configs/stm32f746-ws/nsh/Make.defs # # Copyright (C) 2016 Gregory Nutt. All rights reserved. # Author: Gregory Nutt diff --git a/configs/stm32f746-ws/nsh/defconfig b/configs/stm32f746-ws/nsh/defconfig new file mode 100644 index 0000000000000000000000000000000000000000..88c143a392f4aa6f1e9434531a05d8f0423d5559 --- /dev/null +++ b/configs/stm32f746-ws/nsh/defconfig @@ -0,0 +1,1082 @@ +# +# 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 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=y +# CONFIG_ARCH_DEBUG_H is not set + +# +# Debug Options +# +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set +CONFIG_ARCH_HAVE_STACKCHECK=y +CONFIG_STACK_COLORATION=y +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_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 is not set +CONFIG_ARCH_FPU=y +# 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_USART6_RS485 is not set +# CONFIG_SERIAL_DISABLE_REORDERING is not set + +# +# STM32 F7 Configuration Options +# +# CONFIG_ARCH_CHIP_STM32F745VG is not set +# CONFIG_ARCH_CHIP_STM32F745VE is not set +# CONFIG_ARCH_CHIP_STM32F745IG is not set +# CONFIG_ARCH_CHIP_STM32F745IE is not set +# CONFIG_ARCH_CHIP_STM32F745ZE is not set +# CONFIG_ARCH_CHIP_STM32F745ZG is not set +# CONFIG_ARCH_CHIP_STM32F746BG is not set +# CONFIG_ARCH_CHIP_STM32F746VG is not set +# CONFIG_ARCH_CHIP_STM32F746VE is not set +# CONFIG_ARCH_CHIP_STM32F746BE is not set +# CONFIG_ARCH_CHIP_STM32F746ZG is not set +# CONFIG_ARCH_CHIP_STM32F746IE is not set +# CONFIG_ARCH_CHIP_STM32F746NG is not set +# CONFIG_ARCH_CHIP_STM32F746NE is not set +# CONFIG_ARCH_CHIP_STM32F746ZE is not set +CONFIG_ARCH_CHIP_STM32F746IG=y +# CONFIG_ARCH_CHIP_STM32F756NG is not set +# CONFIG_ARCH_CHIP_STM32F756BG is not set +# CONFIG_ARCH_CHIP_STM32F756IG is not set +# CONFIG_ARCH_CHIP_STM32F756VG is not set +# CONFIG_ARCH_CHIP_STM32F756ZG is not set +# CONFIG_ARCH_CHIP_STM32F765NI is not set +# CONFIG_ARCH_CHIP_STM32F765VI is not set +# CONFIG_ARCH_CHIP_STM32F765VG is not set +# CONFIG_ARCH_CHIP_STM32F765BI is not set +# CONFIG_ARCH_CHIP_STM32F765NG is not set +# CONFIG_ARCH_CHIP_STM32F765ZG is not set +# CONFIG_ARCH_CHIP_STM32F765ZI is not set +# CONFIG_ARCH_CHIP_STM32F765IG is not set +# CONFIG_ARCH_CHIP_STM32F765BG is not set +# CONFIG_ARCH_CHIP_STM32F765II is not set +# CONFIG_ARCH_CHIP_STM32F767NG is not set +# CONFIG_ARCH_CHIP_STM32F767IG is not set +# CONFIG_ARCH_CHIP_STM32F767VG is not set +# CONFIG_ARCH_CHIP_STM32F767ZG is not set +# CONFIG_ARCH_CHIP_STM32F767NI is not set +# CONFIG_ARCH_CHIP_STM32F767VI is not set +# CONFIG_ARCH_CHIP_STM32F767BG is not set +# CONFIG_ARCH_CHIP_STM32F767ZI is not set +# CONFIG_ARCH_CHIP_STM32F767II is not set +# CONFIG_ARCH_CHIP_STM32F769BI is not set +# CONFIG_ARCH_CHIP_STM32F769II is not set +# CONFIG_ARCH_CHIP_STM32F769BG is not set +# CONFIG_ARCH_CHIP_STM32F769NI is not set +# CONFIG_ARCH_CHIP_STM32F769AI is not set +# CONFIG_ARCH_CHIP_STM32F769NG is not set +# CONFIG_ARCH_CHIP_STM32F769IG is not set +# CONFIG_ARCH_CHIP_STM32F777ZI is not set +# CONFIG_ARCH_CHIP_STM32F777VI is not set +# CONFIG_ARCH_CHIP_STM32F777NI is not set +# CONFIG_ARCH_CHIP_STM32F777BI is not set +# CONFIG_ARCH_CHIP_STM32F777II is not set +# CONFIG_ARCH_CHIP_STM32F778AI is not set +# CONFIG_ARCH_CHIP_STM32F779II is not set +# CONFIG_ARCH_CHIP_STM32F779NI is not set +# CONFIG_ARCH_CHIP_STM32F779BI is not set +# CONFIG_ARCH_CHIP_STM32F779AI is not set +CONFIG_STM32F7_STM32F74XX=y +# CONFIG_STM32F7_STM32F75XX is not set +# CONFIG_STM32F7_STM32F76XX is not set +# CONFIG_STM32F7_STM32F77XX is not set +# CONFIG_STM32F7_IO_CONFIG_V is not set +CONFIG_STM32F7_IO_CONFIG_I=y +# CONFIG_STM32F7_IO_CONFIG_Z is not set +# CONFIG_STM32F7_IO_CONFIG_N is not set +# CONFIG_STM32F7_IO_CONFIG_B is not set +# CONFIG_STM32F7_IO_CONFIG_A is not set +# CONFIG_STM32F7_STM32F745XX is not set +CONFIG_STM32F7_STM32F746XX=y +# CONFIG_STM32F7_STM32F756XX is not set +# CONFIG_STM32F7_STM32F765XX is not set +# CONFIG_STM32F7_STM32F767XX is not set +# CONFIG_STM32F7_STM32F768XX is not set +# CONFIG_STM32F7_STM32F768AX is not set +# CONFIG_STM32F7_STM32F769XX is not set +# CONFIG_STM32F7_STM32F769AX is not set +# CONFIG_STM32F7_STM32F777XX is not set +# CONFIG_STM32F7_STM32F778XX is not set +# CONFIG_STM32F7_STM32F778AX is not set +# CONFIG_STM32F7_STM32F779XX is not set +# CONFIG_STM32F7_STM32F779AX is not set +# CONFIG_STM32F7_FLASH_CONFIG_E is not set +# CONFIG_STM32F7_FLASH_CONFIG_I is not set +CONFIG_STM32F7_FLASH_OVERRIDE_DEFAULT=y +# CONFIG_STM32F7_FLASH_OVERRIDE_E is not set +# CONFIG_STM32F7_FLASH_OVERRIDE_G is not set +# CONFIG_STM32F7_FLASH_OVERRIDE_I is not set + +# +# STM32 Peripheral Support +# +CONFIG_STM32F7_HAVE_LTDC=y +CONFIG_STM32F7_HAVE_FSMC=y +CONFIG_STM32F7_HAVE_ETHRNET=y +CONFIG_STM32F7_HAVE_RNG=y +CONFIG_STM32F7_HAVE_SPI5=y +CONFIG_STM32F7_HAVE_SPI6=y +# CONFIG_STM32F7_HAVE_SDMMC2 is not set +# CONFIG_STM32F7_HAVE_ADC1_DMA is not set +# CONFIG_STM32F7_HAVE_ADC2_DMA is not set +# CONFIG_STM32F7_HAVE_ADC3_DMA is not set +# CONFIG_STM32F7_HAVE_CAN3 is not set +CONFIG_STM32F7_HAVE_DCMI=y +# CONFIG_STM32F7_HAVE_DSIHOST is not set +CONFIG_STM32F7_HAVE_DMA2D=y +# CONFIG_STM32F7_HAVE_JPEG is not set +# CONFIG_STM32F7_HAVE_CRYP is not set +# CONFIG_STM32F7_HAVE_HASH is not set +# CONFIG_STM32F7_HAVE_DFSDM1 is not set +CONFIG_STM32F7_ADC=y +# CONFIG_STM32F7_CAN is not set +# CONFIG_STM32F7_DAC is not set +# CONFIG_STM32F7_DMA is not set +CONFIG_STM32F7_I2C=y +# CONFIG_STM32F7_SAI is not set +CONFIG_STM32F7_SPI=y +# CONFIG_STM32F7_TIM is not set +CONFIG_STM32F7_USART=y +CONFIG_STM32F7_ADC1=y +# 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_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_DMA2D is not set +# CONFIG_STM32F7_ETHMAC is not set +# CONFIG_STM32F7_FSMC is not set +CONFIG_STM32F7_I2C1=y +# CONFIG_STM32F7_I2C2 is not set +# CONFIG_STM32F7_I2C3 is not set +# CONFIG_STM32F7_I2C4 is not set +# CONFIG_STM32F7_LPTIM1 is not set +# CONFIG_STM32F7_LTDC is not set +# CONFIG_STM32F7_OTGFS is not set +# CONFIG_STM32F7_OTGHS is not set +# CONFIG_STM32F7_QUADSPI is not set +# CONFIG_STM32F7_RNG is not set +# CONFIG_STM32F7_SAI1 is not set +# CONFIG_STM32F7_SAI2 is not set +# CONFIG_STM32F7_SDMMC1 is not set +# CONFIG_STM32F7_SPDIFRX is not set +CONFIG_STM32F7_SPI1=y +# 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_USART1 is not set +# CONFIG_STM32F7_USART2 is not set +# CONFIG_STM32F7_USART3 is not set +# CONFIG_STM32F7_UART4 is not set +# CONFIG_STM32F7_UART5 is not set +CONFIG_STM32F7_USART6=y +# 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 + +# +# SPI Configuration +# +# CONFIG_STM32F7_SPI_INTERRUPTS is not set +# CONFIG_STM32F7_SPI_DMA is not set + +# +# I2C Configuration +# +# CONFIG_STM32F7_I2C_DYNTIMEO is not set +CONFIG_STM32F7_I2CTIMEOSEC=0 +CONFIG_STM32F7_I2CTIMEOMS=500 +CONFIG_STM32F7_I2CTIMEOTICKS=500 +# CONFIG_STM32F7_I2C_DUTY16_9 is not set +# CONFIG_STM32F7_CUSTOM_CLOCKCONFIG is not set + +# +# Timer Configuration +# + +# +# ADC 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 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=600 +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_STM32F746_WS=y +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="stm32f746-ws" + +# +# Common Board Options +# +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=1000 +# 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=0 +# CONFIG_SCHED_SPORADIC is not set +CONFIG_TASK_NAME_SIZE=24 +CONFIG_MAX_TASKS=32 +# 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=y +# CONFIG_SCHED_INSTRUMENTATION_PREEMPTION is not set +CONFIG_SCHED_INSTRUMENTATION_BUFFER=y +CONFIG_SCHED_NOTE_BUFSIZE=512 + +# +# 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=4 + +# +# 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=5000 +CONFIG_SCHED_HPWORKSTACKSIZE=1800 +CONFIG_SCHED_LPWORK=y +CONFIG_SCHED_LPNTHREADS=1 +CONFIG_SCHED_LPWORKPRIORITY=50 +CONFIG_SCHED_LPWORKPERIOD=50000 +CONFIG_SCHED_LPWORKSTACKSIZE=1800 + +# +# Stack and heap information +# +CONFIG_IDLETHREAD_STACKSIZE=500 +CONFIG_USERMAIN_STACKSIZE=2500 +CONFIG_PTHREAD_STACK_MIN=512 +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=y +# CONFIG_I2C_SLAVE is not set +# CONFIG_I2C_POLLED is not set +CONFIG_I2C_RESET=y +# CONFIG_I2C_TRACE is not set +CONFIG_I2C_DRIVER=y +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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_I2S is not set + +# +# Timer Driver Support +# +# CONFIG_TIMER is not set +# CONFIG_RTC is not set +CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_DEVPATH="/dev/watchdog0" +# CONFIG_TIMERS_CS2100CP is not set +CONFIG_ANALOG=y +CONFIG_ADC=y +CONFIG_ADC_FIFOSIZE=8 +# CONFIG_ADC_ADS1242 is not set +# CONFIG_ADC_ADS125X is not set +# CONFIG_ADC_PGA11X is not set +# CONFIG_DAC 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 + +# +# LCD Driver Support +# +# CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y +# 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_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=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 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_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_USART6_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set +# CONFIG_NO_SERIAL_CONSOLE is not set + +# +# USART6 Configuration +# +CONFIG_USART6_RXBUFSIZE=256 +CONFIG_USART6_TXBUFSIZE=256 +CONFIG_USART6_BAUD=115200 +CONFIG_USART6_BITS=8 +CONFIG_USART6_PARITY=0 +CONFIG_USART6_2STOP=0 +# CONFIG_USART6_IFLOWCONTROL is not set +# CONFIG_USART6_OFLOWCONTROL is not set +# CONFIG_USART6_DMA is not set +# CONFIG_USBDEV is not set +# CONFIG_USBHOST is not set +# CONFIG_DRIVERS_WIRELESS is not set + +# +# System Logging +# +# CONFIG_ARCH_SYSLOG is not set +# CONFIG_RAMLOG is not set +# CONFIG_DRIVER_NOTE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE 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_AIO 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 + +# +# 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=y +# CONFIG_GRAN_SINGLE is not set +CONFIG_GRAN_INTR=y + +# +# 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=y +# CONFIG_LIBC_STRERROR_SHORT 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_CRC64_FAST is not set +# CONFIG_LIB_KBDCODEC is not set +# CONFIG_LIB_SLCDCODEC is not set + +# +# Basic CXX Support +# +CONFIG_C99_BOOL8=y +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_ADC 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_HIDKBD is not set +# CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 is not set +# CONFIG_EXAMPLES_NULL is not set +# CONFIG_EXAMPLES_NX 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_NXTERM 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_POSIXSPAWN is not set +# CONFIG_EXAMPLES_PPPD 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 is not set +# CONFIG_EXAMPLES_SMART_TEST 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_USBSERIAL is not set +# CONFIG_EXAMPLES_USBTERM is not set +# CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER 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_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE 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=128 +# CONFIG_NSH_DISABLE_SEMICOLON is not set +CONFIG_NSH_CMDPARMS=y +CONFIG_NSH_MAXARGUMENTS=12 +CONFIG_NSH_ARGCAT=y +CONFIG_NSH_NESTDEPTH=8 +# 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 +# CONFIG_NSH_STRERROR is not set + +# +# 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_CLE is not set +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set +CONFIG_SYSTEM_I2CTOOL=y +CONFIG_I2CTOOL_MINBUS=1 +CONFIG_I2CTOOL_MAXBUS=1 +CONFIG_I2CTOOL_MINADDR=0x03 +CONFIG_I2CTOOL_MAXADDR=0x77 +CONFIG_I2CTOOL_MAXREGADDR=0xff +CONFIG_I2CTOOL_DEFFREQ=100000 +# CONFIG_SYSTEM_INSTALL 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_STACKMONITOR is not set +# CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_VI is not set +# CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f746-ws/nsh/setenv.sh b/configs/stm32f746-ws/nsh/setenv.sh new file mode 100644 index 0000000000000000000000000000000000000000..2d66398c3b4c4dab424a14e031582bbec50bb6e4 --- /dev/null +++ b/configs/stm32f746-ws/nsh/setenv.sh @@ -0,0 +1,77 @@ +#!/bin/bash +# configs/stm32f746-ws/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 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/Users/Public/tools/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/scripts/flash.ld b/configs/stm32f746-ws/scripts/flash.ld similarity index 99% rename from configs/nucleo-144/scripts/flash.ld rename to configs/stm32f746-ws/scripts/flash.ld index 90e589ed8abf06d52d43c6f7810dc02fa7dd326e..09378918de5150b8b938b3f0014e37a721deb5ad 100644 --- a/configs/nucleo-144/scripts/flash.ld +++ b/configs/stm32f746-ws/scripts/flash.ld @@ -1,5 +1,5 @@ /**************************************************************************** - * configs/nucleo-144/scripts/flash.ld + * configs/stm32f746-ws/scripts/flash.ld * * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/configs/stm32f746-ws/scripts/kernel-space.ld b/configs/stm32f746-ws/scripts/kernel-space.ld new file mode 100644 index 0000000000000000000000000000000000000000..8d471a57ba4f2ea4dcdbd3b8f911940d4738e1a1 --- /dev/null +++ b/configs/stm32f746-ws/scripts/kernel-space.ld @@ -0,0 +1,109 @@ +/**************************************************************************** + * configs/stm32f746-ws/scripts/kernel-space.ld + * + * 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. + * + ****************************************************************************/ + +/* NOTE: This depends on the memory.ld script having been included prior to + * this script. + */ + +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(.); + } > kflash + + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > kflash + + .ARM.extab : { + *(.ARM.extab*) + } > kflash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > kflash + + __exidx_end = ABSOLUTE(.); + + _eronly = ABSOLUTE(.); + + .data : { + _sdata = ABSOLUTE(.); + *(.data .data.*) + *(.gnu.linkonce.d.*) + CONSTRUCTORS + _edata = ABSOLUTE(.); + } > ksram AT > kflash + + .bss : { + _sbss = ABSOLUTE(.); + *(.bss .bss.*) + *(.gnu.linkonce.b.*) + *(COMMON) + _ebss = ABSOLUTE(.); + } > ksram + + /* 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/stm32f746-ws/scripts/memory.ld b/configs/stm32f746-ws/scripts/memory.ld new file mode 100644 index 0000000000000000000000000000000000000000..7371dc061ba3e5dbc9081a4ac1e55dffdf08d109 --- /dev/null +++ b/configs/stm32f746-ws/scripts/memory.ld @@ -0,0 +1,129 @@ +/**************************************************************************** + * configs/stm32f746-ws/scripts/memory.ld + * + * 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. + * + ****************************************************************************/ + +/* The STM32F746NGH6 has 1024Kb of main FLASH memory. This FLASH memory can + * be accessed from either the AXIM interface at address 0x0800:0000 or from + * the ITCM interface at address 0x0020:0000. + * + * Additional information, including the option bytes, is available at at + * FLASH at address 0x1ff0:0000 (AXIM) or 0x0010:0000 (ITCM). + * + * In the STM32F746NGH6, two different boot spaces can be selected through + * the BOOT pin and the boot base address programmed in the BOOT_ADD0 and + * BOOT_ADD1 option bytes: + * + * 1) BOOT=0: Boot address defined by user option byte BOOT_ADD0[15:0]. + * ST programmed value: Flash on ITCM at 0x0020:0000 + * 2) BOOT=1: Boot address defined by user option byte BOOT_ADD1[15:0]. + * ST programmed value: System bootloader at 0x0010:0000 + * + * NuttX does not modify these option byes. On the unmodified STM32F746G + * DISCO board, the BOOT0 pin is at ground so by default, the STM32 will boot + * to address 0x0020:0000 in ITCM FLASH. + * + * The STM32F746NGH6 also has 320Kb of data SRAM (in addition to ITCM SRAM). + * SRAM is split up into three blocks: + * + * 1) 64Kb of DTCM SRM beginning at address 0x2000:0000 + * 2) 240Kb of SRAM1 beginning at address 0x2001:0000 + * 3) 16Kb of SRAM2 beginning at address 0x2004:c000 + * + * 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. + * + * For MPU support, the kernel-mode NuttX section is assumed to be 128Kb of + * FLASH and 4Kb of SRAM. That is an excessive amount for the kernel which + * should fit into 64KB and, of course, can be optimized as needed (See + * also configs/stm32f746g-disco/scripts/kernel-space.ld). Allowing the + * additional does permit addition debug instrumentation to be added to the + * kernel space without overflowing the partition. + * + * Alignment of the user space FLASH partition is also a critical factor: + * The user space FLASH partition will be spanned with a single region of + * size 2**n bytes. The alignment of the user-space region must be the same. + * As a consequence, as the user-space increases in size, the alignment + * requirement also increases. + * + * This alignment requirement means that the largest user space FLASH region + * you can have will be 512KB at it would have to be positioned at + * 0x08800000. If you change this address, don't forget to change the + * CONFIG_NUTTX_USERSPACE configuration setting to match and to modify + * the check in kernel/userspace.c. + * + * For the same reasons, the maximum size of the SRAM mapping is limited to + * 4KB. Both of these alignment limitations could be reduced by using + * multiple regions to map the FLASH/SDRAM range or perhaps with some + * clever use of subregions. + * + * A detailed memory map for the 112KB SRAM region is as follows: + * + * 0x20001 0000: Kernel .data region. Typical size: 0.1KB + * ------- ---- Kernel .bss region. Typical size: 1.8KB + * 0x20001 0800: Kernel IDLE thread stack (approximate). Size is + * determined by CONFIG_IDLETHREAD_STACKSIZE and + * adjustments for alignment. Typical is 1KB. + * ------- ---- Padded to 4KB + * 0x20001 1000: User .data region. Size is variable. + * ------- ---- User .bss region Size is variable. + * 0x20001 2000: Beginning of kernel heap. Size determined by + * CONFIG_MM_KERNEL_HEAPSIZE. + * ------- ---- Beginning of user heap. Can vary with other settings. + * 0x20004 c000: End+1 of SRAM1 + */ + +MEMORY +{ + /* ITCM boot address */ + + itcm (rwx) : ORIGIN = 0x00200000, LENGTH = 1024K + + /* 1024KB FLASH */ + + kflash (rx) : ORIGIN = 0x08000000, LENGTH = 128K + uflash (rx) : ORIGIN = 0x08020000, LENGTH = 128K + xflash (rx) : ORIGIN = 0x08040000, LENGTH = 768K + + /* 240KB of contiguous SRAM1 */ + + ksram (rwx) : ORIGIN = 0x20010000, LENGTH = 4K + usram (rwx) : ORIGIN = 0x20011000, LENGTH = 4K + xsram (rwx) : ORIGIN = 0x20012000, LENGTH = 240K - 8K + + /* DTCM SRAM */ + + dtcm (rwx) : ORIGIN = 0x20000000, LENGTH = 64K + sram2 (rwx) : ORIGIN = 0x2004c000, LENGTH = 16K +} diff --git a/configs/stm32f746-ws/scripts/user-space.ld b/configs/stm32f746-ws/scripts/user-space.ld new file mode 100644 index 0000000000000000000000000000000000000000..ebf30ef9da948eb2a46bb4a9b0bc092b67005914 --- /dev/null +++ b/configs/stm32f746-ws/scripts/user-space.ld @@ -0,0 +1,111 @@ +/**************************************************************************** + * configs/stm32f746-ws/scripts/user-space.ld + * + * 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. + * + ****************************************************************************/ + +/* NOTE: This depends on the memory.ld script having been included prior to + * this script. + */ + +OUTPUT_ARCH(arm) +SECTIONS +{ + .userspace : { + *(.userspace) + } > uflash + + .text : { + _stext = ABSOLUTE(.); + *(.text .text.*) + *(.fixup) + *(.gnu.warning) + *(.rodata .rodata.*) + *(.gnu.linkonce.t.*) + *(.glue_7) + *(.glue_7t) + *(.got) + *(.gcc_except_table) + *(.gnu.linkonce.r.*) + _etext = ABSOLUTE(.); + } > uflash + + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > uflash + + .ARM.extab : { + *(.ARM.extab*) + } > uflash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > uflash + + __exidx_end = ABSOLUTE(.); + + _eronly = ABSOLUTE(.); + + .data : { + _sdata = ABSOLUTE(.); + *(.data .data.*) + *(.gnu.linkonce.d.*) + CONSTRUCTORS + _edata = ABSOLUTE(.); + } > usram AT > uflash + + .bss : { + _sbss = ABSOLUTE(.); + *(.bss .bss.*) + *(.gnu.linkonce.b.*) + *(COMMON) + _ebss = ABSOLUTE(.); + } > usram + + /* 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/stm32f746-ws/src/.gitignore b/configs/stm32f746-ws/src/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..726d936e1e3390cc875a1fa5681e3c3988fe3c8b --- /dev/null +++ b/configs/stm32f746-ws/src/.gitignore @@ -0,0 +1,2 @@ +/.depend +/Make.dep diff --git a/configs/stm32f746-ws/src/Makefile b/configs/stm32f746-ws/src/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..b20f916b7e0c0d29c0044f251bccea50d4bdf061 --- /dev/null +++ b/configs/stm32f746-ws/src/Makefile @@ -0,0 +1,45 @@ +############################################################################ +# configs/stm32f746-ws/src/Makefile +# +# Copyright (C) 2015 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 stm32_spi.c + +ifeq ($(CONFIG_LIB_BOARDCTL),y) +CSRCS += stm32_appinitialize.c +endif + +include $(TOPDIR)/configs/Board.mk diff --git a/configs/stm32f746-ws/src/stm32_appinitialize.c b/configs/stm32f746-ws/src/stm32_appinitialize.c new file mode 100644 index 0000000000000000000000000000000000000000..734e35957a8c9e7c89f246de16357f9809c23436 --- /dev/null +++ b/configs/stm32f746-ws/src/stm32_appinitialize.c @@ -0,0 +1,97 @@ +/**************************************************************************** + * config/stm32f746-ws/src/stm32_appinitilaize.c + * + * 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. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include +#include +#include +#include + +#include "stm32f746-ws.h" +#include "stm32_i2c.h" + +static void stm32_i2c_register(int bus) +{ + FAR struct i2c_master_s *i2c; + int ret; + + i2c = stm32_i2cbus_initialize(bus); + if (i2c == NULL) + { + serr("ERROR: Failed to get I2C%d interface\n", bus); + } + else + { + ret = i2c_register(i2c, bus); + if (ret < 0) + { + serr("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); + stm32_i2cbus_uninitialize(i2c); + } + } +} + +static void stm32_i2ctool(void) +{ + stm32_i2c_register(1); +} + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +int board_app_initialize(void) +{ + /* Register I2C drivers on behalf of the I2C tool */ + + stm32_i2ctool(); + + return OK; +} diff --git a/configs/stm32f746-ws/src/stm32_boot.c b/configs/stm32f746-ws/src/stm32_boot.c new file mode 100644 index 0000000000000000000000000000000000000000..3b2821100544e3ee2505c1e0d970b0c3113cb5b9 --- /dev/null +++ b/configs/stm32f746-ws/src/stm32_boot.c @@ -0,0 +1,105 @@ +/************************************************************************************ + * configs/stm32f746-ws/src/stm32_boot.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 "up_arch.h" +#include "stm32f746-ws.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) +{ +#if defined(CONFIG_STM32F7_SPI1) || defined(CONFIG_STM32F7_SPI2) || \ + defined(CONFIG_STM32F7_SPI3) || defined(CONFIG_STM32F7_SPI4) || \ + defined(CONFIG_STM32F7_SPI5) || defined(CONFIG_STM32F7_SPI6) + /* 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 (stm32_spidev_initialize) + { + stm32_spidev_initialize(); + } +#endif +} + +/************************************************************************************ + * 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_initialize() 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. + */ + + (void)board_app_initialize(); +#endif +} +#endif diff --git a/configs/stm32f746-ws/src/stm32_spi.c b/configs/stm32f746-ws/src/stm32_spi.c new file mode 100644 index 0000000000000000000000000000000000000000..517ea3761b2f430c4c24aafee988084f34b7749a --- /dev/null +++ b/configs/stm32f746-ws/src/stm32_spi.c @@ -0,0 +1,240 @@ +/************************************************************************************ + * configs/nucleo-144/src/stm32_spi.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: 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 "up_arch.h" +#include "chip.h" +#include "stm32_spi.h" + +#include "stm32f746-ws.h" + +#if defined(CONFIG_STM32F7_SPI1) || defined(CONFIG_STM32F7_SPI2) || \ + defined(CONFIG_STM32F7_SPI3) || defined(CONFIG_STM32F7_SPI4) || \ + defined(CONFIG_STM32F7_SPI5) || defined(CONFIG_STM32F7_SPI6) + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32_spidev_initialize + * + * Description: + * Called to configure SPI chip select GPIO pins for the stm32f746g-disco board. + * + ************************************************************************************/ + +void weak_function stm32_spidev_initialize(void) +{ +} + +/**************************************************************************** + * Name: stm32_spi1-6 select and stm32_spi1-6 status + * + * 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). + * + ****************************************************************************/ + +#ifdef CONFIG_STM32F7_SPI1 +void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +{ + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); +} + +uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +{ + return 0; +} +#endif + +#ifdef CONFIG_STM32F7_SPI2 +void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +{ + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); +} + +uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +{ + return 0; +} +#endif + +#ifdef CONFIG_STM32F7_SPI3 +void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +{ + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); +} + +uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +{ + return 0; +} +#endif + +#ifdef CONFIG_STM32F7_SPI4 +void stm32_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +{ + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); +} + +uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +{ + return 0; +} +#endif + +#ifdef CONFIG_STM32F7_SPI5 +void stm32_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +{ + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); +} + +uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +{ + return 0; +} +#endif + +#ifdef CONFIG_STM32F7_SPI6 +void stm32_spi6select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +{ + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); +} + +uint8_t stm32_spi6status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +{ + return 0; +} +#endif + +/**************************************************************************** + * Name: stm32_spi1cmddata + * + * Description: + * Set or clear the SH1101A A0 or SD1306 D/C n bit to select data (true) + * or command (false). This function must be provided by platform-specific + * logic. This is an implementation of the cmddata method of the SPI + * interface defined by struct spi_ops_s (see include/nuttx/spi/spi.h). + * + * Input Parameters: + * + * spi - SPI device that controls the bus the device that requires the CMD/ + * DATA selection. + * devid - If there are multiple devices on the bus, this selects which one + * to select cmd or data. NOTE: This design restricts, for example, + * one one SPI display per SPI bus. + * cmd - true: select command; false: select data + * + * Returned Value: + * None + * + ****************************************************************************/ + +#ifdef CONFIG_SPI_CMDDATA +#ifdef CONFIG_STM32F7_SPI1 +int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +{ + return -ENODEV; +} +#endif + +#ifdef CONFIG_STM32F7_SPI2 +int stm32_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +{ + return -ENODEV; +} +#endif + +#ifdef CONFIG_STM32F7_SPI3 +int stm32_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +{ + return -ENODEV; +} +#endif + +#ifdef CONFIG_STM32F7_SPI4 +int stm32_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +{ + return -ENODEV; +} +#endif + +#ifdef CONFIG_STM32F7_SPI5 +int stm32_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +{ + return -ENODEV; +} +#endif + +#ifdef CONFIG_STM32F7_SPI6 +int stm32_spi6cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) +{ + return -ENODEV; +} +#endif + +#endif /* CONFIG_SPI_CMDDATA */ +#endif /* CONFIG_STM32F7_SPI1 || ... CONFIG_STM32F7_SPI6 */ diff --git a/configs/stm32f746-ws/src/stm32f746-ws.h b/configs/stm32f746-ws/src/stm32f746-ws.h new file mode 100644 index 0000000000000000000000000000000000000000..07d2c6c11f931afdd27c758a5ee991a77434883e --- /dev/null +++ b/configs/stm32f746-ws/src/stm32f746-ws.h @@ -0,0 +1,106 @@ +/**************************************************************************************************** + * configs/stm32f746-ws/src/stm32f746-ws.h + * + * 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. + * + ****************************************************************************************************/ + +#ifndef __CONFIGS_STM32F746_WS_SRC_STM32F746_WS_H +#define __CONFIGS_STM32F746_WS_SRC_STM32F746_WS_H + +/**************************************************************************************************** + * Included Files + ****************************************************************************************************/ + +#include +#include +#include + +/**************************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************************/ +/* procfs File System */ + +#ifdef CONFIG_FS_PROCFS +# ifdef CONFIG_NSH_PROC_MOUNTPOINT +# define STM32_PROCFS_MOUNTPOINT CONFIG_NSH_PROC_MOUNTPOINT +# else +# define STM32_PROCFS_MOUNTPOINT "/proc" +# endif +#endif + +/* STM32F736G Discovery GPIOs ***********************************************************************/ +/* The STM32F746G-DISCO board has numerous LEDs but only one, LD1 located near the reset button, that + * can be controlled by software (LD2 is a power indicator, LD3-6 indicate USB status, LD7 is + * controlled by the ST-Link). + * + * LD1 is controlled by PI1 which is also the SPI2_SCK at the Arduino interface. One end of LD1 is + * grounded so a high output on PI1 will illuminate the LED. + */ + +#define GPIO_LD1 (GPIO_OUTPUT | GPIO_PUSHPULL | GPIO_SPEED_50MHz | GPIO_OUTPUT_CLEAR | \ + 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) + +#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_PORTC | GPIO_PIN13) + +/**************************************************************************************************** + * Public data + ****************************************************************************************************/ + +#ifndef __ASSEMBLY__ + +/**************************************************************************************************** + * Public Functions + ****************************************************************************************************/ + +/**************************************************************************************************** + * Name: stm32_spidev_initialize + * + * Description: + * Called to configure SPI chip select GPIO pins for the stm32f746g-disco board. + * + ****************************************************************************************************/ + +void weak_function stm32_spidev_initialize(void); + +#endif /* __ASSEMBLY__ */ +#endif /* __CONFIGS_STM32F746_WS_SRC_STM32F746_WS_H */ diff --git a/configs/stm32f746g-disco/README.txt b/configs/stm32f746g-disco/README.txt index eff9a8035361f392e30f98023752ecbfaf3bff30..48ba63ec41a40b6c1af878b60c7c448045e307ef 100644 --- a/configs/stm32f746g-disco/README.txt +++ b/configs/stm32f746g-disco/README.txt @@ -49,14 +49,6 @@ STATUS 2015-07-20: STM32 F7 Ethernet appears to be functional, but has had only light testing. - 2015-07-21: Added a protected build version of the NSH configuration - (called knsh). That configuration is close: It boots, but I get - a hard fault each time I do the NSH "help" command. Everything else - works fine. I am thinking this is a corrupted binary; I am thinking - that there is a bad pointer in the command table. But this is hard - to prove but possible because the steps to produce and load the - binary are awkward. - Development Environment ======================= @@ -416,7 +408,7 @@ STM32F746G-DISCO-specific Configuration Options CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32F7_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 + CONFIG_STM32_CAN_REGDEBUG - If CONFIG_DEBUG_FEATURES is set, this will generate an dump of all CAN registers. STM32F746G-DISCO SPI Configuration @@ -459,9 +451,9 @@ STM32F746G-DISCO-specific Configuration Options CONFIG_STM32F7_OTGFS_SOFINTR - Enable SOF interrupts. Why would you ever want to do that? CONFIG_STM32F7_USBHOST_REGDEBUG - Enable very low-level register access - debug. Depends on CONFIG_DEBUG. + debug. Depends on CONFIG_DEBUG_FEATURES. CONFIG_STM32F7_USBHOST_PKTDUMP - Dump all incoming and outgoing USB - packets. Depends on CONFIG_DEBUG. + packets. Depends on CONFIG_DEBUG_FEATURES. Configurations ============== diff --git a/configs/stm32f746g-disco/include/board.h b/configs/stm32f746g-disco/include/board.h index 6e9da62de0b5bdd63f9a5a506beaaf240b21105c..9482371499081834a456f8cb2c0fdb9973411458 100644 --- a/configs/stm32f746g-disco/include/board.h +++ b/configs/stm32f746g-disco/include/board.h @@ -154,6 +154,53 @@ #define STM32_OTGFS_FREQUENCY (STM32_VCO_FREQUENCY / 10) #endif +/* Configure factors for PLLSAI clock */ + +#define STM32_RCC_PLLSAICFGR_PLLSAIN RCC_PLLSAICFGR_PLLSAIN(192) +#define STM32_RCC_PLLSAICFGR_PLLSAIP RCC_PLLSAICFGR_PLLSAIP(2) +#define STM32_RCC_PLLSAICFGR_PLLSAIQ RCC_PLLSAICFGR_PLLSAIQ(2) +#define STM32_RCC_PLLSAICFGR_PLLSAIR RCC_PLLSAICFGR_PLLSAIR(2) + +/* Configure Dedicated Clock Configuration Register */ + +#define STM32_RCC_DCKCFGR1_PLLI2SDIVQ RCC_DCKCFGR1_PLLI2SDIVQ(1) +#define STM32_RCC_DCKCFGR1_PLLSAIDIVQ RCC_DCKCFGR1_PLLSAIDIVQ(1) +#define STM32_RCC_DCKCFGR1_PLLSAIDIVR RCC_DCKCFGR1_PLLSAIDIVR(0) +#define STM32_RCC_DCKCFGR1_SAI1SRC RCC_DCKCFGR1_SAI1SEL(0) +#define STM32_RCC_DCKCFGR1_SAI2SRC RCC_DCKCFGR1_SAI2SEL(0) +#define STM32_RCC_DCKCFGR1_TIMPRESRC 0 +#define STM32_RCC_DCKCFGR1_DFSDM1SRC 0 +#define STM32_RCC_DCKCFGR1_ADFSDM1SRC 0 + + + +/* Configure factors for PLLI2S clock */ + +#define STM32_RCC_PLLI2SCFGR_PLLI2SN RCC_PLLI2SCFGR_PLLI2SN(192) +#define STM32_RCC_PLLI2SCFGR_PLLI2SP RCC_PLLI2SCFGR_PLLI2SP(2) +#define STM32_RCC_PLLI2SCFGR_PLLI2SQ RCC_PLLI2SCFGR_PLLI2SQ(2) +#define STM32_RCC_PLLI2SCFGR_PLLI2SR RCC_PLLI2SCFGR_PLLI2SR(2) + +/* Configure Dedicated Clock Configuration Register 2 */ + +#define STM32_RCC_DCKCFGR2_USART1SRC RCC_DCKCFGR2_USART1SEL_APB +#define STM32_RCC_DCKCFGR2_USART2SRC RCC_DCKCFGR2_USART2SEL_APB +#define STM32_RCC_DCKCFGR2_UART4SRC RCC_DCKCFGR2_UART4SEL_APB +#define STM32_RCC_DCKCFGR2_UART5SRC RCC_DCKCFGR2_UART5SEL_APB +#define STM32_RCC_DCKCFGR2_USART6SRC RCC_DCKCFGR2_USART6SEL_APB +#define STM32_RCC_DCKCFGR2_UART7SRC RCC_DCKCFGR2_UART7SEL_APB +#define STM32_RCC_DCKCFGR2_UART8SRC RCC_DCKCFGR2_UART8SEL_APB +#define STM32_RCC_DCKCFGR2_I2C1SRC RCC_DCKCFGR2_I2C1SEL_HSI +#define STM32_RCC_DCKCFGR2_I2C2SRC RCC_DCKCFGR2_I2C2SEL_HSI +#define STM32_RCC_DCKCFGR2_I2C3SRC RCC_DCKCFGR2_I2C3SEL_HSI +#define STM32_RCC_DCKCFGR2_I2C4SRC RCC_DCKCFGR2_I2C4SEL_HSI +#define STM32_RCC_DCKCFGR2_LPTIM1SRC RCC_DCKCFGR2_LPTIM1SEL_APB +#define STM32_RCC_DCKCFGR2_CECSRC RCC_DCKCFGR2_CECSEL_HSI +#define STM32_RCC_DCKCFGR2_CK48MSRC RCC_DCKCFGR2_CK48MSEL_PLLSAI +#define STM32_RCC_DCKCFGR2_SDMMCSRC RCC_DCKCFGR2_SDMMCSEL_48MHZ +#define STM32_RCC_DCKCFGR2_SDMMC2SRC RCC_DCKCFGR2_SDMMC2SEL_48MHZ +#define STM32_RCC_DCKCFGR2_DSISRC RCC_DCKCFGR2_DSISEL_48MHZ + /* Several prescalers allow the configuration of the two AHB buses, the * high-speed APB (APB2) and the low-speed APB (APB1) domains. The maximum * frequency of the two AHB buses is 216 MHz while the maximum frequency of diff --git a/configs/stm32f746g-disco/netnsh/defconfig b/configs/stm32f746g-disco/netnsh/defconfig index efd988abdf9ce25cb2e347dc33db96367d5fa002..7774a4b116ef655aa60b8d7fa7f8ee7bb0cf6796 100644 --- a/configs/stm32f746g-disco/netnsh/defconfig +++ b/configs/stm32f746g-disco/netnsh/defconfig @@ -46,10 +46,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y CONFIG_DEBUG_NOOPT=y @@ -80,6 +82,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 +101,7 @@ CONFIG_ARCH="arm" # 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 @@ -119,14 +123,16 @@ CONFIG_ARCH_CORTEXM7=y # 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_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 @@ -142,6 +148,7 @@ CONFIG_ARMV7M_HAVE_ITCM=y CONFIG_ARMV7M_HAVE_DTCM=y # CONFIG_ARMV7M_ITCM is not set CONFIG_ARMV7M_DTCM=y +# 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 @@ -154,22 +161,121 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARMV7M_STACKCHECK is not set # CONFIG_ARMV7M_ITMSYSLOG is not set # CONFIG_SERIAL_TERMIOS is not set +# CONFIG_USART6_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_ARCH_CHIP_STM32F745VG=y +# CONFIG_ARCH_CHIP_STM32F745VE is not set +# CONFIG_ARCH_CHIP_STM32F745IG is not set +# CONFIG_ARCH_CHIP_STM32F745IE is not set +# CONFIG_ARCH_CHIP_STM32F745ZE is not set +# CONFIG_ARCH_CHIP_STM32F745ZG is not set +# CONFIG_ARCH_CHIP_STM32F746BG is not set +# CONFIG_ARCH_CHIP_STM32F746VG is not set +# CONFIG_ARCH_CHIP_STM32F746VE is not set +# CONFIG_ARCH_CHIP_STM32F746BE is not set +# CONFIG_ARCH_CHIP_STM32F746ZG is not set +# CONFIG_ARCH_CHIP_STM32F746IE is not set +# CONFIG_ARCH_CHIP_STM32F746NG is not set +# CONFIG_ARCH_CHIP_STM32F746NE is not set +# CONFIG_ARCH_CHIP_STM32F746ZE is not set +# CONFIG_ARCH_CHIP_STM32F746IG is not set +# CONFIG_ARCH_CHIP_STM32F756NG is not set +# CONFIG_ARCH_CHIP_STM32F756BG is not set +# CONFIG_ARCH_CHIP_STM32F756IG is not set +# CONFIG_ARCH_CHIP_STM32F756VG is not set +# CONFIG_ARCH_CHIP_STM32F756ZG is not set +# CONFIG_ARCH_CHIP_STM32F765NI is not set +# CONFIG_ARCH_CHIP_STM32F765VI is not set +# CONFIG_ARCH_CHIP_STM32F765VG is not set +# CONFIG_ARCH_CHIP_STM32F765BI is not set +# CONFIG_ARCH_CHIP_STM32F765NG is not set +# CONFIG_ARCH_CHIP_STM32F765ZG is not set +# CONFIG_ARCH_CHIP_STM32F765ZI is not set +# CONFIG_ARCH_CHIP_STM32F765IG is not set +# CONFIG_ARCH_CHIP_STM32F765BG is not set +# CONFIG_ARCH_CHIP_STM32F765II is not set +# CONFIG_ARCH_CHIP_STM32F767NG is not set +# CONFIG_ARCH_CHIP_STM32F767IG is not set +# CONFIG_ARCH_CHIP_STM32F767VG is not set +# CONFIG_ARCH_CHIP_STM32F767ZG is not set +# CONFIG_ARCH_CHIP_STM32F767NI is not set +# CONFIG_ARCH_CHIP_STM32F767VI is not set +# CONFIG_ARCH_CHIP_STM32F767BG is not set +# CONFIG_ARCH_CHIP_STM32F767ZI is not set +# CONFIG_ARCH_CHIP_STM32F767II is not set +# CONFIG_ARCH_CHIP_STM32F769BI is not set +# CONFIG_ARCH_CHIP_STM32F769II is not set +# CONFIG_ARCH_CHIP_STM32F769BG is not set +# CONFIG_ARCH_CHIP_STM32F769NI is not set +# CONFIG_ARCH_CHIP_STM32F769AI is not set +# CONFIG_ARCH_CHIP_STM32F769NG is not set +# CONFIG_ARCH_CHIP_STM32F769IG is not set +# CONFIG_ARCH_CHIP_STM32F777ZI is not set +# CONFIG_ARCH_CHIP_STM32F777VI is not set +# CONFIG_ARCH_CHIP_STM32F777NI is not set +# CONFIG_ARCH_CHIP_STM32F777BI is not set +# CONFIG_ARCH_CHIP_STM32F777II is not set +# CONFIG_ARCH_CHIP_STM32F778AI is not set +# CONFIG_ARCH_CHIP_STM32F779II is not set +# CONFIG_ARCH_CHIP_STM32F779NI is not set +# CONFIG_ARCH_CHIP_STM32F779BI is not set +# CONFIG_ARCH_CHIP_STM32F779AI 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 +# CONFIG_STM32F7_STM32F76XX is not set +# CONFIG_STM32F7_STM32F77XX is not set +CONFIG_STM32F7_IO_CONFIG_V=y +# CONFIG_STM32F7_IO_CONFIG_I is not set +# CONFIG_STM32F7_IO_CONFIG_Z is not set +# CONFIG_STM32F7_IO_CONFIG_N is not set +# CONFIG_STM32F7_IO_CONFIG_B is not set +# CONFIG_STM32F7_IO_CONFIG_A is not set +CONFIG_STM32F7_STM32F745XX=y +# CONFIG_STM32F7_STM32F746XX is not set +# CONFIG_STM32F7_STM32F756XX is not set +# CONFIG_STM32F7_STM32F765XX is not set +# CONFIG_STM32F7_STM32F767XX is not set +# CONFIG_STM32F7_STM32F768XX is not set +# CONFIG_STM32F7_STM32F768AX is not set +# CONFIG_STM32F7_STM32F769XX is not set +# CONFIG_STM32F7_STM32F769AX is not set +# CONFIG_STM32F7_STM32F777XX is not set +# CONFIG_STM32F7_STM32F778XX is not set +# CONFIG_STM32F7_STM32F778AX is not set +# CONFIG_STM32F7_STM32F779XX is not set +# CONFIG_STM32F7_STM32F779AX is not set +# CONFIG_STM32F7_FLASH_CONFIG_E is not set +# CONFIG_STM32F7_FLASH_CONFIG_I is not set +CONFIG_STM32F7_FLASH_OVERRIDE_DEFAULT=y +# CONFIG_STM32F7_FLASH_OVERRIDE_E is not set +# CONFIG_STM32F7_FLASH_OVERRIDE_G is not set +# CONFIG_STM32F7_FLASH_OVERRIDE_I is not set # # STM32 Peripheral Support # -CONFIG_STM32F7_HAVE_LTDC=y +# CONFIG_STM32F7_HAVE_LTDC is not set +CONFIG_STM32F7_HAVE_FSMC=y +CONFIG_STM32F7_HAVE_ETHRNET=y +CONFIG_STM32F7_HAVE_RNG=y +# CONFIG_STM32F7_HAVE_SPI5 is not set +# CONFIG_STM32F7_HAVE_SPI6 is not set +# CONFIG_STM32F7_HAVE_SDMMC2 is not set +# CONFIG_STM32F7_HAVE_ADC1_DMA is not set +# CONFIG_STM32F7_HAVE_ADC2_DMA is not set +# CONFIG_STM32F7_HAVE_ADC3_DMA is not set +# CONFIG_STM32F7_HAVE_CAN3 is not set +CONFIG_STM32F7_HAVE_DCMI=y +# CONFIG_STM32F7_HAVE_DSIHOST is not set +CONFIG_STM32F7_HAVE_DMA2D=y +# CONFIG_STM32F7_HAVE_JPEG is not set +# CONFIG_STM32F7_HAVE_CRYP is not set +# CONFIG_STM32F7_HAVE_HASH is not set +# CONFIG_STM32F7_HAVE_DFSDM1 is not set # CONFIG_STM32F7_ADC is not set # CONFIG_STM32F7_CAN is not set # CONFIG_STM32F7_DAC is not set @@ -177,6 +283,7 @@ CONFIG_STM32F7_HAVE_LTDC=y # CONFIG_STM32F7_I2C is not set # CONFIG_STM32F7_SAI is not set # CONFIG_STM32F7_SPI is not set +# CONFIG_STM32F7_TIM is not set CONFIG_STM32F7_USART=y # CONFIG_STM32F7_ADC1 is not set # CONFIG_STM32F7_ADC2 is not set @@ -186,25 +293,24 @@ CONFIG_STM32F7_USART=y # 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_DMA2D is not set CONFIG_STM32F7_ETHMAC=y # 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_I2C4 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_SAI1 is not set # CONFIG_STM32F7_SAI2 is not set # CONFIG_STM32F7_SDMMC1 is not set # CONFIG_STM32F7_SPDIFRX is not set @@ -212,8 +318,6 @@ CONFIG_STM32F7_ETHMAC=y # 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 @@ -228,7 +332,6 @@ CONFIG_STM32F7_ETHMAC=y # 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 is not set @@ -239,8 +342,18 @@ CONFIG_STM32F7_USART6=y # 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 +# +# Timer Configuration +# + # # Ethernet MAC configuration # @@ -322,19 +435,22 @@ CONFIG_RAM_SIZE=245760 # # Board Selection # -CONFIG_ARCH_BOARD_STM32F746G_DISCO=y -# CONFIG_ARCH_BOARD_CUSTOM is not set -CONFIG_ARCH_BOARD="stm32f746g-disco" +CONFIG_ARCH_BOARD_CUSTOM=y + +# +# Custom Board Configuration +# +CONFIG_ARCH_BOARD_CUSTOM_NAME="" +CONFIG_ARCH_BOARD_CUSTOM_DIR="" +# CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH is not set +# CONFIG_BOARD_CRASHDUMP is not set +# CONFIG_BOARD_CUSTOM_LEDS is not set +# CONFIG_BOARD_CUSTOM_BUTTONS is not set +# CONFIG_BOARD_CUSTOM_INTERRUPT is not set # # 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 is not set CONFIG_NSH_MMCSDMINOR=0 # @@ -477,6 +593,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -491,14 +609,19 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support # -# CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -552,6 +675,8 @@ CONFIG_ETH0_PHY_LAN8742A=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -575,10 +700,6 @@ 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_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -605,15 +726,18 @@ CONFIG_USART6_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -774,12 +898,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -845,12 +963,15 @@ 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 is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -883,21 +1004,21 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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_DISCOVER 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -908,17 +1029,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -926,8 +1047,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -935,11 +1056,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # 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_WEBSERVER is not set # # File System Utilities @@ -961,8 +1080,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -975,18 +1094,19 @@ 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_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y # CONFIG_NETUTILS_TFTPC is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1086,6 +1206,7 @@ CONFIG_NSH_CONSOLE=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1165,12 +1286,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1179,6 +1300,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f746g-disco/nsh/defconfig b/configs/stm32f746g-disco/nsh/defconfig index fdac7f8dd688c6062131c1f8a23611167aa8fda0..73f36d894f9a67e6dade475750d1a676a750b3d5 100644 --- a/configs/stm32f746g-disco/nsh/defconfig +++ b/configs/stm32f746g-disco/nsh/defconfig @@ -46,10 +46,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y CONFIG_DEBUG_NOOPT=y @@ -80,6 +82,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 +101,7 @@ CONFIG_ARCH="arm" # 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 @@ -119,14 +123,16 @@ CONFIG_ARCH_CORTEXM7=y # 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_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 @@ -142,34 +148,134 @@ CONFIG_ARMV7M_HAVE_ITCM=y CONFIG_ARMV7M_HAVE_DTCM=y # CONFIG_ARMV7M_ITCM is not set CONFIG_ARMV7M_DTCM=y +# 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 # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW is not set # CONFIG_ARMV7M_TOOLCHAIN_DEVKITARM is not set -# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL is not set -CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW=y +CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y +# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW is not set # CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE is not set CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARMV7M_STACKCHECK is not set # CONFIG_ARMV7M_ITMSYSLOG is not set # CONFIG_SERIAL_TERMIOS is not set +# CONFIG_USART6_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_ARCH_CHIP_STM32F745VG is not set +# CONFIG_ARCH_CHIP_STM32F745VE is not set +# CONFIG_ARCH_CHIP_STM32F745IG is not set +# CONFIG_ARCH_CHIP_STM32F745IE is not set +# CONFIG_ARCH_CHIP_STM32F745ZE is not set +# CONFIG_ARCH_CHIP_STM32F745ZG is not set +# CONFIG_ARCH_CHIP_STM32F746BG is not set +# CONFIG_ARCH_CHIP_STM32F746VG is not set +# CONFIG_ARCH_CHIP_STM32F746VE is not set +# CONFIG_ARCH_CHIP_STM32F746BE is not set +# CONFIG_ARCH_CHIP_STM32F746ZG is not set +# CONFIG_ARCH_CHIP_STM32F746IE is not set +CONFIG_ARCH_CHIP_STM32F746NG=y +# CONFIG_ARCH_CHIP_STM32F746NE is not set +# CONFIG_ARCH_CHIP_STM32F746ZE is not set +# CONFIG_ARCH_CHIP_STM32F746IG is not set +# CONFIG_ARCH_CHIP_STM32F756NG is not set +# CONFIG_ARCH_CHIP_STM32F756BG is not set +# CONFIG_ARCH_CHIP_STM32F756IG is not set +# CONFIG_ARCH_CHIP_STM32F756VG is not set +# CONFIG_ARCH_CHIP_STM32F756ZG is not set +# CONFIG_ARCH_CHIP_STM32F765NI is not set +# CONFIG_ARCH_CHIP_STM32F765VI is not set +# CONFIG_ARCH_CHIP_STM32F765VG is not set +# CONFIG_ARCH_CHIP_STM32F765BI is not set +# CONFIG_ARCH_CHIP_STM32F765NG is not set +# CONFIG_ARCH_CHIP_STM32F765ZG is not set +# CONFIG_ARCH_CHIP_STM32F765ZI is not set +# CONFIG_ARCH_CHIP_STM32F765IG is not set +# CONFIG_ARCH_CHIP_STM32F765BG is not set +# CONFIG_ARCH_CHIP_STM32F765II is not set +# CONFIG_ARCH_CHIP_STM32F767NG is not set +# CONFIG_ARCH_CHIP_STM32F767IG is not set +# CONFIG_ARCH_CHIP_STM32F767VG is not set +# CONFIG_ARCH_CHIP_STM32F767ZG is not set +# CONFIG_ARCH_CHIP_STM32F767NI is not set +# CONFIG_ARCH_CHIP_STM32F767VI is not set +# CONFIG_ARCH_CHIP_STM32F767BG is not set +# CONFIG_ARCH_CHIP_STM32F767ZI is not set +# CONFIG_ARCH_CHIP_STM32F767II is not set +# CONFIG_ARCH_CHIP_STM32F769BI is not set +# CONFIG_ARCH_CHIP_STM32F769II is not set +# CONFIG_ARCH_CHIP_STM32F769BG is not set +# CONFIG_ARCH_CHIP_STM32F769NI is not set +# CONFIG_ARCH_CHIP_STM32F769AI is not set +# CONFIG_ARCH_CHIP_STM32F769NG is not set +# CONFIG_ARCH_CHIP_STM32F769IG is not set +# CONFIG_ARCH_CHIP_STM32F777ZI is not set +# CONFIG_ARCH_CHIP_STM32F777VI is not set +# CONFIG_ARCH_CHIP_STM32F777NI is not set +# CONFIG_ARCH_CHIP_STM32F777BI is not set +# CONFIG_ARCH_CHIP_STM32F777II is not set +# CONFIG_ARCH_CHIP_STM32F778AI is not set +# CONFIG_ARCH_CHIP_STM32F779II is not set +# CONFIG_ARCH_CHIP_STM32F779NI is not set +# CONFIG_ARCH_CHIP_STM32F779BI is not set +# CONFIG_ARCH_CHIP_STM32F779AI 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 +# CONFIG_STM32F7_STM32F76XX is not set +# CONFIG_STM32F7_STM32F77XX is not set +# CONFIG_STM32F7_IO_CONFIG_V is not set +# CONFIG_STM32F7_IO_CONFIG_I is not set +# CONFIG_STM32F7_IO_CONFIG_Z is not set +CONFIG_STM32F7_IO_CONFIG_N=y +# CONFIG_STM32F7_IO_CONFIG_B is not set +# CONFIG_STM32F7_IO_CONFIG_A is not set +# CONFIG_STM32F7_STM32F745XX is not set +CONFIG_STM32F7_STM32F746XX=y +# CONFIG_STM32F7_STM32F756XX is not set +# CONFIG_STM32F7_STM32F765XX is not set +# CONFIG_STM32F7_STM32F767XX is not set +# CONFIG_STM32F7_STM32F768XX is not set +# CONFIG_STM32F7_STM32F768AX is not set +# CONFIG_STM32F7_STM32F769XX is not set +# CONFIG_STM32F7_STM32F769AX is not set +# CONFIG_STM32F7_STM32F777XX is not set +# CONFIG_STM32F7_STM32F778XX is not set +# CONFIG_STM32F7_STM32F778AX is not set +# CONFIG_STM32F7_STM32F779XX is not set +# CONFIG_STM32F7_STM32F779AX is not set +# CONFIG_STM32F7_FLASH_CONFIG_E is not set +# CONFIG_STM32F7_FLASH_CONFIG_I is not set +CONFIG_STM32F7_FLASH_OVERRIDE_DEFAULT=y +# CONFIG_STM32F7_FLASH_OVERRIDE_E is not set +# CONFIG_STM32F7_FLASH_OVERRIDE_G is not set +# CONFIG_STM32F7_FLASH_OVERRIDE_I is not set # # STM32 Peripheral Support # CONFIG_STM32F7_HAVE_LTDC=y +CONFIG_STM32F7_HAVE_FSMC=y +CONFIG_STM32F7_HAVE_ETHRNET=y +CONFIG_STM32F7_HAVE_RNG=y +CONFIG_STM32F7_HAVE_SPI5=y +CONFIG_STM32F7_HAVE_SPI6=y +# CONFIG_STM32F7_HAVE_SDMMC2 is not set +# CONFIG_STM32F7_HAVE_ADC1_DMA is not set +# CONFIG_STM32F7_HAVE_ADC2_DMA is not set +# CONFIG_STM32F7_HAVE_ADC3_DMA is not set +# CONFIG_STM32F7_HAVE_CAN3 is not set +CONFIG_STM32F7_HAVE_DCMI=y +# CONFIG_STM32F7_HAVE_DSIHOST is not set +CONFIG_STM32F7_HAVE_DMA2D=y +# CONFIG_STM32F7_HAVE_JPEG is not set +# CONFIG_STM32F7_HAVE_CRYP is not set +# CONFIG_STM32F7_HAVE_HASH is not set +# CONFIG_STM32F7_HAVE_DFSDM1 is not set # CONFIG_STM32F7_ADC is not set # CONFIG_STM32F7_CAN is not set # CONFIG_STM32F7_DAC is not set @@ -177,6 +283,7 @@ CONFIG_STM32F7_HAVE_LTDC=y # CONFIG_STM32F7_I2C is not set # CONFIG_STM32F7_SAI is not set # CONFIG_STM32F7_SPI is not set +# CONFIG_STM32F7_TIM is not set CONFIG_STM32F7_USART=y # CONFIG_STM32F7_ADC1 is not set # CONFIG_STM32F7_ADC2 is not set @@ -186,25 +293,25 @@ CONFIG_STM32F7_USART=y # 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_DMA2D 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_I2C4 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_SAI1 is not set # CONFIG_STM32F7_SAI2 is not set # CONFIG_STM32F7_SDMMC1 is not set # CONFIG_STM32F7_SPDIFRX is not set @@ -228,7 +335,6 @@ CONFIG_STM32F7_USART=y # 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 is not set @@ -239,8 +345,18 @@ CONFIG_STM32F7_USART6=y # 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 +# +# Timer Configuration +# + # # Architecture Options # @@ -452,6 +568,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -466,7 +584,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -474,6 +597,7 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -485,6 +609,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -508,10 +634,6 @@ 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_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -538,15 +660,18 @@ CONFIG_USART6_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -584,12 +709,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -655,11 +774,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -703,10 +825,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -716,17 +838,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -734,17 +856,16 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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_WEBSERVER is not set # # File System Utilities @@ -766,8 +887,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -778,6 +899,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 @@ -890,12 +1012,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -903,6 +1025,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f746g-disco/src/stm32_autoleds.c b/configs/stm32f746g-disco/src/stm32_autoleds.c index 47a1d45bbabc681be3f06634e9d3297f1e64dd63..3875d4a54f468b133a0c96775ee831d8265c25f4 100644 --- a/configs/stm32f746g-disco/src/stm32_autoleds.c +++ b/configs/stm32f746g-disco/src/stm32_autoleds.c @@ -49,22 +49,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/stm32f746g-disco/src/stm32_spi.c b/configs/stm32f746g-disco/src/stm32_spi.c index 38f62be076b286563b301c8843d2594b6206c3ed..c2bea9894d613e1fc5bbaa331350665a14dbe7d3 100644 --- a/configs/stm32f746g-disco/src/stm32_spi.c +++ b/configs/stm32f746g-disco/src/stm32_spi.c @@ -57,31 +57,6 @@ defined(CONFIG_STM32F7_SPI3) || defined(CONFIG_STM32F7_SPI4) || \ defined(CONFIG_STM32F7_SPI5) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Data - ************************************************************************************/ - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -126,7 +101,7 @@ void weak_function stm32_spidev_initialize(void) #ifdef CONFIG_STM32F7_SPI1 void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -138,7 +113,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32F7_SPI2 void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -150,7 +125,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32F7_SPI3 void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -162,7 +137,7 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32F7_SPI4 void stm32_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -174,7 +149,7 @@ uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32F7_SPI5 void stm32_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) diff --git a/configs/stm32f746g-disco/src/stm32_userleds.c b/configs/stm32f746g-disco/src/stm32_userleds.c index f4d90b146b7a5c1d0a2d3b32ca94aed2afae5a21..4541668075cef28f198a1d2ca870a7db9de5b9cf 100644 --- a/configs/stm32f746g-disco/src/stm32_userleds.c +++ b/configs/stm32f746g-disco/src/stm32_userleds.c @@ -47,22 +47,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/stm32l476vg-disco/nsh/defconfig b/configs/stm32l476vg-disco/nsh/defconfig index 1b79946f714192b967d0da066dcf52e6c08bab50..7bb5a7b16c17695a69c0339981f905110fb60996 100644 --- a/configs/stm32l476vg-disco/nsh/defconfig +++ b/configs/stm32l476vg-disco/nsh/defconfig @@ -42,9 +42,14 @@ CONFIG_RAW_BINARY=y # # Debug Options # -CONFIG_DEBUG=y -CONFIG_ARCH_HAVE_HEAPCHECK=y -# CONFIG_DEBUG_VERBOSE is not set +CONFIG_DEBUG_ALERT=y +CONFIG_DEBUG_FEATURES=y + +# +# Debug SYSLOG Output Controls +# +# CONFIG_DEBUG_ERROR is not set +# CONFIG_DEBUG_ASSERTIONS is not set # # Subsystem Debug Options @@ -60,19 +65,19 @@ CONFIG_ARCH_HAVE_HEAPCHECK=y # OS Function Debug Options # # CONFIG_DEBUG_DMA is not set -# CONFIG_DEBUG_HEAP is not set # CONFIG_DEBUG_IRQ is not set # # Driver Debug Options # # CONFIG_DEBUG_LEDS is not set -# CONFIG_DEBUG_ANALOG is not set # CONFIG_DEBUG_GPIO is not set # CONFIG_DEBUG_RTC is not set # CONFIG_DEBUG_SPI is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y CONFIG_DEBUG_NOOPT=y @@ -248,7 +253,6 @@ CONFIG_STM32L4_QSPI_DMA_CHAN_1_5=y CONFIG_STM32L4_QSPI_DMAPRIORITY_MEDIUM=y # CONFIG_STM32L4_QSPI_DMAPRIORITY_LOW is not set CONFIG_STM32L4_QSPI_DMATHRESHOLD=4 -# CONFIG_STM32L4_QSPI_REGDEBUG is not set # # APB1 Peripherals @@ -535,6 +539,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set # CONFIG_SPI_CRCGENERATION is not set +# CONFIG_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -555,7 +561,12 @@ CONFIG_RTC_IOCTL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -563,6 +574,7 @@ CONFIG_RTC_IOCTL=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set CONFIG_MTD=y @@ -586,6 +598,7 @@ CONFIG_MTD_PARTITION=y # CONFIG_MTD_AT24XX is not set # CONFIG_MTD_AT25 is not set # CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_IS25XP is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set CONFIG_MTD_N25QXXX=y @@ -596,6 +609,7 @@ CONFIG_N25QXXX_SECTOR512=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 @@ -606,6 +620,8 @@ CONFIG_N25QXXX_SECTOR512=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -629,10 +645,6 @@ CONFIG_USART2_SERIALDRIVER=y # 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 @@ -660,15 +672,18 @@ CONFIG_USART2_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -721,12 +736,6 @@ CONFIG_FS_PROCFS_REGISTER=y # CONFIG_FS_PROCFS_EXCLUDE_PARTITIONS is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -802,6 +811,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -863,10 +873,10 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set CONFIG_EXAMPLES_MEDIA=y CONFIG_EXAMPLES_MEDIA_DEVPATH="/dev/mtd0" CONFIG_EXAMPLES_MEDIA_BLOCKSIZE=512 @@ -879,17 +889,17 @@ 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RANDOM is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set @@ -899,23 +909,24 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMART_TEST 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 # CONFIG_EXAMPLES_TIFF is not set # 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_FLASH_ERASEALL is not set # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set @@ -935,8 +946,8 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -947,6 +958,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 @@ -1069,13 +1081,13 @@ CONFIG_NSH_ARCHINIT=y # # 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_FLASH_ERASEALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1083,7 +1095,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set -CONFIG_SYSTEM_DISCOTEST=y diff --git a/configs/stm32l476vg-disco/src/stm32_appinit.c b/configs/stm32l476vg-disco/src/stm32_appinit.c index 0c5591dcfa355d02642f76d1b06f94785cc07490..d530dae0b5c83ef9b3827a31e3af94599fb5a659 100644 --- a/configs/stm32l476vg-disco/src/stm32_appinit.c +++ b/configs/stm32l476vg-disco/src/stm32_appinit.c @@ -87,26 +87,6 @@ #endif /**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Debug ********************************************************************/ - -#ifdef CONFIG_BOARD_INITIALIZE -# define SYSLOG lldbg -#else -# define SYSLOG dbg -#endif - -/**************************************************************************** - * Private Type Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - - /**************************************************************************** * Private Data ****************************************************************************/ @@ -188,7 +168,7 @@ FAR struct mtd_dev_s *mtd_temp; rtclower = stm32l4_rtc_lowerhalf(); if (!rtclower) { - sdbg("ERROR: Failed to instantiate the RTC lower-half driver\n"); + serr("ERROR: Failed to instantiate the RTC lower-half driver\n"); return -ENOMEM; } else @@ -200,7 +180,7 @@ FAR struct mtd_dev_s *mtd_temp; ret = rtc_initialize(0, rtclower); if (ret < 0) { - sdbg("ERROR: Failed to bind/register the RTC driver: %d\n", ret); + serr("ERROR: Failed to bind/register the RTC driver: %d\n", ret); return ret; } } @@ -212,7 +192,7 @@ FAR struct mtd_dev_s *mtd_temp; g_qspi = stm32l4_qspi_initialize(0); if (!g_qspi) { - SYSLOG("ERROR: stm32l4_qspi_initialize failed\n"); + _err("ERROR: stm32l4_qspi_initialize failed\n"); return ret; } else @@ -224,7 +204,7 @@ FAR struct mtd_dev_s *mtd_temp; mtd_temp = n25qxxx_initialize(g_qspi, true); if (!mtd_temp) { - SYSLOG("ERROR: n25qxxx_initialize failed\n"); + _err("ERROR: n25qxxx_initialize failed\n"); return ret; } g_mtd_fs = mtd_temp; @@ -239,7 +219,7 @@ FAR struct mtd_dev_s *mtd_temp; #endif if (!g_mtd_fs) { - SYSLOG("ERROR: mtd_partition failed\n"); + _err("ERROR: mtd_partition failed\n"); return ret; } @@ -251,7 +231,7 @@ FAR struct mtd_dev_s *mtd_temp; ret = ftl_initialize(N25QXXX_MTD_MINOR, g_mtd_fs); if (ret < 0) { - SYSLOG("ERROR: Failed to initialize the FTL layer: %d\n", ret); + _err("ERROR: Failed to initialize the FTL layer: %d\n", ret); return ret; } @@ -273,7 +253,7 @@ FAR struct mtd_dev_s *mtd_temp; ret = bchdev_register(blockdev, chardev, false); if (ret < 0) { - SYSLOG("ERROR: bchdev_register %s failed: %d\n", chardev, ret); + _err("ERROR: bchdev_register %s failed: %d\n", chardev, ret); return ret; } } diff --git a/configs/stm32l476vg-disco/src/stm32_autoleds.c b/configs/stm32l476vg-disco/src/stm32_autoleds.c index 22ee6771760bc545dadefed4c15ccdd20a00f248..e21faf7249cf3d50f5c7e4180f5def616ea0cd4b 100644 --- a/configs/stm32l476vg-disco/src/stm32_autoleds.c +++ b/configs/stm32l476vg-disco/src/stm32_autoleds.c @@ -54,22 +54,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/stm32l476vg-disco/src/stm32_buttons.c b/configs/stm32l476vg-disco/src/stm32_buttons.c index 6a49927e80217458ebe1bc7077c7cfb7e334d39b..b113718c9a1a1daa8ba4d7845aa9717722d5a178 100644 --- a/configs/stm32l476vg-disco/src/stm32_buttons.c +++ b/configs/stm32l476vg-disco/src/stm32_buttons.c @@ -253,9 +253,9 @@ void board_button_initialize(void) xcpt_t oldhandler = board_button_irq(i, button_handler); if (oldhandler != NULL) { - lowsyslog(LOG_WARNING, "WARNING: oldhandler:%p is not NULL! " - "Button events may be lost or aliased!\n", - oldhandler); + warn("WARNING: oldhandler:%p is not NULL! " + "Button events may be lost or aliased!\n", + oldhandler); } #endif #endif diff --git a/configs/stm32l476vg-disco/src/stm32_spi.c b/configs/stm32l476vg-disco/src/stm32_spi.c index c37d3a7a7c6460f06069b981af7cb06565dcaaba..3b8420c62afb11ac00eb28685174d0b1507d1a99 100644 --- a/configs/stm32l476vg-disco/src/stm32_spi.c +++ b/configs/stm32l476vg-disco/src/stm32_spi.c @@ -55,29 +55,6 @@ #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_SPI -# undef CONFIG_DEBUG_VERBOSE -#endif - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - /************************************************************************************ * Public Data ************************************************************************************/ @@ -113,7 +90,7 @@ void weak_function stm32_spiinitialize(void) g_spi1 = up_spiinitialize(1); if (!g_spi1) { - spidbg("[boot] FAILED to initialize SPI port 1\n"); + spierr("ERROR: [boot] FAILED to initialize SPI port 1\n"); } #ifdef CONFIG_WL_CC3000 @@ -168,7 +145,7 @@ void weak_function stm32_spiinitialize(void) #ifdef CONFIG_STM32_SPI1 void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #ifdef CONFIG_WL_CC3000 if (devid == SPIDEV_WIRELESS) @@ -194,7 +171,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI2 void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #ifdef CONFIG_WL_CC3000 if (devid == SPIDEV_WIRELESS) @@ -213,7 +190,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI3 void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) diff --git a/configs/stm32l476vg-disco/src/stm32_userleds.c b/configs/stm32l476vg-disco/src/stm32_userleds.c index 5e5c56d5f2c4451348c9728c5db98290ce46e0a4..4bee92bde819ff5eae619be1400a5184582639bb 100644 --- a/configs/stm32l476vg-disco/src/stm32_userleds.c +++ b/configs/stm32l476vg-disco/src/stm32_userleds.c @@ -54,22 +54,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 Function Prototypes ****************************************************************************/ diff --git a/configs/stm32ldiscovery/README.txt b/configs/stm32ldiscovery/README.txt index 532fbe198cd43f5fe93c5db49ff5428bd41492be..4158273b5add37da8788b3127b1dbe4a51699d15 100644 --- a/configs/stm32ldiscovery/README.txt +++ b/configs/stm32ldiscovery/README.txt @@ -707,7 +707,7 @@ STM32L-Discovery-specific Configuration Options 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 + CONFIG_STM32_CAN_REGDEBUG - If CONFIG_DEBUG_FEATURES is set, this will generate an dump of all CAN registers. STM32L-Discovery SPI Configuration @@ -813,8 +813,8 @@ Configuration sub-directories CONFIG_LCD=y : (Needed to enable LCD debug) Build Setup -> Debug Options: - CONFIG_DEBUG=y : Enable debug features - CONFIG_DEBUG_VERBOSE=y : Enable LCD debug + CONFIG_DEBUG_FEATURES=y : Enable debug features + CONFIG_DEBUG_INFO=y : Enable LCD debug NOTE: At this point in time, testing of the SLCD is very limited because there is not much in apps/examples/slcd. Certainly there are more bugs diff --git a/configs/stm32ldiscovery/nsh/defconfig b/configs/stm32ldiscovery/nsh/defconfig index d497e5e5d923f2bcee9d74a4c7951b4a2c6b3fa5..17293ae1cb7caed979bf79fde6910922c71acfa0 100644 --- a/configs/stm32ldiscovery/nsh/defconfig +++ b/configs/stm32ldiscovery/nsh/defconfig @@ -46,10 +46,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -207,6 +209,7 @@ CONFIG_ARCH_CHIP_STM32L152RB=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -412,6 +415,10 @@ 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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set # CONFIG_STM32_TIM9_CAP is not set @@ -423,9 +430,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -659,7 +674,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -667,6 +687,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -678,6 +699,8 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -727,15 +750,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -765,12 +791,6 @@ CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y # 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 # @@ -836,6 +856,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -864,10 +885,10 @@ CONFIG_ARCH_HAVE_TLS=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -876,18 +897,18 @@ CONFIG_ARCH_HAVE_TLS=y 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -901,9 +922,9 @@ CONFIG_EXAMPLES_NSH=y # 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -925,8 +946,8 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1045,12 +1066,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1058,6 +1079,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32ldiscovery/src/stm32_autoleds.c b/configs/stm32ldiscovery/src/stm32_autoleds.c index 073391b938be01fc0c05b61a8de145a74ceca16b..5f4ea2e0318c209e03b3281e3424d00a352b3193 100644 --- a/configs/stm32ldiscovery/src/stm32_autoleds.c +++ b/configs/stm32ldiscovery/src/stm32_autoleds.c @@ -73,26 +73,6 @@ * LED_IDLE STM32 is is sleep mode Not used */ -/* 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 Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/stm32ldiscovery/src/stm32_lcd.c b/configs/stm32ldiscovery/src/stm32_lcd.c index 3c249a76d91e4eb9356a8bf8fd05c09179b24ebf..1f4a843c87f913501f6ba281c9ceb82751eca98d 100644 --- a/configs/stm32ldiscovery/src/stm32_lcd.c +++ b/configs/stm32ldiscovery/src/stm32_lcd.c @@ -76,24 +76,12 @@ ****************************************************************************/ /* Configuration ************************************************************/ -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug - * must also be enabled. - */ +/* Define CONFIG_DEBUG_LCD_INFO to enable detailed LCD debug output. */ #ifndef CONFIG_LIB_SLCDCODEC # error "This SLCD driver requires CONFIG_LIB_SLCDCODEC" #endif -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif - /* The ever-present MIN/MAX macros ******************************************/ #ifndef MIN @@ -259,16 +247,6 @@ (((uint32_t)(s) & 0x03) << 14) #define SLCD_CHAR6_UPDATE3(s) SLCD_CHAR6_UPDATE2(s) -/* Debug ********************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /**************************************************************************** * Private Type Definition ****************************************************************************/ @@ -298,7 +276,7 @@ struct stm32_slcdstate_s ****************************************************************************/ /* Debug */ -#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_LCD_INFO static void slcd_dumpstate(FAR const char *msg); static void slcd_dumpslcd(FAR const char *msg); #else @@ -440,19 +418,19 @@ static uint32_t g_slcdgpio[BOARD_SLCD_NGPIOS] = * Name: slcd_dumpstate ****************************************************************************/ -#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_LCD_INFO static void slcd_dumpstate(FAR const char *msg) { - lcdvdbg("%s:\n", msg); - lcdvdbg(" curpos: %d\n", + lcdinfo("%s:\n", msg); + lcdinfo(" curpos: %d\n", g_slcdstate.curpos); - lcdvdbg(" Display: [%c%c%c%c%c%c]\n", + lcdinfo(" Display: [%c%c%c%c%c%c]\n", g_slcdstate.buffer[0], g_slcdstate.buffer[1], g_slcdstate.buffer[2], g_slcdstate.buffer[3], g_slcdstate.buffer[4], g_slcdstate.buffer[5]); - lcdvdbg(" Options: [%d%d%d%d%d%d]\n", + lcdinfo(" Options: [%d%d%d%d%d%d]\n", g_slcdstate.options[0], g_slcdstate.options[1], g_slcdstate.options[2], g_slcdstate.options[3], g_slcdstate.options[4], g_slcdstate.options[5]); - lcdvdbg(" Bar: %02x %02x\n", + lcdinfo(" Bar: %02x %02x\n", g_slcdstate.bar[0], g_slcdstate.bar[1]); } #endif @@ -461,14 +439,14 @@ static void slcd_dumpstate(FAR const char *msg) * Name: slcd_dumpslcd ****************************************************************************/ -#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_LCD_INFO static void slcd_dumpslcd(FAR const char *msg) { - lcdvdbg("%s:\n", msg); - lcdvdbg(" CR: %08x FCR: %08x SR: %08x CLR: %08x\n", + lcdinfo("%s:\n", msg); + lcdinfo(" CR: %08x FCR: %08x SR: %08x CLR: %08x\n", getreg32(STM32_LCD_CR), getreg32(STM32_LCD_FCR), getreg32(STM32_LCD_SR), getreg32(STM32_LCD_CLR)); - lcdvdbg(" RAM0L: %08x RAM1L: %08x RAM2L: %08x RAM3L: %08x\n", + lcdinfo(" RAM0L: %08x RAM1L: %08x RAM2L: %08x RAM3L: %08x\n", getreg32(STM32_LCD_RAM0L), getreg32(STM32_LCD_RAM1L), getreg32(STM32_LCD_RAM2L), getreg32(STM32_LCD_RAM3L)); } @@ -482,7 +460,7 @@ static void slcd_clear(void) { uint32_t regaddr; - lvdbg("Clearing\n"); + linfo("Clearing\n"); /* Make sure that any previous transfer is complete. The firmware sets * the UDR each it modifies the LCD_RAM. The UDR bit stays set until the @@ -565,7 +543,7 @@ static int slcd_setcontrast(uint8_t contrast) regval |= contrast << LCD_FCR_CC_SHIFT; putreg32(regval, STM32_LCD_FCR); - lcdvdbg("contrast: %d FCR: %08x\n", + lcdinfo("contrast: %d FCR: %08x\n", getreg32(STM32_LCD_FCR), contrast); return ret; @@ -579,7 +557,7 @@ static void slcd_writebar(void) { uint32_t regval; - lcdvdbg("bar: %02x %02x\n", g_slcdstate.bar[0], g_slcdstate.bar[1]); + lcdinfo("bar: %02x %02x\n", g_slcdstate.bar[0], g_slcdstate.bar[1]); slcd_dumpslcd("BEFORE WRITE"); /* Make sure that any previous transfer is complete. The firmware sets @@ -695,7 +673,7 @@ static inline void slcd_writemem(uint16_t segset, int curpos) int i; int j; - lcdvdbg("segset: %04x curpos: %d\n", segset, curpos); + lcdinfo("segset: %04x curpos: %d\n", segset, curpos); slcd_dumpslcd("BEFORE WRITE"); /* Isolate the least significant bits @@ -714,7 +692,7 @@ static inline void slcd_writemem(uint16_t segset, int curpos) segments[j] = (segset >> i) & 0x0f; } - lcdvdbg("segments: %02x %02x %02x %02x\n", + lcdinfo("segments: %02x %02x %02x %02x\n", segments[0], segments[1], segments[2], segments[3]); /* Make sure that any previous transfer is complete. The firmware sets @@ -859,7 +837,7 @@ static void slcd_writech(uint8_t ch, uint8_t curpos, uint8_t options) segset |= 0x0020; } - lcdvdbg("ch: [%c] options: %02x segset: %04x\n", ch, options, segset); + lcdinfo("ch: [%c] options: %02x segset: %04x\n", ch, options, segset); /* Decode the value and write it to the SLCD segment memory */ @@ -879,7 +857,7 @@ static void slcd_writech(uint8_t ch, uint8_t curpos, uint8_t options) static void slcd_appendch(uint8_t ch, uint8_t options) { - lcdvdbg("ch: [%c] options: %02x\n", ch, options); + lcdinfo("ch: [%c] options: %02x\n", ch, options); /* Write the character at the current cursor position */ @@ -898,7 +876,7 @@ static void slcd_appendch(uint8_t ch, uint8_t options) static void slcd_action(enum slcdcode_e code, uint8_t count) { - lcdvdbg("Action: %d count: %d\n", code, count); + lcdinfo("Action: %d count: %d\n", code, count); slcd_dumpstate("BEFORE ACTION"); switch (code) @@ -1152,7 +1130,7 @@ static ssize_t slcd_write(FAR struct file *filep, memset(&state, 0, sizeof(struct slcdstate_s)); result = slcd_decode(&instream.stream, &state, &prev, &count); - lcdvdbg("slcd_decode returned result=%d char=%d count=%d\n", + lcdinfo("slcd_decode returned result=%d char=%d count=%d\n", result, prev, count); switch (result) @@ -1176,7 +1154,7 @@ static ssize_t slcd_write(FAR struct file *filep, while ((result = slcd_decode(&instream.stream, &state, &ch, &count)) != SLCDRET_EOF) { - lcdvdbg("slcd_decode returned result=%d char=%d count=%d\n", + lcdinfo("slcd_decode returned result=%d char=%d count=%d\n", result, ch, count); if (result == SLCDRET_CHAR) /* A normal character was returned */ @@ -1329,7 +1307,7 @@ static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { FAR struct slcd_attributes_s *attr = (FAR struct slcd_attributes_s *)((uintptr_t)arg); - lcdvdbg("SLCDIOC_GETATTRIBUTES:\n"); + lcdinfo("SLCDIOC_GETATTRIBUTES:\n"); if (!attr) { @@ -1354,7 +1332,7 @@ static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { FAR struct slcd_curpos_s *curpos = (FAR struct slcd_curpos_s *)((uintptr_t)arg); - lcdvdbg("SLCDIOC_CURPOS: row=0 column=%d\n", g_slcdstate.curpos); + lcdinfo("SLCDIOC_CURPOS: row=0 column=%d\n", g_slcdstate.curpos); if (!curpos) { @@ -1373,7 +1351,7 @@ static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SLCDIOC_SETBAR: { - lcdvdbg("SLCDIOC_SETBAR: arg=0x%02lx\n", arg); + lcdinfo("SLCDIOC_SETBAR: arg=0x%02lx\n", arg); /* Format the bar */ @@ -1421,7 +1399,7 @@ static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg) } *contrast = (int)slcd_getcontrast(); - lcdvdbg("SLCDIOC_GETCONTRAST: contrast=%d\n", *contrast); + lcdinfo("SLCDIOC_GETCONTRAST: contrast=%d\n", *contrast); } break; @@ -1432,7 +1410,7 @@ static int slcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SLCDIOC_SETCONTRAST: { - lcdvdbg("SLCDIOC_SETCONTRAST: arg=%ld\n", arg); + lcdinfo("SLCDIOC_SETCONTRAST: arg=%ld\n", arg); if (arg > SLCD_MAXCONTRAST) { @@ -1498,7 +1476,7 @@ int stm32_slcd_initialize(void) if (!g_slcdstate.initialized) { - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); /* Configure LCD GPIO pins */ @@ -1515,7 +1493,7 @@ int stm32_slcd_initialize(void) stm32_rcc_enablelse(); - lcdvdbg("APB1ENR: %08x CSR: %08x\n", + lcdinfo("APB1ENR: %08x CSR: %08x\n", getreg32(STM32_RCC_APB1ENR), getreg32(STM32_RCC_CSR)); /* Set the LCD prescaler and divider values */ @@ -1527,7 +1505,7 @@ int stm32_slcd_initialize(void) /* Wait for the FCRSF flag to be set */ - lcdvdbg("Wait for FCRSF, FSR: %08x SR: %08x\n", + lcdinfo("Wait for FCRSF, FSR: %08x SR: %08x\n", getreg32(STM32_LCD_FCR), getreg32(STM32_LCD_SR)); while ((getreg32(STM32_LCD_SR) & LCD_SR_FCRSF) == 0); @@ -1564,7 +1542,7 @@ int stm32_slcd_initialize(void) /* Wait Until the LCD FCR register is synchronized */ - lcdvdbg("Wait for FCRSF, FSR: %08x SR: %08x\n", + lcdinfo("Wait for FCRSF, FSR: %08x SR: %08x\n", getreg32(STM32_LCD_FCR), getreg32(STM32_LCD_SR)); while ((getreg32(STM32_LCD_SR) & LCD_SR_FCRSF) == 0); @@ -1575,7 +1553,7 @@ int stm32_slcd_initialize(void) /* Wait Until the LCD is enabled and the LCD booster is ready */ - lcdvdbg("Wait for LCD_SR_ENS and LCD_SR_RDY, CR: %08x SR: %08x\n", + lcdinfo("Wait for LCD_SR_ENS and LCD_SR_RDY, CR: %08x SR: %08x\n", getreg32(STM32_LCD_CR), getreg32(STM32_LCD_SR)); while ((getreg32(STM32_LCD_SR) & (LCD_SR_ENS | LCD_SR_RDY)) != (LCD_SR_ENS | LCD_SR_RDY)); diff --git a/configs/stm32ldiscovery/src/stm32_pwm.c b/configs/stm32ldiscovery/src/stm32_pwm.c index 60eeb9bfcb7a35bcc481bce411a17fb7864fb276..8da1601b7154170cc830f75f2b6641836ef932f3 100644 --- a/configs/stm32ldiscovery/src/stm32_pwm.c +++ b/configs/stm32ldiscovery/src/stm32_pwm.c @@ -120,7 +120,7 @@ int board_pwm_setup(void) pwm = stm32_pwminitialize(STM32F3DISCOVERY_PWMTIMER); if (!pwm) { - dbg("Failed to get the STM32 PWM lower half\n"); + _err("ERROR: Failed to get the STM32 PWM lower half\n"); return -ENODEV; } @@ -129,7 +129,7 @@ int board_pwm_setup(void) ret = pwm_register("/dev/pwm0", pwm); if (ret < 0) { - adbg("pwm_register failed: %d\n", ret); + aerr("ERROR: pwm_register failed: %d\n", ret); return ret; } diff --git a/configs/stm32ldiscovery/src/stm32_qencoder.c b/configs/stm32ldiscovery/src/stm32_qencoder.c index e765750692aa51cd9bd9a24d29ea4bc023160005..ebd78514aa1e3010635f2e00c18c9cf9c4e32c78 100644 --- a/configs/stm32ldiscovery/src/stm32_qencoder.c +++ b/configs/stm32ldiscovery/src/stm32_qencoder.c @@ -118,10 +118,6 @@ #ifdef HAVE_QENCODER -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -146,11 +142,11 @@ int qe_devinit(void) { /* Initialize a quadrature encoder interface. */ - snvdbg("Initializing the quadrature encoder using TIM%d\n", TIMID); + sninfo("Initializing the quadrature encoder using TIM%d\n", TIMID); ret = stm32_qeinitialize("/dev/qe0", TIMID); if (ret < 0) { - sndbg("stm32_qeinitialize failed: %d\n", ret); + snerr("ERROR: stm32_qeinitialize failed: %d\n", ret); return ret; } diff --git a/configs/stm32ldiscovery/src/stm32_spi.c b/configs/stm32ldiscovery/src/stm32_spi.c index b56ed221fb7f891d482ee28431081c315b98d1db..d923a8b2c9ce1d715cee250e824d805000a71a02 100644 --- a/configs/stm32ldiscovery/src/stm32_spi.c +++ b/configs/stm32ldiscovery/src/stm32_spi.c @@ -55,32 +55,6 @@ #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -130,7 +104,7 @@ void weak_function stm32_spidev_initialize(void) #ifdef CONFIG_STM32_SPI1 void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); stm32_gpiowrite(GPIO_MEMS_CS, !selected); } @@ -144,7 +118,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI2 void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -156,7 +130,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI3 void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) diff --git a/configs/stm32ldiscovery/src/stm32_userleds.c b/configs/stm32ldiscovery/src/stm32_userleds.c index 4686eb97c7cb93696357e27950876b30ae90b024..a90ff178e9b52c94326e71a4b794c581e2e35bbd 100644 --- a/configs/stm32ldiscovery/src/stm32_userleds.c +++ b/configs/stm32ldiscovery/src/stm32_userleds.c @@ -51,22 +51,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/stm32vldiscovery/README.txt b/configs/stm32vldiscovery/README.txt index 28986df04dd6477098057794f4e9304c6f9e7f54..963a85ff7cf26834a2975930f57c32f122f6b9f3 100644 --- a/configs/stm32vldiscovery/README.txt +++ b/configs/stm32vldiscovery/README.txt @@ -342,7 +342,7 @@ RX pin (PA10) of your board besides, of course, the GND pin. CONFIG_ARCH_STACKDUMP - Do stack dumps after assertions - CONFIG_ARCH_CALIBRATION - when used togeter with CONFIG_DEBUG enables some + CONFIG_ARCH_CALIBRATION - when used togeter with CONFIG_DEBUG_FEATURES 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 diff --git a/configs/stm32vldiscovery/include/board.h b/configs/stm32vldiscovery/include/board.h index efbb3f3e8cd9f1fbc8ae7f74052b30f42aac1b27..19e167309d3a02b136d511bffa63b4f31183048b 100644 --- a/configs/stm32vldiscovery/include/board.h +++ b/configs/stm32vldiscovery/include/board.h @@ -1,7 +1,7 @@ /************************************************************************************ * configs/stm32vldiscovery/include/board.h * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * Freddie Chopin * @@ -110,8 +110,14 @@ * otherwise frequency is 2xAPBx. * Note: TIM1,15-17 are on APB2, others on APB1 */ -#define STM32_TIM18_FREQUENCY STM32_HCLK_FREQUENCY -#define STM32_TIM27_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM1_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM2_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM3_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM4_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM5_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM6_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM7_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM8_FREQUENCY STM32_HCLK_FREQUENCY /* LED definitions ******************************************************************/ diff --git a/configs/stm32vldiscovery/nsh/defconfig b/configs/stm32vldiscovery/nsh/defconfig index d1911fb96169e96763d695db6f12f2c59967fdda..c40099da6296d22ab82337a3aaad6d47bd07afda 100644 --- a/configs/stm32vldiscovery/nsh/defconfig +++ b/configs/stm32vldiscovery/nsh/defconfig @@ -46,10 +46,12 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -207,6 +209,7 @@ CONFIG_ARCH_CHIP_STM32F100RB=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -346,7 +349,7 @@ CONFIG_STM32_HAVE_TIM14=y CONFIG_STM32_HAVE_TIM15=y CONFIG_STM32_HAVE_TIM16=y CONFIG_STM32_HAVE_TIM17=y -CONFIG_STM32_HAVE_ADC2=y +# 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 @@ -369,7 +372,6 @@ CONFIG_STM32_HAVE_I2C2=y # 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_BKP=y # CONFIG_STM32_CEC is not set # CONFIG_STM32_CRC is not set @@ -413,6 +415,10 @@ CONFIG_STM32_JTAG_FULL_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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -426,9 +432,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -678,7 +692,12 @@ CONFIG_RTC=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -686,6 +705,7 @@ CONFIG_RTC=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -697,6 +717,8 @@ CONFIG_RTC=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -746,15 +768,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -799,12 +824,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -880,6 +899,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -914,10 +934,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -926,17 +946,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -944,16 +964,16 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -977,8 +997,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1101,12 +1121,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1114,6 +1134,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32vldiscovery/src/stm32_leds.c b/configs/stm32vldiscovery/src/stm32_leds.c index 62cc0a20db0714b9c6d2536d4ff0f7af188e3186..1174511a60d2519c8383f00be7fc856b16f789f7 100644 --- a/configs/stm32vldiscovery/src/stm32_leds.c +++ b/configs/stm32vldiscovery/src/stm32_leds.c @@ -54,22 +54,6 @@ #include "stm32.h" #include "stm32vldiscovery.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 - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/sure-pic32mx/README.txt b/configs/sure-pic32mx/README.txt index 8ce44ce3c73e3bf01945fcb1f5b07aeb36dbe008..da415a98055d9ae985bcbca7f2a46e4295975c60 100644 --- a/configs/sure-pic32mx/README.txt +++ b/configs/sure-pic32mx/README.txt @@ -735,13 +735,13 @@ Where is one of the following: File Systems: CONFIG_FS_FAT=y : FAT file system - : Other FAT options + : Other FAT options Debug output for testing the SD card can be enabled using: Build Setup: - CONFIG_DEBUG=y : Enable debug features - CONFIG_DEBUG_VERBOSE=y : Enable verbose debug output + CONFIG_DEBUG_FEATURES=y : Enable debug features + CONFIG_DEBUG_INFO=y : Enable verbose debug output CONFIG_DEBUG_FS=y : Enable file system debug CONFIG_DEBUG_SPI=y : Enable SPI debug @@ -772,8 +772,8 @@ Where is one of the following: To enable LCD debug output: Build Setup -> Debug Options: - CONFIG_DEBUG=y : Enable debug features - CONFIG_DEBUG_VERBOSE=y : Enable verbose debug output + CONFIG_DEBUG_FEATURES=y : Enable debug features + CONFIG_DEBUG_INFO=y : Enable verbose debug output CONFIG_DEBUG_LCD=y : Enable LCD debug output NOTES: @@ -847,7 +847,6 @@ Where is one of the following: settings do nothing until you enable debug ouput. Device Drivers -> System Logging Device Options: - CONFIG_SYSLOG=y : Configure SYSLOG output CONFIG_SYSLOG_CHAR=y CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" @@ -913,16 +912,12 @@ Where is one of the following: output will come the USB console, and 2) all debug output prior to connecting the USB console will be lost: - Device Drivers -> System Logging Device Options: - CONFIG_SYSLOG=n : Disable SYSLOG output - The second options is to configure a RAM SYLOG device. This is a circular buffer that accumulated debug output in memory. The contents of the circular buffer can be dumped from the NSH command line using the 'dmesg' command. Device Drivers -> System Logging Device Options: - CONFIG_SYSLOG=y : Enables the System Logging feature. CONFIG_RAMLOG=y : Enable the RAM-based logging feature. CONFIG_RAMLOG_CONSOLE=n : (there is no default console device) CONFIG_RAMLOG_SYSLOG=y : This enables the RAM-based logger as the diff --git a/configs/sure-pic32mx/nsh/defconfig b/configs/sure-pic32mx/nsh/defconfig index 25e91c17f2e5a7d37f78e36f6d6bca3ac26db875..8219ec829f89eb05ff4593f03a3c3b4b58802367 100644 --- a/configs/sure-pic32mx/nsh/defconfig +++ b/configs/sure-pic32mx/nsh/defconfig @@ -41,13 +41,15 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -266,12 +268,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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_IRQPRIO is not set CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set @@ -332,6 +336,7 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_ARCH_DBDP11215=y # CONFIG_ARCH_DBDP11212 is not set 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 @@ -371,6 +376,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="nsh_main" CONFIG_RR_INTERVAL=0 +# CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=0 CONFIG_MAX_TASKS=16 # CONFIG_SCHED_HAVE_PARENT is not set @@ -421,9 +427,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -454,6 +461,7 @@ CONFIG_DEV_NULL=y # 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 @@ -471,8 +479,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -482,6 +505,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -505,14 +530,11 @@ CONFIG_UART2_SERIALDRIVER=y # 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_UART2_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -529,19 +551,23 @@ CONFIG_UART2_PARITY=0 CONFIG_UART2_2STOP=0 # CONFIG_UART2_IFLOWCONTROL is not set # CONFIG_UART2_OFLOWCONTROL is not set +# CONFIG_UART2_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -573,17 +599,12 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -602,6 +623,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -645,10 +670,13 @@ 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 is not set +# CONFIG_LIBC_NETDB is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -667,11 +695,14 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -679,11 +710,11 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -691,33 +722,45 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD 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_SMART_TEST 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -729,30 +772,28 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -772,6 +813,7 @@ 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 @@ -780,6 +822,7 @@ 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 @@ -788,8 +831,10 @@ CONFIG_NSH_DISABLE_DATE=y # 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 @@ -807,8 +852,10 @@ CONFIG_NSH_DISABLE_DATE=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 # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set @@ -835,6 +882,8 @@ CONFIG_NSH_FILEIOSIZE=512 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 @@ -848,15 +897,19 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sure-pic32mx/src/pic32mx_autoleds.c b/configs/sure-pic32mx/src/pic32mx_autoleds.c index 46cf61993e9beedaa1edbd106fa8419e04a54f84..18e587267cac234007600315b8120a6587c6ff25 100644 --- a/configs/sure-pic32mx/src/pic32mx_autoleds.c +++ b/configs/sure-pic32mx/src/pic32mx_autoleds.c @@ -86,22 +86,6 @@ #define LED_ON 1 #define LED_NC 2 -/* Debug ********************************************************************/ - -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_LEDS) -# define leddbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# undef CONFIG_DEBUG_LEDS -# undef CONFIG_DEBUG_VERBOSE -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /**************************************************************************** * Private types ****************************************************************************/ diff --git a/configs/sure-pic32mx/src/pic32mx_lcd1602.c b/configs/sure-pic32mx/src/pic32mx_lcd1602.c index 8911d8dd841fb5d2d8f07f52f4614ef41d4089d7..53663f11e0cb5b132ede58e1d713102c1e2eb0d3 100644 --- a/configs/sure-pic32mx/src/pic32mx_lcd1602.c +++ b/configs/sure-pic32mx/src/pic32mx_lcd1602.c @@ -109,20 +109,6 @@ # define CONFIG_LCD_MAXPOWER 100 #endif -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must - * also be enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif - /* The ever-present MIN/MAX macros ******************************************/ #ifndef MIN @@ -141,16 +127,6 @@ #define NOP __asm__ __volatile__ ("nop"); -/* Debug ********************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /**************************************************************************** * Private Type Definition ****************************************************************************/ @@ -179,7 +155,7 @@ struct lcd1602_2 ****************************************************************************/ /* Debug */ -#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_LCD_INFO static void lcd_dumpstate(FAR const char *msg); static void lcd_dumpstream(FAR const char *msg, FAR const struct lcd_instream_s *stream); @@ -243,7 +219,7 @@ static struct lcd1602_2 g_lcd1602; * Name: lcd_dumpstate ****************************************************************************/ -#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_LCD_INFO static void lcd_dumpstate(FAR const char *msg) { uint8_t buffer[LCD_NCOLUMNS]; @@ -251,8 +227,8 @@ static void lcd_dumpstate(FAR const char *msg) int row; int column; - lcdvdbg("%s:\n", msg); - lcdvdbg(" currow: %d curcol: %d\n", + lcdinfo("%s:\n", msg); + lcdinfo(" currow: %d curcol: %d\n", g_lcd1602.currow, g_lcd1602.curcol); for (row = 0, column = 0; row < LCD_NROWS; ) @@ -261,7 +237,7 @@ static void lcd_dumpstate(FAR const char *msg) buffer[column] = isprint(ch) ? ch : '.'; if (++column >= LCD_NCOLUMNS) { - lcdvdbg(" [%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c]\n", + lcdinfo(" [%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c]\n", buffer[0], buffer[1], buffer[2], buffer[3], buffer[4], buffer[5], buffer[6], buffer[7], buffer[8], buffer[9], buffer[10], buffer[11], @@ -278,12 +254,12 @@ static void lcd_dumpstate(FAR const char *msg) * Name: lcd_dumpstate ****************************************************************************/ -#if defined(CONFIG_DEBUG_LCD) && defined(CONFIG_DEBUG_VERBOSE) +#ifdef CONFIG_DEBUG_LCD_INFO static void lcd_dumpstream(FAR const char *msg, FAR const struct lcd_instream_s *stream) { - lcdvdbg("%s:\n", msg); - lcdvdbg(" nget: %d nbytes: %d\n", + lcdinfo("%s:\n", msg); + lcdinfo(" nget: %d nbytes: %d\n", stream->stream.nget, stream->nbytes); lib_dumpbuffer("STREAM", stream->buffer, stream->nbytes); } @@ -592,7 +568,7 @@ static void lcd_appendch(uint8_t ch) static void lcd_action(enum slcdcode_e code, uint8_t count) { - lcdvdbg("Action: %d count: %d\n", code, count); + lcdinfo("Action: %d count: %d\n", code, count); lcd_dumpstate("BEFORE ACTION"); switch (code) @@ -874,7 +850,7 @@ static ssize_t lcd_write(FAR struct file *filep, FAR const char *buffer, memset(&state, 0, sizeof(struct slcdstate_s)); while ((result = slcd_decode(&instream.stream, &state, &ch, &count)) != SLCDRET_EOF) { - lcdvdbg("slcd_decode returned result=%d char=%d count=%d\n", + lcdinfo("slcd_decode returned result=%d char=%d count=%d\n", result, ch, count); if (result == SLCDRET_CHAR) /* A normal character was returned */ @@ -951,7 +927,7 @@ static int lcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { FAR struct slcd_attributes_s *attr = (FAR struct slcd_attributes_s *)((uintptr_t)arg); - lcdvdbg("SLCDIOC_GETATTRIBUTES:\n"); + lcdinfo("SLCDIOC_GETATTRIBUTES:\n"); if (!attr) { @@ -977,7 +953,7 @@ static int lcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { FAR struct slcd_curpos_s *curpos = (FAR struct slcd_curpos_s *)((uintptr_t)arg); - lcdvdbg("SLCDIOC_CURPOS: row=%d column=%d\n", g_lcd1602.currow, g_lcd1602.curcol); + lcdinfo("SLCDIOC_CURPOS: row=%d column=%d\n", g_lcd1602.currow, g_lcd1602.curcol); if (!curpos) { @@ -1004,7 +980,7 @@ static int lcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg) } *brightness = (int)g_lcd1602.brightness; - lcdvdbg("SLCDIOC_GETCONTRAST: brightness=%d\n", *brightness); + lcdinfo("SLCDIOC_GETCONTRAST: brightness=%d\n", *brightness); } break; @@ -1015,7 +991,7 @@ static int lcd_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SLCDIOC_SETBRIGHTNESS: { - lcdvdbg("SLCDIOC_SETCONTRAST: arg=%ld\n", arg); + lcdinfo("SLCDIOC_SETCONTRAST: arg=%ld\n", arg); if (arg > CONFIG_LCD_MAXPOWER) { @@ -1079,7 +1055,7 @@ int up_lcd1602_initialize(void) if (!g_lcd1602.initialized) { - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); /* Configure GPIO pins */ diff --git a/configs/sure-pic32mx/src/pic32mx_spi.c b/configs/sure-pic32mx/src/pic32mx_spi.c index dc7cd4334b29a5ef09d4b3ced511cbabf4924f0a..74671256baa53db8f6da81ae9c02e7559983bb97 100644 --- a/configs/sure-pic32mx/src/pic32mx_spi.c +++ b/configs/sure-pic32mx/src/pic32mx_spi.c @@ -118,33 +118,6 @@ # define GPIO_SOIC_CS (GPIO_OUTPUT|GPIO_VALUE_ONE|GPIO_PORTB|GPIO_PIN11) #endif -/* The following enable debug output from this file. - * - * CONFIG_DEBUG_SPI && CONFIG_DEBUG - Define to enable basic SPI debug - * CONFIG_DEBUG_VERBOSE - Define to enable verbose SPI debug - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_SPI -# undef CONFIG_DEBUG_VERBOSE -#endif - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -203,7 +176,7 @@ void weak_function pic32mx_spidev_initialize(void) #ifdef CONFIG_PIC32MX_SPI2 void pic32mx_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spivdbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); /* The SD card chip select is pulled high and active low */ @@ -263,7 +236,7 @@ uint8_t pic32mx_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) } #endif - spivdbg("Returning %d\n", ret); + spiinfo("Returning %d\n", ret); return ret; } #endif diff --git a/configs/sure-pic32mx/usbnsh/defconfig b/configs/sure-pic32mx/usbnsh/defconfig index 572454b95ab31ed8dc37471e186aad2f68057672..3bf95a77509e38564d8b5a42c9ab3493f4b600e4 100644 --- a/configs/sure-pic32mx/usbnsh/defconfig +++ b/configs/sure-pic32mx/usbnsh/defconfig @@ -41,13 +41,15 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -267,12 +269,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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_IRQPRIO is not set CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set @@ -333,6 +337,7 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_ARCH_DBDP11215=y # CONFIG_ARCH_DBDP11212 is not set CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_UNIQUEID is not set CONFIG_BOARDCTL_USBDEVCTRL=y # CONFIG_BOARDCTL_TSCTEST is not set # CONFIG_BOARDCTL_ADCTEST is not set @@ -373,6 +378,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="nsh_main" CONFIG_RR_INTERVAL=0 +# CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=0 CONFIG_MAX_TASKS=16 # CONFIG_SCHED_HAVE_PARENT is not set @@ -423,9 +429,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -456,6 +463,7 @@ CONFIG_DEV_NULL=y # 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 @@ -473,8 +481,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -484,6 +507,7 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y +# CONFIG_SERIAL_CONSOLE is not set # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -507,14 +531,11 @@ CONFIG_UART2_SERIALDRIVER=y # 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_UART2_SERIAL_CONSOLE is not set # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -531,6 +552,7 @@ CONFIG_UART2_PARITY=0 CONFIG_UART2_2STOP=0 # CONFIG_UART2_IFLOWCONTROL is not set # CONFIG_UART2_OFLOWCONTROL is not set +# CONFIG_UART2_DMA is not set CONFIG_USBDEV=y # @@ -562,8 +584,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 @@ -575,14 +597,19 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +CONFIG_SYSLOG_CHAR=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set +CONFIG_SYSLOG_CHAR_CRLF=y +CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" # # Networking Support @@ -614,19 +641,12 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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=y -# CONFIG_SYSLOG_TIMESTAMP is not set -CONFIG_SYSLOG_CHAR=y -CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" - # # Graphics Support # @@ -645,6 +665,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -688,10 +712,13 @@ 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 is not set +# CONFIG_LIBC_NETDB is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -710,11 +737,14 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -722,11 +752,11 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -734,33 +764,45 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD 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_SMART_TEST 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -772,30 +814,28 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -815,6 +855,7 @@ 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 @@ -823,6 +864,7 @@ 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 @@ -831,8 +873,10 @@ CONFIG_NSH_DISABLE_DATE=y # 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 @@ -850,8 +894,10 @@ CONFIG_NSH_DISABLE_DATE=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 # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set @@ -879,6 +925,8 @@ CONFIG_NSH_CONSOLE=y # CONFIG_NSH_USBCONSOLE is not set # 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 @@ -892,16 +940,20 @@ CONFIG_NSH_ARCHINIT=y # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CDCACM is not set # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set -# CONFIG_SYSTEM_CDCACM is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/teensy-2.0/hello/defconfig b/configs/teensy-2.0/hello/defconfig index 423049ad667845e375f90929f818c39365290a71..01eeae917e3e95b121e9d05ce115ec50132b8d2a 100644 --- a/configs/teensy-2.0/hello/defconfig +++ b/configs/teensy-2.0/hello/defconfig @@ -45,7 +45,7 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set @@ -364,7 +364,7 @@ CONFIG_USART1_2STOP=0 # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -397,7 +397,6 @@ CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/teensy-2.0/nsh/defconfig b/configs/teensy-2.0/nsh/defconfig index eaf3e24cc9eacc51e6ce2854a4181f5c98519e43..b1bbef7702892fab64f512d7a50f2586b767c53a 100644 --- a/configs/teensy-2.0/nsh/defconfig +++ b/configs/teensy-2.0/nsh/defconfig @@ -45,7 +45,7 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set @@ -376,7 +376,7 @@ CONFIG_USART1_2STOP=0 # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -409,7 +409,6 @@ CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/teensy-2.0/src/Makefile b/configs/teensy-2.0/src/Makefile index 48e413ceda33a3eaccfe1650f50a6b81e27d8b8c..ebf8c9b87646f047a898b73ad4369dfd7249cf86 100644 --- a/configs/teensy-2.0/src/Makefile +++ b/configs/teensy-2.0/src/Makefile @@ -1,7 +1,7 @@ ############################################################################ # configs/teensy-2.0/src/Makefile # -# 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 @@ -41,6 +41,9 @@ CSRCS = at90usb_boot.c ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += at90usb_leds.c endif +ifeq ($(CONFIG_LIB_BOARDCTL),y) +CSRCS += at90usb_appinit.c +endif ifeq ($(CONFIG_USBMSC),y) CSRCS += at90usb_usbmsc.c endif diff --git a/configs/teensy-2.0/src/at90usb_appinit.c b/configs/teensy-2.0/src/at90usb_appinit.c new file mode 100644 index 0000000000000000000000000000000000000000..ab482aa62f5e8d94518ca9998c18137cc81dfd49 --- /dev/null +++ b/configs/teensy-2.0/src/at90usb_appinit.c @@ -0,0 +1,81 @@ +/**************************************************************************** + * configs/teensy-2.0/src/at90usb_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 + +#ifdef CONFIG_LIB_BOARDCTL + +/**************************************************************************** + * 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; +} + +#endif /* CONFIG_LIB_BOARDCTL */ diff --git a/configs/teensy-2.0/src/at90usb_boot.c b/configs/teensy-2.0/src/at90usb_boot.c index ad3379a42f09fe3c94bef387b1a2435d78122ae2..93ce9a76ffea330cef1a881b9db5e138331869b2 100644 --- a/configs/teensy-2.0/src/at90usb_boot.c +++ b/configs/teensy-2.0/src/at90usb_boot.c @@ -49,14 +49,6 @@ #include "at90usb.h" #include "teensy-20.h" -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -73,20 +65,20 @@ void at90usb_boardinitialize(void) { +#ifdef CONFIG_AVR_SPI /* Configure SSP chip selects if 1) at least one SSP is enabled, and 2) the weak * function at90usb_spidev_initialize() has been brought into the link. */ -#ifdef CONFIG_AVR_SPI if (at90usb_spidev_initialize) { at90usb_spidev_initialize(); } #endif +#ifdef CONFIG_ARCH_LEDS /* Configure on-board LEDs if LED support has been selected. */ -#ifdef CONFIG_ARCH_LEDS at90usb_led_initialize(); #endif } diff --git a/configs/teensy-2.0/src/at90usb_leds.c b/configs/teensy-2.0/src/at90usb_leds.c index 9cd4821f42f518b134d7061cfc449a8b728dffbb..b81afc6f5d8af71cac2fa4eee2bb26b36f871282 100644 --- a/configs/teensy-2.0/src/at90usb_leds.c +++ b/configs/teensy-2.0/src/at90usb_leds.c @@ -53,36 +53,12 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /**************************************************************************** * Private Data ****************************************************************************/ static bool g_ncoff; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/teensy-2.0/src/at90usb_spi.c b/configs/teensy-2.0/src/at90usb_spi.c index 77422d601e0a6485171a4b7e5bae86e004f130e5..6c55945b3d49d8ea76abde43c5cd40ce1b9bd104 100644 --- a/configs/teensy-2.0/src/at90usb_spi.c +++ b/configs/teensy-2.0/src/at90usb_spi.c @@ -80,29 +80,6 @@ #define TEENSY_CD (1 << 4) #define TEENSY_WP (1 << 5) -/* The following enable debug output from this file (needs CONFIG_DEBUG too). - * - * CONFIG_SPI_DEBUG - Define to enable basic SSP debug - * CONFIG_SPI_VERBOSE - Define to enable verbose SSP debug - */ - -#ifdef CONFIG_SPI_DEBUG -# define sspdbg lldbg -# ifdef CONFIG_SPI_VERBOSE -# define sspvdbg lldbg -# else -# define sspvdbg(x...) -# endif -#else -# undef CONFIG_SPI_VERBOSE -# define sspdbg(x...) -# define sspvdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -161,7 +138,7 @@ void weak_function at90usb_spidev_initialize(void) void avr_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - sspdbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); /* Assert/de-assert the CS pin to the card */ @@ -194,7 +171,7 @@ uint8_t avr_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid) ret |= SPI_STATUS_WRPROTECTED; } - sspdbg("Returning %02x\n", ret); + spiinfo("Returning %02x\n", ret); return ret; } diff --git a/configs/teensy-2.0/src/at90usb_usbmsc.c b/configs/teensy-2.0/src/at90usb_usbmsc.c index d519c5d429cb57e02b1c28ee39ebb5820938c4f2..9fbc1735b98687af1e581a34d84bbc55fd3d190c 100644 --- a/configs/teensy-2.0/src/at90usb_usbmsc.c +++ b/configs/teensy-2.0/src/at90usb_usbmsc.c @@ -49,6 +49,7 @@ #include #include +#include "avr.h" #include "at90usb.h" #include "teensy-20.h" @@ -62,17 +63,10 @@ # define CONFIG_SYSTEM_USBMSC_DEVMINOR1 0 #endif -/* PORT and SLOT number probably depend on the board configuration */ +/* MMC/SD PORT and SLOT number */ -#ifdef CONFIG_ARCH_BOARD_TEENSY_20 -# undef AVR_MMCSDSPIPORTNO -# define AVR_MMCSDSPIPORTNO 0 -# undef AVR_MMCSDSLOTNO -# define AVR_MMCSDSLOTNO 0 -#else - /* Add configuration for new AVR boards here */ -# error "Unrecognized AVR board" -#endif +#define AVR_MMCSDSPIPORTNO 0 +#define AVR_MMCSDSLOTNO 0 /**************************************************************************** * Public Functions diff --git a/configs/teensy-2.0/src/teensy-20.h b/configs/teensy-2.0/src/teensy-20.h index ad1f2530bb68859112b2f6f675fc66e79ba89325..16dbb086b134398fdcdb1a39cfba483d922cb4dc 100644 --- a/configs/teensy-2.0/src/teensy-20.h +++ b/configs/teensy-2.0/src/teensy-20.h @@ -43,24 +43,11 @@ #include /**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Configuration ************************************************************/ - -/**************************************************************************** - * Public Types + * Public Function Prototypes ****************************************************************************/ #ifndef __ASSEMBLY__ -/**************************************************************************** - * Inline Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - #ifdef __cplusplus #define EXTERN extern "C" extern "C" diff --git a/configs/teensy-2.0/usbmsc/defconfig b/configs/teensy-2.0/usbmsc/defconfig index b185f2467c6f311dcaf23dc88ecac80a30ddb83c..5facac91d5cf7fa21757f3c57f75c0e1a5a4e252 100644 --- a/configs/teensy-2.0/usbmsc/defconfig +++ b/configs/teensy-2.0/usbmsc/defconfig @@ -45,7 +45,7 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set @@ -432,7 +432,7 @@ CONFIG_USBMSC_SCSI_STACKSIZE=512 # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -471,7 +471,6 @@ CONFIG_FS_WRITABLE=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/teensy-3.x/include/board.h b/configs/teensy-3.x/include/board.h index 5fc8db18e7e0e70ea43acd333b488b6f312b28ad..e7342683519532a9aa0f92fce702bbfe1e15010c 100644 --- a/configs/teensy-3.x/include/board.h +++ b/configs/teensy-3.x/include/board.h @@ -2,7 +2,7 @@ * configs/teensy-3.x/include/board.h * include/arch/board/board.h * - * 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,6 +56,15 @@ /* The teensy-3.1 has a 16MHz crystal on board */ #undef BOARD_EXTCLOCK /* Crystal */ +#define BOARD_EXTAL_LP /* Low Power, as opposed to Hi Gain */ + +/* BOARD_FR_DIV is MCG_C1_FRDIV_DIV512 from kinetis_mcg.h. According to the k20 + * reference manual, when transitioning MCG clock modes to FLL Bypassed External + * the C1 divider must be set so that the FLL clock is between 31.25 and 39.0625 khz. + * For teensy-3.x that works out to a divider of 512. + */ + +#define BOARD_FR_DIV (4 << 3) #define BOARD_EXTAL_FREQ 16000000 /* 16MHz crystal frequency (REFCLK) */ #define BOARD_XTAL32_FREQ 32768 /* 32KHz RTC Oscillator (not populated) */ @@ -132,6 +141,28 @@ #define BOARD_FLEXBUS_FREQ (BOARD_MCG_FREQ / BOARD_OUTDIV3) #define BOARD_FLASHCLK_FREQ (BOARD_MCG_FREQ / BOARD_OUTDIV4) +/* PWM Configuration */ +/* FTM0 Channels */ + +#define GPIO_FTM0_CH0OUT PIN_FTM0_CH0_2 /* Pin 22: PTC1 */ +#define GPIO_FTM0_CH1OUT PIN_FTM0_CH1_2 /* Pin 23: PTC2 */ +#define GPIO_FTM0_CH2OUT PIN_FTM0_CH2_2 /* Pin 9: PTC3 */ +#define GPIO_FTM0_CH3OUT PIN_FTM0_CH3 /* Pin 10: PTC4 */ +#define GPIO_FTM0_CH4OUT PIN_FTM0_CH4 /* Pin 6: PTD4 */ +#define GPIO_FTM0_CH5OUT PIN_FTM0_CH5_2 /* Pin 20: PTD5 */ +#define GPIO_FTM0_CH6OUT PIN_FTM0_CH6_2 /* Pin 21: PTD6 */ +#define GPIO_FTM0_CH7OUT PIN_FTM0_CH7_2 /* Pin 5: PTD7 */ + +/* FTM1 Channels */ + +#define GPIO_FTM1_CH0OUT PIN_FTM1_CH0_1 /* Pin 3: PTA12 */ +#define GPIO_FTM1_CH1OUT PIN_FTM1_CH1_1 /* Pin 4: PTA13 */ + +/* FTM2 Channels */ + +#define GPIO_FTM2_CH0OUT PIN_FTM2_CH0 /* Pin 25: PTB18 */ +#define GPIO_FTM2_CH1OUT PIN_FTM2_CH1 /* Pin 32: PTB19 */ + /* LED definitions ******************************************************************/ /* A single LED is available driven by PTC5. The LED is grounded so bringing PTC5 * high will illuminate the LED. diff --git a/configs/teensy-3.x/nsh/defconfig b/configs/teensy-3.x/nsh/defconfig index 2b5dfa6aecb52c145a25ada30042d29a133a51ae..cc089e31f510c44619363c7f9ef6bfff3b07c791 100644 --- a/configs/teensy-3.x/nsh/defconfig +++ b/configs/teensy-3.x/nsh/defconfig @@ -41,14 +41,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -79,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=y # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -96,7 +99,11 @@ CONFIG_ARCH_CHIP_KINETIS=y # 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 @@ -106,12 +113,23 @@ 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="kinetis" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI 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 # @@ -121,6 +139,7 @@ CONFIG_ARCH_HAVE_FPU=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 @@ -152,6 +171,7 @@ CONFIG_ARCH_CHIP_MK20DX256VLH7=y # CONFIG_ARCH_CHIP_MK40X256VMD100 is not set # CONFIG_ARCH_CHIP_MK60N256VLQ100 is not set # CONFIG_ARCH_CHIP_MK60N256VMD100 is not set +# CONFIG_ARCH_CHIP_MK60N512VLL100 is not set # CONFIG_ARCH_CHIP_MK60N512VLQ100 is not set # CONFIG_ARCH_CHIP_MK60N512VMD100 is not set # CONFIG_ARCH_CHIP_MK60X256VLQ100 is not set @@ -224,11 +244,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -322,6 +345,7 @@ 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 @@ -372,9 +396,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -405,14 +430,20 @@ CONFIG_DEV_NULL=y # 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=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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -426,8 +457,23 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -437,6 +483,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -460,14 +508,11 @@ CONFIG_UART0_SERIALDRIVER=y # 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 is not set CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -484,19 +529,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -528,17 +577,12 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -557,6 +601,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -600,10 +648,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -622,11 +674,14 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -634,11 +689,11 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -646,33 +701,44 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD 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_SMART_TEST 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -684,30 +750,28 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -727,6 +791,7 @@ 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 @@ -735,6 +800,7 @@ 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 @@ -743,8 +809,10 @@ CONFIG_NSH_DISABLE_DATE=y # 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 @@ -762,8 +830,10 @@ CONFIG_NSH_DISABLE_DATE=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 # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set @@ -790,6 +860,8 @@ CONFIG_NSH_FILEIOSIZE=512 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 @@ -803,16 +875,19 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y -# CONFIG_SYSTEM_POWEROFF is not set +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/teensy-3.x/src/Makefile b/configs/teensy-3.x/src/Makefile index ad839632dda729d1d17d702388c6d66d1329004a..3483e6deb2ac48b427c53d3595504bce3aa213e1 100644 --- a/configs/teensy-3.x/src/Makefile +++ b/configs/teensy-3.x/src/Makefile @@ -1,7 +1,7 @@ ############################################################################ # configs/teensy-3.x/src/Makefile # -# 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,9 +43,16 @@ CSRCS += k20_autoleds.c else CSRCS += k20_userleds.c endif +ifeq ($(CONFIG_KINETIS_USBOTG),y) +CSRCS += k20_usbdev.c +endif ifeq ($(CONFIG_LIB_BOARDCTL),y) CSRCS += k20_appinit.c endif +ifeq ($(CONFIG_PWM),y) +CSRCS += k20_pwm.c +endif + include $(TOPDIR)/configs/Board.mk diff --git a/configs/teensy-3.x/src/k20_appinit.c b/configs/teensy-3.x/src/k20_appinit.c index fd1b2bd5c86228206f3a56e3e49d9d9079179c0c..f027eb71673d9928b169676e416c7c4370ab301f 100644 --- a/configs/teensy-3.x/src/k20_appinit.c +++ b/configs/teensy-3.x/src/k20_appinit.c @@ -38,9 +38,10 @@ ****************************************************************************/ #include - +#include #include +#include "kinetis_usbotg.h" #include "teensy-3x.h" /**************************************************************************** @@ -74,5 +75,13 @@ int board_app_initialize(uintptr_t arg) { +#ifdef CONFIG_USBDEV + /* Teensy is powered from usb and (bug?) only boots from being programmed, + * so if usb is compiled in signal the controller driver that we're attached now. + */ + + khci_usbattach(); +#endif + return OK; } diff --git a/configs/teensy-3.x/src/k20_pwm.c b/configs/teensy-3.x/src/k20_pwm.c new file mode 100644 index 0000000000000000000000000000000000000000..97658c9e2b16ef5f8c7b464d4eaeaf2df7b0fa2a --- /dev/null +++ b/configs/teensy-3.x/src/k20_pwm.c @@ -0,0 +1,163 @@ +/************************************************************************************ + * configs/teensy-3.x/src/k20_pwm.c + * + * Copyright (C) 2015, 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * Alan Carvalho de Assis + * + * 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 "chip.h" +#include "up_arch.h" +#include "kinetis_pwm.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ +/* Configuration *******************************************************************/ +/* PWM + * + * The Kinetis Freedom board provides a LED on GPIO. + */ + +#ifdef CONFIG_PWM + +extern struct pwm_lowerhalf_s *kinetis_pwminitialize(int timer); + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: board_pwm_setup + * + * Description: + * All Kinetis K20 architectures must provide the following interface to work with + * examples/pwm. + * + ************************************************************************************/ + +int board_pwm_setup(void) +{ + static bool initialized = false; + struct pwm_lowerhalf_s *pwm; + int ret; + + /* Have we already initialized? */ + + if (!initialized) + { +#ifdef CONFIG_KINETIS_FTM0_PWM + /* Call kinetis_pwminitialize() to get an instance of the PWM interface */ + + pwm = kinetis_pwminitialize(0); + if (!pwm) + { + aerr("ERROR: Failed to get the KL20 PWM lower half\n"); + return -ENODEV; + } + + /* Register the PWM driver at "/dev/pwm0" */ + + ret = pwm_register("/dev/pwm0", pwm); + if (ret < 0) + { + aerr("ERROR: pwm_register failed: %d\n", ret); + return ret; + } + + /* Now we are initialized */ +#endif + +#ifdef CONFIG_KINETIS_FTM1_PWM + pwm = kinetis_pwminitialize(1); + if (!pwm) + { + aerr("ERROR: Failed to get the KL20 PWM lower half\n"); + return -ENODEV; + } + + /* Register the PWM driver at "/dev/pwm1" */ + + ret = pwm_register("/dev/pwm1", pwm); + if (ret < 0) + { + aerr("ERROR: pwm_register failed: %d\n", ret); + return ret; + } + + /* Now we are initialized */ +#endif + +#ifdef CONFIG_KINETIS_FTM2_PWM + pwm = kinetis_pwminitialize(2); + if (!pwm) + { + aerr("ERROR: Failed to get the KL20 PWM lower half\n"); + return -ENODEV; + } + + /* Register the PWM driver at "/dev/pwm2" */ + + ret = pwm_register("/dev/pwm2", pwm); + if (ret < 0) + { + aerr("ERROR: pwm_register failed: %d\n", ret); + return ret; + } + + /* Now we are initialized */ +#endif + initialized = true; + } + + return OK; +} + +#endif /* CONFIG_PWM */ diff --git a/configs/teensy-3.x/src/k20_spi.c b/configs/teensy-3.x/src/k20_spi.c index edd63b41354632c0bd3b41709dfa4e6996839c4f..50ffef7ff355134197b1d0561333841617b4316e 100644 --- a/configs/teensy-3.x/src/k20_spi.c +++ b/configs/teensy-3.x/src/k20_spi.c @@ -53,29 +53,6 @@ #if defined(CONFIG_KINETIS_SPI1) || defined(CONFIG_KINETIS_SPI2) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef CONFIG_DEBUG_SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -121,7 +98,7 @@ void weak_function kinetis_spidev_initialize(void) #ifdef CONFIG_KINETIS_SPI1 void kinetis_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); # warning "Missing logic" } @@ -135,7 +112,7 @@ uint8_t kinetis_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_KINETIS_SPI2 void kinetis_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); # warning "Missing logic" } @@ -149,7 +126,7 @@ uint8_t kinetis_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_KINETIS_SPI3 void kinetis_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); # warning "Missing logic" } diff --git a/configs/teensy-3.x/src/k20_usbdev.c b/configs/teensy-3.x/src/k20_usbdev.c new file mode 100644 index 0000000000000000000000000000000000000000..5b59337889689a705a9878be4bec8d3ed8646ea9 --- /dev/null +++ b/configs/teensy-3.x/src/k20_usbdev.c @@ -0,0 +1,141 @@ +/************************************************************************************ + * configs/teensy-3.x/src/k20_usbdev.c + * + * Copyright (C) 2011, 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 "up_arch.h" +#include "kinetis.h" +#include "kinetis_usbotg.h" +#include "kinetis_sim.h" +#include "teensy-3x.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +#define khci_getreg(addr) getreg8(addr) +#define khci_putreg(val,addr) putreg8(val,addr) +#define SIM_CLKDIV2_USBDIV(n) (uint32_t)(((n) & 0x07) << 1) + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: kinetis_usbinitialize + * + * Description: + * Called to setup USB-related GPIO pins for the KwikStik-K40 board. + * + ************************************************************************************/ + +void kinetis_usbinitialize(void) +{ +} + +/************************************************************************************ + * Name: kinetis_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 kinetis_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 kinetis_usbpullup(FAR struct usbdev_s *dev, bool enable) +{ + usbtrace(TRACE_DEVPULLUP, (uint16_t)enable); +#if 0 + uint32_t regval; +#endif + + if (enable) + { + khci_putreg(USB_CONTROL_DPPULLUPNONOTG, KINETIS_USB0_CONTROL); + } + else + { + khci_putreg(0,KINETIS_USB0_CONTROL); + } + +#if 0 + regval = khci_getreg(KINETIS_USB0_OTGCTL); + + if (enable) + { + regval |= (1 << 2); + } + else + { + regval &= ~(1 << 2); + } + + khci_putreg(regval,KINETIS_USB0_OTGCTL); +#endif + + return OK; +} + +/************************************************************************************ + * Name: kinetis_usbsuspend + * + * Description: + * Board logic must provide the kinetis_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 kinetis_usbsuspend(FAR struct usbdev_s *dev, bool resume) +{ + uinfo("resume: %d\n", resume); +#warning "Missing logic" +} diff --git a/configs/teensy-3.x/usbnsh/Make.defs b/configs/teensy-3.x/usbnsh/Make.defs new file mode 100644 index 0000000000000000000000000000000000000000..e750c7b5705ca3cdac18a414d18db70c03e91bff --- /dev/null +++ b/configs/teensy-3.x/usbnsh/Make.defs @@ -0,0 +1,116 @@ +############################################################################ +# configs/teensy-3.1/nsh/Make.defs +# +# Copyright (C) 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. +# +############################################################################ + +include ${TOPDIR}/.config +include ${TOPDIR}/tools/Config.mk +include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs + +ifeq ($(CONFIG_ARCH_CHIP_MK20DX256VLH7),y) + LDSCRIPT = mk20dx256vlh7.ld +else ifeq ($(CONFIG_ARCH_CHIP_MK20DX128VLH5),y) + LDSCRIPT = mk20dx128vlh5.ld +endif + +ifeq ($(WINTOOL),y) + # Windows-native toolchains + DIRLINK = $(TOPDIR)/tools/copydir.sh + DIRUNLINK = $(TOPDIR)/tools/unlink.sh + MKDEP = $(TOPDIR)/tools/mkwindeps.sh + ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" + ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}" +else + # Linux/Cygwin-native toolchain + MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT) + ARCHINCLUDES = -I. -isystem $(TOPDIR)/include + ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) +endif + +CC = $(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/teensy-3.x/usbnsh/defconfig b/configs/teensy-3.x/usbnsh/defconfig new file mode 100644 index 0000000000000000000000000000000000000000..41fb535e7a4c2cfd5b8621db9c946b63b7f833ab --- /dev/null +++ b/configs/teensy-3.x/usbnsh/defconfig @@ -0,0 +1,969 @@ +# +# Automatically generated file; DO NOT EDIT. +# Nuttx/ Configuration +# + +# +# Build Setup +# +CONFIG_EXPERIMENTAL=y +# 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_ALERT=y +# CONFIG_DEBUG_FEATURES is not set +CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK 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=y +# 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=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="kinetis" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +CONFIG_ARM_TOOLCHAIN_GNU=y +# CONFIG_ARMV7M_USEBASEPRI 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 is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set + +# +# Kinetis Configuration Options +# +# CONFIG_ARCH_CHIP_MK20DN32VLH5 is not set +# CONFIG_ARCH_CHIP_MK20DX32VLH5 is not set +# CONFIG_ARCH_CHIP_MK20DN64VLH5 is not set +# CONFIG_ARCH_CHIP_MK20DX64VLH5 is not set +# CONFIG_ARCH_CHIP_MK20DN128VLH5 is not set +# CONFIG_ARCH_CHIP_MK20DX128VLH5 is not set +# CONFIG_ARCH_CHIP_MK20DX64VLH7 is not set +# CONFIG_ARCH_CHIP_MK20DX128VLH7 is not set +CONFIG_ARCH_CHIP_MK20DX256VLH7=y +# CONFIG_ARCH_CHIP_MK40N512VLQ100 is not set +# CONFIG_ARCH_CHIP_MK40N512VMD100 is not set +# CONFIG_ARCH_CHIP_MK40X128VLQ100 is not set +# CONFIG_ARCH_CHIP_MK40X128VMD100 is not set +# CONFIG_ARCH_CHIP_MK40X256VLQ100 is not set +# CONFIG_ARCH_CHIP_MK40X256VMD100 is not set +# CONFIG_ARCH_CHIP_MK60N256VLQ100 is not set +# CONFIG_ARCH_CHIP_MK60N256VMD100 is not set +# CONFIG_ARCH_CHIP_MK60N512VLL100 is not set +# CONFIG_ARCH_CHIP_MK60N512VLQ100 is not set +# CONFIG_ARCH_CHIP_MK60N512VMD100 is not set +# CONFIG_ARCH_CHIP_MK60X256VLQ100 is not set +# CONFIG_ARCH_CHIP_MK60X256VMD100 is not set +CONFIG_ARCH_FAMILY_K20=y +# CONFIG_ARCH_FAMILY_K40 is not set +# CONFIG_ARCH_FAMILY_K60 is not set + +# +# Kinetis Peripheral Support +# +# CONFIG_KINETIS_TRACE is not set +# CONFIG_KINETIS_FLEXBUS is not set +CONFIG_KINETIS_UART0=y +# CONFIG_KINETIS_UART1 is not set +# CONFIG_KINETIS_UART2 is not set +# CONFIG_KINETIS_UART3 is not set +# CONFIG_KINETIS_UART4 is not set +# CONFIG_KINETIS_UART5 is not set +# CONFIG_KINETIS_FLEXCAN0 is not set +# CONFIG_KINETIS_FLEXCAN1 is not set +# CONFIG_KINETIS_SPI0 is not set +# CONFIG_KINETIS_SPI1 is not set +# CONFIG_KINETIS_SPI2 is not set +# CONFIG_KINETIS_I2C0 is not set +# CONFIG_KINETIS_I2C1 is not set +# CONFIG_KINETIS_I2S is not set +# CONFIG_KINETIS_DAC0 is not set +# CONFIG_KINETIS_DAC1 is not set +# CONFIG_KINETIS_ADC0 is not set +# CONFIG_KINETIS_ADC1 is not set +# CONFIG_KINETIS_CMP is not set +# CONFIG_KINETIS_VREF is not set +# CONFIG_KINETIS_SDHC is not set +# CONFIG_KINETIS_FTM0 is not set +# CONFIG_KINETIS_FTM1 is not set +# CONFIG_KINETIS_FTM2 is not set +# CONFIG_KINETIS_LPTIMER is not set +# CONFIG_KINETIS_RTC is not set +# CONFIG_KINETIS_EWM is not set +# CONFIG_KINETIS_CMT is not set +CONFIG_KINETIS_USBOTG=y +# CONFIG_KINETIS_USBDCD is not set +# CONFIG_KINETIS_LLWU is not set +# CONFIG_KINETIS_TSI is not set +# CONFIG_KINETIS_FTFL is not set +# CONFIG_KINETIS_DMA is not set +# CONFIG_KINETIS_CRC is not set +# CONFIG_KINETIS_PDB is not set +# CONFIG_KINETIS_PIT is not set + +# +# Kinetis GPIO Interrupt Configuration +# +# CONFIG_GPIO_IRQ is not set + +# +# Kinetis UART Configuration +# +CONFIG_KINETIS_UARTFIFOS=y + +# +# 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=y +CONFIG_ARCH_RAMFUNCS=y +CONFIG_ARCH_HAVE_RAMVECTORS=y +# CONFIG_ARCH_RAMVECTORS is not set + +# +# Board Settings +# +CONFIG_BOARD_LOOPSPERMSEC=6024 +# 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=0x1fff8000 +CONFIG_RAM_SIZE=65536 +# CONFIG_ARCH_HAVE_SDRAM is not set + +# +# Board Selection +# +CONFIG_ARCH_BOARD_TEENSY_3X=y +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="teensy-3.x" + +# +# Common Board Options +# +CONFIG_ARCH_HAVE_LEDS=y +CONFIG_ARCH_LEDS=y +CONFIG_NSH_MMCSDMINOR=0 + +# +# Board-Specific Options +# +# CONFIG_TEENSY_3X_OVERCLOCK 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 +# +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=16 +CONFIG_WDOG_INTRESERVE=4 +CONFIG_PREALLOC_TIMERS=4 + +# +# Tasks and Scheduling +# +# CONFIG_SPINLOCK is not set +# 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 is not set +# 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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL 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 + +# +# LCD Driver Support +# +# CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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_SERIAL_REMOVABLE=y +CONFIG_SERIAL_CONSOLE=y +# CONFIG_16550_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 +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 is not set +CONFIG_UART0_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set +# CONFIG_NO_SERIAL_CONSOLE is not set + +# +# UART0 Configuration +# +CONFIG_UART0_RXBUFSIZE=256 +CONFIG_UART0_TXBUFSIZE=256 +CONFIG_UART0_BAUD=115200 +CONFIG_UART0_BITS=8 +CONFIG_UART0_PARITY=0 +CONFIG_UART0_2STOP=0 +# CONFIG_UART0_IFLOWCONTROL is not set +# CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_DMA is not set +CONFIG_USBDEV=y + +# +# USB Device Controller Driver Options +# +# CONFIG_USBDEV_ISOCHRONOUS is not set +CONFIG_USBDEV_DUALSPEED=y +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=128 +CONFIG_USBDEV_TRACE_INITIALIDSET=y + +# +# USB Device Class Driver Options +# +# CONFIG_USBDEV_COMPOSITE is not set +# CONFIG_PL2303 is not set +CONFIG_CDCACM=y +# CONFIG_CDCACM_CONSOLE is not set +# CONFIG_CDCACM_IFLOWCONTROL is not set +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=768 +CONFIG_CDCACM_RXBUFSIZE=513 +CONFIG_CDCACM_TXBUFSIZE=769 +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 +# +# CONFIG_ARCH_SYSLOG is not set +# CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE 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 + +# +# 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 +# +# 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 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_CRC64_FAST is not set +# 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_HIDKBD is not set +# CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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_NXFFS is not set +# CONFIG_EXAMPLES_NXHELLO is not set +# CONFIG_EXAMPLES_NXIMAGE is not set +# CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_POSIXSPAWN is not set +# CONFIG_EXAMPLES_PPPD 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 is not set +# CONFIG_EXAMPLES_SMART_TEST 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_USBSERIAL is not set +# CONFIG_EXAMPLES_USBTERM is not set +# CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER 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_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE 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_USBCONSOLE=y +CONFIG_NSH_USBCONDEV="/dev/ttyACM0" +CONFIG_USBDEV_MINOR=0 + +# +# USB Device Trace Support +# +# CONFIG_NSH_USBDEV_TRACE 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_CDCACM=y +CONFIG_SYSTEM_CDCACM_DEVMINOR=0 +# CONFIG_SYSTEM_CDCACM_TRACEINIT is not set +# CONFIG_SYSTEM_CDCACM_TRACECLASS is not set +# CONFIG_SYSTEM_CDCACM_TRACETRANSFERS is not set +# CONFIG_SYSTEM_CDCACM_TRACECONTROLLER is not set +# CONFIG_SYSTEM_CDCACM_TRACEINTERRUPTS is not set +# CONFIG_SYSTEM_CLE is not set +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_HEX2BIN is not set +CONFIG_SYSTEM_HEXED=y +CONFIG_SYSTEM_HEXED_STACKSIZE=2048 +CONFIG_SYSTEM_HEXED_PRIORITY=100 +# CONFIG_SYSTEM_INSTALL is not set +CONFIG_SYSTEM_RAMTEST=y +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_UBLOXMODEM is not set +CONFIG_SYSTEM_USBMONITOR=y +CONFIG_SYSTEM_USBMONITOR_STACKSIZE=2048 +CONFIG_SYSTEM_USBMONITOR_PRIORITY=50 +CONFIG_SYSTEM_USBMONITOR_INTERVAL=2 +CONFIG_SYSTEM_USBMONITOR_TRACEINIT=y +CONFIG_SYSTEM_USBMONITOR_TRACECLASS=y +CONFIG_SYSTEM_USBMONITOR_TRACETRANSFERS=y +CONFIG_SYSTEM_USBMONITOR_TRACECONTROLLER=y +CONFIG_SYSTEM_USBMONITOR_TRACEINTERRUPTS=y +# CONFIG_SYSTEM_VI is not set +# CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/teensy-3.x/usbnsh/setenv.sh b/configs/teensy-3.x/usbnsh/setenv.sh new file mode 100755 index 0000000000000000000000000000000000000000..dedab5191ede28ee9f2a30f8e9fdc992b7a0d4f7 --- /dev/null +++ b/configs/teensy-3.x/usbnsh/setenv.sh @@ -0,0 +1,76 @@ +#!/bin/bash +# configs/teensy-3.1/nsh/setenv.sh +# +# Copyright (C) 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. +# + +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 RIDE +# toolchain under windows. You will also have to edit this if you install +# the RIDE toolchain in any other location +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Raisonance/Ride/arm-gcc/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/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 variable +export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" + +echo "PATH : ${PATH}" diff --git a/configs/teensy-lc/nsh/defconfig b/configs/teensy-lc/nsh/defconfig index f19be2371851c26ebe7587f9c07c3682bbe74892..73ad8e56346a29ffc256f1ba05a6a0f9a696969d 100644 --- a/configs/teensy-lc/nsh/defconfig +++ b/configs/teensy-lc/nsh/defconfig @@ -16,7 +16,7 @@ CONFIG_HOST_LINUX=y # # Build Configuration # -CONFIG_APPS_DIR="../apps" +# CONFIG_APPS_DIR="../apps" CONFIG_BUILD_FLAT=y # CONFIG_BUILD_2PASS is not set @@ -37,18 +37,23 @@ CONFIG_INTELHEX_BINARY=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 # -CONFIG_DEBUG=y -# CONFIG_ARCH_HAVE_HEAPCHECK is not set -CONFIG_DEBUG_VERBOSE=y +CONFIG_DEBUG_ALERT=y +CONFIG_DEBUG_FEATURES=y + +# +# Debug SYSLOG Output Controls +# +# CONFIG_DEBUG_ERROR is not set +# CONFIG_DEBUG_ASSERTIONS is not set # # Subsystem Debug Options # -# CONFIG_DEBUG_AUDIO is not set # CONFIG_DEBUG_BINFMT is not set # CONFIG_DEBUG_FS is not set # CONFIG_DEBUG_GRAPHICS is not set @@ -65,12 +70,12 @@ CONFIG_DEBUG_VERBOSE=y # Driver Debug Options # # CONFIG_DEBUG_LEDS is not set -# CONFIG_DEBUG_ANALOG is not set # CONFIG_DEBUG_GPIO is not set # CONFIG_DEBUG_PWM is not set # CONFIG_DEBUG_SPI is not set CONFIG_ARCH_HAVE_STACKCHECK=y CONFIG_STACK_COLORATION=y +# CONFIG_ARCH_HAVE_HEAPCHECK is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -102,10 +107,12 @@ 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=y # 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 @@ -114,10 +121,15 @@ CONFIG_ARCH_CHIP_KL=y # 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 @@ -127,13 +139,24 @@ CONFIG_ARCH_CORTEXM0=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="armv6-m" CONFIG_ARCH_CHIP="kl" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set # # ARMV6M Configuration Options @@ -214,11 +237,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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=y # CONFIG_ARCH_IRQPRIO is not set CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set @@ -273,8 +299,11 @@ 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 @@ -311,6 +340,7 @@ 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=8 # CONFIG_SCHED_HAVE_PARENT is not set @@ -355,9 +385,10 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGCONDTIMEDOUT=16 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # CONFIG_SCHED_WORKQUEUE is not set # CONFIG_SCHED_HPWORK is not set @@ -388,14 +419,20 @@ CONFIG_DEV_NULL=y # 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=y # CONFIG_ARCH_HAVE_I2CRESET is not set # 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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -409,8 +446,23 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -420,6 +472,8 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -443,14 +497,11 @@ CONFIG_UART0_SERIALDRIVER=y # 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_SERIAL_TIOCSERGSTRUCT is not set # CONFIG_ARCH_HAVE_SERIAL_TERMIOS is not set CONFIG_UART0_SERIAL_CONSOLE=y @@ -468,19 +519,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -509,12 +564,7 @@ CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y # CONFIG_FS_RAMMAP is not set # CONFIG_FS_BINFS is not set # CONFIG_FS_PROCFS is not set - -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -534,6 +584,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -574,10 +628,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -603,11 +661,14 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # 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 # CONFIG_EXAMPLES_CXXTEST is not set @@ -617,10 +678,11 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -629,36 +691,46 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_NSH_CXXINITIALIZE is not set # 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PWM is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_PWM 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 # 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_SMART_TEST 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 # 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -670,32 +742,28 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_PPPD is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -714,6 +782,7 @@ CONFIG_NSH_BUILTIN_APPS=y # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +CONFIG_NSH_DISABLE_BASENAME=y # CONFIG_NSH_DISABLE_CAT is not set CONFIG_NSH_DISABLE_CD=y CONFIG_NSH_DISABLE_CP=y @@ -722,6 +791,7 @@ CONFIG_NSH_DISABLE_DATE=y CONFIG_NSH_DISABLE_DD=y CONFIG_NSH_DISABLE_DF=y # CONFIG_NSH_DISABLE_DELROUTE is not set +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 @@ -730,8 +800,10 @@ CONFIG_NSH_DISABLE_GET=y # 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=y @@ -749,8 +821,10 @@ CONFIG_NSH_DISABLE_RMDIR=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=y # CONFIG_NSH_DISABLE_TEST is not set CONFIG_NSH_DISABLE_UMOUNT=y +CONFIG_NSH_DISABLE_UNAME=y # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set CONFIG_NSH_DISABLE_WGET=y @@ -774,6 +848,8 @@ CONFIG_NSH_DISABLESCRIPT=y 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 @@ -787,20 +863,23 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y -# CONFIG_SYSTEM_POWEROFF is not set -# CONFIG_SYSTEM_SUDOKU is not set -# CONFIG_SYSTEM_VI is not set +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set CONFIG_SYSTEM_STACKMONITOR=y CONFIG_SYSTEM_STACKMONITOR_STACKSIZE=2048 CONFIG_SYSTEM_STACKMONITOR_PRIORITY=50 CONFIG_SYSTEM_STACKMONITOR_INTERVAL=2 +# CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/teensy-lc/src/kl_led.c b/configs/teensy-lc/src/kl_led.c index fbc967208de0a2df1f8aeaa6019da7b67b556338..e4e4cac6211607637ea0db214dc37740ff6c5c0b 100644 --- a/configs/teensy-lc/src/kl_led.c +++ b/configs/teensy-lc/src/kl_led.c @@ -52,34 +52,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# define leddbg(x...) -# define ledvdbg(x...) -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/teensy-lc/src/kl_pwm.c b/configs/teensy-lc/src/kl_pwm.c index 94c84397bea37db296afb5a161f3f50fae990774..91623d9e98bba4c9c3d7b0dcaffd7e36ee0d909a 100644 --- a/configs/teensy-lc/src/kl_pwm.c +++ b/configs/teensy-lc/src/kl_pwm.c @@ -98,7 +98,7 @@ int board_pwm_setup(void) pwm = kl_pwminitialize(0); if (!pwm) { - adbg("Failed to get the KL25 PWM lower half\n"); + aerr("ERROR: Failed to get the KL25 PWM lower half\n"); return -ENODEV; } @@ -107,7 +107,7 @@ int board_pwm_setup(void) ret = pwm_register("/dev/pwm0", pwm); if (ret < 0) { - adbg("pwm_register failed: %d\n", ret); + aerr("ERROR: pwm_register failed: %d\n", ret); return ret; } diff --git a/configs/teensy-lc/src/kl_spi.c b/configs/teensy-lc/src/kl_spi.c index 4227fea056a948691fd26ff4c4e1746bc1c4ad9f..b4d36cb75525d82e34f9473e85705eadf8818aa3 100644 --- a/configs/teensy-lc/src/kl_spi.c +++ b/configs/teensy-lc/src/kl_spi.c @@ -51,28 +51,6 @@ #if defined(CONFIG_KL_SPI0) || defined(CONFIG_KL_SPI1) -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -155,7 +133,7 @@ void weak_function kl_spidev_initialize(void) void kl_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spivdbg("devid: %d CS: %s\n", + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } #endif @@ -164,7 +142,7 @@ void kl_spi0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, void kl_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spivdbg("devid: %d CS: %s\n", + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } #endif diff --git a/configs/tm4c123g-launchpad/nsh/defconfig b/configs/tm4c123g-launchpad/nsh/defconfig index 454af5b842f12eb35656f3b7b148a95d0a3707ba..0a6233316e2836513363d31f7bfc0b51e1e5a3e2 100644 --- a/configs/tm4c123g-launchpad/nsh/defconfig +++ b/configs/tm4c123g-launchpad/nsh/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,10 +77,12 @@ 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 CONFIG_ARCH_CHIP_TIVA=y +# 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 @@ -87,10 +91,15 @@ CONFIG_ARCH_CHIP_TIVA=y # 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 @@ -100,8 +109,17 @@ 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="tiva" +# 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 @@ -109,6 +127,8 @@ 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 # @@ -118,11 +138,13 @@ CONFIG_ARCH_HAVE_FPU=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 # CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL is not set CONFIG_ARMV7M_OABI_TOOLCHAIN=y +# CONFIG_ARMV7M_HAVE_STACKCHECK is not set # CONFIG_ARMV7M_ITMSYSLOG is not set # @@ -197,7 +219,6 @@ CONFIG_TIVA_SSI0=y # CONFIG_TIVA_TIMER3 is not set # CONFIG_TIVA_TIMER4 is not set # CONFIG_TIVA_TIMER5 is not set -# CONFIG_TIVA_ETHERNET is not set # CONFIG_TIVA_FLASH is not set # @@ -247,11 +268,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -311,6 +335,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_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 @@ -345,6 +377,7 @@ 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 @@ -395,9 +428,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -428,11 +462,16 @@ CONFIG_DEV_NULL=y # 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 @@ -441,8 +480,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -452,6 +506,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -475,14 +531,11 @@ CONFIG_UART0_SERIALDRIVER=y # 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 is not set CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -499,19 +552,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -543,15 +600,11 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 - -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -571,6 +624,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -610,13 +667,18 @@ CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 # 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_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -635,11 +697,14 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -647,11 +712,11 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -659,35 +724,45 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 # 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_SMART_TEST 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 # 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -699,35 +774,28 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_NETLIB is not set -# CONFIG_NETUTILS_WEBCLIENT is not set -# CONFIG_NETUTILS_PPPD is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -747,13 +815,16 @@ 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 @@ -762,8 +833,10 @@ CONFIG_NSH_BUILTIN_APPS=y # 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 @@ -781,8 +854,10 @@ CONFIG_NSH_BUILTIN_APPS=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 # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set @@ -809,7 +884,8 @@ CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_CONSOLE=y # CONFIG_NSH_ALTCONDEV is not set CONFIG_NSH_ARCHINIT=y -CONFIG_LIB_BOARDCTL=y +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # # NxWidgets/NxWM @@ -823,120 +899,19 @@ CONFIG_LIB_BOARDCTL=y # # System Libraries and NSH Add-Ons # - -# -# Custom Free Memory Command -# -# CONFIG_SYSTEM_FREE is not set - -# -# EMACS-like Command Line Editor -# # CONFIG_SYSTEM_CLE is not set - -# -# CU Minimal Terminal -# # CONFIG_SYSTEM_CUTERM is not set - -# -# FLASH Program Installation -# -# CONFIG_SYSTEM_INSTALL is not set - -# -# FLASH Erase-all Command -# - -# -# Intel HEX to binary conversion -# +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set - -# -# I2C tool -# - -# -# INI File Parser -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# NxPlayer media player library / command Line -# - -# -# RAM test -# +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set - -# -# readline() -# +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y - -# -# P-Code Support -# - -# -# PHY Tool -# - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sudoku -# +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set - -# -# Sysinfo -# - -# -# Temperature -# - -# -# VI Work-Alike Editor -# +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set - -# -# Stack Monitor -# - -# -# USB CDC/ACM Device Commands -# - -# -# USB Composite Device Commands -# - -# -# USB Mass Storage Device Commands -# - -# -# USB Monitor -# - -# -# Zmodem Commands -# # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/tm4c123g-launchpad/src/tm4c_autoleds.c b/configs/tm4c123g-launchpad/src/tm4c_autoleds.c index 01c6c9a71a11b69a4e256ab884c8c7fb2665f89f..c07c1b9dc81ef7c5fe9fdf8e5dfd5aa5c10bf1a7 100644 --- a/configs/tm4c123g-launchpad/src/tm4c_autoleds.c +++ b/configs/tm4c123g-launchpad/src/tm4c_autoleds.c @@ -97,34 +97,14 @@ * LED_PANIC 4 ON OFF OFF (flashing 2Hz) */ -/* 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 - /* Dump GPIO registers */ -#ifdef CONFIG_DEBUG_LEDS +#ifdef CONFIG_DEBUG_LEDS_INFO # define led_dumpgpio(m) tiva_dumpgpio(LED_GPIO, m) #else # define led_dumpgpio(m) #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -140,7 +120,7 @@ #ifdef CONFIG_ARCH_LEDS void tm4c_led_initialize(void) { - leddbg("Initializing\n"); + ledinfo("Initializing\n"); /* Configure Port E, Bit 1 as an output, initial value=OFF */ diff --git a/configs/tm4c123g-launchpad/src/tm4c_ssi.c b/configs/tm4c123g-launchpad/src/tm4c_ssi.c index e1127a01f5ad318a5cc25b2e2f507fd13f59ef6e..7b295f76aa842ca48d2ce65f893d09b8bf449f0b 100644 --- a/configs/tm4c123g-launchpad/src/tm4c_ssi.c +++ b/configs/tm4c123g-launchpad/src/tm4c_ssi.c @@ -59,28 +59,12 @@ * Pre-processor Definitions ************************************************************************************/ -/* CONFIG_DEBUG_SPI enables debug output from this file (needs CONFIG_DEBUG too) */ - -#ifdef CONFIG_DEBUG_SPI -# define ssidbg lldbg -#else -# define ssidbg(x...) -#endif - -/* Dump GPIO registers */ - -#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_VERBOSE) -# define ssivdbg lldbg +#ifdef CONFIG_DEBUG_SPI_INFO) # define ssi_dumpgpio(m) tiva_dumpgpio(SDCCS_GPIO, m) #else -# define ssivdbg(x...) # define ssi_dumpgpio(m) #endif -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -118,14 +102,14 @@ void weak_function tm4c_ssidev_initialize(void) void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - ssidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); ssi_dumpgpio("tiva_ssiselect() Entry"); ssi_dumpgpio("tiva_ssiselect() Exit"); } uint8_t tiva_ssistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - ssidbg("Returning SPI_STATUS_PRESENT\n"); + spiinfo("Returning SPI_STATUS_PRESENT\n"); return SPI_STATUS_PRESENT; } diff --git a/configs/tm4c1294-launchpad/ipv6/defconfig b/configs/tm4c1294-launchpad/ipv6/defconfig index d7d7d7641294775bdb7ff9e483690648bdd7b815..47b86bf68c031c13f09cd0a0038efb3c8cbcf6dc 100644 --- a/configs/tm4c1294-launchpad/ipv6/defconfig +++ b/configs/tm4c1294-launchpad/ipv6/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,10 +77,12 @@ 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 CONFIG_ARCH_CHIP_TIVA=y +# 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 @@ -87,33 +91,59 @@ CONFIG_ARCH_CHIP_TIVA=y # 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=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="tiva" +# 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 is not set # CONFIG_ARMV7M_ITMSYSLOG is not set # @@ -233,7 +263,7 @@ CONFIG_TIVA_I2C_TIMEOMS=500 CONFIG_TIVA_I2C_TIMEOTICKS=500 # -# Tiva Ethernet Configuration +# Ethernet Configuration # CONFIG_TIVA_PHY_INTERNAL=y CONFIG_TIVA_AUTONEG=y @@ -254,11 +284,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -317,6 +350,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_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 @@ -351,6 +392,7 @@ 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 @@ -387,6 +429,7 @@ CONFIG_NAME_MAX=32 # 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 @@ -402,9 +445,10 @@ CONFIG_SIG_SIGWORK=17 # CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_HPWORK=y @@ -438,24 +482,46 @@ CONFIG_DEV_NULL=y # 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=y # CONFIG_I2C_SLAVE is not set # CONFIG_I2C_POLLED is not set # CONFIG_I2C_TRACE is not set +CONFIG_I2C_DRIVER=y # 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_TIMER is not set +# CONFIG_TIMERS_CS2100CP 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y @@ -463,7 +529,11 @@ CONFIG_NETDEVICES=y # # General Ethernet MAC Driver Options # +# CONFIG_NETDEV_LOOPBACK is not set +# CONFIG_NETDEV_TELNET is not set # CONFIG_NETDEV_MULTINIC is not set +# CONFIG_ARCH_HAVE_NETDEV_STATISTICS is not set +# CONFIG_NETDEV_LATEINIT is not set # # External Ethernet MAC Device Support @@ -473,6 +543,7 @@ CONFIG_NETDEVICES=y # CONFIG_ENCX24J600 is not set # CONFIG_NET_E1000 is not set # CONFIG_NET_SLIP is not set +# CONFIG_NET_FTMAC100 is not set # CONFIG_NET_VNET is not set CONFIG_ARCH_PHY_INTERRUPT=y # CONFIG_PIPES is not set @@ -482,6 +553,8 @@ CONFIG_ARCH_PHY_INTERRUPT=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -505,14 +578,11 @@ CONFIG_UART0_SERIALDRIVER=y # 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 is not set CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -529,19 +599,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -565,6 +639,8 @@ CONFIG_NET_GUARDSIZE=2 # # CONFIG_NET_MULTILINK is not set CONFIG_NET_ETHERNET=y +# CONFIG_NET_LOOPBACK is not set +# CONFIG_NET_TUN is not set # # Network Device Operations @@ -654,6 +730,7 @@ CONFIG_NET_STATISTICS=y # Routing Table Configuration # # CONFIG_NET_ROUTE is not set +CONFIG_NET_HOSTNAME="" # # Crypto API @@ -676,18 +753,13 @@ CONFIG_NET_STATISTICS=y CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_RAMMAP is not set # CONFIG_FS_FAT is not set -# CONFIG_NFS 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 - -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -707,6 +779,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -746,13 +822,19 @@ CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 # 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=y +# CONFIG_NETDB_DNSCLIENT is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -771,23 +853,28 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # 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 # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -796,37 +883,47 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 # 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_SMART_TEST 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 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set -# CONFIG_EXAMPLES_DISCOVER is not set -# CONFIG_EXAMPLES_WEBSERVER is not set +# CONFIG_EXAMPLES_UDPBLASTER is not set # CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -838,41 +935,37 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_DISCOVER 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 -# CONFIG_NETDB_DNSCLIENT is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set # CONFIG_NETUTILS_TFTPC is not set -# CONFIG_NETUTILS_THTTPD is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -892,13 +985,16 @@ 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 @@ -907,8 +1003,10 @@ CONFIG_NSH_BUILTIN_APPS=y # 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 @@ -916,6 +1014,7 @@ CONFIG_NSH_BUILTIN_APPS=y # 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 @@ -925,8 +1024,10 @@ CONFIG_NSH_BUILTIN_APPS=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 # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set @@ -953,11 +1054,11 @@ CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_CONSOLE=y # CONFIG_NSH_ALTCONDEV is not set CONFIG_NSH_ARCHINIT=y -CONFIG_LIB_BOARDCTL=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y CONFIG_NSH_NETINIT_THREAD=y CONFIG_NSH_NETINIT_MONITOR=y CONFIG_NSH_NETINIT_SIGNO=18 @@ -1006,6 +1107,8 @@ CONFIG_NSH_IPv6NETMASK_7=0xffff CONFIG_NSH_IPv6NETMASK_8=0xff80 # 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 @@ -1019,39 +1122,11 @@ CONFIG_NSH_MAX_ROUNDTRIP=20 # # System Libraries and NSH Add-Ons # - -# -# Custom Free Memory Command -# -# CONFIG_SYSTEM_FREE is not set - -# -# EMACS-like Command Line Editor -# # CONFIG_SYSTEM_CLE is not set - -# -# CU Minimal Terminal -# # CONFIG_SYSTEM_CUTERM is not set - -# -# FLASH Program Installation -# -# CONFIG_SYSTEM_INSTALL is not set - -# -# FLASH Erase-all Command -# - -# -# Intel HEX to binary conversion -# +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set - -# -# I2C tool -# +# CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=6 CONFIG_I2CTOOL_MAXBUS=6 @@ -1059,88 +1134,16 @@ CONFIG_I2CTOOL_MINADDR=0x03 CONFIG_I2CTOOL_MAXADDR=0x77 CONFIG_I2CTOOL_MAXREGADDR=0xff CONFIG_I2CTOOL_DEFFREQ=400000 - -# -# INI File Parser -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# NxPlayer media player library / command Line -# - -# -# RAM test -# +# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_MDIO is not set +# CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set - -# -# readline() -# +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y - -# -# P-Code Support -# - -# -# PHY Tool -# -# CONFIG_SYSTEM_MDIO is not set - -# -# Power Off -# -# CONFIG_SYSTEM_POWEROFF is not set - -# -# RAMTRON -# - -# -# SD Card -# - -# -# Sudoku -# +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set - -# -# Sysinfo -# - -# -# Temperature -# - -# -# VI Work-Alike Editor -# +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set - -# -# Stack Monitor -# - -# -# USB CDC/ACM Device Commands -# - -# -# USB Composite Device Commands -# - -# -# USB Mass Storage Device Commands -# - -# -# USB Monitor -# - -# -# Zmodem Commands -# # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/tm4c1294-launchpad/nsh/defconfig b/configs/tm4c1294-launchpad/nsh/defconfig index 6c504d9f42c97dd8782b7323b8839d7a4a1665b2..15a4e83331880b335bef3e6fe769c9184a8b9912 100644 --- a/configs/tm4c1294-launchpad/nsh/defconfig +++ b/configs/tm4c1294-launchpad/nsh/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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 @@ -93,7 +96,9 @@ CONFIG_ARCH_CHIP_TIVA=y # 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 @@ -104,8 +109,17 @@ 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="tiva" +# 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 @@ -113,6 +127,8 @@ 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 # @@ -122,6 +138,7 @@ CONFIG_ARCH_HAVE_FPU=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 @@ -267,6 +284,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set CONFIG_ARCH_HAVE_MPU=y @@ -411,6 +429,7 @@ CONFIG_NAME_MAX=32 # 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 @@ -426,9 +445,10 @@ CONFIG_SIG_SIGWORK=17 # CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_HPWORK=y @@ -469,6 +489,7 @@ CONFIG_I2C=y # CONFIG_I2C_SLAVE is not set # CONFIG_I2C_POLLED is not set # CONFIG_I2C_TRACE is not set +CONFIG_I2C_DRIVER=y # CONFIG_SPI is not set # CONFIG_I2S is not set @@ -484,8 +505,23 @@ CONFIG_I2C=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y @@ -519,6 +555,8 @@ CONFIG_ARCH_PHY_INTERRUPT=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -542,10 +580,6 @@ CONFIG_UART0_SERIALDRIVER=y # 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 @@ -572,15 +606,18 @@ CONFIG_UART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -730,12 +767,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -754,6 +785,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -797,6 +832,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 @@ -809,6 +846,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -834,17 +872,19 @@ 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 +# CONFIG_EXAMPLES_DISCOVER 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -854,40 +894,47 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD 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_SMART_TEST 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_UDP is not set # 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_WEBSERVER is not set # # File System Utilities # +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -899,8 +946,8 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -913,25 +960,27 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -951,6 +1000,7 @@ CONFIG_NSH_BUILTIN_APPS=y # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_ARP is not set # CONFIG_NSH_DISABLE_BASENAME is not set # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set @@ -992,6 +1042,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 @@ -1024,6 +1075,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y CONFIG_NSH_NETINIT_THREAD=y CONFIG_NSH_NETINIT_MONITOR=y CONFIG_NSH_NETINIT_SIGNO=18 @@ -1055,6 +1107,8 @@ CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048 CONFIG_NSH_TELNETD_CLIENTPRIO=100 CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048 CONFIG_NSH_IOBUFFER_SIZE=512 +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # CONFIG_NSH_TELNET_LOGIN is not set # @@ -1069,11 +1123,11 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=6 CONFIG_I2CTOOL_MAXBUS=6 @@ -1081,8 +1135,8 @@ CONFIG_I2CTOOL_MINADDR=0x03 CONFIG_I2CTOOL_MAXADDR=0x77 CONFIG_I2CTOOL_MAXREGADDR=0xff CONFIG_I2CTOOL_DEFFREQ=400000 -# CONFIG_FSUTILS_INIFILE is not set -# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_MDIO is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1090,7 +1144,7 @@ CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y # CONFIG_READLINE_TABCOMPLETION is not set # CONFIG_READLINE_CMD_HISTORY is not set -# CONFIG_SYSTEM_MDIO is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/tm4c1294-launchpad/src/tm4c_bringup.c b/configs/tm4c1294-launchpad/src/tm4c_bringup.c index a6608ff431a0669a5b05b05f3f9b0eed5c1b5423..9c8a60f2b432c97ed19e7824b0b3cc6a6b90f5af 100644 --- a/configs/tm4c1294-launchpad/src/tm4c_bringup.c +++ b/configs/tm4c1294-launchpad/src/tm4c_bringup.c @@ -76,14 +76,14 @@ static void tm4c_i2c_register(int bus) i2c = tiva_i2cbus_initialize(bus); if (i2c == NULL) { - dbg("ERROR: Failed to get I2C%d interface\n", bus); + _err("ERROR: Failed to get I2C%d interface\n", bus); } else { ret = i2c_register(i2c, bus); if (ret < 0) { - dbg("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); + _err("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); tiva_i2cbus_uninitialize(i2c); } } @@ -164,7 +164,7 @@ int tm4c_bringup(void) ret = tiva_timer_configure(); if (ret < 0) { - dbg("ERROR: Failed to initialize timer driver: %d\n", ret); + _err("ERROR: Failed to initialize timer driver: %d\n", ret); } #endif diff --git a/configs/tm4c1294-launchpad/src/tm4c_ethernet.c b/configs/tm4c1294-launchpad/src/tm4c_ethernet.c index f668660342a18969aad1f40d62dcd0b8e777583b..c62d0fc01237fc9936010b2992fb41c3c2a68336 100644 --- a/configs/tm4c1294-launchpad/src/tm4c_ethernet.c +++ b/configs/tm4c1294-launchpad/src/tm4c_ethernet.c @@ -84,10 +84,10 @@ void tiva_ethernetmac(struct ether_addr *ethaddr) user0 = getreg32(TIVA_FLASH_USERREG0); user1 = getreg32(TIVA_FLASH_USERREG1); - nlldbg("user: %06x:%06x\n", user1 & 0x00ffffff, user0 & 0x00ffffff); + ninfo("user: %06x:%06x\n", user1 & 0x00ffffff, user0 & 0x00ffffff); DEBUGASSERT(user0 != 0xffffffff && user1 != 0xffffffff); - /* Re-format that MAC address the way that uIP expects to see it */ + /* Re-format that MAC address the way that the network expects to see it */ ethaddr->ether_addr_octet[0] = ((user0 >> 0) & 0xff); ethaddr->ether_addr_octet[1] = ((user0 >> 8) & 0xff); diff --git a/configs/tm4c1294-launchpad/src/tm4c_timer.c b/configs/tm4c1294-launchpad/src/tm4c_timer.c index 0d661307c3979f1c5e199194e5b7323b3e4dd644..7405bcc06d64e09969fd50bccffac8803b263ce6 100644 --- a/configs/tm4c1294-launchpad/src/tm4c_timer.c +++ b/configs/tm4c1294-launchpad/src/tm4c_timer.c @@ -101,14 +101,14 @@ int tiva_timer_configure(void) { int ret; - timvdbg("Registering TIMER%d at %s\n", + tmrinfo("Registering TIMER%d at %s\n", GPTM, CONFIG_TM4C1294_LAUNCHPAD_TIMER_DEVNAME); ret = tiva_timer_register(CONFIG_TM4C1294_LAUNCHPAD_TIMER_DEVNAME, GPTM, ALTCLK); if (ret < 0) { - timdbg("ERROR: Failed to register timer driver: %d\n", ret); + tmrerr("ERROR: Failed to register timer driver: %d\n", ret); } return ret; diff --git a/configs/tm4c1294-launchpad/src/tm4c_userleds.c b/configs/tm4c1294-launchpad/src/tm4c_userleds.c index d73ab5a13f7b5740bd4d6d50ca7fdf0e6fc3379b..c3a285b29cd5409ea76b9080548c549e98ed08d6 100644 --- a/configs/tm4c1294-launchpad/src/tm4c_userleds.c +++ b/configs/tm4c1294-launchpad/src/tm4c_userleds.c @@ -63,22 +63,6 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/twr-k60n512/nsh/defconfig b/configs/twr-k60n512/nsh/defconfig index ac65d4c0257020aec86199c36776a94a0cb7e861..65e1a1a01cef6a808a8501aeddb50f4bc5004398 100644 --- a/configs/twr-k60n512/nsh/defconfig +++ b/configs/twr-k60n512/nsh/defconfig @@ -37,14 +37,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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=y # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_KINETIS=y # 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 @@ -102,12 +109,23 @@ 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="kinetis" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI 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 # @@ -117,6 +135,7 @@ CONFIG_ARCH_HAVE_FPU=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 @@ -128,6 +147,14 @@ CONFIG_ARMV7M_OABI_TOOLCHAIN=y # # Kinetis Configuration Options # +# CONFIG_ARCH_CHIP_MK20DN32VLH5 is not set +# CONFIG_ARCH_CHIP_MK20DX32VLH5 is not set +# CONFIG_ARCH_CHIP_MK20DN64VLH5 is not set +# CONFIG_ARCH_CHIP_MK20DX64VLH5 is not set +# CONFIG_ARCH_CHIP_MK20DN128VLH5 is not set +# CONFIG_ARCH_CHIP_MK20DX128VLH5 is not set +# CONFIG_ARCH_CHIP_MK20DX64VLH7 is not set +# CONFIG_ARCH_CHIP_MK20DX128VLH7 is not set # CONFIG_ARCH_CHIP_MK20DX256VLH7 is not set # CONFIG_ARCH_CHIP_MK40N512VLQ100 is not set # CONFIG_ARCH_CHIP_MK40N512VMD100 is not set @@ -137,6 +164,7 @@ CONFIG_ARMV7M_OABI_TOOLCHAIN=y # CONFIG_ARCH_CHIP_MK40X256VMD100 is not set # CONFIG_ARCH_CHIP_MK60N256VLQ100 is not set # CONFIG_ARCH_CHIP_MK60N256VMD100 is not set +# CONFIG_ARCH_CHIP_MK60N512VLL100 is not set # CONFIG_ARCH_CHIP_MK60N512VLQ100 is not set CONFIG_ARCH_CHIP_MK60N512VMD100=y # CONFIG_ARCH_CHIP_MK60X256VLQ100 is not set @@ -210,11 +238,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -310,6 +341,7 @@ 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 @@ -360,9 +392,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -393,6 +426,7 @@ CONFIG_DEV_NULL=y # 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 @@ -410,8 +444,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -421,6 +470,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -444,14 +495,11 @@ CONFIG_UART3_SERIALDRIVER=y # 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 is not set CONFIG_UART3_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -468,19 +516,23 @@ CONFIG_UART3_PARITY=0 CONFIG_UART3_2STOP=0 # CONFIG_UART3_IFLOWCONTROL is not set # CONFIG_UART3_OFLOWCONTROL is not set +# CONFIG_UART3_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -513,19 +565,16 @@ 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 # CONFIG_FS_SMARTFS 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 # @@ -544,6 +593,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -589,10 +642,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -607,26 +665,26 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -634,18 +692,19 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 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_NXTERM 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_PPPD 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 @@ -653,14 +712,25 @@ CONFIG_EXAMPLES_NSH=y # 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_WEBSERVER 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 @@ -673,30 +743,28 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -715,6 +783,7 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -723,6 +792,7 @@ 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 @@ -731,8 +801,10 @@ CONFIG_NSH_DISABLE_DATE=y # 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 @@ -751,8 +823,10 @@ CONFIG_NSH_DISABLE_DATE=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 # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set @@ -779,6 +853,8 @@ CONFIG_NSH_FILEIOSIZE=512 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 @@ -792,16 +868,19 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y -# CONFIG_SYSTEM_POWEROFF is not set +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/twr-k60n512/src/k60_leds.c b/configs/twr-k60n512/src/k60_leds.c index 76238c548ab7443aeea9a65ef99f804f525568d8..c11e04cb2ed20dae500f30917725e282eba74c66 100644 --- a/configs/twr-k60n512/src/k60_leds.c +++ b/configs/twr-k60n512/src/k60_leds.c @@ -119,18 +119,6 @@ #define LED_PANIC_OFF_SETBITS ((0) << OFF_SETBITS_SHIFT) #define LED_PANIC_OFF_CLRBITS ((K60_LED4) << OFF_CLRBITS_SHIFT) -/* 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 Data ****************************************************************************/ diff --git a/configs/twr-k60n512/src/k60_spi.c b/configs/twr-k60n512/src/k60_spi.c index 8aa48e369bcb423213da1e9e0d4e006caca27268..2c63ed94cddb34631c716280e7aa06498021018d 100644 --- a/configs/twr-k60n512/src/k60_spi.c +++ b/configs/twr-k60n512/src/k60_spi.c @@ -53,29 +53,6 @@ #if defined(CONFIG_KINETIS_SPI1) || defined(CONFIG_KINETIS_SPI2) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef CONFIG_DEBUG_SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -121,7 +98,7 @@ void weak_function kinetis_spidev_initialize(void) #ifdef CONFIG_KINETIS_SPI1 void kinetis_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); # warning "Missing logic" } @@ -135,7 +112,7 @@ uint8_t kinetis_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_KINETIS_SPI2 void kinetis_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); # warning "Missing logic" } @@ -149,7 +126,7 @@ uint8_t kinetis_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_KINETIS_SPI3 void kinetis_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); # warning "Missing logic" } diff --git a/configs/twr-k60n512/src/k60_usbdev.c b/configs/twr-k60n512/src/k60_usbdev.c index b542834768f1c1e65182562664931dfd1eba009a..23c43088665a4b54d44e4067a125b782c979549c 100644 --- a/configs/twr-k60n512/src/k60_usbdev.c +++ b/configs/twr-k60n512/src/k60_usbdev.c @@ -108,7 +108,6 @@ int kinetis_usbpullup(FAR struct usbdev_s *dev, bool enable) void kinetis_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); #warning "Missing logic" } - diff --git a/configs/u-blox-c027/nsh/defconfig b/configs/u-blox-c027/nsh/defconfig index ca3feaaa15d6838aa7fccb6f607a7ceb5696cceb..eff1c86df15fc401664c5f5a33db61f596b13d42 100644 --- a/configs/u-blox-c027/nsh/defconfig +++ b/configs/u-blox-c027/nsh/defconfig @@ -42,14 +42,18 @@ CONFIG_RAW_BINARY=y # # Debug Options # -CONFIG_DEBUG=y -# CONFIG_ARCH_HAVE_HEAPCHECK is not set -# CONFIG_DEBUG_VERBOSE is not set +CONFIG_DEBUG_ALERT=y +CONFIG_DEBUG_FEATURES=y + +# +# Debug SYSLOG Output Controls +# +# CONFIG_DEBUG_ERROR is not set +# CONFIG_DEBUG_ASSERTIONS is not set # # Subsystem Debug Options # -# CONFIG_DEBUG_AUDIO is not set # CONFIG_DEBUG_BINFMT is not set # CONFIG_DEBUG_FS is not set # CONFIG_DEBUG_GRAPHICS is not set @@ -67,10 +71,10 @@ CONFIG_DEBUG=y # Driver Debug Options # # CONFIG_DEBUG_LEDS is not set -# CONFIG_DEBUG_ANALOG is not set CONFIG_DEBUG_GPIO=y CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set CONFIG_DEBUG_SYMBOLS=y CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -101,6 +105,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 @@ -119,6 +124,7 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -131,6 +137,7 @@ CONFIG_ARCH_CORTEXM3=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 @@ -139,12 +146,15 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="lpc17xx" +# 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 # CONFIG_DEBUG_HARDFAULT is not set @@ -156,6 +166,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 @@ -253,7 +264,6 @@ CONFIG_NET_EMACRAM_SIZE=7296 CONFIG_NET_NTXDESC=6 CONFIG_NET_NRXDESC=6 # CONFIG_NET_WOL is not set -# CONFIG_NET_REGDEBUG is not set # CONFIG_NET_HASH is not set # CONFIG_LPC17_MULTICAST is not set @@ -268,6 +278,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set CONFIG_ARCH_HAVE_MPU=y @@ -486,13 +497,20 @@ CONFIG_DEV_ZERO=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support # # CONFIG_USERLED is not set +# CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set CONFIG_MODEM=y CONFIG_MODEM_U_BLOX=y @@ -561,6 +579,8 @@ CONFIG_ETH1_PHY_NONE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -584,10 +604,6 @@ CONFIG_UART3_SERIALDRIVER=y # 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 @@ -659,15 +675,18 @@ CONFIG_UART3_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -772,7 +791,6 @@ CONFIG_NET_ARP_MAXAGE=120 CONFIG_NET_ARP_SEND=y CONFIG_ARP_SEND_MAXTRIES=5 CONFIG_ARP_SEND_DELAYMSEC=20 -# CONFIG_NET_ARP_DUMP is not set # # Network I/O Buffer Support @@ -818,7 +836,9 @@ 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_NFS is not set # CONFIG_FS_NXFFS is not set # CONFIG_FS_ROMFS is not set @@ -837,12 +857,6 @@ CONFIG_FS_PROCFS=y # CONFIG_FS_PROCFS_EXCLUDE_NET is not set # CONFIG_FS_UNIONFS is not set -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set - # # Graphics Support # @@ -861,6 +875,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -904,6 +922,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 @@ -918,6 +938,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -955,15 +976,16 @@ CONFIG_EXAMPLES_CHAT_PRESET3="\"\" AT+USOWR=0,5,\\\"NuttX\\\" PAUSE 10 OK AT+USO # CONFIG_EXAMPLES_CONFIGDATA is not set # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -973,36 +995,37 @@ CONFIG_EXAMPLES_CHAT_PRESET3="\"\" AT+USOWR=0,5,\\\"NuttX\\\" PAUSE 10 OK AT+USO 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_NXTERM 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=y # CONFIG_EXAMPLES_POSIXSPAWN is not set +CONFIG_EXAMPLES_PPPD=y +# 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_SMART_TEST 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_UDP is not set # 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_WEBSERVER is not set # CONFIG_EXAMPLES_XMLRPC is not set # @@ -1011,6 +1034,11 @@ CONFIG_EXAMPLES_PPPD=y # CONFIG_FSUTILS_INIFILE is not set # CONFIG_FSUTILS_PASSWD is not set +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + # # Graphics Support # @@ -1022,8 +1050,8 @@ CONFIG_EXAMPLES_PPPD=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1037,23 +1065,24 @@ CONFIG_NETUTILS_CHAT=y # CONFIG_NETUTILS_CODECS is not set CONFIG_NETUTILS_DHCPC=y # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER 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 +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +CONFIG_NETUTILS_PPPD=y +CONFIG_NETUTILS_PPPD_STACKSIZE=2048 +CONFIG_NETUTILS_PPPD_PAP=y # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/7.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -CONFIG_NETUTILS_PPPD=y -CONFIG_NETUTILS_PPPD_STACKSIZE=2048 -CONFIG_NETUTILS_PPPD_PAP=y # # NSH Library @@ -1079,6 +1108,7 @@ CONFIG_NSH_BUILTIN_APPS=y # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_ARP is not set # CONFIG_NSH_DISABLE_BASENAME is not set # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set @@ -1156,6 +1186,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y CONFIG_NSH_NETINIT_THREAD=y CONFIG_NSH_NETINIT_THREAD_STACKSIZE=1568 CONFIG_NSH_NETINIT_THREAD_PRIORITY=80 @@ -1209,13 +1240,13 @@ CONFIG_NSH_LOGIN_FAILCOUNT=3 # # System Libraries and NSH Add-Ons # -# CONFIG_SYSTEM_FREE is not set CONFIG_SYSTEM_CLE=y CONFIG_SYSTEM_CLE_DEBUGLEVEL=0 # CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1224,10 +1255,10 @@ 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=y CONFIG_SYSTEM_UBLOXMODEM_TTY_DEVNODE="/dev/ttyS1" CONFIG_SYSTEM_UBLOXMODEM_DEVNODE="/dev/ubxmdm" +# CONFIG_SYSTEM_VI is not set CONFIG_SYSTEM_ZMODEM=y CONFIG_SYSTEM_ZMODEM_DEVNAME="/dev/console" CONFIG_SYSTEM_ZMODEM_RCVBUFSIZE=512 diff --git a/configs/u-blox-c027/src/lpc17_adc.c b/configs/u-blox-c027/src/lpc17_adc.c index 9d620f84c69357495d4d1c53d3d1414812457e98..bc876a8d538b49eeec3de3b967ffa9de32ee4f25 100644 --- a/configs/u-blox-c027/src/lpc17_adc.c +++ b/configs/u-blox-c027/src/lpc17_adc.c @@ -89,7 +89,7 @@ int board_adc_setup(void) adc = lpc17_adcinitialize(); if (adc == NULL) { - adbg("ERROR: Failed to get ADC interface\n"); + aerr("ERROR: Failed to get ADC interface\n"); return -ENODEV; } @@ -98,7 +98,7 @@ int board_adc_setup(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - adbg("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } diff --git a/configs/u-blox-c027/src/lpc17_dac.c b/configs/u-blox-c027/src/lpc17_dac.c index 91c1585f058f006b4bd1bd94957a7e1e5e3913a5..c1924c2f309c2d94d022bd89942f77b34aabf0ed 100644 --- a/configs/u-blox-c027/src/lpc17_dac.c +++ b/configs/u-blox-c027/src/lpc17_dac.c @@ -85,14 +85,14 @@ int dac_devinit(void) dac = lpc17_dacinitialize(); if (dac == NULL) { - adbg("ERROR: Failed to get dac interface\n"); + aerr("ERROR: Failed to get dac interface\n"); return -ENODEV; } ret = dac_register("/dev/dac0", dac); if (ret < 0) { - adbg("dac_register failed: %d\n", ret); + aerr("ERROR: dac_register failed: %d\n", ret); return ret; } diff --git a/configs/u-blox-c027/src/lpc17_leds.c b/configs/u-blox-c027/src/lpc17_leds.c index 5987d6f66ec44a8be8bb2961d577306b98e8d1e0..d29fe996dd915d8417b324ee6b3dd6d99fca5c8c 100644 --- a/configs/u-blox-c027/src/lpc17_leds.c +++ b/configs/u-blox-c027/src/lpc17_leds.c @@ -52,26 +52,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * 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 -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /**************************************************************************** * Private Data ****************************************************************************/ diff --git a/configs/u-blox-c027/src/lpc17_pwm.c b/configs/u-blox-c027/src/lpc17_pwm.c index d5d4bb506cea2375562b317a28a474882d488c80..435acf34737aa603a4c926468b6341cdf6419e7d 100644 --- a/configs/u-blox-c027/src/lpc17_pwm.c +++ b/configs/u-blox-c027/src/lpc17_pwm.c @@ -64,10 +64,6 @@ FAR struct pwm_lowerhalf_s *lpc17_pwminitialize(int timer); FAR struct pwm_lowerhalf_s *lpc17_mcpwminitialize(int timer); FAR struct pwm_lowerhalf_s *lpc17_timerinitialize(int timer); -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -98,7 +94,7 @@ int board_pwm_setup(void) pwm = lpc17_pwminitialize(0); if (!pwm) { - adbg("Failed to get the LPC17XX PWM lower half\n"); + aerr("ERROR: Failed to get the LPC17XX PWM lower half\n"); return -ENODEV; } @@ -107,14 +103,14 @@ int board_pwm_setup(void) ret = pwm_register("/dev/pwm0", pwm); if (ret < 0) { - adbg("pwm_register failed: %d\n", ret); + aerr("ERROR: pwm_register failed: %d\n", ret); return ret; } mcpwm = lpc17_mcpwminitialize(0); if (!mcpwm) { - adbg("Failed to get the LPC17XX MOTOR PWM lower half\n"); + aerr("ERROR: Failed to get the LPC17XX MOTOR PWM lower half\n"); return -ENODEV; } @@ -123,14 +119,14 @@ int board_pwm_setup(void) ret = pwm_register("/dev/mcpwm0", mcpwm); if (ret < 0) { - adbg("mcpwm_register failed: %d\n", ret); + aerr("ERROR: mcpwm_register failed: %d\n", ret); return ret; } timer = lpc17_timerinitialize(0); if (!timer) { - adbg("Failed to get the LPC17XX TIMER lower half\n"); + aerr("ERROR: Failed to get the LPC17XX TIMER lower half\n"); return -ENODEV; } @@ -139,7 +135,7 @@ int board_pwm_setup(void) ret = pwm_register("/dev/timer0", timer); if (ret < 0) { - adbg("timer_register failed: %d\n", ret); + aerr("ERROR: timer_register failed: %d\n", ret); return ret; } diff --git a/configs/u-blox-c027/src/lpc17_ssp.c b/configs/u-blox-c027/src/lpc17_ssp.c index 640732aa471ba1318b4bd03f05fe99ce01fb6c0c..7090bcbb313efc4adb254a3fbf2602a35730a926 100644 --- a/configs/u-blox-c027/src/lpc17_ssp.c +++ b/configs/u-blox-c027/src/lpc17_ssp.c @@ -58,27 +58,9 @@ * Pre-processor Definitions ************************************************************************************/ -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SSP_DEBUG /* Define to enable debug */ -#undef SSP_VERBOSE /* Define to enable verbose debug */ - -#ifdef SSP_DEBUG -# define sspdbg lldbg -# ifdef SSP_VERBOSE -# define sspvdbg lldbg -# else -# define sspvdbg(x...) -# endif -#else -# undef SSP_VERBOSE -# define sspdbg(x...) -# define sspvdbg(x...) -#endif - /* Dump GPIO registers */ -#ifdef SSP_VERBOSE +#ifdef CONFIG_DEBUG_GPIO_INFO # define ssp_dumpgpio(m) lpc17_dumpgpio(SDCCS_GPIO, m) #else # define ssp_dumpgpio(m) @@ -140,7 +122,7 @@ void weak_function c027_sspdev_initialize(void) #ifdef CONFIG_LPC17_SSP0 void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - sspdbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); ssp_dumpgpio("lpc17_ssp0select() Entry"); #warning "Assert CS here (false)" @@ -150,7 +132,7 @@ void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - sspdbg("Returning SPI_STATUS_PRESENT\n"); + spiinfo("Returning SPI_STATUS_PRESENT\n"); return SPI_STATUS_PRESENT; } #endif @@ -158,7 +140,7 @@ uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_LPC17_SSP1 void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - sspdbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); ssp_dumpgpio("lpc17_ssp1select() Entry"); if (devid == SPIDEV_MMCSD) @@ -186,12 +168,12 @@ uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) if (lpc17_gpioread(C027_SD_CD) == 0) { - sspdbg("Returning SPI_STATUS_PRESENT\n"); + spiinfo("Returning SPI_STATUS_PRESENT\n"); return SPI_STATUS_PRESENT; } } - sspdbg("Returning zero\n"); + spiinfo("Returning zero\n"); return 0; } #endif diff --git a/configs/u-blox-c027/src/lpc17_ubxmdm.c b/configs/u-blox-c027/src/lpc17_ubxmdm.c index a6615e54aa65f44180b0e49c13bf27dbca18428c..183e076ec40ad7ea89c2a901634cccb92d169b16 100644 --- a/configs/u-blox-c027/src/lpc17_ubxmdm.c +++ b/configs/u-blox-c027/src/lpc17_ubxmdm.c @@ -62,15 +62,11 @@ /* Non-standard debug that may be enabled just for testing the modem driver */ #ifdef CONFIG_MODEM_U_BLOX_DEBUG -# define m_dbg dbg -# define m_vdbg vdbg -# define m_vlldbg lldbg -# define m_vllvdbg llvdbg +# define m_err _err +# define m_info _info #else -# define m_dbg(x...) -# define m_vdbg(x...) -# define m_lldbg(x...) -# define m_llvdbg(x...) +# define m_err(x...) +# define m_info(x...) #endif #define UBXMDM_REGISTER_COUNT \ diff --git a/configs/ubw32/nsh/defconfig b/configs/ubw32/nsh/defconfig index b6ec91adbca271103b80397d1561b5b2c8ff7ba1..f30d05b11848b76e6d5e07a8cdd5f4dfdc1ca86e 100644 --- a/configs/ubw32/nsh/defconfig +++ b/configs/ubw32/nsh/defconfig @@ -41,13 +41,15 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -266,12 +268,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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_IRQPRIO is not set CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set @@ -332,6 +336,7 @@ CONFIG_NSH_MMCSDSLOTNO=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 @@ -371,6 +376,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="nsh_main" CONFIG_RR_INTERVAL=0 +# CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=0 CONFIG_MAX_TASKS=16 # CONFIG_SCHED_HAVE_PARENT is not set @@ -421,9 +427,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -454,6 +461,7 @@ CONFIG_DEV_NULL=y # 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 @@ -471,7 +479,21 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -480,6 +502,7 @@ CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_HAVECARDDETECT is not set # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set # CONFIG_MTD is not set # CONFIG_EEPROM is not set # CONFIG_PIPES is not set @@ -489,6 +512,8 @@ CONFIG_MMCSD_NSLOTS=1 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -512,14 +537,11 @@ CONFIG_UART1_SERIALDRIVER=y # 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_UART1_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -536,19 +558,23 @@ 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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -582,20 +608,17 @@ 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 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 # @@ -614,6 +637,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -659,10 +686,14 @@ 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 is not set +# CONFIG_LIBC_NETDB is not set +# CONFIG_NETDB_HOSTFILE is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -681,23 +712,27 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_BUILTIN_PROXY_STACKSIZE=1024 +# +# CAN Utilities +# + # # 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 # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -705,33 +740,46 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD 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_SMART_TEST 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_WEBSERVER 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 @@ -744,30 +792,28 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -787,6 +833,7 @@ 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 @@ -795,6 +842,7 @@ 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 @@ -803,8 +851,10 @@ CONFIG_NSH_DISABLE_DATE=y # 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 @@ -823,8 +873,10 @@ CONFIG_NSH_DISABLE_DATE=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 # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set @@ -851,6 +903,8 @@ CONFIG_NSH_FILEIOSIZE=512 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 @@ -864,15 +918,19 @@ CONFIG_NSH_ARCHINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/ubw32/src/pic32_leds.c b/configs/ubw32/src/pic32_leds.c index a4884c2d33da031ea75edafff2811eaeca2a7019..cc7dd9a0ee64fb374c3f3419c1c3e0bc00c75bb6 100644 --- a/configs/ubw32/src/pic32_leds.c +++ b/configs/ubw32/src/pic32_leds.c @@ -95,22 +95,6 @@ # define LED_NC 2 #endif -/* Debug ********************************************************************/ - -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_LEDS) -# define leddbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# undef CONFIG_DEBUG_LEDS -# undef CONFIG_DEBUG_VERBOSE -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /**************************************************************************** * Private types ****************************************************************************/ diff --git a/configs/us7032evb1/nsh/defconfig b/configs/us7032evb1/nsh/defconfig index e18cd49cc8c2c05c78c14523cbe464c7cd135f66..e87a5da115d0df6ecc7cf7ba887e0f13d9962b34 100644 --- a/configs/us7032evb1/nsh/defconfig +++ b/configs/us7032evb1/nsh/defconfig @@ -38,7 +38,7 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set @@ -322,7 +322,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/us7032evb1/ostest/defconfig b/configs/us7032evb1/ostest/defconfig index 7490f982d79e7416af4cc914f083f076fb4230bf..0c8a86314e24a6d2a515db0a73c86a1467667b11 100644 --- a/configs/us7032evb1/ostest/defconfig +++ b/configs/us7032evb1/ostest/defconfig @@ -38,7 +38,7 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_ARCH_HAVE_STACKCHECK is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set @@ -320,7 +320,6 @@ CONFIG_DISABLE_MOUNTPOINT=y # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/us7032evb1/shterm/shterm.c b/configs/us7032evb1/shterm/shterm.c index 83284d493b95c82d7f1f32e7cd6b02d73e1cbe85..8b70d71301bfbec3be78fa06e1a669c608b43c40 100644 --- a/configs/us7032evb1/shterm/shterm.c +++ b/configs/us7032evb1/shterm/shterm.c @@ -62,8 +62,8 @@ #define DEFAULT_BAUD 9600 -#define dbg(format, ...) if (debug > 0) printconsole(format, ##__VA_ARGS__) -#define vdbg(format, ...) if (debug > 1) printconsole(format, ##__VA_ARGS__) +#define _err(format, ...) if (debug > 0) printconsole(format, ##__VA_ARGS__) +#define _info(format, ...) if (debug > 1) printconsole(format, ##__VA_ARGS__) /**************************************************************************** * Private Types diff --git a/configs/viewtool-stm32f107/README.txt b/configs/viewtool-stm32f107/README.txt index 509a476170216a4e149ab9dfb7455515f41da678..e84f13aec01bb26117321eac2338c887f4b95de5 100644 --- a/configs/viewtool-stm32f107/README.txt +++ b/configs/viewtool-stm32f107/README.txt @@ -766,8 +766,8 @@ Configurations debug output on USART1 can be enabled with: Build Setup: - CONFIG_DEBUG=y : Enable debug features - CONFIG_DEBUG_VERBOSE=y : Enable verbose debug output + CONFIG_DEBUG_FEATURES=y : Enable debug features + CONFIG_DEBUG_INFO=y : Enable verbose debug output CONFIG_DEBUG_INPUT=y : Enable debug output from input devices STATUS: Working diff --git a/configs/viewtool-stm32f107/highpri/defconfig b/configs/viewtool-stm32f107/highpri/defconfig index 0fcfc13a51b96523e00f26f69e3326e0493c5014..578e69700c0eb55548cacb9e1ac729a62891cfdb 100644 --- a/configs/viewtool-stm32f107/highpri/defconfig +++ b/configs/viewtool-stm32f107/highpri/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -207,6 +209,7 @@ CONFIG_ARCH_CHIP_STM32F103VC=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set # CONFIG_ARCH_CHIP_STM32F107VC is not set # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -416,6 +419,10 @@ CONFIG_STM32_JTAG_FULL_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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -427,9 +434,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -677,7 +692,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -685,6 +705,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -696,6 +717,8 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -746,15 +769,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -791,12 +817,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -869,6 +889,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -898,10 +919,10 @@ CONFIG_ARCH_HAVE_TLS=y # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -910,18 +931,18 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_EXAMPLES_NSH is not set # 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -935,9 +956,9 @@ CONFIG_ARCH_HAVE_TLS=y # 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -959,8 +980,8 @@ CONFIG_ARCH_HAVE_TLS=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -994,16 +1015,16 @@ CONFIG_ARCH_HAVE_TLS=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/viewtool-stm32f107/include/board-stm32f103vct6.h b/configs/viewtool-stm32f107/include/board-stm32f103vct6.h index 54731ecf726e6289d0567a34262a698f98eb3e1d..a1e40a9bd26567ea8e72c246ca353524c9d32a0f 100644 --- a/configs/viewtool-stm32f107/include/board-stm32f103vct6.h +++ b/configs/viewtool-stm32f107/include/board-stm32f103vct6.h @@ -1,7 +1,7 @@ /************************************************************************************ * configs/viewtool-stm32f107/include/board-stm32f103vct6.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 @@ -93,14 +93,14 @@ #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) */ +/* APB1 timers 2-7 will be twice 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) +#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) /* USB divider -- Divide PLL clock by 1.5 * @@ -113,8 +113,14 @@ * 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 +#define BOARD_TIM1_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM2_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM3_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM4_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM5_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM6_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM7_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM8_FREQUENCY STM32_HCLK_FREQUENCY /************************************************************************************ * Public Data diff --git a/configs/viewtool-stm32f107/include/board-stm32f107vct6.h b/configs/viewtool-stm32f107/include/board-stm32f107vct6.h index 1c200a133e84d12a78ad625f81c361a6a8f8fc76..7f5088f2c12a99262ad149533812bfb16a4ad3fb 100644 --- a/configs/viewtool-stm32f107/include/board-stm32f107vct6.h +++ b/configs/viewtool-stm32f107/include/board-stm32f107vct6.h @@ -97,14 +97,14 @@ #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) */ +/* APB1 timers 2-7 will be twice 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) +#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) /* USB divider -- Divide PLL clock by 1.5 * diff --git a/configs/viewtool-stm32f107/include/board.h b/configs/viewtool-stm32f107/include/board.h index 242feeb67ae213acb2d6ada35566b9bdb931246c..2fea6a29daebe6447b242bfd1e439008e7cdb031 100644 --- a/configs/viewtool-stm32f107/include/board.h +++ b/configs/viewtool-stm32f107/include/board.h @@ -1,7 +1,7 @@ /************************************************************************************ * configs/viewtool-stm32f107/include/board.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 diff --git a/configs/viewtool-stm32f107/netnsh/defconfig b/configs/viewtool-stm32f107/netnsh/defconfig index f6f1b6b4d1d4d3e5179a0faf2a36f334f336ef16..93163ab9c28ccde55077a1fb97e13a8e29e5b09e 100644 --- a/configs/viewtool-stm32f107/netnsh/defconfig +++ b/configs/viewtool-stm32f107/netnsh/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -207,6 +209,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set CONFIG_ARCH_CHIP_STM32F107VC=y # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -415,6 +418,10 @@ CONFIG_STM32_JTAG_FULL_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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -426,9 +433,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -694,7 +709,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -702,6 +722,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -755,6 +776,8 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -805,15 +828,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -963,12 +989,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -1048,6 +1068,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -1077,14 +1098,15 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_CONFIGDATA is not set # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_DISCOVER 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -1094,17 +1116,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1112,8 +1134,8 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -1121,10 +1143,9 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UDPBLASTER is not set -# CONFIG_EXAMPLES_DISCOVER is not set -# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_XMLRPC is not set # @@ -1147,8 +1168,8 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1162,22 +1183,22 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CODECS is not set CONFIG_NETUTILS_DHCPC=y # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER 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 +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library @@ -1278,6 +1299,7 @@ CONFIG_NSH_CONSOLE=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y CONFIG_NSH_NETINIT_THREAD=y CONFIG_NSH_NETINIT_THREAD_STACKSIZE=1568 CONFIG_NSH_NETINIT_THREAD_PRIORITY=80 @@ -1325,12 +1347,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1339,6 +1361,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/viewtool-stm32f107/nsh/defconfig b/configs/viewtool-stm32f107/nsh/defconfig index eac5f7d914713cd4e165c0be42bba54e8c22eb8a..8a9aec658098d2b41e972c057d8670e07b44c51c 100644 --- a/configs/viewtool-stm32f107/nsh/defconfig +++ b/configs/viewtool-stm32f107/nsh/defconfig @@ -46,10 +46,12 @@ CONFIG_INTELHEX_BINARY=y # # Debug Options # -# CONFIG_DEBUG is not set -CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +# CONFIG_HEAP_COLORATION is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -207,6 +209,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F103VE is not set # CONFIG_ARCH_CHIP_STM32F103ZE is not set # CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set CONFIG_ARCH_CHIP_STM32F107VC=y # CONFIG_ARCH_CHIP_STM32F205RG is not set # CONFIG_ARCH_CHIP_STM32F207IG is not set @@ -414,6 +417,10 @@ CONFIG_STM32_JTAG_FULL_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 + +# +# Timer Configuration +# # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -425,9 +432,17 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # + +# +# U[S]ART Device Configuration +# CONFIG_STM32_USART1_SERIALDRIVER=y # CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set + +# +# Serial Driver Configuration +# # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set # CONFIG_STM32_USART_BREAKS is not set @@ -675,7 +690,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set # # LED Support @@ -683,6 +703,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_USERLED is not set # CONFIG_RGBLED is not set # CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set # CONFIG_MMCSD is not set # CONFIG_MODEM is not set # CONFIG_MTD is not set @@ -694,6 +715,8 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART0_SERIALDRIVER is not set @@ -744,15 +767,18 @@ CONFIG_USART1_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -790,12 +816,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -868,6 +888,7 @@ CONFIG_ARCH_HAVE_TLS=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -902,10 +923,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -914,17 +935,17 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NXTERM 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_PPPD is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -932,16 +953,16 @@ CONFIG_EXAMPLES_NSH=y # 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_SMART_TEST 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # # File System Utilities @@ -963,8 +984,8 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1089,12 +1110,12 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y CONFIG_SYSTEM_READLINE=y @@ -1102,6 +1123,6 @@ 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_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/viewtool-stm32f107/src/stm32_appinit.c b/configs/viewtool-stm32f107/src/stm32_appinit.c index 8bc77a200c160b55f6d782f66264b2dd0c0abc65..e43fcef6bf31dfdafd1c1671f06e43683a05b249 100644 --- a/configs/viewtool-stm32f107/src/stm32_appinit.c +++ b/configs/viewtool-stm32f107/src/stm32_appinit.c @@ -95,7 +95,7 @@ static int rtc_driver_initialize(void) lower = stm32_rtc_lowerhalf(); if (lower == NULL) { - sdbg("ERROR: Failed to instantiate the RTC lower-half driver\n"); + serr("ERROR: Failed to instantiate the RTC lower-half driver\n"); ret = -ENOMEM; } else @@ -107,7 +107,7 @@ static int rtc_driver_initialize(void) ret = rtc_initialize(0, lower); if (ret < 0) { - sdbg("ERROR: Failed to bind/register the RTC driver: %d\n", ret); + serr("ERROR: Failed to bind/register the RTC driver: %d\n", ret); } } diff --git a/configs/viewtool-stm32f107/src/stm32_can.c b/configs/viewtool-stm32f107/src/stm32_can.c index c6d0616ee3f31cbfab54aa09dc803dee6ba7d829..2aad6dfdf2199da19ec69921256f9351f7418b04 100644 --- a/configs/viewtool-stm32f107/src/stm32_can.c +++ b/configs/viewtool-stm32f107/src/stm32_can.c @@ -61,25 +61,6 @@ #define CAN_PORT 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 - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -108,7 +89,7 @@ int board_can_initialize(void) can = stm32_caninitialize(CAN_PORT); if (can == NULL) { - candbg("ERROR: Failed to get CAN interface\n"); + canerr("ERROR: Failed to get CAN interface\n"); return -ENODEV; } @@ -117,7 +98,7 @@ int board_can_initialize(void) ret = can_register("/dev/can0", can); if (ret < 0) { - candbg("ERROR: can_register failed: %d\n", ret); + canerr("ERROR: can_register failed: %d\n", ret); return ret; } diff --git a/configs/viewtool-stm32f107/src/stm32_leds.c b/configs/viewtool-stm32f107/src/stm32_leds.c index f6ba968118a7373f6edda1c559b5adeff565ff3a..4653c4a341faf0be5368d8b8b6ecef7872f77025 100644 --- a/configs/viewtool-stm32f107/src/stm32_leds.c +++ b/configs/viewtool-stm32f107/src/stm32_leds.c @@ -49,26 +49,6 @@ #include "stm32_gpio.h" #include "viewtool_stm32f107.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 Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ diff --git a/configs/viewtool-stm32f107/src/stm32_mmcsd.c b/configs/viewtool-stm32f107/src/stm32_mmcsd.c index 0ca39d6b062bcea91461b6f6a5f2cafdabd55619..d40b86899ca2169550348feae8ddd6b7ca4bd553 100644 --- a/configs/viewtool-stm32f107/src/stm32_mmcsd.c +++ b/configs/viewtool-stm32f107/src/stm32_mmcsd.c @@ -100,22 +100,22 @@ int stm32_sdinitialize(int minor) sdio = sdio_initialize(STM32_MMCSDSLOTNO); if (!sdio) { - fdbg("Failed to initialize SDIO slot %d\n", STM32_MMCSDSLOTNO); + ferr("ERROR: Failed to initialize SDIO slot %d\n", STM32_MMCSDSLOTNO); return -ENODEV; } - fvdbg("Initialized SDIO slot %d\n", STM32_MMCSDSLOTNO); + finfo("Initialized SDIO slot %d\n", STM32_MMCSDSLOTNO); /* Now bind the SDIO interface to the MMC/SD driver */ ret = mmcsd_slotinitialize(minor, sdio); if (ret != OK) { - fdbg("Failed to bind SDIO slot %d to the MMC/SD driver, minor=%d\n", - STM32_MMCSDSLOTNO, minor); + ferr("ERROR: Failed to bind SDIO slot %d to the MMC/SD driver, minor=%d\n", + STM32_MMCSDSLOTNO, minor); } - fvdbg("Bound SDIO slot %d to the MMC/SD driver, minor=%d\n", + finfo("Bound SDIO slot %d to the MMC/SD driver, minor=%d\n", STM32_MMCSDSLOTNO, minor); /* Then let's guess and say that there is a card in the slot. I need to check to diff --git a/configs/viewtool-stm32f107/src/stm32_mpl115a.c b/configs/viewtool-stm32f107/src/stm32_mpl115a.c index 45cce7e9c5ec6474344406fa1e881f2679c264d1..487f7392f41ea5adecdf7863a8d458945c902d8b 100644 --- a/configs/viewtool-stm32f107/src/stm32_mpl115a.c +++ b/configs/viewtool-stm32f107/src/stm32_mpl115a.c @@ -92,7 +92,7 @@ int stm32_mpl115ainitialize(FAR const char *devpath) ret = mpl115a_register(devpath, spi); if (ret < 0) { - sndbg("Error registering MPL115A\n"); + snerr("ERROR: Error registering MPL115A\n"); } return ret; diff --git a/configs/viewtool-stm32f107/src/stm32_spi.c b/configs/viewtool-stm32f107/src/stm32_spi.c index 6f9cca78b213f8f001bb1c2a899a131814fb9f7b..3e8996f3afa0b76a443b9bf80c2331103267fc4f 100644 --- a/configs/viewtool-stm32f107/src/stm32_spi.c +++ b/configs/viewtool-stm32f107/src/stm32_spi.c @@ -53,32 +53,6 @@ #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG too) */ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -141,7 +115,7 @@ void weak_function stm32_spidev_initialize(void) #ifdef CONFIG_STM32_SPI1 void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -153,7 +127,7 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI2 void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); #ifdef CONFIG_INPUT_ADS7843E /* Select/de-select the touchscreen */ @@ -174,7 +148,7 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_STM32_SPI3 void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); } uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) diff --git a/configs/viewtool-stm32f107/src/stm32_ssd1289.c b/configs/viewtool-stm32f107/src/stm32_ssd1289.c index c938e80852d0730dfd3f48a4145a8445430eae18..de4d3a57a8626972adf46ee4425ddc44bb29096a 100644 --- a/configs/viewtool-stm32f107/src/stm32_ssd1289.c +++ b/configs/viewtool-stm32f107/src/stm32_ssd1289.c @@ -64,20 +64,6 @@ # error "CONFIG_STM32_FSMC is required to use the LCD" #endif -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must - * also be enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif - /* Color depth and format */ #define LCD_BPP 16 @@ -101,20 +87,6 @@ #define LCD_INDEX 0x60000000 /* RS = 0 */ #define LCD_DATA 0x60020000 /* RS = 1 */ -/* Debug ******************************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - -/************************************************************************************** - * Private Type Definition - **************************************************************************************/ - /************************************************************************************** * Private Function Prototypes **************************************************************************************/ @@ -425,26 +397,26 @@ static void init_lcd_backlight(void) /* Dump timer3 registers */ - lcddbg("APB1ENR: %08x\n", getreg32(STM32_RCC_APB1ENR)); - lcddbg("CR1: %04x\n", getreg32(STM32_TIM3_CR1)); - lcddbg("CR2: %04x\n", getreg32(STM32_TIM3_CR2)); - lcddbg("SMCR: %04x\n", getreg32(STM32_TIM3_SMCR)); - lcddbg("DIER: %04x\n", getreg32(STM32_TIM3_DIER)); - lcddbg("SR: %04x\n", getreg32(STM32_TIM3_SR)); - lcddbg("EGR: %04x\n", getreg32(STM32_TIM3_EGR)); - lcddbg("CCMR1: %04x\n", getreg32(STM32_TIM3_CCMR1)); - lcddbg("CCMR2: %04x\n", getreg32(STM32_TIM3_CCMR2)); - lcddbg("CCER: %04x\n", getreg32(STM32_TIM3_CCER)); - lcddbg("CNT: %04x\n", getreg32(STM32_TIM3_CNT)); - lcddbg("PSC: %04x\n", getreg32(STM32_TIM3_PSC)); - lcddbg("ARR: %04x\n", getreg32(STM32_TIM3_ARR)); - lcddbg("CCR1: %04x\n", getreg32(STM32_TIM3_CCR1)); - lcddbg("CCR2: %04x\n", getreg32(STM32_TIM3_CCR2)); - lcddbg("CCR3: %04x\n", getreg32(STM32_TIM3_CCR3)); - lcddbg("CCR4: %04x\n", getreg32(STM32_TIM3_CCR4)); - lcddbg("CCR4: %04x\n", getreg32(STM32_TIM3_CCR4)); - lcddbg("CCR4: %04x\n", getreg32(STM32_TIM3_CCR4)); - lcddbg("DMAR: %04x\n", getreg32(STM32_TIM3_DMAR)); + lcdinfo("APB1ENR: %08x\n", getreg32(STM32_RCC_APB1ENR)); + lcdinfo("CR1: %04x\n", getreg32(STM32_TIM3_CR1)); + lcdinfo("CR2: %04x\n", getreg32(STM32_TIM3_CR2)); + lcdinfo("SMCR: %04x\n", getreg32(STM32_TIM3_SMCR)); + lcdinfo("DIER: %04x\n", getreg32(STM32_TIM3_DIER)); + lcdinfo("SR: %04x\n", getreg32(STM32_TIM3_SR)); + lcdinfo("EGR: %04x\n", getreg32(STM32_TIM3_EGR)); + lcdinfo("CCMR1: %04x\n", getreg32(STM32_TIM3_CCMR1)); + lcdinfo("CCMR2: %04x\n", getreg32(STM32_TIM3_CCMR2)); + lcdinfo("CCER: %04x\n", getreg32(STM32_TIM3_CCER)); + lcdinfo("CNT: %04x\n", getreg32(STM32_TIM3_CNT)); + lcdinfo("PSC: %04x\n", getreg32(STM32_TIM3_PSC)); + lcdinfo("ARR: %04x\n", getreg32(STM32_TIM3_ARR)); + lcdinfo("CCR1: %04x\n", getreg32(STM32_TIM3_CCR1)); + lcdinfo("CCR2: %04x\n", getreg32(STM32_TIM3_CCR2)); + lcdinfo("CCR3: %04x\n", getreg32(STM32_TIM3_CCR3)); + lcdinfo("CCR4: %04x\n", getreg32(STM32_TIM3_CCR4)); + lcdinfo("CCR4: %04x\n", getreg32(STM32_TIM3_CCR4)); + lcdinfo("CCR4: %04x\n", getreg32(STM32_TIM3_CCR4)); + lcdinfo("DMAR: %04x\n", getreg32(STM32_TIM3_DMAR)); } /************************************************************************************ @@ -548,7 +520,7 @@ int board_lcd_initialize(void) if (!g_ssd1289drvr) { - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); /* Initialize the backlight */ @@ -564,7 +536,7 @@ int board_lcd_initialize(void) g_ssd1289drvr = ssd1289_lcdinitialize(&g_ssd1289); if (!g_ssd1289drvr) { - lcddbg("ERROR: ssd1289_lcdinitialize failed\n"); + lcderr("ERROR: ssd1289_lcdinitialize failed\n"); return -ENODEV; } } diff --git a/configs/viewtool-stm32f107/src/stm32_touchscreen.c b/configs/viewtool-stm32f107/src/stm32_touchscreen.c index 7106fcdc96face8ef286a555c6a683e53463f3cc..6abba71e5cda62a71d652e8429a0a2a8c7fd6f54 100644 --- a/configs/viewtool-stm32f107/src/stm32_touchscreen.c +++ b/configs/viewtool-stm32f107/src/stm32_touchscreen.c @@ -173,12 +173,12 @@ static int tsc_attach(FAR struct ads7843e_config_s *state, xcpt_t isr) * be attached when the interrupt is next enabled. */ - ivdbg("Attaching %p\n", isr); + iinfo("Attaching %p\n", isr); priv->handler = isr; } else { - ivdbg("Detaching %p\n", priv->handler); + iinfo("Detaching %p\n", priv->handler); tsc_enable(state, false); priv->handler = NULL; } @@ -228,7 +228,7 @@ static bool tsc_pendown(FAR struct ads7843e_config_s *state) /* The /PENIRQ value is active low */ bool pendown = !stm32_gpioread(GPIO_LCDTP_IRQ); - ivdbg("pendown=%d\n", pendown); + iinfo("pendown=%d\n", pendown); return pendown; } @@ -260,7 +260,7 @@ int board_tsc_setup(int minor) static bool initialized = false; int ret; - idbg("minor %d\n", minor); + iinfo("minor %d\n", minor); DEBUGASSERT(minor == 0); /* Have we already initialized? Since we never uninitialize we must prevent @@ -280,7 +280,7 @@ int board_tsc_setup(int minor) dev = stm32_spibus_initialize(TSC_DEVNUM); if (!dev) { - idbg("Failed to initialize SPI%d\n", TSC_DEVNUM); + ierr("ERROR: Failed to initialize SPI%d\n", TSC_DEVNUM); return -ENODEV; } @@ -289,7 +289,7 @@ int board_tsc_setup(int minor) ret = ads7843e_register(dev, &g_tscinfo.config, CONFIG_ADS7843E_DEVMINOR); if (ret < 0) { - idbg("Failed to register touchscreen device\n"); + ierr("ERROR: Failed to register touchscreen device\n"); /* up_spiuninitialize(dev); */ return -ENODEV; } diff --git a/configs/viewtool-stm32f107/src/stm32_usbdev.c b/configs/viewtool-stm32f107/src/stm32_usbdev.c index 1c35e9bb505aa96835d2231f75445d101b0a44b8..cd7b9acaab0ba4967cc2c918d6c9513515310300 100644 --- a/configs/viewtool-stm32f107/src/stm32_usbdev.c +++ b/configs/viewtool-stm32f107/src/stm32_usbdev.c @@ -118,7 +118,7 @@ int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) { - ulldbg("resume: %d\n", resume); + uinfo("resume: %d\n", resume); } #endif /* CONFIG_STM32_OTGFS || CONFIG_STM32_USB*/ diff --git a/configs/xtrs/nsh/defconfig b/configs/xtrs/nsh/defconfig index fed3d18a034b2e8af045d2b50b9b8c70d585f0ee..13aa287939f80ae249e0ad242d7c6e8388392714 100644 --- a/configs/xtrs/nsh/defconfig +++ b/configs/xtrs/nsh/defconfig @@ -43,7 +43,7 @@ CONFIG_WINDOWS_NATIVE=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_DEBUG_SYMBOLS is not set # @@ -242,7 +242,6 @@ CONFIG_UART_2STOP=0 # # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/xtrs/ostest/defconfig b/configs/xtrs/ostest/defconfig index d0f9abadd0d90bb5e432d77fca016affcf84c791..c20eb517ce6123688787a49cdcddded1bd7d4053 100644 --- a/configs/xtrs/ostest/defconfig +++ b/configs/xtrs/ostest/defconfig @@ -43,7 +43,7 @@ CONFIG_WINDOWS_NATIVE=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_DEBUG_SYMBOLS is not set # @@ -241,7 +241,6 @@ CONFIG_UART_2STOP=0 # # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/xtrs/pashello/defconfig b/configs/xtrs/pashello/defconfig index eeceb9e5829b4f85c83a97333b3f5740adf80acc..b3fd7fdd938eb16d89a635333157accfaafecb67 100644 --- a/configs/xtrs/pashello/defconfig +++ b/configs/xtrs/pashello/defconfig @@ -43,7 +43,7 @@ CONFIG_WINDOWS_NATIVE=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_DEBUG_SYMBOLS is not set # @@ -241,7 +241,6 @@ CONFIG_UART_2STOP=0 # # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/z16f2800100zcog/nsh/defconfig b/configs/z16f2800100zcog/nsh/defconfig index fe61c46aa11b8786a5a94965f3bffcfe844cb1c7..3066f732cb88717b2db324301a9f9eac9d5763dc 100644 --- a/configs/z16f2800100zcog/nsh/defconfig +++ b/configs/z16f2800100zcog/nsh/defconfig @@ -44,10 +44,10 @@ CONFIG_WINDOWS_CYGWIN=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_STACKCHECK is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set -# CONFIG_DEBUG_VERBOSE is not set +# CONFIG_DEBUG_INFO is not set # # Subsystem Debug Options @@ -399,7 +399,6 @@ CONFIG_UART1_2STOP=0 # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/z16f2800100zcog/ostest/defconfig b/configs/z16f2800100zcog/ostest/defconfig index 6ee164a4eaf84288f5dff5d700bd21b14428715a..9f93e39aef6aec3222e2b2f601226ce1d601c620 100644 --- a/configs/z16f2800100zcog/ostest/defconfig +++ b/configs/z16f2800100zcog/ostest/defconfig @@ -41,10 +41,10 @@ CONFIG_WINDOWS_CYGWIN=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_STACKCHECK is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set -# CONFIG_DEBUG_VERBOSE is not set +# CONFIG_DEBUG_INFO is not set # # Subsystem Debug Options @@ -335,7 +335,6 @@ CONFIG_UART1_2STOP=0 # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/z16f2800100zcog/pashello/defconfig b/configs/z16f2800100zcog/pashello/defconfig index 3d4744e090823325793c4866d913556626295240..f54291837818bb1b32c3e40f13a2d287575e4340 100644 --- a/configs/z16f2800100zcog/pashello/defconfig +++ b/configs/z16f2800100zcog/pashello/defconfig @@ -41,8 +41,8 @@ CONFIG_WINDOWS_CYGWIN=y # # Debug Options # -CONFIG_DEBUG=y -# CONFIG_DEBUG_VERBOSE is not set +CONFIG_DEBUG_FEATURES=y +# CONFIG_DEBUG_INFO is not set # @@ -280,7 +280,6 @@ CONFIG_UART1_2STOP=0 # # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/z80sim/nsh/defconfig b/configs/z80sim/nsh/defconfig index ab5c5da665c5256ccc337a1d131cf714619ba116..97413cca42c2fd34d97d3daa2e64ed726f28040d 100644 --- a/configs/z80sim/nsh/defconfig +++ b/configs/z80sim/nsh/defconfig @@ -43,7 +43,7 @@ CONFIG_WINDOWS_NATIVE=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_DEBUG_SYMBOLS is not set # @@ -242,7 +242,6 @@ CONFIG_UART_2STOP=0 # # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/z80sim/ostest/defconfig b/configs/z80sim/ostest/defconfig index dc0a04bc13f4195efbb637cfb5976cc339018054..1e9c2f2185f915c88c7f513f0b76403be3bec649 100644 --- a/configs/z80sim/ostest/defconfig +++ b/configs/z80sim/ostest/defconfig @@ -43,7 +43,7 @@ CONFIG_WINDOWS_NATIVE=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_DEBUG_SYMBOLS is not set # @@ -241,7 +241,6 @@ CONFIG_UART_2STOP=0 # # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/z80sim/pashello/defconfig b/configs/z80sim/pashello/defconfig index 4a702c2638925d23ca1fd004aa1ed9ffaa85818c..5215e22846a00452e2f0e8045d5cedf464ec2db2 100644 --- a/configs/z80sim/pashello/defconfig +++ b/configs/z80sim/pashello/defconfig @@ -43,7 +43,7 @@ CONFIG_WINDOWS_NATIVE=y # # Debug Options # -# CONFIG_DEBUG is not set +# CONFIG_DEBUG_FEATURES is not set # CONFIG_DEBUG_SYMBOLS is not set # @@ -240,7 +240,6 @@ CONFIG_UART_2STOP=0 # # System Logging # -# CONFIG_SYSLOG is not set # # Graphics Support diff --git a/configs/z8encore000zco/ostest/defconfig b/configs/z8encore000zco/ostest/defconfig index aa8fc95358881eb01cb1e34d689b27a68dcfe81b..499f1d6ea8534263e7fd75c3701fc2d9b9e25418 100644 --- a/configs/z8encore000zco/ostest/defconfig +++ b/configs/z8encore000zco/ostest/defconfig @@ -46,9 +46,9 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_HEAPCHECK is not set -# CONFIG_DEBUG_VERBOSE is not set +# CONFIG_DEBUG_INFO is not set # # Subsystem Debug Options @@ -433,7 +433,7 @@ CONFIG_UART1_2STOP=0 # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -466,7 +466,6 @@ CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/z8f64200100kit/ostest/defconfig b/configs/z8f64200100kit/ostest/defconfig index df99499d711c54bab7fec3f5e03d2a6a123c32de..0d9e7ba4e7e3d982cb8607bb78b80d4f88222b99 100644 --- a/configs/z8f64200100kit/ostest/defconfig +++ b/configs/z8f64200100kit/ostest/defconfig @@ -46,9 +46,9 @@ CONFIG_BUILD_FLAT=y # # Debug Options # -CONFIG_DEBUG=y +CONFIG_DEBUG_FEATURES=y # CONFIG_ARCH_HAVE_HEAPCHECK is not set -# CONFIG_DEBUG_VERBOSE is not set +# CONFIG_DEBUG_INFO is not set # # Subsystem Debug Options @@ -434,7 +434,7 @@ CONFIG_UART1_2STOP=0 # System Logging # # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_CONSOLE_SYSLOG is not set # # Networking Support @@ -467,7 +467,6 @@ CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y # # System Logging # -# CONFIG_SYSLOG is not set # CONFIG_SYSLOG_TIMESTAMP is not set # diff --git a/configs/zkit-arm-1769/README.txt b/configs/zkit-arm-1769/README.txt index 7c27c53144750e63841457d07f37ae449d227400..b645c7f6b249a655d5d9c5555c0eb59bb9f7e4b3 100644 --- a/configs/zkit-arm-1769/README.txt +++ b/configs/zkit-arm-1769/README.txt @@ -469,9 +469,9 @@ ZKit-ARM Configuration Options CONFIG_NET_NRXDESC - Configured number of Rx descriptors. Default: 18 CONFIG_NET_WOL - Enable Wake-up on Lan (not fully implemented). CONFIG_NET_REGDEBUG - Enabled low level register debug. Also needs - CONFIG_DEBUG. + CONFIG_DEBUG_FEATURES. CONFIG_NET_DUMPPACKET - Dump all received and transmitted packets. - Also needs CONFIG_DEBUG. + Also needs CONFIG_DEBUG_FEATURES. CONFIG_NET_HASH - Enable receipt of near-perfect match frames. CONFIG_LPC17_MULTICAST - Enable receipt of multicast (and unicast) frames. Automatically set if CONFIG_NET_IGMP is selected. diff --git a/configs/zkit-arm-1769/hello/defconfig b/configs/zkit-arm-1769/hello/defconfig index 4cbbb539541049de8e7cce19a0f8ffde36f136c5..183e232cfb6a0289000bc8f86de9c02835c6ccf1 100644 --- a/configs/zkit-arm-1769/hello/defconfig +++ b/configs/zkit-arm-1769/hello/defconfig @@ -37,14 +37,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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 @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -102,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="lpc17xx" +# 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 # @@ -119,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -224,11 +243,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -273,6 +295,7 @@ CONFIG_RAM_SIZE=32768 # # CONFIG_ARCH_BOARD_LPCXPRESSO is not set # CONFIG_ARCH_BOARD_MBED is not set +# CONFIG_ARCH_BOARD_U_BLOX_C027 is not set CONFIG_ARCH_BOARD_ZKITARM=y # CONFIG_ARCH_BOARD_CUSTOM is not set CONFIG_ARCH_BOARD="zkit-arm-1769" @@ -321,6 +344,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="hello_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 @@ -351,6 +375,7 @@ CONFIG_NAME_MAX=32 # 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 @@ -359,9 +384,10 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGWORK=17 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_HPWORK=y @@ -395,6 +421,7 @@ CONFIG_DEV_NULL=y # 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 @@ -412,8 +439,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y @@ -421,7 +463,11 @@ CONFIG_NETDEVICES=y # # General Ethernet MAC Driver Options # +# CONFIG_NETDEV_LOOPBACK is not set +# CONFIG_NETDEV_TELNET is not set # CONFIG_NETDEV_MULTINIC is not set +CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y +# CONFIG_NETDEV_LATEINIT is not set # # External Ethernet MAC Device Support @@ -431,6 +477,7 @@ CONFIG_NETDEVICES=y # CONFIG_ENCX24J600 is not set # CONFIG_NET_E1000 is not set # CONFIG_NET_SLIP is not set +# CONFIG_NET_FTMAC100 is not set # CONFIG_NET_VNET is not set # @@ -449,6 +496,7 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_ETH0_PHY_LAN8720 is not set # CONFIG_ETH0_PHY_LAN8740 is not set # CONFIG_ETH0_PHY_LAN8740A is not set +# CONFIG_ETH0_PHY_LAN8742A is not set # CONFIG_ETH0_PHY_DM9161 is not set # CONFIG_PIPES is not set # CONFIG_PM is not set @@ -457,6 +505,8 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -480,13 +530,10 @@ CONFIG_UART0_SERIALDRIVER=y # 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_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_SERIAL_DMA is not set CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -503,19 +550,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -539,6 +590,7 @@ CONFIG_NET_GUARDSIZE=2 # # CONFIG_NET_MULTILINK is not set CONFIG_NET_ETHERNET=y +# CONFIG_NET_LOOPBACK is not set # CONFIG_NET_TUN is not set # @@ -624,6 +676,7 @@ CONFIG_IOB_NCHAINS=8 # Routing Table Configuration # # CONFIG_NET_ROUTE is not set +CONFIG_NET_HOSTNAME="" # # Crypto API @@ -647,16 +700,11 @@ CONFIG_FS_READABLE=y # CONFIG_FS_FAT 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_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 # @@ -675,6 +723,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -718,10 +770,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -736,14 +793,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -751,11 +807,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_FTPC is not set # CONFIG_EXAMPLES_FTPD is not set CONFIG_EXAMPLES_HELLO=y -# CONFIG_EXAMPLES_HELLOXX is not set -# CONFIG_EXAMPLES_JSON is not set +CONFIG_EXAMPLES_HELLO_PRIORITY=100 +CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 # CONFIG_EXAMPLES_HIDKBD is not set -# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -764,19 +822,20 @@ CONFIG_EXAMPLES_HELLO=y # CONFIG_EXAMPLES_NSH is not set # 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD 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 @@ -785,19 +844,30 @@ CONFIG_EXAMPLES_HELLO=y # 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_THTTPD is not set # CONFIG_EXAMPLES_TIFF is not set # 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 +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # CONFIG_EXAMPLES_XMLRPC 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 # @@ -809,33 +879,31 @@ CONFIG_EXAMPLES_HELLO=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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_FTPD is not set # CONFIG_NETUTILS_JSON is not set +# CONFIG_NETUTILS_NETLIB is not set # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set # CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_NETLIB is not set # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # @@ -853,15 +921,16 @@ CONFIG_EXAMPLES_HELLO=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_POWEROFF is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/zkit-arm-1769/nsh/defconfig b/configs/zkit-arm-1769/nsh/defconfig index 250f73fecf090037be4f3ccf4fe621c81ed9a7cb..10d3e9835744ae947714a175995757be5e5e3cab 100644 --- a/configs/zkit-arm-1769/nsh/defconfig +++ b/configs/zkit-arm-1769/nsh/defconfig @@ -37,14 +37,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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 @@ -93,7 +96,9 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -104,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="lpc17xx" +# 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 # @@ -121,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -226,6 +243,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set CONFIG_ARCH_HAVE_MPU=y @@ -277,6 +295,7 @@ CONFIG_RAM_SIZE=32768 # # CONFIG_ARCH_BOARD_LPCXPRESSO is not set # CONFIG_ARCH_BOARD_MBED is not set +# CONFIG_ARCH_BOARD_U_BLOX_C027 is not set CONFIG_ARCH_BOARD_ZKITARM=y # CONFIG_ARCH_BOARD_CUSTOM is not set CONFIG_ARCH_BOARD="zkit-arm-1769" @@ -372,6 +391,7 @@ CONFIG_NAME_MAX=32 # 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 @@ -387,9 +407,10 @@ CONFIG_SIG_SIGWORK=17 # CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_HPWORK=y @@ -433,6 +454,10 @@ CONFIG_SPI=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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -446,7 +471,21 @@ CONFIG_SPI=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -458,6 +497,7 @@ CONFIG_MMCSD_SPICLOCK=12500000 CONFIG_MMCSD_SPIMODE=0 # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set # CONFIG_MTD is not set # CONFIG_EEPROM is not set CONFIG_NETDEVICES=y @@ -509,6 +549,8 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -532,10 +574,6 @@ CONFIG_UART0_SERIALDRIVER=y # 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 @@ -562,15 +600,18 @@ CONFIG_UART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -713,7 +754,9 @@ 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_NFS is not set # CONFIG_FS_NXFFS is not set # CONFIG_FS_ROMFS is not set @@ -722,12 +765,6 @@ CONFIG_FAT_MAXFNAME=32 # 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 # @@ -746,6 +783,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -791,6 +832,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 @@ -798,12 +841,14 @@ CONFIG_NETDB_DNSCLIENT_ENTRIES=8 CONFIG_NETDB_DNSCLIENT_NAMESIZE=32 CONFIG_NETDB_DNSCLIENT_LIFESEC=3600 CONFIG_NETDB_DNSCLIENT_MAXRESPONSE=96 +# CONFIG_NETDB_RESOLVCONF is not set CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_NETDB_DNSSERVER_IPv4 is not set # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -824,18 +869,20 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # 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_DISCOVER is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FSTEST 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set # CONFIG_EXAMPLES_MODBUS is not set @@ -845,18 +892,19 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y 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_NXTERM 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_PPPD 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 @@ -864,22 +912,29 @@ CONFIG_EXAMPLES_NSH=y # 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_UDP is not set # 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_WEBSERVER is not set # CONFIG_EXAMPLES_WGET 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 @@ -892,8 +947,8 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -906,25 +961,27 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CODECS is not set CONFIG_NETUTILS_DHCPC=y # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -943,6 +1000,7 @@ CONFIG_NSH_NESTDEPTH=3 # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_ARP is not set # CONFIG_NSH_DISABLE_BASENAME is not set # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set @@ -985,6 +1043,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 @@ -1017,6 +1076,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1046,6 +1106,8 @@ CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048 CONFIG_NSH_TELNETD_CLIENTPRIO=100 CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048 CONFIG_NSH_IOBUFFER_SIZE=512 +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # CONFIG_NSH_TELNET_LOGIN is not set # @@ -1060,13 +1122,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1075,5 +1136,6 @@ 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/zkit-arm-1769/nxhello/defconfig b/configs/zkit-arm-1769/nxhello/defconfig index fb677a4b2f2bfd18248fbdfd06a5c63e3f297c63..6412e6686fd84de0f0e965949cc6016f07a9a43b 100644 --- a/configs/zkit-arm-1769/nxhello/defconfig +++ b/configs/zkit-arm-1769/nxhello/defconfig @@ -37,14 +37,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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 @@ -93,7 +96,9 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -104,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="lpc17xx" +# 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 # @@ -121,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -226,6 +243,7 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set CONFIG_ARCH_HAVE_MPU=y @@ -277,6 +295,7 @@ CONFIG_RAM_SIZE=32768 # # CONFIG_ARCH_BOARD_LPCXPRESSO is not set # CONFIG_ARCH_BOARD_MBED is not set +# CONFIG_ARCH_BOARD_U_BLOX_C027 is not set CONFIG_ARCH_BOARD_ZKITARM=y # CONFIG_ARCH_BOARD_CUSTOM is not set CONFIG_ARCH_BOARD="zkit-arm-1769" @@ -372,6 +391,7 @@ CONFIG_NAME_MAX=32 # 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 @@ -387,9 +407,10 @@ CONFIG_SIG_SIGWORK=17 # CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_HPWORK=y @@ -433,6 +454,10 @@ CONFIG_SPI=y CONFIG_SPI_CMDDATA=y # 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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -446,10 +471,15 @@ CONFIG_SPI_CMDDATA=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set # CONFIG_LCD_NOGETRUN is not set @@ -484,11 +514,15 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set # CONFIG_LCD_RA8875 is not set +# CONFIG_SLCD is not set # -# Alphanumeric/Segment LCD Devices +# LED Support # -# CONFIG_LCD_LCD1602 is not set +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C is not set CONFIG_MMCSD=y CONFIG_MMCSD_NSLOTS=1 # CONFIG_MMCSD_READONLY is not set @@ -500,6 +534,7 @@ CONFIG_MMCSD_SPICLOCK=12500000 CONFIG_MMCSD_SPIMODE=0 # CONFIG_ARCH_HAVE_SDIO is not set # CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +# CONFIG_MODEM is not set # CONFIG_MTD is not set # CONFIG_EEPROM is not set CONFIG_NETDEVICES=y @@ -551,6 +586,8 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -574,10 +611,6 @@ CONFIG_UART0_SERIALDRIVER=y # 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 @@ -604,15 +637,18 @@ CONFIG_UART0_2STOP=0 # CONFIG_USBHOST is not set # CONFIG_DRIVERS_WIRELESS is not set -# -# System Logging Device Options -# - # # System Logging # +# CONFIG_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -759,12 +795,6 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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 # @@ -773,6 +803,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 @@ -871,6 +902,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -914,6 +949,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 @@ -926,6 +963,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -946,17 +984,19 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # # 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_DISCOVER 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW is not set # CONFIG_EXAMPLES_MEDIA is not set # CONFIG_EXAMPLES_MM is not set @@ -967,7 +1007,6 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_EXAMPLES_NSH is not set # 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=y CONFIG_EXAMPLES_NXHELLO_VPLANE=0 @@ -988,13 +1027,15 @@ 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_NXTERM 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_PPPD 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 @@ -1002,22 +1043,28 @@ CONFIG_EXAMPLES_NXHELLO_DEFAULT_FONT=y # 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_UDP is not set # 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_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # # File System Utilities # +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -1029,8 +1076,8 @@ CONFIG_EXAMPLES_NXHELLO_DEFAULT_FONT=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # # FreeModBus @@ -1043,25 +1090,27 @@ CONFIG_EXAMPLES_NXHELLO_DEFAULT_FONT=y # CONFIG_NETUTILS_CODECS is not set CONFIG_NETUTILS_DHCPC=y # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_DISCOVER is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y +# CONFIG_NETUTILS_NTPCLIENT is not set +# CONFIG_NETUTILS_PPPD is not set # CONFIG_NETUTILS_SMTP is not set CONFIG_NETUTILS_TELNETD=y CONFIG_NETUTILS_TFTPC=y -CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)" CONFIG_WEBCLIENT_TIMEOUT=10 # CONFIG_NETUTILS_WEBSERVER is not set -# CONFIG_NETUTILS_NTPCLIENT is not set -# CONFIG_NETUTILS_DISCOVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# CONFIG_NETUTILS_PPPD is not set # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -1080,6 +1129,7 @@ CONFIG_NSH_NESTDEPTH=3 # Disable Individual commands # # CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_ARP is not set # CONFIG_NSH_DISABLE_BASENAME is not set # CONFIG_NSH_DISABLE_CAT is not set # CONFIG_NSH_DISABLE_CD is not set @@ -1121,6 +1171,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 @@ -1153,6 +1204,7 @@ CONFIG_NSH_ARCHINIT=y # # Networking Configuration # +CONFIG_NSH_NETINIT=y # CONFIG_NSH_NETINIT_THREAD is not set # @@ -1182,6 +1234,8 @@ CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048 CONFIG_NSH_TELNETD_CLIENTPRIO=100 CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048 CONFIG_NSH_IOBUFFER_SIZE=512 +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # CONFIG_NSH_TELNET_LOGIN is not set # @@ -1196,13 +1250,12 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set # CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set CONFIG_READLINE_HAVE_EXTMATCH=y @@ -1211,5 +1264,6 @@ 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/zkit-arm-1769/src/lpc17_adc.c b/configs/zkit-arm-1769/src/lpc17_adc.c index 091d859bd6b7c83442cb879b703091b06720ab81..3d3628ea9cbe143c257065e2dc6ec4cb3ac5f46f 100644 --- a/configs/zkit-arm-1769/src/lpc17_adc.c +++ b/configs/zkit-arm-1769/src/lpc17_adc.c @@ -99,7 +99,7 @@ int board_adc_setup(void) adc = lpc17_adcinitialize(); if (adc == NULL) { - adbg("ERROR: Failed to get ADC interface\n"); + aerr("ERROR: ERROR: Failed to get ADC interface\n"); return -ENODEV; } @@ -108,7 +108,7 @@ int board_adc_setup(void) ret = adc_register("/dev/adc0", adc); if (ret < 0) { - adbg("adc_register failed: %d\n", ret); + aerr("ERROR: adc_register failed: %d\n", ret); return ret; } diff --git a/configs/zkit-arm-1769/src/lpc17_appinit.c b/configs/zkit-arm-1769/src/lpc17_appinit.c index 9817d76c336098a394c44e6738e039553bffdc78..3854e0d1c4651856c22f72122eef21404975d5bf 100644 --- a/configs/zkit-arm-1769/src/lpc17_appinit.c +++ b/configs/zkit-arm-1769/src/lpc17_appinit.c @@ -116,14 +116,14 @@ /* Debug ********************************************************************/ #ifdef CONFIG_CPP_HAVE_VARARGS -# ifdef CONFIG_DEBUG -# define message(...) lib_lowprintf(__VA_ARGS__) +# ifdef CONFIG_DEBUG_INFO +# define message(...) _info(__VA_ARGS__) # else # define message(...) printf(__VA_ARGS__) # endif #else -# ifdef CONFIG_DEBUG -# define message lib_lowprintf +# ifdef CONFIG_DEBUG_INFO +# define message _info # else # define message printf # endif diff --git a/configs/zkit-arm-1769/src/lpc17_can.c b/configs/zkit-arm-1769/src/lpc17_can.c index 4d63da365bdcb3d0dd68948a7fda31101194587c..0bdba84446571935e0df360ff3b0c7efc417472e 100644 --- a/configs/zkit-arm-1769/src/lpc17_can.c +++ b/configs/zkit-arm-1769/src/lpc17_can.c @@ -62,29 +62,10 @@ * Pre-processor Definitions ************************************************************************************/ /* Configuration ********************************************************************/ + #define CAN_PORT1 1 #define CAN_PORT2 2 - -/* 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 - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -114,7 +95,7 @@ int board_can_initialize(void) can = lpc17_caninitialize(CAN_PORT1); if (can == NULL) { - candbg("ERROR: Failed to get CAN1 interface\n"); + canerr("ERROR: Failed to get CAN1 interface\n"); return -ENODEV; } @@ -123,7 +104,7 @@ int board_can_initialize(void) ret = can_register("/dev/can0", can); if (ret < 0) { - candbg("ERROR: CAN1 register failed: %d\n", ret); + canerr("ERROR: CAN1 register failed: %d\n", ret); return ret; } #endif @@ -134,7 +115,7 @@ int board_can_initialize(void) can = lpc17_caninitialize(CAN_PORT2); if (can == NULL) { - candbg("ERROR: Failed to get CAN2 interface\n"); + canerr("ERROR: Failed to get CAN2 interface\n"); return -ENODEV; } @@ -143,7 +124,7 @@ int board_can_initialize(void) ret = can_register("/dev/can1", can); if (ret < 0) { - candbg("ERROR: CAN2 register failed: %d\n", ret); + canerr("ERROR: CAN2 register failed: %d\n", ret); return ret; } #endif diff --git a/configs/zkit-arm-1769/src/lpc17_dac.c b/configs/zkit-arm-1769/src/lpc17_dac.c index 3f3362cd4716c8ef7e40cbf0d3a05ffadd67e0c3..70616d39a45193a2b5aa39cde9cc1266aa97e834 100644 --- a/configs/zkit-arm-1769/src/lpc17_dac.c +++ b/configs/zkit-arm-1769/src/lpc17_dac.c @@ -80,14 +80,14 @@ int dac_devinit(void) dac = lpc17_dacinitialize(); if (dac == NULL) { - adbg("ERROR: Failed to get dac interface\n"); + aerr("ERROR: Failed to get dac interface\n"); return -ENODEV; } ret = dac_register("/dev/dac0", dac); if (ret < 0) { - adbg("dac_register failed: %d\n", ret); + aerr("ERROR: dac_register failed: %d\n", ret); return ret; } diff --git a/configs/zkit-arm-1769/src/lpc17_lcd.c b/configs/zkit-arm-1769/src/lpc17_lcd.c index 01bf1d58a8dc95f6fad98c7cec33c1f2c521edf4..f02977316987bde730024182db01ad2cbaf59fe7 100644 --- a/configs/zkit-arm-1769/src/lpc17_lcd.c +++ b/configs/zkit-arm-1769/src/lpc17_lcd.c @@ -64,30 +64,6 @@ #ifdef CONFIG_NX_LCDDRIVER -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Enables debug output from this file (needs CONFIG_DEBUG with - * CONFIG_DEBUG_VERBOSE too) - */ - -#undef LCD_DEBUG /* Define to enable debug */ -#undef LCD_VERBOSE /* Define to enable verbose debug */ - -#ifdef LCD_DEBUG -# define leddbg lldbg -# ifdef LCD_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# undef LCD_VERBOSE -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /**************************************************************************** * Private Data ****************************************************************************/ @@ -95,10 +71,6 @@ FAR struct spi_dev_s *g_spidev; FAR struct lcd_dev_s *g_lcddev; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -118,7 +90,7 @@ int board_lcd_initialize(void) g_spidev = lpc17_sspbus_initialize(0); if (!g_spidev) { - glldbg("Failed to initialize SSP port 0\n"); + lcderr("ERROR: Failed to initialize SSP port 0\n"); return 0; } @@ -137,13 +109,14 @@ FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) g_lcddev = st7567_initialize(g_spidev, lcddev); if (!g_lcddev) { - glldbg("Failed to bind SSI port 0 to OLCD %d: %d\n", lcddev); + lcderr("ERROR: Failed to bind SSI port 0 to OLCD %d: %d\n", lcddev); } else { - gllvdbg("Bound SSI port 0 to OLCD %d\n", lcddev); + lcdinfo("Bound SSI port 0 to OLCD %d\n", lcddev); /* And turn the OLCD on (CONFIG_LCD_MAXPOWER should be 1) */ + (void)g_lcddev->setpower(g_lcddev, CONFIG_LCD_MAXPOWER); return g_lcddev; } diff --git a/configs/zkit-arm-1769/src/lpc17_leds.c b/configs/zkit-arm-1769/src/lpc17_leds.c index 5f8454463d51a3f52754f504d779917bf9de54c7..59c9fd6d838c3468b154f42604e9fe9d5da6b295 100644 --- a/configs/zkit-arm-1769/src/lpc17_leds.c +++ b/configs/zkit-arm-1769/src/lpc17_leds.c @@ -58,26 +58,6 @@ #ifdef CONFIG_ARCH_LEDS -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* CONFIG_DEBUG_LEDS enables debug output from this file (needs CONFIG_DEBUG - * and pherhaps CONFIG_DEBUG_VERBOSE too) - */ - -#ifdef CONFIG_DEBUG_LEDS -# define leddbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define ledvdbg lldbg -# else -# define ledvdbg(x...) -# endif -#else -# define leddbg(x...) -# define ledvdbg(x...) -#endif - /**************************************************************************** * Private Data ****************************************************************************/ diff --git a/configs/zkit-arm-1769/src/lpc17_spi.c b/configs/zkit-arm-1769/src/lpc17_spi.c index 3adb005d89bc340a9bce93c3b31ecae387127f3b..ca01150deedae7ee014e4161a1c859c5138847ec 100644 --- a/configs/zkit-arm-1769/src/lpc17_spi.c +++ b/configs/zkit-arm-1769/src/lpc17_spi.c @@ -63,32 +63,14 @@ * Pre-processor Definitions ************************************************************************************/ -/* CONFIG_DEBUG_SPI enables debug output from this file (needs CONFIG_DEBUG too) */ - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - /* Dump GPIO registers */ -#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_VERBOSE) +#if CONFIG_DEBUG_SPI_INFO # define spi_dumpgpio(m) lpc17_dumpgpio(SDCCS_GPIO, m) #else # define spi_dumpgpio(m) #endif -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -143,7 +125,7 @@ void weak_function zkit_spidev_initialize(void) void lpc17_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); spi_dumpgpio("lpc17_spiselect() Entry"); if (devid == SPIDEV_MMCSD) @@ -164,12 +146,12 @@ uint8_t lpc17_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid) if (lpc17_gpioread(ZKITARM_SD_CD) == 0) { - spidbg("Returning SPI_STATUS_PRESENT\n"); + spiinfo("Returning SPI_STATUS_PRESENT\n"); return SPI_STATUS_PRESENT; } } - spidbg("Returning zero\n"); + spiinfo("Returning zero\n"); return 0; } diff --git a/configs/zkit-arm-1769/src/lpc17_ssp.c b/configs/zkit-arm-1769/src/lpc17_ssp.c index d72192c367d0a620956a92ce82c4a068c8ba5902..2302f15bd81b2b0e8dd83de77a3e31b447f173c1 100644 --- a/configs/zkit-arm-1769/src/lpc17_ssp.c +++ b/configs/zkit-arm-1769/src/lpc17_ssp.c @@ -63,32 +63,14 @@ * Pre-processor Definitions ************************************************************************************/ -/* CONFIG_DEBUG_SPI enables debug output from this file (needs CONFIG_DEBUG too) */ - -#ifdef CONFIG_DEBUG_SPI -# define sspdbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define sspvdbg lldbg -# else -# define sspvdbg(x...) -# endif -#else -# define sspdbg(x...) -# define sspvdbg(x...) -#endif - /* Dump GPIO registers */ -#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_VERBOSE) +#if CONFIG_DEBUG_SPI_INFO # define ssp_dumpgpio(m) lpc17_dumpgpio(SDCCS_GPIO, m) #else # define ssp_dumpgpio(m) #endif -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -146,7 +128,7 @@ void weak_function zkit_sspdev_initialize(void) #ifdef CONFIG_LPC17_SSP1 void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - sspdbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); ssp_dumpgpio("lpc17_ssp1select() Entry"); #warning "Assert CS here (false)" @@ -156,7 +138,7 @@ void lpc17_ssp1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel uint8_t lpc17_ssp1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - sspdbg("Returning SPI_STATUS_PRESENT\n"); + spiinfo("Returning SPI_STATUS_PRESENT\n"); return SPI_STATUS_PRESENT; } @@ -180,7 +162,7 @@ int weak_function lpc17_ssp1cmddata(FAR struct spi_dev_s *dev, #ifdef CONFIG_LPC17_SSP0 void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - sspdbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); + spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); ssp_dumpgpio("lpc17_ssp0select() Entry"); #ifdef CONFIG_NX_LCDDRIVER @@ -199,11 +181,11 @@ uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { if (devid == SPIDEV_DISPLAY) { - sspdbg("Returning SPI_STATUS_PRESENT\n"); + spiinfo("Returning SPI_STATUS_PRESENT\n"); return SPI_STATUS_PRESENT; } - sspdbg("Returning zero\n"); + spiinfo("Returning zero\n"); return 0; } diff --git a/configs/zkit-arm-1769/thttpd/defconfig b/configs/zkit-arm-1769/thttpd/defconfig index 5f7f9ab01a813fd62313c083f8cbf2ab11ed57a8..124e511bfc079b177827fb738102dd4c5006e0b4 100644 --- a/configs/zkit-arm-1769/thttpd/defconfig +++ b/configs/zkit-arm-1769/thttpd/defconfig @@ -37,14 +37,16 @@ CONFIG_INTELHEX_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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 @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_LPC17XX=y # 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 @@ -102,14 +109,25 @@ CONFIG_ARCH_CORTEXM3=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="lpc17xx" +# 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 # @@ -119,6 +137,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=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 @@ -224,11 +243,14 @@ CONFIG_ARCH_HAVE_IRQPRIO=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 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 @@ -273,6 +295,7 @@ CONFIG_RAM_SIZE=32768 # # CONFIG_ARCH_BOARD_LPCXPRESSO is not set # CONFIG_ARCH_BOARD_MBED is not set +# CONFIG_ARCH_BOARD_U_BLOX_C027 is not set CONFIG_ARCH_BOARD_ZKITARM=y # CONFIG_ARCH_BOARD_CUSTOM is not set CONFIG_ARCH_BOARD="zkit-arm-1769" @@ -321,6 +344,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="thttp_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 @@ -351,6 +375,7 @@ CONFIG_NAME_MAX=32 # 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 @@ -359,9 +384,10 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGWORK=17 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # CONFIG_SCHED_WORKQUEUE=y CONFIG_SCHED_HPWORK=y @@ -395,6 +421,7 @@ CONFIG_DEV_NULL=y # 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 @@ -412,8 +439,23 @@ 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 + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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=y @@ -421,7 +463,11 @@ CONFIG_NETDEVICES=y # # General Ethernet MAC Driver Options # +# CONFIG_NETDEV_LOOPBACK is not set +# CONFIG_NETDEV_TELNET is not set # CONFIG_NETDEV_MULTINIC is not set +CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y +# CONFIG_NETDEV_LATEINIT is not set # # External Ethernet MAC Device Support @@ -431,6 +477,7 @@ CONFIG_NETDEVICES=y # CONFIG_ENCX24J600 is not set # CONFIG_NET_E1000 is not set # CONFIG_NET_SLIP is not set +# CONFIG_NET_FTMAC100 is not set # CONFIG_NET_VNET is not set # @@ -440,6 +487,7 @@ CONFIG_NETDEVICES=y # CONFIG_ETH0_PHY_NONE is not set # CONFIG_ETH0_PHY_AM79C874 is not set # CONFIG_ETH0_PHY_KS8721 is not set +# CONFIG_ETH0_PHY_KSZ8041 is not set # CONFIG_ETH0_PHY_KSZ8051 is not set # CONFIG_ETH0_PHY_KSZ8061 is not set # CONFIG_ETH0_PHY_KSZ8081 is not set @@ -448,6 +496,7 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_ETH0_PHY_LAN8720 is not set # CONFIG_ETH0_PHY_LAN8740 is not set # CONFIG_ETH0_PHY_LAN8740A is not set +# CONFIG_ETH0_PHY_LAN8742A is not set # CONFIG_ETH0_PHY_DM9161 is not set # CONFIG_PIPES is not set # CONFIG_PM is not set @@ -456,6 +505,8 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -479,13 +530,10 @@ CONFIG_UART0_SERIALDRIVER=y # 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_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_SERIAL_DMA is not set CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -502,19 +550,23 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -538,6 +590,7 @@ CONFIG_NET_GUARDSIZE=2 # # CONFIG_NET_MULTILINK is not set CONFIG_NET_ETHERNET=y +# CONFIG_NET_LOOPBACK is not set # CONFIG_NET_TUN is not set # @@ -623,6 +676,7 @@ CONFIG_IOB_NCHAINS=8 # Routing Table Configuration # # CONFIG_NET_ROUTE is not set +CONFIG_NET_HOSTNAME="" # # Crypto API @@ -646,14 +700,10 @@ CONFIG_FS_READABLE=y # CONFIG_FS_FAT 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_PROCFS is not set - -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -673,6 +723,10 @@ CONFIG_MM_REGIONS=2 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -716,10 +770,15 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -734,14 +793,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -749,11 +807,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -762,19 +820,20 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_NSH is not set # 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTERM 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_PPPD 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 @@ -783,6 +842,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_THTTPD=y @@ -791,13 +851,24 @@ CONFIG_EXAMPLES_THTTPD_DRIPADDR=0xac100002 CONFIG_EXAMPLES_THTTPD_NETMASK=0xffffff00 # 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_UNIONFS is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_WGET is not set # CONFIG_EXAMPLES_XMLRPC 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 # @@ -809,20 +880,24 @@ CONFIG_EXAMPLES_THTTPD_NETMASK=0xffffff00 # # CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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_FTPD is not set # CONFIG_NETUTILS_JSON is not set +CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_SMTP is not set # CONFIG_NETUTILS_TELNETD is not set CONFIG_NETUTILS_THTTPD=y @@ -857,16 +932,10 @@ CONFIG_THTTPD_IDLE_SEND_LIMIT_SEC=300 CONFIG_THTTPD_TILDE_MAP_NONE=y # CONFIG_THTTPD_GENERATE_INDICES is not set # CONFIG_THTTPD_USE_URLPATTERN is not set -CONFIG_NETUTILS_NETLIB=y # CONFIG_NETUTILS_WEBCLIENT is not set # CONFIG_NETUTILS_WEBSERVER is not set # CONFIG_NETUTILS_XMLRPC is not set -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # @@ -884,15 +953,16 @@ CONFIG_NETUTILS_NETLIB=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_POWEROFF is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/zp214xpa/nsh/Make.defs b/configs/zp214xpa/nsh/Make.defs index 5fdba6c38ba82661b59bd1022b4fd7775333c475..4e6db0acdc8bf50d63089e93b54decc23aefa648 100644 --- a/configs/zp214xpa/nsh/Make.defs +++ b/configs/zp214xpa/nsh/Make.defs @@ -71,7 +71,7 @@ ifneq ($(HOSTOS),Cygwin) endif endif -ifeq ("${CONFIG_DEBUG}","y") +ifeq ("${CONFIG_DEBUG_FEATURES}","y") ARCHOPTIMIZATION = -g endif @@ -115,7 +115,7 @@ EXEEXT = ifneq ($(CROSSDEV),arm-nuttx-elf-) LDFLAGS += -nostartfiles -nodefaultlibs endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) LDFLAGS += -g endif diff --git a/configs/zp214xpa/nsh/defconfig b/configs/zp214xpa/nsh/defconfig index 1fa5f238cc58c9973070811a4597fd894a9c98ac..4f9e75d13b7f13e85a9b364423af0f29b008556b 100644 --- a/configs/zp214xpa/nsh/defconfig +++ b/configs/zp214xpa/nsh/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,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 @@ -92,7 +95,11 @@ CONFIG_ARCH_CHIP_LPC214X=y # 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=y # CONFIG_ARCH_ARM926EJS is not set # CONFIG_ARCH_ARM920T is not set @@ -102,10 +109,21 @@ CONFIG_ARCH_ARM7TDMI=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="arm" CONFIG_ARCH_CHIP="lpc214x" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y # CONFIG_ARCH_LOWVECTORS is not set @@ -158,6 +176,7 @@ CONFIG_LPC214X_UART1=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # CONFIG_ARCH_HAVE_MPU is not set @@ -251,6 +270,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="nsh_main" CONFIG_RR_INTERVAL=0 +# CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=0 CONFIG_MAX_TASKS=16 # CONFIG_SCHED_HAVE_PARENT is not set @@ -301,9 +321,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -334,6 +355,7 @@ CONFIG_DEV_NULL=y # 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 @@ -352,8 +374,21 @@ CONFIG_DEV_NULL=y # CONFIG_BCH is not set # CONFIG_INPUT is not set # CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# # CONFIG_LCD is not set +# CONFIG_SLCD is not set + +# +# LED Support +# +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -363,6 +398,8 @@ CONFIG_DEV_NULL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -386,14 +423,11 @@ CONFIG_UART1_SERIALDRIVER=y # 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 is not set CONFIG_UART0_SERIAL_CONSOLE=y # CONFIG_UART1_SERIAL_CONSOLE is not set @@ -411,6 +445,7 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_DMA is not set # # UART1 Configuration @@ -423,19 +458,23 @@ 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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -467,16 +506,11 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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_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 # @@ -495,6 +529,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -538,11 +576,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -557,14 +598,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -572,11 +612,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST 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 @@ -584,18 +624,19 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 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_NXTERM 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_PPPD 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 @@ -603,14 +644,24 @@ CONFIG_EXAMPLES_NSH=y # 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -622,30 +673,28 @@ CONFIG_EXAMPLES_NSH=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# -# FreeModBus -# -# CONFIG_MODBUS is not set - # # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -664,6 +713,7 @@ CONFIG_NSH_NESTDEPTH=3 # 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 @@ -672,6 +722,7 @@ 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 @@ -680,8 +731,10 @@ CONFIG_NSH_DISABLE_DATE=y # 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 @@ -699,6 +752,7 @@ CONFIG_NSH_DISABLE_DATE=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 @@ -728,6 +782,8 @@ CONFIG_NSH_FILEIOSIZE=512 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 @@ -741,15 +797,19 @@ CONFIG_NSH_CONSOLE=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL 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_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/zp214xpa/nxlines/Make.defs b/configs/zp214xpa/nxlines/Make.defs index 8f8f9b00890df4aa349c3ee455780c8c45003155..75b8a40e0c07705a5e421a65b36cb551f36c9708 100644 --- a/configs/zp214xpa/nxlines/Make.defs +++ b/configs/zp214xpa/nxlines/Make.defs @@ -71,7 +71,7 @@ ifneq ($(HOSTOS),Cygwin) endif endif -ifeq ("${CONFIG_DEBUG}","y") +ifeq ("${CONFIG_DEBUG_FEATURES}","y") ARCHOPTIMIZATION = -g endif @@ -115,7 +115,7 @@ EXEEXT = ifneq ($(CROSSDEV),arm-nuttx-elf-) LDFLAGS += -nostartfiles -nodefaultlibs endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) LDFLAGS += -g endif diff --git a/configs/zp214xpa/nxlines/defconfig b/configs/zp214xpa/nxlines/defconfig index 580c2a8070cc4825b1bb7877a000326312ff2810..95d24c83693cb7a5cade09c6ee55462181837db0 100644 --- a/configs/zp214xpa/nxlines/defconfig +++ b/configs/zp214xpa/nxlines/defconfig @@ -37,14 +37,16 @@ CONFIG_RAW_BINARY=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 # -# CONFIG_DEBUG is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_ALERT=y +# CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set @@ -75,10 +77,12 @@ 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 # 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=y # CONFIG_ARCH_CHIP_LPC2378 is not set @@ -87,10 +91,15 @@ CONFIG_ARCH_CHIP_LPC214X=y # 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=y # CONFIG_ARCH_ARM926EJS is not set # CONFIG_ARCH_ARM920T is not set @@ -100,10 +109,21 @@ CONFIG_ARCH_ARM7TDMI=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="arm" CONFIG_ARCH_CHIP="lpc214x" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU 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 is not set CONFIG_ARCH_HAVE_LOWVECTORS=y # CONFIG_ARCH_LOWVECTORS is not set @@ -156,11 +176,14 @@ CONFIG_LPC214X_UART1=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 is not set CONFIG_ARCH_HAVE_VFORK=y # CONFIG_ARCH_HAVE_MMU is not set # 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_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set # CONFIG_ARCH_IDLE_CUSTOM is not set @@ -212,8 +235,10 @@ CONFIG_ARCH_BOARD="zp214xpa" # 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=y # CONFIG_BOARDCTL_IOCTL is not set @@ -250,6 +275,7 @@ CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="nxlines_main" CONFIG_RR_INTERVAL=0 +# CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=0 CONFIG_MAX_TASKS=16 # CONFIG_SCHED_HAVE_PARENT is not set @@ -300,9 +326,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=4 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 @@ -333,14 +360,20 @@ CONFIG_DEV_NULL=y # 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=y +# CONFIG_SPI_SLAVE is not set # CONFIG_SPI_EXCHANGE is not set CONFIG_SPI_CMDDATA=y # 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_SPI_CS_CONTROL is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set # CONFIG_I2S is not set # @@ -354,10 +387,15 @@ CONFIG_SPI_CMDDATA=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set + +# +# LCD Driver Support +# CONFIG_LCD=y # -# Common LCD Settings +# Common Graphic LCD Settings # # CONFIG_LCD_CONSOLE is not set # CONFIG_LCD_NOGETRUN is not set @@ -374,6 +412,7 @@ CONFIG_LCD_MAXPOWER=1 # CONFIG_LCD_UG9664HSWAG01 is not set # CONFIG_LCD_UG2864HSWEG01 is not set # CONFIG_LCD_UG2832HSWEG04 is not set +# CONFIG_LCD_SSD1351 is not set # CONFIG_LCD_ST7565 is not set # CONFIG_LCD_ST7567 is not set CONFIG_LCD_UG2864AMBAG01=y @@ -387,12 +426,17 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_LCD_RPORTRAIT is not set # CONFIG_LCD_RLANDSCAPE is not set # CONFIG_LCD_ILI9341 is not set +# CONFIG_LCD_RA8875 is not set +# CONFIG_SLCD is not set # -# Alphanumeric/Segment LCD Devices +# LED Support # -# CONFIG_LCD_LCD1602 is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_NCP5623C 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 @@ -402,6 +446,8 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y +# CONFIG_SERIAL_REMOVABLE is not set +CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set CONFIG_UART0_SERIALDRIVER=y @@ -425,13 +471,10 @@ CONFIG_UART1_SERIALDRIVER=y # 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_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_UART0_SERIAL_CONSOLE=y # CONFIG_UART1_SERIAL_CONSOLE is not set @@ -449,6 +492,7 @@ CONFIG_UART0_PARITY=0 CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_DMA is not set # # UART1 Configuration @@ -461,19 +505,23 @@ 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_ARCH_SYSLOG is not set # CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_CONSOLE is not set +# CONFIG_SYSLOG_INTBUFFER is not set +# CONFIG_SYSLOG_TIMESTAMP is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y +# CONFIG_SYSLOG_CHAR is not set +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set +# CONFIG_SYSLOG_FILE is not set # # Networking Support @@ -505,14 +553,10 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # 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_PROCFS is not set - -# -# System Logging -# -# CONFIG_SYSLOG is not set -# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_FS_UNIONFS is not set # # Graphics Support @@ -522,6 +566,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 @@ -620,6 +665,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -663,10 +712,14 @@ 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 # # Non-standard Library Support # +# CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set @@ -681,14 +734,13 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # -# Built-In Applications +# CAN Utilities # # # 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 # CONFIG_EXAMPLES_DHCPD is not set @@ -696,12 +748,12 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # 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_JSON is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set # CONFIG_EXAMPLES_LCDRW 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 @@ -709,9 +761,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_EXAMPLES_NSH is not set # 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_NXFLAT is not set # CONFIG_EXAMPLES_NXHELLO is not set # CONFIG_EXAMPLES_NXIMAGE is not set CONFIG_EXAMPLES_NXLINES=y @@ -726,29 +776,41 @@ CONFIG_EXAMPLES_NXLINES_BORDERCOLOR=0x01 CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR=0x00 CONFIG_EXAMPLES_NXLINES_BPP=1 CONFIG_EXAMPLES_NXLINES_EXTERNINIT=y +# CONFIG_EXAMPLES_NXTERM 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_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_PPPD 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 # 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 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 # 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_WEBSERVER is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -760,27 +822,22 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=y # Interpreters # # CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_PCODE is not set # -# Network Utilities +# FreeModBus # +# CONFIG_MODBUS is not set # -# Networking Utilities +# 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 -# CONFIG_NETUTILS_THTTPD is not set -# CONFIG_NETUTILS_PPPD is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set # # NSH Library @@ -799,15 +856,16 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=y # # 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_FREE is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_RAMTEST is not set +# CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set -# CONFIG_SYSTEM_POWEROFF is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/zp214xpa/src/lpc2148_spi1.c b/configs/zp214xpa/src/lpc2148_spi1.c index 43fb0e095b43ee16e17c1b1a68cd0399aeec5884..72110a423abc59307d34b57df9234d16a340b705 100644 --- a/configs/zp214xpa/src/lpc2148_spi1.c +++ b/configs/zp214xpa/src/lpc2148_spi1.c @@ -87,20 +87,6 @@ * Pre-processor Definitions ****************************************************************************/ -/* Enables debug output from this file */ - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - /* Clocking */ #define LPC214X_CCLKFREQ (LPC214X_FOSC*LPC214X_PLL_M) @@ -229,7 +215,7 @@ static int spi_lock(FAR struct spi_dev_s *dev, bool lock) static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { -#ifdef CONFIG_DEBUG_SPI +#ifdef CONFIG_DEBUG_SPI_INFO uint32_t regval; #endif uint32_t bit = 1 << 20; @@ -238,7 +224,7 @@ static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel * only thing on the bus. */ -#ifdef CONFIG_DEBUG_SPI +#ifdef CONFIG_DEBUG_SPI_INFO regval = getreg32(CS_PIN_REGISTER); #endif @@ -247,14 +233,14 @@ static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel /* Enable slave select (low enables) */ putreg32(bit, CS_CLR_REGISTER); - spidbg("CS asserted: %08x->%08x\n", regval, getreg32(CS_PIN_REGISTER)); + spiinfo("CS asserted: %08x->%08x\n", regval, getreg32(CS_PIN_REGISTER)); } else { /* Disable slave select (low enables) */ putreg32(bit, CS_SET_REGISTER); - spidbg("CS de-asserted: %08x->%08x\n", regval, getreg32(CS_PIN_REGISTER)); + spiinfo("CS de-asserted: %08x->%08x\n", regval, getreg32(CS_PIN_REGISTER)); /* Wait for the TX FIFO not full indication */ @@ -310,7 +296,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) divisor = (divisor + 1) & ~1; putreg8(divisor, LPC214X_SPI1_CPSR); - spidbg("Frequency %d->%d\n", frequency, LPC214X_PCLKFREQ / divisor); + spiinfo("Frequency %d->%d\n", frequency, LPC214X_PCLKFREQ / divisor); return LPC214X_PCLKFREQ / divisor; } @@ -331,7 +317,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { - spidbg("Return 0\n"); + spiinfo("Return 0\n"); return 0; } @@ -362,7 +348,7 @@ static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #ifdef CONFIG_SPI_CMDDATA static int spi_cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) { -#ifdef CONFIG_DEBUG_SPI +#ifdef CONFIG_DEBUG_SPI_INFO uint32_t regval; #endif uint32_t bit = 1 << 23; @@ -378,7 +364,7 @@ static int spi_cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd * A0 = L: the inputs at D0 to D7 are transferred to the command registers." */ -#ifdef CONFIG_DEBUG_SPI +#ifdef CONFIG_DEBUG_SPI_INFO regval = getreg32(CS_PIN_REGISTER); #endif @@ -387,14 +373,14 @@ static int spi_cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd /* L: the inputs at D0 to D7 are transferred to the command registers */ putreg32(bit, CS_CLR_REGISTER); - spidbg("Command: %08x->%08x\n", regval, getreg32(CS_PIN_REGISTER)); + spiinfo("Command: %08x->%08x\n", regval, getreg32(CS_PIN_REGISTER)); } else { /* H: the inputs at D0 to D7 are treated as display data. */ putreg32(bit, CS_SET_REGISTER); - spidbg("Data: %08x->%08x\n", regval, getreg32(CS_PIN_REGISTER)); + spiinfo("Data: %08x->%08x\n", regval, getreg32(CS_PIN_REGISTER)); } return OK; @@ -436,7 +422,7 @@ static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd) /* Get the value from the RX FIFO and return it */ regval = getreg16(LPC214X_SPI1_DR); - spidbg("%04x->%04x\n", wd, regval); + spiinfo("%04x->%04x\n", wd, regval); return regval; } @@ -466,7 +452,7 @@ static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size /* Loop while thre are bytes remaining to be sent */ - spidbg("nwords: %d\n", nwords); + spiinfo("nwords: %d\n", nwords); while (nwords > 0) { /* While the TX FIFO is not full and there are bytes left to send */ @@ -483,7 +469,7 @@ static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size /* Then discard all card responses until the RX & TX FIFOs are emptied. */ - spidbg("discarding\n"); + spiinfo("discarding\n"); do { /* Is there anything in the RX fifo? */ @@ -537,7 +523,7 @@ static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nw /* While there is remaining to be sent (and no synchronization error has occurred) */ - spidbg("nwords: %d\n", nwords); + spiinfo("nwords: %d\n", nwords); while (nwords || rxpending) { /* Fill the transmit FIFO with 0xff... @@ -546,7 +532,7 @@ static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nw * and (3) there are more bytes to be sent. */ - spivdbg("TX: rxpending: %d nwords: %d\n", rxpending, nwords); + spiinfo("TX: rxpending: %d nwords: %d\n", rxpending, nwords); while ((getreg8(LPC214X_SPI1_SR) & LPC214X_SPI1SR_TNF) && (rxpending < LPC214X_SPI1_FIFOSZ) && nwords) { @@ -557,7 +543,7 @@ static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nw /* Now, read the RX data from the RX FIFO while the RX FIFO is not empty */ - spivdbg("RX: rxpending: %d\n", rxpending); + spiinfo("RX: rxpending: %d\n", rxpending); while (getreg8(LPC214X_SPI1_SR) & LPC214X_SPI1SR_RNE) { *ptr++ = (uint8_t)getreg16(LPC214X_SPI1_DR); @@ -592,7 +578,7 @@ FAR struct spi_dev_s *lpc214x_spibus_initialize(int port) /* Only the SPI1 interface is supported */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (port != 1) { return NULL; @@ -635,9 +621,9 @@ FAR struct spi_dev_s *lpc214x_spibus_initialize(int port) regval32 |= getreg32(CS_DIR_REGISTER); putreg32(regval32, CS_DIR_REGISTER); - spidbg("CS Pin Config: PINSEL1: %08x PIN: %08x DIR: %08x\n", - getreg32(LPC214X_PINSEL1), getreg32(CS_PIN_REGISTER), - getreg32(CS_DIR_REGISTER)); + spiinfo("CS Pin Config: PINSEL1: %08x PIN: %08x DIR: %08x\n", + getreg32(LPC214X_PINSEL1), getreg32(CS_PIN_REGISTER), + getreg32(CS_DIR_REGISTER)); /* Enable peripheral clocking to SPI1 */ diff --git a/configs/zp214xpa/src/lpc2148_ug2864ambag01.c b/configs/zp214xpa/src/lpc2148_ug2864ambag01.c index c857b43ba81d9aa4c968139e6b9359d09b237367..ca43d4555384e0071f316ee3b61f2c8fc447a6bd 100644 --- a/configs/zp214xpa/src/lpc2148_ug2864ambag01.c +++ b/configs/zp214xpa/src/lpc2148_ug2864ambag01.c @@ -97,16 +97,6 @@ # define RESET_DIR_REGISTER (LPC214X_GPIO0_BASE+LPC214X_GPIO_DIR_OFFSET) #endif -/* Debug ********************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__) -# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -143,7 +133,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) regval32 = getreg32(RESET_DIR_REGISTER); putreg32(regval32 | bits32, RESET_DIR_REGISTER); - lcdvdbg("RESET Pin Config: PINSEL1: %08x PIN: %08x DIR: %08x\n", + lcdinfo("RESET Pin Config: PINSEL1: %08x PIN: %08x DIR: %08x\n", getreg32(LPC214X_PINSEL1), getreg32(RESET_PIN_REGISTER), getreg32(RESET_DIR_REGISTER)); @@ -152,7 +142,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) up_mdelay(20); putreg32(bits32, RESET_SET_REGISTER); - lcdvdbg("RESET release: PIN: %08x DIR: %08x\n", + lcdinfo("RESET release: PIN: %08x DIR: %08x\n", getreg32(RESET_PIN_REGISTER), getreg32(RESET_DIR_REGISTER)); /* Get the SPI1 port interface */ @@ -160,7 +150,7 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) spi = lpc214x_spibus_initialize(1); if (!spi) { - lcddbg("Failed to initialize SPI port 1\n"); + lcderr("ERROR: Failed to initialize SPI port 1\n"); } else { @@ -169,11 +159,11 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) dev = ug2864ambag01_initialize(spi, devno); if (!dev) { - lcddbg("Failed to bind SPI port 1 to OLED %d: %d\n", devno); + lcderr("ERROR: Failed to bind SPI port 1 to OLED %d: %d\n", devno); } else { - lcdvdbg("Bound SPI port 1 to OLED %d\n", devno); + lcdinfo("Bound SPI port 1 to OLED %d\n", devno); /* And turn the OLED on */ diff --git a/crypto/crypto.c b/crypto/crypto.c index 401417d8744fafd95339479522b309ca5506c238..57839fa0fef7559a08a1e1495f874c78a7826522 100644 --- a/crypto/crypto.c +++ b/crypto/crypto.c @@ -81,11 +81,11 @@ int up_cryptoinitialize(void) res = crypto_test(); if (res) { - cryptlldbg("crypto test failed\n"); + crypterr("ERROR: crypto test failed\n"); } else { - cryptllvdbg("crypto test OK\n"); + cryptinfo("crypto test OK\n"); } #endif diff --git a/crypto/testmngr.c b/crypto/testmngr.c index c7fe86e78add3b1d246e64c2b4e5dafff66c6c6d..1554e1e3017e1ee3e1c2b55fe06167dae47383c0 100644 --- a/crypto/testmngr.c +++ b/crypto/testmngr.c @@ -86,7 +86,7 @@ static int do_test_aes(FAR struct cipher_testvec *test, int mode, int encrypt) #define AES_CYPHER_TEST_ENCRYPT(mode, mode_str, count, template) \ for (i = 0; i < count; i++) { \ if (do_test_aes(template + i, mode, CYPHER_ENCRYPT)) { \ - cryptlldbg("Failed " mode_str " encrypt test #%i\n", i); \ + crypterr("ERROR: Failed " mode_str " encrypt test #%i\n", i); \ return -1; \ } \ } @@ -94,7 +94,7 @@ static int do_test_aes(FAR struct cipher_testvec *test, int mode, int encrypt) #define AES_CYPHER_TEST_DECRYPT(mode, mode_str, count, template) \ for (i = 0; i < count; i++) { \ if (do_test_aes(template + i, mode, CYPHER_DECRYPT)) { \ - cryptlldbg("Failed " mode_str " decrypt test #%i\n", i); \ + crypterr("ERROR: Failed " mode_str " decrypt test #%i\n", i); \ return -1; \ } \ } diff --git a/drivers/Kconfig b/drivers/Kconfig index df45c0d17220777d3ed608c8208cc1fe846fcd53..011850d6c90d0783bba35386bd15c4e7bf8b4575 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -208,6 +208,14 @@ config CAN_LOOPBACK driver does support loopback mode, the setting will enable it. (If the driver does not, this setting will have no effect). +config CAN_NPOLLWAITERS + int "Number of poll waiters" + default 2 + depends on !DISABLE_POLL + ---help--- + The maximum number of threads that may be waiting on the + poll method. + endif # CAN config ARCH_HAVE_PWM_PULSECOUNT @@ -362,17 +370,7 @@ if INPUT source drivers/input/Kconfig endif # INPUT -menuconfig IOEXPANDER - bool "IO Expander Support" - default n - ---help--- - This directory holds implementations of IO expander drivers. - See include/nuttx/ioexpander/ioexpander.h for registration information. - -if IOEXPANDER source drivers/ioexpander/Kconfig -endif # IOEXPANDER - source drivers/lcd/Kconfig source drivers/leds/Kconfig @@ -524,7 +522,4 @@ menuconfig DRIVERS_WIRELESS Drivers for various wireless devices. source drivers/wireless/Kconfig - -comment "System Logging Device Options" - source drivers/syslog/Kconfig diff --git a/drivers/analog/ad5410.c b/drivers/analog/ad5410.c index 58db6a7ceaf12646cbb3844fdd8e84e219f39469..5aeede163ce771b97b8020419a716f82cbf83b90 100644 --- a/drivers/analog/ad5410.c +++ b/drivers/analog/ad5410.c @@ -256,7 +256,7 @@ static int dac_send(FAR struct dac_dev_s *dev, FAR struct dac_msg_s *msg) static int dac_ioctl(FAR struct dac_dev_s *dev, int cmd, unsigned long arg) { - dbg("Fix me:Not Implemented\n"); + _err("ERROR: Fix me; Not Implemented\n"); return 0; } diff --git a/drivers/analog/adc.c b/drivers/analog/adc.c index 3dc8a4e42c9abd83707cc4642158cce99dd180a5..0dac979d60e77d5a3872e10f7cfd2b5da440e1c3 100644 --- a/drivers/analog/adc.c +++ b/drivers/analog/adc.c @@ -233,7 +233,7 @@ static ssize_t adc_read(FAR struct file *filep, FAR char *buffer, size_t buflen) int ret = 0; int msglen; - avdbg("buflen: %d\n", (int)buflen); + ainfo("buflen: %d\n", (int)buflen); if (buflen % 5 == 0) msglen = 5; @@ -351,7 +351,7 @@ return_with_irqdisabled: leave_critical_section(flags); } - avdbg("Returning: %d\n", ret); + ainfo("Returning: %d\n", ret); return ret; } @@ -377,7 +377,7 @@ 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; - int err = -ENOMEM; + int errcode = -ENOMEM; /* Check if adding this new message would over-run the drivers ability to enqueue * read data. @@ -407,9 +407,10 @@ static int adc_receive(FAR struct adc_dev_s *dev, uint8_t ch, int32_t data) sem_post(&fifo->af_sem); } - err = OK; + errcode = OK; } - return err; + + return errcode; } /**************************************************************************** @@ -432,7 +433,7 @@ int adc_register(FAR const char *path, FAR struct adc_dev_s *dev) ret = dev->ad_ops->ao_bind(dev, &g_adc_callback); if (ret < 0) { - adbg("ERROR: Failed to bind callbacks: %d\n", ret); + aerr("ERROR: Failed to bind callbacks: %d\n", ret); return ret; } diff --git a/drivers/analog/ads1242.c b/drivers/analog/ads1242.c index ccd9c0d18d02a5a392cc7bf37abfd7eb764341c1..ee7c39582e732ddc6dd9ce3ae9f1e69af054b5b5 100644 --- a/drivers/analog/ads1242.c +++ b/drivers/analog/ads1242.c @@ -97,9 +97,9 @@ static void ads1242_set_negative_input(FAR struct ads1242_dev_s *dev, ADS1242_NEGATIVE_INPUT_SELECTION const neg_in_sel); static bool ads1242_is_data_ready(FAR struct ads1242_dev_s *dev); -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_INFO) static void ads1242_print_regs(FAR struct ads1242_dev_s *dev, char const *msg); -#endif /* CONFIG_DEBUG && CONFIG_DEBUG_VERBOSE */ +#endif /* CONFIG_DEBUG_FEATURES && CONFIG_DEBUG_INFO */ /* Character driver methods */ @@ -331,7 +331,7 @@ static void ads1242_set_gain(FAR struct ads1242_dev_s *dev, setup_reg_value |= (uint8_t)(gain_selection); ads1242_write_reg(dev, ADS1242_REG_SETUP, setup_reg_value); -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_INFO) ads1242_print_regs(dev, "ads1242_set_gain"); #endif @@ -355,7 +355,7 @@ static void ads1242_set_positive_input(FAR struct ads1242_dev_s *dev, mux_reg_value |= (uint8_t)(pos_in_sel); ads1242_write_reg(dev, ADS1242_REG_MUX, mux_reg_value); -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_INFO) ads1242_print_regs(dev, "ads1242_set_positive_input"); #endif } @@ -375,7 +375,7 @@ static void ads1242_set_negative_input(FAR struct ads1242_dev_s *dev, mux_reg_value |= (uint8_t)(neg_in_sel); ads1242_write_reg(dev, ADS1242_REG_MUX, mux_reg_value); -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_INFO) ads1242_print_regs(dev, "ads1242_set_negative_input"); #endif } @@ -396,24 +396,24 @@ static bool ads1242_is_data_ready(FAR struct ads1242_dev_s *dev) * Name: ads1242_print_regs ****************************************************************************/ -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_INFO) static void ads1242_print_regs(FAR struct ads1242_dev_s *dev, char const *msg) { uint8_t setup_reg_value = 0; uint8_t mux_reg_value = 0; uint8_t acr_reg_value = 0; - dbg("%s\n", msg); + _info("%s\n", msg); ads1242_read_reg(dev, ADS1242_REG_SETUP, &setup_reg_value); ads1242_read_reg(dev, ADS1242_REG_MUX, &mux_reg_value); ads1242_read_reg(dev, ADS1242_REG_ACR, &acr_reg_value); - dbg("SETUP %02X\n", setup_reg_value); - dbg("MUX %02X\n", mux_reg_value); - dbg("ACR %02X\n", acr_reg_value); + _info("SETUP %02X\n", setup_reg_value); + _info("MUX %02X\n", mux_reg_value); + _info("ACR %02X\n", acr_reg_value); } -#endif /* CONFIG_DEBUG && CONFIG_DEBUG_VERBOSE */ +#endif /* CONFIG_DEBUG_FEATURES && CONFIG_DEBUG_INFO */ /**************************************************************************** * Name: ads1242_open @@ -441,7 +441,7 @@ static int ads1242_open(FAR struct file *filep) ads1242_performSelfOffsetCalibration(priv); up_mdelay(100); -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_INFO) ads1242_print_regs(priv, "ads1242_open"); #endif @@ -552,7 +552,7 @@ static int ads1242_ioctl (FAR struct file *filep, int cmd, unsigned long arg) /* Command was not recognized */ default: - dbg ("Unrecognized cmd: %d\n", cmd); + _err("ERROR: Unrecognized cmd: %d\n", cmd); ret = -ENOTTY; break; } @@ -596,7 +596,7 @@ int ads1242_register(FAR const char *devpath, FAR struct spi_dev_s *spi, priv = (FAR struct ads1242_dev_s *)kmm_malloc(sizeof(struct ads1242_dev_s)); if (priv == NULL) { - dbg ("Failed to allocate instance\n"); + _err("ERROR: Failed to allocate instance\n"); return -ENOMEM; } @@ -610,7 +610,7 @@ int ads1242_register(FAR const char *devpath, FAR struct spi_dev_s *spi, ret = register_driver(devpath, &g_ads1242_fops, 0666, priv); if (ret < 0) { - dbg ("Failed to register driver: %d\n", ret); + _err("ERROR: Failed to register driver: %d\n", ret); kmm_free(priv); } diff --git a/drivers/analog/ads1255.c b/drivers/analog/ads1255.c index adb8933b380bd0f35e192f60aedb294861607142..75b256cf16276b6d9b6628426263e895adb25dc9 100644 --- a/drivers/analog/ads1255.c +++ b/drivers/analog/ads1255.c @@ -396,7 +396,7 @@ 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) { - dbg("Fix me:Not Implemented\n"); + _err("ERROR: Fix me; Not Implemented\n"); return 0; } diff --git a/drivers/analog/pga11x.c b/drivers/analog/pga11x.c index d542bb77978ced27efdb4a2e512ad1d1a434b748..de86444b3854ae120cc72cdfa383aa8e40698ddc 100644 --- a/drivers/analog/pga11x.c +++ b/drivers/analog/pga11x.c @@ -101,26 +101,6 @@ #define SPI_DUMMY 0xff -/* Debug ********************************************************************/ -/* Check if (non-standard) SPI debug is enabled */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_SPI -#endif - -#ifdef CONFIG_DEBUG_SPI -# define spidbg dbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg dbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -138,7 +118,7 @@ static void pga11x_configure(FAR struct spi_dev_s *spi) { - spivdbg("MODE: %d BITS: 8 Frequency: %d\n", + spiinfo("MODE: %d BITS: 8 Frequency: %d\n", CONFIG_PGA11X_SPIMODE, CONFIG_PGA11X_SPIFREQUENCY); /* Call the setfrequency, setbits, and setmode methods to make sure that @@ -164,7 +144,7 @@ static void pga11x_configure(FAR struct spi_dev_s *spi) static void pga11x_lock(FAR struct spi_dev_s *spi) { - spivdbg("Locking\n"); + spiinfo("Locking\n"); /* On SPI busses where there are multiple devices, it will be necessary to * lock SPI to have exclusive access to the busses for a sequence of @@ -198,7 +178,7 @@ static void pga11x_lock(FAR struct spi_dev_s *spi) static inline void pga11x_unlock(FAR struct spi_dev_s *spi) { - spivdbg("Unlocking\n"); + spiinfo("Unlocking\n"); SPI_LOCK(spi, false); } @@ -223,7 +203,7 @@ static inline void pga11x_unlock(FAR struct spi_dev_s *spi) static void pga11x_send16(FAR struct spi_dev_s *spi, uint16_t word) { - spivdbg("Send %04x\n", word); + spiinfo("Send %04x\n", word); /* The logical interface is 16-bits wide. However, this driver uses a * 8-bit configuration for greaer portability. @@ -265,7 +245,7 @@ static uint16_t pga11x_recv16(FAR struct spi_dev_s *spi) msb = SPI_SEND(spi, SPI_DUMMY); lsb = SPI_SEND(spi, SPI_DUMMY); - spivdbg("Received %02x %02x\n", msb, lsb); + spiinfo("Received %02x %02x\n", msb, lsb); return ((uint16_t)msb << 8) | (uint16_t)lsb; } @@ -293,7 +273,7 @@ static uint16_t pga11x_recv16(FAR struct spi_dev_s *spi) #ifndef CONFIG_PGA11X_DAISYCHAIN static void pga11x_write(FAR struct spi_dev_s *spi, uint16_t cmd) { - spivdbg("cmd %04x\n", cmd); + spiinfo("cmd %04x\n", cmd); /* Lock, select, send the 16-bit command, de-select, and un-lock. */ @@ -306,7 +286,7 @@ static void pga11x_write(FAR struct spi_dev_s *spi, uint16_t cmd) #else static void pga11x_write(FAR struct spi_dev_s *spi, uint16_t u1cmd, uint16_t u2cmd) { - spivdbg("U1 cmd: %04x U2 cmd: %04x\n", u1cmd, u2cmd); + spiinfo("U1 cmd: %04x U2 cmd: %04x\n", u1cmd, u2cmd); /* Lock, select, send the U2 16-bit command, the U1 16-bit command, de-select, * and un-lock. @@ -343,7 +323,7 @@ static void pga11x_write(FAR struct spi_dev_s *spi, uint16_t u1cmd, uint16_t u2c PGA11X_HANDLE pga11x_initialize(FAR struct spi_dev_s *spi) { - spivdbg("Entry\n"); + spiinfo("Entry\n"); /* No Special state is required, just return the SPI driver instance as * the handle. This gives us a place to extend functionality in the @@ -380,7 +360,7 @@ int pga11x_select(PGA11X_HANDLE handle, uint16_t cmd; DEBUGASSERT(handle && settings); - spivdbg("channel: %d gain: %d\n", settings->channel, settings->gain); + spiinfo("channel: %d gain: %d\n", settings->channel, settings->gain); /* Format the command */ @@ -398,8 +378,8 @@ int pga11x_select(PGA11X_HANDLE handle, uint16_t u2cmd; DEBUGASSERT(handle && settings); - spivdbg("U1 channel: %d gain: %d\n", settings->u1.channel, settings->u1.gain); - spivdbg("U1 channel: %d gain: %d\n", settings->u1.channel, settings->u1.gain); + spiinfo("U1 channel: %d gain: %d\n", settings->u1.channel, settings->u1.gain); + spiinfo("U1 channel: %d gain: %d\n", settings->u1.channel, settings->u1.gain); /* Format the commands */ @@ -445,7 +425,7 @@ int pga11x_uselect(PGA11X_HANDLE handle, int pos, uint16_t u1cmd; uint16_t u2cmd; - spivdbg("channel: %d gain: %d\n", settings->channel, settings->gain); + spiinfo("channel: %d gain: %d\n", settings->channel, settings->gain); DEBUGASSERT(handle); /* Format the commands */ @@ -498,7 +478,7 @@ int pga11x_read(PGA11X_HANDLE handle, FAR struct pga11x_settings_s *settings) uint16_t u1value; uint16_t u2value; - spivdbg("Entry\n"); + spiinfo("Entry\n"); DEBUGASSERT(handle && settings); /* Lock the bus and read the configuration */ @@ -526,7 +506,7 @@ int pga11x_read(PGA11X_HANDLE handle, FAR struct pga11x_settings_s *settings) /* Decode the returned value */ - spivdbg("Returning %04x %04x\n", u2value, u1value); + spiinfo("Returning %04x %04x\n", u2value, u1value); settings->u1.channel = (uint8_t)((u1value & PGA11X_CHAN_MASK) >> PGA11X_CHAN_SHIFT); settings->u1.gain = (uint8_t)((u1value & PGA11X_GAIN_MASK) >> PGA11X_GAIN_SHIFT); settings->u2.channel = (uint8_t)((u2value & PGA11X_CHAN_MASK) >> PGA11X_CHAN_SHIFT); @@ -536,7 +516,7 @@ int pga11x_read(PGA11X_HANDLE handle, FAR struct pga11x_settings_s *settings) FAR struct spi_dev_s *spi = (FAR struct spi_dev_s *)handle; uint16_t value; - spivdbg("Entry\n"); + spiinfo("Entry\n"); DEBUGASSERT(handle); /* Lock the bus and read the configuration */ @@ -561,7 +541,7 @@ int pga11x_read(PGA11X_HANDLE handle, FAR struct pga11x_settings_s *settings) /* Decode the returned value */ - spivdbg("Returning: %04x\n", value); + spiinfo("Returning: %04x\n", value); settings->channel = (uint8_t)((value & PGA11X_CHAN_MASK) >> PGA11X_CHAN_SHIFT); settings->gain = (uint8_t)((value & PGA11X_GAIN_MASK) >> PGA11X_GAIN_SHIFT); return OK; @@ -633,7 +613,7 @@ int pga11x_shutdown(PGA11X_HANDLE handle) { FAR struct spi_dev_s *spi = (FAR struct spi_dev_s *)handle; - spivdbg("Entry\n"); + spiinfo("Entry\n"); DEBUGASSERT(handle); /* Enter shutdown mode by issuing an SDN_EN command */ @@ -669,7 +649,7 @@ int pga11x_ushutdown(PGA11X_HANDLE handle, int pos) { FAR struct spi_dev_s *spi = (FAR struct spi_dev_s *)handle; - spivdbg("Entry\n"); + spiinfo("Entry\n"); DEBUGASSERT(handle); /* Enter shutdown mode by issuing an SDN_EN command */ @@ -709,7 +689,7 @@ int pga11x_enable(PGA11X_HANDLE handle) { FAR struct spi_dev_s *spi = (FAR struct spi_dev_s *)handle; - spivdbg("Entry\n"); + spiinfo("Entry\n"); DEBUGASSERT(handle); /* Lock the bus and send the shutdown disable command. Shutdown mode is @@ -748,7 +728,7 @@ int pga11x_uenable(PGA11X_HANDLE handle, int pos) { FAR struct spi_dev_s *spi = (FAR struct spi_dev_s *)handle; - spivdbg("Entry\n"); + spiinfo("Entry\n"); DEBUGASSERT(handle); /* Enter shutdown mode by issuing an SDN_EN command */ diff --git a/drivers/audio/audio_null.c b/drivers/audio/audio_null.c index f5a1337f5cabf0cc6b5f436c6f536d829a359408..d6c522101ae6e69c9e35f806915d3f6d8f67c302 100644 --- a/drivers/audio/audio_null.c +++ b/drivers/audio/audio_null.c @@ -178,7 +178,7 @@ static const struct audio_ops_s g_audioops = static int null_getcaps(FAR struct audio_lowerhalf_s *dev, int type, FAR struct audio_caps_s *caps) { - audvdbg("type=%d\n", type); + audinfo("type=%d\n", type); /* Validate the structure */ @@ -324,7 +324,7 @@ static int null_getcaps(FAR struct audio_lowerhalf_s *dev, int type, * proper Audio device type. */ - audvdbg("Return %d\n", caps->ac_len); + audinfo("Return %d\n", caps->ac_len); return caps->ac_len; } @@ -345,14 +345,14 @@ static int null_configure(FAR struct audio_lowerhalf_s *dev, FAR const struct audio_caps_s *caps) #endif { - audvdbg("ac_type: %d\n", caps->ac_type); + audinfo("ac_type: %d\n", caps->ac_type); /* Process the configure operation */ switch (caps->ac_type) { case AUDIO_TYPE_FEATURE: - audvdbg(" AUDIO_TYPE_FEATURE\n"); + audinfo(" AUDIO_TYPE_FEATURE\n"); /* Process based on Feature Unit */ @@ -360,39 +360,39 @@ static int null_configure(FAR struct audio_lowerhalf_s *dev, { #ifndef CONFIG_AUDIO_EXCLUDE_VOLUME case AUDIO_FU_VOLUME: - audvdbg(" Volume: %d\n", caps->ac_controls.hw[0]); + audinfo(" Volume: %d\n", caps->ac_controls.hw[0]); break; #endif /* CONFIG_AUDIO_EXCLUDE_VOLUME */ #ifndef CONFIG_AUDIO_EXCLUDE_TONE case AUDIO_FU_BASS: - audvdbg(" Bass: %d\n", caps->ac_controls.b[0]); + audinfo(" Bass: %d\n", caps->ac_controls.b[0]); break; case AUDIO_FU_TREBLE: - audvdbg(" Treble: %d\n", caps->ac_controls.b[0]); + audinfo(" Treble: %d\n", caps->ac_controls.b[0]); break; #endif /* CONFIG_AUDIO_EXCLUDE_TONE */ default: - auddbg(" Unrecognized feature unit\n"); + auderr(" ERROR: Unrecognized feature unit\n"); break; } break; case AUDIO_TYPE_OUTPUT: - audvdbg(" AUDIO_TYPE_OUTPUT:\n"); - audvdbg(" Number of channels: %u\n", caps->ac_channels); - audvdbg(" Sample rate: %u\n", caps->ac_controls.hw[0]); - audvdbg(" Sample width: %u\n", caps->ac_controls.b[2]); + audinfo(" AUDIO_TYPE_OUTPUT:\n"); + audinfo(" Number of channels: %u\n", caps->ac_channels); + audinfo(" Sample rate: %u\n", caps->ac_controls.hw[0]); + audinfo(" Sample width: %u\n", caps->ac_controls.b[2]); break; case AUDIO_TYPE_PROCESSING: - audvdbg(" AUDIO_TYPE_PROCESSING:\n"); + audinfo(" AUDIO_TYPE_PROCESSING:\n"); break; } - audvdbg("Return OK\n"); + audinfo("Return OK\n"); return OK; } @@ -406,7 +406,7 @@ static int null_configure(FAR struct audio_lowerhalf_s *dev, static int null_shutdown(FAR struct audio_lowerhalf_s *dev) { - audvdbg("Return OK\n"); + audinfo("Return OK\n"); return OK; } @@ -425,7 +425,7 @@ static void *null_workerthread(pthread_addr_t pvarg) int msglen; int prio; - audvdbg("Entry\n"); + audinfo("Entry\n"); /* Loop as long as we are supposed to be running */ @@ -443,7 +443,7 @@ static void *null_workerthread(pthread_addr_t pvarg) if (msglen < sizeof(struct audio_msg_s)) { - auddbg("ERROR: Message too small: %d\n", msglen); + auderr("ERROR: Message too small: %d\n", msglen); continue; } @@ -467,7 +467,7 @@ static void *null_workerthread(pthread_addr_t pvarg) break; default: - auddbg("ERROR: Ignoring message ID %d\n", msg.msgId); + auderr("ERROR: Ignoring message ID %d\n", msg.msgId); break; } } @@ -486,7 +486,7 @@ static void *null_workerthread(pthread_addr_t pvarg) priv->dev.upper(priv->dev.priv, AUDIO_CALLBACK_COMPLETE, NULL, OK); #endif - audvdbg("Exit\n"); + audinfo("Exit\n"); return NULL; } @@ -511,7 +511,7 @@ static int null_start(FAR struct audio_lowerhalf_s *dev) FAR void *value; int ret; - audvdbg("Entry\n"); + audinfo("Entry\n"); /* Create a message queue for the worker thread */ @@ -527,7 +527,7 @@ static int null_start(FAR struct audio_lowerhalf_s *dev) { /* Error creating message queue! */ - auddbg("ERROR: Couldn't allocate message queue\n"); + auderr("ERROR: Couldn't allocate message queue\n"); return -ENOMEM; } @@ -535,7 +535,7 @@ static int null_start(FAR struct audio_lowerhalf_s *dev) if (priv->threadid != 0) { - audvdbg("Joining old thread\n"); + audinfo("Joining old thread\n"); pthread_join(priv->threadid, &value); } @@ -546,20 +546,20 @@ static int null_start(FAR struct audio_lowerhalf_s *dev) (void)pthread_attr_setschedparam(&tattr, &sparam); (void)pthread_attr_setstacksize(&tattr, CONFIG_AUDIO_NULL_WORKER_STACKSIZE); - audvdbg("Starting worker thread\n"); + audinfo("Starting worker thread\n"); ret = pthread_create(&priv->threadid, &tattr, null_workerthread, (pthread_addr_t)priv); if (ret != OK) { - auddbg("ERROR: pthread_create failed: %d\n", ret); + auderr("ERROR: pthread_create failed: %d\n", ret); } else { pthread_setname_np(priv->threadid, "null audio"); - audvdbg("Created worker thread\n"); + audinfo("Created worker thread\n"); } - audvdbg("Return %d\n", ret); + audinfo("Return %d\n", ret); return ret; } @@ -597,7 +597,7 @@ static int null_stop(FAR struct audio_lowerhalf_s *dev) pthread_join(priv->threadid, &value); priv->threadid = 0; - audvdbg("Return OK\n"); + audinfo("Return OK\n"); return OK; } #endif @@ -616,7 +616,7 @@ static int null_pause(FAR struct audio_lowerhalf_s *dev, FAR void *session) static int null_pause(FAR struct audio_lowerhalf_s *dev) #endif { - audvdbg("Return OK\n"); + audinfo("Return OK\n"); return OK; } #endif /* CONFIG_AUDIO_EXCLUDE_PAUSE_RESUME */ @@ -635,7 +635,7 @@ static int null_resume(FAR struct audio_lowerhalf_s *dev, FAR void *session) static int null_resume(FAR struct audio_lowerhalf_s *dev) #endif { - audvdbg("Return OK\n"); + audinfo("Return OK\n"); return OK; } #endif /* CONFIG_AUDIO_EXCLUDE_PAUSE_RESUME */ @@ -653,7 +653,7 @@ static int null_enqueuebuffer(FAR struct audio_lowerhalf_s *dev, FAR struct null_dev_s *priv = (FAR struct null_dev_s *)dev; bool done; - audvdbg("apb=%p curbyte=%d nbytes=%d\n", apb, apb->curbyte, apb->nbytes); + audinfo("apb=%p curbyte=%d nbytes=%d\n", apb, apb->curbyte, apb->nbytes); /* Say that we consumed all of the data */ @@ -688,7 +688,7 @@ static int null_enqueuebuffer(FAR struct audio_lowerhalf_s *dev, #endif } - audvdbg("Return OK\n"); + audinfo("Return OK\n"); return OK; } @@ -702,7 +702,7 @@ static int null_enqueuebuffer(FAR struct audio_lowerhalf_s *dev, static int null_cancelbuffer(FAR struct audio_lowerhalf_s *dev, FAR struct ap_buffer_s *apb) { - audvdbg("apb=%p curbyte=%d nbytes=%d, return OK\n", + audinfo("apb=%p curbyte=%d nbytes=%d, return OK\n", apb, apb->curbyte, apb->nbytes); return OK; @@ -722,7 +722,7 @@ static int null_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd, FAR struct ap_buffer_info_s *bufinfo; #endif - audvdbg("cmd=%d arg=%ld\n"); + audinfo("cmd=%d arg=%ld\n"); /* Deal with ioctls passed from the upper-half driver */ @@ -734,7 +734,7 @@ static int null_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd, case AUDIOIOC_HWRESET: { - audvdbg("AUDIOIOC_HWRESET:\n"); + audinfo("AUDIOIOC_HWRESET:\n"); } break; @@ -743,7 +743,7 @@ static int null_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd, #ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS case AUDIOIOC_GETBUFFERINFO: { - audvdbg("AUDIOIOC_GETBUFFERINFO:\n"); + audinfo("AUDIOIOC_GETBUFFERINFO:\n"); bufinfo = (FAR struct ap_buffer_info_s *) arg; bufinfo->buffer_size = CONFIG_AUDIO_NULL_BUFFER_SIZE; bufinfo->nbuffers = CONFIG_AUDIO_NULL_NUM_BUFFERS; @@ -755,7 +755,7 @@ static int null_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd, break; } - audvdbg("Return OK\n"); + audinfo("Return OK\n"); return OK; } @@ -773,7 +773,7 @@ static int null_reserve(FAR struct audio_lowerhalf_s *dev, static int null_reserve(FAR struct audio_lowerhalf_s *dev) #endif { - audvdbg("Return OK\n"); + audinfo("Return OK\n"); return OK; } @@ -843,6 +843,6 @@ FAR struct audio_lowerhalf_s *audio_null_initialize(void) return &priv->dev; } - auddbg("ERROR: Failed to allocate null audio device\n"); + auderr("ERROR: Failed to allocate null audio device\n"); return NULL; } diff --git a/drivers/audio/i2schar.c b/drivers/audio/i2schar.c index 5f2d6a5c024265d0939f9d5f637626e416aae199..2701a67dc2813aab7f0b6438d3ddba316c186851 100644 --- a/drivers/audio/i2schar.c +++ b/drivers/audio/i2schar.c @@ -75,32 +75,6 @@ #define DEVNAME_FMT "/dev/i2schar%d" #define DEVNAME_FMTLEN (12 + 3 + 1) -/* Debug *******************************************************************/ -/* Check if SSC debut is enabled (non-standard.. no support in - * include/debug.h - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_I2S -#endif - -#ifdef CONFIG_DEBUG_I2S -# define i2sdbg dbg -# define i2slldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define i2svdbg dbg -# define i2sllvdbg lldbg -# else -# define i2svdbg(x...) -# endif -#else -# define i2sdbg(x...) -# define i2slldbg(x...) -# define i2svdbg(x...) -# define i2sllvdbg(x...) -#endif - /**************************************************************************** * Private Types ****************************************************************************/ @@ -174,7 +148,7 @@ static void i2schar_rxcallback(FAR struct i2s_dev_s *dev, FAR struct i2schar_dev_s *priv = (FAR struct i2schar_dev_s *)arg; DEBUGASSERT(priv && apb); - i2svdbg("apb=%p nbytes=%d result=%d\n", apb, apb->nbytes, result); + i2sinfo("apb=%p nbytes=%d result=%d\n", apb, apb->nbytes, result); /* REVISIT: If you want this to actually do something other than * test I2S data transfer, then this is the point where you would @@ -185,7 +159,7 @@ static void i2schar_rxcallback(FAR struct i2s_dev_s *dev, * now. */ - i2svdbg("Freeing apb=%p crefs=%d\n", apb, apb->crefs); + i2sinfo("Freeing apb=%p crefs=%d\n", apb, apb->crefs); apb_free(apb); } @@ -209,7 +183,7 @@ static void i2schar_txcallback(FAR struct i2s_dev_s *dev, FAR struct i2schar_dev_s *priv = (FAR struct i2schar_dev_s *)arg; DEBUGASSERT(priv && apb); - i2svdbg("apb=%p nbytes=%d result=%d\n", apb, apb->nbytes, result); + i2sinfo("apb=%p nbytes=%d result=%d\n", apb, apb->nbytes, result); /* REVISIT: If you want this to actually do something other than * test I2S data transfer, then this is the point where you would @@ -220,7 +194,7 @@ static void i2schar_txcallback(FAR struct i2s_dev_s *dev, * now. */ - i2svdbg("Freeing apb=%p crefs=%d\n", apb, apb->crefs); + i2sinfo("Freeing apb=%p crefs=%d\n", apb, apb->crefs); apb_free(apb); } @@ -241,7 +215,7 @@ static ssize_t i2schar_read(FAR struct file *filep, FAR char *buffer, size_t nbytes; int ret; - i2svdbg("buffer=%p buflen=%d\n", buffer, (int)buflen); + i2sinfo("buffer=%p buflen=%d\n", buffer, (int)buflen); /* Get our private data structure */ @@ -272,7 +246,7 @@ static ssize_t i2schar_read(FAR struct file *filep, FAR char *buffer, { ret = -errno; DEBUGASSERT(ret < 0); - i2sdbg("ERROR: sem_wait returned: %d\n", ret); + i2serr("ERROR: sem_wait returned: %d\n", ret); goto errout_with_reference; } @@ -282,7 +256,7 @@ static ssize_t i2schar_read(FAR struct file *filep, FAR char *buffer, CONFIG_AUDIO_I2SCHAR_RXTIMEOUT); if (ret < 0) { - i2sdbg("ERROR: I2S_RECEIVE returned: %d\n", ret); + i2serr("ERROR: I2S_RECEIVE returned: %d\n", ret); goto errout_with_reference; } @@ -316,7 +290,7 @@ static ssize_t i2schar_write(FAR struct file *filep, FAR const char *buffer, size_t nbytes; int ret; - i2svdbg("buffer=%p buflen=%d\n", buffer, (int)buflen); + i2sinfo("buffer=%p buflen=%d\n", buffer, (int)buflen); /* Get our private data structure */ @@ -347,7 +321,7 @@ static ssize_t i2schar_write(FAR struct file *filep, FAR const char *buffer, { ret = -errno; DEBUGASSERT(ret < 0); - i2sdbg("ERROR: sem_wait returned: %d\n", ret); + i2serr("ERROR: sem_wait returned: %d\n", ret); goto errout_with_reference; } @@ -357,7 +331,7 @@ static ssize_t i2schar_write(FAR struct file *filep, FAR const char *buffer, CONFIG_AUDIO_I2SCHAR_TXTIMEOUT); if (ret < 0) { - i2sdbg("ERROR: I2S_SEND returned: %d\n", ret); + i2serr("ERROR: I2S_SEND returned: %d\n", ret); goto errout_with_reference; } diff --git a/drivers/audio/vs1053.c b/drivers/audio/vs1053.c index 68167ca31eb287173e49e5519ea861e7c6c927c7..fd00b37444ce9f353185a6f350bae8466bbf6d19 100644 --- a/drivers/audio/vs1053.c +++ b/drivers/audio/vs1053.c @@ -329,7 +329,7 @@ static void vs1053_writereg(FAR struct vs1053_struct_s *dev, uint8_t reg, uint16 /* Select the AUDIO_CTRL device on the SPI bus */ - audvdbg("Write Reg %d = 0x%0X\n", reg, val); + audinfo("Write Reg %d = 0x%0X\n", reg, val); SPI_SELECT(spi, SPIDEV_AUDIO_CTRL, true); @@ -365,7 +365,7 @@ static int vs1053_setfrequency(FAR struct vs1053_struct_s *dev, uint32_t freq) uint16_t reg; uint8_t timeout; - audvdbg("Entry\n"); + audinfo("Entry\n"); /* Calculate the clock divisor based on the input frequency */ @@ -375,7 +375,7 @@ static int vs1053_setfrequency(FAR struct vs1053_struct_s *dev, uint32_t freq) if (factor > 50.0) { - audvdbg("Frequency too high! Limiting to XTALI * 5\n"); + audinfo("Frequency too high! Limiting to XTALI * 5\n"); factor = 50.0; return -EINVAL; } @@ -566,7 +566,7 @@ static void vs1053_setbass(FAR struct vs1053_struct_s *dev) static int vs1053_getcaps(FAR struct audio_lowerhalf_s *lower, int type, FAR struct audio_caps_s *pCaps) { - audvdbg("Entry\n"); + audinfo("Entry\n"); /* Validate the structure */ @@ -769,7 +769,7 @@ static int vs1053_configure(FAR struct audio_lowerhalf_s *lower, FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *) lower; #endif - audvdbg("Entry\n"); + audinfo("Entry\n"); /* Process the configure operation */ @@ -924,7 +924,7 @@ static int vs1053_shutdown(FAR struct audio_lowerhalf_s *lower) FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *) lower; FAR struct spi_dev_s *spi = dev->spi; - audvdbg("Entry\n"); + audinfo("Entry\n"); vs1053_spi_lock(spi, dev->spi_freq); /* Lock the device */ vs1053_setfrequency(dev, CONFIG_VS1053_XTALI); /* Reduce speed to minimum */ vs1053_writereg(dev, VS1053_SCI_VOL, 0xFEFE); /* Power down the DAC outputs */ @@ -967,7 +967,7 @@ static void vs1053_feeddata(FAR struct vs1053_struct_s *dev) /* Local stack copy of our active buffer */ apb = dev->apb; - //auddbg("Entry apb=%p, Bytes left=%d\n", apb, apb->nbytes - apb->curbyte); + //audinfo("Entry apb=%p, Bytes left=%d\n", apb, apb->nbytes - apb->curbyte); /* Setup pointer to the next sample in the buffer */ @@ -1039,12 +1039,16 @@ static void vs1053_feeddata(FAR struct vs1053_struct_s *dev) { (void)SPI_SETFREQUENCY(dev->spi, dev->spi_freq); dev->hw_lower->disable(dev->hw_lower); /* Disable the DREQ interrupt */ - auddbg("HDAT1: 0x%0X HDAT0: 0x%0X\n", - vs1053_readreg(dev, VS1053_SCI_HDAT1), - vs1053_readreg(dev, VS1053_SCI_HDAT0)); + + audinfo("HDAT1: 0x%0X HDAT0: 0x%0X\n", + vs1053_readreg(dev, VS1053_SCI_HDAT1), + vs1053_readreg(dev, VS1053_SCI_HDAT0)); + vs1053_writereg(dev, VS1053_SCI_WRAMADDR, VS1053_END_FILL_BYTE); dev->endfillchar = vs1053_readreg(dev, VS1053_SCI_WRAM) >> 8; - auddbg("EndFillChar: 0x%0X\n", dev->endfillchar); + + audinfo("EndFillChar: 0x%0X\n", dev->endfillchar); + reg = vs1053_readreg(dev, VS1053_SCI_MODE); vs1053_writereg(dev, VS1053_SCI_MODE, reg | VS1053_SM_RESET); @@ -1171,7 +1175,7 @@ static void vs1053_feeddata(FAR struct vs1053_struct_s *dev) dev->lower.upper(dev->lower.priv, AUDIO_CALLBACK_IOERR, NULL, ret); #endif - auddbg("I/O error!\n"); + auderr("ERROR: I/O error!\n"); goto err_out; } @@ -1181,7 +1185,7 @@ static void vs1053_feeddata(FAR struct vs1053_struct_s *dev) apb = (struct ap_buffer_s *) dq_remfirst(&dev->apbq); dev->apb = apb; - //auddbg("Next Buffer = %p, bytes = %d\n", apb, apb ? apb->nbytes : 0); + //audinfo("Next Buffer = %p, bytes = %d\n", apb, apb ? apb->nbytes : 0); if (apb == NULL) { sem_post(&dev->apbq_sem); @@ -1274,7 +1278,7 @@ static void *vs1053_workerthread(pthread_addr_t pvarg) #endif uint8_t timeout; - auddbg("Entry\n"); + audinfo("Entry\n"); #ifndef CONFIG_AUDIO_EXCLUDE_STOP dev->cancelmode = false; @@ -1404,8 +1408,7 @@ static void *vs1053_workerthread(pthread_addr_t pvarg) dev->lower.upper(dev->lower.priv, AUDIO_CALLBACK_COMPLETE, NULL, OK); #endif - auddbg("Exit\n"); - + audinfo("Exit\n"); return NULL; } @@ -1430,12 +1433,12 @@ static int vs1053_start(FAR struct audio_lowerhalf_s *lower) int ret; void *value; - auddbg("Entry\n"); + audinfo("Entry\n"); vs1053_spi_lock(dev->spi, dev->spi_freq); /* Lock the device */ - auddbg("Entry HDAT1=0x%0X HDAT0=0x%0X\n", - vs1053_readreg(dev, VS1053_SCI_HDAT1), - vs1053_readreg(dev, VS1053_SCI_HDAT0)); + audinfo("Entry HDAT1=0x%0X HDAT0=0x%0X\n", + vs1053_readreg(dev, VS1053_SCI_HDAT1), + vs1053_readreg(dev, VS1053_SCI_HDAT0)); vs1053_spi_unlock(dev->spi); /* Do a soft reset, just in case */ @@ -1446,9 +1449,9 @@ static int vs1053_start(FAR struct audio_lowerhalf_s *lower) vs1053_spi_lock(dev->spi, dev->spi_freq); /* Lock the device */ vs1053_setfrequency(dev, CONFIG_VS1053_MP3_DECODE_FREQ); - auddbg("Reset HDAT1=0x%0X HDAT0=0x%0X\n", - vs1053_readreg(dev, VS1053_SCI_HDAT1), - vs1053_readreg(dev, VS1053_SCI_HDAT0)); + audinfo("Reset HDAT1=0x%0X HDAT0=0x%0X\n", + vs1053_readreg(dev, VS1053_SCI_HDAT1), + vs1053_readreg(dev, VS1053_SCI_HDAT0)); vs1053_spi_unlock(dev->spi); /* Create a message queue for the worker thread */ @@ -1463,7 +1466,7 @@ static int vs1053_start(FAR struct audio_lowerhalf_s *lower) { /* Error creating message queue! */ - auddbg("Couldn't allocate message queue\n"); + auderr("ERROR: Couldn't allocate message queue\n"); return -ENOMEM; } @@ -1477,7 +1480,7 @@ static int vs1053_start(FAR struct audio_lowerhalf_s *lower) } else { - auddbg("Error getting APB Queue sem\n"); + auderr("ERROR: Error getting APB Queue sem\n"); return ret; } @@ -1485,7 +1488,7 @@ static int vs1053_start(FAR struct audio_lowerhalf_s *lower) if (dev->threadid != 0) { - auddbg("Joining old thread\n"); + audinfo("Joining old thread\n"); pthread_join(dev->threadid, &value); } @@ -1496,17 +1499,17 @@ static int vs1053_start(FAR struct audio_lowerhalf_s *lower) (void)pthread_attr_setschedparam(&tattr, &sparam); (void)pthread_attr_setstacksize(&tattr, CONFIG_VS1053_WORKER_STACKSIZE); - auddbg("Starting workerthread\n"); + audinfo("Starting workerthread\n"); ret = pthread_create(&dev->threadid, &tattr, vs1053_workerthread, (pthread_addr_t) dev); if (ret != OK) { - auddbg("Can't create worker thread, errno=%d\n", errno); + auderr("ERROR: Can't create worker thread, errno=%d\n", errno); } else { pthread_setname_np(dev->threadid, "vs1053"); - auddbg("Created worker thread\n"); + audinfo("Created worker thread\n"); } return ret; @@ -1630,7 +1633,7 @@ static int vs1053_enqueuebuffer(FAR struct audio_lowerhalf_s *lower, struct audio_msg_s term_msg; int ret; - audvdbg("Entry\n"); + audinfo("Entry\n"); /* Lock access to the apbq */ @@ -1896,13 +1899,13 @@ struct audio_lowerhalf_s *vs1053_initialize(FAR struct spi_dev_s *spi, id = (status & VS1053_SS_VER) >> VS1053_VER_SHIFT; if (id != VS1053_VER_VS1053) { - auddbg("Unexpected VER bits: 0x%0X\n", id); + auderr("ERROR: Unexpected VER bits: 0x%0X\n", id); kmm_free(dev); return NULL; } else { - auddbg("VS1053 Detected!\n"); + audinfo("VS1053 Detected!\n"); } /* Attach our ISR to this device */ diff --git a/drivers/audio/wm8904.c b/drivers/audio/wm8904.c index a437c137e83c2ddbb8dadddf421a88996fd91e71..2bd2502b8dffbf44a6978346a3094b80686d8327 100644 --- a/drivers/audio/wm8904.c +++ b/drivers/audio/wm8904.c @@ -283,16 +283,16 @@ uint16_t wm8904_readreg(FAR struct wm8904_dev_s *priv, uint8_t regaddr) #ifdef CONFIG_I2C_RESET /* Perhaps the I2C bus is locked up? Try to shake the bus free */ - auddbg("WARNING: I2C_TRANSFER failed: %d ... Resetting\n", ret); + audwarn("WARNING: I2C_TRANSFER failed: %d ... Resetting\n", ret); ret = I2C_RESET(priv->i2c); if (ret < 0) { - auddbg("ERROR: I2C_RESET failed: %d\n", ret); + auderr("ERROR: I2C_RESET failed: %d\n", ret); break; } #else - auddbg("ERROR: I2C_TRANSFER failed: %d\n", ret); + auderr("ERROR: I2C_TRANSFER failed: %d\n", ret); #endif } else @@ -304,11 +304,11 @@ uint16_t wm8904_readreg(FAR struct wm8904_dev_s *priv, uint8_t regaddr) */ regval = ((uint16_t)data[0] << 8) | (uint16_t)data[1]; - audvdbg("Read: %02x -> %04x\n", regaddr, regval); + audinfo("Read: %02x -> %04x\n", regaddr, regval); return regval; } - audvdbg("retries=%d regaddr=%02x\n", retries, regaddr); + audinfo("retries=%d regaddr=%02x\n", retries, regaddr); } /* No error indication is returned on a failure... just return zero */ @@ -359,16 +359,16 @@ static void wm8904_writereg(FAR struct wm8904_dev_s *priv, uint8_t regaddr, #ifdef CONFIG_I2C_RESET /* Perhaps the I2C bus is locked up? Try to shake the bus free */ - auddbg("WARNING: i2c_write failed: %d ... Resetting\n", ret); + audwarn("WARNING: i2c_write failed: %d ... Resetting\n", ret); ret = I2C_RESET(priv->i2c); if (ret < 0) { - auddbg("ERROR: I2C_RESET failed: %d\n", ret); + auderr("ERROR: I2C_RESET failed: %d\n", ret); break; } #else - auddbg("ERROR: I2C_TRANSFER failed: %d\n", ret); + auderr("ERROR: I2C_TRANSFER failed: %d\n", ret); #endif } else @@ -377,11 +377,11 @@ static void wm8904_writereg(FAR struct wm8904_dev_s *priv, uint8_t regaddr, * return the value read. */ - audvdbg("Write: %02x <- %04x\n", regaddr, regval); + audinfo("Write: %02x <- %04x\n", regaddr, regval); return; } - audvdbg("retries=%d regaddr=%02x\n", retries, regaddr); + audinfo("retries=%d regaddr=%02x\n", retries, regaddr); } } @@ -439,7 +439,7 @@ static void wm8904_setvolume(FAR struct wm8904_dev_s *priv, uint16_t volume, uint32_t rightlevel; uint16_t regval; - audvdbg("volume=%u mute=%u\n", volume, mute); + audinfo("volume=%u mute=%u\n", volume, mute); #ifndef CONFIG_AUDIO_EXCLUDE_BALANCE /* Calculate the left channel volume level {0..1000} */ @@ -514,7 +514,7 @@ static void wm8904_setvolume(FAR struct wm8904_dev_s *priv, uint16_t volume, #ifndef CONFIG_AUDIO_EXCLUDE_TONE static void wm8904_setbass(FAR struct wm8904_dev_s *priv, uint8_t bass) { - audvdbg("bass=%u\n", bass); + audinfo("bass=%u\n", bass); #warning Missing logic } #endif /* CONFIG_AUDIO_EXCLUDE_TONE */ @@ -532,7 +532,7 @@ static void wm8904_setbass(FAR struct wm8904_dev_s *priv, uint8_t bass) #ifndef CONFIG_AUDIO_EXCLUDE_TONE static void wm8904_settreble(FAR struct wm8904_dev_s *priv, uint8_t treble) { - audvdbg("treble=%u\n", treble); + audinfo("treble=%u\n", treble); #warning Missing logic } #endif /* CONFIG_AUDIO_EXCLUDE_TONE */ @@ -658,7 +658,7 @@ static void wm8904_setbitrate(FAR struct wm8904_dev_s *priv) regval = WM8904_LRCLK_DIR | WM8904_LRCLK_RATE(framelen << 1); wm8904_writereg(priv, WM8904_AIF3, regval); - audvdbg("sample rate=%u nchannels=%u bpsamp=%u framelen=%d fout=%lu\n", + audinfo("sample rate=%u nchannels=%u bpsamp=%u framelen=%d fout=%lu\n", priv->samprate, priv->nchannels, priv->bpsamp, framelen, (unsigned long)fout); @@ -815,10 +815,10 @@ static void wm8904_setbitrate(FAR struct wm8904_dev_s *priv) tmp64 = ((uint64_t)fvco << 16) / (g_fllratio[fllndx] * fref); nk = (b16_t)tmp64; - audvdbg("mclk=%lu fref=%lu fvco=%lu fout=%lu divndx=%u\n", + audinfo("mclk=%lu fref=%lu fvco=%lu fout=%lu divndx=%u\n", (unsigned long)priv->lower->mclk, (unsigned long)fref, (unsigned long)fvco, (unsigned long)fout, divndx); - audvdbg("N.K=%08lx outdiv=%u fllratio=%u\n", + audinfo("N.K=%08lx outdiv=%u fllratio=%u\n", (unsigned long)nk, outdiv, g_fllratio[fllndx]); /* Save the actual bit rate that we are using. This will be used by the @@ -961,7 +961,7 @@ static int wm8904_getcaps(FAR struct audio_lowerhalf_s *dev, int type, /* Validate the structure */ DEBUGASSERT(caps && caps->ac_len >= sizeof(struct audio_caps_s)); - audvdbg("type=%d ac_type=%d\n", type, caps->ac_type); + audinfo("type=%d ac_type=%d\n", type, caps->ac_type); /* Fill in the caller's structure based on requested info */ @@ -1129,14 +1129,14 @@ static int wm8904_configure(FAR struct audio_lowerhalf_s *dev, int ret = OK; DEBUGASSERT(priv && caps); - audvdbg("ac_type: %d\n", caps->ac_type); + audinfo("ac_type: %d\n", caps->ac_type); /* Process the configure operation */ switch (caps->ac_type) { case AUDIO_TYPE_FEATURE: - audvdbg(" AUDIO_TYPE_FEATURE\n"); + audinfo(" AUDIO_TYPE_FEATURE\n"); /* Process based on Feature Unit */ @@ -1148,7 +1148,7 @@ static int wm8904_configure(FAR struct audio_lowerhalf_s *dev, /* Set the volume */ uint16_t volume = caps->ac_controls.hw[0]; - audvdbg(" Volume: %d\n", volume); + audinfo(" Volume: %d\n", volume); if (volume >= 0 && volume <= 1000) { @@ -1172,7 +1172,7 @@ static int wm8904_configure(FAR struct audio_lowerhalf_s *dev, */ uint8_t bass = caps->ac_controls.b[0]; - audvdbg(" Bass: %d\n", bass); + audinfo(" Bass: %d\n", bass); if (bass <= 100) { @@ -1192,7 +1192,7 @@ static int wm8904_configure(FAR struct audio_lowerhalf_s *dev, */ uint8_t treble = caps->ac_controls.b[0]; - audvdbg(" Treble: %d\n", treble); + audinfo(" Treble: %d\n", treble); if (treble <= 100) { @@ -1207,7 +1207,7 @@ static int wm8904_configure(FAR struct audio_lowerhalf_s *dev, #endif /* CONFIG_AUDIO_EXCLUDE_TONE */ default: - auddbg(" Unrecognized feature unit\n"); + auderr(" ERROR: Unrecognized feature unit\n"); ret = -ENOTTY; break; } @@ -1215,24 +1215,24 @@ static int wm8904_configure(FAR struct audio_lowerhalf_s *dev, case AUDIO_TYPE_OUTPUT: { - audvdbg(" AUDIO_TYPE_OUTPUT:\n"); - audvdbg(" Number of channels: %u\n", caps->ac_channels); - audvdbg(" Sample rate: %u\n", caps->ac_controls.hw[0]); - audvdbg(" Sample width: %u\n", caps->ac_controls.b[2]); + audinfo(" AUDIO_TYPE_OUTPUT:\n"); + audinfo(" Number of channels: %u\n", caps->ac_channels); + audinfo(" Sample rate: %u\n", caps->ac_controls.hw[0]); + audinfo(" Sample width: %u\n", caps->ac_controls.b[2]); /* Verify that all of the requested values are supported */ ret = -ERANGE; if (caps->ac_channels != 1 && caps->ac_channels != 2) { - auddbg("ERROR: Unsupported number of channels: %d\n", + auderr("ERROR: Unsupported number of channels: %d\n", caps->ac_channels); break; } if (caps->ac_controls.b[2] != 8 && caps->ac_controls.b[2] != 16) { - auddbg("ERROR: Unsupported bits per sample: %d\n", + auderr("ERROR: Unsupported bits per sample: %d\n", caps->ac_controls.b[2]); break; } @@ -1308,7 +1308,7 @@ static void wm8904_senddone(FAR struct i2s_dev_s *i2s, int ret; DEBUGASSERT(i2s && priv && priv->running && apb); - audvdbg("apb=%p inflight=%d result=%d\n", apb, priv->inflight, result); + audinfo("apb=%p inflight=%d result=%d\n", apb, priv->inflight, result); /* We do not place any restriction on the context in which this function * is called. It may be called from an interrupt handler. Therefore, the @@ -1345,7 +1345,7 @@ static void wm8904_senddone(FAR struct i2s_dev_s *i2s, CONFIG_WM8904_MSG_PRIO); if (ret < 0) { - audlldbg("ERROR: mq_send failed: %d\n", errno); + auderr("ERROR: mq_send failed: %d\n", errno); } } @@ -1377,7 +1377,7 @@ static void wm8904_returnbuffers(FAR struct wm8904_dev_s *priv) apb = (FAR struct ap_buffer_s *)dq_remfirst(&priv->doneq); leave_critical_section(flags); - audvdbg("Returning: apb=%p curbyte=%d nbytes=%d flags=%04x\n", + audinfo("Returning: apb=%p curbyte=%d nbytes=%d flags=%04x\n", apb, apb->curbyte, apb->nbytes, apb->flags); /* Are we returning the final buffer in the stream? */ @@ -1395,7 +1395,7 @@ static void wm8904_returnbuffers(FAR struct wm8904_dev_s *priv) * worker thread to exit (if it is not already terminating). */ - audvdbg("Terminating\n"); + audinfo("Terminating\n"); priv->terminating = true; } @@ -1454,7 +1454,7 @@ static int wm8904_sendbuffer(FAR struct wm8904_dev_s *priv) /* Take next buffer from the queue of pending transfers */ apb = (FAR struct ap_buffer_s *)dq_remfirst(&priv->pendq); - audvdbg("Sending apb=%p, size=%d inflight=%d\n", + audinfo("Sending apb=%p, size=%d inflight=%d\n", apb, apb->nbytes, priv->inflight); /* Increment the number of buffers in-flight before sending in order @@ -1496,7 +1496,7 @@ static int wm8904_sendbuffer(FAR struct wm8904_dev_s *priv) ret = I2S_SEND(priv->i2s, apb, wm8904_senddone, priv, timeout); if (ret < 0) { - auddbg("ERROR: I2S_SEND failed: %d\n", ret); + auderr("ERROR: I2S_SEND failed: %d\n", ret); break; } } @@ -1526,7 +1526,7 @@ static int wm8904_start(FAR struct audio_lowerhalf_s *dev) FAR void *value; int ret; - audvdbg("Entry\n"); + audinfo("Entry\n"); /* Exit reduced power modes of operation */ /* REVISIT */ @@ -1545,7 +1545,7 @@ static int wm8904_start(FAR struct audio_lowerhalf_s *dev) { /* Error creating message queue! */ - auddbg("ERROR: Couldn't allocate message queue\n"); + auderr("ERROR: Couldn't allocate message queue\n"); return -ENOMEM; } @@ -1553,7 +1553,7 @@ static int wm8904_start(FAR struct audio_lowerhalf_s *dev) if (priv->threadid != 0) { - audvdbg("Joining old thread\n"); + audinfo("Joining old thread\n"); pthread_join(priv->threadid, &value); } @@ -1564,17 +1564,17 @@ static int wm8904_start(FAR struct audio_lowerhalf_s *dev) (void)pthread_attr_setschedparam(&tattr, &sparam); (void)pthread_attr_setstacksize(&tattr, CONFIG_WM8904_WORKER_STACKSIZE); - audvdbg("Starting worker thread\n"); + audinfo("Starting worker thread\n"); ret = pthread_create(&priv->threadid, &tattr, wm8904_workerthread, (pthread_addr_t)priv); if (ret != OK) { - auddbg("ERROR: pthread_create failed: %d\n", ret); + auderr("ERROR: pthread_create failed: %d\n", ret); } else { pthread_setname_np(priv->threadid, "wm8904"); - audvdbg("Created worker thread\n"); + audinfo("Created worker thread\n"); } return ret; @@ -1694,7 +1694,7 @@ static int wm8904_enqueuebuffer(FAR struct audio_lowerhalf_s *dev, struct audio_msg_s term_msg; int ret; - audvdbg("Enqueueing: apb=%p curbyte=%d nbytes=%d flags=%04x\n", + audinfo("Enqueueing: apb=%p curbyte=%d nbytes=%d flags=%04x\n", apb, apb->curbyte, apb->nbytes, apb->flags); /* Take a reference on the new audio buffer */ @@ -1726,7 +1726,7 @@ static int wm8904_enqueuebuffer(FAR struct audio_lowerhalf_s *dev, int errcode = errno; DEBUGASSERT(errcode > 0); - auddbg("ERROR: mq_send failed: %d\n", errcode); + auderr("ERROR: mq_send failed: %d\n", errcode); UNUSED(errcode); } } @@ -1744,7 +1744,7 @@ static int wm8904_enqueuebuffer(FAR struct audio_lowerhalf_s *dev, static int wm8904_cancelbuffer(FAR struct audio_lowerhalf_s *dev, FAR struct ap_buffer_s *apb) { - audvdbg("apb=%p\n", apb); + audinfo("apb=%p\n", apb); return OK; } @@ -1777,7 +1777,7 @@ static int wm8904_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd, * registers back in their default state. */ - audvdbg("AUDIOIOC_HWRESET:\n"); + audinfo("AUDIOIOC_HWRESET:\n"); } break; @@ -1786,7 +1786,7 @@ static int wm8904_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd, #ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS case AUDIOIOC_GETBUFFERINFO: { - audvdbg("AUDIOIOC_GETBUFFERINFO:\n"); + audinfo("AUDIOIOC_GETBUFFERINFO:\n"); bufinfo = (FAR struct ap_buffer_info_s *) arg; bufinfo->buffer_size = CONFIG_WM8904_BUFFER_SIZE; bufinfo->nbuffers = CONFIG_WM8904_NUM_BUFFERS; @@ -1795,7 +1795,7 @@ static int wm8904_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd, #endif default: - audvdbg("Ignored\n"); + audinfo("Ignored\n"); break; } @@ -1908,7 +1908,7 @@ static void wm8904_interrupt_work(FAR void *arg) /* Sample the interrupt status */ regval = wm8904_readreg(priv, WM8904_INT_STATUS); - audvdbg("INT_STATUS: %04x\n", regval); + audinfo("INT_STATUS: %04x\n", regval); /* Check for the FLL lock interrupt. We are sloppy here since at * present, only the FLL lock interrupt is used. @@ -1971,7 +1971,7 @@ static int wm8904_interrupt(FAR const struct wm8904_lower_s *lower, ret = work_queue(LPWORK, &priv->work, wm8904_interrupt_work, priv, 0); if (ret < 0) { - audlldbg("ERROR: Failed to schedule work\n"); + auderr("ERROR: Failed to schedule work\n"); } return OK; @@ -1994,7 +1994,7 @@ static void *wm8904_workerthread(pthread_addr_t pvarg) int msglen; int prio; - audvdbg("Entry\n"); + audinfo("Entry\n"); #ifndef CONFIG_AUDIO_EXCLUDE_STOP priv->terminating = false; @@ -2042,7 +2042,7 @@ static void *wm8904_workerthread(pthread_addr_t pvarg) if (msglen < sizeof(struct audio_msg_s)) { - auddbg("ERROR: Message too small: %d\n", msglen); + auderr("ERROR: Message too small: %d\n", msglen); continue; } @@ -2055,7 +2055,7 @@ static void *wm8904_workerthread(pthread_addr_t pvarg) */ case AUDIO_MSG_DATA_REQUEST: - audvdbg("AUDIO_MSG_DATA_REQUEST\n"); + audinfo("AUDIO_MSG_DATA_REQUEST\n"); break; /* Stop the playback */ @@ -2064,7 +2064,7 @@ static void *wm8904_workerthread(pthread_addr_t pvarg) case AUDIO_MSG_STOP: /* Indicate that we are terminating */ - audvdbg("AUDIO_MSG_STOP: Terminating\n"); + audinfo("AUDIO_MSG_STOP: Terminating\n"); priv->terminating = true; break; #endif @@ -2074,18 +2074,18 @@ static void *wm8904_workerthread(pthread_addr_t pvarg) */ case AUDIO_MSG_ENQUEUE: - audvdbg("AUDIO_MSG_ENQUEUE\n"); + audinfo("AUDIO_MSG_ENQUEUE\n"); break; /* We will wake up from the I2S callback with this message */ case AUDIO_MSG_COMPLETE: - audvdbg("AUDIO_MSG_COMPLETE\n"); + audinfo("AUDIO_MSG_COMPLETE\n"); wm8904_returnbuffers(priv); break; default: - auddbg("ERROR: Ignoring message ID %d\n", msg.msgId); + auderr("ERROR: Ignoring message ID %d\n", msg.msgId); break; } } @@ -2132,7 +2132,7 @@ static void *wm8904_workerthread(pthread_addr_t pvarg) priv->dev.upper(priv->dev.priv, AUDIO_CALLBACK_COMPLETE, NULL, OK); #endif - audvdbg("Exit\n"); + audinfo("Exit\n"); return NULL; } @@ -2506,7 +2506,7 @@ FAR struct audio_lowerhalf_s * regval = wm8904_readreg(priv, WM8904_ID); if (regval != WM8904_SW_RST_DEV_ID1) { - auddbg("ERROR: WM8904 not found: ID=%04x\n", regval); + auderr("ERROR: WM8904 not found: ID=%04x\n", regval); goto errout_with_dev; } diff --git a/drivers/bch/bchdev_register.c b/drivers/bch/bchdev_register.c index 139c2925767d1a7a90ebdc3e3facb42494f7ad05..2efb0e533815dd36bbab6ce1890cb3d1ae29ae38 100644 --- a/drivers/bch/bchdev_register.c +++ b/drivers/bch/bchdev_register.c @@ -86,7 +86,7 @@ int bchdev_register(FAR const char *blkdev, FAR const char *chardev, ret = bchlib_setup(blkdev, readonly, &handle); if (ret < 0) { - fdbg("bchlib_setup failed: %d\n", -ret); + ferr("ERROR: bchlib_setup failed: %d\n", -ret); return ret; } @@ -95,7 +95,7 @@ int bchdev_register(FAR const char *blkdev, FAR const char *chardev, ret = register_driver(chardev, &bch_fops, 0666, handle); if (ret < 0) { - fdbg("register_driver failed: %d\n", -ret); + ferr("ERROR: register_driver failed: %d\n", -ret); bchlib_teardown(handle); handle = NULL; } diff --git a/drivers/bch/bchdev_unregister.c b/drivers/bch/bchdev_unregister.c index 0c6a35d4b18d9be1bb2b1473e3027bfcf1fadc8f..cf7d681de82ce91d26fe907d0c861ea00727e2ba 100644 --- a/drivers/bch/bchdev_unregister.c +++ b/drivers/bch/bchdev_unregister.c @@ -91,7 +91,7 @@ int bchdev_unregister(FAR const char *chardev) /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!chardev) { return -EINVAL; @@ -103,7 +103,7 @@ int bchdev_unregister(FAR const char *chardev) fd = open(chardev, O_RDONLY); if (fd < 0) { - dbg("Failed to open %s: %d\n", chardev, errno); + _err("ERROR: Failed to open %s: %d\n", chardev, errno); return -errno; } @@ -116,7 +116,7 @@ int bchdev_unregister(FAR const char *chardev) if (ret < 0) { - dbg("ioctl failed: %d\n", errno); + _err("ERROR: ioctl failed: %d\n", errno); return -errno; } diff --git a/drivers/bch/bchlib_cache.c b/drivers/bch/bchlib_cache.c index 8ad543b4b008d0f17388cb57324036a0a69941d0..aa54fb3213ef3a69fafa76b330dc3954d2ab9f54 100644 --- a/drivers/bch/bchlib_cache.c +++ b/drivers/bch/bchlib_cache.c @@ -156,7 +156,7 @@ int bchlib_flushsector(FAR struct bchlib_s *bch) ret = inode->u.i_bops->write(inode, bch->buffer, bch->sector, 1); if (ret < 0) { - fdbg("Write failed: %d\n"); + ferr("Write failed: %d\n"); } #if defined(CONFIG_BCH_ENCRYPTION) @@ -201,7 +201,7 @@ int bchlib_readsector(FAR struct bchlib_s *bch, size_t sector) ret = inode->u.i_bops->read(inode, bch->buffer, sector, 1); if (ret < 0) { - fdbg("Read failed: %d\n"); + ferr("Read failed: %d\n"); } bch->sector = sector; #if defined(CONFIG_BCH_ENCRYPTION) diff --git a/drivers/bch/bchlib_read.c b/drivers/bch/bchlib_read.c index d534d8491963b58e995dd1de9f89d48b519adcda..45804d3560b7fd6f4ad544870654051476d0b6b6 100644 --- a/drivers/bch/bchlib_read.c +++ b/drivers/bch/bchlib_read.c @@ -160,7 +160,7 @@ ssize_t bchlib_read(FAR void *handle, FAR char *buffer, size_t offset, size_t le sector, nsectors); if (ret < 0) { - fdbg("Read failed: %d\n"); + ferr("ERROR: Read failed: %d\n"); return ret; } diff --git a/drivers/bch/bchlib_setup.c b/drivers/bch/bchlib_setup.c index 6ec7a878a63c8ebe3b715506c860596e2bb10299..803c5058ce8a523e9a46f43a6f27e83524b8474b 100644 --- a/drivers/bch/bchlib_setup.c +++ b/drivers/bch/bchlib_setup.c @@ -96,7 +96,7 @@ int bchlib_setup(const char *blkdev, bool readonly, FAR void **handle) bch = (FAR struct bchlib_s *)kmm_zalloc(sizeof(struct bchlib_s)); if (!bch) { - fdbg("Failed to allocate BCH structure\n"); + ferr("ERROR: Failed to allocate BCH structure\n"); return -ENOMEM; } @@ -105,7 +105,7 @@ int bchlib_setup(const char *blkdev, bool readonly, FAR void **handle) ret = open_blockdriver(blkdev, readonly ? MS_RDONLY : 0, &bch->inode); if (ret < 0) { - fdbg("Failed to open driver %s: %d\n", blkdev, -ret); + ferr("ERROR: Failed to open driver %s: %d\n", blkdev, -ret); goto errout_with_bch; } @@ -114,20 +114,20 @@ int bchlib_setup(const char *blkdev, bool readonly, FAR void **handle) ret = bch->inode->u.i_bops->geometry(bch->inode, &geo); if (ret < 0) { - fdbg("geometry failed: %d\n", -ret); + ferr("ERROR: geometry failed: %d\n", -ret); goto errout_with_bch; } if (!geo.geo_available) { - fdbg("geometry failed: %d\n", -ret); + ferr("ERROR: geometry failed: %d\n", -ret); ret = -ENODEV; goto errout_with_bch; } if (!readonly && (!bch->inode->u.i_bops->write || !geo.geo_writeenabled)) { - fdbg("write access not supported\n"); + ferr("ERROR: write access not supported\n"); ret = -EACCES; goto errout_with_bch; } @@ -145,7 +145,7 @@ int bchlib_setup(const char *blkdev, bool readonly, FAR void **handle) bch->buffer = (FAR uint8_t *)kmm_malloc(bch->sectsize); if (!bch->buffer) { - fdbg("Failed to allocate sector buffer\n"); + ferr("ERROR: Failed to allocate sector buffer\n"); ret = -ENOMEM; goto errout_with_bch; } diff --git a/drivers/bch/bchlib_write.c b/drivers/bch/bchlib_write.c index b1636c6d450914330d2415624e46f05bd993b1c2..712839ef06ecbd0945ba6b5c033f2f8a43b8199a 100644 --- a/drivers/bch/bchlib_write.c +++ b/drivers/bch/bchlib_write.c @@ -162,7 +162,7 @@ ssize_t bchlib_write(FAR void *handle, FAR const char *buffer, size_t offset, si sector, nsectors); if (ret < 0) { - fdbg("Write failed: %d\n", ret); + ferr("ERROR: Write failed: %d\n", ret); return ret; } @@ -204,7 +204,7 @@ ssize_t bchlib_write(FAR void *handle, FAR const char *buffer, size_t offset, si ret = bchlib_flushsector(bch); if (ret < 0) { - fdbg("Flush failed: %d\n", ret); + ferr("ERROR: Flush failed: %d\n", ret); return ret; } diff --git a/drivers/can.c b/drivers/can.c index 2454f06c2d3284db8983c2d77ccc3352b5056965..8dc67601a7ed64ba24709e96b55aa58ae1eec037 100644 --- a/drivers/can.c +++ b/drivers/can.c @@ -4,6 +4,9 @@ * Copyright (C) 2008-2009, 2011-2012, 2014-2015 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: @@ -47,6 +50,7 @@ #include #include #include +#include #include #include @@ -96,21 +100,6 @@ # endif #endif -/* 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 - /* Timing Definitions *******************************************************/ #define HALF_SECOND_MSEC 500 @@ -120,6 +109,17 @@ * Private Function Prototypes ****************************************************************************/ +/* Semaphore helpers */ + +static int can_takesem(FAR sem_t *sem); + +/* Poll helpers */ + +#ifndef CONFIG_DISABLE_POLL +static void can_pollnotify(FAR struct can_dev_s *dev, + pollevent_t eventset); +#endif + /* CAN helpers */ static uint8_t can_dlc2bytes(uint8_t dlc); @@ -135,14 +135,18 @@ static void can_txready_work(FAR void *arg); static int can_open(FAR struct file *filep); static int can_close(FAR struct file *filep); static ssize_t can_read(FAR struct file *filep, FAR char *buffer, - size_t buflen); + size_t buflen); static int can_xmit(FAR struct can_dev_s *dev); static ssize_t can_write(FAR struct file *filep, - FAR const char *buffer, size_t buflen); + FAR const char *buffer, size_t buflen); static inline ssize_t can_rtrread(FAR struct can_dev_s *dev, - FAR struct canioc_rtr_s *rtr); + FAR struct canioc_rtr_s *rtr); static int can_ioctl(FAR struct file *filep, int cmd, - unsigned long arg); + unsigned long arg); +#ifndef CONFIG_DISABLE_POLL +static int can_poll(FAR struct file *filep, FAR struct pollfd *fds, + bool setup); +#endif /**************************************************************************** * Private Data @@ -154,13 +158,13 @@ static const struct file_operations g_canops = can_close, /* close */ can_read, /* read */ can_write, /* write */ - 0, /* seek */ + NULL, /* seek */ can_ioctl /* ioctl */ #ifndef CONFIG_DISABLE_POLL - , 0 /* poll */ + , can_poll /* poll */ #endif #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , 0 /* unlink */ + , NULL /* unlink */ #endif }; @@ -168,6 +172,64 @@ static const struct file_operations g_canops = * Private Functions ****************************************************************************/ +/**************************************************************************** + * Name: can_takesem + ****************************************************************************/ + +static int can_takesem(FAR sem_t *sem) +{ + int errcode; + + /* Take a count from the semaphore, possibly waiting */ + + if (sem_wait(sem) < 0) + { + /* The only case that an error should occur here is if the wait + * was awakened by a signal + */ + + errcode = get_errno(); + DEBUGASSERT(errcode == EINTR); + return -errcode; + } + + return OK; +} + +/**************************************************************************** + * Name: can_givesem + ****************************************************************************/ + +#define can_givesem(sem) sem_post(sem) + +/**************************************************************************** + * Name: can_pollnotify + ****************************************************************************/ + +#ifndef CONFIG_DISABLE_POLL +static void can_pollnotify(FAR struct can_dev_s *dev, pollevent_t eventset) +{ + FAR struct pollfd *fds; + int i; + + for (i = 0; i < CONFIG_CAN_NPOLLWAITERS; i++) + { + fds = dev->cd_fds[i]; + if (fds != NULL) + { + fds->revents |= fds->events & eventset; + if (fds->revents != 0) + { + caninfo("Report events: %02x\n", fds->revents); + sem_post(fds->sem); + } + } + } +} +#else +# define can_pollnotify(dev, eventset) +#endif + /**************************************************************************** * Name: can_dlc2bytes * @@ -296,9 +358,9 @@ static void can_txready_work(FAR void *arg) irqstate_t flags; int ret; - canllvdbg("xmit head: %d queue: %d tail: %d\n", - dev->cd_xmit.tx_head, dev->cd_xmit.tx_queue, - dev->cd_xmit.tx_tail); + caninfo("xmit head: %d queue: %d tail: %d\n", + dev->cd_xmit.tx_head, dev->cd_xmit.tx_queue, + dev->cd_xmit.tx_tail); /* Verify that the xmit FIFO is not empty. The following operations must * be performed with interrupt disabled. @@ -324,7 +386,7 @@ static void can_txready_work(FAR void *arg) { /* Yes.. Inform them that new xmit space is available */ - (void)sem_post(&dev->cd_xmit.tx_sem); + can_givesem(&dev->cd_xmit.tx_sem); } } } @@ -346,72 +408,70 @@ static int can_open(FAR struct file *filep) FAR struct inode *inode = filep->f_inode; FAR struct can_dev_s *dev = inode->i_private; uint8_t tmp; - int ret = OK; + int ret; - canvdbg("ocount: %d\n", dev->cd_ocount); + caninfo("ocount: %d\n", dev->cd_ocount); /* If the port is the middle of closing, wait until the close is finished */ - if (sem_wait(&dev->cd_closesem) != OK) + ret = can_takesem(&dev->cd_closesem); + if (ret < 0) { - ret = -get_errno(); + return ret; } - else + + /* Increment the count of references to the device. If this is the first + * time that the driver has been opened for this device, then initialize + * the device. + */ + + tmp = dev->cd_ocount + 1; + if (tmp == 0) { - /* Increment the count of references to the device. If this is the first - * time that the driver has been opened for this device, then initialize - * the device. - */ + /* More than 255 opens; uint8_t overflows to zero */ - tmp = dev->cd_ocount + 1; - if (tmp == 0) - { - /* More than 255 opens; uint8_t overflows to zero */ + ret = -EMFILE; + } + else + { + /* Check if this is the first time that the driver has been opened. */ - ret = -EMFILE; - } - else + if (tmp == 1) { - /* Check if this is the first time that the driver has been opened. */ + /* Yes.. perform one time hardware initialization. */ - if (tmp == 1) + irqstate_t flags = enter_critical_section(); + ret = dev_setup(dev); + if (ret >= 0) { - /* Yes.. perform one time hardware initialization. */ + /* Mark the FIFOs empty */ - irqstate_t flags = enter_critical_section(); - ret = dev_setup(dev); - if (ret == OK) - { - /* Mark the FIFOs empty */ - - dev->cd_xmit.tx_head = 0; - dev->cd_xmit.tx_queue = 0; - dev->cd_xmit.tx_tail = 0; - dev->cd_recv.rx_head = 0; - dev->cd_recv.rx_tail = 0; - - /* Finally, Enable the CAN RX interrupt */ + dev->cd_xmit.tx_head = 0; + dev->cd_xmit.tx_queue = 0; + dev->cd_xmit.tx_tail = 0; + dev->cd_recv.rx_head = 0; + dev->cd_recv.rx_tail = 0; - dev_rxint(dev, true); + /* Finally, Enable the CAN RX interrupt */ - /* Save the new open count only on success */ + dev_rxint(dev, true); - dev->cd_ocount = 1; - } + /* Save the new open count only on success */ - leave_critical_section(flags); + dev->cd_ocount = 1; } - else - { - /* Save the incremented open count */ - dev->cd_ocount = tmp; - } + leave_critical_section(flags); } + else + { + /* Save the incremented open count */ - sem_post(&dev->cd_closesem); + dev->cd_ocount = tmp; + } } + can_givesem(&dev->cd_closesem); return ret; } @@ -429,67 +489,64 @@ static int can_close(FAR struct file *filep) FAR struct inode *inode = filep->f_inode; FAR struct can_dev_s *dev = inode->i_private; irqstate_t flags; - int ret = OK; + int ret; - canvdbg("ocount: %d\n", dev->cd_ocount); + caninfo("ocount: %d\n", dev->cd_ocount); - if (sem_wait(&dev->cd_closesem) != OK) + ret = can_takesem(&dev->cd_closesem); + if (ret < 0) { - ret = -get_errno(); + return ret; } - else + + /* Decrement the references to the driver. If the reference count will + * decrement to 0, then uninitialize the driver. + */ + + if (dev->cd_ocount > 1) { - /* Decrement the references to the driver. If the reference count will - * decrement to 0, then uninitialize the driver. - */ + dev->cd_ocount--; + goto errout; + } - if (dev->cd_ocount > 1) - { - dev->cd_ocount--; - sem_post(&dev->cd_closesem); - } - else - { - /* There are no more references to the port */ + /* There are no more references to the port */ - dev->cd_ocount = 0; + dev->cd_ocount = 0; - /* Stop accepting input */ + /* Stop accepting input */ - dev_rxint(dev, false); + dev_rxint(dev, false); - /* Now we wait for the transmit FIFO to clear */ + /* Now we wait for the transmit FIFO to clear */ - while (dev->cd_xmit.tx_head != dev->cd_xmit.tx_tail) - { + while (dev->cd_xmit.tx_head != dev->cd_xmit.tx_tail) + { #ifndef CONFIG_DISABLE_SIGNALS - usleep(HALF_SECOND_USEC); + usleep(HALF_SECOND_USEC); #else - up_mdelay(HALF_SECOND_MSEC); + up_mdelay(HALF_SECOND_MSEC); #endif - } + } - /* And wait for the TX hardware FIFO to drain */ + /* And wait for the TX hardware FIFO to drain */ - while (!dev_txempty(dev)) - { + while (!dev_txempty(dev)) + { #ifndef CONFIG_DISABLE_SIGNALS - usleep(HALF_SECOND_USEC); + usleep(HALF_SECOND_USEC); #else - up_mdelay(HALF_SECOND_MSEC); + up_mdelay(HALF_SECOND_MSEC); #endif - } - - /* Free the IRQ and disable the CAN device */ + } - flags = enter_critical_section(); /* Disable interrupts */ - dev_shutdown(dev); /* Disable the CAN */ - leave_critical_section(flags); + /* Free the IRQ and disable the CAN device */ - sem_post(&dev->cd_closesem); - } - } + flags = enter_critical_section(); /* Disable interrupts */ + dev_shutdown(dev); /* Disable the CAN */ + leave_critical_section(flags); +errout: + can_givesem(&dev->cd_closesem); return ret; } @@ -510,7 +567,7 @@ static ssize_t can_read(FAR struct file *filep, FAR char *buffer, irqstate_t flags; int ret = 0; - canvdbg("buflen: %d\n", buflen); + caninfo("buflen: %d\n", buflen); /* The caller must provide enough memory to catch the smallest possible * message. This is not a system error condition, but we won't permit @@ -572,18 +629,12 @@ static ssize_t can_read(FAR struct file *filep, FAR char *buffer, /* Wait for a message to be received */ + DEBUGASSERT(dev->cd_nrxwaiters < 255); dev->cd_nrxwaiters++; - do - { - ret = sem_wait(&dev->cd_recv.rx_sem); - } - while (ret >= 0 && dev->cd_recv.rx_head == dev->cd_recv.rx_tail); - + ret = can_takesem(&dev->cd_recv.rx_sem); dev->cd_nrxwaiters--; - if (ret < 0) { - ret = -get_errno(); goto return_with_irqdisabled; } } @@ -649,8 +700,8 @@ static int can_xmit(FAR struct can_dev_s *dev) int tmpndx; int ret = -EBUSY; - canllvdbg("xmit head: %d queue: %d tail: %d\n", - dev->cd_xmit.tx_head, dev->cd_xmit.tx_queue, dev->cd_xmit.tx_tail); + caninfo("xmit head: %d queue: %d tail: %d\n", + dev->cd_xmit.tx_head, dev->cd_xmit.tx_queue, dev->cd_xmit.tx_tail); /* If there is nothing to send, then just disable interrupts and return */ @@ -700,9 +751,9 @@ static int can_xmit(FAR struct can_dev_s *dev) /* Send the next message at the FIFO queue index */ ret = dev_send(dev, &dev->cd_xmit.tx_buffer[tmpndx]); - if (ret != OK) + if (ret < 0) { - candbg("dev_send failed: %d\n", ret); + canerr("dev_send failed: %d\n", ret); break; } } @@ -732,7 +783,7 @@ static ssize_t can_write(FAR struct file *filep, FAR const char *buffer, int msglen; int ret = 0; - canvdbg("buflen: %d\n", buflen); + caninfo("buflen: %d\n", buflen); /* Interrupts must disabled throughout the following */ @@ -794,20 +845,14 @@ static ssize_t can_write(FAR struct file *filep, FAR const char *buffer, /* Wait for a message to be sent */ - do + DEBUGASSERT(dev->cd_ntxwaiters < 255); + dev->cd_ntxwaiters++; + ret = can_takesem(&fifo->tx_sem); + dev->cd_ntxwaiters--; + if (ret < 0) { - DEBUGASSERT(dev->cd_ntxwaiters < 255); - dev->cd_ntxwaiters++; - ret = sem_wait(&fifo->tx_sem); - dev->cd_ntxwaiters--; - - if (ret < 0 && get_errno() != EINTR) - { - ret = -get_errno(); - goto return_with_irqdisabled; - } + goto return_with_irqdisabled; } - while (ret < 0); /* Re-check the FIFO state */ @@ -833,7 +878,7 @@ static ssize_t can_write(FAR struct file *filep, FAR const char *buffer, } /* We get here after all messages have been added to the FIFO. Check if - * we need to kick of the XMIT sequence. + * we need to kick off the XMIT sequence. */ if (inactive) @@ -893,11 +938,11 @@ static inline ssize_t can_rtrread(FAR struct can_dev_s *dev, /* Send the remote transmission request */ ret = dev_remoterequest(dev, wait->cr_id); - if (ret == OK) + if (ret >= 0) { /* Then wait for the response */ - ret = sem_wait(&wait->cr_sem); + ret = can_takesem(&wait->cr_sem); } } @@ -915,7 +960,7 @@ static int can_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR struct can_dev_s *dev = inode->i_private; int ret = OK; - canvdbg("cmd: %d arg: %ld\n", cmd, arg); + caninfo("cmd: %d arg: %ld\n", cmd, arg); /* Handle built-in ioctl commands */ @@ -944,6 +989,157 @@ static int can_ioctl(FAR struct file *filep, int cmd, unsigned long arg) return ret; } +/**************************************************************************** + * Name: can_poll + ****************************************************************************/ + +#ifndef CONFIG_DISABLE_POLL +static int can_poll(FAR struct file *filep, FAR struct pollfd *fds, + bool setup) +{ + FAR struct inode *inode = (FAR struct inode *)filep->f_inode; + FAR struct can_dev_s *dev = (FAR struct can_dev_s *)inode->i_private; + pollevent_t eventset; + int ndx; + int ret; + int i; + + /* Some sanity checking */ + +#ifdef CONFIG_DEBUG_FEATURES + if (dev == NULL || fds == NULL) + { + return -ENODEV; + } +#endif + + /* Get exclusive access to the poll structures */ + + ret = can_takesem(&dev->cd_pollsem); + if (ret < 0) + { + /* A signal received while waiting for access to the poll data + * will abort the operation + */ + + return ret; + } + + /* Are we setting up the poll? Or tearing it down? */ + + if (setup) + { + /* This is a request to set up the poll. Find an available + * slot for the poll structure reference. + */ + + for (i = 0; i < CONFIG_CAN_NPOLLWAITERS; i++) + { + /* Find an available slot */ + + if (dev->cd_fds[i] == NULL) + { + /* Bind the poll structure and this slot */ + + dev->cd_fds[i] = fds; + fds->priv = &dev->cd_fds[i]; + break; + } + } + + if (i >= CONFIG_CAN_NPOLLWAITERS) + { + fds->priv = NULL; + ret = -EBUSY; + goto errout; + } + + /* Should we immediately notify on any of the requested events? + * First, check if the xmit buffer is full. + * + * Get exclusive access to the cd_xmit buffer indices. NOTE: that + * we do not let this wait be interrupted by a signal (we probably + * should, but that would be a little awkward). + */ + + eventset = 0; + + DEBUGASSERT(dev->cd_ntxwaiters < 255); + dev->cd_ntxwaiters++; + do + { + ret = can_takesem(&dev->cd_xmit.tx_sem); + } + while (ret < 0); + dev->cd_ntxwaiters--; + + ndx = dev->cd_xmit.tx_head + 1; + if (ndx >= CONFIG_CAN_FIFOSIZE) + { + ndx = 0; + } + + if (ndx != dev->cd_xmit.tx_tail) + { + eventset |= fds->events & POLLOUT; + } + + can_givesem(&dev->cd_xmit.tx_sem); + + /* Check if the receive buffer is empty. + * + * Get exclusive access to the cd_recv buffer indices. NOTE: that + * we do not let this wait be interrupted by a signal (we probably + * should, but that would be a little awkward). + */ + + DEBUGASSERT(dev->cd_nrxwaiters < 255); + dev->cd_nrxwaiters++; + do + { + ret = can_takesem(&dev->cd_recv.rx_sem); + } + while (ret < 0); + dev->cd_nrxwaiters--; + + if (dev->cd_recv.rx_head != dev->cd_recv.rx_tail) + { + eventset |= fds->events & POLLIN; + } + + can_givesem(&dev->cd_recv.rx_sem); + + if (eventset != 0) + { + can_pollnotify(dev, eventset); + } + } + else if (fds->priv != NULL) + { + /* This is a request to tear down the poll */ + + struct pollfd **slot = (struct pollfd **)fds->priv; + +#ifdef CONFIG_DEBUG_FEATURES + if (slot == NULL) + { + ret = -EIO; + goto errout; + } +#endif + + /* Remove all memory of the poll setup */ + + *slot = NULL; + fds->priv = NULL; + } + +errout: + can_givesem(&dev->cd_pollsem); + return ret; +} +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -970,9 +1166,12 @@ int can_register(FAR const char *path, FAR struct can_dev_s *dev) dev->cd_error = 0; #endif - sem_init(&dev->cd_xmit.tx_sem, 0, 0); - sem_init(&dev->cd_recv.rx_sem, 0, 0); - sem_init(&dev->cd_closesem, 0, 1); + sem_init(&dev->cd_xmit.tx_sem, 0, 1); + sem_init(&dev->cd_recv.rx_sem, 0, 1); + sem_init(&dev->cd_closesem, 0, 1); +#ifndef CONFIG_DISABLE_POLL + sem_init(&dev->cd_pollsem, 0, 1); +#endif for (i = 0; i < CONFIG_CAN_NPENDINGRTR; i++) { @@ -986,7 +1185,7 @@ int can_register(FAR const char *path, FAR struct can_dev_s *dev) /* Register the CAN device */ - canvdbg("Registering %s\n", path); + caninfo("Registering %s\n", path); return register_driver(path, &g_canops, 0666, dev); } @@ -1015,10 +1214,10 @@ int can_receive(FAR struct can_dev_s *dev, FAR struct can_hdr_s *hdr, FAR struct can_rxfifo_s *fifo = &dev->cd_recv; FAR uint8_t *dest; int nexttail; - int err = -ENOMEM; + int errcode = -ENOMEM; int i; - canllvdbg("ID: %d DLC: %d\n", hdr->ch_id, hdr->ch_dlc); + caninfo("ID: %d DLC: %d\n", hdr->ch_id, hdr->ch_dlc); /* Check if adding this new message would over-run the drivers ability to * enqueue read data. @@ -1070,7 +1269,7 @@ int can_receive(FAR struct can_dev_s *dev, FAR struct can_hdr_s *hdr, /* And restart the waiting thread */ - sem_post(&rtr->cr_sem); + can_givesem(&rtr->cr_sem); } } } @@ -1110,10 +1309,16 @@ int can_receive(FAR struct can_dev_s *dev, FAR struct can_hdr_s *hdr, if (dev->cd_nrxwaiters > 0) { - sem_post(&fifo->rx_sem); + can_givesem(&fifo->rx_sem); } - err = OK; + errcode = OK; + + /* Notify all poll/select waiters that they can read from the + * cd_recv buffer + */ + + can_pollnotify(dev, POLLIN); } #ifdef CONFIG_CAN_ERRORS else @@ -1124,7 +1329,7 @@ int can_receive(FAR struct can_dev_s *dev, FAR struct can_hdr_s *hdr, } #endif - return err; + return errcode; } /**************************************************************************** @@ -1203,8 +1408,8 @@ int can_txdone(FAR struct can_dev_s *dev) { int ret = -ENOENT; - canllvdbg("xmit head: %d queue: %d tail: %d\n", - dev->cd_xmit.tx_head, dev->cd_xmit.tx_queue, dev->cd_xmit.tx_tail); + caninfo("xmit head: %d queue: %d tail: %d\n", + dev->cd_xmit.tx_head, dev->cd_xmit.tx_queue, dev->cd_xmit.tx_tail); /* Verify that the xmit FIFO is not empty */ @@ -1235,7 +1440,7 @@ int can_txdone(FAR struct can_dev_s *dev) { /* Yes.. Inform them that new xmit space is available */ - ret = sem_post(&dev->cd_xmit.tx_sem); + ret = can_givesem(&dev->cd_xmit.tx_sem); } else { @@ -1243,6 +1448,12 @@ int can_txdone(FAR struct can_dev_s *dev) } } + /* Notify all poll/select waiters that they can write to the cd_xmit + * buffer + */ + + can_pollnotify(dev, POLLOUT); + return ret; } @@ -1307,9 +1518,9 @@ int can_txready(FAR struct can_dev_s *dev) { int ret = -ENOENT; - canllvdbg("xmit head: %d queue: %d tail: %d waiters: %d\n", - dev->cd_xmit.tx_head, dev->cd_xmit.tx_queue, dev->cd_xmit.tx_tail, - dev->cd_ntxwaiters); + caninfo("xmit head: %d queue: %d tail: %d waiters: %d\n", + dev->cd_xmit.tx_head, dev->cd_xmit.tx_queue, dev->cd_xmit.tx_tail, + dev->cd_ntxwaiters); /* Verify that the xmit FIFO is not empty. This is safe because interrupts * are always disabled when calling into can_xmit(); this cannot collide diff --git a/drivers/eeprom/spi_xx25xx.c b/drivers/eeprom/spi_xx25xx.c index 1f9335b856778d9a2c62c2d24f4eb8bfeb10e74c..437dfbea85424887a605e7a9fc083611dfef4d01 100644 --- a/drivers/eeprom/spi_xx25xx.c +++ b/drivers/eeprom/spi_xx25xx.c @@ -387,8 +387,6 @@ static void ee25xx_waitwritecomplete(struct ee25xx_dev_s *priv) } } while ((status & EE25XX_SR_WIP) != 0); - - fvdbg("Complete\n"); } /**************************************************************************** @@ -815,9 +813,8 @@ int ee25xx_initialize(FAR struct spi_dev_s *dev, FAR char *devname, eedev->readonly = !!readonly; - lowsyslog(LOG_NOTICE, - "EEPROM device %s, %d bytes, %d per page, addrlen %d, readonly %d\n", - devname, eedev->size, eedev->pgsize, eedev->addrlen, eedev->readonly); + finfo("EEPROM device %s, %d bytes, %d per page, addrlen %d, readonly %d\n", + devname, eedev->size, eedev->pgsize, eedev->addrlen, eedev->readonly); return register_driver(devname, &ee25xx_fops, 0666, eedev); } diff --git a/drivers/i2c/i2c_driver.c b/drivers/i2c/i2c_driver.c index ac53f0f1f1c16f427e3da45aa4d8497fa0d1e749..1e5024b3ec8bdb55cd2e34246fe2f979216d86f2 100644 --- a/drivers/i2c/i2c_driver.c +++ b/drivers/i2c/i2c_driver.c @@ -62,17 +62,6 @@ #define DEVNAME_FMT "/dev/i2c%d" #define DEVNAME_FMTLEN (8 + 3 + 1) -/* Debug ********************************************************************/ -/* CONFIG_DEBUG_I2C + CONFIG_DEBUG enables general I2C debug output. */ - -#ifdef CONFIG_DEBUG_I2C -# define i2cdbg dbg -# define i2cvdbg vdbg -#else -# define i2cdbg(x...) -# define i2cvdbg(x...) -#endif - /**************************************************************************** * Private Types ****************************************************************************/ @@ -254,7 +243,7 @@ static int i2cdrvr_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR struct i2c_transfer_s *transfer; int ret; - i2cvdbg("cmd=%d arg=%lu\n", cmd, arg); + i2cinfo("cmd=%d arg=%lu\n", cmd, arg); /* Get our private data structure */ @@ -435,4 +424,4 @@ int i2c_register(FAR struct i2c_master_s *i2c, int bus) return -ENOMEM; } -#endif /* CONFIG_I2C_DRIVER */ \ No newline at end of file +#endif /* CONFIG_I2C_DRIVER */ diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig index ebf00232ee4a9cdc1652d013260a0d891b94f960..0fc96d6c918856929375655f99f595351b686024 100644 --- a/drivers/input/Kconfig +++ b/drivers/input/Kconfig @@ -176,10 +176,10 @@ config MXT_NPOLLWAITERS ---help--- Maximum number of threads that can be waiting on poll() -config MXT_DISABLE_DEBUG_VERBOSE +config MXT_DISABLE_CONFIG_DEBUG_INFO bool "Disable verbose debug output" default y - depends on DEBUG_VERBOSE && DEBUG_INPUT + depends on DEBUG_INPUT_INFO ---help--- The maXTouch tends to generate interrupts at a high rate during the contact. If verbose debug is enabled in this driver, you may not @@ -316,7 +316,7 @@ config STMPE811_TEMP_DISABLE config STMPE811_REGDEBUG bool "Enable Register-Level STMPE811 Debug" default n - depends on DEBUG + depends on DEBUG_FEATURES ---help--- Enable very low register-level debug output. @@ -331,7 +331,7 @@ config BUTTONS if BUTTONS config BUTTONS_LOWER - bool "Generic Lower Half Button Dirver" + bool "Generic Lower Half Button Driver" default n depends on ARCH_BUTTONS && ARCH_IRQBUTTONS ---help--- diff --git a/drivers/input/ads7843e.c b/drivers/input/ads7843e.c index 22b7606e63f9a1476d5bc2c316454e6552db5556..5f4c159a9f844ca38d20db3f64e4d8bd797f0ed3 100644 --- a/drivers/input/ads7843e.c +++ b/drivers/input/ads7843e.c @@ -279,7 +279,7 @@ static uint16_t ads7843e_sendcmd(FAR struct ads7843e_dev_s *priv, uint8_t cmd) result = ((uint16_t)buffer[0] << 8) | (uint16_t)buffer[1]; result = result >> 4; - ivdbg("cmd:%02x response:%04x\n", cmd, result); + iinfo("cmd:%02x response:%04x\n", cmd, result); return result; } @@ -319,7 +319,7 @@ static void ads7843e_notify(FAR struct ads7843e_dev_s *priv) if (fds) { fds->revents |= POLLIN; - ivdbg("Report events: %02x\n", fds->revents); + iinfo("Report events: %02x\n", fds->revents); sem_post(fds->sem); } } @@ -416,7 +416,7 @@ static int ads7843e_waitsample(FAR struct ads7843e_dev_s *priv, { /* Wait for a change in the ADS7843E state */ - ivdbg("Waiting..\n"); + iinfo("Waiting..\n"); priv->nwaiters++; ret = sem_wait(&priv->waitsem); priv->nwaiters--; @@ -427,14 +427,14 @@ static int ads7843e_waitsample(FAR struct ads7843e_dev_s *priv, * the failure now. */ - idbg("sem_wait: %d\n", errno); + ierr("ERROR: sem_wait: %d\n", errno); DEBUGASSERT(errno == EINTR); ret = -EINTR; goto errout; } } - ivdbg("Sampled\n"); + iinfo("Sampled\n"); /* Re-acquire the semaphore that manages mutually exclusive access to * the device structure. We may have to wait here. But we have our sample. @@ -498,7 +498,7 @@ static int ads7843e_schedule(FAR struct ads7843e_dev_s *priv) ret = work_queue(HPWORK, &priv->work, ads7843e_worker, priv, 0); if (ret != 0) { - illdbg("Failed to queue work: %d\n", ret); + ierr("ERROR: Failed to queue work: %d\n", ret); } return OK; @@ -749,7 +749,7 @@ static int ads7843e_open(FAR struct file *filep) uint8_t tmp; int ret; - ivdbg("Opening\n"); + iinfo("Opening\n"); DEBUGASSERT(filep); inode = filep->f_inode; @@ -791,7 +791,7 @@ errout_with_sem: sem_post(&priv->devsem); return ret; #else - ivdbg("Opening\n"); + iinfo("Opening\n"); return OK; #endif } @@ -807,7 +807,7 @@ static int ads7843e_close(FAR struct file *filep) FAR struct ads7843e_dev_s *priv; int ret; - ivdbg("Closing\n"); + iinfo("Closing\n"); DEBUGASSERT(filep); inode = filep->f_inode; @@ -837,7 +837,7 @@ static int ads7843e_close(FAR struct file *filep) sem_post(&priv->devsem); #endif - ivdbg("Closing\n"); + iinfo("Closing\n"); return OK; } @@ -853,7 +853,7 @@ static ssize_t ads7843e_read(FAR struct file *filep, FAR char *buffer, size_t le struct ads7843e_sample_s sample; int ret; - ivdbg("buffer:%p len:%d\n", buffer, len); + iinfo("buffer:%p len:%d\n", buffer, len); DEBUGASSERT(filep); inode = filep->f_inode; @@ -870,7 +870,7 @@ static ssize_t ads7843e_read(FAR struct file *filep, FAR char *buffer, size_t le * handle smaller reads... but why? */ - idbg("Unsupported read size: %d\n", len); + ierr("ERROR: Unsupported read size: %d\n", len); return -ENOSYS; } @@ -881,7 +881,7 @@ static ssize_t ads7843e_read(FAR struct file *filep, FAR char *buffer, size_t le { /* This should only happen if the wait was cancelled by an signal */ - idbg("sem_wait: %d\n", errno); + ierr("ERROR: sem_wait: %d\n", errno); DEBUGASSERT(errno == EINTR); return -EINTR; } @@ -896,7 +896,7 @@ static ssize_t ads7843e_read(FAR struct file *filep, FAR char *buffer, size_t le * option, then just return an error. */ - ivdbg("Sample data is not available\n"); + iinfo("Sample data is not available\n"); if (filep->f_oflags & O_NONBLOCK) { ret = -EAGAIN; @@ -910,7 +910,7 @@ static ssize_t ads7843e_read(FAR struct file *filep, FAR char *buffer, size_t le { /* We might have been awakened by a signal */ - idbg("ads7843e_waitsample: %d\n", ret); + ierr("ERROR: ads7843e_waitsample: %d\n", ret); goto errout; } } @@ -957,16 +957,16 @@ static ssize_t ads7843e_read(FAR struct file *filep, FAR char *buffer, size_t le report->point[0].flags = TOUCH_MOVE | TOUCH_ID_VALID | TOUCH_POS_VALID; } - ivdbg(" id: %d\n", report->point[0].id); - ivdbg(" flags: %02x\n", report->point[0].flags); - ivdbg(" x: %d\n", report->point[0].x); - ivdbg(" y: %d\n", report->point[0].y); + iinfo(" id: %d\n", report->point[0].id); + iinfo(" flags: %02x\n", report->point[0].flags); + iinfo(" x: %d\n", report->point[0].x); + iinfo(" y: %d\n", report->point[0].y); ret = SIZEOF_TOUCH_SAMPLE_S(1); errout: sem_post(&priv->devsem); - ivdbg("Returning: %d\n", ret); + iinfo("Returning: %d\n", ret); return ret; } @@ -980,7 +980,7 @@ static int ads7843e_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR struct ads7843e_dev_s *priv; int ret; - ivdbg("cmd: %d arg: %ld\n", cmd, arg); + iinfo("cmd: %d arg: %ld\n", cmd, arg); DEBUGASSERT(filep); inode = filep->f_inode; @@ -1040,7 +1040,7 @@ static int ads7843e_poll(FAR struct file *filep, FAR struct pollfd *fds, int ret; int i; - ivdbg("setup: %d\n", (int)setup); + iinfo("setup: %d\n", (int)setup); DEBUGASSERT(filep && fds); inode = filep->f_inode; @@ -1156,7 +1156,7 @@ int ads7843e_register(FAR struct spi_dev_s *spi, #endif int ret; - ivdbg("spi: %p minor: %d\n", spi, minor); + iinfo("spi: %p minor: %d\n", spi, minor); /* Debug-only sanity checks */ @@ -1170,7 +1170,7 @@ int ads7843e_register(FAR struct spi_dev_s *spi, priv = (FAR struct ads7843e_dev_s *)kmm_malloc(sizeof(struct ads7843e_dev_s)); if (!priv) { - idbg("kmm_malloc(%d) failed\n", sizeof(struct ads7843e_dev_s)); + ierr("ERROR: kmm_malloc(%d) failed\n", sizeof(struct ads7843e_dev_s)); return -ENOMEM; } #endif @@ -1197,12 +1197,12 @@ int ads7843e_register(FAR struct spi_dev_s *spi, ret = config->attach(config, ads7843e_interrupt); if (ret < 0) { - idbg("Failed to attach interrupt\n"); + ierr("ERROR: Failed to attach interrupt\n"); goto errout_with_priv; } - idbg("Mode: %d Bits: 8 Frequency: %d\n", - CONFIG_ADS7843E_SPIMODE, CONFIG_ADS7843E_FREQUENCY); + iinfo("Mode: %d Bits: 8 Frequency: %d\n", + CONFIG_ADS7843E_SPIMODE, CONFIG_ADS7843E_FREQUENCY); /* Lock the SPI bus so that we have exclusive access */ @@ -1219,12 +1219,12 @@ int ads7843e_register(FAR struct spi_dev_s *spi, /* Register the device as an input device */ (void)snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor); - ivdbg("Registering %s\n", devname); + iinfo("Registering %s\n", devname); ret = register_driver(devname, &ads7843e_fops, 0666, priv); if (ret < 0) { - idbg("register_driver() failed: %d\n", ret); + ierr("ERROR: register_driver() failed: %d\n", ret); goto errout_with_priv; } @@ -1246,7 +1246,7 @@ int ads7843e_register(FAR struct spi_dev_s *spi, ret = work_queue(HPWORK, &priv->work, ads7843e_worker, priv, 0); if (ret != 0) { - idbg("Failed to queue work: %d\n", ret); + ierr("ERROR: Failed to queue work: %d\n", ret); goto errout_with_priv; } diff --git a/drivers/input/ajoystick.c b/drivers/input/ajoystick.c index 6c916d9f398e44e6b578c904be0d574ab12ec773..aaba021b95bccf72750a5727b17500f2ded601a1 100644 --- a/drivers/input/ajoystick.c +++ b/drivers/input/ajoystick.c @@ -352,7 +352,7 @@ static void ajoy_sample(FAR struct ajoy_upperhalf_s *priv) fds->revents |= (fds->events & POLLIN); if (fds->revents != 0) { - ivdbg("Report events: %02x\n", fds->revents); + iinfo("Report events: %02x\n", fds->revents); sem_post(fds->sem); } } @@ -414,7 +414,7 @@ static int ajoy_open(FAR struct file *filep) ret = ajoy_takesem(&priv->au_exclsem); if (ret < 0) { - ivdbg("ERROR: ajoy_takesem failed: %d\n", ret); + ierr("ERROR: ajoy_takesem failed: %d\n", ret); return ret; } @@ -423,7 +423,7 @@ static int ajoy_open(FAR struct file *filep) opriv = (FAR struct ajoy_open_s *)kmm_zalloc(sizeof(struct ajoy_open_s)); if (!opriv) { - ivdbg("ERROR: Failled to allocate open structure\n"); + ierr("ERROR: Failled to allocate open structure\n"); ret = -ENOMEM; goto errout_with_sem; } @@ -502,7 +502,7 @@ static int ajoy_close(FAR struct file *filep) ret = ajoy_takesem(&priv->au_exclsem); if (ret < 0) { - ivdbg("ERROR: ajoy_takesem failed: %d\n", ret); + ierr("ERROR: ajoy_takesem failed: %d\n", ret); return ret; } @@ -515,7 +515,7 @@ static int ajoy_close(FAR struct file *filep) DEBUGASSERT(curr); if (!curr) { - ivdbg("ERROR: Failed to find open entry\n"); + ierr("ERROR: Failed to find open entry\n"); ret = -ENOENT; goto errout_with_exclsem; } @@ -570,7 +570,7 @@ static ssize_t ajoy_read(FAR struct file *filep, FAR char *buffer, if (len < sizeof(struct ajoy_sample_s)) { - ivdbg("ERROR: buffer too small: %lu\n", (unsigned long)len); + ierr("ERROR: buffer too small: %lu\n", (unsigned long)len); return -EINVAL; } @@ -579,7 +579,7 @@ static ssize_t ajoy_read(FAR struct file *filep, FAR char *buffer, ret = ajoy_takesem(&priv->au_exclsem); if (ret < 0) { - ivdbg("ERROR: ajoy_takesem failed: %d\n", ret); + ierr("ERROR: ajoy_takesem failed: %d\n", ret); return ret; } @@ -620,7 +620,7 @@ static int ajoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg) ret = ajoy_takesem(&priv->au_exclsem); if (ret < 0) { - ivdbg("ERROR: ajoy_takesem failed: %d\n", ret); + ierr("ERROR: ajoy_takesem failed: %d\n", ret); return ret; } @@ -720,7 +720,7 @@ static int ajoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg) #endif default: - ivdbg("ERROR: Unrecognized command: %ld\n", cmd); + ierr("ERROR: Unrecognized command: %ld\n", cmd); ret = -ENOTTY; break; } @@ -754,7 +754,7 @@ static int ajoy_poll(FAR struct file *filep, FAR struct pollfd *fds, ret = ajoy_takesem(&priv->au_exclsem); if (ret < 0) { - ivdbg("ERROR: ajoy_takesem failed: %d\n", ret); + ierr("ERROR: ajoy_takesem failed: %d\n", ret); return ret; } @@ -782,7 +782,7 @@ static int ajoy_poll(FAR struct file *filep, FAR struct pollfd *fds, if (i >= CONFIG_AJOYSTICK_NPOLLWAITERS) { - ivdbg("ERROR: Too man poll waiters\n"); + ierr("ERROR: Too man poll waiters\n"); fds->priv = NULL; ret = -EBUSY; goto errout_with_dusem; @@ -794,10 +794,10 @@ static int ajoy_poll(FAR struct file *filep, FAR struct pollfd *fds, FAR struct pollfd **slot = (FAR struct pollfd **)fds->priv; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!slot) { - ivdbg("ERROR: Poll slot not found\n"); + ierr("ERROR: Poll slot not found\n"); ret = -EIO; goto errout_with_dusem; } @@ -856,7 +856,7 @@ int ajoy_register(FAR const char *devname, if (!priv) { - ivdbg("ERROR: Failed to allocate device structure\n"); + ierr("ERROR: Failed to allocate device structure\n"); return -ENOMEM; } @@ -878,7 +878,7 @@ int ajoy_register(FAR const char *devname, ret = register_driver(devname, &ajoy_fops, 0666, priv); if (ret < 0) { - ivdbg("ERROR: register_driver failed: %d\n", ret); + ierr("ERROR: register_driver failed: %d\n", ret); goto errout_with_priv; } diff --git a/drivers/input/button_lower.c b/drivers/input/button_lower.c index 868e1681a61249b168029f07d46e3c5daae95ddc..9be0b4a35f70e2d173611edc5937375b2ec4ef0e 100644 --- a/drivers/input/button_lower.c +++ b/drivers/input/button_lower.c @@ -98,7 +98,7 @@ static FAR void *g_btnarg; static btn_buttonset_t btn_supported(FAR const struct btn_lowerhalf_s *lower) { - ivdbg("NUM_BUTTONS: %02x\n", NUM_BUTTONS); + iinfo("NUM_BUTTONS: %02x\n", NUM_BUTTONS); return (btn_buttonset_t)((1 << NUM_BUTTONS) - 1); } @@ -138,8 +138,8 @@ static void btn_enable(FAR const struct btn_lowerhalf_s *lower, flags = enter_critical_section(); btn_disable(); - illvdbg("press: %02x release: %02x handler: %p arg: %p\n", - press, release, handler, arg); + iinfo("press: %02x release: %02x handler: %p arg: %p\n", + press, release, handler, arg); /* If no events are indicated or if no handler is provided, then this * must really be a request to disable interrupts. diff --git a/drivers/input/button_upper.c b/drivers/input/button_upper.c index 5eadfd87e3b57daf34d9d6b2e677b0ede7f4c15d..2c03d3de3e0c7f39bba6bcc678fb8f865e4003fc 100644 --- a/drivers/input/button_upper.c +++ b/drivers/input/button_upper.c @@ -1,7 +1,7 @@ /**************************************************************************** * drivers/input/button_upper.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 @@ -230,8 +230,8 @@ static void btn_enable(FAR struct btn_upperhalf_s *priv) { /* Yes.. OR in the poll event buttons */ - press |= opriv->bo_pollevents.ap_press; - release |= opriv->bo_pollevents.ap_release; + press |= opriv->bo_pollevents.bp_press; + release |= opriv->bo_pollevents.bp_release; break; } } @@ -322,8 +322,8 @@ static void btn_sample(FAR struct btn_upperhalf_s *priv) * newly released. */ - change = sample ^ priv->bu_sample; - press = change & sample; + change = sample ^ priv->bu_sample; + press = change & sample; DEBUGASSERT(lower->bl_supported); release = change & (lower->bl_supported(lower) & ~sample); @@ -335,8 +335,8 @@ static void btn_sample(FAR struct btn_upperhalf_s *priv) #ifndef CONFIG_DISABLE_POLL /* Have any poll events occurred? */ - if ((press & opriv->bo_pollevents.ap_press) != 0 || - (release & opriv->bo_pollevents.ap_release) != 0) + if ((press & opriv->bo_pollevents.bp_press) != 0 || + (release & opriv->bo_pollevents.bp_release) != 0) { /* Yes.. Notify all waiters */ @@ -348,7 +348,7 @@ static void btn_sample(FAR struct btn_upperhalf_s *priv) fds->revents |= (fds->events & POLLIN); if (fds->revents != 0) { - ivdbg("Report events: %02x\n", fds->revents); + iinfo("Report events: %02x\n", fds->revents); sem_post(fds->sem); } } @@ -410,7 +410,7 @@ static int btn_open(FAR struct file *filep) ret = btn_takesem(&priv->bu_exclsem); if (ret < 0) { - ivdbg("ERROR: btn_takesem failed: %d\n", ret); + ierr("ERROR: btn_takesem failed: %d\n", ret); return ret; } @@ -419,7 +419,7 @@ static int btn_open(FAR struct file *filep) opriv = (FAR struct btn_open_s *)kmm_zalloc(sizeof(struct btn_open_s)); if (!opriv) { - ivdbg("ERROR: Failled to allocate open structure\n"); + ierr("ERROR: Failled to allocate open structure\n"); ret = -ENOMEM; goto errout_with_sem; } @@ -431,8 +431,8 @@ static int btn_open(FAR struct file *filep) DEBUGASSERT(lower && lower->bl_supported); supported = lower->bl_supported(lower); - opriv->bo_pollevents.ap_press = supported; - opriv->bo_pollevents.ap_release = supported; + opriv->bo_pollevents.bp_press = supported; + opriv->bo_pollevents.bp_release = supported; #endif /* Attach the open structure to the device */ @@ -498,7 +498,7 @@ static int btn_close(FAR struct file *filep) ret = btn_takesem(&priv->bu_exclsem); if (ret < 0) { - ivdbg("ERROR: btn_takesem failed: %d\n", ret); + ierr("ERROR: btn_takesem failed: %d\n", ret); return ret; } @@ -511,7 +511,7 @@ static int btn_close(FAR struct file *filep) DEBUGASSERT(curr); if (!curr) { - ivdbg("ERROR: Failed to find open entry\n"); + ierr("ERROR: Failed to find open entry\n"); ret = -ENOENT; goto errout_with_exclsem; } @@ -566,7 +566,7 @@ static ssize_t btn_read(FAR struct file *filep, FAR char *buffer, if (len < sizeof(btn_buttonset_t)) { - ivdbg("ERROR: buffer too small: %lu\n", (unsigned long)len); + ierr("ERROR: buffer too small: %lu\n", (unsigned long)len); return -EINVAL; } @@ -575,7 +575,7 @@ static ssize_t btn_read(FAR struct file *filep, FAR char *buffer, ret = btn_takesem(&priv->bu_exclsem); if (ret < 0) { - ivdbg("ERROR: btn_takesem failed: %d\n", ret); + ierr("ERROR: btn_takesem failed: %d\n", ret); return ret; } @@ -612,7 +612,7 @@ static int btn_ioctl(FAR struct file *filep, int cmd, unsigned long arg) ret = btn_takesem(&priv->bu_exclsem); if (ret < 0) { - ivdbg("ERROR: btn_takesem failed: %d\n", ret); + ierr("ERROR: btn_takesem failed: %d\n", ret); return ret; } @@ -664,8 +664,8 @@ static int btn_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { /* Save the poll events */ - opriv->bo_pollevents.ap_press = pollevents->ap_press; - opriv->bo_pollevents.ap_release = pollevents->ap_release; + opriv->bo_pollevents.bp_press = pollevents->bp_press; + opriv->bo_pollevents.bp_release = pollevents->bp_release; /* Enable/disable interrupt handling */ @@ -712,7 +712,7 @@ static int btn_ioctl(FAR struct file *filep, int cmd, unsigned long arg) #endif default: - ivdbg("ERROR: Unrecognized command: %ld\n", cmd); + ierr("ERROR: Unrecognized command: %ld\n", cmd); ret = -ENOTTY; break; } @@ -746,7 +746,7 @@ static int btn_poll(FAR struct file *filep, FAR struct pollfd *fds, ret = btn_takesem(&priv->bu_exclsem); if (ret < 0) { - ivdbg("ERROR: btn_takesem failed: %d\n", ret); + ierr("ERROR: btn_takesem failed: %d\n", ret); return ret; } @@ -774,7 +774,7 @@ static int btn_poll(FAR struct file *filep, FAR struct pollfd *fds, if (i >= CONFIG_BUTTONS_NPOLLWAITERS) { - ivdbg("ERROR: Too man poll waiters\n"); + ierr("ERROR: Too man poll waiters\n"); fds->priv = NULL; ret = -EBUSY; goto errout_with_dusem; @@ -786,10 +786,10 @@ static int btn_poll(FAR struct file *filep, FAR struct pollfd *fds, FAR struct pollfd **slot = (FAR struct pollfd **)fds->priv; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!slot) { - ivdbg("ERROR: Poll slot not found\n"); + ierr("ERROR: Poll slot not found\n"); ret = -EIO; goto errout_with_dusem; } @@ -847,7 +847,7 @@ int btn_register(FAR const char *devname, if (!priv) { - ivdbg("ERROR: Failed to allocate device structure\n"); + ierr("ERROR: Failed to allocate device structure\n"); return -ENOMEM; } @@ -869,7 +869,7 @@ int btn_register(FAR const char *devname, ret = register_driver(devname, &btn_fops, 0666, priv); if (ret < 0) { - ivdbg("ERROR: register_driver failed: %d\n", ret); + ierr("ERROR: register_driver failed: %d\n", ret); goto errout_with_priv; } diff --git a/drivers/input/djoystick.c b/drivers/input/djoystick.c index 5ea4cd7d28d54eeb16d6f1900e63b97fe17a88bf..1cc1b540045d5054616c4b957ccce6e0d87df63b 100644 --- a/drivers/input/djoystick.c +++ b/drivers/input/djoystick.c @@ -352,7 +352,7 @@ static void djoy_sample(FAR struct djoy_upperhalf_s *priv) fds->revents |= (fds->events & POLLIN); if (fds->revents != 0) { - illvdbg("Report events: %02x\n", fds->revents); + iinfo("Report events: %02x\n", fds->revents); sem_post(fds->sem); } } @@ -414,7 +414,7 @@ static int djoy_open(FAR struct file *filep) ret = djoy_takesem(&priv->du_exclsem); if (ret < 0) { - ivdbg("ERROR: djoy_takesem failed: %d\n", ret); + ierr("ERROR: djoy_takesem failed: %d\n", ret); return ret; } @@ -423,7 +423,7 @@ static int djoy_open(FAR struct file *filep) opriv = (FAR struct djoy_open_s *)kmm_zalloc(sizeof(struct djoy_open_s)); if (!opriv) { - ivdbg("ERROR: Failled to allocate open structure\n"); + ierr("ERROR: Failled to allocate open structure\n"); ret = -ENOMEM; goto errout_with_sem; } @@ -502,7 +502,7 @@ static int djoy_close(FAR struct file *filep) ret = djoy_takesem(&priv->du_exclsem); if (ret < 0) { - ivdbg("ERROR: djoy_takesem failed: %d\n", ret); + ierr("ERROR: djoy_takesem failed: %d\n", ret); return ret; } @@ -515,7 +515,7 @@ static int djoy_close(FAR struct file *filep) DEBUGASSERT(curr); if (!curr) { - ivdbg("ERROR: Failed to find open entry\n"); + ierr("ERROR: Failed to find open entry\n"); ret = -ENOENT; goto errout_with_exclsem; } @@ -568,7 +568,7 @@ static ssize_t djoy_read(FAR struct file *filep, FAR char *buffer, if (len < sizeof(djoy_buttonset_t)) { - ivdbg("ERROR: buffer too small: %lu\n", (unsigned long)len); + ierr("ERROR: buffer too small: %lu\n", (unsigned long)len); return -EINVAL; } @@ -577,7 +577,7 @@ static ssize_t djoy_read(FAR struct file *filep, FAR char *buffer, ret = djoy_takesem(&priv->du_exclsem); if (ret < 0) { - ivdbg("ERROR: djoy_takesem failed: %d\n", ret); + ierr("ERROR: djoy_takesem failed: %d\n", ret); return ret; } @@ -616,7 +616,7 @@ static int djoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg) ret = djoy_takesem(&priv->du_exclsem); if (ret < 0) { - ivdbg("ERROR: djoy_takesem failed: %d\n", ret); + ierr("ERROR: djoy_takesem failed: %d\n", ret); return ret; } @@ -716,7 +716,7 @@ static int djoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg) #endif default: - ivdbg("ERROR: Unrecognized command: %ld\n", cmd); + ierr("ERROR: Unrecognized command: %ld\n", cmd); ret = -ENOTTY; break; } @@ -750,7 +750,7 @@ static int djoy_poll(FAR struct file *filep, FAR struct pollfd *fds, ret = djoy_takesem(&priv->du_exclsem); if (ret < 0) { - ivdbg("ERROR: djoy_takesem failed: %d\n", ret); + ierr("ERROR: djoy_takesem failed: %d\n", ret); return ret; } @@ -778,7 +778,7 @@ static int djoy_poll(FAR struct file *filep, FAR struct pollfd *fds, if (i >= CONFIG_DJOYSTICK_NPOLLWAITERS) { - ivdbg("ERROR: Too man poll waiters\n"); + ierr("ERROR: Too man poll waiters\n"); fds->priv = NULL; ret = -EBUSY; goto errout_with_dusem; @@ -790,10 +790,10 @@ static int djoy_poll(FAR struct file *filep, FAR struct pollfd *fds, FAR struct pollfd **slot = (FAR struct pollfd **)fds->priv; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!slot) { - ivdbg("ERROR: Poll slot not found\n"); + ierr("ERROR: Poll slot not found\n"); ret = -EIO; goto errout_with_dusem; } @@ -852,7 +852,7 @@ int djoy_register(FAR const char *devname, if (!priv) { - ivdbg("ERROR: Failed to allocate device structure\n"); + ierr("ERROR: Failed to allocate device structure\n"); return -ENOMEM; } @@ -874,7 +874,7 @@ int djoy_register(FAR const char *devname, ret = register_driver(devname, &djoy_fops, 0666, priv); if (ret < 0) { - ivdbg("ERROR: register_driver failed: %d\n", ret); + ierr("ERROR: register_driver failed: %d\n", ret); sem_destroy(&priv->du_exclsem); kmm_free(priv); } diff --git a/drivers/input/max11802.c b/drivers/input/max11802.c index 2c3c1f7813307a249bf480cbcc5d78c25c4abc68..2394cd2e5eafeaec580a3de116e51032d16aae24 100644 --- a/drivers/input/max11802.c +++ b/drivers/input/max11802.c @@ -244,7 +244,7 @@ static uint16_t max11802_sendcmd(FAR struct max11802_dev_s *priv, *tags = result & 0xF; result >>= 4; /* Get rid of tags */ - ivdbg("cmd:%02x response:%04x\n", cmd, result); + iinfo("cmd:%02x response:%04x\n", cmd, result); return result; } @@ -284,7 +284,7 @@ static void max11802_notify(FAR struct max11802_dev_s *priv) if (fds) { fds->revents |= POLLIN; - ivdbg("Report events: %02x\n", fds->revents); + iinfo("Report events: %02x\n", fds->revents); sem_post(fds->sem); } } @@ -381,7 +381,7 @@ static int max11802_waitsample(FAR struct max11802_dev_s *priv, { /* Wait for a change in the MAX11802 state */ - ivdbg("Waiting..\n"); + iinfo("Waiting..\n"); priv->nwaiters++; ret = sem_wait(&priv->waitsem); priv->nwaiters--; @@ -392,14 +392,14 @@ static int max11802_waitsample(FAR struct max11802_dev_s *priv, * the failure now. */ - idbg("sem_wait: %d\n", errno); + ierr("ERROR: sem_wait: %d\n", errno); DEBUGASSERT(errno == EINTR); ret = -EINTR; goto errout; } } - ivdbg("Sampled\n"); + iinfo("Sampled\n"); /* Re-acquire the semaphore that manages mutually exclusive access to * the device structure. We may have to wait here. But we have our @@ -463,7 +463,7 @@ static int max11802_schedule(FAR struct max11802_dev_s *priv) ret = work_queue(HPWORK, &priv->work, max11802_worker, priv, 0); if (ret != 0) { - illdbg("Failed to queue work: %d\n", ret); + ierr("ERROR: Failed to queue work: %d\n", ret); } return OK; @@ -540,11 +540,11 @@ static void max11802_worker(FAR void *arg) if (pendown) { - ivdbg("\nPD\n"); + iinfo("\nPD\n"); } else { - ivdbg("\nPU\n"); + iinfo("\nPU\n"); } if (!pendown) @@ -559,7 +559,7 @@ static void max11802_worker(FAR void *arg) * reported). */ - ivdbg("\nPC%d\n", priv->sample.contact); + iinfo("\nPC%d\n", priv->sample.contact); if (priv->sample.contact == CONTACT_NONE || priv->sample.contact == CONTACT_UP) @@ -589,7 +589,7 @@ static void max11802_worker(FAR void *arg) * again later. */ - ivdbg("Previous pen up event still in buffer\n"); + iinfo("Previous pen up event still in buffer\n"); max11802_notify(priv); wd_start(priv->wdog, MAX11802_WDOG_DELAY, max11802_wdog, 1, (uint32_t)priv); @@ -636,7 +636,7 @@ static void max11802_worker(FAR void *arg) if ((tags & 0x03) != 0) { - ivdbg("Touch ended before measurement\n"); + iinfo("Touch ended before measurement\n"); goto ignored; } @@ -755,7 +755,7 @@ static int max11802_open(FAR struct file *filep) uint8_t tmp; int ret; - ivdbg("Opening\n"); + iinfo("Opening\n"); DEBUGASSERT(filep); inode = filep->f_inode; @@ -797,7 +797,7 @@ errout_with_sem: sem_post(&priv->devsem); return ret; #else - ivdbg("Opening\n"); + iinfo("Opening\n"); return OK; #endif } @@ -813,7 +813,7 @@ static int max11802_close(FAR struct file *filep) FAR struct max11802_dev_s *priv; int ret; - ivdbg("Closing\n"); + iinfo("Closing\n"); DEBUGASSERT(filep); inode = filep->f_inode; @@ -843,7 +843,7 @@ static int max11802_close(FAR struct file *filep) sem_post(&priv->devsem); #endif - ivdbg("Closing\n"); + iinfo("Closing\n"); return OK; } @@ -860,7 +860,7 @@ static ssize_t max11802_read(FAR struct file *filep, FAR char *buffer, struct max11802_sample_s sample; int ret; - ivdbg("buffer:%p len:%d\n", buffer, len); + iinfo("buffer:%p len:%d\n", buffer, len); DEBUGASSERT(filep); inode = filep->f_inode; @@ -877,7 +877,7 @@ static ssize_t max11802_read(FAR struct file *filep, FAR char *buffer, * handle smaller reads... but why? */ - idbg("Unsupported read size: %d\n", len); + ierr("ERROR: Unsupported read size: %d\n", len); return -ENOSYS; } @@ -888,7 +888,7 @@ static ssize_t max11802_read(FAR struct file *filep, FAR char *buffer, { /* This should only happen if the wait was cancelled by an signal */ - idbg("sem_wait: %d\n", errno); + ierr("ERROR: sem_wait: %d\n", errno); DEBUGASSERT(errno == EINTR); return -EINTR; } @@ -903,7 +903,7 @@ static ssize_t max11802_read(FAR struct file *filep, FAR char *buffer, * option, then just return an error. */ - ivdbg("Sample data is not available\n"); + iinfo("Sample data is not available\n"); if (filep->f_oflags & O_NONBLOCK) { ret = -EAGAIN; @@ -917,7 +917,7 @@ static ssize_t max11802_read(FAR struct file *filep, FAR char *buffer, { /* We might have been awakened by a signal */ - idbg("max11802_waitsample: %d\n", ret); + ierr("ERROR: max11802_waitsample: %d\n", ret); goto errout; } } @@ -964,16 +964,16 @@ static ssize_t max11802_read(FAR struct file *filep, FAR char *buffer, report->point[0].flags = TOUCH_MOVE | TOUCH_ID_VALID | TOUCH_POS_VALID; } - ivdbg(" id: %d\n", report->point[0].id); - ivdbg(" flags: %02x\n", report->point[0].flags); - ivdbg(" x: %d\n", report->point[0].x); - ivdbg(" y: %d\n", report->point[0].y); + iinfo(" id: %d\n", report->point[0].id); + iinfo(" flags: %02x\n", report->point[0].flags); + iinfo(" x: %d\n", report->point[0].x); + iinfo(" y: %d\n", report->point[0].y); ret = SIZEOF_TOUCH_SAMPLE_S(1); errout: sem_post(&priv->devsem); - ivdbg("Returning: %d\n", ret); + iinfo("Returning: %d\n", ret); return ret; } @@ -987,7 +987,7 @@ static int max11802_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR struct max11802_dev_s *priv; int ret; - ivdbg("cmd: %d arg: %ld\n", cmd, arg); + iinfo("cmd: %d arg: %ld\n", cmd, arg); DEBUGASSERT(filep); inode = filep->f_inode; @@ -1047,7 +1047,7 @@ static int max11802_poll(FAR struct file *filep, FAR struct pollfd *fds, int ret; int i; - ivdbg("setup: %d\n", (int)setup); + iinfo("setup: %d\n", (int)setup); DEBUGASSERT(filep && fds); inode = filep->f_inode; @@ -1159,7 +1159,7 @@ int max11802_register(FAR struct spi_dev_s *spi, #endif int ret; - ivdbg("spi: %p minor: %d\n", spi, minor); + iinfo("spi: %p minor: %d\n", spi, minor); /* Debug-only sanity checks */ @@ -1173,7 +1173,7 @@ int max11802_register(FAR struct spi_dev_s *spi, priv = (FAR struct max11802_dev_s *)kmm_malloc(sizeof(struct max11802_dev_s)); if (!priv) { - idbg("kmm_malloc(%d) failed\n", sizeof(struct max11802_dev_s)); + ierr("ERROR: kmm_malloc(%d) failed\n", sizeof(struct max11802_dev_s)); return -ENOMEM; } #endif @@ -1200,12 +1200,12 @@ int max11802_register(FAR struct spi_dev_s *spi, ret = config->attach(config, max11802_interrupt); if (ret < 0) { - idbg("Failed to attach interrupt\n"); + ierr("ERROR: Failed to attach interrupt\n"); goto errout_with_priv; } - idbg("Mode: %d Bits: 8 Frequency: %d\n", - CONFIG_MAX11802_SPIMODE, CONFIG_MAX11802_FREQUENCY); + iinfo("Mode: %d Bits: 8 Frequency: %d\n", + CONFIG_MAX11802_SPIMODE, CONFIG_MAX11802_FREQUENCY); /* Lock the SPI bus so that we have exclusive access */ @@ -1246,19 +1246,19 @@ int max11802_register(FAR struct spi_dev_s *spi, if (ret != MAX11802_MODE) { - idbg("max11802 mode readback failed: %02x\n", ret); + ierr("ERROR: max11802 mode readback failed: %02x\n", ret); goto errout_with_priv; } /* Register the device as an input device */ (void)snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor); - ivdbg("Registering %s\n", devname); + iinfo("Registering %s\n", devname); ret = register_driver(devname, &max11802_fops, 0666, priv); if (ret < 0) { - idbg("register_driver() failed: %d\n", ret); + ierr("ERROR: register_driver() failed: %d\n", ret); goto errout_with_priv; } @@ -1281,7 +1281,7 @@ int max11802_register(FAR struct spi_dev_s *spi, ret = work_queue(HPWORK, &priv->work, max11802_worker, priv, 0); if (ret != 0) { - idbg("Failed to queue work: %d\n", ret); + ierr("ERROR: Failed to queue work: %d\n", ret); goto errout_with_priv; } diff --git a/drivers/input/mxt.c b/drivers/input/mxt.c index 1b370e9579be5154753636c5615bbd833c89f5d6..891f7811209f167c0ae9431d18743392fb94c634 100644 --- a/drivers/input/mxt.c +++ b/drivers/input/mxt.c @@ -41,8 +41,8 @@ /* Suppress verbose debug output so that we don't swamp the system */ -#ifdef CONFIG_MXT_DISABLE_DEBUG_VERBOSE -# undef CONFIG_DEBUG_VERBOSE +#ifdef CONFIG_MXT_DISABLE_CONFIG_DEBUG_INFO +# undef CONFIG_DEBUG_INFO #endif #include @@ -312,7 +312,7 @@ static int mxt_getreg(FAR struct mxt_dev_s *priv, uint16_t regaddr, for (retries = 1; retries <= 3; retries++) { - ivdbg("retries=%d regaddr=%04x buflen=%d\n", retries, regaddr, buflen); + iinfo("retries=%d regaddr=%04x buflen=%d\n", retries, regaddr, buflen); /* Set up to write the address */ @@ -343,16 +343,16 @@ static int mxt_getreg(FAR struct mxt_dev_s *priv, uint16_t regaddr, #ifdef CONFIG_I2C_RESET /* Perhaps the I2C bus is locked up? Try to shake the bus free */ - idbg("WARNING: I2C_TRANSFER failed: %d ... Resetting\n", ret); + iwarn("WARNING: I2C_TRANSFER failed: %d ... Resetting\n", ret); ret = I2C_RESET(priv->i2c); if (ret < 0) { - idbg("ERROR: I2C_RESET failed: %d\n", ret); + ierr("ERROR: I2C_RESET failed: %d\n", ret); break; } #else - idbg("ERROR: I2C_TRANSFER failed: %d\n", ret); + ierr("ERROR: I2C_TRANSFER failed: %d\n", ret); #endif } else @@ -386,7 +386,7 @@ static int mxt_putreg(FAR struct mxt_dev_s *priv, uint16_t regaddr, for (retries = 1; retries <= 3; retries++) { - ivdbg("retries=%d regaddr=%04x buflen=%d\n", retries, regaddr, buflen); + iinfo("retries=%d regaddr=%04x buflen=%d\n", retries, regaddr, buflen); /* Set up to write the address */ @@ -417,15 +417,15 @@ static int mxt_putreg(FAR struct mxt_dev_s *priv, uint16_t regaddr, #ifdef CONFIG_I2C_RESET /* Perhaps the I2C bus is locked up? Try to shake the bus free */ - idbg("WARNING: I2C_TRANSFER failed: %d ... Resetting\n", ret); + iwarn("WARNING: I2C_TRANSFER failed: %d ... Resetting\n", ret); ret = I2C_RESET(priv->i2c); if (ret < 0) { - idbg("ERROR: I2C_RESET failed: %d\n", ret); + ierr("ERROR: I2C_RESET failed: %d\n", ret); } #else - idbg("ERROR: I2C_TRANSFER failed: %d\n", ret); + ierr("ERROR: I2C_TRANSFER failed: %d\n", ret); #endif } else @@ -466,7 +466,7 @@ static FAR struct mxt_object_s *mxt_object(FAR struct mxt_dev_s *priv, } } - idbg("ERROR: Invalid object type: %d\n", type); + ierr("ERROR: Invalid object type: %d\n", type); return NULL; } @@ -483,7 +483,7 @@ static int mxt_getmessage(FAR struct mxt_dev_s *priv, object = mxt_object(priv, MXT_GEN_MESSAGE_T5); if (object == NULL) { - idbg("ERROR: mxt_object failed\n"); + ierr("ERROR: mxt_object failed\n"); return -EINVAL; } @@ -558,7 +558,7 @@ static int mxt_flushmsgs(FAR struct mxt_dev_s *priv) ret = mxt_getmessage(priv, &msg); if (ret < 0) { - idbg("ERROR: mxt_getmessage failed: %d\n", ret); + ierr("ERROR: mxt_getmessage failed: %d\n", ret); return ret; } } @@ -568,7 +568,7 @@ static int mxt_flushmsgs(FAR struct mxt_dev_s *priv) if (retries <= 0) { - idbg("ERROR: Failed to clear messages: ID=%02x\n", msg.id); + ierr("ERROR: Failed to clear messages: ID=%02x\n", msg.id); return -EBUSY; } @@ -611,7 +611,7 @@ static void mxt_notify(FAR struct mxt_dev_s *priv) if (fds) { fds->revents |= POLLIN; - ivdbg("Report events: %02x\n", fds->revents); + iinfo("Report events: %02x\n", fds->revents); sem_post(fds->sem); } } @@ -796,7 +796,7 @@ static void mxt_touch_event(FAR struct mxt_dev_s *priv, pressure = msg->body[5]; status = msg->body[0]; - ivdbg("ndx=%u status=%02x pos(%u,%u) area=%u pressure=%u\n", + iinfo("ndx=%u status=%02x pos(%u,%u) area=%u pressure=%u\n", ndx, status, x, y, area, pressure); /* The normal sequence that we would see for a touch would be something @@ -998,7 +998,7 @@ static void mxt_worker(FAR void *arg) ret = mxt_getmessage(priv, &msg); if (ret < 0) { - idbg("ERROR: mxt_getmessage failed: %d\n", ret); + ierr("ERROR: mxt_getmessage failed: %d\n", ret); goto errout_with_semaphore; } @@ -1017,7 +1017,7 @@ static void mxt_worker(FAR void *arg) ((uint32_t)msg.body[2] << 8) | ((uint32_t)msg.body[3] << 16); - ivdbg("T6: status: %02x checksum: %06lx\n", + iinfo("T6: status: %02x checksum: %06lx\n", status, (unsigned long)chksum); retries = 0; @@ -1049,7 +1049,7 @@ static void mxt_worker(FAR void *arg) else if (msg.id != 0xff) { - ivdbg("Ignored: id=%u message={%02x %02x %02x %02x %02x %02x %02x}\n", + iinfo("Ignored: id=%u message={%02x %02x %02x %02x %02x %02x %02x}\n", msg.id, msg.body[0], msg.body[1], msg.body[2], msg.body[3], msg.body[4], msg.body[5], msg.body[6]); @@ -1097,7 +1097,7 @@ static int mxt_interrupt(FAR const struct mxt_lower_s *lower, FAR void *arg) ret = work_queue(HPWORK, &priv->work, mxt_worker, priv, 0); if (ret != 0) { - illdbg("Failed to queue work: %d\n", ret); + ierr("ERROR: Failed to queue work: %d\n", ret); } /* Clear any pending interrupts and return success */ @@ -1141,7 +1141,7 @@ static int mxt_open(FAR struct file *filep) { /* More than 255 opens; uint8_t overflows to zero */ - idbg("ERROR: Too many opens: %d\n", priv->crefs); + ierr("ERROR: Too many opens: %d\n", priv->crefs); ret = -EMFILE; goto errout_with_sem; } @@ -1157,7 +1157,7 @@ static int mxt_open(FAR struct file *filep) ret = mxt_putobject(priv, MXT_TOUCH_MULTI_T9, MXT_TOUCH_CTRL, 0x83); if (ret < 0) { - idbg("ERROR: Failed to enable touch: %d\n", ret); + ierr("ERROR: Failed to enable touch: %d\n", ret); goto errout_with_sem; } @@ -1169,7 +1169,7 @@ static int mxt_open(FAR struct file *filep) ret = mxt_flushmsgs(priv); if (ret < 0) { - idbg("ERROR: mxt_flushmsgs failed: %d\n", ret); + ierr("ERROR: mxt_flushmsgs failed: %d\n", ret); mxt_putobject(priv, MXT_TOUCH_MULTI_T9, MXT_TOUCH_CTRL, 0); goto errout_with_sem; } @@ -1233,7 +1233,7 @@ static int mxt_close(FAR struct file *filep) ret = mxt_putobject(priv, MXT_TOUCH_MULTI_T9, MXT_TOUCH_CTRL, 0); if (ret < 0) { - idbg("ERROR: Failed to disable touch: %d\n", ret); + ierr("ERROR: Failed to disable touch: %d\n", ret); } } } @@ -1490,7 +1490,7 @@ static int mxt_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR struct mxt_dev_s *priv; int ret; - ivdbg("cmd: %d arg: %ld\n", cmd, arg); + iinfo("cmd: %d arg: %ld\n", cmd, arg); DEBUGASSERT(filep); inode = filep->f_inode; @@ -1551,7 +1551,7 @@ static int mxt_poll(FAR struct file *filep, FAR struct pollfd *fds, int ret; int i; - ivdbg("setup: %d\n", (int)setup); + iinfo("setup: %d\n", (int)setup); DEBUGASSERT(filep && fds); inode = filep->f_inode; @@ -1575,7 +1575,7 @@ static int mxt_poll(FAR struct file *filep, FAR struct pollfd *fds, if ((fds->events & POLLIN) == 0) { - idbg("Missing POLLIN: revents: %08x\n", fds->revents); + ierr("ERROR: Missing POLLIN: revents: %08x\n", fds->revents); ret = -EDEADLK; goto errout; } @@ -1600,7 +1600,7 @@ static int mxt_poll(FAR struct file *filep, FAR struct pollfd *fds, if (i >= CONFIG_MXT_NPOLLWAITERS) { - idbg("No availabled slot found: %d\n", i); + ierr("ERROR: No availabled slot found: %d\n", i); fds->priv = NULL; ret = -EBUSY; goto errout; @@ -1646,7 +1646,7 @@ static int mxt_getinfo(struct mxt_dev_s *priv) sizeof(struct mxt_info_s)); if (ret < 0) { - idbg("ERROR: mxt_getreg failed: %d\n", ret); + ierr("ERROR: mxt_getreg failed: %d\n", ret); return ret; } @@ -1674,7 +1674,7 @@ static int mxt_getobjtab(FAR struct mxt_dev_s *priv) tabsize); if (ret < 0) { - idbg("ERROR: Failed to object table size: %d\n", ret); + ierr("ERROR: Failed to object table size: %d\n", ret); return ret; } @@ -1697,7 +1697,7 @@ static int mxt_getobjtab(FAR struct mxt_dev_s *priv) idmax = 0; } - ivdbg("%2d. type %2d addr %04x size: %d instances: %d IDs: %u-%u\n", + iinfo("%2d. type %2d addr %04x size: %d instances: %d IDs: %u-%u\n", i, object->type, MXT_GETUINT16(object->addr), object->size + 1, object->ninstances + 1, idmin, idmax); @@ -1747,7 +1747,7 @@ static int mxt_hwinitialize(FAR struct mxt_dev_s *priv) ret = mxt_getinfo(priv); if (ret < 0) { - idbg("ERROR: Failed to read info registers: %d\n", ret); + ierr("ERROR: Failed to read info registers: %d\n", ret); return ret; } @@ -1756,7 +1756,7 @@ static int mxt_hwinitialize(FAR struct mxt_dev_s *priv) priv->objtab = kmm_zalloc(info->nobjects * sizeof(struct mxt_object_s)); if (priv->objtab == NULL) { - idbg("ERROR: Failed to allocate object table\n"); + ierr("ERROR: Failed to allocate object table\n"); return -ENOMEM; } @@ -1773,7 +1773,7 @@ static int mxt_hwinitialize(FAR struct mxt_dev_s *priv) ret = mxt_putobject(priv, MXT_GEN_COMMAND_T6, MXT_COMMAND_RESET, 1); if (ret < 0) { - idbg("ERROR: Soft reset failed: %d\n", ret); + ierr("ERROR: Soft reset failed: %d\n", ret); goto errout_with_objtab; } @@ -1784,7 +1784,7 @@ static int mxt_hwinitialize(FAR struct mxt_dev_s *priv) ret = mxt_getreg(priv, MXT_MATRIX_X_SIZE, (FAR uint8_t *)®val, 1); if (ret < 0) { - idbg("ERROR: Failed to get X size: %d\n", ret); + ierr("ERROR: Failed to get X size: %d\n", ret); goto errout_with_objtab; } @@ -1793,16 +1793,16 @@ static int mxt_hwinitialize(FAR struct mxt_dev_s *priv) ret = mxt_getreg(priv, MXT_MATRIX_Y_SIZE, (FAR uint8_t *)®val, 1); if (ret < 0) { - idbg("ERROR: Failed to get Y size: %d\n", ret); + ierr("ERROR: Failed to get Y size: %d\n", ret); goto errout_with_objtab; } info->ysize = regval; - ivdbg("Family: %u variant: %u version: %u.%u.%02x\n", + iinfo("Family: %u variant: %u version: %u.%u.%02x\n", info->family, info->variant, info->version >> 4, info->version & 0x0f, info->build); - ivdbg("Matrix size: (%u,%u) objects: %u\n", + iinfo("Matrix size: (%u,%u) objects: %u\n", info->xsize, info->ysize, info->nobjects); /* How many multi touch "slots" */ @@ -1818,7 +1818,7 @@ static int mxt_hwinitialize(FAR struct mxt_dev_s *priv) kmm_zalloc(nslots * sizeof(struct mxt_sample_s)); if (priv->sample == NULL) { - idbg("ERROR: Failed to allocate object table\n"); + ierr("ERROR: Failed to allocate object table\n"); goto errout_with_objtab; } @@ -1863,7 +1863,7 @@ int mxt_register(FAR struct i2c_master_s *i2c, char devname[DEV_NAMELEN]; int ret; - ivdbg("i2c: %p minor: %d\n", i2c, minor); + iinfo("i2c: %p minor: %d\n", i2c, minor); /* Debug-only sanity checks */ @@ -1874,7 +1874,7 @@ int mxt_register(FAR struct i2c_master_s *i2c, priv = (FAR struct mxt_dev_s *)kmm_zalloc(sizeof(struct mxt_dev_s)); if (priv == NULL) { - idbg("ERROR: Failed allocate device structure\n"); + ierr("ERROR: Failed allocate device structure\n"); return -ENOMEM; } @@ -1897,7 +1897,7 @@ int mxt_register(FAR struct i2c_master_s *i2c, ret = MXT_ATTACH(lower, mxt_interrupt, priv); if (ret < 0) { - idbg("Failed to attach interrupt\n"); + ierr("ERROR: Failed to attach interrupt\n"); goto errout_with_priv; } @@ -1906,19 +1906,19 @@ int mxt_register(FAR struct i2c_master_s *i2c, ret = mxt_hwinitialize(priv); if (ret < 0) { - idbg("ERROR: mxt_hwinitialize failed: %d\n", ret); + ierr("ERROR: mxt_hwinitialize failed: %d\n", ret); goto errout_with_irq; } /* Register the device as an input device */ (void)snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor); - ivdbg("Registering %s\n", devname); + iinfo("Registering %s\n", devname); ret = register_driver(devname, &mxt_fops, 0666, priv); if (ret < 0) { - idbg("register_driver() failed: %d\n", ret); + ierr("ERROR: register_driver() failed: %d\n", ret); goto errout_with_hwinit; } diff --git a/drivers/input/mxt.h b/drivers/input/mxt.h index da7bf42966cccff5733c373a6d4f5d9a8f2e2244..94145b180122f80a184b98c90ac8f456e232cfeb 100644 --- a/drivers/input/mxt.h +++ b/drivers/input/mxt.h @@ -49,12 +49,12 @@ /* Support T6 only if debug is enabled */ #undef MXT_SUPPORT_T6 -#if !defined(CONFIG_DEBUG) -# undef CONFIG_DEBUG_VERBOSE +#if !defined(CONFIG_DEBUG_FEATURES) +# undef CONFIG_DEBUG_INFO # undef CONFIG_DEBUG_INPUT #endif -#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_INPUT) +#if defined(CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_INPUT) # define MXT_SUPPORT_T6 1 #endif diff --git a/drivers/input/stmpe811_adc.c b/drivers/input/stmpe811_adc.c index d0fde02e1f232028f7c486d8775befae455cb130..563ebb26517b16a72b3dcc0105060a183a45248a 100644 --- a/drivers/input/stmpe811_adc.c +++ b/drivers/input/stmpe811_adc.c @@ -101,7 +101,7 @@ int stmpe811_adcinitialize(STMPE811_HANDLE handle) if (ret < 0) { int errval = errno; - idbg("sem_wait failed: %d\n", errval); + ierr("ERROR: sem_wait failed: %d\n", errval); return -errval; } @@ -161,7 +161,7 @@ int stmpe811_adcconfig(STMPE811_HANDLE handle, int pin) if (ret < 0) { int errval = errno; - idbg("sem_wait failed: %d\n", errval); + ierr("ERROR: sem_wait failed: %d\n", errval); return -errval; } @@ -169,7 +169,7 @@ int stmpe811_adcconfig(STMPE811_HANDLE handle, int pin) if ((priv->inuse & pinmask) != 0) { - idbg("PIN%d is already in-use\n", pin); + ierr("ERROR: PIN%d is already in-use\n", pin); sem_post(&priv->exclsem); return -EBUSY; } @@ -221,7 +221,7 @@ uint16_t stmpe811_adcread(STMPE811_HANDLE handle, int pin) if (ret < 0) { int errval = errno; - idbg("sem_wait failed: %d\n", errval); + ierr("ERROR: sem_wait failed: %d\n", errval); return -errval; } diff --git a/drivers/input/stmpe811_base.c b/drivers/input/stmpe811_base.c index 224b9eaefc9eaaef568b77a0549bd39336994cfd..dca84ae76a89e259b0ee0f54dcdd8a5f85287022 100644 --- a/drivers/input/stmpe811_base.c +++ b/drivers/input/stmpe811_base.c @@ -199,7 +199,7 @@ static int stmpe811_interrupt(int irq, FAR void *context) ret = work_queue(HPWORK, &priv->work, stmpe811_worker, priv, 0); if (ret != 0) { - illdbg("Failed to queue work: %d\n", ret); + ierr("ERROR: Failed to queue work: %d\n", ret); } } @@ -226,7 +226,7 @@ static int stmpe811_checkid(FAR struct stmpe811_dev_s *priv) devid = stmpe811_getreg8(priv, STMPE811_CHIP_ID); devid = (uint32_t)(devid << 8); devid |= (uint32_t)stmpe811_getreg8(priv, STMPE811_CHIP_ID+1); - ivdbg("devid: %04x\n", devid); + iinfo("devid: %04x\n", devid); if (devid != (uint16_t)CHIP_ID) { @@ -422,12 +422,12 @@ uint8_t stmpe811_getreg8(FAR struct stmpe811_dev_s *priv, uint8_t regaddr) ret = I2C_TRANSFER(priv->i2c, msg, 2); if (ret < 0) { - idbg("I2C_TRANSFER failed: %d\n", ret); + ierr("ERROR: I2C_TRANSFER failed: %d\n", ret); return 0; } #ifdef CONFIG_STMPE811_REGDEBUG - dbg("%02x->%02x\n", regaddr, regval); + _err("%02x->%02x\n", regaddr, regval); #endif return regval; } @@ -455,7 +455,7 @@ void stmpe811_putreg8(FAR struct stmpe811_dev_s *priv, int ret; #ifdef CONFIG_STMPE811_REGDEBUG - dbg("%02x<-%02x\n", regaddr, regval); + _err("%02x<-%02x\n", regaddr, regval); #endif /* Setup to the data to be transferred. Two bytes: The STMPE811 register @@ -479,7 +479,7 @@ void stmpe811_putreg8(FAR struct stmpe811_dev_s *priv, ret = I2C_TRANSFER(priv->i2c, &msg, 1); if (ret < 0) { - idbg("I2C_TRANSFER failed: %d\n", ret); + ierr("ERROR: I2C_TRANSFER failed: %d\n", ret); } } #endif @@ -530,12 +530,12 @@ uint16_t stmpe811_getreg16(FAR struct stmpe811_dev_s *priv, uint8_t regaddr) ret = I2C_TRANSFER(priv->i2c, msg, 2); if (ret < 0) { - idbg("I2C_TRANSFER failed: %d\n", ret); + ierr("ERROR: I2C_TRANSFER failed: %d\n", ret); return 0; } #ifdef CONFIG_STMPE811_REGDEBUG - dbg("%02x->%02x%02x\n", regaddr, rxbuffer[0], rxbuffer[1]); + _err("%02x->%02x%02x\n", regaddr, rxbuffer[0], rxbuffer[1]); #endif return (uint16_t)rxbuffer[0] << 8 | (uint16_t)rxbuffer[1]; } diff --git a/drivers/input/stmpe811_gpio.c b/drivers/input/stmpe811_gpio.c index 267f26cf485006130ad0036197a138a652ab11f0..c9933df718b262b98504442ed1341f5f739d75b3 100644 --- a/drivers/input/stmpe811_gpio.c +++ b/drivers/input/stmpe811_gpio.c @@ -144,7 +144,7 @@ int stmpe811_gpioconfig(STMPE811_HANDLE handle, uint8_t pinconfig) if (ret < 0) { int errval = errno; - idbg("sem_wait failed: %d\n", errval); + ierr("ERROR: sem_wait failed: %d\n", errval); return -errval; } @@ -152,7 +152,7 @@ int stmpe811_gpioconfig(STMPE811_HANDLE handle, uint8_t pinconfig) if ((priv->inuse & pinmask) != 0) { - idbg("PIN%d is already in-use\n", pin); + ierr("ERROR: PIN%d is already in-use\n", pin); sem_post(&priv->exclsem); return -EBUSY; } @@ -259,7 +259,7 @@ void stmpe811_gpiowrite(STMPE811_HANDLE handle, uint8_t pinconfig, bool value) ret = sem_wait(&priv->exclsem); if (ret < 0) { - idbg("sem_wait failed: %d\n", errno); + ierr("ERROR: sem_wait failed: %d\n", errno); return; } @@ -313,7 +313,7 @@ int stmpe811_gpioread(STMPE811_HANDLE handle, uint8_t pinconfig, bool *value) if (ret < 0) { int errval = errno; - idbg("sem_wait failed: %d\n", errval); + ierr("ERROR: sem_wait failed: %d\n", errval); return -errval; } @@ -362,7 +362,7 @@ int stmpe811_gpioattach(STMPE811_HANDLE handle, uint8_t pinconfig, if (ret < 0) { int errval = errno; - idbg("sem_wait failed: %d\n", errval); + ierr("ERROR: sem_wait failed: %d\n", errval); return -errval; } @@ -438,7 +438,7 @@ void stmpe811_gpioworker(FAR struct stmpe811_dev_s *priv) } else { - illdbg("No handler for PIN%d, GPIO_INTSTA: %02x\n", pin, regval); + ierr("ERROR: No handler for PIN%d, GPIO_INTSTA: %02x\n", pin, regval); } /* Clear the pending GPIO interrupt by writing a '1' to the diff --git a/drivers/input/stmpe811_tsc.c b/drivers/input/stmpe811_tsc.c index 55dce44272fff86a46bbc6311154aaaba1a66c79..b58e9feebd12608b56664cb35cf34aea55ef1272 100644 --- a/drivers/input/stmpe811_tsc.c +++ b/drivers/input/stmpe811_tsc.c @@ -196,7 +196,7 @@ static void stmpe811_notify(FAR struct stmpe811_dev_s *priv) if (fds) { fds->revents |= POLLIN; - ivdbg("Report events: %02x\n", fds->revents); + iinfo("Report events: %02x\n", fds->revents); sem_post(fds->sem); } } @@ -306,7 +306,7 @@ static inline int stmpe811_waitsample(FAR struct stmpe811_dev_s *priv, if (ret < 0) { -#ifdef CONFIG_DEBUG +#if defined(CONFIG_DEBUG_INPUT_ERROR) || defined(CONFIG_DEBUG_ASSERTIONS) /* Sample the errno (debug output could change it) */ int errval = errno; @@ -315,7 +315,7 @@ static inline int stmpe811_waitsample(FAR struct stmpe811_dev_s *priv, * the failure now. */ - idbg("ERROR: sem_wait failed: %d\n", errval); + ierr("ERROR: sem_wait failed: %d\n", errval); DEBUGASSERT(errval == EINTR); #endif ret = -EINTR; @@ -464,7 +464,7 @@ static ssize_t stmpe811_read(FAR struct file *filep, FAR char *buffer, size_t le struct stmpe811_sample_s sample; int ret; - ivdbg("len=%d\n", len); + iinfo("len=%d\n", len); DEBUGASSERT(filep); inode = filep->f_inode; @@ -589,7 +589,7 @@ static int stmpe811_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR struct stmpe811_dev_s *priv; int ret; - ivdbg("cmd: %d arg: %ld\n", cmd, arg); + iinfo("cmd: %d arg: %ld\n", cmd, arg); DEBUGASSERT(filep); inode = filep->f_inode; @@ -653,7 +653,7 @@ static int stmpe811_poll(FAR struct file *filep, FAR struct pollfd *fds, int ret; int i; - ivdbg("setup: %d\n", (int)setup); + iinfo("setup: %d\n", (int)setup); DEBUGASSERT(filep && fds); inode = filep->f_inode; @@ -677,7 +677,7 @@ static int stmpe811_poll(FAR struct file *filep, FAR struct pollfd *fds, if ((fds->events & POLLIN) == 0) { - idbg("ERROR: Missing POLLIN: revents: %08x\n", fds->revents); + ierr("ERROR: Missing POLLIN: revents: %08x\n", fds->revents); ret = -EDEADLK; goto errout; } @@ -702,7 +702,7 @@ static int stmpe811_poll(FAR struct file *filep, FAR struct pollfd *fds, if (i >= CONFIG_STMPE811_NPOLLWAITERS) { - idbg("ERROR: No available slot found: %d\n", i); + ierr("ERROR: No available slot found: %d\n", i); fds->priv = NULL; ret = -EBUSY; goto errout; @@ -786,7 +786,7 @@ static void stmpe811_timeout(int argc, uint32_t arg1, ...) ret = work_queue(HPWORK, &priv->timeout, stmpe811_timeoutworker, priv, 0); if (ret != 0) { - illdbg("Failed to queue work: %d\n", ret); + ierr("ERROR: Failed to queue work: %d\n", ret); } } } @@ -805,7 +805,7 @@ static inline void stmpe811_tscinitialize(FAR struct stmpe811_dev_s *priv) { uint8_t regval; - ivdbg("Initializing touchscreen controller\n"); + iinfo("Initializing touchscreen controller\n"); /* Enable TSC and ADC functions */ @@ -898,7 +898,7 @@ int stmpe811_register(STMPE811_HANDLE handle, int minor) char devname[DEV_NAMELEN]; int ret; - ivdbg("handle=%p minor=%d\n", handle, minor); + iinfo("handle=%p minor=%d\n", handle, minor); DEBUGASSERT(priv); /* Get exclusive access to the device structure */ @@ -907,7 +907,7 @@ int stmpe811_register(STMPE811_HANDLE handle, int minor) if (ret < 0) { int errval = errno; - idbg("ERROR: sem_wait failed: %d\n", errval); + ierr("ERROR: sem_wait failed: %d\n", errval); return -errval; } @@ -915,7 +915,7 @@ int stmpe811_register(STMPE811_HANDLE handle, int minor) if ((priv->inuse & TSC_PIN_SET) != 0) { - idbg("ERROR: TSC pins is already in-use: %02x\n", priv->inuse); + ierr("ERROR: TSC pins is already in-use: %02x\n", priv->inuse); sem_post(&priv->exclsem); return -EBUSY; } @@ -932,7 +932,7 @@ int stmpe811_register(STMPE811_HANDLE handle, int minor) priv->wdog = wd_create(); if (!priv->wdog) { - idbg("ERROR: Failed to create a watchdog\n", errno); + ierr("ERROR: Failed to create a watchdog\n", errno); sem_post(&priv->exclsem); return -ENOSPC; } @@ -943,7 +943,7 @@ int stmpe811_register(STMPE811_HANDLE handle, int minor) ret = register_driver(devname, &g_stmpe811fops, 0666, priv); if (ret < 0) { - idbg("ERROR: Failed to register driver %s: %d\n", devname, ret); + ierr("ERROR: Failed to register driver %s: %d\n", devname, ret); sem_post(&priv->exclsem); return ret; } diff --git a/drivers/input/tsc2007.c b/drivers/input/tsc2007.c index a27042400f28121fb3ffce722d906c649cfa06d4..8d49a2e0705bd4f66d55230e13bf4582cf644db5 100644 --- a/drivers/input/tsc2007.c +++ b/drivers/input/tsc2007.c @@ -278,7 +278,7 @@ static void tsc2007_notify(FAR struct tsc2007_dev_s *priv) if (fds) { fds->revents |= POLLIN; - ivdbg("Report events: %02x\n", fds->revents); + iinfo("Report events: %02x\n", fds->revents); sem_post(fds->sem); } } @@ -456,7 +456,7 @@ static int tsc2007_activate(FAR struct tsc2007_dev_s *priv, uint8_t cmd) ret = I2C_TRANSFER(priv->i2c, &msg, 1); if (ret < 0) { - idbg("I2C_TRANSFER failed: %d\n", ret); + ierr("ERROR: I2C_TRANSFER failed: %d\n", ret); } return ret; } @@ -495,7 +495,7 @@ static int tsc2007_transfer(FAR struct tsc2007_dev_s *priv, uint8_t cmd) ret = I2C_TRANSFER(priv->i2c, &msg, 1); if (ret < 0) { - idbg("I2C_TRANSFER failed: %d\n", ret); + ierr("ERROR: I2C_TRANSFER failed: %d\n", ret); return ret; } @@ -540,7 +540,7 @@ static int tsc2007_transfer(FAR struct tsc2007_dev_s *priv, uint8_t cmd) ret = I2C_TRANSFER(priv->i2c, &msg, 1); if (ret < 0) { - idbg("I2C_TRANSFER failed: %d\n", ret); + ierr("ERROR: I2C_TRANSFER failed: %d\n", ret); return ret; } @@ -550,7 +550,7 @@ static int tsc2007_transfer(FAR struct tsc2007_dev_s *priv, uint8_t cmd) */ ret = (unsigned int)data12[0] << 4 | (unsigned int)data12[1] >> 4; - ivdbg("data: 0x%04x\n", ret); + iinfo("data: 0x%04x\n", ret); return ret; } @@ -672,7 +672,7 @@ static void tsc2007_worker(FAR void *arg) if (z1 == 0) { - idbg("Z1 zero\n"); + ierr("ERROR: Z1 zero\n"); pressure = 0; } else @@ -680,14 +680,14 @@ static void tsc2007_worker(FAR void *arg) pressure = (x * config->rxplate * (z2 - z1)) / z1; pressure = (pressure + 2048) >> 12; - ivdbg("Position: (%d,%4d) pressure: %u z1/2: (%d,%d)\n", + iinfo("Position: (%d,%4d) pressure: %u z1/2: (%d,%d)\n", x, y, pressure, z1, z2); /* Ignore out of range caculcations */ if (pressure > 0x0fff) { - idbg("Dropped out-of-range pressure: %d\n", pressure); + ierr("ERROR: Dropped out-of-range pressure: %d\n", pressure); pressure = 0; } } @@ -783,7 +783,7 @@ static int tsc2007_interrupt(int irq, FAR void *context) ret = work_queue(HPWORK, &priv->work, tsc2007_worker, priv, 0); if (ret != 0) { - illdbg("Failed to queue work: %d\n", ret); + ierr("ERROR: Failed to queue work: %d\n", ret); } /* Clear any pending interrupts and return success */ @@ -1031,7 +1031,7 @@ static int tsc2007_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR struct tsc2007_dev_s *priv; int ret; - ivdbg("cmd: %d arg: %ld\n", cmd, arg); + iinfo("cmd: %d arg: %ld\n", cmd, arg); DEBUGASSERT(filep); inode = filep->f_inode; @@ -1107,7 +1107,7 @@ static int tsc2007_poll(FAR struct file *filep, FAR struct pollfd *fds, int ret; int i; - ivdbg("setup: %d\n", (int)setup); + iinfo("setup: %d\n", (int)setup); DEBUGASSERT(filep && fds); inode = filep->f_inode; @@ -1131,7 +1131,7 @@ static int tsc2007_poll(FAR struct file *filep, FAR struct pollfd *fds, if ((fds->events & POLLIN) == 0) { - idbg("Missing POLLIN: revents: %08x\n", fds->revents); + ierr("ERROR: Missing POLLIN: revents: %08x\n", fds->revents); ret = -EDEADLK; goto errout; } @@ -1156,7 +1156,7 @@ static int tsc2007_poll(FAR struct file *filep, FAR struct pollfd *fds, if (i >= CONFIG_TSC2007_NPOLLWAITERS) { - idbg("No availabled slot found: %d\n", i); + ierr("ERROR: No available slot found: %d\n", i); fds->priv = NULL; ret = -EBUSY; goto errout; @@ -1225,7 +1225,7 @@ int tsc2007_register(FAR struct i2c_master_s *dev, #endif int ret; - ivdbg("dev: %p minor: %d\n", dev, minor); + iinfo("dev: %p minor: %d\n", dev, minor); /* Debug-only sanity checks */ @@ -1242,7 +1242,7 @@ int tsc2007_register(FAR struct i2c_master_s *dev, priv = (FAR struct tsc2007_dev_s *)kmm_malloc(sizeof(struct tsc2007_dev_s)); if (!priv) { - idbg("kmm_malloc(%d) failed\n", sizeof(struct tsc2007_dev_s)); + ierr("ERROR: kmm_malloc(%d) failed\n", sizeof(struct tsc2007_dev_s)); return -ENOMEM; } #endif @@ -1265,7 +1265,7 @@ int tsc2007_register(FAR struct i2c_master_s *dev, ret = config->attach(config, tsc2007_interrupt); if (ret < 0) { - idbg("Failed to attach interrupt\n"); + ierr("ERROR: Failed to attach interrupt\n"); goto errout_with_priv; } @@ -1276,19 +1276,19 @@ int tsc2007_register(FAR struct i2c_master_s *dev, ret = tsc2007_transfer(priv, TSC2007_ENABLE_PENIRQ); if (ret < 0) { - idbg("tsc2007_transfer failed: %d\n", ret); + ierr("ERROR: tsc2007_transfer failed: %d\n", ret); goto errout_with_priv; } /* Register the device as an input device */ (void)snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor); - ivdbg("Registering %s\n", devname); + iinfo("Registering %s\n", devname); ret = register_driver(devname, &tsc2007_fops, 0666, priv); if (ret < 0) { - idbg("register_driver() failed: %d\n", ret); + ierr("ERROR: register_driver() failed: %d\n", ret); goto errout_with_priv; } @@ -1311,7 +1311,7 @@ int tsc2007_register(FAR struct i2c_master_s *dev, ret = work_queue(HPWORK, &priv->work, tsc2007_worker, priv, 0); if (ret != 0) { - idbg("Failed to queue work: %d\n", ret); + ierr("ERROR: Failed to queue work: %d\n", ret); goto errout_with_priv; } diff --git a/drivers/ioexpander/Kconfig b/drivers/ioexpander/Kconfig index 438beeed5ac891cb8d5bd140e60f0fcd8a2a5b6f..fd6abd77155ab60308e79ca1890b6a23fca61eed 100644 --- a/drivers/ioexpander/Kconfig +++ b/drivers/ioexpander/Kconfig @@ -3,6 +3,17 @@ # see the file kconfig-language.txt in the NuttX tools repository. # +menu "IO Expander/GPIO Support" + +config IOEXPANDER + bool "Enable IO Expander Support" + default n + ---help--- + This directory holds implementations of IO expander drivers. + See include/nuttx/ioexpander/ioexpander.h for registration information. + +if IOEXPANDER + config IOEXPANDER_PCA9555 bool "PCA9555 I2C IO expander" default n @@ -40,3 +51,14 @@ config IOEXPANDER_MULTIPIN ---help--- This settings enable the definition of routines for optimized simultaneous access to multiple pins. + +endif # IOEXPANDER + +config DEV_GPIO + bool "GPIO driver" + default n + ---help--- + Enables a simple GPIO input/output driver to support application- + space testing of hardware. + +endmenu # IO Expander/GPIO Support diff --git a/drivers/ioexpander/Make.defs b/drivers/ioexpander/Make.defs index aea59aea51d829d30b9150e14fd121ede7ab232c..37e669fe9437311fc49f312e9fbda36ad85952da 100644 --- a/drivers/ioexpander/Make.defs +++ b/drivers/ioexpander/Make.defs @@ -43,6 +43,26 @@ ifeq ($(CONFIG_IOEXPANDER_PCA9555),y) CSRCS += pca9555.c endif +endif # CONFIG_IOEXPANDER + +# GPIO test device driver (independent of IOEXPANDERS) + +ifeq ($(CONFIG_DEV_GPIO),y) + CSRCS += gpio.c +endif + +# The folling implements an awkward OR + +ifeq ($(CONFIG_IOEXPANDER),y) + +# Include ioexpander I/O device driver build support + +DEPPATH += --dep-path ioexpander +VPATH += :ioexpander +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)ioexpander} + +else ifeq ($(CONFIG_DEV_GPIO),y) + # Include ioexpander I/O device driver build support DEPPATH += --dep-path ioexpander diff --git a/drivers/ioexpander/gpio.c b/drivers/ioexpander/gpio.c new file mode 100644 index 0000000000000000000000000000000000000000..d7f1e966fa9cd6ccd928d31fc21a8fbf58efb3fa --- /dev/null +++ b/drivers/ioexpander/gpio.c @@ -0,0 +1,269 @@ +/**************************************************************************** + * drivers/ioexpander/gpio.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 + +#ifdef CONFIG_DEV_GPIO + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static int gpio_open(FAR struct file *filep); +static int gpio_close(FAR struct file *filep); +static ssize_t gpio_read(FAR struct file *filep, FAR char *buffer, + size_t buflen); +static ssize_t gpio_write(FAR struct file *filep, FAR const char *buffer, + size_t buflen); +static int gpio_ioctl(FAR struct file *filep, int cmd, + unsigned long arg); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static const struct file_operations g_gpio_input_ops = +{ + gpio_open, /* open */ + gpio_close, /* close */ + gpio_read, /* read */ + NULL, /* write */ + NULL, /* seek */ + gpio_ioctl /* ioctl */ +#ifndef CONFIG_DISABLE_POLL + , NULL /* poll */ +#endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif +}; + +static const struct file_operations g_gpio_output_ops = +{ + gpio_open, /* open */ + gpio_close, /* close */ + NULL, /* read */ + gpio_write, /* write */ + NULL, /* seek */ + gpio_ioctl /* ioctl */ +#ifndef CONFIG_DISABLE_POLL + , NULL /* poll */ +#endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: gpio_open + * + * Description: + * Standard character driver open method. + * + ****************************************************************************/ + +static int gpio_open(FAR struct file *filep) +{ + return OK; +} + +/**************************************************************************** + * Name: gpio_close + * + * Description: + * Standard character driver close method. + * + ****************************************************************************/ + +static int gpio_close(FAR struct file *filep) +{ + return OK; +} + +/**************************************************************************** + * Name: gpio_read + * + * Description: + * Standard character driver read method. + * + ****************************************************************************/ + +static ssize_t gpio_read(FAR struct file *filep, FAR char *buffer, + size_t buflen) +{ + return 0; +} + +/**************************************************************************** + * Name: gpio_write + * + * Description: + * Standard character driver write method. + * + ****************************************************************************/ + +static ssize_t gpio_write(FAR struct file *filep, FAR const char *buffer, + size_t buflen) +{ + return (ssize_t)buflen; +} + +/**************************************************************************** + * Name: gpio_ioctl + * + * Description: + * Standard character driver ioctl method. + * + ****************************************************************************/ + +static int gpio_ioctl(FAR struct file *filep, int cmd, unsigned long arg) +{ + FAR struct inode *inode; + FAR struct gpio_common_dev_s *dev; + int ret = OK; + + DEBUGASSERT(filep != NULL && filep->f_inode != NULL); + inode = filep->f_inode; + DEBUGASSERT(inode->i_private != NULL); + dev = inode->i_private; + + switch (cmd) + { + /* Command: GPIO_WRITE + * Description: Set the value of an output GPIO + * Argument: 0=output a low value; 1=outut a high value + */ + + case GPIO_WRITE: + if (dev->gp_output) + { + FAR struct gpio_output_dev_s *outdev = + (FAR struct gpio_output_dev_s *)dev; + + DEBUGASSERT(outdev->gpout_write != NULL); + ret = outdev->gpout_write(outdev, (int)arg); + } + else + { + ret = -EACCES; + } + break; + + /* Command: GPIO_READ + * Description: Read the value of an input or output GPIO + * Argument: A pointer to an integer value to receive the result: + * 0=low value; 1=high value. + */ + + case GPIO_READ: + if (dev->gp_output) + { + FAR struct gpio_output_dev_s *outdev = + (FAR struct gpio_output_dev_s *)dev; + + DEBUGASSERT(outdev->gpout_read != NULL); + ret = outdev->gpout_read(outdev); + } + else + { + FAR struct gpio_input_dev_s *indev = + (FAR struct gpio_input_dev_s *)dev; + + DEBUGASSERT(indev->gpin_read != NULL); + ret = indev->gpin_read(indev); + } + break; + } + + return ret; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: gpio_input_register + * + * Description: + * Register GPIO input pin device driver. + * + ****************************************************************************/ + +int gpio_input_register(FAR struct gpio_input_dev_s *dev, int minor) +{ + char devname[16]; + + DEBUGASSERT(dev != NULL && !dev->output && (unsigned int)minor < 100); + snprintf(devname, 16, "/dev/gpin%u", (unsigned int)minor); + + return register_driver(devname, &g_gpio_input_ops, 0444, dev); +} + +/**************************************************************************** + * Name: gpio_output_register + * + * Description: + * Register GPIO output pin device driver. + * + ****************************************************************************/ + +int gpio_output_register(FAR struct gpio_output_dev_s *dev, int minor) +{ + char devname[16]; + + DEBUGASSERT(dev != NULL && dev->output && (unsigned int)minor < 100); + snprintf(devname, 16, "/dev/gpout%u", (unsigned int)minor); + + return register_driver(devname, &g_gpio_output_ops, 0222, dev); +} + +#endif /* CONFIG_DEV_GPIO */ diff --git a/drivers/lcd/Kconfig b/drivers/lcd/Kconfig index 441e6fba2611af7c5295c2affec081f4103972b3..97618eba04b54f22ec2eede0f2e7f6305f1ca932 100644 --- a/drivers/lcd/Kconfig +++ b/drivers/lcd/Kconfig @@ -19,7 +19,7 @@ menuconfig LCD if LCD -comment "Common Graphipc LCD Settings" +comment "Common Graphic LCD Settings" config LCD_CONSOLE bool "LCD console output" diff --git a/drivers/lcd/ili9341.c b/drivers/lcd/ili9341.c index 1c19187ab547cf7ce8f3d0c97cad640810edc679..c281ab86c34d561781117fba8f1a0c3c1c790f7a 100644 --- a/drivers/lcd/ili9341.c +++ b/drivers/lcd/ili9341.c @@ -365,18 +365,6 @@ # endif #endif -/* Add next LCD display */ - -/* Debug option */ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /**************************************************************************** * Private Type Definition ****************************************************************************/ @@ -765,37 +753,39 @@ static int ili9341_getrun(int devno, fb_coord_t row, fb_coord_t col, static int ili9341_hwinitialize(FAR struct ili9341_dev_s *dev) { -#ifdef CONFIG_DEBUG_LCD +#ifdef CONFIG_DEBUG_LCD_INFO uint8_t param; #endif FAR struct ili9341_lcd_s *lcd = dev->lcd; /* Select spi device */ - lcddbg("Initialize lcd driver\n"); + lcdinfo("Initialize lcd driver\n"); lcd->select(lcd); -#ifdef CONFIG_DEBUG_LCD +#ifdef CONFIG_DEBUG_LCD_INFO /* Read display identification */ lcd->sendcmd(lcd, ILI9341_READ_ID1); lcd->recvparam(lcd, ¶m); - lcddbg("ili9341 LCD driver: LCD modules manufacturer ID: %d\n", param); + lcdinfo("ili9341 LCD driver: LCD modules manufacturer ID: %d\n", param); + lcd->sendcmd(lcd, ILI9341_READ_ID2); lcd->recvparam(lcd, ¶m); - lcddbg("ili9341 LCD driver: LCD modules driver version ID: %d\n", param); + lcdinfo("ili9341 LCD driver: LCD modules driver version ID: %d\n", param); + lcd->sendcmd(lcd, ILI9341_READ_ID3); lcd->recvparam(lcd, ¶m); - lcddbg("ili9341 LCD driver: LCD modules driver ID: %d\n", param); + lcdinfo("ili9341 LCD driver: LCD modules driver ID: %d\n", param); #endif /* Reset the lcd display to the default state */ - lcdvdbg("ili9341 LCD driver: Software Reset\n"); + lcdinfo("ili9341 LCD driver: Software Reset\n"); lcd->sendcmd(lcd, ILI9341_SOFTWARE_RESET); up_mdelay(5); - lcdvdbg("ili9341 LCD driver: set Memory Access Control: %04x\n", dev->orient); + lcdinfo("ili9341 LCD driver: set Memory Access Control: %04x\n", dev->orient); lcd->sendcmd(lcd, ILI9341_MEMORY_ACCESS_CONTROL); lcd->sendparam(lcd, dev->orient); @@ -809,13 +799,13 @@ static int ili9341_hwinitialize(FAR struct ili9341_dev_s *dev) /* 16 bit RGB565 */ - lcdvdbg("ili9341 LCD driver: Set Pixel Format: %04x\n", + lcdinfo("ili9341 LCD driver: Set Pixel Format: %04x\n", ILI9341_PIXSET_16BITMCU_PARAM1); lcd->sendparam(lcd, ILI9341_PIXSET_16BITMCU_PARAM1); /* 18 bit RGB666, add settings here */ - lcdvdbg("ili9341 LCD driver: Set Interface control\n"); + lcdinfo("ili9341 LCD driver: Set Interface control\n"); lcd->sendcmd(lcd, ILI9341_INTERFACE_CONTROL); lcd->sendparam(lcd, ILI9341_IFCTL_PARAM1); lcd->sendparam(lcd, ILI9341_IFCTL_PARAM2); @@ -823,7 +813,7 @@ static int ili9341_hwinitialize(FAR struct ili9341_dev_s *dev) /* Sleep out */ - lcdvdbg("ili9341 LCD driver: Sleep Out\n"); + lcdinfo("ili9341 LCD driver: Sleep Out\n"); lcd->sendcmd(lcd, ILI9341_SLEEP_OUT); up_mdelay(120); @@ -948,7 +938,7 @@ static int ili9341_getvideoinfo(FAR struct lcd_dev_s *dev, vinfo->yres = ili9341_getyres(priv); vinfo->nplanes = 1; - lcdvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n", + lcdinfo("fmt: %d xres: %d yres: %d nplanes: %d\n", vinfo->fmt, vinfo->xres, vinfo->yres, vinfo->nplanes); return OK; @@ -989,7 +979,7 @@ static int ili9341_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, pinfo->bpp = priv->bpp; pinfo->buffer = (FAR uint8_t *)priv->runbuffer; /* Run scratch buffer */ - lcdvdbg("planeno: %d bpp: %d\n", planeno, pinfo->bpp); + lcdinfo("planeno: %d bpp: %d\n", planeno, pinfo->bpp); return OK; } @@ -1020,7 +1010,7 @@ static int ili9341_getpower(FAR struct lcd_dev_s *dev) if (priv) { - lcddbg("%d\n", priv->power); + lcdinfo("%d\n", priv->power); return priv->power; } @@ -1053,7 +1043,7 @@ static int ili9341_setpower(FAR struct lcd_dev_s *dev, int power) if (dev) { - lcddbg("%d\n", power); + lcdinfo("%d\n", power); lcd->select(lcd); @@ -1103,7 +1093,7 @@ static int ili9341_setpower(FAR struct lcd_dev_s *dev, int power) static int ili9341_getcontrast(struct lcd_dev_s *dev) { - lcdvdbg("Not implemented\n"); + lcdinfo("Not implemented\n"); return -ENOSYS; } @@ -1125,7 +1115,7 @@ static int ili9341_getcontrast(struct lcd_dev_s *dev) static int ili9341_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) { - lcdvdbg("contrast: %d\n", contrast); + lcdinfo("contrast: %d\n", contrast); return -ENOSYS; } diff --git a/drivers/lcd/memlcd.c b/drivers/lcd/memlcd.c index e960e27612a097b7314f43c5108d0a5817be2897..59976b7a521ba2e42ab0a41f6668a509196d1a4a 100644 --- a/drivers/lcd/memlcd.c +++ b/drivers/lcd/memlcd.c @@ -109,16 +109,6 @@ #define LS_BIT (1 << 0) #define MS_BIT (1 << 7) -/* Debug */ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__) -# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /**************************************************************************** * Private Type Definition ****************************************************************************/ @@ -339,7 +329,8 @@ static void memlcd_deselect(FAR struct spi_dev_s *spi) static inline void memlcd_clear(FAR struct memlcd_dev_s *mlcd) { uint16_t cmd = MEMLCD_CMD_ALL_CLEAR; - lcddbg("Clear display\n"); + + lcdinfo("Clear display\n"); memlcd_select(mlcd->spi); /* XXX Ensure 2us here */ SPI_SNDBLOCK(mlcd->spi, &cmd, 2); @@ -408,7 +399,7 @@ static int memlcd_putrun(fb_coord_t row, fb_coord_t col, int i; DEBUGASSERT(buffer); - lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); #ifdef CONFIG_NX_PACKEDMSFIRST usrmask = MS_BIT; @@ -499,7 +490,7 @@ static int memlcd_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t * buffer, int i; DEBUGASSERT(buffer); - lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); #ifdef CONFIG_NX_PACKEDMSFIRST usrmask = MS_BIT; @@ -557,7 +548,7 @@ static int memlcd_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); - lcdvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n", + lcdinfo("fmt: %d xres: %d yres: %d nplanes: %d\n", g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes); memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s)); @@ -576,7 +567,7 @@ static int memlcd_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, FAR struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(pinfo && planeno == 0); - lcdvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); + lcdinfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); return OK; } @@ -593,8 +584,9 @@ static int memlcd_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, static int memlcd_getpower(FAR struct lcd_dev_s *dev) { FAR struct memlcd_dev_s *mlcd = (FAR struct memlcd_dev_s *)dev; + DEBUGASSERT(mlcd); - lcddbg("%d\n", mlcd->power); + lcdinfo("%d\n", mlcd->power); return mlcd->power; } @@ -610,8 +602,9 @@ static int memlcd_getpower(FAR struct lcd_dev_s *dev) static int memlcd_setpower(FAR struct lcd_dev_s *dev, int power) { struct memlcd_dev_s *mlcd = (struct memlcd_dev_s *)dev; + DEBUGASSERT(mlcd && (unsigned)power <= CONFIG_LCD_MAXPOWER && mlcd->spi); - lcddbg("%d\n", power); + lcdinfo("%d\n", power); mlcd->power = power; if (power > 0) @@ -638,8 +631,9 @@ static int memlcd_setpower(FAR struct lcd_dev_s *dev, int power) static int memlcd_getcontrast(struct lcd_dev_s *dev) { struct memlcd_dev_s *mlcd = (struct memlcd_dev_s *)dev; + DEBUGASSERT(mlcd); - lcddbg("contrast: %d\n", mlcd->contrast); + lcdinfo("contrast: %d\n", mlcd->contrast); return mlcd->contrast; } @@ -654,8 +648,9 @@ static int memlcd_getcontrast(struct lcd_dev_s *dev) static int memlcd_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) { struct memlcd_dev_s *mlcd = (struct memlcd_dev_s *)dev; + DEBUGASSERT(mlcd); - lcddbg("contrast: %d\n", contrast); + lcdinfo("contrast: %d\n", contrast); if (contrast > MEMLCD_MAXCONTRAST) { contrast = MEMLCD_MAXCONTRAST; @@ -710,6 +705,6 @@ FAR struct lcd_dev_s *memlcd_initialize(FAR struct spi_dev_s *spi, mlcd->priv->attachirq(memlcd_extcominisr); - lcddbg("done\n"); + lcdinfo("done\n"); return &mlcd->dev; } diff --git a/drivers/lcd/mio283qt2.c b/drivers/lcd/mio283qt2.c index 2d078e1ff09ff1c5dc1ec3dc90ecddd2c4978782..047716614caa9bbf12768908a86319a73cfde5a2 100644 --- a/drivers/lcd/mio283qt2.c +++ b/drivers/lcd/mio283qt2.c @@ -102,20 +102,6 @@ # define CONFIG_LCD_LANDSCAPE 1 #endif -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must - * also be enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif - /* Display/Color Properties ***********************************************************/ /* Display Resolution */ @@ -237,16 +223,6 @@ #endif -/* Debug ******************************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /************************************************************************************** * Private Type Definition **************************************************************************************/ @@ -534,7 +510,7 @@ static int mio283qt2_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *b /* Buffer must be provided and aligned to a 16-bit address boundary */ - lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0); /* Select the LCD */ @@ -584,7 +560,7 @@ static int mio283qt2_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, /* Buffer must be provided and aligned to a 16-bit address boundary */ - lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0); /* Select the LCD */ @@ -632,7 +608,7 @@ static int mio283qt2_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); - lcdvdbg("fmt: %d xres: %d yres: %d nplanes: 1\n", + lcdinfo("fmt: %d xres: %d yres: %d nplanes: 1\n", MIO283QT2_COLORFMT, MIO283QT2_XRES, MIO283QT2_XRES); vinfo->fmt = MIO283QT2_COLORFMT; /* Color format: RGB16-565: RRRR RGGG GGGB BBBB */ @@ -656,7 +632,7 @@ static int mio283qt2_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planen FAR struct mio283qt2_dev_s *priv = (FAR struct mio283qt2_dev_s *)dev; DEBUGASSERT(dev && pinfo && planeno == 0); - lcdvdbg("planeno: %d bpp: %d\n", planeno, MIO283QT2_BPP); + lcdinfo("planeno: %d bpp: %d\n", planeno, MIO283QT2_BPP); pinfo->putrun = mio283qt2_putrun; /* Put a run into LCD memory */ pinfo->getrun = mio283qt2_getrun; /* Get a run from LCD memory */ @@ -676,7 +652,7 @@ static int mio283qt2_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planen static int mio283qt2_getpower(FAR struct lcd_dev_s *dev) { - lcdvdbg("power: %d\n", 0); + lcdinfo("power: %d\n", 0); return g_lcddev.power; } @@ -727,7 +703,7 @@ static int mio283qt2_setpower(FAR struct lcd_dev_s *dev, int power) FAR struct mio283qt2_dev_s *priv = (FAR struct mio283qt2_dev_s *)dev; FAR struct mio283qt2_lcd_s *lcd = priv->lcd; - lcdvdbg("power: %d\n", power); + lcdinfo("power: %d\n", power); DEBUGASSERT((unsigned)power <= CONFIG_LCD_MAXPOWER); /* Set new power level */ @@ -778,7 +754,7 @@ static int mio283qt2_setpower(FAR struct lcd_dev_s *dev, int power) static int mio283qt2_getcontrast(FAR struct lcd_dev_s *dev) { - lcdvdbg("Not implemented\n"); + lcdinfo("Not implemented\n"); return -ENOSYS; } @@ -792,7 +768,7 @@ static int mio283qt2_getcontrast(FAR struct lcd_dev_s *dev) static int mio283qt2_setcontrast(FAR struct lcd_dev_s *dev, unsigned int contrast) { - lcdvdbg("contrast: %d\n", contrast); + lcdinfo("contrast: %d\n", contrast); return -ENOSYS; } @@ -820,7 +796,7 @@ static inline int mio283qt2_hwinitialize(FAR struct mio283qt2_dev_s *priv) #ifndef CONFIG_LCD_NOGETRUN id = mio283qt2_readreg(lcd, 0x00); - lcddbg("LCD ID: %04x\n", id); + lcdinfo("LCD ID: %04x\n", id); /* Check if the ID is for the MIO283QT2 */ @@ -926,7 +902,7 @@ static inline int mio283qt2_hwinitialize(FAR struct mio283qt2_dev_s *priv) #ifndef CONFIG_LCD_NOGETRUN else { - lcddbg("Unsupported LCD type\n"); + lcderr("ERROR: Unsupported LCD type\n"); ret = -ENODEV; } #endif @@ -955,7 +931,7 @@ FAR struct lcd_dev_s *mio283qt2_lcdinitialize(FAR struct mio283qt2_lcd_s *lcd) { int ret; - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); /* If we ccould support multiple MIO283QT2 devices, this is where we would allocate * a new driver data structure... but we can't. Why not? Because of a bad should diff --git a/drivers/lcd/mio283qt9a.c b/drivers/lcd/mio283qt9a.c index d98935f84f252685cc038e7cdee9147e2e0a75c8..7228b23c4d92bb31d683890521020a24845eae4b 100644 --- a/drivers/lcd/mio283qt9a.c +++ b/drivers/lcd/mio283qt9a.c @@ -96,20 +96,6 @@ # define CONFIG_LCD_LANDSCAPE 1 #endif -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must - * also be enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif - /* Display/Color Properties ***********************************************************/ /* Display Resolution */ @@ -136,16 +122,6 @@ #define ILI9341_ID_1 0x93 #define ILI9341_ID_2 0x41 -/* Debug ******************************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /************************************************************************************** * Private Type Definition **************************************************************************************/ @@ -498,7 +474,7 @@ static int mio283qt9a_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer /* Buffer must be provided and aligned to a 16-bit address boundary */ - lcdvdbg("mio283qt9a_getrun row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("mio283qt9a_getrun row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0); /* Read the run from GRAM. */ @@ -543,7 +519,7 @@ static int mio283qt9a_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); - lcdvdbg("fmt: %d xres: %d yres: %d nplanes: 1\n", + lcdinfo("fmt: %d xres: %d yres: %d nplanes: 1\n", MIO283QT9A_COLORFMT, MIO283QT9A_XRES, MIO283QT9A_YRES); vinfo->fmt = MIO283QT9A_COLORFMT; /* Color format: RGB16-565: RRRR RGGG GGGB BBBB */ @@ -567,7 +543,7 @@ static int mio283qt9a_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int plane FAR struct mio283qt9a_dev_s *priv = (FAR struct mio283qt9a_dev_s *)dev; DEBUGASSERT(dev && pinfo && planeno == 0); - lcdvdbg("planeno: %d bpp: %d\n", planeno, MIO283QT9A_BPP); + lcdinfo("planeno: %d bpp: %d\n", planeno, MIO283QT9A_BPP); pinfo->putrun = mio283qt9a_putrun; /* Put a run into LCD memory */ pinfo->getrun = mio283qt9a_getrun; /* Get a run from LCD memory */ @@ -588,7 +564,7 @@ static int mio283qt9a_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int plane static int mio283qt9a_getpower(FAR struct lcd_dev_s *dev) { - lcdvdbg("getpower: %d\n", 0); + lcdinfo("getpower: %d\n", 0); return g_lcddev.power; } @@ -604,7 +580,7 @@ static int mio283qt9a_getpower(FAR struct lcd_dev_s *dev) static int mio283qt9a_poweroff(FAR struct mio283qt9a_lcd_s *lcd) { /* Select the LCD */ - lcdvdbg("mio283qt9a_poweroff\n"); + lcdinfo("mio283qt9a_poweroff\n"); lcd->select(lcd); @@ -640,7 +616,7 @@ static int mio283qt9a_setpower(FAR struct lcd_dev_s *dev, int power) FAR struct mio283qt9a_dev_s *priv = (FAR struct mio283qt9a_dev_s *)dev; FAR struct mio283qt9a_lcd_s *lcd = priv->lcd; - lcdvdbg("setpower: %d\n", power); + lcdinfo("setpower: %d\n", power); DEBUGASSERT((unsigned)power <= CONFIG_LCD_MAXPOWER); /* Set new power level */ @@ -687,7 +663,7 @@ static int mio283qt9a_setpower(FAR struct lcd_dev_s *dev, int power) static int mio283qt9a_getcontrast(FAR struct lcd_dev_s *dev) { - lcdvdbg("Not implemented\n"); + lcdinfo("Not implemented\n"); return -ENOSYS; } @@ -701,7 +677,7 @@ static int mio283qt9a_getcontrast(FAR struct lcd_dev_s *dev) static int mio283qt9a_setcontrast(FAR struct lcd_dev_s *dev, unsigned int contrast) { - lcdvdbg("contrast: %d\n", contrast); + lcdinfo("contrast: %d\n", contrast); return -ENOSYS; } @@ -739,7 +715,7 @@ static inline int mio283qt9a_hwinitialize(FAR struct mio283qt9a_dev_s *priv) id_c = lcd->read(lcd); id_d = lcd->read(lcd); - lcdvdbg("LCD ID: %04x %04x %04x %04x\n", id_a, id_b, id_c, id_d); + lcdinfo("LCD ID: %04x %04x %04x %04x\n", id_a, id_b, id_c, id_d); UNUSED(id_a); UNUSED(id_b); @@ -781,45 +757,45 @@ static inline int mio283qt9a_hwinitialize(FAR struct mio283qt9a_dev_s *priv) id_b = lcd->read(lcd); id_c = lcd->read(lcd); id_d = lcd->read(lcd); - lcdvdbg("LCD man ID: %02x, version: %02x, driver ID: %02x\n", id_b, id_c, id_d); + lcdinfo("LCD man ID: %02x, version: %02x, driver ID: %02x\n", id_b, id_c, id_d); id_a = mio283qt9a_readreg(lcd, 0x09); /* Read display status */ id_b = lcd->read(lcd); id_c = lcd->read(lcd); id_d = lcd->read(lcd); id_e = lcd->read(lcd); - lcdvdbg("Display status %02x, %02x, %02x, %02x, %02x\n", id_a, id_b, id_c, id_d, id_e); + lcdinfo("Display status %02x, %02x, %02x, %02x, %02x\n", id_a, id_b, id_c, id_d, id_e); id_a = mio283qt9a_readreg(lcd, 0x0a); /* Read power status */ id_b = lcd->read(lcd); - lcdvdbg("Power status %02x, %02x\n", id_a, id_b); + lcdinfo("Power status %02x, %02x\n", id_a, id_b); id_a = mio283qt9a_readreg(lcd, 0x0b); /* Read MADCTL */ id_b = lcd->read(lcd); - lcdvdbg("MADCTL %02x, %02x\n", id_a, id_b); + lcdinfo("MADCTL %02x, %02x\n", id_a, id_b); id_a = mio283qt9a_readreg(lcd, 0x0c); /* Read pixel format */ id_b = lcd->read(lcd); - lcdvdbg("Pixel format %02x, %02x\n", id_a, id_b); + lcdinfo("Pixel format %02x, %02x\n", id_a, id_b); id_a = mio283qt9a_readreg(lcd, 0x0d); /* Read image format */ id_b = lcd->read(lcd); - lcdvdbg("Image format %02x, %02x\n", id_a, id_b); + lcdinfo("Image format %02x, %02x\n", id_a, id_b); id_a = mio283qt9a_readreg(lcd, 0x0e); /* read signal mode */ id_b = lcd->read(lcd); - lcdvdbg("Signal mode %02x, %02x\n", id_a, id_b); + lcdinfo("Signal mode %02x, %02x\n", id_a, id_b); id_a = mio283qt9a_readreg(lcd, 0x0f); /* read self diag */ id_b = lcd->read(lcd); - lcdvdbg("Self diag %02x, %02x\n", id_a, id_b); + lcdinfo("Self diag %02x, %02x\n", id_a, id_b); #endif ret = OK; } #ifndef CONFIG_LCD_NOGETRUN else { - lcddbg("Unsupported LCD type\n"); + lcderr("ERROR: Unsupported LCD type\n"); ret = -ENODEV; } #endif @@ -849,7 +825,7 @@ FAR struct lcd_dev_s *mio283qt9a_lcdinitialize(FAR struct mio283qt9a_lcd_s *lcd) FAR struct mio283qt9a_dev_s *priv; int ret; - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); /* If we could support multiple MIO283QT9A devices, this is where we would allocate * a new driver data structure... but we can't. Why not? Because of a bad should diff --git a/drivers/lcd/nokia6100.c b/drivers/lcd/nokia6100.c index 5a7e6ab976f0dcf53a1da18068078b350cb60d77..3b4a05383dab8ad8df64dbbbb758aa70863bc59c 100644 --- a/drivers/lcd/nokia6100.c +++ b/drivers/lcd/nokia6100.c @@ -238,12 +238,12 @@ * (Verbose debug must also be enabled) */ -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE +#ifndef CONFIG_DEBUG_FEATURES +# undef CONFIG_DEBUG_INFO # undef CONFIG_DEBUG_GRAPHICS #endif -#ifndef CONFIG_DEBUG_VERBOSE +#ifndef CONFIG_DEBUG_INFO # undef CONFIG_LCD_REGDEBUG #endif @@ -305,14 +305,6 @@ #define NOKIA_ENDPAGE 131 #define NOKIA_ENDCOL 131 -/* Debug ******************************************************************************/ - -#ifdef CONFIG_LCD_REGDEBUG -# define lcddbg(format, ...) llvdbg(format, ##__VA_ARGS__) -#else -# define lcddbg(x...) -#endif - /************************************************************************************** * Private Type Definition **************************************************************************************/ @@ -666,7 +658,8 @@ static void nokia_select(FAR struct spi_dev_s *spi) * devices competing for the SPI bus */ - lcddbg("SELECTED\n"); + lcdinfo("SELECTED\n"); + SPI_LOCK(spi, true); SPI_SELECT(spi, SPIDEV_DISPLAY, true); @@ -700,7 +693,8 @@ static void nokia_deselect(FAR struct spi_dev_s *spi) { /* De-select Nokia 6100 chip and relinquish the SPI bus. */ - lcddbg("DE-SELECTED\n"); + lcdinfo("DE-SELECTED\n"); + SPI_SELECT(spi, SPIDEV_DISPLAY, false); SPI_LOCK(spi, false); } @@ -717,7 +711,8 @@ static void nokia_sndcmd(FAR struct spi_dev_s *spi, const uint8_t cmd) { /* Select the LCD */ - lcddbg("cmd: %02x\n", cmd); + lcdinfo("cmd: %02x\n", cmd); + nokia_select(spi); /* Send the command. Bit 8 == 0 denotes a command */ @@ -743,7 +738,7 @@ static void nokia_cmddata(FAR struct spi_dev_s *spi, uint8_t cmd, int datlen, uint16_t *rowbuf = g_rowbuf; int i; - lcddbg("cmd: %02x datlen: %d\n", cmd, datlen); + lcdinfo("cmd: %02x datlen: %d\n", cmd, datlen); DEBUGASSERT(datlen <= NOKIA_STRIDE); /* Copy the command into the line buffer. Bit 8 == 0 denotes a command. */ @@ -800,7 +795,7 @@ static void nokia_cmdarray(FAR struct spi_dev_s *spi, int len, const uint8_t *cm for (i = 0; i < len; i++) { - lcddbg("cmddata[%d]: %02x\n", i, cmddata[i]); + lcdinfo("cmddata[%d]: %02x\n", i, cmddata[i]); } #endif nokia_cmddata(spi, cmddata[0], len-1, &cmddata[1]); @@ -866,7 +861,7 @@ static int nokia_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffe FAR struct spi_dev_s *spi = priv->spi; uint16_t cmd[3]; - gvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + ginfo("row: %d col: %d npixels: %d\n", row, col, npixels); #if NOKIA_XBIAS > 0 col += NOKIA_XBIAS; @@ -917,7 +912,7 @@ static int nokia_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffe static int nokia_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, size_t npixels) { - gvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + ginfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0); /* At present, this is a write-only LCD driver */ @@ -938,7 +933,7 @@ static int nokia_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); - gvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n", + ginfo("fmt: %d xres: %d yres: %d nplanes: %d\n", g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes); memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s)); return OK; @@ -956,7 +951,7 @@ static int nokia_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, FAR struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(dev && pinfo && planeno == 0); - gvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); + ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); return OK; } @@ -973,7 +968,7 @@ static int nokia_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, static int nokia_getpower(struct lcd_dev_s *dev) { struct nokia_dev_s *priv = (struct nokia_dev_s *)dev; - gvdbg("power: %d\n", priv->power); + ginfo("power: %d\n", priv->power); return priv->power; } @@ -991,7 +986,7 @@ static int nokia_setpower(struct lcd_dev_s *dev, int power) struct nokia_dev_s *priv = (struct nokia_dev_s *)dev; int ret; - gvdbg("power: %d\n", power); + ginfo("power: %d\n", power); DEBUGASSERT(power <= CONFIG_LCD_MAXPOWER); /* Set new power level. The backlight power is controlled outside of the LCD @@ -1017,7 +1012,7 @@ static int nokia_setpower(struct lcd_dev_s *dev, int power) static int nokia_getcontrast(struct lcd_dev_s *dev) { struct nokia_dev_s *priv = (struct nokia_dev_s *)dev; - gvdbg("contrast: %d\n", priv->contrast); + ginfo("contrast: %d\n", priv->contrast); return priv->contrast; } @@ -1056,7 +1051,7 @@ static int nokia_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) #endif } - gvdbg("contrast: %d\n", contrast); + ginfo("contrast: %d\n", contrast); return -ENOSYS; } @@ -1169,7 +1164,7 @@ FAR struct lcd_dev_s *nokia_lcdinitialize(FAR struct spi_dev_s *spi, unsigned in { struct nokia_dev_s *priv = &g_lcddev; - gvdbg("Initializing\n"); + ginfo("Initializing\n"); DEBUGASSERT(devno == 0); /* Initialize the driver data structure */ diff --git a/drivers/lcd/p14201.c b/drivers/lcd/p14201.c index 8d51c77a97695823e8629b96ffc7eb8c05911ede..147e6414ed0e34d6f6d16072819847829f03afb3 100644 --- a/drivers/lcd/p14201.c +++ b/drivers/lcd/p14201.c @@ -147,12 +147,12 @@ * Verbose debug must also be enabled */ -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE +#ifndef CONFIG_DEBUG_FEATURES +# undef CONFIG_DEBUG_INFO # undef CONFIG_DEBUG_GRAPHICS #endif -#ifndef CONFIG_DEBUG_VERBOSE +#ifndef CONFIG_DEBUG_INFO # undef CONFIG_LCD_RITDEBUG #endif @@ -180,9 +180,13 @@ /* Debug ******************************************************************************/ #ifdef CONFIG_LCD_RITDEBUG -# define ritdbg(format, ...) vdbg(format, ##__VA_ARGS__) +# define riterr(format, ...) _err(format, ##__VA_ARGS__) +# define ritwarn(format, ...) _warn(format, ##__VA_ARGS__) +# define ritinfo(format, ...) _info(format, ##__VA_ARGS__) #else -# define ritdbg(x...) +# define riterr(x...) +# define ritwarn(x...) +# define ritinfo(x...) #endif /************************************************************************************** @@ -508,8 +512,8 @@ static void rit_sndbytes(FAR struct rit_dev_s *priv, FAR const uint8_t *buffer, FAR struct spi_dev_s *spi = priv->spi; uint8_t tmp; - ritdbg("buflen: %d cmd: %s [%02x %02x %02x]\n", - buflen, cmd ? "YES" : "NO", buffer[0], buffer[1], buffer[2]); + ritinfo("buflen: %d cmd: %s [%02x %02x %02x]\n", + buflen, cmd ? "YES" : "NO", buffer[0], buffer[1], buffer[2]); DEBUGASSERT(spi); /* Clear/set the D/Cn bit to enable command or data mode */ @@ -552,7 +556,8 @@ static void rit_sndcmds(FAR struct rit_dev_s *priv, FAR const uint8_t *table) while ((cmdlen = *table++) != 0) { - ritdbg("command: %02x cmdlen: %d\n", *table, cmdlen); + ritinfo("command: %02x cmdlen: %d\n", *table, cmdlen); + rit_sndcmd(priv, table, cmdlen); table += cmdlen; } @@ -578,7 +583,7 @@ static inline void rit_clear(FAR struct rit_dev_s *priv) FAR uint8_t *ptr = g_framebuffer; unsigned int row; - ritdbg("Clear display\n"); + ritinfo("Clear display\n"); /* Initialize the framebuffer */ @@ -605,7 +610,7 @@ static inline void rit_clear(FAR struct rit_dev_s *priv) { unsigned int row; - ritdbg("Clear display\n"); + ritinfo("Clear display\n"); /* Create a black row */ @@ -655,7 +660,7 @@ static int rit_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer, int aend; int i; - ritdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + ritinfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer); /* Toss out the special case of the empty run now */ @@ -678,7 +683,8 @@ static int rit_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer, start = col >> 1; aend = (col + npixels) >> 1; end = (col + npixels + 1) >> 1; - ritdbg("start: %d aend: %d end: %d\n", start, aend, end); + + ritinfo("start: %d aend: %d end: %d\n", start, aend, end); /* Copy the run into the framebuffer, handling nibble alignment. * @@ -814,7 +820,7 @@ static int rit_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer, FAR struct rit_dev_s *priv = (FAR struct rit_dev_s *)&g_oleddev; uint8_t cmd[3]; - ritdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + ritinfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer); if (npixels > 0) @@ -885,7 +891,7 @@ static int rit_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, int aend; int i; - ritdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + ritinfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer); /* Can't read from OLED GDDRAM in SPI mode, but we can read from the framebuffer */ @@ -990,7 +996,7 @@ static int rit_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); - gvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n", + ginfo("fmt: %d xres: %d yres: %d nplanes: %d\n", g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes); memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s)); return OK; @@ -1008,7 +1014,7 @@ static int rit_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, FAR struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(pinfo && planeno == 0); - gvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); + ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); return OK; } @@ -1027,7 +1033,7 @@ static int rit_getpower(FAR struct lcd_dev_s *dev) FAR struct rit_dev_s *priv = (FAR struct rit_dev_s *)dev; DEBUGASSERT(priv); - gvdbg("power: %s\n", priv->on ? "ON" : "OFF"); + ginfo("power: %s\n", priv->on ? "ON" : "OFF"); return priv->on ? CONFIG_LCD_MAXPOWER : 0; } @@ -1045,7 +1051,7 @@ static int rit_setpower(struct lcd_dev_s *dev, int power) struct rit_dev_s *priv = (struct rit_dev_s *)dev; DEBUGASSERT(priv && (unsigned)power <= CONFIG_LCD_MAXPOWER && priv->spi); - gvdbg("power: %d\n", power); + ginfo("power: %d\n", power); /* Select the SD1329 controller */ @@ -1090,7 +1096,7 @@ static int rit_getcontrast(struct lcd_dev_s *dev) { struct rit_dev_s *priv = (struct rit_dev_s *)dev; - gvdbg("contrast: %d\n", priv->contrast); + ginfo("contrast: %d\n", priv->contrast); return priv->contrast; } @@ -1107,7 +1113,7 @@ static int rit_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) struct rit_dev_s *priv = (struct rit_dev_s *)dev; uint8_t cmd[3]; - gvdbg("contrast: %d\n", contrast); + ginfo("contrast: %d\n", contrast); DEBUGASSERT(contrast <= CONFIG_LCD_MAXCONTRAST); /* Select the SD1329 controller */ @@ -1156,7 +1162,7 @@ FAR struct lcd_dev_s *rit_initialize(FAR struct spi_dev_s *spi, unsigned int dev FAR struct rit_dev_s *priv = (FAR struct rit_dev_s *)&g_oleddev; DEBUGASSERT(devno == 0 && spi); - gvdbg("Initializing devno: %d\n", devno); + ginfo("Initializing devno: %d\n", devno); /* Driver state data */ diff --git a/drivers/lcd/pcf8574_lcd_backpack.c b/drivers/lcd/pcf8574_lcd_backpack.c index a8e288c6cc372dab379bf8420432aab26b4503cc..ad107f1ff4506cdea45cccfa84f35d45f22fc7be 100644 --- a/drivers/lcd/pcf8574_lcd_backpack.c +++ b/drivers/lcd/pcf8574_lcd_backpack.c @@ -78,14 +78,6 @@ #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 */ /**************************************************************************** @@ -185,7 +177,7 @@ static void pca8574_write(FAR struct pcf8574_lcd_dev_s *priv, uint8_t data) ret = i2c_write(priv->i2c, &config, &data, 1); if (ret < 0) { - lcdvdbg("pca8574_write() failed: %d\n", ret); + lcdinfo("pca8574_write() failed: %d\n", ret); return; } @@ -222,7 +214,7 @@ static int pca8574_read(FAR struct pcf8574_lcd_dev_s *priv, uint8_t* data) ret = i2c_read(priv->i2c, &config, data, 1); if (ret < 0) { - lcdvdbg("pca8574_read() failed: %d\n", ret); + lcdinfo("pca8574_read() failed: %d\n", ret); } return ret; @@ -704,7 +696,7 @@ static void lcd_scroll_up(FAR struct pcf8574_lcd_dev_s *priv) data = (uint8_t *)malloc(priv->cfg.cols); if (NULL == data) { - lcdvdbg("Failed to allocate buffer in lcd_scroll_up()\n"); + lcdinfo("Failed to allocate buffer in lcd_scroll_up()\n"); return; } @@ -1428,7 +1420,7 @@ static int pcf8574_lcd_ioctl(FAR struct file *filep, int cmd, 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"); + lcdinfo("SLCDIOC_GETATTRIBUTES:\n"); if (!attr) { @@ -1578,13 +1570,13 @@ int pcf8574_lcd_backpack_register(FAR const char *devpath, if (cfg->rows < 1 || cfg->rows > 4) { - lcdvdbg("Display rows must be 1-4\n"); + lcdinfo("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"); + lcdinfo("Display cols must be 1-64, and may not be part of a 4x40 configuration\n"); return -EINVAL; } @@ -1593,7 +1585,7 @@ int pcf8574_lcd_backpack_register(FAR const char *devpath, priv = (FAR struct pcf8574_lcd_dev_s *)kmm_malloc(sizeof(struct pcf8574_lcd_dev_s)); if (!priv) { - lcdvdbg("Failed to allocate instance\n"); + lcdinfo("Failed to allocate instance\n"); return -ENOMEM; } @@ -1613,10 +1605,10 @@ int pcf8574_lcd_backpack_register(FAR const char *devpath, ret = register_driver(devpath, &g_pcf8574_lcd_fops, 0666, priv); if (ret < 0) { - lcdvdbg("Failed to register driver: %d\n", ret); + lcdinfo("Failed to register driver: %d\n", ret); kmm_free(priv); } - lcdvdbg("pcf8574_lcd_backpack driver loaded successfully!\n"); + lcdinfo("pcf8574_lcd_backpack driver loaded successfully!\n"); return ret; } diff --git a/drivers/lcd/ra8875.c b/drivers/lcd/ra8875.c index aa8758ab649baa083f5354e03e0b23d1d1185978..b9d7a30d4d258b24112647b12ea55c390c38f1a8 100644 --- a/drivers/lcd/ra8875.c +++ b/drivers/lcd/ra8875.c @@ -99,20 +99,6 @@ # define CONFIG_LCD_LANDSCAPE 1 #endif -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must - * also be enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif - /* Display/Color Properties ***********************************************************/ /* Display Resolution */ @@ -172,16 +158,6 @@ # define RA8875_2LAYER_POSSIBLE 1 #endif -/* Debug ******************************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /************************************************************************************** * Private Type Definition **************************************************************************************/ @@ -334,7 +310,7 @@ static void ra8875_putreg(FAR struct ra8875_lcd_s *lcd, uint8_t regaddr, { /* Set the index register to the register address and write the register contents */ - lcdvdbg("putreg 0x%02x = 0x%02x\n", regaddr, regval); + lcdinfo("putreg 0x%02x = 0x%02x\n", regaddr, regval); lcd->write_reg(lcd, regaddr, regval); } @@ -352,7 +328,7 @@ static void ra8875_putreg16(FAR struct ra8875_lcd_s *lcd, uint8_t regaddr, { /* Set the index register to the register address and write the register contents */ - lcdvdbg("putreg 0x%02x = 0x%04x\n", regaddr, regval); + lcdinfo("putreg 0x%02x = 0x%04x\n", regaddr, regval); lcd->write_reg16(lcd, regaddr, regval); } @@ -373,7 +349,7 @@ static uint8_t ra8875_readreg(FAR struct ra8875_lcd_s *lcd, uint8_t regaddr) regval = lcd->read_reg(lcd, regaddr); - lcdvdbg("readreg 0x%02x = 0x%02x\n", regaddr, regval); + lcdinfo("readreg 0x%02x = 0x%02x\n", regaddr, regval); return regval; } #endif @@ -533,13 +509,13 @@ static inline void ra8875_setforeground(FAR struct ra8875_lcd_s *lcd, uint16_t c static void ra8875_clearmem(FAR struct ra8875_lcd_s *lcd) { - lcdvdbg("clearmem start\n"); + lcdinfo("clearmem start\n"); ra8875_putreg(lcd, RA8875_MCLR, RA8875_MCLR_CLEAR | RA8875_MCLR_FULL); /* Wait for operation to finish */ ra8875_waitreg(lcd, RA8875_MCLR, RA8875_MCLR_CLEAR); - lcdvdbg("clearmem done\n"); + lcdinfo("clearmem done\n"); } /************************************************************************************** @@ -574,18 +550,18 @@ static void ra8875_showrun(FAR struct ra8875_dev_s *priv, fb_coord_t row, if (priv->firstrow != priv->lastrow) { - lcddbg("...\n"); - lcddbg("%s row: %d col: %d npixels: %d\n", - priv->put ? "PUT" : "GET", - priv->lastrow, priv->col, priv->npixels); + lcdinfo("...\n"); + lcdinfo("%s row: %d col: %d npixels: %d\n", + priv->put ? "PUT" : "GET", + priv->lastrow, priv->col, priv->npixels); } /* And we are starting a new sequence. Output the first run of the * new sequence */ - lcddbg("%s row: %d col: %d npixels: %d\n", - put ? "PUT" : "GET", row, col, npixels); + lcdinfo("%s row: %d col: %d npixels: %d\n", + put ? "PUT" : "GET", row, col, npixels); /* And save information about the run so that we can detect continuations * of the sequence. @@ -829,7 +805,7 @@ static int ra8875_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); - lcdvdbg("fmt: %d xres: %d yres: %d nplanes: 1\n", + lcdinfo("fmt: %d xres: %d yres: %d nplanes: 1\n", RA8875_COLORFMT, RA8875_XRES, RA8875_YRES); vinfo->fmt = RA8875_COLORFMT; /* Color format: RGB16-565: RRRR RGGG GGGB BBBB */ @@ -853,7 +829,7 @@ static int ra8875_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, FAR struct ra8875_dev_s *priv = (FAR struct ra8875_dev_s *)dev; DEBUGASSERT(dev && pinfo && planeno == 0); - lcdvdbg("planeno: %d bpp: %d\n", planeno, RA8875_BPP); + lcdinfo("planeno: %d bpp: %d\n", planeno, RA8875_BPP); pinfo->putrun = ra8875_putrun; /* Put a run into LCD memory */ pinfo->getrun = ra8875_getrun; /* Get a run from LCD memory */ @@ -873,7 +849,7 @@ static int ra8875_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, static int ra8875_getpower(FAR struct lcd_dev_s *dev) { - lcdvdbg("power: %d\n", 0); + lcdinfo("power: %d\n", 0); return g_lcddev.power; } @@ -917,7 +893,7 @@ static int ra8875_setpower(FAR struct lcd_dev_s *dev, int power) FAR struct ra8875_dev_s *priv = (FAR struct ra8875_dev_s *)dev; FAR struct ra8875_lcd_s *lcd = priv->lcd; - lcdvdbg("power: %d\n", power); + lcdinfo("power: %d\n", power); DEBUGASSERT((unsigned)power <= CONFIG_LCD_MAXPOWER); /* Set new power level */ @@ -960,7 +936,7 @@ static int ra8875_setpower(FAR struct lcd_dev_s *dev, int power) static int ra8875_getcontrast(FAR struct lcd_dev_s *dev) { - lcdvdbg("Not implemented\n"); + lcdinfo("Not implemented\n"); return -ENOSYS; } @@ -974,7 +950,7 @@ static int ra8875_getcontrast(FAR struct lcd_dev_s *dev) static int ra8875_setcontrast(FAR struct lcd_dev_s *dev, unsigned int contrast) { - lcdvdbg("contrast: %d\n", contrast); + lcdinfo("contrast: %d\n", contrast); return -ENOSYS; } @@ -993,7 +969,7 @@ static inline int ra8875_hwinitialize(FAR struct ra8875_dev_s *priv) /* REVISIT: Maybe some of these values needs to be configurable?? */ - lcdvdbg("hwinitialize\n"); + lcdinfo("hwinitialize\n"); /* Reset */ @@ -1076,7 +1052,7 @@ static inline int ra8875_hwinitialize(FAR struct ra8875_dev_s *priv) priv->shadow_w_curh = 0; priv->shadow_w_curv = 0; - lcdvdbg("hwinitialize done\n"); + lcdinfo("hwinitialize done\n"); return OK; } @@ -1098,7 +1074,7 @@ FAR struct lcd_dev_s *ra8875_lcdinitialize(FAR struct ra8875_lcd_s *lcd) { int ret; - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); /* If we could support multiple RA8875 devices, this is where we would allocate * a new driver data structure... but we can't. Why not? Because of a bad should @@ -1130,7 +1106,7 @@ FAR struct lcd_dev_s *ra8875_lcdinitialize(FAR struct ra8875_lcd_s *lcd) ra8875_poweroff(lcd); - lcdvdbg("Initialized\n"); + lcdinfo("Initialized\n"); return &g_lcddev.dev; } diff --git a/drivers/lcd/skeleton.c b/drivers/lcd/skeleton.c index 454fdcc41a20f2a1e1bbfe68965f12866e4d7006..96be4b2e2c2f9ac4365a0b8ab7475b2e78e4c052 100644 --- a/drivers/lcd/skeleton.c +++ b/drivers/lcd/skeleton.c @@ -66,12 +66,12 @@ /* Verbose debug must also be enabled */ -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE +#ifndef CONFIG_DEBUG_FEATURES +# undef CONFIG_DEBUG_INFO # undef CONFIG_DEBUG_GRAPHICS #endif -#ifndef CONFIG_DEBUG_VERBOSE +#ifndef CONFIG_DEBUG_INFO # undef CONFIG_LCD_SKELDEBUG #endif @@ -90,9 +90,13 @@ /* Debug ******************************************************************************/ #ifdef CONFIG_LCD_SKELDEBUG -# define skeldbg(format, ...) vdbg(format, ##__VA_ARGS__) +# define skelerr(format, ...) _err(format, ##__VA_ARGS__) +# define skelwarn(format, ...) _warn(format, ##__VA_ARGS__) +# define skelinfo(format, ...) _info(format, ##__VA_ARGS__) #else -# define skeldbg(x...) +# define skelerr(x...) +# define skelwarn(x...) +# define skelinfo(x...) #endif /************************************************************************************** @@ -230,7 +234,7 @@ static int skel_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer { /* Buffer must be provided and aligned to a 16-bit address boundary */ - gvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + ginfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0); /* Set up to write the run. */ @@ -259,7 +263,7 @@ static int skel_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, { /* Buffer must be provided and aligned to a 16-bit address boundary */ - gvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + ginfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0); #warning "Missing logic" @@ -278,7 +282,7 @@ static int skel_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); - gvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n", + ginfo("fmt: %d xres: %d yres: %d nplanes: %d\n", g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes); memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s)); return OK; @@ -296,7 +300,7 @@ static int skel_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, FAR struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(dev && pinfo && planeno == 0); - gvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); + ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); return OK; } @@ -313,7 +317,7 @@ static int skel_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, static int skel_getpower(struct lcd_dev_s *dev) { struct skel_dev_s *priv = (struct skel_dev_s *)dev; - gvdbg("power: %d\n", 0); + ginfo("power: %d\n", 0); #warning "Missing logic" return 0; } @@ -331,7 +335,7 @@ static int skel_setpower(struct lcd_dev_s *dev, int power) { struct skel_dev_s *priv = (struct skel_dev_s *)dev; - gvdbg("power: %d\n", power); + ginfo("power: %d\n", power); DEBUGASSERT(power <= CONFIG_LCD_MAXPOWER); /* Set new power level */ @@ -350,7 +354,7 @@ static int skel_setpower(struct lcd_dev_s *dev, int power) static int skel_getcontrast(struct lcd_dev_s *dev) { - gvdbg("Not implemented\n"); + ginfo("Not implemented\n"); #warning "Missing logic" return -ENOSYS; } @@ -365,7 +369,7 @@ static int skel_getcontrast(struct lcd_dev_s *dev) static int skel_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) { - gvdbg("contrast: %d\n", contrast); + ginfo("contrast: %d\n", contrast); #warning "Missing logic" return -ENOSYS; } @@ -386,7 +390,7 @@ static int skel_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) FAR struct lcd_dev_s *up_oledinitialize(FAR struct spi_dev_s *spi) { - gvdbg("Initializing\n"); + ginfo("Initializing\n"); /* Configure GPIO pins */ #warning "Missing logic" diff --git a/drivers/lcd/ssd1289.c b/drivers/lcd/ssd1289.c index f5cef7996c1aafe0485af965eecb94cc469e440d..78c2362d1452b7cc6f30582cc1734424202e6698 100644 --- a/drivers/lcd/ssd1289.c +++ b/drivers/lcd/ssd1289.c @@ -100,20 +100,6 @@ # define CONFIG_LCD_LANDSCAPE 1 #endif -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose debug must - * also be enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_GRAPHICS -# undef CONFIG_DEBUG_LCD -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif - /* Display/Color Properties ***********************************************************/ /* Display Resolution */ @@ -226,16 +212,6 @@ #endif -/* Debug ******************************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /************************************************************************************** * Private Type Definition **************************************************************************************/ @@ -543,18 +519,18 @@ static void ssd1289_showrun(FAR struct ssd1289_dev_s *priv, fb_coord_t row, if (priv->firstrow != priv->lastrow) { - lcddbg("...\n"); - lcddbg("%s row: %d col: %d npixels: %d\n", - priv->put ? "PUT" : "GET", - priv->lastrow, priv->col, priv->npixels); + lcdinfo("...\n"); + lcdinfo("%s row: %d col: %d npixels: %d\n", + priv->put ? "PUT" : "GET", + priv->lastrow, priv->col, priv->npixels); } /* And we are starting a new sequence. Output the first run of the * new sequence */ - lcddbg("%s row: %d col: %d npixels: %d\n", - put ? "PUT" : "GET", row, col, npixels); + lcdinfo("%s row: %d col: %d npixels: %d\n", + put ? "PUT" : "GET", row, col, npixels); /* And save information about the run so that we can detect continuations * of the sequence. @@ -846,7 +822,7 @@ static int ssd1289_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); - lcdvdbg("fmt: %d xres: %d yres: %d nplanes: 1\n", + lcdinfo("fmt: %d xres: %d yres: %d nplanes: 1\n", SSD1289_COLORFMT, SSD1289_XRES, SSD1289_YRES); vinfo->fmt = SSD1289_COLORFMT; /* Color format: RGB16-565: RRRR RGGG GGGB BBBB */ @@ -870,7 +846,7 @@ static int ssd1289_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, FAR struct ssd1289_dev_s *priv = (FAR struct ssd1289_dev_s *)dev; DEBUGASSERT(dev && pinfo && planeno == 0); - lcdvdbg("planeno: %d bpp: %d\n", planeno, SSD1289_BPP); + lcdinfo("planeno: %d bpp: %d\n", planeno, SSD1289_BPP); pinfo->putrun = ssd1289_putrun; /* Put a run into LCD memory */ pinfo->getrun = ssd1289_getrun; /* Get a run from LCD memory */ @@ -890,7 +866,7 @@ static int ssd1289_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, static int ssd1289_getpower(FAR struct lcd_dev_s *dev) { - lcdvdbg("power: %d\n", 0); + lcdinfo("power: %d\n", 0); return g_lcddev.power; } @@ -933,7 +909,7 @@ static int ssd1289_setpower(FAR struct lcd_dev_s *dev, int power) FAR struct ssd1289_dev_s *priv = (FAR struct ssd1289_dev_s *)dev; FAR struct ssd1289_lcd_s *lcd = priv->lcd; - lcdvdbg("power: %d\n", power); + lcdinfo("power: %d\n", power); DEBUGASSERT((unsigned)power <= CONFIG_LCD_MAXPOWER); /* Set new power level */ @@ -974,7 +950,7 @@ static int ssd1289_setpower(FAR struct lcd_dev_s *dev, int power) static int ssd1289_getcontrast(FAR struct lcd_dev_s *dev) { - lcdvdbg("Not implemented\n"); + lcdinfo("Not implemented\n"); return -ENOSYS; } @@ -988,7 +964,7 @@ static int ssd1289_getcontrast(FAR struct lcd_dev_s *dev) static int ssd1289_setcontrast(FAR struct lcd_dev_s *dev, unsigned int contrast) { - lcdvdbg("contrast: %d\n", contrast); + lcdinfo("contrast: %d\n", contrast); return -ENOSYS; } @@ -1020,7 +996,7 @@ static inline int ssd1289_hwinitialize(FAR struct ssd1289_dev_s *priv) id = ssd1289_readreg(lcd, SSD1289_DEVCODE); if (id != 0) { - lcddbg("LCD ID: %04x\n", id); + lcdinfo("LCD ID: %04x\n", id); } /* If we could not get the ID, then let's just assume that this is an SSD1289. @@ -1030,7 +1006,7 @@ static inline int ssd1289_hwinitialize(FAR struct ssd1289_dev_s *priv) else { - lcddbg("No LCD ID, assuming SSD1289\n"); + lcdwarn("WARNING: No LCD ID, assuming SSD1289\n"); id = SSD1289_DEVCODE_VALUE; } @@ -1273,7 +1249,7 @@ static inline int ssd1289_hwinitialize(FAR struct ssd1289_dev_s *priv) #ifndef CONFIG_LCD_NOGETRUN else { - lcddbg("Unsupported LCD type\n"); + lcderr("ERROR: Unsupported LCD type\n"); ret = -ENODEV; } #endif @@ -1302,7 +1278,7 @@ FAR struct lcd_dev_s *ssd1289_lcdinitialize(FAR struct ssd1289_lcd_s *lcd) { int ret; - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); /* If we ccould support multiple SSD1289 devices, this is where we would allocate * a new driver data structure... but we can't. Why not? Because of a bad should diff --git a/drivers/lcd/ssd1306.h b/drivers/lcd/ssd1306.h index 6c008e7a9b530dcc69d28d4e85ff6d7222794d58..696371ebfbce710109733594ed1ff6493f94868e 100644 --- a/drivers/lcd/ssd1306.h +++ b/drivers/lcd/ssd1306.h @@ -209,16 +209,6 @@ #define LS_BIT (1 << 0) #define MS_BIT (1 << 7) -/* Debug ******************************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__) -# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /************************************************************************************** * Public Type Definition **************************************************************************************/ diff --git a/drivers/lcd/ssd1306_base.c b/drivers/lcd/ssd1306_base.c index db94d9ea834500a406181f92314809574a8b45ce..96a50c369d19a4acb7e5784fbc9c5974aa8d58e7 100644 --- a/drivers/lcd/ssd1306_base.c +++ b/drivers/lcd/ssd1306_base.c @@ -272,7 +272,7 @@ static int ssd1306_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buf int pixlen; uint8_t i; - lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer); /* Clip the run to the display */ @@ -480,7 +480,7 @@ static int ssd1306_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, int pixlen; uint8_t i; - lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer); /* Clip the run to the display */ @@ -625,7 +625,7 @@ static int ssd1306_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); - lcdvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n", + lcdinfo("fmt: %d xres: %d yres: %d nplanes: %d\n", g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes); memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s)); return OK; @@ -643,7 +643,7 @@ static int ssd1306_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, FAR struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(pinfo && planeno == 0); - lcdvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); + lcdinfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); return OK; } @@ -662,7 +662,7 @@ static int ssd1306_getpower(FAR struct lcd_dev_s *dev) FAR struct ssd1306_dev_s *priv = (FAR struct ssd1306_dev_s *)dev; DEBUGASSERT(priv); - lcdvdbg("power: %s\n", priv->on ? "ON" : "OFF"); + lcdinfo("power: %s\n", priv->on ? "ON" : "OFF"); return priv->on ? CONFIG_LCD_MAXPOWER : 0; } @@ -680,7 +680,7 @@ static int ssd1306_setpower(FAR struct lcd_dev_s *dev, int power) struct ssd1306_dev_s *priv = (struct ssd1306_dev_s *)dev; DEBUGASSERT(priv && (unsigned)power <= CONFIG_LCD_MAXPOWER); - lcdvdbg("power: %d [%d]\n", power, priv->on ? CONFIG_LCD_MAXPOWER : 0); + lcdinfo("power: %d [%d]\n", power, priv->on ? CONFIG_LCD_MAXPOWER : 0); /* Lock and select device */ @@ -720,7 +720,7 @@ static int ssd1306_getcontrast(struct lcd_dev_s *dev) struct ssd1306_dev_s *priv = (struct ssd1306_dev_s *)dev; DEBUGASSERT(priv); - lcdvdbg("contrast: %d\n", priv->contrast); + lcdinfo("contrast: %d\n", priv->contrast); return priv->contrast; } @@ -737,12 +737,12 @@ static int ssd1306_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) struct ssd1306_dev_s *priv = (struct ssd1306_dev_s *)dev; unsigned int scaled; - lcdvdbg("contrast: %d\n", contrast); + lcdinfo("contrast: %d\n", contrast); DEBUGASSERT(priv); /* Verify the contrast value */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (contrast > CONFIG_LCD_MAXCONTRAST) { return -EINVAL; @@ -812,7 +812,7 @@ FAR struct lcd_dev_s *ssd1306_initialize(FAR struct i2c_master_s *dev, unsigned { FAR struct ssd1306_dev_s *priv = &g_oleddev; - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); DEBUGASSERT(spi && devno == 0); #ifdef CONFIG_LCD_SSD1306_SPI diff --git a/drivers/lcd/ssd1306_i2c.c b/drivers/lcd/ssd1306_i2c.c index 1a5edaa6d1f2ef95ae46620116d5da95383c29b7..d6de937e35c1e8255f542dff98a2606eadf4fd9b 100644 --- a/drivers/lcd/ssd1306_i2c.c +++ b/drivers/lcd/ssd1306_i2c.c @@ -71,7 +71,7 @@ void ssd1306_sendbyte(FAR struct ssd1306_dev_s *priv, uint8_t regval) int ret; #ifdef CONFIG_LCD_SSD1306_REGDEBUG - lldbg("-> 0x%02x\n", regval); + _err("-> 0x%02x\n", regval); #endif /* Setup to the data to be transferred. Two bytes: The SSD1306 register @@ -94,7 +94,7 @@ void ssd1306_sendbyte(FAR struct ssd1306_dev_s *priv, uint8_t regval) ret = I2C_TRANSFER(priv->i2c, &msg, 1); if (ret < 0) { - sndbg("I2C_TRANSFER failed: %d\n", ret); + snerr("ERROR: I2C_TRANSFER failed: %d\n", ret); } } @@ -130,7 +130,7 @@ void ssd1306_sendblk(FAR struct ssd1306_dev_s *priv, uint8_t *data, uint8_t len) ret = I2C_TRANSFER(priv->i2c, &msg, 1); if (ret < 0) { - sndbg("I2C_TRANSFER failed: %d\n", ret); + snerr("ERROR: I2C_TRANSFER failed: %d\n", ret); } } diff --git a/drivers/lcd/ssd1306_spi.c b/drivers/lcd/ssd1306_spi.c index b17466c40ea1cdb4a54f1c05b232f22b5fabba4e..9f3817a7b6456076613e060716ed34409d35ddd5 100644 --- a/drivers/lcd/ssd1306_spi.c +++ b/drivers/lcd/ssd1306_spi.c @@ -63,7 +63,7 @@ static inline void ssd1306_configspi(FAR struct spi_dev_s *spi) { - lcdvdbg("Mode: %d Bits: 8 Frequency: %d\n", + lcdinfo("Mode: %d Bits: 8 Frequency: %d\n", CONFIG_SSD1306_SPIMODE, CONFIG_SSD1306_FREQUENCY); /* Configure SPI for the SSD1306 */ @@ -89,7 +89,7 @@ static inline void ssd1306_configspi(FAR struct spi_dev_s *spi) void ssd1306_sendbyte(FAR struct ssd1306_dev_s *priv, uint8_t regval) { #ifdef CONFIG_LCD_SSD1306_REGDEBUG - lldbg("->0x%02x\n", regval); + _err("->0x%02x\n", regval); #endif /* Send byte value to display */ diff --git a/drivers/lcd/ssd1351.c b/drivers/lcd/ssd1351.c index c56cc2b682347c0dde91ca7f70ca95da24c4825f..f88c85ff85c782b4be9d54d7350319debf23eb80 100644 --- a/drivers/lcd/ssd1351.c +++ b/drivers/lcd/ssd1351.c @@ -499,7 +499,8 @@ static void ssd1351_select(FAR struct ssd1351_dev_s *priv) * competing for the SPI bus */ - gdbg("SELECTED\n"); + ginfo("SELECTED\n"); + SPI_LOCK(spi, true); SPI_SELECT(spi, SPIDEV_DISPLAY, true); @@ -529,7 +530,8 @@ static void ssd1351_deselect(FAR struct ssd1351_dev_s *priv) /* De-select the chip and relinquish the SPI bus */ - gdbg("DE-SELECTED\n"); + ginfo("DE-SELECTED\n"); + SPI_SELECT(spi, SPIDEV_DISPLAY, false); SPI_LOCK(spi, false); } @@ -821,7 +823,7 @@ static int ssd1351_getvideoinfo(FAR struct lcd_dev_s *dev, vinfo->yres = SSD1351_YRES; vinfo->nplanes = 1; - gvdbg("fmt: %u xres: %u yres: %u nplanes: %u\n", + ginfo("fmt: %u xres: %u yres: %u nplanes: %u\n", vinfo->fmt, vinfo->xres, vinfo->yres, vinfo->nplanes); return OK; } @@ -847,7 +849,7 @@ static int ssd1351_getplaneinfo(FAR struct lcd_dev_s *dev, pinfo->buffer = (uint8_t *)priv->runbuffer; pinfo->bpp = SSD1351_BPP; - gvdbg("planeno: %u bpp: %u\n", planeno, pinfo->bpp); + ginfo("planeno: %u bpp: %u\n", planeno, pinfo->bpp); return OK; } @@ -868,7 +870,7 @@ static int ssd1351_getpower(FAR struct lcd_dev_s *dev) /* Sanity check */ DEBUGASSERT(priv != NULL); - gvdbg("power: %d\n", priv->power); + ginfo("power: %d\n", priv->power); return priv->power; } @@ -890,7 +892,7 @@ static int ssd1351_setpower(FAR struct lcd_dev_s *dev, int power) /* Sanity check */ DEBUGASSERT(priv != NULL && (unsigned int)power <= LCD_FULL_ON); - gvdbg("power: %d\n", power); + ginfo("power: %d\n", power); /* Select and lock the device */ diff --git a/drivers/lcd/st7565.c b/drivers/lcd/st7565.c index 6b4a1c02883641e3f8f1a2638bea4f50b1439d48..0e52b58a3ec519a27db8ef853ccc1b92486615ff 100644 --- a/drivers/lcd/st7565.c +++ b/drivers/lcd/st7565.c @@ -79,7 +79,7 @@ * ST7565 devices that will be supported. NOTE: At present, this * must be undefined or defined to be 1. * CONFIG_LCD_ST7565DEBUG - Enable detailed ST7565 debst7565 output - * (CONFIG_DEBUG and CONFIG_VERBOSE must also be enabled). + * (CONFIG_DEBUG_FEATURES and CONFIG_VERBOSE must also be enabled). * * Required LCD driver settings: * CONFIG_LCD_ST7565 - Enable ST7565 support @@ -105,12 +105,12 @@ /* Verbose debst7565 must also be enabled to use the extra OLED debst7565 */ -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE +#ifndef CONFIG_DEBUG_FEATURES +# undef CONFIG_DEBUG_INFO # undef CONFIG_DEBUG_GRAPHICS #endif -#ifndef CONFIG_DEBUG_VERBOSE +#ifndef CONFIG_DEBUG_INFO # undef CONFIG_LCD_ST7565DEBUG #endif @@ -176,14 +176,6 @@ #define LS_BIT (1 << 0) #define MS_BIT (1 << 7) -/* Debug ******************************************************************************/ - -#ifdef CONFIG_LCD_ST7565DEBUG -# define st7565dbg(format, ...) vdbg(format, ##__VA_ARGS__) -#else -# define st7565dbg(x...) -#endif - /************************************************************************************** * Private Type Definition **************************************************************************************/ @@ -475,7 +467,7 @@ static int st7565_putrun(fb_coord_t row, fb_coord_t col, uint8_t i; int pixlen; - gvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + ginfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer); /* Clip the run to the display */ @@ -627,7 +619,7 @@ static int st7565_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t * buffer, uint8_t i; int pixlen; - gvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + ginfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer); /* Clip the run to the display */ @@ -736,7 +728,7 @@ static int st7565_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); - gvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n", + ginfo("fmt: %d xres: %d yres: %d nplanes: %d\n", g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes); memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s)); @@ -755,7 +747,7 @@ static int st7565_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, FAR struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(dev && pinfo && planeno == 0); - gvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); + ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); return OK; } @@ -773,7 +765,7 @@ static int st7565_getpower(struct lcd_dev_s *dev) { struct st7565_dev_s *priv = (struct st7565_dev_s *)dev; DEBUGASSERT(priv); - gvdbg("powered: %s\n", priv->power_level); + ginfo("powered: %s\n", priv->power_level); return priv->power_level; } @@ -791,7 +783,7 @@ static int st7565_setpower(struct lcd_dev_s *dev, int power) struct st7565_dev_s *priv = (struct st7565_dev_s *)dev; DEBUGASSERT(priv && (unsigned)power <= CONFIG_LCD_MAXPOWER); - gvdbg("power: %s powered: %s\n", power, priv->power_level); + ginfo("power: %s powered: %s\n", power, priv->power_level); /* Select and lock the device */ @@ -859,7 +851,7 @@ static int st7565_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) { struct st7565_dev_s *priv = (struct st7565_dev_s *)dev; - gvdbg("contrast: %d\n", contrast); + ginfo("contrast: %d\n", contrast); DEBUGASSERT(priv); if (contrast > 255) @@ -974,7 +966,7 @@ FAR struct lcd_dev_s *st7565_initialize(FAR struct st7565_lcd_s *lcd, FAR struct st7565_dev_s *priv = &g_st7565dev; - gvdbg("Initializing\n"); + ginfo("Initializing\n"); DEBUGASSERT(lcd && devno == 0); /* Save the reference to the SPI device */ @@ -1017,7 +1009,7 @@ FAR struct lcd_dev_s *st7565_initialize(FAR struct st7565_lcd_s *lcd, /* Follow NHD-C12864KGZ DISPLAY INITIALIZATION... */ -#ifdef CONFIG_NHD_C12864KGZ +#if defined(CONFIG_NHD_C12864KGZ) (void)st7565_send_one_data(priv, ST7565_BIAS_1_9); @@ -1027,7 +1019,7 @@ FAR struct lcd_dev_s *st7565_initialize(FAR struct st7565_lcd_s *lcd, (void)st7565_send_one_data(priv, ST7565_POWERCTRL_INT); (void)st7565_send_one_data(priv, ST7565_SETSTARTLINE); -#elif CONFIG_ERC_12864_3 +#elif defined(CONFIG_ERC_12864_3) (void)st7565_send_one_data(priv, ST7565_ADCNORMAL); (void)st7565_send_one_data(priv, ST7565_SETCOMREVERSE); diff --git a/drivers/lcd/st7567.c b/drivers/lcd/st7567.c index 77ba1bbc1ddad5fd1970d8c2ff44593b9e296213..a1f8b136612fe3e3677c6aec1a4207f87aee141a 100644 --- a/drivers/lcd/st7567.c +++ b/drivers/lcd/st7567.c @@ -80,7 +80,7 @@ * If the hardware supports a controllable OLED a power supply, this * configuration shold be defined. (See st7567_power() below). * CONFIG_LCD_ST7567DEBUG - Enable detailed ST7567 debst7567 output - * (CONFIG_DEBUG and CONFIG_VERBOSE must also be enabled). + * (CONFIG_DEBUG_FEATURES and CONFIG_VERBOSE must also be enabled). * * Required LCD driver settings: * CONFIG_LCD_ST7567 - Enable ST7567 support @@ -123,12 +123,12 @@ /* Verbose debst7567 must also be enabled to use the extra OLED debst7567 */ -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE +#ifndef CONFIG_DEBUG_FEATURES +# undef CONFIG_DEBUG_INFO # undef CONFIG_DEBUG_GRAPHICS #endif -#ifndef CONFIG_DEBUG_VERBOSE +#ifndef CONFIG_DEBUG_INFO # undef CONFIG_LCD_ST7567DEBUG #endif @@ -206,14 +206,6 @@ #define LS_BIT (1 << 0) #define MS_BIT (1 << 7) -/* Debug ******************************************************************************/ - -#ifdef CONFIG_LCD_ST7567DEBUG -# define st7567dbg(format, ...) vdbg(format, ##__VA_ARGS__) -#else -# define st7567dbg(x...) -#endif - /************************************************************************************** * Private Type Definition **************************************************************************************/ @@ -439,7 +431,7 @@ static int st7567_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buff uint8_t i; int pixlen; - gvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + ginfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer); /* Clip the run to the display */ @@ -587,7 +579,7 @@ static int st7567_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, uint8_t i; int pixlen; - gvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + ginfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer); /* Clip the run to the display */ @@ -698,7 +690,7 @@ static int st7567_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); - gvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n", + ginfo("fmt: %d xres: %d yres: %d nplanes: %d\n", g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes); memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s)); return OK; @@ -716,7 +708,7 @@ static int st7567_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, FAR struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(dev && pinfo && planeno == 0); - gvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); + ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); return OK; } @@ -734,7 +726,7 @@ static int st7567_getpower(struct lcd_dev_s *dev) { struct st7567_dev_s *priv = (struct st7567_dev_s *)dev; DEBUGASSERT(priv); - gvdbg("powered: %s\n", st7567_powerstring(priv->powered)); + ginfo("powered: %s\n", st7567_powerstring(priv->powered)); return priv->powered; } @@ -752,7 +744,7 @@ static int st7567_setpower(struct lcd_dev_s *dev, int power) struct st7567_dev_s *priv = (struct st7567_dev_s *)dev; DEBUGASSERT(priv && (unsigned)power <= CONFIG_LCD_MAXPOWER); - gvdbg("power: %s powered: %s\n", + ginfo("power: %s powered: %s\n", st7567_powerstring(power), st7567_powerstring(priv->powered)); /* Select and lock the device */ @@ -806,7 +798,7 @@ static int st7567_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) { struct st7567_dev_s *priv = (struct st7567_dev_s *)dev; - gvdbg("contrast: %d\n", contrast); + ginfo("contrast: %d\n", contrast); DEBUGASSERT(priv); if (contrast > 255) @@ -915,7 +907,7 @@ FAR struct lcd_dev_s *st7567_initialize(FAR struct spi_dev_s *spi, unsigned int FAR struct st7567_dev_s *priv = &g_st7567dev; - gvdbg("Initializing\n"); + ginfo("Initializing\n"); DEBUGASSERT(spi && devno == 0); /* Save the reference to the SPI device */ diff --git a/drivers/lcd/ug-2864ambag01.c b/drivers/lcd/ug-2864ambag01.c index ab53fbc0247fb9bb12e0cb5522346728d81a0d30..ea6175a8560793066cbe00eb5b7af30fa5510715 100644 --- a/drivers/lcd/ug-2864ambag01.c +++ b/drivers/lcd/ug-2864ambag01.c @@ -260,16 +260,6 @@ #define LS_BIT (1 << 0) #define MS_BIT (1 << 7) -/* Debug ******************************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__) -# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /************************************************************************************** * Private Type Definition **************************************************************************************/ @@ -487,7 +477,7 @@ static int ug2864ambag01_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_ int pixlen; uint8_t i; - lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer); /* Clip the run to the display */ @@ -697,7 +687,7 @@ static int ug2864ambag01_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buf int pixlen; uint8_t i; - lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer); /* Clip the run to the display */ @@ -842,7 +832,7 @@ static int ug2864ambag01_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); - lcdvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n", + lcdinfo("fmt: %d xres: %d yres: %d nplanes: %d\n", g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes); memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s)); return OK; @@ -860,7 +850,7 @@ static int ug2864ambag01_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int pl FAR struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(pinfo && planeno == 0); - lcdvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); + lcdinfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); return OK; } @@ -879,7 +869,7 @@ static int ug2864ambag01_getpower(FAR struct lcd_dev_s *dev) FAR struct ug2864ambag01_dev_s *priv = (FAR struct ug2864ambag01_dev_s *)dev; DEBUGASSERT(priv); - lcdvdbg("power: %s\n", priv->on ? "ON" : "OFF"); + lcdinfo("power: %s\n", priv->on ? "ON" : "OFF"); return priv->on ? CONFIG_LCD_MAXPOWER : 0; } @@ -897,7 +887,7 @@ static int ug2864ambag01_setpower(struct lcd_dev_s *dev, int power) struct ug2864ambag01_dev_s *priv = (struct ug2864ambag01_dev_s *)dev; DEBUGASSERT(priv && (unsigned)power <= CONFIG_LCD_MAXPOWER && priv->spi); - lcdvdbg("power: %d [%d]\n", power, priv->on ? CONFIG_LCD_MAXPOWER : 0); + lcdinfo("power: %d [%d]\n", power, priv->on ? CONFIG_LCD_MAXPOWER : 0); /* Lock and select device */ @@ -939,7 +929,7 @@ static int ug2864ambag01_getcontrast(struct lcd_dev_s *dev) struct ug2864ambag01_dev_s *priv = (struct ug2864ambag01_dev_s *)dev; DEBUGASSERT(priv); - lcdvdbg("contrast: %d\n", priv->contrast); + lcdinfo("contrast: %d\n", priv->contrast); return priv->contrast; } @@ -956,12 +946,12 @@ static int ug2864ambag01_setcontrast(struct lcd_dev_s *dev, unsigned int contras struct ug2864ambag01_dev_s *priv = (struct ug2864ambag01_dev_s *)dev; unsigned int scaled; - lcdvdbg("contrast: %d\n", contrast); + lcdinfo("contrast: %d\n", contrast); DEBUGASSERT(priv); /* Verify the contrast value */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (contrast > CONFIG_LCD_MAXCONTRAST) { return -EINVAL; @@ -1029,7 +1019,7 @@ FAR struct lcd_dev_s *ug2864ambag01_initialize(FAR struct spi_dev_s *spi, unsign { FAR struct ug2864ambag01_dev_s *priv = &g_oleddev; - lcdvdbg("Initializing\n"); + lcdinfo("Initializing\n"); DEBUGASSERT(spi && devno == 0); /* Save the reference to the SPI device */ diff --git a/drivers/lcd/ug-9664hswag01.c b/drivers/lcd/ug-9664hswag01.c index e9053a7218e6e7827999811e37f1813d71e0d405..1dadf526208551fd895192f4972fafbd6c85ad78 100644 --- a/drivers/lcd/ug-9664hswag01.c +++ b/drivers/lcd/ug-9664hswag01.c @@ -123,16 +123,6 @@ # undef CONFIG_LCD_RPORTRAIT #endif -/* Verbose debug must also be enabled to use the extra OLED debug */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif - /* Check contrast selection */ #ifndef CONFIG_LCD_MAXCONTRAST @@ -221,14 +211,6 @@ #define LS_BIT (1 << 0) #define MS_BIT (1 << 7) -/* Debug ******************************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg(format, ...) vdbg(format, ##__VA_ARGS__) -#else -# define lcddbg(x...) -#endif - /************************************************************************************** * Private Type Definition **************************************************************************************/ @@ -484,7 +466,7 @@ static int ug_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer, uint8_t i; int pixlen; - gvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + ginfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer); /* Clip the run to the display */ @@ -681,7 +663,7 @@ static int ug_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, uint8_t i; int pixlen; - gvdbg("row: %d col: %d npixels: %d\n", row, col, npixels); + ginfo("row: %d col: %d npixels: %d\n", row, col, npixels); DEBUGASSERT(buffer); /* Clip the run to the display */ @@ -824,7 +806,7 @@ static int ug_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { DEBUGASSERT(dev && vinfo); - gvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n", + ginfo("fmt: %d xres: %d yres: %d nplanes: %d\n", g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes); memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s)); return OK; @@ -842,7 +824,7 @@ static int ug_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, FAR struct lcd_planeinfo_s *pinfo) { DEBUGASSERT(dev && pinfo && planeno == 0); - gvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); + ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); return OK; } @@ -860,7 +842,7 @@ static int ug_getpower(struct lcd_dev_s *dev) { struct ug_dev_s *priv = (struct ug_dev_s *)dev; DEBUGASSERT(priv); - gvdbg("powered: %s\n", ug_powerstring(priv->powered)); + ginfo("powered: %s\n", ug_powerstring(priv->powered)); return priv->powered; } @@ -878,7 +860,7 @@ static int ug_setpower(struct lcd_dev_s *dev, int power) struct ug_dev_s *priv = (struct ug_dev_s *)dev; DEBUGASSERT(priv && (unsigned)power <= CONFIG_LCD_MAXPOWER); - gvdbg("power: %s powered: %s\n", + ginfo("power: %s powered: %s\n", ug_powerstring(power), ug_powerstring(priv->powered)); /* Select and lock the device */ @@ -947,7 +929,7 @@ static int ug_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) { struct ug_dev_s *priv = (struct ug_dev_s *)dev; - gvdbg("contrast: %d\n", contrast); + ginfo("contrast: %d\n", contrast); DEBUGASSERT(priv); if (contrast > 255) @@ -1056,7 +1038,7 @@ FAR struct lcd_dev_s *ug_initialize(FAR struct spi_dev_s *spi, unsigned int devn FAR struct ug_dev_s *priv = &g_ugdev; - gvdbg("Initializing\n"); + ginfo("Initializing\n"); DEBUGASSERT(spi && devno == 0); /* Save the reference to the SPI device */ diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig index 5a673606fc7d6d236cd2f8135be362a97f28015f..edcbb975282fd3e8233b3f312dec67e2b9a9d4ca 100644 --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig @@ -56,4 +56,12 @@ config PCA9635PW Enable support for the NXP PCA9635PW LED driver which can be utilized to drive up to 16 LED's. +config NCP5623C + bool "NCP5623C I2C LED Driver" + default n + select I2C + ---help--- + Enable support for the onsemi NCP5623C LED driver which can be + utilized to drive up to 3 LED's. + endmenu # LED Support diff --git a/drivers/leds/Make.defs b/drivers/leds/Make.defs index 794ba4202c30671953d46377f3f6cb1e90ac1974..3c1a929ab8d4450e6db5ef56ccfebd813d28837f 100644 --- a/drivers/leds/Make.defs +++ b/drivers/leds/Make.defs @@ -61,6 +61,11 @@ ifeq ($(CONFIG_PCA9635PW),y) LEDDEPATH = --dep-path leds LEDVPATH = :leds endif +ifeq ($(CONFIG_NCP5623C),y) + CSRCS += ncp5623c.c + LEDDEPATH = --dep-path leds + LEDVPATH = :leds +endif # Include LED build support (if any LED drivers were selected) diff --git a/drivers/leds/ncp5623c.c b/drivers/leds/ncp5623c.c new file mode 100644 index 0000000000000000000000000000000000000000..7fb96a7bdc9ebb2d2655f4e2eae3382689d097ed --- /dev/null +++ b/drivers/leds/ncp5623c.c @@ -0,0 +1,436 @@ +/**************************************************************************** + * drivers/leds/ncp5623c.c + * based on drivers/leds/pca9635pw.c + * + * Author: Konstantin Berzenko + * + * 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 + +#if defined(CONFIG_I2C) && defined(CONFIG_NCP5623C) + +/**************************************************************************** + * Private Type Definitions + ****************************************************************************/ + +struct ncp5623c_dev_s +{ + FAR struct i2c_master_s *i2c; + uint8_t i2c_addr; +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static int ncp5623c_i2c_write_byte(FAR struct ncp5623c_dev_s *priv, + uint8_t const reg_addr, uint8_t const reg_val); + +static int ncp5623c_open(FAR struct file *filep); +static int ncp5623c_close(FAR struct file *filep); +static int ncp5623c_ioctl(FAR struct file *filep, int cmd, unsigned long arg); +static ssize_t ncp5623c_read(FAR struct file *filep, FAR char *buffer, + size_t buflen); +static ssize_t ncp5623c_write(FAR struct file *filep, FAR const char *buffer, + size_t buflen); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static const struct file_operations g_ncp5623c_fileops = +{ + ncp5623c_open, /* open */ + ncp5623c_close, /* close */ + ncp5623c_read, /* read */ + ncp5623c_write, /* write */ + 0, /* seek */ + ncp5623c_ioctl, /* ioctl */ + 0 /* poll */ +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: ncp5623c_i2c_write_byte + * + * Description: + * Write a single byte to one of the NCP5623C configuration registers. + * + ****************************************************************************/ + +static int ncp5623c_i2c_write_byte(FAR struct ncp5623c_dev_s *priv, + uint8_t const reg_addr, + uint8_t const reg_val) +{ + struct i2c_config_s config; + int ret = OK; + + /* Assemble the 1 byte message comprised of reg_val */ + + uint8_t const BUFFER_SIZE = 1; + uint8_t buffer[BUFFER_SIZE]; + + buffer[0] = NCP5623C_SET_REG(reg_addr, reg_val); + + /* Setup up the I2C configuration */ + + config.frequency = I2C_BUS_FREQ_HZ; + config.address = priv->i2c_addr; + config.addrlen = 7; + + /* Write the data (no RESTART) */ + + lcdinfo("i2c addr: 0x%02X value: 0x%02X\n", priv->i2c_addr, + buffer[0]); + + ret = i2c_write(priv->i2c, &config, buffer, BUFFER_SIZE); + if (ret != OK) + { + lcderr("ERROR: i2c_write returned error code %d\n", ret); + return ret; + } + + return OK; +} + +/**************************************************************************** + * Name: ncp5623c_open + * + * Description: + * This function is called whenever a NCP5623C device is opened. + * + ****************************************************************************/ + +static int ncp5623c_open(FAR struct file *filep) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct ncp5623c_dev_s *priv = inode->i_private; + + int ret = -1; + + /* Shutdown the NCP5623C */ + + ret = ncp5623c_i2c_write_byte(priv, NCP5623C_SHUTDOWN, 0x00); + if (ret != OK) + { + lcderr("ERROR: Could not shut down the NCP5623C\n"); + return ret; + } + + /* Set up Max current */ + + ret = ncp5623c_i2c_write_byte(priv, NCP5623C_ILED, 0x1F); + if (ret != OK) + { + lcderr("ERROR: Could not set up max current\n"); + return ret; + } + + /* Let the chip settle a bit */ + + usleep(1); + return OK; +} + +/**************************************************************************** + * Name: ncp5623c_close + * + * Description: + * This function is called whenever a NCP5623C device is closed. + * + ****************************************************************************/ + +static int ncp5623c_close(FAR struct file *filep) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct ncp5623c_dev_s *priv = inode->i_private; + int ret = -1; + + /* Shut down NCP5623C */ + + ret = ncp5623c_i2c_write_byte(priv, NCP5623C_SHUTDOWN, 0x00); + if (ret != OK) + { + return ret; + } + + return OK; +} + +/**************************************************************************** + * Name: ncp5623c_ioctl + * + * Description: + * This function is called whenever an ioctl call to a NCP5623C is performed. + * + ****************************************************************************/ + +static int ncp5623c_ioctl(FAR struct file *filep, int cmd, unsigned long arg) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct ncp5623c_dev_s *priv = inode->i_private; + int ret = OK; + + lcdinfo("cmd: %d arg: %ld\n", cmd, arg); + + switch (cmd) + { + case LEDIOC_SET_REG: + { + /* Retrieve the information handed over as argument for this ioctl */ + + FAR const struct ncp5623c_set_reg_s *ptr = + (FAR const struct ncp5623c_set_reg_s *)((uintptr_t)arg); + + DEBUGASSERT(ptr != NULL); + if (ptr->reg > NCP5623C_MAX_REG) + { + lcderr("ERROR: Unrecognized register: %d\n", ptr->reg); + ret = -EFAULT; + break; + } + + ret = ncp5623c_i2c_write_byte(priv, ptr->reg, ptr->val); + } + break; + + /* The used ioctl command was invalid */ + + default: + { + lcderr("ERROR: Unrecognized cmd: %d\n", cmd); + ret = -ENOTTY; + } + break; + } + + return ret; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: ncp5623c_register + * + * Description: + * Register the NCP5623C device as 'devpath' + * + * Input Parameters: + * devpath - The full path to the driver to register. E.g., "/dev/rgbdrv0". + * i2c - An instance of the I2C interface to use to communicate + * with the LED driver. + * ncp5623c_i2c_addr + * - The I2C address of the NCP5623C. + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +int ncp5623c_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, + uint8_t const ncp5623c_i2c_addr) +{ + /* Sanity check */ + + DEBUGASSERT(i2c != NULL); + + /* Initialize the NCP5623C device structure */ + + FAR struct ncp5623c_dev_s *priv = + (FAR struct ncp5623c_dev_s *)kmm_malloc(sizeof(struct ncp5623c_dev_s)); + + if (priv == NULL) + { + lcderr("ERROR: Failed to allocate instance of ncp5623c_dev_s\n"); + return -ENOMEM; + } + + priv->i2c = i2c; + priv->i2c_addr = ncp5623c_i2c_addr; + + /* Register the character driver */ + + int const ret = register_driver(devpath, &g_ncp5623c_fileops, 666, priv); + if (ret != OK) + { + lcderr("ERROR: Failed to register driver: %d\n", ret); + kmm_free(priv); + return ret; + } + + return OK; +} + +/**************************************************************************** + * Name: ncp5623c_read + * + * Description: + * A dummy read method. This is provided only to satisfy the VFS layer. + * + ****************************************************************************/ + +static ssize_t ncp5623c_read(FAR struct file *filep, FAR char *buffer, + size_t buflen) +{ + /* Return zero -- usually meaning end-of-file */ + + return 0; +} + +/**************************************************************************** + * Name: ncp5623c_write + * + * Description: + * A dummy write method. This is provided only to satisfy the VFS layer. + * + ****************************************************************************/ + +static ssize_t ncp5623c_write(FAR struct file *filep, FAR const char *buffer, + size_t buflen) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct ncp5623c_dev_s *priv = inode->i_private; + int ret = OK; + + unsigned int red; + unsigned int green; + unsigned int blue; + char color[3]; + + lcdinfo("%s\n", buffer); + + /* We need to receive a string #RRGGBB = 7 bytes */ + + if (buffer == NULL || buflen < 7) + { + /* Well... nothing to do */ + + return -EINVAL; + } + + /* Check if it is a color format */ + + if (buffer[0] != '#') + { + /* The color code needs to start with # */ + + return -EINVAL; + } + + /* Move buffer to next character */ + + buffer++; + + color[0] = buffer[0]; + color[1] = buffer[1]; + color[2] = '\0'; + + red = strtol(color, NULL, 16); + + color[0] = buffer[2]; + color[1] = buffer[3]; + color[2] = '\0'; + + green = strtol(color, NULL, 16); + + color[0] = buffer[4]; + color[1] = buffer[5]; + color[2] = '\0'; + + blue = strtol(color, NULL, 16); + + /* Sane check */ + + if (red > NCP5623C_MAX_VALUE) + { + red = NCP5623C_MAX_VALUE; + } + + if (green > NCP5623C_MAX_VALUE) + { + green = NCP5623C_MAX_VALUE; + } + + if (blue > NCP5623C_MAX_VALUE) + { + blue = NCP5623C_MAX_VALUE; + } + + /* Setup LED R */ + + ret = ncp5623c_i2c_write_byte(priv, NCP5623C_PWM1, + red); + if (ret != OK) + { + lcderr("ERROR: Could not set red led\n"); + return ret; + } + + /* Setup LED G */ + + ret = ncp5623c_i2c_write_byte(priv, NCP5623C_PWM2, + green); + if (ret != OK) + { + lcderr("ERROR: Could not set green led\n"); + return ret; + } + + /* Setup LED B */ + + ret = ncp5623c_i2c_write_byte(priv, NCP5623C_PWM3, + blue); + if (ret != OK) + { + lcderr("ERROR: Could not set blue led\n"); + return ret; + } + + return buflen; +} + +#endif /* CONFIG_I2C && CONFIG_I2C_NCP5623C */ diff --git a/drivers/leds/pca9635pw.c b/drivers/leds/pca9635pw.c index 452891555a3a3927759cf40a33f188849ad55174..8d7039829686f65fd25d0d90dcd4522ff1d71149 100644 --- a/drivers/leds/pca9635pw.c +++ b/drivers/leds/pca9635pw.c @@ -105,8 +105,6 @@ static int pca9635pw_i2c_write_byte(FAR struct pca9635pw_dev_s *priv, { struct i2c_config_s config; - dbg("pca9635pw_i2c_write_byte\n"); - /* assemble the 2 byte message comprised of reg_addr and reg_val */ uint8_t const BUFFER_SIZE = 2; @@ -123,14 +121,13 @@ static int pca9635pw_i2c_write_byte(FAR struct pca9635pw_dev_s *priv, /* Write the register address followed by the data (no RESTART) */ - dbg("i2c addr: 0x%02X reg addr: 0x%02X value: 0x%02X\n", priv->i2c_addr, - buffer[0], buffer[1]); - + lcdinfo("i2c addr: 0x%02X reg addr: 0x%02X value: 0x%02X\n", priv->i2c_addr, + buffer[0], buffer[1]); ret = i2c_write(priv->i2c, &config, buffer, BUFFER_SIZE); if (ret != OK) { - dbg("i2c_write returned error code %d\n", ret); + lcderr("ERROR: i2c_write returned error code %d\n", ret); return ret; } @@ -173,11 +170,8 @@ static int pca9635pw_set_led_mode(FAR struct pca9635pw_dev_s *priv, static int pca9635pw_open(FAR struct file *filep) { - dbg("pca9635pw_open\n"); - FAR struct inode *inode = filep->f_inode; FAR struct pca9635pw_dev_s *priv = inode->i_private; - int ret = -1; /* Wake up the PCA9635PW (sleep bit PCA9635PW_MODE_1_SLEEP is set to zero @@ -192,7 +186,7 @@ static int pca9635pw_open(FAR struct file *filep) PCA9635PW_MODE_1_INITIAL_VALUE); if (ret != OK) { - dbg("Could not set initial config for PCA9635PW_MODE_1\n"); + lcderr("ERROR: Could not set initial config for PCA9635PW_MODE_1\n"); return ret; } @@ -209,7 +203,7 @@ static int pca9635pw_open(FAR struct file *filep) PCA9635PW_MODE_2_INITIAL_VALUE); if (ret != OK) { - dbg("Could not set initial config for PCA9635PW_MODE_2\n"); + lcderr("ERROR: Could not set initial config for PCA9635PW_MODE_2\n"); return ret; } @@ -227,8 +221,8 @@ static int pca9635pw_open(FAR struct file *filep) ret = pca9635pw_set_led_mode(priv, PCA9635PW_LED_OUT_x_MODE_2); if (ret != OK) { - dbg("Could not set led driver outputs to MODE2 (LED's brightness are " - "controlled by pwm registers)\n"); + lcderr("ERROR: Could not set led driver outputs to MODE2 (LED's brightness are " + "controlled by pwm registers)\n"); return ret; } @@ -245,11 +239,8 @@ static int pca9635pw_open(FAR struct file *filep) static int pca9635pw_close(FAR struct file *filep) { - dbg("pca9635pw_close\n"); - FAR struct inode *inode = filep->f_inode; FAR struct pca9635pw_dev_s *priv = inode->i_private; - int ret = -1; /* Turn all led drivers off */ @@ -257,7 +248,7 @@ static int pca9635pw_close(FAR struct file *filep) ret = pca9635pw_set_led_mode(priv, PCA9635PW_LED_OUT_x_MODE_0); if (ret != OK) { - dbg("Could not set led driver outputs to MODE0 (LED's are off)\n"); + lcderr("ERROR: Could not set led driver outputs to MODE0 (LED's are off)\n"); return ret; } @@ -285,14 +276,11 @@ static int pca9635pw_close(FAR struct file *filep) static int pca9635pw_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { - dbg("pca9635pw_ioctl\n"); - FAR struct inode *inode = filep->f_inode; FAR struct pca9635pw_dev_s *priv = inode->i_private; - int ret = OK; - dbg("cmd: %d arg: %ld\n", cmd, arg); + lcdinfo("cmd: %d arg: %ld\n", cmd, arg); switch (cmd) { @@ -319,7 +307,7 @@ static int pca9635pw_ioctl(FAR struct file *filep, int cmd, unsigned long arg) default: { - dbg("Unrecognized cmd: %d\n", cmd); + lcderr("ERROR: Unrecognized cmd: %d\n", cmd); ret = -ENOTTY; } break; @@ -364,7 +352,7 @@ int pca9635pw_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, if (priv == NULL) { - dbg("Failed to allocate instance of pca9635pw_dev_s\n"); + lcderr("ERROR: Failed to allocate instance of pca9635pw_dev_s\n"); return -ENOMEM; } @@ -376,7 +364,7 @@ int pca9635pw_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, int const ret = register_driver(devpath, &g_pca9635pw_fileops, 666, priv); if (ret != OK) { - dbg("Failed to register driver: %d\n", ret); + lcderr("ERROR: Failed to register driver: %d\n", ret); kmm_free(priv); return ret; } diff --git a/drivers/leds/rgbled.c b/drivers/leds/rgbled.c index 27e7a1a9ebeb1b80a43da3d4c642dd8e136d7ad2..88eb2f6223375cfab9a34a4fa5ba71c8608879ff 100644 --- a/drivers/leds/rgbled.c +++ b/drivers/leds/rgbled.c @@ -33,10 +33,6 @@ * ****************************************************************************/ -/**************************************************************************** - * Compilation Switches - ****************************************************************************/ - /**************************************************************************** * Included Files ****************************************************************************/ @@ -66,24 +62,6 @@ #ifdef CONFIG_RGBLED -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing PWM */ - -#ifdef CONFIG_DEBUG_RGBLED -# define pwmdbg dbg -# define pwmvdbg vdbg -# define pwmlldbg lldbg -# define pwmllvdbg llvdbg -#else -# define pwmdbg(x...) -# define pwmvdbg(x...) -# define pwmlldbg(x...) -# define pwmllvdbg(x...) -#endif - /**************************************************************************** * Private Type Definitions ****************************************************************************/ @@ -150,7 +128,7 @@ static int rgbled_open(FAR struct file *filep) uint8_t tmp; int ret; - pwmvdbg("crefs: %d\n", upper->crefs); + lcdinfo("crefs: %d\n", upper->crefs); /* Get exclusive access to the device structures */ @@ -201,7 +179,7 @@ static int rgbled_close(FAR struct file *filep) FAR struct rgbled_upperhalf_s *upper = inode->i_private; int ret; - pwmvdbg("crefs: %d\n", upper->crefs); + lcdinfo("crefs: %d\n", upper->crefs); /* Get exclusive access to the device structures */ @@ -395,7 +373,7 @@ int rgbled_register(FAR const char *path, FAR struct pwm_lowerhalf_s *ledr, if (!upper) { - pwmdbg("Allocation failed\n"); + lcderr("ERROR: Allocation failed\n"); return -ENOMEM; } @@ -410,7 +388,7 @@ int rgbled_register(FAR const char *path, FAR struct pwm_lowerhalf_s *ledr, /* Register the PWM device */ - pwmvdbg("Registering %s\n", path); + lcdinfo("Registering %s\n", path); return register_driver(path, &g_rgbledops, 0666, upper); } diff --git a/drivers/leds/userled_lower.c b/drivers/leds/userled_lower.c index 69e349f64d432baaac7b3ee2d7ddde6daeda3d89..32cff16e107ebef6dea6f49c8339e51e3d88833a 100644 --- a/drivers/leds/userled_lower.c +++ b/drivers/leds/userled_lower.c @@ -88,7 +88,7 @@ static const struct userled_lowerhalf_s g_userled_lower = static userled_set_t userled_supported(FAR const struct userled_lowerhalf_s *lower) { - ivdbg("BOARD_NLEDS: %02x\n", BOARD_NLEDS); + iinfo("BOARD_NLEDS: %02x\n", BOARD_NLEDS); return (userled_set_t)((1 << BOARD_NLEDS) - 1); } diff --git a/drivers/leds/userled_upper.c b/drivers/leds/userled_upper.c index 68fd8d5f7a6e552e3fd8a2185b4de5e0f1761bae..abf7cc719e33af1911764c9bac13238730fde4df 100644 --- a/drivers/leds/userled_upper.c +++ b/drivers/leds/userled_upper.c @@ -57,27 +57,6 @@ #include #include -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LEDS -#endif - -#ifdef CONFIG_DEBUG_LEDS -# define ddbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define dvdbg lldbg -# else -# define dvdbg(x...) -# endif -#else -# define ddbg(x...) -# define dvdbg(x...) -#endif - /**************************************************************************** * Private Types ****************************************************************************/ @@ -197,7 +176,7 @@ static int userled_open(FAR struct file *filep) ret = userled_takesem(&priv->lu_exclsem); if (ret < 0) { - dvdbg("ERROR: userled_takesem failed: %d\n", ret); + lcderr("ERROR: userled_takesem failed: %d\n", ret); return ret; } @@ -206,7 +185,7 @@ static int userled_open(FAR struct file *filep) opriv = (FAR struct userled_open_s *)kmm_zalloc(sizeof(struct userled_open_s)); if (!opriv) { - dvdbg("ERROR: Failled to allocate open structure\n"); + lcderr("ERROR: Failled to allocate open structure\n"); ret = -ENOMEM; goto errout_with_sem; } @@ -274,7 +253,7 @@ static int userled_close(FAR struct file *filep) ret = userled_takesem(&priv->lu_exclsem); if (ret < 0) { - dvdbg("ERROR: userled_takesem failed: %d\n", ret); + lcderr("ERROR: userled_takesem failed: %d\n", ret); return ret; } @@ -287,7 +266,7 @@ static int userled_close(FAR struct file *filep) DEBUGASSERT(curr); if (!curr) { - dvdbg("ERROR: Failed to find open entry\n"); + lcderr("ERROR: Failed to find open entry\n"); ret = -ENOENT; goto errout_with_exclsem; } @@ -339,7 +318,7 @@ static ssize_t userled_write(FAR struct file *filep, FAR const char *buffer, if (len < sizeof(userled_set_t)) { - dvdbg("ERROR: buffer too small: %lu\n", (unsigned long)len); + lcderr("ERROR: buffer too small: %lu\n", (unsigned long)len); return -EINVAL; } @@ -356,7 +335,7 @@ static ssize_t userled_write(FAR struct file *filep, FAR const char *buffer, ret = userled_takesem(&priv->lu_exclsem); if (ret < 0) { - dvdbg("ERROR: userled_takesem failed: %d\n", ret); + lcderr("ERROR: userled_takesem failed: %d\n", ret); return ret; } @@ -391,7 +370,7 @@ static int userled_ioctl(FAR struct file *filep, int cmd, unsigned long arg) ret = userled_takesem(&priv->lu_exclsem); if (ret < 0) { - dvdbg("ERROR: userled_takesem failed: %d\n", ret); + lcderr("ERROR: userled_takesem failed: %d\n", ret); return ret; } @@ -521,7 +500,7 @@ static int userled_ioctl(FAR struct file *filep, int cmd, unsigned long arg) break; default: - dvdbg("ERROR: Unrecognized command: %ld\n", cmd); + lcderr("ERROR: Unrecognized command: %ld\n", cmd); ret = -ENOTTY; break; } @@ -569,7 +548,7 @@ int userled_register(FAR const char *devname, if (!priv) { - dvdbg("ERROR: Failed to allocate device structure\n"); + lcderr("ERROR: Failed to allocate device structure\n"); return -ENOMEM; } @@ -590,7 +569,7 @@ int userled_register(FAR const char *devname, ret = register_driver(devname, &userled_fops, 0666, priv); if (ret < 0) { - dvdbg("ERROR: register_driver failed: %d\n", ret); + lcderr("ERROR: register_driver failed: %d\n", ret); goto errout_with_priv; } diff --git a/drivers/loop/losetup.c b/drivers/loop/losetup.c index ccc75a7971a9cd573b6edfb3fd4f2957a1e133fe..65d9f9e9cdf89fbbe80a61cd3e79489a3bf5fd26 100644 --- a/drivers/loop/losetup.c +++ b/drivers/loop/losetup.c @@ -246,7 +246,7 @@ static ssize_t loop_read(FAR struct inode *inode, FAR unsigned char *buffer, if (start_sector + nsectors > dev->nsectors) { - dbg("Read past end of file\n"); + _err("ERROR: Read past end of file\n"); return -EIO; } @@ -256,7 +256,7 @@ static ssize_t loop_read(FAR struct inode *inode, FAR unsigned char *buffer, ret = lseek(dev->fd, offset, SEEK_SET); if (ret == (off_t)-1) { - dbg("Seek failed for offset=%d: %d\n", (int)offset, get_errno()); + _err("ERROR: Seek failed for offset=%d: %d\n", (int)offset, get_errno()); return -EIO; } @@ -267,7 +267,7 @@ static ssize_t loop_read(FAR struct inode *inode, FAR unsigned char *buffer, nbytesread = read(dev->fd, buffer, nsectors * dev->sectsize); if (nbytesread < 0 && get_errno() != EINTR) { - dbg("Read failed: %d\n", get_errno()); + _err("ERROR: Read failed: %d\n", get_errno()); return -get_errno(); } } @@ -304,7 +304,7 @@ static ssize_t loop_write(FAR struct inode *inode, ret = lseek(dev->fd, offset, SEEK_SET); if (ret == (off_t)-1) { - dbg("Seek failed for offset=%d: %d\n", (int)offset, get_errno()); + _err("ERROR: Seek failed for offset=%d: %d\n", (int)offset, get_errno()); } /* Then write the requested number of sectors to that position */ @@ -314,7 +314,7 @@ static ssize_t loop_write(FAR struct inode *inode, nbyteswritten = write(dev->fd, buffer, nsectors * dev->sectsize); if (nbyteswritten < 0 && get_errno() != EINTR) { - dbg("Write failed: %d\n", get_errno()); + _err("ERROR: Write failed: %d\n", get_errno()); return -get_errno(); } } @@ -379,7 +379,7 @@ int losetup(FAR const char *devname, FAR const char *filename, /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!devname || !filename || !sectsize) { return -EINVAL; @@ -391,7 +391,7 @@ int losetup(FAR const char *devname, FAR const char *filename, ret = stat(filename, &sb); if (ret < 0) { - dbg("Failed to stat %s: %d\n", filename, get_errno()); + _err("ERROR: Failed to stat %s: %d\n", filename, get_errno()); return -get_errno(); } @@ -399,7 +399,7 @@ int losetup(FAR const char *devname, FAR const char *filename, if (sb.st_size - offset < sectsize) { - dbg("File is too small for blocksize\n"); + _err("ERROR: File is too small for blocksize\n"); return -ERANGE; } @@ -445,7 +445,7 @@ int losetup(FAR const char *devname, FAR const char *filename, dev->fd = open(filename, O_RDWR); if (dev->fd < 0) { - dbg("Failed to open %s: %d\n", filename, get_errno()); + _err("ERROR: Failed to open %s: %d\n", filename, get_errno()); ret = -get_errno(); goto errout_with_dev; } @@ -456,7 +456,7 @@ int losetup(FAR const char *devname, FAR const char *filename, ret = register_blockdriver(devname, &g_bops, 0, dev); if (ret < 0) { - fdbg("register_blockdriver failed: %d\n", -ret); + ferr("ERROR: register_blockdriver failed: %d\n", -ret); goto errout_with_fd; } @@ -485,7 +485,7 @@ int loteardown(FAR const char *devname) /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!devname) { return -EINVAL; @@ -499,7 +499,7 @@ int loteardown(FAR const char *devname) ret = open_blockdriver(devname, MS_RDONLY, &inode); if (ret < 0) { - dbg("Failed to open %s: %d\n", devname, -ret); + _err("ERROR: Failed to open %s: %d\n", devname, -ret); return ret; } diff --git a/drivers/mmcsd/mmcsd.h b/drivers/mmcsd/mmcsd.h index 06d91348d02746063f2d8a65dbfc1e6eab473329..fb52726d4efbfa6f129a6fcea8ce2eacbc09aaec 100644 --- a/drivers/mmcsd/mmcsd.h +++ b/drivers/mmcsd/mmcsd.h @@ -52,7 +52,7 @@ #undef CONFIG_MMCSD_DUMPALL /* MUST BE DEFINED MANUALLY */ -#if !defined(CONFIG_DEBUG_VERBOSE) || !defined(CONFIG_DEBUG_FS) +#if !defined(CONFIG_DEBUG_INFO) || !defined(CONFIG_DEBUG_FS) # undef CONFIG_MMCSD_DUMPALL #endif @@ -87,12 +87,12 @@ extern "C" { #endif #ifdef CONFIG_MMCSD_DUMPALL -# define mmcsd_dumpbuffer(m,b,l) fvdbgdumpbuffer(m,b,l) +# define mmcsd_dumpbuffer(m,b,l) finfodumpbuffer(m,b,l) #else # define mmcsd_dumpbuffer(m,b,l) #endif -#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS) EXTERN void mmcsd_dmpcsd(FAR const uint8_t *csd, uint8_t cardtype); #else # define mmcsd_dmpcsd(csd,cadtype) diff --git a/drivers/mmcsd/mmcsd_debug.c b/drivers/mmcsd/mmcsd_debug.c index e28b985a02553dccf1a335c5322daade4226d05a..817c0272c1ce08792bc56a002bd128a9a2fb02db 100644 --- a/drivers/mmcsd/mmcsd_debug.c +++ b/drivers/mmcsd/mmcsd_debug.c @@ -81,96 +81,96 @@ * ****************************************************************************/ -#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS) void mmcsd_dmpcsd(FAR const uint8_t *csd, uint8_t cardtype) { bool mmc = (cardtype == MMCSD_CARDTYPE_MMC); bool sd2 = (MMCSD_CSD_CSDSTRUCT(csd) == 1); - fvdbg("CSD\n"); - fvdbg(" CSD_STRUCTURE: 1.%d\n", MMCSD_CSD_CSDSTRUCT(csd)); + finfo("CSD\n"); + finfo(" CSD_STRUCTURE: 1.%d\n", MMCSD_CSD_CSDSTRUCT(csd)); if (mmc) { - fvdbg(" MMC SPEC_VERS: %d\n", MMC_CSD_SPECVERS(csd)); + finfo(" MMC SPEC_VERS: %d\n", MMC_CSD_SPECVERS(csd)); } - fvdbg(" TAAC:\n", + finfo(" TAAC:\n", sd2 ? SD20_CSD_TAC_TIMEVALUE(csd) : MMCSD_CSD_TAAC_TIMEVALUE(csd)); - fvdbg(" TIME_VALUE: 0x%02x\n", + finfo(" TIME_VALUE: 0x%02x\n", sd2 ? SD20_CSD_TAC_TIMEVALUE(csd) : MMCSD_CSD_TAAC_TIMEVALUE(csd)); - fvdbg(" TIME_UNIT: 0x%02x\n", + finfo(" TIME_UNIT: 0x%02x\n", sd2 ? SD20_CSD_TAC_TIMEUNIT(csd) : MMCSD_CSD_TAAC_TIMEUNIT(csd)); - fvdbg(" NSAC: 0x%02x\n", + finfo(" NSAC: 0x%02x\n", sd2 ? SD20_CSD_NSAC(csd) : MMCSD_CSD_NSAC(csd)); - fvdbg(" TRAN_SPEED:\n"); - fvdbg(" TIME_VALUE: 0x%02x\n", + finfo(" TRAN_SPEED:\n"); + finfo(" TIME_VALUE: 0x%02x\n", sd2 ? SD20_CSD_TRANSPEED_TIMEVALUE(csd) : MMCSD_CSD_TRANSPEED_TIMEVALUE(csd)); - fvdbg(" RATE_UNIT: 0x%02x\n", + finfo(" RATE_UNIT: 0x%02x\n", sd2 ? SD20_CSD_TRANSPEED_TRANSFERRATEUNIT(csd) : MMCSD_CSD_TRANSPEED_TRANSFERRATEUNIT(csd)); - fvdbg(" CCC: 0x%03x\n", + finfo(" CCC: 0x%03x\n", sd2 ? SD20_CSD_CCC(csd) : MMCSD_CSD_CCC(csd)); - fvdbg(" READ_BL_LEN: %d\n", + finfo(" READ_BL_LEN: %d\n", sd2 ? SD20_CSD_READBLLEN(csd) : MMCSD_CSD_READBLLEN(csd)); - fvdbg(" READ_BL_PARTIAL: %d\n", + finfo(" READ_BL_PARTIAL: %d\n", sd2 ? SD20_CSD_READBLPARTIAL(csd) : MMCSD_CSD_READBLPARTIAL(csd)); - fvdbg(" WRITE_BLK_MISALIGN: %d\n", + finfo(" WRITE_BLK_MISALIGN: %d\n", sd2 ? SD20_CSD_WRITEBLKMISALIGN(csd) : MMCSD_CSD_WRITEBLKMISALIGN(csd)); - fvdbg(" READ_BLK_MISALIGN: %d\n", + finfo(" READ_BLK_MISALIGN: %d\n", sd2 ? SD20_CSD_READBLKMISALIGN(csd) : MMCSD_CSD_READBLKMISALIGN(csd)); - fvdbg(" DSR_IMP: %d\n", + finfo(" DSR_IMP: %d\n", sd2 ? SD20_CSD_DSRIMP(csd) : MMCSD_CSD_DSRIMP(csd)); - fvdbg(" C_SIZE: %d\n", + finfo(" C_SIZE: %d\n", sd2 ? SD20_CSD_CSIZE(csd) : MMCSD_CSD_CSIZE(csd)); - fvdbg(" VDD_R_CURR_MIN: %d\n", + finfo(" VDD_R_CURR_MIN: %d\n", sd2 ? SD20_CSD_VDDRCURRMIN(csd) : MMCSD_CSD_VDDRCURRMIN(csd)); - fvdbg(" VDD_R_CURR_MAX: %d\n", + finfo(" VDD_R_CURR_MAX: %d\n", sd2 ? SD20_CSD_VDDRCURRMAX(csd) : MMCSD_CSD_VDDRCURRMAX(csd)); - fvdbg(" VDD_W_CURR_MIN: %d\n", + finfo(" VDD_W_CURR_MIN: %d\n", sd2 ? SD20_CSD_VDDWCURRMIN(csd) : MMCSD_CSD_VDDWCURRMIN(csd)); - fvdbg(" VDD_W_CURR_MAX: %d\n", + finfo(" VDD_W_CURR_MAX: %d\n", sd2 ? SD20_CSD_VDDWCURRMAX(csd) : MMCSD_CSD_VDDWCURRMAX(csd)); - fvdbg(" C_SIZE_MULT: %d\n", + finfo(" C_SIZE_MULT: %d\n", sd2 ? SD20_CSD_CSIZEMULT(csd) : MMCSD_CSD_CSIZEMULT(csd)); if (mmc) { - fvdbg(" MMC SECTOR_SIZE: %d\n", MMC_CSD_SECTORSIZE(csd)); - fvdbg(" MMC ER_GRP_SIZE: %d\n", MMC_CSD_ERGRPSIZE(csd)); - fvdbg(" MMC WP_GRP_SIZE: %d\n", MMC_CSD_WPGRPSIZE(csd)); - fvdbg(" MMC DFLT_ECC: %d\n", MMC_CSD_DFLTECC(csd)); + finfo(" MMC SECTOR_SIZE: %d\n", MMC_CSD_SECTORSIZE(csd)); + finfo(" MMC ER_GRP_SIZE: %d\n", MMC_CSD_ERGRPSIZE(csd)); + finfo(" MMC WP_GRP_SIZE: %d\n", MMC_CSD_WPGRPSIZE(csd)); + finfo(" MMC DFLT_ECC: %d\n", MMC_CSD_DFLTECC(csd)); } else { - fvdbg(" SD ER_BLK_EN: %d\n", + finfo(" SD ER_BLK_EN: %d\n", sd2 ? SD20_CSD_SDERBLKEN(csd) : SD_CSD_SDERBLKEN(csd)); - fvdbg(" SD SECTOR_SIZE: %d\n", + finfo(" SD SECTOR_SIZE: %d\n", sd2 ? SD20_CSD_SECTORSIZE(csd) : SD_CSD_SECTORSIZE(csd)); - fvdbg(" SD WP_GRP_SIZE: %d\n", + finfo(" SD WP_GRP_SIZE: %d\n", sd2 ? SD_CSD_WPGRPSIZE(csd) : SD_CSD_WPGRPSIZE(csd)); } - fvdbg(" WP_GRP_EN: %d\n", + finfo(" WP_GRP_EN: %d\n", sd2 ? SD20_WPGRPEN(csd) : MMCSD_WPGRPEN(csd)); - fvdbg(" R2W_FACTOR: %d\n", + finfo(" R2W_FACTOR: %d\n", sd2 ? SD20_CSD_R2WFACTOR(csd) : MMCSD_CSD_R2WFACTOR(csd)); - fvdbg(" WRITE_BL_LEN: %d\n", + finfo(" WRITE_BL_LEN: %d\n", sd2 ? SD20_CSD_WRITEBLLEN(csd) : MMCSD_CSD_WRITEBLLEN(csd)); - fvdbg(" WRITE_BL_PARTIAL: %d\n", + finfo(" WRITE_BL_PARTIAL: %d\n", sd2 ? SD20_CSD_WRITEBLPARTIAL(csd) : MMCSD_CSD_WRITEBLPARTIAL(csd)); - fvdbg(" FILE_FORMAT_GROUP: %d\n", + finfo(" FILE_FORMAT_GROUP: %d\n", sd2 ? SD20_CSD_FILEFORMATGRP(csd) : MMCSD_CSD_FILEFORMATGRP(csd)); - fvdbg(" COPY: %d\n", + finfo(" COPY: %d\n", sd2 ? SD20_CSD_COPY(csd) : MMCSD_CSD_COPY(csd)); - fvdbg(" PERM_WRITE_PROTECT: %d\n", + finfo(" PERM_WRITE_PROTECT: %d\n", sd2 ? SD20_CSD_PERMWRITEPROTECT(csd) : MMCSD_CSD_PERMWRITEPROTECT(csd)); - fvdbg(" TMP_WRITE_PROTECT: %d\n", + finfo(" TMP_WRITE_PROTECT: %d\n", sd2 ?SD20_CSD_TMPWRITEPROTECT(csd) : MMCSD_CSD_TMPWRITEPROTECT(csd)); - fvdbg(" FILE_FORMAT: %d\n", + finfo(" FILE_FORMAT: %d\n", sd2 ? SD20_CSD_FILEFORMAT(csd) : MMCSD_CSD_FILEFORMAT(csd)); if (mmc) { - fvdbg(" MMC ECC: %d\n", + finfo(" MMC ECC: %d\n", sd2 ? MMC_CSD_ECC(csd) : MMC_CSD_ECC(csd)); } - fvdbg(" CRC: %02x\n", + finfo(" CRC: %02x\n", sd2 ? SD20_CSD_CRC(csd) : MMCSD_CSD_CRC(csd)); } #endif diff --git a/drivers/mmcsd/mmcsd_sdio.c b/drivers/mmcsd/mmcsd_sdio.c index e3097d481267160efbdfd6c9bb12ff9a1afca536..be934950b9edcc5e93522f3acb494d059a1ccabe 100644 --- a/drivers/mmcsd/mmcsd_sdio.c +++ b/drivers/mmcsd/mmcsd_sdio.c @@ -171,7 +171,7 @@ static int mmcsd_getSCR(FAR struct mmcsd_state_s *priv, uint32_t scr[2]); static void mmcsd_decodeCSD(FAR struct mmcsd_state_s *priv, uint32_t csd[4]); -#if defined(CONFIG_DEBUG) && defined (CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_FEATURES) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS) static void mmcsd_decodeCID(FAR struct mmcsd_state_s *priv, uint32_t cid[4]); #else @@ -340,7 +340,7 @@ static int mmcsd_sendcmdpoll(FAR struct mmcsd_state_s *priv, uint32_t cmd, ret = SDIO_WAITRESPONSE(priv->dev, cmd); if (ret != OK) { - fdbg("ERROR: Wait for response to cmd: %08x failed: %d\n", cmd, ret); + ferr("ERROR: Wait for response to cmd: %08x failed: %d\n", cmd, ret); } } @@ -413,7 +413,7 @@ static int mmcsd_recvR1(FAR struct mmcsd_state_s *priv, uint32_t cmd) * indication for later use. */ - fvdbg("ERROR: R1=%08x\n", r1); + ferr("ERROR: R1=%08x\n", r1); priv->locked = ((r1 & MMCSD_R1_CARDISLOCKED) != 0); ret = -EIO; } @@ -467,7 +467,7 @@ static int mmcsd_recvR6(FAR struct mmcsd_state_s *priv, uint32_t cmd) ret = -EIO; } - fdbg("ERROR: Failed to get RCA. R6=%08x: %d\n", r6, ret); + ferr("ERROR: Failed to get RCA. R6=%08x: %d\n", r6, ret); return ret; } @@ -491,7 +491,7 @@ static int mmcsd_getSCR(FAR struct mmcsd_state_s *priv, uint32_t scr[2]) ret = mmcsd_setblocklen(priv, 8); if (ret != OK) { - fdbg("ERROR: mmcsd_setblocklen failed: %d\n", ret); + ferr("ERROR: mmcsd_setblocklen failed: %d\n", ret); return ret; } @@ -510,7 +510,7 @@ static int mmcsd_getSCR(FAR struct mmcsd_state_s *priv, uint32_t scr[2]) ret = mmcsd_recvR1(priv, SD_CMD55); if (ret != OK) { - fdbg("ERROR: RECVR1 for CMD55 failed: %d\n", ret); + ferr("ERROR: RECVR1 for CMD55 failed: %d\n", ret); return ret; } @@ -520,7 +520,7 @@ static int mmcsd_getSCR(FAR struct mmcsd_state_s *priv, uint32_t scr[2]) ret = mmcsd_recvR1(priv, SD_ACMD51); if (ret != OK) { - fdbg("ERROR: RECVR1 for ACMD51 failed: %d\n", ret); + ferr("ERROR: RECVR1 for ACMD51 failed: %d\n", ret); SDIO_CANCEL(priv->dev); return ret; } @@ -531,7 +531,7 @@ static int mmcsd_getSCR(FAR struct mmcsd_state_s *priv, uint32_t scr[2]) MMCSD_SCR_DATADELAY); if (ret != OK) { - fdbg("ERROR: mmcsd_eventwait for READ DATA failed: %d\n", ret); + ferr("ERROR: mmcsd_eventwait for READ DATA failed: %d\n", ret); } return ret; @@ -558,7 +558,7 @@ static int mmcsd_getSCR(FAR struct mmcsd_state_s *priv, uint32_t scr[2]) static void mmcsd_decodeCSD(FAR struct mmcsd_state_s *priv, uint32_t csd[4]) { -#if defined(CONFIG_DEBUG) && defined (CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_FEATURES) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS) struct mmcsd_csd_s decoded; #endif unsigned int readbllen; @@ -578,7 +578,7 @@ static void mmcsd_decodeCSD(FAR struct mmcsd_state_s *priv, uint32_t csd[4]) * TRANSFER_RATE_UNIT 2:0 Rate mantissa */ -#if defined(CONFIG_DEBUG) && defined (CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_FEATURES) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS) memset(&decoded, 0, sizeof(struct mmcsd_csd_s)); decoded.csdstructure = csd[0] >> 30; decoded.mmcspecvers = (csd[0] >> 26) & 0x0f; @@ -606,7 +606,7 @@ static void mmcsd_decodeCSD(FAR struct mmcsd_state_s *priv, uint32_t csd[4]) priv->dsrimp = (csd[1] >> 12) & 1; readbllen = (csd[1] >> 16) & 0x0f; -#if defined(CONFIG_DEBUG) && defined (CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_FEATURES) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS) decoded.ccc = (csd[1] >> 20) & 0x0fff; decoded.readbllen = (csd[1] >> 16) & 0x0f; decoded.readblpartial = (csd[1] >> 15) & 1; @@ -667,7 +667,7 @@ static void mmcsd_decodeCSD(FAR struct mmcsd_state_s *priv, uint32_t csd[4]) priv->blocksize = 1 << 9; priv->nblocks = priv->capacity >> 9; -#if defined(CONFIG_DEBUG) && defined (CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_FEATURES) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS) decoded.u.sdblock.csize = csize; decoded.u.sdblock.sderblen = (csd[2] >> 14) & 1; decoded.u.sdblock.sdsectorsize = (csd[2] >> 7) & 0x7f; @@ -703,7 +703,7 @@ static void mmcsd_decodeCSD(FAR struct mmcsd_state_s *priv, uint32_t csd[4]) priv->blockshift = 9; } -#if defined(CONFIG_DEBUG) && defined (CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_FEATURES) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS) if (IS_SD(priv->type)) { decoded.u.sdbyte.csize = csize; @@ -753,7 +753,7 @@ static void mmcsd_decodeCSD(FAR struct mmcsd_state_s *priv, uint32_t csd[4]) tmpwriteprotect = (csd[3] >> 12) & 1; priv->wrprotect = (permwriteprotect || tmpwriteprotect); -#if defined(CONFIG_DEBUG) && defined (CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_FEATURES) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS) decoded.wpgrpen = csd[3] >> 31; decoded.mmcdfltecc = (csd[3] >> 29) & 3; decoded.r2wfactor = (csd[3] >> 26) & 7; @@ -767,69 +767,69 @@ static void mmcsd_decodeCSD(FAR struct mmcsd_state_s *priv, uint32_t csd[4]) decoded.mmcecc = (csd[3] >> 8) & 3; decoded.crc = (csd[3] >> 1) & 0x7f; - fvdbg("CSD:\n"); - fvdbg(" CSD_STRUCTURE: %d SPEC_VERS: %d (MMC)\n", + finfo("CSD:\n"); + finfo(" CSD_STRUCTURE: %d SPEC_VERS: %d (MMC)\n", decoded.csdstructure, decoded.mmcspecvers); - fvdbg(" TAAC {TIME_UNIT: %d TIME_VALUE: %d} NSAC: %d\n", + finfo(" TAAC {TIME_UNIT: %d TIME_VALUE: %d} NSAC: %d\n", decoded.taac.timeunit, decoded.taac.timevalue, decoded.nsac); - fvdbg(" TRAN_SPEED {TRANSFER_RATE_UNIT: %d TIME_VALUE: %d}\n", + finfo(" TRAN_SPEED {TRANSFER_RATE_UNIT: %d TIME_VALUE: %d}\n", decoded.transpeed.transferrateunit, decoded.transpeed.timevalue); - fvdbg(" CCC: %d\n", decoded.ccc); - fvdbg(" READ_BL_LEN: %d READ_BL_PARTIAL: %d\n", + finfo(" CCC: %d\n", decoded.ccc); + finfo(" READ_BL_LEN: %d READ_BL_PARTIAL: %d\n", decoded.readbllen, decoded.readblpartial); - fvdbg(" WRITE_BLK_MISALIGN: %d READ_BLK_MISALIGN: %d\n", + finfo(" WRITE_BLK_MISALIGN: %d READ_BLK_MISALIGN: %d\n", decoded.writeblkmisalign, decoded.readblkmisalign); - fvdbg(" DSR_IMP: %d\n", + finfo(" DSR_IMP: %d\n", decoded.dsrimp); if (IS_BLOCK(priv->type)) { - fvdbg(" SD Block Addressing:\n"); - fvdbg(" C_SIZE: %d SD_ER_BLK_EN: %d\n", + finfo(" SD Block Addressing:\n"); + finfo(" C_SIZE: %d SD_ER_BLK_EN: %d\n", decoded.u.sdblock.csize, decoded.u.sdblock.sderblen); - fvdbg(" SD_SECTOR_SIZE: %d SD_WP_GRP_SIZE: %d\n", + finfo(" SD_SECTOR_SIZE: %d SD_WP_GRP_SIZE: %d\n", decoded.u.sdblock.sdsectorsize, decoded.u.sdblock.sdwpgrpsize); } else if (IS_SD(priv->type)) { - fvdbg(" SD Byte Addressing:\n"); - fvdbg(" C_SIZE: %d C_SIZE_MULT: %d\n", + finfo(" SD Byte Addressing:\n"); + finfo(" C_SIZE: %d C_SIZE_MULT: %d\n", decoded.u.sdbyte.csize, decoded.u.sdbyte.csizemult); - fvdbg(" VDD_R_CURR_MIN: %d VDD_R_CURR_MAX: %d\n", + finfo(" VDD_R_CURR_MIN: %d VDD_R_CURR_MAX: %d\n", decoded.u.sdbyte.vddrcurrmin, decoded.u.sdbyte.vddrcurrmax); - fvdbg(" VDD_W_CURR_MIN: %d VDD_W_CURR_MAX: %d\n", + finfo(" VDD_W_CURR_MIN: %d VDD_W_CURR_MAX: %d\n", decoded.u.sdbyte.vddwcurrmin, decoded.u.sdbyte.vddwcurrmax); - fvdbg(" SD_ER_BLK_EN: %d SD_SECTOR_SIZE: %d (SD) SD_WP_GRP_SIZE: %d\n", + finfo(" SD_ER_BLK_EN: %d SD_SECTOR_SIZE: %d (SD) SD_WP_GRP_SIZE: %d\n", decoded.u.sdbyte.sderblen, decoded.u.sdbyte.sdsectorsize, decoded.u.sdbyte.sdwpgrpsize); } #ifdef CONFIG_MMCSD_MMCSUPPORT else if (IS_MMC(priv->type)) { - fvdbg(" MMC:\n"); - fvdbg(" C_SIZE: %d C_SIZE_MULT: %d\n", + finfo(" MMC:\n"); + finfo(" C_SIZE: %d C_SIZE_MULT: %d\n", decoded.u.mmc.csize, decoded.u.mmc.csizemult); - fvdbg(" VDD_R_CURR_MIN: %d VDD_R_CURR_MAX: %d\n", + finfo(" VDD_R_CURR_MIN: %d VDD_R_CURR_MAX: %d\n", decoded.u.mmc.vddrcurrmin, decoded.u.mmc.vddrcurrmax); - fvdbg(" VDD_W_CURR_MIN: %d VDD_W_CURR_MAX: %d\n", + finfo(" VDD_W_CURR_MIN: %d VDD_W_CURR_MAX: %d\n", decoded.u.mmc.vddwcurrmin, decoded.u.mmc.vddwcurrmax); - fvdbg(" MMC_SECTOR_SIZE: %d MMC_ER_GRP_SIZE: %d MMC_WP_GRP_SIZE: %d\n", + finfo(" MMC_SECTOR_SIZE: %d MMC_ER_GRP_SIZE: %d MMC_WP_GRP_SIZE: %d\n", decoded.u.mmc.er.mmc22.sectorsize, decoded.u.mmc.er.mmc22.ergrpsize, decoded.u.mmc.mmcwpgrpsize); } #endif - fvdbg(" WP_GRP_EN: %d MMC DFLT_ECC: %d (MMC) R2W_FACTOR: %d\n", + finfo(" WP_GRP_EN: %d MMC DFLT_ECC: %d (MMC) R2W_FACTOR: %d\n", decoded.wpgrpen, decoded.mmcdfltecc, decoded.r2wfactor); - fvdbg(" WRITE_BL_LEN: %d WRITE_BL_PARTIAL: %d\n", + finfo(" WRITE_BL_LEN: %d WRITE_BL_PARTIAL: %d\n", decoded.writebllen, decoded.writeblpartial); - fvdbg(" FILE_FORMAT_GROUP: %d COPY: %d\n", + finfo(" FILE_FORMAT_GROUP: %d COPY: %d\n", decoded.fileformatgrp, decoded.copy); - fvdbg(" PERM_WRITE_PROTECT: %d TMP_WRITE_PROTECT: %d\n", + finfo(" PERM_WRITE_PROTECT: %d TMP_WRITE_PROTECT: %d\n", decoded.permwriteprotect, decoded.tmpwriteprotect); - fvdbg(" FILE_FORMAT: %d ECC: %d (MMC) CRC: %d\n", + finfo(" FILE_FORMAT: %d ECC: %d (MMC) CRC: %d\n", decoded.fileformat, decoded.mmcecc, decoded.crc); - fvdbg("Capacity: %luKb, Block size: %db, nblocks: %d wrprotect: %d\n", + finfo("Capacity: %luKb, Block size: %db, nblocks: %d wrprotect: %d\n", (unsigned long)(priv->capacity / 1024), priv->blocksize, priv->nblocks, priv->wrprotect); #endif @@ -844,7 +844,7 @@ static void mmcsd_decodeCSD(FAR struct mmcsd_state_s *priv, uint32_t csd[4]) * ****************************************************************************/ -#if defined(CONFIG_DEBUG) && defined (CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_FEATURES) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS) static void mmcsd_decodeCID(FAR struct mmcsd_state_s *priv, uint32_t cid[4]) { struct mmcsd_cid_s decoded; @@ -893,7 +893,7 @@ static void mmcsd_decodeCID(FAR struct mmcsd_state_s *priv, uint32_t cid[4]) decoded.mdt = (cid[3] >> 8) & 0x0fff; decoded.crc = (cid[3] >> 1) & 0x7f; - fvdbg("mid: %02x oid: %04x pnm: %s prv: %d psn: %d mdt: %02x crc: %02x\n", + finfo("mid: %02x oid: %04x pnm: %s prv: %d psn: %d mdt: %02x crc: %02x\n", decoded.mid, decoded.oid, decoded.pnm, decoded.prv, decoded.psn, decoded.mdt, decoded.crc); } @@ -910,7 +910,7 @@ static void mmcsd_decodeCID(FAR struct mmcsd_state_s *priv, uint32_t cid[4]) static void mmcsd_decodeSCR(FAR struct mmcsd_state_s *priv, uint32_t scr[2]) { -#if defined(CONFIG_DEBUG) && defined (CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_FEATURES) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS) struct mmcsd_scr_s decoded; #endif @@ -929,7 +929,7 @@ struct mmcsd_scr_s decoded; priv->buswidth = (scr[0] >> 8) & 15; #endif -#if defined(CONFIG_DEBUG) && defined (CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_FEATURES) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS) #ifdef CONFIG_ENDIAN_BIG /* Card SCR is big-endian order / CPU also big-endian * 60 56 52 48 44 40 36 32 * VVVV SSSS ESSS BBBB RRRR RRRR RRRR RRRR */ @@ -952,15 +952,15 @@ struct mmcsd_scr_s decoded; * Reserved 31:0 32-bits reserved for manufacturing usage. */ -#if defined(CONFIG_DEBUG) && defined (CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_FEATURES) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS) decoded.mfgdata = scr[1]; /* Might be byte reversed! */ - fvdbg("SCR:\n"); - fvdbg(" SCR_STRUCTURE: %d SD_VERSION: %d\n", + finfo("SCR:\n"); + finfo(" SCR_STRUCTURE: %d SD_VERSION: %d\n", decoded.scrversion, decoded.sdversion); - fvdbg(" DATA_STATE_AFTER_ERASE: %d SD_SECURITY: %d SD_BUS_WIDTHS: %x\n", + finfo(" DATA_STATE_AFTER_ERASE: %d SD_SECURITY: %d SD_BUS_WIDTHS: %x\n", decoded.erasestate, decoded.security, decoded.buswidth); - fvdbg(" Manufacturing data: %08x\n", + finfo(" Manufacturing data: %08x\n", decoded.mfgdata); #endif } @@ -1028,7 +1028,7 @@ static int mmcsd_verifystate(FAR struct mmcsd_state_s *priv, uint32_t state) ret = mmcsd_getR1(priv, &r1); if (ret != OK) { - fdbg("ERROR: mmcsd_getR1 failed: %d\n", ret); + ferr("ERROR: mmcsd_getR1 failed: %d\n", ret); return ret; } @@ -1097,7 +1097,7 @@ static int mmcsd_eventwait(FAR struct mmcsd_state_s *priv, { /* Yes.. the failure event is probably SDIOWAIT_TIMEOUT */ - fdbg("ERROR: Awakened with %02x\n", wkupevent); + ferr("ERROR: Awakened with %02x\n", wkupevent); return wkupevent & SDIOWAIT_TIMEOUT ? -ETIMEDOUT : -EIO; } @@ -1129,7 +1129,7 @@ static int mmcsd_transferready(FAR struct mmcsd_state_s *priv) if (!SDIO_PRESENT(priv->dev)) { - fdbg("ERROR: Card has been removed\n"); + ferr("ERROR: Card has been removed\n"); return -ENODEV; } @@ -1158,7 +1158,7 @@ static int mmcsd_transferready(FAR struct mmcsd_state_s *priv) MMCSD_BLOCK_WDATADELAY); if (ret != OK) { - fdbg("ERROR: mmcsd_eventwait for transfer ready failed: %d\n", ret); + ferr("ERROR: mmcsd_eventwait for transfer ready failed: %d\n", ret); } #endif @@ -1170,7 +1170,7 @@ static int mmcsd_transferready(FAR struct mmcsd_state_s *priv) ret = mmcsd_getR1(priv, &r1); if (ret != OK) { - fdbg("ERROR: mmcsd_getR1 failed: %d\n", ret); + ferr("ERROR: mmcsd_getR1 failed: %d\n", ret); return ret; } @@ -1197,7 +1197,7 @@ static int mmcsd_transferready(FAR struct mmcsd_state_s *priv) * if this error occurs. */ - fdbg("ERROR: Unexpected R1 state: %08x\n", r1); + ferr("ERROR: Unexpected R1 state: %08x\n", r1); return -EINVAL; } @@ -1231,7 +1231,7 @@ static int mmcsd_stoptransmission(FAR struct mmcsd_state_s *priv) ret = mmcsd_recvR1(priv, MMCSD_CMD12); if (ret != OK) { - fdbg("ERROR: mmcsd_recvR1 for CMD12 failed: %d\n", ret); + ferr("ERROR: mmcsd_recvR1 for CMD12 failed: %d\n", ret); } return ret; @@ -1267,7 +1267,7 @@ static int mmcsd_setblocklen(FAR struct mmcsd_state_s *priv, uint32_t blocklen) } else { - fdbg("ERROR: mmcsd_recvR1 for CMD16 failed: %d\n", ret); + ferr("ERROR: mmcsd_recvR1 for CMD16 failed: %d\n", ret); } } @@ -1288,14 +1288,14 @@ static ssize_t mmcsd_readsingle(FAR struct mmcsd_state_s *priv, off_t offset; int ret; - fvdbg("startblock=%d\n", startblock); + finfo("startblock=%d\n", startblock); DEBUGASSERT(priv != NULL && buffer != NULL); /* Check if the card is locked */ if (priv->locked) { - fdbg("ERROR: Card is locked\n"); + ferr("ERROR: Card is locked\n"); return -EPERM; } @@ -1325,7 +1325,7 @@ static ssize_t mmcsd_readsingle(FAR struct mmcsd_state_s *priv, ret = mmcsd_transferready(priv); if (ret != OK) { - fdbg("ERROR: Card not ready: %d\n", ret); + ferr("ERROR: Card not ready: %d\n", ret); return ret; } @@ -1342,14 +1342,14 @@ static ssize_t mmcsd_readsingle(FAR struct mmcsd_state_s *priv, offset = startblock << priv->blockshift; } - fvdbg("offset=%d\n", offset); + finfo("offset=%d\n", offset); /* Select the block size for the card */ ret = mmcsd_setblocklen(priv, priv->blocksize); if (ret != OK) { - fdbg("ERROR: mmcsd_setblocklen failed: %d\n", ret); + ferr("ERROR: mmcsd_setblocklen failed: %d\n", ret); return ret; } @@ -1365,7 +1365,7 @@ static ssize_t mmcsd_readsingle(FAR struct mmcsd_state_s *priv, ret = SDIO_DMARECVSETUP(priv->dev, buffer, priv->blocksize); if (ret != OK) { - fvdbg("SDIO_DMARECVSETUP: error %d\n", ret); + finfo("SDIO_DMARECVSETUP: error %d\n", ret); return ret; } } @@ -1385,7 +1385,7 @@ static ssize_t mmcsd_readsingle(FAR struct mmcsd_state_s *priv, ret = mmcsd_recvR1(priv, MMCSD_CMD17); if (ret != OK) { - fdbg("ERROR: mmcsd_recvR1 for CMD17 failed: %d\n", ret); + ferr("ERROR: mmcsd_recvR1 for CMD17 failed: %d\n", ret); SDIO_CANCEL(priv->dev); return ret; } @@ -1396,7 +1396,7 @@ static ssize_t mmcsd_readsingle(FAR struct mmcsd_state_s *priv, MMCSD_BLOCK_RDATADELAY); if (ret != OK) { - fdbg("ERROR: CMD17 transfer failed: %d\n", ret); + ferr("ERROR: CMD17 transfer failed: %d\n", ret); return ret; } @@ -1422,14 +1422,14 @@ static ssize_t mmcsd_readmultiple(FAR struct mmcsd_state_s *priv, off_t offset; int ret; - fvdbg("startblock=%d nblocks=%d\n", startblock, nblocks); + finfo("startblock=%d nblocks=%d\n", startblock, nblocks); DEBUGASSERT(priv != NULL && buffer != NULL && nblocks > 1); /* Check if the card is locked */ if (priv->locked) { - fdbg("ERROR: Card is locked\n"); + ferr("ERROR: Card is locked\n"); return -EPERM; } @@ -1459,7 +1459,7 @@ static ssize_t mmcsd_readmultiple(FAR struct mmcsd_state_s *priv, ret = mmcsd_transferready(priv); if (ret != OK) { - fdbg("ERROR: Card not ready: %d\n", ret); + ferr("ERROR: Card not ready: %d\n", ret); return ret; } @@ -1476,14 +1476,14 @@ static ssize_t mmcsd_readmultiple(FAR struct mmcsd_state_s *priv, { offset = startblock << priv->blockshift; } - fvdbg("nbytes=%d byte offset=%d\n", nbytes, offset); + finfo("nbytes=%d byte offset=%d\n", nbytes, offset); /* Select the block size for the card */ ret = mmcsd_setblocklen(priv, priv->blocksize); if (ret != OK) { - fdbg("ERROR: mmcsd_setblocklen failed: %d\n", ret); + ferr("ERROR: mmcsd_setblocklen failed: %d\n", ret); return ret; } @@ -1499,7 +1499,7 @@ static ssize_t mmcsd_readmultiple(FAR struct mmcsd_state_s *priv, ret = SDIO_DMARECVSETUP(priv->dev, buffer, nbytes); if (ret != OK) { - fvdbg("SDIO_DMARECVSETUP: error %d\n", ret); + finfo("SDIO_DMARECVSETUP: error %d\n", ret); return ret; } } @@ -1517,7 +1517,7 @@ static ssize_t mmcsd_readmultiple(FAR struct mmcsd_state_s *priv, ret = mmcsd_recvR1(priv, MMCSD_CMD18); if (ret != OK) { - fdbg("ERROR: mmcsd_recvR1 for CMD18 failed: %d\n", ret); + ferr("ERROR: mmcsd_recvR1 for CMD18 failed: %d\n", ret); SDIO_CANCEL(priv->dev); return ret; } @@ -1528,7 +1528,7 @@ static ssize_t mmcsd_readmultiple(FAR struct mmcsd_state_s *priv, nblocks * MMCSD_BLOCK_RDATADELAY); if (ret != OK) { - fdbg("ERROR: CMD18 transfer failed: %d\n", ret); + ferr("ERROR: CMD18 transfer failed: %d\n", ret); return ret; } @@ -1537,7 +1537,7 @@ static ssize_t mmcsd_readmultiple(FAR struct mmcsd_state_s *priv, ret = mmcsd_stoptransmission(priv); if (ret != OK) { - fdbg("ERROR: mmcsd_stoptransmission failed: %d\n", ret); + ferr("ERROR: mmcsd_stoptransmission failed: %d\n", ret); } /* On success, return the number of blocks read */ @@ -1625,7 +1625,7 @@ static ssize_t mmcsd_writesingle(FAR struct mmcsd_state_s *priv, off_t offset; int ret; - fvdbg("startblock=%d\n", startblock); + finfo("startblock=%d\n", startblock); DEBUGASSERT(priv != NULL && buffer != NULL); /* Check if the card is locked or write protected (either via software or @@ -1634,7 +1634,7 @@ static ssize_t mmcsd_writesingle(FAR struct mmcsd_state_s *priv, if (mmcsd_wrprotected(priv)) { - fdbg("ERROR: Card is locked or write protected\n"); + ferr("ERROR: Card is locked or write protected\n"); return -EPERM; } @@ -1664,7 +1664,7 @@ static ssize_t mmcsd_writesingle(FAR struct mmcsd_state_s *priv, ret = mmcsd_transferready(priv); if (ret != OK) { - fdbg("ERROR: Card not ready: %d\n", ret); + ferr("ERROR: Card not ready: %d\n", ret); return ret; } @@ -1681,14 +1681,14 @@ static ssize_t mmcsd_writesingle(FAR struct mmcsd_state_s *priv, offset = startblock << priv->blockshift; } - fvdbg("offset=%d\n", offset); + finfo("offset=%d\n", offset); /* Select the block size for the card */ ret = mmcsd_setblocklen(priv, priv->blocksize); if (ret != OK) { - fdbg("ERROR: mmcsd_setblocklen failed: %d\n", ret); + ferr("ERROR: mmcsd_setblocklen failed: %d\n", ret); return ret; } @@ -1698,7 +1698,7 @@ static ssize_t mmcsd_writesingle(FAR struct mmcsd_state_s *priv, ret = mmcsd_recvR1(priv, MMCSD_CMD24); if (ret != OK) { - fdbg("ERROR: mmcsd_recvR1 for CMD24 failed: %d\n", ret); + ferr("ERROR: mmcsd_recvR1 for CMD24 failed: %d\n", ret); return ret; } @@ -1713,7 +1713,7 @@ static ssize_t mmcsd_writesingle(FAR struct mmcsd_state_s *priv, ret = SDIO_DMASENDSETUP(priv->dev, buffer, priv->blocksize); if (ret != OK) { - fvdbg("SDIO_DMASENDSETUP: error %d\n", ret); + finfo("SDIO_DMASENDSETUP: error %d\n", ret); return ret; } } @@ -1735,7 +1735,7 @@ static ssize_t mmcsd_writesingle(FAR struct mmcsd_state_s *priv, SDIOWAIT_TIMEOUT | SDIOWAIT_ERROR, MMCSD_BLOCK_WDATADELAY); if (ret != OK) { - fdbg("ERROR: CMD24 transfer failed: %d\n", ret); + ferr("ERROR: CMD24 transfer failed: %d\n", ret); return ret; } @@ -1768,7 +1768,7 @@ static ssize_t mmcsd_writemultiple(FAR struct mmcsd_state_s *priv, size_t nbytes; int ret; - fvdbg("startblock=%d nblocks=%d\n", startblock, nblocks); + finfo("startblock=%d nblocks=%d\n", startblock, nblocks); DEBUGASSERT(priv != NULL && buffer != NULL && nblocks > 1); /* Check if the card is locked or write protected (either via software or @@ -1777,7 +1777,7 @@ static ssize_t mmcsd_writemultiple(FAR struct mmcsd_state_s *priv, if (mmcsd_wrprotected(priv)) { - fdbg("ERROR: Card is locked or write protected\n"); + ferr("ERROR: Card is locked or write protected\n"); return -EPERM; } @@ -1807,7 +1807,7 @@ static ssize_t mmcsd_writemultiple(FAR struct mmcsd_state_s *priv, ret = mmcsd_transferready(priv); if (ret != OK) { - fdbg("ERROR: Card not ready: %d\n", ret); + ferr("ERROR: Card not ready: %d\n", ret); return ret; } @@ -1825,14 +1825,14 @@ static ssize_t mmcsd_writemultiple(FAR struct mmcsd_state_s *priv, offset = startblock << priv->blockshift; } - fvdbg("nbytes=%d byte offset=%d\n", nbytes, offset); + finfo("nbytes=%d byte offset=%d\n", nbytes, offset); /* Select the block size for the card */ ret = mmcsd_setblocklen(priv, priv->blocksize); if (ret != OK) { - fdbg("ERROR: mmcsd_setblocklen failed: %d\n", ret); + ferr("ERROR: mmcsd_setblocklen failed: %d\n", ret); return ret; } @@ -1850,7 +1850,7 @@ static ssize_t mmcsd_writemultiple(FAR struct mmcsd_state_s *priv, ret = mmcsd_recvR1(priv, SD_CMD55); if (ret != OK) { - fdbg("ERROR: mmcsd_recvR1 for CMD55 (ACMD23) failed: %d\n", ret); + ferr("ERROR: mmcsd_recvR1 for CMD55 (ACMD23) failed: %d\n", ret); return ret; } @@ -1860,7 +1860,7 @@ static ssize_t mmcsd_writemultiple(FAR struct mmcsd_state_s *priv, ret = mmcsd_recvR1(priv, SD_ACMD23); if (ret != OK) { - fdbg("ERROR: mmcsd_recvR1 for ACMD23 failed: %d\n", ret); + ferr("ERROR: mmcsd_recvR1 for ACMD23 failed: %d\n", ret); return ret; } } @@ -1876,7 +1876,7 @@ static ssize_t mmcsd_writemultiple(FAR struct mmcsd_state_s *priv, ret = SDIO_DMASENDSETUP(priv->dev, buffer, nbytes); if (ret != OK) { - fvdbg("SDIO_DMASENDSETUP: error %d\n", ret); + finfo("SDIO_DMASENDSETUP: error %d\n", ret); return ret; } } @@ -1900,7 +1900,7 @@ static ssize_t mmcsd_writemultiple(FAR struct mmcsd_state_s *priv, ret = mmcsd_recvR1(priv, MMCSD_CMD25); if (ret != OK) { - fdbg("ERROR: mmcsd_recvR1 for CMD25 failed: %d\n", ret); + ferr("ERROR: mmcsd_recvR1 for CMD25 failed: %d\n", ret); return ret; } @@ -1909,7 +1909,7 @@ static ssize_t mmcsd_writemultiple(FAR struct mmcsd_state_s *priv, ret = mmcsd_eventwait(priv, SDIOWAIT_TIMEOUT | SDIOWAIT_ERROR, nblocks * MMCSD_BLOCK_WDATADELAY); if (ret != OK) { - fdbg("ERROR: CMD18 transfer failed: %d\n", ret); + ferr("ERROR: CMD18 transfer failed: %d\n", ret); return ret; } @@ -1918,7 +1918,7 @@ static ssize_t mmcsd_writemultiple(FAR struct mmcsd_state_s *priv, ret = mmcsd_stoptransmission(priv); if (ret != OK) { - fdbg("ERROR: mmcsd_stoptransmission failed: %d\n", ret); + ferr("ERROR: mmcsd_stoptransmission failed: %d\n", ret); return ret; } @@ -2003,7 +2003,7 @@ static int mmcsd_open(FAR struct inode *inode) { FAR struct mmcsd_state_s *priv; - fvdbg("Entry\n"); + finfo("Entry\n"); DEBUGASSERT(inode && inode->i_private); priv = (FAR struct mmcsd_state_s *)inode->i_private; @@ -2027,7 +2027,7 @@ static int mmcsd_close(FAR struct inode *inode) { FAR struct mmcsd_state_s *priv; - fvdbg("Entry\n"); + finfo("Entry\n"); DEBUGASSERT(inode && inode->i_private); priv = (FAR struct mmcsd_state_s *)inode->i_private; @@ -2061,7 +2061,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer, DEBUGASSERT(inode && inode->i_private); priv = (FAR struct mmcsd_state_s *)inode->i_private; - fvdbg("startsector: %d nsectors: %d sectorsize: %d\n", + finfo("startsector: %d nsectors: %d sectorsize: %d\n", startsector, nsectors, priv->blocksize); if (nsectors > 0) @@ -2137,7 +2137,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode, FAR const unsigned char *buf DEBUGASSERT(inode && inode->i_private); priv = (FAR struct mmcsd_state_s *)inode->i_private; - fvdbg("sector: %lu nsectors: %u sectorsize: %u\n", + finfo("sector: %lu nsectors: %u sectorsize: %u\n", (unsigned long)startsector, nsectors, priv->blocksize); mmcsd_takesem(priv); @@ -2200,7 +2200,7 @@ static int mmcsd_geometry(FAR struct inode *inode, struct geometry *geometry) FAR struct mmcsd_state_s *priv; int ret = -EINVAL; - fvdbg("Entry\n"); + finfo("Entry\n"); DEBUGASSERT(inode && inode->i_private); if (geometry) @@ -2213,7 +2213,7 @@ static int mmcsd_geometry(FAR struct inode *inode, struct geometry *geometry) { /* No.. return ENODEV */ - fvdbg("IS_EMPTY\n"); + finfo("IS_EMPTY\n"); ret = -ENODEV; } else @@ -2230,10 +2230,10 @@ static int mmcsd_geometry(FAR struct inode *inode, struct geometry *geometry) geometry->geo_nsectors = priv->nblocks; geometry->geo_sectorsize = priv->blocksize; - fvdbg("available: true mediachanged: %s writeenabled: %s\n", + finfo("available: true mediachanged: %s writeenabled: %s\n", geometry->geo_mediachanged ? "true" : "false", geometry->geo_writeenabled ? "true" : "false"); - fvdbg("nsectors: %lu sectorsize: %d\n", + finfo("nsectors: %lu sectorsize: %d\n", (long)geometry->geo_nsectors, geometry->geo_sectorsize); priv->mediachanged = false; @@ -2258,7 +2258,7 @@ static int mmcsd_ioctl(FAR struct inode *inode, int cmd, unsigned long arg) FAR struct mmcsd_state_s *priv; int ret; - fvdbg("Entry\n"); + finfo("Entry\n"); DEBUGASSERT(inode && inode->i_private); priv = (FAR struct mmcsd_state_s *)inode->i_private; @@ -2269,28 +2269,28 @@ static int mmcsd_ioctl(FAR struct inode *inode, int cmd, unsigned long arg) { case BIOC_PROBE: /* Check for media in the slot */ { - fvdbg("BIOC_PROBE\n"); + finfo("BIOC_PROBE\n"); /* Probe the MMC/SD slot for media */ ret = mmcsd_probe(priv); if (ret != OK) { - fdbg("ERROR: mmcsd_probe failed: %d\n", ret); + ferr("ERROR: mmcsd_probe failed: %d\n", ret); } } break; case BIOC_EJECT: /* Media has been removed from the slot */ { - fvdbg("BIOC_EJECT\n"); + finfo("BIOC_EJECT\n"); /* Process the removal of the card */ ret = mmcsd_removed(priv); if (ret != OK) { - fdbg("ERROR: mmcsd_removed failed: %d\n", ret); + ferr("ERROR: mmcsd_removed failed: %d\n", ret); } /* Enable logic to detect if a card is re-inserted */ @@ -2330,7 +2330,7 @@ static void mmcsd_mediachange(FAR void *arg) { FAR struct mmcsd_state_s *priv = (FAR struct mmcsd_state_s *)arg; - fvdbg("arg: %p\n", arg); + finfo("arg: %p\n", arg); DEBUGASSERT(priv); /* Is there a card present in the slot? */ @@ -2396,7 +2396,7 @@ static int mmcsd_widebus(FAR struct mmcsd_state_s *priv) ret = mmcsd_recvR1(priv, SD_CMD55); if (ret != OK) { - fdbg("ERROR: RECVR1 for CMD55 of ACMD42: %d\n", ret); + ferr("ERROR: RECVR1 for CMD55 of ACMD42: %d\n", ret); return ret; } @@ -2411,7 +2411,7 @@ static int mmcsd_widebus(FAR struct mmcsd_state_s *priv) ret = mmcsd_recvR1(priv, SD_ACMD42); if (ret != OK) { - fvdbg("WARNING: SD card does not support ACMD42: %d\n", ret); + fwarn("WARNING: SD card does not support ACMD42: %d\n", ret); return ret; } @@ -2423,7 +2423,7 @@ static int mmcsd_widebus(FAR struct mmcsd_state_s *priv) ret = mmcsd_recvR1(priv, SD_CMD55); if (ret != OK) { - fdbg("ERROR: RECVR1 for CMD55 of ACMD6: %d\n", ret); + ferr("ERROR: RECVR1 for CMD55 of ACMD6: %d\n", ret); return ret; } @@ -2438,7 +2438,7 @@ static int mmcsd_widebus(FAR struct mmcsd_state_s *priv) /* Configure the SDIO peripheral */ - fvdbg("Wide bus operation selected\n"); + finfo("Wide bus operation selected\n"); SDIO_WIDEBUS(priv->dev, true); priv->widebus = true; @@ -2449,12 +2449,12 @@ static int mmcsd_widebus(FAR struct mmcsd_state_s *priv) /* Wide bus operation not supported */ - fdbg("WARNING: Card does not support wide-bus operation\n"); + fwarn("WARNING: Card does not support wide-bus operation\n"); return -ENOSYS; #else /* CONFIG_SDIO_WIDTH_D1_ONLY */ - fvdbg("Wide-bus operation is disabled\n"); + finfo("Wide-bus operation is disabled\n"); return -ENOSYS; #endif /* CONFIG_SDIO_WIDTH_D1_ONLY */ @@ -2492,7 +2492,7 @@ static int mmcsd_mmcinitialize(FAR struct mmcsd_state_s *priv) ret = SDIO_RECVR2(priv->dev, MMCSD_CMD2, cid); if (ret != OK) { - fdbg("ERROR: SDIO_RECVR2 for MMC CID failed: %d\n", ret); + ferr("ERROR: SDIO_RECVR2 for MMC CID failed: %d\n", ret); return ret; } @@ -2508,7 +2508,7 @@ static int mmcsd_mmcinitialize(FAR struct mmcsd_state_s *priv) ret = mmcsd_recvR1(priv, MMC_CMD3); if (ret != OK) { - fdbg("ERROR: mmcsd_recvR1(CMD3) failed: %d\n", ret); + ferr("ERROR: mmcsd_recvR1(CMD3) failed: %d\n", ret); return ret; } @@ -2522,7 +2522,7 @@ static int mmcsd_mmcinitialize(FAR struct mmcsd_state_s *priv) ret = mmcsd_verifystate(priv, MMCSD_R1_STATE_STBY); if (ret != OK) { - fdbg("ERROR: Failed to enter standby state\n"); + ferr("ERROR: Failed to enter standby state\n"); return ret; } @@ -2535,7 +2535,7 @@ static int mmcsd_mmcinitialize(FAR struct mmcsd_state_s *priv) ret = SDIO_RECVR2(priv->dev, MMCSD_CMD9, csd); if (ret != OK) { - fdbg("ERROR: Could not get SD CSD register: %d\n", ret); + ferr("ERROR: Could not get SD CSD register: %d\n", ret); return ret; } @@ -2593,7 +2593,7 @@ static int mmcsd_sdinitialize(FAR struct mmcsd_state_s *priv) ret = SDIO_RECVR2(priv->dev, MMCSD_CMD2, cid); if (ret != OK) { - fdbg("ERROR: SDIO_RECVR2 for SD CID failed: %d\n", ret); + ferr("ERROR: SDIO_RECVR2 for SD CID failed: %d\n", ret); return ret; } @@ -2611,11 +2611,11 @@ static int mmcsd_sdinitialize(FAR struct mmcsd_state_s *priv) ret = mmcsd_recvR6(priv, SD_CMD3); if (ret != OK) { - fdbg("ERROR: mmcsd_recvR2 for SD RCA failed: %d\n", ret); + ferr("ERROR: mmcsd_recvR2 for SD RCA failed: %d\n", ret); return ret; } - fvdbg("RCA: %04x\n", priv->rca); + finfo("RCA: %04x\n", priv->rca); /* This should have caused a transition to standby state. However, this will * not be reflected in the present R1 status. R1/6 contains the state of @@ -2627,7 +2627,7 @@ static int mmcsd_sdinitialize(FAR struct mmcsd_state_s *priv) ret = mmcsd_verifystate(priv, MMCSD_R1_STATE_STBY); if (ret != OK) { - fdbg("ERROR: Failed to enter standby state\n"); + ferr("ERROR: Failed to enter standby state\n"); return ret; } @@ -2641,7 +2641,7 @@ static int mmcsd_sdinitialize(FAR struct mmcsd_state_s *priv) ret = SDIO_RECVR2(priv->dev, MMCSD_CMD9, csd); if (ret != OK) { - fdbg("ERROR: Could not get SD CSD register(%d)\n", ret); + ferr("ERROR: Could not get SD CSD register(%d)\n", ret); return ret; } @@ -2656,7 +2656,7 @@ static int mmcsd_sdinitialize(FAR struct mmcsd_state_s *priv) ret = mmcsd_recvR1(priv, MMCSD_CMD7S); if (ret != OK) { - fdbg("ERROR: mmcsd_recvR1 for CMD7 failed: %d\n", ret); + ferr("ERROR: mmcsd_recvR1 for CMD7 failed: %d\n", ret); return ret; } @@ -2680,7 +2680,7 @@ static int mmcsd_sdinitialize(FAR struct mmcsd_state_s *priv) ret = mmcsd_getSCR(priv, scr); if (ret != OK) { - fdbg("ERROR: Could not get SD SCR register(%d)\n", ret); + ferr("ERROR: Could not get SD SCR register(%d)\n", ret); return ret; } @@ -2691,7 +2691,7 @@ static int mmcsd_sdinitialize(FAR struct mmcsd_state_s *priv) ret = mmcsd_widebus(priv); if (ret != OK) { - fdbg("WARN: Failed to set wide bus operation: %d\n", ret); + ferr("ERROR: Failed to set wide bus operation: %d\n", ret); } /* TODO: If wide-bus selected, then send CMD6 to see if the card supports @@ -2729,7 +2729,7 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv) if (!SDIO_PRESENT(priv->dev)) { - fvdbg("No card present\n"); + finfo("No card present\n"); return -ENODEV; } @@ -2779,13 +2779,13 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv) if (((response & MMCSD_R7VOLTAGE_MASK) == MMCSD_R7VOLTAGE_27) && ((response & MMCSD_R7ECHO_MASK) == MMCSD_R7CHECKPATTERN)) { - fvdbg("SD V2.x card\n"); + finfo("SD V2.x card\n"); priv->type = MMCSD_CARDTYPE_SDV2; sdcapacity = MMCSD_ACMD41_HIGHCAPACITY; } else { - fdbg("ERROR: R7: %08x\n", response); + ferr("ERROR: R7: %08x\n", response); return -EIO; } } @@ -2820,7 +2820,7 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv) * the MMC vs. SD decision based on CMD1 and ACMD41. */ - fdbg("ERROR: mmcsd_recvR1(CMD55) failed: %d\n", ret); + ferr("ERROR: mmcsd_recvR1(CMD55) failed: %d\n", ret); } else { @@ -2835,7 +2835,7 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv) * but we will make the decision based on CMD1 below */ - fdbg("ERROR: ACMD41 RECVR3: %d\n", ret); + ferr("ERROR: ACMD41 RECVR3: %d\n", ret); } else { @@ -2844,10 +2844,10 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv) * an SD V2.x (via CMD8), then this must be SD V1.x */ - fvdbg("R3: %08x\n", response); + finfo("R3: %08x\n", response); if (priv->type == MMCSD_CARDTYPE_UNKNOWN) { - fvdbg("SD V1.x card\n"); + finfo("SD V1.x card\n"); priv->type = MMCSD_CARDTYPE_SDV1; } @@ -2869,7 +2869,7 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv) if ((response & MMCSD_R3_HIGHCAPACITY) != 0) { - fvdbg("SD V2.x card with block addressing\n"); + finfo("SD V2.x card with block addressing\n"); DEBUGASSERT(priv->type == MMCSD_CARDTYPE_SDV2); priv->type |= MMCSD_CARDTYPE_BLOCK; } @@ -2912,13 +2912,13 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv) if (ret != OK) { - fdbg("ERROR: CMD1 RECVR3: %d\n", ret); + ferr("ERROR: CMD1 RECVR3: %d\n", ret); } else { /* CMD1 succeeded... this must be an MMC card */ - fdbg("CMD1 succeeded, assuming MMC card\n"); + finfo("CMD1 succeeded, assuming MMC card\n"); priv->type = MMCSD_CARDTYPE_MMC; /* Check if the card is busy. Very confusing, BUSY is set LOW @@ -2955,7 +2955,7 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv) if (elapsed >= TICK_PER_SEC || priv->type == MMCSD_CARDTYPE_UNKNOWN) { - fdbg("ERROR: Failed to identify card\n"); + ferr("ERROR: Failed to identify card\n"); return -EIO; } @@ -2977,7 +2977,7 @@ static int mmcsd_probe(FAR struct mmcsd_state_s *priv) { int ret; - fvdbg("type: %d probed: %d\n", priv->type, priv->probed); + finfo("type: %d probed: %d\n", priv->type, priv->probed); /* If we have reliable card detection events and if we have * already probed the card, then we don't need to do anything @@ -3010,7 +3010,7 @@ static int mmcsd_probe(FAR struct mmcsd_state_s *priv) ret = mmcsd_cardidentify(priv); if (ret != OK) { - fdbg("ERROR: Failed to initialize card: %d\n", ret); + ferr("ERROR: Failed to initialize card: %d\n", ret); #ifdef CONFIG_MMCSD_HAVECARDDETECT SDIO_CALLBACKENABLE(priv->dev, SDIOMEDIA_INSERTED); #endif @@ -3034,7 +3034,7 @@ static int mmcsd_probe(FAR struct mmcsd_state_s *priv) #endif case MMCSD_CARDTYPE_UNKNOWN: /* Unknown card type */ default: - fdbg("ERROR: Internal confusion: %d\n", priv->type); + ferr("ERROR: Internal confusion: %d\n", priv->type); ret = -EPERM; break; } @@ -3045,7 +3045,7 @@ static int mmcsd_probe(FAR struct mmcsd_state_s *priv) { /* Yes... */ - fvdbg("Capacity: %lu Kbytes\n", (unsigned long)(priv->capacity / 1024)); + finfo("Capacity: %lu Kbytes\n", (unsigned long)(priv->capacity / 1024)); priv->mediachanged = true; /* Set up to receive asynchronous, media removal events */ @@ -3066,7 +3066,7 @@ static int mmcsd_probe(FAR struct mmcsd_state_s *priv) { /* There is no card in the slot */ - fvdbg("No card\n"); + finfo("No card\n"); #ifdef CONFIG_MMCSD_HAVECARDDETECT SDIO_CALLBACKENABLE(priv->dev, SDIOMEDIA_INSERTED); #endif @@ -3088,7 +3088,7 @@ static int mmcsd_probe(FAR struct mmcsd_state_s *priv) static int mmcsd_removed(FAR struct mmcsd_state_s *priv) { - fvdbg("type: %d present: %d\n", priv->type, SDIO_PRESENT(priv->dev)); + finfo("type: %d present: %d\n", priv->type, SDIO_PRESENT(priv->dev)); /* Forget the card geometry, pretend the slot is empty (it might not * be), and that the card has never been initialized. @@ -3131,19 +3131,19 @@ static int mmcsd_hwinitialize(FAR struct mmcsd_state_s *priv) /* Does this architecture support DMA with the MMC/SD device? */ priv->dma = SDIO_DMASUPPORTED(priv->dev); - fvdbg("DMA supported: %d\n", priv->dma); + finfo("DMA supported: %d\n", priv->dma); #endif /* Attach and prepare MMC/SD interrupts */ if (SDIO_ATTACH(priv->dev)) { - fdbg("ERROR: Unable to attach MMC/SD interrupts\n"); + ferr("ERROR: Unable to attach MMC/SD interrupts\n"); mmcsd_givesem(priv); return -EBUSY; } - fvdbg("Attached MMC/SD interrupts\n"); + finfo("Attached MMC/SD interrupts\n"); /* Register a callback so that we get informed if media is inserted or * removed from the slot (Initially all callbacks are disabled). @@ -3174,7 +3174,7 @@ static int mmcsd_hwinitialize(FAR struct mmcsd_state_s *priv) ret = mmcsd_probe(priv); if (ret != OK) { - fvdbg("Slot not empty, but initialization failed: %d\n", ret); + finfo("Slot not empty, but initialization failed: %d\n", ret); /* NOTE: The failure to initialize a card does not mean that * initialization has failed! A card could be installed in the slot @@ -3247,11 +3247,11 @@ int mmcsd_slotinitialize(int minor, FAR struct sdio_dev_s *dev) char devname[16]; int ret = -ENOMEM; - fvdbg("minor: %d\n", minor); + finfo("minor: %d\n", minor); /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (minor < 0 || minor > 255 || !dev) { return -EINVAL; @@ -3293,13 +3293,13 @@ int mmcsd_slotinitialize(int minor, FAR struct sdio_dev_s *dev) SDIO_CALLBACKENABLE(priv->dev, SDIOMEDIA_INSERTED); - fvdbg("MMC/SD slot is empty\n"); + finfo("MMC/SD slot is empty\n"); } else { /* Some other non-recoverable bad thing happened */ - fdbg("ERROR: Failed to initialize MMC/SD slot: %d\n", ret); + ferr("ERROR: Failed to initialize MMC/SD slot: %d\n", ret); goto errout_with_alloc; } } @@ -3311,7 +3311,7 @@ int mmcsd_slotinitialize(int minor, FAR struct sdio_dev_s *dev) ret = rwb_initialize(&priv->rwbuffer); if (ret < 0) { - fdbg("ERROR: Buffer setup failed: %d\n", ret); + ferr("ERROR: Buffer setup failed: %d\n", ret); goto errout_with_hwinit; } #endif @@ -3325,7 +3325,7 @@ int mmcsd_slotinitialize(int minor, FAR struct sdio_dev_s *dev) ret = register_blockdriver(devname, &g_bops, 0, priv); if (ret < 0) { - fdbg("ERROR: register_blockdriver failed: %d\n", ret); + ferr("ERROR: register_blockdriver failed: %d\n", ret); goto errout_with_buffers; } } diff --git a/drivers/mmcsd/mmcsd_spi.c b/drivers/mmcsd/mmcsd_spi.c index 9a44011f424566007a9ce7812acb4ae61f49c2d7..2a4cdee73dd314493a4cee5c0208edb692d1b00f 100644 --- a/drivers/mmcsd/mmcsd_spi.c +++ b/drivers/mmcsd/mmcsd_spi.c @@ -431,7 +431,7 @@ static int mmcsd_waitready(FAR struct mmcsd_slot_s *slot) } while (elapsed < MMCSD_DELAY_500MS); - fdbg("Card still busy, last response: %02x\n", response); + finfo("Card still busy, last response: %02x\n", response); return -EBUSY; } @@ -504,7 +504,7 @@ static uint32_t mmcsd_sendcmd(FAR struct mmcsd_slot_s *slot, if ((response & 0x80) != 0) { - fdbg("Failed: i=%d response=%02x\n", i, response); + ferr("ERROR: Failed: i=%d response=%02x\n", i, response); return (uint32_t)-1; } @@ -531,11 +531,11 @@ static uint32_t mmcsd_sendcmd(FAR struct mmcsd_slot_s *slot, if (busy != 0xff) { - fdbg("Failed: card still busy (%02x)\n", busy); + ferr("ERROR: Failed: card still busy (%02x)\n", busy); return (uint32_t)-1; } - fvdbg("CMD%d[%08x] R1B=%02x\n", + finfo("CMD%d[%08x] R1B=%02x\n", cmd->cmd & 0x3f, arg, response); } break; @@ -544,7 +544,7 @@ static uint32_t mmcsd_sendcmd(FAR struct mmcsd_slot_s *slot, case MMCSD_CMDRESP_R1: { - fvdbg("CMD%d[%08x] R1=%02x\n", + finfo("CMD%d[%08x] R1=%02x\n", cmd->cmd & 0x3f, arg, response); } break; @@ -556,7 +556,7 @@ static uint32_t mmcsd_sendcmd(FAR struct mmcsd_slot_s *slot, result = ((uint32_t)(response & 0xff) << 8); result |= SPI_SEND(spi, 0xff) & 0xff; - fvdbg("CMD%d[%08x] R2=%04x\n", + finfo("CMD%d[%08x] R2=%04x\n", cmd->cmd & 0x3f, arg, result); } break; @@ -570,7 +570,7 @@ static uint32_t mmcsd_sendcmd(FAR struct mmcsd_slot_s *slot, slot->ocr |= ((uint32_t)(SPI_SEND(spi, 0xff) & 0xff) << 8); slot->ocr |= SPI_SEND(spi, 0xff) & 0xff; - fvdbg("CMD%d[%08x] R1=%02x OCR=%08x\n", + finfo("CMD%d[%08x] R1=%02x OCR=%08x\n", cmd->cmd & 0x3f, arg, response, slot->ocr); } break; @@ -585,7 +585,7 @@ static uint32_t mmcsd_sendcmd(FAR struct mmcsd_slot_s *slot, slot->r7 |= ((uint32_t)(SPI_SEND(spi, 0xff) & 0xff) << 8); slot->r7 |= SPI_SEND(spi, 0xff) & 0xff; - fvdbg("CMD%d[%08x] R1=%02x R7=%08x\n", + finfo("CMD%d[%08x] R1=%02x R7=%08x\n", cmd->cmd & 0x3f, arg, response, slot->r7); } break; @@ -609,11 +609,11 @@ static void mmcsd_setblklen(FAR struct mmcsd_slot_s *slot, uint32_t length) { uint32_t response; - fvdbg("Set block length to %d\n", length); + finfo("Set block length to %d\n", length); response = mmcsd_sendcmd(slot, &g_cmd16, length); if (response != MMCSD_SPIR1_OK) { - fdbg("Failed to set block length: %02x\n", response); + ferr("ERROR: Failed to set block length: %02x\n", response); } } @@ -750,11 +750,11 @@ static void mmcsd_decodecsd(FAR struct mmcsd_slot_s *slot, uint8_t *csd) slot->twrite = SD_WRITEACCESS; } - fvdbg("SPI Frequency\n"); - fvdbg(" Maximum: %d Hz\n", maxfrequency); - fvdbg(" Actual: %d Hz\n", frequency); - fvdbg("Read access time: %d ticks\n", slot->taccess); - fvdbg("Write access time: %d ticks\n", slot->twrite); + finfo("SPI Frequency\n"); + finfo(" Maximum: %d Hz\n", maxfrequency); + finfo(" Actual: %d Hz\n", frequency); + finfo("Read access time: %d ticks\n", slot->taccess); + finfo("Write access time: %d ticks\n", slot->twrite); /* Get the physical geometry of the card: sector size and number of * sectors. The card's total capacity is computed from @@ -813,7 +813,7 @@ static void mmcsd_decodecsd(FAR struct mmcsd_slot_s *slot, uint8_t *csd) { if (readbllen > 9) { - fdbg("Forcing 512 byte sector size\n"); + fwarn("WARNING: Forcing 512 byte sector size\n"); csizemult += (readbllen - 9); readbllen = 9; } @@ -822,8 +822,8 @@ static void mmcsd_decodecsd(FAR struct mmcsd_slot_s *slot, uint8_t *csd) slot->sectorsize = 1 << readbllen; #endif slot->nsectors = csize << csizemult; - fvdbg("Sector size: %d\n", SECTORSIZE(slot)); - fvdbg("Number of sectors: %d\n", slot->nsectors); + finfo("Sector size: %d\n", SECTORSIZE(slot)); + finfo("Number of sectors: %d\n", slot->nsectors); } /**************************************************************************** @@ -880,7 +880,7 @@ static int mmcsd_getcardinfo(FAR struct mmcsd_slot_s *slot, uint8_t *buffer, result = mmcsd_sendcmd(slot, cmd, 0); if (result != MMCSD_SPIR1_OK) { - fdbg("CMD9/10 failed: R1=%02x\n", result); + ferr("ERROR: CMD9/10 failed: R1=%02x\n", result); return -EIO; } @@ -889,7 +889,7 @@ static int mmcsd_getcardinfo(FAR struct mmcsd_slot_s *slot, uint8_t *buffer, for (i = 0; i < 8; i++) { response = SPI_SEND(spi, 0xff); - fvdbg("%d. SPI send returned %02x\n", i, response); + finfo("%d. SPI send returned %02x\n", i, response); /* If a read operation fails and the card cannot provide the requested * data, it will send a data error token instead. The 4 least @@ -898,7 +898,7 @@ static int mmcsd_getcardinfo(FAR struct mmcsd_slot_s *slot, uint8_t *buffer, if (response != 0 && (response & MMCSD_SPIDET_UPPER) == 0) { - fdbg("%d. Data transfer error: %02x\n", i, response); + ferr("ERROR: %d. Data transfer error: %02x\n", i, response); return -EIO; } else if (response == MMCSD_SPIDT_STARTBLKSNGL) @@ -916,7 +916,7 @@ static int mmcsd_getcardinfo(FAR struct mmcsd_slot_s *slot, uint8_t *buffer, } } - fdbg("%d. Did not find start of block\n"); + ferr("ERROR: %d. Did not find start of block\n"); return -EIO; } @@ -960,7 +960,7 @@ static int mmcsd_recvblock(FAR struct mmcsd_slot_s *slot, uint8_t *buffer, return OK; } - fdbg("Did not receive data token (%02x)\n", token); + ferr("ERROR: Did not receive data token (%02x)\n", token); return ERROR; } @@ -1004,7 +1004,7 @@ static int mmcsd_xmitblock(FAR struct mmcsd_slot_s *slot, response = SPI_SEND(spi, 0xff); if ((response & MMCSD_SPIDR_MASK) != MMCSD_SPIDR_ACCEPTED) { - fdbg("Bad data response: %02x\n", response); + ferr("ERROR: Bad data response: %02x\n", response); return -EIO; } @@ -1029,12 +1029,12 @@ static int mmcsd_open(FAR struct inode *inode) FAR struct spi_dev_s *spi; int ret; - fvdbg("Entry\n"); + finfo("Entry\n"); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!inode || !inode->i_private) { - fdbg("Internal confusion\n"); + ferr("ERROR: Internal confusion\n"); return -EIO; } #endif @@ -1044,10 +1044,10 @@ static int mmcsd_open(FAR struct inode *inode) slot = (FAR struct mmcsd_slot_s *)inode->i_private; spi = slot->spi; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!spi) { - fdbg("Internal confusion\n"); + ferr("ERROR: Internal confusion\n"); return -EIO; } #endif @@ -1067,7 +1067,7 @@ static int mmcsd_open(FAR struct inode *inode) ret = mmcsd_mediainitialize(slot); if (ret < 0) { - fvdbg("Failed to initialize card\n"); + finfo("Failed to initialize card\n"); goto errout_with_sem; } } @@ -1093,7 +1093,7 @@ errout_with_sem: static int mmcsd_close(FAR struct inode *inode) { - fvdbg("Entry\n"); + finfo("Entry\n"); return OK; } @@ -1114,18 +1114,18 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer, uint8_t response; int i; - fvdbg("start_sector=%d nsectors=%d\n", start_sector, nsectors); + finfo("start_sector=%d nsectors=%d\n", start_sector, nsectors); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!buffer) { - fdbg("Invalid parameters\n"); + ferr("ERROR: Invalid parameters\n"); return -EINVAL; } if (!inode || !inode->i_private) { - fdbg("Internal confusion\n"); + ferr("ERROR: Internal confusion\n"); return -EIO; } #endif @@ -1135,10 +1135,10 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer, slot = (FAR struct mmcsd_slot_s *)inode->i_private; spi = slot->spi; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!spi) { - fdbg("Internal confusion\n"); + ferr("ERROR: Internal confusion\n"); return -EIO; } #endif @@ -1147,7 +1147,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer, if (slot->state & MMCSD_SLOTSTATUS_NOTREADY) { - fdbg("Slot not ready\n"); + ferr("ERROR: Slot not ready\n"); return -ENODEV; } @@ -1166,12 +1166,12 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer, if (IS_BLOCK(slot->type)) { offset = start_sector; - fvdbg("nbytes=%d sector offset=%d\n", nbytes, offset); + finfo("nbytes=%d sector offset=%d\n", nbytes, offset); } else { offset = start_sector * SECTORSIZE(slot); - fvdbg("nbytes=%d byte offset=%d\n", nbytes, offset); + finfo("nbytes=%d byte offset=%d\n", nbytes, offset); } /* Select the slave */ @@ -1190,7 +1190,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer, response = mmcsd_sendcmd(slot, &g_cmd17, offset); if (response != MMCSD_SPIR1_OK) { - fdbg("CMD17 failed: R1=%02x\n", response); + ferr("ERROR: CMD17 failed: R1=%02x\n", response); goto errout_with_eio; } @@ -1198,7 +1198,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer, if (mmcsd_recvblock(slot, buffer, SECTORSIZE(slot)) != 0) { - fdbg("Failed: to receive the block\n"); + ferr("ERROR: Failed: to receive the block\n"); goto errout_with_eio; } } @@ -1211,7 +1211,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer, response = mmcsd_sendcmd(slot, &g_cmd18, offset); if (response != MMCSD_SPIR1_OK) { - fdbg("CMD18 failed: R1=%02x\n", response); + ferr("ERROR: CMD18 failed: R1=%02x\n", response); goto errout_with_eio; } @@ -1221,7 +1221,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer, { if (mmcsd_recvblock(slot, buffer, SECTORSIZE(slot)) != 0) { - fdbg("Failed: to receive the block\n"); + ferr("ERROR: Failed: to receive the block\n"); goto errout_with_eio; } @@ -1239,7 +1239,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer, SPI_SEND(spi, 0xff); mmcsd_semgive(slot); - fvdbg("Read %d bytes:\n", nbytes); + finfo("Read %d bytes:\n", nbytes); mmcsd_dumpbuffer("Read buffer", buffer, nbytes); return nsectors; @@ -1268,18 +1268,18 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer, uint8_t response; int i; - fvdbg("start_sector=%d nsectors=%d\n", start_sector, nsectors); + finfo("start_sector=%d nsectors=%d\n", start_sector, nsectors); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!buffer) { - fdbg("Invalid parameters\n"); + ferr("ERROR: Invalid parameters\n"); return -EINVAL; } if (!inode || !inode->i_private) { - fdbg("Internal confusion\n"); + ferr("ERROR: Internal confusion\n"); return -EIO; } #endif @@ -1289,10 +1289,10 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer, slot = (FAR struct mmcsd_slot_s *)inode->i_private; spi = slot->spi; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!spi) { - fdbg("Internal confusion\n"); + ferr("ERROR: Internal confusion\n"); return -EIO; } #endif @@ -1301,7 +1301,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer, if (slot->state & MMCSD_SLOTSTATUS_NOTREADY) { - fdbg("Slot not ready\n"); + ferr("ERROR: Slot not ready\n"); return -ENODEV; } @@ -1309,7 +1309,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer, if (slot->state & MMCSD_SLOTSTATUS_WRPROTECT) { - fdbg("Not write enabled\n"); + ferr("ERROR: Not write enabled\n"); return -EACCES; } @@ -1328,12 +1328,12 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer, if (IS_BLOCK(slot->type)) { offset = start_sector; - fvdbg("nbytes=%d sector offset=%d\n", nbytes, offset); + finfo("nbytes=%d sector offset=%d\n", nbytes, offset); } else { offset = start_sector * SECTORSIZE(slot); - fvdbg("nbytes=%d byte offset=%d\n", nbytes, offset); + finfo("nbytes=%d byte offset=%d\n", nbytes, offset); } mmcsd_dumpbuffer("Write buffer", buffer, nbytes); @@ -1352,7 +1352,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer, response = mmcsd_sendcmd(slot, &g_cmd24, offset); if (response != MMCSD_SPIR1_OK) { - fdbg("CMD24 failed: R1=%02x\n", response); + ferr("ERROR: CMD24 failed: R1=%02x\n", response); goto errout_with_sem; } @@ -1360,7 +1360,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer, if (mmcsd_xmitblock(slot, buffer, SECTORSIZE(slot), 0xfe) != 0) { - fdbg("Block transfer failed\n"); + ferr("ERROR: Block transfer failed\n"); goto errout_with_sem; } } @@ -1373,14 +1373,14 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer, response = mmcsd_sendcmd(slot, &g_cmd55, 0); if (response != MMCSD_SPIR1_OK) { - fdbg("CMD55 failed: R1=%02x\n", response); + ferr("ERROR: CMD55 failed: R1=%02x\n", response); goto errout_with_sem; } response = mmcsd_sendcmd(slot, &g_acmd23, nsectors); if (response != MMCSD_SPIR1_OK) { - fdbg("ACMD23 failed: R1=%02x\n", response); + ferr("ERROR: ACMD23 failed: R1=%02x\n", response); goto errout_with_sem; } } @@ -1392,7 +1392,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer, response = mmcsd_sendcmd(slot, &g_cmd25, offset); if (response != MMCSD_SPIR1_OK) { - fdbg("CMD25 failed: R1=%02x\n", response); + ferr("ERROR: CMD25 failed: R1=%02x\n", response); goto errout_with_sem; } @@ -1402,14 +1402,14 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer, { if (mmcsd_xmitblock(slot, buffer, SECTORSIZE(slot), 0xfc) != 0) { - fdbg("Failed: to receive the block\n"); + ferr("ERROR: Failed: to receive the block\n"); goto errout_with_sem; } buffer += SECTORSIZE(slot); if (mmcsd_waitready(slot) != OK) { - fdbg("Failed: card is busy\n"); + ferr("ERROR: Failed: card is busy\n"); goto errout_with_sem; } } @@ -1452,16 +1452,16 @@ static int mmcsd_geometry(FAR struct inode *inode, struct geometry *geometry) uint8_t csd[16]; int ret; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!geometry) { - fdbg("Invalid parameters\n"); + ferr("ERROR: Invalid parameters\n"); return -EINVAL; } if (!inode || !inode->i_private) { - fdbg("Internal confusion\n"); + ferr("ERROR: Internal confusion\n"); return -EIO; } #endif @@ -1471,10 +1471,10 @@ static int mmcsd_geometry(FAR struct inode *inode, struct geometry *geometry) slot = (FAR struct mmcsd_slot_s *)inode->i_private; spi = slot->spi; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!spi) { - fdbg("Internal confusion\n"); + ferr("ERROR: Internal confusion\n"); return -EIO; } #endif @@ -1489,7 +1489,7 @@ static int mmcsd_geometry(FAR struct inode *inode, struct geometry *geometry) if (ret < 0) { mmcsd_semgive(slot); - fdbg("mmcsd_getcsd returned %d\n", ret); + ferr("ERROR: mmcsd_getcsd returned %d\n", ret); return ret; } @@ -1519,11 +1519,11 @@ static int mmcsd_geometry(FAR struct inode *inode, struct geometry *geometry) slot->state &= ~MMCSD_SLOTSTATUS_MEDIACHGD; mmcsd_semgive(slot); - fvdbg("geo_available: %d\n", geometry->geo_available); - fvdbg("geo_mediachanged: %d\n", geometry->geo_mediachanged); - fvdbg("geo_writeenabled: %d\n", geometry->geo_writeenabled); - fvdbg("geo_nsectors: %d\n", geometry->geo_nsectors); - fvdbg("geo_sectorsize: %d\n", geometry->geo_sectorsize); + finfo("geo_available: %d\n", geometry->geo_available); + finfo("geo_mediachanged: %d\n", geometry->geo_mediachanged); + finfo("geo_writeenabled: %d\n", geometry->geo_writeenabled); + finfo("geo_nsectors: %d\n", geometry->geo_nsectors); + finfo("geo_sectorsize: %d\n", geometry->geo_sectorsize); return OK; } @@ -1566,7 +1566,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot) if ((SPI_STATUS(spi, SPIDEV_MMCSD) & SPI_STATUS_PRESENT) == 0) { - fdbg("No card present\n"); + fwarn("WARNING: No card present\n"); slot->state |= MMCSD_SLOTSTATUS_NODISK; return -ENODEV; } @@ -1601,14 +1601,14 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot) * show IDLE STATE */ - fvdbg("Send CMD0\n"); + finfo("Send CMD0\n"); SPI_SELECT(spi, SPIDEV_MMCSD, true); result = mmcsd_sendcmd(slot, &g_cmd0, 0); if (result == MMCSD_SPIR1_IDLESTATE) { /* Break out of the loop with card selected */ - fvdbg("Card is in IDLE state\n"); + finfo("Card is in IDLE state\n"); break; } @@ -1621,7 +1621,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot) if (result != MMCSD_SPIR1_IDLESTATE) { - fdbg("Send CMD0 failed: R1=%02x\n", result); + ferr("ERROR: Send CMD0 failed: R1=%02x\n", result); SPI_SELECT(spi, SPIDEV_MMCSD, false); mmcsd_semgive(slot); return -EIO; @@ -1633,7 +1633,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot) * MMC. */ - fvdbg("Send CMD8\n"); + finfo("Send CMD8\n"); result = mmcsd_sendcmd(slot, &g_cmd8, 0x1aa); if (result == MMCSD_SPIR1_IDLESTATE) { @@ -1650,7 +1650,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot) elapsed = 0; do { - fvdbg("%d. Send CMD55/ACMD41\n", elapsed); + finfo("%d. Send CMD55/ACMD41\n", elapsed); result = mmcsd_sendcmd(slot, &g_cmd55, 0); if (result == MMCSD_SPIR1_IDLESTATE || result == MMCSD_SPIR1_OK) { @@ -1669,21 +1669,21 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot) if (elapsed < MMCSD_DELAY_1SEC) { - fvdbg("Send CMD58\n"); + finfo("Send CMD58\n"); SPI_SEND(spi, 0xff); result = mmcsd_sendcmd(slot, &g_cmd58, 0); if (result == MMCSD_SPIR1_OK) { - fvdbg("OCR: %08x\n", slot->ocr); + finfo("OCR: %08x\n", slot->ocr); if ((slot->ocr & MMCSD_OCR_CCS) != 0) { - fdbg("Identified SD ver2 card/with block access\n"); + finfo("Identified SD ver2 card/with block access\n"); slot->type = MMCSD_CARDTYPE_SDV2 | MMCSD_CARDTYPE_BLOCK; } else { - fdbg("Identified SD ver2 card\n"); + finfo("Identified SD ver2 card\n"); slot->type = MMCSD_CARDTYPE_SDV2; } } @@ -1697,7 +1697,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot) { /* Both the MMC card and the SD card support CMD55 */ - fvdbg("Send CMD55/ACMD41\n"); + finfo("Send CMD55/ACMD41\n"); result = mmcsd_sendcmd(slot, &g_cmd55, 0); if (result == MMCSD_SPIR1_IDLESTATE || result == MMCSD_SPIR1_OK) { @@ -1706,7 +1706,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot) result = mmcsd_sendcmd(slot, &g_acmd41, 0); if (result == MMCSD_SPIR1_IDLESTATE || result == MMCSD_SPIR1_OK) { - fdbg("Identified SD ver1 card\n"); + finfo("Identified SD ver1 card\n"); slot->type = MMCSD_CARDTYPE_SDV1; } } @@ -1719,7 +1719,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot) { if (IS_SD(slot->type)) { - fvdbg("%d. Send CMD55/ACMD41\n", elapsed); + finfo("%d. Send CMD55/ACMD41\n", elapsed); result = mmcsd_sendcmd(slot, &g_cmd55, 0); if (result == MMCSD_SPIR1_IDLESTATE || result == MMCSD_SPIR1_OK) { @@ -1732,11 +1732,11 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot) } else { - fvdbg("%d. Send CMD1\n", i); + finfo("%d. Send CMD1\n", i); result = mmcsd_sendcmd(slot, &g_cmd1, 0); if (result == MMCSD_SPIR1_OK) { - fdbg("%d. Identified MMC card\n", i); + finfo("%d. Identified MMC card\n", i); slot->type = MMCSD_CARDTYPE_MMC; break; } @@ -1748,7 +1748,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot) if (elapsed >= MMCSD_DELAY_1SEC) { - fdbg("Failed to exit IDLE state\n"); + ferr("ERROR: Failed to exit IDLE state\n"); SPI_SELECT(spi, SPIDEV_MMCSD, false); mmcsd_semgive(slot); return -EIO; @@ -1757,7 +1757,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot) if (slot->type == MMCSD_CARDTYPE_UNKNOWN) { - fdbg("Failed to identify card\n"); + ferr("ERROR: Failed to identify card\n"); SPI_SELECT(spi, SPIDEV_MMCSD, false); mmcsd_semgive(slot); return -EIO; @@ -1765,11 +1765,11 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot) /* Read CSD. CSD must always be valid */ - fvdbg("Get CSD\n"); + finfo("Get CSD\n"); result = mmcsd_getcsd(slot, csd); if (result != OK) { - fdbg("mmcsd_getcsd(CMD9) failed: %d\n", result); + ferr("ERROR: mmcsd_getcsd(CMD9) failed: %d\n", result); SPI_SELECT(spi, SPIDEV_MMCSD, false); mmcsd_semgive(slot); return -EIO; @@ -1833,10 +1833,10 @@ static void mmcsd_mediachanged(void *arg) uint8_t oldstate; int ret; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!slot || !slot->spi) { - fdbg("Internal confusion\n"); + ferr("ERROR: Internal confusion\n"); return; } #endif @@ -1857,7 +1857,7 @@ static void mmcsd_mediachanged(void *arg) { /* Media is not present */ - fdbg("No card present\n"); + fwarn("WARNING: No card present\n"); slot->state |= (MMCSD_SLOTSTATUS_NODISK | MMCSD_SLOTSTATUS_NOTREADY); /* Was media removed? */ @@ -1879,7 +1879,7 @@ static void mmcsd_mediachanged(void *arg) ret = mmcsd_mediainitialize(slot); if (ret == 0) { - fvdbg("mmcsd_mediainitialize returned OK\n"); + finfo("mmcsd_mediainitialize returned OK\n"); slot->state |= MMCSD_SLOTSTATUS_MEDIACHGD; } } @@ -1915,10 +1915,10 @@ int mmcsd_spislotinitialize(int minor, int slotno, FAR struct spi_dev_s *spi) char devname[16]; int ret; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if ((unsigned)slotno >= CONFIG_MMCSD_NSLOTS || (unsigned)minor > 255 || !spi) { - fdbg("Invalid arguments\n"); + ferr("ERROR: Invalid arguments\n"); return -EINVAL; } #endif @@ -1929,10 +1929,10 @@ int mmcsd_spislotinitialize(int minor, int slotno, FAR struct spi_dev_s *spi) memset(slot, 0, sizeof(struct mmcsd_slot_s)); sem_init(&slot->sem, 0, 1); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (slot->spi) { - fdbg("Already registered\n"); + ferr("ERROR: Already registered\n"); return -EBUSY; } #endif @@ -1954,7 +1954,7 @@ int mmcsd_spislotinitialize(int minor, int slotno, FAR struct spi_dev_s *spi) mmcsd_semgive(slot); if (ret == 0) { - fvdbg("mmcsd_mediainitialize returned OK\n"); + finfo("mmcsd_mediainitialize returned OK\n"); slot->state |= MMCSD_SLOTSTATUS_MEDIACHGD; } @@ -1969,7 +1969,7 @@ int mmcsd_spislotinitialize(int minor, int slotno, FAR struct spi_dev_s *spi) ret = register_blockdriver(devname, &g_bops, MMCSD_MODE, slot); if (ret < 0) { - fdbg("register_blockdriver failed: %d\n", -ret); + ferr("ERROR: register_blockdriver failed: %d\n", -ret); slot->spi = NULL; return ret; } diff --git a/drivers/modem/u-blox.c b/drivers/modem/u-blox.c index 05e4453ba963f077f2116cd298656a568d07cbdc..b44b4aea5b0e560607efbd6d0ecd6d28a84945e9 100644 --- a/drivers/modem/u-blox.c +++ b/drivers/modem/u-blox.c @@ -58,15 +58,11 @@ /* Non-standard debug that may be enabled just for testing the modem driver */ #ifdef CONFIG_MODEM_U_BLOX_DEBUG -# define m_dbg dbg -# define m_vdbg vdbg -# define m_vlldbg lldbg -# define m_vllvdbg llvdbg +# define m_err _err +# define m_info _info #else -# define m_dbg(x...) -# define m_vdbg(x...) -# define m_lldbg(x...) -# define m_llvdbg(x...) +# define m_err(x...) +# define m_info(x...) #endif /**************************************************************************** @@ -149,7 +145,7 @@ static int ubxmdm_ioctl(FAR struct file* filep, int ret; FAR struct ubxmdm_status* status; - m_vdbg("cmd: %d arg: %ld\n", cmd, arg); + m_info("cmd: %d arg: %ld\n", cmd, arg); DEBUGASSERT(upper && lower); switch (cmd) @@ -235,7 +231,7 @@ static int ubxmdm_ioctl(FAR struct file* filep, */ default: - m_vdbg("Forwarding unrecognized cmd: %d arg: %ld\n", cmd, arg); + m_info("Forwarding unrecognized cmd: %d arg: %ld\n", cmd, arg); if (lower->ops->ioctl) { @@ -286,7 +282,7 @@ FAR void* ubxmdm_register(FAR const char *path, kmm_zalloc(sizeof(struct ubxmdm_upper)); if (!upper) { - m_dbg("Upper half allocation failed\n"); + m_err("ERROR: Upper half allocation failed\n"); goto errout; } @@ -294,14 +290,14 @@ FAR void* ubxmdm_register(FAR const char *path, upper->path = strdup(path); if (!upper->path) { - m_dbg("Path allocation failed\n"); + m_err("ERROR: Path allocation failed\n"); goto errout_with_upper; } ret = register_driver(path, &ubxmdm_fops, 0666, upper); if (ret < 0) { - m_dbg("register_driver failed: %d\n", ret); + m_err("ERROR: register_driver failed: %d\n", ret); goto errout_with_path; } @@ -326,7 +322,7 @@ void ubxmdm_unregister(FAR void *handle) lower = upper->lower; DEBUGASSERT(upper && lower); - m_vdbg("Unregistering: %s\n", upper->path); + m_info("Unregistering: %s\n", upper->path); DEBUGASSERT(lower->ops->poweroff); (void) lower->ops->poweroff(lower); diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig index a15c01d7f6a2c37295234edb98a4d2b77e5d50fe..44fd420d7ba88067323e6e9c8feb9a6435feda88 100644 --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig @@ -397,6 +397,23 @@ config AT45DB_PWRSAVE endif # MTD_AT45DB +config MTD_IS25XP + bool "SPI-based IS25XP FLASH" + default n + select SPI + +if MTD_IS25XP + +config IS25XP_SPIMODE + int "IS25 SPI Mode" + default 0 + +config IS25XP_SPIFREQUENCY + int "IS25 SPI Frequency" + default 20000000 + +endif # MTD_IS25XP + config MTD_M25P bool "SPI-based M25P FLASH" default n @@ -496,7 +513,7 @@ config MTD_N25QXXX default n ---help--- Support the N25Q016A, N25Q032A, N25Q064A, N25Q128A, N25Q256A - + if MTD_N25QXXX diff --git a/drivers/mtd/Make.defs b/drivers/mtd/Make.defs index 1d1ba6d26b75d6aad733dd93f45b911a1257dca9..9a8396a7fbfae92cb7e62a3d9ae7ffdb11d17a87 100644 --- a/drivers/mtd/Make.defs +++ b/drivers/mtd/Make.defs @@ -39,7 +39,7 @@ ifeq ($(CONFIG_MTD),y) -CSRCS += at45db.c flash_eraseall.c ftl.c m25px.c ramtron.c mtd_config.c +CSRCS += at45db.c ftl.c m25px.c ramtron.c mtd_config.c ifeq ($(CONFIG_MTD_PARTITION),y) CSRCS += mtd_partition.c @@ -112,6 +112,10 @@ ifeq ($(CONFIG_MTD_N25QXXX),y) CSRCS += n25qxxx.c endif +ifeq ($(CONFIG_MTD_IS25XP),y) +CSRCS += is25xp.c +endif + ifeq ($(CONFIG_MTD_SMART),y) ifeq ($(CONFIG_FS_SMARTFS),y) CSRCS += smart.c diff --git a/drivers/mtd/at24xx.c b/drivers/mtd/at24xx.c index 76d2cf2659341ab54208212f18f5fe01f4350960..91c89511932f638159d34990795400fe0e768682 100644 --- a/drivers/mtd/at24xx.c +++ b/drivers/mtd/at24xx.c @@ -302,7 +302,7 @@ static ssize_t at24c_read_internal(FAR struct at24c_dev_s *priv, off_t offset, uint8_t buf[AT24XX_ADDRSIZE]; uint16_t at24addr; - fvdbg("offset: %lu nbytes: %lu address: %02x\n", + finfo("offset: %lu nbytes: %lu address: %02x\n", (unsigned long)offset, (unsigned long)nbytes, address); /* "Random Read: A Random Read requires a dummy byte write sequence to load in the @@ -329,7 +329,7 @@ static ssize_t at24c_read_internal(FAR struct at24c_dev_s *priv, off_t offset, while (at24c_i2c_write(priv, at24addr, buf, AT24XX_ADDRSIZE) < 0) { - fvdbg("wait\n"); + finfo("wait\n"); usleep(1000); } @@ -356,7 +356,7 @@ static ssize_t at24c_bread(FAR struct mtd_dev_s *dev, off_t startblock, nblocks *= (CONFIG_AT24XX_MTD_BLOCKSIZE / AT24XX_PAGESIZE); #endif - fvdbg("startblock: %08lx nblocks: %lu\n", + finfo("startblock: %08lx nblocks: %lu\n", (unsigned long)startblock, (unsigned long)nblocks); if (startblock >= priv->npages) @@ -427,7 +427,7 @@ static ssize_t at24c_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks = priv->npages - startblock; } - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); while (blocksleft-- > 0) { @@ -445,7 +445,7 @@ static ssize_t at24c_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t while (at24c_i2c_write(priv, at24addr, buf, AT24XX_ADDRSIZE) < 0) { - fvdbg("wait\n"); + finfo("wait\n"); usleep(1000); } @@ -474,7 +474,7 @@ static ssize_t at24c_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes size_t memsize; uint8_t addr; - fvdbg("offset: %lu nbytes: %lu\n", (unsigned long)offset, (unsigned long)nbytes); + finfo("offset: %lu nbytes: %lu\n", (unsigned long)offset, (unsigned long)nbytes); /* Don't permit reads beyond the end of the memory region */ @@ -520,7 +520,7 @@ static int at24c_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) FAR struct at24c_dev_s *priv = (FAR struct at24c_dev_s *)dev; int ret = -EINVAL; /* Assume good command with bad parameters */ - fvdbg("cmd: %d \n", cmd); + finfo("cmd: %d \n", cmd); switch (cmd) { @@ -561,7 +561,7 @@ static int at24c_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) #endif ret = OK; - fvdbg("blocksize: %d erasesize: %d neraseblocks: %d\n", + finfo("blocksize: %d erasesize: %d neraseblocks: %d\n", geo->blocksize, geo->erasesize, geo->neraseblocks); } } @@ -610,7 +610,7 @@ FAR struct mtd_dev_s *at24c_initialize(FAR struct i2c_master_s *dev) FAR struct at24c_dev_s *priv; #ifdef CONFIG_AT24XX_MULTI - fvdbg("dev: %p address: %02x\n", dev, address); + finfo("dev: %p address: %02x\n", dev, address); /* Allocate a state structure (we allocate the structure instead of using * a fixed, static allocation so that we can handle multiple FLASH devices. @@ -622,12 +622,12 @@ FAR struct mtd_dev_s *at24c_initialize(FAR struct i2c_master_s *dev) priv = (FAR struct at24c_dev_s *)kmm_zalloc(sizeof(struct at24c_dev_s)); if (priv == NULL) { - fdbg("ERROR: Failed to allocate device structure\n"); + ferr("ERROR: Failed to allocate device structure\n"); return NULL; } #else - fvdbg("dev: %p\n", dev); + finfo("dev: %p\n", dev); /* If only a signal AT24 part is supported then a statically allocated state * structure is used. @@ -669,7 +669,7 @@ FAR struct mtd_dev_s *at24c_initialize(FAR struct i2c_master_s *dev) /* Return the implementation-specific state structure as the MTD device */ - fvdbg("Return %p\n", priv); + finfo("Return %p\n", priv); return (FAR struct mtd_dev_s *)priv; } diff --git a/drivers/mtd/at25.c b/drivers/mtd/at25.c index e085ca8b89bb25de7861e981d34942d31f6f202b..efc2e355a7664767924860efa16fe4e0677a99f7 100644 --- a/drivers/mtd/at25.c +++ b/drivers/mtd/at25.c @@ -213,7 +213,7 @@ static inline int at25_readid(struct at25_dev_s *priv) uint16_t manufacturer; uint16_t memory; - fvdbg("priv: %p\n", priv); + finfo("priv: %p\n", priv); /* Lock the SPI bus, configure the bus, and select this FLASH part. */ @@ -231,7 +231,7 @@ static inline int at25_readid(struct at25_dev_s *priv) SPI_SELECT(priv->dev, SPIDEV_FLASH, false); at25_unlock(priv->dev); - fvdbg("manufacturer: %02x memory: %02x\n", + finfo("manufacturer: %02x memory: %02x\n", manufacturer, memory); /* Check for a valid manufacturer and memory type */ @@ -292,10 +292,10 @@ static void at25_waitwritecomplete(struct at25_dev_s *priv) if (status & AT25_SR_EPE) { - fdbg("ERROR: Write error, status: 0x%02x\n", status); + ferr("ERROR: Write error, status: 0x%02x\n", status); } - fvdbg("Complete, status: 0x%02x\n", status); + finfo("Complete, status: 0x%02x\n", status); } /************************************************************************************ @@ -307,7 +307,7 @@ static void at25_writeenable(struct at25_dev_s *priv) SPI_SELECT(priv->dev, SPIDEV_FLASH, true); (void)SPI_SEND(priv->dev, AT25_WREN); SPI_SELECT(priv->dev, SPIDEV_FLASH, false); - fvdbg("Enabled\n"); + finfo("Enabled\n"); } /************************************************************************************ @@ -318,7 +318,7 @@ static inline void at25_sectorerase(struct at25_dev_s *priv, off_t sector) { off_t offset = sector << priv->sectorshift; - fvdbg("sector: %08lx\n", (long)sector); + finfo("sector: %08lx\n", (long)sector); /* Wait for any preceding write to complete. We could simplify things by * perform this wait at the end of each write operation (rather than at @@ -352,7 +352,7 @@ static inline void at25_sectorerase(struct at25_dev_s *priv, off_t sector) /* Deselect the FLASH */ SPI_SELECT(priv->dev, SPIDEV_FLASH, false); - fvdbg("Erased\n"); + finfo("Erased\n"); } /************************************************************************************ @@ -361,7 +361,7 @@ static inline void at25_sectorerase(struct at25_dev_s *priv, off_t sector) static inline int at25_bulkerase(struct at25_dev_s *priv) { - fvdbg("priv: %p\n", priv); + finfo("priv: %p\n", priv); /* Wait for any preceding write to complete. We could simplify things by * perform this wait at the end of each write operation (rather than at @@ -386,7 +386,7 @@ static inline int at25_bulkerase(struct at25_dev_s *priv) /* Deselect the FLASH */ SPI_SELECT(priv->dev, SPIDEV_FLASH, false); - fvdbg("Return: OK\n"); + finfo("Return: OK\n"); return OK; } @@ -399,7 +399,7 @@ static inline void at25_pagewrite(struct at25_dev_s *priv, FAR const uint8_t *bu { off_t offset = page << 8; - fvdbg("page: %08lx offset: %08lx\n", (long)page, (long)offset); + finfo("page: %08lx offset: %08lx\n", (long)page, (long)offset); /* Wait for any preceding write to complete. We could simplify things by * perform this wait at the end of each write operation (rather than at @@ -434,7 +434,7 @@ static inline void at25_pagewrite(struct at25_dev_s *priv, FAR const uint8_t *bu /* Deselect the FLASH: Chip Select high */ SPI_SELECT(priv->dev, SPIDEV_FLASH, false); - fvdbg("Written\n"); + finfo("Written\n"); } /************************************************************************************ @@ -446,7 +446,7 @@ static int at25_erase(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblock FAR struct at25_dev_s *priv = (FAR struct at25_dev_s *)dev; size_t blocksleft = nblocks; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* Lock access to the SPI bus until we complete the erase */ @@ -473,7 +473,7 @@ static ssize_t at25_bread(FAR struct mtd_dev_s *dev, off_t startblock, size_t nb FAR struct at25_dev_s *priv = (FAR struct at25_dev_s *)dev; ssize_t nbytes; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* On this device, we can handle the block read just like the byte-oriented read */ @@ -496,7 +496,7 @@ static ssize_t at25_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t n FAR struct at25_dev_s *priv = (FAR struct at25_dev_s *)dev; size_t blocksleft = nblocks; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* Lock the SPI bus and write each page to FLASH */ @@ -522,7 +522,7 @@ static ssize_t at25_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, { FAR struct at25_dev_s *priv = (FAR struct at25_dev_s *)dev; - fvdbg("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); + finfo("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); /* Wait for any preceding write to complete. We could simplify things by * perform this wait at the end of each write operation (rather than at @@ -556,7 +556,7 @@ static ssize_t at25_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, SPI_SELECT(priv->dev, SPIDEV_FLASH, false); at25_unlock(priv->dev); - fvdbg("return nbytes: %d\n", (int)nbytes); + finfo("return nbytes: %d\n", (int)nbytes); return nbytes; } @@ -569,7 +569,7 @@ static int at25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) FAR struct at25_dev_s *priv = (FAR struct at25_dev_s *)dev; int ret = -EINVAL; /* Assume good command with bad parameters */ - fvdbg("cmd: %d \n", cmd); + finfo("cmd: %d \n", cmd); switch (cmd) { @@ -592,7 +592,7 @@ static int at25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) geo->neraseblocks = priv->nsectors; ret = OK; - fvdbg("blocksize: %d erasesize: %d neraseblocks: %d\n", + finfo("blocksize: %d erasesize: %d neraseblocks: %d\n", geo->blocksize, geo->erasesize, geo->neraseblocks); } } @@ -614,7 +614,7 @@ static int at25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) break; } - fvdbg("return %d\n", ret); + finfo("return %d\n", ret); return ret; } @@ -637,7 +637,7 @@ FAR struct mtd_dev_s *at25_initialize(FAR struct spi_dev_s *dev) FAR struct at25_dev_s *priv; int ret; - fvdbg("dev: %p\n", dev); + finfo("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. @@ -671,7 +671,7 @@ FAR struct mtd_dev_s *at25_initialize(FAR struct spi_dev_s *dev) { /* Unrecognized! Discard all of that work we just did and return NULL */ - fdbg("ERROR: Unrecognized\n"); + ferr("ERROR: Unrecognized\n"); kmm_free(priv); priv = NULL; } @@ -695,6 +695,6 @@ FAR struct mtd_dev_s *at25_initialize(FAR struct spi_dev_s *dev) /* Return the implementation-specific state structure as the MTD device */ - fvdbg("Return %p\n", priv); + finfo("Return %p\n", priv); return (FAR struct mtd_dev_s *)priv; } diff --git a/drivers/mtd/at45db.c b/drivers/mtd/at45db.c index a76994d5e4c56e98a016aabca30c0a62386b8f14..4219c0d3b9f2aea12453769d76a234f43696f3d9 100644 --- a/drivers/mtd/at45db.c +++ b/drivers/mtd/at45db.c @@ -341,7 +341,7 @@ static inline int at45db_rdid(FAR struct at45db_dev_s *priv) uint8_t capacity; uint8_t devid[3]; - fvdbg("priv: %p\n", priv); + finfo("priv: %p\n", priv); /* Configure the bus, and select this FLASH part. (The caller should already have * locked the bus for exclusive access) @@ -360,7 +360,7 @@ static inline int at45db_rdid(FAR struct at45db_dev_s *priv) SPI_SELECT(priv->spi, SPIDEV_FLASH, false); - fvdbg("manufacturer: %02x devid1: %02x devid2: %02x\n", + finfo("manufacturer: %02x devid1: %02x devid2: %02x\n", devid[0], devid[1], devid[2]); /* Check for a valid manufacturer and memory family */ @@ -474,7 +474,7 @@ static inline void at45db_pgerase(FAR struct at45db_dev_s *priv, off_t sector) uint8_t erasecmd[4]; off_t offset = sector << priv->pageshift; - fvdbg("sector: %08lx\n", (long)sector); + finfo("sector: %08lx\n", (long)sector); /* Higher performance write logic: We leave the chip busy after write and erase * operations. This improves write and erase performance because we do not have @@ -514,7 +514,7 @@ static inline void at45db_pgerase(FAR struct at45db_dev_s *priv, off_t sector) #ifndef CONFIG_AT45DB_PREWAIT at45db_waitbusy(priv); #endif - fvdbg("Erased\n"); + finfo("Erased\n"); } /************************************************************************************ @@ -523,7 +523,7 @@ static inline void at45db_pgerase(FAR struct at45db_dev_s *priv, off_t sector) static inline int at32db_chiperase(FAR struct at45db_dev_s *priv) { - fvdbg("priv: %p\n", priv); + finfo("priv: %p\n", priv); /* Higher performance write logic: We leave the chip busy after write and erase * operations. This improves write and erase performance because we do not have @@ -569,7 +569,7 @@ static inline void at45db_pgwrite(FAR struct at45db_dev_s *priv, uint8_t wrcmd [4]; off_t offset = page << priv->pageshift; - fvdbg("page: %08lx offset: %08lx\n", (long)page, (long)offset); + finfo("page: %08lx offset: %08lx\n", (long)page, (long)offset); /* We assume that sectors are not write protected */ @@ -601,7 +601,7 @@ static inline void at45db_pgwrite(FAR struct at45db_dev_s *priv, #ifndef CONFIG_AT45DB_PREWAIT at45db_waitbusy(priv); #endif - fvdbg("Written\n"); + finfo("Written\n"); } /************************************************************************************ @@ -613,7 +613,7 @@ static int at45db_erase(FAR struct mtd_dev_s *mtd, off_t startblock, size_t nblo FAR struct at45db_dev_s *priv = (FAR struct at45db_dev_s *)mtd; size_t pgsleft = nblocks; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* Take the lock so that we have exclusive access to the bus, then power up the * FLASH device. @@ -669,7 +669,7 @@ static ssize_t at45db_bwrite(FAR struct mtd_dev_s *mtd, off_t startblock, FAR struct at45db_dev_s *priv = (FAR struct at45db_dev_s *)mtd; size_t pgsleft = nblocks; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* Take the lock so that we have exclusive access to the bus, then power up the * FLASH device. @@ -703,7 +703,7 @@ static ssize_t at45db_read(FAR struct mtd_dev_s *mtd, off_t offset, size_t nbyte FAR struct at45db_dev_s *priv = (FAR struct at45db_dev_s *)mtd; uint8_t rdcmd [5]; - fvdbg("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); + finfo("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); /* Set up for the read */ @@ -741,7 +741,7 @@ static ssize_t at45db_read(FAR struct mtd_dev_s *mtd, off_t offset, size_t nbyte at45db_pwrdown(priv); at45db_unlock(priv); - fvdbg("return nbytes: %d\n", (int)nbytes); + finfo("return nbytes: %d\n", (int)nbytes); return nbytes; } @@ -754,7 +754,7 @@ static int at45db_ioctl(FAR struct mtd_dev_s *mtd, int cmd, unsigned long arg) FAR struct at45db_dev_s *priv = (FAR struct at45db_dev_s *)mtd; int ret = -EINVAL; /* Assume good command with bad parameters */ - fvdbg("cmd: %d \n", cmd); + finfo("cmd: %d \n", cmd); switch (cmd) { @@ -777,7 +777,7 @@ static int at45db_ioctl(FAR struct mtd_dev_s *mtd, int cmd, unsigned long arg) geo->neraseblocks = priv->npages; ret = OK; - fvdbg("blocksize: %d erasesize: %d neraseblocks: %d\n", + finfo("blocksize: %d erasesize: %d neraseblocks: %d\n", geo->blocksize, geo->erasesize, geo->neraseblocks); } } @@ -806,7 +806,7 @@ static int at45db_ioctl(FAR struct mtd_dev_s *mtd, int cmd, unsigned long arg) break; } - fvdbg("return %d\n", ret); + finfo("return %d\n", ret); return ret; } @@ -830,7 +830,7 @@ FAR struct mtd_dev_s *at45db_initialize(FAR struct spi_dev_s *spi) uint8_t sr; int ret; - fvdbg("spi: %p\n", spi); + finfo("spi: %p\n", spi); /* Allocate a state structure (we allocate the structure instead of using a fixed, * static allocation so that we can handle multiple FLASH devices. The current @@ -869,7 +869,7 @@ FAR struct mtd_dev_s *at45db_initialize(FAR struct spi_dev_s *spi) { /* Unrecognized! Discard all of that work we just did and return NULL */ - fdbg("Unrecognized\n"); + ferr("ERROR: Unrecognized\n"); goto errout; } @@ -887,7 +887,8 @@ FAR struct mtd_dev_s *at45db_initialize(FAR struct spi_dev_s *spi) * is required after the device has be re-programmed. */ - fdbg("Reprogramming page size\n"); + fwarn("WARNING: Reprogramming page size\n"); + SPI_SELECT(priv->spi, SPIDEV_FLASH, true); SPI_SNDBLOCK(priv->spi, g_binpgsize, BINPGSIZE_SIZE); SPI_SELECT(priv->spi, SPIDEV_FLASH, false); @@ -906,7 +907,7 @@ FAR struct mtd_dev_s *at45db_initialize(FAR struct spi_dev_s *spi) mtd_register(&priv->mtd, "at45db"); #endif - fvdbg("Return %p\n", priv); + finfo("Return %p\n", priv); return (FAR struct mtd_dev_s *)priv; /* On any failure, we need free memory allocations and release the lock that diff --git a/drivers/mtd/filemtd.c b/drivers/mtd/filemtd.c index 18b2e19e1a9d0a2d85c2b1e3f2cb55695c56cbb8..57c4f3d8349497b7ea4df5a8d8e933838d54e9cf 100644 --- a/drivers/mtd/filemtd.c +++ b/drivers/mtd/filemtd.c @@ -184,10 +184,10 @@ static ssize_t filemtd_write(FAR struct file_dev_s *priv, size_t offset, * erased state. */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (newvalue != srcvalue) { - dbg("ERROR: Bad write: source=%02x dest=%02x result=%02x\n", + _err("ERROR: Bad write: source=%02x dest=%02x result=%02x\n", srcvalue, oldvalue, newvalue); } #endif @@ -498,7 +498,7 @@ FAR struct mtd_dev_s *filemtd_initialize(FAR const char *path, size_t offset, priv = (FAR struct file_dev_s *)kmm_zalloc(sizeof(struct file_dev_s)); if (!priv) { - fdbg("Failed to allocate the FILE MTD state structure\n"); + ferr("ERROR: Failed to allocate the FILE MTD state structure\n"); return NULL; } @@ -514,7 +514,7 @@ FAR struct mtd_dev_s *filemtd_initialize(FAR const char *path, size_t offset, ret = stat(path, &sb); if (ret < 0) { - dbg("Failed to stat %s: %d\n", path, get_errno()); + _err("ERROR: Failed to stat %s: %d\n", path, get_errno()); return NULL; } @@ -525,7 +525,7 @@ FAR struct mtd_dev_s *filemtd_initialize(FAR const char *path, size_t offset, priv->fd = open(path, mode); if (priv->fd == -1) { - fdbg("Failed to open the FILE MTD file %s\n", path); + ferr("ERROR: Failed to open the FILE MTD file %s\n", path); kmm_free(priv); return NULL; } @@ -557,7 +557,7 @@ FAR struct mtd_dev_s *filemtd_initialize(FAR const char *path, size_t offset, nblocks = (filelen - offset) / priv->erasesize; if (nblocks < 3) { - fdbg("Need to provide at least three full erase block\n"); + ferr("ERROR: Need to provide at least three full erase block\n"); kmm_free(priv); return NULL; } diff --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c index b18767f01364167aef2c3db58a648c47326a4a48..7fa0c5f4a0ffe8c939da8bfd502cf7d7870f9b73 100644 --- a/drivers/mtd/ftl.c +++ b/drivers/mtd/ftl.c @@ -133,7 +133,7 @@ static const struct block_operations g_bops = static int ftl_open(FAR struct inode *inode) { - fvdbg("Entry\n"); + finfo("Entry\n"); return OK; } @@ -146,7 +146,7 @@ static int ftl_open(FAR struct inode *inode) static int ftl_close(FAR struct inode *inode) { - fvdbg("Entry\n"); + finfo("Entry\n"); return OK; } @@ -168,7 +168,7 @@ static ssize_t ftl_reload(FAR void *priv, FAR uint8_t *buffer, nread = MTD_BREAD(dev->mtd, startblock, nblocks, buffer); if (nread != nblocks) { - fdbg("Read %d blocks starting at block %d failed: %d\n", + ferr("ERROR: Read %d blocks starting at block %d failed: %d\n", nblocks, startblock, nread); } @@ -187,7 +187,7 @@ static ssize_t ftl_read(FAR struct inode *inode, unsigned char *buffer, { FAR struct ftl_struct_s *dev; - fvdbg("sector: %d nsectors: %d\n", start_sector, nsectors); + finfo("sector: %d nsectors: %d\n", start_sector, nsectors); DEBUGASSERT(inode && inode->i_private); @@ -244,7 +244,7 @@ static ssize_t ftl_flush(FAR void *priv, FAR const uint8_t *buffer, nxfrd = MTD_BREAD(dev->mtd, rwblock, dev->blkper, dev->eblock); if (nxfrd != dev->blkper) { - fdbg("Read erase block %d failed: %d\n", rwblock, nxfrd); + ferr("ERROR: Read erase block %d failed: %d\n", rwblock, nxfrd); return -EIO; } @@ -254,7 +254,7 @@ static ssize_t ftl_flush(FAR void *priv, FAR const uint8_t *buffer, ret = MTD_ERASE(dev->mtd, eraseblock, 1); if (ret < 0) { - fdbg("Erase block=%d failed: %d\n", eraseblock, ret); + ferr("ERROR: Erase block=%d failed: %d\n", eraseblock, ret); return ret; } @@ -271,7 +271,7 @@ static ssize_t ftl_flush(FAR void *priv, FAR const uint8_t *buffer, nbytes = dev->geo.erasesize - offset; } - fvdbg("Copy %d bytes into erase block=%d at offset=%d\n", + finfo("Copy %d bytes into erase block=%d at offset=%d\n", nbytes, eraseblock, offset); memcpy(dev->eblock + offset, buffer, nbytes); @@ -281,7 +281,7 @@ static ssize_t ftl_flush(FAR void *priv, FAR const uint8_t *buffer, nxfrd = MTD_BWRITE(dev->mtd, rwblock, dev->blkper, dev->eblock); if (nxfrd != dev->blkper) { - fdbg("Write erase block %d failed: %d\n", rwblock, nxfrd); + ferr("ERROR: Write erase block %d failed: %d\n", rwblock, nxfrd); return -EIO; } @@ -309,19 +309,19 @@ static ssize_t ftl_flush(FAR void *priv, FAR const uint8_t *buffer, ret = MTD_ERASE(dev->mtd, eraseblock, 1); if (ret < 0) { - fdbg("Erase block=%d failed: %d\n", eraseblock, ret); + ferr("ERROR: Erase block=%d failed: %d\n", eraseblock, ret); return ret; } /* Write a full erase back to flash */ - fvdbg("Write %d bytes into erase block=%d at offset=0\n", + finfo("Write %d bytes into erase block=%d at offset=0\n", dev->geo.erasesize, alignedblock); nxfrd = MTD_BWRITE(dev->mtd, alignedblock, dev->blkper, buffer); if (nxfrd != dev->blkper) { - fdbg("Write erase block %d failed: %d\n", alignedblock, nxfrd); + ferr("ERROR: Write erase block %d failed: %d\n", alignedblock, nxfrd); return -EIO; } @@ -341,7 +341,7 @@ static ssize_t ftl_flush(FAR void *priv, FAR const uint8_t *buffer, nxfrd = MTD_BREAD(dev->mtd, alignedblock, dev->blkper, dev->eblock); if (nxfrd != dev->blkper) { - fdbg("Read erase block %d failed: %d\n", alignedblock, nxfrd); + ferr("ERROR: Read erase block %d failed: %d\n", alignedblock, nxfrd); return -EIO; } @@ -351,14 +351,14 @@ static ssize_t ftl_flush(FAR void *priv, FAR const uint8_t *buffer, ret = MTD_ERASE(dev->mtd, eraseblock, 1); if (ret < 0) { - fdbg("Erase block=%d failed: %d\n", eraseblock, ret); + ferr("ERROR: Erase block=%d failed: %d\n", eraseblock, ret); return ret; } /* Copy the user data at the beginning the buffered erase block */ nbytes = remaining * dev->geo.blocksize; - fvdbg("Copy %d bytes into erase block=%d at offset=0\n", + finfo("Copy %d bytes into erase block=%d at offset=0\n", nbytes, alignedblock); memcpy(dev->eblock, buffer, nbytes); @@ -367,7 +367,7 @@ static ssize_t ftl_flush(FAR void *priv, FAR const uint8_t *buffer, nxfrd = MTD_BWRITE(dev->mtd, alignedblock, dev->blkper, dev->eblock); if (nxfrd != dev->blkper) { - fdbg("Write erase block %d failed: %d\n", alignedblock, nxfrd); + ferr("ERROR: Write erase block %d failed: %d\n", alignedblock, nxfrd); return -EIO; } } @@ -389,7 +389,7 @@ static ssize_t ftl_write(FAR struct inode *inode, const unsigned char *buffer, { struct ftl_struct_s *dev; - fvdbg("sector: %d nsectors: %d\n", start_sector, nsectors); + finfo("sector: %d nsectors: %d\n", start_sector, nsectors); DEBUGASSERT(inode && inode->i_private); dev = (struct ftl_struct_s *)inode->i_private; @@ -412,7 +412,7 @@ static int ftl_geometry(FAR struct inode *inode, struct geometry *geometry) { struct ftl_struct_s *dev; - fvdbg("Entry\n"); + finfo("Entry\n"); DEBUGASSERT(inode); if (geometry) @@ -428,9 +428,9 @@ static int ftl_geometry(FAR struct inode *inode, struct geometry *geometry) geometry->geo_nsectors = dev->geo.neraseblocks * dev->blkper; geometry->geo_sectorsize = dev->geo.blocksize; - fvdbg("available: true mediachanged: false writeenabled: %s\n", + finfo("available: true mediachanged: false writeenabled: %s\n", geometry->geo_writeenabled ? "true" : "false"); - fvdbg("nsectors: %d sectorsize: %d\n", + finfo("nsectors: %d sectorsize: %d\n", geometry->geo_nsectors, geometry->geo_sectorsize); return OK; @@ -451,7 +451,7 @@ static int ftl_ioctl(FAR struct inode *inode, int cmd, unsigned long arg) struct ftl_struct_s *dev ; int ret; - fvdbg("Entry\n"); + finfo("Entry\n"); DEBUGASSERT(inode && inode->i_private); /* Only one block driver ioctl command is supported by this driver (and @@ -466,10 +466,10 @@ static int ftl_ioctl(FAR struct inode *inode, int cmd, unsigned long arg) * driver. */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (arg == 0) { - fdbg("ERROR: BIOC_XIPBASE argument is NULL\n"); + ferr("ERROR: BIOC_XIPBASE argument is NULL\n"); return -EINVAL; } #endif @@ -488,7 +488,7 @@ static int ftl_ioctl(FAR struct inode *inode, int cmd, unsigned long arg) ret = MTD_IOCTL(dev->mtd, cmd, arg); if (ret < 0) { - fdbg("ERROR: MTD ioctl(%04x) failed: %d\n", cmd, ret); + ferr("ERROR: MTD ioctl(%04x) failed: %d\n", cmd, ret); } return ret; @@ -519,7 +519,7 @@ int ftl_initialize(int minor, FAR struct mtd_dev_s *mtd) /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (minor < 0 || minor > 255 || !mtd) { return -EINVAL; @@ -543,7 +543,7 @@ int ftl_initialize(int minor, FAR struct mtd_dev_s *mtd) ret = MTD_IOCTL(mtd, MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&dev->geo)); if (ret < 0) { - fdbg("MTD ioctl(MTDIOC_GEOMETRY) failed: %d\n", ret); + ferr("ERROR: MTD ioctl(MTDIOC_GEOMETRY) failed: %d\n", ret); kmm_free(dev); return ret; } @@ -554,7 +554,7 @@ int ftl_initialize(int minor, FAR struct mtd_dev_s *mtd) dev->eblock = (FAR uint8_t *)kmm_malloc(dev->geo.erasesize); if (!dev->eblock) { - fdbg("Failed to allocate an erase block buffer\n"); + ferr("ERROR: Failed to allocate an erase block buffer\n"); kmm_free(dev); return -ENOMEM; } @@ -585,7 +585,7 @@ int ftl_initialize(int minor, FAR struct mtd_dev_s *mtd) ret = rwb_initialize(&dev->rwb); if (ret < 0) { - fdbg("rwb_initialize failed: %d\n", ret); + ferr("ERROR: rwb_initialize failed: %d\n", ret); kmm_free(dev); return ret; } @@ -600,7 +600,7 @@ int ftl_initialize(int minor, FAR struct mtd_dev_s *mtd) ret = register_blockdriver(devname, &g_bops, 0, dev); if (ret < 0) { - fdbg("register_blockdriver failed: %d\n", -ret); + ferr("ERROR: register_blockdriver failed: %d\n", -ret); kmm_free(dev); } } diff --git a/drivers/mtd/hamming.c b/drivers/mtd/hamming.c index 95d4a5a699f6c4387ee266c8a71fe0b03aa0f4ff..95d192db11f2360ac514e3a8d2460e9c725ba32f 100644 --- a/drivers/mtd/hamming.c +++ b/drivers/mtd/hamming.c @@ -301,11 +301,11 @@ static int hamming_verify256(FAR uint8_t *data, FAR const uint8_t *original) /* There are bit errors */ - fvdbg("Read: %02x %02x %02x\n", + finfo("Read: %02x %02x %02x\n", original[0], original[1], original[2]); - fvdbg("Computed: %02x %02x %02x\n", + finfo("Computed: %02x %02x %02x\n", computed[0], computed[1], computed[2]); - fvdbg("Correction: %02x %02x %02x\n", + finfo("Correction: %02x %02x %02x\n", correction[0], correction[1], correction[2]); /* If there is a single bit error, there are 11 bits set to 1 */ @@ -333,7 +333,7 @@ static int hamming_verify256(FAR uint8_t *data, FAR const uint8_t *original) /* Correct bit */ - fdbg("Correcting byte %d at bit %d\n", byte, bit); + finfo("Correcting byte %d at bit %d\n", byte, bit); data[byte] ^= (1 << bit); return HAMMING_ERROR_SINGLEBIT; @@ -343,7 +343,7 @@ static int hamming_verify256(FAR uint8_t *data, FAR const uint8_t *original) if (hamming_bitsincode256(correction) == 1) { - fdbg("ERROR: ECC has been correupted\n"); + ferr("ERROR: ECC has been correupted\n"); return HAMMING_ERROR_ECC; } @@ -351,7 +351,7 @@ static int hamming_verify256(FAR uint8_t *data, FAR const uint8_t *original) else { - fdbg("ERROR: Multiple bit errors\n"); + ferr("ERROR: Multiple bit errors\n"); return HAMMING_ERROR_MULTIPLEBITS; } } diff --git a/drivers/mtd/is25xp.c b/drivers/mtd/is25xp.c new file mode 100644 index 0000000000000000000000000000000000000000..2228f760b033b188fd7bc6869e3fa9844f2100b1 --- /dev/null +++ b/drivers/mtd/is25xp.c @@ -0,0 +1,1002 @@ +/************************************************************************************ + * drivers/mtd/is25xp.c + * Driver for SPI-based IS25LPxx parts 32MBit and larger. + * + * Copyright (C) 2016 Marten Svanfeldt. All rights reserved. + * + * Copyright (C) 2009-2011, 2013 Gregory Nutt. All rights reserved. + * Author: Ken Pettit + * + * Copied from / based on m25px.c and sst25.c drivers written by + * 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 +#include +#include + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Configuration ********************************************************************/ +/* Per the data sheet, IS25xP parts can be driven with either SPI mode 0 (CPOL=0 and + * CPHA=0) or mode 3 (CPOL=1 and CPHA=1). So you may need to specify + * CONFIG_IS25XP_SPIMODE to select the best mode for your device. If + * CONFIG_IS25XP_SPIMODE is not defined, mode 0 will be used. + */ + +#ifndef CONFIG_IS25XP_SPIMODE +# define CONFIG_IS25XP_SPIMODE SPIDEV_MODE0 +#endif + +/* SPI Frequency. May be up to 50MHz. */ + +#ifndef CONFIG_IS25XP_SPIFREQUENCY +# define CONFIG_IS25XP_SPIFREQUENCY 20000000 +#endif + +/* IS25 Registers *******************************************************************/ +/* Indentification register values */ + +#define IS25_MANUFACTURER 0x9d +#define IS25_MEMORY_TYPE 0x60 + +/* IS25LP064 capacity is 8,388,608 bytes: + * (2,048 sectors) * (4,096 bytes per sector) + * (32,768 pages) * (256 bytes per page) + */ + +#define IS25_IS25LP064_CAPACITY 0x17 +#define IS25_IS25LP064_SECTOR_SHIFT 12 /* Sector size 1 << 12 = 4,096 */ +#define IS25_IS25LP064_NSECTORS 2048 +#define IS25_IS25LP064_PAGE_SHIFT 8 /* Page size 1 << 8 = 256 */ +#define IS25_IS25LP064_NPAGES 32768 + +/* IS25LP128 capacity is 16,777,216 bytes: + * (4,096 sectors) * (4,096 bytes per sector) + * (65,536 pages) * (256 bytes per page) + */ + +#define IS25_IS25LP128_CAPACITY 0x18 +#define IS25_IS25LP128_SECTOR_SHIFT 12 /* Sector size 1 << 12 = 4,096 */ +#define IS25_IS25LP128_NSECTORS 4096 +#define IS25_IS25LP128_PAGE_SHIFT 8 /* Page size 1 << 8 = 256 */ +#define IS25_IS25LP128_NPAGES 65536 + + +/* Instructions */ +/* Command Value N Description Addr Dummy Data */ +#define IS25_WREN 0x06 /* 1 Write Enable 0 0 0 */ +#define IS25_WRDI 0x04 /* 1 Write Disable 0 0 0 */ +#define IS25_RDID 0x9f /* 1 Read Identification 0 0 1-3 */ +#define IS25_RDSR 0x05 /* 1 Read Status Register 0 0 >=1 */ +//#define IS25_EWSR 0x50 /* 1 Write enable status 0 0 0 */ +#define IS25_WRSR 0x01 /* 1 Write Status Register 0 0 1 */ +#define IS25_READ 0x03 /* 1 Read Data Bytes 3 0 >=1 */ +#define IS25_FAST_READ 0x0b /* 1 Higher speed read 3 1 >=1 */ +#define IS25_PP 0x02 /* 1 Page Program 3 0 1-256 */ +#define IS25_SE 0x20 /* 1 Sector Erase 3 0 0 */ +#define IS25_BE32 0x52 /* 2 32K Block Erase 3 0 0 */ +#define IS25_BE64 0xD8 /* 2 64K Block Erase 3 0 0 */ +#define IS25_CER 0xC7 /* 1 Chip Erase 0 0 0 */ + +/* NOTE 1: All parts. + * NOTE 2: In IS25XP terminology, 0x52 and 0xd8 are block erase and 0x20 + * is a sector erase. Block erase provides a faster way to erase + * multiple 4K sectors at once. + */ + +/* Status register bit definitions */ + +#define IS25_SR_WIP (1 << 0) /* Bit 0: Write in progress bit */ +#define IS25_SR_WEL (1 << 1) /* Bit 1: Write enable latch bit */ +#define IS25_SR_BP_SHIFT (2) /* Bits 2-5: Block protect bits */ +#define IS25_SR_BP_MASK (15 << IS25_SR_BP_SHIFT) +# define IS25_SR_BP_NONE (0 << IS25_SR_BP_SHIFT) /* Unprotected */ +# define IS25_SR_BP_UPPER128th (1 << IS25_SR_BP_SHIFT) /* Upper 128th */ +# define IS25_SR_BP_UPPER64th (2 << IS25_SR_BP_SHIFT) /* Upper 64th */ +# define IS25_SR_BP_UPPER32nd (3 << IS25_SR_BP_SHIFT) /* Upper 32nd */ +# define IS25_SR_BP_UPPER16th (4 << IS25_SR_BP_SHIFT) /* Upper 16th */ +# define IS25_SR_BP_UPPER8th (5 << IS25_SR_BP_SHIFT) /* Upper 8th */ +# define IS25_SR_BP_UPPERQTR (6 << IS25_SR_BP_SHIFT) /* Upper quarter */ +# define IS25_SR_BP_UPPERHALF (7 << IS25_SR_BP_SHIFT) /* Upper half */ +# define IS25_SR_BP_ALL (8 << IS25_SR_BP_SHIFT) /* All sectors */ +#define IS25_SR_QE (1 << 6) /* Bit 6: Quad (QSPI) enable bit */ +#define IS25_SR_SRWD (1 << 7) /* Bit 7: Status register write protect */ + +#define IS25_DUMMY 0xa5 + +/************************************************************************************ + * Private Types + ************************************************************************************/ + +/* This type represents the state of the MTD device. The struct mtd_dev_s + * must appear at the beginning of the definition so that you can freely + * cast between pointers to struct mtd_dev_s and struct is25xp_dev_s. + */ + +struct is25xp_dev_s +{ + struct mtd_dev_s mtd; /* MTD interface */ + FAR struct spi_dev_s *dev; /* Saved SPI interface instance */ + uint8_t sectorshift; /* 12 */ + uint8_t pageshift; /* 8 */ + uint16_t nsectors; /* 2,048 or 4,096 */ + uint32_t npages; /* 32,768 or 65,536 */ + uint8_t lastwaswrite; /* Indicates if last operation was write */ +}; + +/************************************************************************************ + * Private Function Prototypes + ************************************************************************************/ + +/* Helpers */ + +static void is25xp_lock(FAR struct spi_dev_s *dev); +static inline void is25xp_unlock(FAR struct spi_dev_s *dev); +static inline int is25xp_readid(struct is25xp_dev_s *priv); +static void is25xp_waitwritecomplete(struct is25xp_dev_s *priv); +static void is25xp_writeenable(struct is25xp_dev_s *priv); +static inline void is25xp_sectorerase(struct is25xp_dev_s *priv, off_t offset, uint8_t type); +static inline int is25xp_bulkerase(struct is25xp_dev_s *priv); +static inline void is25xp_pagewrite(struct is25xp_dev_s *priv, FAR const uint8_t *buffer, + off_t offset); + +/* MTD driver methods */ + +static int is25xp_erase(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks); +static ssize_t is25xp_bread(FAR struct mtd_dev_s *dev, off_t startblock, + size_t nblocks, FAR uint8_t *buf); +static ssize_t is25xp_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, + size_t nblocks, FAR const uint8_t *buf); +static ssize_t is25xp_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, + FAR uint8_t *buffer); +#ifdef CONFIG_MTD_BYTE_WRITE +static ssize_t is25xp_write(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, + FAR const uint8_t *buffer); +#endif +static int is25xp_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg); + +/************************************************************************************ + * Name: is25xp_lock + ************************************************************************************/ + +static void is25xp_lock(FAR struct spi_dev_s *dev) +{ + /* On SPI busses where there are multiple devices, it will be necessary to + * lock SPI to have exclusive access to the busses for a sequence of + * transfers. The bus should be locked before the chip is selected. + * + * This is a blocking call and will not return until we have exclusiv access to + * the SPI buss. We will retain that exclusive access until the bus is unlocked. + */ + + (void)SPI_LOCK(dev, true); + + /* After locking the SPI bus, the we also need call the setfrequency, setbits, and + * setmode methods to make sure that the SPI is properly configured for the device. + * If the SPI buss is being shared, then it may have been left in an incompatible + * state. + */ + + SPI_SETMODE(dev, CONFIG_IS25XP_SPIMODE); + SPI_SETBITS(dev, 8); + (void)SPI_HWFEATURES(dev, 0); + (void)SPI_SETFREQUENCY(dev, CONFIG_IS25XP_SPIFREQUENCY); +} + +/************************************************************************************ + * Name: is25xp_unlock + ************************************************************************************/ + +static inline void is25xp_unlock(FAR struct spi_dev_s *dev) +{ + (void)SPI_LOCK(dev, false); +} + +/************************************************************************************ + * Name: is25xp_readid + ************************************************************************************/ + +static inline int is25xp_readid(struct is25xp_dev_s *priv) +{ + uint16_t manufacturer; + uint16_t memory; + uint16_t capacity; + + finfo("priv: %p\n", priv); + + /* Lock the SPI bus, configure the bus, and select this FLASH part. */ + + is25xp_lock(priv->dev); + SPI_SELECT(priv->dev, SPIDEV_FLASH, true); + + /* Send the "Read ID (RDID)" command and read the first three ID bytes */ + + (void)SPI_SEND(priv->dev, IS25_RDID); + manufacturer = SPI_SEND(priv->dev, IS25_DUMMY); + memory = SPI_SEND(priv->dev, IS25_DUMMY); + capacity = SPI_SEND(priv->dev, IS25_DUMMY); + + /* Deselect the FLASH and unlock the bus */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, false); + is25xp_unlock(priv->dev); + + finfo("manufacturer: %02x memory: %02x capacity: %02x\n", + manufacturer, memory, capacity); + + /* Check for a valid manufacturer and memory type */ + + if (manufacturer == IS25_MANUFACTURER && memory == IS25_MEMORY_TYPE) + { + /* Okay.. is it a FLASH capacity that we understand? */ + + if (capacity == IS25_IS25LP064_CAPACITY) + { + /* Save the FLASH geometry */ + + priv->sectorshift = IS25_IS25LP064_SECTOR_SHIFT; + priv->nsectors = IS25_IS25LP064_NSECTORS; + priv->pageshift = IS25_IS25LP064_PAGE_SHIFT; + priv->npages = IS25_IS25LP064_NPAGES; + return OK; + } + else if (capacity == IS25_IS25LP128_CAPACITY) + { + /* Save the FLASH geometry */ + + priv->sectorshift = IS25_IS25LP128_SECTOR_SHIFT; + priv->nsectors = IS25_IS25LP128_NSECTORS; + priv->pageshift = IS25_IS25LP128_PAGE_SHIFT; + priv->npages = IS25_IS25LP128_NPAGES; + return OK; + } + } + + return -ENODEV; +} + +/************************************************************************************ + * Name: is25xp_waitwritecomplete + ************************************************************************************/ + +static void is25xp_waitwritecomplete(struct is25xp_dev_s *priv) +{ + uint8_t status; + + /* No need to check if no write / erase was done */ + +#if 0 + if (!priv->lastwaswrite) + { + return; + } +#endif + + /* Are we the only device on the bus? */ + +#ifdef CONFIG_SPI_OWNBUS + + /* Select this FLASH part */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, true); + + /* Send "Read Status Register (RDSR)" command */ + + (void)SPI_SEND(priv->dev, IS25_RDSR); + + /* Loop as long as the memory is busy with a write cycle */ + + do + { + /* Send a dummy byte to generate the clock needed to shift out the status */ + + status = SPI_SEND(priv->dev, IS25_DUMMY); + } + while ((status & IS25_SR_WIP) != 0); + + /* Deselect the FLASH */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, false); + +#else + + /* Loop as long as the memory is busy with a write cycle */ + + do + { + /* Select this FLASH part */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, true); + + /* Send "Read Status Register (RDSR)" command */ + + (void)SPI_SEND(priv->dev, IS25_RDSR); + + /* Send a dummy byte to generate the clock needed to shift out the status */ + + status = SPI_SEND(priv->dev, IS25_DUMMY); + + /* Deselect the FLASH */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, false); + + /* Given that writing could take up to few tens of milliseconds, and erasing + * could take more. The following short delay in the "busy" case will allow + * other peripherals to access the SPI bus. + */ + + if ((status & IS25_SR_WIP) != 0) + { + is25xp_unlock(priv->dev); + usleep(1000); + is25xp_lock(priv->dev); + } + } + while ((status & IS25_SR_WIP) != 0); +#endif + + priv->lastwaswrite = false; + + finfo("Complete\n"); +} + +/************************************************************************************ + * Name: is25xp_writeenable + ************************************************************************************/ + +static void is25xp_writeenable(struct is25xp_dev_s *priv) +{ + /* Select this FLASH part */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, true); + + /* Send "Write Enable (WREN)" command */ + + (void)SPI_SEND(priv->dev, IS25_WREN); + + /* Deselect the FLASH */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, false); + finfo("Enabled\n"); +} + +/************************************************************************************ + * Name: is25xp_unprotect + ************************************************************************************/ + +static void is25xp_unprotect(struct is25xp_dev_s *priv) +{ + /* Make writeable */ + + is25xp_writeenable(priv); + + /* Send "Write status (WRSR)" */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, true); + SPI_SEND(priv->dev, IS25_WRSR); + + /* Followed by the new status value */ + + SPI_SEND(priv->dev, 0); + + SPI_SELECT(priv->dev, SPIDEV_FLASH, false); +} + +/************************************************************************************ + * Name: is25xp_sectorerase + ************************************************************************************/ + +static void is25xp_sectorerase(struct is25xp_dev_s *priv, off_t sector, uint8_t type) +{ + off_t offset; + + offset = sector << priv->sectorshift; + + finfo("sector: %08lx\n", (long)sector); + + /* Wait for any preceding write to complete. We could simplify things by + * perform this wait at the end of each write operation (rather than at + * the beginning of ALL operations), but have the wait first will slightly + * improve performance. + */ + + is25xp_waitwritecomplete(priv); + + /* Send write enable instruction */ + + is25xp_writeenable(priv); + + /* Select this FLASH part */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, true); + + /* Send the "Sector Erase (SE)" or Sub-Sector Erase (SSE) instruction + * that was passed in as the erase type. + */ + + (void)SPI_SEND(priv->dev, type); + + /* Send the sector offset high byte first. For all of the supported + * parts, the sector number is completely contained in the first byte + * and the values used in the following two bytes don't really matter. + */ + + (void)SPI_SEND(priv->dev, (offset >> 16) & 0xff); + (void)SPI_SEND(priv->dev, (offset >> 8) & 0xff); + (void)SPI_SEND(priv->dev, offset & 0xff); + priv->lastwaswrite = true; + + /* Deselect the FLASH */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, false); + finfo("Erased\n"); +} + +/************************************************************************************ + * Name: is25xp_bulkerase + ************************************************************************************/ + +static inline int is25xp_bulkerase(struct is25xp_dev_s *priv) +{ + finfo("priv: %p\n", priv); + + /* Wait for any preceding write to complete. We could simplify things by + * perform this wait at the end of each write operation (rather than at + * the beginning of ALL operations), but have the wait first will slightly + * improve performance. + */ + + is25xp_waitwritecomplete(priv); + + /* Send write enable instruction */ + + is25xp_writeenable(priv); + + /* Select this FLASH part */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, true); + + /* Send the "Chip Erase (CER)" instruction */ + + (void)SPI_SEND(priv->dev, IS25_CER); + + /* Deselect the FLASH */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, false); + is25xp_waitwritecomplete(priv); + + finfo("Return: OK\n"); + return OK; +} + +/************************************************************************************ + * Name: is25xp_pagewrite + ************************************************************************************/ + +static inline void is25xp_pagewrite(struct is25xp_dev_s *priv, FAR const uint8_t *buffer, + off_t page) +{ + off_t offset = page << priv->pageshift; + + finfo("page: %08lx offset: %08lx\n", (long)page, (long)offset); + + /* Wait for any preceding write to complete. We could simplify things by + * perform this wait at the end of each write operation (rather than at + * the beginning of ALL operations), but have the wait first will slightly + * improve performance. + */ + + is25xp_waitwritecomplete(priv); + + /* Enable the write access to the FLASH */ + + is25xp_writeenable(priv); + + /* Select this FLASH part */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, true); + + /* Send "Page Program (PP)" command */ + + (void)SPI_SEND(priv->dev, IS25_PP); + + /* Send the page offset high byte first. */ + + (void)SPI_SEND(priv->dev, (offset >> 16) & 0xff); + (void)SPI_SEND(priv->dev, (offset >> 8) & 0xff); + (void)SPI_SEND(priv->dev, offset & 0xff); + + /* Then write the specified number of bytes */ + + SPI_SNDBLOCK(priv->dev, buffer, 1 << priv->pageshift); + priv->lastwaswrite = true; + + /* Deselect the FLASH: Chip Select high */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, false); + finfo("Written\n"); +} + +/************************************************************************************ + * Name: is25xp_bytewrite + ************************************************************************************/ + +#ifdef CONFIG_MTD_BYTE_WRITE +static inline void is25xp_bytewrite(struct is25xp_dev_s *priv, FAR const uint8_t *buffer, + off_t offset, uint16_t count) +{ + finfo("offset: %08lx count:%d\n", (long)offset, count); + + /* Wait for any preceding write to complete. We could simplify things by + * perform this wait at the end of each write operation (rather than at + * the beginning of ALL operations), but have the wait first will slightly + * improve performance. + */ + + is25xp_waitwritecomplete(priv); + + /* Enable the write access to the FLASH */ + + is25xp_writeenable(priv); + + /* Select this FLASH part */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, true); + + /* Send "Page Program (PP)" command */ + + (void)SPI_SEND(priv->dev, IS25_PP); + + /* Send the page offset high byte first. */ + + (void)SPI_SEND(priv->dev, (offset >> 16) & 0xff); + (void)SPI_SEND(priv->dev, (offset >> 8) & 0xff); + (void)SPI_SEND(priv->dev, offset & 0xff); + + /* Then write the specified number of bytes */ + + SPI_SNDBLOCK(priv->dev, buffer, count); + priv->lastwaswrite = true; + + /* Deselect the FLASH: Chip Select high */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, false); + finfo("Written\n"); +} +#endif + +/************************************************************************************ + * Name: is25xp_erase + ************************************************************************************/ + +static int is25xp_erase(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks) +{ + FAR struct is25xp_dev_s *priv = (FAR struct is25xp_dev_s *)dev; + size_t blocksleft = nblocks; + + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + + /* Lock access to the SPI bus until we complete the erase */ + + is25xp_lock(priv->dev); + while (blocksleft > 0) + { + size_t sectorboundry; + size_t blkper; + + /* We will erase in either 4K sectors or 32K or 64K blocks depending + * on the largest unit we can use given the startblock and nblocks. + * This will reduce erase time (in the event we have partitions + * enabled and are doing a bulk erase which is translated into + * a block erase operation). + */ + + /* Test for 64K alignment */ + + blkper = 64 / 4; + sectorboundry = (startblock + blkper - 1) / blkper; + sectorboundry *= blkper; + + /* If we are on a sector boundry and have at least a full sector + * of blocks left to erase, then we can do a full sector erase. + */ + + if (startblock == sectorboundry && blocksleft >= blkper) + { + /* Do a 64k block erase */ + + is25xp_sectorerase(priv, startblock, IS25_BE64); + startblock += blkper; + blocksleft -= blkper; + continue; + } + + /* Test for 32K block alignment */ + + blkper = 32 / 4; + sectorboundry = (startblock + blkper - 1) / blkper; + sectorboundry *= blkper; + + if (startblock == sectorboundry && blocksleft >= blkper) + { + /* Do a 32k block erase */ + + is25xp_sectorerase(priv, startblock, IS25_BE32); + startblock += blkper; + blocksleft -= blkper; + continue; + } + else + { + /* Just do a sector erase */ + + is25xp_sectorerase(priv, startblock, IS25_SE); + startblock++; + blocksleft--; + continue; + } + } + + is25xp_unlock(priv->dev); + return (int)nblocks; +} + +/************************************************************************************ + * Name: is25xp_bread + ************************************************************************************/ + +static ssize_t is25xp_bread(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks, + FAR uint8_t *buffer) +{ + FAR struct is25xp_dev_s *priv = (FAR struct is25xp_dev_s *)dev; + ssize_t nbytes; + + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + + /* On this device, we can handle the block read just like the byte-oriented read */ + + nbytes = is25xp_read(dev, startblock << priv->pageshift, nblocks << priv->pageshift, buffer); + if (nbytes > 0) + { + return nbytes >> priv->pageshift; + } + + return (int)nbytes; +} + +/************************************************************************************ + * Name: is25xp_bwrite + ************************************************************************************/ + +static ssize_t is25xp_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks, + FAR const uint8_t *buffer) +{ + FAR struct is25xp_dev_s *priv = (FAR struct is25xp_dev_s *)dev; + size_t blocksleft = nblocks; + size_t pagesize = 1 << priv->pageshift; + + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + + /* Lock the SPI bus and write each page to FLASH */ + + is25xp_lock(priv->dev); + while (blocksleft-- > 0) + { + is25xp_pagewrite(priv, buffer, startblock); + buffer += pagesize; + startblock++; + } + + is25xp_unlock(priv->dev); + return nblocks; +} + +/************************************************************************************ + * Name: is25xp_read + ************************************************************************************/ + +static ssize_t is25xp_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, + FAR uint8_t *buffer) +{ + FAR struct is25xp_dev_s *priv = (FAR struct is25xp_dev_s *)dev; + + finfo("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); + + /* Wait for any preceding write to complete. We could simplify things by + * perform this wait at the end of each write operation (rather than at + * the beginning of ALL operations), but have the wait first will slightly + * improve performance. + */ + + if (priv->lastwaswrite) + { + is25xp_waitwritecomplete(priv); + } + + /* Lock the SPI bus and select this FLASH part */ + + is25xp_lock(priv->dev); + SPI_SELECT(priv->dev, SPIDEV_FLASH, true); + + /* Send "Read from Memory " instruction */ + + (void)SPI_SEND(priv->dev, IS25_READ); + + /* Send the page offset high byte first. */ + + (void)SPI_SEND(priv->dev, (offset >> 16) & 0xff); + (void)SPI_SEND(priv->dev, (offset >> 8) & 0xff); + (void)SPI_SEND(priv->dev, offset & 0xff); + + /* Then read all of the requested bytes */ + + SPI_RECVBLOCK(priv->dev, buffer, nbytes); + + /* Deselect the FLASH and unlock the SPI bus */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, false); + is25xp_unlock(priv->dev); + finfo("return nbytes: %d\n", (int)nbytes); + return nbytes; +} + +/************************************************************************************ + * Name: is25xp_write + ************************************************************************************/ + +#ifdef CONFIG_MTD_BYTE_WRITE +static ssize_t is25xp_write(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, + FAR const uint8_t *buffer) +{ + FAR struct is25xp_dev_s *priv = (FAR struct is25xp_dev_s *)dev; + int startpage; + int endpage; + int count; + int index; + int pagesize; + int bytestowrite; + + finfo("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 + * page increments. + */ + + startpage = offset / (1 << priv->pageshift); + endpage = (offset + nbytes) / (1 << priv->pageshift); + + if (startpage == endpage) + { + /* All bytes within one programmable page. Just do the write. */ + + is25xp_bytewrite(priv, buffer, offset, nbytes); + } + else + { + /* Write the 1st partial-page */ + + count = nbytes; + pagesize = (1 << priv->pageshift); + bytestowrite = pagesize - (offset & (pagesize-1)); + is25xp_bytewrite(priv, buffer, offset, bytestowrite); + + /* Update offset and count */ + + offset += bytestowrite; + count -= bytestowrite; + index = bytestowrite; + + /* Write full pages */ + + while (count >= pagesize) + { + is25xp_bytewrite(priv, &buffer[index], offset, pagesize); + + /* Update offset and count */ + + offset += pagesize; + count -= pagesize; + index += pagesize; + } + + /* Now write any partial page at the end */ + + if (count > 0) + { + is25xp_bytewrite(priv, &buffer[index], offset, count); + } + + priv->lastwaswrite = true; + } + + return nbytes; +} +#endif /* CONFIG_MTD_BYTE_WRITE */ + +/************************************************************************************ + * Name: is25xp_ioctl + ************************************************************************************/ + +static int is25xp_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) +{ + FAR struct is25xp_dev_s *priv = (FAR struct is25xp_dev_s *)dev; + int ret = -EINVAL; /* Assume good command with bad parameters */ + + finfo("cmd: %d \n", cmd); + + switch (cmd) + { + case MTDIOC_GEOMETRY: + { + FAR struct mtd_geometry_s *geo = (FAR struct mtd_geometry_s *)((uintptr_t)arg); + if (geo) + { + /* Populate the geometry structure with information need to know + * the capacity and how to access the device. + * + * NOTE: that the device is treated as though it where just an array + * of fixed size blocks. That is most likely not true, but the client + * will expect the device logic to do whatever is necessary to make it + * appear so. + */ + + geo->blocksize = (1 << priv->pageshift); + geo->erasesize = (1 << priv->sectorshift); + geo->neraseblocks = priv->nsectors; + + ret = OK; + + finfo("blocksize: %d erasesize: %d neraseblocks: %d\n", + geo->blocksize, geo->erasesize, geo->neraseblocks); + } + } + break; + + case MTDIOC_BULKERASE: + { + /* Erase the entire device */ + + is25xp_lock(priv->dev); + ret = is25xp_bulkerase(priv); + is25xp_unlock(priv->dev); + } + break; + + case MTDIOC_XIPBASE: + default: + ret = -ENOTTY; /* Bad command */ + break; + } + + finfo("return %d\n", ret); + return ret; +} + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: is25xp_initialize + * + * Description: + * Create an initialize MTD device instance. MTD devices are not registered + * in the file system, but are created as instances that can be bound to + * other functions (such as a block or character driver front end). + * + ************************************************************************************/ + +FAR struct mtd_dev_s *is25xp_initialize(FAR struct spi_dev_s *dev) +{ + FAR struct is25xp_dev_s *priv; + int ret; + + finfo("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. + * The current implementation would handle only one FLASH part per SPI + * device (only because of the SPIDEV_FLASH definition) and so would have + * to be extended to handle multiple FLASH parts on the same SPI bus. + */ + + priv = (FAR struct is25xp_dev_s *)kmm_zalloc(sizeof(struct is25xp_dev_s)); + if (priv) + { + /* Initialize the allocated structure. (unsupported methods were + * nullified by kmm_zalloc). + */ + + priv->mtd.erase = is25xp_erase; + priv->mtd.bread = is25xp_bread; + priv->mtd.bwrite = is25xp_bwrite; + priv->mtd.read = is25xp_read; +#ifdef CONFIG_MTD_BYTE_WRITE + priv->mtd.write = is25xp_write; +#endif + priv->mtd.ioctl = is25xp_ioctl; + priv->dev = dev; + priv->lastwaswrite = false; + + /* Deselect the FLASH */ + + SPI_SELECT(dev, SPIDEV_FLASH, false); + + /* Identify the FLASH chip and get its capacity */ + + ret = is25xp_readid(priv); + if (ret != OK) + { + /* Unrecognized! Discard all of that work we just did and return NULL */ + + ferr("ERROR: Unrecognized\n"); + kmm_free(priv); + priv = NULL; + } + else + { + /* Make sure that the FLASH is unprotected so that we can write into it */ + + is25xp_unprotect(priv); + } + } + + /* Register the MTD with the procfs system if enabled */ + +#ifdef CONFIG_MTD_REGISTRATION + mtd_register(&priv->mtd, "is25xp"); +#endif + + /* Return the implementation-specific state structure as the MTD device */ + + finfo("Return %p\n", priv); + return (FAR struct mtd_dev_s *)priv; +} + diff --git a/drivers/mtd/m25px.c b/drivers/mtd/m25px.c index f117c10d9124d8cfbd26c91c154c9af768fa7c73..eb2cade8ee520d02268a0d26215bbadb8360ea27 100644 --- a/drivers/mtd/m25px.c +++ b/drivers/mtd/m25px.c @@ -312,7 +312,7 @@ static inline int m25p_readid(struct m25p_dev_s *priv) uint16_t memory; uint16_t capacity; - fvdbg("priv: %p\n", priv); + finfo("priv: %p\n", priv); /* Lock the SPI bus, configure the bus, and select this FLASH part. */ @@ -331,7 +331,7 @@ static inline int m25p_readid(struct m25p_dev_s *priv) SPI_SELECT(priv->dev, SPIDEV_FLASH, false); m25p_unlock(priv->dev); - fvdbg("manufacturer: %02x memory: %02x capacity: %02x\n", + finfo("manufacturer: %02x memory: %02x capacity: %02x\n", manufacturer, memory, capacity); /* Check for a valid manufacturer and memory type */ @@ -460,7 +460,7 @@ static void m25p_waitwritecomplete(struct m25p_dev_s *priv) } while ((status & M25P_SR_WIP) != 0); - fvdbg("Complete\n"); + finfo("Complete\n"); } /************************************************************************************ @@ -480,7 +480,7 @@ static void m25p_writeenable(struct m25p_dev_s *priv) /* Deselect the FLASH */ SPI_SELECT(priv->dev, SPIDEV_FLASH, false); - fvdbg("Enabled\n"); + finfo("Enabled\n"); } /************************************************************************************ @@ -502,7 +502,7 @@ static void m25p_sectorerase(struct m25p_dev_s *priv, off_t sector, uint8_t type offset = sector << priv->sectorshift; } - fvdbg("sector: %08lx\n", (long)sector); + finfo("sector: %08lx\n", (long)sector); /* Wait for any preceding write to complete. We could simplify things by * perform this wait at the end of each write operation (rather than at @@ -538,7 +538,7 @@ static void m25p_sectorerase(struct m25p_dev_s *priv, off_t sector, uint8_t type /* Deselect the FLASH */ SPI_SELECT(priv->dev, SPIDEV_FLASH, false); - fvdbg("Erased\n"); + finfo("Erased\n"); } /************************************************************************************ @@ -547,7 +547,7 @@ static void m25p_sectorerase(struct m25p_dev_s *priv, off_t sector, uint8_t type static inline int m25p_bulkerase(struct m25p_dev_s *priv) { - fvdbg("priv: %p\n", priv); + finfo("priv: %p\n", priv); /* Wait for any preceding write to complete. We could simplify things by * perform this wait at the end of each write operation (rather than at @@ -572,7 +572,7 @@ static inline int m25p_bulkerase(struct m25p_dev_s *priv) /* Deselect the FLASH */ SPI_SELECT(priv->dev, SPIDEV_FLASH, false); - fvdbg("Return: OK\n"); + finfo("Return: OK\n"); return OK; } @@ -585,7 +585,7 @@ static inline void m25p_pagewrite(struct m25p_dev_s *priv, FAR const uint8_t *bu { off_t offset = page << priv->pageshift; - fvdbg("page: %08lx offset: %08lx\n", (long)page, (long)offset); + finfo("page: %08lx offset: %08lx\n", (long)page, (long)offset); /* Wait for any preceding write to complete. We could simplify things by * perform this wait at the end of each write operation (rather than at @@ -620,7 +620,7 @@ static inline void m25p_pagewrite(struct m25p_dev_s *priv, FAR const uint8_t *bu /* Deselect the FLASH: Chip Select high */ SPI_SELECT(priv->dev, SPIDEV_FLASH, false); - fvdbg("Written\n"); + finfo("Written\n"); } /************************************************************************************ @@ -631,7 +631,7 @@ static inline void m25p_pagewrite(struct m25p_dev_s *priv, FAR const uint8_t *bu static inline void m25p_bytewrite(struct m25p_dev_s *priv, FAR const uint8_t *buffer, off_t offset, uint16_t count) { - fvdbg("offset: %08lx count:%d\n", (long)offset, count); + finfo("offset: %08lx count:%d\n", (long)offset, count); /* Wait for any preceding write to complete. We could simplify things by * perform this wait at the end of each write operation (rather than at @@ -666,7 +666,7 @@ static inline void m25p_bytewrite(struct m25p_dev_s *priv, FAR const uint8_t *bu /* Deselect the FLASH: Chip Select high */ SPI_SELECT(priv->dev, SPIDEV_FLASH, false); - fvdbg("Written\n"); + finfo("Written\n"); } #endif @@ -679,7 +679,7 @@ static int m25p_erase(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblock FAR struct m25p_dev_s *priv = (FAR struct m25p_dev_s *)dev; size_t blocksleft = nblocks; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* Lock access to the SPI bus until we complete the erase */ @@ -747,7 +747,7 @@ static ssize_t m25p_bread(FAR struct mtd_dev_s *dev, off_t startblock, size_t nb FAR struct m25p_dev_s *priv = (FAR struct m25p_dev_s *)dev; ssize_t nbytes; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* On this device, we can handle the block read just like the byte-oriented read */ @@ -771,7 +771,7 @@ static ssize_t m25p_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t n size_t blocksleft = nblocks; size_t pagesize = 1 << priv->pageshift; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* Lock the SPI bus and write each page to FLASH */ @@ -796,7 +796,7 @@ static ssize_t m25p_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, { FAR struct m25p_dev_s *priv = (FAR struct m25p_dev_s *)dev; - fvdbg("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); + finfo("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); /* Wait for any preceding write to complete. We could simplify things by * perform this wait at the end of each write operation (rather than at @@ -829,7 +829,7 @@ static ssize_t m25p_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, SPI_SELECT(priv->dev, SPIDEV_FLASH, false); m25p_unlock(priv->dev); - fvdbg("return nbytes: %d\n", (int)nbytes); + finfo("return nbytes: %d\n", (int)nbytes); return nbytes; } @@ -849,7 +849,7 @@ static ssize_t m25p_write(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes int pagesize; int bytestowrite; - fvdbg("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); + finfo("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 @@ -914,7 +914,7 @@ static int m25p_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) FAR struct m25p_dev_s *priv = (FAR struct m25p_dev_s *)dev; int ret = -EINVAL; /* Assume good command with bad parameters */ - fvdbg("cmd: %d \n", cmd); + finfo("cmd: %d \n", cmd); switch (cmd) { @@ -949,7 +949,7 @@ static int m25p_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) ret = OK; - fvdbg("blocksize: %d erasesize: %d neraseblocks: %d\n", + finfo("blocksize: %d erasesize: %d neraseblocks: %d\n", geo->blocksize, geo->erasesize, geo->neraseblocks); } } @@ -971,7 +971,7 @@ static int m25p_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) break; } - fvdbg("return %d\n", ret); + finfo("return %d\n", ret); return ret; } @@ -994,7 +994,7 @@ FAR struct mtd_dev_s *m25p_initialize(FAR struct spi_dev_s *dev) FAR struct m25p_dev_s *priv; int ret; - fvdbg("dev: %p\n", dev); + finfo("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. @@ -1031,7 +1031,7 @@ FAR struct mtd_dev_s *m25p_initialize(FAR struct spi_dev_s *dev) { /* Unrecognized! Discard all of that work we just did and return NULL */ - fdbg("Unrecognized\n"); + ferr("ERROR: Unrecognized\n"); kmm_free(priv); priv = NULL; } @@ -1045,6 +1045,6 @@ FAR struct mtd_dev_s *m25p_initialize(FAR struct spi_dev_s *dev) /* Return the implementation-specific state structure as the MTD device */ - fvdbg("Return %p\n", priv); + finfo("Return %p\n", priv); return (FAR struct mtd_dev_s *)priv; } diff --git a/drivers/mtd/mtd_config.c b/drivers/mtd/mtd_config.c index d3cde695641eeb60099e4a85d8ee870c9cbb0097..6bfe0d7fc6f12ffac5b0e61e364f84963a4af416 100644 --- a/drivers/mtd/mtd_config.c +++ b/drivers/mtd/mtd_config.c @@ -1353,7 +1353,7 @@ int mtdconfig_register(FAR struct mtd_dev_s *mtd) ret = MTD_IOCTL(mtd, MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&geo)); if (ret < 0) { - fdbg("MTD ioctl(MTDIOC_GEOMETRY) failed: %d\n", ret); + ferr("ERROR: MTD ioctl(MTDIOC_GEOMETRY) failed: %d\n", ret); kmm_free(dev); goto errout; } diff --git a/drivers/mtd/mtd_nand.c b/drivers/mtd/mtd_nand.c index da4327b50b581f0d33c895a760eba80df863917e..b5872e685427efaef5b3982c1bbd7598dd5a1530 100644 --- a/drivers/mtd/mtd_nand.c +++ b/drivers/mtd/mtd_nand.c @@ -153,7 +153,7 @@ static int nand_lock(FAR struct nand_dev_s *nand) errcode = errno; DEBUGASSERT(errcode != OK); - fdbg("sem_wait failed: %d\n", errcode); + ferr("ERROR: sem_wait failed: %d\n", errcode); return -errcode; } @@ -200,14 +200,14 @@ static int nand_checkblock(FAR struct nand_dev_s *nand, off_t block) ret = NAND_RAWREAD(raw, block, 0, 0, spare); if (ret < 0) { - fdbg("ERROR: Failed to read page 0 of block %d\n", block); + ferr("ERROR: Failed to read page 0 of block %d\n", block); return ret; } nandscheme_readbadblockmarker(scheme, spare, &marker); if (marker != 0xff) { - fvdbg("Page 0 block %d marker=%02x\n", block, marker); + finfo("Page 0 block %d marker=%02x\n", block, marker); return BADBLOCK; } @@ -216,14 +216,14 @@ static int nand_checkblock(FAR struct nand_dev_s *nand, off_t block) ret = NAND_RAWREAD(raw, block, 1, 0, spare); if (ret < 0) { - fdbg("ERROR: Failed to read page 1 of block %d\n", block); + ferr("ERROR: Failed to read page 1 of block %d\n", block); return ret; } nandscheme_readbadblockmarker(scheme, spare, &marker); if (marker != 0xff) { - fvdbg("Page 1 block %d marker=%02x\n", block, marker); + finfo("Page 1 block %d marker=%02x\n", block, marker); return BADBLOCK; } @@ -250,7 +250,7 @@ static int nand_checkblock(FAR struct nand_dev_s *nand, off_t block) * ****************************************************************************/ -#if defined(CONFIG_MTD_NAND_BLOCKCHECK) && defined(CONFIG_DEBUG_VERBOSE) && \ +#if defined(CONFIG_MTD_NAND_BLOCKCHECK) && defined(CONFIG_DEBUG_INFO) && \ defined(CONFIG_DEBUG_FS) static int nand_devscan(FAR struct nand_dev_s *nand) { @@ -258,7 +258,7 @@ static int nand_devscan(FAR struct nand_dev_s *nand) FAR struct nand_model_s *model; off_t nblocks; off_t block; -#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS) off_t good; unsigned int ngood; #endif @@ -275,11 +275,11 @@ static int nand_devscan(FAR struct nand_dev_s *nand) /* Initialize block statuses */ - fvdbg("Retrieving bad block information. nblocks=%d\n", nblocks); + finfo("Retrieving bad block information. nblocks=%d\n", nblocks); /* Retrieve block status from their first page spare area */ -#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS) ngood = 0; #endif @@ -290,24 +290,24 @@ static int nand_devscan(FAR struct nand_dev_s *nand) ret = nand_checkblock(nand, block); if (ret != GOODBLOCK) { -#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS) if (ngood > 0) { - fvdbg("Good blocks: %u - %u\n", good, good + ngood); + finfo("Good blocks: %u - %u\n", good, good + ngood); ngood = 0; } #endif if (ret == BADBLOCK) { - fvdbg("Block %u is bad\n", (unsigned int)block); + finfo("Block %u is bad\n", (unsigned int)block); } else { - fdbg("ERROR: Cannot retrieve info from block %u: %d\n", + ferr("ERROR: Cannot retrieve info from block %u: %d\n", (unsigned int)block, ret); } } -#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS) else { if (ngood == 0) @@ -320,16 +320,16 @@ static int nand_devscan(FAR struct nand_dev_s *nand) #endif } -#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS) if (ngood > 0) { - fvdbg("Good blocks: %u - %u\n", good, good + ngood); + finfo("Good blocks: %u - %u\n", good, good + ngood); } #endif return OK; } -#endif /* CONFIG_MTD_NAND_BLOCKCHECK && CONFIG_DEBUG_VERBOSE && CONFIG_DEBUG_FS */ +#endif /* CONFIG_MTD_NAND_BLOCKCHECK && CONFIG_DEBUG_INFO && CONFIG_DEBUG_FS */ /**************************************************************************** * Name: nand_chipid @@ -360,7 +360,7 @@ static uint32_t nand_chipid(struct nand_raw_s *raw) id[3] = READ_DATA8(raw); id[4] = READ_DATA8(raw); - fvdbg("Chip ID: %02x %02x %02x %02x %02x\n", + finfo("Chip ID: %02x %02x %02x %02x %02x\n", id[0], id[1], id[2], id[3], id[4]); return (uint32_t)id[0] | @@ -394,7 +394,7 @@ static int nand_eraseblock(FAR struct nand_dev_s *nand, off_t block, FAR struct nand_raw_s *raw; int ret; - /* fvdbg("Block %d\n", block); */ + /* finfo("Block %d\n", block); */ DEBUGASSERT(nand && nand->raw); #ifdef CONFIG_MTD_NAND_BLOCKCHECK @@ -404,7 +404,7 @@ static int nand_eraseblock(FAR struct nand_dev_s *nand, off_t block, if (nand_checkblock(nand, block) != GOODBLOCK) { - fvdbg("Block is BAD\n"); + finfo("Block is BAD\n"); return -EAGAIN; } } @@ -417,7 +417,7 @@ static int nand_eraseblock(FAR struct nand_dev_s *nand, off_t block, { int tmp; - fdbg("ERROR: Cannot erase block %ld\n", (long)block); + ferr("ERROR: Cannot erase block %ld\n", (long)block); /* Retrieve the model and scheme */ @@ -432,7 +432,7 @@ static int nand_eraseblock(FAR struct nand_dev_s *nand, off_t block, tmp = NAND_WRITEPAGE(nand->raw, block, 0, 0, spare); if (tmp < 0) { - fdbg("ERROR: Failed bo marke block %ld as BAD\n", (long)block); + ferr("ERROR: Failed bo marke block %ld as BAD\n", (long)block); } } @@ -460,14 +460,14 @@ static int nand_eraseblock(FAR struct nand_dev_s *nand, off_t block, static int nand_readpage(FAR struct nand_dev_s *nand, off_t block, unsigned int page, FAR uint8_t *data) { - fvdbg("block=%d page=%d data=%p\n", (int)block, page, data); + finfo("block=%d page=%d data=%p\n", (int)block, page, data); #ifdef CONFIG_MTD_NAND_BLOCKCHECK /* Check that the block is not BAD if data is requested */ if (nand_checkblock(nand, block) != GOODBLOCK) { - fdbg("ERROR: Block is BAD\n"); + ferr("ERROR: Block is BAD\n"); return -EAGAIN; } #endif @@ -520,7 +520,7 @@ static int nand_writepage(FAR struct nand_dev_s *nand, off_t block, if (nand_checkblock(nand, block) != GOODBLOCK) { - fdbg("ERROR: Block is BAD\n"); + ferr("ERROR: Block is BAD\n"); return -EAGAIN; } #endif @@ -562,7 +562,7 @@ static int nand_erase(struct mtd_dev_s *dev, off_t startblock, size_t blocksleft = nblocks; int ret; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* Lock access to the NAND until we complete the erase */ @@ -574,7 +574,7 @@ static int nand_erase(struct mtd_dev_s *dev, off_t startblock, ret = nand_eraseblock(nand, startblock, false); if (ret < 0) { - fdbg("nand_eraseblock failed on block %ld: %d\n", + ferr("ERROR: nand_eraseblock failed on block %ld: %d\n", (long)startblock, ret); nand_unlock(nand); return ret; @@ -609,7 +609,7 @@ static ssize_t nand_bread(struct mtd_dev_s *dev, off_t startpage, off_t block; int ret; - fvdbg("startpage: %ld npages: %d\n", (long)startpage, (int)npages); + finfo("startpage: %ld npages: %d\n", (long)startpage, (int)npages); DEBUGASSERT(nand && nand->raw); /* Retrieve the model */ @@ -642,7 +642,7 @@ static ssize_t nand_bread(struct mtd_dev_s *dev, off_t startpage, if (block > maxblock) { - fdbg("ERROR: Read beyond the end of FLASH, block=%ld\n", + ferr("ERROR: Read beyond the end of FLASH, block=%ld\n", (long)block); ret = -ESPIPE; @@ -654,7 +654,7 @@ static ssize_t nand_bread(struct mtd_dev_s *dev, off_t startpage, ret = nand_readpage(nand, block, page, buffer); if (ret < 0) { - fdbg("ERROR: nand_readpage failed block=%ld page=%d: %d\n", + ferr("ERROR: nand_readpage failed block=%ld page=%d: %d\n", (long)block, page, ret); goto errout_with_lock; } @@ -705,7 +705,7 @@ static ssize_t nand_bwrite(struct mtd_dev_s *dev, off_t startpage, off_t block; int ret; - fvdbg("startpage: %08lx npages: %d\n", (long)startpage, (int)npages); + finfo("startpage: %08lx npages: %d\n", (long)startpage, (int)npages); DEBUGASSERT(nand && nand->raw); /* Retrieve the model */ @@ -738,7 +738,7 @@ static ssize_t nand_bwrite(struct mtd_dev_s *dev, off_t startpage, if (block > maxblock) { - fdbg("ERROR: Write beyond the end of FLASH, block=%ld\n", + ferr("ERROR: Write beyond the end of FLASH, block=%ld\n", (long)block); ret = -ESPIPE; @@ -750,7 +750,7 @@ static ssize_t nand_bwrite(struct mtd_dev_s *dev, off_t startpage, ret = nand_writepage(nand, block, page, buffer); if (ret < 0) { - fdbg("ERROR: nand_writepage failed block=%ld page=%d: %d\n", + ferr("ERROR: nand_writepage failed block=%ld page=%d: %d\n", (long)block, page, ret); goto errout_with_lock; } @@ -864,7 +864,7 @@ FAR struct mtd_dev_s *nand_initialize(FAR struct nand_raw_s *raw) struct onfi_pgparam_s onfi; int ret; - fvdbg("cmdaddr=%p addraddr=%p dataaddr=%p\n", + finfo("cmdaddr=%p addraddr=%p dataaddr=%p\n", (FAR void *)raw->cmdaddr, (FAR void *)raw->addraddr, (FAR void *)raw->dataaddr); @@ -872,7 +872,7 @@ FAR struct mtd_dev_s *nand_initialize(FAR struct nand_raw_s *raw) if (!onfi_ebidetect(raw->cmdaddr, raw->addraddr, raw->dataaddr)) { - fdbg("ERROR: No NAND device detected at: %p %p %p\n", + ferr("ERROR: No NAND device detected at: %p %p %p\n", (FAR void *)raw->cmdaddr, (FAR void *)raw->addraddr, (FAR void *)raw->dataaddr); return NULL; @@ -885,7 +885,7 @@ FAR struct mtd_dev_s *nand_initialize(FAR struct nand_raw_s *raw) { uint32_t chipid; - fvdbg("Failed to get ONFI page parameters: %d\n", ret); + finfo("Failed to get ONFI page parameters: %d\n", ret); /* If the ONFI model is not supported, determine the NAND * model from a lookup of known FLASH parts. @@ -895,7 +895,7 @@ FAR struct mtd_dev_s *nand_initialize(FAR struct nand_raw_s *raw) if (nandmodel_find(g_nandmodels, NAND_NMODELS, chipid, &raw->model)) { - fdbg("ERROR: Could not determine NAND model\n"); + ferr("ERROR: Could not determine NAND model\n"); return NULL; } } @@ -904,7 +904,7 @@ FAR struct mtd_dev_s *nand_initialize(FAR struct nand_raw_s *raw) FAR struct nand_model_s *model = &raw->model; uint64_t size; - fvdbg("Found ONFI compliant NAND FLASH\n"); + finfo("Found ONFI compliant NAND FLASH\n"); /* Construct the NAND model structure */ @@ -955,7 +955,7 @@ FAR struct mtd_dev_s *nand_initialize(FAR struct nand_raw_s *raw) nand = (FAR struct nand_dev_s *)kmm_zalloc(sizeof(struct nand_dev_s)); if (!nand) { - fdbg("ERROR: Failed to allocate the NAND MTD device structure\n"); + ferr("ERROR: Failed to allocate the NAND MTD device structure\n"); return NULL; } diff --git a/drivers/mtd/mtd_nandecc.c b/drivers/mtd/mtd_nandecc.c index 55286b7460f8c5970c44e92d022c5769c22dd6d4..e22bc23175a69553a457c13ba92cdb11b5c0a880 100644 --- a/drivers/mtd/mtd_nandecc.c +++ b/drivers/mtd/mtd_nandecc.c @@ -97,7 +97,7 @@ int nandecc_readpage(FAR struct nand_dev_s *nand, off_t block, unsigned int sparesize; int ret; - fvdbg("block=%d page=%d data=%p spare=%d\n", (int)block, page, data, spare); + finfo("block=%d page=%d data=%p spare=%d\n", (int)block, page, data, spare); /* Get convenience pointers */ @@ -125,7 +125,7 @@ int nandecc_readpage(FAR struct nand_dev_s *nand, off_t block, ret = NAND_RAWREAD(raw, block, page, 0, spare); if (ret < 0) { - fdbg("ERROR: Failed to read page:d\n", ret); + ferr("ERROR: Failed to read page:d\n", ret); return ret; } @@ -134,7 +134,7 @@ int nandecc_readpage(FAR struct nand_dev_s *nand, off_t block, ret = NAND_RAWREAD(nand->raw, block, page, data, 0); if (ret < 0) { - fdbg("ERROR: Failed to read page:d\n", ret); + ferr("ERROR: Failed to read page:d\n", ret); return ret; } @@ -148,7 +148,7 @@ int nandecc_readpage(FAR struct nand_dev_s *nand, off_t block, ret = hamming_verify256x(data, pagesize, raw->ecc); if (ret && (ret != HAMMING_ERROR_SINGLEBIT)) { - fdbg("ERROR: Block=%d page=%d Unrecoverable error: %d\n", + ferr("ERROR: Block=%d page=%d Unrecoverable error: %d\n", block, page, ret); return -EIO; } @@ -189,7 +189,7 @@ int nandecc_writepage(FAR struct nand_dev_s *nand, off_t block, unsigned int sparesize; int ret; - fvdbg("block=%d page=%d data=%p spare=%d\n", (int)block, page, data, spare); + finfo("block=%d page=%d data=%p spare=%d\n", (int)block, page, data, spare); /* Get convenience pointers */ @@ -235,7 +235,7 @@ int nandecc_writepage(FAR struct nand_dev_s *nand, off_t block, ret = NAND_RAWWRITE(nand->raw, block, page, data, spare); if (ret < 0) { - fdbg("ERROR: Failed to write page:d\n", ret); + ferr("ERROR: Failed to write page:d\n", ret); } return ret; diff --git a/drivers/mtd/mtd_nandmodel.c b/drivers/mtd/mtd_nandmodel.c index f2dd2c259f21c3f22c729426b60727c9e68eb2af..cd3c324c9c3c033f76b5c8cf15a8ad38f56d6d66 100644 --- a/drivers/mtd/mtd_nandmodel.c +++ b/drivers/mtd/mtd_nandmodel.c @@ -92,13 +92,13 @@ int nandmodel_find(FAR const struct nand_model_s *modeltab, size_t size, id2 = (uint8_t)(chipid >> 8); id4 = (uint8_t)(chipid >> 24); - fvdbg("NAND ID is 0x%08x\n", (int)chipid); + finfo("NAND ID is 0x%08x\n", (int)chipid); for (i = 0; i < size; i++) { if (modeltab[i].devid == id2) { - fvdbg("NAND Model found: ID2=0x%02x ID4=0x%02x\n", id2, id4); + finfo("NAND Model found: ID2=0x%02x ID4=0x%02x\n", id2, id4); found = true; if (model) @@ -155,11 +155,11 @@ int nandmodel_find(FAR const struct nand_model_s *modeltab, size_t size, } } - fvdbg(" devid: 0x%02x\n", model->devid); - fvdbg(" devsize: %d (MB)\n", model->devsize); - fvdbg(" blocksize: %d (KB)\n", model->blocksize); - fvdbg(" pagesize: %d (B)\n", model->pagesize); - fvdbg(" options: 0x%02x\n", model->options); + finfo(" devid: 0x%02x\n", model->devid); + finfo(" devsize: %d (MB)\n", model->devsize); + finfo(" blocksize: %d (KB)\n", model->blocksize); + finfo(" pagesize: %d (B)\n", model->pagesize); + finfo(" options: 0x%02x\n", model->options); } break; } @@ -205,7 +205,7 @@ int nandmodel_translate(FAR const struct nand_model_s *model, off_t address, if ((address + size) > nandmodel_getdevbytesize(model)) { - fvdbg("nandmodel_translate: out-of-bounds access.\n"); + finfo("nandmodel_translate: out-of-bounds access.\n"); return -ESPIPE; } diff --git a/drivers/mtd/mtd_onfi.c b/drivers/mtd/mtd_onfi.c index aa4c6a09c0a06ae99b4b448dad96c400ae57532d..4a2a150f0f7241146d3d2657b6549f7060b776e1 100644 --- a/drivers/mtd/mtd_onfi.c +++ b/drivers/mtd/mtd_onfi.c @@ -273,12 +273,12 @@ int onfi_read(uintptr_t cmdaddr, uintptr_t addraddr, uintptr_t dataaddr, uint8_t parmtab[ONFI_PARAM_TABLE_SIZE]; int i; - fvdbg("cmdaddr=%08x addraddr=%08x dataaddr=%08x\n", + finfo("cmdaddr=%08x addraddr=%08x dataaddr=%08x\n", (int)cmdaddr, (int)addraddr, (int)dataaddr); if (!onfi_compatible(cmdaddr, addraddr, dataaddr)) { - fdbg("ERROR: No ONFI compatible device detected\n"); + ferr("ERROR: No ONFI compatible device detected\n"); return -ENODEV; } @@ -316,7 +316,7 @@ int onfi_read(uintptr_t cmdaddr, uintptr_t addraddr, uintptr_t dataaddr, if (i == ONFI_PARAM_TABLE_SIZE) { - fdbg("ERROR: Failed to read ONFI parameter table\n"); + ferr("ERROR: Failed to read ONFI parameter table\n"); return -EIO; } @@ -356,16 +356,16 @@ int onfi_read(uintptr_t cmdaddr, uintptr_t addraddr, uintptr_t dataaddr, onfi->model = *(FAR uint8_t *)(parmtab + 49); - fvdbg("Returning:\n"); - fvdbg(" manufacturer: 0x%02x\n", onfi->manufacturer); - fvdbg(" buswidth: %d\n", onfi->buswidth); - fvdbg(" luns: %d\n", onfi->luns); - fvdbg(" eccsize: %d\n", onfi->eccsize); - fvdbg(" model: 0x%02s\n", onfi->model); - fvdbg(" sparesize: %d\n", onfi->sparesize); - fvdbg(" pagesperblock: %d\n", onfi->pagesperblock); - fvdbg(" blocksperlun: %d\n", onfi->blocksperlun); - fvdbg(" pagesize: %d\n", onfi->pagesize); + finfo("Returning:\n"); + finfo(" manufacturer: 0x%02x\n", onfi->manufacturer); + finfo(" buswidth: %d\n", onfi->buswidth); + finfo(" luns: %d\n", onfi->luns); + finfo(" eccsize: %d\n", onfi->eccsize); + finfo(" model: 0x%02s\n", onfi->model); + finfo(" sparesize: %d\n", onfi->sparesize); + finfo(" pagesperblock: %d\n", onfi->pagesperblock); + finfo(" blocksperlun: %d\n", onfi->blocksperlun); + finfo(" pagesize: %d\n", onfi->pagesize); return OK; } @@ -455,7 +455,7 @@ bool onfi_ebidetect(uintptr_t cmdaddr, uintptr_t addraddr, uint8_t ids[4]; uint8_t i; - fvdbg("cmdaddr=%08x addraddr=%08x dataaddr=%08x\n", + finfo("cmdaddr=%08x addraddr=%08x dataaddr=%08x\n", (int)cmdaddr, (int)addraddr, (int)dataaddr); /* Send Reset command */ diff --git a/drivers/mtd/mtd_partition.c b/drivers/mtd/mtd_partition.c index f6a148c753c80fb208a11e038ad9ec4f1079fd0d..8b2f2586fdd9accee995d83a609afb26f961db8a 100644 --- a/drivers/mtd/mtd_partition.c +++ b/drivers/mtd/mtd_partition.c @@ -235,7 +235,7 @@ static int part_erase(FAR struct mtd_dev_s *dev, off_t startblock, if (!part_blockcheck(priv, (startblock + nblocks - 1) * priv->blkpererase)) { - fdbg("ERROR: Erase beyond the end of the partition\n"); + ferr("ERROR: Erase beyond the end of the partition\n"); return -ENXIO; } @@ -270,7 +270,7 @@ static ssize_t part_bread(FAR struct mtd_dev_s *dev, off_t startblock, if (!part_blockcheck(priv, startblock + nblocks - 1)) { - fdbg("ERROR: Read beyond the end of the partition\n"); + ferr("ERROR: Read beyond the end of the partition\n"); return -ENXIO; } @@ -301,7 +301,7 @@ static ssize_t part_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, if (!part_blockcheck(priv, startblock + nblocks - 1)) { - fdbg("ERROR: Write beyond the end of the partition\n"); + ferr("ERROR: Write beyond the end of the partition\n"); return -ENXIO; } @@ -337,7 +337,7 @@ static ssize_t part_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, if (!part_bytecheck(priv, offset + nbytes - 1)) { - fdbg("ERROR: Read beyond the end of the partition\n"); + ferr("ERROR: Read beyond the end of the partition\n"); return -ENXIO; } @@ -375,7 +375,7 @@ static ssize_t part_write(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes if (!part_bytecheck(priv, offset + nbytes - 1)) { - fdbg("ERROR: Write beyond the end of the partition\n"); + ferr("ERROR: Write beyond the end of the partition\n"); return -ENXIO; } @@ -479,7 +479,7 @@ static int part_procfs_open(FAR struct file *filep, FAR const char *relpath, { FAR struct part_procfs_file_s *attr; - fvdbg("Open '%s'\n", relpath); + finfo("Open '%s'\n", relpath); /* PROCFS is read-only. Any attempt to open with any kind of write * access is not permitted. @@ -489,7 +489,7 @@ static int part_procfs_open(FAR struct file *filep, FAR const char *relpath, if ((oflags & O_WRONLY) != 0 || (oflags & O_RDONLY) == 0) { - fdbg("ERROR: Only O_RDONLY supported\n"); + ferr("ERROR: Only O_RDONLY supported\n"); return -EACCES; } @@ -498,7 +498,7 @@ static int part_procfs_open(FAR struct file *filep, FAR const char *relpath, attr = (FAR struct part_procfs_file_s *)kmm_zalloc(sizeof(struct part_procfs_file_s)); if (!attr) { - fdbg("ERROR: Failed to allocate file attributes\n"); + ferr("ERROR: Failed to allocate file attributes\n"); return -ENOMEM; } @@ -550,7 +550,7 @@ static ssize_t part_procfs_read(FAR struct file *filep, FAR char *buffer, uint8_t x; #endif - fvdbg("buffer=%p buflen=%d\n", buffer, (int)buflen); + finfo("buffer=%p buflen=%d\n", buffer, (int)buflen); /* Recover our private data from the struct file instance */ @@ -591,7 +591,7 @@ static ssize_t part_procfs_read(FAR struct file *filep, FAR char *buffer, MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&geo)); if (ret < 0) { - fdbg("ERROR: mtd->ioctl failed: %d\n", ret); + ferr("ERROR: mtd->ioctl failed: %d\n", ret); return 0; } @@ -702,7 +702,7 @@ static int part_procfs_dup(FAR const struct file *oldp, FAR struct file *newp) FAR struct part_procfs_file_s *oldattr; FAR struct part_procfs_file_s *newattr; - fvdbg("Dup %p->%p\n", oldp, newp); + finfo("Dup %p->%p\n", oldp, newp); /* Recover our private data from the old struct file instance */ @@ -714,7 +714,7 @@ static int part_procfs_dup(FAR const struct file *oldp, FAR struct file *newp) newattr = (FAR struct part_procfs_file_s *)kmm_zalloc(sizeof(struct part_procfs_file_s)); if (!newattr) { - fdbg("ERROR: Failed to allocate file attributes\n"); + ferr("ERROR: Failed to allocate file attributes\n"); return -ENOMEM; } @@ -796,7 +796,7 @@ FAR struct mtd_dev_s *mtd_partition(FAR struct mtd_dev_s *mtd, off_t firstblock, ret = mtd->ioctl(mtd, MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&geo)); if (ret < 0) { - fdbg("ERROR: mtd->ioctl failed: %d\n", ret); + ferr("ERROR: mtd->ioctl failed: %d\n", ret); return NULL; } @@ -818,7 +818,7 @@ FAR struct mtd_dev_s *mtd_partition(FAR struct mtd_dev_s *mtd, off_t firstblock, if (erasestart >= eraseend) { - fdbg("ERROR: sub-region too small\n"); + ferr("ERROR: sub-region too small\n"); return NULL; } @@ -827,7 +827,7 @@ FAR struct mtd_dev_s *mtd_partition(FAR struct mtd_dev_s *mtd, off_t firstblock, devblocks = blkpererase * geo.neraseblocks; if (eraseend > devblocks) { - fdbg("ERROR: sub-region too big\n"); + ferr("ERROR: sub-region too big\n"); return NULL; } @@ -836,7 +836,7 @@ FAR struct mtd_dev_s *mtd_partition(FAR struct mtd_dev_s *mtd, off_t firstblock, part = (FAR struct mtd_partition_s *)kmm_zalloc(sizeof(struct mtd_partition_s)); if (!part) { - fdbg("ERROR: Failed to allocate memory for the partition device\n"); + ferr("ERROR: Failed to allocate memory for the partition device\n"); return NULL; } diff --git a/drivers/mtd/mtd_procfs.c b/drivers/mtd/mtd_procfs.c index bc3071c7e078e6af32c84d0e47430bb10ff906de..4ba355110c62f2bdc43c717a798adb3cb647cb85 100644 --- a/drivers/mtd/mtd_procfs.c +++ b/drivers/mtd/mtd_procfs.c @@ -139,7 +139,7 @@ static int mtd_open(FAR struct file *filep, FAR const char *relpath, { FAR struct mtd_file_s *attr; - fvdbg("Open '%s'\n", relpath); + finfo("Open '%s'\n", relpath); /* PROCFS is read-only. Any attempt to open with any kind of write * access is not permitted. @@ -149,7 +149,7 @@ static int mtd_open(FAR struct file *filep, FAR const char *relpath, if ((oflags & O_WRONLY) != 0 || (oflags & O_RDONLY) == 0) { - fdbg("ERROR: Only O_RDONLY supported\n"); + ferr("ERROR: Only O_RDONLY supported\n"); return -EACCES; } @@ -158,7 +158,7 @@ static int mtd_open(FAR struct file *filep, FAR const char *relpath, attr = (FAR struct mtd_file_s *)kmm_zalloc(sizeof(struct mtd_file_s)); if (!attr) { - fdbg("ERROR: Failed to allocate file attributes\n"); + ferr("ERROR: Failed to allocate file attributes\n"); return -ENOMEM; } @@ -201,7 +201,7 @@ static ssize_t mtd_read(FAR struct file *filep, FAR char *buffer, ssize_t total = 0; ssize_t ret; - fvdbg("buffer=%p buflen=%d\n", buffer, (int)buflen); + finfo("buffer=%p buflen=%d\n", buffer, (int)buflen); /* Recover our private data from the struct file instance */ @@ -266,7 +266,7 @@ static int mtd_dup(FAR const struct file *oldp, FAR struct file *newp) FAR struct mtd_file_s *oldattr; FAR struct mtd_file_s *newattr; - fvdbg("Dup %p->%p\n", oldp, newp); + finfo("Dup %p->%p\n", oldp, newp); /* Recover our private data from the old struct file instance */ @@ -278,7 +278,7 @@ static int mtd_dup(FAR const struct file *oldp, FAR struct file *newp) newattr = (FAR struct mtd_file_s *)kmm_zalloc(sizeof(struct mtd_file_s)); if (!newattr) { - fdbg("ERROR: Failed to allocate file attributes\n"); + ferr("ERROR: Failed to allocate file attributes\n"); return -ENOMEM; } diff --git a/drivers/mtd/mtd_rwbuffer.c b/drivers/mtd/mtd_rwbuffer.c index 0e05a7c92bca2dbf82981d8f274820a068702c7c..c152bc5f754bf5f8b337fb7fb35efe75aea28649 100644 --- a/drivers/mtd/mtd_rwbuffer.c +++ b/drivers/mtd/mtd_rwbuffer.c @@ -174,7 +174,7 @@ static int mtd_erase(FAR struct mtd_dev_s *dev, off_t block, size_t nblocks) size_t nsectors; int ret; - fvdbg("block: %08lx nsectors: %lu\n", + finfo("block: %08lx nsectors: %lu\n", (unsigned long)block, (unsigned int)nsectors); /* Convert to logical sectors and sector numbers */ @@ -187,7 +187,7 @@ static int mtd_erase(FAR struct mtd_dev_s *dev, off_t block, size_t nblocks) ret = rwb_invalidate(&priv->rwb, sector, nsectors); if (ret < 0) { - fdbg("ERROR: rwb_invalidate failed: %d\n", ret); + ferr("ERROR: rwb_invalidate failed: %d\n", ret); return ret; } @@ -253,7 +253,7 @@ static int mtd_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) FAR struct mtd_rwbuffer_s *priv = (FAR struct mtd_rwbuffer_s *)dev; int ret = -EINVAL; /* Assume good command with bad parameters */ - fvdbg("cmd: %d \n", cmd); + finfo("cmd: %d \n", cmd); switch (cmd) { @@ -276,7 +276,7 @@ static int mtd_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) geo->neraseblocks = priv->rwb.nblocks / priv->spb; ret = OK; - fvdbg("blocksize: %d erasesize: %d neraseblocks: %d\n", + finfo("blocksize: %d erasesize: %d neraseblocks: %d\n", geo->blocksize, geo->erasesize, geo->neraseblocks); } } @@ -289,7 +289,7 @@ static int mtd_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) ret = priv->dev->ioctl(priv->dev, MTDIOC_BULKERASE, 0); if (ret >= 0) { - fdbg("ERROR: Device ioctl failed: %d\n", ret); + ferr("ERROR: Device ioctl failed: %d\n", ret); break; } @@ -298,7 +298,7 @@ static int mtd_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) ret = rwb_invalidate(&priv->rwb, 0, priv->rwb.nblocks); if (ret < 0) { - fdbg("ERROR: rwb_invalidate failed: %d\n", ret); + ferr("ERROR: rwb_invalidate failed: %d\n", ret); } } break; @@ -309,7 +309,7 @@ static int mtd_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) break; } - fvdbg("return %d\n", ret); + finfo("return %d\n", ret); return ret; } @@ -337,7 +337,7 @@ FAR struct mtd_dev_s *mtd_rwb_initialize(FAR struct mtd_dev_s *mtd) struct mtd_geometry_s geo; int ret; - fvdbg("mtd: %p\n", mtd); + finfo("mtd: %p\n", mtd); DEBUGASSERT(mtd && mtd->ioctl); /* Get the device geometry */ @@ -345,7 +345,7 @@ FAR struct mtd_dev_s *mtd_rwb_initialize(FAR struct mtd_dev_s *mtd) ret = mtd->ioctl(mtd, MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&geo)); if (ret < 0) { - fdbg("ERROR: MTDIOC_GEOMETRY ioctl failed: %d\n", ret); + ferr("ERROR: MTDIOC_GEOMETRY ioctl failed: %d\n", ret); return NULL; } @@ -404,7 +404,7 @@ FAR struct mtd_dev_s *mtd_rwb_initialize(FAR struct mtd_dev_s *mtd) ret = rwb_initialize(&priv->rwb); if (ret < 0) { - fdbg("ERROR: rwb_initialize failed: %d\n", ret); + ferr("ERROR: rwb_initialize failed: %d\n", ret); kmm_free(priv); return NULL; } @@ -418,7 +418,7 @@ FAR struct mtd_dev_s *mtd_rwb_initialize(FAR struct mtd_dev_s *mtd) /* Return the implementation-specific state structure as the MTD device */ - fvdbg("Return %p\n", priv); + finfo("Return %p\n", priv); return &priv->mtd; } diff --git a/drivers/mtd/n25qxxx.c b/drivers/mtd/n25qxxx.c index d79f2877b900f5097c1a60d5e6408c1061658718..191cc1cd22a08e2f0a56221e93fb84e4ef91b93e 100644 --- a/drivers/mtd/n25qxxx.c +++ b/drivers/mtd/n25qxxx.c @@ -391,7 +391,7 @@ static int n25qxxx_command(FAR struct qspi_dev_s *qspi, uint8_t cmd) { struct qspi_cmdinfo_s cmdinfo; - fvdbg("CMD: %02x\n", cmd); + finfo("CMD: %02x\n", cmd); cmdinfo.flags = 0; cmdinfo.addrlen = 0; @@ -412,7 +412,7 @@ static int n25qxxx_command_address(FAR struct qspi_dev_s *qspi, uint8_t cmd, { struct qspi_cmdinfo_s cmdinfo; - fvdbg("CMD: %02x Address: %04lx addrlen=%d\n", cmd, (unsigned long)addr, addrlen); + finfo("CMD: %02x Address: %04lx addrlen=%d\n", cmd, (unsigned long)addr, addrlen); cmdinfo.flags = QSPICMD_ADDRESS; cmdinfo.addrlen = addrlen; @@ -433,7 +433,7 @@ static int n25qxxx_command_read(FAR struct qspi_dev_s *qspi, uint8_t cmd, { struct qspi_cmdinfo_s cmdinfo; - fvdbg("CMD: %02x buflen: %lu\n", cmd, (unsigned long)buflen); + finfo("CMD: %02x buflen: %lu\n", cmd, (unsigned long)buflen); cmdinfo.flags = QSPICMD_READDATA; cmdinfo.addrlen = 0; @@ -454,7 +454,7 @@ static int n25qxxx_command_write(FAR struct qspi_dev_s *qspi, uint8_t cmd, { struct qspi_cmdinfo_s cmdinfo; - fvdbg("CMD: %02x buflen: %lu\n", cmd, (unsigned long)buflen); + finfo("CMD: %02x buflen: %lu\n", cmd, (unsigned long)buflen); cmdinfo.flags = QSPICMD_WRITEDATA; cmdinfo.addrlen = 0; @@ -567,7 +567,7 @@ static inline int n25qxxx_readid(struct n25qxxx_dev_s *priv) n25qxxx_unlock(priv->qspi); - fvdbg("Manufacturer: %02x Device Type %02x, Capacity: %02x\n", + finfo("Manufacturer: %02x Device Type %02x, Capacity: %02x\n", priv->cmdbuf[0], priv->cmdbuf[1], priv->cmdbuf[2]); /* Check for a recognized memory device type */ @@ -575,7 +575,7 @@ static inline int n25qxxx_readid(struct n25qxxx_dev_s *priv) if (priv->cmdbuf[1] != N25QXXX3V_JEDEC_DEVICE_TYPE && priv->cmdbuf[1] != N25QXXX2V_JEDEC_DEVICE_TYPE) { - fdbg("ERROR: Unrecognized device type: 0x%02x\n", priv->cmdbuf[1]); + ferr("ERROR: Unrecognized device type: 0x%02x\n", priv->cmdbuf[1]); return -ENODEV; } @@ -628,7 +628,7 @@ static inline int n25qxxx_readid(struct n25qxxx_dev_s *priv) /* Support for this part is not implemented yet */ default: - fdbg("ERROR: Unsupported memory capacity: %02x\n", priv->cmdbuf[2]); + ferr("ERROR: Unsupported memory capacity: %02x\n", priv->cmdbuf[2]); return -ENODEV; } @@ -795,14 +795,14 @@ static int n25qxxx_erase_sector(struct n25qxxx_dev_s *priv, off_t sector) off_t address; uint8_t status; - fvdbg("sector: %08lx\n", (unsigned long)sector); + finfo("sector: %08lx\n", (unsigned long)sector); /* Check that the flash is ready and unprotected */ status = n25qxxx_read_status(priv); if ((status & STATUS_BUSY_MASK) != STATUS_READY) { - fdbg("ERROR: Flash busy: %02x", status); + ferr("ERROR: Flash busy: %02x", status); return -EBUSY; } @@ -813,7 +813,7 @@ static int n25qxxx_erase_sector(struct n25qxxx_dev_s *priv, off_t sector) if ((status & (STATUS_BP3_MASK|STATUS_BP_MASK)) != 0 && n25qxxx_isprotected(priv, status, address)) { - fdbg("ERROR: Flash protected: %02x", status); + ferr("ERROR: Flash protected: %02x", status); return -EACCES; } @@ -842,7 +842,7 @@ static int n25qxxx_erase_chip(struct n25qxxx_dev_s *priv) status = n25qxxx_read_status(priv); if ((status & (STATUS_BP3_MASK|STATUS_BP_MASK)) != 0) { - fdbg("ERROR: FLASH is Protected: %02x", status); + ferr("ERROR: FLASH is Protected: %02x", status); return -EACCES; } @@ -872,7 +872,7 @@ static int n25qxxx_read_byte(FAR struct n25qxxx_dev_s *priv, FAR uint8_t *buffer { struct qspi_meminfo_s meminfo; - fvdbg("address: %08lx nbytes: %d\n", (long)address, (int)buflen); + finfo("address: %08lx nbytes: %d\n", (long)address, (int)buflen); meminfo.flags = QSPIMEM_READ | QSPIMEM_QUADIO; meminfo.addrlen = 3; @@ -898,7 +898,7 @@ static int n25qxxx_write_page(struct n25qxxx_dev_s *priv, FAR const uint8_t *buf int ret; int i; - fvdbg("address: %08lx buflen: %u\n", (unsigned long)address, (unsigned)buflen); + finfo("address: %08lx buflen: %u\n", (unsigned long)address, (unsigned)buflen); npages = (buflen >> priv->pageshift); pagesize = (1 << priv->pageshift); @@ -928,7 +928,7 @@ static int n25qxxx_write_page(struct n25qxxx_dev_s *priv, FAR const uint8_t *buf if (ret < 0) { - fdbg("ERROR: QSPI_MEMORY failed writing address=%06x\n", + ferr("ERROR: QSPI_MEMORY failed writing address=%06x\n", address); return ret; } @@ -976,7 +976,7 @@ static int n25qxxx_flush_cache(struct n25qxxx_dev_s *priv) ret = n25qxxx_write_page(priv, priv->sector, address, 1 << priv->sectorshift); if (ret < 0) { - fdbg("ERROR: n25qxxx_write_page failed: %d\n", ret); + ferr("ERROR: n25qxxx_write_page failed: %d\n", ret); } /* The case is no long dirty and the FLASH is no longer erased */ @@ -1008,7 +1008,7 @@ static FAR uint8_t *n25qxxx_read_cache(struct n25qxxx_dev_s *priv, off_t sector) shift = priv->sectorshift - N25QXXX_SECTOR512_SHIFT; esectno = sector >> shift; - fvdbg("sector: %ld esectno: %d shift=%d\n", sector, esectno, shift); + finfo("sector: %ld esectno: %d shift=%d\n", sector, esectno, shift); /* Check if the requested erase block is already in the cache */ @@ -1019,7 +1019,7 @@ static FAR uint8_t *n25qxxx_read_cache(struct n25qxxx_dev_s *priv, off_t sector) ret = n25qxxx_flush_cache(priv); if (ret < 0) { - fdbg("ERROR: n25qxxx_flush_cache failed: %d\n", ret); + ferr("ERROR: n25qxxx_flush_cache failed: %d\n", ret); return NULL; } @@ -1030,7 +1030,7 @@ static FAR uint8_t *n25qxxx_read_cache(struct n25qxxx_dev_s *priv, off_t sector) (1 << priv->sectorshift)); if (ret < 0) { - fdbg("ERROR: n25qxxx_read_byte failed: %d\n", ret); + ferr("ERROR: n25qxxx_read_byte failed: %d\n", ret); return NULL; } @@ -1076,7 +1076,7 @@ static void n25qxxx_erase_cache(struct n25qxxx_dev_s *priv, off_t sector) if (!IS_ERASED(priv)) { off_t esectno = sector >> (priv->sectorshift - N25QXXX_SECTOR512_SHIFT); - fvdbg("sector: %ld esectno: %d\n", sector, esectno); + finfo("sector: %ld esectno: %d\n", sector, esectno); DEBUGVERIFY(n25qxxx_erase_sector(priv, esectno)); SET_ERASED(priv); @@ -1120,12 +1120,12 @@ static int n25qxxx_write_cache(FAR struct n25qxxx_dev_s *priv, if (!IS_ERASED(priv)) { off_t esectno = sector >> (priv->sectorshift - N25QXXX_SECTOR512_SHIFT); - fvdbg("sector: %ld esectno: %d\n", sector, esectno); + finfo("sector: %ld esectno: %d\n", sector, esectno); ret = n25qxxx_erase_sector(priv, esectno); if (ret < 0) { - fdbg("ERROR: n25qxxx_erase_sector failed: %d\n", ret); + ferr("ERROR: n25qxxx_erase_sector failed: %d\n", ret); return ret; } @@ -1161,7 +1161,7 @@ static int n25qxxx_erase(FAR struct mtd_dev_s *dev, off_t startblock, size_t nbl int ret; #endif - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* Lock access to the SPI bus until we complete the erase */ @@ -1206,7 +1206,7 @@ static ssize_t n25qxxx_bread(FAR struct mtd_dev_s *dev, off_t startblock, #endif ssize_t nbytes; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* On this device, we can handle the block read just like the byte-oriented read */ @@ -1239,7 +1239,7 @@ static ssize_t n25qxxx_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, FAR struct n25qxxx_dev_s *priv = (FAR struct n25qxxx_dev_s *)dev; int ret = (int)nblocks; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* Lock the QuadSPI bus and write all of the pages to FLASH */ @@ -1249,7 +1249,7 @@ static ssize_t n25qxxx_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, ret = n25qxxx_write_cache(priv, buffer, startblock, nblocks); if (ret < 0) { - fdbg("ERROR: n25qxxx_write_cache failed: %d\n", ret); + ferr("ERROR: n25qxxx_write_cache failed: %d\n", ret); } #else @@ -1257,7 +1257,7 @@ static ssize_t n25qxxx_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, nblocks << priv->sectorshift); if (ret < 0) { - fdbg("ERROR: n25qxxx_write_page failed: %d\n", ret); + ferr("ERROR: n25qxxx_write_page failed: %d\n", ret); } #endif @@ -1276,7 +1276,7 @@ static ssize_t n25qxxx_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbyt FAR struct n25qxxx_dev_s *priv = (FAR struct n25qxxx_dev_s *)dev; int ret; - fvdbg("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); + finfo("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); /* Lock the QuadSPI bus and select this FLASH part */ @@ -1286,11 +1286,11 @@ static ssize_t n25qxxx_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbyt if (ret < 0) { - fdbg("ERROR: n25qxxx_read_byte returned: %d\n", ret); + ferr("ERROR: n25qxxx_read_byte returned: %d\n", ret); return (ssize_t)ret; } - fvdbg("return nbytes: %d\n", (int)nbytes); + finfo("return nbytes: %d\n", (int)nbytes); return (ssize_t)nbytes; } @@ -1303,7 +1303,7 @@ static int n25qxxx_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) FAR struct n25qxxx_dev_s *priv = (FAR struct n25qxxx_dev_s *)dev; int ret = -EINVAL; /* Assume good command with bad parameters */ - fvdbg("cmd: %d \n", cmd); + finfo("cmd: %d \n", cmd); switch (cmd) { @@ -1334,7 +1334,7 @@ static int n25qxxx_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) #endif ret = OK; - fvdbg("blocksize: %d erasesize: %d neraseblocks: %d\n", + finfo("blocksize: %d erasesize: %d neraseblocks: %d\n", geo->blocksize, geo->erasesize, geo->neraseblocks); } } @@ -1375,7 +1375,7 @@ static int n25qxxx_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) break; } - fvdbg("return %d\n", ret); + finfo("return %d\n", ret); return ret; } @@ -1401,7 +1401,7 @@ FAR struct mtd_dev_s *n25qxxx_initialize(FAR struct qspi_dev_s *qspi, bool unpro FAR struct n25qxxx_dev_s *priv; int ret; - fvdbg("qspi: %p\n", qspi); + finfo("qspi: %p\n", qspi); DEBUGASSERT(qspi != NULL); /* Allocate a state structure (we allocate the structure instead of using @@ -1430,7 +1430,7 @@ FAR struct mtd_dev_s *n25qxxx_initialize(FAR struct qspi_dev_s *qspi, bool unpro priv->cmdbuf = (FAR uint8_t *)QSPI_ALLOC(qspi, 4); if (priv->cmdbuf == NULL) { - fdbg("ERROR Failed to allocate command buffer\n"); + ferr("ERROR Failed to allocate command buffer\n"); goto errout_with_priv; } @@ -1439,7 +1439,7 @@ FAR struct mtd_dev_s *n25qxxx_initialize(FAR struct qspi_dev_s *qspi, bool unpro priv->readbuf = (FAR uint8_t *)QSPI_ALLOC(qspi, 1); if (priv->readbuf == NULL) { - fdbg("ERROR Failed to allocate read buffer\n"); + ferr("ERROR Failed to allocate read buffer\n"); goto errout_with_cmdbuf; } @@ -1450,7 +1450,7 @@ FAR struct mtd_dev_s *n25qxxx_initialize(FAR struct qspi_dev_s *qspi, bool unpro { /* Unrecognized! Discard all of that work we just did and return NULL */ - fdbg("ERROR Unrecognized QSPI device\n"); + ferr("ERROR Unrecognized QSPI device\n"); goto errout_with_readbuf; } @@ -1470,7 +1470,7 @@ FAR struct mtd_dev_s *n25qxxx_initialize(FAR struct qspi_dev_s *qspi, bool unpro ret = n25qxxx_unprotect(priv, 0, priv->nsectors - 1); if (ret < 0) { - fdbg("ERROR: Sector unprotect failed\n"); + ferr("ERROR: Sector unprotect failed\n"); } } @@ -1482,7 +1482,7 @@ FAR struct mtd_dev_s *n25qxxx_initialize(FAR struct qspi_dev_s *qspi, bool unpro { /* Allocation failed! Discard all of that work we just did and return NULL */ - fdbg("ERROR: Sector allocation failed\n"); + ferr("ERROR: Sector allocation failed\n"); goto errout_with_readbuf; } #endif @@ -1496,7 +1496,7 @@ FAR struct mtd_dev_s *n25qxxx_initialize(FAR struct qspi_dev_s *qspi, bool unpro /* Return the implementation-specific state structure as the MTD device */ - fvdbg("Return %p\n", priv); + finfo("Return %p\n", priv); return (FAR struct mtd_dev_s *)priv; errout_with_readbuf: diff --git a/drivers/mtd/rammtd.c b/drivers/mtd/rammtd.c index af63097723b7c69fb989d615adad77a05e870449..66c350888c4a9aa3dfb9e7af3a94795f2b8d12a5 100644 --- a/drivers/mtd/rammtd.c +++ b/drivers/mtd/rammtd.c @@ -169,10 +169,10 @@ static void *ram_write(FAR void *dest, FAR const void *src, size_t len) * erased state. */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (newvalue != srcvalue) { - dbg("ERROR: Bad write: source=%02x dest=%02x result=%02x\n", + _err("ERROR: Bad write: source=%02x dest=%02x result=%02x\n", srcvalue, oldvalue, newvalue); } #endif @@ -446,7 +446,7 @@ FAR struct mtd_dev_s *rammtd_initialize(FAR uint8_t *start, size_t size) priv = (FAR struct ram_dev_s *)kmm_zalloc(sizeof(struct ram_dev_s)); if (!priv) { - fdbg("Failed to allocate the RAM MTD state structure\n"); + ferr("ERROR: Failed to allocate the RAM MTD state structure\n"); return NULL; } @@ -455,7 +455,7 @@ FAR struct mtd_dev_s *rammtd_initialize(FAR uint8_t *start, size_t size) nblocks = size / CONFIG_RAMMTD_ERASESIZE; if (nblocks < 1) { - fdbg("Need to provide at least one full erase block\n"); + ferr("ERROR: Need to provide at least one full erase block\n"); return NULL; } diff --git a/drivers/mtd/ramtron.c b/drivers/mtd/ramtron.c index 89e0ade8597aa2f6185d60c9fb3d1842948ea6bb..a81469f92ee125dd88fbf97a07109a2ea644d25a 100644 --- a/drivers/mtd/ramtron.c +++ b/drivers/mtd/ramtron.c @@ -368,7 +368,7 @@ static inline int ramtron_readid(struct ramtron_dev_s *priv) uint16_t part; int i; - fvdbg("priv: %p\n", priv); + finfo("priv: %p\n", priv); /* Lock the SPI bus, configure the bus, and select this FLASH part. */ @@ -418,7 +418,7 @@ static inline int ramtron_readid(struct ramtron_dev_s *priv) UNUSED(manufacturer); /* Eliminate warnings when debug is off */ UNUSED(memory); /* Eliminate warnings when debug is off */ - fvdbg("RAMTRON %s of size %d bytes (mf:%02x mem:%02x cap:%02x part:%02x)\n", + finfo("RAMTRON %s of size %d bytes (mf:%02x mem:%02x cap:%02x part:%02x)\n", priv->part->name, priv->part->size, manufacturer, memory, capacity, part); priv->sectorshift = RAMTRON_EMULATE_SECTOR_SHIFT; @@ -429,7 +429,7 @@ static inline int ramtron_readid(struct ramtron_dev_s *priv) return OK; } - fvdbg("RAMTRON device not found\n"); + finfo("RAMTRON device not found\n"); return -ENODEV; } @@ -471,12 +471,12 @@ static int ramtron_waitwritecomplete(struct ramtron_dev_s *priv) if (retries > 0) { - fvdbg("Complete\n"); + finfo("Complete\n"); retries = OK; } else { - fdbg("timeout waiting for write completion\n"); + ferr("ERROR: timeout waiting for write completion\n"); retries = -EAGAIN; } @@ -500,7 +500,7 @@ static void ramtron_writeenable(struct ramtron_dev_s *priv) /* Deselect the FLASH */ SPI_SELECT(priv->dev, SPIDEV_FLASH, false); - fvdbg("Enabled\n"); + finfo("Enabled\n"); } /************************************************************************************ @@ -529,7 +529,7 @@ static inline int ramtron_pagewrite(struct ramtron_dev_s *priv, FAR const uint8_ { off_t offset = page << priv->pageshift; - fvdbg("page: %08lx offset: %08lx\n", (long)page, (long)offset); + finfo("page: %08lx offset: %08lx\n", (long)page, (long)offset); #ifndef RAMTRON_WRITEWAIT /* Wait for any preceding write to complete. We could simplify things by @@ -564,7 +564,7 @@ static inline int ramtron_pagewrite(struct ramtron_dev_s *priv, FAR const uint8_ /* Deselect the FLASH: Chip Select high */ SPI_SELECT(priv->dev, SPIDEV_FLASH, false); - fvdbg("Written\n"); + finfo("Written\n"); #ifdef RAMTRON_WRITEWAIT /* Wait for write completion now so we can report any errors to the caller. Thus @@ -583,8 +583,8 @@ static inline int ramtron_pagewrite(struct ramtron_dev_s *priv, FAR const uint8_ static int ramtron_erase(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks) { - fvdbg("startblock: %08lx nblocks: %d\n", (unsigned long)startblock, (int)nblocks); - fvdbg("On RAMTRON devices erasing makes no sense, returning as OK\n"); + finfo("startblock: %08lx nblocks: %d\n", (unsigned long)startblock, (int)nblocks); + finfo("On RAMTRON devices erasing makes no sense, returning as OK\n"); return (int)nblocks; } @@ -598,7 +598,7 @@ static ssize_t ramtron_bread(FAR struct mtd_dev_s *dev, off_t startblock, FAR struct ramtron_dev_s *priv = (FAR struct ramtron_dev_s *)dev; ssize_t nbytes; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* On this device, we can handle the block read just like the byte-oriented read */ @@ -622,7 +622,7 @@ static ssize_t ramtron_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, FAR struct ramtron_dev_s *priv = (FAR struct ramtron_dev_s *)dev; size_t blocksleft = nblocks; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* Lock the SPI bus and write each page to FLASH */ @@ -653,7 +653,7 @@ static ssize_t ramtron_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbyt uint8_t status; #endif - fvdbg("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); + finfo("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); #ifndef RAMTRON_WRITEWAIT /* Wait for any preceding write to complete. We could simplify things by @@ -694,7 +694,7 @@ static ssize_t ramtron_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbyt status = SPI_SEND(priv->dev, RAMTRON_DUMMY); if ((status & ~RAMTRON_SR_SRWD) == 0) { - fdbg("read status failed - got 0x%02x\n", (unsigned)status); + ferr("ERROR: read status failed - got 0x%02x\n", (unsigned)status); nbytes = -EIO; } #endif @@ -704,7 +704,7 @@ static ssize_t ramtron_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbyt SPI_SELECT(priv->dev, SPIDEV_FLASH, false); ramtron_unlock(priv->dev); - fvdbg("return nbytes: %d\n", (int)nbytes); + finfo("return nbytes: %d\n", (int)nbytes); return nbytes; } @@ -717,7 +717,7 @@ static int ramtron_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) FAR struct ramtron_dev_s *priv = (FAR struct ramtron_dev_s *)dev; int ret = -EINVAL; /* Assume good command with bad parameters */ - fvdbg("cmd: %d \n", cmd); + finfo("cmd: %d \n", cmd); switch (cmd) { @@ -740,14 +740,14 @@ static int ramtron_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) geo->neraseblocks = priv->nsectors; ret = OK; - fvdbg("blocksize: %d erasesize: %d neraseblocks: %d\n", + finfo("blocksize: %d erasesize: %d neraseblocks: %d\n", geo->blocksize, geo->erasesize, geo->neraseblocks); } } break; case MTDIOC_BULKERASE: - fvdbg("BULDERASE: Makes no sense in ramtron. Let's confirm operation as OK\n"); + finfo("BULDERASE: Makes no sense in ramtron. Let's confirm operation as OK\n"); ret = OK; break; @@ -757,7 +757,7 @@ static int ramtron_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) if (arg > 0 && arg <= RAMTRON_INIT_CLK_MAX) { priv->speed = arg; - fvdbg("set bus speed to %lu\n", priv->speed); + finfo("set bus speed to %lu\n", priv->speed); ret = OK; } } @@ -770,7 +770,7 @@ static int ramtron_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) break; } - fvdbg("return %d\n", ret); + finfo("return %d\n", ret); return ret; } @@ -792,7 +792,7 @@ FAR struct mtd_dev_s *ramtron_initialize(FAR struct spi_dev_s *dev) { FAR struct ramtron_dev_s *priv; - fvdbg("dev: %p\n", dev); + finfo("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. @@ -838,6 +838,6 @@ FAR struct mtd_dev_s *ramtron_initialize(FAR struct spi_dev_s *dev) /* Return the implementation-specific state structure as the MTD device */ - fvdbg("Return %p\n", priv); + finfo("Return %p\n", priv); return (FAR struct mtd_dev_s *)priv; } diff --git a/drivers/mtd/s25fl1.c b/drivers/mtd/s25fl1.c index 5a89c0d9e84abb74126c3ccf8a3dc06b98a3468b..f3181dd475eb4b70c3b3a88f7421c1949335e5d0 100644 --- a/drivers/mtd/s25fl1.c +++ b/drivers/mtd/s25fl1.c @@ -443,7 +443,7 @@ static int s25fl1_command(FAR struct qspi_dev_s *qspi, uint8_t cmd) { struct qspi_cmdinfo_s cmdinfo; - fvdbg("CMD: %02x\n", cmd); + finfo("CMD: %02x\n", cmd); cmdinfo.flags = 0; cmdinfo.addrlen = 0; @@ -464,7 +464,7 @@ static int s25fl1_command_address(FAR struct qspi_dev_s *qspi, uint8_t cmd, { struct qspi_cmdinfo_s cmdinfo; - fvdbg("CMD: %02x Address: %04lx addrlen=%d\n", cmd, (unsigned long)addr, addrlen); + finfo("CMD: %02x Address: %04lx addrlen=%d\n", cmd, (unsigned long)addr, addrlen); cmdinfo.flags = QSPICMD_ADDRESS; cmdinfo.addrlen = addrlen; @@ -485,7 +485,7 @@ static int s25fl1_command_read(FAR struct qspi_dev_s *qspi, uint8_t cmd, { struct qspi_cmdinfo_s cmdinfo; - fvdbg("CMD: %02x buflen: %lu\n", cmd, (unsigned long)buflen); + finfo("CMD: %02x buflen: %lu\n", cmd, (unsigned long)buflen); cmdinfo.flags = QSPICMD_READDATA; cmdinfo.addrlen = 0; @@ -506,7 +506,7 @@ static int s25fl1_command_write(FAR struct qspi_dev_s *qspi, uint8_t cmd, { struct qspi_cmdinfo_s cmdinfo; - fvdbg("CMD: %02x buflen: %lu\n", cmd, (unsigned long)buflen); + finfo("CMD: %02x buflen: %lu\n", cmd, (unsigned long)buflen); cmdinfo.flags = QSPICMD_WRITEDATA; cmdinfo.addrlen = 0; @@ -613,14 +613,14 @@ static inline int s25fl1_readid(struct s25fl1_dev_s *priv) s25fl1_unlock(priv->qspi); - fvdbg("Manufacturer: %02x Device Type %02x, Capacity: %02x", + finfo("Manufacturer: %02x Device Type %02x, Capacity: %02x", priv->cmdbuf[0], priv->cmdbuf[1], priv->cmdbuf[2]); /* Check for a recognized memory device type */ if (priv->cmdbuf[1] != S25FL1_JEDEC_DEVICE_TYPE) { - fdbg("ERROR: Unrecognized device type: %02x\n", priv->cmdbuf[1]); + ferr("ERROR: Unrecognized device type: %02x\n", priv->cmdbuf[1]); return -ENODEV; } @@ -649,7 +649,7 @@ static inline int s25fl1_readid(struct s25fl1_dev_s *priv) /* Support for this part is not implemented yet */ default: - fdbg("ERROR: Unsupported memory capacity: %02x\n", priv->cmdbuf[2]); + ferr("ERROR: Unsupported memory capacity: %02x\n", priv->cmdbuf[2]); return -ENODEV; } @@ -830,14 +830,14 @@ static int s25fl1_erase_sector(struct s25fl1_dev_s *priv, off_t sector) off_t address; uint8_t status; - fvdbg("sector: %08lx\n", (unsigned long)sector); + finfo("sector: %08lx\n", (unsigned long)sector); /* Check that the flash is ready and unprotected */ status = sf25fl1_read_status1(priv); if ((status & STATUS1_BUSY_MASK) != STATUS1_READY) { - fdbg("ERROR: Flash busy: %02x", status); + ferr("ERROR: Flash busy: %02x", status); return -EBUSY; } @@ -848,7 +848,7 @@ static int s25fl1_erase_sector(struct s25fl1_dev_s *priv, off_t sector) if ((status & STATUS1_BP_MASK) != 0 && s25fl1_isprotected(priv, status, address)) { - fdbg("ERROR: Flash protected: %02x", status); + ferr("ERROR: Flash protected: %02x", status); return -EACCES; } @@ -876,7 +876,7 @@ static int s25fl1_erase_chip(struct s25fl1_dev_s *priv) status = sf25fl1_read_status1(priv); if ((status & STATUS1_BP_MASK) != 0) { - fdbg("ERROR: FLASH is Protected: %02x", status); + ferr("ERROR: FLASH is Protected: %02x", status); return -EACCES; } @@ -906,7 +906,7 @@ static int s25fl1_read_byte(FAR struct s25fl1_dev_s *priv, FAR uint8_t *buffer, { struct qspi_meminfo_s meminfo; - fvdbg("address: %08lx nbytes: %d\n", (long)address, (int)buflen); + finfo("address: %08lx nbytes: %d\n", (long)address, (int)buflen); #ifdef CONFIG_S25FL1_SCRAMBLE meminfo.flags = QSPIMEM_READ | QSPIMEM_QUADIO | QSPIMEM_SCRAMBLE; @@ -939,7 +939,7 @@ static int s25fl1_write_page(struct s25fl1_dev_s *priv, FAR const uint8_t *buffe int ret; int i; - fvdbg("address: %08lx buflen: %u\n", (unsigned long)address, (unsigned)buflen); + finfo("address: %08lx buflen: %u\n", (unsigned long)address, (unsigned)buflen); npages = (buflen >> priv->pageshift); pagesize = (1 << priv->pageshift); @@ -976,7 +976,7 @@ static int s25fl1_write_page(struct s25fl1_dev_s *priv, FAR const uint8_t *buffe if (ret < 0) { - fdbg("ERROR: QSPI_MEMORY failed writing address=%06x\n", + ferr("ERROR: QSPI_MEMORY failed writing address=%06x\n", address); return ret; } @@ -1023,7 +1023,7 @@ static int s25fl1_flush_cache(struct s25fl1_dev_s *priv) ret = s25fl1_write_page(priv, priv->sector, address, 1 << priv->sectorshift); if (ret < 0) { - fdbg("ERROR: s25fl1_write_page failed: %d\n", ret); + ferr("ERROR: s25fl1_write_page failed: %d\n", ret); } /* The case is no long dirty and the FLASH is no longer erased */ @@ -1055,7 +1055,7 @@ static FAR uint8_t *s25fl1_read_cache(struct s25fl1_dev_s *priv, off_t sector) shift = priv->sectorshift - S25FL1_SECTOR512_SHIFT; esectno = sector >> shift; - fvdbg("sector: %ld esectno: %d shift=%d\n", sector, esectno, shift); + finfo("sector: %ld esectno: %d shift=%d\n", sector, esectno, shift); /* Check if the requested erase block is already in the cache */ @@ -1066,7 +1066,7 @@ static FAR uint8_t *s25fl1_read_cache(struct s25fl1_dev_s *priv, off_t sector) ret = s25fl1_flush_cache(priv); if (ret < 0) { - fdbg("ERROR: s25fl1_flush_cache failed: %d\n", ret); + ferr("ERROR: s25fl1_flush_cache failed: %d\n", ret); return NULL; } @@ -1077,7 +1077,7 @@ static FAR uint8_t *s25fl1_read_cache(struct s25fl1_dev_s *priv, off_t sector) (1 << priv->sectorshift)); if (ret < 0) { - fdbg("ERROR: s25fl1_read_byte failed: %d\n", ret); + ferr("ERROR: s25fl1_read_byte failed: %d\n", ret); return NULL; } @@ -1123,7 +1123,7 @@ static void s25fl1_erase_cache(struct s25fl1_dev_s *priv, off_t sector) if (!IS_ERASED(priv)) { off_t esectno = sector >> (priv->sectorshift - S25FL1_SECTOR512_SHIFT); - fvdbg("sector: %ld esectno: %d\n", sector, esectno); + finfo("sector: %ld esectno: %d\n", sector, esectno); DEBUGVERIFY(s25fl1_erase_sector(priv, esectno)); SET_ERASED(priv); @@ -1167,12 +1167,12 @@ static int s25fl1_write_cache(FAR struct s25fl1_dev_s *priv, if (!IS_ERASED(priv)) { off_t esectno = sector >> (priv->sectorshift - S25FL1_SECTOR512_SHIFT); - fvdbg("sector: %ld esectno: %d\n", sector, esectno); + finfo("sector: %ld esectno: %d\n", sector, esectno); ret = s25fl1_erase_sector(priv, esectno); if (ret < 0) { - fdbg("ERROR: s25fl1_erase_sector failed: %d\n", ret); + ferr("ERROR: s25fl1_erase_sector failed: %d\n", ret); return ret; } @@ -1208,7 +1208,7 @@ static int s25fl1_erase(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblo int ret; #endif - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* Lock access to the SPI bus until we complete the erase */ @@ -1252,7 +1252,7 @@ static ssize_t s25fl1_bread(FAR struct mtd_dev_s *dev, off_t startblock, #endif ssize_t nbytes; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* On this device, we can handle the block read just like the byte-oriented read */ @@ -1285,7 +1285,7 @@ static ssize_t s25fl1_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, FAR struct s25fl1_dev_s *priv = (FAR struct s25fl1_dev_s *)dev; int ret = (int)nblocks; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* Lock the QuadSPI bus and write all of the pages to FLASH */ @@ -1295,7 +1295,7 @@ static ssize_t s25fl1_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, ret = s25fl1_write_cache(priv, buffer, startblock, nblocks); if (ret < 0) { - fdbg("ERROR: s25fl1_write_cache failed: %d\n", ret); + ferr("ERROR: s25fl1_write_cache failed: %d\n", ret); } #else @@ -1303,7 +1303,7 @@ static ssize_t s25fl1_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, nblocks << priv->sectorshift); if (ret < 0) { - fdbg("ERROR: s25fl1_write_page failed: %d\n", ret); + ferr("ERROR: s25fl1_write_page failed: %d\n", ret); } #endif @@ -1322,7 +1322,7 @@ static ssize_t s25fl1_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbyte FAR struct s25fl1_dev_s *priv = (FAR struct s25fl1_dev_s *)dev; int ret; - fvdbg("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); + finfo("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); /* Lock the QuadSPI bus and select this FLASH part */ @@ -1332,11 +1332,11 @@ static ssize_t s25fl1_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbyte if (ret < 0) { - fdbg("ERROR: s25fl1_read_byte returned: %d\n", ret); + ferr("ERROR: s25fl1_read_byte returned: %d\n", ret); return (ssize_t)ret; } - fvdbg("return nbytes: %d\n", (int)nbytes); + finfo("return nbytes: %d\n", (int)nbytes); return (ssize_t)nbytes; } @@ -1349,7 +1349,7 @@ static int s25fl1_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) FAR struct s25fl1_dev_s *priv = (FAR struct s25fl1_dev_s *)dev; int ret = -EINVAL; /* Assume good command with bad parameters */ - fvdbg("cmd: %d \n", cmd); + finfo("cmd: %d \n", cmd); switch (cmd) { @@ -1380,7 +1380,7 @@ static int s25fl1_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) #endif ret = OK; - fvdbg("blocksize: %d erasesize: %d neraseblocks: %d\n", + finfo("blocksize: %d erasesize: %d neraseblocks: %d\n", geo->blocksize, geo->erasesize, geo->neraseblocks); } } @@ -1421,7 +1421,7 @@ static int s25fl1_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) break; } - fvdbg("return %d\n", ret); + finfo("return %d\n", ret); return ret; } @@ -1447,7 +1447,7 @@ FAR struct mtd_dev_s *s25fl1_initialize(FAR struct qspi_dev_s *qspi, bool unprot FAR struct s25fl1_dev_s *priv; int ret; - fvdbg("qspi: %p\n", qspi); + finfo("qspi: %p\n", qspi); DEBUGASSERT(qspi != NULL); /* Allocate a state structure (we allocate the structure instead of using @@ -1476,7 +1476,7 @@ FAR struct mtd_dev_s *s25fl1_initialize(FAR struct qspi_dev_s *qspi, bool unprot priv->cmdbuf = (FAR uint8_t *)QSPI_ALLOC(qspi, 4); if (priv->cmdbuf == NULL) { - fdbg("ERROR Failed to allocate command buffer\n"); + ferr("ERROR Failed to allocate command buffer\n"); goto errout_with_priv; } @@ -1485,7 +1485,7 @@ FAR struct mtd_dev_s *s25fl1_initialize(FAR struct qspi_dev_s *qspi, bool unprot priv->readbuf = (FAR uint8_t *)QSPI_ALLOC(qspi, 1); if (priv->readbuf == NULL) { - fdbg("ERROR Failed to allocate read buffer\n"); + ferr("ERROR Failed to allocate read buffer\n"); goto errout_with_cmdbuf; } @@ -1496,7 +1496,7 @@ FAR struct mtd_dev_s *s25fl1_initialize(FAR struct qspi_dev_s *qspi, bool unprot { /* Unrecognized! Discard all of that work we just did and return NULL */ - fdbg("ERROR Unrecognized QSPI device\n"); + ferr("ERROR Unrecognized QSPI device\n"); goto errout_with_readbuf; } @@ -1521,7 +1521,7 @@ FAR struct mtd_dev_s *s25fl1_initialize(FAR struct qspi_dev_s *qspi, bool unprot ret = s25fl1_unprotect(priv, 0, priv->nsectors - 1); if (ret < 0) { - fdbg("ERROR: Sector unprotect failed\n"); + ferr("ERROR: Sector unprotect failed\n"); } } @@ -1533,7 +1533,7 @@ FAR struct mtd_dev_s *s25fl1_initialize(FAR struct qspi_dev_s *qspi, bool unprot { /* Allocation failed! Discard all of that work we just did and return NULL */ - fdbg("ERROR: Sector allocation failed\n"); + ferr("ERROR: Sector allocation failed\n"); goto errout_with_readbuf; } #endif @@ -1547,7 +1547,7 @@ FAR struct mtd_dev_s *s25fl1_initialize(FAR struct qspi_dev_s *qspi, bool unprot /* Return the implementation-specific state structure as the MTD device */ - fvdbg("Return %p\n", priv); + finfo("Return %p\n", priv); return (FAR struct mtd_dev_s *)priv; errout_with_readbuf: diff --git a/drivers/mtd/sector512.c b/drivers/mtd/sector512.c index 3705efb76903230c1f7604f07773d0bed2425f29..56e07c8c6a6cf117211b0e99bb6810b861e2701d 100644 --- a/drivers/mtd/sector512.c +++ b/drivers/mtd/sector512.c @@ -155,7 +155,7 @@ static FAR uint8_t *s512_cacheread(struct s512_dev_s *priv, off_t sector512) /* Get the erase block containing this sector */ eblockno = sector512 / priv->stdperblock; - fvdbg("sector512: %lu eblockno: %lu\n", + finfo("sector512: %lu eblockno: %lu\n", (unsigned long)sector512, (unsigned long)eblockno); /* Check if the requested erase block is already in the cache */ @@ -173,7 +173,7 @@ static FAR uint8_t *s512_cacheread(struct s512_dev_s *priv, off_t sector512) priv->eblock); if (result < 0) { - fdbg("ERROR: bread(%lu, %lu) returned %ld\n", + ferr("ERROR: bread(%lu, %lu) returned %ld\n", (unsigned long)sector, (unsigned long)priv->eblocksize, (long)result); @@ -221,7 +221,7 @@ static void s512_cacheflush(struct s512_dev_s *priv) result = priv->dev->bwrite(priv->dev, sector, priv->sectperblock, priv->eblock); if (result < 0) { - fdbg("ERROR: bwrite(%lu, %lu) returned %ld\n", + ferr("ERROR: bwrite(%lu, %lu) returned %ld\n", (unsigned long)sector, (unsigned long)priv->eblocksize, (long)result); @@ -251,7 +251,7 @@ static int s512_erase(FAR struct mtd_dev_s *dev, off_t sector512, size_t nsector size_t eblockno; int ret; - fvdbg("sector512: %08lx nsectors: %lu\n", + finfo("sector512: %08lx nsectors: %lu\n", (unsigned long)sector512, (unsigned int)nsectors); while (sectorsleft-- > 0) @@ -263,7 +263,7 @@ static int s512_erase(FAR struct mtd_dev_s *dev, off_t sector512, size_t nsector dest = s512_cacheread(priv, sector512); if (!dest) { - fdbg("ERROR: s512_cacheread(%ul) failed\n", (unsigned long)sector512); + ferr("ERROR: s512_cacheread(%ul) failed\n", (unsigned long)sector512); DEBUGPANIC(); return -EIO; } @@ -276,13 +276,13 @@ static int s512_erase(FAR struct mtd_dev_s *dev, off_t sector512, size_t nsector if (!IS_ERASED(priv)) { eblockno = sector512 / priv->stdperblock; - fvdbg("sector512: %lu eblockno: %lu\n", + finfo("sector512: %lu eblockno: %lu\n", (unsigned long)sector512, (unsigned long)eblockno); ret = priv->dev->erase(priv->dev, eblockno, 1); if (ret < 0) { - fdbg("ERROR: Failed to erase block %lu: %d\n", + ferr("ERROR: Failed to erase block %lu: %d\n", (unsigned long)eblockno, ret); return ret; } @@ -320,7 +320,7 @@ static ssize_t s512_bread(FAR struct mtd_dev_s *dev, off_t sector512, ssize_t remaining; ssize_t result = nsectors; - fvdbg("sector512: %08lx nsectors: %d\n", (long)sector512, (int)nsectors); + finfo("sector512: %08lx nsectors: %d\n", (long)sector512, (int)nsectors); /* Read each 512 byte sector from the block via the erase block cache */ @@ -331,7 +331,7 @@ static ssize_t s512_bread(FAR struct mtd_dev_s *dev, off_t sector512, src = s512_cacheread(priv, sector512); if (!src) { - fdbg("ERROR: s512_cacheread(%ul) failed\n", (unsigned long)sector512); + ferr("ERROR: s512_cacheread(%ul) failed\n", (unsigned long)sector512); DEBUGPANIC(); result = (ssize_t)nsectors - remaining; @@ -369,7 +369,7 @@ static ssize_t s512_bwrite(FAR struct mtd_dev_s *dev, off_t sector512, size_t ns ssize_t result; off_t eblockno; - fvdbg("sector512: %08lx nsectors: %d\n", (long)sector512, (int)nsectors); + finfo("sector512: %08lx nsectors: %d\n", (long)sector512, (int)nsectors); FAR uint8_t *dest; @@ -399,13 +399,13 @@ static ssize_t s512_bwrite(FAR struct mtd_dev_s *dev, off_t sector512, size_t ns if (!IS_ERASED(priv)) { eblockno = sector512 / priv->stdperblock; - fvdbg("sector512: %lu eblockno: %lu\n", + finfo("sector512: %lu eblockno: %lu\n", (unsigned long)sector512, (unsigned long)eblockno); result = priv->dev->erase(priv->dev, eblockno, 1); if (result < 0) { - fdbg("ERROR: Failed to erase block %lu: %ld\n", + ferr("ERROR: Failed to erase block %lu: %ld\n", (unsigned long)eblockno, (long)result); return result; } @@ -445,7 +445,7 @@ static ssize_t s512_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, off_t sectoffset; off_t sector; - fvdbg("offset: %08lx nbytes: %lu\n", + finfo("offset: %08lx nbytes: %lu\n", (unsigned long)offset, (unsigned long)nbytes); /* Convert the offset into 512 byte sector address and a byte offset */ @@ -464,7 +464,7 @@ static ssize_t s512_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, { int result; - fdbg("ERROR: s512_cacheread(%ul) failed\n", (unsigned long)sector); + ferr("ERROR: s512_cacheread(%ul) failed\n", (unsigned long)sector); DEBUGPANIC(); result = (ssize_t)nbytes - remaining; @@ -488,7 +488,7 @@ static ssize_t s512_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, buffer += xfrsize; } - fvdbg("return nbytes: %d\n", (int)nbytes); + finfo("return nbytes: %d\n", (int)nbytes); return nbytes; } @@ -501,7 +501,7 @@ static int s512_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) FAR struct s512_dev_s *priv = (FAR struct s512_dev_s *)dev; int ret = -EINVAL; /* Assume good command with bad parameters */ - fvdbg("cmd: %d \n", cmd); + finfo("cmd: %d \n", cmd); switch (cmd) { @@ -524,7 +524,7 @@ static int s512_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) geo->neraseblocks = priv->neblocks * priv->stdperblock; ret = OK; - fvdbg("blocksize: %d erasesize: %d neraseblocks: %d\n", + finfo("blocksize: %d erasesize: %d neraseblocks: %d\n", geo->blocksize, geo->erasesize, geo->neraseblocks); } } @@ -550,7 +550,7 @@ static int s512_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) break; } - fvdbg("return %d\n", ret); + finfo("return %d\n", ret); return ret; } @@ -578,7 +578,7 @@ FAR struct mtd_dev_s *s512_initialize(FAR struct mtd_dev_s *mtd) FAR struct mtd_geometry_s geo; int ret; - fvdbg("mtd: %p\n", mtd); + finfo("mtd: %p\n", mtd); /* Get the device geometry */ @@ -590,7 +590,7 @@ FAR struct mtd_dev_s *s512_initialize(FAR struct mtd_dev_s *mtd) if (ret < 0 || geo.erasesize <= SECTOR_512 || (geo.erasesize & ~MASK_512) != geo.erasesize) { - fdbg("ERROR: MTDIOC_GEOMETRY ioctl returned %d, eraseize=%d\n", + ferr("ERROR: MTDIOC_GEOMETRY ioctl returned %d, eraseize=%d\n", ret, geo.erasesize); DEBUGPANIC(); return NULL; @@ -629,7 +629,7 @@ FAR struct mtd_dev_s *s512_initialize(FAR struct mtd_dev_s *mtd) { /* Allocation failed! Discard all of that work we just did and return NULL */ - fdbg("Allocation failed\n"); + ferr("ERROR: Allocation failed\n"); kmm_free(priv); priv = NULL; } @@ -643,6 +643,6 @@ FAR struct mtd_dev_s *s512_initialize(FAR struct mtd_dev_s *mtd) /* Return the implementation-specific state structure as the MTD device */ - fvdbg("Return %p\n", priv); + finfo("Return %p\n", priv); return &priv->mtd; } diff --git a/drivers/mtd/smart.c b/drivers/mtd/smart.c index 50804cc3abc595f94f4c21a5543b90a353f586c3..e763e6bcba392f39db06929ae3aacf19558015f3 100644 --- a/drivers/mtd/smart.c +++ b/drivers/mtd/smart.c @@ -441,7 +441,7 @@ static const struct file_operations g_fops = static int smart_open(FAR struct inode *inode) { - fvdbg("Entry\n"); + finfo("Entry\n"); return OK; } @@ -454,7 +454,7 @@ static int smart_open(FAR struct inode *inode) static int smart_close(FAR struct inode *inode) { - fvdbg("Entry\n"); + finfo("Entry\n"); return OK; } @@ -493,7 +493,7 @@ FAR static void *smart_malloc(FAR struct smart_struct_s *dev, } } - fdbg("SMART alloc: %ld\n", dev->bytesalloc); + finfo("SMART alloc: %ld\n", dev->bytesalloc); return ret; } #endif @@ -672,12 +672,12 @@ int smart_checkfree(FAR struct smart_struct_s *dev, int lineno) #ifdef CONFIG_DEBUG_FS if (freecount != dev->freesectors) { - fdbg("Free count incorrect in line %d! Calculated=%d, dev->freesectors=%d\n", + fwarn("WARNING: Free count incorrect in line %d! Calculated=%d, dev->freesectors=%d\n", lineno, freecount, dev->freesectors); /* Determine what changed from the last time which caused this error */ - fdbg(" ... Prev freesectors=%d, prev releasesectors=%d\n", + fwarn(" ... Prev freesectors=%d, prev releasesectors=%d\n", prev_freesectors, prev_releasesectors); if (prev_freecount) @@ -695,7 +695,7 @@ int smart_checkfree(FAR struct smart_struct_s *dev, int lineno) { /* This block's values are different from the last time ... report it */ - fdbg(" ... Block %d: Old Free=%d, old release=%d, New free=%d, new release = %d\n", + fwarn(" ... Block %d: Old Free=%d, old release=%d, New free=%d, new release = %d\n", x, prev_freecount[x], prev_releasecount[x], blockfree, blockrelease); } } @@ -767,11 +767,11 @@ static ssize_t smart_reload(struct smart_struct_s *dev, FAR uint8_t *buffer, /* Read the full erase block into the buffer */ - fvdbg("Read %d blocks starting at block %d\n", mtdBlocks, mtdStartBlock); + finfo("Read %d blocks starting at block %d\n", mtdBlocks, mtdStartBlock); nread = MTD_BREAD(dev->mtd, mtdStartBlock, mtdBlocks, buffer); if (nread != mtdBlocks) { - fdbg("Read %d blocks starting at block %d failed: %d\n", + ferr("ERROR: Read %d blocks starting at block %d failed: %d\n", nblocks, startblock, nread); } @@ -790,7 +790,7 @@ static ssize_t smart_read(FAR struct inode *inode, unsigned char *buffer, { FAR struct smart_struct_s *dev; - fvdbg("SMART: sector: %d nsectors: %d\n", start_sector, nsectors); + finfo("SMART: sector: %d nsectors: %d\n", start_sector, nsectors); DEBUGASSERT(inode && inode->i_private); #ifdef CONFIG_SMARTFS_MULTI_ROOT_DIRS @@ -826,7 +826,7 @@ static ssize_t smart_write(FAR struct inode *inode, int ret; off_t mtdstartblock, mtdblockcount; - fvdbg("sector: %d nsectors: %d\n", start_sector, nsectors); + finfo("sector: %d nsectors: %d\n", start_sector, nsectors); DEBUGASSERT(inode && inode->i_private); #ifdef CONFIG_SMARTFS_MULTI_ROOT_DIRS @@ -851,7 +851,7 @@ static ssize_t smart_write(FAR struct inode *inode, mtdblockcount = nsectors * dev->mtdBlksPerSector; mtdBlksPerErase = dev->mtdBlksPerSector * dev->sectorsPerBlk; - fvdbg("mtdsector: %d mtdnsectors: %d\n", mtdstartblock, mtdblockcount); + finfo("mtdsector: %d mtdnsectors: %d\n", mtdstartblock, mtdblockcount); /* Start at first block to be written */ @@ -873,7 +873,7 @@ static ssize_t smart_write(FAR struct inode *inode, ret = MTD_ERASE(dev->mtd, eraseblock, 1); if (ret < 0) { - fdbg("Erase block=%d failed: %d\n", eraseblock, ret); + ferr("ERROR: Erase block=%d failed: %d\n", eraseblock, ret); /* Unlock the mutex if we add one */ @@ -896,13 +896,13 @@ static ssize_t smart_write(FAR struct inode *inode, /* Try to write to the sector. */ - fdbg("Write MTD block %d from offset %d\n", nextblock, offset); + finfo("Write MTD block %d from offset %d\n", nextblock, offset); nxfrd = MTD_BWRITE(dev->mtd, nextblock, blkstowrite, &buffer[offset]); if (nxfrd != blkstowrite) { /* The block is not empty!! What to do? */ - fdbg("Write block %d failed: %d.\n", nextblock, nxfrd); + ferr("ERROR: Write block %d failed: %d.\n", nextblock, nxfrd); /* Unlock the mutex if we add one */ @@ -933,7 +933,7 @@ static int smart_geometry(FAR struct inode *inode, struct geometry *geometry) FAR struct smart_struct_s *dev; uint32_t erasesize; - fvdbg("Entry\n"); + finfo("Entry\n"); DEBUGASSERT(inode); if (geometry) @@ -956,9 +956,9 @@ static int smart_geometry(FAR struct inode *inode, struct geometry *geometry) dev->sectorsize; geometry->geo_sectorsize = dev->sectorsize; - fvdbg("available: true mediachanged: false writeenabled: %s\n", + finfo("available: true mediachanged: false writeenabled: %s\n", geometry->geo_writeenabled ? "true" : "false"); - fvdbg("nsectors: %d sectorsize: %d\n", + finfo("nsectors: %d sectorsize: %d\n", geometry->geo_nsectors, geometry->geo_sectorsize); return OK; @@ -1001,7 +1001,7 @@ static int smart_setsectorsize(FAR struct smart_struct_s *dev, uint16_t size) if (erasesize / dev->sectorsize > 256) { - /* We can't throw a dbg message here becasue it is too early. + /* We can't throw a error message here becasue it is too early. * set the erasesize to zero and exit, then we will detect * it during mksmartfs or mount. */ @@ -1079,7 +1079,7 @@ static int smart_setsectorsize(FAR struct smart_struct_s *dev, uint16_t size) if (totalsectors > 65536) { - dbg("Invalid SMART sector count %ld\n", totalsectors); + ferr("ERROR: Invalid SMART sector count %ld\n", totalsectors); return -EINVAL; } else if (totalsectors == 65536) @@ -1099,7 +1099,7 @@ static int smart_setsectorsize(FAR struct smart_struct_s *dev, uint16_t size) allocsize, "Sector map"); if (!dev->sMap) { - fdbg("Error allocating SMART virtual map buffer\n"); + ferr("ERROR: Error allocating SMART virtual map buffer\n"); goto errexit; } @@ -1109,7 +1109,7 @@ static int smart_setsectorsize(FAR struct smart_struct_s *dev, uint16_t size) dev->sBitMap = (FAR uint8_t *) smart_malloc(dev, (totalsectors+7) >> 3, "Sector Bitmap"); if (dev->sBitMap == NULL) { - fdbg("Error allocating SMART sector cache\n"); + ferr("ERROR: Error allocating SMART sector cache\n"); goto errexit; } @@ -1144,7 +1144,7 @@ static int smart_setsectorsize(FAR struct smart_struct_s *dev, uint16_t size) if (!dev->sCache) { - fdbg("Error allocating SMART sector cache\n"); + ferr("ERROR: Error allocating SMART sector cache\n"); goto errexit; } @@ -1181,7 +1181,7 @@ static int smart_setsectorsize(FAR struct smart_struct_s *dev, uint16_t size) if (!dev->erasecounts) { - fdbg("Error allocating erase count array\n"); + ferr("ERROR: Error allocating erase count array\n"); goto errexit; } @@ -1195,7 +1195,7 @@ static int smart_setsectorsize(FAR struct smart_struct_s *dev, uint16_t size) SMART_WEAR_BIT_DIVIDE, "Wear status"); if (!dev->wearstatus) { - fdbg("Error allocating wear level status array\n"); + ferr("ERROR: Error allocating wear level status array\n"); goto errexit; } @@ -1210,7 +1210,7 @@ static int smart_setsectorsize(FAR struct smart_struct_s *dev, uint16_t size) dev->rwbuffer = (FAR char *) smart_malloc(dev, size, "RW Buffer"); if (!dev->rwbuffer) { - fdbg("Error allocating SMART read/write buffer\n"); + ferr("ERROR: Error allocating SMART read/write buffer\n"); goto errexit; } @@ -1304,7 +1304,7 @@ static ssize_t smart_bytewrite(FAR struct smart_struct_s *dev, size_t offset, ret = MTD_BREAD(dev->mtd, startblock, nblocks, (FAR uint8_t *) dev->rwbuffer); if (ret < 0) { - fdbg("Error %d reading from device\n", -ret); + ferr("ERROR: Error %d reading from device\n", -ret); goto errout; } @@ -1317,7 +1317,7 @@ static ssize_t smart_bytewrite(FAR struct smart_struct_s *dev, size_t offset, ret = MTD_BWRITE(dev->mtd, startblock, nblocks, (FAR uint8_t *) dev->rwbuffer); if (ret < 0) { - fdbg("Error %d writing to device\n", -ret); + ferr("ERROR: Error %d writing to device\n", -ret); goto errout; } } @@ -1387,7 +1387,7 @@ static int smart_add_sector_to_cache(FAR struct smart_struct_s *dev, if (dev->debuglevel > 1) { - dbg("Add Cache sector: Log=%d, Phys=%d at index %d from line %d\n", + _err("Add Cache sector: Log=%d, Phys=%d at index %d from line %d\n", logical, physical, index, line); } @@ -1575,7 +1575,7 @@ static void smart_update_cache(FAR struct smart_struct_s *dev, uint16_t if (dev->debuglevel > 1) { - dbg("Update Cache: Log=%d, Phys=%d at index %d\n", logical, physical, x); + _err("Update Cache: Log=%d, Phys=%d at index %d\n", logical, physical, x); } break; @@ -1712,7 +1712,7 @@ static int smart_set_wear_level(FAR struct smart_struct_s *dev, uint16_t block, if (level > 15) { - dbg("Fatal Design Error! Wear level > 15, block=%d\n", block); + _err("ERROR: Fatal Design Error! Wear level > 15, block=%d\n", block); /* This is a design flaw, but we still allow processing, otherwise we * will corrupt the volume. It's better to have a few blocks that are @@ -1767,7 +1767,7 @@ static int smart_set_wear_level(FAR struct smart_struct_s *dev, uint16_t block, smart_find_wear_minmax(dev); if (oldlevel != dev->minwearlevel) - fvdbg("##### New min wear level = %d\n", dev->minwearlevel); + finfo("##### New min wear level = %d\n", dev->minwearlevel); } } @@ -1807,7 +1807,7 @@ static int smart_scan(FAR struct smart_struct_s *dev) FAR struct smart_multiroot_device_s *rootdirdev; #endif - fvdbg("Entry\n"); + finfo("Entry\n"); /* Find the sector size on the volume by reading headers from * sectors of decreasing size. On a formatted volume, the sector @@ -1909,7 +1909,7 @@ static int smart_scan(FAR struct smart_struct_s *dev) for (sector = 0; sector < totalsectors; sector++) { - fvdbg("Scan sector %d\n", sector); + finfo("Scan sector %d\n", sector); /* Calculate the read address for this sector */ @@ -1984,7 +1984,7 @@ static int smart_scan(FAR struct smart_struct_s *dev) { /* Error in logical sector read from the MTD device */ - fdbg("Invalid logical sector %d at physical %d.\n", + ferr("ERROR: Invalid logical sector %d at physical %d.\n", logicalsector, sector); continue; } @@ -2001,7 +2001,7 @@ static int smart_scan(FAR struct smart_struct_s *dev) (FAR uint8_t *)dev->rwbuffer); if (ret != 32) { - fdbg("Error reading physical sector %d.\n", sector); + ferr("ERROR: Error reading physical sector %d.\n", sector); goto err_out; } @@ -2053,7 +2053,7 @@ static int smart_scan(FAR struct smart_struct_s *dev) smart_malloc(dev, sizeof(*rootdirdev), "Root Dir"); if (rootdirdev == NULL) { - fdbg("Memory alloc failed\n"); + ferr("ERROR: Memory alloc failed\n"); ret = -ENOMEM; goto err_out; } @@ -2221,7 +2221,7 @@ static int smart_scan(FAR struct smart_struct_s *dev) ret = smart_bytewrite(dev, offset, 1, &header.status); if (ret < 0) { - fdbg("Error %d releasing duplicate sector\n", -ret); + ferr("ERROR: Error %d releasing duplicate sector\n", -ret); goto err_out; } } @@ -2267,7 +2267,7 @@ static int smart_scan(FAR struct smart_struct_s *dev) dev->mtdBlksPerSector, (uint8_t *) dev->rwbuffer); if (ret != dev->mtdBlksPerSector) { - fdbg("Error reading physical sector %d.\n", sector); + ferr("ERROR: Error reading physical sector %d.\n", sector); goto err_out; } @@ -2284,7 +2284,7 @@ static int smart_scan(FAR struct smart_struct_s *dev) { /* Unable to find a free sector!!! */ - fdbg("Can't find a free sector for relocation\n"); + ferr("ERROR: Can't find a free sector for relocation\n"); ret = -ENOSPC; goto err_out; } @@ -2321,29 +2321,29 @@ static int smart_scan(FAR struct smart_struct_s *dev) smart_read_wearstatus(dev); #endif - fdbg("SMART Scan\n"); - fdbg(" Erase size: %10d\n", dev->sectorsPerBlk * dev->sectorsize); - fdbg(" Erase count: %10d\n", dev->neraseblocks); - fdbg(" Sect/block: %10d\n", dev->sectorsPerBlk); - fdbg(" MTD Blk/Sect: %10d\n", dev->mtdBlksPerSector); + finfo("SMART Scan\n"); + finfo(" Erase size: %10d\n", dev->sectorsPerBlk * dev->sectorsize); + finfo(" Erase count: %10d\n", dev->neraseblocks); + finfo(" Sect/block: %10d\n", dev->sectorsPerBlk); + finfo(" MTD Blk/Sect: %10d\n", dev->mtdBlksPerSector); /* Validate the geometry */ if (dev->mtdBlksPerSector == 0 || dev->sectorsPerBlk == 0 || dev->sectorsPerBlk == 0 || dev->sectorsize == 0) { - fdbg("Invalid Geometry!\n"); + ferr("ERROR: Invalid Geometry!\n"); ret = -EINVAL; goto err_out; } #ifdef CONFIG_MTD_SMART_ALLOC_DEBUG - fdbg(" Allocations:\n"); + finfo(" Allocations:\n"); for (sector = 0; sector < SMART_MAX_ALLOCS; sector++) { if (dev->alloc[sector].ptr != NULL) { - fdbg(" %s: %d\n", dev->alloc[sector].name, dev->alloc[sector].size); + finfo(" %s: %d\n", dev->alloc[sector].name, dev->alloc[sector].size); } } #endif @@ -2373,7 +2373,7 @@ static inline int smart_getformat(FAR struct smart_struct_s *dev, { int ret; - fvdbg("Entry\n"); + finfo("Entry\n"); DEBUGASSERT(fmt); /* Test if we know the format status or not. If we don't know the @@ -2515,7 +2515,7 @@ static void smart_erase_block_if_empty(FAR struct smart_struct_s *dev, #ifdef CONFIG_SMART_LOCAL_CHECKFREE if (smart_checkfree(dev, __LINE__) != OK) { - fdbg(" ...while eraseing block %d\n", block); + fwarn(" ...while eraseing block %d\n", block); } #endif } @@ -2554,7 +2554,7 @@ static int smart_relocate_static_data(FAR struct smart_struct_s *dev, uint16_t b #ifdef CONFIG_SMART_LOCAL_CHECKFREE if (smart_checkfree(dev, __LINE__) != OK) { - fdbg(" ...about to relocate static data %d\n", block); + fwarn(" ...about to relocate static data %d\n", block); } #endif @@ -2630,7 +2630,7 @@ static int smart_relocate_static_data(FAR struct smart_struct_s *dev, uint16_t b nextsector = dev->freecount[x]; newsector = dev->releasecount[x]; #endif - fvdbg("Moving block %d, wear %d, free %d, released %d to block %d, wear %d\n", + finfo("Moving block %d, wear %d, free %d, released %d to block %d, wear %d\n", x, smart_get_wear_level(dev, x), nextsector, newsector, block, smart_get_wear_level(dev, block)); @@ -2645,7 +2645,7 @@ static int smart_relocate_static_data(FAR struct smart_struct_s *dev, uint16_t b dev->mtdBlksPerSector, (FAR uint8_t *) dev->rwbuffer); if (ret != dev->mtdBlksPerSector) { - fdbg("Error reading sector %d\n", sector); + ferr("ERROR: Error reading sector %d\n", sector); ret = -EIO; goto errout; } @@ -2681,7 +2681,7 @@ static int smart_relocate_static_data(FAR struct smart_struct_s *dev, uint16_t b { /* Unable to find a free sector!!! */ - fdbg("Can't find a free sector for relocation\n"); + ferr("ERROR: Can't find a free sector for relocation\n"); ret = -ENOSPC; goto errout; } @@ -2736,7 +2736,7 @@ static int smart_relocate_static_data(FAR struct smart_struct_s *dev, uint16_t b #ifdef CONFIG_SMART_LOCAL_CHECKFREE if (smart_checkfree(dev, __LINE__) != OK) { - fdbg(" ...about to erase static block %d\n", block); + fwarn(" ...about to erase static block %d\n", block); } #endif @@ -2748,7 +2748,7 @@ static int smart_relocate_static_data(FAR struct smart_struct_s *dev, uint16_t b #ifdef CONFIG_SMART_LOCAL_CHECKFREE if (smart_checkfree(dev, __LINE__) != OK) { - fdbg(" ...done erasing static block %d\n", block); + fwarn(" ...done erasing static block %d\n", block); } #endif @@ -2842,7 +2842,7 @@ static inline int smart_llformat(FAR struct smart_struct_s *dev, unsigned long a uint8_t sectsize, prerelease; uint16_t sectorsize; - fvdbg("Entry\n"); + finfo("Entry\n"); /* Get the sector size from the provided arg */ @@ -2862,10 +2862,10 @@ static inline int smart_llformat(FAR struct smart_struct_s *dev, unsigned long a { dev->erasesize = dev->geo.erasesize; - dbg("ERROR: Invalid geometery ... Sectors per erase block must be 1-256\n"); - dbg(" Erase block size = %d\n", dev->erasesize); - dbg(" Sector size = %d\n", dev->sectorsize); - dbg(" Sectors/erase block = %d\n", dev->erasesize / dev->sectorsize); + ferr("ERROR: Invalid geometery ... Sectors per erase block must be 1-256\n"); + ferr(" Erase block size = %d\n", dev->erasesize); + ferr(" Sector size = %d\n", dev->sectorsize); + ferr(" Sectors/erase block = %d\n", dev->erasesize / dev->sectorsize); return -EINVAL; } @@ -2951,7 +2951,7 @@ static inline int smart_llformat(FAR struct smart_struct_s *dev, unsigned long a { /* The block is not empty!! What to do? */ - fdbg("Write block 0 failed: %d.\n", wrcount); + ferr("ERROR: Write block 0 failed: %d.\n", wrcount); /* Unlock the mutex if we add one */ @@ -3132,7 +3132,7 @@ static int smart_relocate_sector(FAR struct smart_struct_s *dev, ret = smart_bytewrite(dev, offset, 1, &newstatus); if (ret < 0) { - fdbg("Error %d committing new sector %d\n" -ret, newsector); + ferr("ERROR: Error %d committing new sector %d\n" -ret, newsector); goto errout; } #endif /* CONFIG_MTD_SMART_ENABLE_CRC */ @@ -3149,7 +3149,7 @@ static int smart_relocate_sector(FAR struct smart_struct_s *dev, ret = smart_bytewrite(dev, offset, 1, &newstatus); if (ret < 0) { - fdbg("Error %d releasing old sector %d\n" -ret, oldsector); + ferr("ERROR: Error %d releasing old sector %d\n" -ret, oldsector); } #ifndef CONFIG_MTD_SMART_ENABLE_CRC @@ -3193,7 +3193,7 @@ static int smart_relocate_block(FAR struct smart_struct_s *dev, uint16_t block) #ifdef CONFIG_SMART_LOCAL_CHECKFREE if (smart_checkfree(dev, __LINE__) != OK) { - fdbg(" ...while relocating block %d, free=%d\n", block, dev->freesectors); + fwarn(" ...while relocating block %d, free=%d\n", block, dev->freesectors); } #endif @@ -3210,7 +3210,7 @@ static int smart_relocate_block(FAR struct smart_struct_s *dev, uint16_t block) if (freecount >= dev->freesectors) { - fdbg("Program bug! Relocating the only block (%d) with free sectors!\n", + ferr("ERROR: Program bug! Relocating the only block (%d) with free sectors!\n", block); ret = -EIO; goto errout; @@ -3240,7 +3240,7 @@ static int smart_relocate_block(FAR struct smart_struct_s *dev, uint16_t block) dev->mtdBlksPerSector, (FAR uint8_t *) dev->rwbuffer); if (ret != dev->mtdBlksPerSector) { - fdbg("Error reading sector %d\n", x); + ferr("ERROR: Error reading sector %d\n", x); ret = -EIO; goto errout; } @@ -3271,7 +3271,7 @@ static int smart_relocate_block(FAR struct smart_struct_s *dev, uint16_t block) { /* Unable to find a free sector!!! */ - fdbg("Can't find a free sector for relocation\n"); + ferr("ERROR: Can't find a free sector for relocation\n"); ret = -ENOSPC; goto errout; } @@ -3303,7 +3303,7 @@ static int smart_relocate_block(FAR struct smart_struct_s *dev, uint16_t block) { /* Unable to find a free sector!!! */ - fdbg("Can't find a free sector for relocation\n"); + ferr("ERROR: Can't find a free sector for relocation\n"); ret = -ENOSPC; goto errout; } @@ -3383,8 +3383,8 @@ static int smart_relocate_block(FAR struct smart_struct_s *dev, uint16_t block) #ifdef CONFIG_SMART_LOCAL_CHECKFREE if (smart_checkfree(dev, __LINE__) != OK) { - fdbg(" ...while relocating block %d, free=%d, release=%d, oldrelease=%d\n", - block, freecount, releasecount, oldrelease); + fwarn(" ...while relocating block %d, free=%d, release=%d, oldrelease=%d\n", + block, freecount, releasecount, oldrelease); } #endif @@ -3533,7 +3533,7 @@ retry: { if (smart_relocate_block(dev, block) < 0) { - fdbg("Error relocating block while finding free phys sector\n"); + ferr("ERROR: Error relocating block while finding free phys sector\n"); return -1; } @@ -3566,7 +3566,7 @@ retry: #endif { - dbg("Program bug! Expected a free sector, free=%d\n", dev->freesectors); + ferr("ERROR: Program bug! Expected a free sector, free=%d\n", dev->freesectors); for (x = 0; x < dev->neraseblocks; x++) { printf("%d ", dev->freecount[x]); @@ -3620,7 +3620,7 @@ retry: (FAR uint8_t *) &header); if (ret != sizeof(struct smart_sect_header_s)) { - fdbg("Error reading phys sector %d\n", physicalsector); + ferr("ERROR: Error reading phys sector %d\n", physicalsector); return -1; } @@ -3641,12 +3641,12 @@ retry: if (physicalsector == 0xFFFF) { - dbg("Program bug! Expected a free sector\n"); + ferr("ERROR: Program bug! Expected a free sector\n"); } if (physicalsector >= dev->totalsectors) { - dbg("Program bug! Selected sector too big!!!\n"); + ferr("ERROR: Program bug! Selected sector too big!!!\n"); } return physicalsector; @@ -3742,16 +3742,16 @@ static int smart_garbagecollect(FAR struct smart_struct_s *dev) #ifdef CONFIG_SMART_LOCAL_CHECKFREE if (smart_checkfree(dev, __LINE__) != OK) { - fdbg(" ...before collecting block %d\n", collectblock); + fwarn(" ...before collecting block %d\n", collectblock); } #endif #ifdef CONFIG_MTD_SMART_PACK_COUNTS - fvdbg("Collecting block %d, free=%d released=%d, totalfree=%d, totalrelease=%d\n", + finfo("Collecting block %d, free=%d released=%d, totalfree=%d, totalrelease=%d\n", collectblock, smart_get_count(dev, dev->freecount, collectblock), smart_get_count(dev, dev->releasecount, collectblock), dev->freesectors, dev->releasesectors); #else - fvdbg("Collecting block %d, free=%d released=%d\n", + finfo("Collecting block %d, free=%d released=%d\n", collectblock, dev->freecount[collectblock], dev->releasecount[collectblock]); #endif @@ -3763,7 +3763,7 @@ static int smart_garbagecollect(FAR struct smart_struct_s *dev) #ifdef CONFIG_SMART_LOCAL_CHECKFREE if (smart_checkfree(dev, __LINE__) != OK) { - fdbg(" ...while collecting block %d\n", collectblock); + fwarn(" ...while collecting block %d\n", collectblock); } #endif @@ -3876,7 +3876,8 @@ static int smart_write_wearstatus(struct smart_struct_s *dev) if (sector >= SMART_FIRST_DIR_SECTOR) { /* Error, wear status bit too large! */ - fdbg("Invalid geometry - wear level status too large\n"); + + ferr("ERROR: Invalid geometry - wear level status too large\n"); ret = -EINVAL; goto errout; } @@ -3987,7 +3988,7 @@ static inline int smart_read_wearstatus(FAR struct smart_struct_s *dev) ret = smart_allocsector(dev, sector); if (ret != sector) { - fdbg("Unable to allocate wear level status sector %d\n", sector); + ferr("ERROR: Unable to allocate wear level status sector %d\n", sector); ret = -EINVAL; goto errout; } @@ -4014,7 +4015,7 @@ static inline int smart_read_wearstatus(FAR struct smart_struct_s *dev) { /* Error, wear status bit too large! */ - fdbg("Invalid geometry - wear level status too large\n"); + ferr("ERROR: Invalid geometry - wear level status too large\n"); ret = -EINVAL; goto errout; } @@ -4088,14 +4089,14 @@ static int smart_write_alloc_sector(FAR struct smart_struct_s *dev, /* Write the header to the physical sector location */ #ifndef CONFIG_MTD_SMART_ENABLE_CRC - fvdbg("Write MTD block %d\n", physical * dev->mtdBlksPerSector); + finfo("Write MTD block %d\n", physical * dev->mtdBlksPerSector); ret = MTD_BWRITE(dev->mtd, physical * dev->mtdBlksPerSector, 1, (FAR uint8_t *) dev->rwbuffer); if (ret != 1) { /* The block is not empty!! What to do? */ - fdbg("Write block %d failed: %d.\n", physical * + ferr("ERROR: Write block %d failed: %d.\n", physical * dev->mtdBlksPerSector, ret); /* Unlock the mutex if we add one */ @@ -4191,7 +4192,7 @@ static int smart_writesector(FAR struct smart_struct_s *dev, FAR struct smart_allocsector_s *allocsector; #endif - fvdbg("Entry\n"); + finfo("Entry\n"); req = (FAR struct smart_read_write_s *) arg; DEBUGASSERT(req->offset <= dev->sectorsize); DEBUGASSERT(req->offset+req->count <= dev->sectorsize); @@ -4200,7 +4201,7 @@ static int smart_writesector(FAR struct smart_struct_s *dev, if (req->logsector >= dev->totalsectors) { - fdbg("Logical sector %d too large\n", req->logsector); + ferr("ERROR: Logical sector %d too large\n", req->logsector); ret = -EINVAL; goto errout; @@ -4216,7 +4217,7 @@ static int smart_writesector(FAR struct smart_struct_s *dev, /* Subtract dev->minwearlevel from all wear levels */ offset = dev->minwearlevel; - fvdbg("Reducing wear level bits by %d\n", offset); + finfo("Reducing wear level bits by %d\n", offset); for (x = 0; x < dev->geo.neraseblocks; x++) { smart_set_wear_level(dev, x, smart_get_wear_level(dev, x) - offset); @@ -4239,7 +4240,7 @@ static int smart_writesector(FAR struct smart_struct_s *dev, #endif if (physsector == 0xFFFF) { - fdbg("Logical sector %d not allocated\n", req->logsector); + ferr("ERROR: Logical sector %d not allocated\n", req->logsector); ret = -EINVAL; goto errout; } @@ -4251,7 +4252,7 @@ static int smart_writesector(FAR struct smart_struct_s *dev, dev->rwbuffer); if (ret != dev->mtdBlksPerSector) { - fdbg("Error reading phys sector %d\n", physsector); + ferr("ERROR: Error reading phys sector %d\n", physsector); ret = -EIO; goto errout; } @@ -4323,7 +4324,7 @@ static int smart_writesector(FAR struct smart_struct_s *dev, physsector = smart_findfreephyssector(dev, FALSE); if (physsector == 0xFFFF) { - fdbg("Error relocating sector %d\n", req->logsector); + ferr("ERROR: Error relocating sector %d\n", req->logsector); ret = -EIO; goto errout; } @@ -4443,7 +4444,7 @@ static int smart_writesector(FAR struct smart_struct_s *dev, dev->mtdBlksPerSector, (FAR uint8_t *) dev->rwbuffer); if (ret != dev->mtdBlksPerSector) { - fdbg("Error writing to physical sector %d\n", physsector); + ferr("ERROR: Error writing to physical sector %d\n", physsector); ret = -EIO; goto errout; } @@ -4462,7 +4463,7 @@ static int smart_writesector(FAR struct smart_struct_s *dev, ret = smart_bytewrite(dev, offset, 1, &byte); if (ret != 1) { - fvdbg("Error committing physical sector %d\n", physsector); + finfo("Error committing physical sector %d\n", physsector); ret = -EIO; goto errout; } @@ -4527,7 +4528,7 @@ static int smart_writesector(FAR struct smart_struct_s *dev, dev->mtdBlksPerSector, (FAR uint8_t *) dev->rwbuffer); if (ret != dev->mtdBlksPerSector) { - fdbg("Error writing to physical sector %d\n", physsector); + ferr("ERROR: Error writing to physical sector %d\n", physsector); ret = -EIO; goto errout; } @@ -4547,7 +4548,7 @@ static int smart_writesector(FAR struct smart_struct_s *dev, { /* TODO: Mark this as a bad block! */ - fdbg("Error validating physical sector %d\n", physsector); + ferr("ERROR: Error validating physical sector %d\n", physsector); ret = -EIO; goto errout; } @@ -4592,7 +4593,7 @@ static int smart_readsector(FAR struct smart_struct_s *dev, struct smart_sect_header_s header; #endif - fvdbg("Entry\n"); + finfo("Entry\n"); req = (FAR struct smart_read_write_s *) arg; DEBUGASSERT(req->offset < dev->sectorsize); DEBUGASSERT(req->offset+req->count+ sizeof(struct smart_sect_header_s) <= @@ -4602,7 +4603,7 @@ static int smart_readsector(FAR struct smart_struct_s *dev, if (req->logsector >= dev->totalsectors) { - fdbg("Logical sector %d too large\n", req->logsector); + ferr("ERROR: Logical sector %d too large\n", req->logsector); ret = -EINVAL; goto errout; @@ -4615,7 +4616,7 @@ static int smart_readsector(FAR struct smart_struct_s *dev, #endif if (physsector == 0xFFFF) { - fdbg("Logical sector %d not allocated\n", req->logsector); + ferr("ERROR: Logical sector %d not allocated\n", req->logsector); ret = -EINVAL; goto errout; } @@ -4632,7 +4633,7 @@ static int smart_readsector(FAR struct smart_struct_s *dev, { /* TODO: Mark the block bad */ - fdbg("Error reading phys sector %d\n", physsector); + ferr("ERROR: Error reading phys sector %d\n", physsector); ret = -EIO; goto errout; } @@ -4657,7 +4658,7 @@ static int smart_readsector(FAR struct smart_struct_s *dev, { /* TODO: Mark the block bad */ - fdbg("Error validating sector %d CRC during read\n", physsector); + ferr("ERROR: Error validating sector %d CRC during read\n", physsector); ret = -EIO; goto errout; } @@ -4677,7 +4678,7 @@ static int smart_readsector(FAR struct smart_struct_s *dev, sizeof(struct smart_sect_header_s), (FAR uint8_t *) &header); if (ret != sizeof(struct smart_sect_header_s)) { - fvdbg("Error reading sector %d header\n", physsector); + ferr("ERROR: Error reading sector %d header\n", physsector); ret = -EIO; goto errout; } @@ -4690,7 +4691,7 @@ static int smart_readsector(FAR struct smart_struct_s *dev, { /* Error in sector header! How do we handle this? */ - fdbg("Error in logical sector %d header, phys=%d\n", + ferr("ERROR: Error in logical sector %d header, phys=%d\n", req->logsector, physsector); ret = -EIO; goto errout; @@ -4705,7 +4706,7 @@ static int smart_readsector(FAR struct smart_struct_s *dev, req->buffer); if (ret != req->count) { - fdbg("Error reading phys sector %d\n", physsector); + ferr("ERROR: Error reading phys sector %d\n", physsector); ret = -EIO; goto errout; } @@ -4873,7 +4874,7 @@ static inline int smart_allocsector(FAR struct smart_struct_s *dev, * bug in our code? */ - fdbg("No free logical sector numbers! Free sectors = %d\n", + ferr("ERROR: No free logical sector numbers! Free sectors = %d\n", dev->freesectors); return -EIO; @@ -4891,7 +4892,7 @@ static inline int smart_allocsector(FAR struct smart_struct_s *dev, /* Find a free physical sector */ physicalsector = smart_findfreephyssector(dev, FALSE); - fvdbg("Alloc: log=%d, phys=%d, erase block=%d, free=%d, released=%d\n", + finfo("Alloc: log=%d, phys=%d, erase block=%d, free=%d, released=%d\n", logsector, physicalsector, physicalsector / dev->sectorsPerBlk, dev->freesectors, dev->releasecount); @@ -4907,7 +4908,7 @@ static inline int smart_allocsector(FAR struct smart_struct_s *dev, kmm_malloc(sizeof(struct smart_allocsector_s)); if (allocsect == NULL) { - fdbg("Out of memory allocting sector\n"); + ferr("ERROR: Out of memory allocting sector\n"); return -ENOMEM; } @@ -4988,7 +4989,7 @@ static inline int smart_freesector(FAR struct smart_struct_s *dev, if (!(dev->sBitMap[logicalsector >> 3] & (1 << (logicalsector & 0x07)))) #endif { - fdbg("Invalid release - sector %d not allocated\n", logicalsector); + ferr("ERROR: Invalid release - sector %d not allocated\n", logicalsector); ret = -EINVAL; goto errout; } @@ -5015,7 +5016,7 @@ static inline int smart_freesector(FAR struct smart_struct_s *dev, { /* Hmmm... something is wrong. This should always match! Bug in our code? */ - fdbg("Sector %d logical sector in header doesn't match\n", logicalsector); + ferr("ERROR: Sector %d logical sector in header doesn't match\n", logicalsector); ret = -EINVAL; goto errout; } @@ -5034,7 +5035,7 @@ static inline int smart_freesector(FAR struct smart_struct_s *dev, ret = smart_bytewrite(dev, offset, 1, &header.status); if (ret != 1) { - fdbg("Error updating physical sector %d status\n", physsector); + ferr("ERROR: Error updating physical sector %d status\n", physsector); goto errout; } @@ -5083,7 +5084,7 @@ static int smart_ioctl(FAR struct inode *inode, int cmd, unsigned long arg) FAR struct mtd_smart_debug_data_s *debug_data; #endif - fvdbg("Entry\n"); + finfo("Entry\n"); DEBUGASSERT(inode && inode->i_private); #ifdef CONFIG_SMARTFS_MULTI_ROOT_DIRS @@ -5104,10 +5105,10 @@ static int smart_ioctl(FAR struct inode *inode, int cmd, unsigned long arg) * driver. */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (arg == 0) { - fdbg("ERROR: BIOC_XIPBASE argument is NULL\n"); + ferr("ERROR: BIOC_XIPBASE argument is NULL\n"); return -EINVAL; } #endif @@ -5228,7 +5229,7 @@ static int smart_ioctl(FAR struct inode *inode, int cmd, unsigned long arg) { case SMART_DEBUG_CMD_SET_DEBUG_LEVEL: dev->debuglevel = debug_data->debugdata; - dbg("Debug level set to %d\n", dev->debuglevel); + finfo("Debug level set to %d\n", dev->debuglevel); ret = OK; goto ok_out; @@ -5246,7 +5247,7 @@ static int smart_ioctl(FAR struct inode *inode, int cmd, unsigned long arg) ret = MTD_IOCTL(dev->mtd, cmd, arg); if (ret < 0) { - fdbg("ERROR: MTD ioctl(%04x) failed: %d\n", cmd, ret); + ferr("ERROR: MTD ioctl(%04x) failed: %d\n", cmd, ret); } ok_out: @@ -5281,7 +5282,7 @@ int smart_initialize(int minor, FAR struct mtd_dev_s *mtd, FAR const char *partn /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (minor < 0 || minor > 255 || !mtd) { return -EINVAL; @@ -5314,7 +5315,7 @@ int smart_initialize(int minor, FAR struct mtd_dev_s *mtd, FAR const char *partn ret = MTD_IOCTL(mtd, MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&dev->geo)); if (ret < 0) { - fdbg("MTD ioctl(MTDIOC_GEOMETRY) failed: %d\n", ret); + ferr("ERROR: MTD ioctl(MTDIOC_GEOMETRY) failed: %d\n", ret); goto errout; } @@ -5348,7 +5349,7 @@ int smart_initialize(int minor, FAR struct mtd_dev_s *mtd, FAR const char *partn totalsectors = dev->neraseblocks * dev->sectorsPerBlk; if (totalsectors > 65536) { - fdbg("SMART Sector size too small for device\n"); + ferr("ERROR: SMART Sector size too small for device\n"); ret = -EINVAL; goto errout; } @@ -5399,7 +5400,7 @@ int smart_initialize(int minor, FAR struct mtd_dev_s *mtd, FAR const char *partn smart_malloc(dev, sizeof(*rootdirdev), "Root Dir"); if (rootdirdev == NULL) { - fdbg("register_blockdriver failed: %d\n", -ret); + ferr("ERROR: register_blockdriver failed: %d\n", -ret); ret = -ENOMEM; goto errout; } @@ -5427,7 +5428,7 @@ int smart_initialize(int minor, FAR struct mtd_dev_s *mtd, FAR const char *partn if (ret < 0) { - fdbg("register_blockdriver failed: %d\n", -ret); + ferr("ERROR: register_blockdriver failed: %d\n", -ret); goto errout; } @@ -5436,7 +5437,7 @@ int smart_initialize(int minor, FAR struct mtd_dev_s *mtd, FAR const char *partn ret = smart_scan(dev); if (ret < 0) { - fdbg("smart_scan failed: %d\n", -ret); + ferr("ERROR: smart_scan failed: %d\n", -ret); goto errout; } } @@ -5550,7 +5551,7 @@ static int smart_loteardown(FAR const char *devname) /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!devname) { return -EINVAL; @@ -5564,7 +5565,7 @@ static int smart_loteardown(FAR const char *devname) ret = open_blockdriver(devname, MS_RDONLY, &inode); if (ret < 0) { - dbg("Failed to open %s: %d\n", devname, -ret); + ferr("ERROR: Failed to open %s: %d\n", devname, -ret); return ret; } @@ -5576,7 +5577,7 @@ static int smart_loteardown(FAR const char *devname) if (!filemtd_isfilemtd(dev->mtd)) { - fdbg("Device is not a SMART loop: %s\n", devname); + ferr("ERROR: Device is not a SMART loop: %s\n", devname); return -EINVAL; } diff --git a/drivers/mtd/sst25.c b/drivers/mtd/sst25.c index 61a79a63b5e09c1345ad66a4db80f18cdec58699..89d21324aa31fefeeb177ee9d4b6dd5fedee7c70 100644 --- a/drivers/mtd/sst25.c +++ b/drivers/mtd/sst25.c @@ -309,7 +309,7 @@ static inline int sst25_readid(struct sst25_dev_s *priv) uint16_t memory; uint16_t capacity; - fvdbg("priv: %p\n", priv); + finfo("priv: %p\n", priv); /* Lock the SPI bus, configure the bus, and select this FLASH part. */ @@ -328,7 +328,7 @@ static inline int sst25_readid(struct sst25_dev_s *priv) SPI_SELECT(priv->dev, SPIDEV_FLASH, false); sst25_unlock(priv->dev); - fvdbg("manufacturer: %02x memory: %02x capacity: %02x\n", + finfo("manufacturer: %02x memory: %02x capacity: %02x\n", manufacturer, memory, capacity); /* Check for a valid manufacturer and memory type */ @@ -486,7 +486,7 @@ static void sst25_sectorerase(struct sst25_dev_s *priv, off_t sector) { off_t address = sector << priv->sectorshift; - fvdbg("sector: %08lx\n", (long)sector); + finfo("sector: %08lx\n", (long)sector); /* Wait for any preceding write or erase operation to complete. */ @@ -523,7 +523,7 @@ static void sst25_sectorerase(struct sst25_dev_s *priv, off_t sector) static inline int sst25_chiperase(struct sst25_dev_s *priv) { - fvdbg("priv: %p\n", priv); + finfo("priv: %p\n", priv); /* Wait for any preceding write or erase operation to complete. */ @@ -537,7 +537,7 @@ static inline int sst25_chiperase(struct sst25_dev_s *priv) sst25_cmd(priv, SST25_CE); - fvdbg("Return: OK\n"); + finfo("Return: OK\n"); return OK; } @@ -550,7 +550,7 @@ static void sst25_byteread(FAR struct sst25_dev_s *priv, FAR uint8_t *buffer, { uint8_t status; - fvdbg("address: %08lx nbytes: %d\n", (long)address, (int)nbytes); + finfo("address: %08lx nbytes: %d\n", (long)address, (int)nbytes); /* Wait for any preceding write or erase operation to complete. */ @@ -601,7 +601,7 @@ static void sst25_bytewrite(struct sst25_dev_s *priv, FAR const uint8_t *buffer, { uint8_t status; - fvdbg("address: %08lx nwords: %d\n", (long)address, (int)nbytes); + finfo("address: %08lx nwords: %d\n", (long)address, (int)nbytes); DEBUGASSERT(priv && buffer); /* Write each byte individually */ @@ -663,7 +663,7 @@ static void sst25_wordwrite(struct sst25_dev_s *priv, FAR const uint8_t *buffer, size_t nwords = (nbytes + 1) >> 1; uint8_t status; - fvdbg("address: %08lx nwords: %d\n", (long)address, (int)nwords); + finfo("address: %08lx nwords: %d\n", (long)address, (int)nwords); DEBUGASSERT(priv && buffer); /* Loop until all of the bytes have been written */ @@ -834,7 +834,7 @@ static FAR uint8_t *sst25_cacheread(struct sst25_dev_s *priv, off_t sector) shift = priv->sectorshift - SST25_SECTOR_SHIFT; esectno = sector >> shift; - fvdbg("sector: %ld esectno: %d shift=%d\n", sector, esectno, shift); + finfo("sector: %ld esectno: %d shift=%d\n", sector, esectno, shift); /* Check if the requested erase block is already in the cache */ @@ -890,7 +890,7 @@ static void sst25_cacheerase(struct sst25_dev_s *priv, off_t sector) if (!IS_ERASED(priv)) { off_t esectno = sector >> (priv->sectorshift - SST25_SECTOR_SHIFT); - fvdbg("sector: %ld esectno: %d\n", sector, esectno); + finfo("sector: %ld esectno: %d\n", sector, esectno); sst25_sectorerase(priv, esectno); SET_ERASED(priv); @@ -932,7 +932,7 @@ static void sst25_cachewrite(FAR struct sst25_dev_s *priv, FAR const uint8_t *bu if (!IS_ERASED(priv)) { off_t esectno = sector >> (priv->sectorshift - SST25_SECTOR_SHIFT); - fvdbg("sector: %ld esectno: %d\n", sector, esectno); + finfo("sector: %ld esectno: %d\n", sector, esectno); sst25_sectorerase(priv, esectno); SET_ERASED(priv); @@ -967,7 +967,7 @@ static int sst25_erase(FAR struct mtd_dev_s *dev, off_t startblock, size_t nbloc FAR struct sst25_dev_s *priv = (FAR struct sst25_dev_s *)dev; size_t blocksleft = nblocks; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* Lock access to the SPI bus until we complete the erase */ @@ -1006,7 +1006,7 @@ static ssize_t sst25_bread(FAR struct mtd_dev_s *dev, off_t startblock, size_t n #ifdef CONFIG_SST25_SECTOR512 ssize_t nbytes; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* On this device, we can handle the block read just like the byte-oriented read */ @@ -1021,7 +1021,7 @@ static ssize_t sst25_bread(FAR struct mtd_dev_s *dev, off_t startblock, size_t n FAR struct sst25_dev_s *priv = (FAR struct sst25_dev_s *)dev; ssize_t nbytes; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* On this device, we can handle the block read just like the byte-oriented read */ @@ -1047,7 +1047,7 @@ static ssize_t sst25_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t #else FAR struct sst25_dev_s *priv = (FAR struct sst25_dev_s *)dev; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* Lock the SPI bus and write all of the pages to FLASH */ @@ -1077,7 +1077,7 @@ static ssize_t sst25_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes { FAR struct sst25_dev_s *priv = (FAR struct sst25_dev_s *)dev; - fvdbg("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); + finfo("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); /* Lock the SPI bus and select this FLASH part */ @@ -1085,7 +1085,7 @@ static ssize_t sst25_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes sst25_byteread(priv, buffer, offset, nbytes); sst25_unlock(priv->dev); - fvdbg("return nbytes: %d\n", (int)nbytes); + finfo("return nbytes: %d\n", (int)nbytes); return nbytes; } @@ -1098,7 +1098,7 @@ static int sst25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) FAR struct sst25_dev_s *priv = (FAR struct sst25_dev_s *)dev; int ret = -EINVAL; /* Assume good command with bad parameters */ - fvdbg("cmd: %d \n", cmd); + finfo("cmd: %d \n", cmd); switch (cmd) { @@ -1127,7 +1127,7 @@ static int sst25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) #endif ret = OK; - fvdbg("blocksize: %d erasesize: %d neraseblocks: %d\n", + finfo("blocksize: %d erasesize: %d neraseblocks: %d\n", geo->blocksize, geo->erasesize, geo->neraseblocks); } } @@ -1149,7 +1149,7 @@ static int sst25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) break; } - fvdbg("return %d\n", ret); + finfo("return %d\n", ret); return ret; } @@ -1172,7 +1172,7 @@ FAR struct mtd_dev_s *sst25_initialize(FAR struct spi_dev_s *dev) FAR struct sst25_dev_s *priv; int ret; - fvdbg("dev: %p\n", dev); + finfo("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. @@ -1206,7 +1206,7 @@ FAR struct mtd_dev_s *sst25_initialize(FAR struct spi_dev_s *dev) { /* Unrecognized! Discard all of that work we just did and return NULL */ - fdbg("Unrecognized\n"); + ferr("ERROR: Unrecognized\n"); kmm_free(priv); priv = NULL; } @@ -1226,7 +1226,7 @@ FAR struct mtd_dev_s *sst25_initialize(FAR struct spi_dev_s *dev) { /* Allocation failed! Discard all of that work we just did and return NULL */ - fdbg("Allocation failed\n"); + ferr("ERROR: Allocation failed\n"); kmm_free(priv); priv = NULL; } @@ -1242,6 +1242,6 @@ FAR struct mtd_dev_s *sst25_initialize(FAR struct spi_dev_s *dev) /* Return the implementation-specific state structure as the MTD device */ - fvdbg("Return %p\n", priv); + finfo("Return %p\n", priv); return (FAR struct mtd_dev_s *)priv; } diff --git a/drivers/mtd/sst25xx.c b/drivers/mtd/sst25xx.c index ebbcfd33f2fab290ec517080a1476336380e601c..4d30be50bbedb448122b43f23429f59270228320 100644 --- a/drivers/mtd/sst25xx.c +++ b/drivers/mtd/sst25xx.c @@ -259,7 +259,7 @@ static inline int sst25xx_readid(struct sst25xx_dev_s *priv) uint16_t memory; uint16_t capacity; - fvdbg("priv: %p\n", priv); + finfo("priv: %p\n", priv); /* Lock the SPI bus, configure the bus, and select this FLASH part. */ @@ -279,7 +279,7 @@ static inline int sst25xx_readid(struct sst25xx_dev_s *priv) SPI_SELECT(priv->dev, SPIDEV_FLASH, false); sst25xx_unlock(priv->dev); - fvdbg("manufacturer: %02x memory: %02x capacity: %02x\n", + finfo("manufacturer: %02x memory: %02x capacity: %02x\n", manufacturer, memory, capacity); /* Check for a valid manufacturer and memory type */ @@ -356,7 +356,7 @@ static void sst25xx_waitwritecomplete(struct sst25xx_dev_s *priv) priv->lastwaswrite = false; - fvdbg("Complete\n"); + finfo("Complete\n"); } /************************************************************************************ @@ -376,7 +376,7 @@ static void sst25xx_writeenable(struct sst25xx_dev_s *priv) /* Deselect the FLASH */ SPI_SELECT(priv->dev, SPIDEV_FLASH, false); - fvdbg("Enabled\n"); + finfo("Enabled\n"); } /************************************************************************************ @@ -416,7 +416,7 @@ static void sst25xx_sectorerase(struct sst25xx_dev_s *priv, off_t sector, uint8_ offset = sector << priv->sectorshift; - fvdbg("sector: %08lx\n", (long)sector); + finfo("sector: %08lx\n", (long)sector); /* Wait for any preceding write to complete. We could simplify things by * perform this wait at the end of each write operation (rather than at @@ -453,7 +453,7 @@ static void sst25xx_sectorerase(struct sst25xx_dev_s *priv, off_t sector, uint8_ /* Deselect the FLASH */ SPI_SELECT(priv->dev, SPIDEV_FLASH, false); - fvdbg("Erased\n"); + finfo("Erased\n"); } /************************************************************************************ @@ -462,7 +462,7 @@ static void sst25xx_sectorerase(struct sst25xx_dev_s *priv, off_t sector, uint8_ static inline int sst25xx_bulkerase(struct sst25xx_dev_s *priv) { - fvdbg("priv: %p\n", priv); + finfo("priv: %p\n", priv); /* Wait for any preceding write to complete. We could simplify things by * perform this wait at the end of each write operation (rather than at @@ -489,7 +489,7 @@ static inline int sst25xx_bulkerase(struct sst25xx_dev_s *priv) SPI_SELECT(priv->dev, SPIDEV_FLASH, false); sst25xx_waitwritecomplete(priv); - fvdbg("Return: OK\n"); + finfo("Return: OK\n"); return OK; } @@ -502,7 +502,7 @@ static inline void sst25xx_pagewrite(struct sst25xx_dev_s *priv, FAR const uint8 { off_t offset = page << priv->pageshift; - fvdbg("page: %08lx offset: %08lx\n", (long)page, (long)offset); + finfo("page: %08lx offset: %08lx\n", (long)page, (long)offset); /* Wait for any preceding write to complete. We could simplify things by * perform this wait at the end of each write operation (rather than at @@ -538,7 +538,7 @@ static inline void sst25xx_pagewrite(struct sst25xx_dev_s *priv, FAR const uint8 /* Deselect the FLASH: Chip Select high */ SPI_SELECT(priv->dev, SPIDEV_FLASH, false); - fvdbg("Written\n"); + finfo("Written\n"); } /************************************************************************************ @@ -549,7 +549,7 @@ static inline void sst25xx_pagewrite(struct sst25xx_dev_s *priv, FAR const uint8 static inline void sst25xx_bytewrite(struct sst25xx_dev_s *priv, FAR const uint8_t *buffer, off_t offset, uint16_t count) { - fvdbg("offset: %08lx count:%d\n", (long)offset, count); + finfo("offset: %08lx count:%d\n", (long)offset, count); /* Wait for any preceding write to complete. We could simplify things by * perform this wait at the end of each write operation (rather than at @@ -585,7 +585,7 @@ static inline void sst25xx_bytewrite(struct sst25xx_dev_s *priv, FAR const uint8 /* Deselect the FLASH: Chip Select high */ SPI_SELECT(priv->dev, SPIDEV_FLASH, false); - fvdbg("Written\n"); + finfo("Written\n"); } #endif @@ -598,7 +598,7 @@ static int sst25xx_erase(FAR struct mtd_dev_s *dev, off_t startblock, size_t nbl FAR struct sst25xx_dev_s *priv = (FAR struct sst25xx_dev_s *)dev; size_t blocksleft = nblocks; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* Lock access to the SPI bus until we complete the erase */ @@ -675,7 +675,7 @@ static ssize_t sst25xx_bread(FAR struct mtd_dev_s *dev, off_t startblock, size_t FAR struct sst25xx_dev_s *priv = (FAR struct sst25xx_dev_s *)dev; ssize_t nbytes; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* On this device, we can handle the block read just like the byte-oriented read */ @@ -699,7 +699,7 @@ static ssize_t sst25xx_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_ size_t blocksleft = nblocks; size_t pagesize = 1 << priv->pageshift; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* Lock the SPI bus and write each page to FLASH */ @@ -724,7 +724,7 @@ static ssize_t sst25xx_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbyt { FAR struct sst25xx_dev_s *priv = (FAR struct sst25xx_dev_s *)dev; - fvdbg("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); + finfo("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); /* Wait for any preceding write to complete. We could simplify things by * perform this wait at the end of each write operation (rather than at @@ -760,7 +760,7 @@ static ssize_t sst25xx_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbyt SPI_SELECT(priv->dev, SPIDEV_FLASH, false); sst25xx_unlock(priv->dev); - fvdbg("return nbytes: %d\n", (int)nbytes); + finfo("return nbytes: %d\n", (int)nbytes); return nbytes; } @@ -780,7 +780,7 @@ static ssize_t sst25xx_write(FAR struct mtd_dev_s *dev, off_t offset, size_t nby int pagesize; int bytestowrite; - fvdbg("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); + finfo("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 @@ -847,7 +847,7 @@ static int sst25xx_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) FAR struct sst25xx_dev_s *priv = (FAR struct sst25xx_dev_s *)dev; int ret = -EINVAL; /* Assume good command with bad parameters */ - fvdbg("cmd: %d \n", cmd); + finfo("cmd: %d \n", cmd); switch (cmd) { @@ -871,7 +871,7 @@ static int sst25xx_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) ret = OK; - fvdbg("blocksize: %d erasesize: %d neraseblocks: %d\n", + finfo("blocksize: %d erasesize: %d neraseblocks: %d\n", geo->blocksize, geo->erasesize, geo->neraseblocks); } } @@ -893,7 +893,7 @@ static int sst25xx_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) break; } - fvdbg("return %d\n", ret); + finfo("return %d\n", ret); return ret; } @@ -916,7 +916,7 @@ FAR struct mtd_dev_s *sst25xx_initialize(FAR struct spi_dev_s *dev) FAR struct sst25xx_dev_s *priv; int ret; - fvdbg("dev: %p\n", dev); + finfo("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. @@ -954,7 +954,7 @@ FAR struct mtd_dev_s *sst25xx_initialize(FAR struct spi_dev_s *dev) { /* Unrecognized! Discard all of that work we just did and return NULL */ - fdbg("Unrecognized\n"); + ferr("ERROR: Unrecognized\n"); kmm_free(priv); priv = NULL; } @@ -974,6 +974,6 @@ FAR struct mtd_dev_s *sst25xx_initialize(FAR struct spi_dev_s *dev) /* Return the implementation-specific state structure as the MTD device */ - fvdbg("Return %p\n", priv); + finfo("Return %p\n", priv); return (FAR struct mtd_dev_s *)priv; } diff --git a/drivers/mtd/sst26.c b/drivers/mtd/sst26.c index 94226064ccd9ca0db040386f636659247beafb96..91eb045fcf4e316e3eef2bc75b51abc4bd40b859 100644 --- a/drivers/mtd/sst26.c +++ b/drivers/mtd/sst26.c @@ -208,15 +208,11 @@ /* 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__) +# define ssterr(format, ...) _err(format, ##__VA_ARGS__) +# define sstinfo(format, ...) _info(format, ##__VA_ARGS__) #else -# define sstdbg(x...) -# define sstlldbg(x...) -# define sstvdbg(x...) -# define sstllvdbg(x...) +# define ssterr(x...) +# define sstinfo(x...) #endif /************************************************************************************ @@ -321,7 +317,7 @@ static inline int sst26_readid(struct sst26_dev_s *priv) uint16_t memory; uint16_t capacity; - sstvdbg("priv: %p\n", priv); + sstinfo("priv: %p\n", priv); /* Lock the SPI bus, configure the bus, and select this FLASH part. */ @@ -340,7 +336,7 @@ static inline int sst26_readid(struct sst26_dev_s *priv) SPI_SELECT(priv->dev, SPIDEV_FLASH, false); sst26_unlock(priv->dev); - lldbg("manufacturer: %02x memory: %02x capacity: %02x\n", + _info("manufacturer: %02x memory: %02x capacity: %02x\n", manufacturer, memory, capacity); /* Check for a valid manufacturer and memory type */ @@ -416,7 +412,7 @@ static void sst26_waitwritecomplete(struct sst26_dev_s *priv) } while ((status & SST26_SR_WIP) != 0); - sstvdbg("Complete\n"); + sstinfo("Complete\n"); } /************************************************************************************ @@ -439,7 +435,7 @@ static void sst26_globalunlock(struct sst26_dev_s *priv) SPI_SELECT(priv->dev, SPIDEV_FLASH, false); - sstvdbg("Device unlocked.\n"); + sstinfo("Device unlocked.\n"); } /************************************************************************************ @@ -460,7 +456,7 @@ static void sst26_writeenable(struct sst26_dev_s *priv) SPI_SELECT(priv->dev, SPIDEV_FLASH, false); - sstvdbg("Enabled\n"); + sstinfo("Enabled\n"); } /************************************************************************************ @@ -473,7 +469,7 @@ static void sst26_sectorerase(struct sst26_dev_s *priv, off_t sector, uint8_t ty offset = sector << priv->sectorshift; - sstvdbg("sector: %08lx\n", (long)sector); + sstinfo("sector: %08lx\n", (long)sector); /* Send write enable instruction */ @@ -504,7 +500,7 @@ static void sst26_sectorerase(struct sst26_dev_s *priv, off_t sector, uint8_t ty sst26_waitwritecomplete(priv); - sstvdbg("Erased\n"); + sstinfo("Erased\n"); } /************************************************************************************ @@ -513,7 +509,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) { - sstvdbg("priv: %p\n", priv); + sstinfo("priv: %p\n", priv); /* Send write enable instruction */ @@ -533,7 +529,7 @@ static inline int sst26_chiperase(struct sst26_dev_s *priv) sst26_waitwritecomplete(priv); - sstvdbg("Return: OK\n"); + sstinfo("Return: OK\n"); return OK; } @@ -546,7 +542,7 @@ static inline void sst26_pagewrite(struct sst26_dev_s *priv, { off_t offset = page << priv->pageshift; - sstvdbg("page: %08lx offset: %08lx\n", (long)page, (long)offset); + sstinfo("page: %08lx offset: %08lx\n", (long)page, (long)offset); /* Enable the write access to the FLASH */ @@ -576,7 +572,7 @@ static inline void sst26_pagewrite(struct sst26_dev_s *priv, sst26_waitwritecomplete(priv); - sstvdbg("Written\n"); + sstinfo("Written\n"); } /************************************************************************************ @@ -588,7 +584,7 @@ static inline void sst26_bytewrite(struct sst26_dev_s *priv, FAR const uint8_t *buffer, off_t offset, uint16_t count) { - sstvdbg("offset: %08lx count:%d\n", (long)offset, count); + sstinfo("offset: %08lx count:%d\n", (long)offset, count); /* Enable the write access to the FLASH */ @@ -619,7 +615,7 @@ static inline void sst26_bytewrite(struct sst26_dev_s *priv, sst26_waitwritecomplete(priv); - sstvdbg("Written\n"); + sstinfo("Written\n"); } #endif @@ -634,7 +630,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; - sstvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + sstinfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* Lock access to the SPI bus until we complete the erase */ @@ -664,7 +660,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; - sstvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + sstinfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* On this device, we can handle the block read just like the byte-oriented read */ @@ -689,7 +685,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; - sstvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + sstinfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* Lock the SPI bus and write each page to FLASH */ @@ -714,7 +710,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; - sstvdbg("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); + sstinfo("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); /* Lock the SPI bus and select this FLASH part */ @@ -743,7 +739,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); - sstvdbg("return nbytes: %d\n", (int)nbytes); + sstinfo("return nbytes: %d\n", (int)nbytes); return nbytes; } @@ -763,7 +759,7 @@ static ssize_t sst26_write(FAR struct mtd_dev_s *dev, off_t offset, size_t nbyte int pagesize; int bytestowrite; - sstvdbg("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); + sstinfo("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 @@ -830,7 +826,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 */ - sstvdbg("cmd: %d \n", cmd); + sstinfo("cmd: %d \n", cmd); switch (cmd) { @@ -854,7 +850,7 @@ static int sst26_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) ret = OK; - sstvdbg("blocksize: %d erasesize: %d neraseblocks: %d\n", + sstinfo("blocksize: %d erasesize: %d neraseblocks: %d\n", geo->blocksize, geo->erasesize, geo->neraseblocks); } } @@ -876,7 +872,7 @@ static int sst26_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) break; } - sstvdbg("return %d\n", ret); + sstinfo("return %d\n", ret); return ret; } @@ -899,7 +895,7 @@ FAR struct mtd_dev_s *sst26_initialize_spi(FAR struct spi_dev_s *dev) FAR struct sst26_dev_s *priv; int ret; - sstvdbg("dev: %p\n", dev); + sstinfo("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. @@ -936,7 +932,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 */ - sstdbg("Unrecognized\n"); + ssterr("ERROR: Unrecognized\n"); kmm_free(priv); priv = NULL; } @@ -956,6 +952,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 */ - sstvdbg("Return %p\n", priv); + sstinfo("Return %p\n", priv); return (FAR struct mtd_dev_s *)priv; } diff --git a/drivers/mtd/sst39vf.c b/drivers/mtd/sst39vf.c index 5386427587b372a731155e5e676f0e20bf361673..932950884523a67b648b9da68d3b7834ef939e47 100644 --- a/drivers/mtd/sst39vf.c +++ b/drivers/mtd/sst39vf.c @@ -697,7 +697,7 @@ static ssize_t sst39vf_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, static ssize_t sst39vf_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, FAR uint8_t *buffer) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES FAR struct sst39vf_dev_s *priv = (FAR struct sst39vf_dev_s *)dev; #endif FAR const uint8_t *source; @@ -814,12 +814,12 @@ FAR struct mtd_dev_s *sst39vf_initialize(void) /* Now see if we can suport the part */ - fvdbg("Manufacturer: %02x\n", manufacturer); - fvdbg("Chip ID: %04x\n", chipid); + finfo("Manufacturer: %02x\n", manufacturer); + finfo("Chip ID: %04x\n", chipid); if (manufacturer != SST_MANUFACTURER_ID) { - fdbg("Unrecognized manufacturer: %02x\n", manufacturer); + ferr("ERROR: Unrecognized manufacturer: %02x\n", manufacturer); return NULL; } else if (chipid == g_sst39vf1601.chipid) @@ -840,7 +840,7 @@ FAR struct mtd_dev_s *sst39vf_initialize(void) } else { - fdbg("Unrecognized chip ID: %04x\n", chipid); + ferr("ERROR: Unrecognized chip ID: %04x\n", chipid); return NULL; } diff --git a/drivers/mtd/w25.c b/drivers/mtd/w25.c index 09a7c015d2581f0e40b7f2cb02a7ba1fe572b61c..3559f8d6a5c5a1307c6b3df0b8a9ea899db6663c 100644 --- a/drivers/mtd/w25.c +++ b/drivers/mtd/w25.c @@ -333,7 +333,7 @@ static inline int w25_readid(struct w25_dev_s *priv) uint16_t memory; uint16_t capacity; - fvdbg("priv: %p\n", priv); + finfo("priv: %p\n", priv); /* Lock the SPI bus, configure the bus, and select this FLASH part. */ @@ -352,7 +352,7 @@ static inline int w25_readid(struct w25_dev_s *priv) SPI_SELECT(priv->spi, SPIDEV_FLASH, false); w25_unlock(priv->spi); - fvdbg("manufacturer: %02x memory: %02x capacity: %02x\n", + finfo("manufacturer: %02x memory: %02x capacity: %02x\n", manufacturer, memory, capacity); /* Check for a valid manufacturer and memory type */ @@ -557,7 +557,7 @@ static void w25_sectorerase(struct w25_dev_s *priv, off_t sector) { off_t address = sector << W25_SECTOR_SHIFT; - fvdbg("sector: %08lx\n", (long)sector); + finfo("sector: %08lx\n", (long)sector); /* Wait for any preceding write or erase operation to complete. */ @@ -594,7 +594,7 @@ static void w25_sectorerase(struct w25_dev_s *priv, off_t sector) static inline int w25_chiperase(struct w25_dev_s *priv) { - fvdbg("priv: %p\n", priv); + finfo("priv: %p\n", priv); /* Wait for any preceding write or erase operation to complete. */ @@ -615,7 +615,7 @@ static inline int w25_chiperase(struct w25_dev_s *priv) /* Deselect the FLASH */ SPI_SELECT(priv->spi, SPIDEV_FLASH, false); - fvdbg("Return: OK\n"); + finfo("Return: OK\n"); return OK; } @@ -628,7 +628,7 @@ static void w25_byteread(FAR struct w25_dev_s *priv, FAR uint8_t *buffer, { uint8_t status; - fvdbg("address: %08lx nbytes: %d\n", (long)address, (int)nbytes); + finfo("address: %08lx nbytes: %d\n", (long)address, (int)nbytes); /* Wait for any preceding write or erase operation to complete. */ @@ -682,7 +682,7 @@ static void w25_pagewrite(struct w25_dev_s *priv, FAR const uint8_t *buffer, { uint8_t status; - fvdbg("address: %08lx nwords: %d\n", (long)address, (int)nbytes); + finfo("address: %08lx nwords: %d\n", (long)address, (int)nbytes); DEBUGASSERT(priv && buffer && (address & 0xff) == 0 && (nbytes & 0xff) == 0); @@ -739,7 +739,7 @@ static void w25_pagewrite(struct w25_dev_s *priv, FAR const uint8_t *buffer, static inline void w25_bytewrite(struct w25_dev_s *priv, FAR const uint8_t *buffer, off_t offset, uint16_t count) { - fvdbg("offset: %08lx count:%d\n", (long)offset, count); + finfo("offset: %08lx count:%d\n", (long)offset, count); /* Wait for any preceding write to complete. We could simplify things by * perform this wait at the end of each write operation (rather than at @@ -774,7 +774,7 @@ static inline void w25_bytewrite(struct w25_dev_s *priv, FAR const uint8_t *buff /* Deselect the FLASH: Chip Select high */ SPI_SELECT(priv->spi, SPIDEV_FLASH, false); - fvdbg("Written\n"); + finfo("Written\n"); } #endif /* defined(CONFIG_MTD_BYTE_WRITE) && !defined(CONFIG_W25_READONLY) */ @@ -823,7 +823,7 @@ static FAR uint8_t *w25_cacheread(struct w25_dev_s *priv, off_t sector) shift = W25_SECTOR_SHIFT - W25_SECTOR512_SHIFT; esectno = sector >> shift; - fvdbg("sector: %ld esectno: %d shift=%d\n", sector, esectno, shift); + finfo("sector: %ld esectno: %d shift=%d\n", sector, esectno, shift); /* Check if the requested erase block is already in the cache */ @@ -879,7 +879,7 @@ static void w25_cacheerase(struct w25_dev_s *priv, off_t sector) if (!IS_ERASED(priv)) { off_t esectno = sector >> (W25_SECTOR_SHIFT - W25_SECTOR512_SHIFT); - fvdbg("sector: %ld esectno: %d\n", sector, esectno); + finfo("sector: %ld esectno: %d\n", sector, esectno); w25_sectorerase(priv, esectno); SET_ERASED(priv); @@ -921,7 +921,7 @@ static void w25_cachewrite(FAR struct w25_dev_s *priv, FAR const uint8_t *buffer if (!IS_ERASED(priv)) { off_t esectno = sector >> (W25_SECTOR_SHIFT - W25_SECTOR512_SHIFT); - fvdbg("sector: %ld esectno: %d\n", sector, esectno); + finfo("sector: %ld esectno: %d\n", sector, esectno); w25_sectorerase(priv, esectno); SET_ERASED(priv); @@ -956,7 +956,7 @@ static int w25_erase(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks FAR struct w25_dev_s *priv = (FAR struct w25_dev_s *)dev; size_t blocksleft = nblocks; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* Lock access to the SPI bus until we complete the erase */ @@ -994,7 +994,7 @@ static ssize_t w25_bread(FAR struct mtd_dev_s *dev, off_t startblock, size_t nbl { ssize_t nbytes; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* On this device, we can handle the block read just like the byte-oriented read */ @@ -1027,7 +1027,7 @@ static ssize_t w25_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t nb #else FAR struct w25_dev_s *priv = (FAR struct w25_dev_s *)dev; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* Lock the SPI bus and write all of the pages to FLASH */ @@ -1054,7 +1054,7 @@ static ssize_t w25_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, { FAR struct w25_dev_s *priv = (FAR struct w25_dev_s *)dev; - fvdbg("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); + finfo("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); /* Lock the SPI bus and select this FLASH part */ @@ -1062,7 +1062,7 @@ static ssize_t w25_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, w25_byteread(priv, buffer, offset, nbytes); w25_unlock(priv->spi); - fvdbg("return nbytes: %d\n", (int)nbytes); + finfo("return nbytes: %d\n", (int)nbytes); return nbytes; } @@ -1081,7 +1081,7 @@ static ssize_t w25_write(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, int index; int bytestowrite; - fvdbg("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); + finfo("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 @@ -1145,7 +1145,7 @@ static int w25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) FAR struct w25_dev_s *priv = (FAR struct w25_dev_s *)dev; int ret = -EINVAL; /* Assume good command with bad parameters */ - fvdbg("cmd: %d \n", cmd); + finfo("cmd: %d \n", cmd); switch (cmd) { @@ -1174,7 +1174,7 @@ static int w25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) #endif ret = OK; - fvdbg("blocksize: %d erasesize: %d neraseblocks: %d\n", + finfo("blocksize: %d erasesize: %d neraseblocks: %d\n", geo->blocksize, geo->erasesize, geo->neraseblocks); } } @@ -1196,7 +1196,7 @@ static int w25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) break; } - fvdbg("return %d\n", ret); + finfo("return %d\n", ret); return ret; } @@ -1219,7 +1219,7 @@ FAR struct mtd_dev_s *w25_initialize(FAR struct spi_dev_s *spi) FAR struct w25_dev_s *priv; int ret; - fvdbg("spi: %p\n", spi); + finfo("spi: %p\n", spi); /* Allocate a state structure (we allocate the structure instead of using * a fixed, static allocation so that we can handle multiple FLASH devices. @@ -1256,7 +1256,7 @@ FAR struct mtd_dev_s *w25_initialize(FAR struct spi_dev_s *spi) { /* Unrecognized! Discard all of that work we just did and return NULL */ - fdbg("Unrecognized\n"); + ferr("ERROR: Unrecognized\n"); kmm_free(priv); priv = NULL; } @@ -1276,7 +1276,7 @@ FAR struct mtd_dev_s *w25_initialize(FAR struct spi_dev_s *spi) { /* Allocation failed! Discard all of that work we just did and return NULL */ - fdbg("Allocation failed\n"); + ferr("ERROR: Allocation failed\n"); kmm_free(priv); priv = NULL; } @@ -1292,6 +1292,6 @@ FAR struct mtd_dev_s *w25_initialize(FAR struct spi_dev_s *spi) /* Return the implementation-specific state structure as the MTD device */ - fvdbg("Return %p\n", priv); + finfo("Return %p\n", priv); return (FAR struct mtd_dev_s *)priv; } diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 49ad8d710fd25b0191d1eb9bdbcac157148c6574..8852ead7b8e9dad1b9ead464316348cf22197898 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -95,12 +95,12 @@ config NETDEV_LATEINIT config NET_DUMPPACKET bool "Enable packet dumping" - depends on DEBUG + depends on DEBUG_FEATURES default n ---help--- Some Ethernet MAC drivers supporting dumping of received and transmitted packets as a debug option. This setting enables that - debug option. Also needs DEBUG. + debug option. Also needs CONFIG_DEBUG_FEATURES. comment "External Ethernet MAC Device Support" @@ -234,9 +234,10 @@ config ENC28J60_DUMPPACKET config ENC28J60_REGDEBUG bool "Register-Level Debug" default n - depends on DEBUG && DEBUG_NET + depends on DEBUG_FEATURES && DEBUG_NET ---help--- - Enable very low-level register access debug. Depends on DEBUG and DEBUG_NET. + Enable very low-level register access debug. Depends on + CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_NET. endif # ENC28J60 @@ -296,9 +297,10 @@ config ENCX24J600_DUMPPACKET config ENCX24J600_REGDEBUG bool "Register-Level Debug" default n - depends on DEBUG && DEBUG_NET + depends on DEBUG_FEATURES && DEBUG_NET ---help--- - Enable very low-level register access debug. Depends on DEBUG and DEBUG_NET. + Enable very low-level register access debug. Depends on + CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_NET. endif # ENCX24J600 @@ -495,12 +497,12 @@ endchoice config NETDEV_PHY_DEBUG bool "PHY debug" default n - depends on DEBUG + depends on DEBUG_FEATURES ---help--- Normally debug output is controlled by DEBUG_NET. However, that - may generate a LOT of debug output, especially if DEBUG_VERBOSE is + may generate a LOT of debug output, especially if CONFIG_DEBUG_INFO is also selected. This option is intended to force VERVOSE debug - output from certain PHY-related even if DEBUG_NET or DEBUG_VERBOSE + output from certain PHY-related even if DEBUG_NET or CONFIG_DEBUG_INFO are not selected. This allows for focused, unit-level debug of the NSH network initialization logic. diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index dfaf2d63840af554d4ca9c32961b713814672679..dd2af6658bfff0af3743e8a2b34b5f8c9e2ddb83 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c @@ -314,7 +314,7 @@ static int cs89x0_transmit(struct cs89x0_driver_s *cs89x0) * Function: cs89x0_txpoll * * Description: - * The transmitter is available, check if uIP has any outgoing packets ready + * The transmitter is available, check if the network has any outgoing packets ready * to send. This is a callback from devif_poll(). devif_poll() may be called: * * 1. When the preceding TX packet send is complete, @@ -436,7 +436,7 @@ static void cs89x0_receive(FAR struct cs89x0_driver_s *cs89x0, uint16_t isq) return; } - /* Check if the packet is a valid size for the uIP buffer configuration */ + /* Check if the packet is a valid size for the network buffer configuration */ if (rxlength > ???) { @@ -467,7 +467,7 @@ static void cs89x0_receive(FAR struct cs89x0_driver_s *cs89x0, uint16_t isq) #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); NETDEV_RXIPV4(&priv->cs_dev); /* Handle ARP on input then give the IPv4 packet to the network @@ -508,7 +508,7 @@ static void cs89x0_receive(FAR struct cs89x0_driver_s *cs89x0, uint16_t isq) #ifdef CONFIG_NET_IPv6 if (BUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); NETDEV_RXIPV6(&priv->cs_dev); /* Give the IPv6 packet to the network layer */ @@ -561,7 +561,7 @@ static void cs89x0_receive(FAR struct cs89x0_driver_s *cs89x0, uint16_t isq) else #endif { - nllvdbg("Unrecognized packet type %02x\n", BUF->type); + ninfo("Unrecognized packet type %02x\n", BUF->type); NETDEV_RXDROPPED(&priv->cs_dev); } } @@ -618,7 +618,7 @@ static void cs89x0_txdone(struct cs89x0_driver_s *cs89x0, uint16_t isq) wd_cancel(cs89x0->cs_txtimeout); - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ (void)devif_poll(&cs89x0->cs_dev, cs89x0_txpoll); } @@ -679,7 +679,7 @@ static int cs89x0_interrupt(int irq, FAR void *context) register struct cs89x0_driver_s *cs89x0 = s89x0_mapirq(irq); uint16_t isq; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!cs89x0) { return -ENODEV; @@ -690,7 +690,7 @@ static int cs89x0_interrupt(int irq, FAR void *context) while ((isq = cs89x0_getreg(dev, CS89x0_ISQ_OFFSET)) != 0) { - nvdbg("ISQ: %04x\n", isq); + ninfo("ISQ: %04x\n", isq); switch (isq & ISQ_EVENTMASK) { case ISQ_RXEVENT: @@ -704,7 +704,7 @@ static int cs89x0_interrupt(int irq, FAR void *context) case ISQ_BUFEVENT: if ((isq & ISQ_BUFEVENT_TXUNDERRUN) != 0) { - ndbg("Transmit underrun\n"); + nerr("ERROR: Transmit underrun\n"); #ifdef CONFIG_CS89x0_XMITEARLY cd89x0->cs_txunderrun++; if (cd89x0->cs_txunderrun == 3) @@ -759,7 +759,7 @@ static void cs89x0_txtimeout(int argc, uint32_t arg, ...) /* Then reset the hardware */ #warning "Missing logic" - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ (void)devif_poll(&cs89x0->cs_dev, cs89x0_txpoll); } @@ -788,7 +788,7 @@ static void cs89x0_polltimer(int argc, uint32_t arg, ...) /* Check if there is room in the send another TXr packet. */ #warning "Missing logic" - /* If so, update TCP timing states and poll uIP for new XMIT data */ + /* If so, update TCP timing states and poll the network for new XMIT data */ (void)devif_timer(&cs89x0->cs_dev, cs89x0_txpoll); @@ -819,9 +819,9 @@ static int cs89x0_ifup(struct net_driver_s *dev) { struct cs89x0_driver_s *cs89x0 = (struct cs89x0_driver_s *)dev->d_private; - ndbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); /* Initialize the Ethernet interface */ #warning "Missing logic" @@ -909,7 +909,7 @@ static int cs89x0_txavail(struct net_driver_s *dev) /* Check if there is room in the hardware to hold another outgoing packet. */ #warning "Missing logic" - /* If so, then poll uIP for new XMIT data */ + /* If so, then poll the network for new XMIT data */ (void)devif_poll(&cs89x0->cs_dev, cs89x0_txpoll); } @@ -1010,7 +1010,7 @@ int cs89x0_initialize(FAR const cs89x0_driver_s *cs89x0, int devno) { /* Sanity checks -- only performed with debug enabled */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!cs89x0 || (unsigned)devno > CONFIG_CS89x0_NINTERFACES || g_cs89x00[devno]) { return -EINVAL; diff --git a/drivers/net/dm90x0.c b/drivers/net/dm90x0.c index caaf0c1872d9c50405d04a883ac3f6cec974f364..ddc809f4c50b34102a5d79adb7a5578e7bdd2d66 100644 --- a/drivers/net/dm90x0.c +++ b/drivers/net/dm90x0.c @@ -309,7 +309,7 @@ struct dm9x_driver_s void (*dm_write)(const uint8_t *ptr, int len); void (*dm_discard)(int len); - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ struct net_driver_s dm_dev; }; @@ -433,7 +433,7 @@ static void putreg(int reg, uint8_t value) static void read8(FAR uint8_t *ptr, int len) { - nvdbg("Read %d bytes (8-bit mode)\n", len); + ninfo("Read %d bytes (8-bit mode)\n", len); for (; len > 0; len--) { *ptr++ = DM9X_DATA; @@ -444,7 +444,7 @@ static void read16(FAR uint8_t *ptr, int len) { FAR uint16_t *ptr16 = (FAR uint16_t *)ptr; - nvdbg("Read %d bytes (16-bit mode)\n", len); + ninfo("Read %d bytes (16-bit mode)\n", len); for (; len > 0; len -= sizeof(uint16_t)) { *ptr16++ = DM9X_DATA; @@ -455,7 +455,7 @@ static void read32(FAR uint8_t *ptr, int len) { FAR uint32_t *ptr32 = (FAR uint32_t *)ptr; - nvdbg("Read %d bytes (32-bit mode)\n", len); + ninfo("Read %d bytes (32-bit mode)\n", len); for (; len > 0; len -= sizeof(uint32_t)) { *ptr32++ = DM9X_DATA; @@ -481,7 +481,7 @@ static void read32(FAR uint8_t *ptr, int len) static void discard8(int len) { - nvdbg("Discard %d bytes (8-bit mode)\n", len); + ninfo("Discard %d bytes (8-bit mode)\n", len); for (; len > 0; len--) { DM9X_DATA; @@ -490,7 +490,7 @@ static void discard8(int len) static void discard16(int len) { - nvdbg("Discard %d bytes (16-bit mode)\n", len); + ninfo("Discard %d bytes (16-bit mode)\n", len); for (; len > 0; len -= sizeof(uint16_t)) { DM9X_DATA; @@ -499,7 +499,7 @@ static void discard16(int len) static void discard32(int len) { - nvdbg("Discard %d bytes (32-bit mode)\n", len); + ninfo("Discard %d bytes (32-bit mode)\n", len); for (; len > 0; len -= sizeof(uint32_t)) { DM9X_DATA; @@ -525,7 +525,7 @@ static void discard32(int len) static void write8(FAR const uint8_t *ptr, int len) { - nvdbg("Write %d bytes (8-bit mode)\n", len); + ninfo("Write %d bytes (8-bit mode)\n", len); for (; len > 0; len--) { @@ -537,7 +537,7 @@ static void write16(const uint8_t *ptr, int len) { FAR uint16_t *ptr16 = (FAR uint16_t *)ptr; - nvdbg("Write %d bytes (16-bit mode)\n", len); + ninfo("Write %d bytes (16-bit mode)\n", len); for (; len > 0; len -= sizeof(uint16_t)) { @@ -549,7 +549,7 @@ static void write32(FAR const uint8_t *ptr, int len) { FAR uint32_t *ptr32 = (FAR uint32_t *)ptr; - nvdbg("Write %d bytes (32-bit mode)\n", len); + ninfo("Write %d bytes (32-bit mode)\n", len); for (; len > 0; len -= sizeof(uint32_t)) { @@ -737,7 +737,7 @@ static int dm9x_transmit(struct dm9x_driver_s *dm9x) * Function: dm9x_txpoll * * Description: - * The transmitter is available, check if uIP has any outgoing packets ready + * The transmitter is available, check if the network has any outgoing packets ready * to send. This is a callback from devif_poll(). devif_poll() may be called: * * 1. When the preceding TX packet send is complete, @@ -831,7 +831,7 @@ static void dm9x_receive(FAR struct dm9x_driver_s *dm9x) bool bchecksumready; uint8_t rxbyte; - nvdbg("Packet received\n"); + ninfo("Packet received\n"); do { @@ -865,7 +865,7 @@ static void dm9x_receive(FAR struct dm9x_driver_s *dm9x) { /* Bad RX packet... update statistics */ - ndbg("Received packet with errors: %02x\n", rx.desc.rx_status); + nerr("ERROR: Received packet with errors: %02x\n", rx.desc.rx_status); NETDEV_RXERRORS(&dm9x->dm_dev); /* Drop this packet and continue to check the next packet */ @@ -873,11 +873,11 @@ static void dm9x_receive(FAR struct dm9x_driver_s *dm9x) dm9x->dm_discard(rx.desc.rx_len); } - /* Also check if the packet is a valid size for the uIP configuration */ + /* Also check if the packet is a valid size for the network configuration */ else if (rx.desc.rx_len < ETH_HDRLEN || rx.desc.rx_len > (CONFIG_NET_ETH_MTU + 2)) { - ndbg("RX length error\n"); + nerr("ERROR: RX length error\n"); NETDEV_RXERRORS(&dm9x->dm_dev); /* Drop this packet and continue to check the next packet */ @@ -886,7 +886,7 @@ static void dm9x_receive(FAR struct dm9x_driver_s *dm9x) } else { - /* Good packet... Copy the packet data out of SRAM and pass it one to uIP */ + /* Good packet... Copy the packet data out of SRAM and pass it one to the network */ dm9x->dm_dev.d_len = rx.desc.rx_len; dm9x->dm_read(dm9x->dm_dev.d_buf, rx.desc.rx_len); @@ -902,7 +902,7 @@ static void dm9x_receive(FAR struct dm9x_driver_s *dm9x) #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); NETDEV_RXIPV4(&priv->dm_dev); /* Handle ARP on input then give the IPv4 packet to the network @@ -943,7 +943,7 @@ static void dm9x_receive(FAR struct dm9x_driver_s *dm9x) #ifdef CONFIG_NET_IPv6 if (BUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); NETDEV_RXIPV6(&priv->dm_dev); /* Give the IPv6 packet to the network layer */ @@ -1004,7 +1004,7 @@ static void dm9x_receive(FAR struct dm9x_driver_s *dm9x) dm9x->ncrxpackets++; } while ((rxbyte & 0x01) == DM9X_PKTRDY && dm9x->ncrxpackets < DM9X_CRXTHRES); - nvdbg("All RX packets processed\n"); + ninfo("All RX packets processed\n"); } /**************************************************************************** @@ -1027,7 +1027,7 @@ static void dm9x_txdone(struct dm9x_driver_s *dm9x) { int nsr; - nvdbg("TX done\n"); + ninfo("TX done\n"); /* Another packet has completed transmission. Decrement the count of * of pending TX transmissions. @@ -1042,7 +1042,7 @@ static void dm9x_txdone(struct dm9x_driver_s *dm9x) } else { - ndbg("Bad TX count (TX1END)\n"); + nerr("ERROR: Bad TX count (TX1END)\n"); } } @@ -1054,7 +1054,7 @@ static void dm9x_txdone(struct dm9x_driver_s *dm9x) } else { - ndbg("Bad TX count (TX2END)\n"); + nerr("ERROR: Bad TX count (TX2END)\n"); } } @@ -1065,7 +1065,7 @@ static void dm9x_txdone(struct dm9x_driver_s *dm9x) wd_cancel(dm9x->dm_txtimeout); } - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ (void)devif_poll(&dm9x->dm_dev, dm9x_txpoll); } @@ -1110,7 +1110,7 @@ static int dm9x_interrupt(int irq, FAR void *context) isr = getreg(DM9X_ISR); putreg(DM9X_ISR, isr); - nvdbg("Interrupt status: %02x\n", isr); + ninfo("Interrupt status: %02x\n", isr); /* Check for link status change */ @@ -1144,7 +1144,8 @@ static int dm9x_interrupt(int irq, FAR void *context) } up_mdelay(1); } - ndbg("delay: %dmS speed: %s\n", i, dm9x->dm_b100M ? "100M" : "10M"); + + nerr("ERROR: delay: %dmS speed: %s\n", i, dm9x->dm_b100M ? "100M" : "10M"); } /* Check if we received an incoming packet */ @@ -1206,23 +1207,23 @@ static void dm9x_txtimeout(int argc, uint32_t arg, ...) { struct dm9x_driver_s *dm9x = (struct dm9x_driver_s *)arg; - ndbg("TX timeout\n"); + nerr("ERROR: TX timeout\n"); /* Increment statistics and dump debug info */ NETDEV_TXTIMEOUTS(dm9x->dm_dev); - ndbg(" TX packet count: %d\n", dm9x->dm_ntxpending); - ndbg(" TX read pointer address: 0x%02x:%02x\n", - getreg(DM9X_TRPAH), getreg(DM9X_TRPAL)); - ndbg(" Memory data write address: 0x%02x:%02x (DM9010)\n", - getreg(DM9X_MDWAH), getreg(DM9X_MDWAL)); + ninfo(" TX packet count: %d\n", dm9x->dm_ntxpending); + ninfo(" TX read pointer address: 0x%02x:%02x\n", + getreg(DM9X_TRPAH), getreg(DM9X_TRPAL)); + ninfo(" Memory data write address: 0x%02x:%02x (DM9010)\n", + getreg(DM9X_MDWAH), getreg(DM9X_MDWAL)); /* Then reset the DM90x0 */ dm9x_reset(dm9x); - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ (void)devif_poll(&dm9x->dm_dev, dm9x_txpoll); } @@ -1264,7 +1265,7 @@ static void dm9x_polltimer(int argc, uint32_t arg, ...) if (dm9x->dm_ntxpending < 1 || (dm9x->dm_b100M && dm9x->dm_ntxpending < 2)) { - /* If so, update TCP timing states and poll uIP for new XMIT data */ + /* If so, update TCP timing states and poll the network for new XMIT data */ (void)devif_timer(&dm9x->dm_dev, dm9x_txpoll); } @@ -1342,9 +1343,9 @@ static int dm9x_ifup(struct net_driver_s *dev) uint8_t netstatus; int i; - ndbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); /* Initilize DM90x0 chip */ @@ -1372,7 +1373,7 @@ static int dm9x_ifup(struct net_driver_s *dev) up_mdelay(1); } - ndbg("delay: %dmS speed: %s\n", i, dm9x->dm_b100M ? "100M" : "10M"); + ninfo("delay: %dmS speed: %s\n", i, dm9x->dm_b100M ? "100M" : "10M"); /* Set and activate a timer process */ @@ -1407,7 +1408,7 @@ static int dm9x_ifdown(struct net_driver_s *dev) struct dm9x_driver_s *dm9x = (struct dm9x_driver_s *)dev->d_private; irqstate_t flags; - ndbg("Stopping\n"); + ninfo("Stopping\n"); /* Disable the DM9X interrupt */ @@ -1456,7 +1457,7 @@ static int dm9x_txavail(struct net_driver_s *dev) struct dm9x_driver_s *dm9x = (struct dm9x_driver_s *)dev->d_private; irqstate_t flags; - ndbg("Polling\n"); + ninfo("Polling\n"); flags = enter_critical_section(); /* Ignore the notification if the interface is not yet up */ @@ -1470,7 +1471,7 @@ static int dm9x_txavail(struct net_driver_s *dev) if (dm9x->dm_ntxpending < 1 || (dm9x->dm_b100M && dm9x->dm_ntxpending < 2)) { - /* If so, then poll uIP for new XMIT data */ + /* If so, then poll the network for new XMIT data */ (void)devif_poll(&dm9x->dm_dev, dm9x_txpoll); } @@ -1557,7 +1558,7 @@ static int dm9x_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) static void dm9x_bringup(struct dm9x_driver_s *dm9x) { - ndbg("Initializing\n"); + ninfo("Initializing\n"); /* Set the internal PHY power-on, GPIOs normal, and wait 2ms */ @@ -1722,13 +1723,13 @@ int dm9x_initialize(void) vid = (((uint16_t)getreg(DM9X_VIDH)) << 8) | (uint16_t)getreg(DM9X_VIDL); pid = (((uint16_t)getreg(DM9X_PIDH)) << 8) | (uint16_t)getreg(DM9X_PIDL); - nlldbg("I/O base: %08x VID: %04x PID: %04x\n", CONFIG_DM9X_BASE, vid, pid); + ninfo("I/O base: %08x VID: %04x PID: %04x\n", CONFIG_DM9X_BASE, vid, pid); /* Check if a DM90x0 chip is recognized at this I/O base */ if (vid != DM9X_DAVICOMVID || (pid != DM9X_DM9000PID && pid != DM9X_DM9010PID)) { - nlldbg("DM90x0 vendor/product ID not found at this base address\n"); + nerr("ERROR: DM90x0 vendor/product ID not found at this base address\n"); return -ENODEV; } @@ -1738,7 +1739,7 @@ int dm9x_initialize(void) { /* We could not attach the ISR to the ISR */ - nlldbg("irq_attach() failed\n"); + nerr("ERROR: irq_attach() failed\n"); return -EAGAIN; } @@ -1767,8 +1768,8 @@ int dm9x_initialize(void) mptr[i] = getreg(j); } - nlldbg("MAC: %0x:%0x:%0x:%0x:%0x:%0x\n", - mptr[0], mptr[1], mptr[2], mptr[3], mptr[4], mptr[5]); + ninfo("MAC: %0x:%0x:%0x:%0x:%0x:%0x\n", + mptr[0], mptr[1], mptr[2], mptr[3], mptr[4], mptr[5]); /* Register the device with the OS so that socket IOCTLs can be performed */ diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c index 11a445298922c00fca6f2b7a99eca5523a5115bd..6d5d5dc4f50cecaf38555e25c6ae77aa1a37bed1 100644 --- a/drivers/net/e1000.c +++ b/drivers/net/e1000.c @@ -127,7 +127,7 @@ struct e1000_dev WDOG_ID txpoll; /* TX poll timer */ WDOG_ID txtimeout; /* TX timeout timer */ - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ struct net_driver_s netdev; /* Interface understood by networking layer */ }; @@ -462,7 +462,7 @@ static int e1000_transmit(struct e1000_dev *e1000) * Function: e1000_txpoll * * Description: - * The transmitter is available, check if uIP has any outgoing packets ready + * The transmitter is available, check if the network has any outgoing packets ready * to send. This is a callback from devif_poll(). devif_poll() may be called: * * 1. When the preceding TX packet send is complete, @@ -570,7 +570,7 @@ static void e1000_receive(struct e1000_dev *e1000) goto next; } - /* Check if the packet is a valid size for the uIP buffer configuration */ + /* Check if the packet is a valid size for the network buffer configuration */ /* get the number of actual data-bytes in this packet */ @@ -602,7 +602,7 @@ static void e1000_receive(struct e1000_dev *e1000) #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); /* Handle ARP on input then give the IPv4 packet to the network * layer @@ -642,7 +642,7 @@ static void e1000_receive(struct e1000_dev *e1000) #ifdef CONFIG_NET_IPv6 if (BUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); /* Give the IPv6 packet to the network layer */ @@ -728,7 +728,7 @@ static void e1000_txtimeout(int argc, uint32_t arg, ...) e1000_init(e1000); - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ (void)devif_poll(&e1000->netdev, e1000_txpoll); } @@ -765,7 +765,7 @@ static void e1000_polltimer(int argc, uint32_t arg, ...) return; } - /* If so, update TCP timing states and poll uIP for new XMIT data. Hmmm.. + /* If so, update TCP timing states and poll the network for new XMIT data. Hmmm.. * might be bug here. Does this mean if there is a transmit in progress, * we will missing TCP time state updates? */ @@ -799,9 +799,9 @@ static int e1000_ifup(struct net_driver_s *dev) { struct e1000_dev *e1000 = (struct e1000_dev *)dev->d_private; - ndbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); /* Initialize PHYs, the Ethernet interface, and setup up Ethernet interrupts */ @@ -1089,7 +1089,7 @@ static int e1000_probe(uint16_t addr, pci_id_t id) { uint32_t mmio_base, mmio_size; uint32_t size; - int err; + int errcode; void *kmem; void *omem; struct e1000_dev *dev; @@ -1107,7 +1107,7 @@ static int e1000_probe(uint16_t addr, pci_id_t id) /* enable device */ - if ((err = pci_enable_device(addr, PCI_BUS_MASTER)) < 0) + if ((errcode = pci_enable_device(addr, PCI_BUS_MASTER)) < 0) { goto error; } @@ -1120,8 +1120,8 @@ static int e1000_probe(uint16_t addr, pci_id_t id) mmio_base = pci_resource_start(addr, 0); mmio_size = pci_resource_len(addr, 0); - err = rgmp_memmap_nocache(mmio_base, mmio_size, mmio_base); - if (err) + errcode = rgmp_memmap_nocache(mmio_base, mmio_size, mmio_base); + if (errcode) { goto error; } @@ -1139,7 +1139,7 @@ static int e1000_probe(uint16_t addr, pci_id_t id) dev->int_desc.handler = e1000_interrupt_handler; dev->int_desc.dev_id = dev; - if ((err = pci_request_irq(addr, &dev->int_desc, 0)) < 0) + if ((errcode = pci_request_irq(addr, &dev->int_desc, 0)) < 0) { goto err0; } @@ -1164,7 +1164,7 @@ static int e1000_probe(uint16_t addr, pci_id_t id) omem = kmem = memalign(PGSIZE, size); if (kmem == NULL) { - err = -ENOMEM; + errcode = -ENOMEM; goto err1; } @@ -1211,8 +1211,8 @@ static int e1000_probe(uint16_t addr, pci_id_t id) /* Register the device with the OS so that socket IOCTLs can be performed */ - err = netdev_register(&dev->netdev, NET_LL_ETHERNET); - if (err) + errcode = netdev_register(&dev->netdev, NET_LL_ETHERNET); + if (errcode) { goto err2; } @@ -1234,8 +1234,8 @@ err0: rgmp_memunmap(mmio_base, mmio_size); error: kmm_free(dev); - cprintf("e1000 device probe fail: %d\n", err); - return err; + cprintf("e1000 device probe fail: %d\n", errcode); + return errcode; } /**************************************************************************** diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c index 2ae3a01ebd53ffba86cea1857d7319e34cfa3437..98edc13417dbc588343ab0653ac217fcdbc9242f 100644 --- a/drivers/net/enc28j60.c +++ b/drivers/net/enc28j60.c @@ -135,7 +135,7 @@ /* Low-level register debug */ -#if !defined(CONFIG_DEBUG) || !defined(CONFIG_DEBUG_NET) +#if !defined(CONFIG_DEBUG_FEATURES) || !defined(CONFIG_DEBUG_NET) # undef CONFIG_ENC28J60_REGDEBUG #endif @@ -195,13 +195,13 @@ #ifdef CONFIG_ENC28J60_REGDEBUG # define enc_wrdump(a,v) \ - lowsyslog(LOG_DEBUG, "ENC28J60: %02x<-%02x\n", a, v); + syslog(LOG_DEBUG, "ENC28J60: %02x<-%02x\n", a, v); # define enc_rddump(a,v) \ - lowsyslog(LOG_DEBUG, "ENC28J60: %02x->%02x\n", a, v); + syslog(LOG_DEBUG, "ENC28J60: %02x->%02x\n", a, v); # define enc_cmddump(c) \ - lowsyslog(LOG_DEBUG, "ENC28J60: CMD: %02x\n", c); + syslog(LOG_DEBUG, "ENC28J60: CMD: %02x\n", c); # define enc_bmdump(c,b,s) \ - lowsyslog(LOG_DEBUG, "ENC28J60: CMD: %02x buffer: %p length: %d\n", c, b, s); + syslog(LOG_DEBUG, "ENC28J60: CMD: %02x buffer: %p length: %d\n", c, b, s); #else # define enc_wrdump(a,v) # define enc_rddump(a,v) @@ -252,9 +252,9 @@ struct enc_driver_s FAR struct spi_dev_s *spi; - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ - struct net_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by the network */ }; /**************************************************************************** @@ -774,56 +774,56 @@ static int enc_waitbreg(FAR struct enc_driver_s *priv, uint8_t ctrlreg, #if 0 /* Sometimes useful */ static void enc_rxdump(FAR struct enc_driver_s *priv) { - lowsyslog(LOG_DEBUG, "Rx Registers:\n"); - lowsyslog(LOG_DEBUG, " EIE: %02x EIR: %02x\n", - enc_rdgreg(priv, ENC_EIE), enc_rdgreg(priv, ENC_EIR)); - lowsyslog(LOG_DEBUG, " ESTAT: %02x ECON1: %02x ECON2: %02x\n", - enc_rdgreg(priv, ENC_ESTAT), enc_rdgreg(priv, ENC_ECON1), - enc_rdgreg(priv, ENC_ECON2)); - lowsyslog(LOG_DEBUG, " ERXST: %02x %02x\n", - enc_rdbreg(priv, ENC_ERXSTH), enc_rdbreg(priv, ENC_ERXSTL)); - lowsyslog(LOG_DEBUG, " ERXND: %02x %02x\n", - enc_rdbreg(priv, ENC_ERXNDH), enc_rdbreg(priv, ENC_ERXNDL)); - lowsyslog(LOG_DEBUG, " ERXRDPT: %02x %02x\n", - enc_rdbreg(priv, ENC_ERXRDPTH), enc_rdbreg(priv, ENC_ERXRDPTL)); - lowsyslog(LOG_DEBUG, " ERXFCON: %02x EPKTCNT: %02x\n", - enc_rdbreg(priv, ENC_ERXFCON), enc_rdbreg(priv, ENC_EPKTCNT)); - lowsyslog(LOG_DEBUG, " MACON1: %02x MACON3: %02x\n", - enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3)); - lowsyslog(LOG_DEBUG, " MAMXFL: %02x %02x\n", - enc_rdbreg(priv, ENC_MAMXFLH), enc_rdbreg(priv, ENC_MAMXFLL)); - lowsyslog(LOG_DEBUG, " MAADR: %02x:%02x:%02x:%02x:%02x:%02x\n", - enc_rdbreg(priv, ENC_MAADR1), enc_rdbreg(priv, ENC_MAADR2), - enc_rdbreg(priv, ENC_MAADR3), enc_rdbreg(priv, ENC_MAADR4), - enc_rdbreg(priv, ENC_MAADR5), enc_rdbreg(priv, ENC_MAADR6)); + syslog(LOG_DEBUG, "Rx Registers:\n"); + syslog(LOG_DEBUG, " EIE: %02x EIR: %02x\n", + enc_rdgreg(priv, ENC_EIE), enc_rdgreg(priv, ENC_EIR)); + syslog(LOG_DEBUG, " ESTAT: %02x ECON1: %02x ECON2: %02x\n", + enc_rdgreg(priv, ENC_ESTAT), enc_rdgreg(priv, ENC_ECON1), + enc_rdgreg(priv, ENC_ECON2)); + syslog(LOG_DEBUG, " ERXST: %02x %02x\n", + enc_rdbreg(priv, ENC_ERXSTH), enc_rdbreg(priv, ENC_ERXSTL)); + syslog(LOG_DEBUG, " ERXND: %02x %02x\n", + enc_rdbreg(priv, ENC_ERXNDH), enc_rdbreg(priv, ENC_ERXNDL)); + syslog(LOG_DEBUG, " ERXRDPT: %02x %02x\n", + enc_rdbreg(priv, ENC_ERXRDPTH), enc_rdbreg(priv, ENC_ERXRDPTL)); + syslog(LOG_DEBUG, " ERXFCON: %02x EPKTCNT: %02x\n", + enc_rdbreg(priv, ENC_ERXFCON), enc_rdbreg(priv, ENC_EPKTCNT)); + syslog(LOG_DEBUG, " MACON1: %02x MACON3: %02x\n", + enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3)); + syslog(LOG_DEBUG, " MAMXFL: %02x %02x\n", + enc_rdbreg(priv, ENC_MAMXFLH), enc_rdbreg(priv, ENC_MAMXFLL)); + syslog(LOG_DEBUG, " MAADR: %02x:%02x:%02x:%02x:%02x:%02x\n", + enc_rdbreg(priv, ENC_MAADR1), enc_rdbreg(priv, ENC_MAADR2), + enc_rdbreg(priv, ENC_MAADR3), enc_rdbreg(priv, ENC_MAADR4), + enc_rdbreg(priv, ENC_MAADR5), enc_rdbreg(priv, ENC_MAADR6)); } #endif #if 0 /* Sometimes useful */ static void enc_txdump(FAR struct enc_driver_s *priv) { - lowsyslog(LOG_DEBUG, "Tx Registers:\n"); - lowsyslog(LOG_DEBUG, " EIE: %02x EIR: %02x\n", - enc_rdgreg(priv, ENC_EIE), enc_rdgreg(priv, ENC_EIR)); - lowsyslog(LOG_DEBUG, " ESTAT: %02x ECON1: %02x\n", - enc_rdgreg(priv, ENC_ESTAT), enc_rdgreg(priv, ENC_ECON1)); - lowsyslog(LOG_DEBUG, " ETXST: %02x %02x\n", - enc_rdbreg(priv, ENC_ETXSTH), enc_rdbreg(priv, ENC_ETXSTL)); - lowsyslog(LOG_DEBUG, " ETXND: %02x %02x\n", - enc_rdbreg(priv, ENC_ETXNDH), enc_rdbreg(priv, ENC_ETXNDL)); - lowsyslog(LOG_DEBUG, " MACON1: %02x MACON3: %02x MACON4: %02x\n", - enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3), - enc_rdbreg(priv, ENC_MACON4)); - lowsyslog(LOG_DEBUG, " MACON1: %02x MACON3: %02x MACON4: %02x\n", - enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3), - enc_rdbreg(priv, ENC_MACON4)); - lowsyslog(LOG_DEBUG, " MABBIPG: %02x MAIPG %02x %02x\n", - enc_rdbreg(priv, ENC_MABBIPG), enc_rdbreg(priv, ENC_MAIPGH), - enc_rdbreg(priv, ENC_MAIPGL)); - lowsyslog(LOG_DEBUG, " MACLCON1: %02x MACLCON2: %02x\n", - enc_rdbreg(priv, ENC_MACLCON1), enc_rdbreg(priv, ENC_MACLCON2)); - lowsyslog(LOG_DEBUG, " MAMXFL: %02x %02x\n", - enc_rdbreg(priv, ENC_MAMXFLH), enc_rdbreg(priv, ENC_MAMXFLL)); + syslog(LOG_DEBUG, "Tx Registers:\n"); + syslog(LOG_DEBUG, " EIE: %02x EIR: %02x\n", + enc_rdgreg(priv, ENC_EIE), enc_rdgreg(priv, ENC_EIR)); + syslog(LOG_DEBUG, " ESTAT: %02x ECON1: %02x\n", + enc_rdgreg(priv, ENC_ESTAT), enc_rdgreg(priv, ENC_ECON1)); + syslog(LOG_DEBUG, " ETXST: %02x %02x\n", + enc_rdbreg(priv, ENC_ETXSTH), enc_rdbreg(priv, ENC_ETXSTL)); + syslog(LOG_DEBUG, " ETXND: %02x %02x\n", + enc_rdbreg(priv, ENC_ETXNDH), enc_rdbreg(priv, ENC_ETXNDL)); + syslog(LOG_DEBUG, " MACON1: %02x MACON3: %02x MACON4: %02x\n", + enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3), + enc_rdbreg(priv, ENC_MACON4)); + syslog(LOG_DEBUG, " MACON1: %02x MACON3: %02x MACON4: %02x\n", + enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3), + enc_rdbreg(priv, ENC_MACON4)); + syslog(LOG_DEBUG, " MABBIPG: %02x MAIPG %02x %02x\n", + enc_rdbreg(priv, ENC_MABBIPG), enc_rdbreg(priv, ENC_MAIPGH), + enc_rdbreg(priv, ENC_MAIPGL)); + syslog(LOG_DEBUG, " MACLCON1: %02x MACLCON2: %02x\n", + enc_rdbreg(priv, ENC_MACLCON1), enc_rdbreg(priv, ENC_MACLCON2)); + syslog(LOG_DEBUG, " MAMXFL: %02x %02x\n", + enc_rdbreg(priv, ENC_MAMXFLH), enc_rdbreg(priv, ENC_MAMXFLL)); } #endif @@ -1092,7 +1092,7 @@ static int enc_transmit(FAR struct enc_driver_s *priv) /* Increment statistics */ - nllvdbg("Sending packet, pktlen: %d\n", priv->dev.d_len); + ninfo("Sending packet, pktlen: %d\n", priv->dev.d_len); NETDEV_TXPACKETS(&priv->dev); /* Verify that the hardware is ready to send another packet. The driver @@ -1154,7 +1154,7 @@ static int enc_transmit(FAR struct enc_driver_s *priv) * Function: enc_txpoll * * Description: - * The transmitter is available, check if uIP has any outgoing packets ready + * The transmitter is available, check if the network has any outgoing packets ready * to send. This is a callback from devif_poll(). devif_poll() may be called: * * 1. When the preceding TX packet send is complete, @@ -1168,7 +1168,7 @@ static int enc_transmit(FAR struct enc_driver_s *priv) * OK on success; a negated errno on failure * * Assumptions: - * Interrupts are enabled but the caller holds the uIP lock. + * Interrupts are enabled but the caller holds the network lock. * ****************************************************************************/ @@ -1180,7 +1180,7 @@ static int enc_txpoll(struct net_driver_s *dev) * the field d_len is set to a value > 0. */ - nllvdbg("Poll result: d_len=%d\n", priv->dev.d_len); + ninfo("Poll result: d_len=%d\n", priv->dev.d_len); if (priv->dev.d_len > 0) { /* Look up the destination MAC address and add it to the Ethernet @@ -1261,7 +1261,7 @@ static void enc_linkstatus(FAR struct enc_driver_s *priv) * None * * Assumptions: - * Interrupts are enabled but the caller holds the uIP lock. + * Interrupts are enabled but the caller holds the network lock. * ****************************************************************************/ @@ -1288,7 +1288,7 @@ static void enc_txif(FAR struct enc_driver_s *priv) (void)wd_start(priv->txpoll, ENC_WDDELAY, enc_polltimer, 1, (wdparm_t)priv); - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ (void)devif_poll(&priv->dev, enc_txpoll); } @@ -1362,7 +1362,7 @@ static void enc_rxerif(FAR struct enc_driver_s *priv) * Function: enc_rxdispatch * * Description: - * Give the newly received packet to uIP. + * Give the newly received packet to the network. * * Parameters: * priv - Reference to the driver state structure @@ -1371,7 +1371,7 @@ static void enc_rxerif(FAR struct enc_driver_s *priv) * None * * Assumptions: - * Interrupts are enabled but the caller holds the uIP lock. + * Interrupts are enabled but the caller holds the network lock. * ****************************************************************************/ @@ -1388,7 +1388,7 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv) #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); NETDEV_RXIPV4(&priv->dev); /* Handle ARP on input then give the IPv4 packet to the network @@ -1429,7 +1429,7 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv) #ifdef CONFIG_NET_IPv6 if (BUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); NETDEV_RXIPV6(&priv->dev); /* Give the IPv6 packet to the network layer */ @@ -1467,7 +1467,7 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv) #ifdef CONFIG_NET_ARP if (BUF->type == htons(ETHTYPE_ARP)) { - nllvdbg("ARP packet received (%02x)\n", BUF->type); + ninfo("ARP packet received (%02x)\n", BUF->type); NETDEV_RXARP(&priv->dev); arp_arpin(&priv->dev); @@ -1484,7 +1484,7 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv) else #endif { - nlldbg("Unsupported packet type dropped (%02x)\n", htons(BUF->type)); + nerr("ERROR: Unsupported packet type dropped (%02x)\n", htons(BUF->type)); NETDEV_RXDROPPED(&priv->dev); } } @@ -1502,7 +1502,7 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv) * None * * Assumptions: - * Interrupts are enabled but the caller holds the uIP lock. + * Interrupts are enabled but the caller holds the network lock. * ****************************************************************************/ @@ -1543,14 +1543,14 @@ static void enc_pktif(FAR struct enc_driver_s *priv) pktlen = (uint16_t)rsv[3] << 8 | (uint16_t)rsv[2]; rxstat = (uint16_t)rsv[5] << 8 | (uint16_t)rsv[4]; - nllvdbg("Receiving packet, nextpkt: %04x pktlen: %d rxstat: %04x\n", - priv->nextpkt, pktlen, rxstat); + ninfo("Receiving packet, nextpkt: %04x pktlen: %d rxstat: %04x\n", + priv->nextpkt, pktlen, rxstat); /* Check if the packet was received OK */ if ((rxstat & RXSTAT_OK) == 0) { - nlldbg("ERROR: RXSTAT: %04x\n", rxstat); + nerr("ERROR: RXSTAT: %04x\n", rxstat); NETDEV_RXERRORS(&priv->dev); } @@ -1558,7 +1558,7 @@ static void enc_pktif(FAR struct enc_driver_s *priv) else if (pktlen > (CONFIG_NET_ETH_MTU + 4) || pktlen <= (ETH_HDRLEN + 4)) { - nlldbg("Bad packet size dropped (%d)\n", pktlen); + nerr("ERROR: Bad packet size dropped (%d)\n", pktlen); NETDEV_RXERRORS(&priv->dev); } @@ -1578,7 +1578,7 @@ static void enc_pktif(FAR struct enc_driver_s *priv) enc_rdbuffer(priv, priv->dev.d_buf, priv->dev.d_len); enc_dumppacket("Received Packet", priv->dev.d_buf, priv->dev.d_len); - /* Dispatch the packet to uIP */ + /* Dispatch the packet to the network */ enc_rxdispatch(priv); } @@ -1620,7 +1620,7 @@ static void enc_irqworker(FAR void *arg) DEBUGASSERT(priv); - /* Get exclusive access to both uIP and the SPI bus. */ + /* Get exclusive access to both the network and the SPI bus. */ lock = net_lock(); enc_lock(priv); @@ -1647,7 +1647,7 @@ static void enc_irqworker(FAR void *arg) * settings. */ - nllvdbg("EIR: %02x\n", eir); + ninfo("EIR: %02x\n", eir); /* DMAIF: The DMA interrupt indicates that the DMA module has completed * its memory copy or checksum calculation. Additionally, this interrupt @@ -1767,7 +1767,7 @@ static void enc_irqworker(FAR void *arg) uint8_t pktcnt = enc_rdbreg(priv, ENC_EPKTCNT); if (pktcnt > 0) { - nllvdbg("EPKTCNT: %02x\n", pktcnt); + nerr("EPKTCNT: %02x\n", pktcnt); /* Handle packet receipt */ @@ -1810,7 +1810,7 @@ static void enc_irqworker(FAR void *arg) enc_bfsgreg(priv, ENC_EIE, EIE_INTIE); - /* Release lock on the SPI bus and uIP */ + /* Release lock on the SPI bus and the network */ enc_unlock(priv); net_unlock(lock); @@ -1878,10 +1878,10 @@ static void enc_toworker(FAR void *arg) net_lock_t lock; int ret; - nlldbg("Tx timeout\n"); + nerr("ERROR: Tx timeout\n"); DEBUGASSERT(priv); - /* Get exclusive access to uIP */ + /* Get exclusive access to the network */ lock = net_lock(); @@ -1899,11 +1899,11 @@ static void enc_toworker(FAR void *arg) DEBUGASSERT(ret == OK); UNUSED(ret); - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ (void)devif_poll(&priv->dev, enc_txpoll); - /* Release lock on uIP */ + /* Release lock on the network */ net_unlock(lock); } @@ -1973,7 +1973,7 @@ static void enc_pollworker(FAR void *arg) DEBUGASSERT(priv); - /* Get exclusive access to both uIP and the SPI bus. */ + /* Get exclusive access to both the network and the SPI bus. */ lock = net_lock(); enc_lock(priv); @@ -1986,7 +1986,7 @@ static void enc_pollworker(FAR void *arg) if ((enc_rdgreg(priv, ENC_ECON1) & ECON1_TXRTS) == 0) { - /* Yes.. update TCP timing states and poll uIP for new XMIT data. Hmmm.. + /* Yes.. update TCP timing states and poll the network for new XMIT data. Hmmm.. * looks like a bug here to me. Does this mean if there is a transmit * in progress, we will missing TCP time state updates? */ @@ -1994,7 +1994,7 @@ static void enc_pollworker(FAR void *arg) (void)devif_timer(&priv->dev, enc_txpoll); } - /* Release lock on the SPI bus and uIP */ + /* Release lock on the SPI bus and the network */ enc_unlock(priv); net_unlock(lock); @@ -2067,8 +2067,8 @@ static int enc_ifup(struct net_driver_s *dev) FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; int ret; - nlldbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); /* Lock the SPI bus so that we have exclusive access */ @@ -2139,9 +2139,9 @@ static int enc_ifdown(struct net_driver_s *dev) irqstate_t flags; int ret; - nlldbg("Taking down: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Taking down: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); /* Lock the SPI bus so that we have exclusive access */ @@ -2212,7 +2212,7 @@ static int enc_txavail(struct net_driver_s *dev) if ((enc_rdgreg(priv, ENC_ECON1) & ECON1_TXRTS) == 0) { - /* The interface is up and TX is idle; poll uIP for new XMIT data */ + /* The interface is up and TX is idle; poll the network for new XMIT data */ (void)devif_poll(&priv->dev, enc_txpoll); } @@ -2336,7 +2336,7 @@ static int enc_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) static void enc_pwrsave(FAR struct enc_driver_s *priv) { - nllvdbg("Set PWRSV\n"); + ninfo("Set PWRSV\n"); /* 1. Turn off packet reception by clearing ECON1.RXEN. */ @@ -2396,7 +2396,7 @@ static void enc_pwrsave(FAR struct enc_driver_s *priv) static void enc_pwrfull(FAR struct enc_driver_s *priv) { - nllvdbg("Clear PWRSV\n"); + ninfo("Clear PWRSV\n"); /* 1. Wake-up by clearing ECON2.PWRSV. */ @@ -2473,7 +2473,7 @@ static int enc_reset(FAR struct enc_driver_s *priv) { uint8_t regval; - nlldbg("Reset\n"); + nwarn("WARNING: Reset\n"); /* Configure SPI for the ENC28J60 */ @@ -2524,11 +2524,11 @@ static int enc_reset(FAR struct enc_driver_s *priv) regval = enc_rdbreg(priv, ENC_EREVID); if (regval == 0x00 || regval == 0xff) { - nlldbg("Bad Rev ID: %02x\n", regval); + nerr("ERROR: Bad Rev ID: %02x\n", regval); return -ENODEV; } - nllvdbg("Rev ID: %02x\n", regval); + ninfo("Rev ID: %02x\n", regval); /* Set filter mode: unicast OR broadcast AND crc valid */ diff --git a/drivers/net/encx24j600.c b/drivers/net/encx24j600.c index aae63dcebb0580bebc1aa61aac627c916d0a2859..b829d9cd97e28b36e3a9fbef5b5ad91d38fe3985 100644 --- a/drivers/net/encx24j600.c +++ b/drivers/net/encx24j600.c @@ -140,7 +140,7 @@ /* Low-level register debug */ -#if !defined(CONFIG_DEBUG) || !defined(CONFIG_DEBUG_NET) +#if !defined(CONFIG_DEBUG_FEATURES) || !defined(CONFIG_DEBUG_NET) # undef CONFIG_ENCX24J600_REGDEBUG #endif @@ -187,17 +187,17 @@ #ifdef CONFIG_ENCX24J600_REGDEBUG # define enc_wrdump(a,v) \ - lowsyslog(LOG_DEBUG, "ENCX24J600: %02x<-%04x\n", a, v); + syslog(LOG_DEBUG, "ENCX24J600: %02x<-%04x\n", a, v); # define enc_rddump(a,v) \ - lowsyslog(LOG_DEBUG, "ENCX24J600: %02x->%04x\n", a, v); + syslog(LOG_DEBUG, "ENCX24J600: %02x->%04x\n", a, v); # define enc_bfsdump(a,m) \ - lowsyslog(LOG_DEBUG, "ENCX24J600: %02x|=%04x\n", a, m); + syslog(LOG_DEBUG, "ENCX24J600: %02x|=%04x\n", a, m); # define enc_bfcdump(a,m) \ - lowsyslog(LOG_DEBUG, "ENCX24J600: %02x&=~%04x\n", a, m); + syslog(LOG_DEBUG, "ENCX24J600: %02x&=~%04x\n", a, m); # define enc_cmddump(c) \ - lowsyslog(LOG_DEBUG, "ENCX24J600: CMD: %02x\n", c); + syslog(LOG_DEBUG, "ENCX24J600: CMD: %02x\n", c); # define enc_bmdump(c,b,s) \ - lowsyslog(LOG_DEBUG, "ENCX24J600: CMD: %02x buffer: %p length: %d\n", c, b, s); + syslog(LOG_DEBUG, "ENCX24J600: CMD: %02x buffer: %p length: %d\n", c, b, s); #else # define enc_wrdump(a,v) # define enc_rddump(a,v) @@ -265,9 +265,9 @@ struct enc_driver_s FAR struct spi_dev_s *spi; - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ - struct net_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by the network */ }; /**************************************************************************** @@ -764,56 +764,56 @@ static void enc_bfc(FAR struct enc_driver_s *priv, uint16_t ctrlreg, #if 0 /* Sometimes useful */ static void enc_rxdump(FAR struct enc_driver_s *priv) { - lowsyslog(LOG_DEBUG, "Rx Registers:\n"); - lowsyslog(LOG_DEBUG, " EIE: %02x EIR: %02x\n", - enc_rdgreg(priv, ENC_EIE), enc_rdgreg(priv, ENC_EIR)); - lowsyslog(LOG_DEBUG, " ESTAT: %02x ECON1: %02x ECON2: %02x\n", - enc_rdgreg(priv, ENC_ESTAT), enc_rdgreg(priv, ENC_ECON1), - enc_rdgreg(priv, ENC_ECON2)); - lowsyslog(LOG_DEBUG, " ERXST: %02x %02x\n", - enc_rdbreg(priv, ENC_ERXSTH), enc_rdbreg(priv, ENC_ERXSTL)); - lowsyslog(LOG_DEBUG, " ERXND: %02x %02x\n", - enc_rdbreg(priv, ENC_ERXNDH), enc_rdbreg(priv, ENC_ERXNDL)); - lowsyslog(LOG_DEBUG, " ERXRDPT: %02x %02x\n", - enc_rdbreg(priv, ENC_ERXRDPTH), enc_rdbreg(priv, ENC_ERXRDPTL)); - lowsyslog(LOG_DEBUG, " ERXFCON: %02x EPKTCNT: %02x\n", - enc_rdbreg(priv, ENC_ERXFCON), enc_rdbreg(priv, ENC_EPKTCNT)); - lowsyslog(LOG_DEBUG, " MACON1: %02x MACON3: %02x\n", - enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3)); - lowsyslog(LOG_DEBUG, " MAMXFL: %02x %02x\n", - enc_rdbreg(priv, ENC_MAMXFLH), enc_rdbreg(priv, ENC_MAMXFLL)); - lowsyslog(LOG_DEBUG, " MAADR: %02x:%02x:%02x:%02x:%02x:%02x\n", - enc_rdbreg(priv, ENC_MAADR1), enc_rdbreg(priv, ENC_MAADR2), - enc_rdbreg(priv, ENC_MAADR3), enc_rdbreg(priv, ENC_MAADR4), - enc_rdbreg(priv, ENC_MAADR5), enc_rdbreg(priv, ENC_MAADR6)); + syslog(LOG_DEBUG, "Rx Registers:\n"); + syslog(LOG_DEBUG, " EIE: %02x EIR: %02x\n", + enc_rdgreg(priv, ENC_EIE), enc_rdgreg(priv, ENC_EIR)); + syslog(LOG_DEBUG, " ESTAT: %02x ECON1: %02x ECON2: %02x\n", + enc_rdgreg(priv, ENC_ESTAT), enc_rdgreg(priv, ENC_ECON1), + enc_rdgreg(priv, ENC_ECON2)); + syslog(LOG_DEBUG, " ERXST: %02x %02x\n", + enc_rdbreg(priv, ENC_ERXSTH), enc_rdbreg(priv, ENC_ERXSTL)); + syslog(LOG_DEBUG, " ERXND: %02x %02x\n", + enc_rdbreg(priv, ENC_ERXNDH), enc_rdbreg(priv, ENC_ERXNDL)); + syslog(LOG_DEBUG, " ERXRDPT: %02x %02x\n", + enc_rdbreg(priv, ENC_ERXRDPTH), enc_rdbreg(priv, ENC_ERXRDPTL)); + syslog(LOG_DEBUG, " ERXFCON: %02x EPKTCNT: %02x\n", + enc_rdbreg(priv, ENC_ERXFCON), enc_rdbreg(priv, ENC_EPKTCNT)); + syslog(LOG_DEBUG, " MACON1: %02x MACON3: %02x\n", + enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3)); + syslog(LOG_DEBUG, " MAMXFL: %02x %02x\n", + enc_rdbreg(priv, ENC_MAMXFLH), enc_rdbreg(priv, ENC_MAMXFLL)); + syslog(LOG_DEBUG, " MAADR: %02x:%02x:%02x:%02x:%02x:%02x\n", + enc_rdbreg(priv, ENC_MAADR1), enc_rdbreg(priv, ENC_MAADR2), + enc_rdbreg(priv, ENC_MAADR3), enc_rdbreg(priv, ENC_MAADR4), + enc_rdbreg(priv, ENC_MAADR5), enc_rdbreg(priv, ENC_MAADR6)); } #endif #if 0 /* Sometimes useful */ static void enc_txdump(FAR struct enc_driver_s *priv) { - lowsyslog(LOG_DEBUG, "Tx Registers:\n"); - lowsyslog(LOG_DEBUG, " EIE: %02x EIR: %02x\n", - enc_rdgreg(priv, ENC_EIE), enc_rdgreg(priv, ENC_EIR)); - lowsyslog(LOG_DEBUG, " ESTAT: %02x ECON1: %02x\n", - enc_rdgreg(priv, ENC_ESTAT), enc_rdgreg(priv, ENC_ECON1)); - lowsyslog(LOG_DEBUG, " ETXST: %02x %02x\n", - enc_rdbreg(priv, ENC_ETXSTH), enc_rdbreg(priv, ENC_ETXSTL)); - lowsyslog(LOG_DEBUG, " ETXND: %02x %02x\n", - enc_rdbreg(priv, ENC_ETXNDH), enc_rdbreg(priv, ENC_ETXNDL)); - lowsyslog(LOG_DEBUG, " MACON1: %02x MACON3: %02x MACON4: %02x\n", - enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3), - enc_rdbreg(priv, ENC_MACON4)); - lowsyslog(LOG_DEBUG, " MACON1: %02x MACON3: %02x MACON4: %02x\n", - enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3), - enc_rdbreg(priv, ENC_MACON4)); - lowsyslog(LOG_DEBUG, " MABBIPG: %02x MAIPG %02x %02x\n", - enc_rdbreg(priv, ENC_MABBIPG), enc_rdbreg(priv, ENC_MAIPGH), - enc_rdbreg(priv, ENC_MAIPGL)); - lowsyslog(LOG_DEBUG, " MACLCON1: %02x MACLCON2: %02x\n", - enc_rdbreg(priv, ENC_MACLCON1), enc_rdbreg(priv, ENC_MACLCON2)); - lowsyslog(LOG_DEBUG, " MAMXFL: %02x %02x\n", - enc_rdbreg(priv, ENC_MAMXFLH), enc_rdbreg(priv, ENC_MAMXFLL)); + syslog(LOG_DEBUG, "Tx Registers:\n"); + syslog(LOG_DEBUG, " EIE: %02x EIR: %02x\n", + enc_rdgreg(priv, ENC_EIE), enc_rdgreg(priv, ENC_EIR)); + syslog(LOG_DEBUG, " ESTAT: %02x ECON1: %02x\n", + enc_rdgreg(priv, ENC_ESTAT), enc_rdgreg(priv, ENC_ECON1)); + syslog(LOG_DEBUG, " ETXST: %02x %02x\n", + enc_rdbreg(priv, ENC_ETXSTH), enc_rdbreg(priv, ENC_ETXSTL)); + syslog(LOG_DEBUG, " ETXND: %02x %02x\n", + enc_rdbreg(priv, ENC_ETXNDH), enc_rdbreg(priv, ENC_ETXNDL)); + syslog(LOG_DEBUG, " MACON1: %02x MACON3: %02x MACON4: %02x\n", + enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3), + enc_rdbreg(priv, ENC_MACON4)); + syslog(LOG_DEBUG, " MACON1: %02x MACON3: %02x MACON4: %02x\n", + enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3), + enc_rdbreg(priv, ENC_MACON4)); + syslog(LOG_DEBUG, " MABBIPG: %02x MAIPG %02x %02x\n", + enc_rdbreg(priv, ENC_MABBIPG), enc_rdbreg(priv, ENC_MAIPGH), + enc_rdbreg(priv, ENC_MAIPGL)); + syslog(LOG_DEBUG, " MACLCON1: %02x MACLCON2: %02x\n", + enc_rdbreg(priv, ENC_MACLCON1), enc_rdbreg(priv, ENC_MACLCON2)); + syslog(LOG_DEBUG, " MAMXFL: %02x %02x\n", + enc_rdbreg(priv, ENC_MAMXFLH), enc_rdbreg(priv, ENC_MAMXFLL)); } #endif @@ -1081,7 +1081,7 @@ static int enc_transmit(FAR struct enc_driver_s *priv) * * Assumptions: * A packet is available in d_buf. - * Interrupts are enabled but the caller holds the uIP lock. + * Interrupts are enabled but the caller holds the network lock. * ****************************************************************************/ @@ -1127,7 +1127,7 @@ static int enc_txenqueue(FAR struct enc_driver_s *priv) } else { - nlldbg("no free descriptors\n"); + nerr("ERROR: no free descriptors\n"); ret = -ENOMEM; } @@ -1138,7 +1138,7 @@ static int enc_txenqueue(FAR struct enc_driver_s *priv) * Function: enc_txpoll * * Description: - * Enqueues uIP packets if available. + * Enqueues network packets if available. * This is a callback from devif_poll(). devif_poll() may be called: * * 1. When the preceding TX packet send is complete, @@ -1152,7 +1152,7 @@ static int enc_txenqueue(FAR struct enc_driver_s *priv) * OK on success; a negated errno on failure * * Assumptions: - * Interrupts are enabled but the caller holds the uIP lock. + * Interrupts are enabled but the caller holds the network lock. * ****************************************************************************/ @@ -1165,7 +1165,7 @@ static int enc_txpoll(struct net_driver_s *dev) * the field d_len is set to a value > 0. */ - nllvdbg("Poll result: d_len=%d\n", priv->dev.d_len); + ninfo("Poll result: d_len=%d\n", priv->dev.d_len); if (priv->dev.d_len > 0) { @@ -1273,7 +1273,7 @@ static void enc_linkstatus(FAR struct enc_driver_s *priv) * None * * Assumptions: - * Interrupts are enabled but the caller holds the uIP lock. + * Interrupts are enabled but the caller holds the network lock. * ****************************************************************************/ @@ -1322,7 +1322,7 @@ static void enc_txif(FAR struct enc_driver_s *priv) * None * * Assumptions: - * Interrupts are enabled but the caller holds the uIP lock. + * Interrupts are enabled but the caller holds the network lock. * ****************************************************************************/ @@ -1331,7 +1331,7 @@ static void enc_rxldpkt(FAR struct enc_driver_s *priv, { DEBUGASSERT(priv != NULL && descr != NULL); - nllvdbg("load packet @%04x len: %d\n", descr->addr, descr->len); + ninfo("load packet @%04x len: %d\n", descr->addr, descr->len); /* Set the rx data pointer to the start of the received packet (ERXRDPT) */ @@ -1362,7 +1362,7 @@ static void enc_rxldpkt(FAR struct enc_driver_s *priv, * A free rx descriptor * * Assumptions: - * Interrupts are enabled but the caller holds the uIP lock. + * Interrupts are enabled but the caller holds the network lock. * ****************************************************************************/ @@ -1395,7 +1395,7 @@ static struct enc_descr_s *enc_rxgetdescr(FAR struct enc_driver_s *priv) * None * * Assumptions: - * Interrupts are enabled but the caller holds the uIP lock. + * Interrupts are enabled but the caller holds the network lock. * ****************************************************************************/ @@ -1403,7 +1403,7 @@ static void enc_rxrmpkt(FAR struct enc_driver_s *priv, FAR struct enc_descr_s *d { uint16_t addr; - nllvdbg("free descr: %p\n", descr); + ninfo("free descr: %p\n", descr); /* If it is the last descriptor in the queue, advance ERXTAIL. * This way it is possible that gaps occcur. Maybe pending packets @@ -1420,7 +1420,7 @@ static void enc_rxrmpkt(FAR struct enc_driver_s *priv, FAR struct enc_descr_s *d DEBUGASSERT(addr >= PKTMEM_RX_START && addr < PKTMEM_RX_END); - nllvdbg("ERXTAIL %04x\n", addr); + ninfo("ERXTAIL %04x\n", addr); enc_wrreg(priv, ENC_ERXTAIL, addr); @@ -1443,7 +1443,7 @@ static void enc_rxrmpkt(FAR struct enc_driver_s *priv, FAR struct enc_descr_s *d * Function: enc_rxdispatch * * Description: - * Give the newly received packet to uIP. + * Give the newly received packet to the network. * * Parameters: * priv - Reference to the driver state structure @@ -1452,7 +1452,7 @@ static void enc_rxrmpkt(FAR struct enc_driver_s *priv, FAR struct enc_descr_s *d * None * * Assumptions: - * Interrupts are enabled but the caller holds the uIP lock. + * Interrupts are enabled but the caller holds the network lock. * ****************************************************************************/ @@ -1490,7 +1490,7 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv) #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); NETDEV_RXIPV4(&priv->dev); /* Handle ARP on input then give the IPv4 packet to the network @@ -1540,7 +1540,7 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv) #ifdef CONFIG_NET_IPv6 if (BUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); NETDEV_RXIPV6(&priv->dev); /* Give the IPv6 packet to the network layer */ @@ -1587,7 +1587,7 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv) #ifdef CONFIG_NET_ARP if (BUF->type == htons(ETHTYPE_ARP)) { - nllvdbg("ARP packet received (%02x)\n", BUF->type); + ninfo("ARP packet received (%02x)\n", BUF->type); NETDEV_RXARP(&priv->dev); arp_arpin(&priv->dev); @@ -1612,7 +1612,7 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv) enc_rxrmpkt(priv, descr); - nlldbg("Unsupported packet type dropped (%02x)\n", htons(BUF->type)); + nerr("ERROR: Unsupported packet type dropped (%02x)\n", htons(BUF->type)); NETDEV_RXDROPPED(&priv->dev); } @@ -1633,7 +1633,7 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv) * None * * Assumptions: - * Interrupts are enabled but the caller holds the uIP lock. + * Interrupts are enabled but the caller holds the network lock. * ****************************************************************************/ @@ -1684,8 +1684,8 @@ static void enc_pktif(FAR struct enc_driver_s *priv) rxstat = (uint32_t)rsv[7] << 24 | (uint32_t)rsv[6] << 16 | (uint32_t)rsv[5] << 8 | (uint32_t)rsv[4]; - nllvdbg("Receiving packet, nextpkt: %04x pktlen: %d rxstat: %08x pktcnt: %d\n", - priv->nextpkt, pktlen, rxstat, pktcnt); + ninfo("Receiving packet, nextpkt: %04x pktlen: %d rxstat: %08x pktcnt: %d\n", + priv->nextpkt, pktlen, rxstat, pktcnt); /* We enqueue the packet first and remove it later if its faulty. * This way we avoid freeing packets that are not processed yet. @@ -1707,7 +1707,7 @@ static void enc_pktif(FAR struct enc_driver_s *priv) if ((rxstat & RXSTAT_OK) == 0) { - nlldbg("ERROR: RXSTAT: %08x\n", rxstat); + nerr("ERROR: RXSTAT: %08x\n", rxstat); /* Discard packet */ @@ -1719,7 +1719,7 @@ static void enc_pktif(FAR struct enc_driver_s *priv) else if (pktlen > (CONFIG_NET_ETH_MTU + 4) || pktlen <= (ETH_HDRLEN + 4)) { - nlldbg("Bad packet size dropped (%d)\n", pktlen); + nerr("ERROR: Bad packet size dropped (%d)\n", pktlen); /* Discard packet */ @@ -1763,7 +1763,7 @@ static void enc_pktif(FAR struct enc_driver_s *priv) * None * * Assumptions: - * Interrupts are enabled but the caller holds the uIP lock. + * Interrupts are enabled but the caller holds the network lock. * ****************************************************************************/ @@ -1774,17 +1774,17 @@ static void enc_rxabtif(FAR struct enc_driver_s *priv) #if 0 /* Free the last received packet from the RX queue */ - nlldbg("rx abort\n"); - nlldbg("ESTAT: %04x\n", enc_rdreg(priv, ENC_ESTAT)); - nlldbg("EIR: %04x\n", enc_rdreg(priv, ENC_EIR)); - nlldbg("ERXTAIL: %04x\n", enc_rdreg(priv, ENC_ERXTAIL)); - nlldbg("ERXHAED: %04x\n", enc_rdreg(priv, ENC_ERXHEAD)); + ninfo("rx abort\n"); + ninfo("ESTAT: %04x\n", enc_rdreg(priv, ENC_ESTAT)); + ninfo("EIR: %04x\n", enc_rdreg(priv, ENC_EIR)); + ninfo("ERXTAIL: %04x\n", enc_rdreg(priv, ENC_ERXTAIL)); + ninfo("ERXHAED: %04x\n", enc_rdreg(priv, ENC_ERXHEAD)); descr = (FAR struct enc_descr_s *)sq_peek(&priv->rxqueue); while (descr != NULL) { - nlldbg("addr: %04x len: %d\n", descr->addr, descr->len); + ninfo("addr: %04x len: %d\n", descr->addr, descr->len); descr = (FAR struct enc_descr_s *)sq_next(descr); } @@ -1797,7 +1797,7 @@ static void enc_rxabtif(FAR struct enc_driver_s *priv) { enc_rxrmpkt(priv, descr); - nlldbg("pending packet freed\n"); + ninfo("pending packet freed\n"); } else { @@ -1832,7 +1832,7 @@ static void enc_irqworker(FAR void *arg) DEBUGASSERT(priv); - /* Get exclusive access to both uIP and the SPI bus. */ + /* Get exclusive access to both the network and the SPI bus. */ lock = net_lock(); enc_lock(priv); @@ -1859,7 +1859,7 @@ static void enc_irqworker(FAR void *arg) * settings. */ - nllvdbg("EIR: %04x\n", eir); + ninfo("EIR: %04x\n", eir); if ((eir & EIR_DMAIF) != 0) /* DMA interrupt */ { @@ -1975,7 +1975,7 @@ static void enc_irqworker(FAR void *arg) enc_bfs(priv, ENC_EIE, EIE_INTIE); - /* Release lock on the SPI bus and uIP */ + /* Release lock on the SPI bus and the network */ enc_unlock(priv); net_unlock(lock); @@ -2043,10 +2043,10 @@ static void enc_toworker(FAR void *arg) net_lock_t lock; int ret; - nlldbg("Tx timeout\n"); + nerr("ERROR: Tx timeout\n"); DEBUGASSERT(priv); - /* Get exclusive access to uIP. */ + /* Get exclusive access to the network. */ lock = net_lock(); @@ -2064,11 +2064,11 @@ static void enc_toworker(FAR void *arg) DEBUGASSERT(ret == OK); (void)ret; - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ (void)devif_poll(&priv->dev, enc_txpoll); - /* Release uIP */ + /* Release the network */ net_unlock(lock); } @@ -2138,7 +2138,7 @@ static void enc_pollworker(FAR void *arg) DEBUGASSERT(priv); - /* Get exclusive access to both uIP and the SPI bus. */ + /* Get exclusive access to both the network and the SPI bus. */ lock = net_lock(); enc_lock(priv); @@ -2151,7 +2151,7 @@ static void enc_pollworker(FAR void *arg) if ((enc_rdreg(priv, ENC_ECON1) & ECON1_TXRTS) == 0) { - /* Yes.. update TCP timing states and poll uIP for new XMIT data. Hmmm.. + /* Yes.. update TCP timing states and poll the network for new XMIT data. Hmmm.. * looks like a bug here to me. Does this mean if there is a transmit * in progress, we will missing TCP time state updates? */ @@ -2159,7 +2159,7 @@ static void enc_pollworker(FAR void *arg) (void)devif_timer(&priv->dev, enc_txpoll); } - /* Release lock on the SPI bus and uIP */ + /* Release lock on the SPI bus and the network */ enc_unlock(priv); net_unlock(lock); @@ -2231,8 +2231,8 @@ static int enc_ifup(struct net_driver_s *dev) FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; int ret; - nlldbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); /* Lock the SPI bus so that we have exclusive access */ @@ -2307,9 +2307,9 @@ static int enc_ifdown(struct net_driver_s *dev) irqstate_t flags; int ret; - nlldbg("Taking down: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Taking down: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); /* Lock the SPI bus so that we have exclusive access */ @@ -2381,7 +2381,7 @@ static int enc_txavail(struct net_driver_s *dev) if ((enc_rdreg(priv, ENC_ECON1) & ECON1_TXRTS) == 0) { - /* The interface is up and TX is idle; poll uIP for new XMIT data */ + /* The interface is up and TX is idle; poll the network for new XMIT data */ (void)devif_poll(&priv->dev, enc_txpoll); } @@ -2420,7 +2420,7 @@ static int enc_rxavail(struct net_driver_s *dev) if (!sq_empty(&priv->rxqueue)) { - nllvdbg("RX queue not empty, trying to dispatch\n"); + ninfo("RX queue not empty, trying to dispatch\n"); enc_rxdispatch(priv); } @@ -2546,7 +2546,7 @@ static void enc_pwrsave(FAR struct enc_driver_s *priv) { uint16_t regval; - nllvdbg("Set PWRSV\n"); + ninfo("Set PWRSV\n"); /* 1. Turn off AES */ @@ -2597,7 +2597,7 @@ static void enc_ldmacaddr(FAR struct enc_driver_s *priv) uint16_t regval; uint8_t *mac = priv->dev.d_mac.ether_addr_octet; - nvdbg("Using ENCX24J600's built in MAC address\n"); + ninfo("Using ENCX24J600's built in MAC address\n"); regval = enc_rdreg(priv, ENC_MAADR1); mac[0] = regval & 0xff; @@ -2648,7 +2648,7 @@ static void enc_setmacaddr(FAR struct enc_driver_s *priv) { /* There is a user defined mac address. Write it to the ENCXJ600 */ - nvdbg("Using an user defined MAC address\n"); + ninfo("Using an user defined MAC address\n"); enc_wrreg(priv, ENC_MAADR1, (uint16_t)mac[1] << 8 | (uint16_t)mac[0]); enc_wrreg(priv, ENC_MAADR2, (uint16_t)mac[3] << 8 | (uint16_t)mac[2]); @@ -2728,7 +2728,7 @@ static int enc_reset(FAR struct enc_driver_s *priv) int ret; uint16_t regval; - nllvdbg("Reset\n"); + ninfo("Reset\n"); do { @@ -2742,7 +2742,7 @@ static int enc_reset(FAR struct enc_driver_s *priv) if (ret != OK) { - nlldbg("ERROR: encx24j600 clock failed to become ready\n"); + nerr("ERROR: encx24j600 clock failed to become ready\n"); return -ENODEV; } @@ -2756,7 +2756,7 @@ static int enc_reset(FAR struct enc_driver_s *priv) if (regval != 0x0000) { - nlldbg("ERROR: encx24j600 seems not to be reset properly\n"); + nerr("ERROR: encx24j600 seems not to be reset properly\n"); return -ENODEV; } @@ -2793,7 +2793,7 @@ static int enc_reset(FAR struct enc_driver_s *priv) } while ((regval & PHSTAT1_ANDONE) != 0); - nllvdbg("Auto-negotation completed\n"); + ninfo("Auto-negotation completed\n"); #endif @@ -2813,7 +2813,7 @@ static int enc_reset(FAR struct enc_driver_s *priv) #if 0 if (ret != OK) { - nlldbg("ERROR: encx24j600 failed to establish link\n"); + nerr("ERROR: encx24j600 failed to establish link\n"); return -ENODEV; } #endif diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c index fdf23a87e12514165be828cd3168c2ef9a585347..32890af9069afff52fc44627869ec251d6526581 100644 --- a/drivers/net/ftmac100.c +++ b/drivers/net/ftmac100.c @@ -171,9 +171,9 @@ struct ftmac100_driver_s struct work_s ft_work; /* For deferring work to the work queue */ #endif - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ - struct net_driver_s ft_dev; /* Interface understood by uIP */ + struct net_driver_s ft_dev; /* Interface understood by the network */ }; /**************************************************************************** @@ -285,7 +285,7 @@ static int ftmac100_transmit(FAR struct ftmac100_driver_s *priv) int len = priv->ft_dev.d_len; //irqstate_t flags; //flags = enter_critical_section(); -//nvdbg("flags=%08x\n", flags); +//ninfo("flags=%08x\n", flags); txdes = ftmac100_current_txdes(priv); @@ -307,7 +307,7 @@ static int ftmac100_transmit(FAR struct ftmac100_driver_s *priv) FTMAC100_TXDES1_TXBUF_SIZE(len)); txdes->txdes0 |= FTMAC100_TXDES0_TXDMA_OWN; - nvdbg("ftmac100_transmit[%x]: copy %08x to %08x %04x\n", + ninfo("ftmac100_transmit[%x]: copy %08x to %08x %04x\n", priv->tx_pointer, priv->ft_dev.d_buf, txdes->txdes2, len); priv->tx_pointer = (priv->tx_pointer + 1) & (CONFIG_FTMAC100_TX_DESC - 1); @@ -331,7 +331,7 @@ static int ftmac100_transmit(FAR struct ftmac100_driver_s *priv) * Function: ftmac100_txpoll * * Description: - * The transmitter is available, check if uIP has any outgoing packets + * The transmitter is available, check if the network has any outgoing packets * ready to send. This is a callback from devif_poll(). devif_poll() may * be called: * @@ -422,7 +422,7 @@ static void ftmac100_reset(FAR struct ftmac100_driver_s *priv) { FAR struct ftmac100_register_s *iobase = (FAR struct ftmac100_register_s *)priv->iobase; - nvdbg("%s(): iobase=%p\n", __func__, iobase); + ninfo("%s(): iobase=%p\n", __func__, iobase); putreg32 (FTMAC100_MACCR_SW_RST, &iobase->maccr); @@ -455,7 +455,7 @@ static void ftmac100_init(FAR struct ftmac100_driver_s *priv) FAR unsigned char *kmem; int i; - ndbg ("%s()\n", __func__); + nerr ("%s()\n", __func__); /* Disable all interrupts */ @@ -472,7 +472,7 @@ static void ftmac100_init(FAR struct ftmac100_driver_s *priv) kmem = memalign(RX_BUF_SIZE, CONFIG_FTMAC100_RX_DESC * RX_BUF_SIZE); - nvdbg("KMEM=%08x\n", kmem); + ninfo("KMEM=%08x\n", kmem); for (i = 0; i < CONFIG_FTMAC100_RX_DESC; i++) { @@ -502,7 +502,7 @@ static void ftmac100_init(FAR struct ftmac100_driver_s *priv) /* transmit ring */ - nvdbg("priv=%08x txdes=%08x rxdes=%08x\n", priv, txdes, rxdes); + ninfo("priv=%08x txdes=%08x rxdes=%08x\n", priv, txdes, rxdes); putreg32 ((unsigned int)txdes, &iobase->txr_badr); @@ -568,7 +568,7 @@ static uint32_t ftmac100_mdio_read(FAR struct ftmac100_register_s *iobase, int r for (i = 0; i < 10; i++) { phycr = getreg32(&iobase->phycr); - nvdbg("%02x %d phycr=%08x\n", reg, i, phycr); + ninfo("%02x %d phycr=%08x\n", reg, i, phycr); if ((phycr & FTMAC100_PHYCR_MIIRD) == 0) { @@ -603,7 +603,7 @@ static void ftmac100_set_mac(FAR struct ftmac100_driver_s *priv, unsigned int maddr = mac[0] << 8 | mac[1]; unsigned int laddr = mac[2] << 24 | mac[3] << 16 | mac[4] << 8 | mac[5]; - nvdbg("%s(%x %x)\n", __func__, maddr, laddr); + ninfo("%s(%x %x)\n", __func__, maddr, laddr); putreg32(maddr, &iobase->mac_madr); putreg32(laddr, &iobase->mac_ladr); @@ -656,7 +656,7 @@ static void ftmac100_receive(FAR struct ftmac100_driver_s *priv) if (!found) { - nvdbg("\nNOT FOUND\nCurrent RX %d rxdes0=%08x\n", + ninfo("\nNOT FOUND\nCurrent RX %d rxdes0=%08x\n", priv->rx_pointer, rxdes->rxdes0); return; } @@ -664,7 +664,7 @@ static void ftmac100_receive(FAR struct ftmac100_driver_s *priv) len = FTMAC100_RXDES0_RFL(rxdes->rxdes0); data = (uint8_t *)rxdes->rxdes2; - nvdbg ("RX buffer %d (%08x), %x received (%d)\n", + ninfo ("RX buffer %d (%08x), %x received (%d)\n", priv->rx_pointer, data, len, (rxdes->rxdes0 & FTMAC100_RXDES0_LRS)); /* Copy the data data from the hardware to priv->ft_dev.d_buf. Set @@ -685,7 +685,7 @@ static void ftmac100_receive(FAR struct ftmac100_driver_s *priv) #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); /* Handle ARP on input then give the IPv4 packet to the network * layer @@ -725,7 +725,7 @@ static void ftmac100_receive(FAR struct ftmac100_driver_s *priv) #ifdef CONFIG_NET_IPv6 if (BUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); /* Give the IPv6 packet to the network layer */ @@ -835,7 +835,7 @@ static void ftmac100_txdone(FAR struct ftmac100_driver_s *priv) * disable further Tx interrupts. */ - nvdbg("txpending=%d\n", priv->tx_pending); + ninfo("txpending=%d\n", priv->tx_pending); /* Cancel the TX timeout */ @@ -849,7 +849,7 @@ static void ftmac100_txdone(FAR struct ftmac100_driver_s *priv) (void)wd_start(priv->ft_txpoll, FTMAC100_WDDELAY, ftmac100_poll_expiry, 1, (wdparm_t)priv); - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ (void)devif_poll(&priv->ft_dev, ftmac100_txpoll); } @@ -884,7 +884,7 @@ static inline void ftmac100_interrupt_process(FAR struct ftmac100_driver_s *priv status = getreg32 (&iobase->isr); #endif - nvdbg("status=%08x(%08x) BASE=%p ISR=%p PHYCR=%p\n", + ninfo("status=%08x(%08x) BASE=%p ISR=%p PHYCR=%p\n", status, getreg32(&iobase->isr), iobase, &iobase->isr, &iobase->phycr); if (!status) @@ -913,7 +913,7 @@ static inline void ftmac100_interrupt_process(FAR struct ftmac100_driver_s *priv if (status & (FTMAC100_INT_XPKT_OK)) { - nvdbg("\n\nTXDONE\n\n"); + ninfo("\n\nTXDONE\n\n"); ftmac100_txdone(priv); } @@ -931,27 +931,27 @@ static inline void ftmac100_interrupt_process(FAR struct ftmac100_driver_s *priv priv->ft_bifup = false; } - nvdbg("Link: %s\n", priv->ft_bifup ? "UP" : "DOWN"); + ninfo("Link: %s\n", priv->ft_bifup ? "UP" : "DOWN"); ftmac100_mdio_read(iobase, 5); } #if 0 #define REG(x) (*(volatile uint32_t *)(x)) - nvdbg("\n=============================================================\n"); - nvdbg("TM CNTL=%08x INTRS=%08x MASK=%08x LOAD=%08x COUNT=%08x M1=%08x\n", + ninfo("\n=============================================================\n"); + ninfo("TM CNTL=%08x INTRS=%08x MASK=%08x LOAD=%08x COUNT=%08x M1=%08x\n", REG(0x98400030), REG(0x98400034), REG(0x98400038), REG(0x98400004), REG(0x98400000), REG(0x98400008)); - nvdbg("IRQ STATUS=%08x MASK=%08x MODE=%08x LEVEL=%08x\n", + ninfo("IRQ STATUS=%08x MASK=%08x MODE=%08x LEVEL=%08x\n", REG(0x98800014), REG(0x98800004), REG(0x9880000C), REG(0x98800010)); - nvdbg("FIQ STATUS=%08x MASK=%08x MODE=%08x LEVEL=%08x\n", REG(0x98800034), + ninfo("FIQ STATUS=%08x MASK=%08x MODE=%08x LEVEL=%08x\n", REG(0x98800034), REG(0x98800024), REG(0x9880002C), REG(0x98800020)); - nvdbg("=============================================================\n"); + ninfo("=============================================================\n"); #endif out: putreg32 (INT_MASK_ALL_ENABLED, &iobase->imr); - nvdbg("ISR-done\n"); + ninfo("ISR-done\n"); } /**************************************************************************** @@ -1034,7 +1034,7 @@ static int ftmac100_interrupt(int irq, FAR void *context) /* TODO: Determine if a TX transfer just completed */ - nvdbg("===> status=%08x\n", priv->status); + ninfo("===> status=%08x\n", priv->status); if (priv->status & (FTMAC100_INT_XPKT_OK)) { @@ -1043,7 +1043,7 @@ static int ftmac100_interrupt(int irq, FAR void *context) * expiration and the deferred interrupt processing. */ - nvdbg("\n\nTXDONE 0\n\n"); + ninfo("\n\nTXDONE 0\n\n"); wd_cancel(priv->ft_txtimeout); } @@ -1087,9 +1087,9 @@ static inline void ftmac100_txtimeout_process(FAR struct ftmac100_driver_s *priv { /* Then reset the hardware */ - nvdbg("TXTIMEOUT\n"); + ninfo("TXTIMEOUT\n"); - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ (void)devif_poll(&priv->ft_dev, ftmac100_txpoll); } @@ -1195,7 +1195,7 @@ static inline void ftmac100_poll_process(FAR struct ftmac100_driver_s *priv) * the TX poll if he are unable to accept another packet for transmission. */ - /* If so, update TCP timing states and poll uIP for new XMIT data. Hmmm.. + /* If so, update TCP timing states and poll the network for new XMIT data. Hmmm.. * might be bug here. Does this mean if there is a transmit in progress, * we will missing TCP time state updates? */ @@ -1311,15 +1311,15 @@ static int ftmac100_ifup(struct net_driver_s *dev) FAR struct ftmac100_driver_s *priv = (FAR struct ftmac100_driver_s *)dev->d_private; #ifdef CONFIG_NET_IPv4 - ndbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); #endif #ifdef CONFIG_NET_IPv6 - ndbg("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", - dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2], - dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5], - dev->d_ipv6addr[6], dev->d_ipv6addr[7]); + ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", + dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2], + dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5], + dev->d_ipv6addr[6], dev->d_ipv6addr[7]); #endif /* Initialize PHYs, the Ethernet interface, and setup up Ethernet @@ -1421,7 +1421,7 @@ static inline void ftmac100_txavail_process(FAR struct ftmac100_driver_s *priv) { /* Check if there is room in the hardware to hold another outgoing packet. */ - /* If so, then poll uIP for new XMIT data */ + /* If so, then poll the network for new XMIT data */ (void)devif_poll(&priv->ft_dev, ftmac100_txpoll); } @@ -1658,7 +1658,7 @@ static void ftmac100_ipv6multicast(FAR struct ftmac100_driver_s *priv) mac[4] = tmp16 & 0xff; mac[5] = tmp16 >> 8; - nvdbg("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", + ninfo("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); (void)ftmac100_addmac(dev, mac); diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c index 3b750b8051367b175db665b3368a8fb718b0ea16..f0aa532a01650b87105ffbb545df8db111debaa0 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c @@ -99,9 +99,9 @@ struct lo_driver_s WDOG_ID lo_polldog; /* TX poll timer */ struct work_s lo_work; /* For deferring work to the work queue */ - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ - struct net_driver_s lo_dev; /* Interface understood by uIP */ + struct net_driver_s lo_dev; /* Interface understood by the network */ }; /**************************************************************************** @@ -187,7 +187,7 @@ static int lo_txpoll(FAR struct net_driver_s *dev) #ifdef CONFIG_NET_IPv4 if ((IPv4BUF->vhl & IP_VERSION_MASK) == IPv4_VERSION) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); NETDEV_RXIPV4(&priv->lo_dev); ipv4_input(&priv->lo_dev); } @@ -196,14 +196,14 @@ static int lo_txpoll(FAR struct net_driver_s *dev) #ifdef CONFIG_NET_IPv6 if ((IPv6BUF->vtc & IP_VERSION_MASK) == IPv6_VERSION) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); NETDEV_RXIPV6(&priv->lo_dev); ipv6_input(&priv->lo_dev); } else #endif { - ndbg("WARNING: Unrecognized packet type dropped: %02x\n", IPv4BUF->vhl); + nwarn("WARNING: Unrecognized packet type dropped: %02x\n", IPv4BUF->vhl); NETDEV_RXDROPPED(&priv->lo_dev); priv->lo_dev.d_len = 0; } @@ -323,15 +323,15 @@ static int lo_ifup(FAR struct net_driver_s *dev) FAR struct lo_driver_s *priv = (FAR struct lo_driver_s *)dev->d_private; #ifdef CONFIG_NET_IPv4 - ndbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); #endif #ifdef CONFIG_NET_IPv6 - ndbg("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", - dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2], - dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5], - dev->d_ipv6addr[6], dev->d_ipv6addr[7]); + ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", + dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2], + dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5], + dev->d_ipv6addr[6], dev->d_ipv6addr[7]); #endif /* Set and activate a timer process */ diff --git a/drivers/net/phy_notify.c b/drivers/net/phy_notify.c index be34ecb8de71f76dfd48278d98e4ef5ca078674d..5f202f9ae9337fd121cdf05d0478d2303bee1421 100644 --- a/drivers/net/phy_notify.c +++ b/drivers/net/phy_notify.c @@ -42,8 +42,8 @@ /* Force verbose debug on in this file only to support unit-level testing. */ #ifdef CONFIG_NETDEV_PHY_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG_VERBOSE 1 +# undef CONFIG_DEBUG_INFO +# define CONFIG_DEBUG_INFO 1 # undef CONFIG_DEBUG_NET # define CONFIG_DEBUG_NET 1 #endif @@ -82,11 +82,11 @@ */ #ifdef CONFIG_NETDEV_PHY_DEBUG -# define phydbg dbg -# define phylldbg lldbg +# define phyinfo _info +# define phyerr _err #else -# define phydbg(x...) -# define phylldbg(x...) +# define phyinfo(x...) +# define phyerr(x...) #endif /**************************************************************************** @@ -208,14 +208,14 @@ static FAR struct phy_notify_s *phy_find_unassigned(void) /* Return the client entry assigned to the caller */ phy_semgive(); - phydbg("Returning client %d\n", i); + phyinfo("Returning client %d\n", i); return client; } } /* Ooops... too many */ - ndbg("ERROR: No free client entries\n"); + nerr("ERROR: No free client entries\n"); phy_semgive(); return NULL; } @@ -243,7 +243,7 @@ static FAR struct phy_notify_s *phy_find_assigned(FAR const char *intf, /* Return the matching client entry to the caller */ phy_semgive(); - phydbg("Returning client %d\n", i); + phyinfo("Returning client %d\n", i); return client; } } @@ -266,8 +266,8 @@ static int phy_handler(FAR struct phy_notify_s *client) int ret; DEBUGASSERT(client && client->assigned && client->enable); - phylldbg("Entry client %d, signalling PID=%d with signal %d\n", - client->index, client->pid, client->signo); + phyinfo("Entry client %d, signalling PID=%d with signal %d\n", + client->index, client->pid, client->signo); /* Disable further interrupts */ @@ -287,7 +287,7 @@ static int phy_handler(FAR struct phy_notify_s *client) int errcode = errno; DEBUGASSERT(errcode > 0); - nlldbg("ERROR: sigqueue failed: %d\n", errcode); + nerr("ERROR: sigqueue failed: %d\n", errcode); UNUSED(errcode); } @@ -360,14 +360,14 @@ int phy_notify_subscribe(FAR const char *intf, pid_t pid, int signo, FAR struct phy_notify_s *client; DEBUGASSERT(intf); - nvdbg("%s: PID=%d signo=%d arg=%p\n", intf, pid, signo, arg); + ninfo("%s: PID=%d signo=%d arg=%p\n", intf, pid, signo, arg); /* The special value pid == 0 means to use the pid of the current task. */ if (pid == 0) { pid = getpid(); - phydbg("Actual PID=%d\n", pid); + phyinfo("Actual PID=%d\n", pid); } /* Check if this client already exists */ @@ -387,7 +387,7 @@ int phy_notify_subscribe(FAR const char *intf, pid_t pid, int signo, client = phy_find_unassigned(); if (!client) { - ndbg("ERROR: Failed to allocate a client entry\n"); + nerr("ERROR: Failed to allocate a client entry\n"); return -ENOMEM; } @@ -439,14 +439,14 @@ int phy_notify_unsubscribe(FAR const char *intf, pid_t pid) { FAR struct phy_notify_s *client; - nvdbg("%s: PID=%d\n", intf, pid); + ninfo("%s: PID=%d\n", intf, pid); /* Find the client entry for this interface */ client = phy_find_assigned(intf, pid); if (!client) { - ndbg("ERROR: No such client\n"); + nerr("ERROR: No such client\n"); return -ENOENT; } diff --git a/drivers/net/skeleton.c b/drivers/net/skeleton.c index 6194fbce34133db9cb1bfb464389ff615b9e94e5..82568cb09155dbdcffebf79eb15b2a2405864299 100644 --- a/drivers/net/skeleton.c +++ b/drivers/net/skeleton.c @@ -334,7 +334,7 @@ static void skel_receive(FAR struct skel_driver_s *priv) #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); NETDEV_RXIPV4(&priv->sk_dev); /* Handle ARP on input then give the IPv4 packet to the network @@ -375,7 +375,7 @@ static void skel_receive(FAR struct skel_driver_s *priv) #ifdef CONFIG_NET_IPv6 if (BUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); NETDEV_RXIPV6(&priv->sk_dev); /* Give the IPv6 packet to the network layer */ @@ -855,15 +855,15 @@ static int skel_ifup(FAR struct net_driver_s *dev) FAR struct skel_driver_s *priv = (FAR struct skel_driver_s *)dev->d_private; #ifdef CONFIG_NET_IPv4 - ndbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); #endif #ifdef CONFIG_NET_IPv6 - ndbg("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", - dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2], - dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5], - dev->d_ipv6addr[6], dev->d_ipv6addr[7]); + ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", + dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2], + dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5], + dev->d_ipv6addr[6], dev->d_ipv6addr[7]); #endif /* Initialize PHYs, the Ethernet interface, and setup up Ethernet interrupts */ @@ -1152,7 +1152,7 @@ static void skel_ipv6multicast(FAR struct skel_driver_s *priv) mac[4] = tmp16 & 0xff; mac[5] = tmp16 >> 8; - nvdbg("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", + ninfo("IPv6 Multicast: %02x:%02x:%02x:%02x:%02x:%02x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); (void)skel_addmac(dev, mac); diff --git a/drivers/net/slip.c b/drivers/net/slip.c index c02ebb0e935fcbae22fe69bfcd9cd67803c1f954..4105314c78cb91954de1f7d1884d0d55edf3a4d0 100644 --- a/drivers/net/slip.c +++ b/drivers/net/slip.c @@ -146,11 +146,11 @@ struct slip_driver_s uint16_t rxlen; /* The number of bytes in rxbuf */ pid_t rxpid; /* Receiver thread ID */ pid_t txpid; /* Transmitter thread ID */ - sem_t waitsem; /* Mutually exclusive access to uIP */ + sem_t waitsem; /* Mutually exclusive access to the network */ - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ - struct net_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by the network */ uint8_t rxbuf[CONFIG_NET_SLIP_MTU + 2]; uint8_t txbuf[CONFIG_NET_SLIP_MTU + 2]; }; @@ -287,7 +287,7 @@ static int slip_transmit(FAR struct slip_driver_s *priv) /* Increment statistics */ - nvdbg("Sending packet size %d\n", priv->dev.d_len); + ninfo("Sending packet size %d\n", priv->dev.d_len); NETDEV_TXPACKETS(&priv->dev); /* Send an initial END character to flush out any data that may have @@ -378,7 +378,7 @@ static int slip_transmit(FAR struct slip_driver_s *priv) * Function: slip_txpoll * * Description: - * Check if uIP has any outgoing packets ready to send. This is a + * Check if the network has any outgoing packets ready to send. This is a * callback from devif_poll(). devif_poll() may be called: * * 1. When the preceding TX packet send is complete, or @@ -438,7 +438,7 @@ static void slip_txtask(int argc, FAR char *argv[]) systime_t msec_now; unsigned int hsec; - ndbg("index: %d\n", index); + nerr("index: %d\n", index); DEBUGASSERT(index < CONFIG_NET_SLIP_NINTERFACES); /* Get our private data structure instance and wake up the waiting @@ -471,7 +471,7 @@ static void slip_txtask(int argc, FAR char *argv[]) if (priv->bifup) { - /* Get exclusive access to uIP (if it it is already being used + /* Get exclusive access to the network (if it it is already being used * slip_rxtask, then we have to wait). */ @@ -555,7 +555,7 @@ static inline void slip_receive(FAR struct slip_driver_s *priv) * packet if we run out of room. */ - nvdbg("Receiving packet\n"); + ninfo("Receiving packet\n"); for (; ; ) { /* Get the next character in the stream. */ @@ -572,7 +572,7 @@ static inline void slip_receive(FAR struct slip_driver_s *priv) case SLIP_END: { - nvdbg("END\n"); + ninfo("END\n"); /* A minor optimization: if there is no data in the packet, * ignore it. This is meant to avoid bothering IP with all the @@ -582,7 +582,7 @@ static inline void slip_receive(FAR struct slip_driver_s *priv) if (priv->rxlen > 0) { - nvdbg("Received packet size %d\n", priv->rxlen); + ninfo("Received packet size %d\n", priv->rxlen); return; } } @@ -595,7 +595,7 @@ static inline void slip_receive(FAR struct slip_driver_s *priv) case SLIP_ESC: { - nvdbg("ESC\n"); + ninfo("ESC\n"); ch = slip_getc(priv); /* if "ch" is not one of these two, then we have a protocol @@ -606,17 +606,17 @@ static inline void slip_receive(FAR struct slip_driver_s *priv) switch (ch) { case SLIP_ESC_END: - nvdbg("ESC-END\n"); + ninfo("ESC-END\n"); ch = SLIP_END; break; case SLIP_ESC_ESC: - nvdbg("ESC-ESC\n"); + ninfo("ESC-ESC\n"); ch = SLIP_ESC; break; default: - ndbg("ERROR: Protocol violation: %02x\n", ch); + nerr("ERROR: Protocol violation: %02x\n", ch); break; } @@ -661,7 +661,7 @@ static int slip_rxtask(int argc, FAR char *argv[]) net_lock_t flags; int ch; - ndbg("index: %d\n", index); + nerr("index: %d\n", index); DEBUGASSERT(index < CONFIG_NET_SLIP_NINTERFACES); /* Get our private data structure instance and wake up the waiting @@ -677,7 +677,7 @@ static int slip_rxtask(int argc, FAR char *argv[]) { /* Wait for the next character to be available on the input stream. */ - nvdbg("Waiting...\n"); + ninfo("Waiting...\n"); ch = slip_getc(priv); /* Ignore any input that we receive before the interface is up. */ @@ -725,7 +725,7 @@ static int slip_rxtask(int argc, FAR char *argv[]) { NETDEV_RXIPV4(&priv->dev); - /* Handle the IP input. Get exclusive access to uIP. */ + /* Handle the IP input. Get exclusive access to the network. */ slip_semtake(priv); priv->dev.d_buf = priv->rxbuf; @@ -779,7 +779,7 @@ static int slip_ifup(FAR struct net_driver_s *dev) { FAR struct slip_driver_s *priv = (FAR struct slip_driver_s *)dev->d_private; - ndbg("Bringing up: %d.%d.%d.%d\n", + nerr("Bringing up: %d.%d.%d.%d\n", dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); @@ -958,7 +958,7 @@ int slip_initialize(int intf, FAR const char *devname) priv->fd = open(devname, O_RDWR, 0666); if (priv->fd < 0) { - ndbg("ERROR: Failed to open %s: %d\n", devname, errno); + nerr("ERROR: Failed to open %s: %d\n", devname, errno); return -errno; } @@ -983,7 +983,7 @@ int slip_initialize(int intf, FAR const char *devname) (FAR char * const *)argv); if (priv->rxpid < 0) { - ndbg("ERROR: Failed to start receiver task\n"); + nerr("ERROR: Failed to start receiver task\n"); return -errno; } @@ -998,7 +998,7 @@ int slip_initialize(int intf, FAR const char *devname) (FAR char * const *)argv); if (priv->txpid < 0) { - ndbg("ERROR: Failed to start receiver task\n"); + nerr("ERROR: Failed to start receiver task\n"); return -errno; } diff --git a/drivers/net/telnet.c b/drivers/net/telnet.c index 505a01cb942ea75c81f52835017cb9e756f3b5a9..374af780cabbc7eacb636a642e8c392e09bde9f1 100644 --- a/drivers/net/telnet.c +++ b/drivers/net/telnet.c @@ -230,11 +230,11 @@ static inline void telnet_dumpbuffer(FAR const char *msg, FAR const char *buffer, unsigned int nbytes) { - /* CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, and CONFIG_DEBUG_NET have to be + /* CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_NET have to be * defined or the following does nothing. */ - nvdbgdumpbuffer(msg, (FAR const uint8_t*)buffer, nbytes); + ninfodumpbuffer(msg, (FAR const uint8_t*)buffer, nbytes); } #endif @@ -277,12 +277,12 @@ static ssize_t telnet_receive(FAR struct telnet_dev_s *priv, FAR const char *src int nread; uint8_t ch; - nllvdbg("srclen: %d destlen: %d\n", srclen, destlen); + ninfo("srclen: %d destlen: %d\n", srclen, destlen); for (nread = 0; srclen > 0 && nread < destlen; srclen--) { ch = *src++; - nllvdbg("ch=%02x state=%d\n", ch, priv->td_state); + ninfo("ch=%02x state=%d\n", ch, priv->td_state); switch (priv->td_state) { @@ -447,7 +447,7 @@ static void telnet_sendopt(FAR struct telnet_dev_s *priv, uint8_t option, telnet_dumpbuffer("Send optbuf", optbuf, 4); if (psock_send(&priv->td_psock, optbuf, 4, 0) < 0) { - nlldbg("Failed to send TELNET_IAC\n"); + nerr("ERROR: Failed to send TELNET_IAC\n"); } } @@ -462,7 +462,7 @@ static int telnet_open(FAR struct file *filep) int tmp; int ret; - nllvdbg("td_crefs: %d\n", priv->td_crefs); + ninfo("td_crefs: %d\n", priv->td_crefs); /* O_NONBLOCK is not supported */ @@ -518,7 +518,7 @@ static int telnet_close(FAR struct file *filep) FAR char *devpath; int ret; - nllvdbg("td_crefs: %d\n", priv->td_crefs); + ninfo("td_crefs: %d\n", priv->td_crefs); /* Get exclusive access to the device structures */ @@ -548,7 +548,7 @@ static int telnet_close(FAR struct file *filep) ret = asprintf(&devpath, TELNETD_DEVFMT, priv->td_minor); if (ret < 0) { - nlldbg("ERROR: Failed to allocate the driver path\n"); + nerr("ERROR: Failed to allocate the driver path\n"); } else { @@ -566,8 +566,8 @@ static int telnet_close(FAR struct file *filep) if (ret != -EBUSY) { - nlldbg("Failed to unregister the driver %s: %d\n", - devpath, ret); + nerr("ERROR: Failed to unregister the driver %s: %d\n", + devpath, ret); } } @@ -608,7 +608,7 @@ static ssize_t telnet_read(FAR struct file *filep, FAR char *buffer, size_t len) FAR struct telnet_dev_s *priv = inode->i_private; ssize_t ret; - nllvdbg("len: %d\n", len); + ninfo("len: %d\n", len); /* First, handle the case where there are still valid bytes left in the * I/O buffer from the last time that read was called. NOTE: Much of @@ -681,7 +681,7 @@ static ssize_t telnet_write(FAR struct file *filep, FAR const char *buffer, size char ch; bool eol; - nllvdbg("len: %d\n", len); + ninfo("len: %d\n", len); /* Process each character from the user buffer */ @@ -706,7 +706,7 @@ static ssize_t telnet_write(FAR struct file *filep, FAR const char *buffer, size ret = psock_send(&priv->td_psock, priv->td_txbuffer, ncopied, 0); if (ret < 0) { - nlldbg("psock_send failed '%s': %d\n", priv->td_txbuffer, ret); + nerr("ERROR: psock_send failed '%s': %d\n", priv->td_txbuffer, ret); return ret; } @@ -723,7 +723,7 @@ static ssize_t telnet_write(FAR struct file *filep, FAR const char *buffer, size ret = psock_send(&priv->td_psock, priv->td_txbuffer, ncopied, 0); if (ret < 0) { - nlldbg("psock_send failed '%s': %d\n", priv->td_txbuffer, ret); + nerr("ERROR: psock_send failed '%s': %d\n", priv->td_txbuffer, ret); return ret; } } @@ -767,7 +767,7 @@ static int telnet_session(FAR struct telnet_session_s *session) priv = (FAR struct telnet_dev_s*)malloc(sizeof(struct telnet_dev_s)); if (!priv) { - nlldbg("Failed to allocate the driver data structure\n"); + nerr("ERROR: Failed to allocate the driver data structure\n"); return -ENOMEM; } @@ -788,7 +788,7 @@ static int telnet_session(FAR struct telnet_session_s *session) psock = sockfd_socket(session->ts_sd); if (!psock) { - nlldbg("Failed to convert sd=%d to a socket structure\n", session->ts_sd); + nerr("ERROR: Failed to convert sd=%d to a socket structure\n", session->ts_sd); ret = -EINVAL; goto errout_with_dev; } @@ -796,7 +796,7 @@ static int telnet_session(FAR struct telnet_session_s *session) ret = net_clone(psock, &priv->td_psock); if (ret < 0) { - nlldbg("net_clone failed: %d\n", ret); + nerr("ERROR: net_clone failed: %d\n", ret); goto errout_with_dev; } @@ -834,7 +834,7 @@ static int telnet_session(FAR struct telnet_session_s *session) if (ret >= 0) { - nlldbg("ERROR: Too many sessions\n"); + nerr("ERROR: Too many sessions\n"); ret = -ENFILE; goto errout_with_semaphore; } @@ -844,8 +844,8 @@ static int telnet_session(FAR struct telnet_session_s *session) ret = register_driver(session->ts_devpath, &g_telnet_fops, 0666, priv); if (ret < 0) { - nlldbg("ERROR: Failed to register the driver %s: %d\n", - session->ts_devpath, ret); + nerr("ERROR: Failed to register the driver %s: %d\n", + session->ts_devpath, ret); goto errout_with_semaphore; } diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 1221b56ad890cd80f6b11229726ee59d649462d9..37c199d167b8aac19b93efa2e7109c3863fe7e27 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -129,9 +129,9 @@ struct tun_device_s sem_t waitsem; sem_t read_wait_sem; - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ - struct net_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by the network */ }; struct tun_driver_s @@ -345,7 +345,7 @@ static int tun_transmit(FAR struct tun_device_s *priv) * Function: tun_txpoll * * Description: - * The transmitter is available, check if uIP has any outgoing packets + * The transmitter is available, check if the network has any outgoing packets * ready to send. This is a callback from devif_poll(). devif_poll() may * be called: * @@ -425,7 +425,7 @@ static void tun_receive(FAR struct tun_device_s *priv) /* We only accept IP packets of the configured type and ARP packets */ #if defined(CONFIG_NET_IPv4) - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); NETDEV_RXIPV4(&priv->dev); /* Give the IPv4 packet to the network layer */ @@ -448,7 +448,7 @@ static void tun_receive(FAR struct tun_device_s *priv) } #elif defined(CONFIG_NET_IPv6) - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); NETDEV_RXIPV6(&priv->dev); /* Give the IPv6 packet to the network layer */ @@ -498,7 +498,7 @@ static void tun_txdone(FAR struct tun_device_s *priv) NETDEV_TXDONE(&priv->dev); - /* Then poll uIP for new XMIT data */ + /* Then poll the network for new XMIT data */ priv->dev.d_buf = priv->read_buf; (void)devif_poll(&priv->dev, tun_txpoll); @@ -529,7 +529,7 @@ static void tun_poll_process(FAR struct tun_device_s *priv) if (priv->read_d_len == 0) { - /* If so, poll uIP for new XMIT data. */ + /* If so, poll the network for new XMIT data. */ priv->dev.d_buf = priv->read_buf; (void)devif_timer(&priv->dev, tun_txpoll); @@ -646,15 +646,15 @@ static int tun_ifup(struct net_driver_s *dev) FAR struct tun_device_s *priv = (FAR struct tun_device_s *)dev->d_private; #ifdef CONFIG_NET_IPv4 - ndbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); #endif #ifdef CONFIG_NET_IPv6 - ndbg("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", - dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2], - dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5], - dev->d_ipv6addr[6], dev->d_ipv6addr[7]); + ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", + dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2], + dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5], + dev->d_ipv6addr[6], dev->d_ipv6addr[7]); #endif /* Initialize PHYs, the Ethernet interface, and setup up Ethernet interrupts */ @@ -746,7 +746,7 @@ static int tun_txavail(struct net_driver_s *dev) if (priv->bifup) { - /* Poll uIP for new XMIT data */ + /* Poll the network for new XMIT data */ priv->dev.d_buf = priv->read_buf; (void)devif_poll(&priv->dev, tun_txpoll); diff --git a/drivers/net/vnet.c b/drivers/net/vnet.c index eec509ec87dda166984abc63e1b00bdda3ec2f6c..8f6f14afb299f2da768b96a204f564a79ba14bfb 100644 --- a/drivers/net/vnet.c +++ b/drivers/net/vnet.c @@ -169,7 +169,7 @@ static int vnet_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); static int vnet_transmit(FAR struct vnet_driver_s *vnet) { - int err; + int errcode; /* Verify that the hardware is ready to send another packet. If we get * here, then we are committed to sending a packet; Higher level logic @@ -178,15 +178,15 @@ static int vnet_transmit(FAR struct vnet_driver_s *vnet) /* Send the packet: address=vnet->sk_dev.d_buf, length=vnet->sk_dev.d_len */ - err = vnet_xmit(vnet->vnet, (char *)vnet->sk_dev.d_buf, vnet->sk_dev.d_len); - if (err) + errcode = vnet_xmit(vnet->vnet, (char *)vnet->sk_dev.d_buf, vnet->sk_dev.d_len); + if (errcode) { /* When vnet_xmit fail, it means TX buffer is full. Watchdog * is of no use here because no TX done INT will happen. So * we reset the TX buffer directly. */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES cprintf("VNET: TX buffer is full\n"); #endif return ERROR; @@ -308,7 +308,7 @@ void rtos_vnet_recv(struct rgmp_vnet *rgmp_vnet, char *data, int len) if (len > CONFIG_NET_ETH_MTU || len < 14) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES cprintf("VNET: receive invalid packet of size %d\n", len); #endif return; @@ -332,7 +332,7 @@ void rtos_vnet_recv(struct rgmp_vnet *rgmp_vnet, char *data, int len) #ifdef CONFIG_NET_IPv4 if (BUF->type == HTONS(ETHTYPE_IP)) { - nllvdbg("IPv4 frame\n"); + ninfo("IPv4 frame\n"); /* Handle ARP on input then give the IPv4 packet to the network * layer @@ -372,7 +372,7 @@ void rtos_vnet_recv(struct rgmp_vnet *rgmp_vnet, char *data, int len) #ifdef CONFIG_NET_IPv6 if (BUF->type == HTONS(ETHTYPE_IP6)) { - nllvdbg("Iv6 frame\n"); + ninfo("Iv6 frame\n"); /* Give the IPv6 packet to the network layer */ @@ -506,7 +506,7 @@ static void vnet_polltimer(int argc, uint32_t arg, ...) if (vnet_is_txbuff_full(vnet->vnet)) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES cprintf("VNET: TX buffer is full\n"); #endif return; @@ -546,9 +546,9 @@ static int vnet_ifup(struct net_driver_s *dev) { FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private; - ndbg("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + ninfo("Bringing up: %d.%d.%d.%d\n", + dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, + (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); /* Initialize PHYs, the Ethernet interface, and setup up Ethernet interrupts */ @@ -640,7 +640,7 @@ static int vnet_txavail(struct net_driver_s *dev) if (vnet_is_txbuff_full(vnet->vnet)) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES cprintf("VNET: TX buffer is full\n"); #endif goto out; diff --git a/drivers/pipes/pipe.c b/drivers/pipes/pipe.c index b4c6acd72c4dbd0a649f0362f824d2e1d5f7784f..715639d21c14b5242a2f422391436f01098ff496 100644 --- a/drivers/pipes/pipe.c +++ b/drivers/pipes/pipe.c @@ -189,7 +189,7 @@ int pipe(int fd[2]) FAR struct pipe_dev_s *dev = NULL; char devname[16]; int pipeno; - int err; + int errcode; int ret; /* Get exclusive access to the pipe allocation data */ @@ -208,7 +208,7 @@ int pipe(int fd[2]) if (pipeno < 0) { (void)sem_post(&g_pipesem); - err = -pipeno; + errcode = -pipeno; goto errout; } @@ -226,7 +226,7 @@ int pipe(int fd[2]) if (!dev) { (void)sem_post(&g_pipesem); - err = ENOMEM; + errcode = ENOMEM; goto errout_with_pipe; } @@ -238,7 +238,7 @@ int pipe(int fd[2]) if (ret != 0) { (void)sem_post(&g_pipesem); - err = -ret; + errcode = -ret; goto errout_with_dev; } @@ -254,7 +254,7 @@ int pipe(int fd[2]) fd[1] = open(devname, O_WRONLY); if (fd[1] < 0) { - err = -fd[1]; + errcode = -fd[1]; goto errout_with_driver; } @@ -263,7 +263,7 @@ int pipe(int fd[2]) fd[0] = open(devname, O_RDONLY); if (fd[0] < 0) { - err = -fd[0]; + errcode = -fd[0]; goto errout_with_wrfd; } @@ -285,7 +285,7 @@ errout_with_pipe: pipe_free(pipeno); errout: - set_errno(err); + set_errno(errcode); return ERROR; } diff --git a/drivers/pipes/pipe_common.c b/drivers/pipes/pipe_common.c index 862d244527f3110e99e9947bf10b2d4645828254..759b7e474bce91ada797aca4cd07d29e35eead84 100644 --- a/drivers/pipes/pipe_common.c +++ b/drivers/pipes/pipe_common.c @@ -56,7 +56,7 @@ #include #include #include -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES # include #endif @@ -135,7 +135,7 @@ static void pipecommon_pollnotify(FAR struct pipe_dev_s *dev, if (fds->revents != 0) { - fvdbg("Report events: %02x\n", fds->revents); + finfo("Report events: %02x\n", fds->revents); sem_post(fds->sem); } } @@ -205,7 +205,7 @@ int pipecommon_open(FAR struct file *filep) ret = sem_wait(&dev->d_bfsem); if (ret != OK) { - fdbg("sem_wait failed: %d\n", get_errno()); + ferr("ERROR: sem_wait failed: %d\n", get_errno()); DEBUGASSERT(get_errno() > 0); return -get_errno(); } @@ -283,7 +283,7 @@ int pipecommon_open(FAR struct file *filep) * a signal. */ - fdbg("sem_wait failed: %d\n", get_errno()); + ferr("ERROR: sem_wait failed: %d\n", get_errno()); DEBUGASSERT(get_errno() > 0); ret = -get_errno(); @@ -519,9 +519,9 @@ ssize_t pipecommon_write(FAR struct file *filep, FAR const char *buffer, /* At present, this method cannot be called from interrupt handlers. That is * because it calls sem_wait (via pipecommon_semtake below) and sem_wait cannot * be called from interrupt level. This actually happens fairly commonly - * IF dbg() is called from interrupt handlers and stdout is being redirected + * IF [a-z]err() is called from interrupt handlers and stdout is being redirected * via a pipe. In that case, the debug output will try to go out the pipe - * (interrupt handlers should use the lldbg() APIs). + * (interrupt handlers should use the _err() APIs). * * On the other hand, it would be very valuable to be able to feed the pipe * from an interrupt handler! TODO: Consider disabling interrupts instead @@ -722,7 +722,7 @@ int pipecommon_poll(FAR struct file *filep, FAR struct pollfd *fds, FAR struct pollfd **slot = (FAR struct pollfd **)fds->priv; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!slot) { ret = -EIO; @@ -752,7 +752,7 @@ int pipecommon_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR struct pipe_dev_s *dev = inode->i_private; int ret = -EINVAL; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Some sanity checking */ if (dev == NULL) @@ -795,7 +795,7 @@ int pipecommon_ioctl(FAR struct file *filep, int cmd, unsigned long arg) count = dev->d_wrndx - dev->d_rdndx; } - *(FAR int *)arg = count; + *(FAR int *)((uintptr_t)arg) = count; ret = 0; } break; @@ -815,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; } - *(FAR int *)arg = count; + *(FAR int *)((uintptr_t)arg) = count; ret = 0; } break; diff --git a/drivers/power/battery_charger.c b/drivers/power/battery_charger.c index 056e16e98c844046426c75fdb67ba7e065823b39..0a573375dc573a96dcc89f9d5985a258b6c29843 100644 --- a/drivers/power/battery_charger.c +++ b/drivers/power/battery_charger.c @@ -228,7 +228,7 @@ static int bat_charger_ioctl(FAR struct file *filep, int cmd, break; default: - dbg("Unrecognized cmd: %d\n", cmd); + _err("ERROR: Unrecognized cmd: %d\n", cmd); ret = -ENOTTY; break; } @@ -268,7 +268,7 @@ int battery_charger_register(FAR const char *devpath, ret = register_driver(devpath, &g_batteryops, 0555, dev); if (ret < 0) { - dbg("Failed to register driver: %d\n", ret); + _err("ERROR: Failed to register driver: %d\n", ret); } return ret; diff --git a/drivers/power/battery_gauge.c b/drivers/power/battery_gauge.c index cf6a962e2b6bfc02d83b4c38b371d193f41c558a..f0b2f9f66c2667750b78c2f99c4854bcfa18e3c6 100644 --- a/drivers/power/battery_gauge.c +++ b/drivers/power/battery_gauge.c @@ -213,7 +213,7 @@ static int bat_gauge_ioctl(FAR struct file *filep, int cmd, unsigned long arg) break; default: - dbg("Unrecognized cmd: %d\n", cmd); + _err("ERROR: Unrecognized cmd: %d\n", cmd); ret = -ENOTTY; break; } @@ -253,7 +253,7 @@ int battery_gauge_register(FAR const char *devpath, ret = register_driver(devpath, &g_batteryops, 0555, dev); if (ret < 0) { - dbg("Failed to register driver: %d\n", ret); + _err("ERROR: Failed to register driver: %d\n", ret); } return ret; diff --git a/drivers/power/bq2425x.c b/drivers/power/bq2425x.c index 073c3ce379f6774378abb2e98188bc5ae2bde34f..661187cdee6defc41d653a2dc70001c908e4a7c6 100644 --- a/drivers/power/bq2425x.c +++ b/drivers/power/bq2425x.c @@ -78,12 +78,15 @@ /* Debug ********************************************************************/ #ifdef CONFIG_DEBUG_BQ2425X -# define batdbg dbg +# define baterr _err +# define batreg _err #else # ifdef CONFIG_CPP_HAVE_VARARGS -# define batdbg(x...) +# define baterr(x...) +# define batreg(x...) # else -# define batdbg (void) +# define baterr (void) +# define batreg (void) # endif #endif @@ -176,7 +179,7 @@ static int bq2425x_getreg8(FAR struct bq2425x_dev_s *priv, uint8_t regaddr, ret = i2c_write(priv->i2c, &config, ®addr, 1); if (ret < 0) { - batdbg("i2c_write failed: %d\n", ret); + baterr("ERROR: i2c_write failed: %d\n", ret); return ret; } @@ -185,7 +188,7 @@ static int bq2425x_getreg8(FAR struct bq2425x_dev_s *priv, uint8_t regaddr, ret = i2c_read(priv->i2c, &config, &val, 1); if (ret < 0) { - batdbg("i2c_read failed: %d\n", ret); + baterr("ERROR: i2c_read failed: %d\n", ret); return ret; } @@ -217,7 +220,7 @@ static int bq2425x_putreg8(FAR struct bq2425x_dev_s *priv, uint8_t regaddr, config.address = priv->addr; config.addrlen = 7; - batdbg("addr: %02x regval: %08x\n", regaddr, regval); + batreg("addr: %02x regval: %08x\n", regaddr, regval); /* Set up a 3 byte message to send */ @@ -270,7 +273,7 @@ static inline int bq2425x_reset(FAR struct bq2425x_dev_s *priv) ret = bq2425x_getreg8(priv, BQ2425X_REG_2, ®val); if (ret < 0) { - batdbg("Error reading from BQ2425X! Error = %d\n", ret); + baterr("ERROR: Error reading from BQ2425X! Error = %d\n", ret); return ret; } @@ -280,7 +283,7 @@ static inline int bq2425x_reset(FAR struct bq2425x_dev_s *priv) ret = bq2425x_putreg8(priv, BQ2425X_REG_2, regval); if (ret < 0) { - batdbg("Error writing to BQ2425X! Error = %d\n", ret); + baterr("ERROR: Error writing to BQ2425X! Error = %d\n", ret); return ret; } @@ -294,7 +297,7 @@ static inline int bq2425x_reset(FAR struct bq2425x_dev_s *priv) ret = bq2425x_putreg8(priv, BQ2425X_REG_2, regval); if (ret < 0) { - batdbg("Error writing to BQ2425X! Error = %d\n", ret); + baterr("ERROR: Error writing to BQ2425X! Error = %d\n", ret); return ret; } @@ -317,7 +320,7 @@ static inline int bq2425x_watchdog(FAR struct bq2425x_dev_s *priv, bool enable) ret = bq2425x_getreg8(priv, BQ2425X_REG_1, ®val); if (ret < 0) { - batdbg("Error reading from BQ2425X! Error = %d\n", ret); + baterr("ERROR: Error reading from BQ2425X! Error = %d\n", ret); return ret; } @@ -333,7 +336,7 @@ static inline int bq2425x_watchdog(FAR struct bq2425x_dev_s *priv, bool enable) ret = bq2425x_putreg8(priv, BQ2425X_REG_1, regval); if (ret < 0) { - batdbg("Error writing to BQ2425X! Error = %d\n", ret); + baterr("ERROR: Error writing to BQ2425X! Error = %d\n", ret); return ret; } @@ -515,7 +518,7 @@ static inline int bq2425x_powersupply(FAR struct bq2425x_dev_s *priv, int curren break; default: - batdbg("Current not supported, setting default to 100mA.!\n"); + baterr("ERROR: Current not supported, setting default to 100mA.!\n"); idx = BQ2425X_INP_CURR_LIM_100MA; break; } @@ -525,7 +528,7 @@ static inline int bq2425x_powersupply(FAR struct bq2425x_dev_s *priv, int curren ret = bq2425x_getreg8(priv, BQ2425X_REG_2, ®val); if (ret < 0) { - batdbg("Error reading from BQ2425X! Error = %d\n", ret); + baterr("ERROR: Error reading from BQ2425X! Error = %d\n", ret); return ret; } @@ -541,7 +544,7 @@ static inline int bq2425x_powersupply(FAR struct bq2425x_dev_s *priv, int curren ret = bq2425x_putreg8(priv, BQ2425X_REG_2, regval); if (ret < 0) { - batdbg("Error writing to BQ2425X! Error = %d\n", ret); + baterr("ERROR: Error writing to BQ2425X! Error = %d\n", ret); return ret; } @@ -565,14 +568,14 @@ static inline int bq2425x_setvolt(FAR struct bq2425x_dev_s *priv, int volts) if (volts < BQ2425X_VOLT_MIN || volts > BQ2425X_VOLT_MAX) { - batdbg("Voltage %d mV is out of range.\n", volts); + baterr("ERROR: Voltage %d mV is out of range.\n", volts); return -EINVAL; } ret = bq2425x_getreg8(priv, BQ2425X_REG_3, ®val); if (ret < 0) { - batdbg("Error reading from BQ2425X! Error = %d\n", ret); + baterr("ERROR: Error reading from BQ2425X! Error = %d\n", ret); return ret; } @@ -589,7 +592,7 @@ static inline int bq2425x_setvolt(FAR struct bq2425x_dev_s *priv, int volts) ret = bq2425x_putreg8(priv, BQ2425X_REG_3, regval); if (ret < 0) { - batdbg("Error writing to BQ2425X! Error = %d\n", ret); + baterr("ERROR: Error writing to BQ2425X! Error = %d\n", ret); return ret; } @@ -613,14 +616,14 @@ static inline int bq2425x_setcurr(FAR struct bq2425x_dev_s *priv, int current) if (current < BQ2425X_CURR_MIN || current > BQ2425X_CURR_MAX) { - batdbg("Current %d mA is out of range.\n", volts); + baterr("ERROR: Current %d mA is out of range.\n", volts); return -EINVAL; } ret = bq2425x_getreg8(priv, BQ2425X_REG_4, ®val); if (ret < 0) { - batdbg("Error reading from BQ2425X! Error = %d\n", ret); + baterr("ERROR: Error reading from BQ2425X! Error = %d\n", ret); return ret; } @@ -637,7 +640,7 @@ static inline int bq2425x_setcurr(FAR struct bq2425x_dev_s *priv, int current) ret = bq2425x_putreg8(priv, BQ2425X_REG_4, regval); if (ret < 0) { - batdbg("Error writing to BQ2425X! Error = %d\n", ret); + baterr("ERROR: Error writing to BQ2425X! Error = %d\n", ret); return ret; } @@ -663,7 +666,7 @@ static int bq2425x_voltage(struct battery_charger_dev_s *dev, int value) ret = bq2425x_setvolt(priv, value); if (ret < 0) { - batdbg("Error setting voltage to BQ2425X! Error = %d\n", ret); + baterr("ERROR: Error setting voltage to BQ2425X! Error = %d\n", ret); return ret; } @@ -688,7 +691,7 @@ static int bq2425x_current(struct battery_charger_dev_s *dev, int value) ret = bq2425x_setcurr(priv, value); if (ret < 0) { - batdbg("Error setting current to BQ2425X! Error = %d\n", ret); + baterr("ERROR: Error setting current to BQ2425X! Error = %d\n", ret); return ret; } @@ -749,7 +752,7 @@ FAR struct battery_charger_dev_s * ret = bq2425x_reset(priv); if (ret < 0) { - batdbg("Failed to reset the BQ2425x: %d\n", ret); + baterr("ERROR: Failed to reset the BQ2425x: %d\n", ret); kmm_free(priv); return NULL; } @@ -759,7 +762,7 @@ FAR struct battery_charger_dev_s * ret = bq2425x_watchdog(priv, false); if (ret < 0) { - batdbg("Failed to disable BQ2425x watchdog: %d\n", ret); + baterr("ERROR: Failed to disable BQ2425x watchdog: %d\n", ret); kmm_free(priv); return NULL; } @@ -769,7 +772,7 @@ FAR struct battery_charger_dev_s * ret = bq2425x_powersupply(priv, 2000); if (ret < 0) { - batdbg("Failed to set BQ2425x power supply current: %d\n", ret); + baterr("ERROR: Failed to set BQ2425x power supply current: %d\n", ret); kmm_free(priv); return NULL; } diff --git a/drivers/power/max1704x.c b/drivers/power/max1704x.c index 7fa3f850604e7e84cddd8d73d84d0c84e7d57a08..00f98fc189434f2c932134f981c27c39f26fe101 100644 --- a/drivers/power/max1704x.c +++ b/drivers/power/max1704x.c @@ -160,12 +160,12 @@ /* Debug ********************************************************************/ #ifdef CONFIG_DEBUG_MAX1704X -# define batdbg dbg +# define baterr _err #else # ifdef CONFIG_CPP_HAVE_VARARGS -# define batdbg(x...) +# define baterr(x...) # else -# define batdbg (void) +# define baterr (void) # endif #endif @@ -258,7 +258,7 @@ static int max1704x_getreg16(FAR struct max1704x_dev_s *priv, uint8_t regaddr, ret = i2c_write(priv->i2c, &config, ®addr, 1); if (ret < 0) { - batdbg("i2c_write failed: %d\n", ret); + baterr("i2c_write failed: %d\n", ret); return ret; } @@ -267,7 +267,7 @@ static int max1704x_getreg16(FAR struct max1704x_dev_s *priv, uint8_t regaddr, ret = i2c_read(priv->i2c, &config, buffer, 2); if (ret < 0) { - batdbg("i2c_read failed: %d\n", ret); + baterr("i2c_read failed: %d\n", ret); return ret; } @@ -292,7 +292,7 @@ static int max1704x_putreg16(FAR struct max1704x_dev_s *priv, uint8_t regaddr, struct i2c_config_s config; uint8_t buffer[3]; - batdbg("addr: %02x regval: %08x\n", regaddr, regval); + baterr("addr: %02x regval: %08x\n", regaddr, regval); /* Set up a 3 byte message to send */ @@ -554,7 +554,7 @@ FAR struct battery_gauge_dev_s *max1704x_initialize(FAR struct i2c_master_s *i2c ret = max1704x_reset(priv); if (ret < 0) { - batdbg("Failed to reset the MAX1704x: %d\n", ret); + baterr("Failed to reset the MAX1704x: %d\n", ret); kmm_free(priv); return NULL; } diff --git a/drivers/pwm.c b/drivers/pwm.c index b07e44ae2cf4c56a1256e555927dacde68f036ab..7fb6b3436f5ec151c779de94a5ff597a1ddd8e24 100644 --- a/drivers/pwm.c +++ b/drivers/pwm.c @@ -64,24 +64,6 @@ #ifdef CONFIG_PWM -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing PWM */ - -#ifdef CONFIG_DEBUG_PWM -# define pwmdbg dbg -# define pwmvdbg vdbg -# define pwmlldbg lldbg -# define pwmllvdbg llvdbg -#else -# define pwmdbg(x...) -# define pwmvdbg(x...) -# define pwmlldbg(x...) -# define pwmllvdbg(x...) -#endif - /**************************************************************************** * Private Type Definitions ****************************************************************************/ @@ -152,23 +134,23 @@ static void pwm_dump(FAR const char *msg, FAR const struct pwm_info_s *info, int i; #endif - pwmvdbg("%s: frequency: %d", msg, info->frequency); + pwminfo("%s: frequency: %d", msg, info->frequency); #ifdef CONFIG_PWM_MULTICHAN for (i = 0; i < CONFIG_PWM_NCHANNELS; i++) { - pwmvdbg(" channel: %d duty: %08x", + pwminfo(" channel: %d duty: %08x", info->channels[i].channel, info->channels[i].duty); } #else - pwmvdbg(" duty: %08x", info->duty); + pwminfo(" duty: %08x", info->duty); #endif #ifdef CONFIG_PWM_PULSECOUNT - pwmvdbg(" count: %d\n", info->count); + pwminfo(" count: %d\n", info->count); #endif - pwmvdbg(" started: %d\n", started); + pwminfo(" started: %d\n", started); } /**************************************************************************** @@ -186,7 +168,7 @@ static int pwm_open(FAR struct file *filep) uint8_t tmp; int ret; - pwmvdbg("crefs: %d\n", upper->crefs); + pwminfo("crefs: %d\n", upper->crefs); /* Get exclusive access to the device structures */ @@ -220,7 +202,7 @@ static int pwm_open(FAR struct file *filep) /* Yes.. perform one time hardware initialization. */ DEBUGASSERT(lower->ops->setup != NULL); - pwmvdbg("calling setup\n"); + pwminfo("calling setup\n"); ret = lower->ops->setup(lower); if (ret < 0) @@ -255,7 +237,7 @@ static int pwm_close(FAR struct file *filep) FAR struct pwm_upperhalf_s *upper = inode->i_private; int ret; - pwmvdbg("crefs: %d\n", upper->crefs); + pwminfo("crefs: %d\n", upper->crefs); /* Get exclusive access to the device structures */ @@ -285,7 +267,7 @@ static int pwm_close(FAR struct file *filep) /* Disable the PWM device */ DEBUGASSERT(lower->ops->shutdown != NULL); - pwmvdbg("calling shutdown: %d\n"); + pwminfo("calling shutdown: %d\n"); lower->ops->shutdown(lower); } @@ -393,7 +375,7 @@ static int pwm_start(FAR struct pwm_upperhalf_s *upper, unsigned int oflags) { /* Looks like we won't be waiting after all */ - pwmvdbg("start failed: %d\n", ret); + pwminfo("start failed: %d\n", ret); upper->started = false; upper->waiting = false; } @@ -450,7 +432,7 @@ static int pwm_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR struct pwm_lowerhalf_s *lower = upper->dev; int ret; - pwmvdbg("cmd: %d arg: %ld\n", cmd, arg); + pwminfo("cmd: %d arg: %ld\n", cmd, arg); /* Get exclusive access to the device structures */ @@ -540,7 +522,7 @@ static int pwm_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case PWMIOC_STOP: { - pwmvdbg("PWMIOC_STOP: started: %d\n", upper->started); + pwminfo("PWMIOC_STOP: started: %d\n", upper->started); DEBUGASSERT(lower->ops->stop != NULL); if (upper->started) @@ -561,7 +543,7 @@ static int pwm_ioctl(FAR struct file *filep, int cmd, unsigned long arg) default: { - pwmvdbg("Forwarding unrecognized cmd: %d arg: %ld\n", cmd, arg); + pwminfo("Forwarding unrecognized cmd: %d arg: %ld\n", cmd, arg); DEBUGASSERT(lower->ops->ioctl != NULL); ret = lower->ops->ioctl(lower, cmd, arg); } @@ -610,7 +592,7 @@ int pwm_register(FAR const char *path, FAR struct pwm_lowerhalf_s *dev) upper = (FAR struct pwm_upperhalf_s *)kmm_zalloc(sizeof(struct pwm_upperhalf_s)); if (!upper) { - pwmdbg("Allocation failed\n"); + pwmerr("Allocation failed\n"); return -ENOMEM; } @@ -624,7 +606,7 @@ int pwm_register(FAR const char *path, FAR struct pwm_lowerhalf_s *dev) /* Register the PWM device */ - pwmvdbg("Registering %s\n", path); + pwminfo("Registering %s\n", path); return register_driver(path, &g_pwmops, 0666, upper); } @@ -670,7 +652,7 @@ void pwm_expired(FAR void *handle) { FAR struct pwm_upperhalf_s *upper = (FAR struct pwm_upperhalf_s *)handle; - pwmllvdbg("started: %d waiting: %d\n", upper->started, upper->waiting); + pwminfo("started: %d waiting: %d\n", upper->started, upper->waiting); /* Make sure that the PWM is started */ diff --git a/drivers/ramdisk.c b/drivers/ramdisk.c index 09382dadd679f0cbba163587a61595c02bce548f..4ce4057103b39130657f8a02d26b25b37a32b76e 100644 --- a/drivers/ramdisk.c +++ b/drivers/ramdisk.c @@ -158,7 +158,7 @@ static const struct block_operations g_bops = #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS static void rd_destroy(FAR struct rd_struct_s *dev) { - fvdbg("Destroying RAM disk\n"); + finfo("Destroying RAM disk\n"); /* We we configured to free the RAM disk memory when unlinked? */ @@ -197,7 +197,7 @@ static int rd_open(FAR struct inode *inode) dev->rd_crefs++; DEBUGASSERT(dev->rd_crefs > 0); - fvdbg("rd_crefs: %d\n", dev->rd_crefs); + finfo("rd_crefs: %d\n", dev->rd_crefs); return OK; } #endif @@ -221,7 +221,7 @@ static int rd_close(FAR struct inode *inode) DEBUGASSERT(dev->rd_crefs > 0); dev->rd_crefs--; - fvdbg("rd_crefs: %d\n", dev->rd_crefs); + finfo("rd_crefs: %d\n", dev->rd_crefs); #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS /* Was that the last open reference to the RAM disk? */ @@ -258,13 +258,13 @@ static ssize_t rd_read(FAR struct inode *inode, unsigned char *buffer, DEBUGASSERT(inode && inode->i_private); dev = (FAR struct rd_struct_s *)inode->i_private; - fvdbg("sector: %d nsectors: %d sectorsize: %d\n", + finfo("sector: %d nsectors: %d sectorsize: %d\n", start_sector, dev->rd_sectsize, nsectors); if (start_sector < dev->rd_nsectors && start_sector + nsectors <= dev->rd_nsectors) { - fvdbg("Transfer %d bytes from %p\n", + finfo("Transfer %d bytes from %p\n", nsectors * dev->rd_sectsize, &dev->rd_buffer[start_sector * dev->rd_sectsize]); @@ -293,7 +293,7 @@ static ssize_t rd_write(FAR struct inode *inode, const unsigned char *buffer, DEBUGASSERT(inode && inode->i_private); dev = (struct rd_struct_s *)inode->i_private; - fvdbg("sector: %d nsectors: %d sectorsize: %d\n", + finfo("sector: %d nsectors: %d sectorsize: %d\n", start_sector, dev->rd_sectsize, nsectors); if (!RDFLAG_IS_WRENABLED(dev->rd_flags)) @@ -303,7 +303,7 @@ static ssize_t rd_write(FAR struct inode *inode, const unsigned char *buffer, else if (start_sector < dev->rd_nsectors && start_sector + nsectors <= dev->rd_nsectors) { - fvdbg("Transfer %d bytes from %p\n", + finfo("Transfer %d bytes from %p\n", nsectors * dev->rd_sectsize, &dev->rd_buffer[start_sector * dev->rd_sectsize]); @@ -328,7 +328,7 @@ static int rd_geometry(FAR struct inode *inode, struct geometry *geometry) { struct rd_struct_s *dev; - fvdbg("Entry\n"); + finfo("Entry\n"); DEBUGASSERT(inode); if (geometry) @@ -344,9 +344,9 @@ static int rd_geometry(FAR struct inode *inode, struct geometry *geometry) geometry->geo_nsectors = dev->rd_nsectors; geometry->geo_sectorsize = dev->rd_sectsize; - fvdbg("available: true mediachanged: false writeenabled: %s\n", + finfo("available: true mediachanged: false writeenabled: %s\n", geometry->geo_writeenabled ? "true" : "false"); - fvdbg("nsectors: %d sectorsize: %d\n", + finfo("nsectors: %d sectorsize: %d\n", geometry->geo_nsectors, geometry->geo_sectorsize); return OK; @@ -368,7 +368,7 @@ static int rd_ioctl(FAR struct inode *inode, int cmd, unsigned long arg) FAR struct rd_struct_s *dev; FAR void **ppv = (void**)((uintptr_t)arg); - fvdbg("Entry\n"); + finfo("Entry\n"); /* Only one ioctl command is supported */ @@ -378,7 +378,7 @@ static int rd_ioctl(FAR struct inode *inode, int cmd, unsigned long arg) dev = (FAR struct rd_struct_s *)inode->i_private; *ppv = (FAR void *)dev->rd_buffer; - fvdbg("ppv: %p\n", *ppv); + finfo("ppv: %p\n", *ppv); return OK; } @@ -452,11 +452,11 @@ int romdisk_register(int minor, FAR const uint8_t *buffer, uint32_t nsectors, char devname[16]; int ret = -ENOMEM; - fvdbg("buffer: %p nsectors: %d sectsize: %d\n", buffer, nsectors, sectsize); + finfo("buffer: %p nsectors: %d sectsize: %d\n", buffer, nsectors, sectsize); /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (minor < 0 || minor > 255 || !buffer || !nsectors || !sectsize) { return -EINVAL; @@ -487,7 +487,7 @@ int romdisk_register(int minor, FAR const uint8_t *buffer, uint32_t nsectors, ret = register_blockdriver(devname, &g_bops, 0, dev); if (ret < 0) { - fdbg("register_blockdriver failed: %d\n", -ret); + ferr("register_blockdriver failed: %d\n", -ret); kmm_free(dev); } } diff --git a/drivers/rwbuffer.c b/drivers/rwbuffer.c index 764a6ebbc1aaf04b6e560b0f21e2ab524791866c..fd5b6e53eea4819d6e532b7eb837314862c054f3 100644 --- a/drivers/rwbuffer.c +++ b/drivers/rwbuffer.c @@ -161,11 +161,11 @@ static void rwb_wrflush(struct rwbuffer_s *rwb) { int ret; - fvdbg("Timeout!\n"); + finfo("Timeout!\n"); if (rwb->wrnblocks > 0) { - fvdbg("Flushing: blockstart=0x%08lx nblocks=%d from buffer=%p\n", + finfo("Flushing: blockstart=0x%08lx nblocks=%d from buffer=%p\n", (long)rwb->wrblockstart, rwb->wrnblocks, rwb->wrbuffer); /* Flush cache. On success, the flush method will return the number @@ -176,7 +176,7 @@ static void rwb_wrflush(struct rwbuffer_s *rwb) ret = rwb->wrflush(rwb->dev, rwb->wrbuffer, rwb->wrblockstart, rwb->wrnblocks); if (ret != rwb->wrnblocks) { - fdbg("ERROR: Error flushing write buffer: %d\n", ret); + ferr("ERROR: Error flushing write buffer: %d\n", ret); } rwb_resetwrbuffer(rwb); @@ -252,7 +252,7 @@ static ssize_t rwb_writebuffer(FAR struct rwbuffer_s *rwb, if (((startblock != rwb->wrexpectedblock) && (rwb->wrnblocks)) || ((rwb->wrnblocks + nblocks) > rwb->wrmaxblocks)) { - fvdbg("writebuffer miss, expected: %08x, given: %08x\n", + finfo("writebuffer miss, expected: %08x, given: %08x\n", rwb->wrexpectedblock, startblock); /* Flush the write buffer */ @@ -260,7 +260,7 @@ static ssize_t rwb_writebuffer(FAR struct rwbuffer_s *rwb, ret = rwb->wrflush(rwb->dev, rwb->wrbuffer, rwb->wrblockstart, rwb->wrnblocks); if (ret < 0) { - fdbg("ERROR: Error writing multiple from cache: %d\n", -ret); + ferr("ERROR: Error writing multiple from cache: %d\n", -ret); return ret; } @@ -271,13 +271,13 @@ static ssize_t rwb_writebuffer(FAR struct rwbuffer_s *rwb, if (rwb->wrnblocks == 0) { - fvdbg("Fresh cache starting at block: 0x%08x\n", startblock); + finfo("Fresh cache starting at block: 0x%08x\n", startblock); rwb->wrblockstart = startblock; } /* Add data to cache */ - fvdbg("writebuffer: copying %d bytes from %p to %p\n", + finfo("writebuffer: copying %d bytes from %p to %p\n", nblocks * rwb->blocksize, wrbuffer, &rwb->wrbuffer[rwb->wrnblocks * rwb->blocksize]); memcpy(&rwb->wrbuffer[rwb->wrnblocks * rwb->blocksize], @@ -413,7 +413,7 @@ int rwb_invalidate_writebuffer(FAR struct rwbuffer_s *rwb, off_t wrbend; off_t invend; - fvdbg("startblock=%d blockcount=%p\n", startblock, blockcount); + finfo("startblock=%d blockcount=%p\n", startblock, blockcount); rwb_semtake(&rwb->wrsem); @@ -461,7 +461,7 @@ int rwb_invalidate_writebuffer(FAR struct rwbuffer_s *rwb, ret = rwb->wrflush(rwb->dev, src, block, nblocks); if (ret < 0) { - fdbg("ERROR: wrflush failed: %d\n", ret); + ferr("ERROR: wrflush failed: %d\n", ret); } /* Keep the blocks at the beginning of the buffer up the @@ -549,7 +549,7 @@ int rwb_invalidate_readahead(FAR struct rwbuffer_s *rwb, off_t rhbend; off_t invend; - fvdbg("startblock=%d blockcount=%p\n", startblock, blockcount); + finfo("startblock=%d blockcount=%p\n", startblock, blockcount); rwb_semtake(&rwb->rhsem); @@ -651,7 +651,7 @@ int rwb_initialize(FAR struct rwbuffer_s *rwb) #ifdef CONFIG_DRVR_WRITEBUFFER if (rwb->wrmaxblocks > 0) { - fvdbg("Initialize the write buffer\n"); + finfo("Initialize the write buffer\n"); /* Initialize the write buffer access semaphore */ @@ -670,19 +670,19 @@ int rwb_initialize(FAR struct rwbuffer_s *rwb) rwb->wrbuffer = kmm_malloc(allocsize); if (!rwb->wrbuffer) { - fdbg("Write buffer kmm_malloc(%d) failed\n", allocsize); + ferr("Write buffer kmm_malloc(%d) failed\n", allocsize); return -ENOMEM; } } - fvdbg("Write buffer size: %d bytes\n", allocsize); + finfo("Write buffer size: %d bytes\n", allocsize); } #endif /* CONFIG_DRVR_WRITEBUFFER */ #ifdef CONFIG_DRVR_READAHEAD if (rwb->rhmaxblocks > 0) { - fvdbg("Initialize the read-ahead buffer\n"); + finfo("Initialize the read-ahead buffer\n"); /* Initialize the read-ahead buffer access semaphore */ @@ -701,12 +701,12 @@ int rwb_initialize(FAR struct rwbuffer_s *rwb) rwb->rhbuffer = kmm_malloc(allocsize); if (!rwb->rhbuffer) { - fdbg("Read-ahead buffer kmm_malloc(%d) failed\n", allocsize); + ferr("Read-ahead buffer kmm_malloc(%d) failed\n", allocsize); return -ENOMEM; } } - fvdbg("Read-ahead buffer size: %d bytes\n", allocsize); + finfo("Read-ahead buffer size: %d bytes\n", allocsize); } #endif /* CONFIG_DRVR_READAHEAD */ @@ -753,7 +753,7 @@ ssize_t rwb_read(FAR struct rwbuffer_s *rwb, off_t startblock, size_t remaining; int ret = OK; - fvdbg("startblock=%ld nblocks=%ld rdbuffer=%p\n", + finfo("startblock=%ld nblocks=%ld rdbuffer=%p\n", (long)startblock, (long)nblocks, rdbuffer); #ifdef CONFIG_DRVR_WRITEBUFFER @@ -821,7 +821,7 @@ ssize_t rwb_read(FAR struct rwbuffer_s *rwb, off_t startblock, ret = rwb_rhreload(rwb, startblock); if (ret < 0) { - fdbg("ERROR: Failed to fill the read-ahead buffer: %d\n", ret); + ferr("ERROR: Failed to fill the read-ahead buffer: %d\n", ret); return (ssize_t)ret; } } @@ -880,7 +880,7 @@ ssize_t rwb_write(FAR struct rwbuffer_s *rwb, off_t startblock, #ifdef CONFIG_DRVR_WRITEBUFFER if (rwb->wrmaxblocks > 0) { - fvdbg("startblock=%d wrbuffer=%p\n", startblock, wrbuffer); + finfo("startblock=%d wrbuffer=%p\n", startblock, wrbuffer); /* Use the block cache unless the buffer size is bigger than block cache */ @@ -999,7 +999,7 @@ int rwb_invalidate(FAR struct rwbuffer_s *rwb, ret = rwb_invalidate_writebuffer(rwb, startblock, blockcount); if (ret < 0) { - fdbg("ERROR: rwb_invalidate_writebuffer failed: %d\n", ret); + ferr("ERROR: rwb_invalidate_writebuffer failed: %d\n", ret); return ret; } #endif @@ -1008,7 +1008,7 @@ int rwb_invalidate(FAR struct rwbuffer_s *rwb, ret = rwb_invalidate_readahead(rwb, startblock, blockcount); if (ret < 0) { - fdbg("ERROR: rwb_invalidate_readahead failed: %d\n", ret); + ferr("ERROR: rwb_invalidate_readahead failed: %d\n", ret); return ret; } #endif diff --git a/drivers/sensors/Kconfig b/drivers/sensors/Kconfig index 78e4cd009abd5fb5df503e95184d5822ceed840f..c369db5fc543d51628028dfc503735586b46d576 100644 --- a/drivers/sensors/Kconfig +++ b/drivers/sensors/Kconfig @@ -136,7 +136,7 @@ config ADXL345_ACTIVELOW config ADXL345_REGDEBUG bool "Enable Register-Level ADXL345 Debug" default n - depends on DEBUG + depends on DEBUG_FEATURES ---help--- Enable very low register-level debug output. diff --git a/drivers/sensors/adxl345_base.c b/drivers/sensors/adxl345_base.c index 4cf667807d82d57a0a3d4b87b4b9f897a2327f3b..8a92d059eb6b7948fffa79d615a2894ce4cdd5ed 100644 --- a/drivers/sensors/adxl345_base.c +++ b/drivers/sensors/adxl345_base.c @@ -125,7 +125,7 @@ static ssize_t adxl345_read(FAR struct file *filep, FAR char *buffer, size_t len struct adxl345_sample_s sample; int ret; - snvdbg("len=%d\n", len); + sninfo("len=%d\n", len); DEBUGASSERT(filep); inode = filep->f_inode; @@ -196,7 +196,7 @@ int adxl345_register(ADXL345_HANDLE handle, int minor) char devname[DEV_NAMELEN]; int ret; - snvdbg("handle=%p minor=%d\n", handle, minor); + sninfo("handle=%p minor=%d\n", handle, minor); DEBUGASSERT(priv); /* Get exclusive access to the device structure */ @@ -205,7 +205,7 @@ int adxl345_register(ADXL345_HANDLE handle, int minor) if (ret < 0) { int errval = errno; - sndbg("ERROR: sem_wait failed: %d\n", errval); + snerr("ERROR: sem_wait failed: %d\n", errval); return -errval; } @@ -221,7 +221,7 @@ int adxl345_register(ADXL345_HANDLE handle, int minor) ret = register_driver(devname, &g_adxl345fops, 0666, priv); if (ret < 0) { - sndbg("ERROR: Failed to register driver %s: %d\n", devname, ret); + snerr("ERROR: Failed to register driver %s: %d\n", devname, ret); sem_post(&priv->exclsem); return ret; } @@ -305,7 +305,7 @@ static void adxl345_interrupt(FAR struct adxl345_config_s *config, FAR void *arg ret = work_queue(HPWORK, &priv->work, adxl345_worker, priv, 0); if (ret != 0) { - snlldbg("Failed to queue work: %d\n", ret); + snerr("ERROR: Failed to queue work: %d\n", ret); } } @@ -329,7 +329,7 @@ static int adxl345_checkid(FAR struct adxl345_dev_s *priv) /* Read device ID */ devid = adxl345_getreg8(priv, ADXL345_DEVID); - snvdbg("devid: %04x\n", devid); + sninfo("devid: %04x\n", devid); if (devid != (uint16_t) DEVID) { @@ -397,7 +397,7 @@ ADXL345_HANDLE adxl345_instantiate(FAR struct i2c_master_s *dev, priv = (FAR struct adxl345_dev_s *)kmm_zalloc(sizeof(struct adxl345_dev_s)); if (!priv) { - sndbg("Failed to allocate the device structure!\n"); + snerr("ERROR: Failed to allocate the device structure!\n"); return NULL; } @@ -418,7 +418,7 @@ ADXL345_HANDLE adxl345_instantiate(FAR struct i2c_master_s *dev, ret = adxl345_checkid(priv); if (ret < 0) { - sndbg("Wrong Device ID!\n"); + snerr("ERROR: Wrong Device ID!\n"); kmm_free(priv); return NULL; } diff --git a/drivers/sensors/adxl345_i2c.c b/drivers/sensors/adxl345_i2c.c index a2dfd819610cbfc1e063ae0e271a3bbe9e4a1b13..96731bbe8a01fcd9503ef7694474841198d367d8 100644 --- a/drivers/sensors/adxl345_i2c.c +++ b/drivers/sensors/adxl345_i2c.c @@ -97,12 +97,12 @@ uint8_t adxl345_getreg8(FAR struct adxl345_dev_s *priv, uint8_t regaddr) ret = I2C_TRANSFER(priv->i2c, msg, 2); if (ret < 0) { - sndbg("I2C_TRANSFER failed: %d\n", ret); + snerr("ERROR: I2C_TRANSFER failed: %d\n", ret); return 0; } #ifdef CONFIG_ADXL345_REGDEBUG - dbg("%02x->%02x\n", regaddr, regval); + _err("%02x->%02x\n", regaddr, regval); #endif return regval; } @@ -130,7 +130,7 @@ void adxl345_putreg8(FAR struct adxl345_dev_s *priv, int ret; #ifdef CONFIG_ADXL345_REGDEBUG - dbg("%02x<-%02x\n", regaddr, regval); + _err("%02x<-%02x\n", regaddr, regval); #endif /* Setup to the data to be transferred. Two bytes: The ADXL345 register @@ -154,7 +154,7 @@ void adxl345_putreg8(FAR struct adxl345_dev_s *priv, ret = I2C_TRANSFER(priv->i2c, &msg, 1); if (ret < 0) { - sndbg("I2C_TRANSFER failed: %d\n", ret); + snerr("ERROR: I2C_TRANSFER failed: %d\n", ret); } } #endif @@ -204,12 +204,12 @@ uint16_t adxl345_getreg16(FAR struct adxl345_dev_s *priv, uint8_t regaddr) ret = I2C_TRANSFER(priv->i2c, msg, 2); if (ret < 0) { - sndbg("I2C_TRANSFER failed: %d\n", ret); + snerr("ERROR: I2C_TRANSFER failed: %d\n", ret); return 0; } #ifdef CONFIG_ADXL345_REGDEBUG - dbg("%02x->%02x%02x\n", regaddr, rxbuffer[0], rxbuffer[1]); + _err("%02x->%02x%02x\n", regaddr, rxbuffer[0], rxbuffer[1]); #endif return (uint16_t)rxbuffer[0] << 8 | (uint16_t)rxbuffer[1]; } diff --git a/drivers/sensors/adxl345_spi.c b/drivers/sensors/adxl345_spi.c index 1e837132af17807c44448dc1e9ea983f261bd196..a2d524bf50ff611b5f4e2ee994843ddfc67a0a58 100644 --- a/drivers/sensors/adxl345_spi.c +++ b/drivers/sensors/adxl345_spi.c @@ -113,7 +113,7 @@ uint8_t adxl345_getreg8(FAR struct adxl345_dev_s *priv, uint8_t regaddr) (void)SPI_LOCK(priv->spi, false); #ifdef CONFIG_ADXL345_REGDEBUG - dbg("%02x->%02x\n", regaddr, regval); + _err("%02x->%02x\n", regaddr, regval); #endif return regval; } @@ -130,7 +130,7 @@ void adxl345_putreg8(FAR struct adxl345_dev_s *priv, uint8_t regaddr, uint8_t regval) { #ifdef CONFIG_ADXL345_REGDEBUG - dbg("%02x<-%02x\n", regaddr, regval); + _err("%02x<-%02x\n", regaddr, regval); #endif /* If SPI bus is shared then lock and configure it */ @@ -191,7 +191,7 @@ uint16_t adxl345_getreg16(FAR struct adxl345_dev_s *priv, uint8_t regaddr) (void)SPI_LOCK(priv->spi, false); #ifdef CONFIG_ADXL345_REGDEBUG - dbg("%02x->%04x\n", regaddr, regval); + _err("%02x->%04x\n", regaddr, regval); #endif return regval; diff --git a/drivers/sensors/as5048b.c b/drivers/sensors/as5048b.c index 96b3d4d19fdcb73362846256d2b2a70e62b6d993..9a213655d267758d9da4f3c8626479eb72a6dc8f 100644 --- a/drivers/sensors/as5048b.c +++ b/drivers/sensors/as5048b.c @@ -139,7 +139,7 @@ static int as5048b_readu8(FAR struct as5048b_dev_s *priv, uint8_t regaddr, ret = i2c_write(priv->i2c, &config, ®addr, sizeof(regaddr)); if (ret < 0) { - sndbg("i2c_write failed: %d\n", ret); + snerr("ERROR: i2c_write failed: %d\n", ret); return ret; } @@ -148,11 +148,11 @@ static int as5048b_readu8(FAR struct as5048b_dev_s *priv, uint8_t regaddr, ret = i2c_read(priv->i2c, &config, regval, sizeof(*regval)); if (ret < 0) { - sndbg("i2c_read failed: %d\n", ret); + snerr("ERROR: i2c_read failed: %d\n", ret); return ret; } - sndbg("addr: %02x value: %02x ret: %d\n", regaddr, *regval, ret); + sninfo("addr: %02x value: %02x ret: %d\n", regaddr, *regval, ret); return ret; } @@ -175,7 +175,7 @@ static int as5048b_readu16(FAR struct as5048b_dev_s *priv, uint8_t regaddrhi, ret = as5048b_readu8(priv, regaddrhi, &hi); if (ret < 0) { - sndbg("as5048b_readu8 failed: %d\n", ret); + snerr("ERROR: as5048b_readu8 failed: %d\n", ret); return ret; } @@ -184,13 +184,13 @@ static int as5048b_readu16(FAR struct as5048b_dev_s *priv, uint8_t regaddrhi, ret = as5048b_readu8(priv, regaddrlo, &lo); if (ret < 0) { - sndbg("as5048b_readu8 failed: %d\n", ret); + snerr("ERROR: as5048b_readu8 failed: %d\n", ret); return ret; } *regval = (uint16_t)hi << 6 | (uint16_t)lo; - sndbg("addrhi: %02x addrlo: %02x value: %04x ret: %d\n", - regaddrhi, regaddrlo, *regval, ret); + sninfo("addrhi: %02x addrlo: %02x value: %04x ret: %d\n", + regaddrhi, regaddrlo, *regval, ret); return ret; } @@ -209,7 +209,7 @@ static int as5048b_writeu8(FAR struct as5048b_dev_s *priv, uint8_t regaddr, uint8_t buffer[2]; int ret; - sndbg("addr: %02x value: %02x\n", regaddr, regval); + sninfo("addr: %02x value: %02x\n", regaddr, regval); /* Set up the I2C configuration */ @@ -227,7 +227,7 @@ static int as5048b_writeu8(FAR struct as5048b_dev_s *priv, uint8_t regaddr, ret = i2c_write(priv->i2c, &config, buffer, sizeof(buffer)); if (ret < 0) { - sndbg("i2c_write failed: %d\n", ret); + snerr("ERROR: i2c_write failed: %d\n", ret); } return ret; @@ -246,7 +246,7 @@ static int as5048b_writeu16(FAR struct as5048b_dev_s *priv, uint8_t regaddrhi, { int ret; - sndbg("addrhi: %02x addrlo: %02x value: %04x\n", + sninfo("addrhi: %02x addrlo: %02x value: %04x\n", regaddrhi, regaddrlo, regval); /* Write the high 8 bits of the 13-bit value */ @@ -254,7 +254,7 @@ static int as5048b_writeu16(FAR struct as5048b_dev_s *priv, uint8_t regaddrhi, ret = as5048b_writeu8(priv, regaddrhi, (uint8_t)(regval >> 6)); if (ret < 0) { - sndbg("as5048b_writeu8 failed: %d\n", ret); + snerr("ERROR: as5048b_writeu8 failed: %d\n", ret); return ret; } @@ -263,7 +263,7 @@ static int as5048b_writeu16(FAR struct as5048b_dev_s *priv, uint8_t regaddrhi, ret = as5048b_writeu8(priv, regaddrhi, (uint8_t)regval); if (ret < 0) { - sndbg("as5048b_writeu8 failed: %d\n", ret); + snerr("ERROR: as5048b_writeu8 failed: %d\n", ret); } return ret; @@ -285,11 +285,11 @@ static int as5048b_readzero(FAR struct as5048b_dev_s *priv, ret = as5048b_readu16(priv, AS5048B_ZEROHI_REG, AS5048B_ZEROLO_REG, zero); if (ret < 0) { - sndbg("as5048b_readu16 failed: %d\n", ret); + snerr("ERROR: as5048b_readu16 failed: %d\n", ret); return ret; } - sndbg("zero: %04x ret: %d\n", *zero, ret); + sninfo("zero: %04x ret: %d\n", *zero, ret); return ret; } @@ -305,12 +305,12 @@ static int as5048b_writezero(FAR struct as5048b_dev_s *priv, uint16_t zero) { int ret; - sndbg("zero: %04x\n", zero); + sninfo("zero: %04x\n", zero); ret = as5048b_writeu16(priv, AS5048B_ZEROHI_REG, AS5048B_ZEROLO_REG, zero); if (ret < 0) { - sndbg("as5048b_writeu16 failed: %d\n", ret); + snerr("ERROR: as5048b_writeu16 failed: %d\n", ret); } return ret; @@ -331,11 +331,11 @@ static int as5048b_readagc(FAR struct as5048b_dev_s *priv, FAR uint8_t *agc) ret = as5048b_readu8(priv, AS5048B_AGC_REG, agc); if (ret < 0) { - sndbg("as5048b_readu8 failed: %d\n", ret); + snerr("ERROR: as5048b_readu8 failed: %d\n", ret); return ret; } - sndbg("agc: %02x ret: %d\n", *agc, ret); + sninfo("agc: %02x ret: %d\n", *agc, ret); return ret; } @@ -354,11 +354,11 @@ static int as5048b_readdiag(FAR struct as5048b_dev_s *priv, FAR uint8_t *diag) ret = as5048b_readu8(priv, AS5048B_DIAG_REG, diag); if (ret < 0) { - sndbg("as5048b_readu8 failed: %d\n", ret); + snerr("ERROR: as5048b_readu8 failed: %d\n", ret); return ret; } - sndbg("diag: %02x ret: %d\n", *diag, ret); + sninfo("diag: %02x ret: %d\n", *diag, ret); return ret; } @@ -377,11 +377,11 @@ static int as5048b_readmag(FAR struct as5048b_dev_s *priv, FAR uint16_t *mag) ret = as5048b_readu16(priv, AS5048B_MAGHI_REG, AS5048B_MAGLO_REG, mag); if (ret < 0) { - sndbg("as5048b_readu16 failed: %d\n", ret); + snerr("ERROR: as5048b_readu16 failed: %d\n", ret); return ret; } - sndbg("mag: %04x ret: %d\n", *mag, ret); + sninfo("mag: %04x ret: %d\n", *mag, ret); return ret; } @@ -400,11 +400,11 @@ static int as5048b_readang(FAR struct as5048b_dev_s *priv, FAR uint16_t *ang) ret = as5048b_readu16(priv, AS5048B_ANGHI_REG, AS5048B_ANGLO_REG, ang); if (ret < 0) { - sndbg("as5048b_readu16 failed: %d\n", ret); + snerr("ERROR: as5048b_readu16 failed: %d\n", ret); return ret; } - sndbg("ang: %04x ret: %d\n", *ang, ret); + sninfo("ang: %04x ret: %d\n", *ang, ret); return ret; } @@ -452,7 +452,7 @@ static int as5048b_position(FAR struct qe_lowerhalf_s *lower, ret = as5048b_readang(priv, &ang); if (ret < 0) { - sndbg("as5048b_readang failed: %d\n", ret); + snerr("ERROR: as5048b_readang failed: %d\n", ret); return ret; } @@ -477,21 +477,21 @@ static int as5048b_reset(FAR struct qe_lowerhalf_s *lower) ret = as5048b_writezero(priv, 0); if (ret < 0) { - sndbg("as5048b_writezero failed: %d\n", ret); + snerr("ERROR: as5048b_writezero failed: %d\n", ret); return ret; } ret = as5048b_readang(priv, &ang); if (ret < 0) { - sndbg("as5048b_readang failed: %d\n", ret); + snerr("ERROR: as5048b_readang failed: %d\n", ret); return ret; } ret = as5048b_writezero(priv, ang); if (ret < 0) { - sndbg("as5048b_writezero failed: %d\n", ret); + snerr("ERROR: as5048b_writezero failed: %d\n", ret); } return ret; @@ -521,7 +521,8 @@ static int as5048b_ioctl(FAR struct qe_lowerhalf_s *lower, int cmd, { *ptr = (int32_t)zero; } - sndbg("zero: %04x ret: %d\n", *ptr, ret); + + sninfo("zero: %04x ret: %d\n", *ptr, ret); } break; @@ -532,7 +533,7 @@ static int as5048b_ioctl(FAR struct qe_lowerhalf_s *lower, int cmd, FAR uint8_t *ptr = (FAR uint8_t *)((uintptr_t)arg); DEBUGASSERT(ptr != NULL); ret = as5048b_readagc(priv, ptr); - sndbg("agc: %02x ret: %d\n", *ptr, ret); + sninfo("agc: %02x ret: %d\n", *ptr, ret); } break; @@ -543,7 +544,7 @@ static int as5048b_ioctl(FAR struct qe_lowerhalf_s *lower, int cmd, FAR uint8_t *ptr = (FAR uint8_t *)((uintptr_t)arg); DEBUGASSERT(ptr != NULL); ret = as5048b_readdiag(priv, ptr); - sndbg("diag: %02x ret: %d\n", *ptr, ret); + sninfo("diag: %02x ret: %d\n", *ptr, ret); } break; @@ -559,12 +560,13 @@ static int as5048b_ioctl(FAR struct qe_lowerhalf_s *lower, int cmd, { *ptr = (int32_t)mag; } - sndbg("mag: %04x ret: %d\n", *ptr, ret); + + sninfo("mag: %04x ret: %d\n", *ptr, ret); } break; default: - sndbg("Unrecognized cmd: %d arg: %ld\n", cmd, arg); + snerr("ERROR: Unrecognized cmd: %d arg: %ld\n", cmd, arg); ret = -ENOTTY; break; } @@ -604,7 +606,7 @@ FAR struct qe_lowerhalf_s *as5048b_initialize(FAR struct i2c_master_s *i2c, priv = (FAR struct as5048b_dev_s *)kmm_malloc(sizeof(*priv)); if (priv == NULL) { - sndbg("Failed to allocate instance\n"); + snerr("ERROR: Failed to allocate instance\n"); return NULL; } diff --git a/drivers/sensors/bh1750fvi.c b/drivers/sensors/bh1750fvi.c index 9823e12997b0f6cfdb03f685b65f7f5291edd7ee..88ba994a3874ce329c8e25f63528b241b437a33a 100644 --- a/drivers/sensors/bh1750fvi.c +++ b/drivers/sensors/bh1750fvi.c @@ -144,7 +144,7 @@ static int bh1750fvi_read16(FAR struct bh1750fvi_dev_s *priv, ret = i2c_read(priv->i2c, &config, buffer, 2); if (ret < 0) { - sndbg ("i2c_read failed: %d\n", ret); + snerr ("i2c_read failed: %d\n", ret); return ret; } @@ -152,7 +152,7 @@ static int bh1750fvi_read16(FAR struct bh1750fvi_dev_s *priv, *regval = (uint16_t)((buffer[0]<<8) | (buffer[1])); - sndbg("value: %08x ret: %d\n", *regval, ret); + sninfo("value: %08x ret: %d\n", *regval, ret); return OK; } @@ -169,7 +169,7 @@ static int bh1750fvi_write8(FAR struct bh1750fvi_dev_s *priv, uint8_t regval) struct i2c_config_s config; int ret; - sndbg("value: %02x\n", regval); + sninfo("value: %02x\n", regval); /* Set up the I2C configuration */ @@ -182,7 +182,7 @@ static int bh1750fvi_write8(FAR struct bh1750fvi_dev_s *priv, uint8_t regval) ret = i2c_write(priv->i2c, &config, ®val, 1); if (ret < 0) { - sndbg("i2c_write failed: %d\n", ret); + snerr("ERROR: i2c_write failed: %d\n", ret); } return ret; @@ -236,14 +236,14 @@ static ssize_t bh1750fvi_read(FAR struct file *filep, FAR char *buffer, if (buflen != 2) { - sndbg("You need to read 2 bytes from this sensor!\n"); + snerr("ERROR: You need to read 2 bytes from this sensor!\n"); return -EINVAL; } ret = bh1750fvi_read16(priv, &lux); if (ret < 0) { - sndbg("Error reading light sensor!\n"); + snerr("ERROR: Error reading light sensor!\n"); return ret; } @@ -283,7 +283,7 @@ static int bh1750fvi_ioctl(FAR struct file *filep, int cmd, ret = bh1750fvi_write8(priv, BH1750FVI_CONTINUOUS_HRM); if (ret < 0) { - sndbg("Cannot change to Continuously H-Resolution Mode!\n"); + snerr("ERROR: Cannot change to Continuously H-Resolution Mode!\n"); } } break; @@ -295,7 +295,7 @@ static int bh1750fvi_ioctl(FAR struct file *filep, int cmd, ret = bh1750fvi_write8(priv, BH1750FVI_CONTINUOUS_HRM2); if (ret < 0) { - sndbg("Cannot change to Continuously H-Resolution Mode2!\n"); + snerr("ERROR: Cannot change to Continuously H-Resolution Mode2!\n"); } } break; @@ -307,7 +307,7 @@ static int bh1750fvi_ioctl(FAR struct file *filep, int cmd, ret = bh1750fvi_write8(priv, BH1750FVI_CONTINUOUS_LRM); if (ret < 0) { - sndbg("Cannot change to Continuously L-Resolution Mode!\n"); + snerr("ERROR: Cannot change to Continuously L-Resolution Mode!\n"); } } break; @@ -319,7 +319,7 @@ static int bh1750fvi_ioctl(FAR struct file *filep, int cmd, ret = bh1750fvi_write8(priv, BH1750FVI_ONETIME_HRM); if (ret < 0) { - sndbg("Cannot change to One Time H-Resolution Mode!\n"); + snerr("ERROR: Cannot change to One Time H-Resolution Mode!\n"); } } break; @@ -331,7 +331,7 @@ static int bh1750fvi_ioctl(FAR struct file *filep, int cmd, ret = bh1750fvi_write8(priv, BH1750FVI_ONETIME_HRM2); if (ret < 0) { - sndbg("Cannot change to One Time H-Resolution Mode2!\n"); + snerr("ERROR: Cannot change to One Time H-Resolution Mode2!\n"); } } break; @@ -343,7 +343,7 @@ static int bh1750fvi_ioctl(FAR struct file *filep, int cmd, ret = bh1750fvi_write8(priv, BH1750FVI_ONETIME_LRM); if (ret < 0) { - sndbg("Cannot change to One Time L-Resolution Mode!\n"); + snerr("ERROR: Cannot change to One Time L-Resolution Mode!\n"); } } break; @@ -361,7 +361,7 @@ static int bh1750fvi_ioctl(FAR struct file *filep, int cmd, ret = bh1750fvi_write8(priv, reg); if (ret < 0) { - sndbg("Cannot Change Measure Time at MEASURE_TIMEH!\n"); + snerr("ERROR: Cannot Change Measure Time at MEASURE_TIMEH!\n"); } reg = BH1750FVI_MEASURE_TIMEL | (*ptr & 0x1F); @@ -369,13 +369,13 @@ static int bh1750fvi_ioctl(FAR struct file *filep, int cmd, ret = bh1750fvi_write8(priv, reg); if (ret < 0) { - sndbg("Cannot Change Measure Time at MEASURE_TIMEL!\n"); + snerr("ERROR: Cannot Change Measure Time at MEASURE_TIMEL!\n"); } } break; default: - sndbg("Unrecognized cmd: %d\n", cmd); + snerr("ERROR: Unrecognized cmd: %d\n", cmd); ret = -ENOTTY; break; } @@ -419,7 +419,7 @@ int bh1750fvi_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, if (priv == NULL) { - sndbg("Failed to allocate instance\n"); + snerr("ERROR: Failed to allocate instance\n"); return -ENOMEM; } @@ -431,7 +431,7 @@ int bh1750fvi_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, ret = bh1750fvi_write8(priv, BH1750FVI_POWERON); if (ret < 0) { - sndbg("Failed to power-on the BH1750FVI!\n"); + snerr("ERROR: Failed to power-on the BH1750FVI!\n"); return ret; } @@ -440,7 +440,7 @@ int bh1750fvi_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, ret = bh1750fvi_write8(priv, BH1750FVI_CONTINUOUS_HRM); if (ret < 0) { - sndbg("Failed to enable the Continuosly H-Resolution Mode!\n"); + snerr("ERROR: Failed to enable the Continuosly H-Resolution Mode!\n"); return ret; } @@ -449,7 +449,7 @@ int bh1750fvi_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, ret = register_driver(devpath, &g_bh1750fvi_fops, 0666, priv); if (ret < 0) { - sndbg("Failed to register driver: %d\n", ret); + snerr("ERROR: Failed to register driver: %d\n", ret); kmm_free(priv); } diff --git a/drivers/sensors/bmp180.c b/drivers/sensors/bmp180.c index 2124066fe95bf73d61180caa80e4480fd0796ddc..1a7d538c3343c483a0e149403a405e2ca6a4df44 100644 --- a/drivers/sensors/bmp180.c +++ b/drivers/sensors/bmp180.c @@ -198,7 +198,7 @@ static uint8_t bmp180_getreg8(FAR struct bmp180_dev_s *priv, uint8_t regaddr) ret = i2c_write(priv->i2c, &config, ®addr, 1); if (ret < 0) { - sndbg("i2c_write failed: %d\n", ret); + snerr("ERROR: i2c_write failed: %d\n", ret); return ret; } @@ -207,7 +207,7 @@ static uint8_t bmp180_getreg8(FAR struct bmp180_dev_s *priv, uint8_t regaddr) ret = i2c_read(priv->i2c, &config, ®val, 1); if (ret < 0) { - sndbg("i2c_read failed: %d\n", ret); + snerr("ERROR: i2c_read failed: %d\n", ret); return ret; } @@ -240,7 +240,7 @@ static uint16_t bmp180_getreg16(FAR struct bmp180_dev_s *priv, uint8_t regaddr) ret = i2c_write(priv->i2c, &config, ®addr, 1); if (ret < 0) { - sndbg("i2c_write failed: %d\n", ret); + snerr("ERROR: i2c_write failed: %d\n", ret); return ret; } @@ -249,7 +249,7 @@ static uint16_t bmp180_getreg16(FAR struct bmp180_dev_s *priv, uint8_t regaddr) ret = i2c_read(priv->i2c, &config, (uint8_t *)®val, 2); if (ret < 0) { - sndbg("i2c_read failed: %d\n", ret); + snerr("ERROR: i2c_read failed: %d\n", ret); return ret; } @@ -292,7 +292,7 @@ static void bmp180_putreg8(FAR struct bmp180_dev_s *priv, uint8_t regaddr, ret = i2c_write(priv->i2c, &config, (uint8_t *) &data, 2); if (ret < 0) { - sndbg("i2c_write failed: %d\n", ret); + snerr("ERROR: i2c_write failed: %d\n", ret); return; } @@ -314,13 +314,13 @@ static int bmp180_checkid(FAR struct bmp180_dev_s *priv) /* Read device ID */ devid = bmp180_getreg8(priv, BMP180_DEVID); - snvdbg("devid: 0x%02x\n", devid); + sninfo("devid: 0x%02x\n", devid); if (devid != (uint16_t) DEVID) { /* ID is not Correct */ - sndbg("Wrong Device ID!\n"); + snerr("ERROR: Wrong Device ID!\n"); return -ENODEV; } @@ -421,8 +421,8 @@ static void bmp180_read_press_temp(FAR struct bmp180_dev_s *priv) priv->bmp180_upress |= bmp180_getreg8(priv, BMP180_ADC_OUT_XLSB); priv->bmp180_upress = priv->bmp180_upress >> (8 - (oss >> 6)); - snvdbg("Uncompensated temperature = %d\n", priv->bmp180_utemp); - snvdbg("Uncompensated pressure = %d\n", priv->bmp180_upress); + sninfo("Uncompensated temperature = %d\n", priv->bmp180_utemp); + sninfo("Uncompensated pressure = %d\n", priv->bmp180_upress); } /**************************************************************************** @@ -470,7 +470,7 @@ static int bmp180_getpressure(FAR struct bmp180_dev_s *priv) x2 = (priv->bmp180_cal_mc << 11) / (x1 + priv->bmp180_cal_md); b5 = x1 + x2; temp = (b5 + 8) >> 4; - snvdbg("Compensated temperature = %d\n", temp); + sninfo("Compensated temperature = %d\n", temp); /* Calculate true pressure */ @@ -500,7 +500,7 @@ static int bmp180_getpressure(FAR struct bmp180_dev_s *priv) press = press + ((x1 + x2 + 3791) >> 4); - snvdbg("Compressed pressure = %d\n", press); + sninfo("Compressed pressure = %d\n", press); return press; } @@ -543,13 +543,13 @@ static ssize_t bmp180_read(FAR struct file *filep, FAR char *buffer, if (!buffer) { - sndbg("Buffer is null\n"); + snerr("ERROR: Buffer is null\n"); return -1; } if (buflen != 4) { - sndbg("You can't read something other than 32 bits (4 bytes)\n"); + snerr("ERROR: You can't read something other than 32 bits (4 bytes)\n"); return -1; } @@ -602,7 +602,7 @@ int bmp180_register(FAR const char *devpath, FAR struct i2c_master_s *i2c) priv = (FAR struct bmp180_dev_s *)kmm_malloc(sizeof(struct bmp180_dev_s)); if (!priv) { - sndbg("Failed to allocate instance\n"); + snerr("ERROR: Failed to allocate instance\n"); return -ENOMEM; } @@ -615,7 +615,7 @@ int bmp180_register(FAR const char *devpath, FAR struct i2c_master_s *i2c) ret = bmp180_checkid(priv); if (ret < 0) { - sndbg("Failed to register driver: %d\n", ret); + snerr("ERROR: Failed to register driver: %d\n", ret); kmm_free(priv); return ret; } @@ -629,11 +629,11 @@ int bmp180_register(FAR const char *devpath, FAR struct i2c_master_s *i2c) ret = register_driver(devpath, &g_bmp180fops, 0666, priv); if (ret < 0) { - sndbg("Failed to register driver: %d\n", ret); + snerr("ERROR: Failed to register driver: %d\n", ret); kmm_free(priv); } - snvdbg("BMP180 driver loaded successfully!\n"); + sninfo("BMP180 driver loaded successfully!\n"); return ret; } diff --git a/drivers/sensors/lm75.c b/drivers/sensors/lm75.c index f3fad7397216bd2fcce82d646d6802eb55dd5024..ce9445558b64ff19556891d07a10e2b41304b436 100644 --- a/drivers/sensors/lm75.c +++ b/drivers/sensors/lm75.c @@ -195,7 +195,7 @@ static int lm75_readb16(FAR struct lm75_dev_s *priv, uint8_t regaddr, ret = lm75_i2c_write(priv, ®addr, 1); if (ret < 0) { - sndbg("i2c_write failed: %d\n", ret); + snerr("ERROR: i2c_write failed: %d\n", ret); return ret; } @@ -204,7 +204,7 @@ static int lm75_readb16(FAR struct lm75_dev_s *priv, uint8_t regaddr, ret = lm75_i2c_read(priv, buffer, 2); if (ret < 0) { - sndbg("i2c_read failed: %d\n", ret); + snerr("ERROR: i2c_read failed: %d\n", ret); return ret; } @@ -214,7 +214,7 @@ static int lm75_readb16(FAR struct lm75_dev_s *priv, uint8_t regaddr, */ *regvalue = b8tob16((b8_t)buffer[0] << 8 | (b8_t)buffer[1]); - sndbg("addr: %02x value: %08x ret: %d\n", regaddr, *regvalue, ret); + sninfo("addr: %02x value: %08x ret: %d\n", regaddr, *regvalue, ret); return OK; } @@ -232,7 +232,7 @@ static int lm75_writeb16(FAR struct lm75_dev_s *priv, uint8_t regaddr, uint8_t buffer[3]; b8_t regb8; - sndbg("addr: %02x value: %08x\n", regaddr, regval); + sninfo("addr: %02x value: %08x\n", regaddr, regval); /* Set up a 3 byte message to send */ @@ -265,11 +265,11 @@ static int lm75_readtemp(FAR struct lm75_dev_s *priv, FAR b16_t *temp) ret = lm75_readb16(priv, LM75_TEMP_REG, &temp16); if (ret < 0) { - sndbg("lm75_readb16 failed: %d\n", ret); + snerr("ERROR: lm75_readb16 failed: %d\n", ret); return ret; } - sndbg("Centigrade: %08x\n", temp16); + sninfo("Centigrade: %08x\n", temp16); /* Was fahrenheit requested? */ @@ -278,7 +278,7 @@ static int lm75_readtemp(FAR struct lm75_dev_s *priv, FAR b16_t *temp) /* Centigrade to Fahrenheit conversion: F = 9*C/5 + 32 */ temp16 = b16mulb16(temp16, B16_9DIV5) + B16_32; - sndbg("Fahrenheit: %08x\n", temp16); + sninfo("Fahrenheit: %08x\n", temp16); } *temp = temp16; @@ -305,14 +305,14 @@ static int lm75_readconf(FAR struct lm75_dev_s *priv, FAR uint8_t *conf) ret = lm75_i2c_write(priv, &buffer, 1); if (ret < 0) { - sndbg("i2c_write failed: %d\n", ret); + snerr("ERROR: i2c_write failed: %d\n", ret); return ret; } /* Restart and read 8-bits from the register */ ret = lm75_i2c_read(priv, conf, 1); - sndbg("conf: %02x ret: %d\n", *conf, ret); + sninfo("conf: %02x ret: %d\n", *conf, ret); return ret; } @@ -328,7 +328,7 @@ static int lm75_writeconf(FAR struct lm75_dev_s *priv, uint8_t conf) { uint8_t buffer[2]; - sndbg("conf: %02x\n", conf); + sninfo("conf: %02x\n", conf); /* Set up a 2 byte message to send */ @@ -384,7 +384,7 @@ static ssize_t lm75_read(FAR struct file *filep, FAR char *buffer, size_t buflen nsamples = buflen / sizeof(b16_t); ptr = (FAR b16_t *)buffer; - sndbg("buflen: %d nsamples: %d\n", buflen, nsamples); + sninfo("buflen: %d nsamples: %d\n", buflen, nsamples); /* Get the requested number of samples */ @@ -397,7 +397,7 @@ static ssize_t lm75_read(FAR struct file *filep, FAR char *buffer, size_t buflen ret = lm75_readtemp(priv, &temp); if (ret < 0) { - sndbg("lm75_readtemp failed: %d\n", ret); + snerr("ERROR: lm75_readtemp failed: %d\n", ret); return (ssize_t)ret; } @@ -438,7 +438,7 @@ static int lm75_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR uint8_t *ptr = (FAR uint8_t *)((uintptr_t)arg); DEBUGASSERT(ptr != NULL); ret = lm75_readconf(priv, ptr); - sndbg("conf: %02x ret: %d\n", *ptr, ret); + sninfo("conf: %02x ret: %d\n", *ptr, ret); } break; @@ -446,7 +446,7 @@ static int lm75_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SNIOC_WRITECONF: ret = lm75_writeconf(priv, (uint8_t)arg); - sndbg("conf: %02x ret: %d\n", *(FAR uint8_t *)arg, ret); + sninfo("conf: %02x ret: %d\n", *(FAR uint8_t *)arg, ret); break; /* Shutdown the LM75, Arg: None */ @@ -460,7 +460,7 @@ static int lm75_ioctl(FAR struct file *filep, int cmd, unsigned long arg) ret = lm75_writeconf(priv, conf | LM75_CONF_SHUTDOWN); } - sndbg("conf: %02x ret: %d\n", conf | LM75_CONF_SHUTDOWN, ret); + sninfo("conf: %02x ret: %d\n", conf | LM75_CONF_SHUTDOWN, ret); } break; @@ -475,7 +475,7 @@ static int lm75_ioctl(FAR struct file *filep, int cmd, unsigned long arg) ret = lm75_writeconf(priv, conf & ~LM75_CONF_SHUTDOWN); } - sndbg("conf: %02x ret: %d\n", conf & ~LM75_CONF_SHUTDOWN, ret); + sninfo("conf: %02x ret: %d\n", conf & ~LM75_CONF_SHUTDOWN, ret); } break; @@ -483,14 +483,14 @@ static int lm75_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SNIOC_FAHRENHEIT: priv->fahrenheit = true; - sndbg("Fahrenheit\n"); + sninfo("Fahrenheit\n"); break; /* Report Samples in Centigrade */ case SNIOC_CENTIGRADE: priv->fahrenheit = false; - sndbg("Centigrade\n"); + sninfo("Centigrade\n"); break; /* Read THYS temperature register. Arg: b16_t* pointer */ @@ -500,7 +500,7 @@ static int lm75_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR b16_t *ptr = (FAR b16_t *)((uintptr_t)arg); DEBUGASSERT(ptr != NULL); ret = lm75_readb16(priv, LM75_THYS_REG, ptr); - sndbg("THYS: %08x ret: %d\n", *ptr, ret); + sninfo("THYS: %08x ret: %d\n", *ptr, ret); } break; @@ -508,7 +508,7 @@ static int lm75_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SNIOC_WRITETHYS: ret = lm75_writeb16(priv, LM75_THYS_REG, (b16_t)arg); - sndbg("THYS: %08x ret: %d\n", (b16_t)arg, ret); + sninfo("THYS: %08x ret: %d\n", (b16_t)arg, ret); break; /* Read TOS (Over-temp Shutdown Threshold) Register. Arg: b16_t* pointer */ @@ -518,7 +518,7 @@ static int lm75_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR b16_t *ptr = (FAR b16_t *)((uintptr_t)arg); DEBUGASSERT(ptr != NULL); ret = lm75_readb16(priv, LM75_TOS_REG, ptr); - sndbg("TOS: %08x ret: %d\n", *ptr, ret); + sninfo("TOS: %08x ret: %d\n", *ptr, ret); } break; @@ -526,11 +526,11 @@ static int lm75_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SNIOC_WRITETOS: ret = lm75_writeb16(priv, LM75_TOS_REG, (b16_t)arg); - sndbg("TOS: %08x ret: %d\n", (b16_t)arg, ret); + sninfo("TOS: %08x ret: %d\n", (b16_t)arg, ret); break; default: - sndbg("Unrecognized cmd: %d\n", cmd); + sninfo("Unrecognized cmd: %d\n", cmd); ret = -ENOTTY; break; } @@ -578,7 +578,7 @@ int lm75_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, uint8_t priv = (FAR struct lm75_dev_s *)kmm_malloc(sizeof(struct lm75_dev_s)); if (priv == NULL) { - sndbg("Failed to allocate instance\n"); + snerr("ERROR: Failed to allocate instance\n"); return -ENOMEM; } @@ -591,7 +591,7 @@ int lm75_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, uint8_t ret = register_driver(devpath, &g_lm75fops, 0666, priv); if (ret < 0) { - sndbg("Failed to register driver: %d\n", ret); + snerr("ERROR: Failed to register driver: %d\n", ret); kmm_free(priv); } diff --git a/drivers/sensors/lm92.c b/drivers/sensors/lm92.c index 73f4d54634ebc61322af6d7a98966d042cf27f3b..c801e6633c79c7390f09f39eac2b928505cb546f 100644 --- a/drivers/sensors/lm92.c +++ b/drivers/sensors/lm92.c @@ -198,7 +198,7 @@ static int lm92_readb16(FAR struct lm92_dev_s *priv, uint8_t regaddr, ret = lm92_i2c_write(priv, ®addr, 1); if (ret < 0) { - sndbg("i2c_write failed: %d\n", ret); + snerr("ERROR: i2c_write failed: %d\n", ret); return ret; } @@ -207,7 +207,7 @@ static int lm92_readb16(FAR struct lm92_dev_s *priv, uint8_t regaddr, ret = lm92_i2c_read(priv, buffer, 2); if (ret < 0) { - sndbg("i2c_read failed: %d\n", ret); + snerr("ERROR: i2c_read failed: %d\n", ret); return ret; } @@ -218,7 +218,7 @@ static int lm92_readb16(FAR struct lm92_dev_s *priv, uint8_t regaddr, *regvalue = (b16_t)((uint32_t)(buffer[0] & (1 << 7)) << 24 | (uint32_t)(buffer[0] & ~(1 << 7)) << 17 | (uint32_t)(buffer[1] & ~7) << 9); - sndbg("addr: %02x value: %08x ret: %d\n", regaddr, *regvalue, ret); + sninfo("addr: %02x value: %08x ret: %d\n", regaddr, *regvalue, ret); return OK; } @@ -236,7 +236,7 @@ static int lm92_writeb16(FAR struct lm92_dev_s *priv, uint8_t regaddr, { uint8_t buffer[3]; - sndbg("addr: %02x value: %08x\n", regaddr, regval); + sninfo("addr: %02x value: %08x\n", regaddr, regval); /* Set up a 3-byte message to send */ @@ -268,11 +268,11 @@ static int lm92_readtemp(FAR struct lm92_dev_s *priv, FAR b16_t *temp) ret = lm92_readb16(priv, LM92_TEMP_REG, &temp16); if (ret < 0) { - sndbg("lm92_readb16 failed: %d\n", ret); + snerr("ERROR: lm92_readb16 failed: %d\n", ret); return ret; } - sndbg("Centigrade: %08x\n", temp16); + sninfo("Centigrade: %08x\n", temp16); /* Was Fahrenheit requested? */ @@ -281,7 +281,7 @@ static int lm92_readtemp(FAR struct lm92_dev_s *priv, FAR b16_t *temp) /* Centigrade to Fahrenheit conversion: F = 9*C/5 + 32 */ temp16 = b16mulb16(temp16, B16_9DIV5) + B16_32; - sndbg("Fahrenheit: %08x\n", temp16); + sninfo("Fahrenheit: %08x\n", temp16); } *temp = temp16; @@ -308,14 +308,14 @@ static int lm92_readconf(FAR struct lm92_dev_s *priv, FAR uint8_t *conf) ret = lm92_i2c_write(priv, &buffer, 1); if (ret < 0) { - sndbg("i2c_write failed: %d\n", ret); + snerr("ERROR: i2c_write failed: %d\n", ret); return ret; } /* Restart and read 8 bits from the register */ ret = lm92_i2c_read(priv, conf, 1); - sndbg("conf: %02x ret: %d\n", *conf, ret); + sninfo("conf: %02x ret: %d\n", *conf, ret); return ret; } @@ -331,7 +331,7 @@ static int lm92_writeconf(FAR struct lm92_dev_s *priv, uint8_t conf) { uint8_t buffer[2]; - sndbg("conf: %02x\n", conf); + sninfo("conf: %02x\n", conf); /* Set up a 2-byte message to send */ @@ -364,7 +364,7 @@ static int lm92_readid(FAR struct lm92_dev_s *priv, FAR uint16_t *id) ret = lm92_i2c_write(priv, ®addr, 1); if (ret < 0) { - sndbg("i2c_write failed: %d\n", ret); + snerr("ERROR: i2c_write failed: %d\n", ret); return ret; } @@ -373,12 +373,12 @@ static int lm92_readid(FAR struct lm92_dev_s *priv, FAR uint16_t *id) ret = lm92_i2c_read(priv, buffer, 2); if (ret < 0) { - sndbg("i2c_read failed: %d\n", ret); + snerr("ERROR: i2c_read failed: %d\n", ret); return ret; } *id = (uint16_t)buffer[0] << 8 | (uint16_t)buffer[1]; - sndbg("id: %04x ret: %d\n", *id, ret); + sninfo("id: %04x ret: %d\n", *id, ret); return OK; } @@ -427,7 +427,7 @@ static ssize_t lm92_read(FAR struct file *filep, FAR char *buffer, nsamples = buflen / sizeof(b16_t); ptr = (FAR b16_t *)buffer; - sndbg("buflen: %d nsamples: %d\n", buflen, nsamples); + sninfo("buflen: %d nsamples: %d\n", buflen, nsamples); /* Get the requested number of samples */ @@ -440,7 +440,7 @@ static ssize_t lm92_read(FAR struct file *filep, FAR char *buffer, ret = lm92_readtemp(priv, &temp); if (ret < 0) { - sndbg("lm92_readtemp failed: %d\n", ret); + snerr("ERROR: lm92_readtemp failed: %d\n", ret); return (ssize_t)ret; } @@ -481,7 +481,7 @@ static int lm92_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR uint8_t *ptr = (FAR uint8_t *)((uintptr_t)arg); DEBUGASSERT(ptr != NULL); ret = lm92_readconf(priv, ptr); - sndbg("conf: %02x ret: %d\n", *ptr, ret); + sninfo("conf: %02x ret: %d\n", *ptr, ret); } break; @@ -489,7 +489,7 @@ static int lm92_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SNIOC_WRITECONF: ret = lm92_writeconf(priv, (uint8_t)arg); - sndbg("conf: %02x ret: %d\n", *(uint8_t *)arg, ret); + sninfo("conf: %02x ret: %d\n", *(uint8_t *)arg, ret); break; /* Shutdown the LM92. Arg: None */ @@ -503,7 +503,7 @@ static int lm92_ioctl(FAR struct file *filep, int cmd, unsigned long arg) ret = lm92_writeconf(priv, conf | LM92_CONF_SHUTDOWN); } - sndbg("conf: %02x ret: %d\n", conf | LM92_CONF_SHUTDOWN, ret); + sninfo("conf: %02x ret: %d\n", conf | LM92_CONF_SHUTDOWN, ret); } break; @@ -518,7 +518,7 @@ static int lm92_ioctl(FAR struct file *filep, int cmd, unsigned long arg) ret = lm92_writeconf(priv, conf & ~LM92_CONF_SHUTDOWN); } - sndbg("conf: %02x ret: %d\n", conf & ~LM92_CONF_SHUTDOWN, ret); + sninfo("conf: %02x ret: %d\n", conf & ~LM92_CONF_SHUTDOWN, ret); } break; @@ -526,14 +526,14 @@ static int lm92_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SNIOC_FAHRENHEIT: priv->fahrenheit = true; - sndbg("Fahrenheit\n"); + sninfo("Fahrenheit\n"); break; /* Report samples in Centigrade. Arg: None */ case SNIOC_CENTIGRADE: priv->fahrenheit = false; - sndbg("Centigrade\n"); + sninfo("Centigrade\n"); break; /* Read THYS temperature register. Arg: b16_t* pointer */ @@ -543,7 +543,7 @@ static int lm92_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR b16_t *ptr = (FAR b16_t *)((uintptr_t)arg); DEBUGASSERT(ptr != NULL); ret = lm92_readb16(priv, LM92_THYS_REG, ptr); - sndbg("THYS: %08x ret: %d\n", *ptr, ret); + sninfo("THYS: %08x ret: %d\n", *ptr, ret); } break; @@ -551,7 +551,7 @@ static int lm92_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SNIOC_WRITETHYS: ret = lm92_writeb16(priv, LM92_THYS_REG, (b16_t)arg); - sndbg("THYS: %08x ret: %d\n", (b16_t)arg, ret); + sninfo("THYS: %08x ret: %d\n", (b16_t)arg, ret); break; /* Read TCRIT temperature register. Arg: b16_t* pointer */ @@ -561,7 +561,7 @@ static int lm92_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR b16_t *ptr = (FAR b16_t *)((uintptr_t)arg); DEBUGASSERT(ptr != NULL); ret = lm92_readb16(priv, LM92_TCRIT_REG, ptr); - sndbg("TCRIT: %08x ret: %d\n", *ptr, ret); + sninfo("TCRIT: %08x ret: %d\n", *ptr, ret); } break; @@ -569,7 +569,7 @@ static int lm92_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SNIOC_WRITETCRIT: ret = lm92_writeb16(priv, LM92_TCRIT_REG, (b16_t)arg); - sndbg("TCRIT: %08x ret: %d\n", (b16_t)arg, ret); + sninfo("TCRIT: %08x ret: %d\n", (b16_t)arg, ret); break; /* Read TLOW temperature register. Arg: b16_t* pointer */ @@ -579,7 +579,7 @@ static int lm92_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR b16_t *ptr = (FAR b16_t *)((uintptr_t)arg); DEBUGASSERT(ptr != NULL); ret = lm92_readb16(priv, LM92_TLOW_REG, ptr); - sndbg("TLOW: %08x ret: %d\n", *ptr, ret); + sninfo("TLOW: %08x ret: %d\n", *ptr, ret); } break; @@ -587,7 +587,7 @@ static int lm92_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SNIOC_WRITETLOW: ret = lm92_writeb16(priv, LM92_TLOW_REG, (b16_t)arg); - sndbg("TLOW: %08x ret: %d\n", (b16_t)arg, ret); + sninfo("TLOW: %08x ret: %d\n", (b16_t)arg, ret); break; /* Read THIGH temperature register. Arg: b16_t* pointer */ @@ -597,7 +597,7 @@ static int lm92_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR b16_t *ptr = (FAR b16_t *)((uintptr_t)arg); DEBUGASSERT(ptr != NULL); ret = lm92_readb16(priv, LM92_THIGH_REG, ptr); - sndbg("THIGH: %08x ret: %d\n", *ptr, ret); + sninfo("THIGH: %08x ret: %d\n", *ptr, ret); } break; @@ -605,7 +605,7 @@ static int lm92_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SNIOC_WRITETHIGH: ret = lm92_writeb16(priv, LM92_THIGH_REG, (b16_t)arg); - sndbg("THIGH: %08x ret: %d\n", (b16_t)arg, ret); + sninfo("THIGH: %08x ret: %d\n", (b16_t)arg, ret); break; /* Read from the identification register. Arg: uint16_t* pointer */ @@ -615,12 +615,12 @@ static int lm92_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR uint16_t *ptr = (FAR uint16_t *)((uintptr_t)arg); DEBUGASSERT(ptr != NULL); ret = lm92_readid(priv, ptr); - sndbg("id: %04x ret: %d\n", *ptr, ret); + sninfo("id: %04x ret: %d\n", *ptr, ret); } break; default: - sndbg("Unrecognized cmd: %d\n", cmd); + snerr("ERROR: Unrecognized cmd: %d\n", cmd); ret = -ENOTTY; break; } @@ -668,7 +668,7 @@ int lm92_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, priv = (FAR struct lm92_dev_s *)kmm_malloc(sizeof(struct lm92_dev_s)); if (priv == NULL) { - sndbg("Failed to allocate instance\n"); + snerr("ERROR: Failed to allocate instance\n"); return -ENOMEM; } @@ -681,7 +681,7 @@ int lm92_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, ret = register_driver(devpath, &g_lm92fops, 0666, priv); if (ret < 0) { - sndbg("Failed to register driver: %d\n", ret); + snerr("ERROR: Failed to register driver: %d\n", ret); kmm_free(priv); } diff --git a/drivers/sensors/lsm9ds1.c b/drivers/sensors/lsm9ds1.c index 10f902aeaadb90ddfd7e9b6d010971d923b8b894..ae69bd68c7eb3c42724f045ba3357545ef172302 100644 --- a/drivers/sensors/lsm9ds1.c +++ b/drivers/sensors/lsm9ds1.c @@ -660,7 +660,7 @@ static int lsm9ds1_readreg8(FAR struct lsm9ds1_dev_s *priv, uint8_t regaddr, ret = i2c_write(priv->i2c, &config, ®addr, sizeof(regaddr)); if (ret < 0) { - sndbg("i2c_write failed: %d\n", ret); + snerr("ERROR: i2c_write failed: %d\n", ret); return ret; } @@ -669,11 +669,11 @@ static int lsm9ds1_readreg8(FAR struct lsm9ds1_dev_s *priv, uint8_t regaddr, ret = i2c_read(priv->i2c, &config, regval, sizeof(*regval)); if (ret < 0) { - sndbg("i2c_read failed: %d\n", ret); + snerr("ERROR: i2c_read failed: %d\n", ret); return ret; } - snvdbg("addr: %02x value: %02x\n", regaddr, *regval); + sninfo("addr: %02x value: %02x\n", regaddr, *regval); return OK; } @@ -712,11 +712,11 @@ static int lsm9ds1_writereg8(FAR struct lsm9ds1_dev_s *priv, uint8_t regaddr, ret = i2c_write(priv->i2c, &config, buffer, sizeof(buffer)); if (ret < 0) { - sndbg("i2c_write failed: %d\n", ret); + snerr("ERROR: i2c_write failed: %d\n", ret); return ret; } - snvdbg("addr: %02x value: %02x\n", regaddr, regval); + sninfo("addr: %02x value: %02x\n", regaddr, regval); return OK; } @@ -741,7 +741,7 @@ static int lsm9ds1_modifyreg8(FAR struct lsm9ds1_dev_s *priv, uint8_t regaddr, ret = lsm9ds1_readreg8(priv, regaddr, ®val); if (ret < 0) { - sndbg("lsm9ds1_readreg8 failed: %d\n", ret); + snerr("ERROR: lsm9ds1_readreg8 failed: %d\n", ret); return ret; } @@ -751,7 +751,7 @@ static int lsm9ds1_modifyreg8(FAR struct lsm9ds1_dev_s *priv, uint8_t regaddr, ret = lsm9ds1_writereg8(priv, regaddr, regval); if (ret < 0) { - sndbg("lsm9ds1_writereg8 failed: %d\n", ret); + snerr("ERROR: lsm9ds1_writereg8 failed: %d\n", ret); return ret; } @@ -793,13 +793,13 @@ static int lsm9ds1accelgyro_config(FAR struct lsm9ds1_dev_s *priv) ret = lsm9ds1_readreg8(priv, LSM9DS1_WHO_AM_I, ®val); if (ret < 0) { - sndbg("lsm9ds1_readreg8 failed: %d\n", ret); + snerr("ERROR: lsm9ds1_readreg8 failed: %d\n", ret); return ret; } if (regval != LSM9DS1_WHO_AM_I_VALUE) { - sndbg("Invalid device identification %02x\n", regval); + snerr("ERROR: Invalid device identification %02x\n", regval); return -ENODEV; } @@ -1047,13 +1047,13 @@ static int lsm9ds1mag_config(FAR struct lsm9ds1_dev_s *priv) ret = lsm9ds1_readreg8(priv, LSM9DS1_WHO_AM_I_M, ®val); if (ret < 0) { - sndbg("lsm9ds1_readreg8 failed: %d\n", ret); + snerr("ERROR: lsm9ds1_readreg8 failed: %d\n", ret); return ret; } if (regval != LSM9DS1_WHO_AM_I_M_VALUE) { - sndbg("Invalid device identification %02x\n", regval); + snerr("ERROR: Invalid device identification %02x\n", regval); return -ENODEV; } @@ -1280,7 +1280,7 @@ static ssize_t lsm9ds1_read(FAR struct file *filep, FAR char *buffer, ret = lsm9ds1_readreg8(priv, regaddr, &lo); if (ret < 0) { - sndbg("lsm9ds1_readreg8 failed: %d\n", ret); + snerr("ERROR: lsm9ds1_readreg8 failed: %d\n", ret); return (ssize_t)ret; } @@ -1291,7 +1291,7 @@ static ssize_t lsm9ds1_read(FAR struct file *filep, FAR char *buffer, ret = lsm9ds1_readreg8(priv, regaddr, &hi); if (ret < 0) { - sndbg("lsm9ds1_readreg8 failed: %d\n", ret); + snerr("ERROR: lsm9ds1_readreg8 failed: %d\n", ret); return (ssize_t)ret; } @@ -1390,20 +1390,20 @@ static int lsm9ds1_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SNIOC_SETSAMPLERATE: ret = priv->ops->setsamplerate(priv, (uint32_t)arg); - sndbg("sample rate: %08x ret: %d\n", (uint32_t)arg, ret); + sninfo("sample rate: %08x ret: %d\n", (uint32_t)arg, ret); break; /* Set the full-scale range. Arg: uint32_t value. */ case SNIOC_SETFULLSCALE: ret = priv->ops->setfullscale(priv, (uint32_t)arg); - sndbg("full-scale range: %08x ret: %d\n", (uint32_t)arg, ret); + sninfo("full-scale range: %08x ret: %d\n", (uint32_t)arg, ret); break; /* Unrecognized commands */ default: - sndbg("Unrecognized cmd: %d arg: %lu\n", cmd, arg); + snerr("ERROR: Unrecognized cmd: %d arg: %lu\n", cmd, arg); ret = -ENOTTY; break; } @@ -1453,7 +1453,7 @@ static int lsm9ds1_register(FAR const char *devpath, priv = (FAR struct lsm9ds1_dev_s *)kmm_malloc(sizeof(*priv)); if (priv == NULL) { - sndbg("Failed to allocate instance\n"); + snerr("ERROR: Failed to allocate instance\n"); return -ENOMEM; } @@ -1468,7 +1468,7 @@ static int lsm9ds1_register(FAR const char *devpath, ret = priv->ops->config(priv); if (ret < 0) { - sndbg("Failed to configure device: %d\n", ret); + snerr("ERROR: Failed to configure device: %d\n", ret); kmm_free(priv); return ret; } @@ -1478,7 +1478,7 @@ static int lsm9ds1_register(FAR const char *devpath, ret = register_driver(devpath, &g_fops, 0666, priv); if (ret < 0) { - sndbg("Failed to register driver: %d\n", ret); + snerr("ERROR: Failed to register driver: %d\n", ret); kmm_free(priv); return ret; } diff --git a/drivers/sensors/max31855.c b/drivers/sensors/max31855.c index d3e5b8e8f6ed96b77af88be3dcac5dc5fc7578ea..19800a1c598399e2d1c4beeca90344a0ea70a9c6 100644 --- a/drivers/sensors/max31855.c +++ b/drivers/sensors/max31855.c @@ -189,13 +189,13 @@ static ssize_t max31855_read(FAR struct file *filep, FAR char *buffer, size_t bu if (!buffer) { - sndbg("Buffer is null\n"); + snerr("ERROR: Buffer is null\n"); return -EINVAL; } if (buflen != 2) { - sndbg("You can't read something other than 16 bits (2 bytes)\n"); + snerr("ERROR: You can't read something other than 16 bits (2 bytes)\n"); return -EINVAL; } @@ -218,7 +218,7 @@ static ssize_t max31855_read(FAR struct file *filep, FAR char *buffer, size_t bu regval |= (regmsb & 0xFF00) << 8; regval |= (regmsb & 0xFF) << 24; - sndbg("Read from MAX31855 = 0x%08X\n", regval); + sninfo("Read from MAX31855 = 0x%08X\n", regval); /* If negative, fix signal bits */ @@ -235,21 +235,21 @@ static ssize_t max31855_read(FAR struct file *filep, FAR char *buffer, size_t bu if (regval & MAX31855_FAULT) { - sndbg("Error: A fault was detected by MAX31855:\n"); + snerr("ERROR: A fault was detected by MAX31855:\n"); if (regval & MAX31855_SHORT_VCC) { - sndbg("The thermocouple input is shorted to VCC!\n"); + snerr(" The thermocouple input is shorted to VCC!\n"); } if (regval & MAX31855_SHORT_GND) { - sndbg("The thermocouple input is shorted to GND!\n"); + snerr(" The thermocouple input is shorted to GND!\n"); } if (regval & MAX31855_OPEN_CIRCUIT) { - sndbg("The thermocouple input is not connected!\n"); + snerr(" The thermocouple input is not connected!\n"); } ret = -EINVAL; @@ -308,7 +308,7 @@ int max31855_register(FAR const char *devpath, FAR struct spi_dev_s *spi) priv = (FAR struct max31855_dev_s *)kmm_malloc(sizeof(struct max31855_dev_s)); if (priv == NULL) { - sndbg("Failed to allocate instance\n"); + snerr("ERROR: Failed to allocate instance\n"); return -ENOMEM; } @@ -320,7 +320,7 @@ int max31855_register(FAR const char *devpath, FAR struct spi_dev_s *spi) ret = register_driver(devpath, &g_max31855fops, 0666, priv); if (ret < 0) { - sndbg("Failed to register driver: %d\n", ret); + snerr("ERROR: Failed to register driver: %d\n", ret); kmm_free(priv); } diff --git a/drivers/sensors/max6675.c b/drivers/sensors/max6675.c index 329f5185c5cbbf57293b076b0c31c262a4914ce5..1a97df163c183e14a781dc55bc999d27be7b6bbc 100644 --- a/drivers/sensors/max6675.c +++ b/drivers/sensors/max6675.c @@ -185,13 +185,13 @@ static ssize_t max6675_read(FAR struct file *filep, FAR char *buffer, size_t buf if (!buffer) { - sndbg("Buffer is null\n"); + snerr("ERROR: Buffer is null\n"); return -EINVAL; } if (buflen != 2) { - sndbg("You can't read something other than 16 bits (2 bytes)\n"); + snerr("ERROR: You can't read something other than 16 bits (2 bytes)\n"); return -EINVAL; } @@ -212,13 +212,13 @@ static ssize_t max6675_read(FAR struct file *filep, FAR char *buffer, size_t buf regval = (regmsb & 0xFF00) >> 8; regval |= (regmsb & 0xFF) << 8; - sndbg("Read from MAX6675 = 0x%04X\n", regval); + sninfo("Read from MAX6675 = 0x%04X\n", regval); /* Verify if the device ID bit is really zero */ if (regval & MAX6675_DEV_ID) { - sndbg("ERROR: The Device ID bit needs to be 0 !\n"); + snerr("ERROR: The Device ID bit needs to be 0 !\n"); ret = -EINVAL; } @@ -226,7 +226,7 @@ static ssize_t max6675_read(FAR struct file *filep, FAR char *buffer, size_t buf if (regval & MAX6675_OPEN_CIRCUIT) { - sndbg("The thermocouple input is not connected!\n"); + snerr("ERROR: The thermocouple input is not connected!\n"); ret = -EINVAL; } @@ -285,7 +285,7 @@ int max6675_register(FAR const char *devpath, FAR struct spi_dev_s *spi) priv = (FAR struct max6675_dev_s *)kmm_malloc(sizeof(struct max6675_dev_s)); if (priv == NULL) { - sndbg("Failed to allocate instance\n"); + snerr("ERROR: Failed to allocate instance\n"); return -ENOMEM; } @@ -297,7 +297,7 @@ int max6675_register(FAR const char *devpath, FAR struct spi_dev_s *spi) ret = register_driver(devpath, &g_max6675fops, 0666, priv); if (ret < 0) { - sndbg("Failed to register driver: %d\n", ret); + snerr("ERROR: Failed to register driver: %d\n", ret); kmm_free(priv); } diff --git a/drivers/sensors/mb7040.c b/drivers/sensors/mb7040.c index 4308b2f73e7c4acbe3401d8da3a0844370c8ea49..2bdaecee0ef583949d5cf458f58dc5ffc68f3127 100644 --- a/drivers/sensors/mb7040.c +++ b/drivers/sensors/mb7040.c @@ -131,7 +131,7 @@ static int mb7040_measurerange(FAR struct mb7040_dev_s *priv) uint8_t regaddr; int ret; - sndbg("addr: %02x\n", regaddr); + sninfo("addr: %02x\n", regaddr); /* Set up the I2C configuration */ @@ -146,7 +146,7 @@ static int mb7040_measurerange(FAR struct mb7040_dev_s *priv) ret = i2c_write(priv->i2c, &config, ®addr, sizeof(regaddr)); if (ret < 0) { - sndbg("i2c_write failed: %d\n", ret); + snerr("ERROR: i2c_write failed: %d\n", ret); } return ret; @@ -178,12 +178,12 @@ static int mb7040_readrange(FAR struct mb7040_dev_s *priv, ret = i2c_read(priv->i2c, &config, buffer, sizeof(buffer)); if (ret < 0) { - sndbg("i2c_read failed: %d\n", ret); + snerr("ERROR: i2c_read failed: %d\n", ret); return ret; } *range = (uint16_t)buffer[0] << 8 | (uint16_t)buffer[1]; - sndbg("range: %04x ret: %d\n", *range, ret); + sninfo("range: %04x ret: %d\n", *range, ret); return ret; } @@ -201,7 +201,7 @@ static int mb7040_changeaddr(FAR struct mb7040_dev_s *priv, uint8_t addr) uint8_t buffer[3]; int ret; - sndbg("new addr: %02x\n", addr); + sninfo("new addr: %02x\n", addr); /* Sanity check */ @@ -225,7 +225,7 @@ static int mb7040_changeaddr(FAR struct mb7040_dev_s *priv, uint8_t addr) ret = i2c_write(priv->i2c, &config, buffer, sizeof(buffer)); if (ret < 0) { - sndbg("i2c_write failed: %d\n", ret); + snerr("ERROR: i2c_write failed: %d\n", ret); return ret; } @@ -324,7 +324,8 @@ static int mb7040_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { *ptr = (int32_t)range; } - sndbg("range: %04x ret: %d\n", *ptr, ret); + + sninfo("range: %04x ret: %d\n", *ptr, ret); } break; @@ -332,13 +333,13 @@ static int mb7040_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SNIOC_CHANGEADDR: ret = mb7040_changeaddr(priv, (uint8_t)arg); - sndbg("new addr: %02x ret: %d\n", *(uint8_t *)arg, ret); + sninfo("new addr: %02x ret: %d\n", *(uint8_t *)arg, ret); break; /* Unrecognized commands */ default: - sndbg("Unrecognized cmd: %d arg: %ld\n", cmd, arg); + snerr("ERROR: Unrecognized cmd: %d arg: %ld\n", cmd, arg); ret = -ENOTTY; break; } @@ -381,7 +382,7 @@ int mb7040_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, priv = (FAR struct mb7040_dev_s *)kmm_malloc(sizeof(*priv)); if (priv == NULL) { - sndbg("Failed to allocate instance\n"); + snerr("ERROR: Failed to allocate instance\n"); return -ENOMEM; } @@ -393,7 +394,7 @@ int mb7040_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, ret = register_driver(devpath, &g_fops, 0666, priv); if (ret < 0) { - sndbg("Failed to register driver: %d\n", ret); + snerr("ERROR: Failed to register driver: %d\n", ret); kmm_free(priv); } diff --git a/drivers/sensors/mcp9844.c b/drivers/sensors/mcp9844.c index c21e4155606ea97d70d3d5beef0d040118a465cd..77dcee773e8b274e771a80c9e5ccf5f85a382697 100644 --- a/drivers/sensors/mcp9844.c +++ b/drivers/sensors/mcp9844.c @@ -140,7 +140,7 @@ static int mcp9844_read_u16(FAR struct mcp9844_dev_s *priv, ret = i2c_write(priv->i2c, &config, ®addr, 1); if (ret < 0) { - sndbg ("i2c_write failed: %d\n", ret); + snerr ("i2c_write failed: %d\n", ret); return ret; } @@ -149,7 +149,7 @@ static int mcp9844_read_u16(FAR struct mcp9844_dev_s *priv, ret = i2c_read(priv->i2c, &config, buffer, 2); if (ret < 0) { - sndbg ("i2c_read failed: %d\n", ret); + snerr ("i2c_read failed: %d\n", ret); return ret; } @@ -157,7 +157,7 @@ static int mcp9844_read_u16(FAR struct mcp9844_dev_s *priv, *value = (((uint16_t)(buffer[0]))<<8) + ((uint16_t)(buffer[1])); - sndbg("addr: %02x value: %08x ret: %d\n", regaddr, *value, ret); + sninfo("addr: %02x value: %08x ret: %d\n", regaddr, *value, ret); return OK; } @@ -174,7 +174,7 @@ static int mcp9844_write_u16(FAR struct mcp9844_dev_s *priv, { struct i2c_config_s config; - sndbg("addr: %02x value: %08x\n", regaddr, regval); + sninfo("addr: %02x value: %08x\n", regaddr, regval); /* Set up a 3 byte message to send */ @@ -293,7 +293,7 @@ static int mcp9844_ioctl(FAR struct file *filep, int cmd, unsigned long arg) } else { - sndbg("ioctl::SNIOC_READTEMP - mcp9844_read_u16 failed - no temperature retrieved\n"); + snerr("ERROR: ioctl::SNIOC_READTEMP - mcp9844_read_u16 failed - no temperature retrieved\n"); } } break; @@ -303,13 +303,13 @@ static int mcp9844_ioctl(FAR struct file *filep, int cmd, unsigned long arg) ret = mcp9844_write_u16(priv, MCP9844_RESO_REG, (uint16_t)(arg)); if (ret != OK) { - sndbg("ioctl::SNIOC_SETRESOLUTION - mcp9844_write_u16 failed - no resolution set\n"); + snerr("ERROR: ioctl::SNIOC_SETRESOLUTION - mcp9844_write_u16 failed - no resolution set\n"); } } break; default: - sndbg("Unrecognized cmd: %d\n", cmd); + snerr("ERROR: Unrecognized cmd: %d\n", cmd); ret = -ENOTTY; break; } @@ -351,7 +351,7 @@ int mcp9844_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, if (priv == NULL) { - sndbg("Failed to allocate instance\n"); + snerr("ERROR: Failed to allocate instance\n"); return -ENOMEM; } @@ -363,7 +363,7 @@ int mcp9844_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, int ret = register_driver(devpath, &g_mcp9844_fops, 0666, priv); if (ret < 0) { - sndbg("Failed to register driver: %d\n", ret); + snerr("ERROR: Failed to register driver: %d\n", ret); kmm_free(priv); } diff --git a/drivers/sensors/mpl115a.c b/drivers/sensors/mpl115a.c index 0c4e87414c32a72cd65d044caf3678d225c6f57f..38763f5c71dd5d9b2315e94b31224d1c23ba1d04 100644 --- a/drivers/sensors/mpl115a.c +++ b/drivers/sensors/mpl115a.c @@ -157,7 +157,7 @@ static uint8_t mpl115a_getreg8(FAR struct mpl115a_dev_s *priv, uint8_t regaddr) (void)SPI_LOCK(priv->spi, false); #ifdef CONFIG_MPL115A_REGDEBUG - dbg("%02x->%02x\n", regaddr, regval); + _err("%02x->%02x\n", regaddr, regval); #endif return regval; } @@ -176,25 +176,25 @@ static void mpl115a_updatecaldata(FAR struct mpl115a_dev_s *priv) priv->mpl115a_cal_a0 = mpl115a_getreg8(priv, MPL115A_BASE_CMD | (MPL115A_A0_MSB << 1)) << 8; priv->mpl115a_cal_a0 |= mpl115a_getreg8(priv, MPL115A_BASE_CMD | (MPL115A_A0_LSB << 1)); - sndbg("a0 = %d\n", priv->mpl115a_cal_a0); + sninfo("a0 = %d\n", priv->mpl115a_cal_a0); /* Get b1 coefficient */ priv->mpl115a_cal_b1 = mpl115a_getreg8(priv, MPL115A_BASE_CMD | (MPL115A_B1_MSB << 1)) << 8; priv->mpl115a_cal_b1 |= mpl115a_getreg8(priv, MPL115A_BASE_CMD | (MPL115A_B1_LSB << 1)); - sndbg("b1 = %d\n", priv->mpl115a_cal_b1); + sninfo("b1 = %d\n", priv->mpl115a_cal_b1); /* Get b2 coefficient */ priv->mpl115a_cal_b2 = mpl115a_getreg8(priv, MPL115A_BASE_CMD | (MPL115A_B2_MSB << 1)) << 8; priv->mpl115a_cal_b2 |= mpl115a_getreg8(priv, MPL115A_BASE_CMD | (MPL115A_B2_LSB << 1)); - sndbg("b2 = %d\n", priv->mpl115a_cal_b2); + sninfo("b2 = %d\n", priv->mpl115a_cal_b2); /* Get c12 coefficient */ priv->mpl115a_cal_c12 = mpl115a_getreg8(priv, MPL115A_BASE_CMD | (MPL115A_C12_MSB << 1)) << 8; priv->mpl115a_cal_c12 |= mpl115a_getreg8(priv, MPL115A_BASE_CMD | (MPL115A_C12_LSB << 1)); - sndbg("c12 = %d\n", priv->mpl115a_cal_c12); + sninfo("c12 = %d\n", priv->mpl115a_cal_c12); } /**************************************************************************** @@ -220,13 +220,13 @@ static void mpl115a_read_press_temp(FAR struct mpl115a_dev_s *priv) priv->mpl115a_pressure |= mpl115a_getreg8(priv, MPL115A_BASE_CMD | (MPL115A_PADC_LSB << 1)); priv->mpl115a_pressure >>= 6; /* Padc is 10bit unsigned */ - sndbg("Pressure = %d\n", priv->mpl115a_pressure); + sninfo("Pressure = %d\n", priv->mpl115a_pressure); priv->mpl115a_temperature = mpl115a_getreg8(priv, MPL115A_BASE_CMD | (MPL115A_TADC_MSB << 1)) << 8; priv->mpl115a_temperature |= mpl115a_getreg8(priv, MPL115A_BASE_CMD | (MPL115A_TADC_LSB << 1)); priv->mpl115a_temperature >>= 6; /* Tadc is 10bit unsigned */ - sndbg("Temperature = %d\n", priv->mpl115a_temperature); + sninfo("Temperature = %d\n", priv->mpl115a_temperature); } /**************************************************************************** @@ -274,7 +274,7 @@ static int mpl115a_getpressure(FAR struct mpl115a_dev_s *priv) * This may be eliminated by right shifting the result 4 bits. */ - sndbg("Final Pressure = %d\n", pressure >> 4); + sninfo("Final Pressure = %d\n", pressure >> 4); return pressure; } @@ -316,13 +316,13 @@ static ssize_t mpl115a_read(FAR struct file *filep, FAR char *buffer, size_t buf if (!buffer) { - sndbg("Buffer is null\n"); + snerr("ERROR: Buffer is null\n"); return -1; } if (buflen != 2) { - sndbg("You can't read something other than 16 bits (2 bytes)\n"); + snerr("ERROR: You can't read something other than 16 bits (2 bytes)\n"); return -1; } @@ -378,7 +378,7 @@ int mpl115a_register(FAR const char *devpath, FAR struct spi_dev_s *spi) priv = (FAR struct mpl115a_dev_s *)kmm_malloc(sizeof(struct mpl115a_dev_s)); if (!priv) { - sndbg("Failed to allocate instance\n"); + snerr("ERROR: Failed to allocate instance\n"); return -ENOMEM; } @@ -397,7 +397,7 @@ int mpl115a_register(FAR const char *devpath, FAR struct spi_dev_s *spi) ret = register_driver(devpath, &g_mpl115afops, 0666, priv); if (ret < 0) { - sndbg("Failed to register driver: %d\n", ret); + snerr("ERROR: Failed to register driver: %d\n", ret); kmm_free(priv); } diff --git a/drivers/sensors/ms58xx.c b/drivers/sensors/ms58xx.c index 1cbcdc37e94f4df82a0ed3a52a99bac7b6140c66..47f04e57cae2bb784155491d35132354c2ec4bcd 100644 --- a/drivers/sensors/ms58xx.c +++ b/drivers/sensors/ms58xx.c @@ -306,14 +306,14 @@ static int ms58xx_readu16(FAR struct ms58xx_dev_s *priv, uint8_t regaddr, uint8_t buffer[2]; int ret; - sndbg("addr: %02x\n", regaddr); + sninfo("addr: %02x\n", regaddr); /* Write the register address */ ret = ms58xx_i2c_write(priv, ®addr, sizeof(regaddr)); if (ret < 0) { - sndbg("i2c_write failed: %d\n", ret); + snerr("ERROR: i2c_write failed: %d\n", ret); return ret; } @@ -322,12 +322,12 @@ static int ms58xx_readu16(FAR struct ms58xx_dev_s *priv, uint8_t regaddr, ret = ms58xx_i2c_read(priv, buffer, sizeof(buffer)); if (ret < 0) { - sndbg("i2c_read failed: %d\n", ret); + snerr("ERROR: i2c_read failed: %d\n", ret); return ret; } *regval = (uint16_t)buffer[0] << 8 | (uint16_t)buffer[1]; - sndbg("value: %04x ret: %d\n", *regval, ret); + sninfo("value: %04x ret: %d\n", *regval, ret); return ret; } @@ -346,14 +346,14 @@ static int ms58xx_readadc(FAR struct ms58xx_dev_s *priv, FAR uint32_t *adc) int ret; regaddr = MS58XX_ADC_REG; - sndbg("addr: %02x\n", regaddr); + sninfo("addr: %02x\n", regaddr); /* Write the register address */ ret = ms58xx_i2c_write(priv, ®addr, sizeof(regaddr)); if (ret < 0) { - sndbg("i2c_write failed: %d\n", ret); + snerr("ERROR: i2c_write failed: %d\n", ret); return ret; } @@ -362,7 +362,7 @@ static int ms58xx_readadc(FAR struct ms58xx_dev_s *priv, FAR uint32_t *adc) ret = ms58xx_i2c_read(priv, buffer, sizeof(buffer)); if (ret < 0) { - sndbg("i2c_read failed: %d\n", ret); + snerr("ERROR: i2c_read failed: %d\n", ret); return ret; } @@ -370,7 +370,7 @@ static int ms58xx_readadc(FAR struct ms58xx_dev_s *priv, FAR uint32_t *adc) (uint32_t)buffer[1] << 8 | (uint32_t)buffer[2]; - sndbg("adc: %06x ret: %d\n", *adc, ret); + sninfo("adc: %06x ret: %d\n", *adc, ret); return ret; } @@ -483,7 +483,7 @@ static int ms58xx_setosr(FAR struct ms58xx_dev_s *priv, uint16_t osr) { int ret = OK; - sndbg("osr: %04x\n", osr); + sninfo("osr: %04x\n", osr); switch (priv->model) { @@ -558,7 +558,7 @@ static int ms58xx_readprom(FAR struct ms58xx_dev_s *priv) ret = ms58xx_readu16(priv, MS58XX_PROM_REG + i * 2, prom + i); if (ret < 0) { - sndbg("ms58xx_readu16 failed: %d\n", ret); + snerr("ERROR: ms58xx_readu16 failed: %d\n", ret); return ret; } } @@ -568,7 +568,7 @@ static int ms58xx_readprom(FAR struct ms58xx_dev_s *priv) if (crc != ms58xx_crc(prom, crcindex, crcmask)) { - sndbg("crc mismatch\n"); + snerr("ERROR: crc mismatch\n"); return -ENODEV; } @@ -620,14 +620,14 @@ static int ms58xx_reset(FAR struct ms58xx_dev_s *priv) int ret; regaddr = MS58XX_RESET_REG; - sndbg("addr: %02x\n", regaddr); + sninfo("addr: %02x\n", regaddr); /* Write the register address */ ret = ms58xx_i2c_write(priv, ®addr, sizeof(regaddr)); if (ret < 0) { - sndbg("i2c_write failed: %d\n", ret); + snerr("ERROR: i2c_write failed: %d\n", ret); return ret; } @@ -636,7 +636,7 @@ static int ms58xx_reset(FAR struct ms58xx_dev_s *priv) ret = ms58xx_readprom(priv); if (ret < 0) { - sndbg("ms58xx_readprom failed: %d\n", ret); + snerr("ERROR: ms58xx_readprom failed: %d\n", ret); } return ret; @@ -656,14 +656,14 @@ static int ms58xx_convert(FAR struct ms58xx_dev_s *priv, uint8_t regaddr, int ret; regaddr |= priv->osr; - sndbg("addr: %02x\n", regaddr); + sninfo("addr: %02x\n", regaddr); /* Write the register address */ ret = ms58xx_i2c_write(priv, ®addr, sizeof(regaddr)); if (ret < 0) { - sndbg("i2c_write failed: %d\n", ret); + snerr("ERROR: i2c_write failed: %d\n", ret); } /* Wait for the conversion to end */ @@ -675,7 +675,7 @@ static int ms58xx_convert(FAR struct ms58xx_dev_s *priv, uint8_t regaddr, ret = ms58xx_readadc(priv, regval); if (ret < 0) { - sndbg("ms58xx_readadc failed: %d\n", ret); + snerr("ERROR: ms58xx_readadc failed: %d\n", ret); return ret; } @@ -714,14 +714,14 @@ static int ms58xx_measure(FAR struct ms58xx_dev_s *priv) ret = ms58xx_convert(priv, MS58XX_PRESS_REG, &rawpress); if (ret < 0) { - sndbg("ms58xx_convert failed: %d\n", ret); + snerr("ERROR: ms58xx_convert failed: %d\n", ret); return ret; } ret = ms58xx_convert(priv, MS58XX_TEMP_REG, &rawtemp); if (ret < 0) { - sndbg("ms58xx_convert failed: %d\n", ret); + snerr("ERROR: ms58xx_convert failed: %d\n", ret); return ret; } @@ -923,7 +923,7 @@ static int ms58xx_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR int32_t *ptr = (FAR int32_t *)((uintptr_t)arg); DEBUGASSERT(ptr != NULL); *ptr = priv->temp; - sndbg("temp: %08x\n", *ptr); + sninfo("temp: %08x\n", *ptr); } break; @@ -934,7 +934,7 @@ static int ms58xx_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR int32_t *ptr = (FAR int32_t *)((uintptr_t)arg); DEBUGASSERT(ptr != NULL); *ptr = priv->press; - sndbg("press: %08x\n", *ptr); + sninfo("press: %08x\n", *ptr); } break; @@ -949,13 +949,13 @@ static int ms58xx_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case SNIOC_OVERSAMPLING: ret = ms58xx_setosr(priv, (uint16_t)arg); - sndbg("osr: %04x ret: %d\n", *(uint16_t *)arg, ret); + sninfo("osr: %04x ret: %d\n", *(uint16_t *)arg, ret); break; /* Unrecognized commands */ default: - sndbg("Unrecognized cmd: %d arg: %ld\n", cmd, arg); + snerr("ERROR: Unrecognized cmd: %d arg: %ld\n", cmd, arg); ret = -ENOTTY; break; } @@ -1010,7 +1010,7 @@ int ms58xx_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, priv = (FAR struct ms58xx_dev_s *)kmm_malloc(sizeof(*priv)); if (priv == NULL) { - sndbg("Failed to allocate instance\n"); + snerr("ERROR: Failed to allocate instance\n"); return -ENOMEM; } @@ -1177,15 +1177,15 @@ int ms58xx_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, ret = ms58xx_setosr(priv, osr); if (ret < 0) { - sndbg("ms58xx_setosr failed: %d\n", ret); - goto err; + snerr("ERROR: ms58xx_setosr failed: %d\n", ret); + goto errout; } ret = ms58xx_reset(priv); if (ret < 0) { - sndbg("ms58xx_reset failed: %d\n", ret); - goto err; + snerr("ERROR: ms58xx_reset failed: %d\n", ret); + goto errout; } /* Register the character driver */ @@ -1193,13 +1193,13 @@ int ms58xx_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, ret = register_driver(devpath, &g_fops, 0666, priv); if (ret < 0) { - sndbg("Failed to register driver: %d\n", ret); - goto err; + snerr("ERROR: Failed to register driver: %d\n", ret); + goto errout; } return ret; -err: +errout: kmm_free(priv); return ret; } diff --git a/drivers/sensors/qencoder.c b/drivers/sensors/qencoder.c index 34cb029d4c3f32968c25f2e898e57426d540e8c6..eba9337a011e6c482b009541de024c5f0849a47f 100644 --- a/drivers/sensors/qencoder.c +++ b/drivers/sensors/qencoder.c @@ -128,7 +128,7 @@ static int qe_open(FAR struct file *filep) uint8_t tmp; int ret; - snvdbg("crefs: %d\n", upper->crefs); + sninfo("crefs: %d\n", upper->crefs); /* Get exclusive access to the device structures */ @@ -162,7 +162,7 @@ static int qe_open(FAR struct file *filep) /* Yes.. perform one time hardware initialization. */ DEBUGASSERT(lower->ops->setup != NULL); - snvdbg("calling setup\n"); + sninfo("calling setup\n"); ret = lower->ops->setup(lower); if (ret < 0) @@ -197,7 +197,7 @@ static int qe_close(FAR struct file *filep) FAR struct qe_upperhalf_s *upper = inode->i_private; int ret; - snvdbg("crefs: %d\n", upper->crefs); + sninfo("crefs: %d\n", upper->crefs); /* Get exclusive access to the device structures */ @@ -227,7 +227,7 @@ static int qe_close(FAR struct file *filep) /* Disable the PWM device */ DEBUGASSERT(lower->ops->shutdown != NULL); - snvdbg("calling shutdown: %d\n"); + sninfo("calling shutdown: %d\n"); lower->ops->shutdown(lower); } @@ -284,7 +284,7 @@ static int qe_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR struct qe_lowerhalf_s *lower = upper->lower; int ret; - snvdbg("cmd: %d arg: %ld\n", cmd, arg); + sninfo("cmd: %d arg: %ld\n", cmd, arg); DEBUGASSERT(upper && lower); /* Get exclusive access to the device structures */ @@ -326,7 +326,7 @@ static int qe_ioctl(FAR struct file *filep, int cmd, unsigned long arg) default: { - snvdbg("Forwarding unrecognized cmd: %d arg: %ld\n", cmd, arg); + sninfo("Forwarding unrecognized cmd: %d arg: %ld\n", cmd, arg); DEBUGASSERT(lower->ops->ioctl != NULL); ret = lower->ops->ioctl(lower, cmd, arg); } @@ -371,7 +371,7 @@ int qe_register(FAR const char *devpath, FAR struct qe_lowerhalf_s *lower) upper = (FAR struct qe_upperhalf_s *)kmm_zalloc(sizeof(struct qe_upperhalf_s)); if (!upper) { - sndbg("Allocation failed\n"); + snerr("ERROR: Allocation failed\n"); return -ENOMEM; } @@ -382,7 +382,7 @@ int qe_register(FAR const char *devpath, FAR struct qe_lowerhalf_s *lower) /* Register the PWM device */ - snvdbg("Registering %s\n", devpath); + sninfo("Registering %s\n", devpath); return register_driver(devpath, &g_qeops, 0666, upper); } diff --git a/drivers/sensors/zerocross.c b/drivers/sensors/zerocross.c index 980ffdd86ca5a6390dfc77312dcf539c21feec1b..d7bc19e381ae94febb95f9e393066ca1e57458c1 100644 --- a/drivers/sensors/zerocross.c +++ b/drivers/sensors/zerocross.c @@ -244,7 +244,7 @@ static int zc_open(FAR struct file *filep) ret = sem_wait(&priv->exclsem); if (ret < 0) { - snvdbg("ERROR: sem_wait failed: %d\n", ret); + snerr("ERROR: sem_wait failed: %d\n", ret); return ret; } @@ -253,7 +253,7 @@ static int zc_open(FAR struct file *filep) opriv = (FAR struct zc_open_s *)kmm_zalloc(sizeof(struct zc_open_s)); if (!opriv) { - snvdbg("ERROR: Failled to allocate open structure\n"); + snerr("ERROR: Failled to allocate open structure\n"); ret = -ENOMEM; goto errout_with_sem; } @@ -325,7 +325,7 @@ static int zc_close(FAR struct file *filep) ret = sem_wait(&priv->exclsem); if (ret < 0) { - snvdbg("ERROR: sem_wait failed: %d\n", ret); + snerr("ERROR: sem_wait failed: %d\n", ret); return ret; } @@ -338,7 +338,7 @@ static int zc_close(FAR struct file *filep) DEBUGASSERT(curr); if (!curr) { - snvdbg("ERROR: Failed to find open entry\n"); + snerr("ERROR: Failed to find open entry\n"); ret = -ENOENT; goto errout_with_exclsem; } @@ -414,7 +414,7 @@ static int zc_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR struct zc_lowerhalf_s *lower; int ret; - snvdbg("cmd: %d arg: %ld\n", cmd, arg); + sninfo("cmd: %d arg: %ld\n", cmd, arg); DEBUGASSERT(filep && filep->f_priv && filep->f_inode); opriv = filep->f_priv; inode = filep->f_inode; @@ -467,7 +467,7 @@ static int zc_ioctl(FAR struct file *filep, int cmd, unsigned long arg) default: { - snvdbg("Forwarding unrecognized cmd: %d arg: %ld\n", cmd, arg); + sninfo("Forwarding unrecognized cmd: %d arg: %ld\n", cmd, arg); ret = -ENOTTY; } break; @@ -516,7 +516,7 @@ int zc_register(FAR const char *devname, FAR struct zc_lowerhalf_s *lower) if (!priv) { - snvdbg("ERROR: Failed to allocate device structure\n"); + snerr("ERROR: Failed to allocate device structure\n"); return -ENOMEM; } @@ -535,7 +535,7 @@ int zc_register(FAR const char *devname, FAR struct zc_lowerhalf_s *lower) ret = register_driver(devname, &g_zcops, 0666, priv); if (ret < 0) { - snvdbg("ERROR: register_driver failed: %d\n", ret); + snerr("ERROR: register_driver failed: %d\n", ret); sem_destroy(&priv->exclsem); kmm_free(priv); } diff --git a/drivers/sercomm/console.c b/drivers/sercomm/console.c index 53b321964f7a6adcdab311bef5ee9c159e3dc44f..c12c35af5f30714b076900217b7dd7f74b2930a5 100644 --- a/drivers/sercomm/console.c +++ b/drivers/sercomm/console.c @@ -187,7 +187,7 @@ int sercomm_register(FAR const char *path, FAR uart_dev_t *dev) sem_init(&dev->pollsem, 0, 1); #endif - dbg("Registering %s\n", path); + _info("Registering %s\n", path); return register_driver(path, &g_sercom_console_ops, 0666, NULL); } diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index ef4858171dce2d95ee179c57c91b078b29fb57bd..5297a824f808aa21e1490c0206f61199bab4c8a1 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -13,6 +13,11 @@ config DEV_LOWCONSOLE config SERIAL_REMOVABLE bool + default n + +config SERIAL_CONSOLE + bool + default n config 16550_UART bool "16550 UART Chip support" @@ -292,18 +297,22 @@ choice config 16550_UART0_SERIAL_CONSOLE bool "16550 UART0 serial console" depends on 16550_UART0 + select SERIAL_CONSOLE config 16550_UART1_SERIAL_CONSOLE bool "16550 UART1 serial console" depends on 16550_UART1 + select SERIAL_CONSOLE config 16550_UART2_SERIAL_CONSOLE bool "16550 UART2 serial console" depends on 16550_UART2 + select SERIAL_CONSOLE config 16550_UART3_SERIAL_CONSOLE bool "16550 UART3 serial console" depends on 16550_UART3 + select SERIAL_CONSOLE config 16550_NO_SERIAL_CONSOLE bool "No 16550 serial console" @@ -531,7 +540,7 @@ endif # SERIAL_IFLOWCONTROL_WATERMARKS config SERIAL_TIOCSERGSTRUCT bool "Support TIOCSERGSTRUCT" default n - depends on DEBUG && (MCU_SERIAL || 16550_UART) + depends on DEBUG_FEATURES && (MCU_SERIAL || 16550_UART) ---help--- As a debug option, many serial bottom half drivers support the TIOCSERGSTRUCT that allows you to get the internal driver data structure. By default, this @@ -566,89 +575,111 @@ choice config UART_SERIAL_CONSOLE bool "UART" depends on UART_SERIALDRIVER + select SERIAL_CONSOLE config UART0_SERIAL_CONSOLE bool "UART0" depends on UART0_SERIALDRIVER + select SERIAL_CONSOLE config USART0_SERIAL_CONSOLE bool "USART0" depends on USART0_SERIALDRIVER + select SERIAL_CONSOLE config UART1_SERIAL_CONSOLE bool "UART1" depends on UART1_SERIALDRIVER + select SERIAL_CONSOLE config USART1_SERIAL_CONSOLE bool "USART1" depends on USART1_SERIALDRIVER + select SERIAL_CONSOLE config UART2_SERIAL_CONSOLE bool "UART2" depends on UART2_SERIALDRIVER + select SERIAL_CONSOLE config USART2_SERIAL_CONSOLE bool "USART2" depends on USART2_SERIALDRIVER + select SERIAL_CONSOLE config UART3_SERIAL_CONSOLE bool "UART3" depends on UART3_SERIALDRIVER + select SERIAL_CONSOLE config USART3_SERIAL_CONSOLE bool "USART3" depends on USART3_SERIALDRIVER + select SERIAL_CONSOLE config UART4_SERIAL_CONSOLE bool "UART4" depends on UART4_SERIALDRIVER + select SERIAL_CONSOLE config USART4_SERIAL_CONSOLE bool "USART4" depends on USART4_SERIALDRIVER + select SERIAL_CONSOLE config UART5_SERIAL_CONSOLE bool "UART5" depends on UART5_SERIALDRIVER + select SERIAL_CONSOLE config USART5_SERIAL_CONSOLE bool "USART5" depends on USART5_SERIALDRIVER + select SERIAL_CONSOLE config UART6_SERIAL_CONSOLE bool "UART6" depends on UART6_SERIALDRIVER + select SERIAL_CONSOLE config USART6_SERIAL_CONSOLE bool "USART6" depends on USART6_SERIALDRIVER + select SERIAL_CONSOLE config UART7_SERIAL_CONSOLE bool "UART7" depends on UART7_SERIALDRIVER + select SERIAL_CONSOLE config USART7_SERIAL_CONSOLE bool "USART7" depends on USART7_SERIALDRIVER + select SERIAL_CONSOLE config UART8_SERIAL_CONSOLE bool "UART8" depends on UART8_SERIALDRIVER + select SERIAL_CONSOLE config USART8_SERIAL_CONSOLE bool "USART8" depends on USART8_SERIALDRIVER + select SERIAL_CONSOLE config SCI0_SERIAL_CONSOLE bool "SCI0" depends on SCI0_SERIALDRIVER + select SERIAL_CONSOLE config SCI1_SERIAL_CONSOLE bool "SCI1" depends on SCI1_SERIALDRIVER + select SERIAL_CONSOLE config OTHER_SERIAL_CONSOLE bool "Other serial console" + select SERIAL_CONSOLE config NO_SERIAL_CONSOLE bool "No serial console" diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index 2de293d0b037bd5fd0b45fb607d1354785ee27b9..c98867d6ff795042909731afa68b3b80b867dc68 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -178,7 +178,7 @@ static void uart_pollnotify(FAR uart_dev_t *dev, pollevent_t eventset) #endif if (fds->revents != 0) { - fvdbg("Report events: %02x\n", fds->revents); + finfo("Report events: %02x\n", fds->revents); sem_post(fds->sem); } } @@ -998,7 +998,7 @@ int uart_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup) /* Some sanity checking */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev || !fds) { return -ENODEV; @@ -1104,7 +1104,7 @@ int uart_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup) struct pollfd **slot = (struct pollfd **)fds->priv; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!slot) { ret = -EIO; @@ -1369,7 +1369,7 @@ int uart_register(FAR const char *path, FAR uart_dev_t *dev) sem_init(&dev->pollsem, 0, 1); #endif - dbg("Registering %s\n", path); + _info("Registering %s\n", path); return register_driver(path, &g_serialops, 0666, dev); } diff --git a/drivers/serial/uart_16550.c b/drivers/serial/uart_16550.c index c7de1031a38d55966f9aec493ad036bc5980b6c4..022adf3abe4aa5208806bf8abb3bbbc1fd127463 100644 --- a/drivers/serial/uart_16550.c +++ b/drivers/serial/uart_16550.c @@ -829,7 +829,7 @@ static int u16550_interrupt(int irq, void *context) /* Read the modem status register (MSR) to clear */ status = u16550_serialin(priv, UART_MSR_OFFSET); - vdbg("MSR: %02x\n", status); + _info("MSR: %02x\n", status); break; } @@ -840,7 +840,7 @@ static int u16550_interrupt(int irq, void *context) /* Read the line status register (LSR) to clear */ status = u16550_serialin(priv, UART_LSR_OFFSET); - vdbg("LSR: %02x\n", status); + _info("LSR: %02x\n", status); break; } @@ -848,7 +848,7 @@ static int u16550_interrupt(int irq, void *context) default: { - dbg("Unexpected IIR: %02x\n", status); + _err("ERROR: Unexpected IIR: %02x\n", status); break; } } diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index b4c8e93bbc01fdf6df5da7a52489732b170c2961..ff38027e39e1cb99614c17a280fb2f180e51f59a 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -71,6 +71,25 @@ config SPI_CRCGENERATION generation of SPI CRCs. Enables the HWFEAT_CRCGENERATION option as well as the hwfeartures() interface method. +config SPI_CS_CONTROL + bool "SPI CS Behavior Control" + default n + select SPI_HWFEATURES + ---help--- + Enables possibilities to define the behavior of CS. + Also enables the hwfeatures() interface method. + +config SPI_CS_DELAY_CONTROL + bool "SPI CS Delay Control" + default n + ---help--- + Enables possibilities to define the SPI-ChipSelect-Delays like + time between ChipSelect assertion and first Data-Bit, the time + between the last Data-Bit and the de-assertion and the minimum + delay between two ChipSelects. + + This option enables the setdelay() interface method. + if SPI_BITBANG config SPI_BITBANG_VARWIDTH diff --git a/drivers/spi/spi_bitbang.c b/drivers/spi/spi_bitbang.c index 823b330982f734a42527349377b8e31277d2136b..e20a28b2128f50991a285ae71abea699c586fc3f 100644 --- a/drivers/spi/spi_bitbang.c +++ b/drivers/spi/spi_bitbang.c @@ -78,31 +78,6 @@ * information. */ -/* Debug ********************************************************************/ -/* Check if SPI debut is enabled (non-standard.. no support in - * include/debug.h - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_SPI -#endif - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ /**************************************************************************** * Private Function Prototypes @@ -193,7 +168,7 @@ static int spi_lock(FAR struct spi_dev_s *dev, bool lock) { FAR struct spi_bitbang_s *priv = (FAR struct spi_bitbang_s *)dev; - spivdbg("lock=%d\n", lock); + spiinfo("lock=%d\n", lock); if (lock) { /* Take the semaphore (perhaps waiting) */ @@ -236,7 +211,7 @@ static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, { FAR struct spi_bitbang_s *priv = (FAR struct spi_bitbang_s *)dev; - spivdbg("devid=%d selected=%d\n", devid, selected); + spiinfo("devid=%d selected=%d\n", devid, selected); DEBUGASSERT(priv && priv->low->select); priv->low->select(priv, devid, selected); } @@ -263,7 +238,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) DEBUGASSERT(priv && priv->low->setfrequency); actual = priv->low->setfrequency(priv, frequency); - spivdbg("frequency=%d holdtime=%d actual=%d\n", + spiinfo("frequency=%d holdtime=%d actual=%d\n", frequency, priv->holdtime, actual); return actual; } @@ -289,7 +264,7 @@ static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode) DEBUGASSERT(priv && priv->low->setmode); priv->low->setmode(priv, mode); - spivdbg("mode=%d exchange=%p\n", mode, priv->exchange); + spiinfo("mode=%d exchange=%p\n", mode, priv->exchange); } /**************************************************************************** @@ -312,11 +287,11 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) #ifdef CONFIG_SPI_BITBANG_VARWIDTH FAR struct spi_bitbang_s *priv = (FAR struct spi_bitbang_s *)dev; - spivdbg("nbits=%d\n", nbits); + spiinfo("nbits=%d\n", nbits); DEBUGASSERT(priv && nbits > 0 && nbits <= 16); priv->nbits = nbits; #else - spivdbg("nbits=%d\n", nbits); + spiinfo("nbits=%d\n", nbits); DEBUGASSERT(nbits == 8); #endif } @@ -376,7 +351,7 @@ static void spi_exchange(FAR struct spi_dev_s *dev, uint16_t dataout; uint16_t datain; - spivdbg("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); + spiinfo("txbuffer=%p rxbuffer=%p nwords=%d\n", txbuffer, rxbuffer, nwords); DEBUGASSERT(priv && priv->low && priv->low->exchange); /* If there is no data source, send 0xff */ @@ -564,7 +539,7 @@ FAR struct spi_dev_s *spi_create_bitbang(FAR const struct spi_bitbang_ops_s *low priv = (FAR struct spi_bitbang_s *)zalloc(sizeof(struct spi_bitbang_s)); if (!priv) { - spidbg("Failed to allocate the device structure\n"); + spierr("ERROR: Failed to allocate the device structure\n"); return NULL; } diff --git a/drivers/syslog/Kconfig b/drivers/syslog/Kconfig index d273e3d1a3a8293165cb14a7d9c82808d1ac73ee..07a7f92a4c88e7a890e6845c9974407a97848d9d 100644 --- a/drivers/syslog/Kconfig +++ b/drivers/syslog/Kconfig @@ -3,7 +3,13 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -comment "System Logging" +menu "System Logging" + +# Selected if the architecture has its own, built-in SYSLOGging enabled + +config ARCH_SYSLOG + bool + default n config RAMLOG bool "RAM log device support" @@ -20,18 +26,6 @@ config RAMLOG details as needed to support logging. if RAMLOG -config RAMLOG_SYSLOG - bool "Use RAMLOG for SYSLOG" - default n - depends on SYSLOG - ---help--- - Use the RAM logging device for the syslogging interface. If this feature - is enabled (along with SYSLOG), then all debug output (only) will be re-directed - to the circular buffer in RAM. This RAM log can be view from NSH using the - 'dmesg'command. - - Do not enable more than one SYSLOG device. - config RAMLOG_CONSOLE bool "Use RAMLOG for /dev/console" default n @@ -54,7 +48,8 @@ config RAMLOG_CRLF bool "RAMLOG CR/LF" default n ---help--- - Pre-pend a carriage return before every linefeed that goes into the RAM log. + Pre-pend a carriage return before every linefeed that goes into the + RAM log. config RAMLOG_NONBLOCKING bool "RAMLOG non-block reads" @@ -72,21 +67,117 @@ config RAMLOG_NPOLLWAITERS endif -config SYSLOG_CONSOLE - bool "Use SYSLOG for /dev/console" +config DRIVER_NOTE + bool "Scheduler instrumentation driver" default n + depends on SCHED_INSTRUMENTATION_BUFFER + ---help--- + Enable building a serial driver that can be used by an application + to read data from the in-memory, scheduler instrumentatin "note" + buffer. + +config SYSLOG_INTBUFFER + bool "Use interrupt buffer" + default n + ---help--- + Enables an interrupt buffer that will be used to serialize debug + output from interrupt handlers. + +config SYSLOG_INTBUFSIZE + int "Interrupt buffer size" + default 512 + depends on SYSLOG_INTBUFFER + ---help--- + The size of the interrupt buffer in bytes. + +config SYSLOG_TIMESTAMP + bool "Prepend timestamp to syslog message" + default n + ---help--- + Prepend timestamp to syslog message. + +config SYSLOG_SERIAL_CONSOLE + bool + default n + +choice + prompt "System log device" + default SYSLOG_CONSOLE if DEV_CONSOLE + default SYSLOG_NONE if !DEV_CONSOLE + depends on !ARCH_SYSLOG + +config SYSLOG_CHAR + bool "Log to a character device" + ---help--- + Enable the generic character device for the SYSLOG. The full path to the + SYSLOG device is provided by SYSLOG_DEVPATH. A valid character device (or + file) must exist at this path. It will by opened by syslog_initialize. + +config RAMLOG_SYSLOG + bool "Use RAMLOG for SYSLOG" + depends on RAMLOG && !ARCH_SYSLOG + ---help--- + Use the RAM logging device for the syslogging interface. If this + feature is enabled (along with SYSLOG), then all debug output (only) + will be re-directed to the circular buffer in RAM. This RAM log can + be viewed from NSH using the 'dmesg'command. + +config SYSLOG_CONSOLE + bool "Log to /dev/console" depends on DEV_CONSOLE + select SYSLOG_SERIAL_CONSOLE if SERIAL_CONSOLE ---help--- - Use the syslog logging device as a system console. If this feature is enabled - (along with DEV_CONSOLE), then all console output will be re-directed to syslog - output (syslog_putc). This is useful, for example, if the only console is a Telnet - console. Then in that case, console output from non-Telnet threads will go to - the syslog output. + Use the system console as a SYSLOG output device. -config DRIVER_NOTE - bool "Scheduler instrumentation driver" +config SYSLOG_NONE + bool "No SYSLOG device" + ---help--- + syslog() interfaces will be present, but all output will go to the + bit-bucket. + +endchoice + +config SYSLOG_FILE + bool "Sylog file output" default n - depends on SCHED_INSTRUMENTATION_BUFFER ---help--- - Enable building a serial driver that can be used by an application to read data - from the in-memory, scheduler instrumentatin "note" buffer. + Build in support to use a file to collect SYSOG output. File SYSLOG + channels differ from other SYSLOG channels in that they cannot be + established until after fully booting and mounting the target file + system. The function syslog_file_channel() would need to be called + from board-specific bring-up logic AFTER mounting the file system + containing 'devpath'. + + NOTE interrupt level SYSLOG output will be lost in this case unless + the interrupt buffer is used. + +config CONSOLE_SYSLOG + bool "Use SYSLOG for /dev/console" + default n + depends on DEV_CONSOLE && !SYSLOG_CONSOLE + ---help--- + Use the syslog logging device as a system console. If this feature is + enabled (along with DEV_CONSOLE), then all console output will be + re-directed to syslog output (syslog_putc). This is useful, for + example, if the only console is a Telnet console. Then in that case, + console output from non-Telnet threads will go to the syslog output. + +config SYSLOG_CHAR_CRLF + bool "SYSLOG device CR/LF" + default y + depends on SYSLOG_CHAR + ---help--- + Pre-pend a carriage return before every linefeed that goes to the + character device. + +config SYSLOG_DEVPATH + string "System log device" + default "/dev/syslog" + depends on SYSLOG_CHAR + ---help--- + The full path to the system logging device. For the RAMLOG SYSLOG device, + this is normally "/dev/ramlog". For character SYSLOG devices, it should be + some other existing character device (or file) supported by the configuration + (such as "/dev/ttyS1")/ + +endmenu # System logging diff --git a/drivers/syslog/Make.defs b/drivers/syslog/Make.defs index f573217d6de944a94ceedb65b77d2a084f1cf9b0..95583059e16bb954976e0344bef0d69f3b90313f 100644 --- a/drivers/syslog/Make.defs +++ b/drivers/syslog/Make.defs @@ -2,7 +2,7 @@ # drivers/syslog/Make.defs # These drivers support system logging devices # -# 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 @@ -35,60 +35,60 @@ ############################################################################ ############################################################################ -# Include SYSLOG drivers (only one should be enabled) - -ifeq ($(CONFIG_SYSLOG),y) +# Include SYSLOG Infrastructure -# If no special loggin devices are implemented, then the default SYSLOG -# logic at fs/fs_syslog.c will be used +CSRCS += vsyslog.c syslog_stream.c syslog_emergstream.c syslog_channel.c +CSRCS += syslog_putc.c syslog_force.c syslog_flush.c -# (Add other SYSLOG drivers here) +ifeq ($(CONFIG_SYSLOG_INTBUFFER),y) + CSRCS += syslog_intbuffer.c +endif -ifeq ($(CONFIG_RAMLOG),y) - CSRCS += ramlog.c +ifneq ($(CONFIG_ARCH_SYSLOG),y) + CSRCS += syslog_initialize.c endif +# The note driver is hosted in this directory, but is not associated with +# SYSLOGging + ifeq ($(CONFIG_DRIVER_NOTE),y) CSRCS += note_driver.c endif -# (Add other SYSLOG_CONSOLE drivers here) +# The RAMLOG device is usable as a system logging device or standalone -ifeq ($(CONFIG_SYSLOG_CONSOLE),y) - CSRCS += syslog_console.c +ifeq ($(CONFIG_RAMLOG),y) + CSRCS += ramlog.c endif -# Include SYSLOG build support - -DEPPATH += --dep-path syslog -VPATH += :syslog - ############################################################################ -# The RAMLOG can be used even if system logging is not enabled. +# Include SYSLOG drivers (only one should be enabled) -else ifeq ($(CONFIG_RAMLOG),y) +# System logging to a character device (or file) -CSRCS += ramlog.c +CSRCS += syslog_device.c -ifeq ($(CONFIG_DRIVER_NOTE),y) - CSRCS += note_driver.c +ifeq ($(CONFIG_SYSLOG_CHAR),y) +CSRCS += syslog_devchannel.c endif -# Include RAMLOG build support +ifeq ($(CONFIG_SYSLOG_CONSOLE),y) +CSRCS += syslog_consolechannel.c +endif -DEPPATH += --dep-path syslog -VPATH += :syslog +ifeq ($(CONFIG_SYSLOG_FILE),y) +CSRCS += syslog_filechannel.c +endif -############################################################################ -# The scheduler note driver can be used in any event. +# (Add other SYSLOG drivers here) -else ifeq ($(CONFIG_DRIVER_NOTE),y) +ifeq ($(CONFIG_CONSOLE_SYSLOG),y) + CSRCS += syslog_console.c +endif -CSRCS += note_driver.c +# (Add other SYSLOG drivers here) -# Include note driver build support +# Include SYSLOG build support DEPPATH += --dep-path syslog VPATH += :syslog - -endif diff --git a/drivers/syslog/README.txt b/drivers/syslog/README.txt index 2d0445992e27d551d4901eb89fe44686d64a52d2..2764f0e2adf9a37f7f76584d85b327f603fa4327 100644 --- a/drivers/syslog/README.txt +++ b/drivers/syslog/README.txt @@ -1,75 +1,500 @@ drivers/syslog README File ========================== -This README file discusses the SYLOG drivers that can be found in the -drivers/syslog directory. The syslogging interfaces are defined in the -header file include/syslog.h. In NuttX, "syslog output" is really -synonymous to "debug output" and, therefore, the debugging interfaces -defined in the header file include/debug.h are also sysloggin interfaces. - -By default, all system log output goes to console (/dev/console). But that -behavior can be changed by the defining CONFIG_SYSLOG in the NuttX -configuration. In that, case all low-level debug output will go through -syslog_putc(). - -One version of syslog_putc() is defined in fs/fs_syslog.c; that version is -used when CONFIG_SYSLOG_CHAR is defined. That version of syslog_putc() -just integrates with the file system to re-direct debug output to a -character device or to a file. A disadvantage of using the generic character -device for the SYSLOG is that it cannot handle debug output generated from -interrupt level handles. - -If CONFIG_SYSLOG_CHAR is not defined, then other custom SYSLOG drivers -can be used. These custom SYSLOG drivers can do things like handle -unusual logging media and since they can avoid the general file system -interfaces, can be designed to support debug output from interrupt handlers. - -Those custom SYSLOG drivers reside in this directory. - -ramlog.c --------- +SYSLOG Interfaces +================= + + Standard SYSLOG Interfaces + -------------------------- + The NuttX SYSLOG is an architecture for getting debug and status + information from the system. The syslogging interfaces are defined in the + header file include/syslog.h. The primary interface to SYSLOG sub-system + is the function syslog() and, to a lesser extent, its companion vsyslog(): + + syslog() and vsyslog() + ---------------------- + Prototypes: + + int syslog(int priority, FAR const IPTR char *format, ...); + int vsyslog(int priority, FAR const IPTR char *src, va_list ap); + + Description: + + syslog() generates a log message. The priority argument is formed by + ORing the facility and the level values (see include/syslog.h). The + remaining arguments are a format, as in printf and any arguments to the + format. + + The NuttX implementation does not support any special formatting + characters beyond those supported by printf. + + The function vsyslog() performs the same task as syslog() with the + difference that it takes a set of arguments which have been obtained + using the stdarg variable argument list macros. + + setlogmask() + ------------ + The additional setlogmask() interface can use use to filter SYSLOG output: + + Prototypes: + + int setlogmask(int mask); + + Description: + + The setlogmask() function sets the logmask and returns the previous + mask. If the mask argument is 0, the current logmask is not modified. + + The SYSLOG priorities are: LOG_EMERG, LOG_ALERT, LOG_CRIT, LOG_ERR, + LOG_WARNING, LOG_NOTICE, LOG_INFO, and LOG_DEBUG. The bit corresponding + to a priority p is LOG_MASK(p); LOG_UPTO(p) provides the mask of all + priorities in the above list up to and including p. + + Per OpenGroup.org "If the maskpri argument is 0, the current log mask + is not modified." In this implementation, the value zero is permitted + in order to disable all syslog levels. + + REVISIT: Per POSIX the syslog mask should be a per-process value but in + NuttX, the scope of the mask is dependent on the nature of the build: + + * Flat Build: There is one, global SYSLOG mask that controls all output. + Protected Build: There are two SYSLOG masks. One within the kernel + that controls only kernel output. And one in user-space that controls + only user SYSLOG output. + * Kernel Build: The kernel build is compliant with the POSIX requirement: + There will be one mask for for each user process, controlling the + SYSLOG output only form that process. There will be a separate mask + accessable only in the kernel code to control kernel SYSLOG output. + * + + These are all standard interfaces as defined at http://pubs.opengroup.org/onlinepubs/009695399/functions/closelog.html + + Debug Interfaces + ---------------- + In NuttX, syslog output is really synonymous to debug output and, + therefore, the debugging interface macros defined in the header file + include/debug.h are also syslogging interfaces. Those macros are simply + wrappers around syslog(). The debugging interfaces differ from the syslog + interfaces in that: + + * They do not take a priority parameter; the priority is inherent in the + debug macro name. + * They decorate the output stream with information such as the file name + * They can each be disabled via configuration options. + + Each debug macro has a base name that represents the priority and a prefix + that represents the sub-system. Each macro is individually initialized by + both priority and sub-system. For example, uerr() is the macro used for + error level messages from the USB subsystem and is enabled with + CONFIG_DEBUG_USB_ERROR. + + The base debug macro names, their priority, and configuration variable are + summarized below: + + * info(). The info() macro is the lowest priority (LOG_INFO) and is + intended to provide general information about the flow of program + execution so that you can get an overview of the behavior of the + program. info() is often very chatty and voluminous and usually more + information than you may want to see. The info() macro is controlled + via CONFIG_DEBUG_subsystem_INFO + * warn(). The warn() macro has medium priority (LOG_WARN) and is + controlled by CONFIG_DEBUG_subsystem_WARN. The warn() is intended to + note exceptional or unexpected conditions that meigh be potential + errors or, perhaps, minor errors that easily recovered. + * err(). This is a high priority debug macro (LOG_ERROR) and controlled + by CONFIG_DEBUG_subsystem_ERROR. The err() is reserved to indicate + important error conditions. + * alert(). The highest priority debug macro (LOG_EMERG) and is + controlled by CONFIG_DEBUG_ALERT. The alert() macro is reserved for + use solely by assertion and crash handling logic. It also differs + from the other macros in that it cannot be enabled or disabled per + subsystem. + +SYSLOG Channels +=============== + + SYSLOG Channel Interfaces + ------------------------- + In the NuttX SYSLOG implementation, the underlying device logic the + supports the SYSLOG output is referred to as a SYSLOG channel//. Each + SYSLOG channel is represented by an interface defined in + include/nuttx/syslog/syslog.h: + + /* This structure provides the interface to a SYSLOG device */ + + typedef CODE int (*syslog_putc_t)(int ch); + typedef CODE int (*syslog_flush_t)(void); + + struct syslog_channel_s + { + /* I/O redirection methods */ + + syslog_putc_t sc_putc; /* Normal buffered output */ + syslog_putc_t sc_force; /* Low-level output for interrupt handlers */ + syslog_flush_t sc_flush; /* Flush buffered output (on crash) */ + + /* Implementation specific logic may follow */ + }; + + The channel interface is instantiated by calling syslog_channel(): + + syslog_channel() + ---------------- + Prototype: + + int syslog_channel(FAR const struct syslog_channel_s *channel); + + Description: + + Configure the SYSLOGging function to use the provided channel to + generate SYSLOG output. + + syslog_channel() is a non-standard, internal OS interface and is not + available to applications. It may be called numerous times as + necessary to change channel interfaces. + + Input Parmeters: + + * channel - Provides the interface to the channel to be used. + + Returned Value: + + Zero (OK)is returned on success. A negated errno value is returned + on any failure. + + SYSLOG Channel Initialization + ----------------------------- + The initial, default SYSLOG channel is established with statically + initialized global variables so that some level of SYSLOG output may be + available immediately upon reset. This initialized data is in the file + drivers/syslog/syslog_channel.c. The initial SYSLOG capability is + determined by the selected SYSLOG channel: + + * In-Memory Buffer (RAMLOG). Full SYSLOG capability as available at + reset. + * Serial Console. If the serial implementation provides the low-level + character output function up_putc(), then that low level serial output + is available as soon as the serial device has been configured. + * For all other SYSLOG channels, all SYSLOG output goes to the bit- + bucket until the SYSLOG channel device has been initialized. + + The syslog channel device is initialized when the bring-up logic calls + syslog_intialize(): + + syslog_initialize() + ------------------- + Prototype: + + #ifndef CONFIG_ARCH_SYSLOG + int syslog_initialize(enum syslog_init_e phase); + #else + # define syslog_initialize(phase) + #endif + + Description: + + One power up, the SYSLOG facility is non-existent or limited to very + low-level output. This function is called later in the initialization + sequence after full driver support has been initialized. It installs + the configured SYSLOG drivers and enables full SYSLOGing capability. + + This function performs these basic operations: + + * Initialize the SYSLOG device + * Call syslog_channel() to begin using that device. + * If CONFIG_ARCH_SYSLOG is selected, then the architecture-specific + logic will provide its own SYSLOG device initialize which must include + as a minimum a call to syslog_channel() to use the device. + + Input Parameters: + + * phase - One of {SYSLOG_INIT_EARLY, SYSLOG_INIT_LATE} + + Returned Value: + Zero (OK) is returned on success; a negated errno value is returned on + any failure. + + Different types of SYSLOG devices have different OS initialization + requirements. Some are available immediately at reset, some are available + after some basic OS initialization, and some only after OS is fully + initialized. In order to satisfy these different initialization + requirements, syslog_initialize() is called twice from the boot-up logic: + + * syslog_initialize() is called from the architecture-specific + up_initialize() function as some as basic hardware resources have been + initialized: Timers, interrupts, etc. In this case, + syslog_initialize() is called with the argument SYSLOG_INIT_EARLY. + * syslog_initialize() is called again from os_start() when the full OS + initialization has completed, just before the application main entry + point is spawned. In this case, syslog_initialize() is called with + the argument SYSLOG_INIT_LATE. + + There are other types of SYSLOG channel devices that may require even + further initialization. For example, the file SYSLOG channel (described + below) cannot be initialized until the necessary file systems have been + mounted. + + Interrupt Level SYSLOG Output + ----------------------------- + As a general statement, SYSLOG output only supports //normal// output from + NuttX tasks. However, for debugging purposes, it is also useful to get + SYSLOG output from interrupt level logic. In an embedded system, that is + often where the most critical operations are performed. + + There are three conditions under which SYSLOG output generated from interrupt level processing can a included the SYSLOG output stream: + + 1. Low-Level Serial Output + -------------------------- + If you are using a SYSLOG console channel (CONFIG_SYSLOG_CONSOLE) with a + serial console (CONFIG_SYSLOG_SERIAL_CONSOLE) and if the underlying + architecture supports the low-level up_putc() interface + (CONFIG_ARCH_LOWPUTC), then the SYLOG logic will direct the output to + up_putc() which is capable of generating the serial output within the + context of an interrupt handler. + + There are a few issues in doing this however: + + * up_putc() is able to generate debug output in any context because it + disables serial interrupts and polls the hardware directly. These + polls may take many milliseconds and during that time, all interrupts + are disable within the interrupt handler. This, of course, interferes + with the real-time behavior of the RTOS. + * The output generated by up_putc() is immediate and in real-time. The + normal SYSLOG output, on the other hand, is buffered in the serial + driver and may be delayed with respect to the immediate output by many + lines. Therefore, the interrupt level SYSLOG ouput provided throug + up_putc() is grossly out of synchronization with other debug output + + 2. In-Memory Buffering + ---------------------- + If the RAMLOG SYSLOG channel is supported, then all SYSLOG output is + buffered in memory. Interrupt level SYSLOG output is no different than + normal SYSLOG output in this case. + + 3. Serialization Buffer + ----------------------- + A final option is the use the an "interrupt buffer" to buffer the + interrupt level SYSLOG output. In this case: + + * SYSLOG output generated from interrupt level process in not sent to + the SYSLOG channel immediately. Rather, it is buffered in the + interrupt serialization buffer. + * Later, when the next normal syslog output is generated, it will first + empty the content of the interrupt buffer to the SYSLOG device in the + proper context. It will then be followed by the normal syslog output. + In this case, the interrupt level SYSLOG output will interrupt the + normal output stream and the interrupt level SYSLOG output will be + inserted into the correct position in the SYSLOG output when the next + normal SYLOG output is generated. + + The SYSLOG interrupt buffer is enabled with CONFIG_SYSLOG_INTBUFFER. When + the interrupt buffer is enabled, you must also provide the size of the + interrupt buffer with CONFIG_SYSLOG_INTBUFSIZE. + +SYSLOG Channel Options +====================== + + SYSLOG Console Device + --------------------- + The typical SYSLOG device is the system console. If you are using a + serial console, for example, then the SYSLOG output will appear on that + serial port. + + This SYSLOG channel is automatically selected by syslog_initialize() in + the LATE initialization phase based on configuration options. The + configuration options that affect this channel selection include: + + * CONFIG_DEV_CONSOLE. This setting indicates that the system supports a + console device, i.e., that the character device /dev/console exists. + * CONFIG_SERIAL_CONSOLE. This configuration option is automatically + selected when a UART or USART is configured as the system console. + There is no user selection. + * CONFIG_SYSLOG_CONSOLE. This configuration option is manually selected + from the SYSLOG menu. This is the option that acutally enables the + SYSLOG console device. It depends on CONFIG_DEV_CONSOLE and it will + automatically select CONFIG_SYSLOG_SERIAL_CONSOLE if + CONFIG_SERIAL_CONSOLE is selected. + * CONFIG_ARCH_LOWPUTC. This is an indication from the architecture + configuration that the platform supports the up_putc() interface. + up_putc() is a very low level UART interface that can even be used from + interrupt handling. + * CONFIG_SYSLOG_SERIAL_CONSOLE. This enables certain features of the + SYSLOG operation that depend on a serial console. If + CONFIG_ARCH_LOWPUTC is also selected, for example, then up_putc() will + be used for the forced SYSLOG output. + + Interrupt level SYSLOG output will be lost unless: (1) the interrupt buffer + is enabled to support serialization, or (2) a serial console is used and + up_putc() is supported. + + NOTE: The console channel uses the fixed character device at /dev/console. + The console channel is not synonymous with stdout (or file descriptor 1). + stdout is the current output from a task when, say, printf() if used. + Initially, stdout does, indeed, use the /dev/console device. However, + stdout may subsequently be redirected to some other device or file. This + is always the case, for example, when a transient device is used for a + console -- such as a USB console or a Telnet console. The SYSLOG channel + is not redirected as stdout is; the SYSLOG channel will stayed fixed (unless + it is explicitly changed via syslog_channel()). + + References: drivers/syslog/syslog_consolechannel.c and + drivers/syslog/syslog_device.c + + SYSLOG Character Device + ----------------------- + The system console device, /dev/console, is a character driver with some + special properties. However, any character driver may be used as the + SYSLOG output channel. For example, suppose you have a serial console on + /dev/ttyS0 and you want SYSLOG output on /dev/ttyS1. Or suppose you + support only a Telnet console but want to capture debug output + /dev/ttyS0. + + This SYSLOG device channel is selected with CONFIG_SYSLOG_CHAR and has no + other dependencies. Differences fromthe SYSLOG console channel include: + + * CONFIG_SYSLOG_DEVPATH. This configuration option string must be set + provide the full path to the character device to be used. + * The forced SYSLOG output always goes to the bit-bucket. This means + that interrupt level SYSLOG output will be lost unless the interrupt + buffer is enabled to support serialization. + * CONFIG_SYSLOG_CHAR_CRLF. If CONFIG_SYSLOG_CHAR_CRLF is selected, then + linefeeds in the SYSLOG output will be expanded to Carriage Return + + Linefeed. Since the character device is not a console device, the + addition of carriage returns to line feeds would not be performed + otherwise. You would probably want this expansion if you use a serial + terminal program with the character device output. + + References: drivers/syslog/syslog_devchannel.c and + drivers/syslog/syslog_device.c + + SYSLOG File Device + ------------------ + Files can also be used as the sink for SYSLOG output. There is, however, + a very fundamental difference in using a file as opposed the system + console, a RAM buffer, or character device: You must first mount the + file system that supports the SYSLOG file. That difference means that + the file SYSLOG channel cannot be supported during the boot-up phase but + can be instantiated later when board level logic configures the application + environment, including mounting of the file systems. + + The interface syslog_file_channel() is used to configure the SYSLOG file + channel: + + syslog_file_channel() + --------------------- + Prototype: + + #ifdef CONFIG_SYSLOG_FILE + int syslog_file_channel(FAR const char *devpath); + #endif + + Description: + + Configure to use a file in a mounted file system at 'devpath' as the + SYSLOG channel. + + This tiny function is simply a wrapper around syslog_dev_initialize() + and syslog_channel(). It calls syslog_dev_initialize() to configure + the character file at 'devpath then calls syslog_channel() to use that + device as the SYSLOG output channel. + + File SYSLOG channels differ from other SYSLOG channels in that they + cannot be established until after fully booting and mounting the target + file system. This function would need to be called from board-specific + bring-up logic AFTER mounting the file system containing 'devpath'. + + SYSLOG data generated prior to calling syslog_file_channel will, of + course, not be included in the file. + + NOTE interrupt level SYSLOG output will be lost in this case unless + the interrupt buffer is used. + + Input Parameters: + + * devpath - The full path to the file to be used for SYSLOG output. + This may be an existing file or not. If the file exists, + syslog_file_channel() will append new SYSLOG data to the end of the + file. If it does not, then syslog_file_channel() will create the + file. + + Returned Value: + + Zero (OK) is returned on success; a negated errno value is returned on + any failure. + + References: drivers/syslog/syslog_filechannel.c, + drivers/syslog/syslog_device.c, and include/nuttx/syslog/syslog.h. + + SYSLOG RAMLOG Device + -------------------- + The RAMLOG is a standalone feature that can be used to buffer any + character data in memory. There are, however, special configurations + that can be used to configure the RAMLOG as a SYSLOG channel. The RAMLOG + functionality is described in a more general way in the following + paragraphs. + +RAM Logging Device +================== + The RAM logging driver is a driver that was intended to support debugging - output (aka, syslogging). It might be used when the normal serial output - is not available. For example, if you are using a Telnet or USB serial - console, the debug output will get lost since the USB Telnet session does - not use the serial console. - - The RAM logginc driver is also useful when debug output on the serial - console would interfere with performance or with usability. The debug - output is write to RAM very quickly and so interferes less with realtime - performance. And since the output does not appear on the serial console - until you want it to, it does not interfere with the usability of the - serial console. The NuttShell (NSH), for eample, supports a 'dmesg' - command that can be used to dump the buffered output when you want to - see it. - - The RAM logging driver is similar to a pipe in that it saves the - debugging output in a FIFO in RAM. It differs from a pipe in numerous + output (SYSLOG) when the normal serial output is not available. For + example, if you are using a Telnet or USB serial console, the debug output + will get lost -- or worse. For example, what if you want to debug the + network over Telnet? + + The RAM logging driver can also accept debug output data from interrupt + handler with no special serialization buffering. As an added benefit, the + RAM logging driver is much less invasive. Since no actual I/O is performed + with the debug output is generated, the RAM logger tends to be much faster + and will interfere much less when used with time critical drivers. + + The RAM logging driver is similar to a pipe in that it saves the debugging + output in a circular buffer in RAM. It differs from a pipe in numerous details as needed to support logging. This driver is built when CONFIG_RAMLOG is defined in the Nuttx configuration. - Configuration options: - - CONFIG_RAMLOG - Enables the RAM logging feature - CONFIG_RAMLOG_CONSOLE - Use the RAM logging device as a system console. - If this feature is enabled (along with CONFIG_DEV_CONSOLE), then all - console output will be re-directed to a circular buffer in RAM. This - is useful, for example, if the only console is a Telnet console. Then - in that case, console output from non-Telnet threads will go to the - circular buffer and can be viewed using the NSH 'dmesg' command. - CONFIG_RAMLOG_SYSLOG - Use the RAM logging device for the syslogging - interface. If this feature is enabled (along with CONFIG_SYSLOG), - then all debug output (only) will be re-directed to the circular - buffer in RAM. This RAM log can be view from NSH using the 'dmesg' - command. NOTE: Unlike the limited, generic character driver SYSLOG - device, the RAMLOG *can* be used to generate debug output from interrupt - level handlers. - CONFIG_RAMLOG_NPOLLWAITERS - The number of threads than can be waiting + dmesg + ----- + When the RAMLOG (with SYSLOG) is enabled, a new NuttShell (NSH) command + will appear: dmesg. The dmsg command will dump the contents of the + circular buffer to the console (and also clear the circular buffer). + + RAMLOG Configuration options + ---------------------------- + + * CONFIG_RAMLOG - Enables the RAM logging feature + * CONFIG_RAMLOG_CONSOLE - Use the RAM logging device as a system + console. If this feature is enabled (along with CONFIG_DEV_CONSOLE), + then all console output will be re-directed to a circular buffer in + RAM. This might be useful, for example, if the only console is a + Telnet console. Then in that case, console output from non-Telnet + threads will go to the circular buffer and can be viewed using the NSH + dmesg command. This optional is not useful in other scenarios. + * CONFIG_RAMLOG_SYSLOG - Use the RAM logging device for the syslogging + interface. If this feature is enabled, then all debug output (only) + will be re-directed to the circular buffer in RAM. This RAM log can + be viewed from NSH using the 'dmesg' command. NOTE: Unlike the + limited, generic character driver SYSLOG device, the RAMLOG *can* be + used to capture debug output from interrupt level handlers. + * CONFIG_RAMLOG_NPOLLWAITERS - The number of threads than can be waiting for this driver on poll(). Default: 4 - If CONFIG_RAMLOG_CONSOLE or CONFIG_RAMLOG_SYSLOG is selected, then the - following may also be provided: + If CONFIG_RAMLOG_CONSOLE or CONFIG_RAMLOG_SYSLOG is selected, then the + following must also be provided: + + * CONFIG_RAMLOG_BUFSIZE - The size of the circular buffer to use. + Default: 1024 bytes. + + Other miscellaneous settings - CONFIG_RAMLOG_BUFSIZE - Size of the console RAM log. Default: 1024 + * CONFIG_RAMLOG_CRLF - Pre-pend a carriage return before every linefeed + that goes into the RAM log. + * CONFIG_RAMLOG_NONBLOCKING - Reading from the RAMLOG will never block + if the RAMLOG is empty. If the RAMLOG is empty, then zero is returned + (usually interpreted as end-of-file). If you do not define this, the + NSH 'dmsg' command will lock up when called! So you probably do want + this! + * CONFIG_RAMLOG_NPOLLWAITERS - The maximum number of threads that may be + waiting on the poll method. diff --git a/drivers/syslog/ramlog.c b/drivers/syslog/ramlog.c index 1025500987fb7843f02df1ab81646fcb1ab6be2a..6044b7157b5790b30e84f313b53dc125fea9c9d6 100644 --- a/drivers/syslog/ramlog.c +++ b/drivers/syslog/ramlog.c @@ -63,10 +63,6 @@ #ifdef CONFIG_RAMLOG -/**************************************************************************** - * Private Types - ****************************************************************************/ - /**************************************************************************** * Private Types ****************************************************************************/ @@ -98,6 +94,13 @@ struct ramlog_dev_s /**************************************************************************** * Private Function Prototypes ****************************************************************************/ + +/* Syslog channel methods */ + +#ifdef CONFIG_RAMLOG_SYSLOG +static int ramlog_flush(void); +#endif + /* Helper functions */ #ifndef CONFIG_DISABLE_POLL @@ -117,6 +120,19 @@ static int ramlog_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup); #endif +/**************************************************************************** + * Private Data + ****************************************************************************/ + +#ifdef CONFIG_RAMLOG_SYSLOG +static const struct syslog_channel_s g_ramlog_syslog_channel = +{ + ramlog_putc, + ramlog_putc, + ramlog_flush +}; +#endif + /**************************************************************************** * Private Data ****************************************************************************/ @@ -145,7 +161,7 @@ static const struct file_operations g_ramlogfops = static char g_sysbuffer[CONFIG_RAMLOG_BUFSIZE]; /* This is the device structure for the console or syslogging function. It - * must be statically initialized because the RAMLOG syslog_putc function + * must be statically initialized because the RAMLOG ramlog_putc function * could be called before the driver initialization logic executes. */ @@ -169,6 +185,17 @@ static struct ramlog_dev_s g_sysdev = * Private Functions ****************************************************************************/ +/**************************************************************************** + * Name: ramlog_flush + ****************************************************************************/ + +#ifdef CONFIG_RAMLOG_SYSLOG +static int ramlog_flush(void) +{ + return OK; +} +#endif + /**************************************************************************** * Name: ramlog_pollnotify ****************************************************************************/ @@ -615,7 +642,7 @@ int ramlog_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup) struct pollfd **slot = (struct pollfd **)fds->priv; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!slot) { ret = -EIO; @@ -704,7 +731,7 @@ int ramlog_consoleinit(void) #endif /**************************************************************************** - * Name: ramlog_sysloginit + * Name: ramlog_syslog_channel * * Description: * Use a pre-allocated RAM logging device and register it at the path @@ -716,29 +743,34 @@ int ramlog_consoleinit(void) ****************************************************************************/ #ifdef CONFIG_RAMLOG_SYSLOG -int ramlog_sysloginit(void) +int ramlog_syslog_channel(void) { + int ret; + /* Register the syslog character driver */ - return register_driver(CONFIG_SYSLOG_DEVPATH, &g_ramlogfops, 0666, &g_sysdev); + ret = register_driver(CONFIG_SYSLOG_DEVPATH, &g_ramlogfops, 0666, &g_sysdev); + if (ret < 0) + { + return ret; + } + + /* Use the RAMLOG as the SYSLOG channel */ + + return syslog_channel(&g_ramlog_syslog_channel); } #endif /**************************************************************************** - * Name: syslog_putc + * Name: ramlog_putc * * Description: - * This is the low-level system logging interface. The debugging/syslogging - * interfaces are syslog() and lowsyslog(). The difference is that - * the syslog() internface writes to syslog device (usually fd=1, stdout) - * whereas lowsyslog() uses a lower level interface that works from - * interrupt handlers. This function is a a low-level interface used to - * implement lowsyslog() when CONFIG_RAMLOG_SYSLOG=y and CONFIG_SYSLOG=y + * This is the low-level system logging interface. * ****************************************************************************/ #if defined(CONFIG_RAMLOG_CONSOLE) || defined(CONFIG_RAMLOG_SYSLOG) -int syslog_putc(int ch) +int ramlog_putc(int ch) { FAR struct ramlog_dev_s *priv = &g_sysdev; int ret; diff --git a/drivers/syslog/syslog.h b/drivers/syslog/syslog.h new file mode 100644 index 0000000000000000000000000000000000000000..3ebb480f00ab065bf6d4e69d4652eeb529ce8c92 --- /dev/null +++ b/drivers/syslog/syslog.h @@ -0,0 +1,319 @@ +/**************************************************************************** + * drivers/syslog/syslog.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 __DRIVERS_SYSLOG_SYSLOG_H +#define __DRIVERS_SYSLOG_SYSLOG_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +#ifndef __ASSEMBLY__ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/* The default SYSLOG channel */ + +struct syslog_channel_s; /* Forward reference */ +EXTERN const struct syslog_channel_s g_default_syslog_channel; + +/* This is the current syslog channel in use. It initially points to + * g_default_syslog_channel. + */ + +EXTERN FAR const struct syslog_channel_s *g_syslog_channel; + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +/**************************************************************************** + * Name: syslog_dev_initialize + * + * Description: + * Initialize to use the character device (or file) at + * CONFIG_SYSLOG_DEVPATH as the SYSLOG sink. + * + * One power up, the SYSLOG facility is non-existent or limited to very + * low-level output. This function may be called later in the + * intialization sequence after full driver support has been initialized. + * (via syslog_initialize()) It installs the configured SYSLOG drivers + * and enables full SYSLOGing capability. + * + * NOTE that this implementation excludes using a network connection as + * SYSLOG device. That would be a good extension. + * + * Input Parameters: + * devpath - The full path to the character device to be used. + * oflags - File open flags + * mode - File open mode (only if oflags include O_CREAT) + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure. + * + ****************************************************************************/ + +#if CONFIG_NFILE_DESCRIPTORS > 0 +int syslog_dev_initialize(FAR const char *devpath, int oflags, int mode); +#endif + +/**************************************************************************** + * Name: syslog_dev_uninitialize + * + * Description: + * Called to disable the last device/file channel in preparation to use + * a different SYSLOG device. Currently only used for CONFIG_SYSLOG_FILE. + * + * Input Parameters: + * None + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure. + * + * Assumptions: + * The caller has already switched the SYSLOG source to some safe channel + * (the default channel). + * + ****************************************************************************/ + +#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SYSLOG_FILE) +int syslog_dev_uninitialize(void); +#endif /* CONFIG_SYSLOG_FILE */ + +/**************************************************************************** + * Name: syslog_dev_channel + * + * Description: + * Configure to use the character device (or file) at + * CONFIG_SYSLOG_DEVPATH as the SYSLOG channel. + * + * This tiny function is simply a wrapper around syslog_dev_initialize() + * and syslog_channel(). It calls syslog_dev_initialize() to configure + * the character device at CONFIG_SYSLOG_DEVPATH then calls + * syslog_channel() to use that device as the SYSLOG output channel. + * + * NOTE interrupt level SYSLOG output will be lost in this case unless + * the interrupt buffer is used. + * + * Input Parameters: + * None + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure. + * + ****************************************************************************/ + +#ifdef CONFIG_SYSLOG_CHAR +int syslog_dev_channel(void); +#endif + +/**************************************************************************** + * Name: syslog_console_channel + * + * Description: + * Configure to use the character device (or file) at /dev/console as the + * SYSLOG channel. + * + * This tiny function is simply a wrapper around syslog_dev_initialize() + * and syslog_channel(). It calls syslog_dev_initialize() to configure + * the character device at /dev/console then calls syslog_channel() to + * use that device as the SYSLOG output channel. + * + * NOTE interrupt level SYSLOG output will be lost in the general case + * unless the interrupt buffer is used. As a special case: If the serial + * console is used and the architecture provides up_putc(), the interrupt + * level output will be directed to up_putc() is the interrupt buffer is + * disabled. + * + * Input Parameters: + * None + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure. + * + ****************************************************************************/ + +#ifdef CONFIG_SYSLOG_CONSOLE +int syslog_console_channel(void); +#endif + +/**************************************************************************** + * Name: syslog_add_intbuffer + * + * Description: + * Add one more character to the interrupt buffer. In the event of + * buffer overlowed, the character will be dropped. The indication + * "[truncated]\n" will be appended to the end of the interrupt buffer. + * + * Input Parameters: + * ch - The character to add to the interrupt buffer (must be positive). + * + * Returned Value: + * Zero success, the character is echoed back to the caller. A negated + * errno value is returned on any failure. + * + * Assumptions: + * Called only from interrupt handling logic; Interrupts will be disabled. + * + ****************************************************************************/ + +#ifdef CONFIG_SYSLOG_INTBUFFER +int syslog_add_intbuffer(int ch); +#endif + +/**************************************************************************** + * Name: syslog_flush_intbuffer + * + * Description: + * Flush any characters that may have been added to the interrupt buffer + * to the SYSLOG device. + * + * Input Parameters: + * channel - The syslog channel to use in performing the flush operation. + * force - Use the force() method of the channel vs. the putc() method. + * + * Returned Value: + * On success, the character is echoed back to the caller. A negated + * errno value is returned on any failure. + * + * Assumptions: + * Interrupts may or may not be disabled. + * + ****************************************************************************/ + +#ifdef CONFIG_SYSLOG_INTBUFFER +int syslog_flush_intbuffer(FAR const struct syslog_channel_s *channel, + bool force); +#endif + +/**************************************************************************** + * Name: syslog_putc + * + * Description: + * This is the low-level system logging interface. + * + * Input Parameters: + * ch - The character to add to the SYSLOG (must be positive). + * + * Returned Value: + * On success, the character is echoed back to the caller. A negated + * errno value is returned on any failure. + * + ****************************************************************************/ + +int syslog_putc(int ch); + +/**************************************************************************** + * Name: syslog_force + * + * Description: + * This is the low-level system logging interface. This version forces + * the output and is only used in emergency situations (e.g., in assertion + * handling). + * + * Input Parameters: + * ch - The character to add to the SYSLOG (must be positive). + * + * Returned Value: + * On success, the character is echoed back to the caller. A negated + * errno value is returned on any failure. + * + ****************************************************************************/ + +int syslog_force(int ch); + +/**************************************************************************** + * Name: syslog_dev_putc + * + * Description: + * This is the low-level system logging interface provided for the + * character driver interface. + * + * Input Parameters: + * ch - The character to add to the SYSLOG (must be positive). + * + * Returned Value: + * On success, the character is echoed back to the caller. A negated + * errno value is returned on any failure. + * + ****************************************************************************/ + +#if CONFIG_NFILE_DESCRIPTORS > 0 +int syslog_dev_putc(int ch); +#endif + +/**************************************************************************** + * Name: syslog_dev_flush + * + * Description: + * Flush any buffer data in the file system to media. + * + * Input Parameters: + * None + * + * Returned Value: + * Zero (OK) on success; a negated errno value is returned on any failure. + * + ****************************************************************************/ + +#if CONFIG_NFILE_DESCRIPTORS > 0 +int syslog_dev_flush(void); +#endif + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* __DRIVERS_SYSLOG_SYSLOG_H */ diff --git a/drivers/syslog/syslog_channel.c b/drivers/syslog/syslog_channel.c new file mode 100644 index 0000000000000000000000000000000000000000..a36cb6e70f4e78013a022f0c90798ef20f0d7c20 --- /dev/null +++ b/drivers/syslog/syslog_channel.c @@ -0,0 +1,164 @@ +/**************************************************************************** + * drivers/syslog/syslog_channel.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 + +#ifdef CONFIG_RAMLOG_SYSLOG +# include +#elif defined(CONFIG_ARCH_LOWPUTC) +# include +#endif + +#include "syslog.h" + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +#if defined(CONFIG_SYSLOG_SERIAL_CONSOLE) && defined(CONFIG_ARCH_LOWPUTC) +# define HAVE_LOWPUTC +#elif !defined(CONFIG_RAMLOG_SYSLOG) +# define NEED_LOWPUTC +#endif + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +#ifdef NEED_LOWPUTC +static int syslog_default_putc(int ch); +#endif +static int syslog_default_flush(void); + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +#if defined(CONFIG_RAMLOG_SYSLOG) +const struct syslog_channel_s g_default_channel = +{ + ramlog_putc, + ramlog_putc, + syslog_default_flush +}; +#elif defined(HAVE_LOWPUTC) +const struct syslog_channel_s g_default_channel = +{ + up_putc, + up_putc, + syslog_default_flush +}; +#else +const struct syslog_channel_s g_default_channel = +{ + syslog_default_putc, + syslog_default_putc, + syslog_default_flush +}; +#endif + +/* This is the current syslog channel in use */ + +FAR const struct syslog_channel_s *g_syslog_channel = &g_default_channel; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: syslog_default_putc and syslog_default_flush + * + * Description: + * Dummy, no-nothing channel interface methods + * + ****************************************************************************/ + +#ifdef NEED_LOWPUTC +static int syslog_default_putc(int ch) +{ + return ch; +} +#endif + +static int syslog_default_flush(void) +{ + return OK; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: syslog_channel + * + * Description: + * Configure the SYSLOGging function to use the provided channel to + * generate SYSLOG output. + * + * Input Parameters: + * channel - Provides the interface to the channel to be used. + * + * Returned Value: + * Zero (OK)is returned on success. A negated errno value is returned + * on any failure. + * + ****************************************************************************/ + +int syslog_channel(FAR const struct syslog_channel_s *channel) +{ + DEBUGASSERT(channel != NULL); + + if (channel != NULL) + { + DEBUGASSERT(channel->sc_putc != NULL && channel->sc_force != NULL && + channel->sc_flush != NULL); + + g_syslog_channel = channel; + return OK; + } + + return -EINVAL; +} diff --git a/drivers/syslog/syslog_console.c b/drivers/syslog/syslog_console.c index a3d3bb2bea35ad979a5178f6a29bdf8cff478db1..04a21d2ec91978113257aed259c2573d8528d3b7 100644 --- a/drivers/syslog/syslog_console.c +++ b/drivers/syslog/syslog_console.c @@ -47,14 +47,6 @@ #include #include -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* The architecture must provide syslog_putc for this driver */ - -#if defined(CONFIG_SYSLOG) - /**************************************************************************** * Private Function Prototypes ****************************************************************************/ @@ -136,4 +128,3 @@ void syslog_console_init(void) { (void)register_driver("/dev/console", &g_consoleops, 0666, NULL); } -#endif /* CONFIG_SYSLOG */ diff --git a/drivers/syslog/syslog_consolechannel.c b/drivers/syslog/syslog_consolechannel.c new file mode 100644 index 0000000000000000000000000000000000000000..8ed6374ff65b39bd880bf31e57d39d293615cbf8 --- /dev/null +++ b/drivers/syslog/syslog_consolechannel.c @@ -0,0 +1,162 @@ +/**************************************************************************** + * drivers/syslog/syslog_consolechannel.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 "syslog.h" + +#ifdef CONFIG_SYSLOG_CONSOLE + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#undef HAVE_LOWPUTC +#if defined(CONFIG_SYSLOG_SERIAL_CONSOLE) && defined(CONFIG_ARCH_LOWPUTC) +# define HAVE_LOWPUTC 1 +#endif + +#define OPEN_FLAGS (O_WRONLY) +#define OPEN_MODE (S_IROTH | S_IRGRP | S_IRUSR | S_IWUSR) + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +/* SYSLOG channel methods */ + +#ifndef HAVE_LOWPUTC +static int syslog_console_force(int ch); +#endif + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* This structure describes the SYSLOG channel */ + +static const struct syslog_channel_s g_syslog_console_channel = +{ + syslog_dev_putc, +#ifdef HAVE_LOWPUTC + up_putc, +#else + syslog_console_force, +#endif + syslog_dev_flush, +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: syslog_console_force + * + * Description: + * A dummy FORCE method + * + ****************************************************************************/ + +#ifndef HAVE_LOWPUTC +static int syslog_console_force(int ch) +{ + return ch; +} +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: syslog_console_channel + * + * Description: + * Configure to use the character device (or file) at /dev/console as the + * SYSLOG channel. + * + * This tiny function is simply a wrapper around syslog_dev_initialize() + * and syslog_channel(). It calls syslog_dev_initialize() to configure + * the character device at /dev/console then calls syslog_channel() to + * use that device as the SYSLOG output channel. + * + * NOTE interrupt level SYSLOG output will be lost in the general case + * unless the interrupt buffer is used. As a special case: If the serial + * console is used and the architecture provides up_putc(), the interrupt + * level output will be directed to up_putc() is the interrupt buffer is + * disabled. + * + * Input Parameters: + * None + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure. + * + ****************************************************************************/ + +int syslog_console_channel(void) +{ + int ret; + + /* Initialize the character driver interface */ + + ret = syslog_dev_initialize("/dev/console", OPEN_FLAGS, OPEN_MODE); + if (ret < 0) + { + return ret; + } + + /* Use the character driver as the SYSLOG channel */ + + return syslog_channel(&g_syslog_console_channel); +} + +#endif /* CONFIG_SYSLOG_CONSOLE */ diff --git a/drivers/syslog/syslog_devchannel.c b/drivers/syslog/syslog_devchannel.c new file mode 100644 index 0000000000000000000000000000000000000000..fbc912ad78b11377376778c42fb6676560910294 --- /dev/null +++ b/drivers/syslog/syslog_devchannel.c @@ -0,0 +1,180 @@ +/**************************************************************************** + * drivers/syslog/syslog_devchannel.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 "syslog.h" + +#ifdef CONFIG_SYSLOG_CHAR + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#define OPEN_FLAGS (O_WRONLY) +#define OPEN_MODE (S_IROTH | S_IRGRP | S_IRUSR | S_IWUSR) + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +/* SYSLOG channel methods */ + +#ifdef CONFIG_SYSLOG_CHAR_CRLF +static int syslog_devchan_putc(int ch); +#endif +static int syslog_devchan_force(int ch); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* This structure describes the SYSLOG channel */ + +static const struct syslog_channel_s g_syslog_dev_channel = +{ +#ifdef CONFIG_SYSLOG_CHAR_CRLF + syslog_devchan_putc, +#else + syslog_dev_putc, +#endif + syslog_devchan_force, + syslog_dev_flush, +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: syslog_devchan_putc + * + * Description: + * A front-end to syslog_dev_putc that does LF -> CR-LF expansion + * + ****************************************************************************/ + +#ifdef CONFIG_SYSLOG_CHAR_CRLF +static int syslog_devchan_putc(int ch) +{ + int ret; + + /* Check for a linefeed */ + + if (ch == '/n') + { + /* Pre-pend a carriage return */ + + ret = syslog_dev_putc('/r'); + if (ret < 0) + { + return ret; + } + } + + /* Output the provided character */ + + return syslog_dev_putc(ch); +} +#endif + +/**************************************************************************** + * Name: syslog_devchan_force + * + * Description: + * A dummy FORCE method + * + ****************************************************************************/ + +static int syslog_devchan_force(int ch) +{ + return ch; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: syslog_dev_channel + * + * Description: + * Configure to use the character device at CONFIG_SYSLOG_DEVPATH as the + * SYSLOG channel. + * + * This tiny function is simply a wrapper around syslog_dev_initialize() + * and syslog_channel(). It calls syslog_dev_initialize() to configure + * the character device at CONFIG_SYSLOG_DEVPATH then calls + * syslog_channel() to use that device as the SYSLOG output channel. + * + * NOTE interrupt level SYSLOG output will be lost in this case unless + * the interrupt buffer is used. + * + * Input Parameters: + * None + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure. + * + ****************************************************************************/ + +int syslog_dev_channel(void) +{ + int ret; + + /* Initialize the character driver interface */ + + ret = syslog_dev_initialize(CONFIG_SYSLOG_DEVPATH, OPEN_FLAGS, OPEN_MODE); + if (ret < 0) + { + return ret; + } + + /* Use the character driver as the SYSLOG channel */ + + return syslog_channel(&g_syslog_dev_channel); +} + +#endif /* CONFIG_SYSLOG_CHAR */ diff --git a/fs/driver/fs_devsyslog.c b/drivers/syslog/syslog_device.c similarity index 57% rename from fs/driver/fs_devsyslog.c rename to drivers/syslog/syslog_device.c index b33129a9241bd219a1e01e0dfe0c4faf9da50ba8..22bc08eb35876239ecc9d69012ba7ccf89dac9a3 100644 --- a/fs/driver/fs_devsyslog.c +++ b/drivers/syslog/syslog_device.c @@ -1,7 +1,7 @@ /**************************************************************************** - * fs/driver/fs_devsyslog.c + * driver/syslog/syslog_device.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 @@ -44,18 +44,21 @@ #include #include #include +#include +#include #include #include #include #include -#include #include +#include +#include #include -#include "inode/inode.h" +#include "syslog.h" -#if defined(CONFIG_SYSLOG) && defined(CONFIG_SYSLOG_CHAR) +#if CONFIG_NFILE_DESCRIPTORS > 0 /**************************************************************************** * Pre-processor Definitions @@ -78,7 +81,7 @@ /* This enumeration represents the state of the SYSLOG device interface */ -enum syslog_state_e +enum syslog_dev_state { SYSLOG_UNINITIALIZED = 0, /* SYSLOG has not been initialized */ SYSLOG_INITIALIZING, /* SYSLOG is being initialized */ @@ -91,10 +94,13 @@ enum syslog_state_e struct syslog_dev_s { - uint8_t sl_state; /* See enum syslog_state_e */ - sem_t sl_sem; /* Enforces mutually exclusive access */ - pid_t sl_holder; /* PID of the thread that holds the semaphore */ - struct file sl_file; /* The syslog file structure */ + uint8_t sl_state; /* See enum syslog_dev_state */ + uint8_t sl_oflags; /* Saved open mode (for re-open) */ + uint16_t sl_mode; /* Saved open flags (for re-open) */ + sem_t sl_sem; /* Enforces mutually exclusive access */ + pid_t sl_holder; /* PID of the thread that holds the semaphore */ + struct file sl_file; /* The syslog file structure */ + FAR char *sl_devpath; /* Full path to the character device */ }; /**************************************************************************** @@ -103,7 +109,7 @@ struct syslog_dev_s /* This is the device structure for the console or syslogging function. */ -static struct syslog_dev_s g_sysdev; +static struct syslog_dev_s g_syslog_dev; static const uint8_t g_syscrlf[2] = { '\r', '\n' @@ -114,25 +120,25 @@ static const uint8_t g_syscrlf[2] = ****************************************************************************/ /**************************************************************************** - * Name: syslog_takesem + * Name: syslog_dev_takesem * * Description: * Write to the syslog device * ****************************************************************************/ -static inline int syslog_takesem(void) +static inline int syslog_dev_takesem(void) { pid_t me = getpid(); int ret; /* Does this thread already hold the semaphore? That could happen if * we wer called recursively, i.e., if the logic kicked off by - * syslog_write() where to generate more debug output. Return an error + * syslog_dev_write() where to generate more debug output. Return an error * in that case. */ - if (g_sysdev.sl_holder == me) + if (g_syslog_dev.sl_holder == me) { /* Return an error (instead of deadlocking) */ @@ -143,7 +149,7 @@ static inline int syslog_takesem(void) * thread. Wait for it to become available. */ - ret = sem_wait(&g_sysdev.sl_sem); + ret = sem_wait(&g_syslog_dev.sl_sem); if (ret < 0) { return -get_errno(); @@ -153,220 +159,238 @@ static inline int syslog_takesem(void) * of the semaphore. */ - g_sysdev.sl_holder = me; + g_syslog_dev.sl_holder = me; return OK; } /**************************************************************************** - * Name: syslog_givesem + * Name: syslog_dev_givesem * * Description: * Write to the syslog device * ****************************************************************************/ -static inline void syslog_givesem(void) +static inline void syslog_dev_givesem(void) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_ASSERTIONS pid_t me = getpid(); - DEBUGASSERT(g_sysdev.sl_holder == me); + DEBUGASSERT(g_syslog_dev.sl_holder == me); #endif /* Relinquish the semaphore */ - g_sysdev.sl_holder = NO_HOLDER; - sem_post(&g_sysdev.sl_sem); + g_syslog_dev.sl_holder = NO_HOLDER; + sem_post(&g_syslog_dev.sl_sem); } /**************************************************************************** - * Name: syslog_write + * Name: syslog_dev_write * * Description: * Write to the syslog device * ****************************************************************************/ -static inline ssize_t syslog_write(FAR const void *buf, size_t nbytes) +static inline ssize_t syslog_dev_write(FAR const void *buf, size_t nbytes) { FAR struct inode *inode; /* Let the driver perform the write */ - inode = g_sysdev.sl_file.f_inode; - return inode->u.i_ops->write(&g_sysdev.sl_file, buf, nbytes); -} - -/**************************************************************************** - * Name: syslog_flush - * - * Description: - * Flush any buffer data in the file system to media. - * - ****************************************************************************/ - -#ifndef CONFIG_DISABLE_MOUNTPOINT -static inline void syslog_flush(void) -{ - FAR struct inode *inode = g_sysdev.sl_file.f_inode; - - /* Is this a mountpoint? Does it support the sync method? */ - - if (INODE_IS_MOUNTPT(inode) && inode->u.i_mops->sync) - { - /* Yes... synchronize to the stream */ + inode = g_syslog_dev.sl_file.f_inode; + DEBUGASSERT(inode != NULL); - (void)inode->u.i_mops->sync(&g_sysdev.sl_file); - } + return inode->u.i_ops->write(&g_syslog_dev.sl_file, buf, nbytes); } -#endif /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: syslog_initialize + * Name: syslog_dev_initialize * * Description: * Initialize to use the character device (or file) at * CONFIG_SYSLOG_DEVPATH as the SYSLOG sink. * + * One power up, the SYSLOG facility is non-existent or limited to very + * low-level output. This function may be called later in the + * intialization sequence after full driver support has been initialized. + * (via syslog_initialize()) It installs the configured SYSLOG drivers + * and enables full SYSLOGing capability. + * * NOTE that this implementation excludes using a network connection as * SYSLOG device. That would be a good extension. * + * Input Parameters: + * devpath - The full path to the character device to be used. + * oflags - File open flags + * mode - File open mode (only if oflags include O_CREAT) + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure. + * ****************************************************************************/ -int syslog_initialize(void) +int syslog_dev_initialize(FAR const char *devpath, int oflags, int mode) { - FAR struct inode *inode; - FAR const char *relpath = NULL; - int ret; + int fd; + int ret; /* At this point, the only expected states are SYSLOG_UNINITIALIZED or * SYSLOG_REOPEN.. Not SYSLOG_INITIALIZING, SYSLOG_FAILURE, SYSLOG_OPENED. */ - DEBUGASSERT(g_sysdev.sl_state == SYSLOG_UNINITIALIZED || - g_sysdev.sl_state == SYSLOG_REOPEN); + DEBUGASSERT(g_syslog_dev.sl_state == SYSLOG_UNINITIALIZED || + g_syslog_dev.sl_state == SYSLOG_REOPEN); - g_sysdev.sl_state = SYSLOG_INITIALIZING; - - /* Try to open the device. - * - * Note that we cannot just call open. The syslog device must work on all - * threads. Open returns a file descriptor that is valid only for the - * task that opened the device (and its pthread children). Instead, we - * essentially re-implement the guts of open() here so that we can get to - * the thread-independent structures of the inode. + /* Save the the path to the device in case we have to re-open it. + * If we get here and sl_devpath is not equal to NULL, that is a clue + * that we will are re-openingthe file. */ - /* Get an inode for this file/device */ + if (g_syslog_dev.sl_state == SYSLOG_REOPEN) + { + /* Re-opening: Then we should already have a copy of the path to the + * device. + */ - inode = inode_find(CONFIG_SYSLOG_DEVPATH, &relpath); - if (!inode) + DEBUGASSERT(g_syslog_dev.sl_devpath != NULL && + strcmp(g_syslog_dev.sl_devpath, devpath) == 0); + } + else { - /* The inode was not found. In this case, we will attempt to re-open - * the device repeatedly. The assumption is that the device path is - * valid but that the driver has not yet been registered. + /* Initializing. Copy the device path so that we can use it if we + * have to re-open the file. */ - g_sysdev.sl_state = SYSLOG_REOPEN; - return -ENOENT; + DEBUGASSERT(g_syslog_dev.sl_devpath == NULL); + g_syslog_dev.sl_oflags = oflags; + g_syslog_dev.sl_mode = mode; + g_syslog_dev.sl_devpath = strdup(devpath); + DEBUGASSERT(g_syslog_dev.sl_devpath != NULL); } - /* Verify that the inode is valid and either a character driver or a - * mountpoint. - */ + g_syslog_dev.sl_state = SYSLOG_INITIALIZING; -#ifndef CONFIG_DISABLE_MOUNTPOINT - if ((!INODE_IS_DRIVER(inode) && !INODE_IS_MOUNTPT(inode))) -#else - if (!INODE_IS_DRIVER(inode)) -#endif + /* Open the device driver. */ + + fd = open(devpath, oflags, mode); + if (fd < 0) { - ret = -ENXIO; - goto errout_with_inode; + int errcode = get_errno(); + DEBUGASSERT(errcode > 0); + + /* We failed to open the file. Perhaps it does exist? Perhaps it + * exists, but is not ready because it depends on insertion of a + * removable device? + * + * In any case we will attempt to re-open the device repeatedly. + * The assumption is that the device path is valid but that the + * driver has not yet been registered or a removable device has + * not yet been installed. + */ + + g_syslog_dev.sl_state = SYSLOG_REOPEN; + return -errcode; } - /* Make sure that the "entity" at this inode supports write access */ + /* Detach the file descriptor from the file structure. The file + * descriptor is a task-specific concept. Detaching the file + * descriptor allows us to use the device on all threads in all tasks. + */ - if (!inode->u.i_ops || !inode->u.i_ops->write) + ret = file_detach(fd, &g_syslog_dev.sl_file); + if (ret < 0) { - ret = -EACCES; - goto errout_with_inode; - } + /* This should not happen and means that something very bad has + * occurred. + */ - /* Initialize the file structure */ + g_syslog_dev.sl_state = SYSLOG_FAILURE; + close(fd); + return ret; + } - g_sysdev.sl_file.f_oflags = SYSLOG_OFLAGS; - g_sysdev.sl_file.f_pos = 0; - g_sysdev.sl_file.f_inode = inode; + /* The SYSLOG device is open and ready for writing. */ - /* Perform the low-level open operation. */ + sem_init(&g_syslog_dev.sl_sem, 0, 1); + g_syslog_dev.sl_holder = NO_HOLDER; + g_syslog_dev.sl_state = SYSLOG_OPENED; + return OK; +} - ret = OK; - if (inode->u.i_ops->open) - { - /* Is the inode a mountpoint? */ +/**************************************************************************** + * Name: syslog_dev_uninitialize + * + * Description: + * Called to disable the last device/file channel in preparation to use + * a different SYSLOG device. Currently only used for CONFIG_SYSLOG_FILE. + * + * Input Parameters: + * None + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure. + * + * Assumptions: + * The caller has already switched the SYSLOG source to some safe channel + * (the default channel). + * + ****************************************************************************/ -#ifndef CONFIG_DISABLE_MOUNTPOINT - if (INODE_IS_MOUNTPT(inode)) - { - /* Yes. Open the device write-only, try to create it if it - * doesn't exist, if the file that already exists, then append the - * new log data to end of the file. - */ +#ifdef CONFIG_SYSLOG_FILE /* Currently only used in this configuration */ +int syslog_dev_uninitialize(void) +{ + /* Attempt to flush any buffered data */ - ret = inode->u.i_mops->open(&g_sysdev.sl_file, relpath, - SYSLOG_OFLAGS, 0666); - } + sched_lock(); + (void)syslog_dev_flush(); - /* No... then it must be a character driver in the NuttX pseudo- - * file system. - */ + /* Close the detached file instance */ - else -#endif - { - ret = inode->u.i_ops->open(&g_sysdev.sl_file); - } - } + (void)file_close_detached(&g_syslog_dev.sl_file); - /* Was the file/device successfully opened? */ + /* Free the device path */ - if (ret < 0) + if (g_syslog_dev.sl_devpath != NULL) { - ret = -ret; - goto errout_with_inode; + kmm_free(g_syslog_dev.sl_devpath); } - /* The SYSLOG device is open and ready for writing. */ + /* Destroy the semaphore */ - sem_init(&g_sysdev.sl_sem, 0, 1); - g_sysdev.sl_holder = NO_HOLDER; - g_sysdev.sl_state = SYSLOG_OPENED; - return OK; + sem_destroy(&g_syslog_dev.sl_sem); -errout_with_inode: - inode_release(inode); - g_sysdev.sl_state = SYSLOG_FAILURE; - return ret; + /* Reset the state structure */ + + memset(&g_syslog_dev, 0, sizeof(struct syslog_dev_s)); + sched_unlock(); + return OK; } +#endif /* CONFIG_SYSLOG_FILE */ /**************************************************************************** - * Name: syslog_putc + * Name: syslog_dev_putc * * Description: - * This is the low-level system logging interface. The debugging/syslogging - * interfaces are syslog() and lowsyslog(). The difference is is that - * the syslog() function writes to syslogging device (usually fd=1, stdout) - * whereas lowsyslog() uses a lower level interface that works from - * interrupt handlers. This function is a a low-level interface used to - * implement lowsyslog(). + * This is the low-level system logging interface provided for the + * character driver interface. + * + * Input Parameters: + * ch - The character to add to the SYSLOG (must be positive). + * + * Returned Value: + * On success, the character is echoed back to the caller. A negated + * errno value is returned on any failure. * ****************************************************************************/ -int syslog_putc(int ch) +int syslog_dev_putc(int ch) { ssize_t nbytes; uint8_t uch; @@ -377,12 +401,12 @@ int syslog_putc(int ch) * * (1) Before the SYSLOG device has been initialized. This could happen * from debug output that occurs early in the boot sequence before - * syslog_initialize() is called (SYSLOG_UNINITIALIZED). + * syslog_dev_initialize() is called (SYSLOG_UNINITIALIZED). * (2) While the device is being initialized. The case could happen if - * debug output is generated while syslog_initialize() executes + * debug output is generated while syslog_dev_initialize() executes * (SYSLOG_INITIALIZING). * (3) While we are generating SYSLOG output. The case could happen if - * debug output is generated while syslog_putc() executes + * debug output is generated while syslog_dev_putc() executes * (This case is actually handled inside of syslog_semtake()). * (4) Any debug output generated from interrupt handlers. A disadvantage * of using the generic character device for the SYSLOG is that it @@ -410,12 +434,12 @@ int syslog_putc(int ch) * has been successfully opened. */ - if (g_sysdev.sl_state != SYSLOG_OPENED) + if (g_syslog_dev.sl_state != SYSLOG_OPENED) { /* Case (1) and (2) */ - if (g_sysdev.sl_state == SYSLOG_UNINITIALIZED || - g_sysdev.sl_state == SYSLOG_INITIALIZING) + if (g_syslog_dev.sl_state == SYSLOG_UNINITIALIZED || + g_syslog_dev.sl_state == SYSLOG_INITIALIZING) { errcode = EAGAIN; /* Can't access the SYSLOG now... maybe next time? */ goto errout_with_errcode; @@ -423,13 +447,13 @@ int syslog_putc(int ch) /* Case (6) */ - if (g_sysdev.sl_state == SYSLOG_FAILURE) + if (g_syslog_dev.sl_state == SYSLOG_FAILURE) { errcode = ENXIO; /* There is no SYSLOG device */ goto errout_with_errcode; } - /* syslog_initialize() is called as soon as enough of the operating + /* syslog_dev_initialize() is called as soon as enough of the operating * system is in place to support the open operation... but it is * possible that the SYSLOG device is not yet registered at that time. * In this case, we know that the system is sufficiently initialized @@ -441,16 +465,19 @@ int syslog_putc(int ch) */ sched_lock(); - if (g_sysdev.sl_state == SYSLOG_REOPEN) + if (g_syslog_dev.sl_state == SYSLOG_REOPEN) { /* Try again to initialize the device. We may do this repeatedly * because the log device might be something that was not ready - * the first time that syslog_initializee() was called (such as a + * the first time that syslog_dev_initializee() was called (such as a * USB serial device that has not yet been connected or a file in * an NFS mounted file system that has not yet been mounted). */ - ret = syslog_initialize(); + DEBUGASSERT(g_syslog_dev.sl_devpath != NULL); + ret = syslog_dev_initialize(g_syslog_dev.sl_devpath, + (int)g_syslog_dev.sl_oflags, + (int)g_syslog_dev.sl_mode); if (ret < 0) { sched_unlock(); @@ -460,7 +487,7 @@ int syslog_putc(int ch) } sched_unlock(); - DEBUGASSERT(g_sysdev.sl_state == SYSLOG_OPENED); + DEBUGASSERT(g_syslog_dev.sl_state == SYSLOG_OPENED); } /* Ignore carriage returns */ @@ -474,11 +501,11 @@ int syslog_putc(int ch) * value to write. */ - ret = syslog_takesem(); + ret = syslog_dev_takesem(); if (ret < 0) { /* We probably already hold the semaphore and were probably - * re-entered by the logic kicked off by syslog_write(). + * re-entered by the logic kicked off by syslog_dev_write(). * We might also have been interrupted by a signal. Either * way, we are outta here. */ @@ -493,7 +520,7 @@ int syslog_putc(int ch) { /* Write the CR-LF sequence */ - nbytes = syslog_write(g_syscrlf, 2); + nbytes = syslog_dev_write(g_syscrlf, 2); /* Synchronize the file when each CR-LF is encountered (i.e., * implements line buffering always). @@ -502,7 +529,7 @@ int syslog_putc(int ch) #ifndef CONFIG_DISABLE_MOUNTPOINT if (nbytes > 0) { - syslog_flush(); + (void)syslog_dev_flush(); } #endif } @@ -511,10 +538,10 @@ int syslog_putc(int ch) /* Write the non-newline character (and don't flush) */ uch = (uint8_t)ch; - nbytes = syslog_write(&uch, 1); + nbytes = syslog_dev_write(&uch, 1); } - syslog_givesem(); + syslog_dev_givesem(); /* Check if the write was successful. If not, nbytes will be * a negated errno value. @@ -533,4 +560,40 @@ errout_with_errcode: return EOF; } -#endif /* CONFIG_SYSLOG && CONFIG_SYSLOG_CHAR */ +/**************************************************************************** + * Name: syslog_dev_flush + * + * Description: + * Flush any buffer data in the file system to media. + * + * Input Parameters: + * None + * + * Returned Value: + * Zero (OK) on success; a negated errno value is returned on any failure. + * + ****************************************************************************/ + +int syslog_dev_flush(void) +{ + int ret = 0;; + +#if defined(CONFIG_SYSLOG_FILE) && !defined(CONFIG_DISABLE_MOUNTPOINT) + FAR struct inode *inode = g_syslog_dev.sl_file.f_inode; + + /* Is this a mountpoint? Does it support the sync method? */ + + if (inode != NULL && /* File opened (i.e., has inode)? */ + INODE_IS_MOUNTPT(inode) && /* Inode is a mountpoint? */ + inode->u.i_mops->sync != NULL) /* And supports synce method? */ + { + /* Yes... synchronize to the stream */ + + ret = inode->u.i_mops->sync(&g_syslog_dev.sl_file); + } +#endif + + return ret; +} + +#endif /* CONFIG_NFILE_DESCRIPTORS > 0 */ diff --git a/drivers/mtd/flash_eraseall.c b/drivers/syslog/syslog_emergstream.c similarity index 63% rename from drivers/mtd/flash_eraseall.c rename to drivers/syslog/syslog_emergstream.c index 185da7695c071f9706e6d67221b1543f4b580ee3..e0cc2be6ed93bce10b82ea137272d46485f888f4 100644 --- a/drivers/mtd/flash_eraseall.c +++ b/drivers/syslog/syslog_emergstream.c @@ -1,7 +1,7 @@ /**************************************************************************** - * drivers/mtd/flash_eraseall.c + * drivers/syslog/syslog_emergtream.c * - * Copyright (C) 2011 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,79 +39,78 @@ #include +#include +#include +#include #include -#include -#include -#include -#include +#include +#include -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ +#include "syslog.h" /**************************************************************************** - * Private Types + * Private Functions ****************************************************************************/ /**************************************************************************** - * Private Function Prototypes + * Name: emergstream_putc ****************************************************************************/ -/**************************************************************************** - * Private Data - ****************************************************************************/ +static void emergstream_putc(FAR struct lib_outstream_s *this, int ch) +{ + int ret; -/**************************************************************************** - * Private Functions - ****************************************************************************/ + /* Try writing until the write was successful or until an irrecoverable + * error occurs. + */ + + do + { + /* Write the character to the supported logging device. On failure, + * syslog_putc returns EOF with the errno value set; + */ + + ret = syslog_force(ch); + if (ret != EOF) + { + this->nput++; + return; + } + + /* The special errno value -EINTR means that syslog_putc() was + * awakened by a signal. This is not a real error and must be + * ignored in this context. + */ + } + while (errno == -EINTR); +} /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: flash_eraseall + * Name: emergstream * * Description: - * Call a block driver with the MDIOC_BULKERASE ioctl command. This will - * cause the MTD driver to erase all of the flash. + * Initializes a stream for use with the configured emergency syslog + * interface. Only accessible from with the OS SYSLOG logic. + * + * Input parameters: + * stream - User allocated, uninitialized instance of struct + * lib_lowoutstream_s to be initialized. + * + * Returned Value: + * None (User allocated instance initialized). * ****************************************************************************/ -int flash_eraseall(FAR const char *driver) +void emergstream(FAR struct lib_outstream_s *stream) { - FAR struct inode *inode; - FAR const struct block_operations *ops; - int ret; - - /* Open the block driver */ - - ret = open_blockdriver(driver, 0, &inode); - if (ret < 0) - { - fdbg("ERROR: Failed to open '%s': %d\n", driver, ret); - return ret; - } - - /* Get the block operations */ - - ops = inode->u.i_bops; - - /* Invoke the block driver ioctl method */ - - ret = -EPERM; - if (ops->ioctl) - { - ret = ops->ioctl(inode, MTDIOC_BULKERASE, 0); - if (ret < 0) - { - fdbg("ERROR: MTD ioctl(%04x) failed: %d\n", MTDIOC_BULKERASE, ret); - } - } - - /* Close the block driver */ - - close_blockdriver(inode); - return ret; + stream->put = emergstream_putc; +#ifdef CONFIG_STDIO_LINEBUFFER + stream->flush = lib_noflush; +#endif + stream->nput = 0; } diff --git a/drivers/syslog/syslog_filechannel.c b/drivers/syslog/syslog_filechannel.c new file mode 100644 index 0000000000000000000000000000000000000000..3f2f7d7df14ce98bf01c71feb66e86d397968929 --- /dev/null +++ b/drivers/syslog/syslog_filechannel.c @@ -0,0 +1,194 @@ +/**************************************************************************** + * drivers/syslog/syslog_filechannel.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 "syslog.h" + +#ifdef CONFIG_SYSLOG_FILE + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#define OPEN_FLAGS (O_WRONLY | O_CREAT | O_APPEND) +#define OPEN_MODE (S_IROTH | S_IRGRP | S_IRUSR | S_IWUSR) + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +/* SYSLOG channel methods */ + +static int syslog_file_force(int ch); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* This structure describes the SYSLOG channel */ + +static const struct syslog_channel_s g_syslog_file_channel = +{ + syslog_dev_putc, + syslog_file_force, + syslog_dev_flush, +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: syslog_file_force + * + * Description: + * A dummy FORCE method + * + ****************************************************************************/ + +static int syslog_file_force(int ch) +{ + return ch; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: syslog_file_channel + * + * Description: + * Configure to use a file in a mounted file system at 'devpath' as the + * SYSLOG channel. + * + * This tiny function is simply a wrapper around syslog_dev_initialize() + * and syslog_channel(). It calls syslog_dev_initialize() to configure + * the character file at 'devpath then calls syslog_channel() to use that + * device as the SYSLOG output channel. + * + * File SYSLOG channels differ from other SYSLOG channels in that they + * cannot be established until after fully booting and mounting the target + * file system. This function would need to be called from board-specific + * bring-up logic AFTER mounting the file system containing 'devpath'. + * + * SYSLOG data generated prior to calling syslog_file_channel will, of + * course, not be included in the file. + * + * NOTE interrupt level SYSLOG output will be lost in this case unless + * the interrupt buffer is used. + * + * Input Parameters: + * devpath - The full path to the file to be used for SYSLOG output. + * This may be an existing file or not. If the file exists, + * syslog_file_channel() will append new SYSLOG data to the end of the + * file. If it does not, then syslog_file_channel() will create the + * file. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure. + * + ****************************************************************************/ + +int syslog_file_channel(FAR const char *devpath) +{ + FAR const struct syslog_channel_s *saved_channel; + int ret; + + /* Reset the default SYSLOG channel so that we can safely modify the + * SYSLOG device. This is an atomic operation and we should be safe + * after the default channel has been selected. + * + * We disable pre-emption only so that we are not suspended and a lot of + * important debug output is lost while we futz with the channels. + */ + + sched_lock(); + saved_channel = g_syslog_channel; + ret = syslog_channel(&g_default_syslog_channel); + if (ret < 0) + { + goto errout_with_lock; + } + + /* Uninitialize any driver interface that may have been in place */ + + ret = syslog_dev_uninitialize(); + if (ret < 0) + { + /* Nothing fatal has happened yet, we can restore the last channel + * since it was not uninitialized (was it?) + */ + + (void)syslog_channel(saved_channel); + goto errout_with_lock; + } + + /* Then initialize the file interface */ + + ret = syslog_dev_initialize(devpath, OPEN_FLAGS, OPEN_MODE); + if (ret < 0) + { + /* We should still be able to back-up and re-initialized everything */ + + (void)syslog_initialize(SYSLOG_INIT_EARLY); + (void)syslog_initialize(SYSLOG_INIT_LATE); + goto errout_with_lock; + } + + /* Use the file as the SYSLOG channel. If this fails we are pretty much + * screwed. + */ + + ret = syslog_channel(&g_syslog_file_channel); + +errout_with_lock: + sched_unlock(); + return ret; +} + +#endif /* CONFIG_SYSLOG_FILE */ diff --git a/drivers/syslog/syslog_flush.c b/drivers/syslog/syslog_flush.c new file mode 100644 index 0000000000000000000000000000000000000000..bd30c8a506ab0c98d53d98f1d7884052481332ac --- /dev/null +++ b/drivers/syslog/syslog_flush.c @@ -0,0 +1,95 @@ +/**************************************************************************** + * drivers/syslog/syslog_flush.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 "syslog.h" + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: syslog_flush + * + * Description: + * This is called by system crash-handling logic. It must flush any + * buffered data to the SYSLOG device. + * + * Interrupts are disabled at the time of the crash and this logic must + * perform the flush using low-level, non-interrupt driven logic. + * + * Input Parameters: + * ch - The character to add to the SYSLOG (must be positive). + * + * Returned Value: + * Zero (OK)is returned on success. A negated errno value is returned + * on any failure. + * + ****************************************************************************/ + +#if 0 +/* REVISIT: (1) Not yet integrated into assertion handlers and (2) there is + * an implementation problem in that if a character driver is the underlying + * device, then there is no mechanism to flush the data buffered in the + * driver with interrupts disabled. + */ + +int syslog_flush(void) +{ + DEBUGASSERT(g_syslog_channel != NULL && g_syslog_channel->sc_flush != NULL); + +#ifdef CONFIG_SYSLOG_INTBUFFER + /* Flush any characters that may have been added to the interrupt + * buffer. + */ + + (void)syslog_flush_intbuffer(g_syslog_channel, true); +#endif + + /* Then flush all of the buffered output to the SYSLOG device */ + + return g_syslog_channel->sc_flush(); +} +#endif diff --git a/arch/arm/src/kl/kl_lowgetc.h b/drivers/syslog/syslog_force.c similarity index 64% rename from arch/arm/src/kl/kl_lowgetc.h rename to drivers/syslog/syslog_force.c index 4ed52365a2a4ba3f9304d273df12d8b9d6a64656..418847371dcb7a81b8d18695e56d5caefc3f0822 100644 --- a/arch/arm/src/kl/kl_lowgetc.h +++ b/drivers/syslog/syslog_force.c @@ -1,7 +1,7 @@ -/************************************************************************************ - * arch/arm/src/kl/kl_lowgetc.h +/**************************************************************************** + * drivers/syslog/syslog_force.c * - * Copyright (C) 2013 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 @@ -31,52 +31,56 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************************************/ + ****************************************************************************/ -#ifndef __ARCH_ARM_SRC_KL_KINETIS_LOWGETC_H -#define __ARCH_ARM_SRC_KL_KINETIS_LOWGETC_H - -/************************************************************************************ +/**************************************************************************** * Included Files - ************************************************************************************/ + ****************************************************************************/ #include -#include "kl_config.h" -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ +#include +#include +#include -/************************************************************************************ - * Public Types - ************************************************************************************/ +#include -/************************************************************************************ - * Public Data - ************************************************************************************/ +#include "syslog.h" -#ifndef __ASSEMBLY__ +/**************************************************************************** + * Public Functions + ****************************************************************************/ -#undef EXTERN -#if defined(__cplusplus) -#define EXTERN extern "C" -extern "C" +/**************************************************************************** + * Name: syslog_force + * + * Description: + * This is the low-level system logging interface. This version forces + * the output and is only used in emergency situations (e.g., in assertion + * handling). + * + * Input Parameters: + * ch - The character to add to the SYSLOG (must be positive). + * + * Returned Value: + * On success, the character is echoed back to the caller. A negated + * errno value is returned on any failure. + * + ****************************************************************************/ + +int syslog_force(int ch) { -#else -#define EXTERN extern -#endif + DEBUGASSERT(g_syslog_channel != NULL && g_syslog_channel->sc_force != NULL); -/************************************************************************************ - * Public Functions - ************************************************************************************/ +#ifdef CONFIG_SYSLOG_INTBUFFER + /* Flush any characters that may have been added to the interrupt + * buffer through the emergency channel + */ -#ifdef HAVE_SERIAL_CONSOLE -int kl_lowgetc(void); + (void)syslog_flush_intbuffer(g_syslog_channel, true); #endif -#undef EXTERN -#if defined(__cplusplus) + /* Then send the character to the emergency channel */ + + return g_syslog_channel->sc_force(ch); } -#endif -#endif /* __ASSEMBLY__ */ -#endif /* __ARCH_ARM_SRC_KL_KINETIS_LOWGETC_H */ diff --git a/drivers/syslog/syslog_initialize.c b/drivers/syslog/syslog_initialize.c new file mode 100644 index 0000000000000000000000000000000000000000..3c408e61db97865e0bb8e6b4346174162e7cf629 --- /dev/null +++ b/drivers/syslog/syslog_initialize.c @@ -0,0 +1,115 @@ +/**************************************************************************** + * drivers/syslog/syslog_initialize.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 "syslog.h" + +#ifndef CONFIG_ARCH_SYSLOG + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: syslog_initialize + * + * Description: + * One power up, the SYSLOG facility is non-existent or limited to very + * low-level output. This function is called later in the initialization + * sequence after full driver support has been initialized. It installs + * the configured SYSLOG drivers and enables full SYSLOGing capability. + * + * This function performs these basic operations: + * + * - Initialize the SYSLOG device + * - Call syslog_channel() to begin using that device. + * + * If CONFIG_ARCH_SYSLOG is selected, then the architecture-specifica + * logic will provide its own SYSLOG device initialize which must include + * as a minimum a call to syslog_channel() to use the device. + * + * Input Parameters: + * phase - One of {SYSLOG_INIT_EARLY, SYSLOG_INIT_LATE} + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure. + * + ****************************************************************************/ + +int syslog_initialize(enum syslog_init_e phase) +{ + int ret = OK; + +#if defined(CONFIG_SYSLOG_CHAR) + if (phase == SYSLOG_INIT_LATE) + { + /* Enable use of a character device as the SYSLOG device */ + + ret = syslog_dev_channel(); + } + +#elif defined(CONFIG_RAMLOG_SYSLOG) + if (phase == SYSLOG_INIT_EARLY) + { + /* Use the RAMLOG as the SYSLOG device */ + + ret = ramlog_syslog_channel(); + } + +#elif defined(CONFIG_SYSLOG_CONSOLE) + if (phase == SYSLOG_INIT_LATE) + { + /* Use the console device as the SYSLOG device */ + + ret = syslog_console_channel(); + } + +#endif + + return ret; +} + +#endif /* CONFIG_ARCH_SYSLOG */ diff --git a/drivers/syslog/syslog_intbuffer.c b/drivers/syslog/syslog_intbuffer.c new file mode 100644 index 0000000000000000000000000000000000000000..28be3a74ca4b89203045e624dc6f98e406bf8a86 --- /dev/null +++ b/drivers/syslog/syslog_intbuffer.c @@ -0,0 +1,342 @@ +/**************************************************************************** + * drivers/syslog/syslog_intbuffer.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 "syslog.h" + +#ifdef CONFIG_SYSLOG_INTBUFFER + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Extend the size of the interrupt buffer so that a "[truncated]\n" + * indication can be append to the end. + * + * The usable capacity of the interrupt buffer is (CONFIG_SYSLOG_INTBUFSIZE - 1). + */ + +#define SYSLOG_BUFOVERRUN_MESSAGE "[truncated]\n" +#define SYSLOG_BUFOVERRUN_SIZE 13 + +#if CONFIG_SYSLOG_INTBUFSIZE > (65535 - SYSLOG_BUFOVERRUN_SIZE) +# undef CONFIG_SYSLOG_INTBUFSIZE +# define CONFIG_SYSLOG_INTBUFSIZE (65535 - SYSLOG_BUFOVERRUN_SIZE) +# define SYSLOG_INTBUFSIZE 65535 +#else +# define SYSLOG_INTBUFSIZE \ + (CONFIG_SYSLOG_INTBUFSIZE + SYSLOG_BUFOVERRUN_SIZE) +#endif + +#define USABLE_INTBUFSIZE (CONFIG_SYSLOG_INTBUFSIZE - 1) + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* This structure encapsulates the interrupt buffer state */ + +struct g_syslog_intbuffer_s +{ + volatile uint16_t si_inndx; + volatile uint16_t si_outndx; + uint8_t si_buffer[SYSLOG_INTBUFSIZE]; +}; + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static struct g_syslog_intbuffer_s g_syslog_intbuffer; +static const char g_overrun_msg[SYSLOG_BUFOVERRUN_SIZE] = SYSLOG_BUFOVERRUN_MESSAGE; + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/**************************************************************************** + * Name: syslog_remove_intbuffer + * + * Description: + * Extract any characters that may have been added to the interrupt buffer + * to the SYSLOG device. + * + * Input Parameters: + * None + * + * Returned Value: + * On success, the extracted character is returned. EOF is returned if + * the interrupt buffer is empty. + * + * Assumptions: + * Interrupts may or may not be disabled. + * + ****************************************************************************/ + +int syslog_remove_intbuffer(void) +{ + irqstate_t flags; + uint32_t inndx; + uint32_t outndx; + uint32_t endndx; + int inuse = 0; + int ch; + + /* Extraction of the character and adjustment of the circular buffer + * indices must be performed in a critical section to protect from + * concurrent modification from interrupt handlers. + */ + + flags = enter_critical_section(); + + /* How much space is left in the inbuffer? */ + + inndx = (uint32_t)g_syslog_intbuffer.si_inndx; + outndx = (uint32_t)g_syslog_intbuffer.si_outndx; + if (inndx != outndx) + { + /* Handle the case where the inndx has wrapped around */ + + endndx = inndx; + if (endndx < outndx) + { + endndx += SYSLOG_INTBUFSIZE; + } + + inuse = (int)(endndx - outndx); + + /* Take the next character from the interrupt buffer */ + + ch = g_syslog_intbuffer.si_buffer[outndx]; + + /* Increment the OUT index, handling wrap-around */ + + if (++outndx >= SYSLOG_INTBUFSIZE) + { + outndx -= SYSLOG_INTBUFSIZE; + } + + g_syslog_intbuffer.si_outndx = (uint16_t)outndx; + } + + leave_critical_section(flags); + + /* Now we can send the extracted character to the SYSLOG device */ + + return (inuse > 0) ? ch : EOF; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: syslog_add_intbuffer + * + * Description: + * Add one more character to the interrupt buffer. In the event of + * buffer overlowed, the character will be dropped. The indication + * "[truncated]\n" will be appended to the end of the interrupt buffer. + * + * Input Parameters: + * ch - The character to add to the interrupt buffer (must be positive). + * + * Returned Value: + * Zero success, the character is echoed back to the caller. A negated + * errno value is returned on any failure. + * + * Assumptions: + * - Called either from (1) interrupt handling logic with interrupts + * disabled or from an IDLE thread with interrupts enabled. + * - Requires caution because there may be an interrupted execution of + * syslog_flush_intbuffer(): Only the outndx can be modified. + * + ****************************************************************************/ + +int syslog_add_intbuffer(int ch) +{ + irqstate_t flags; + uint32_t inndx; + uint32_t outndx; + uint32_t endndx; + unsigned int inuse; + int ret; + int i; + + /* Disable concurrent modification from interrupt handling logic */ + + flags = enter_critical_section(); + + /* How much space is left in the inbuffer? */ + + inndx = (uint32_t)g_syslog_intbuffer.si_inndx; + outndx = (uint32_t)g_syslog_intbuffer.si_outndx; + + endndx = inndx; + if (endndx < outndx) + { + endndx += SYSLOG_INTBUFSIZE; + } + + inuse = (unsigned int)(endndx - outndx); + + /* Is there space for another character (reserving space for the overrun + * message)? + */ + + if (inuse == USABLE_INTBUFSIZE) + { + /* Copy the truncated message one character at a time, handing index + * wrap-around on each character. + */ + + for (i = 0; i < SYSLOG_BUFOVERRUN_SIZE; i++) + { + /* Copy one character */ + + g_syslog_intbuffer.si_buffer[inndx] = (uint8_t)g_overrun_msg[i]; + + /* Increment the IN index, handling wrap-around */ + + if (++inndx >= SYSLOG_INTBUFSIZE) + { + inndx -= SYSLOG_INTBUFSIZE; + } + + DEBUGASSERT(inndx != outndx); + } + + g_syslog_intbuffer.si_inndx = (uint16_t)inndx; + ret = -ENOSPC; + } + else if (inuse < USABLE_INTBUFSIZE) + { + /* Copy one character */ + + g_syslog_intbuffer.si_buffer[inndx] = (uint8_t)ch; + + /* Increment the IN index, handling wrap-around */ + + if (++inndx >= SYSLOG_INTBUFSIZE) + { + inndx -= SYSLOG_INTBUFSIZE; + } + + g_syslog_intbuffer.si_inndx = (uint16_t)inndx; + ret = OK; + } + else + { + /* This character goes to the bit bucket. We have already copied + * the overrun message so there is nothing else to do. + */ + + ret = -ENOSPC; + } + + leave_critical_section(flags); + return ret; +} + +/**************************************************************************** + * Name: syslog_flush_intbuffer + * + * Description: + * Flush any characters that may have been added to the interrupt buffer + * to the SYSLOG device. + * + * Input Parameters: + * channel - The syslog channel to use in performing the flush operation. + * force - Use the force() method of the channel vs. the putc() method. + * + * Returned Value: + * On success, the character is echoed back to the caller. A negated + * errno value is returned on any failure. + * + * Assumptions: + * Interrupts may or may not be disabled. + * + ****************************************************************************/ + +int syslog_flush_intbuffer(FAR const struct syslog_channel_s *channel, + bool force) +{ + syslog_putc_t putfunc; + int ch; + int ret = OK; + + /* Select which putc function to use for this flush */ + + putfunc = force ? channel->sc_putc : channel->sc_force; + + /* This logic is performed with the scheduler disabled to protect from + * concurrent modification by other tasks. + */ + + sched_lock(); + do + { + /* Transfer one character to time. This is inefficient, but is + * done in this way to: (1) Deal with concurrent modification of + * the interrupt buffer from interrupt activity, (2) Avoid keeper + * interrupts disabled for a long time, and (3) to handler + * wraparound of the circular buffer indices. + */ + + ch = syslog_remove_intbuffer(); + if (ch != EOF) + { + ret = putfunc(ch); + } + } + while (ch != EOF && ret >= 0); + + sched_unlock(); + return ret; +} + +#endif /* CONFIG_SYSLOG_INTBUFFER */ diff --git a/drivers/syslog/syslog_putc.c b/drivers/syslog/syslog_putc.c new file mode 100644 index 0000000000000000000000000000000000000000..3f19b6c0050a9a057b6f0c6f7765d209986ebf7b --- /dev/null +++ b/drivers/syslog/syslog_putc.c @@ -0,0 +1,110 @@ +/**************************************************************************** + * drivers/syslog/syslog_putc.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 "syslog.h" + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: syslog_putc + * + * Description: + * This is the low-level system logging interface. + * + * Input Parameters: + * ch - The character to add to the SYSLOG (must be positive). + * + * Returned Value: + * On success, the character is echoed back to the caller. A negated + * errno value is returned on any failure. + * + ****************************************************************************/ + +int syslog_putc(int ch) +{ + DEBUGASSERT(g_syslog_channel != NULL); + + /* Is this an attempt to do SYSLOG output from an interrupt handler? */ + + if (up_interrupt_context() || sched_idletask()) + { +#if defined(CONFIG_SYSLOG_INTBUFFER) + /* Buffer the character in the interrupt buffer. The interrupt buffer + * will be flushed before the next normal, non-interrupt SYSLOG output. + */ + + return syslog_add_intbuffer(ch); +#else + /* Force the character to the SYSLOG device immediately (if possible). + * This means that the interrupt data may not be in synchronization + * with output data that may have been buffered by sc_putc(). + */ + + DEBUGASSERT(g_syslog_channel->sc_force != NULL); + + return g_syslog_channel->sc_force(ch); +#endif + } + else + { + DEBUGASSERT(g_syslog_channel->sc_putc != NULL); + +#ifdef CONFIG_SYSLOG_INTBUFFER + /* Flush any characters that may have been added to the interrupt + * buffer. + */ + + (void)syslog_flush_intbuffer(g_syslog_channel, false); +#endif + + return g_syslog_channel->sc_putc(ch); + } +} diff --git a/libc/syslog/lib_syslogstream.c b/drivers/syslog/syslog_stream.c similarity index 86% rename from libc/syslog/lib_syslogstream.c rename to drivers/syslog/syslog_stream.c index 4c6cfa8c2e1347654215e2a50bee7feec163d65a..491da95c266b029da52fbb751c087d7ffd87f358 100644 --- a/libc/syslog/lib_syslogstream.c +++ b/drivers/syslog/syslog_stream.c @@ -1,7 +1,7 @@ /**************************************************************************** - * libc/syslog/lib_syslogstream.c + * drivers/syslog/syslog_stream.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,13 +47,7 @@ #include #include -#include "syslog/syslog.h" - -#ifdef CONFIG_SYSLOG - -/**************************************************************************** - * Pre-processor definition - ****************************************************************************/ +#include "syslog.h" /**************************************************************************** * Private Functions @@ -97,21 +91,22 @@ static void syslogstream_putc(FAR struct lib_outstream_s *this, int ch) ****************************************************************************/ /**************************************************************************** - * Name: lib_syslogstream + * Name: syslogstream * * Description: * Initializes a stream for use with the configured syslog interface. + * Only accessible from with the OS SYSLOG logic. * * 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). * ****************************************************************************/ -void lib_syslogstream(FAR struct lib_outstream_s *stream) +void syslogstream(FAR struct lib_outstream_s *stream) { stream->put = syslogstream_putc; #ifdef CONFIG_STDIO_LINEBUFFER @@ -119,5 +114,3 @@ void lib_syslogstream(FAR struct lib_outstream_s *stream) #endif stream->nput = 0; } - -#endif /* CONFIG_SYSLOG */ diff --git a/drivers/syslog/vsyslog.c b/drivers/syslog/vsyslog.c new file mode 100644 index 0000000000000000000000000000000000000000..27fab399ecbf98cd6e99b3cd5c81ed3d23ff5c2a --- /dev/null +++ b/drivers/syslog/vsyslog.c @@ -0,0 +1,114 @@ +/**************************************************************************** + * drivers/syslog/vsyslog.c + * + * Copyright (C) 2007-2009, 2011-2014, 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 + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: _vsyslog + * + * Description: + * _vsyslog() handles the system logging system calls. It is functionally + * equivalent to vsyslog() except that (1) the per-process priority + * filtering has already been performed and the va_list parameter is + * passed by reference. That is because the va_list is a structure in + * some compilers and passing of structures in the NuttX sycalls does + * not work. + * + ****************************************************************************/ + +int _vsyslog(int priority, FAR const IPTR char *fmt, FAR va_list *ap) +{ + struct lib_outstream_s stream; +#ifdef CONFIG_SYSLOG_TIMESTAMP + struct timespec ts; + + /* Get the current time. Since debug output may be generated very early + * in the start-up sequence, hardware timer support may not yet be + * available. + */ + + if (!OSINIT_HW_READY() || clock_systimespec(&ts) < 0) + { + /* Timer hardware is not available, or clock_systimespec failed */ + + ts.tv_sec = 0; + ts.tv_nsec = 0; + } +#endif + + /* Wrap the low-level output in a stream object and let lib_vsprintf + * do the work. NOTE that emergency priority output is handled + * differently.. it will use the SYSLOG emergency stream. + */ + + if (priority == LOG_EMERG) + { + /* Use the SYSLOG emergency stream */ + + emergstream((FAR struct lib_outstream_s *)&stream); + } + else + { + /* Use the normal SYSLOG stream */ + + syslogstream((FAR struct lib_outstream_s *)&stream); + } + +#if defined(CONFIG_SYSLOG_TIMESTAMP) + /* Pre-pend the message with the current time, if available */ + + (void)lib_sprintf((FAR struct lib_outstream_s *)&stream, + "[%6d.%06d]", ts.tv_sec, ts.tv_nsec/1000); +#endif + + return lib_vsprintf((FAR struct lib_outstream_s *)&stream, fmt, *ap); +} diff --git a/drivers/timers/Kconfig b/drivers/timers/Kconfig index ef5d6aed71535d8e4fce77d12ef78b367bfc4e0b..076cc43c8bfc12873ace4288cf5f10d6f3a4b349 100644 --- a/drivers/timers/Kconfig +++ b/drivers/timers/Kconfig @@ -237,11 +237,11 @@ if TIMERS_CS2100CP config CS2100CP_DEBUG bool "Enable CS2100-CP Debug Features" - depends on DEBUG + depends on DEBUG_FEATURES config CS2100CP_REGDEBUG bool "Enable CS2100-CP Register Debug" - depends on DEBUG + depends on DEBUG_FEATURES endif # TIMERS_CS2100CP endmenu # Timer Driver Support diff --git a/drivers/timers/cs2100-cp.c b/drivers/timers/cs2100-cp.c index 11ed144cb4432c340a590e2879183dcd4ca17b97..82c80bf403ba8556911a661b2377ce1ebeeb2c6c 100644 --- a/drivers/timers/cs2100-cp.c +++ b/drivers/timers/cs2100-cp.c @@ -66,44 +66,36 @@ /* Debug ********************************************************************/ -#undef csdbg +#undef cserr #ifdef CONFIG_CS2100CP_DEBUG # ifdef CONFIG_CPP_HAVE_VARARGS -# define csdbg(format, ...) dbg(format, ##__VA_ARGS__) +# define cserr(format, ...) _err(format, ##__VA_ARGS__) # else -# define csdbg dbg +# define cserr _err # endif #else # ifdef CONFIG_CPP_HAVE_VARARGS -# define csdbg(x...) +# define cserr(x...) # else -# define csdbg (void) +# define cserr (void) # endif #endif -#undef regdbg +#undef reginfo #ifdef CONFIG_CS2100CP_REGDEBUG # ifdef CONFIG_CPP_HAVE_VARARGS -# define regdbg(format, ...) dbg(format, ##__VA_ARGS__) +# define reginfo(format, ...) _err(format, ##__VA_ARGS__) # else -# define regdbg dbg +# define reginfo _err # endif #else # ifdef CONFIG_CPP_HAVE_VARARGS -# define regdbg(x...) +# define reginfo(x...) # else -# define regdbg (void) +# define reginfo (void) # endif #endif -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -129,7 +121,7 @@ static int cs2100_write_reg(FAR const struct cs2100_config_s *config, { struct i2c_msg_s msgs[2]; - regdbg("%02x<-%02x\n", regaddr, regval); + reginfo("%02x<-%02x\n", regaddr, regval); DEBUGASSERT(config->i2c->ops && config->i2c->ops->transfer); /* Construct the I2C message (write N+1 bytes with no restart) */ @@ -200,7 +192,7 @@ static int cs2100_read_reg(FAR const struct cs2100_config_s *config, ret = I2C_TRANSFER(config->i2c, &msg, 1); if (ret == OK) { - regdbg("%02x->%02x\n", regaddr, *regval); + reginfo("%02x->%02x\n", regaddr, *regval); } } @@ -229,7 +221,7 @@ static int cs2100_write_ratio(FAR const struct cs2100_config_s *config, struct i2c_msg_s msg; uint8_t buffer[5]; - regdbg("%02x<-%04l\n", CS2100_RATIO0, (unsigned long)ratio); + reginfo("%02x<-%04l\n", CS2100_RATIO0, (unsigned long)ratio); DEBUGASSERT(config->i2c->ops && config->i2c->ops->transfer); /* Construct the I2C message (write N+1 bytes with no restart) */ @@ -310,7 +302,7 @@ static int cs2100_read_ratio(FAR const struct cs2100_config_s *config, ((uint32_t)buffer[2] << 8) | (uint32_t)buffer[0]; - regdbg("%02x->%04l\n", CS2100_RATIO0, (unsigned long)*ratio); + reginfo("%02x->%04l\n", CS2100_RATIO0, (unsigned long)*ratio); } } @@ -356,7 +348,7 @@ static int cs2100_refclk(FAR const struct cs2100_config_s *config) } else { - csdbg("ERROR: reflck too large: %ul\n", (unsigned long)config->refclk); + cserr("ERROR: reflck too large: %ul\n", (unsigned long)config->refclk); return -EINVAL; } @@ -370,7 +362,7 @@ static int cs2100_refclk(FAR const struct cs2100_config_s *config) ret = cs2100_write_reg(config, CS2100_FNCCFG1, regval); if (ret < 0) { - csdbg("ERROR: Failed to set CS2100_FNCCFG1: %d\n", ret); + cserr("ERROR: Failed to set CS2100_FNCCFG1: %d\n", ret); return ret; } @@ -414,7 +406,7 @@ static int cs2100_refclk(FAR const struct cs2100_config_s *config) ret = cs2100_write_reg(config, CS2100_FNCCFG3, regval); if (ret < 0) { - csdbg("ERROR: Failed to set CS2100_FNCCFG3: %d\n", ret); + cserr("ERROR: Failed to set CS2100_FNCCFG3: %d\n", ret); return ret; } @@ -426,7 +418,7 @@ static int cs2100_refclk(FAR const struct cs2100_config_s *config) ret = cs2100_write_reg(config, CS2100_FNCCFG2, CS2100_FNCCFG2_CLKOUTUNL); if (ret < 0) { - csdbg("ERROR: Failed to set CS2100_FNCCFG2: %d\n", ret); + cserr("ERROR: Failed to set CS2100_FNCCFG2: %d\n", ret); } return ret; @@ -554,7 +546,7 @@ static int cs2100_ratio(FAR const struct cs2100_config_s *config) } else { - csdbg("ERROR: Ratio too large: %08llx\n", rudb24); + cserr("ERROR: Ratio too large: %08llx\n", rudb24); return -E2BIG; } @@ -563,7 +555,7 @@ static int cs2100_ratio(FAR const struct cs2100_config_s *config) ret = cs2100_write_ratio(config, rud); if (ret < 0) { - csdbg("ERROR: Failed to set ratio: %d\n", ret); + cserr("ERROR: Failed to set ratio: %d\n", ret); return ret; } @@ -576,7 +568,7 @@ static int cs2100_ratio(FAR const struct cs2100_config_s *config) ret = cs2100_write_reg(config, CS2100_DEVCFG1, regval); if (ret < 0) { - csdbg("ERROR: Failed to set CS2100_DEVCFG1: %d\n", ret); + cserr("ERROR: Failed to set CS2100_DEVCFG1: %d\n", ret); return ret; } @@ -628,7 +620,7 @@ int cs2100_enable(FAR const struct cs2100_config_s *config) ret = cs2100_write_reg(config, CS2100_DEVCTL, regval); if (ret < 0) { - csdbg("ERROR: Failed to set CS2100_DEVCTL: %d\n", ret); + cserr("ERROR: Failed to set CS2100_DEVCTL: %d\n", ret); return ret; } @@ -637,7 +629,7 @@ int cs2100_enable(FAR const struct cs2100_config_s *config) ret = cs2100_refclk(config); if (ret < 0) { - csdbg("ERROR: cs2100_refclk failed: %d\n", ret); + cserr("ERROR: cs2100_refclk failed: %d\n", ret); return ret; } @@ -649,7 +641,7 @@ int cs2100_enable(FAR const struct cs2100_config_s *config) ret = cs2100_write_reg(config, CS2100_GBLCFG, CS2100_GBLCFG_FREEZE); if (ret < 0) { - csdbg("ERROR: Failed to set CS2100_GBLCFG: %d\n", ret); + cserr("ERROR: Failed to set CS2100_GBLCFG: %d\n", ret); return ret; } @@ -658,7 +650,7 @@ int cs2100_enable(FAR const struct cs2100_config_s *config) ret = cs2100_ratio(config); if (ret < 0) { - csdbg("ERROR: cs2100_ratio failed: %d\n", ret); + cserr("ERROR: cs2100_ratio failed: %d\n", ret); return ret; } @@ -667,7 +659,7 @@ int cs2100_enable(FAR const struct cs2100_config_s *config) ret = cs2100_write_reg(config, CS2100_GBLCFG, CS2100_GBLCFG_ENDEVCFG2); if (ret < 0) { - csdbg("ERROR: Failed to set CS2100_GBLCFG: %d\n", ret); + cserr("ERROR: Failed to set CS2100_GBLCFG: %d\n", ret); return ret; } @@ -677,7 +669,7 @@ int cs2100_enable(FAR const struct cs2100_config_s *config) ret = cs2100_write_reg(config, CS2100_DEVCTL, regval); if (ret < 0) { - csdbg("ERROR: Failed to set CS2100_DEVCTL: %d\n", ret); + cserr("ERROR: Failed to set CS2100_DEVCTL: %d\n", ret); } return ret; @@ -709,7 +701,7 @@ int cs2100_disable(FAR const struct cs2100_config_s *config) ret = cs2100_write_reg(config, CS2100_DEVCTL, regval); if (ret < 0) { - csdbg("ERROR: Failed to set CS2100_DEVCTL: %d\n", ret); + cserr("ERROR: Failed to set CS2100_DEVCTL: %d\n", ret); return ret; } @@ -718,7 +710,7 @@ int cs2100_disable(FAR const struct cs2100_config_s *config) ret = cs2100_write_reg(config, CS2100_GBLCFG, 0); if (ret < 0) { - csdbg("ERROR: Failed to set CS2100_GBLCFG: %d\n", ret); + cserr("ERROR: Failed to set CS2100_GBLCFG: %d\n", ret); return ret; } @@ -727,7 +719,7 @@ int cs2100_disable(FAR const struct cs2100_config_s *config) ret = cs2100_write_reg(config, CS2100_DEVCFG1, 0); if (ret < 0) { - csdbg("ERROR: Failed to set CS2100_DEVCFG1: %d\n", ret); + cserr("ERROR: Failed to set CS2100_DEVCFG1: %d\n", ret); return ret; } @@ -737,7 +729,7 @@ int cs2100_disable(FAR const struct cs2100_config_s *config) ret = cs2100_write_reg(config, CS2100_DEVCTL, regval); if (ret < 0) { - csdbg("ERROR: Failed to set CS2100_DEVCTL: %d\n", ret); + cserr("ERROR: Failed to set CS2100_DEVCTL: %d\n", ret); } return ret; @@ -764,79 +756,79 @@ int cs2100_dump(FAR const struct cs2100_config_s *config) uint8_t regval; int ret; - dbg("CS200-CP Registers:\n"); + csinfo("CS200-CP Registers:\n"); ret = cs2100_read_reg(config, CS2100_DEVID, ®val); if (ret < 0) { - csdbg("ERROR: Failed to read CS2100_DEVID: %d\n", ret); + cserr("ERROR: Failed to read CS2100_DEVID: %d\n", ret); return ret; } - dbg(" Devid: %02x\n", regval); + csinfo(" Devid: %02x\n", regval); ret = cs2100_read_reg(config, CS2100_DEVCTL, ®val); if (ret < 0) { - csdbg("ERROR: Failed to read CS2100_DEVCTL: %d\n", ret); + cserr("ERROR: Failed to read CS2100_DEVCTL: %d\n", ret); return ret; } - dbg(" DevCtl: %02x\n", regval); + csinfo(" DevCtl: %02x\n", regval); ret = cs2100_read_reg(config, CS2100_DEVCFG1, ®val); if (ret < 0) { - csdbg("ERROR: Failed to read CS2100_DEVCFG1: %d\n", ret); + cserr("ERROR: Failed to read CS2100_DEVCFG1: %d\n", ret); return ret; } - dbg(" DevCfg1: %02x\n", regval); + csinfo(" DevCfg1: %02x\n", regval); ret = cs2100_read_reg(config, CS2100_GBLCFG, ®val); if (ret < 0) { - csdbg("ERROR: Failed to read CS2100_GBLCFG: %d\n", ret); + cserr("ERROR: Failed to read CS2100_GBLCFG: %d\n", ret); return ret; } - dbg(" GblCfg: %02x\n", regval); + csinfo(" GblCfg: %02x\n", regval); ret = cs2100_read_ratio(config, &ratio); if (ret < 0) { - csdbg("ERROR: cs2100_read_ratio failed: %d\n", ret); + cserr("ERROR: cs2100_read_ratio failed: %d\n", ret); return ret; } - dbg(" Ratio: %04lx\n", (unsigned long)ratio); + csinfo(" Ratio: %04lx\n", (unsigned long)ratio); ret = cs2100_read_reg(config, CS2100_FNCCFG1, ®val); if (ret < 0) { - csdbg("ERROR: Failed to read CS2100_FNCCFG1: %d\n", ret); + cserr("ERROR: Failed to read CS2100_FNCCFG1: %d\n", ret); return ret; } - dbg(" FuncCfg1: %02x\n", regval); + csinfo(" FuncCfg1: %02x\n", regval); ret = cs2100_read_reg(config, CS2100_FNCCFG2, ®val); if (ret < 0) { - csdbg("ERROR: Failed to read CS2100_FNCCFG2: %d\n", ret); + cserr("ERROR: Failed to read CS2100_FNCCFG2: %d\n", ret); return ret; } - dbg(" FuncCfg2: %02x\n", regval); + csinfo(" FuncCfg2: %02x\n", regval); ret = cs2100_read_reg(config, CS2100_FNCCFG3, ®val); if (ret < 0) { - csdbg("ERROR: Failed to read CS2100_FNCCFG3: %d\n", ret); + cserr("ERROR: Failed to read CS2100_FNCCFG3: %d\n", ret); return ret; } - dbg(" FuncCfg3: %02x\n", regval); + csinfo(" FuncCfg3: %02x\n", regval); return OK; } diff --git a/drivers/timers/ds3231.c b/drivers/timers/ds3231.c index 7efaaecb0397fd5656f025ca49fc152bfaff39aa..4f1e2a1c9f5b0ede1c4d0948b9078a604421b450 100644 --- a/drivers/timers/ds3231.c +++ b/drivers/timers/ds3231.c @@ -77,24 +77,6 @@ #define DS3231_I2C_ADDRESS 0x68 -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_RTC -#endif - -/* Debug ****************************************************************************/ - -#ifdef CONFIG_DEBUG_RTC -# define rtcdbg dbg -# define rtcvdbg vdbg -# define rtclldbg lldbg -# define rtcllvdbg llvdbg -#else -# define rtcdbg(x...) -# define rtcvdbg(x...) -# define rtclldbg(x...) -# define rtcllvdbg(x...) -#endif - /************************************************************************************ * Priviate Types ************************************************************************************/ @@ -140,20 +122,20 @@ static struct ds3231_dev_s g_ds3231; * ************************************************************************************/ -#ifdef CONFIG_DEBUG_RTC +#ifdef CONFIG_DEBUG_RTC_INFO static void rtc_dumptime(FAR struct tm *tp, FAR const char *msg) { - rtclldbg("%s:\n", msg); - rtclldbg(" tm_sec: %08x\n", tp->tm_sec); - rtclldbg(" tm_min: %08x\n", tp->tm_min); - rtclldbg(" tm_hour: %08x\n", tp->tm_hour); - rtclldbg(" tm_mday: %08x\n", tp->tm_mday); - rtclldbg(" tm_mon: %08x\n", tp->tm_mon); - rtclldbg(" tm_year: %08x\n", tp->tm_year); + rtcinfo("%s:\n", msg); + rtcinfo(" tm_sec: %08x\n", tp->tm_sec); + rtcinfo(" tm_min: %08x\n", tp->tm_min); + rtcinfo(" tm_hour: %08x\n", tp->tm_hour); + rtcinfo(" tm_mday: %08x\n", tp->tm_mday); + rtcinfo(" tm_mon: %08x\n", tp->tm_mon); + rtcinfo(" tm_year: %08x\n", tp->tm_year); #if defined(CONFIG_LIBC_LOCALTIME) || defined(CONFIG_TIME_EXTENDED) - rtclldbg(" tm_wday: %08x\n", tp->tm_wday); - rtclldbg(" tm_yday: %08x\n", tp->tm_yday); - rtclldbg(" tm_isdst: %08x\n", tp->tm_isdst); + rtcinfo(" tm_wday: %08x\n", tp->tm_wday); + rtcinfo(" tm_yday: %08x\n", tp->tm_yday); + rtcinfo(" tm_isdst: %08x\n", tp->tm_isdst); #endif } #else @@ -339,7 +321,7 @@ int up_rtc_getdatetime(FAR struct tm *tp) ret = I2C_TRANSFER(g_ds3231.i2c, msg, 4); if (ret < 0) { - rtcdbg("ERROR: I2C_TRANSFER failed: %d\n", ret) + rtcerr("ERROR: I2C_TRANSFER failed: %d\n", ret) return ret; } } @@ -448,13 +430,13 @@ int up_rtc_settime(FAR const struct timespec *tp) #ifdef CONFIG_LIBC_LOCALTIME if (localtime_r(&newtime, &newtm) == NULL) { - rtcdbg("ERROR: localtime_r failed\n") + rtcerr("ERROR: localtime_r failed\n") return -EINVAL; } #else if (gmtime_r(&newtime, &newtm) == NULL) { - rtcdbg("ERROR: gmtime_r failed\n") + rtcerr("ERROR: gmtime_r failed\n") return -EINVAL; } #endif @@ -554,7 +536,7 @@ int up_rtc_settime(FAR const struct timespec *tp) ret = I2C_TRANSFER(g_ds3231.i2c, msg, 3); if (ret < 0) { - rtcdbg("ERROR: I2C_TRANSFER failed: %d\n", ret) + rtcerr("ERROR: I2C_TRANSFER failed: %d\n", ret) return ret; } } diff --git a/drivers/timers/pcf85263.c b/drivers/timers/pcf85263.c index 0128e354f23d60251225f82cf5ace6346ef756fd..f162699f20ba156290ad371300bac2aea9814769 100644 --- a/drivers/timers/pcf85263.c +++ b/drivers/timers/pcf85263.c @@ -77,24 +77,6 @@ #define PCF85263_I2C_ADDRESS 0x51 -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_RTC -#endif - -/* Debug ****************************************************************************/ - -#ifdef CONFIG_DEBUG_RTC -# define rtcdbg dbg -# define rtcvdbg vdbg -# define rtclldbg lldbg -# define rtcllvdbg llvdbg -#else -# define rtcdbg(x...) -# define rtcvdbg(x...) -# define rtclldbg(x...) -# define rtcllvdbg(x...) -#endif - /************************************************************************************ * Priviate Types ************************************************************************************/ @@ -140,20 +122,20 @@ static struct pcf85263_dev_s g_pcf85263; * ************************************************************************************/ -#ifdef CONFIG_DEBUG_RTC +#ifdef CONFIG_DEBUG_RTC_INFO static void rtc_dumptime(FAR struct tm *tp, FAR const char *msg) { - rtclldbg("%s:\n", msg); - rtclldbg(" tm_sec: %08x\n", tp->tm_sec); - rtclldbg(" tm_min: %08x\n", tp->tm_min); - rtclldbg(" tm_hour: %08x\n", tp->tm_hour); - rtclldbg(" tm_mday: %08x\n", tp->tm_mday); - rtclldbg(" tm_mon: %08x\n", tp->tm_mon); - rtclldbg(" tm_year: %08x\n", tp->tm_year); + rtcinfo("%s:\n", msg); + rtcinfo(" tm_sec: %08x\n", tp->tm_sec); + rtcinfo(" tm_min: %08x\n", tp->tm_min); + rtcinfo(" tm_hour: %08x\n", tp->tm_hour); + rtcinfo(" tm_mday: %08x\n", tp->tm_mday); + rtcinfo(" tm_mon: %08x\n", tp->tm_mon); + rtcinfo(" tm_year: %08x\n", tp->tm_year); #if defined(CONFIG_LIBC_LOCALTIME) || defined(CONFIG_TIME_EXTENDED) - rtclldbg(" tm_wday: %08x\n", tp->tm_wday); - rtclldbg(" tm_yday: %08x\n", tp->tm_yday); - rtclldbg(" tm_isdst: %08x\n", tp->tm_isdst); + rtcinfo(" tm_wday: %08x\n", tp->tm_wday); + rtcinfo(" tm_yday: %08x\n", tp->tm_yday); + rtcinfo(" tm_isdst: %08x\n", tp->tm_isdst); #endif } #else @@ -338,7 +320,7 @@ int up_rtc_getdatetime(FAR struct tm *tp) ret = I2C_TRANSFER(g_pcf85263.i2c, msg, 4); if (ret < 0) { - rtcdbg("ERROR: I2C_TRANSFER failed: %d\n", ret) + rtcerr("ERROR: I2C_TRANSFER failed: %d\n", ret) return ret; } } @@ -431,13 +413,13 @@ int up_rtc_settime(FAR const struct timespec *tp) #ifdef CONFIG_LIBC_LOCALTIME if (localtime_r(&newtime, &newtm) == NULL) { - rtcdbg("ERROR: localtime_r failed\n") + rtcerr("ERROR: localtime_r failed\n") return -EINVAL; } #else if (gmtime_r(&newtime, &newtm) == NULL) { - rtcdbg("ERROR: gmtime_r failed\n") + rtcerr("ERROR: gmtime_r failed\n") return -EINVAL; } #endif @@ -518,7 +500,7 @@ int up_rtc_settime(FAR const struct timespec *tp) ret = I2C_TRANSFER(g_pcf85263.i2c, msg, 3); if (ret < 0) { - rtcdbg("ERROR: I2C_TRANSFER failed: %d\n", ret) + rtcerr("ERROR: I2C_TRANSFER failed: %d\n", ret) return ret; } } diff --git a/drivers/timers/timer.c b/drivers/timers/timer.c index afdd39a39ea043e40a553a527e93c7f1fba5a895..0186e9977f1b12de3e45c8bd560ef0549e75e8f7 100644 --- a/drivers/timers/timer.c +++ b/drivers/timers/timer.c @@ -57,24 +57,6 @@ #ifdef CONFIG_TIMER -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the timer driver */ - -#ifdef CONFIG_DEBUG_TIMER -# define tmrdbg dbg -# define tmrvdbg vdbg -# define tmrlldbg lldbg -# define tmrllvdbg llvdbg -#else -# define tmrdbg(x...) -# define tmrvdbg(x...) -# define tmrlldbg(x...) -# define tmrllvdbg(x...) -#endif - /**************************************************************************** * Private Type Definitions ****************************************************************************/ @@ -143,7 +125,7 @@ static int timer_open(FAR struct file *filep) uint8_t tmp; int ret; - tmrvdbg("crefs: %d\n", upper->crefs); + tmrinfo("crefs: %d\n", upper->crefs); /* Increment the count of references to the device. If this the first * time that the driver has been opened for this device, then initialize @@ -181,7 +163,7 @@ static int timer_close(FAR struct file *filep) FAR struct inode *inode = filep->f_inode; FAR struct timer_upperhalf_s *upper = inode->i_private; - tmrvdbg("crefs: %d\n", upper->crefs); + tmrinfo("crefs: %d\n", upper->crefs); /* Decrement the references to the driver. If the reference count will * decrement to 0, then uninitialize the driver. @@ -240,7 +222,7 @@ static int timer_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR struct timer_lowerhalf_s *lower = upper->lower; int ret; - tmrvdbg("cmd: %d arg: %ld\n", cmd, arg); + tmrinfo("cmd: %d arg: %ld\n", cmd, arg); DEBUGASSERT(upper && lower); /* Handle built-in ioctl commands */ @@ -276,7 +258,7 @@ static int timer_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { /* Stop the timer */ - if (lower->ops->start) + if (lower->ops->stop) { ret = lower->ops->stop(lower); } @@ -384,7 +366,7 @@ static int timer_ioctl(FAR struct file *filep, int cmd, unsigned long arg) default: { - tmrvdbg("Forwarding unrecognized cmd: %d arg: %ld\n", cmd, arg); + tmrinfo("Forwarding unrecognized cmd: %d arg: %ld\n", cmd, arg); /* An ioctl commands that are not recognized by the "upper-half" * driver are forwarded to the lower half driver through this @@ -443,7 +425,7 @@ FAR void *timer_register(FAR const char *path, int ret; DEBUGASSERT(path && lower); - tmrvdbg("Entry: path=%s\n", path); + tmrinfo("Entry: path=%s\n", path); /* Allocate the upper-half data structure */ @@ -451,7 +433,7 @@ FAR void *timer_register(FAR const char *path, kmm_zalloc(sizeof(struct timer_upperhalf_s)); if (!upper) { - tmrdbg("Upper half allocation failed\n"); + tmrerr("ERROR: Upper half allocation failed\n"); goto errout; } @@ -466,7 +448,7 @@ FAR void *timer_register(FAR const char *path, upper->path = strdup(path); if (!upper->path) { - tmrdbg("Path allocation failed\n"); + tmrerr("ERROR: Path allocation failed\n"); goto errout_with_upper; } @@ -475,7 +457,7 @@ FAR void *timer_register(FAR const char *path, ret = register_driver(path, &g_timerops, 0666, upper); if (ret < 0) { - tmrdbg("register_driver failed: %d\n", ret); + tmrerr("ERROR: register_driver failed: %d\n", ret); goto errout_with_path; } @@ -517,7 +499,7 @@ void timer_unregister(FAR void *handle) lower = upper->lower; DEBUGASSERT(upper && lower); - tmrvdbg("Unregistering: %s\n", upper->path); + tmrinfo("Unregistering: %s\n", upper->path); /* Disable the timer */ diff --git a/drivers/timers/watchdog.c b/drivers/timers/watchdog.c index e6bef99ac1710c89bad08a695531bf7d962a7d67..e9320a961218c8028954d26c9e1f1f6b2fd7f801 100644 --- a/drivers/timers/watchdog.c +++ b/drivers/timers/watchdog.c @@ -56,24 +56,6 @@ #ifdef CONFIG_WATCHDOG -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Non-standard debug that may be enabled just for testing the watchdog driver */ - -#ifdef CONFIG_DEBUG_WATCHDOG -# define wddbg dbg -# define wdvdbg vdbg -# define wdlldbg lldbg -# define wdllvdbg llvdbg -#else -# define wddbg(x...) -# define wdvdbg(x...) -# define wdlldbg(x...) -# define wdllvdbg(x...) -#endif - /**************************************************************************** * Private Type Definitions ****************************************************************************/ @@ -140,7 +122,7 @@ static int wdog_open(FAR struct file *filep) uint8_t tmp; int ret; - wdvdbg("crefs: %d\n", upper->crefs); + wdinfo("crefs: %d\n", upper->crefs); /* Get exclusive access to the device structures */ @@ -191,7 +173,7 @@ static int wdog_close(FAR struct file *filep) FAR struct watchdog_upperhalf_s *upper = inode->i_private; int ret; - wdvdbg("crefs: %d\n", upper->crefs); + wdinfo("crefs: %d\n", upper->crefs); /* Get exclusive access to the device structures */ @@ -262,7 +244,7 @@ static int wdog_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR struct watchdog_lowerhalf_s *lower = upper->lower; int ret; - wdvdbg("cmd: %d arg: %ld\n", cmd, arg); + wdinfo("cmd: %d arg: %ld\n", cmd, arg); DEBUGASSERT(upper && lower); /* Get exclusive access to the device structures */ @@ -418,7 +400,7 @@ static int wdog_ioctl(FAR struct file *filep, int cmd, unsigned long arg) default: { - wdvdbg("Forwarding unrecognized cmd: %d arg: %ld\n", cmd, arg); + wdinfo("Forwarding unrecognized cmd: %d arg: %ld\n", cmd, arg); /* An ioctl commands that are not recognized by the "upper-half" * driver are forwarded to the lower half driver through this @@ -478,7 +460,7 @@ FAR void *watchdog_register(FAR const char *path, int ret; DEBUGASSERT(path && lower); - wdvdbg("Entry: path=%s\n", path); + wdinfo("Entry: path=%s\n", path); /* Allocate the upper-half data structure */ @@ -486,7 +468,7 @@ FAR void *watchdog_register(FAR const char *path, kmm_zalloc(sizeof(struct watchdog_upperhalf_s)); if (!upper) { - wddbg("Upper half allocation failed\n"); + wderr("Upper half allocation failed\n"); goto errout; } @@ -502,7 +484,7 @@ FAR void *watchdog_register(FAR const char *path, upper->path = strdup(path); if (!upper->path) { - wddbg("Path allocation failed\n"); + wderr("Path allocation failed\n"); goto errout_with_upper; } @@ -511,7 +493,7 @@ FAR void *watchdog_register(FAR const char *path, ret = register_driver(path, &g_wdogops, 0666, upper); if (ret < 0) { - wddbg("register_driver failed: %d\n", ret); + wderr("register_driver failed: %d\n", ret); goto errout_with_path; } @@ -554,7 +536,7 @@ void watchdog_unregister(FAR void *handle) lower = upper->lower; DEBUGASSERT(upper && lower); - wdvdbg("Unregistering: %s\n", upper->path); + wdinfo("Unregistering: %s\n", upper->path); /* Disable the watchdog timer */ diff --git a/drivers/usbdev/cdcacm.c b/drivers/usbdev/cdcacm.c index 6767fd8e521490e7e9e5456158722db7dcb8c19c..48dbdf5cb0bb6e6a53cdf8ab309a7c4ba9920e9f 100644 --- a/drivers/usbdev/cdcacm.c +++ b/drivers/usbdev/cdcacm.c @@ -339,7 +339,7 @@ static int cdcacm_sndpacket(FAR struct cdcacm_dev_s *priv) int len; int ret = OK; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (priv == NULL) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -358,7 +358,7 @@ static int cdcacm_sndpacket(FAR struct cdcacm_dev_s *priv) * to be sent). */ - uvdbg("head=%d tail=%d nwrq=%d empty=%d\n", + uinfo("head=%d tail=%d nwrq=%d empty=%d\n", priv->serdev.xmit.head, priv->serdev.xmit.tail, priv->nwrq, sq_empty(&priv->reqlist)); @@ -427,7 +427,7 @@ static inline int cdcacm_recvpacket(FAR struct cdcacm_dev_s *priv, uint16_t nexthead; uint16_t nbytes = 0; - uvdbg("head=%d tail=%d nrdq=%d reqlen=%d\n", + uinfo("head=%d tail=%d nrdq=%d reqlen=%d\n", priv->serdev.recv.head, priv->serdev.recv.tail, priv->nrdq, reqlen); /* Get the next head index. During the time that RX interrupts are disabled, the @@ -643,7 +643,7 @@ static int cdcacm_setconfig(FAR struct cdcacm_dev_s *priv, uint8_t config) int i; int ret = 0; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (priv == NULL) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -817,7 +817,7 @@ static void cdcacm_rdcomplete(FAR struct usbdev_ep_s *ep, /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !ep->priv || !req) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -880,7 +880,7 @@ static void cdcacm_wrcomplete(FAR struct usbdev_ep_s *ep, /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !ep->priv || !req || !req->priv) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -1120,7 +1120,7 @@ static void cdcacm_unbind(FAR struct usbdevclass_driver_s *driver, usbtrace(TRACE_CLASSUNBIND, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !dev) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -1132,7 +1132,7 @@ static void cdcacm_unbind(FAR struct usbdevclass_driver_s *driver, priv = ((FAR struct cdcacm_driver_s *)driver)->dev; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_EP0NOTBOUND), 0); @@ -1248,7 +1248,7 @@ static int cdcacm_setup(FAR struct usbdevclass_driver_s *driver, uint16_t len; int ret = -EOPNOTSUPP; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !dev || !ctrl) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -1261,7 +1261,7 @@ static int cdcacm_setup(FAR struct usbdevclass_driver_s *driver, usbtrace(TRACE_CLASSSETUP, ctrl->req); priv = ((FAR struct cdcacm_driver_s *)driver)->dev; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv || !priv->ctrlreq) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_EP0NOTBOUND), 0); @@ -1276,7 +1276,7 @@ static int cdcacm_setup(FAR struct usbdevclass_driver_s *driver, index = GETUINT16(ctrl->index); len = GETUINT16(ctrl->len); - uvdbg("type=%02x req=%02x value=%04x index=%04x len=%04x\n", + uinfo("type=%02x req=%02x value=%04x index=%04x len=%04x\n", ctrl->type, ctrl->req, value, index, len); if ((ctrl->type & USB_REQ_TYPE_MASK) == USB_REQ_TYPE_STANDARD) @@ -1621,7 +1621,7 @@ static void cdcacm_disconnect(FAR struct usbdevclass_driver_s *driver, usbtrace(TRACE_CLASSDISCONNECT, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !dev || !dev->ep0) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -1633,7 +1633,7 @@ static void cdcacm_disconnect(FAR struct usbdevclass_driver_s *driver, priv = ((FAR struct cdcacm_driver_s *)driver)->dev; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_EP0NOTBOUND), 0); @@ -1686,7 +1686,7 @@ static void cdcacm_suspend(FAR struct usbdevclass_driver_s *driver, usbtrace(TRACE_CLASSSUSPEND, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !dev) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -1720,7 +1720,7 @@ static void cdcacm_resume(FAR struct usbdevclass_driver_s *driver, usbtrace(TRACE_CLASSRESUME, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !dev) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -1763,7 +1763,7 @@ static int cdcuart_setup(FAR struct uart_dev_s *dev) /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev || !dev->priv) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -1804,7 +1804,7 @@ static void cdcuart_shutdown(FAR struct uart_dev_s *dev) /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev || !dev->priv) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -2063,7 +2063,7 @@ static void cdcuart_rxint(FAR struct uart_dev_s *dev, bool enable) /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev || !dev->priv) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -2192,7 +2192,7 @@ static void cdcuart_txint(FAR struct uart_dev_s *dev, bool enable) /* Sanity checks */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev || !dev->priv) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -2208,7 +2208,7 @@ static void cdcuart_txint(FAR struct uart_dev_s *dev, bool enable) * send the next packet now. */ - uvdbg("enable=%d head=%d tail=%d\n", + uinfo("enable=%d head=%d tail=%d\n", enable, priv->serdev.xmit.head, priv->serdev.xmit.tail); if (enable && priv->serdev.xmit.head != priv->serdev.xmit.tail) @@ -2235,7 +2235,7 @@ static bool cdcuart_txempty(FAR struct uart_dev_s *dev) usbtrace(CDCACM_CLASSAPI_TXEMPTY, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); diff --git a/drivers/usbdev/composite.c b/drivers/usbdev/composite.c index b0f0c95c9c915dfae01065d660774252425c3ce4..54bc3c827e3f2b98ac3feee17ae9cb9bef6e1b68 100644 --- a/drivers/usbdev/composite.c +++ b/drivers/usbdev/composite.c @@ -339,7 +339,7 @@ static void composite_unbind(FAR struct usbdevclass_driver_s *driver, usbtrace(TRACE_CLASSUNBIND, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !dev || !dev->ep0) { usbtrace(TRACE_CLSERROR(USBCOMPOSITE_TRACEERR_INVALIDARG), 0); @@ -351,7 +351,7 @@ static void composite_unbind(FAR struct usbdevclass_driver_s *driver, priv = ((FAR struct composite_driver_s *)driver)->dev; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv) { usbtrace(TRACE_CLSERROR(USBCOMPOSITE_TRACEERR_EP0NOTBOUND), 0); @@ -403,7 +403,7 @@ static int composite_setup(FAR struct usbdevclass_driver_s *driver, bool dispatched = false; int ret = -EOPNOTSUPP; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !dev || !dev->ep0 || !ctrl) { usbtrace(TRACE_CLSERROR(USBCOMPOSITE_TRACEERR_SETUPINVALIDARGS), 0); @@ -416,7 +416,7 @@ static int composite_setup(FAR struct usbdevclass_driver_s *driver, usbtrace(TRACE_CLASSSETUP, ctrl->req); priv = ((FAR struct composite_driver_s *)driver)->dev; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv) { usbtrace(TRACE_CLSERROR(USBCOMPOSITE_TRACEERR_EP0NOTBOUND2), 0); @@ -431,7 +431,7 @@ static int composite_setup(FAR struct usbdevclass_driver_s *driver, index = GETUINT16(ctrl->index); len = GETUINT16(ctrl->len); - uvdbg("type=%02x req=%02x value=%04x index=%04x len=%04x\n", + uinfo("type=%02x req=%02x value=%04x index=%04x len=%04x\n", ctrl->type, ctrl->req, value, index, len); UNUSED(index); @@ -638,7 +638,7 @@ static void composite_disconnect(FAR struct usbdevclass_driver_s *driver, usbtrace(TRACE_CLASSDISCONNECT, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !dev) { usbtrace(TRACE_CLSERROR(USBCOMPOSITE_TRACEERR_INVALIDARG), 0); @@ -650,7 +650,7 @@ static void composite_disconnect(FAR struct usbdevclass_driver_s *driver, priv = ((FAR struct composite_driver_s *)driver)->dev; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv) { usbtrace(TRACE_CLSERROR(USBCOMPOSITE_TRACEERR_EP0NOTBOUND), 0); @@ -691,7 +691,7 @@ static void composite_suspend(FAR struct usbdevclass_driver_s *driver, usbtrace(TRACE_CLASSSUSPEND, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev) { usbtrace(TRACE_CLSERROR(USBCOMPOSITE_TRACEERR_INVALIDARG), 0); @@ -703,7 +703,7 @@ static void composite_suspend(FAR struct usbdevclass_driver_s *driver, priv = ((FAR struct composite_driver_s *)driver)->dev; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv) { usbtrace(TRACE_CLSERROR(USBCOMPOSITE_TRACEERR_EP0NOTBOUND), 0); @@ -733,7 +733,7 @@ static void composite_resume(FAR struct usbdevclass_driver_s *driver, FAR struct composite_dev_s *priv = NULL; irqstate_t flags; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev) { usbtrace(TRACE_CLSERROR(USBCOMPOSITE_TRACEERR_INVALIDARG), 0); @@ -745,7 +745,7 @@ static void composite_resume(FAR struct usbdevclass_driver_s *driver, priv = ((FAR struct composite_driver_s *)driver)->dev; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv) { usbtrace(TRACE_CLSERROR(USBCOMPOSITE_TRACEERR_EP0NOTBOUND), 0); diff --git a/drivers/usbdev/pl2303.c b/drivers/usbdev/pl2303.c index 92285c01d155d94f677cd2df59259d79d2a1e095..16119057903e8d365e2361189691b30610177f43 100644 --- a/drivers/usbdev/pl2303.c +++ b/drivers/usbdev/pl2303.c @@ -598,7 +598,7 @@ static int usbclass_sndpacket(FAR struct pl2303_dev_s *priv) int len; int ret = OK; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (priv == NULL) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -617,7 +617,7 @@ static int usbclass_sndpacket(FAR struct pl2303_dev_s *priv) * to be sent). */ - uvdbg("head=%d tail=%d nwrq=%d empty=%d\n", + uinfo("head=%d tail=%d nwrq=%d empty=%d\n", priv->serdev.xmit.head, priv->serdev.xmit.tail, priv->nwrq, sq_empty(&priv->reqlist)); @@ -1047,7 +1047,7 @@ static int usbclass_setconfig(FAR struct pl2303_dev_s *priv, uint8_t config) int i; int ret = 0; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (priv == NULL) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -1203,7 +1203,7 @@ static void usbclass_rdcomplete(FAR struct usbdev_ep_s *ep, /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !ep->priv || !req) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -1265,7 +1265,7 @@ static void usbclass_wrcomplete(FAR struct usbdev_ep_s *ep, /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !ep->priv || !req || !req->priv) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -1489,7 +1489,7 @@ static void usbclass_unbind(FAR struct usbdevclass_driver_s *driver, usbtrace(TRACE_CLASSUNBIND, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !dev || !dev->ep0) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -1501,7 +1501,7 @@ static void usbclass_unbind(FAR struct usbdevclass_driver_s *driver, priv = ((FAR struct pl2303_driver_s *)driver)->dev; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_EP0NOTBOUND), 0); @@ -1616,7 +1616,7 @@ static int usbclass_setup(FAR struct usbdevclass_driver_s *driver, uint16_t len; int ret = -EOPNOTSUPP; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !dev || !dev->ep0 || !ctrl) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -1629,7 +1629,7 @@ static int usbclass_setup(FAR struct usbdevclass_driver_s *driver, usbtrace(TRACE_CLASSSETUP, ctrl->req); priv = ((FAR struct pl2303_driver_s *)driver)->dev; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv || !priv->ctrlreq) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_EP0NOTBOUND), 0); @@ -1644,7 +1644,7 @@ static int usbclass_setup(FAR struct usbdevclass_driver_s *driver, index = GETUINT16(ctrl->index); len = GETUINT16(ctrl->len); - uvdbg("type=%02x req=%02x value=%04x index=%04x len=%04x\n", + uinfo("type=%02x req=%02x value=%04x index=%04x len=%04x\n", ctrl->type, ctrl->req, value, index, len); switch (ctrl->type & USB_REQ_TYPE_MASK) @@ -1877,7 +1877,7 @@ static void usbclass_disconnect(FAR struct usbdevclass_driver_s *driver, usbtrace(TRACE_CLASSDISCONNECT, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !dev || !dev->ep0) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -1889,7 +1889,7 @@ static void usbclass_disconnect(FAR struct usbdevclass_driver_s *driver, priv = ((FAR struct pl2303_driver_s *)driver)->dev; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_EP0NOTBOUND), 0); @@ -1940,7 +1940,7 @@ static void usbclass_suspend(FAR struct usbdevclass_driver_s *driver, usbtrace(TRACE_CLASSSUSPEND, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !dev) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -1974,7 +1974,7 @@ static void usbclass_resume(FAR struct usbdevclass_driver_s *driver, usbtrace(TRACE_CLASSRESUME, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !dev) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -2017,7 +2017,7 @@ static int usbser_setup(FAR struct uart_dev_s *dev) /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev || !dev->priv) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -2058,7 +2058,7 @@ static void usbser_shutdown(FAR struct uart_dev_s *dev) /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev || !dev->priv) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -2120,7 +2120,7 @@ static void usbser_rxint(FAR struct uart_dev_s *dev, bool enable) /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev || !dev->priv) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -2211,7 +2211,7 @@ static void usbser_txint(FAR struct uart_dev_s *dev, bool enable) /* Sanity checks */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev || !dev->priv) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -2227,7 +2227,7 @@ static void usbser_txint(FAR struct uart_dev_s *dev, bool enable) * send the next packet now. */ - uvdbg("enable=%d head=%d tail=%d\n", + uinfo("enable=%d head=%d tail=%d\n", enable, priv->serdev.xmit.head, priv->serdev.xmit.tail); if (enable && priv->serdev.xmit.head != priv->serdev.xmit.tail) @@ -2254,7 +2254,7 @@ static bool usbser_txempty(FAR struct uart_dev_s *dev) usbtrace(PL2303_CLASSAPI_TXEMPTY, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); diff --git a/drivers/usbdev/usbdev_trace.c b/drivers/usbdev/usbdev_trace.c index be19863b1ba80c98ac7d73ba16e65c006d3728a6..857cd3e02948d3bd266c70bb7345e48118b72bae 100644 --- a/drivers/usbdev/usbdev_trace.c +++ b/drivers/usbdev/usbdev_trace.c @@ -81,7 +81,7 @@ static uint16_t g_head = 0; static uint16_t g_tail = 0; #endif -#if defined(CONFIG_USBDEV_TRACE) || (defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_USB)) +#if defined(CONFIG_USBDEV_TRACE) || (defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_USB)) static usbtrace_idset_t g_maskedidset = CONFIG_USBDEV_TRACE_INITIALIDSET; #endif @@ -94,16 +94,16 @@ static usbtrace_idset_t g_maskedidset = CONFIG_USBDEV_TRACE_INITIALIDSET; ****************************************************************************/ #if !defined(CONFIG_USBDEV_TRACE) && \ - (defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_USB)) + (defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_USB)) static int usbtrace_syslog(const char *fmt, ...) { va_list ap; int ret; - /* Let lowvsyslog do the real work */ + /* Let vsyslog do the real work */ va_start(ap, fmt); - ret = lowvsyslog(LOG_INFO, fmt, ap); + ret = vsyslog(LOG_INFO, fmt, ap); va_end(ap); return ret; } @@ -132,7 +132,7 @@ static int usbtrace_syslog(const char *fmt, ...) ****************************************************************************/ #if defined(CONFIG_USBDEV_TRACE) || \ - (defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_USB)) + (defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_USB)) usbtrace_idset_t usbtrace_enable(usbtrace_idset_t idset) { irqstate_t flags; @@ -146,7 +146,7 @@ usbtrace_idset_t usbtrace_enable(usbtrace_idset_t idset) leave_critical_section(flags); return ret; } -#endif /* CONFIG_USBDEV_TRACE || CONFIG_DEBUG && CONFIG_DEBUG_USB */ +#endif /* CONFIG_USBDEV_TRACE || CONFIG_DEBUG_FEATURES && CONFIG_DEBUG_USB */ /**************************************************************************** * Name: usbtrace @@ -159,7 +159,7 @@ usbtrace_idset_t usbtrace_enable(usbtrace_idset_t idset) * ****************************************************************************/ -#if defined(CONFIG_USBDEV_TRACE) || (defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_USB)) +#if defined(CONFIG_USBDEV_TRACE) || (defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_USB)) void usbtrace(uint16_t event, uint16_t value) { irqstate_t flags; @@ -190,7 +190,7 @@ void usbtrace(uint16_t event, uint16_t value) } } #else - /* Just print the data using lowsyslog */ + /* Just print the data using syslog */ usbtrace_trprintf(usbtrace_syslog, event, value); #endif @@ -198,7 +198,7 @@ void usbtrace(uint16_t event, uint16_t value) leave_critical_section(flags); } -#endif /* CONFIG_USBDEV_TRACE || CONFIG_DEBUG && CONFIG_DEBUG_USB */ +#endif /* CONFIG_USBDEV_TRACE || CONFIG_DEBUG_FEATURES && CONFIG_DEBUG_USB */ /**************************************************************************** * Name: usbtrace_enumerate diff --git a/drivers/usbdev/usbmsc.c b/drivers/usbdev/usbmsc.c index 9e646c9509231a7fc797ef943329d9bbe89a1ba1..35fc5cf5a32914d256aac470531830a0890e7afb 100644 --- a/drivers/usbdev/usbmsc.c +++ b/drivers/usbdev/usbmsc.c @@ -404,7 +404,7 @@ static void usbmsc_unbind(FAR struct usbdevclass_driver_s *driver, usbtrace(TRACE_CLASSUNBIND, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !dev || !dev->ep0) { usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_UNBINDINVALIDARGS), 0); @@ -416,7 +416,7 @@ static void usbmsc_unbind(FAR struct usbdevclass_driver_s *driver, priv = ((FAR struct usbmsc_driver_s *)driver)->dev; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv) { usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_EP0NOTBOUND1), 0); @@ -521,7 +521,7 @@ static int usbmsc_setup(FAR struct usbdevclass_driver_s *driver, uint16_t len; int ret = -EOPNOTSUPP; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !dev || !dev->ep0 || !ctrl) { usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_SETUPINVALIDARGS), 0); @@ -534,7 +534,7 @@ static int usbmsc_setup(FAR struct usbdevclass_driver_s *driver, usbtrace(TRACE_CLASSSETUP, ctrl->req); priv = ((FAR struct usbmsc_driver_s *)driver)->dev; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv || !priv->ctrlreq) { usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_EP0NOTBOUND2), 0); @@ -549,7 +549,7 @@ static int usbmsc_setup(FAR struct usbdevclass_driver_s *driver, index = GETUINT16(ctrl->index); len = GETUINT16(ctrl->len); - uvdbg("type=%02x req=%02x value=%04x index=%04x len=%04x\n", + uinfo("type=%02x req=%02x value=%04x index=%04x len=%04x\n", ctrl->type, ctrl->req, value, index, len); if ((ctrl->type & USB_REQ_TYPE_MASK) == USB_REQ_TYPE_STANDARD) @@ -847,7 +847,7 @@ static void usbmsc_disconnect(FAR struct usbdevclass_driver_s *driver, usbtrace(TRACE_CLASSDISCONNECT, 0); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!driver || !dev || !dev->ep0) { usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_DISCONNECTINVALIDARGS), 0); @@ -859,7 +859,7 @@ static void usbmsc_disconnect(FAR struct usbdevclass_driver_s *driver, priv = ((FAR struct usbmsc_driver_s *)driver)->dev; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv) { usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_EP0NOTBOUND3), 0); @@ -935,7 +935,7 @@ int usbmsc_setconfig(FAR struct usbmsc_dev_s *priv, uint8_t config) int i; int ret = 0; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (priv == NULL) { usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_SETCONFIGINVALIDARGS), 0); @@ -1074,7 +1074,7 @@ void usbmsc_wrcomplete(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !ep->priv || !req || !req->priv) { usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_WRCOMPLETEINVALIDARGS), 0); @@ -1135,7 +1135,7 @@ void usbmsc_rdcomplete(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req) /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ep || !ep->priv || !req || !req->priv) { usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_RDCOMPLETEINVALIDARGS), 0); @@ -1227,7 +1227,7 @@ void usbmsc_deferredresponse(FAR struct usbmsc_dev_s *priv, bool failed) FAR struct usbdev_req_s *ctrlreq; int ret; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv || !priv->usbdev || !priv->ctrlreq) { usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_DEFERREDRESPINVALIDARGS), 0); @@ -1317,7 +1317,7 @@ int usbmsc_configure(unsigned int nluns, void **handle) FAR struct usbmsc_driver_s *drvr; int ret; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (nluns > 15) { usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_TOOMANYLUNS), 0); @@ -1411,7 +1411,7 @@ int usbmsc_bindlun(FAR void *handle, FAR const char *drvrpath, struct geometry geo; int ret; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!alloc || !drvrpath || startsector < 0) { usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_BINLUNINVALIDARGS1), 0); @@ -1421,7 +1421,7 @@ int usbmsc_bindlun(FAR void *handle, FAR const char *drvrpath, priv = &alloc->dev; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv->luntab) { usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_INTERNALCONFUSION1), 0); @@ -1437,7 +1437,7 @@ int usbmsc_bindlun(FAR void *handle, FAR const char *drvrpath, lun = &priv->luntab[lunno]; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (lun->inode != NULL) { usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_LUNALREADYBOUND), 0); @@ -1552,7 +1552,7 @@ int usbmsc_unbindlun(FAR void *handle, unsigned int lunno) FAR struct usbmsc_lun_s *lun; int ret; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!alloc) { usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_UNBINDLUNINVALIDARGS1), 0); @@ -1562,7 +1562,7 @@ int usbmsc_unbindlun(FAR void *handle, unsigned int lunno) priv = &alloc->dev; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!priv->luntab) { usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_INTERNALCONFUSION2), 0); @@ -1579,7 +1579,7 @@ int usbmsc_unbindlun(FAR void *handle, unsigned int lunno) lun = &priv->luntab[lunno]; usbmsc_scsi_lock(priv); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (lun->inode == NULL) { usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_LUNNOTBOUND), 0); @@ -1626,7 +1626,7 @@ int usbmsc_exportluns(FAR void *handle) irqstate_t flags; int ret = OK; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!alloc) { usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_EXPORTLUNSINVALIDARGS), 0); @@ -1652,7 +1652,7 @@ int usbmsc_exportluns(FAR void *handle) g_usbmsc_handoff = priv; - uvdbg("Starting SCSI worker thread\n"); + uinfo("Starting SCSI worker thread\n"); priv->thpid = kernel_thread("scsid", CONFIG_USBMSC_SCSI_PRIO, CONFIG_USBMSC_SCSI_STACKSIZE, usbmsc_scsi_main, NULL); @@ -1664,7 +1664,7 @@ int usbmsc_exportluns(FAR void *handle) /* Wait for the worker thread to run and initialize */ - uvdbg("Waiting for the SCSI worker thread\n"); + uinfo("Waiting for the SCSI worker thread\n"); usbmsc_sync_wait(priv); DEBUGASSERT(g_usbmsc_handoff == NULL); @@ -1681,7 +1681,7 @@ int usbmsc_exportluns(FAR void *handle) /* Signal to start the thread */ - uvdbg("Signalling for the SCSI worker thread\n"); + uinfo("Signalling for the SCSI worker thread\n"); flags = enter_critical_section(); priv->theventset |= USBMSC_EVENT_READY; usbmsc_scsi_signal(priv); @@ -1756,7 +1756,7 @@ void usbmsc_uninitialize(FAR void *handle) #endif int i; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!handle) { usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_UNINITIALIZEINVALIDARGS), 0); diff --git a/drivers/usbdev/usbmsc_scsi.c b/drivers/usbdev/usbmsc_scsi.c index a8b0f4004feb29aaeaa5cb5fbf09b2b02afa7253..fd9e55cb6b4106844096fabfca0edb2e2a6f0d8c 100644 --- a/drivers/usbdev/usbmsc_scsi.c +++ b/drivers/usbdev/usbmsc_scsi.c @@ -115,7 +115,7 @@ /* Debug ********************************************************************/ -#if defined(CONFIG_DEBUG_VERBOSE) && defined (CONFIG_DEBUG_USB) +#if defined(CONFIG_DEBUG_INFO) && defined (CONFIG_DEBUG_USB) static void usbmsc_dumpdata(const char *msg, const uint8_t *buf, int buflen); #else @@ -195,18 +195,18 @@ static int usbmsc_cmdstatusstate(FAR struct usbmsc_dev_s *priv); * Name: usbmsc_dumpdata ****************************************************************************/ -#if defined(CONFIG_DEBUG_VERBOSE) && defined (CONFIG_DEBUG_USB) +#if defined(CONFIG_DEBUG_INFO) && defined (CONFIG_DEBUG_USB) static void usbmsc_dumpdata(const char *msg, const uint8_t *buf, int buflen) { int i; - lowsyslog(LOG_DEBUG, "%s:", msg); + syslog(LOG_DEBUG, "%s:", msg); for (i = 0; i < buflen; i++) { - lowsyslog(LOG_DEBUG, " %02x", buf[i]); + syslog(LOG_DEBUG, " %02x", buf[i]); } - lowsyslog(LOG_DEBUG, "\n"); + syslog(LOG_DEBUG, "\n"); } #endif @@ -2622,7 +2622,7 @@ int usbmsc_scsi_main(int argc, char *argv[]) uint16_t eventset; int ret; - uvdbg("Started\n"); + uinfo("Started\n"); /* Get the SCSI state data handed off from the initialization logic */ @@ -2636,7 +2636,7 @@ int usbmsc_scsi_main(int argc, char *argv[]) * wait here until we are told to begin. Start in the NOTINITIALIZED state */ - uvdbg("Waiting to be signalled\n"); + uinfo("Waiting to be signalled\n"); usbmsc_scsi_lock(priv); priv->thstate = USBMSC_STATE_STARTED; while ((priv->theventset & USBMSC_EVENT_READY) != 0 && @@ -2645,7 +2645,7 @@ int usbmsc_scsi_main(int argc, char *argv[]) usbmsc_scsi_wait(priv); } - uvdbg("Running\n"); + uinfo("Running\n"); /* Transition to the INITIALIZED/IDLE state */ diff --git a/drivers/usbhost/usbhost_cdcacm.c b/drivers/usbhost/usbhost_cdcacm.c index 0c35d61bf49c71433186a1f7017573979ad303a0..35610e130838567aadb52664a02fdbd50276c80b 100644 --- a/drivers/usbhost/usbhost_cdcacm.c +++ b/drivers/usbhost/usbhost_cdcacm.c @@ -512,7 +512,7 @@ static FAR struct usbhost_cdcacm_s *usbhost_allocclass(void) } leave_critical_section(flags); - uvdbg("Allocated: %p\n", entry); + uinfo("Allocated: %p\n", entry); return (FAR struct usbhost_cdcacm_s *)entry; } #else @@ -526,7 +526,7 @@ static FAR struct usbhost_cdcacm_s *usbhost_allocclass(void) DEBUGASSERT(!up_interrupt_context()); priv = (FAR struct usbhost_cdcacm_s *)kmm_malloc(sizeof(struct usbhost_cdcacm_s)); - uvdbg("Allocated: %p\n", priv); + uinfo("Allocated: %p\n", priv); return priv; } #endif @@ -552,7 +552,7 @@ static void usbhost_freeclass(FAR struct usbhost_cdcacm_s *usbclass) irqstate_t flags; DEBUGASSERT(entry != NULL); - uvdbg("Freeing: %p\n", entry); + uinfo("Freeing: %p\n", entry); /* Just put the pre-allocated class structure back on the freelist */ @@ -570,7 +570,7 @@ static void usbhost_freeclass(FAR struct usbhost_cdcacm_s *usbclass) * from an interrupt handler. */ - uvdbg("Freeing: %p\n", usbclass); + uinfo("Freeing: %p\n", usbclass); sched_kfree(usbclass); } #endif @@ -687,7 +687,7 @@ static int usbhost_linecoding_send(FAR struct usbhost_cdcacm_s *priv) ret = DRVR_CTRLOUT(hport->drvr, hport->ep0, ctrlreq, priv->linecode); if (ret < 0) { - udbg("ERROR: DRVR_CTRLOUT failed: %d\n", ret); + uerr("ERROR: DRVR_CTRLOUT failed: %d\n", ret); } return ret; @@ -743,7 +743,7 @@ static void usbhost_notification_work(FAR void *arg) index = usbhost_getle16(inmsg->index); len = usbhost_getle16(inmsg->len); - uvdbg("type: %02x notification: %02x value: %04x index: %04x len: %04x\n", + uinfo("type: %02x notification: %02x value: %04x index: %04x len: %04x\n", inmsg->type, inmsg->notification, value, index, len); /* We care only about the SerialState notification */ @@ -764,7 +764,7 @@ static void usbhost_notification_work(FAR void *arg) priv->dcd = ((state & CDC_UART_RXCARRIER) != 0); priv->dsr = ((state & CDC_UART_TXCARRIER) != 0); - uvdbg("ACM_SERIAL_STATE: DCD=%d DSR=%d\n", + uinfo("ACM_SERIAL_STATE: DCD=%d DSR=%d\n", priv->dcd, priv->dsr); } } @@ -777,7 +777,7 @@ static void usbhost_notification_work(FAR void *arg) priv); if (ret < 0) { - udbg("ERROR: DRVR_ASYNCH failed: %d\n", ret); + uerr("ERROR: DRVR_ASYNCH failed: %d\n", ret); } } } @@ -833,11 +833,11 @@ static void usbhost_notification_callback(FAR void *arg, ssize_t nbytes) * FIX: Don't output the message is the result is -EAGAIN. */ -#if defined(CONFIG_DEBUG_USB) && !defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_USB) && !defined(CONFIG_DEBUG_INFO) if (nbytes != -EAGAIN) #endif { - udbg("ERROR: Transfer failed: %d\n", nbytes); + uerr("ERROR: Transfer failed: %d\n", nbytes); } /* We don't know the nature of the failure, but we need to do all @@ -961,7 +961,7 @@ static void usbhost_txdata_work(FAR void *arg) * the device is disconnected). */ - udbg("ERROR: DRVR_TRANSFER for packet failed: %d\n", (int)nwritten); + uerr("ERROR: DRVR_TRANSFER for packet failed: %d\n", (int)nwritten); break; } } @@ -986,7 +986,7 @@ static void usbhost_txdata_work(FAR void *arg) * NAK'ed our packet. */ - udbg("ERROR: DRVR_TRANSFER for ZLP failed: %d\n", (int)nwritten); + uerr("ERROR: DRVR_TRANSFER for ZLP failed: %d\n", (int)nwritten); } } @@ -1099,7 +1099,7 @@ static void usbhost_rxdata_work(FAR void *arg) * device was not disconnected. */ - udbg("ERROR: DRVR_TRANSFER for packet failed: %d\n", (int)nread); + uerr("ERROR: DRVR_TRANSFER for packet failed: %d\n", (int)nread); break; } @@ -1224,7 +1224,7 @@ static void usbhost_destroy(FAR void *arg) DEBUGASSERT(priv != NULL && priv->usbclass.hport != NULL); hport = priv->usbclass.hport; - uvdbg("crefs: %d\n", priv->crefs); + uinfo("crefs: %d\n", priv->crefs); /* Unregister the serial lower half driver */ @@ -1365,7 +1365,7 @@ static int usbhost_cfgdesc(FAR struct usbhost_cdcacm_s *priv, { FAR struct usb_ifdesc_s *ifdesc = (FAR struct usb_ifdesc_s *)configdesc; - uvdbg("Interface descriptor: class: %d subclass: %d proto: %d\n", + uinfo("Interface descriptor: class: %d subclass: %d proto: %d\n", ifdesc->classid, ifdesc->subclass, ifdesc->protocol); DEBUGASSERT(remaining >= USB_SIZEOF_IFDESC); @@ -1411,7 +1411,7 @@ static int usbhost_cfgdesc(FAR struct usbhost_cdcacm_s *priv, { FAR struct usb_epdesc_s *epdesc = (FAR struct usb_epdesc_s *)configdesc; - uvdbg("Endpoint descriptor: currif: %02x attr: %02x\n", + uinfo("Endpoint descriptor: currif: %02x attr: %02x\n", currif, epdesc->attr); DEBUGASSERT(remaining >= USB_SIZEOF_EPDESC); @@ -1448,7 +1448,7 @@ static int usbhost_cfgdesc(FAR struct usbhost_cdcacm_s *priv, boutdesc.interval = epdesc->interval; boutdesc.mxpacketsize = usbhost_getle16(epdesc->mxpacketsize); - uvdbg("Bulk OUT EP addr:%d mxpacketsize:%d\n", + uinfo("Bulk OUT EP addr:%d mxpacketsize:%d\n", boutdesc.addr, boutdesc.mxpacketsize); } else @@ -1476,7 +1476,7 @@ static int usbhost_cfgdesc(FAR struct usbhost_cdcacm_s *priv, bindesc.xfrtype = USB_EP_ATTR_XFER_BULK; bindesc.interval = epdesc->interval; bindesc.mxpacketsize = usbhost_getle16(epdesc->mxpacketsize); - uvdbg("Bulk IN EP addr:%d mxpacketsize:%d\n", + uinfo("Bulk IN EP addr:%d mxpacketsize:%d\n", bindesc.addr, bindesc.mxpacketsize); } } @@ -1520,7 +1520,7 @@ static int usbhost_cfgdesc(FAR struct usbhost_cdcacm_s *priv, iindesc.interval = epdesc->interval; iindesc.mxpacketsize = usbhost_getle16(epdesc->mxpacketsize); - uvdbg("Interrupt IN EP addr:%d mxpacketsize:%d\n", + uinfo("Interrupt IN EP addr:%d mxpacketsize:%d\n", boutdesc.addr, boutdesc.mxpacketsize); #else found |= USBHOST_CTRLIF_FOUND; @@ -1559,7 +1559,7 @@ static int usbhost_cfgdesc(FAR struct usbhost_cdcacm_s *priv, if ((found & USBHOST_MINFOUND) != USBHOST_MINFOUND) { - udbg("ERROR: Found DATA IF:%s BULK IN:%s BULK OUT:%s\n", + uerr("ERROR: Found DATA IF:%s BULK IN:%s BULK OUT:%s\n", (found & USBHOST_DATAIF_FOUND) != 0 ? "YES" : "NO", (found & USBHOST_BULKIN_FOUND) != 0 ? "YES" : "NO", (found & USBHOST_BULKOUT_FOUND) != 0 ? "YES" : "NO"); @@ -1571,14 +1571,14 @@ static int usbhost_cfgdesc(FAR struct usbhost_cdcacm_s *priv, ret = DRVR_EPALLOC(hport->drvr, &boutdesc, &priv->bulkout); if (ret < 0) { - udbg("ERROR: Failed to allocate Bulk OUT endpoint\n"); + uerr("ERROR: Failed to allocate Bulk OUT endpoint\n"); return ret; } ret = DRVR_EPALLOC(hport->drvr, &bindesc, &priv->bulkin); if (ret < 0) { - udbg("ERROR: Failed to allocate Bulk IN endpoint\n"); + uerr("ERROR: Failed to allocate Bulk IN endpoint\n"); (void)DRVR_EPFREE(hport->drvr, priv->bulkout); return ret; } @@ -1591,13 +1591,13 @@ static int usbhost_cfgdesc(FAR struct usbhost_cdcacm_s *priv, ret = DRVR_EPALLOC(hport->drvr, &iindesc, &priv->intin); if (ret < 0) { - udbg("ERROR: Failed to allocate Interrupt IN endpoint\n"); + uerr("ERROR: Failed to allocate Interrupt IN endpoint\n"); priv->intin = NULL; } } #endif - uvdbg("Endpoints allocated\n"); + uinfo("Endpoints allocated\n"); return OK; } @@ -1715,7 +1715,7 @@ static int usbhost_alloc_buffers(FAR struct usbhost_cdcacm_s *priv) ret = DRVR_ALLOC(hport->drvr, (FAR uint8_t **)&priv->ctrlreq, &maxlen); if (ret < 0) { - udbg("ERROR: DRVR_ALLOC of ctrlreq failed: %d\n", ret); + uerr("ERROR: DRVR_ALLOC of ctrlreq failed: %d\n", ret); goto errout; } @@ -1727,7 +1727,7 @@ static int usbhost_alloc_buffers(FAR struct usbhost_cdcacm_s *priv) sizeof(struct cdc_linecoding_s)); if (ret < 0) { - udbg("ERROR: DRVR_IOALLOC of line coding failed: %d (%d bytes)\n", + uerr("ERROR: DRVR_IOALLOC of line coding failed: %d (%d bytes)\n", ret, sizeof(struct cdc_linecoding_s)); goto errout; } @@ -1740,7 +1740,7 @@ static int usbhost_alloc_buffers(FAR struct usbhost_cdcacm_s *priv) ret = DRVR_IOALLOC(hport->drvr, &priv->notification, MAX_NOTIFICATION); if (ret < 0) { - udbg("ERROR: DRVR_IOALLOC of line status failed: %d (%d bytes)\n", + uerr("ERROR: DRVR_IOALLOC of line status failed: %d (%d bytes)\n", ret, MAX_NOTIFICATION); goto errout; } @@ -1756,7 +1756,7 @@ static int usbhost_alloc_buffers(FAR struct usbhost_cdcacm_s *priv) ret = DRVR_IOALLOC(hport->drvr, &priv->inbuf, priv->pktsize); if (ret < 0) { - udbg("ERROR: DRVR_IOALLOC of Bulk IN buffer failed: %d (%d bytes)\n", + uerr("ERROR: DRVR_IOALLOC of Bulk IN buffer failed: %d (%d bytes)\n", ret, priv->pktsize); goto errout; } @@ -1766,7 +1766,7 @@ static int usbhost_alloc_buffers(FAR struct usbhost_cdcacm_s *priv) ret = DRVR_IOALLOC(hport->drvr, &priv->outbuf, priv->pktsize); if (ret < 0) { - udbg("ERROR: DRVR_IOALLOC of Bulk OUT buffer failed: %d (%d bytes)\n", + uerr("ERROR: DRVR_IOALLOC of Bulk OUT buffer failed: %d (%d bytes)\n", ret, priv->pktsize); goto errout; } @@ -2002,7 +2002,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass, ret = usbhost_cfgdesc(priv, configdesc, desclen); if (ret < 0) { - udbg("usbhost_cfgdesc() failed: %d\n", ret); + uerr("ERROR: usbhost_cfgdesc() failed: %d\n", ret); goto errout; } @@ -2011,7 +2011,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass, ret = usbhost_alloc_buffers(priv); if (ret < 0) { - udbg("ERROR: Failed to allocate transfer buffer\n"); + uerr("ERROR: Failed to allocate transfer buffer\n"); goto errout; } @@ -2021,7 +2021,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass, ret = usbhost_linecoding_send(priv); if (ret < 0) { - udbg("usbhost_linecoding_send() failed: %d\n", ret); + uerr("ERROR: usbhost_linecoding_send() failed: %d\n", ret); } #endif @@ -2029,12 +2029,12 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass, * driver */ usbhost_mkdevname(priv, devname); - uvdbg("Register device: %s\n", devname); + uinfo("Register device: %s\n", devname); ret = uart_register(devname, &priv->uartdev); if (ret < 0) { - udbg("uart_register() failed: %d\n", ret); + uerr("ERROR: uart_register() failed: %d\n", ret); goto errout; } @@ -2045,14 +2045,14 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass, { /* Begin monitoring of port status change events */ - uvdbg("Start notification monitoring\n"); + uinfo("Start notification monitoring\n"); ret = DRVR_ASYNCH(hport->drvr, priv->intin, (FAR uint8_t *)priv->notification, MAX_NOTIFICATION, usbhost_notification_callback, priv); if (ret < 0) { - udbg("ERROR: DRVR_ASYNCH failed: %d\n", ret); + uerr("ERROR: DRVR_ASYNCH failed: %d\n", ret); } } #endif @@ -2128,13 +2128,13 @@ static int usbhost_disconnected(struct usbhost_class_s *usbclass) ret = DRVR_CANCEL(hport->drvr, priv->bulkin); if (ret < 0) { - udbg("ERROR: Bulk IN DRVR_CANCEL failed: %d\n", ret); + uerr("ERROR: Bulk IN DRVR_CANCEL failed: %d\n", ret); } ret = DRVR_CANCEL(hport->drvr, priv->bulkout); if (ret < 0) { - udbg("ERROR: Bulk OUT DRVR_CANCEL failed: %d\n", ret); + uerr("ERROR: Bulk OUT DRVR_CANCEL failed: %d\n", ret); } #ifdef HAVE_INTIN_ENDPOINT @@ -2145,7 +2145,7 @@ static int usbhost_disconnected(struct usbhost_class_s *usbclass) int ret = DRVR_CANCEL(hport->drvr, priv->intin); if (ret < 0) { - udbg("ERROR: Interrupt IN DRVR_CANCEL failed: %d\n", ret); + uerr("ERROR: Interrupt IN DRVR_CANCEL failed: %d\n", ret); } } #endif @@ -2156,7 +2156,7 @@ static int usbhost_disconnected(struct usbhost_class_s *usbclass) * serial driver. */ - uvdbg("crefs: %d\n", priv->crefs); + uinfo("crefs: %d\n", priv->crefs); if (priv->crefs == 1) { /* Destroy the class instance. If we are executing from an interrupt @@ -2168,7 +2168,7 @@ static int usbhost_disconnected(struct usbhost_class_s *usbclass) { /* Destroy the instance on the worker thread. */ - uvdbg("Queuing destruction: worker %p->%p\n", + uinfo("Queuing destruction: worker %p->%p\n", priv->ntwork.worker, usbhost_destroy); DEBUGASSERT(work_available(&priv->ntwork)); @@ -2204,7 +2204,7 @@ static int usbhost_setup(FAR struct uart_dev_s *uartdev) irqstate_t flags; int ret; - uvdbg("Entry\n"); + uinfo("Entry\n"); DEBUGASSERT(uartdev && uartdev->priv); priv = (FAR struct usbhost_cdcacm_s *)uartdev->priv; @@ -2255,7 +2255,7 @@ static void usbhost_shutdown(FAR struct uart_dev_s *uartdev) FAR struct usbhost_cdcacm_s *priv; irqstate_t flags; - uvdbg("Entry\n"); + uinfo("Entry\n"); DEBUGASSERT(uartdev && uartdev->priv); priv = (FAR struct usbhost_cdcacm_s *)uartdev->priv; @@ -2343,7 +2343,7 @@ static int usbhost_ioctl(FAR struct file *filep, int cmd, unsigned long arg) struct usbhost_cdcacm_s *priv; int ret; - uvdbg("Entry\n"); + uinfo("Entry\n"); DEBUGASSERT(filep && filep->f_inode); inode = filep->f_inode; diff --git a/drivers/usbhost/usbhost_devaddr.c b/drivers/usbhost/usbhost_devaddr.c index e26513c540531baf4afe608a87fe8a8d0d7cfd8c..58fbe042977a1e63937c178613d28ab18afbd0a1 100644 --- a/drivers/usbhost/usbhost_devaddr.c +++ b/drivers/usbhost/usbhost_devaddr.c @@ -296,7 +296,7 @@ int usbhost_devaddr_create(FAR struct usbhost_hubport_s *hport) if (devaddr < 0) { - udbg("ERROR: Failed to allocate a device address\n"); + uerr("ERROR: Failed to allocate a device address\n"); } return devaddr; diff --git a/drivers/usbhost/usbhost_enumerate.c b/drivers/usbhost/usbhost_enumerate.c index 647d0ab7a99cb8c1dca2771c7115297e0ff0ac7a..b92c0e6fc92ff31c505ee7200ae84cad31316dc3 100644 --- a/drivers/usbhost/usbhost_enumerate.c +++ b/drivers/usbhost/usbhost_enumerate.c @@ -143,7 +143,7 @@ static inline int usbhost_devdesc(FAR const struct usb_devdesc_s *devdesc, id->vid = usbhost_getle16(devdesc->vendor); id->pid = usbhost_getle16(devdesc->product); - uvdbg("class:%d subclass:%04x protocol:%04x vid:%d pid:%d\n", + uinfo("class:%d subclass:%04x protocol:%04x vid:%d pid:%d\n", id->base, id->subclass, id->proto, id->vid, id->pid); return OK; } @@ -169,7 +169,7 @@ static inline int usbhost_configdesc(const uint8_t *configdesc, int cfglen, /* Verify that we were passed a configuration descriptor */ cfgdesc = (struct usb_cfgdesc_s *)configdesc; - uvdbg("cfg len:%d total len:%d\n", cfgdesc->len, cfglen); + uinfo("cfg len:%d total len:%d\n", cfgdesc->len, cfglen); if (cfgdesc->type != USB_DESC_TYPE_CONFIG) { @@ -200,7 +200,7 @@ static inline int usbhost_configdesc(const uint8_t *configdesc, int cfglen, id->base = ifdesc->classid; id->subclass = ifdesc->subclass; id->proto = ifdesc->protocol; - uvdbg("class:%d subclass:%d protocol:%d\n", + uinfo("class:%d subclass:%d protocol:%d\n", id->base, id->subclass, id->proto); return OK; } @@ -235,7 +235,7 @@ static inline int usbhost_classbind(FAR struct usbhost_hubport_s *hport, /* Is there is a class implementation registered to support this device. */ reg = usbhost_findclass(id); - uvdbg("usbhost_findclass: %p\n", reg); + uinfo("usbhost_findclass: %p\n", reg); if (reg != NULL) { /* Yes.. there is a class for this device. Get an instance of @@ -244,7 +244,7 @@ static inline int usbhost_classbind(FAR struct usbhost_hubport_s *hport, ret = -ENOMEM; devclass = CLASS_CREATE(reg, hport, id); - uvdbg("CLASS_CREATE: %p\n", devclass); + uinfo("CLASS_CREATE: %p\n", devclass); if (devclass != NULL) { /* Then bind the newly instantiated class instance */ @@ -256,7 +256,7 @@ static inline int usbhost_classbind(FAR struct usbhost_hubport_s *hport, * should then free the allocated devclass instance. */ - udbg("CLASS_CONNECT failed: %d\n", ret); + uerr("ERROR: CLASS_CONNECT failed: %d\n", ret); CLASS_DISCONNECTED(devclass); } else @@ -266,7 +266,7 @@ static inline int usbhost_classbind(FAR struct usbhost_hubport_s *hport, } } - uvdbg("Returning: %d\n", ret); + uinfo("Returning: %d\n", ret); return ret; } @@ -326,14 +326,14 @@ int usbhost_enumerate(FAR struct usbhost_hubport_s *hport, ret = DRVR_ALLOC(hport->drvr, (FAR uint8_t **)&ctrlreq, &maxlen); if (ret < 0) { - udbg("DRVR_ALLOC failed: %d\n", ret); + uerr("ERROR: DRVR_ALLOC failed: %d\n", ret); return ret; } ret = DRVR_ALLOC(hport->drvr, &buffer, &maxlen); if (ret < 0) { - udbg("DRVR_ALLOC failed: %d\n", ret); + uerr("ERROR: DRVR_ALLOC failed: %d\n", ret); goto errout; } @@ -381,7 +381,7 @@ int usbhost_enumerate(FAR struct usbhost_hubport_s *hport, ret = DRVR_CTRLIN(hport->drvr, hport->ep0, ctrlreq, buffer); if (ret < 0) { - udbg("ERROR: Failed to get device descriptor, length=%d: %d\n", + uerr("ERROR: Failed to get device descriptor, length=%d: %d\n", descsize, ret); goto errout; } @@ -389,7 +389,7 @@ int usbhost_enumerate(FAR struct usbhost_hubport_s *hport, /* Extract the correct max packetsize from the device descriptor */ maxpacketsize = ((struct usb_devdesc_s *)buffer)->mxpacketsize; - uvdbg("maxpacksetsize: %d\n", maxpacketsize); + uinfo("maxpacksetsize: %d\n", maxpacketsize); /* And reconfigure EP0 with the correct maximum packet size */ @@ -409,7 +409,7 @@ int usbhost_enumerate(FAR struct usbhost_hubport_s *hport, ret = DRVR_CTRLIN(hport->drvr, hport->ep0, ctrlreq, buffer); if (ret < 0) { - udbg("ERROR: Failed to get device descriptor, length=%d: %d\n", + uerr("ERROR: Failed to get device descriptor, length=%d: %d\n", USB_SIZEOF_DEVDESC, ret); goto errout; } @@ -428,7 +428,7 @@ int usbhost_enumerate(FAR struct usbhost_hubport_s *hport, funcaddr = usbhost_devaddr_create(hport); if (funcaddr < 0) { - udbg("ERROR: usbhost_devaddr_create failed: %d\n", ret); + uerr("ERROR: usbhost_devaddr_create failed: %d\n", ret); goto errout; } @@ -443,7 +443,7 @@ int usbhost_enumerate(FAR struct usbhost_hubport_s *hport, ret = DRVR_CTRLOUT(hport->drvr, hport->ep0, ctrlreq, NULL); if (ret < 0) { - udbg("ERROR: Failed to set address: %d\n"); + uerr("ERROR: Failed to set address: %d\n"); goto errout; } @@ -473,7 +473,7 @@ int usbhost_enumerate(FAR struct usbhost_hubport_s *hport, ret = DRVR_CTRLIN(hport->drvr, hport->ep0, ctrlreq, buffer); if (ret < 0) { - udbg("ERROR: Failed to get configuration descriptor, length=%d: %d\n", + uerr("ERROR: Failed to get configuration descriptor, length=%d: %d\n", USB_SIZEOF_CFGDESC, ret); goto errout; } @@ -481,7 +481,7 @@ int usbhost_enumerate(FAR struct usbhost_hubport_s *hport, /* Extract the full size of the configuration data */ cfglen = (unsigned int)usbhost_getle16(((struct usb_cfgdesc_s *)buffer)->totallen); - uvdbg("sizeof config data: %d\n", cfglen); + uinfo("sizeof config data: %d\n", cfglen); /* Get all of the configuration descriptor data, index == 0 (Should not be * hard-coded!) @@ -496,7 +496,7 @@ int usbhost_enumerate(FAR struct usbhost_hubport_s *hport, ret = DRVR_CTRLIN(hport->drvr, hport->ep0, ctrlreq, buffer); if (ret < 0) { - udbg("ERROR: Failed to get configuration descriptor, length=%d: %d\n", + uerr("ERROR: Failed to get configuration descriptor, length=%d: %d\n", cfglen, ret); goto errout; } @@ -512,7 +512,7 @@ int usbhost_enumerate(FAR struct usbhost_hubport_s *hport, ret = DRVR_CTRLOUT(hport->drvr, hport->ep0, ctrlreq, NULL); if (ret < 0) { - udbg("ERROR: Failed to set configuration: %d\n", ret); + uerr("ERROR: Failed to set configuration: %d\n", ret); goto errout; } @@ -530,7 +530,7 @@ int usbhost_enumerate(FAR struct usbhost_hubport_s *hport, ret = usbhost_configdesc(buffer, cfglen, &id); if (ret < 0) { - udbg("ERROR: usbhost_configdesc failed: %d\n", ret); + uerr("ERROR: usbhost_configdesc failed: %d\n", ret); goto errout; } } @@ -547,7 +547,7 @@ int usbhost_enumerate(FAR struct usbhost_hubport_s *hport, ret = usbhost_classbind(hport, buffer, cfglen, &id, devclass); if (ret < 0) { - udbg("ERROR: usbhost_classbind failed %d\n", ret); + uerr("ERROR: usbhost_classbind failed %d\n", ret); } errout: diff --git a/drivers/usbhost/usbhost_findclass.c b/drivers/usbhost/usbhost_findclass.c index b544b60f484c1df2f67f02b40817b4e5aed681e5..7ae1cad4dc8d952c38232b4f61bfc220aa3fca5d 100644 --- a/drivers/usbhost/usbhost_findclass.c +++ b/drivers/usbhost/usbhost_findclass.c @@ -72,7 +72,7 @@ static bool usbhost_idmatch(const struct usbhost_id_s *classid, const struct usbhost_id_s *devid) { - uvdbg("Compare to class:%d subclass:%d protocol:%d vid:%04x pid:%04x\n", + uinfo("Compare to class:%d subclass:%d protocol:%d vid:%04x pid:%04x\n", classid->base, classid->subclass, classid->proto, classid->vid, classid->pid); @@ -142,7 +142,7 @@ const struct usbhost_registry_s *usbhost_findclass(const struct usbhost_id_s *id int ndx; DEBUGASSERT(id); - uvdbg("Looking for class:%d subclass:%d protocol:%d vid:%04x pid:%04x\n", + uinfo("Looking for class:%d subclass:%d protocol:%d vid:%04x pid:%04x\n", id->base, id->subclass, id->proto, id->vid, id->pid); /* g_classregistry is a singly-linked list of class ID information added by @@ -161,7 +161,7 @@ const struct usbhost_registry_s *usbhost_findclass(const struct usbhost_id_s *id * protocol, then try each. */ - uvdbg("Checking class:%p nids:%d\n", usbclass, usbclass->nids); + uinfo("Checking class:%p nids:%d\n", usbclass, usbclass->nids); for (ndx = 0; ndx < usbclass->nids; ndx++) { /* Did we find a matching ID? */ diff --git a/drivers/usbhost/usbhost_hidkbd.c b/drivers/usbhost/usbhost_hidkbd.c index b36434dd31916e14ed54d5c61806be1bc8e63b77..c8a3c582f7ce7ac28e4320d42bdebdea1fcdd0bd 100644 --- a/drivers/usbhost/usbhost_hidkbd.c +++ b/drivers/usbhost/usbhost_hidkbd.c @@ -176,14 +176,10 @@ */ #ifndef CONFIG_DEBUG_INPUT -# undef idbg -# define idbg udbg -# undef illdbg -# define illdbg ulldbg -# undef ivdbg -# define ivdbg uvdbg -# undef illvdbg -# define illvdbg ullvdbg +# undef ierr +# define ierr uerr +# undef iinfo +# define iinfo uinfo #endif /**************************************************************************** @@ -631,7 +627,7 @@ static void usbhost_pollnotify(FAR struct usbhost_state_s *priv) fds->revents |= (fds->events & POLLIN); if (fds->revents != 0) { - uvdbg("Report events: %02x\n", fds->revents); + uinfo("Report events: %02x\n", fds->revents); sem_post(fds->sem); } } @@ -664,7 +660,7 @@ static inline FAR struct usbhost_state_s *usbhost_allocclass(void) DEBUGASSERT(!up_interrupt_context()); priv = (FAR struct usbhost_state_s *)kmm_malloc(sizeof(struct usbhost_state_s)); - uvdbg("Allocated: %p\n", priv); + uinfo("Allocated: %p\n", priv); return priv; } @@ -688,7 +684,7 @@ static inline void usbhost_freeclass(FAR struct usbhost_state_s *usbclass) /* Free the class instance. */ - uvdbg("Freeing: %p\n", usbclass); + uinfo("Freeing: %p\n", usbclass); sched_kfree(usbclass); } @@ -764,11 +760,11 @@ static void usbhost_destroy(FAR void *arg) DEBUGASSERT(priv != NULL && priv->usbclass.hport != NULL); hport = priv->usbclass.hport; - uvdbg("crefs: %d\n", priv->crefs); + uinfo("crefs: %d\n", priv->crefs); /* Unregister the driver */ - uvdbg("Unregister driver\n"); + uinfo("Unregister driver\n"); usbhost_mkdevname(priv, devname); (void)unregister_driver(devname); @@ -965,7 +961,7 @@ static inline void usbhost_encodescancode(FAR struct usbhost_state_s *priv, /* Yes the value is within range */ encoded = encoding[scancode - FIRST_ENCODING]; - ivdbg(" scancode: %02x modifier: %02x encoded: %d\n", + iinfo(" scancode: %02x modifier: %02x encoded: %d\n", scancode, modifier, encoded); if (encoded) @@ -1010,7 +1006,7 @@ static int usbhost_kbdpoll(int argc, char *argv[]) #ifndef CONFIG_HIDKBD_NODEBOUNCE uint8_t lastkey[6] = {0, 0, 0, 0, 0, 0}; #endif -#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_INFO) unsigned int npolls = 0; #endif unsigned int nerrors = 0; @@ -1019,7 +1015,7 @@ static int usbhost_kbdpoll(int argc, char *argv[]) bool newstate; int ret; - uvdbg("Started\n"); + uinfo("Started\n"); /* Synchronize with the start-up logic. Get the private instance, re-start * the start-up logic, and wait a bit to make sure that all of the class @@ -1041,7 +1037,7 @@ static int usbhost_kbdpoll(int argc, char *argv[]) /* Loop here until the device is disconnected */ - uvdbg("Entering poll loop\n"); + uinfo("Entering poll loop\n"); while (!priv->disconnected) { @@ -1082,12 +1078,12 @@ static int usbhost_kbdpoll(int argc, char *argv[]) if (ret < 0) { nerrors++; - udbg("ERROR: GETREPORT/INPUT, DRVR_CTRLIN returned: %d/%d\n", + uerr("ERROR: GETREPORT/INPUT, DRVR_CTRLIN returned: %d/%d\n", ret, nerrors); if (nerrors > 200) { - udbg("Too many errors... aborting: %d\n", nerrors); + uerr(" Too many errors... aborting: %d\n", nerrors); break; } } @@ -1143,7 +1139,7 @@ static int usbhost_kbdpoll(int argc, char *argv[]) */ keycode = usbhost_mapscancode(rpt->key[i], rpt->modifier); - ivdbg("Key %d: %02x keycode:%c modifier: %02x\n", + iinfo("Key %d: %02x keycode:%c modifier: %02x\n", i, rpt->key[i], keycode ? keycode : ' ', rpt->modifier); /* Zero at this point means that the key does not map to a @@ -1223,11 +1219,11 @@ static int usbhost_kbdpoll(int argc, char *argv[]) * polling is still happening. */ -#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_INFO) npolls++; if ((npolls & 31) == 0) { - udbg("Still polling: %d\n", npolls); + uinfo("Still polling: %d\n", npolls); } #endif /* Wait for the required amount (or until a signal is received). We @@ -1267,7 +1263,7 @@ static int usbhost_kbdpoll(int argc, char *argv[]) * of the file descriptors are closed. */ - udbg("Keyboard removed, polling halted\n"); + uinfo("Keyboard removed, polling halted\n"); flags = enter_critical_section(); priv->polling = false; @@ -1390,7 +1386,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, { FAR struct usb_ifdesc_s *ifdesc = (FAR struct usb_ifdesc_s *)configdesc; - uvdbg("Interface descriptor\n"); + uinfo("Interface descriptor\n"); DEBUGASSERT(remaining >= USB_SIZEOF_IFDESC); /* Did we already find what we needed from a preceding interface? */ @@ -1418,7 +1414,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, /* HID descriptor */ case USBHID_DESCTYPE_HID: - uvdbg("HID descriptor\n"); + uinfo("HID descriptor\n"); break; /* Endpoint descriptor. We expect one or two interrupt endpoints, @@ -1429,7 +1425,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, { FAR struct usb_epdesc_s *epdesc = (FAR struct usb_epdesc_s *)configdesc; - uvdbg("Endpoint descriptor\n"); + uinfo("Endpoint descriptor\n"); DEBUGASSERT(remaining >= USB_SIZEOF_EPDESC); /* Check for an interrupt endpoint. */ @@ -1463,7 +1459,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, epoutdesc.xfrtype = USB_EP_ATTR_XFER_INT; epoutdesc.interval = epdesc->interval; epoutdesc.mxpacketsize = usbhost_getle16(epdesc->mxpacketsize); - uvdbg("Interrupt OUT EP addr:%d mxpacketsize:%d\n", + uinfo("Interrupt OUT EP addr:%d mxpacketsize:%d\n", epoutdesc.addr, epoutdesc.mxpacketsize); } else @@ -1491,7 +1487,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, epindesc.xfrtype = USB_EP_ATTR_XFER_INT; epindesc.interval = epdesc->interval; epindesc.mxpacketsize = usbhost_getle16(epdesc->mxpacketsize); - uvdbg("Interrupt IN EP addr:%d mxpacketsize:%d\n", + uinfo("Interrupt IN EP addr:%d mxpacketsize:%d\n", epindesc.addr, epindesc.mxpacketsize); } } @@ -1501,7 +1497,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, /* Other descriptors are just ignored for now */ default: - uvdbg("Other descriptor: %d\n", desc->type); + uinfo("Other descriptor: %d\n", desc->type); break; } @@ -1524,9 +1520,9 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, if ((found & USBHOST_RQDFOUND) != USBHOST_RQDFOUND) { - ulldbg("ERROR: Found IF:%s EPIN:%s\n", - (found & USBHOST_IFFOUND) != 0 ? "YES" : "NO", - (found & USBHOST_EPINFOUND) != 0 ? "YES" : "NO"); + uerr("ERROR: Found IF:%s EPIN:%s\n", + (found & USBHOST_IFFOUND) != 0 ? "YES" : "NO", + (found & USBHOST_EPINFOUND) != 0 ? "YES" : "NO"); return -EINVAL; } @@ -1537,27 +1533,27 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, ret = DRVR_EPALLOC(hport->drvr, &epindesc, &priv->epin); if (ret < 0) { - udbg("ERROR: Failed to allocate interrupt IN endpoint\n"); + uerr("ERROR: Failed to allocate interrupt IN endpoint\n"); return ret; } /* Then the optional interrupt OUT endpoint */ - ullvdbg("Found EPOOUT:%s\n", - (found & USBHOST_EPOUTFOUND) != 0 ? "YES" : "NO"); + uinfo("Found EPOOUT:%s\n", + (found & USBHOST_EPOUTFOUND) != 0 ? "YES" : "NO"); if ((found & USBHOST_EPOUTFOUND) != 0) { ret = DRVR_EPALLOC(hport->drvr, &epoutdesc, &priv->epout); if (ret < 0) { - udbg("ERROR: Failed to allocate interrupt OUT endpoint\n"); + uerr("ERROR: Failed to allocate interrupt OUT endpoint\n"); (void)DRVR_EPFREE(hport->drvr, priv->epin); return ret; } } - ullvdbg("Endpoints allocated\n"); + uinfo("Endpoints allocated\n"); return OK; } @@ -1590,7 +1586,7 @@ static inline int usbhost_devinit(FAR struct usbhost_state_s *priv) ret = usbhost_tdalloc(priv); if (ret < 0) { - udbg("ERROR: Failed to allocate transfer buffer\n"); + uerr("ERROR: Failed to allocate transfer buffer\n"); return ret; } @@ -1608,7 +1604,7 @@ static inline int usbhost_devinit(FAR struct usbhost_state_s *priv) * memory resources, primarily for the dedicated stack (CONFIG_HIDKBD_STACKSIZE). */ - uvdbg("Start poll task\n"); + uinfo("Start poll task\n"); /* The inputs to a task started by kernel_thread() are very awkard for this * purpose. They are really designed for command line tasks (argc/argv). So @@ -1641,7 +1637,7 @@ static inline int usbhost_devinit(FAR struct usbhost_state_s *priv) /* Register the driver */ - uvdbg("Register driver\n"); + uinfo("Register driver\n"); usbhost_mkdevname(priv, devname); ret = register_driver(devname, &g_hidkbd_fops, 0666, priv); @@ -1932,7 +1928,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass, ret = usbhost_cfgdesc(priv, configdesc, desclen); if (ret < 0) { - udbg("usbhost_cfgdesc() failed: %d\n", ret); + uerr("ERROR: usbhost_cfgdesc() failed: %d\n", ret); } else { @@ -1941,7 +1937,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass, ret = usbhost_devinit(priv); if (ret < 0) { - udbg("usbhost_devinit() failed: %d\n", ret); + uerr("ERROR: usbhost_devinit() failed: %d\n", ret); } } @@ -1991,7 +1987,7 @@ static int usbhost_disconnected(struct usbhost_class_s *usbclass) */ priv->disconnected = true; - ullvdbg("Disconnected\n"); + uinfo("Disconnected\n"); /* Is there a thread waiting for keyboard data that will never come? */ @@ -2054,7 +2050,7 @@ static int usbhost_open(FAR struct file *filep) irqstate_t flags; int ret; - uvdbg("Entry\n"); + uinfo("Entry\n"); DEBUGASSERT(filep && filep->f_inode); inode = filep->f_inode; priv = inode->i_private; @@ -2107,7 +2103,7 @@ static int usbhost_close(FAR struct file *filep) FAR struct usbhost_state_s *priv; irqstate_t flags; - uvdbg("Entry\n"); + uinfo("Entry\n"); DEBUGASSERT(filep && filep->f_inode); inode = filep->f_inode; priv = inode->i_private; @@ -2201,7 +2197,7 @@ static ssize_t usbhost_read(FAR struct file *filep, FAR char *buffer, size_t len unsigned int tail; int ret; - uvdbg("Entry\n"); + uinfo("Entry\n"); DEBUGASSERT(filep && filep->f_inode && buffer); inode = filep->f_inode; priv = inode->i_private; @@ -2242,7 +2238,7 @@ static ssize_t usbhost_read(FAR struct file *filep, FAR char *buffer, size_t len /* Wait for data to be available */ - uvdbg("Waiting...\n"); + uinfo("Waiting...\n"); priv->waiting = true; usbhost_givesem(&priv->exclsem); @@ -2321,7 +2317,7 @@ static int usbhost_poll(FAR struct file *filep, FAR struct pollfd *fds, int ret = OK; int i; - uvdbg("Entry\n"); + uinfo("Entry\n"); DEBUGASSERT(filep && filep->f_inode && fds); inode = filep->f_inode; priv = inode->i_private; diff --git a/drivers/usbhost/usbhost_hidmouse.c b/drivers/usbhost/usbhost_hidmouse.c index c61541d9c2a479d838cd8a6a16a8693a36b78932..922e133c8b93ad700c932cfebf9cd11a6556bbc8 100644 --- a/drivers/usbhost/usbhost_hidmouse.c +++ b/drivers/usbhost/usbhost_hidmouse.c @@ -197,14 +197,10 @@ */ #ifndef CONFIG_DEBUG_INPUT -# undef idbg -# define idbg udbg -# undef illdbg -# define illdbg ulldbg -# undef ivdbg -# define ivdbg uvdbg -# undef illvdbg -# define illvdbg ullvdbg +# undef ierr +# define ierr uerr +# undef iinfo +# define iinfo uinfo #endif /**************************************************************************** @@ -491,7 +487,7 @@ static void usbhost_pollnotify(FAR struct usbhost_state_s *priv) fds->revents |= (fds->events & POLLIN); if (fds->revents != 0) { - uvdbg("Report events: %02x\n", fds->revents); + uinfo("Report events: %02x\n", fds->revents); sem_post(fds->sem); } } @@ -524,7 +520,7 @@ static inline FAR struct usbhost_state_s *usbhost_allocclass(void) DEBUGASSERT(!up_interrupt_context()); priv = (FAR struct usbhost_state_s *)kmm_malloc(sizeof(struct usbhost_state_s)); - uvdbg("Allocated: %p\n", priv); + uinfo("Allocated: %p\n", priv); return priv; } @@ -548,7 +544,7 @@ static inline void usbhost_freeclass(FAR struct usbhost_state_s *usbclass) /* Free the class instance. */ - uvdbg("Freeing: %p\n", usbclass); + uinfo("Freeing: %p\n", usbclass); sched_kfree(usbclass); } @@ -623,13 +619,13 @@ static void usbhost_destroy(FAR void *arg) char devname[DEV_NAMELEN]; DEBUGASSERT(priv != NULL && priv->usbclass.hport != NULL); - uvdbg("crefs: %d\n", priv->crefs); + uinfo("crefs: %d\n", priv->crefs); hport = priv->usbclass.hport; /* Unregister the driver */ - uvdbg("Unregister driver\n"); + uinfo("Unregister driver\n"); usbhost_mkdevname(priv, devname); (void)unregister_driver(devname); @@ -709,7 +705,7 @@ static void usbhost_notify(FAR struct usbhost_state_s *priv) if (fds) { fds->revents |= POLLIN; - ivdbg("Report events: %02x\n", fds->revents); + iinfo("Report events: %02x\n", fds->revents); sem_post(fds->sem); } } @@ -1049,14 +1045,14 @@ static int usbhost_mouse_poll(int argc, char *argv[]) #ifndef CONFIG_HIDMOUSE_TSCIF uint8_t buttons; #endif -#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_INFO) unsigned int npolls = 0; #endif unsigned int nerrors = 0; ssize_t nbytes; int ret = OK; - uvdbg("Started\n"); + uinfo("Started\n"); /* Synchronize with the start-up logic. Get the private instance, re-start * the start-up logic, and wait a bit to make sure that all of the class @@ -1078,7 +1074,7 @@ static int usbhost_mouse_poll(int argc, char *argv[]) /* Loop here until the device is disconnected */ - uvdbg("Entering poll loop\n"); + uinfo("Entering poll loop\n"); while (!priv->disconnected) { @@ -1101,14 +1097,14 @@ static int usbhost_mouse_poll(int argc, char *argv[]) * long time). */ - udbg("ERROR: DRVR_TRANSFER returned: %d/%u\n", + uerr("ERROR: DRVR_TRANSFER returned: %d/%u\n", (int)nbytes, nerrors); if (nbytes != -EAGAIN) { if (++nerrors > 200) { - udbg("Too many errors... aborting: %d\n", nerrors); + uerr(" Too many errors... aborting: %d\n", nerrors); ret = (int)nbytes; break; } @@ -1208,11 +1204,11 @@ static int usbhost_mouse_poll(int argc, char *argv[]) * polling is still happening. */ -#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_INFO) npolls++; if ((npolls & 31) == 0) { - udbg("Still polling: %d\n", npolls); + uinfo("Still polling: %d\n", npolls); } #endif } @@ -1233,7 +1229,7 @@ static int usbhost_mouse_poll(int argc, char *argv[]) * of the file descriptors are closed. */ - udbg("Mouse removed, polling halted\n"); + uinfo("Mouse removed, polling halted\n"); flags = enter_critical_section(); priv->polling = false; @@ -1378,7 +1374,7 @@ static int usbhost_waitsample(FAR struct usbhost_state_s *priv, { /* Wait for a change in the HIDMOUSE state */ - ivdbg("Waiting..\n"); + iinfo("Waiting..\n"); priv->nwaiters++; ret = sem_wait(&priv->waitsem); priv->nwaiters--; @@ -1389,7 +1385,7 @@ static int usbhost_waitsample(FAR struct usbhost_state_s *priv, * the failure now. */ - idbg("sem_wait: %d\n", errno); + ierr("ERROR: sem_wait: %d\n", errno); DEBUGASSERT(errno == EINTR); ret = -EINTR; goto errout; @@ -1404,7 +1400,7 @@ static int usbhost_waitsample(FAR struct usbhost_state_s *priv, } } - ivdbg("Sampled\n"); + iinfo("Sampled\n"); /* Re-acquire the semaphore that manages mutually exclusive access to * the device structure. We may have to wait here. But we have our sample. @@ -1509,7 +1505,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, case USB_DESC_TYPE_INTERFACE: { - uvdbg("Interface descriptor\n"); + uinfo("Interface descriptor\n"); DEBUGASSERT(remaining >= USB_SIZEOF_IFDESC); /* Did we already find what we needed from a preceding interface? */ @@ -1534,7 +1530,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, /* HID descriptor */ case USBHID_DESCTYPE_HID: - uvdbg("HID descriptor\n"); + uinfo("HID descriptor\n"); break; /* Endpoint descriptor. We expect one or two interrupt endpoints, @@ -1545,7 +1541,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, { FAR struct usb_epdesc_s *epdesc = (FAR struct usb_epdesc_s *)configdesc; - uvdbg("Endpoint descriptor\n"); + uinfo("Endpoint descriptor\n"); DEBUGASSERT(remaining >= USB_SIZEOF_EPDESC); /* Check for an interrupt endpoint. */ @@ -1580,7 +1576,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, epindesc.interval = epdesc->interval; epindesc.mxpacketsize = usbhost_getle16(epdesc->mxpacketsize); - uvdbg("Interrupt IN EP addr:%d mxpacketsize:%d\n", + uinfo("Interrupt IN EP addr:%d mxpacketsize:%d\n", epindesc.addr, epindesc.mxpacketsize); } } @@ -1590,7 +1586,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, /* Other descriptors are just ignored for now */ default: - uvdbg("Other descriptor: %d\n", desc->type); + uinfo("Other descriptor: %d\n", desc->type); break; } @@ -1613,9 +1609,9 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, if ((found & USBHOST_ALLFOUND) != USBHOST_ALLFOUND) { - ulldbg("ERROR: Found IF:%s EPIN:%s\n", - (found & USBHOST_IFFOUND) != 0 ? "YES" : "NO", - (found & USBHOST_EPINFOUND) != 0 ? "YES" : "NO"); + uerr("ERROR: Found IF:%s EPIN:%s\n", + (found & USBHOST_IFFOUND) != 0 ? "YES" : "NO", + (found & USBHOST_EPINFOUND) != 0 ? "YES" : "NO"); return -EINVAL; } @@ -1624,11 +1620,11 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, ret = DRVR_EPALLOC(hport->drvr, &epindesc, &priv->epin); if (ret < 0) { - udbg("ERROR: Failed to allocate interrupt IN endpoint\n"); + uerr("ERROR: Failed to allocate interrupt IN endpoint\n"); return ret; } - ullvdbg("Endpoint allocated\n"); + uinfo("Endpoint allocated\n"); return OK; } @@ -1661,7 +1657,7 @@ static inline int usbhost_devinit(FAR struct usbhost_state_s *priv) ret = usbhost_tdalloc(priv); if (ret < 0) { - udbg("ERROR: Failed to allocate transfer buffer\n"); + uerr("ERROR: Failed to allocate transfer buffer\n"); return ret; } @@ -1679,7 +1675,7 @@ static inline int usbhost_devinit(FAR struct usbhost_state_s *priv) * memory resources, primarily for the dedicated stack (CONFIG_HIDMOUSE_STACKSIZE). */ - uvdbg("Start poll task\n"); + uinfo("Start poll task\n"); /* The inputs to a task started by kernel_thread() are very awkward for this * purpose. They are really designed for command line tasks (argc/argv). So @@ -1712,7 +1708,7 @@ static inline int usbhost_devinit(FAR struct usbhost_state_s *priv) /* Register the driver */ - uvdbg("Register driver\n"); + uinfo("Register driver\n"); usbhost_mkdevname(priv, devname); ret = register_driver(devname, &g_hidmouse_fops, 0666, priv); @@ -2002,7 +1998,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass, ret = usbhost_cfgdesc(priv, configdesc, desclen); if (ret < 0) { - udbg("usbhost_cfgdesc() failed: %d\n", ret); + uerr("ERROR: usbhost_cfgdesc() failed: %d\n", ret); } else { @@ -2011,7 +2007,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass, ret = usbhost_devinit(priv); if (ret < 0) { - udbg("usbhost_devinit() failed: %d\n", ret); + uerr("ERROR: usbhost_devinit() failed: %d\n", ret); } } @@ -2062,7 +2058,7 @@ static int usbhost_disconnected(struct usbhost_class_s *usbclass) */ priv->disconnected = true; - ullvdbg("Disconnected\n"); + uinfo("Disconnected\n"); /* Are there a thread(s) waiting for mouse data that will never come? */ @@ -2124,7 +2120,7 @@ static int usbhost_open(FAR struct file *filep) irqstate_t flags; int ret; - uvdbg("Entry\n"); + uinfo("Entry\n"); DEBUGASSERT(filep && filep->f_inode); inode = filep->f_inode; priv = inode->i_private; @@ -2199,7 +2195,7 @@ static int usbhost_close(FAR struct file *filep) FAR struct usbhost_state_s *priv; irqstate_t flags; - uvdbg("Entry\n"); + uinfo("Entry\n"); DEBUGASSERT(filep && filep->f_inode); inode = filep->f_inode; priv = inode->i_private; @@ -2295,7 +2291,7 @@ static ssize_t usbhost_read(FAR struct file *filep, FAR char *buffer, size_t len struct mouse_sample_s sample; int ret; - uvdbg("Entry\n"); + uinfo("Entry\n"); DEBUGASSERT(filep && filep->f_inode && buffer); inode = filep->f_inode; priv = inode->i_private; @@ -2345,7 +2341,7 @@ static ssize_t usbhost_read(FAR struct file *filep, FAR char *buffer, size_t len { /* We might have been awakened by a signal */ - idbg("usbhost_waitsample: %d\n", ret); + ierr("ERROR: usbhost_waitsample: %d\n", ret); goto errout; } } @@ -2392,10 +2388,10 @@ static ssize_t usbhost_read(FAR struct file *filep, FAR char *buffer, size_t len report->point[0].flags = TOUCH_MOVE | TOUCH_ID_VALID | TOUCH_POS_VALID; } - ivdbg(" id: %d\n", report->point[0].id); - ivdbg(" flags: %02x\n", report->point[0].flags); - ivdbg(" x: %d\n", report->point[0].x); - ivdbg(" y: %d\n", report->point[0].y); + iinfo(" id: %d\n", report->point[0].id); + iinfo(" flags: %02x\n", report->point[0].flags); + iinfo(" x: %d\n", report->point[0].x); + iinfo(" y: %d\n", report->point[0].y); ret = SIZEOF_TOUCH_SAMPLE_S(1); #else @@ -2414,7 +2410,7 @@ static ssize_t usbhost_read(FAR struct file *filep, FAR char *buffer, size_t len errout: usbhost_givesem(&priv->exclsem); - ivdbg("Returning: %d\n", ret); + iinfo("Returning: %d\n", ret); return (ssize_t)ret; } @@ -2451,7 +2447,7 @@ static int usbhost_poll(FAR struct file *filep, FAR struct pollfd *fds, int ret = OK; int i; - uvdbg("Entry\n"); + uinfo("Entry\n"); DEBUGASSERT(filep && filep->f_inode && fds); inode = filep->f_inode; priv = inode->i_private; diff --git a/drivers/usbhost/usbhost_hub.c b/drivers/usbhost/usbhost_hub.c index 34b37f9b2997fc401ce2dc96cc851b29d8537fbc..add1455ca3bf06d14e3af1a60cfea6d275f02cf4 100644 --- a/drivers/usbhost/usbhost_hub.c +++ b/drivers/usbhost/usbhost_hub.c @@ -228,7 +228,7 @@ static struct usbhost_registry_s g_hub = static void usbhost_hport_deactivate(FAR struct usbhost_hubport_s *hport) { - uvdbg("Deactivating: %s port %d\n", + uinfo("Deactivating: %s port %d\n", ROOTHUB(hport) ? "Root" : "Hub", hport->port); /* Don't free the control pipe of root hub ports! */ @@ -274,7 +274,7 @@ static int usbhost_hport_activate(FAR struct usbhost_hubport_s *hport) struct usbhost_epdesc_s epdesc; int ret; - uvdbg("Activating port %d\n", hport->port); + uinfo("Activating port %d\n", hport->port); epdesc.hport = hport; epdesc.addr = 0; @@ -286,7 +286,7 @@ static int usbhost_hport_activate(FAR struct usbhost_hubport_s *hport) ret = DRVR_EPALLOC(hport->drvr, &epdesc, &hport->ep0); if (ret < 0) { - udbg("ERROR: Failed to allocate ep0: %d\n", ret); + uerr("ERROR: Failed to allocate ep0: %d\n", ret); } return ret; @@ -384,7 +384,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_class_s *hubclass, FAR struct usb_ifdesc_s *ifdesc = (FAR struct usb_ifdesc_s *)configdesc; - uvdbg("Interface descriptor\n"); + uinfo("Interface descriptor\n"); DEBUGASSERT(remaining >= USB_SIZEOF_IFDESC); /* Save the interface number and mark ONLY the interface found */ @@ -401,7 +401,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_class_s *hubclass, FAR struct usb_epdesc_s *epdesc = (FAR struct usb_epdesc_s *)configdesc; - uvdbg("Endpoint descriptor\n"); + uinfo("Endpoint descriptor\n"); DEBUGASSERT(remaining >= USB_SIZEOF_EPDESC); /* Check for an interrupt endpoint. */ @@ -415,7 +415,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_class_s *hubclass, { /* It is an OUT interrupt endpoint. Ignore */ - uvdbg("Interrupt OUT EP addr:%d mxpacketsize:%d\n", + uinfo("Interrupt OUT EP addr:%d mxpacketsize:%d\n", (epdesc->addr & USB_EP_ADDR_NUMBER_MASK), usbhost_getle16(epdesc->mxpacketsize)); } @@ -431,7 +431,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_class_s *hubclass, intindesc.interval = epdesc->interval; intindesc.mxpacketsize = usbhost_getle16(epdesc->mxpacketsize); - uvdbg("Interrupt IN EP: addr=%d interval=%d mxpacketsize=%d\n", + uinfo("Interrupt IN EP: addr=%d interval=%d mxpacketsize=%d\n", intindesc.addr, intindesc.interval, intindesc.mxpacketsize); } } @@ -463,9 +463,9 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_class_s *hubclass, if (found != USBHOST_ALLFOUND) { - ulldbg("ERROR: Found IF=%s EPIN=%s\n", - (found & USBHOST_IFFOUND) != 0 ? "YES" : "NO", - (found & USBHOST_EPINFOUND) != 0 ? "YES" : "NO"); + uerr("ERROR: Found IF=%s EPIN=%s\n", + (found & USBHOST_IFFOUND) != 0 ? "YES" : "NO", + (found & USBHOST_EPINFOUND) != 0 ? "YES" : "NO"); return -EINVAL; } @@ -474,12 +474,12 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_class_s *hubclass, ret = DRVR_EPALLOC(hport->drvr, &intindesc, &priv->intin); if (ret < 0) { - udbg("ERROR: Failed to allocate Interrupt IN endpoint: %d\n", ret); + uerr("ERROR: Failed to allocate Interrupt IN endpoint: %d\n", ret); (void)DRVR_EPFREE(hport->drvr, priv->intin); return ret; } - ullvdbg("Endpoint allocated\n"); + uinfo("Endpoint allocated\n"); return OK; } @@ -513,7 +513,7 @@ static inline int usbhost_hubdesc(FAR struct usbhost_class_s *hubclass) uint16_t hubchar; int ret; - uvdbg("Read hub descriptor\n"); + uinfo("Read hub descriptor\n"); DEBUGASSERT(hubclass != NULL); priv = &((FAR struct usbhost_hubclass_s *)hubclass)->hubpriv; @@ -535,7 +535,7 @@ static inline int usbhost_hubdesc(FAR struct usbhost_class_s *hubclass) ret = DRVR_CTRLIN(hport->drvr, hport->ep0, ctrlreq, (FAR uint8_t *)&hubdesc); if (ret < 0) { - udbg("ERROR: Failed to read hub descriptor: %d\n", ret); + uerr("ERROR: Failed to read hub descriptor: %d\n", ret); return ret; } @@ -550,20 +550,20 @@ static inline int usbhost_hubdesc(FAR struct usbhost_class_s *hubclass) priv->pwrondelay = (2 * hubdesc.pwrondelay); priv->ctrlcurrent = hubdesc.ctrlcurrent; - uvdbg("Hub Descriptor:\n"); - uvdbg(" bDescLength: %d\n", hubdesc.len); - uvdbg(" bDescriptorType: 0x%02x\n", hubdesc.type); - uvdbg(" bNbrPorts: %d\n", hubdesc.nports); - uvdbg(" wHubCharacteristics: 0x%04x\n", usbhost_getle16(hubdesc.characteristics)); - uvdbg(" lpsm: %d\n", priv->lpsm); - uvdbg(" compounddev: %s\n", priv->compounddev ? "TRUE" : "FALSE"); - uvdbg(" ocmode: %d\n", priv->ocmode); - uvdbg(" indicator: %s\n", priv->indicator ? "TRUE" : "FALSE"); - uvdbg(" bPwrOn2PwrGood: %d\n", hubdesc.pwrondelay); - uvdbg(" pwrondelay: %d\n", priv->pwrondelay); - uvdbg(" bHubContrCurrent: %d\n", hubdesc.ctrlcurrent); - uvdbg(" DeviceRemovable: %d\n", hubdesc.devattached); - uvdbg(" PortPwrCtrlMask: %d\n", hubdesc.pwrctrlmask); + uinfo("Hub Descriptor:\n"); + uinfo(" bDescLength: %d\n", hubdesc.len); + uinfo(" bDescriptorType: 0x%02x\n", hubdesc.type); + uinfo(" bNbrPorts: %d\n", hubdesc.nports); + uinfo(" wHubCharacteristics: 0x%04x\n", usbhost_getle16(hubdesc.characteristics)); + uinfo(" lpsm: %d\n", priv->lpsm); + uinfo(" compounddev: %s\n", priv->compounddev ? "TRUE" : "FALSE"); + uinfo(" ocmode: %d\n", priv->ocmode); + uinfo(" indicator: %s\n", priv->indicator ? "TRUE" : "FALSE"); + uinfo(" bPwrOn2PwrGood: %d\n", hubdesc.pwrondelay); + uinfo(" pwrondelay: %d\n", priv->pwrondelay); + uinfo(" bHubContrCurrent: %d\n", hubdesc.ctrlcurrent); + uinfo(" DeviceRemovable: %d\n", hubdesc.devattached); + uinfo(" PortPwrCtrlMask: %d\n", hubdesc.pwrctrlmask); return OK; } @@ -642,7 +642,7 @@ static int usbhost_hubpwr(FAR struct usbhost_hubpriv_s *priv, ret = DRVR_CTRLOUT(hport->drvr, hport->ep0, ctrlreq, NULL); if (ret < 0) { - udbg("ERROR: Failed to power %s port %d: %d\n", + uerr("ERROR: Failed to power %s port %d: %d\n", on ? "UP" : "DOWN", port, ret); return ret; } @@ -694,7 +694,7 @@ static void usbhost_hub_event(FAR void *arg) if (priv->disconnected) { - uvdbg("Disconnected\n"); + uinfo("Disconnected\n"); return; } @@ -707,7 +707,7 @@ static void usbhost_hub_event(FAR void *arg) hport = hubclass->hport; statuschange = priv->buffer[0]; - uvdbg("StatusChange: %02x\n", statuschange); + uinfo("StatusChange: %02x\n", statuschange); /* Check for status change on any port */ @@ -720,7 +720,7 @@ static void usbhost_hub_event(FAR void *arg) continue; } - uvdbg("Port %d status change\n", port); + uinfo("Port %d status change\n", port); /* Port status changed, check what happened */ @@ -738,7 +738,7 @@ static void usbhost_hub_event(FAR void *arg) (FAR uint8_t *)&portstatus); if (ret < 0) { - udbg("ERROR: Failed to read port %d status: %d\n", port, ret); + uerr("ERROR: Failed to read port %d status: %d\n", port, ret); continue; } @@ -762,7 +762,7 @@ static void usbhost_hub_event(FAR void *arg) ret = DRVR_CTRLOUT(hport->drvr, hport->ep0, ctrlreq, NULL); if (ret < 0) { - udbg("ERROR: Failed to clear port %d change mask %04x: %d\n", + uerr("ERROR: Failed to clear port %d change mask %04x: %d\n", port, mask, ret); } @@ -783,7 +783,7 @@ static void usbhost_hub_event(FAR void *arg) uint16_t debouncestable = 0; uint16_t connection = 0xffff; - uvdbg("Port %d status %04x change %04x\n", port, status, change); + uinfo("Port %d status %04x change %04x\n", port, status, change); /* Debounce */ @@ -799,7 +799,7 @@ static void usbhost_hub_event(FAR void *arg) (FAR uint8_t *)&portstatus); if (ret < 0) { - udbg("ERROR: Failed to get port %d status: %d\n", port, ret); + uerr("ERROR: Failed to get port %d status: %d\n", port, ret); break; } @@ -812,7 +812,7 @@ static void usbhost_hub_event(FAR void *arg) debouncestable += 25; if (debouncestable >= 100) { - uvdbg("Port %d debouncestable=%d\n", port, debouncestable); + uinfo("Port %d debouncestable=%d\n", port, debouncestable); break; } } @@ -839,7 +839,7 @@ static void usbhost_hub_event(FAR void *arg) if (ret < 0 || debouncetime >= 1500) { - udbg("ERROR: Failed to debounce port %d: %d\n", port, ret); + uerr("ERROR: Failed to debounce port %d: %d\n", port, ret); continue; } @@ -847,7 +847,7 @@ static void usbhost_hub_event(FAR void *arg) { /* Device connected to a port on the hub */ - uvdbg("Connection on port %d\n", port); + uinfo("Connection on port %d\n", port); ctrlreq->type = USBHUB_REQ_TYPE_PORT; ctrlreq->req = USBHUB_REQ_SETFEATURE; @@ -858,7 +858,7 @@ static void usbhost_hub_event(FAR void *arg) ret = DRVR_CTRLOUT(hport->drvr, hport->ep0, ctrlreq, NULL); if (ret < 0) { - udbg("ERROR: Failed to reset port %d: %d\n", port, ret); + uerr("ERROR: Failed to reset port %d: %d\n", port, ret); continue; } @@ -874,14 +874,14 @@ static void usbhost_hub_event(FAR void *arg) (FAR uint8_t *)&portstatus); if (ret < 0) { - udbg("ERROR: Failed to get port %d status: %d\n", port, ret); + uerr("ERROR: Failed to get port %d status: %d\n", port, ret); continue; } status = usbhost_getle16(portstatus.status); change = usbhost_getle16(portstatus.change); - uvdbg("port %d status %04x change %04x after reset\n", + uinfo("port %d status %04x change %04x after reset\n", port, status, change); if ((status & USBHUB_PORT_STAT_RESET) == 0 && @@ -917,7 +917,7 @@ static void usbhost_hub_event(FAR void *arg) ret = usbhost_hport_activate(connport); if (ret < 0) { - udbg("ERROR: usbhost_hport_activate failed: %d\n", ret); + uerr("ERROR: usbhost_hport_activate failed: %d\n", ret); } else { @@ -926,14 +926,14 @@ static void usbhost_hub_event(FAR void *arg) ret = DRVR_CONNECT(connport->drvr, connport, true); if (ret < 0) { - udbg("ERROR: DRVR_CONNECT failed: %d\n", ret); + uerr("ERROR: DRVR_CONNECT failed: %d\n", ret); usbhost_hport_deactivate(connport); } } } else { - udbg("ERROR: Failed to enable port %d\n", port); + uerr("ERROR: Failed to enable port %d\n", port); continue; } } @@ -943,7 +943,7 @@ static void usbhost_hub_event(FAR void *arg) * resources. */ - uvdbg("Disconnection on port %d\n", port); + uinfo("Disconnection on port %d\n", port); /* Free any devices classes connect on this hub port */ @@ -961,7 +961,7 @@ static void usbhost_hub_event(FAR void *arg) } else if (change) { - udbg("WARNING: status %04x change %04x not handled\n", status, change); + uwarn("WARNING: status %04x change %04x not handled\n", status, change); } } @@ -971,7 +971,7 @@ static void usbhost_hub_event(FAR void *arg) { /* Hub status changed */ - udbg("WARNING: Hub status changed, not handled\n"); + uwarn("WARNING: Hub status changed, not handled\n"); } /* The preceding sequence of events may take a significant amount of @@ -990,7 +990,7 @@ static void usbhost_hub_event(FAR void *arg) INTIN_BUFSIZE, usbhost_callback, hubclass); if (ret < 0) { - udbg("ERROR: Failed to queue interrupt endpoint: %d\n", ret); + uerr("ERROR: Failed to queue interrupt endpoint: %d\n", ret); } } @@ -1027,13 +1027,13 @@ static void usbhost_disconnect_event(FAR void *arg) irqstate_t flags; int port; - uvdbg("Disconnecting\n"); + uinfo("Disconnecting\n"); DEBUGASSERT(hubclass != NULL && hubclass->hport != NULL); priv = &((FAR struct usbhost_hubclass_s *)hubclass)->hubpriv; hport = hubclass->hport; - uvdbg("Destroying hub on port %d\n", hport->port); + uinfo("Destroying hub on port %d\n", hport->port); /* Set an indication to any users of the device that the device is no * longer available. @@ -1186,11 +1186,11 @@ static void usbhost_callback(FAR void *arg, ssize_t nbytes) * FIX: Don't output the message is the result is -EAGAIN. */ -#if defined(CONFIG_DEBUG_USB) && !defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_USB) && !defined(CONFIG_DEBUG_INFO) if (nbytes != -EAGAIN) #endif { - ulldbg("ERROR: Transfer failed: %d\n", (int)nbytes); + uerr("ERROR: Transfer failed: %d\n", (int)nbytes); } /* Indicate there there is nothing to do. So when the work is @@ -1287,7 +1287,7 @@ static FAR struct usbhost_class_s * ret = DRVR_ALLOC(hport->drvr, (FAR uint8_t **)&priv->ctrlreq, &maxlen); if (ret < 0) { - udbg("ERROR: DRVR_ALLOC failed: %d\n", ret); + uerr("ERROR: DRVR_ALLOC failed: %d\n", ret); goto errout_with_hub; } @@ -1296,7 +1296,7 @@ static FAR struct usbhost_class_s * ret = DRVR_IOALLOC(hport->drvr, &priv->buffer, INTIN_BUFSIZE); if (ret < 0) { - udbg("ERROR: DRVR_IOALLOC failed: %d\n", ret); + uerr("ERROR: DRVR_IOALLOC failed: %d\n", ret); goto errout_with_ctrlreq; } @@ -1385,7 +1385,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *hubclass, ret = usbhost_cfgdesc(hubclass, configdesc, desclen); if (ret < 0) { - udbg("ERROR: Failed to parse config descriptor: %d\n", ret); + uerr("ERROR: Failed to parse config descriptor: %d\n", ret); return ret; } @@ -1399,7 +1399,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *hubclass, if (priv->nports > USBHUB_MAX_PORTS) { - udbg("ERROR: too many downstream ports: %d\n", priv->nports); + uerr("ERROR: too many downstream ports: %d\n", priv->nports); return -ENOSYS; } @@ -1408,7 +1408,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *hubclass, ret = usbhost_hubpwr(priv, hport, true); if (ret < 0) { - udbg("ERROR: usbhost_hubpwr failed: %d\n", ret); + uerr("ERROR: usbhost_hubpwr failed: %d\n", ret); return ret; } @@ -1418,7 +1418,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *hubclass, INTIN_BUFSIZE, usbhost_callback, hubclass); if (ret < 0) { - udbg("ERROR: DRVR_ASYNCH failed: %d\n", ret); + uerr("ERROR: DRVR_ASYNCH failed: %d\n", ret); (void)usbhost_hubpwr(priv, hport, false); } @@ -1453,7 +1453,7 @@ static int usbhost_disconnected(struct usbhost_class_s *hubclass) irqstate_t flags; int ret; - uvdbg("Disconnected\n"); + uinfo("Disconnected\n"); /* Execute the disconnect action from the worker thread. */ diff --git a/drivers/usbhost/usbhost_registerclass.c b/drivers/usbhost/usbhost_registerclass.c index aaf61d0428a4616c5f5bf55fab90b2abec7ec219..a795b88d02a0235b293cec95aed0532adb868737 100644 --- a/drivers/usbhost/usbhost_registerclass.c +++ b/drivers/usbhost/usbhost_registerclass.c @@ -96,7 +96,7 @@ int usbhost_registerclass(struct usbhost_registry_s *usbclass) { irqstate_t flags; - uvdbg("Registering class:%p nids:%d\n", usbclass, usbclass->nids); + uinfo("Registering class:%p nids:%d\n", usbclass, usbclass->nids); /* g_classregistry is a singly-linkedlist of class ID information added by * calls to usbhost_registerclass(). Since this list is accessed from USB diff --git a/drivers/usbhost/usbhost_skeleton.c b/drivers/usbhost/usbhost_skeleton.c index 9a7ed87de31833b946275daef35a46ea1f623886..a03d1101f7cb24d8072bd12728df6e55fc0aaf1f 100644 --- a/drivers/usbhost/usbhost_skeleton.c +++ b/drivers/usbhost/usbhost_skeleton.c @@ -251,7 +251,7 @@ static inline FAR struct usbhost_state_s *usbhost_allocclass(void) DEBUGASSERT(!up_interrupt_context()); priv = (FAR struct usbhost_state_s *)kmm_malloc(sizeof(struct usbhost_state_s)); - uvdbg("Allocated: %p\n", priv); + uinfo("Allocated: %p\n", priv); return priv; } @@ -277,7 +277,7 @@ static inline void usbhost_freeclass(FAR struct usbhost_state_s *usbclass) * executing from an interrupt handler. */ - uvdbg("Freeing: %p\n", usbclass); + uinfo("Freeing: %p\n", usbclass); kmm_free(usbclass); } @@ -357,7 +357,7 @@ static void usbhost_destroy(FAR void *arg) DEBUGASSERT(hport->drvr); drvr = hport->drvr; - uvdbg("crefs: %d\n", priv->crefs); + uinfo("crefs: %d\n", priv->crefs); /* Unregister the driver */ @@ -465,7 +465,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, { FAR struct usb_ifdesc_s *ifdesc = (FAR struct usb_ifdesc_s *)configdesc; - uvdbg("Interface descriptor\n"); + uinfo("Interface descriptor\n"); DEBUGASSERT(remaining >= USB_SIZEOF_IFDESC); /* Save the interface number and mark ONLY the interface found */ @@ -483,7 +483,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, { FAR struct usb_epdesc_s *epdesc = (FAR struct usb_epdesc_s *)configdesc; - uvdbg("Endpoint descriptor\n"); + uinfo("Endpoint descriptor\n"); DEBUGASSERT(remaining >= USB_SIZEOF_EPDESC); /* Check for a bulk endpoint. */ @@ -516,7 +516,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, boutdesc.xfrtype = USB_EP_ATTR_XFER_BULK; boutdesc.interval = epdesc->interval; boutdesc.mxpacketsize = usbhost_getle16(epdesc->mxpacketsize); - uvdbg("Bulk OUT EP addr:%d mxpacketsize:%d\n", + uinfo("Bulk OUT EP addr:%d mxpacketsize:%d\n", boutdesc.addr, boutdesc.mxpacketsize); } else @@ -544,7 +544,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, bindesc.xfrtype = USB_EP_ATTR_XFER_BULK; bindesc.interval = epdesc->interval; bindesc.mxpacketsize = usbhost_getle16(epdesc->mxpacketsize); - uvdbg("Bulk IN EP addr:%d mxpacketsize:%d\n", + uinfo("Bulk IN EP addr:%d mxpacketsize:%d\n", bindesc.addr, bindesc.mxpacketsize); } } @@ -576,10 +576,10 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, if (found != USBHOST_ALLFOUND) { - ulldbg("ERROR: Found IF:%s BIN:%s BOUT:%s\n", - (found & USBHOST_IFFOUND) != 0 ? "YES" : "NO", - (found & USBHOST_BINFOUND) != 0 ? "YES" : "NO", - (found & USBHOST_BOUTFOUND) != 0 ? "YES" : "NO"); + uerr("ERROR: Found IF:%s BIN:%s BOUT:%s\n", + (found & USBHOST_IFFOUND) != 0 ? "YES" : "NO", + (found & USBHOST_BINFOUND) != 0 ? "YES" : "NO", + (found & USBHOST_BOUTFOUND) != 0 ? "YES" : "NO"); return -EINVAL; } @@ -588,19 +588,19 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, ret = DRVR_EPALLOC(hport->drvr, &boutdesc, &priv->epout); if (ret < 0) { - udbg("ERROR: Failed to allocate Bulk OUT endpoint\n"); + uerr("ERROR: Failed to allocate Bulk OUT endpoint\n"); return ret; } ret = DRVR_EPALLOC(hport->drvr, &bindesc, &priv->epin); if (ret < 0) { - udbg("ERROR: Failed to allocate Bulk IN endpoint\n"); + uerr("ERROR: Failed to allocate Bulk IN endpoint\n"); (void)DRVR_EPFREE(hport->drvr, priv->epout); return ret; } - ullvdbg("Endpoints allocated\n"); + uinfo("Endpoints allocated\n"); return OK; } @@ -644,7 +644,7 @@ static inline int usbhost_devinit(FAR struct usbhost_state_s *priv) { char devname[DEV_NAMELEN]; - uvdbg("Register block driver\n"); + uinfo("Register block driver\n"); usbhost_mkdevname(priv, devname); // ret = register_blockdriver(devname, &g_bops, 0, priv); } @@ -677,7 +677,7 @@ static inline int usbhost_devinit(FAR struct usbhost_state_s *priv) { /* Ready for normal operation as a block device driver */ - uvdbg("Successfully initialized\n"); + uinfo("Successfully initialized\n"); priv->crefs--; usbhost_givesem(&priv->exclsem); } @@ -955,7 +955,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass, ret = usbhost_cfgdesc(priv, configdesc, desclen); if (ret < 0) { - udbg("usbhost_cfgdesc() failed: %d\n", ret); + uerr("ERROR: usbhost_cfgdesc() failed: %d\n", ret); } else { @@ -964,7 +964,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass, ret = usbhost_devinit(priv); if (ret < 0) { - udbg("usbhost_devinit() failed: %d\n", ret); + uerr("ERROR: usbhost_devinit() failed: %d\n", ret); } } @@ -1013,7 +1013,7 @@ static int usbhost_disconnected(struct usbhost_class_s *usbclass) * block driver. */ - ullvdbg("crefs: %d\n", priv->crefs); + uinfo("crefs: %d\n", priv->crefs); if (priv->crefs == 1) { /* Destroy the class instance. If we are executing from an interrupt @@ -1025,7 +1025,7 @@ static int usbhost_disconnected(struct usbhost_class_s *usbclass) { /* Destroy the instance on the worker thread. */ - uvdbg("Queuing destruction: worker %p->%p\n", priv->work.worker, usbhost_destroy); + uinfo("Queuing destruction: worker %p->%p\n", priv->work.worker, usbhost_destroy); DEBUGASSERT(priv->work.worker == NULL); (void)work_queue(HPWORK, &priv->work, usbhost_destroy, priv, 0); } diff --git a/drivers/usbhost/usbhost_storage.c b/drivers/usbhost/usbhost_storage.c index 5d01a22b062edb60e3a478fb56bdcc23ffb80642..c7df71a7f4371af76df20b8660b10b7a6414514d 100644 --- a/drivers/usbhost/usbhost_storage.c +++ b/drivers/usbhost/usbhost_storage.c @@ -168,7 +168,7 @@ static inline void usbhost_mkdevname(FAR struct usbhost_state_s *priv, /* CBW/CSW debug helpers */ -#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_INFO) static void usbhost_dumpcbw(FAR struct usbmsc_cbw_s *cbw); static void usbhost_dumpcsw(FAR struct usbmsc_csw_s *csw); #else @@ -377,7 +377,7 @@ static inline FAR struct usbhost_state_s *usbhost_allocclass(void) } leave_critical_section(flags); - ullvdbg("Allocated: %p\n", entry); + uinfo("Allocated: %p\n", entry); return (FAR struct usbhost_state_s *)entry; } #else @@ -391,7 +391,7 @@ static inline FAR struct usbhost_state_s *usbhost_allocclass(void) DEBUGASSERT(!up_interrupt_context()); priv = (FAR struct usbhost_state_s *)kmm_malloc(sizeof(struct usbhost_state_s)); - uvdbg("Allocated: %p\n", priv); + uinfo("Allocated: %p\n", priv); return priv; } #endif @@ -417,7 +417,7 @@ static inline void usbhost_freeclass(FAR struct usbhost_state_s *usbclass) irqstate_t flags; DEBUGASSERT(entry != NULL); - ullvdbg("Freeing: %p\n", entry); + uinfo("Freeing: %p\n", entry); /* Just put the pre-allocated class structure back on the freelist */ @@ -435,7 +435,7 @@ static inline void usbhost_freeclass(FAR struct usbhost_state_s *usbclass) * from an interrupt handler. */ - uvdbg("Freeing: %p\n", usbclass); + uinfo("Freeing: %p\n", usbclass); sched_kfree(usbclass); } #endif @@ -501,23 +501,23 @@ static inline void usbhost_mkdevname(FAR struct usbhost_state_s *priv, char *dev * ****************************************************************************/ -#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_VERBOSE) +#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_INFO) static void usbhost_dumpcbw(FAR struct usbmsc_cbw_s *cbw) { int i; - uvdbg("CBW:\n"); - uvdbg(" signature: %08x\n", usbhost_getle32(cbw->signature)); - uvdbg(" tag: %08x\n", usbhost_getle32(cbw->tag)); - uvdbg(" datlen: %08x\n", usbhost_getle32(cbw->datlen)); - uvdbg(" flags: %02x\n", cbw->flags); - uvdbg(" lun: %02x\n", cbw->lun); - uvdbg(" cdblen: %02x\n", cbw->cdblen); + uinfo("CBW:\n"); + uinfo(" signature: %08x\n", usbhost_getle32(cbw->signature)); + uinfo(" tag: %08x\n", usbhost_getle32(cbw->tag)); + uinfo(" datlen: %08x\n", usbhost_getle32(cbw->datlen)); + uinfo(" flags: %02x\n", cbw->flags); + uinfo(" lun: %02x\n", cbw->lun); + uinfo(" cdblen: %02x\n", cbw->cdblen); - uvdbg("CDB:\n"); + uinfo("CDB:\n"); for (i = 0; i < cbw->cdblen; i += 8) { - uvdbg(" %02x %02x %02x %02x %02x %02x %02x %02x\n", + uinfo(" %02x %02x %02x %02x %02x %02x %02x %02x\n", cbw->cdb[i], cbw->cdb[i+1], cbw->cdb[i+2], cbw->cdb[i+3], cbw->cdb[i+4], cbw->cdb[i+5], cbw->cdb[i+6], cbw->cdb[i+7]); } @@ -525,11 +525,11 @@ static void usbhost_dumpcbw(FAR struct usbmsc_cbw_s *cbw) static void usbhost_dumpcsw(FAR struct usbmsc_csw_s *csw) { - uvdbg("CSW:\n"); - uvdbg(" signature: %08x\n", usbhost_getle32(csw->signature)); - uvdbg(" tag: %08x\n", usbhost_getle32(csw->tag)); - uvdbg(" residue: %08x\n", usbhost_getle32(csw->residue)); - uvdbg(" status: %02x\n", csw->status); + uinfo("CSW:\n"); + uinfo(" signature: %08x\n", usbhost_getle32(csw->signature)); + uinfo(" tag: %08x\n", usbhost_getle32(csw->tag)); + uinfo(" residue: %08x\n", usbhost_getle32(csw->residue)); + uinfo(" status: %02x\n", csw->status); } #endif @@ -685,7 +685,7 @@ static inline int usbhost_maxlunreq(FAR struct usbhost_state_s *priv) * allocated memory. */ - uvdbg("Request maximum logical unit number\n"); + uinfo("Request maximum logical unit number\n"); memset(req, 0, sizeof(struct usb_ctrlreq_s)); req->type = USB_DIR_IN | USB_REQ_TYPE_CLASS | USB_REQ_RECIPIENT_INTERFACE; @@ -722,7 +722,7 @@ static inline int usbhost_testunitready(FAR struct usbhost_state_s *priv) cbw = usbhost_cbwalloc(priv); if (!cbw) { - udbg("ERROR: Failed to create CBW\n"); + uerr("ERROR: Failed to create CBW\n"); return -ENOMEM; } @@ -760,7 +760,7 @@ static inline int usbhost_requestsense(FAR struct usbhost_state_s *priv) cbw = usbhost_cbwalloc(priv); if (!cbw) { - udbg("ERROR: Failed to create CBW\n"); + uerr("ERROR: Failed to create CBW\n"); return -ENOMEM; } @@ -806,7 +806,7 @@ static inline int usbhost_readcapacity(FAR struct usbhost_state_s *priv) cbw = usbhost_cbwalloc(priv); if (!cbw) { - udbg("ERROR: Failed to create CBW\n"); + uerr("ERROR: Failed to create CBW\n"); return -ENOMEM; } @@ -857,7 +857,7 @@ static inline int usbhost_inquiry(FAR struct usbhost_state_s *priv) cbw = usbhost_cbwalloc(priv); if (!cbw) { - udbg("ERROR: Failed to create CBW\n"); + uerr("ERROR: Failed to create CBW\n"); return -ENOMEM; } @@ -920,7 +920,7 @@ static void usbhost_destroy(FAR void *arg) DEBUGASSERT(priv != NULL && priv->usbclass.hport != NULL); hport = priv->usbclass.hport; - uvdbg("crefs: %d\n", priv->crefs); + uinfo("crefs: %d\n", priv->crefs); /* Unregister the block driver */ @@ -1046,7 +1046,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, { FAR struct usb_ifdesc_s *ifdesc = (FAR struct usb_ifdesc_s *)configdesc; - uvdbg("Interface descriptor\n"); + uinfo("Interface descriptor\n"); DEBUGASSERT(remaining >= USB_SIZEOF_IFDESC); /* Save the interface number and mark ONLY the interface found */ @@ -1064,7 +1064,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, { FAR struct usb_epdesc_s *epdesc = (FAR struct usb_epdesc_s *)configdesc; - uvdbg("Endpoint descriptor\n"); + uinfo("Endpoint descriptor\n"); DEBUGASSERT(remaining >= USB_SIZEOF_EPDESC); /* Check for a bulk endpoint. We only support the bulk-only @@ -1100,7 +1100,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, boutdesc.interval = epdesc->interval; boutdesc.mxpacketsize = usbhost_getle16(epdesc->mxpacketsize); - uvdbg("Bulk OUT EP addr:%d mxpacketsize:%d\n", + uinfo("Bulk OUT EP addr:%d mxpacketsize:%d\n", boutdesc.addr, boutdesc.mxpacketsize); } else @@ -1127,7 +1127,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, bindesc.xfrtype = USB_EP_ATTR_XFER_BULK; bindesc.interval = epdesc->interval; bindesc.mxpacketsize = usbhost_getle16(epdesc->mxpacketsize); - uvdbg("Bulk IN EP addr:%d mxpacketsize:%d\n", + uinfo("Bulk IN EP addr:%d mxpacketsize:%d\n", bindesc.addr, bindesc.mxpacketsize); } } @@ -1161,10 +1161,10 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, if (found != USBHOST_ALLFOUND) { - ulldbg("ERROR: Found IF:%s BIN:%s BOUT:%s\n", - (found & USBHOST_IFFOUND) != 0 ? "YES" : "NO", - (found & USBHOST_BINFOUND) != 0 ? "YES" : "NO", - (found & USBHOST_BOUTFOUND) != 0 ? "YES" : "NO"); + uerr("ERROR: Found IF:%s BIN:%s BOUT:%s\n", + (found & USBHOST_IFFOUND) != 0 ? "YES" : "NO", + (found & USBHOST_BINFOUND) != 0 ? "YES" : "NO", + (found & USBHOST_BOUTFOUND) != 0 ? "YES" : "NO"); return -EINVAL; } @@ -1173,19 +1173,19 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, ret = DRVR_EPALLOC(hport->drvr, &boutdesc, &priv->bulkout); if (ret < 0) { - udbg("ERROR: Failed to allocate Bulk OUT endpoint\n"); + uerr("ERROR: Failed to allocate Bulk OUT endpoint\n"); return ret; } ret = DRVR_EPALLOC(hport->drvr, &bindesc, &priv->bulkin); if (ret < 0) { - udbg("ERROR: Failed to allocate Bulk IN endpoint\n"); + uerr("ERROR: Failed to allocate Bulk IN endpoint\n"); (void)DRVR_EPFREE(hport->drvr, priv->bulkout); return ret; } - ullvdbg("Endpoints allocated\n"); + uinfo("Endpoints allocated\n"); return OK; } @@ -1221,7 +1221,7 @@ static inline int usbhost_initvolume(FAR struct usbhost_state_s *priv) ret = usbhost_talloc(priv); if (ret < 0) { - udbg("ERROR: Failed to allocate transfer buffer\n"); + uerr("ERROR: Failed to allocate transfer buffer\n"); return ret; } @@ -1234,12 +1234,12 @@ static inline int usbhost_initvolume(FAR struct usbhost_state_s *priv) /* Request the maximum logical unit number */ - uvdbg("Get max LUN\n"); + uinfo("Get max LUN\n"); ret = usbhost_maxlunreq(priv); for (retries = 0; retries < USBHOST_MAX_RETRIES /* && ret >= 0 */; retries++) { - uvdbg("Test unit ready, retries=%d\n", retries); + uinfo("Test unit ready, retries=%d\n", retries); /* Wait just a bit */ @@ -1268,7 +1268,7 @@ static inline int usbhost_initvolume(FAR struct usbhost_state_s *priv) * The returned status is ignored here. */ - uvdbg("Request sense\n"); + uinfo("Request sense\n"); ret = usbhost_requestsense(priv); } @@ -1281,7 +1281,7 @@ static inline int usbhost_initvolume(FAR struct usbhost_state_s *priv) if (ret < 0 && ret != -EPERM) { - udbg("ERROR: DRVR_TRANSFER returned: %d\n", ret); + uerr("ERROR: DRVR_TRANSFER returned: %d\n", ret); break; } } @@ -1290,7 +1290,7 @@ static inline int usbhost_initvolume(FAR struct usbhost_state_s *priv) if (retries >= USBHOST_MAX_RETRIES) { - udbg("ERROR: Timeout!\n"); + uerr("ERROR: Timeout!\n"); ret = -ETIMEDOUT; } @@ -1298,7 +1298,7 @@ static inline int usbhost_initvolume(FAR struct usbhost_state_s *priv) { /* Get the capacity of the volume */ - uvdbg("Read capacity\n"); + uinfo("Read capacity\n"); ret = usbhost_readcapacity(priv); if (ret >= 0) { @@ -1307,7 +1307,7 @@ static inline int usbhost_initvolume(FAR struct usbhost_state_s *priv) csw = (FAR struct usbmsc_csw_s *)priv->tbuffer; if (csw->status != 0) { - udbg("ERROR: CSW status error: %d\n", csw->status); + uerr("ERROR: CSW status error: %d\n", csw->status); ret = -ENODEV; } } @@ -1319,7 +1319,7 @@ static inline int usbhost_initvolume(FAR struct usbhost_state_s *priv) { /* Inquiry */ - uvdbg("Inquiry\n"); + uinfo("Inquiry\n"); ret = usbhost_inquiry(priv); if (ret >= 0) { @@ -1328,7 +1328,7 @@ static inline int usbhost_initvolume(FAR struct usbhost_state_s *priv) csw = (FAR struct usbmsc_csw_s *)priv->tbuffer; if (csw->status != 0) { - udbg("ERROR: CSW status error: %d\n", csw->status); + uerr("ERROR: CSW status error: %d\n", csw->status); ret = -ENODEV; } } @@ -1340,7 +1340,7 @@ static inline int usbhost_initvolume(FAR struct usbhost_state_s *priv) { char devname[DEV_NAMELEN]; - uvdbg("Register block driver\n"); + uinfo("Register block driver\n"); usbhost_mkdevname(priv, devname); ret = register_blockdriver(devname, &g_bops, 0, priv); } @@ -1772,7 +1772,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass, ret = usbhost_cfgdesc(priv, configdesc, desclen); if (ret < 0) { - udbg("usbhost_cfgdesc() failed: %d\n", ret); + uerr("ERROR: usbhost_cfgdesc() failed: %d\n", ret); } else { @@ -1781,7 +1781,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass, ret = usbhost_initvolume(priv); if (ret < 0) { - udbg("usbhost_initvolume() failed: %d\n", ret); + uerr("ERROR: usbhost_initvolume() failed: %d\n", ret); } } @@ -1830,7 +1830,7 @@ static int usbhost_disconnected(struct usbhost_class_s *usbclass) * block driver. */ - ullvdbg("crefs: %d\n", priv->crefs); + uinfo("crefs: %d\n", priv->crefs); if (priv->crefs == 1) { /* Destroy the class instance. If we are executing from an interrupt @@ -1842,7 +1842,7 @@ static int usbhost_disconnected(struct usbhost_class_s *usbclass) { /* Destroy the instance on the worker thread. */ - uvdbg("Queuing destruction: worker %p->%p\n", priv->work.worker, usbhost_destroy); + uinfo("Queuing destruction: worker %p->%p\n", priv->work.worker, usbhost_destroy); DEBUGASSERT(priv->work.worker == NULL); (void)work_queue(HPWORK, &priv->work, usbhost_destroy, priv, 0); } @@ -1874,7 +1874,7 @@ static int usbhost_open(FAR struct inode *inode) irqstate_t flags; int ret; - uvdbg("Entry\n"); + uinfo("Entry\n"); DEBUGASSERT(inode && inode->i_private); priv = (FAR struct usbhost_state_s *)inode->i_private; @@ -1923,7 +1923,7 @@ static int usbhost_close(FAR struct inode *inode) FAR struct usbhost_state_s *priv; irqstate_t flags; - uvdbg("Entry\n"); + uinfo("Entry\n"); DEBUGASSERT(inode && inode->i_private); priv = (FAR struct usbhost_state_s *)inode->i_private; @@ -1986,7 +1986,7 @@ static ssize_t usbhost_read(FAR struct inode *inode, unsigned char *buffer, DEBUGASSERT(priv->usbclass.hport); hport = priv->usbclass.hport; - uvdbg("startsector: %d nsectors: %d sectorsize: %d\n", + uinfo("startsector: %d nsectors: %d sectorsize: %d\n", startsector, nsectors, priv->blocksize); /* Check if the mass storage device is still connected */ @@ -2051,7 +2051,7 @@ static ssize_t usbhost_read(FAR struct inode *inode, unsigned char *buffer, csw = (FAR struct usbmsc_csw_s *)priv->tbuffer; if (csw->status != 0) { - udbg("ERROR: CSW status error: %d\n", csw->status); + uerr("ERROR: CSW status error: %d\n", csw->status); nbytes = -ENODEV; } } @@ -2086,7 +2086,7 @@ static ssize_t usbhost_write(FAR struct inode *inode, const unsigned char *buffe FAR struct usbhost_hubport_s *hport; ssize_t nbytes; - uvdbg("sector: %d nsectors: %d sectorsize: %d\n"); + uinfo("sector: %d nsectors: %d sectorsize: %d\n"); DEBUGASSERT(inode && inode->i_private); priv = (FAR struct usbhost_state_s *)inode->i_private; @@ -2150,7 +2150,7 @@ static ssize_t usbhost_write(FAR struct inode *inode, const unsigned char *buffe csw = (FAR struct usbmsc_csw_s *)priv->tbuffer; if (csw->status != 0) { - udbg("ERROR: CSW status error: %d\n", csw->status); + uerr("ERROR: CSW status error: %d\n", csw->status); nbytes = -ENODEV; } } @@ -2179,7 +2179,7 @@ static int usbhost_geometry(FAR struct inode *inode, struct geometry *geometry) FAR struct usbhost_state_s *priv; int ret = -EINVAL; - uvdbg("Entry\n"); + uinfo("Entry\n"); DEBUGASSERT(inode && inode->i_private); /* Check if the mass storage device is still connected */ @@ -2211,7 +2211,7 @@ static int usbhost_geometry(FAR struct inode *inode, struct geometry *geometry) geometry->geo_sectorsize = priv->blocksize; usbhost_givesem(&priv->exclsem); - uvdbg("nsectors: %ld sectorsize: %d\n", + uinfo("nsectors: %ld sectorsize: %d\n", (long)geometry->geo_nsectors, geometry->geo_sectorsize); ret = OK; @@ -2232,7 +2232,7 @@ static int usbhost_ioctl(FAR struct inode *inode, int cmd, unsigned long arg) FAR struct usbhost_state_s *priv; int ret; - uvdbg("Entry\n"); + uinfo("Entry\n"); DEBUGASSERT(inode && inode->i_private); priv = (FAR struct usbhost_state_s *)inode->i_private; diff --git a/drivers/usbhost/usbhost_trace.c b/drivers/usbhost/usbhost_trace.c index cd1ef92c4fc0f17d5bfeda324d15b09e03e6aad5..ba47097fa84ff3ca2f43f93cf7a3c4ee94b0cd30 100644 --- a/drivers/usbhost/usbhost_trace.c +++ b/drivers/usbhost/usbhost_trace.c @@ -190,7 +190,7 @@ void usbhost_trace_common(uint32_t event) ****************************************************************************/ #if defined(CONFIG_USBHOST_TRACE) || \ - (defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_USB)) + (defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_USB)) void usbhost_trace1(uint16_t id, uint32_t u23) { @@ -228,7 +228,7 @@ void usbhost_trace2(uint16_t id, uint8_t u7, uint16_t u16) #endif } -#endif /* CONFIG_USBHOST_TRACE || CONFIG_DEBUG && CONFIG_DEBUG_USB */ +#endif /* CONFIG_USBHOST_TRACE || CONFIG_DEBUG_FEATURES && CONFIG_DEBUG_USB */ /**************************************************************************** * Name: usbtrace_enumerate diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 523971c748e0f55e90706dd5d35ff57399055656..56c2fe89fdced4aaa5508468c89a3c3c0ca6a970 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -104,7 +104,7 @@ endchoice config OV2640_REGDEBUG bool "Register level debug output" default n - depends on DEBUG + depends on DEBUG_FEATURES ---help--- Enable details, register level debug output. diff --git a/drivers/video/ov2640.c b/drivers/video/ov2640.c index ebf37f002cb055b4704e230d88ccc31a320328b2..06f88d1bf4ad02e70daed9a4f3876ba21fe056b1 100644 --- a/drivers/video/ov2640.c +++ b/drivers/video/ov2640.c @@ -696,7 +696,7 @@ static int ov2640_putreg(FAR struct i2c_master_s *i2c, uint8_t regaddr, int ret; #ifdef CONFIG_OV2640_REGDEBUG - dbg("%02x <- %02x\n", regaddr, regval); + _err("%02x <- %02x\n", regaddr, regval); #endif /* Set up for the transfer */ @@ -715,7 +715,7 @@ static int ov2640_putreg(FAR struct i2c_master_s *i2c, uint8_t regaddr, ret = i2c_write(i2c, &config, buffer, 2); if (ret < 0) { - gdbg("ERROR: i2c_write failed: %d\n", ret); + gerr("ERROR: i2c_write failed: %d\n", ret); return ret; } @@ -756,7 +756,7 @@ static uint8_t ov2640_getreg(FAR struct i2c_master_s *i2c, uint8_t regaddr) ret = i2c_write(i2c, &config, ®addr, 1); if (ret < 0) { - gdbg("ERROR: i2c_write failed: %d\n", ret); + gerr("ERROR: i2c_write failed: %d\n", ret); return 0; } @@ -765,13 +765,13 @@ static uint8_t ov2640_getreg(FAR struct i2c_master_s *i2c, uint8_t regaddr) ret = i2c_read(i2c, &config, ®val, 1); if (ret < 0) { - gdbg("ERROR: i2c_read failed: %d\n", ret); + gerr("ERROR: i2c_read failed: %d\n", ret); return 0; } #ifdef CONFIG_OV2640_REGDEBUG else { - dbg("%02x -> %02x\n", regaddr, regval); + _err("%02x -> %02x\n", regaddr, regval); } #endif @@ -807,7 +807,7 @@ static int ov2640_putreglist(FAR struct i2c_master_s *i2c, ret = ov2640_putreg(i2c, entry->regaddr, entry->regval); if (ret < 0) { - gdbg("ERROR: ov2640_putreg failed: %d\n", ret); + gerr("ERROR: ov2640_putreg failed: %d\n", ret); return ret; } } @@ -845,7 +845,7 @@ static int ovr2640_chipid(FAR struct i2c_master_s *i2c) ret = ov2640_putreg(i2c, 0xff, 0x01); /* Select the sensor address bank */ if (ret < 0) { - gdbg("ERROR: ov2640_putreg failed: %d\n", ret); + gerr("ERROR: ov2640_putreg failed: %d\n", ret); return ret; } @@ -859,12 +859,12 @@ static int ovr2640_chipid(FAR struct i2c_master_s *i2c) if (pidl != OVR2640_PRODUCT_IDL || pidh != OVR2640_PRODUCT_IDH) { - gdbg("ERROR: Unsupported PID=%02x$02x MID=%02x%02x\n", + gerr("ERROR: Unsupported PID=%02x$02x MID=%02x%02x\n", pidh, pidl, midh, midl); return -ENOSYS; } - gvdbg("PID=%02x$02x MID=%02x%02x\n", pidh, pidl, midh, midl); + ginfo("PID=%02x$02x MID=%02x%02x\n", pidh, pidl, midh, midl); return OK; } @@ -892,7 +892,7 @@ static int ov2640_reset(FAR struct i2c_master_s *i2c) ret = ov2640_putreglist(i2c, g_ov2640_reset, OV2640_RESET_NENTRIES); if (ret < 0) { - gdbg("ERROR: ov2640_putreglist failed: %d\n", ret); + gerr("ERROR: ov2640_putreglist failed: %d\n", ret); return ret; } @@ -927,7 +927,7 @@ int ov2640_initialize(FAR struct i2c_master_s *i2c) ret = ov2640_reset(i2c); if (ret < 0) { - gdbg("ERROR: ov2640_reset failed: %d\n", ret); + gerr("ERROR: ov2640_reset failed: %d\n", ret); goto errout; } @@ -936,7 +936,7 @@ int ov2640_initialize(FAR struct i2c_master_s *i2c) ret = ovr2640_chipid(i2c); if (ret < 0) { - gdbg("ERROR: ovr2640_chipid failed: %d\n", ret); + gerr("ERROR: ovr2640_chipid failed: %d\n", ret); goto errout; } @@ -948,35 +948,35 @@ int ov2640_initialize(FAR struct i2c_master_s *i2c) ret = ov2640_putreglist(i2c, g_ov2640_jpeg_init, OV2640_JPEG_INIT_NENTRIES); if (ret < 0) { - gdbg("ERROR: ov2640_putreglist failed: %d\n", ret); + gerr("ERROR: ov2640_putreglist failed: %d\n", ret); goto errout; } ret = ov2640_putreglist(i2c, g_ov2640_yuv422, OV2640_YUV422_NENTRIES); if (ret < 0) { - gdbg("ERROR: ov2640_putreglist failed: %d\n", ret); + gerr("ERROR: ov2640_putreglist failed: %d\n", ret); goto errout; } ret = ov2640_putreglist(i2c, g_ov2640_jpeg, OV2640_JPEG_NENTRIES); if (ret < 0) { - gdbg("ERROR: ov2640_putreglist failed: %d\n", ret); + gerr("ERROR: ov2640_putreglist failed: %d\n", ret); goto errout; } ret = ov2640_putreg(i2c, 0xff, 0x01); if (ret < 0) { - gdbg("ERROR: ov2640_putreg failed: %d\n", ret); + gerr("ERROR: ov2640_putreg failed: %d\n", ret); goto errout; } ret = ov2640_putreg(i2c, 0x15, 0x00); if (ret < 0) { - gdbg("ERROR: ov2640_putreg failed: %d\n", ret); + gerr("ERROR: ov2640_putreg failed: %d\n", ret); goto errout; } @@ -1018,7 +1018,7 @@ int ov2640_initialize(FAR struct i2c_master_s *i2c) if (ret < 0) { - gdbg("ERROR: ov2640_putreglist failed: %d\n", ret); + gerr("ERROR: ov2640_putreglist failed: %d\n", ret); goto errout; } @@ -1030,7 +1030,7 @@ int ov2640_initialize(FAR struct i2c_master_s *i2c) OV2640_INITIALREGS_NENTRIES); if (ret < 0) { - gdbg("ERROR: ov2640_putreglist failed: %d\n", ret); + gerr("ERROR: ov2640_putreglist failed: %d\n", ret); goto errout; } @@ -1040,7 +1040,7 @@ int ov2640_initialize(FAR struct i2c_master_s *i2c) OV2640_RESOLUTION_COMMON_NENTRIES); if (ret < 0) { - gdbg("ERROR: ov2640_putreglist failed: %d\n", ret); + gerr("ERROR: ov2640_putreglist failed: %d\n", ret); goto errout; } @@ -1082,7 +1082,7 @@ int ov2640_initialize(FAR struct i2c_master_s *i2c) if (ret < 0) { - gdbg("ERROR: ov2640_putreglist failed: %d\n", ret); + gerr("ERROR: ov2640_putreglist failed: %d\n", ret); goto errout; } @@ -1092,7 +1092,7 @@ int ov2640_initialize(FAR struct i2c_master_s *i2c) OV2640_COLORFMT_COMMON_NENTRIES); if (ret < 0) { - gdbg("ERROR: ov2640_putreglist failed: %d\n", ret); + gerr("ERROR: ov2640_putreglist failed: %d\n", ret); goto errout; } @@ -1110,7 +1110,7 @@ int ov2640_initialize(FAR struct i2c_master_s *i2c) if (ret < 0) { - gdbg("ERROR: ov2640_putreglist failed: %d\n", ret); + gerr("ERROR: ov2640_putreglist failed: %d\n", ret); goto errout; } @@ -1119,7 +1119,7 @@ int ov2640_initialize(FAR struct i2c_master_s *i2c) return OK; errout: - gdbg("ERROR: Failed to initialize the OV2640: %d\n", ret); + gerr("ERROR: Failed to initialize the OV2640: %d\n", ret); (void)ov2640_reset(i2c); return ret; } diff --git a/drivers/wireless/cc3000/cc3000.c b/drivers/wireless/cc3000/cc3000.c index bc0e2a615cb818ad45c4e7f6670c4c0c18f6cb5a..6c0fb748286a1ef85cb5a24069cf8b5e7ccc3d76 100644 --- a/drivers/wireless/cc3000/cc3000.c +++ b/drivers/wireless/cc3000/cc3000.c @@ -113,7 +113,7 @@ CCASSERT(sizeof(cc3000_buffer_desc) <= CONFIG_MQ_MAXMSGSIZE); #define FREE_SLOT -1 #define CLOSE_SLOT -2 -#if defined(CONFIG_DEBUG) && defined(CONFIG_CC3000_PROBES) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_CC3000_PROBES) # define CC3000_GUARD (0xc35aa53c) # define INIT_GUARD(p) p->guard = CC3000_GUARD # define CHECK_GUARD(p) DEBUGASSERT(p->guard == CC3000_GUARD) @@ -124,11 +124,8 @@ CCASSERT(sizeof(cc3000_buffer_desc) <= CONFIG_MQ_MAXMSGSIZE); # define PROBE(pin,state) #endif -#define waitlldbg(x,...) - -/**************************************************************************** - * Private Types - ****************************************************************************/ +#define waiterr(x,...) // _err +#define waitinfo(x,...) // _info /**************************************************************************** * Private Function Prototypes @@ -251,7 +248,7 @@ static inline void cc3000_devgive(FAR struct cc3000_dev_s *priv) static inline void cc3000_configspi(FAR struct spi_dev_s *spi) { - ndbg("Mode: %d Bits: 8 Frequency: %d\n", + ninfo("Mode: %d Bits: 8 Frequency: %d\n", CONFIG_CC3000_SPI_MODE, CONFIG_CC3000_SPI_FREQUENCY); SPI_SETMODE(spi, CONFIG_CC3000_SPI_MODE); @@ -422,7 +419,7 @@ static void cc3000_pollnotify(FAR struct cc3000_dev_s *priv, uint32_t type) if (fds) { fds->revents |= type; - nllvdbg("Report events: %02x\n", fds->revents); + ninfo("Report events: %02x\n", fds->revents); sem_post(fds->sem); } } @@ -500,7 +497,7 @@ static void * select_thread_func(FAR void *arg) if (priv->sockets[s].sd == CLOSE_SLOT) { priv->sockets[s].sd = FREE_SLOT; - waitlldbg("Close\n"); + waitinfo("Close\n"); int count; do { @@ -509,7 +506,7 @@ static void * select_thread_func(FAR void *arg) { /* Release the waiting threads */ - waitlldbg("Closed Signaled %d\n", count); + waitinfo("Closed Signaled %d\n", count); sem_post(&priv->sockets[s].semwait); } } @@ -556,17 +553,17 @@ static void * select_thread_func(FAR void *arg) { if (ret > 0 && CC3000_FD_ISSET(priv->sockets[s].sd, &readsds)) /* and has pending data */ { - waitlldbg("Signaled %d\n", priv->sockets[s].sd); + waitinfo("Signaled %d\n", priv->sockets[s].sd); sem_post(&priv->sockets[s].semwait); /* release the waiting thread */ } else if (ret > 0 && CC3000_FD_ISSET(priv->sockets[s].sd, &exceptsds)) /* or has pending exception */ { - waitlldbg("Signaled %d (exception)\n", priv->sockets[s].sd); + waitinfo("Signaled %d (exception)\n", priv->sockets[s].sd); sem_post(&priv->sockets[s].semwait); /* release the waiting thread */ } else if (priv->sockets[s].received_closed_event) /* or remote has closed connection and we have now read all of HW buffer. */ { - waitlldbg("Signaled %d (closed & empty)\n", priv->sockets[s].sd); + waitinfo("Signaled %d (closed & empty)\n", priv->sockets[s].sd); priv->sockets[s].emptied_and_remotely_closed = true; sem_post(&priv->sockets[s].semwait); /* release the waiting thread */ } @@ -623,7 +620,7 @@ static void * cc3000_worker(FAR void *arg) if ((cc3000_wait_irq(priv) != -EINTR) && (priv->workertid != -1)) { PROBE(0, 0); - nllvdbg("State%d\n", priv->state); + ninfo("State%d\n", priv->state); switch (priv->state) { case eSPI_STATE_POWERUP: @@ -679,7 +676,7 @@ static void * cc3000_worker(FAR void *arg) if (data_to_recv >= priv->rx_buffer_max_len) { - lowsyslog(LOG_INFO, "data_to_recv %d", data_to_recv); + ninfo("data_to_recv %d", data_to_recv); } DEBUGASSERT(data_to_recv < priv->rx_buffer_max_len); @@ -710,10 +707,10 @@ static void * cc3000_worker(FAR void *arg) cc3000_devgive(priv); - nllvdbg("Wait On Completion\n"); + ninfo("Wait On Completion\n"); sem_wait(priv->wrkwaitsem); - nllvdbg("Completed S:%d irq :%d\n", - priv->state, priv->config->irq_read(priv->config)); + ninfo("Completed S:%d irq :%d\n", + priv->state, priv->config->irq_read(priv->config)); sem_getvalue(&priv->irqsem, &count); if (priv->config->irq_read(priv->config) && count == 0) @@ -732,7 +729,7 @@ static void * cc3000_worker(FAR void *arg) break; default: - nllvdbg("default: State%d\n", priv->state); + ninfo("default: State%d\n", priv->state); break; } } @@ -802,7 +799,7 @@ static int cc3000_open(FAR struct file *filep) CHECK_GUARD(priv); - nllvdbg("crefs: %d\n", priv->crefs); + ninfo("crefs: %d\n", priv->crefs); /* Get exclusive access to the driver data structure */ @@ -982,7 +979,7 @@ static int cc3000_close(FAR struct file *filep) CHECK_GUARD(priv); - nllvdbg("crefs: %d\n", priv->crefs); + ninfo("crefs: %d\n", priv->crefs); /* Get exclusive access to the driver data structure */ @@ -1052,7 +1049,7 @@ static ssize_t cc3000_read(FAR struct file *filep, FAR char *buffer, size_t len) int ret; ssize_t nread; - nllvdbg("buffer:%p len:%d\n", buffer, len); + ninfo("buffer:%p len:%d\n", buffer, len); DEBUGASSERT(filep); inode = filep->f_inode; @@ -1071,7 +1068,7 @@ static ssize_t cc3000_read(FAR struct file *filep, FAR char *buffer, size_t len) if (len < priv->rx_buffer_max_len) { - ndbg("Unsupported read size: %d\n", len); + nerr("ERROR: Unsupported read size: %d\n", len); nread = -ENOSYS; goto errout_with_sem; } @@ -1091,7 +1088,7 @@ static ssize_t cc3000_read(FAR struct file *filep, FAR char *buffer, size_t len) * option, then just return an error. */ - nllvdbg("CC3000 data is not available\n"); + ninfo("CC3000 data is not available\n"); if (filep->f_oflags & O_NONBLOCK) { nread = -EAGAIN; @@ -1112,7 +1109,7 @@ static ssize_t cc3000_read(FAR struct file *filep, FAR char *buffer, size_t len) * but will be re-enabled while we are waiting. */ - nllvdbg("Waiting..\n"); + ninfo("Waiting..\n"); ret = sem_wait(&priv->waitsem); priv->nwaiters--; sched_unlock(); @@ -1166,7 +1163,7 @@ errout_with_sem: cc3000_devgive(priv); errout_without_sem: - nllvdbg("Returning: %d\n", nread); + ninfo("Returning: %d\n", nread); #ifndef CONFIG_DISABLE_POLL if (nread > 0) { @@ -1198,7 +1195,7 @@ static ssize_t cc3000_write(FAR struct file *filep, FAR const char *usrbuffer, s size_t tx_len = (len & 1) ? len : len +1; - nllvdbg("buffer:%p len:%d tx_len:%d\n", buffer, len, tx_len); + ninfo("buffer:%p len:%d tx_len:%d\n", buffer, len, tx_len); DEBUGASSERT(filep); inode = filep->f_inode; @@ -1263,18 +1260,18 @@ static ssize_t cc3000_write(FAR struct file *filep, FAR const char *usrbuffer, s } else { - nllvdbg("Assert CS\n"); + ninfo("Assert CS\n"); priv->state = eSPI_STATE_WRITE_WAIT_IRQ; cc3000_lock_and_select(priv->spi); /* Assert CS */ - nllvdbg("Wait on IRQ Active\n"); + ninfo("Wait on IRQ Active\n"); ret = cc3000_wait_ready(priv); - nllvdbg("IRQ Signaled\n"); + ninfo("IRQ Signaled\n"); if (ret < 0) { /* This should only happen if the wait was canceled by an signal */ cc3000_deselect_and_unlock(priv->spi); - nllvdbg("sem_wait: %d\n", errno); + ninfo("sem_wait: %d\n", errno); DEBUGASSERT(errno == EINTR); nwritten = ret; goto errout_without_sem; @@ -1284,13 +1281,13 @@ static ssize_t cc3000_write(FAR struct file *filep, FAR const char *usrbuffer, s } priv->state = eSPI_STATE_WRITE_DONE; - nllvdbg("Deassert CS S:eSPI_STATE_WRITE_DONE\n"); + ninfo("Deassert CS S:eSPI_STATE_WRITE_DONE\n"); cc3000_deselect_and_unlock(priv->spi); nwritten = tx_len; cc3000_devgive(priv); errout_without_sem: - nllvdbg("Returning: %d\n", ret); + ninfo("Returning: %d\n", ret); return nwritten; } @@ -1304,7 +1301,7 @@ static int cc3000_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR struct cc3000_dev_s *priv; int ret; - nllvdbg("cmd: %d arg: %ld\n", cmd, arg); + ninfo("cmd: %d arg: %ld\n", cmd, arg); DEBUGASSERT(filep); inode = filep->f_inode; @@ -1409,7 +1406,7 @@ static int cc3000_poll(FAR struct file *filep, FAR struct pollfd *fds, int ret = OK; int i; - nllvdbg("setup: %d\n", (int)setup); + ninfo("setup: %d\n", (int)setup); DEBUGASSERT(filep && fds); inode = filep->f_inode; @@ -1517,7 +1514,7 @@ int cc3000_register(FAR struct spi_dev_s *spi, #endif int ret; - nllvdbg("spi: %p minor: %d\n", spi, minor); + ninfo("spi: %p minor: %d\n", spi, minor); /* Debug-only sanity checks */ @@ -1531,7 +1528,7 @@ int cc3000_register(FAR struct spi_dev_s *spi, priv = (FAR struct cc3000_dev_s *)kmm_malloc(sizeof(struct cc3000_dev_s)); if (!priv) { - ndbg("kmm_malloc(%d) failed\n", sizeof(struct cc3000_dev_s)); + nerr("ERROR: kmm_malloc(%d) failed\n", sizeof(struct cc3000_dev_s)); return -ENOMEM; } #endif @@ -1565,19 +1562,19 @@ int cc3000_register(FAR struct spi_dev_s *spi, ret = config->irq_attach(config, cc3000_interrupt); if (ret < 0) { - ndbg("Failed to attach interrupt\n"); + nerr("ERROR: Failed to attach interrupt\n"); goto errout_with_priv; } /* Register the device as an input device */ (void)snprintf(drvname, DEV_NAMELEN, DEV_FORMAT, minor); - nllvdbg("Registering %s\n", drvname); + ninfo("Registering %s\n", drvname); ret = register_driver(drvname, &cc3000_fops, 0666, priv); if (ret < 0) { - ndbg("register_driver() failed: %d\n", ret); + nerr("ERROR: register_driver() failed: %d\n", ret); goto errout_with_priv; } diff --git a/drivers/wireless/cc3000/cc3000.h b/drivers/wireless/cc3000/cc3000.h index 0ebc118ebb8580112f5b20a9fd4495029c3be806..ddcd4f5163c2f5b46b38028b390fb69adf394aec 100644 --- a/drivers/wireless/cc3000/cc3000.h +++ b/drivers/wireless/cc3000/cc3000.h @@ -168,7 +168,7 @@ struct cc3000_dev_s struct pollfd *fds[CONFIG_CC3000_NPOLLWAITERS]; #endif -#if defined(CONFIG_DEBUG) && defined(CONFIG_CC3000_PROBES) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_CC3000_PROBES) long guard; #endif diff --git a/drivers/wireless/cc3000/cc3000drv.c b/drivers/wireless/cc3000/cc3000drv.c index e192dbf17563203409c9c7d94504e1154c97f998..ab114c0515a2bbe84a9da2dcced3f75235dbc192 100644 --- a/drivers/wireless/cc3000/cc3000drv.c +++ b/drivers/wireless/cc3000/cc3000drv.c @@ -57,26 +57,6 @@ #include #include -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#undef SPI_DEBUG /* Define to enable debug */ -#undef SPI_VERBOSE /* Define to enable verbose debug */ - -#ifdef SPI_DEBUG -# define spidbg lldbg -# ifdef SPI_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# undef SPI_VERBOSE -# define spidbg(x...) -# define spivdbg(x...) -#endif - /**************************************************************************** * Private Types ****************************************************************************/ @@ -118,7 +98,7 @@ void cc3000_resume(void) { DEBUGASSERT(spiconf.cc3000fd >= 0 && spiconf.done); sem_post(spiconf.done); - nllvdbg("Done\n"); + ninfo("Done\n"); } /**************************************************************************** @@ -223,7 +203,7 @@ static void *unsoliced_thread_func(void *parameter) sizeof(spiconf.rx_buffer), 0); if (nbytes > 0) { - nlldbg("%d Processed\n", nbytes); + ninfo("%d Processed\n", nbytes); spiconf.pfRxHandler(spiconf.rx_buffer.pbuffer); } } diff --git a/drivers/wireless/cc3000/evnt_handler.c b/drivers/wireless/cc3000/evnt_handler.c index b890a9a9b7c591b709f845a3a79a5bf02383ac9c..b53fd24db37985ebdee3da1b4de9e5d11ac62301 100644 --- a/drivers/wireless/cc3000/evnt_handler.c +++ b/drivers/wireless/cc3000/evnt_handler.c @@ -924,12 +924,12 @@ void SimpleLinkWaitEvent(uint16_t opcode, void *pRetParams) */ tSLInformation.usRxEventOpcode = opcode; - nllvdbg("Looking for opcode 0x%x\n", opcode); + ninfo("Looking for opcode 0x%x\n", opcode); uint16_t event_type; do { - nllvdbg("cc3000_wait\n"); + ninfo("cc3000_wait\n"); tSLInformation.pucReceivedData = cc3000_wait(); tSLInformation.usEventOrDataReceived = 1; STREAM_TO_UINT16((FAR char *)tSLInformation.pucReceivedData, @@ -937,25 +937,25 @@ void SimpleLinkWaitEvent(uint16_t opcode, void *pRetParams) if (*tSLInformation.pucReceivedData == HCI_TYPE_EVNT) { - nllvdbg("Evtn:0x%x\n", event_type); + ninfo("Evtn:0x%x\n", event_type); } if (event_type != opcode) { if (hci_unsolicited_event_handler() == 1) { - nllvdbg("Processed Event 0x%x want 0x%x\n", event_type, opcode); + ninfo("Processed Event 0x%x want 0x%x\n", event_type, opcode); } } else { - nllvdbg("Processing opcode 0x%x\n", opcode); + ninfo("Processing opcode 0x%x\n", opcode); hci_event_handler(pRetParams, 0, 0); } } while (tSLInformation.usRxEventOpcode != 0); - nllvdbg("Done for opcode 0x%x\n", opcode); + ninfo("Done for opcode 0x%x\n", opcode); } /**************************************************************************** @@ -981,7 +981,7 @@ void SimpleLinkWaitData(uint8_t *pBuf, uint8_t *from, uint8_t *fromlen) * after the end of current transaction, i.e. only after data will be received */ - nllvdbg("Looking for Data\n"); + ninfo("Looking for Data\n"); uint16_t event_type; uint16_t opcode = tSLInformation.usRxEventOpcode; @@ -999,15 +999,15 @@ void SimpleLinkWaitData(uint8_t *pBuf, uint8_t *from, uint8_t *fromlen) else { STREAM_TO_UINT16((char *)tSLInformation.pucReceivedData, HCI_EVENT_OPCODE_OFFSET, event_type); - nllvdbg("Evtn:0x%x\n", event_type); + ninfo("Evtn:0x%x\n", event_type); if (hci_unsolicited_event_handler() == 1) { - nllvdbg("Processed Event 0x%x want Data! Opcode 0x%x\n", event_type, opcode); + ninfo("Processed Event 0x%x want Data! Opcode 0x%x\n", event_type, opcode); } else { - nllvdbg("!!!!!opcode 0x%x\n", opcode); + ninfo("!!!!!opcode 0x%x\n", opcode); } UNUSED(event_type); @@ -1015,6 +1015,6 @@ void SimpleLinkWaitData(uint8_t *pBuf, uint8_t *from, uint8_t *fromlen) } while (*tSLInformation.pucReceivedData == HCI_TYPE_EVNT); - nllvdbg("Done for Data 0x%x\n", opcode); + ninfo("Done for Data 0x%x\n", opcode); UNUSED(opcode); } diff --git a/drivers/wireless/cc3000/hci.c b/drivers/wireless/cc3000/hci.c index 6caf64c60d490e6757b015ab2bee575e75225458..7555290640d9057d7606b70891755d6305027625 100644 --- a/drivers/wireless/cc3000/hci.c +++ b/drivers/wireless/cc3000/hci.c @@ -79,7 +79,7 @@ uint16_t hci_command_send(uint16_t usOpcode, uint8_t *pucBuff, stream = (pucBuff + SPI_HEADER_SIZE); - nllvdbg("Send 0x%x\n", usOpcode); + ninfo("Send 0x%x\n", usOpcode); UINT8_TO_STREAM(stream, HCI_TYPE_CMND); stream = UINT16_TO_STREAM(stream, usOpcode); UINT8_TO_STREAM(stream, ucArgsLength); @@ -87,7 +87,7 @@ uint16_t hci_command_send(uint16_t usOpcode, uint8_t *pucBuff, /* Update the opcode of the event we will be waiting for */ cc3000_write(pucBuff, ucArgsLength + SIMPLE_LINK_HCI_CMND_HEADER_SIZE); - nllvdbg("Send of 0x%x Completed\n", usOpcode); + ninfo("Send of 0x%x Completed\n", usOpcode); return 0; } diff --git a/drivers/wireless/cc3000/socket.c b/drivers/wireless/cc3000/socket.c index 9653d06ed7b7d1792732590b0d5f7cdc34836955..a1d238365c28e196a9807d7551b3391d39605299 100644 --- a/drivers/wireless/cc3000/socket.c +++ b/drivers/wireless/cc3000/socket.c @@ -62,7 +62,8 @@ # define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #endif -#define waitlldbg(x,...) // lldbg +#define waiterr(x,...) // _err +#define waitinfo(x,...) // _info /**************************************************************************** * Private Types @@ -194,13 +195,13 @@ int cc3000_closesocket(int sockfd) int ret; #ifdef CONFIG_CC3000_MT - waitlldbg("remove\n"); + waitinfo("remove\n"); cc3000_remove_socket(sockfd); #endif cc3000_lib_lock(); - waitlldbg("Call closesocketl\n"); + waitinfo("Call closesocketl\n"); ret = cc3000_closesocket_impl(sockfd); - waitlldbg("return closesocket\n"); + waitinfo("return closesocket\n"); cc3000_lib_unlock(); return ret; } @@ -267,7 +268,7 @@ int cc3000_accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen) if (setsockopt(sockfd, CC3000_SOL_SOCKET, CC3000_SOCKOPT_ACCEPT_NONBLOCK, &non_blocking, sizeof(non_blocking)) < 0) { - ndbg("setsockopt failure %d\n", errno); + nerr("ERROR: setsockopt failure %d\n", errno); return -errno; } @@ -282,7 +283,7 @@ int cc3000_accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen) if (setsockopt(sockfd, CC3000_SOL_SOCKET, CC3000_SOCKOPT_ACCEPT_NONBLOCK, &nonBlocking, sizeof(nonBlocking)) < 0) { - ndbg("setsockopt failure %d\n", errno); + nerr("ERROR: setsockopt failure %d\n", errno); return -errno; } @@ -596,9 +597,9 @@ ssize_t cc3000_recv(int sockfd, FAR void *buf, size_t len, int flags) ssize_t ret; #ifdef CONFIG_CC3000_MT - waitlldbg("wait\n"); + waitinfo("wait\n"); ret = cc3000_wait_data(sockfd); - waitlldbg("wait %d\n", ret); + waitinfo("wait %d\n", ret); if (ret == -ECONNABORTED) { @@ -612,9 +613,9 @@ ssize_t cc3000_recv(int sockfd, FAR void *buf, size_t len, int flags) #endif cc3000_lib_lock(); - waitlldbg("recv\n"); + waitinfo("recv\n"); ret = cc3000_recv_impl(sockfd, buf, len, flags); - waitlldbg("recv %d\n", ret); + waitinfo("recv %d\n", ret); cc3000_lib_unlock(); return ret; } diff --git a/drivers/wireless/cc3000/wlan.c b/drivers/wireless/cc3000/wlan.c index 175d6334b4dc4429767ce93c782019edcf9c3d6e..23d853a6819b6053186c7baa77f08daeb6300e94 100644 --- a/drivers/wireless/cc3000/wlan.c +++ b/drivers/wireless/cc3000/wlan.c @@ -261,7 +261,7 @@ void SpiReceiveHandler(void *pvBuffer) STREAM_TO_UINT16((char *)tSLInformation.pucReceivedData, HCI_EVENT_OPCODE_OFFSET, event_type); - nllvdbg("Evnt:0x%x\n", event_type); + ninfo("Evnt:0x%x\n", event_type); UNUSED(event_type); hci_unsolicited_event_handler(); diff --git a/drivers/wireless/ieee802154/mrf24j40.c b/drivers/wireless/ieee802154/mrf24j40.c index fa7cfd815d3c5daf01c6375cd27e88f0f8738a30..77079fe468ebf993c20682326686d360b92a2c06 100644 --- a/drivers/wireless/ieee802154/mrf24j40.c +++ b/drivers/wireless/ieee802154/mrf24j40.c @@ -169,7 +169,7 @@ static int mrf24j40_transmit (FAR struct ieee802154_dev_s *ieee, FAR stru static struct mrf24j40_dev_s g_mrf24j40_devices[1]; -static const struct ieee802154_devops_s mrf24j40_devops = +static const struct ieee802154_devops_s mrf24j40_devops = { mrf24j40_setchannel, mrf24j40_getchannel, mrf24j40_setpanid , mrf24j40_getpanid, @@ -303,7 +303,7 @@ static uint8_t mrf24j40_getreg(FAR struct spi_dev_s *spi, uint32_t addr) SPI_SELECT (spi, SPIDEV_IEEE802154, false); mrf24j40_unlock(spi); - /*dbg("r[%04X]=%02X\n",addr,rx[len-1]);*/ + /*winfo("r[%04X]=%02X\n", addr, rx[len-1]);*/ return rx[len-1]; } @@ -443,7 +443,7 @@ static int mrf24j40_setrxmode(FAR struct mrf24j40_dev_s *dev, int mode) mrf24j40_setreg(dev->spi, MRF24J40_RXMCR, reg); dev->rxmode = mode; - dbg("%u\n",(unsigned)mode); + winfo("%u\n", (unsigned)mode); return OK; } @@ -467,10 +467,10 @@ static int mrf24j40_setchannel(FAR struct ieee802154_dev_s *ieee, uint8_t chan) { FAR struct mrf24j40_dev_s *dev = (FAR struct mrf24j40_dev_s *)ieee; - + if (chan<11 || chan>26) { - dbg("Invalid chan: %d\n",chan); + werr("ERROR: Invalid chan: %d\n",chan); return -EINVAL; } @@ -485,7 +485,7 @@ static int mrf24j40_setchannel(FAR struct ieee802154_dev_s *ieee, mrf24j40_resetrfsm(dev); dev->channel = chan; - //dbg("%u\n",(unsigned)chan); + //winfo("%u\n", (unsigned)chan); return OK; } @@ -525,7 +525,7 @@ static int mrf24j40_setpanid(FAR struct ieee802154_dev_s *ieee, mrf24j40_setreg(dev->spi, MRF24J40_PANIDL, (uint8_t)(panid&0xFF)); dev->panid = panid; - dbg("%04X\n",(unsigned)panid); + winfo("%04X\n", (unsigned)panid); return OK; } @@ -567,7 +567,7 @@ static int mrf24j40_setsaddr(FAR struct ieee802154_dev_s *ieee, mrf24j40_setreg(dev->spi, MRF24J40_SADRL, (uint8_t)(saddr&0xFF)); dev->saddr = saddr; - dbg("%04X\n",(unsigned)saddr); + winfo("%04X\n", (unsigned)saddr); return OK; } @@ -779,7 +779,7 @@ static int mrf24j40_settxpower(FAR struct ieee802154_dev_s *ieee, return -EINVAL; } - lldbg("remaining attenuation: %d mBm\n",txpwr); + _info("remaining attenuation: %d mBm\n",txpwr); switch(txpwr/100) { @@ -897,7 +897,7 @@ static int mrf24j40_regdump(FAR struct mrf24j40_dev_s *dev) char buf[4+16*3+2+1]; int len=0; - dbg("Short regs:\n"); + winfo("Short regs:\n"); for (i = 0; i < 0x40; i++) { @@ -910,11 +910,11 @@ static int mrf24j40_regdump(FAR struct mrf24j40_dev_s *dev) if ((i & 15) == 15) { sprintf(buf+len, "\n"); - dbg("%s",buf); + winfo("%s", buf); } } - dbg("Long regs:\n"); + winfo("Long regs:\n"); for (i=0x80000200;i<0x80000250;i++) { if ((i&15)==0) @@ -926,7 +926,7 @@ static int mrf24j40_regdump(FAR struct mrf24j40_dev_s *dev) if ((i & 15) == 15) { sprintf(buf+len, "\n"); - dbg("%s",buf); + winfo("%s", buf); } } @@ -952,7 +952,7 @@ static int mrf24j40_ioctl(FAR struct ieee802154_dev_s *ieee, int cmd, return mrf24j40_regdump(dev); case 1001: dev->paenabled = (uint8_t)arg; - dbg("PA %sabled\n",arg?"en":"dis"); + winfo("PA %sabled\n", arg ? "en" : "dis"); return OK; default: @@ -1037,13 +1037,13 @@ static int mrf24j40_transmit(FAR struct ieee802154_dev_s *ieee, FAR struct ieee8 reg = mrf24j40_getreg(dev->spi, MRF24J40_INTCON); reg &= ~MRF24J40_INTCON_TXNIE; mrf24j40_setreg(dev->spi, MRF24J40_INTCON, reg); - + /* Analyze frame control to compute header length */ fc1 = packet->data[0]; fc2 = packet->data[1]; - // dbg("fc1 %02X fc2 %02X\n", fc1,fc2); + // winfo("fc1 %02X fc2 %02X\n", fc1,fc2); if ((fc2 & IEEE802154_FC2_DADDR) == IEEE802154_DADDR_SHORT) { @@ -1073,7 +1073,7 @@ static int mrf24j40_transmit(FAR struct ieee802154_dev_s *ieee, FAR struct ieee8 hlen += 8; /* Ext saddr */ } -// dbg("hlen %d\n",hlen); +// winfo("hlen %d\n",hlen); /* Header len, 0, TODO for security modes */ @@ -1090,7 +1090,7 @@ static int mrf24j40_transmit(FAR struct ieee802154_dev_s *ieee, FAR struct ieee8 mrf24j40_setreg(dev->spi, addr++, packet->data[ret]); } - /* If the frame control field contains + /* If the frame control field contains * an acknowledgment request, set the TXNACKREQ bit. * See IEEE 802.15.4/2003 7.2.1.1 page 112 for info. */ @@ -1131,7 +1131,7 @@ static void mrf24j40_irqwork_tx(FAR struct mrf24j40_dev_s *dev) * channel_busy = (tmp & (1 << CCAFAIL)); */ - //dbg("TXSTAT%02X!\n", txstat); + //winfo("TXSTAT%02X!\n", txstat); #warning TODO report errors UNUSED(txstat); @@ -1159,7 +1159,7 @@ static int mrf24j40_rxenable(FAR struct ieee802154_dev_s *ieee, bool state, { FAR struct mrf24j40_dev_s *dev = (FAR struct mrf24j40_dev_s *)ieee; uint8_t reg; - + if (state) { mrf24j40_pacontrol(dev, MRF24J40_PA_AUTO); @@ -1193,7 +1193,7 @@ static void mrf24j40_irqwork_rx(FAR struct mrf24j40_dev_s *dev) uint32_t index; uint8_t reg; - /*dbg("!\n");*/ + /*winfo("!\n");*/ /* Disable rx int */ @@ -1209,7 +1209,7 @@ static void mrf24j40_irqwork_rx(FAR struct mrf24j40_dev_s *dev) addr = 0x80000300; dev->ieee.rxbuf->len = mrf24j40_getreg(dev->spi, addr++); - /*dbg("len %3d\n", dev->ieee.rxbuf->len);*/ + /*winfo("len %3d\n", dev->ieee.rxbuf->len);*/ for (index = 0; index < dev->ieee.rxbuf->len; index++) { @@ -1264,7 +1264,7 @@ static void mrf24j40_irqworker(FAR void *arg) /* Read and store INTSTAT - this clears the register. */ intstat = mrf24j40_getreg(dev->spi, MRF24J40_INTSTAT); -// dbg("INT%02X\n", intstat); +// winfo("INT%02X\n", intstat); /* Do work according to the pending interrupts */ @@ -1375,7 +1375,7 @@ FAR struct ieee802154_dev_s *mrf24j40_init(FAR struct spi_dev_s *spi, dev->lower = lower; dev->spi = spi; - + mrf24j40_initialize(dev); mrf24j40_setchannel(&dev->ieee, 11); diff --git a/drivers/wireless/nrf24l01.c b/drivers/wireless/nrf24l01.c index eb6c3f68c8b8bbeae5feef301d42931d0a7954e1..ff79034ad68caa7160ad8836d876d5b471c1f9d9 100644 --- a/drivers/wireless/nrf24l01.c +++ b/drivers/wireless/nrf24l01.c @@ -495,7 +495,7 @@ static int nrf24l01_irqhandler(int irq, FAR void *context) { FAR struct nrf24l01_dev_s *dev = g_nrf24l01dev; - wllvdbg("*IRQ*"); + winfo("*IRQ*"); #ifdef CONFIG_WL_NRF24L01_RXSUPPORT @@ -551,7 +551,7 @@ static void nrf24l01_worker(FAR void *arg) bool ce = nrf24l01_chipenable(dev, false); - wdbg("RX_DR is set!\n"); + winfo("RX_DR is set!\n"); /* Read and store all received payloads */ @@ -586,8 +586,8 @@ static void nrf24l01_worker(FAR void *arg) status = nrf24l01_readreg(dev, NRF24L01_FIFO_STATUS, &fifo_status, 1); - wdbg("FIFO_STATUS=%02x\n", fifo_status); - wdbg("STATUS=%02x\n", status); + winfo("FIFO_STATUS=%02x\n", fifo_status); + winfo("STATUS=%02x\n", status); } while (!(fifo_status | NRF24L01_RX_EMPTY)); @@ -604,7 +604,7 @@ static void nrf24l01_worker(FAR void *arg) { dev->pfd->revents |= POLLIN; /* Data available for input */ - wvdbg("Wake up polled fd"); + winfo("Wake up polled fd"); sem_post(dev->pfd->sem); } #endif @@ -720,11 +720,11 @@ static int dosend(FAR struct nrf24l01_dev_s *dev, FAR const uint8_t *data, size_ dev->lastxmitcount = (obsvalue & NRF24L01_ARC_CNT_MASK) >> NRF24L01_ARC_CNT_SHIFT; - wvdbg("Transmission OK (lastxmitcount=%d)\n", dev->lastxmitcount); + winfo("Transmission OK (lastxmitcount=%d)\n", dev->lastxmitcount); } else if (status & NRF24L01_MAX_RT) { - wvdbg("MAX_RT!\n", dev->lastxmitcount); + winfo("MAX_RT!\n", dev->lastxmitcount); result = -ECOMM; dev->lastxmitcount = NRF24L01_XMIT_MAXRT; @@ -736,7 +736,7 @@ static int dosend(FAR struct nrf24l01_dev_s *dev, FAR const uint8_t *data, size_ { /* Unexpected... */ - wdbg("No TX_DS nor MAX_RT bit set in STATUS reg!\n"); + werr("ERROR: No TX_DS nor MAX_RT bit set in STATUS reg!\n"); result = -EIO; } @@ -758,7 +758,7 @@ static int nrf24l01_open(FAR struct file *filep) FAR struct nrf24l01_dev_s *dev; int result; - wvdbg("Opening nRF24L01 dev\n"); + winfo("Opening nRF24L01 dev\n"); DEBUGASSERT(filep); inode = filep->f_inode; @@ -800,7 +800,7 @@ static int nrf24l01_close(FAR struct file *filep) FAR struct inode *inode; FAR struct nrf24l01_dev_s *dev; - wvdbg("Closing nRF24L01 dev\n"); + winfo("Closing nRF24L01 dev\n"); DEBUGASSERT(filep); inode = filep->f_inode; @@ -885,7 +885,7 @@ static int nrf24l01_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR struct nrf24l01_dev_s *dev; int result = OK; - wvdbg("cmd: %d arg: %ld\n", cmd, arg); + winfo("cmd: %d arg: %ld\n", cmd, arg); DEBUGASSERT(filep); inode = filep->f_inode; @@ -1117,7 +1117,7 @@ static int nrf24l01_poll(FAR struct file *filep, FAR struct pollfd *fds, FAR struct nrf24l01_dev_s *dev; int result = OK; - wvdbg("setup: %d\n", (int)setup); + winfo("setup: %d\n", (int)setup); DEBUGASSERT(filep && fds); inode = filep->f_inode; @@ -1252,12 +1252,12 @@ int nrf24l01_register(FAR struct spi_dev_s *spi, FAR struct nrf24l01_config_s *c /* Register the device as an input device */ - ivdbg("Registering " DEV_NAME "\n"); + iinfo("Registering " DEV_NAME "\n"); result = register_driver(DEV_NAME, &nrf24l01_fops, 0666, dev); if (result < 0) { - wdbg("register_driver() failed: %d\n", result); + werr("ERROR: register_driver() failed: %d\n", result); nrf24l01_unregister(dev); } @@ -1658,7 +1658,7 @@ int nrf24l01_sendto(FAR struct nrf24l01_dev_s *dev, FAR const uint8_t *data, if ((dev->en_aa & 1) && (memcmp(destaddr, dev->pipe0addr, dev->addrlen))) { - wdbg("Change pipe #0 addr to dest addr\n"); + winfo("Change pipe #0 addr to dest addr\n"); nrf24l01_writereg(dev, NRF24L01_RX_ADDR_P0, destaddr, NRF24L01_MAX_ADDR_LEN); pipeaddrchg = true; } @@ -1670,7 +1670,7 @@ int nrf24l01_sendto(FAR struct nrf24l01_dev_s *dev, FAR const uint8_t *data, /* Restore pipe #0 addr */ nrf24l01_writereg(dev, NRF24L01_RX_ADDR_P0, dev->pipe0addr, NRF24L01_MAX_ADDR_LEN); - wdbg("Pipe #0 default addr restored\n"); + winfo("Pipe #0 default addr restored\n"); } nrf24l01_unlock(dev->spi); diff --git a/drivers/wireless/pn532.c b/drivers/wireless/pn532.c index 0f171950de9f995be69e5323f203add6ef931a1b..e9bf42737c3dc5469e9fd7591f6f49ea1cf9a1b7 100644 --- a/drivers/wireless/pn532.c +++ b/drivers/wireless/pn532.c @@ -57,23 +57,26 @@ ****************************************************************************/ #ifdef CONFIG_WL_PN532_DEBUG -# define pn532dbg dbg +# define pn532err _err +# define pn532info _info #else # ifdef CONFIG_CPP_HAVE_VARARGS -# define pn532dbg(x...) +# define pn532err(x...) +# define pn532info(x...) # else -# define pn532dbg (void) +# define pn532err (void) +# define pn532info (void) # endif #endif #ifdef CONFIG_WL_PN532_DEBUG_TX -# define tracetx dbgdumpbuffer +# define tracetx errdumpbuffer #else # define tracetx(x...) #endif #ifdef CONFIG_WL_PN532_DEBUG_RX -# define tracerx dbgdumpbuffer +# define tracerx errdumpbuffer #else # define tracerx(x...) #endif @@ -226,7 +229,8 @@ bool pn532_rx_frame_is_valid(struct pn532_frame *f, bool check_data) if (f->start_code != PN532_SOF) { - pn532dbg("Frame startcode 0x%X != 0x%X\n", PN532_SOF, f->start_code); + pn532err("ERROR: Frame startcode 0x%X != 0x%X\n", + PN532_SOF, f->start_code); return false; } @@ -238,7 +242,7 @@ bool pn532_rx_frame_is_valid(struct pn532_frame *f, bool check_data) chk = pn532_checksum(f->len); if (chk != f->lcs) { - pn532dbg("Frame data len checksum failed"); + pn532err("ERROR: Frame data len checksum failed"); return false; } @@ -247,7 +251,8 @@ bool pn532_rx_frame_is_valid(struct pn532_frame *f, bool check_data) chk = pn532_data_checksum(&f->tfi, f->len); if (chk != f->data[f->len-1]) { - pn532dbg("Frame data checksum failed: calc=0x%X != 0x%X", chk, f->data[f->len-1]); + pn532err("ERROR: Frame data checksum failed: calc=0x%X != 0x%X", + chk, f->data[f->len-1]); return false; } } @@ -303,7 +308,7 @@ static int pn532_wait_rx_ready(struct pn532_dev_s *dev, int timeout) { if (--timeout == 0x00) { - pn532dbg("wait RX timeout!\n"); + pn532err("ERROR: wait RX timeout!\n"); return -ETIMEDOUT; } @@ -414,7 +419,7 @@ int pn532_read_ack(struct pn532_dev_s *dev) } else { - pn532dbg("ACK NOK"); + pn532info("ACK NOK"); res = 0; } @@ -460,7 +465,7 @@ int pn532_write_frame(struct pn532_dev_s *dev, struct pn532_frame *f) { if (!pn532_read_ack(dev)) { - pn532dbg("command FAILED\n"); + pn532err("ERROR: command FAILED\n"); res = -EIO; } } @@ -490,7 +495,7 @@ int pn532_read_frame(struct pn532_dev_s *dev, struct pn532_frame *f, int max_siz /* TODO: optimize frame integrity check... * pn532_data_checksum(&f.tfi, f->len); - * dbgdumpbuffer("RX Frame:", f, f->len+6); + * errdumpbuffer("RX Frame:", f, f->len+6); */ if (pn532_rx_frame_is_valid(f, true)) @@ -580,8 +585,8 @@ int pn532_get_fw_version(struct pn532_dev_s *dev, if (f->data[0] == PN532_COMMAND_GETFIRMWAREVERSION + 1) { fw = (struct pn_firmware_version*) &f->data[1]; - pn532dbg("FW: %d.%d on IC:0x%X (Features: 0x%X)\n", - fw->ver, fw->rev, fw->ic, fw->support); + pn532info("FW: %d.%d on IC:0x%X (Features: 0x%X)\n", + fw->ver, fw->rev, fw->ic, fw->support); if (fv) { memcpy(fv, fw, sizeof(struct pn_firmware_version)); @@ -611,7 +616,7 @@ int pn532_write_gpio(struct pn532_dev_s *dev, uint8_t p3, uint8_t p7) { pn532_read(dev, cmd_buffer, 10); tracetx("Resp:", cmd_buffer, 10); - pn532dbg("TFI=%x, data0=%X", f->tfi, f->data[0]); + pn532info("TFI=%x, data0=%X", f->tfi, f->data[0]); if ((f->tfi == PN532_PN532TOHOST) && (f->data[0] == PN532_COMMAND_WRITEGPIO+1)) { res = OK; @@ -723,15 +728,15 @@ uint32_t pn532_read_passive_target_id(struct pn532_dev_s *dev, uint8_t baudrate) if (r->nbtg == 1) { - pn532dbg("Found %d card(s)\n", r->nbtg); + pn532info("Found %d card(s)\n", r->nbtg); /* now supports only type_a cards * if (poll_mode == PN532_POLL_MOD_106KBPS_A) */ struct pn_target_type_a *t = (struct pn_target_type_a *) &r->target_data; - pn532dbg("sens:0x%x sel:0x%x", t->sens_res, t->sel_res); - pn532dbg("idlen:0x%x ", t->nfcid_len); + pn532info("sens:0x%x sel:0x%x", t->sens_res, t->sel_res); + pn532info("idlen:0x%x ", t->nfcid_len); /* generate 32bit cid from id (could be longer) * HACK: Using only top 4 bytes. @@ -817,7 +822,7 @@ static int irq_handler(int irq, FAR void *context) (void) irq; (void) context; - /* pn532dbg("*IRQ*\n"); */ + /* pn532info("*IRQ*\n"); */ /* work_queue(HPWORK, &g_dev->irq_work, pn532_worker, dev, 0); */ return OK; @@ -1064,7 +1069,7 @@ static int _ioctl(FAR struct file *filep, int cmd, unsigned long arg) break; default: - pn532dbg("Unrecognized cmd: %d\n", cmd); + pn532err("ERROR: Unrecognized cmd: %d\n", cmd); ret = -EINVAL; break; } @@ -1105,7 +1110,7 @@ int pn532_register(FAR const char *devpath, FAR struct spi_dev_s *spi, dev = (FAR struct pn532_dev_s *)kmm_malloc(sizeof(struct pn532_dev_s)); if (!dev) { - pn532dbg("Failed to allocate instance\n"); + pn532err("ERROR: Failed to allocate instance\n"); return -ENOMEM; } @@ -1123,7 +1128,7 @@ int pn532_register(FAR const char *devpath, FAR struct spi_dev_s *spi, ret = register_driver(devpath, &g_pn532fops, 0666, dev); if (ret < 0) { - pn532dbg("Failed to register driver: %d\n", ret); + pn532err("ERROR: Failed to register driver: %d\n", ret); kmm_free(dev); } diff --git a/fs/Kconfig b/fs/Kconfig index 150bbcdde99b7430173b233f859de51d5df52a4f..603d9a511522cdd6b0a5b0149041c638ac9cab29 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -21,7 +21,7 @@ config FS_AUTOMOUNTER config FS_AUTOMOUNTER_DEBUG bool "Auto-mounter debug" default n - depends on FS_AUTOMOUNTER && DEBUG + depends on FS_AUTOMOUNTER && DEBUG_FEATURES ---help--- Normally, the auto-mounter will generate debug output when sub-system level file system debug is enabled. This option will select debug @@ -74,45 +74,3 @@ source fs/binfs/Kconfig source fs/procfs/Kconfig source fs/unionfs/Kconfig source fs/hostfs/Kconfig - -comment "System Logging" - -config SYSLOG - bool "Advanced SYSLOG features" - default n - ---help--- - Enables generic system logging features. NOTE: This setting is not - required to enable system logging. If this feature is not enable - system logging will still be available and will log to the system - console (like printf()). This setting is required to enable - customization of the basic system loggin capability. - -config SYSLOG_TIMESTAMP - bool "Prepend timestamp to syslog message" - default n - ---help--- - Prepend timestamp to syslog message. - -if SYSLOG - -config SYSLOG_CHAR - bool "System log character device support" - default y - ---help--- - Enable the generic character device for the SYSLOG. The full path to the - SYSLOG device is provided by SYSLOG_DEVPATH. A valid character device (or - file) must exist at this path. It will by opened by syslog_initialize. - - Do not enable more than one SYSLOG device. - -config SYSLOG_DEVPATH - string "System log device" - default "/dev/syslog" - depends on SYSLOG_CHAR - ---help--- - The full path to the system logging device. For the RAMLOG SYSLOG device, - this is normally "/dev/ramlog". For character SYSLOG devices, it should be - some other existing character device (or file) supported by the configuration - (such as "/dev/ttyS1")/ - -endif diff --git a/fs/aio/aio_fsync.c b/fs/aio/aio_fsync.c index 8070817595b18f0b7d5e53bb576cc47b8fa1c244..fd08328db459d228083e1da2dc7a3de14f778f42 100644 --- a/fs/aio/aio_fsync.c +++ b/fs/aio/aio_fsync.c @@ -100,7 +100,7 @@ static void aio_fsync_worker(FAR void *arg) if (ret < 0) { int errcode = get_errno(); - fdbg("ERROR: fsync failed: %d\n", errcode); + ferr("ERROR: fsync failed: %d\n", errcode); DEBUGASSERT(errcode > 0); aiocbp->aio_result = -errcode; } diff --git a/fs/aio/aio_read.c b/fs/aio/aio_read.c index b3e717b58bfbd99588010b0a31ece89e37eb2f3f..6d261ec7d8e6728931906821f58f90cd17b5957d 100644 --- a/fs/aio/aio_read.c +++ b/fs/aio/aio_read.c @@ -133,7 +133,7 @@ static void aio_read_worker(FAR void *arg) if (nread < 0) { int errcode = get_errno(); - fdbg("ERROR: pread failed: %d\n", errcode); + ferr("ERROR: pread failed: %d\n", errcode); DEBUGASSERT(errcode > 0); aiocbp->aio_result = -errcode; } diff --git a/fs/aio/aio_signal.c b/fs/aio/aio_signal.c index 5a279044c87aeec51f5a290f1e67b8ba684bab12..702d7f5b84f05e6283fa40ed8e8427115a1ba903 100644 --- a/fs/aio/aio_signal.c +++ b/fs/aio/aio_signal.c @@ -102,7 +102,7 @@ int aio_signal(pid_t pid, FAR struct aiocb *aiocbp) if (status < 0) { errcode = get_errno(); - fdbg("ERROR: sigqueue #1 failed: %d\n", errcode); + ferr("ERROR: sigqueue #1 failed: %d\n", errcode); ret = ERROR; } } @@ -115,7 +115,7 @@ int aio_signal(pid_t pid, FAR struct aiocb *aiocbp) ret = sig_notification(pid, &aiocbp->aio_sigevent); if (ret < 0) { - fdbg("ERROR: sig_notification failed: %d\n", ret); + ferr("ERROR: sig_notification failed: %d\n", ret); } } #endif @@ -133,7 +133,7 @@ int aio_signal(pid_t pid, FAR struct aiocb *aiocbp) if (status && ret == OK) { errcode = get_errno(); - fdbg("ERROR: sigqueue #2 failed: %d\n", errcode); + ferr("ERROR: sigqueue #2 failed: %d\n", errcode); ret = ERROR; } diff --git a/fs/aio/aio_write.c b/fs/aio/aio_write.c index e9ed46d81555f6483ce19909bb5dcb0ff4cb1c38..3d20b2dd93eee82aae2cfbf97fd0bda1d4081888 100644 --- a/fs/aio/aio_write.c +++ b/fs/aio/aio_write.c @@ -125,7 +125,7 @@ static void aio_write_worker(FAR void *arg) if (oflags < 0) { int errcode = get_errno(); - fdbg("ERROR: fcntl failed: %d\n", errcode); + ferr("ERROR: fcntl failed: %d\n", errcode); aiocbp->aio_result = -errcode; goto errout; } @@ -180,7 +180,7 @@ static void aio_write_worker(FAR void *arg) if (nwritten < 0) { int errcode = get_errno(); - fdbg("ERROR: write/pwrite failed: %d\n", errcode); + ferr("ERROR: write/pwrite failed: %d\n", errcode); DEBUGASSERT(errcode > 0); aiocbp->aio_result = -errcode; } diff --git a/fs/binfs/fs_binfs.c b/fs/binfs/fs_binfs.c index 959b3336dd2d12c1ba2daca454527f5332bf1af7..dd5b1a976f99d717c246b18118f62af90da99c50 100644 --- a/fs/binfs/fs_binfs.c +++ b/fs/binfs/fs_binfs.c @@ -138,7 +138,7 @@ static int binfs_open(FAR struct file *filep, FAR const char *relpath, { int index; - fvdbg("Open '%s'\n", relpath); + finfo("Open '%s'\n", relpath); /* BINFS is read-only. Any attempt to open with any kind of write * access is not permitted. @@ -146,7 +146,7 @@ static int binfs_open(FAR struct file *filep, FAR const char *relpath, if ((oflags & O_WRONLY) != 0 || (oflags & O_RDONLY) == 0) { - fdbg("ERROR: Only O_RDONLY supported\n"); + ferr("ERROR: Only O_RDONLY supported\n"); return -EACCES; } @@ -157,7 +157,7 @@ static int binfs_open(FAR struct file *filep, FAR const char *relpath, index = builtin_isavail(relpath); if (index < 0) { - fdbg("ERROR: Builting %s does not exist\n", relpath); + ferr("ERROR: Builting %s does not exist\n", relpath); return -ENOENT; } @@ -173,7 +173,7 @@ static int binfs_open(FAR struct file *filep, FAR const char *relpath, static int binfs_close(FAR struct file *filep) { - fvdbg("Closing\n"); + finfo("Closing\n"); return OK; } @@ -185,7 +185,7 @@ static ssize_t binfs_read(FAR struct file *filep, char *buffer, size_t buflen) { /* Reading is not supported. Just return end-of-file */ - fvdbg("Read %d bytes from offset %d\n", buflen, filep->f_pos); + finfo("Read %d bytes from offset %d\n", buflen, filep->f_pos); return 0; } @@ -197,7 +197,7 @@ static int binfs_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { int ret; - fvdbg("cmd: %d arg: %08lx\n", cmd, arg); + finfo("cmd: %d arg: %08lx\n", cmd, arg); /* Only one IOCTL command is supported */ @@ -237,7 +237,7 @@ static int binfs_ioctl(FAR struct file *filep, int cmd, unsigned long arg) static int binfs_dup(FAR const struct file *oldp, FAR struct file *newp) { - fvdbg("Dup %p->%p\n", oldp, newp); + finfo("Dup %p->%p\n", oldp, newp); /* Copy the index from the old to the new file structure */ @@ -256,7 +256,7 @@ static int binfs_dup(FAR const struct file *oldp, FAR struct file *newp) static int binfs_opendir(struct inode *mountpt, const char *relpath, struct fs_dirent_s *dir) { - fvdbg("relpath: \"%s\"\n", relpath ? relpath : "NULL"); + finfo("relpath: \"%s\"\n", relpath ? relpath : "NULL"); /* The requested directory must be the volume-relative "root" directory */ @@ -294,14 +294,14 @@ static int binfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir) * special error -ENOENT */ - fvdbg("Entry %d: End of directory\n", index); + finfo("Entry %d: End of directory\n", index); ret = -ENOENT; } else { /* Save the filename and file type */ - fvdbg("Entry %d: \"%s\"\n", index, name); + finfo("Entry %d: \"%s\"\n", index, name); dir->fd_dir.d_type = DTYPE_FILE; strncpy(dir->fd_dir.d_name, name, NAME_MAX+1); @@ -331,7 +331,7 @@ static int binfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir) static int binfs_rewinddir(struct inode *mountpt, struct fs_dirent_s *dir) { - fvdbg("Entry\n"); + finfo("Entry\n"); dir->u.binfs.fb_index = 0; return OK; @@ -351,7 +351,7 @@ static int binfs_rewinddir(struct inode *mountpt, struct fs_dirent_s *dir) static int binfs_bind(FAR struct inode *blkdriver, const void *data, void **handle) { - fvdbg("Entry\n"); + finfo("Entry\n"); return OK; } @@ -366,7 +366,7 @@ static int binfs_bind(FAR struct inode *blkdriver, const void *data, static int binfs_unbind(FAR void *handle, FAR struct inode **blkdriver, unsigned int flags) { - fvdbg("Entry\n"); + finfo("Entry\n"); return OK; } @@ -379,7 +379,7 @@ static int binfs_unbind(FAR void *handle, FAR struct inode **blkdriver, static int binfs_statfs(struct inode *mountpt, struct statfs *buf) { - fvdbg("Entry\n"); + finfo("Entry\n"); /* Fill in the statfs info */ @@ -402,7 +402,7 @@ static int binfs_statfs(struct inode *mountpt, struct statfs *buf) static int binfs_stat(struct inode *mountpt, const char *relpath, struct stat *buf) { - fvdbg("Entry\n"); + finfo("Entry\n"); /* The requested directory must be the volume-relative "root" directory */ diff --git a/fs/driver/Make.defs b/fs/driver/Make.defs index e280ea1580a68cfdd9ad15667b00fb6ad8dd5621..739e2e16f14ae5043c1973a88bb94c845e738709 100644 --- a/fs/driver/Make.defs +++ b/fs/driver/Make.defs @@ -50,14 +50,6 @@ CSRCS += fs_blockproxy.c endif endif -# System logging to a character device (or file) - -ifeq ($(CONFIG_SYSLOG),y) -ifeq ($(CONFIG_SYSLOG_CHAR),y) -CSRCS += fs_devsyslog.c -endif -endif - # Include driver build support DEPPATH += --dep-path driver diff --git a/fs/driver/fs_blockproxy.c b/fs/driver/fs_blockproxy.c index 197b5534a576d663c225650261f1e4c4a4d1167e..045110ac4048068c85c96769a2d203c46c9a29c6 100644 --- a/fs/driver/fs_blockproxy.c +++ b/fs/driver/fs_blockproxy.c @@ -174,7 +174,7 @@ int block_proxy(FAR const char *blkdev, int oflags) chardev = unique_chardev(); if (chardev == NULL) { - fdbg("ERROR: Failed to create temporary device name\n"); + ferr("ERROR: Failed to create temporary device name\n"); return -ENOMEM; } @@ -187,7 +187,7 @@ int block_proxy(FAR const char *blkdev, int oflags) ret = bchdev_register(blkdev, chardev, readonly); if (ret < 0) { - fdbg("ERROR: bchdev_register(%s, %s) failed: %d\n", + ferr("ERROR: bchdev_register(%s, %s) failed: %d\n", blkdev, chardev, ret); goto errout_with_chardev; @@ -200,7 +200,7 @@ int block_proxy(FAR const char *blkdev, int oflags) if (fd < 0) { ret = -errno; - fdbg("ERROR: Failed to open %s: %d\n", chardev, ret); + ferr("ERROR: Failed to open %s: %d\n", chardev, ret); goto errout_with_bchdev; } @@ -213,7 +213,7 @@ int block_proxy(FAR const char *blkdev, int oflags) if (ret < 0) { ret = -errno; - fdbg("ERROR: Failed to unlink %s: %d\n", chardev, ret); + ferr("ERROR: Failed to unlink %s: %d\n", chardev, ret); } /* Free the allocate character driver name and return the open file diff --git a/fs/driver/fs_closeblockdriver.c b/fs/driver/fs_closeblockdriver.c index 3280236af14fae96626768e7d8ddf910088b7214..7c9c60244d91bb04d416e87d6149136e22491e0f 100644 --- a/fs/driver/fs_closeblockdriver.c +++ b/fs/driver/fs_closeblockdriver.c @@ -72,7 +72,7 @@ int close_blockdriver(FAR struct inode *inode) /* Sanity checks */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!inode || !inode->u.i_bops) { ret = -EINVAL; @@ -84,7 +84,7 @@ int close_blockdriver(FAR struct inode *inode) if (!INODE_IS_BLOCK(inode)) { - fdbg("inode is not a block driver\n"); + ferr("ERROR: inode is not a block driver\n"); ret = -ENOTBLK; goto errout; } diff --git a/fs/driver/fs_findblockdriver.c b/fs/driver/fs_findblockdriver.c index 86b2c65a1582dceb38f20eb4e018da09a9e66105..8667beaef23eeb8cd350a642883e791a6ad0e08d 100644 --- a/fs/driver/fs_findblockdriver.c +++ b/fs/driver/fs_findblockdriver.c @@ -83,7 +83,7 @@ int find_blockdriver(FAR const char *pathname, int mountflags, FAR struct inode /* Sanity checks */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!pathname || !ppinode) { ret = -EINVAL; @@ -96,7 +96,7 @@ int find_blockdriver(FAR const char *pathname, int mountflags, FAR struct inode inode = inode_find(pathname, NULL); if (!inode) { - fdbg("Failed to find %s\n", pathname); + ferr("ERROR: Failed to find %s\n", pathname); ret = -ENOENT; goto errout; } @@ -105,7 +105,7 @@ int find_blockdriver(FAR const char *pathname, int mountflags, FAR struct inode if (!INODE_IS_BLOCK(inode)) { - fdbg("%s is not a block driver\n", pathname); + ferr("ERROR: %s is not a block driver\n", pathname); ret = -ENOTBLK; goto errout_with_inode; } @@ -115,7 +115,7 @@ int find_blockdriver(FAR const char *pathname, int mountflags, FAR struct inode if (!inode->u.i_bops || !inode->u.i_bops->read || (!inode->u.i_bops->write && (mountflags & MS_RDONLY) == 0)) { - fdbg("%s does not support requested access\n", pathname); + ferr("ERROR: %s does not support requested access\n", pathname); ret = -EACCES; goto errout_with_inode; } diff --git a/fs/driver/fs_openblockdriver.c b/fs/driver/fs_openblockdriver.c index 28527515759d6fdbf767c8cbc0ad35aa547ccd4b..9a42020bf787bbcfd0ecf03140e7dd6c27f9efa1 100644 --- a/fs/driver/fs_openblockdriver.c +++ b/fs/driver/fs_openblockdriver.c @@ -81,7 +81,7 @@ int open_blockdriver(FAR const char *pathname, int mountflags, /* Minimal sanity checks */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!ppinode) { ret = -EINVAL; @@ -96,7 +96,7 @@ int open_blockdriver(FAR const char *pathname, int mountflags, ret = find_blockdriver(pathname, mountflags, &inode); if (ret < 0) { - fdbg("Failed to file %s block driver\n", pathname); + ferr("ERROR: Failed to file %s block driver\n", pathname); goto errout; } @@ -110,7 +110,7 @@ int open_blockdriver(FAR const char *pathname, int mountflags, ret = inode->u.i_bops->open(inode); if (ret < 0) { - fdbg("%s driver open failed\n", pathname); + ferr("ERROR: %s driver open failed\n", pathname); goto errout_with_inode; } } diff --git a/fs/fat/fs_configfat.c b/fs/fat/fs_configfat.c index 8fe7c576f2a85183e7eddb16a0e8df55e3fabfd4..11fc358e2ee5b5b5d1a1f2e0fee4d851361f15c2 100644 --- a/fs/fat/fs_configfat.c +++ b/fs/fat/fs_configfat.c @@ -464,7 +464,7 @@ mkfatfs_tryfat12(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var, maxnclusters = FAT_MAXCLUST12; } - fvdbg("nfatsects=%u nclusters=%u (max=%u)\n", + finfo("nfatsects=%u nclusters=%u (max=%u)\n", config->fc_nfatsects, config->fc_nclusters, maxnclusters); /* Check if this number of clusters would overflow the maximum for @@ -473,7 +473,7 @@ mkfatfs_tryfat12(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var, if (config->fc_nclusters + 2 > maxnclusters) { - fdbg("Too many clusters for FAT12: %d > %d\n", + ferr("ERROR: Too many clusters for FAT12: %d > %d\n", config->fc_nclusters, maxnclusters - 2); return -ENFILE; @@ -535,7 +535,7 @@ mkfatfs_tryfat16(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var, maxnclusters = FAT_MAXCLUST16; } - fvdbg("nfatsects=%u nclusters=%u (min=%u max=%u)\n", + finfo("nfatsects=%u nclusters=%u (min=%u max=%u)\n", config->fc_nfatsects, config->fc_nclusters, FAT_MINCLUST16, maxnclusters); @@ -550,7 +550,7 @@ mkfatfs_tryfat16(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var, if ((config->fc_nclusters + 2 > maxnclusters) || (config->fc_nclusters < FAT_MINCLUST16)) { - fdbg("Too few or too many clusters for FAT16: %d < %d < %d\n", + ferr("ERROR: Too few or too many clusters for FAT16: %d < %d < %d\n", FAT_MINCLUST16, config->fc_nclusters, maxnclusters - 2); return -ENFILE; @@ -612,7 +612,7 @@ mkfatfs_tryfat32(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var, maxnclusters = FAT_MAXCLUST32; } - fvdbg("nfatsects=%u nclusters=%u (max=%u)\n", + finfo("nfatsects=%u nclusters=%u (max=%u)\n", config->fc_nfatsects, config->fc_nclusters, maxnclusters); /* Check if this number of clusters would overflow the maximum for @@ -622,7 +622,7 @@ mkfatfs_tryfat32(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var, if ((config->fc_nclusters + 3 > maxnclusters) || (config->fc_nclusters < FAT_MINCLUST32)) { - fdbg("Too few or too many clusters for FAT32: %d < %d < %d\n", + ferr("ERROR: Too few or too many clusters for FAT32: %d < %d < %d\n", FAT_MINCLUST32, config->fc_nclusters, maxnclusters - 3); return -ENFILE; @@ -654,7 +654,7 @@ mkfatfs_selectfat(int fattype, FAR struct fat_format_s *fmt, { /* Return the appropriate information about the selected file system. */ - fvdbg("Selected FAT%d\n", fattype); + finfo("Selected FAT%d\n", fattype); var->fv_fattype = fattype; var->fv_nclusters = config->fc_nclusters; @@ -696,7 +696,7 @@ mkfatfs_clustersearch(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var) if (fmt->ff_rsvdseccount < 2) { - fdbg("At least 2 reserved sectors needed by FAT32\n"); + ferr("ERROR: At least 2 reserved sectors needed by FAT32\n"); fatconfig32.fc_rsvdseccount = 2; } else @@ -745,7 +745,7 @@ mkfatfs_clustersearch(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var) do { - fvdbg("Configuring with %d sectors/cluster...\n", + finfo("Configuring with %d sectors/cluster...\n", 1 << fmt->ff_clustshift); /* Check if FAT12 has not been excluded */ @@ -756,7 +756,7 @@ mkfatfs_clustersearch(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var) if (mkfatfs_tryfat12(fmt, var, &fatconfig12) != 0) { - fdbg("Cannot format FAT12 at %u sectors/cluster\n", + ferr("ERROR: Cannot format FAT12 at %u sectors/cluster\n", 1 << fmt->ff_clustshift); fatconfig12.fc_nfatsects = 0; @@ -772,7 +772,7 @@ mkfatfs_clustersearch(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var) if (mkfatfs_tryfat16(fmt, var, &fatconfig16) != 0) { - fdbg("Cannot format FAT16 at %u sectors/cluster\n", + ferr("ERROR: Cannot format FAT16 at %u sectors/cluster\n", 1 << fmt->ff_clustshift); fatconfig16.fc_nfatsects = 0; @@ -828,7 +828,7 @@ mkfatfs_clustersearch(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var) if (mkfatfs_tryfat32(fmt, var, &fatconfig32) != 0) { - fdbg("Cannot format FAT32 at %u sectors/cluster\n", + ferr("ERROR: Cannot format FAT32 at %u sectors/cluster\n", 1 << fmt->ff_clustshift); fatconfig32.fc_nfatsects = 0; @@ -897,7 +897,7 @@ int mkfatfs_configfatfs(FAR struct fat_format_s *fmt, ret = mkfatfs_clustersearch(fmt, var); if (ret < 0) { - fdbg("ERROR: Failed to set cluster size\n"); + ferr("ERROR: Failed to set cluster size\n"); return ret; } @@ -940,7 +940,7 @@ int mkfatfs_configfatfs(FAR struct fat_format_s *fmt, if (fmt->ff_backupboot <= 1 || fmt->ff_backupboot >= fmt->ff_rsvdseccount) { - fdbg("Invalid backup boot sector: %d\n", fmt->ff_backupboot); + ferr("ERROR: Invalid backup boot sector: %d\n", fmt->ff_backupboot); fmt->ff_backupboot = 0; } @@ -973,22 +973,22 @@ int mkfatfs_configfatfs(FAR struct fat_format_s *fmt, /* Describe the configured filesystem */ -#ifdef CONFIG_DEBUG - fdbg("Sector size: %d bytes\n", var->fv_sectorsize); - fdbg("Number of sectors: %d sectors\n", fmt->ff_nsectors); - fdbg("FAT size: %d bits\n", var->fv_fattype); - fdbg("Number FATs: %d\n", fmt->ff_nfats); - fdbg("Sectors per cluster: %d sectors\n", 1 << fmt->ff_clustshift); - fdbg("FS size: %d sectors\n", var->fv_nfatsects); - fdbg(" %d clusters\n", var->fv_nclusters); +#ifdef CONFIG_DEBUG_FEATURES + finfo("Sector size: %d bytes\n", var->fv_sectorsize); + finfo("Number of sectors: %d sectors\n", fmt->ff_nsectors); + finfo("FAT size: %d bits\n", var->fv_fattype); + finfo("Number FATs: %d\n", fmt->ff_nfats); + finfo("Sectors per cluster: %d sectors\n", 1 << fmt->ff_clustshift); + finfo("FS size: %d sectors\n", var->fv_nfatsects); + finfo(" %d clusters\n", var->fv_nclusters); if (var->fv_fattype != 32) { - fdbg("Root directory slots: %d\n", fmt->ff_rootdirentries); + finfo("Root directory slots: %d\n", fmt->ff_rootdirentries); } - fdbg("Volume ID: %08x\n", fmt->ff_volumeid); - fdbg("Volume Label: \"%c%c%c%c%c%c%c%c%c%c%c\"\n", + finfo("Volume ID: %08x\n", fmt->ff_volumeid); + finfo("Volume Label: \"%c%c%c%c%c%c%c%c%c%c%c\"\n", fmt->ff_volumelabel[0], fmt->ff_volumelabel[1], fmt->ff_volumelabel[2], fmt->ff_volumelabel[3], fmt->ff_volumelabel[4], fmt->ff_volumelabel[5], fmt->ff_volumelabel[6], fmt->ff_volumelabel[7], fmt->ff_volumelabel[8], diff --git a/fs/fat/fs_fat32.c b/fs/fat/fs_fat32.c index c9cf80be6e992f06696da2963d6ff68e5ec49b45..618aa22e2f3dadc6a6023fdd528bde66a1cffd33 100644 --- a/fs/fat/fs_fat32.c +++ b/fs/fat/fs_fat32.c @@ -624,7 +624,7 @@ fat_read_restart: if (ret == -EFAULT && !force_indirect) { - fdbg("DMA: read alignment error, restarting indirect\n"); + ferr("ERROR: DMA read alignment error, restarting indirect\n"); force_indirect = true; goto fat_read_restart; } @@ -884,7 +884,7 @@ fat_write_restart: if (ret == -EFAULT && !force_indirect) { - fdbg("DMA: write alignment error, restarting indirect\n"); + ferr("ERROR: DMA write alignment error, restarting indirect\n"); force_indirect = true; goto fat_write_restart; } @@ -1397,7 +1397,7 @@ static int fat_dup(FAR const struct file *oldp, FAR struct file *newp) FAR struct fat_file_s *newff; int ret; - fvdbg("Dup %p->%p\n", oldp, newp); + finfo("Dup %p->%p\n", oldp, newp); /* Sanity checks */ diff --git a/fs/fat/fs_fat32util.c b/fs/fat/fs_fat32util.c index 84f3b8eae7154cf9332d998cfcc8ec99b4cd2df0..a4ec2732cbc7810a995abc16762331ef416fc74a 100644 --- a/fs/fat/fs_fat32util.c +++ b/fs/fat/fs_fat32util.c @@ -121,7 +121,7 @@ static int fat_checkbootrecord(struct fat_mountpt_s *fs) if (MBR_GETSIGNATURE(fs->fs_buffer) != BOOT_SIGNATURE16 || MBR_GETBYTESPERSEC(fs->fs_buffer) != fs->fs_hwsectorsize) { - fdbg("ERROR: Signature: %04x FS sectorsize: %d HW sectorsize: %d\n", + ferr("ERROR: Signature: %04x FS sectorsize: %d HW sectorsize: %d\n", MBR_GETSIGNATURE(fs->fs_buffer), MBR_GETBYTESPERSEC(fs->fs_buffer), fs->fs_hwsectorsize); @@ -159,7 +159,7 @@ static int fat_checkbootrecord(struct fat_mountpt_s *fs) if (!fs->fs_nfatsects || fs->fs_nfatsects >= fs->fs_hwnsectors) { - fdbg("ERROR: fs_nfatsects %d fs_hwnsectors: %d\n", + ferr("ERROR: fs_nfatsects %d fs_hwnsectors: %d\n", fs->fs_nfatsects, fs->fs_hwnsectors); return -EINVAL; @@ -179,7 +179,7 @@ static int fat_checkbootrecord(struct fat_mountpt_s *fs) if (!fs->fs_fattotsec || fs->fs_fattotsec > fs->fs_hwnsectors) { - fdbg("ERROR: fs_fattotsec %d fs_hwnsectors: %d\n", + ferr("ERROR: fs_fattotsec %d fs_hwnsectors: %d\n", fs->fs_fattotsec, fs->fs_hwnsectors); return -EINVAL; @@ -190,7 +190,7 @@ static int fat_checkbootrecord(struct fat_mountpt_s *fs) fs->fs_fatresvdseccount = MBR_GETRESVDSECCOUNT(fs->fs_buffer); if (fs->fs_fatresvdseccount > fs->fs_hwnsectors) { - fdbg("ERROR: fs_fatresvdseccount %d fs_hwnsectors: %d\n", + ferr("ERROR: fs_fatresvdseccount %d fs_hwnsectors: %d\n", fs->fs_fatresvdseccount, fs->fs_hwnsectors); return -EINVAL; @@ -206,7 +206,7 @@ static int fat_checkbootrecord(struct fat_mountpt_s *fs) ndatasectors = fs->fs_fattotsec - fs->fs_fatresvdseccount - ntotalfatsects - rootdirsectors; if (ndatasectors > fs->fs_hwnsectors) { - fdbg("ERROR: ndatasectors %d fs_hwnsectors: %d\n", + ferr("ERROR: ndatasectors %d fs_hwnsectors: %d\n", ndatasectors, fs->fs_hwnsectors); return -EINVAL; @@ -239,7 +239,7 @@ static int fat_checkbootrecord(struct fat_mountpt_s *fs) } else { - fdbg("ERROR: notfat32: %d fs_nclusters: %d\n", + ferr("ERROR: notfat32: %d fs_nclusters: %d\n", notfat32, fs->fs_nclusters); return -EINVAL; @@ -573,11 +573,11 @@ int fat_mount(struct fat_mountpt_s *fs, bool writeable) */ uint8_t part = PART_GETTYPE(i, fs->fs_buffer); - fvdbg("Partition %d, offset %d, type %d\n", i, PART_ENTRY(i), part); + finfo("Partition %d, offset %d, type %d\n", i, PART_ENTRY(i), part); if (part == 0) { - fvdbg("No partition %d\n", i); + finfo("No partition %d\n", i); continue; } @@ -594,7 +594,7 @@ int fat_mount(struct fat_mountpt_s *fs, bool writeable) { /* Failed to read the sector */ - fdbg("ERROR: Failed to read sector %ld: %d\n", + ferr("ERROR: Failed to read sector %ld: %d\n", (long)fs->fs_fatbase, ret); continue; } @@ -606,24 +606,24 @@ int fat_mount(struct fat_mountpt_s *fs, bool writeable) { /* Break out of the loop if a valid boot record is found */ - fvdbg("MBR found in partition %d\n", i); + finfo("MBR found in partition %d\n", i); break; } /* Re-read sector 0 so that we can check the next partition */ - fvdbg("Partition %d is not an MBR\n", i); + finfo("Partition %d is not an MBR\n", i); ret = fat_hwread(fs, fs->fs_buffer, 0, 1); if (ret < 0) { - fdbg("ERROR: Failed to re-read sector 0: %d\n", ret); + ferr("ERROR: Failed to re-read sector 0: %d\n", ret); goto errout_with_buffer; } } if (i > 3) { - fdbg("No valid MBR\n"); + ferr("ERROR: No valid MBR\n"); ret = -EINVAL; goto errout_with_buffer; } @@ -644,22 +644,22 @@ int fat_mount(struct fat_mountpt_s *fs, bool writeable) /* We did it! */ - fdbg("FAT%d:\n", fs->fs_type == 0 ? 12 : fs->fs_type == 1 ? 16 : 32); - fdbg("\tHW sector size: %d\n", fs->fs_hwsectorsize); - fdbg("\t sectors: %d\n", fs->fs_hwnsectors); - fdbg("\tFAT reserved: %d\n", fs->fs_fatresvdseccount); - fdbg("\t sectors: %d\n", fs->fs_fattotsec); - fdbg("\t start sector: %d\n", fs->fs_fatbase); - fdbg("\t root sector: %d\n", fs->fs_rootbase); - fdbg("\t root entries: %d\n", fs->fs_rootentcnt); - fdbg("\t data sector: %d\n", fs->fs_database); - fdbg("\t FSINFO sector: %d\n", fs->fs_fsinfo); - fdbg("\t Num FATs: %d\n", fs->fs_fatnumfats); - fdbg("\t FAT sectors: %d\n", fs->fs_nfatsects); - fdbg("\t sectors/cluster: %d\n", fs->fs_fatsecperclus); - fdbg("\t max clusters: %d\n", fs->fs_nclusters); - fdbg("\tFSI free count %d\n", fs->fs_fsifreecount); - fdbg("\t next free %d\n", fs->fs_fsinextfree); + finfo("FAT%d:\n", fs->fs_type == 0 ? 12 : fs->fs_type == 1 ? 16 : 32); + finfo("\tHW sector size: %d\n", fs->fs_hwsectorsize); + finfo("\t sectors: %d\n", fs->fs_hwnsectors); + finfo("\tFAT reserved: %d\n", fs->fs_fatresvdseccount); + finfo("\t sectors: %d\n", fs->fs_fattotsec); + finfo("\t start sector: %d\n", fs->fs_fatbase); + finfo("\t root sector: %d\n", fs->fs_rootbase); + finfo("\t root entries: %d\n", fs->fs_rootentcnt); + finfo("\t data sector: %d\n", fs->fs_database); + finfo("\t FSINFO sector: %d\n", fs->fs_fsinfo); + finfo("\t Num FATs: %d\n", fs->fs_fatnumfats); + finfo("\t FAT sectors: %d\n", fs->fs_nfatsects); + finfo("\t sectors/cluster: %d\n", fs->fs_fatsecperclus); + finfo("\t max clusters: %d\n", fs->fs_nclusters); + finfo("\tFSI free count %d\n", fs->fs_fsifreecount); + finfo("\t next free %d\n", fs->fs_fsinextfree); return OK; @@ -1875,7 +1875,7 @@ int fat_currentsector(struct fat_mountpt_s *fs, struct fat_file_s *ff, ff->ff_sectorsincluster = fs->fs_fatsecperclus - sectoroffset; - fvdbg("position=%d currentsector=%d sectorsincluster=%d\n", + finfo("position=%d currentsector=%d sectorsincluster=%d\n", position, ff->ff_currentsector, ff->ff_sectorsincluster); return OK; diff --git a/fs/fat/fs_mkfatfs.c b/fs/fat/fs_mkfatfs.c index a1f17d737455d87cfabdc39c70da2472f8c27e71..75269a602ba6b943ec265fda45afd6e4b5f904c6 100644 --- a/fs/fat/fs_mkfatfs.c +++ b/fs/fat/fs_mkfatfs.c @@ -86,13 +86,13 @@ static inline int mkfatfs_getgeometry(FAR struct fat_format_s *fmt, ret = DEV_GEOMETRY(geometry); if (ret < 0) { - fdbg("ERROR: geometry() returned %d\n", ret); + ferr("ERROR: geometry() returned %d\n", ret); return ret; } if (!geometry.geo_available || !geometry.geo_writeenabled) { - fdbg("ERROR: Media is not available\n", ret); + ferr("ERROR: Media is not available\n", ret); return -ENODEV; } @@ -104,7 +104,7 @@ static inline int mkfatfs_getgeometry(FAR struct fat_format_s *fmt, { if (fmt->ff_nsectors > geometry.geo_nsectors) { - fdbg("ERROR: User maxblocks (%d) exceeds blocks on device (%d)\n", + ferr("ERROR: User maxblocks (%d) exceeds blocks on device (%d)\n", fmt->ff_nsectors, geometry.geo_nsectors); return -EINVAL; @@ -139,7 +139,7 @@ static inline int mkfatfs_getgeometry(FAR struct fat_format_s *fmt, break; default: - fdbg("ERROR: Unsupported sector size: %d\n", var->fv_sectorsize); + ferr("ERROR: Unsupported sector size: %d\n", var->fv_sectorsize); return -EPERM; } @@ -193,17 +193,17 @@ int mkfatfs(FAR const char *pathname, FAR struct fat_format_s *fmt) /* Verify format options (only when DEBUG enabled) */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!pathname) { - fdbg("ERROR: No block driver path\n"); + ferr("ERROR: No block driver path\n"); ret = -EINVAL; goto errout; } if (fmt->ff_nfats < 1 || fmt->ff_nfats > 4) { - fdbg("ERROR: Invalid number of fats: %d\n", fmt->ff_nfats); + ferr("ERROR: Invalid number of fats: %d\n", fmt->ff_nfats); ret = -EINVAL; goto errout; } @@ -211,7 +211,7 @@ int mkfatfs(FAR const char *pathname, FAR struct fat_format_s *fmt) if (fmt->ff_fattype != 0 && fmt->ff_fattype != 12 && fmt->ff_fattype != 16 && fmt->ff_fattype != 32) { - fdbg("ERROR: Invalid FAT size: %d\n", fmt->ff_fattype); + ferr("ERROR: Invalid FAT size: %d\n", fmt->ff_fattype); ret = -EINVAL; goto errout; } @@ -228,10 +228,10 @@ int mkfatfs(FAR const char *pathname, FAR struct fat_format_s *fmt) * means that we should autoselect the cluster sizel. */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (fmt->ff_clustshift > 7 && fmt->ff_clustshift != 0xff) { - fdbg("ERROR: Invalid cluster shift value: %d\n", fmt->ff_clustshift); + ferr("ERROR: Invalid cluster shift value: %d\n", fmt->ff_clustshift); ret = -EINVAL; goto errout; @@ -240,7 +240,7 @@ int mkfatfs(FAR const char *pathname, FAR struct fat_format_s *fmt) if (fmt->ff_rootdirentries != 0 && (fmt->ff_rootdirentries < 16 || fmt->ff_rootdirentries > 32767)) { - fdbg("ERROR: Invalid number of root dir entries: %d\n", + ferr("ERROR: Invalid number of root dir entries: %d\n", fmt->ff_rootdirentries); ret = -EINVAL; @@ -250,7 +250,7 @@ int mkfatfs(FAR const char *pathname, FAR struct fat_format_s *fmt) if (fmt->ff_rsvdseccount != 0 && (fmt->ff_rsvdseccount < 1 || fmt->ff_rsvdseccount > 32767)) { - fdbg("ERROR: Invalid number of reserved sectors: %d\n", + ferr("ERROR: Invalid number of reserved sectors: %d\n", fmt->ff_rsvdseccount); ret = -EINVAL; @@ -263,7 +263,7 @@ int mkfatfs(FAR const char *pathname, FAR struct fat_format_s *fmt) ret = open_blockdriver(pathname, 0, &var.fv_inode); if (ret < 0) { - fdbg("ERROR: Failed to open %s\n", pathname); + ferr("ERROR: Failed to open %s\n", pathname); goto errout; } @@ -271,7 +271,7 @@ int mkfatfs(FAR const char *pathname, FAR struct fat_format_s *fmt) if (!var.fv_inode->u.i_bops->write || !var.fv_inode->u.i_bops->geometry) { - fdbg("ERROR: %s does not support write or geometry methods\n", + ferr("ERROR: %s does not support write or geometry methods\n", pathname); ret = -EACCES; @@ -306,7 +306,7 @@ int mkfatfs(FAR const char *pathname, FAR struct fat_format_s *fmt) if (!var.fv_sect) { - fdbg("ERROR: Failed to allocate working buffers\n"); + ferr("ERROR: Failed to allocate working buffers\n"); goto errout_with_driver; } diff --git a/fs/inode/fs_filedetach.c b/fs/inode/fs_filedetach.c index 8b13250cbc110e251ea8d02dadd89d12d20b4791..b865e03b4a1411ba9de498cf48b677c11c509281 100644 --- a/fs/inode/fs_filedetach.c +++ b/fs/inode/fs_filedetach.c @@ -84,7 +84,7 @@ static inline void _files_semtake(FAR struct filelist *list) * Name: file_detach * * Description: - * This function is used to device drivers to create a task-independent + * This function is used in 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. diff --git a/fs/inode/fs_files.c b/fs/inode/fs_files.c index 7c4665640e54465e3bd375c3beed91378bb232b2..1667130c932d5d429565d337f9f68045641b5c35 100644 --- a/fs/inode/fs_files.c +++ b/fs/inode/fs_files.c @@ -196,12 +196,12 @@ int file_dup2(FAR struct file *filep1, FAR struct file *filep2) { FAR struct filelist *list; FAR struct inode *inode; - int err; + int errcode; int ret; if (!filep1 || !filep1->f_inode || !filep2) { - err = EBADF; + errcode = EBADF; goto errout; } @@ -287,7 +287,7 @@ errout_with_inode: filep2->f_inode = NULL; errout_with_ret: - err = -ret; + errcode = -ret; if (list != NULL) { @@ -295,7 +295,7 @@ errout_with_ret: } errout: - set_errno(err); + set_errno(errcode); return ERROR; } diff --git a/fs/inode/inode.h b/fs/inode/inode.h index 089bf67234429b22d8f4251ade6af8a103521ad2..f909d74ef1704ce5cbfd338d976e12ad6530aa30 100644 --- a/fs/inode/inode.h +++ b/fs/inode/inode.h @@ -49,55 +49,6 @@ #include #include -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Inode i_flag values */ - -#define FSNODEFLAG_TYPE_MASK 0x00000007 /* Isolates type field */ -#define FSNODEFLAG_TYPE_DRIVER 0x00000000 /* Character driver */ -#define FSNODEFLAG_TYPE_BLOCK 0x00000001 /* Block driver */ -#define FSNODEFLAG_TYPE_MOUNTPT 0x00000002 /* Mount point */ -#define FSNODEFLAG_TYPE_SPECIAL 0x00000004 /* Special OS type */ -#define FSNODEFLAG_TYPE_NAMEDSEM 0x00000004 /* Named semaphore */ -#define FSNODEFLAG_TYPE_MQUEUE 0x00000005 /* Message Queue */ -#define FSNODEFLAG_TYPE_SHM 0x00000006 /* Shared memory region */ -#define FSNODEFLAG_DELETED 0x00000008 /* Unlinked */ - -#define INODE_IS_TYPE(i,t) \ - (((i)->i_flags & FSNODEFLAG_TYPE_MASK) == (t)) -#define INODE_IS_SPECIAL(i) \ - (((i)->i_flags & FSNODEFLAG_TYPE_SPECIAL) != 0) - -#define INODE_IS_DRIVER(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_DRIVER) -#define INODE_IS_BLOCK(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_BLOCK) -#define INODE_IS_MOUNTPT(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_MOUNTPT) -#define INODE_IS_NAMEDSEM(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_NAMEDSEM) -#define INODE_IS_MQUEUE(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_MQUEUE) -#define INODE_IS_SHM(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_SHM) - -#define INODE_GET_TYPE(i) ((i)->i_flags & FSNODEFLAG_TYPE_MASK) -#define INODE_SET_TYPE(i,t) \ - do \ - { \ - (i)->i_flags = ((i)->i_flags & ~FSNODEFLAG_TYPE_MASK) | (t); \ - } \ - while (0) - -#define INODE_SET_DRIVER(i) INODE_SET_TYPE(i,FSNODEFLAG_TYPE_DRIVER) -#define INODE_SET_BLOCK(i) INODE_SET_TYPE(i,FSNODEFLAG_TYPE_BLOCK) -#define INODE_SET_MOUNTPT(i) INODE_SET_TYPE(i,FSNODEFLAG_TYPE_MOUNTPT) -#define INODE_SET_NAMEDSEM(i) INODE_SET_TYPE(i,FSNODEFLAG_TYPE_NAMEDSEM) -#define INODE_SET_MQUEUE(i) INODE_SET_TYPE(i,FSNODEFLAG_TYPE_MQUEUE) -#define INODE_SET_SHM(i) INODE_SET_TYPE(i,FSNODEFLAG_TYPE_SHM) - -/* Mountpoint fd_flags values */ - -#define DIRENTFLAGS_PSEUDONODE 1 - -#define DIRENT_SETPSEUDONODE(f) do (f) |= DIRENTFLAGS_PSEUDONODE; while (0) -#define DIRENT_ISPSEUDONODE(f) (((f) & DIRENTFLAGS_PSEUDONODE) != 0) - /**************************************************************************** * Public Types ****************************************************************************/ @@ -129,7 +80,6 @@ EXTERN FAR struct inode *g_root_inode; * Public Function Prototypes ****************************************************************************/ -/* fs_inode.c ***************************************************************/ /**************************************************************************** * Name: inode_initialize * @@ -199,7 +149,6 @@ void inode_free(FAR struct inode *node); const char *inode_nextname(FAR const char *name); -/* fs_inodereserver.c *******************************************************/ /**************************************************************************** * Name: inode_reserve * @@ -224,7 +173,6 @@ const char *inode_nextname(FAR const char *name); int inode_reserve(FAR const char *path, FAR struct inode **inode); -/* fs_inoderemove.c *********************************************************/ /**************************************************************************** * Name: inode_unlink * @@ -256,7 +204,6 @@ FAR struct inode *inode_unlink(FAR const char *path); int inode_remove(FAR const char *path); -/* fs_inodefind.c ***********************************************************/ /**************************************************************************** * Name: inode_find * @@ -268,15 +215,27 @@ int inode_remove(FAR const char *path); FAR struct inode *inode_find(FAR const char *path, const char **relpath); -/* fs_inodeaddref.c *********************************************************/ +/**************************************************************************** + * Name: inode_addref + * + * Description: + * Increment the reference count on an inode (as when a file descriptor + * is dup'ed). + * + ****************************************************************************/ void inode_addref(FAR struct inode *inode); -/* fs_inoderelease.c ********************************************************/ +/**************************************************************************** + * Name: inode_release + * + * Description: + * This is called from close() logic when it no longer refers to the inode. + * + ****************************************************************************/ void inode_release(FAR struct inode *inode); -/* fs_foreachinode.c ********************************************************/ /**************************************************************************** * Name: foreach_inode * @@ -295,7 +254,6 @@ void inode_release(FAR struct inode *inode); int foreach_inode(foreach_inode_t handler, FAR void *arg); -/* fs_files.c ***************************************************************/ /**************************************************************************** * Name: files_initialize * diff --git a/fs/mmap/fs_mmap.c b/fs/mmap/fs_mmap.c index 501db4028233a76b0d6b481ed8487c3585e0f1a6..1d8f88e7050148801bc4b25735f9736a3cbc8de7 100644 --- a/fs/mmap/fs_mmap.c +++ b/fs/mmap/fs_mmap.c @@ -131,18 +131,18 @@ FAR void *mmap(FAR void *start, size_t length, int prot, int flags, * things. */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (prot == PROT_NONE || (flags & (MAP_PRIVATE | MAP_FIXED | MAP_ANONYMOUS | MAP_DENYWRITE)) != 0) { - fdbg("Unsupported options, prot=%x flags=%04x\n", prot, flags); + ferr("ERROR: Unsupported options, prot=%x flags=%04x\n", prot, flags); set_errno(ENOSYS); return MAP_FAILED; } if (length == 0 || (flags & MAP_SHARED) == 0) { - fdbg("Invalid options, lengt=%d flags=%04x\n", length, flags); + ferr("ERROR: Invalid options, lengt=%d flags=%04x\n", length, flags); set_errno(EINVAL); return MAP_FAILED; } @@ -163,7 +163,7 @@ FAR void *mmap(FAR void *start, size_t length, int prot, int flags, #ifdef CONFIG_FS_RAMMAP return rammap(fd, length, offset); #else - fdbg("ioctl(FIOC_MMAP) failed: %d\n", get_errno()); + ferr("ERROR: ioctl(FIOC_MMAP) failed: %d\n", get_errno()); return MAP_FAILED; #endif } diff --git a/fs/mmap/fs_munmap.c b/fs/mmap/fs_munmap.c index 12b084d85b7d443585b4041c28ea9c4c61d5bf8a..56737971362d223f1c8ef63c2a4037c268782ab6 100644 --- a/fs/mmap/fs_munmap.c +++ b/fs/mmap/fs_munmap.c @@ -115,7 +115,7 @@ int munmap(FAR void *start, size_t length) FAR void *newaddr; unsigned int offset; int ret; - int err; + int errcode; /* Find a region containing this start and length in the list of regions */ @@ -143,8 +143,8 @@ int munmap(FAR void *start, size_t length) if (!curr) { - fdbg("Region not found\n"); - err = EINVAL; + ferr("ERROR: Region not found\n"); + errcode = EINVAL; goto errout_with_semaphore; } @@ -158,8 +158,8 @@ int munmap(FAR void *start, size_t length) offset = start - curr->addr; if (offset + length < curr->length) { - fdbg("Cannot umap without unmapping to the end\n"); - err = ENOSYS; + ferr("ERROR: Cannot umap without unmapping to the end\n"); + errcode = ENOSYS; goto errout_with_semaphore; } @@ -205,7 +205,7 @@ int munmap(FAR void *start, size_t length) errout_with_semaphore: sem_post(&g_rammaps.exclsem); - set_errno(err); + set_errno(errcode); return ERROR; } diff --git a/fs/mmap/fs_rammap.c b/fs/mmap/fs_rammap.c index 5f00032553bc95c27aafd64cfb1958cd48644116..5fe71478f5cc0e730f99fab975a5ff158fde607a 100644 --- a/fs/mmap/fs_rammap.c +++ b/fs/mmap/fs_rammap.c @@ -121,7 +121,7 @@ FAR void *rammap(int fd, size_t length, off_t offset) FAR uint8_t *rdbuffer; ssize_t nread; off_t fpos; - int err; + int errcode; int ret; /* There is a major design flaw that I have not yet thought of fix for: @@ -142,8 +142,8 @@ FAR void *rammap(int fd, size_t length, off_t offset) alloc = (FAR uint8_t *)kumm_malloc(sizeof(struct fs_rammap_s) + length); if (!alloc) { - fdbg("Region allocation failed, length: %d\n", (int)length); - err = ENOMEM; + ferr("ERROR: Region allocation failed, length: %d\n", (int)length); + errcode = ENOMEM; goto errout; } @@ -164,8 +164,8 @@ FAR void *rammap(int fd, size_t length, off_t offset) * the correct response. */ - fdbg("Seek to position %d failed\n", (int)offset); - err = EINVAL; + ferr("ERROR: Seek to position %d failed\n", (int)offset); + errcode = EINVAL; goto errout_with_region; } @@ -181,16 +181,17 @@ FAR void *rammap(int fd, size_t length, off_t offset) * signal. */ - err = get_errno(); - if (err != EINTR) + errcode = get_errno(); + if (errcode != EINTR) { /* All other read errors are bad. errno is already set. * (but maybe should be forced to EINVAL?). NOTE that if - * FS DEBUG is enabled, then the following fdbg() macro will + * FS DEBUG is enabled, then the following ferr() macro will * destroy the errno value. */ - fdbg("Read failed: offset=%d errno=%d\n", (int)offset, err); + ferr("ERROR: Read failed: offset=%d errno=%d\n", + (int)offset, errcode); #ifdef CONFIG_DEBUG_FS goto errout_with_region; #else @@ -234,7 +235,7 @@ FAR void *rammap(int fd, size_t length, off_t offset) errout_with_region: kumm_free(alloc); errout: - set_errno(err); + set_errno(errcode); return MAP_FAILED; errout_with_errno: diff --git a/fs/mount/fs_automount.c b/fs/mount/fs_automount.c index e0fea07881257c81b4184baa1630de3bdcfd6d18..1bee61d7f5a922a80cc3a2a64bdd859222deb040 100644 --- a/fs/mount/fs_automount.c +++ b/fs/mount/fs_automount.c @@ -191,7 +191,7 @@ static void automount_mount(FAR struct automounter_state_s *priv) FAR const struct automount_lower_s *lower = priv->lower; int ret; - fvdbg("Mounting %s\n", lower->mountpoint); + finfo("Mounting %s\n", lower->mountpoint); /* Check if the something is already mounted at the mountpoint. */ @@ -204,13 +204,13 @@ static void automount_mount(FAR struct automounter_state_s *priv) * try to unmount again because the mount might be stale. */ - fdbg("WARNING: Mountpoint %s already exists\n", lower->mountpoint); + fwarn("WARNING: Mountpoint %s already exists\n", lower->mountpoint); ret = automount_unmount(priv); if (ret < 0) { /* We failed to unmount (again?). Complain and abort. */ - fdbg("ERROR: automount_unmount failed: %d\n", ret); + ferr("ERROR: automount_unmount failed: %d\n", ret); return; } @@ -232,7 +232,7 @@ static void automount_mount(FAR struct automounter_state_s *priv) int errcode = get_errno(); DEBUGASSERT(errcode > 0); - fdbg("ERROR: Mount failed: %d\n", errcode); + ferr("ERROR: Mount failed: %d\n", errcode); UNUSED(errcode); return; } @@ -243,7 +243,7 @@ static void automount_mount(FAR struct automounter_state_s *priv) break; default: - fdbg("ERROR: automount_findinode failed: %d\n", ret); + ferr("ERROR: automount_findinode failed: %d\n", ret); break; } } @@ -268,7 +268,7 @@ static int automount_unmount(FAR struct automounter_state_s *priv) FAR const struct automount_lower_s *lower = priv->lower; int ret; - fvdbg("Unmounting %s\n", lower->mountpoint); + finfo("Unmounting %s\n", lower->mountpoint); /* Check if the something is already mounted at the mountpoint. */ @@ -295,7 +295,7 @@ static int automount_unmount(FAR struct automounter_state_s *priv) if (errcode == EBUSY) { - fvdbg("WARNING: Volume is busy, try again later\n"); + finfo("WARNING: Volume is busy, try again later\n"); /* Start a timer to retry the umount2 after a delay */ @@ -306,7 +306,7 @@ static int automount_unmount(FAR struct automounter_state_s *priv) errcode = get_errno(); DEBUGASSERT(errcode > 0); - fdbg("ERROR: wd_start failed: %d\n", errcode); + ferr("ERROR: wd_start failed: %d\n", errcode); return -ret; } } @@ -315,7 +315,7 @@ static int automount_unmount(FAR struct automounter_state_s *priv) else { - fvdbg("ERROR: umount2 failed: %d\n", errcode); + ferr("ERROR: umount2 failed: %d\n", errcode); return -errcode; } } @@ -332,7 +332,7 @@ static int automount_unmount(FAR struct automounter_state_s *priv) return OK; default: - fdbg("ERROR: automount_findinode failed: %d\n", ret); + ferr("ERROR: automount_findinode failed: %d\n", ret); return ret; } } @@ -363,7 +363,7 @@ static void automount_timeout(int argc, uint32_t arg1, ...) (FAR struct automounter_state_s *)((uintptr_t)arg1); int ret; - fllvdbg("Timeout!\n"); + finfo("Timeout!\n"); DEBUGASSERT(argc == 1 && priv); /* Check the state of things. This timeout at the interrupt level and @@ -372,7 +372,7 @@ static void automount_timeout(int argc, uint32_t arg1, ...) * there should be no pending work. */ - fllvdbg("inserted=%d\n", priv->inserted); + finfo("inserted=%d\n", priv->inserted); DEBUGASSERT(!priv->inserted && work_available(&priv->work)); /* Queue work to occur immediately. */ @@ -382,7 +382,7 @@ static void automount_timeout(int argc, uint32_t arg1, ...) { /* NOTE: Currently, work_queue only returns success */ - fdbg("ERROR: Failed to schedule work: %d\n", ret); + ferr("ERROR: Failed to schedule work: %d\n", ret); } } @@ -463,7 +463,7 @@ static int automount_interrupt(FAR const struct automount_lower_s *lower, DEBUGASSERT(lower && priv && priv->lower == lower); - fllvdbg("inserted=%d\n", inserted); + finfo("inserted=%d\n", inserted); /* Cancel any pending work. We could get called multiple times if, for * example there is bounce in the detection mechanism. Work is performed @@ -475,7 +475,7 @@ static int automount_interrupt(FAR const struct automount_lower_s *lower, { /* NOTE: Currently, work_cancel only returns success */ - fdbg("ERROR: Failed to cancel work: %d\n", ret); + ferr("ERROR: Failed to cancel work: %d\n", ret); } /* Set the media insertion/removal state */ @@ -496,7 +496,7 @@ static int automount_interrupt(FAR const struct automount_lower_s *lower, { /* NOTE: Currently, work_queue only returns success */ - fdbg("ERROR: Failed to schedule work: %d\n", ret); + ferr("ERROR: Failed to schedule work: %d\n", ret); } else { @@ -532,7 +532,7 @@ FAR void *automount_initialize(FAR const struct automount_lower_s *lower) FAR struct automounter_state_s *priv; int ret; - fvdbg("lower=%p\n", lower); + finfo("lower=%p\n", lower); DEBUGASSERT(lower); /* Allocate an auto-mounter state structure */ @@ -542,7 +542,7 @@ FAR void *automount_initialize(FAR const struct automount_lower_s *lower) if (!priv) { - fdbg("ERROR: Failed to allocate state structure\n"); + ferr("ERROR: Failed to allocate state structure\n"); return NULL; } @@ -555,7 +555,7 @@ FAR void *automount_initialize(FAR const struct automount_lower_s *lower) priv->wdog = wd_create(); if (!priv->wdog) { - fdbg("ERROR: Failed to create a timer\n"); + ferr("ERROR: Failed to create a timer\n"); automount_uninitialize(priv); return NULL; } @@ -574,7 +574,7 @@ FAR void *automount_initialize(FAR const struct automount_lower_s *lower) { /* NOTE: Currently, work_queue only returns success */ - fdbg("ERROR: Failed to schedule work: %d\n", ret); + ferr("ERROR: Failed to schedule work: %d\n", ret); } /* Attach and enable automounter interrupts */ @@ -582,7 +582,7 @@ FAR void *automount_initialize(FAR const struct automount_lower_s *lower) ret = AUTOMOUNT_ATTACH(lower, automount_interrupt, priv); if (ret < 0) { - fdbg("ERROR: Failed to attach automount interrupt: %d\n", ret); + ferr("ERROR: Failed to attach automount interrupt: %d\n", ret); automount_uninitialize(priv); return NULL; } diff --git a/fs/mount/fs_mount.c b/fs/mount/fs_mount.c index f3ab72bc9335b69594300f6fc8214a4e771109e3..04e7bc3a9e506e1ce3636c5f920dace68cc31faa 100644 --- a/fs/mount/fs_mount.c +++ b/fs/mount/fs_mount.c @@ -256,7 +256,7 @@ int mount(FAR const char *source, FAR const char *target, ret = find_blockdriver(source, mountflags, &blkdrvr_inode); if (ret < 0) { - fdbg("ERROR: Failed to find block driver %s\n", source); + ferr("ERROR: Failed to find block driver %s\n", source); errcode = -ret; goto errout; } @@ -270,7 +270,7 @@ int mount(FAR const char *source, FAR const char *target, else #endif /* NONBDFS_SUPPORT */ { - fdbg("ERROR: Failed to find file system %s\n", filesystemtype); + ferr("ERROR: Failed to find file system %s\n", filesystemtype); errcode = ENODEV; goto errout; } @@ -289,7 +289,7 @@ int mount(FAR const char *source, FAR const char *target, if (INODE_IS_SPECIAL(mountpt_inode)) { - fdbg("ERROR: target %s exists and is a special nodes\n", target); + ferr("ERROR: target %s exists and is a special nodes\n", target); errcode = -ENOTDIR; goto errout_with_semaphore; } @@ -321,7 +321,7 @@ int mount(FAR const char *source, FAR const char *target, * -ENOMEM - Failed to allocate in-memory resources for the operation */ - fdbg("ERROR: Failed to reserve inode for target %s\n", target); + ferr("ERROR: Failed to reserve inode for target %s\n", target); errcode = -ret; goto errout_with_semaphore; } @@ -336,7 +336,7 @@ int mount(FAR const char *source, FAR const char *target, { /* The filesystem does not support the bind operation ??? */ - fdbg("ERROR: Filesystem does not support bind\n"); + ferr("ERROR: Filesystem does not support bind\n"); errcode = EINVAL; goto errout_with_mountpt; } @@ -366,7 +366,7 @@ int mount(FAR const char *source, FAR const char *target, * error. */ - fdbg("ERROR: Bind method failed: %d\n", ret); + ferr("ERROR: Bind method failed: %d\n", ret); #ifdef BDFS_SUPPORT #ifdef NONBDFS_SUPPORT if (blkdrvr_inode) @@ -441,7 +441,7 @@ errout: return ERROR; #else - fdbg("ERROR: No filesystems enabled\n"); + ferr("ERROR: No filesystems enabled\n"); set_errno(ENOSYS); return ERROR; #endif /* BDFS_SUPPORT || NONBDFS_SUPPORT */ diff --git a/fs/nfs/nfs_util.c b/fs/nfs/nfs_util.c index 6e5d8e45263d21f01dbcd8be91985486b2b39b13..e2dd949dcd24fc8779f6a115435f52e5c656cf4d 100644 --- a/fs/nfs/nfs_util.c +++ b/fs/nfs/nfs_util.c @@ -103,7 +103,7 @@ static inline int nfs_pathsegment(FAR const char **path, FAR char *buffer, } else if (nbytes >= NAME_MAX) { - fdbg("File name segment is too long: %d\n", *path); + ferr("ERROR: File name segment is too long: %d\n", *path); return EFBIG; } else @@ -205,7 +205,7 @@ tryagain: request, reqlen, response, resplen); if (error != 0) { - fdbg("ERROR: rpcclnt_request failed: %d\n", error); + ferr("ERROR: rpcclnt_request failed: %d\n", error); return error; } @@ -237,11 +237,11 @@ tryagain: goto tryagain; } - fdbg("ERROR: NFS error %d from server\n", error); + ferr("ERROR: NFS error %d from server\n", error); return error; } - fvdbg("NFS_SUCCESS\n"); + finfo("NFS_SUCCESS\n"); return OK; } @@ -277,7 +277,7 @@ int nfs_lookup(struct nfsmount *nmp, FAR const char *filename, namelen = strlen(filename); if (namelen > NAME_MAX) { - fdbg("Length of the string is too big: %d\n", namelen); + ferr("ERROR: Length of the string is too long: %d\n", namelen); return E2BIG; } @@ -312,7 +312,7 @@ int nfs_lookup(struct nfsmount *nmp, FAR const char *filename, if (error) { - fdbg("ERROR: nfs_request failed: %d\n", error); + ferr("ERROR: nfs_request failed: %d\n", error); return error; } @@ -329,7 +329,7 @@ int nfs_lookup(struct nfsmount *nmp, FAR const char *filename, value = fxdr_unsigned(uint32_t, value); if (value > NFSX_V3FHMAX) { - fdbg("ERROR: Bad file handle length: %d\n", value); + ferr("ERROR: Bad file handle length: %d\n", value); return EIO; } @@ -427,7 +427,7 @@ int nfs_findnode(struct nfsmount *nmp, FAR const char *relpath, { /* The filename segment contains is too long. */ - fdbg("nfs_pathsegment of \"%s\" failed after \"%s\": %d\n", + ferr("ERROR: nfs_pathsegment of \"%s\" failed after \"%s\": %d\n", relpath, buffer, error); return error; } @@ -437,7 +437,7 @@ int nfs_findnode(struct nfsmount *nmp, FAR const char *relpath, error = nfs_lookup(nmp, buffer, fhandle, obj_attributes, dir_attributes); if (error != OK) { - fdbg("nfs_lookup of \"%s\" failed at \"%s\": %d\n", + ferr("ERROR: nfs_lookup of \"%s\" failed at \"%s\": %d\n", relpath, buffer, error); return error; } @@ -466,7 +466,7 @@ int nfs_findnode(struct nfsmount *nmp, FAR const char *relpath, { /* Ooops.. we found something else */ - fdbg("ERROR: Intermediate segment \"%s\" of \'%s\" is not a directory\n", + ferr("ERROR: Intermediate segment \"%s\" of \'%s\" is not a directory\n", buffer, path); return ENOTDIR; } @@ -521,7 +521,7 @@ int nfs_finddir(struct nfsmount *nmp, FAR const char *relpath, { /* The filename segment contains is too long. */ - fdbg("nfs_pathsegment of \"%s\" failed after \"%s\": %d\n", + ferr("ERROR: nfs_pathsegment of \"%s\" failed after \"%s\": %d\n", relpath, filename, error); return error; } @@ -545,7 +545,7 @@ int nfs_finddir(struct nfsmount *nmp, FAR const char *relpath, error = nfs_lookup(nmp, filename, fhandle, attributes, NULL); if (error != OK) { - fdbg("nfs_lookup of \"%s\" failed at \"%s\": %d\n", + ferr("ERROR: fs_lookup of \"%s\" failed at \"%s\": %d\n", relpath, filename, error); return error; } @@ -557,7 +557,7 @@ int nfs_finddir(struct nfsmount *nmp, FAR const char *relpath, { /* Ooops.. we found something else */ - fdbg("ERROR: Intermediate segment \"%s\" of \'%s\" is not a directory\n", + ferr("ERROR: Intermediate segment \"%s\" of \'%s\" is not a directory\n", filename, path); return ENOTDIR; } diff --git a/fs/nfs/nfs_vfsops.c b/fs/nfs/nfs_vfsops.c index 6d71a044572a47d11112124c8518d0b0c100d8aa..0a7d93a720c43dfff8caf54590e71a181f8f9d4d 100644 --- a/fs/nfs/nfs_vfsops.c +++ b/fs/nfs/nfs_vfsops.c @@ -218,7 +218,7 @@ static int nfs_filecreate(FAR struct nfsmount *nmp, struct nfsnode *np, error = nfs_finddir(nmp, relpath, &fhandle, &fattr, filename); if (error != OK) { - fdbg("ERROR: nfs_finddir returned: %d\n", error); + ferr("ERROR: nfs_finddir returned: %d\n", error); return error; } @@ -340,7 +340,7 @@ static int nfs_filecreate(FAR struct nfsmount *nmp, struct nfsnode *np, tmp = *ptr++; /* handle_follows */ if (!tmp) { - fdbg("ERROR: no file handle follows\n"); + ferr("ERROR: no file handle follows\n"); return EINVAL; } @@ -357,7 +357,7 @@ static int nfs_filecreate(FAR struct nfsmount *nmp, struct nfsnode *np, tmp = *ptr; /* handle_follows */ if (!tmp) { - fdbg("WARNING: no file attributes\n"); + fwarn("WARNING: no file attributes\n"); } else { @@ -390,7 +390,7 @@ static int nfs_filetruncate(FAR struct nfsmount *nmp, struct nfsnode *np) int reqlen; int error; - fvdbg("Truncating file\n"); + finfo("Truncating file\n"); /* Create the SETATTR RPC call arguments */ @@ -427,7 +427,7 @@ static int nfs_filetruncate(FAR struct nfsmount *nmp, struct nfsnode *np) (FAR void *)nmp->nm_iobuffer, nmp->nm_buflen); if (error != OK) { - fdbg("ERROR: nfs_request failed: %d\n", error); + ferr("ERROR: nfs_request failed: %d\n", error); return error; } @@ -462,7 +462,7 @@ static int nfs_fileopen(FAR struct nfsmount *nmp, struct nfsnode *np, error = nfs_findnode(nmp, relpath, &fhandle, &fattr, NULL); if (error != OK) { - fdbg("ERROR: nfs_findnode returned: %d\n", error); + ferr("ERROR: nfs_findnode returned: %d\n", error); return error; } @@ -473,7 +473,7 @@ static int nfs_fileopen(FAR struct nfsmount *nmp, struct nfsnode *np, { /* Exit with EISDIR if we attempt to open a directory */ - fdbg("ERROR: Path is a directory\n"); + ferr("ERROR: Path is a directory\n"); return EISDIR; } @@ -489,7 +489,7 @@ static int nfs_fileopen(FAR struct nfsmount *nmp, struct nfsnode *np, tmp = fxdr_unsigned(uint32_t, fattr.fa_mode); if ((tmp & (NFSMODE_IWOTH | NFSMODE_IWGRP | NFSMODE_IWUSR)) == 0) { - fdbg("ERROR: File is read-only: %08x\n", tmp); + ferr("ERROR: File is read-only: %08x\n", tmp); return EACCES; } } @@ -500,7 +500,7 @@ static int nfs_fileopen(FAR struct nfsmount *nmp, struct nfsnode *np, { /* Already exists -- can't create it exclusively */ - fdbg("ERROR: File exists\n"); + ferr("ERROR: File exists\n"); return EEXIST; } @@ -567,7 +567,7 @@ static int nfs_open(FAR struct file *filep, FAR const char *relpath, np = (struct nfsnode *)kmm_zalloc(sizeof(struct nfsnode)); if (!np) { - fdbg("ERROR: Failed to allocate private data\n"); + ferr("ERROR: Failed to allocate private data\n"); return -ENOMEM; } @@ -577,7 +577,7 @@ static int nfs_open(FAR struct file *filep, FAR const char *relpath, error = nfs_checkmount(nmp); if (error != OK) { - fdbg("ERROR: nfs_checkmount failed: %d\n", error); + ferr("ERROR: nfs_checkmount failed: %d\n", error); goto errout_with_semaphore; } @@ -594,7 +594,7 @@ static int nfs_open(FAR struct file *filep, FAR const char *relpath, if (error != ENOENT) { - fdbg("ERROR: nfs_findnode failed: %d\n", error); + ferr("ERROR: nfs_findnode failed: %d\n", error); goto errout_with_semaphore; } @@ -609,7 +609,7 @@ static int nfs_open(FAR struct file *filep, FAR const char *relpath, * to create it. */ - fdbg("ERROR: File does not exist\n"); + ferr("ERROR: File does not exist\n"); error = ENOENT; goto errout_with_semaphore; } @@ -619,7 +619,7 @@ static int nfs_open(FAR struct file *filep, FAR const char *relpath, error = nfs_filecreate(nmp, np, relpath, mode); if (error != OK) { - fdbg("ERROR: nfs_filecreate failed: %d\n", error); + ferr("ERROR: nfs_filecreate failed: %d\n", error); goto errout_with_semaphore; } } @@ -771,7 +771,7 @@ static ssize_t nfs_read(FAR struct file *filep, char *buffer, size_t buflen) FAR uint32_t *ptr; int error = 0; - fvdbg("Read %d bytes from offset %d\n", buflen, filep->f_pos); + finfo("Read %d bytes from offset %d\n", buflen, filep->f_pos); /* Sanity checks */ @@ -790,7 +790,7 @@ static ssize_t nfs_read(FAR struct file *filep, char *buffer, size_t buflen) error = nfs_checkmount(nmp); if (error != OK) { - fdbg("nfs_checkmount failed: %d\n", error); + ferr("ERROR: nfs_checkmount failed: %d\n", error); goto errout_with_semaphore; } @@ -802,7 +802,7 @@ static ssize_t nfs_read(FAR struct file *filep, char *buffer, size_t buflen) if (buflen > tmp) { buflen = tmp; - fvdbg("Read size truncated to %d\n", buflen); + finfo("Read size truncated to %d\n", buflen); } /* Now loop until we fill the user buffer (or hit the end of the file) */ @@ -852,14 +852,14 @@ static ssize_t nfs_read(FAR struct file *filep, char *buffer, size_t buflen) /* Perform the read */ - fvdbg("Reading %d bytes\n", readsize); + finfo("Reading %d bytes\n", readsize); nfs_statistics(NFSPROC_READ); error = nfs_request(nmp, NFSPROC_READ, (FAR void *)&nmp->nm_msgbuffer.read, reqlen, (FAR void *)nmp->nm_iobuffer, nmp->nm_buflen); if (error) { - fdbg("ERROR: nfs_request failed: %d\n", error); + ferr("ERROR: nfs_request failed: %d\n", error); goto errout_with_semaphore; } @@ -914,7 +914,7 @@ static ssize_t nfs_read(FAR struct file *filep, char *buffer, size_t buflen) } } - fvdbg("Read %d bytes\n", bytesread); + finfo("Read %d bytes\n", bytesread); nfs_semgive(nmp); return bytesread; @@ -947,7 +947,7 @@ static ssize_t nfs_write(FAR struct file *filep, const char *buffer, int committed = NFSV3WRITE_FILESYNC; int error; - fvdbg("Write %d bytes to offset %d\n", buflen, filep->f_pos); + finfo("Write %d bytes to offset %d\n", buflen, filep->f_pos); /* Sanity checks */ @@ -966,7 +966,7 @@ static ssize_t nfs_write(FAR struct file *filep, const char *buffer, error = nfs_checkmount(nmp); if (error != OK) { - fdbg("nfs_checkmount failed: %d\n", error); + ferr("ERROR: nfs_checkmount failed: %d\n", error); goto errout_with_semaphore; } @@ -1043,7 +1043,7 @@ static ssize_t nfs_write(FAR struct file *filep, const char *buffer, (FAR void *)&nmp->nm_msgbuffer.write, sizeof(struct rpc_reply_write)); if (error) { - fdbg("ERROR: nfs_request failed: %d\n", error); + ferr("ERROR: nfs_request failed: %d\n", error); goto errout_with_semaphore; } @@ -1127,7 +1127,7 @@ static int nfs_dup(FAR const struct file *oldp, FAR struct file *newp) FAR struct nfsnode *np; int error; - fvdbg("Dup %p->%p\n", oldp, newp); + finfo("Dup %p->%p\n", oldp, newp); /* Sanity checks */ @@ -1146,7 +1146,7 @@ static int nfs_dup(FAR const struct file *oldp, FAR struct file *newp) error = nfs_checkmount(nmp); if (error != OK) { - fdbg("ERROR: nfs_checkmount failed: %d\n", error); + ferr("ERROR: nfs_checkmount failed: %d\n", error); nfs_semgive(nmp); return -error; } @@ -1193,7 +1193,7 @@ static int nfs_opendir(struct inode *mountpt, const char *relpath, uint32_t objtype; int error; - fvdbg("relpath: \"%s\"\n", relpath ? relpath : "NULL"); + finfo("relpath: \"%s\"\n", relpath ? relpath : "NULL"); /* Sanity checks */ @@ -1213,7 +1213,7 @@ static int nfs_opendir(struct inode *mountpt, const char *relpath, error = nfs_checkmount(nmp); if (error != OK) { - fdbg("ERROR: nfs_checkmount failed: %d\n", error); + ferr("ERROR: nfs_checkmount failed: %d\n", error); goto errout_with_semaphore; } @@ -1222,7 +1222,7 @@ static int nfs_opendir(struct inode *mountpt, const char *relpath, error = nfs_findnode(nmp, relpath, &fhandle, &obj_attributes, NULL); if (error != OK) { - fdbg("ERROR: nfs_findnode failed: %d\n", error); + ferr("ERROR: nfs_findnode failed: %d\n", error); goto errout_with_semaphore; } @@ -1231,7 +1231,7 @@ static int nfs_opendir(struct inode *mountpt, const char *relpath, objtype = fxdr_unsigned(uint32_t, obj_attributes.fa_type); if (objtype != NFDIR) { - fdbg("ERROR: Not a directory, type=%d\n", objtype); + ferr("ERROR: Not a directory, type=%d\n", objtype); error = ENOTDIR; goto errout_with_semaphore; } @@ -1273,7 +1273,7 @@ static int nfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir) int reqlen; int error = 0; - fvdbg("Entry\n"); + finfo("Entry\n"); /* Sanity checks */ @@ -1289,7 +1289,7 @@ static int nfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir) error = nfs_checkmount(nmp); if (error != OK) { - fdbg("ERROR: nfs_checkmount failed: %d\n", error); + ferr("ERROR: nfs_checkmount failed: %d\n", error); goto errout_with_semaphore; } @@ -1333,7 +1333,7 @@ static int nfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir) (FAR void *)nmp->nm_iobuffer, nmp->nm_buflen); if (error != OK) { - fdbg("ERROR: nfs_request failed: %d\n", error); + ferr("ERROR: nfs_request failed: %d\n", error); goto errout_with_semaphore; } @@ -1378,7 +1378,7 @@ static int nfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir) tmp = *ptr++; if (tmp != 0) { - fvdbg("End of directory\n"); + finfo("End of directory\n"); error = ENOENT; } @@ -1388,7 +1388,7 @@ static int nfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir) else { - fvdbg("No data but not end of directory???\n"); + finfo("No data but not end of directory???\n"); error = EAGAIN; } @@ -1437,7 +1437,7 @@ static int nfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir) memcpy(dir->fd_dir.d_name, name, length); dir->fd_dir.d_name[length] = '\0'; - fvdbg("name: \"%s\"\n", dir->fd_dir.d_name); + finfo("name: \"%s\"\n", dir->fd_dir.d_name); /* Get the file attributes associated with this name and return * the file type. @@ -1449,7 +1449,7 @@ static int nfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir) error = nfs_lookup(nmp, dir->fd_dir.d_name, &fhandle, &obj_attributes, NULL); if (error != OK) { - fdbg("nfs_lookup failed: %d\n", error); + ferr("ERROR: nfs_lookup failed: %d\n", error); goto errout_with_semaphore; } @@ -1481,7 +1481,7 @@ static int nfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir) dir->fd_dir.d_type = DTYPE_CHR; break; } - fvdbg("type: %d->%d\n", (int)tmp, dir->fd_dir.d_type); + finfo("type: %d->%d\n", (int)tmp, dir->fd_dir.d_type); errout_with_semaphore: nfs_semgive(nmp); @@ -1502,7 +1502,7 @@ errout_with_semaphore: static int nfs_rewinddir(FAR struct inode *mountpt, FAR struct fs_dirent_s *dir) { - fvdbg("Entry\n"); + finfo("Entry\n"); /* Sanity checks */ @@ -1574,7 +1574,7 @@ static void nfs_decode_args(FAR struct nfs_mount_parameters *nprmt, } else { - fdbg("ERROR: Only SOCK_DRAM is supported\n"); + ferr("ERROR: Only SOCK_DRAM is supported\n"); maxio = NFS_MAXDATA; } @@ -1726,7 +1726,7 @@ static int nfs_bind(FAR struct inode *blkdriver, FAR const void *data, nmp = (FAR struct nfsmount *)kmm_zalloc(SIZEOF_nfsmount(buflen)); if (!nmp) { - fdbg("ERROR: Failed to allocate mountpoint structure\n"); + ferr("ERROR: Failed to allocate mountpoint structure\n"); return ENOMEM; } @@ -1776,11 +1776,11 @@ static int nfs_bind(FAR struct inode *blkdriver, FAR const void *data, rpc = (struct rpcclnt *)kmm_zalloc(sizeof(struct rpcclnt)); if (!rpc) { - fdbg("ERROR: Failed to allocate rpc structure\n"); + ferr("ERROR: Failed to allocate rpc structure\n"); return ENOMEM; } - fvdbg("Connecting\n"); + finfo("Connecting\n"); /* Translate nfsmnt flags -> rpcclnt flags */ @@ -1794,7 +1794,7 @@ static int nfs_bind(FAR struct inode *blkdriver, FAR const void *data, error = rpcclnt_connect(nmp->nm_rpcclnt); if (error != OK) { - fdbg("ERROR: nfs_connect failed: %d\n", error); + ferr("ERROR: nfs_connect failed: %d\n", error); goto bad; } } @@ -1813,7 +1813,7 @@ static int nfs_bind(FAR struct inode *blkdriver, FAR const void *data, (FAR void *)&resok, sizeof(struct rpc_reply_getattr)); if (error) { - fdbg("ERROR: nfs_request failed: %d\n", error); + ferr("ERROR: nfs_request failed: %d\n", error); goto bad; } @@ -1826,7 +1826,7 @@ static int nfs_bind(FAR struct inode *blkdriver, FAR const void *data, *handle = (FAR void *)nmp; nfs_semgive(nmp); - fvdbg("Successfully mounted\n"); + finfo("Successfully mounted\n"); return OK; bad: @@ -1872,7 +1872,7 @@ static int nfs_unbind(FAR void *handle, FAR struct inode **blkdriver, FAR struct nfsmount *nmp = (FAR struct nfsmount *)handle; int error; - fvdbg("Entry\n"); + finfo("Entry\n"); DEBUGASSERT(nmp); /* Get exclusive access to the mount structure */ @@ -1887,7 +1887,7 @@ static int nfs_unbind(FAR void *handle, FAR struct inode **blkdriver, if (nmp->nm_head != NULL) { - fdbg("ERROR; There are open files: %p\n", nmp->nm_head); + ferr("ERROR; There are open files: %p\n", nmp->nm_head); /* This implementation currently only supports unmounting if there are * no open file references. @@ -1902,7 +1902,7 @@ static int nfs_unbind(FAR void *handle, FAR struct inode **blkdriver, error = rpcclnt_umount(nmp->nm_rpcclnt); if (error) { - fdbg("ERROR: rpcclnt_umount failed: %d\n", error); + ferr("ERROR: rpcclnt_umount failed: %d\n", error); } /* Disconnect from the server */ @@ -2046,7 +2046,7 @@ static int nfs_statfs(FAR struct inode *mountpt, FAR struct statfs *sbp) error = nfs_checkmount(nmp); if (error != OK) { - fdbg("ERROR: nfs_checkmount failed: %d\n", error); + ferr("ERROR: nfs_checkmount failed: %d\n", error); goto errout_with_semaphore; } @@ -2124,7 +2124,7 @@ static int nfs_remove(struct inode *mountpt, const char *relpath) error = nfs_checkmount(nmp); if (error != OK) { - fdbg("ERROR: nfs_checkmount failed: %d\n", error); + ferr("ERROR: nfs_checkmount failed: %d\n", error); goto errout_with_semaphore; } @@ -2133,7 +2133,7 @@ static int nfs_remove(struct inode *mountpt, const char *relpath) error = nfs_finddir(nmp, relpath, &fhandle, &fattr, filename); if (error != OK) { - fdbg("ERROR: nfs_finddir returned: %d\n", error); + ferr("ERROR: nfs_finddir returned: %d\n", error); goto errout_with_semaphore; } @@ -2210,7 +2210,7 @@ static int nfs_mkdir(struct inode *mountpt, const char *relpath, mode_t mode) error = nfs_checkmount(nmp); if (error != OK) { - fdbg("ERROR: nfs_checkmount: %d\n", error); + ferr("ERROR: nfs_checkmount: %d\n", error); goto errout_with_semaphore; } @@ -2219,7 +2219,7 @@ static int nfs_mkdir(struct inode *mountpt, const char *relpath, mode_t mode) error = nfs_finddir(nmp, relpath, &fhandle, &fattr, dirname); if (error != OK) { - fdbg("ERROR: nfs_finddir returned: %d\n", error); + ferr("ERROR: nfs_finddir returned: %d\n", error); return error; } @@ -2292,7 +2292,7 @@ static int nfs_mkdir(struct inode *mountpt, const char *relpath, mode_t mode) (FAR void *)&nmp->nm_iobuffer, nmp->nm_buflen); if (error) { - fdbg("ERROR: nfs_request failed: %d\n", error); + ferr("ERROR: nfs_request failed: %d\n", error); } errout_with_semaphore: @@ -2336,7 +2336,7 @@ static int nfs_rmdir(struct inode *mountpt, const char *relpath) error = nfs_checkmount(nmp); if (error != OK) { - fdbg("ERROR: nfs_checkmount failed: %d\n", error); + ferr("ERROR: nfs_checkmount failed: %d\n", error); goto errout_with_semaphore; } @@ -2345,7 +2345,7 @@ static int nfs_rmdir(struct inode *mountpt, const char *relpath) error = nfs_finddir(nmp, relpath, &fhandle, &fattr, dirname); if (error != OK) { - fdbg("ERROR: nfs_finddir returned: %d\n", error); + ferr("ERROR: nfs_finddir returned: %d\n", error); return error; } @@ -2424,7 +2424,7 @@ static int nfs_rename(struct inode *mountpt, const char *oldrelpath, error = nfs_checkmount(nmp); if (error != OK) { - fdbg("ERROR: nfs_checkmount returned: %d\n", error); + ferr("ERROR: nfs_checkmount returned: %d\n", error); goto errout_with_semaphore; } @@ -2433,7 +2433,7 @@ static int nfs_rename(struct inode *mountpt, const char *oldrelpath, error = nfs_finddir(nmp, oldrelpath, &from_handle, &fattr, from_name); if (error != OK) { - fdbg("ERROR: nfs_finddir returned: %d\n", error); + ferr("ERROR: nfs_finddir returned: %d\n", error); return error; } @@ -2442,7 +2442,7 @@ static int nfs_rename(struct inode *mountpt, const char *oldrelpath, error = nfs_finddir(nmp, newrelpath, &to_handle, &fattr, to_name); if (error != OK) { - fdbg("ERROR: nfs_finddir returned: %d\n", error); + ferr("ERROR: nfs_finddir returned: %d\n", error); return error; } @@ -2538,7 +2538,7 @@ static int nfs_stat(struct inode *mountpt, const char *relpath, error = nfs_checkmount(nmp); if (error != OK) { - fdbg("ERROR: nfs_checkmount failed: %d\n", error); + ferr("ERROR: nfs_checkmount failed: %d\n", error); goto errout_with_semaphore; } @@ -2547,7 +2547,7 @@ static int nfs_stat(struct inode *mountpt, const char *relpath, error = nfs_findnode(nmp, relpath, &fhandle, &obj_attributes, NULL); if (error != OK) { - fdbg("ERROR: nfs_findnode failed: %d\n", error); + ferr("ERROR: nfs_findnode failed: %d\n", error); goto errout_with_semaphore; } diff --git a/fs/nfs/rpc_clnt.c b/fs/nfs/rpc_clnt.c index 0af2b470c735502ebc33d46819a6e424ec9df8d4..2432a94c03dd19abde9cff48c4fb985bbaad37f4 100644 --- a/fs/nfs/rpc_clnt.c +++ b/fs/nfs/rpc_clnt.c @@ -177,7 +177,7 @@ static int rpcclnt_send(FAR struct rpcclnt *rpc, int procid, int prog, /* psock_sendto failed */ error = get_errno(); - fdbg("ERROR: psock_sendto failed: %d\n", error); + ferr("ERROR: psock_sendto failed: %d\n", error); } return error; @@ -204,7 +204,7 @@ static int rpcclnt_receive(FAR struct rpcclnt *rpc, FAR struct sockaddr *aname, if (nbytes < 0) { error = get_errno(); - fdbg("ERROR: psock_recvfrom failed: %d\n", error); + ferr("ERROR: psock_recvfrom failed: %d\n", error); } return error; @@ -228,7 +228,7 @@ static int rpcclnt_reply(FAR struct rpcclnt *rpc, int procid, int prog, error = rpcclnt_receive(rpc, rpc->rc_name, procid, prog, reply, resplen); if (error != 0) { - fdbg("ERROR: rpcclnt_receive returned: %d\n", error); + ferr("ERROR: rpcclnt_receive returned: %d\n", error); /* If we failed because of a timeout, then try sending the CALL * message again. @@ -249,7 +249,7 @@ static int rpcclnt_reply(FAR struct rpcclnt *rpc, int procid, int prog, if (replyheader->rp_direction != rpc_reply) { - fdbg("ERROR: Different RPC REPLY returned\n"); + ferr("ERROR: Different RPC REPLY returned\n"); rpc_statistics(rpcinvalid); error = EPROTO; } @@ -349,7 +349,7 @@ void rpcclnt_init(void) rpc_auth_unix = txdr_unsigned(RPCAUTH_UNIX); rpc_auth_null = txdr_unsigned(RPCAUTH_NULL); - fvdbg("RPC initialized\n"); + finfo("RPC initialized\n"); } /**************************************************************************** @@ -385,7 +385,7 @@ int rpcclnt_connect(struct rpcclnt *rpc) uint16_t tport; int errval; - fvdbg("Connecting\n"); + finfo("Connecting\n"); /* Create the socket */ @@ -396,7 +396,7 @@ int rpcclnt_connect(struct rpcclnt *rpc) so = (struct socket *)kmm_zalloc(sizeof(struct socket)); if (!so) { - fdbg("ERROR: Failed to allocate socket structure\n"); + ferr("ERROR: Failed to allocate socket structure\n"); return ENOMEM; } @@ -404,7 +404,7 @@ int rpcclnt_connect(struct rpcclnt *rpc) if (error < 0) { errval = get_errno(); - fdbg("ERROR: psock_socket failed: %d", errval); + ferr("ERROR: psock_socket failed: %d", errval); return error; } @@ -423,7 +423,7 @@ int rpcclnt_connect(struct rpcclnt *rpc) if (error < 0) { errval = get_errno(); - fdbg("ERROR: psock_setsockopt failed: %d\n", errval); + ferr("ERROR: psock_setsockopt failed: %d\n", errval); goto bad; } @@ -445,14 +445,14 @@ int rpcclnt_connect(struct rpcclnt *rpc) if (error < 0) { errval = get_errno(); - fdbg("ERROR: psock_bind failed: %d\n", errval); + ferr("ERROR: psock_bind failed: %d\n", errval); } } while (errval == EADDRINUSE && tport > 1024 / 2); if (error) { - fdbg("ERROR: psock_bind failed: %d\n", errval); + ferr("ERROR: psock_bind failed: %d\n", errval); goto bad; } @@ -465,7 +465,7 @@ int rpcclnt_connect(struct rpcclnt *rpc) if (error < 0) { errval = get_errno(); - fdbg("ERROR: psock_connect to PMAP port failed: %d", errval); + ferr("ERROR: psock_connect to PMAP port failed: %d", errval); goto bad; } @@ -483,7 +483,7 @@ int rpcclnt_connect(struct rpcclnt *rpc) (FAR void *)&response.rdata, sizeof(struct rpc_reply_pmap)); if (error != 0) { - fdbg("ERROR: rpcclnt_request failed: %d\n", error); + ferr("ERROR: rpcclnt_request failed: %d\n", error); goto bad; } @@ -494,7 +494,7 @@ int rpcclnt_connect(struct rpcclnt *rpc) if (error < 0) { errval = get_errno(); - fdbg("ERROR: psock_connect MOUNTD port failed: %d\n", errval); + ferr("ERROR: psock_connect MOUNTD port failed: %d\n", errval); goto bad; } @@ -508,14 +508,14 @@ int rpcclnt_connect(struct rpcclnt *rpc) (FAR void *)&response.mdata, sizeof(struct rpc_reply_mount)); if (error != 0) { - fdbg("ERROR: rpcclnt_request failed: %d\n", error); + ferr("ERROR: rpcclnt_request failed: %d\n", error); goto bad; } error = fxdr_unsigned(uint32_t, response.mdata.mount.status); if (error != 0) { - fdbg("ERROR: Bad mount status: %d\n", error); + ferr("ERROR: Bad mount status: %d\n", error); goto bad; } @@ -531,7 +531,7 @@ int rpcclnt_connect(struct rpcclnt *rpc) if (error < 0) { errval = get_errno(); - fdbg("ERROR: psock_connect PMAP port failed: %d\n", errval); + ferr("ERROR: psock_connect PMAP port failed: %d\n", errval); goto bad; } @@ -545,7 +545,7 @@ int rpcclnt_connect(struct rpcclnt *rpc) (FAR void *)&response.rdata, sizeof(struct rpc_reply_pmap)); if (error != 0) { - fdbg("ERROR: rpcclnt_request failed: %d\n", error); + ferr("ERROR: rpcclnt_request failed: %d\n", error); goto bad; } @@ -554,7 +554,7 @@ int rpcclnt_connect(struct rpcclnt *rpc) error = psock_connect(rpc->rc_so, saddr, sizeof(*saddr)); if (error) { - fdbg("psock_connect NFS port returns %d\n", error); + ferr("ERROR: psock_connect NFS port returns %d\n", error); goto bad; } @@ -622,7 +622,7 @@ int rpcclnt_umount(struct rpcclnt *rpc) if (ret < 0) { error = get_errno(); - fdbg("ERROR: psock_connect failed [port=%d]: %d\n", + ferr("ERROR: psock_connect failed [port=%d]: %d\n", ntohs(sa->sin_port), error); goto bad; } @@ -637,7 +637,7 @@ int rpcclnt_umount(struct rpcclnt *rpc) (FAR void *)&response.rdata, sizeof(struct rpc_reply_pmap)); if (error != 0) { - fdbg("ERROR: rpcclnt_request failed: %d\n", error); + ferr("ERROR: rpcclnt_request failed: %d\n", error); goto bad; } @@ -647,7 +647,7 @@ int rpcclnt_umount(struct rpcclnt *rpc) if (ret < 0) { error = get_errno(); - fdbg("ERROR: psock_connect failed [port=%d]: %d\n", + ferr("ERROR: psock_connect failed [port=%d]: %d\n", ntohs(sa->sin_port), error); goto bad; } @@ -662,7 +662,7 @@ int rpcclnt_umount(struct rpcclnt *rpc) (FAR void *)&response.mdata, sizeof(struct rpc_reply_umount)); if (error != 0) { - fdbg("ERROR: rpcclnt_request failed: %d\n", error); + ferr("ERROR: rpcclnt_request failed: %d\n", error); goto bad; } @@ -731,7 +731,7 @@ int rpcclnt_request(FAR struct rpcclnt *rpc, int procnum, int prog, error = rpcclnt_send(rpc, procnum, prog, request, reqlen); if (error != OK) { - fvdbg("ERROR rpcclnt_send failed: %d\n", error); + finfo("ERROR rpcclnt_send failed: %d\n", error); } /* Wait for the reply from our send */ @@ -741,7 +741,7 @@ int rpcclnt_request(FAR struct rpcclnt *rpc, int procnum, int prog, error = rpcclnt_reply(rpc, procnum, prog, response, resplen); if (error != OK) { - fvdbg("ERROR rpcclnt_reply failed: %d\n", error); + finfo("ERROR rpcclnt_reply failed: %d\n", error); } } @@ -751,7 +751,7 @@ int rpcclnt_request(FAR struct rpcclnt *rpc, int procnum, int prog, if (error != OK) { - fdbg("ERROR: RPC failed: %d\n", error); + ferr("ERROR: RPC failed: %d\n", error); return error; } @@ -766,11 +766,11 @@ int rpcclnt_request(FAR struct rpcclnt *rpc, int procnum, int prog, switch (tmp) { case RPC_MISMATCH: - fdbg("RPC_MSGDENIED: RPC_MISMATCH error\n"); + ferr("ERROR: RPC_MSGDENIED: RPC_MISMATCH error\n"); return EOPNOTSUPP; case RPC_AUTHERR: - fdbg("RPC_MSGDENIED: RPC_AUTHERR error\n"); + ferr("ERROR: RPC_MSGDENIED: RPC_AUTHERR error\n"); return EACCES; default: @@ -785,16 +785,16 @@ int rpcclnt_request(FAR struct rpcclnt *rpc, int procnum, int prog, tmp = fxdr_unsigned(uint32_t, replymsg->status); if (tmp == RPC_SUCCESS) { - fvdbg("RPC_SUCCESS\n"); + finfo("RPC_SUCCESS\n"); } else if (tmp == RPC_PROGMISMATCH) { - fdbg("RPC_MSGACCEPTED: RPC_PROGMISMATCH error\n"); + ferr("ERROR: RPC_MSGACCEPTED: RPC_PROGMISMATCH error\n"); return EOPNOTSUPP; } else if (tmp > 5) { - fdbg("ERROR: Other RPC type: %d\n", tmp); + ferr("ERROR: Unsupported RPC type: %d\n", tmp); return EOPNOTSUPP; } diff --git a/fs/nxffs/Kconfig b/fs/nxffs/Kconfig index 3618b2cf642a18cf43a9a476753f445f2dc3eb13..f3dd6e1166370e6336b396157bb28871fbb3e10a 100644 --- a/fs/nxffs/Kconfig +++ b/fs/nxffs/Kconfig @@ -31,8 +31,8 @@ config NXFFS_SCAN_VOLUME The down side is that scanning the volume can adversely affect your start-up time. An option is to just erase the FLASH and - reboot in these cases. That can be done with - apps/system/flash_eraseall. + reboot in these cases. That can be done with MDIOC_BULKERASE + IOCTL command. config NXFFS_NAND bool "Enable NAND support" diff --git a/fs/nxffs/nxffs_block.c b/fs/nxffs/nxffs_block.c index 490f3025378a112a014f5b897de77aa302f50be6..c1cad2afe4a3aeed7ff89f1589925d533e972fe7 100644 --- a/fs/nxffs/nxffs_block.c +++ b/fs/nxffs/nxffs_block.c @@ -89,7 +89,7 @@ int nxffs_verifyblock(FAR struct nxffs_volume_s *volume, off_t block) { /* Perhaps we are at the end of the media */ - fdbg("ERROR: Failed to read data into cache: %d\n", ret); + ferr("ERROR: Failed to read data into cache: %d\n", ret); return -EIO; } @@ -169,6 +169,6 @@ int nxffs_validblock(struct nxffs_volume_s *volume, off_t *block) * valid blocks left in the volume. */ - fdbg("ERROR: No valid block found\n"); + ferr("ERROR: No valid block found\n"); return -ENOSPC; } diff --git a/fs/nxffs/nxffs_blockstats.c b/fs/nxffs/nxffs_blockstats.c index 797cae2d4cdb657754291e953f132ae478a012b5..d1c3b8fb8de950542be628ee46667a93bfe860b2 100644 --- a/fs/nxffs/nxffs_blockstats.c +++ b/fs/nxffs/nxffs_blockstats.c @@ -94,7 +94,7 @@ int nxffs_blockstats(FAR struct nxffs_volume_s *volume, ret = MTD_BREAD(volume->mtd, ioblock, volume->blkper, volume->pack); if (ret < volume->blkper) { - fdbg("ERROR: Failed to read erase block %d: %d\n", + ferr("ERROR: Failed to read erase block %d: %d\n", ioblock / volume->blkper, ret); return ret; } @@ -147,11 +147,11 @@ int nxffs_blockstats(FAR struct nxffs_volume_s *volume, } } - fdbg("Number blocks: %d\n", stats->nblocks); - fdbg(" Good blocks: %d\n", stats->ngood); - fdbg(" Bad blocks: %d\n", stats->nbad); - fdbg(" Unformatted blocks: %d\n", stats->nunformat); - fdbg(" Corrupt blocks: %d\n", stats->ncorrupt); + finfo("Number blocks: %d\n", stats->nblocks); + finfo(" Good blocks: %d\n", stats->ngood); + finfo(" Bad blocks: %d\n", stats->nbad); + finfo(" Unformatted blocks: %d\n", stats->nunformat); + finfo(" Corrupt blocks: %d\n", stats->ncorrupt); #else for (ioblock = 0; ioblock < volume->nblocks; ioblock++) @@ -175,7 +175,7 @@ int nxffs_blockstats(FAR struct nxffs_volume_s *volume, * of unreadable blocks. */ - fdbg("ERROR: Failed to read block %d: %d\n", ioblock, ret); + ferr("ERROR: Failed to read block %d: %d\n", ioblock, ret); /* Increment the count of un-readable blocks */ @@ -221,12 +221,12 @@ int nxffs_blockstats(FAR struct nxffs_volume_s *volume, } } - fdbg("Number blocks: %d\n", stats->nblocks); - fdbg(" Good blocks: %d\n", stats->ngood); - fdbg(" Bad blocks: %d\n", stats->nbad); - fdbg(" Unformatted blocks: %d\n", stats->nunformat); - fdbg(" Corrupt blocks: %d\n", stats->ncorrupt); - fdbg(" Unreadable blocks: %d\n", stats->nbadread); + finfo("Number blocks: %d\n", stats->nblocks); + finfo(" Good blocks: %d\n", stats->ngood); + finfo(" Bad blocks: %d\n", stats->nbad); + finfo(" Unformatted blocks: %d\n", stats->nunformat); + finfo(" Corrupt blocks: %d\n", stats->ncorrupt); + finfo(" Unreadable blocks: %d\n", stats->nbadread); #endif return OK; diff --git a/fs/nxffs/nxffs_cache.c b/fs/nxffs/nxffs_cache.c index 2a04d6b0a9f93c0554010511cba743012d8c6cbf..6a5c4c028fcef580973a6f44adb330e73837c3d1 100644 --- a/fs/nxffs/nxffs_cache.c +++ b/fs/nxffs/nxffs_cache.c @@ -98,7 +98,7 @@ int nxffs_rdcache(FAR struct nxffs_volume_s *volume, off_t block) nxfrd = MTD_BREAD(volume->mtd, block, 1, volume->cache); if (nxfrd != 1) { - fdbg("ERROR: Read block %d failed: %d\n", block, nxfrd); + ferr("ERROR: Read block %d failed: %d\n", block, nxfrd); return -EIO; } @@ -133,7 +133,7 @@ int nxffs_wrcache(FAR struct nxffs_volume_s *volume) nxfrd = MTD_BWRITE(volume->mtd, volume->cblock, 1, volume->cache); if (nxfrd != 1) { - fdbg("ERROR: Write block %d failed: %d\n", volume->cblock, nxfrd); + ferr("ERROR: Write block %d failed: %d\n", volume->cblock, nxfrd); return -EIO; } @@ -225,7 +225,7 @@ int nxffs_getc(FAR struct nxffs_volume_s *volume, uint16_t reserve) off_t nextblock = volume->ioblock + 1; if (nextblock >= volume->nblocks) { - fvdbg("End of FLASH encountered\n"); + finfo("End of FLASH encountered\n"); return -ENOSPC; } @@ -249,7 +249,7 @@ int nxffs_getc(FAR struct nxffs_volume_s *volume, uint16_t reserve) #ifndef CONFIG_NXFFS_NAND /* Read errors are fatal */ - fdbg("ERROR: Failed to read valid data into cache: %d\n", ret); + ferr("ERROR: Failed to read valid data into cache: %d\n", ret); return ret; #else /* A read error occurred. This probably means that we are @@ -258,7 +258,7 @@ int nxffs_getc(FAR struct nxffs_volume_s *volume, uint16_t reserve) * block. */ - fdbg("ERROR: Failed to read valid data into cache: %d\n", ret); + ferr("ERROR: Failed to read valid data into cache: %d\n", ret); #endif } } diff --git a/fs/nxffs/nxffs_dirent.c b/fs/nxffs/nxffs_dirent.c index 39150b9369d299b106368a7a613a20573cc35601..d51e2cabb6103408e7ef6b73e0e3541bc42681f7 100644 --- a/fs/nxffs/nxffs_dirent.c +++ b/fs/nxffs/nxffs_dirent.c @@ -71,7 +71,7 @@ int nxffs_opendir(FAR struct inode *mountpt, FAR const char *relpath, struct nxffs_volume_s *volume; int ret; - fvdbg("relpath: \"%s\"\n", relpath ? relpath : "NULL"); + finfo("relpath: \"%s\"\n", relpath ? relpath : "NULL"); /* Sanity checks */ @@ -146,7 +146,7 @@ int nxffs_readdir(FAR struct inode *mountpt, FAR struct fs_dirent_s *dir) { /* Return the filename and file type */ - fvdbg("Offset %d: \"%s\"\n", entry.hoffset, entry.name); + finfo("Offset %d: \"%s\"\n", entry.hoffset, entry.name); dir->fd_dir.d_type = DTYPE_FILE; strncpy(dir->fd_dir.d_name, entry.name, NAME_MAX+1); @@ -175,7 +175,7 @@ int nxffs_rewinddir(FAR struct inode *mountpt, FAR struct fs_dirent_s *dir) FAR struct nxffs_volume_s *volume; int ret; - fvdbg("Entry\n"); + finfo("Entry\n"); /* Sanity checks */ diff --git a/fs/nxffs/nxffs_dump.c b/fs/nxffs/nxffs_dump.c index 1be0e294ac610fe4a4c01930e81c0a510402c016..a76c503e27a8e447e11bbcb5207f7aedb715db82 100644 --- a/fs/nxffs/nxffs_dump.c +++ b/fs/nxffs/nxffs_dump.c @@ -67,7 +67,7 @@ struct nxffs_blkinfo_s off_t nblocks; off_t block; off_t offset; -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_FS) bool verbose; #endif }; @@ -91,7 +91,7 @@ static const char g_format[] = " %5d:%-5d %s %s %5d\n"; * ****************************************************************************/ -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_FS) static inline ssize_t nxffs_analyzeinode(FAR struct nxffs_blkinfo_s *blkinfo, int offset) { @@ -239,7 +239,7 @@ static inline ssize_t nxffs_analyzeinode(FAR struct nxffs_blkinfo_s *blkinfo, * ****************************************************************************/ -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_FS) static inline ssize_t nxffs_analyzedata(FAR struct nxffs_blkinfo_s *blkinfo, int offset) { @@ -297,7 +297,7 @@ static inline ssize_t nxffs_analyzedata(FAR struct nxffs_blkinfo_s *blkinfo, * ****************************************************************************/ -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_FS) static inline void nxffs_analyze(FAR struct nxffs_blkinfo_s *blkinfo) { FAR struct nxffs_block_s *blkhdr; @@ -403,7 +403,7 @@ static inline void nxffs_analyze(FAR struct nxffs_blkinfo_s *blkinfo) * Name: nxffs_dump * * Description: - * Dump a summary of the contents of an NXFFS file system. CONFIG_DEBUG + * Dump a summary of the contents of an NXFFS file system. CONFIG_DEBUG_FEATURES * and CONFIG_DEBUG_FS must be enabled for this function to do anything. * * Input Parameters: @@ -419,7 +419,7 @@ static inline void nxffs_analyze(FAR struct nxffs_blkinfo_s *blkinfo) int nxffs_dump(FAR struct mtd_dev_s *mtd, bool verbose) { -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_FS) struct nxffs_blkinfo_s blkinfo; int ret; @@ -432,7 +432,7 @@ int nxffs_dump(FAR struct mtd_dev_s *mtd, bool verbose) ret = MTD_IOCTL(mtd, MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&blkinfo.geo)); if (ret < 0) { - fdbg("ERROR: MTD ioctl(MTDIOC_GEOMETRY) failed: %d\n", -ret); + ferr("ERROR: MTD ioctl(MTDIOC_GEOMETRY) failed: %d\n", -ret); return ret; } @@ -445,7 +445,7 @@ int nxffs_dump(FAR struct mtd_dev_s *mtd, bool verbose) blkinfo.buffer = (FAR uint8_t *)kmm_malloc(blkinfo.geo.blocksize); if (!blkinfo.buffer) { - fdbg("ERROR: Failed to allocate block cache\n"); + ferr("ERROR: Failed to allocate block cache\n"); return -ENOMEM; } @@ -467,7 +467,7 @@ int nxffs_dump(FAR struct mtd_dev_s *mtd, bool verbose) #ifndef CONFIG_NXFFS_NAND /* Read errors are fatal */ - fdbg("ERROR: Failed to read block %d\n", blkinfo.block); + ferr("ERROR: Failed to read block %d\n", blkinfo.block); kmm_free(blkinfo.buffer); return ret; #else diff --git a/fs/nxffs/nxffs_initialize.c b/fs/nxffs/nxffs_initialize.c index 5701d3163791f677447c9b3822124f767ffc18d4..8b99252bba625a87da1909155d746d6614a4d427 100644 --- a/fs/nxffs/nxffs_initialize.c +++ b/fs/nxffs/nxffs_initialize.c @@ -190,7 +190,7 @@ int nxffs_initialize(FAR struct mtd_dev_s *mtd) ret = MTD_IOCTL(mtd, MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&volume->geo)); if (ret < 0) { - fdbg("ERROR: MTD ioctl(MTDIOC_GEOMETRY) failed: %d\n", -ret); + ferr("ERROR: MTD ioctl(MTDIOC_GEOMETRY) failed: %d\n", -ret); goto errout_with_volume; } @@ -199,7 +199,7 @@ int nxffs_initialize(FAR struct mtd_dev_s *mtd) volume->cache = (FAR uint8_t *)kmm_malloc(volume->geo.blocksize); if (!volume->cache) { - fdbg("ERROR: Failed to allocate an erase block buffer\n"); + ferr("ERROR: Failed to allocate an erase block buffer\n"); ret = -ENOMEM; goto errout_with_volume; } @@ -212,7 +212,7 @@ int nxffs_initialize(FAR struct mtd_dev_s *mtd) volume->pack = (FAR uint8_t *)kmm_malloc(volume->geo.erasesize); if (!volume->pack) { - fdbg("ERROR: Failed to allocate an I/O block buffer\n"); + ferr("ERROR: Failed to allocate an I/O block buffer\n"); ret = -ENOMEM; goto errout_with_cache; } @@ -231,7 +231,7 @@ int nxffs_initialize(FAR struct mtd_dev_s *mtd) ret = nxffs_blockstats(volume, &stats); if (ret < 0) { - fdbg("ERROR: Failed to collect block statistics: %d\n", -ret); + ferr("ERROR: Failed to collect block statistics: %d\n", -ret); goto errout_with_buffer; } @@ -247,17 +247,17 @@ int nxffs_initialize(FAR struct mtd_dev_s *mtd) ret = nxffs_reformat(volume); if (ret < 0) { - fdbg("ERROR: Failed to reformat the volume: %d\n", -ret); + ferr("ERROR: Failed to reformat the volume: %d\n", -ret); goto errout_with_buffer; } /* Get statistics on the re-formatted volume */ -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_FS) ret = nxffs_blockstats(volume, &stats); if (ret < 0) { - fdbg("ERROR: Failed to collect block statistics: %d\n", -ret); + ferr("ERROR: Failed to collect block statistics: %d\n", -ret); goto errout_with_buffer; } #endif @@ -274,21 +274,21 @@ int nxffs_initialize(FAR struct mtd_dev_s *mtd) /* We may need to format the volume. Try that before giving up. */ - fdbg("WARNING: Failed to calculate file system limits: %d\n", -ret); + fwarn("WARNING: Failed to calculate file system limits: %d\n", -ret); ret = nxffs_reformat(volume); if (ret < 0) { - fdbg("ERROR: Failed to reformat the volume: %d\n", -ret); + ferr("ERROR: Failed to reformat the volume: %d\n", -ret); goto errout_with_buffer; } /* Get statistics on the re-formatted volume */ -#if defined(CONFIG_NXFFS_SCAN_VOLUME) && defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_FS) +#if defined(CONFIG_NXFFS_SCAN_VOLUME) && defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_FS) ret = nxffs_blockstats(volume, &stats); if (ret < 0) { - fdbg("ERROR: Failed to collect block statistics: %d\n", -ret); + ferr("ERROR: Failed to collect block statistics: %d\n", -ret); goto errout_with_buffer; } #endif @@ -303,7 +303,7 @@ int nxffs_initialize(FAR struct mtd_dev_s *mtd) /* Now give up */ - fdbg("ERROR: Failed to calculate file system limits: %d\n", -ret); + ferr("ERROR: Failed to calculate file system limits: %d\n", -ret); errout_with_buffer: kmm_free(volume->pack); @@ -356,7 +356,7 @@ int nxffs_limits(FAR struct nxffs_volume_s *volume) ret = nxffs_validblock(volume, &block); if (ret < 0) { - fdbg("ERROR: Failed to find a valid block: %d\n", -ret); + ferr("ERROR: Failed to find a valid block: %d\n", -ret); return ret; } @@ -374,7 +374,7 @@ int nxffs_limits(FAR struct nxffs_volume_s *volume) if (ret != -ENOENT) { - fdbg("ERROR: nxffs_nextentry failed: %d\n", -ret); + ferr("ERROR: nxffs_nextentry failed: %d\n", -ret); return ret; } @@ -383,7 +383,7 @@ int nxffs_limits(FAR struct nxffs_volume_s *volume) * the location of the free FLASH region. */ - fvdbg("No inodes found\n"); + finfo("No inodes found\n"); noinodes = true; } else @@ -391,7 +391,7 @@ int nxffs_limits(FAR struct nxffs_volume_s *volume) /* Save the offset to the first inode */ volume->inoffset = entry.hoffset; - fvdbg("First inode at offset %d\n", volume->inoffset); + finfo("First inode at offset %d\n", volume->inoffset); /* Discard this entry and set the next offset. */ @@ -411,7 +411,7 @@ int nxffs_limits(FAR struct nxffs_volume_s *volume) nxffs_freeentry(&entry); } - fvdbg("Last inode before offset %d\n", offset); + finfo("Last inode before offset %d\n", offset); } /* No inodes were found after this offset. Now search for a block of @@ -435,11 +435,11 @@ int nxffs_limits(FAR struct nxffs_volume_s *volume) /* Yes.. the FLASH is full. Force the offsets to the end of FLASH */ volume->froffset = volume->nblocks * volume->geo.blocksize; - fvdbg("Assume no free FLASH, froffset: %d\n", volume->froffset); + finfo("Assume no free FLASH, froffset: %d\n", volume->froffset); if (noinodes) { volume->inoffset = volume->froffset; - fvdbg("No inodes, inoffset: %d\n", volume->inoffset); + finfo("No inodes, inoffset: %d\n", volume->inoffset); } return OK; @@ -447,7 +447,7 @@ int nxffs_limits(FAR struct nxffs_volume_s *volume) /* No? Then it is some other failure that we do not know how to handle */ - fdbg("ERROR: nxffs_getc failed: %d\n", -ch); + ferr("ERROR: nxffs_getc failed: %d\n", -ch); return ch; } @@ -468,11 +468,11 @@ int nxffs_limits(FAR struct nxffs_volume_s *volume) */ volume->froffset = offset; - fvdbg("Free FLASH region begins at offset: %d\n", volume->froffset); + finfo("Free FLASH region begins at offset: %d\n", volume->froffset); if (noinodes) { volume->inoffset = offset; - fvdbg("First inode at offset %d\n", volume->inoffset); + finfo("First inode at offset %d\n", volume->inoffset); } return OK; diff --git a/fs/nxffs/nxffs_inode.c b/fs/nxffs/nxffs_inode.c index bf4c7f5957024cb7db8675202232127f15a70491..2240c18313f2618283bf0d734a719e472dc4a337 100644 --- a/fs/nxffs/nxffs_inode.c +++ b/fs/nxffs/nxffs_inode.c @@ -125,7 +125,7 @@ static int nxffs_rdentry(FAR struct nxffs_volume_s *volume, off_t offset, entry->name = (FAR char *)kmm_malloc(namlen + 1); if (!entry->name) { - fdbg("ERROR: Failed to allocate name, namlen: %d\n", namlen); + ferr("ERROR: Failed to allocate name, namlen: %d\n", namlen); ret = -ENOMEM; goto errout_no_offset; } @@ -141,7 +141,7 @@ static int nxffs_rdentry(FAR struct nxffs_volume_s *volume, off_t offset, ret = nxffs_rdcache(volume, volume->ioblock); if (ret < 0) { - fdbg("ERROR: nxffsx_rdcache failed: %d\n", -ret); + ferr("ERROR: nxffsx_rdcache failed: %d\n", -ret); goto errout_with_name; } @@ -155,7 +155,7 @@ static int nxffs_rdentry(FAR struct nxffs_volume_s *volume, off_t offset, crc = crc32part((FAR const uint8_t *)entry->name, namlen, crc); if (crc != ecrc) { - fdbg("ERROR: CRC entry: %08x CRC calculated: %08x\n", ecrc, crc); + ferr("ERROR: CRC entry: %08x CRC calculated: %08x\n", ecrc, crc); ret = -EIO; goto errout_with_name; } @@ -271,7 +271,7 @@ int nxffs_nextentry(FAR struct nxffs_volume_s *volume, off_t offset, ch = nxffs_getc(volume, SIZEOF_NXFFS_INODE_HDR - nmagic); if (ch < 0) { - fdbg("ERROR: nxffs_getc failed: %d\n", -ch); + ferr("ERROR: nxffs_getc failed: %d\n", -ch); return ch; } @@ -286,7 +286,7 @@ int nxffs_nextentry(FAR struct nxffs_volume_s *volume, off_t offset, if (++nerased >= NXFFS_NERASED) { - fvdbg("No entry found\n"); + finfo("No entry found\n"); return -ENOENT; } } @@ -337,7 +337,7 @@ int nxffs_nextentry(FAR struct nxffs_volume_s *volume, off_t offset, ret = nxffs_rdentry(volume, offset, entry); if (ret == OK) { - fvdbg("Found a valid fileheader, offset: %d\n", offset); + finfo("Found a valid fileheader, offset: %d\n", offset); return OK; } @@ -396,7 +396,7 @@ int nxffs_findinode(FAR struct nxffs_volume_s *volume, FAR const char *name, ret = nxffs_nextentry(volume, offset, entry); if (ret < 0) { - fvdbg("No inode found: %d\n", -ret); + finfo("No inode found: %d\n", -ret); return ret; } diff --git a/fs/nxffs/nxffs_ioctl.c b/fs/nxffs/nxffs_ioctl.c index da0752320a3e3d7ac97c56bd6a26b80bf58386ee..bbe6bbd745e5a561b851dd4dd14183c7a0d9f9b2 100644 --- a/fs/nxffs/nxffs_ioctl.c +++ b/fs/nxffs/nxffs_ioctl.c @@ -69,7 +69,7 @@ int nxffs_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR struct nxffs_volume_s *volume; int ret; - fvdbg("cmd: %d arg: %08lx\n", cmd, arg); + finfo("cmd: %d arg: %08lx\n", cmd, arg); /* Sanity checks */ @@ -88,7 +88,7 @@ int nxffs_ioctl(FAR struct file *filep, int cmd, unsigned long arg) if (ret != OK) { ret = -get_errno(); - fdbg("ERROR: sem_wait failed: %d\n", ret); + ferr("ERROR: sem_wait failed: %d\n", ret); goto errout; } @@ -96,13 +96,13 @@ int nxffs_ioctl(FAR struct file *filep, int cmd, unsigned long arg) if (cmd == FIOC_REFORMAT) { - fvdbg("Reformat command\n"); + finfo("Reformat command\n"); /* We cannot reformat the volume if there are any open inodes */ if (volume->ofiles) { - fdbg("ERROR: Open files\n"); + ferr("ERROR: Open files\n"); ret = -EBUSY; goto errout_with_semaphore; } @@ -114,7 +114,7 @@ int nxffs_ioctl(FAR struct file *filep, int cmd, unsigned long arg) else if (cmd == FIOC_OPTIMIZE) { - fvdbg("Optimize command\n"); + finfo("Optimize command\n"); /* Pack the volume */ diff --git a/fs/nxffs/nxffs_open.c b/fs/nxffs/nxffs_open.c index 2ac1249e06a364b723e1b415f4ac271ab7181f3a..6a03207e91292b5f9ecaa177fdad10a2765b0ae4 100644 --- a/fs/nxffs/nxffs_open.c +++ b/fs/nxffs/nxffs_open.c @@ -345,7 +345,7 @@ static inline int nxffs_wrname(FAR struct nxffs_volume_s *volume, ret = nxffs_rdcache(volume, volume->ioblock); if (ret < 0) { - fdbg("ERROR: Failed to read inode name block %d: %d\n", + ferr("ERROR: Failed to read inode name block %d: %d\n", volume->ioblock, -ret); return ret; } @@ -356,7 +356,7 @@ static inline int nxffs_wrname(FAR struct nxffs_volume_s *volume, ret = nxffs_wrcache(volume); if (ret < 0) { - fdbg("ERROR: Failed to write inode header block %d: %d\n", + ferr("ERROR: Failed to write inode header block %d: %d\n", volume->ioblock, -ret); } @@ -391,7 +391,7 @@ static inline int nxffs_wropen(FAR struct nxffs_volume_s *volume, ret = sem_wait(&volume->wrsem); if (ret != OK) { - fdbg("ERROR: sem_wait failed: %d\n", ret); + ferr("ERROR: sem_wait failed: %d\n", ret); ret = -get_errno(); goto errout; } @@ -404,7 +404,7 @@ static inline int nxffs_wropen(FAR struct nxffs_volume_s *volume, ret = sem_wait(&volume->exclsem); if (ret != OK) { - fdbg("ERROR: sem_wait failed: %d\n", ret); + ferr("ERROR: sem_wait failed: %d\n", ret); ret = -get_errno(); goto errout_with_wrsem; } @@ -429,7 +429,7 @@ static inline int nxffs_wropen(FAR struct nxffs_volume_s *volume, * Limitation: Files cannot be open both for reading and writing. */ - fdbg("ERROR: File is open for reading\n"); + ferr("ERROR: File is open for reading\n"); ret = -ENOSYS; goto errout_with_exclsem; } @@ -440,7 +440,7 @@ static inline int nxffs_wropen(FAR struct nxffs_volume_s *volume, else if ((oflags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL)) { - fdbg("ERROR: File exists, can't create O_EXCL\n"); + ferr("ERROR: File exists, can't create O_EXCL\n"); ret = -EEXIST; goto errout_with_exclsem; } @@ -466,7 +466,7 @@ static inline int nxffs_wropen(FAR struct nxffs_volume_s *volume, else { - fdbg("ERROR: File %s exists and we were not asked to truncate it\n"); + ferr("ERROR: File %s exists and we were not asked to truncate it\n"); ret = -ENOSYS; goto errout_with_exclsem; } @@ -478,7 +478,7 @@ static inline int nxffs_wropen(FAR struct nxffs_volume_s *volume, if ((oflags & O_CREAT) == 0) { - fdbg("ERROR: Not asked to create the file\n"); + ferr("ERROR: Not asked to create the file\n"); ret = -ENOENT; goto errout_with_exclsem; } @@ -488,7 +488,7 @@ static inline int nxffs_wropen(FAR struct nxffs_volume_s *volume, namlen = strlen(name); if (namlen > CONFIG_NXFFS_MAXNAMLEN) { - fdbg("ERROR: Name is too long: %d\n", namlen); + ferr("ERROR: Name is too long: %d\n", namlen); ret = -EINVAL; goto errout_with_exclsem; } @@ -562,7 +562,7 @@ static inline int nxffs_wropen(FAR struct nxffs_volume_s *volume, if (ret != -ENOSPC || packed) { - fdbg("ERROR: Failed to find inode header memory: %d\n", -ret); + ferr("ERROR: Failed to find inode header memory: %d\n", -ret); goto errout_with_name; } @@ -573,7 +573,7 @@ static inline int nxffs_wropen(FAR struct nxffs_volume_s *volume, ret = nxffs_pack(volume); if (ret < 0) { - fdbg("ERROR: Failed to pack the volume: %d\n", -ret); + ferr("ERROR: Failed to pack the volume: %d\n", -ret); goto errout_with_name; } @@ -609,7 +609,7 @@ static inline int nxffs_wropen(FAR struct nxffs_volume_s *volume, ret = nxffs_wrname(volume, &wrfile->ofile.entry, namlen); if (ret < 0) { - fdbg("ERROR: Failed to write the inode name: %d\n", -ret); + ferr("ERROR: Failed to write the inode name: %d\n", -ret); goto errout_with_name; } @@ -628,7 +628,7 @@ static inline int nxffs_wropen(FAR struct nxffs_volume_s *volume, if (ret != -ENOSPC || packed) { - fdbg("ERROR: Failed to find inode name memory: %d\n", -ret); + ferr("ERROR: Failed to find inode name memory: %d\n", -ret); goto errout_with_name; } @@ -639,7 +639,7 @@ static inline int nxffs_wropen(FAR struct nxffs_volume_s *volume, ret = nxffs_pack(volume); if (ret < 0) { - fdbg("ERROR: Failed to pack the volume: %d\n", -ret); + ferr("ERROR: Failed to pack the volume: %d\n", -ret); goto errout_with_name; } @@ -702,7 +702,7 @@ static inline int nxffs_rdopen(FAR struct nxffs_volume_s *volume, ret = sem_wait(&volume->exclsem); if (ret != OK) { - fdbg("ERROR: sem_wait failed: %d\n", ret); + ferr("ERROR: sem_wait failed: %d\n", ret); ret = -get_errno(); goto errout; } @@ -718,7 +718,7 @@ static inline int nxffs_rdopen(FAR struct nxffs_volume_s *volume, if ((ofile->oflags & O_WROK) != 0) { - fdbg("ERROR: File is open for writing\n"); + ferr("ERROR: File is open for writing\n"); ret = -ENOSYS; goto errout_with_exclsem; } @@ -726,7 +726,7 @@ static inline int nxffs_rdopen(FAR struct nxffs_volume_s *volume, /* Just increment the reference count on the ofile */ ofile->crefs++; - fvdbg("crefs: %d\n", ofile->crefs); + finfo("crefs: %d\n", ofile->crefs); } /* The file has not yet been opened. @@ -741,7 +741,7 @@ static inline int nxffs_rdopen(FAR struct nxffs_volume_s *volume, ofile = (FAR struct nxffs_ofile_s *)kmm_zalloc(sizeof(struct nxffs_ofile_s)); if (!ofile) { - fdbg("ERROR: ofile allocation failed\n"); + ferr("ERROR: ofile allocation failed\n"); ret = -ENOMEM; goto errout_with_exclsem; } @@ -756,7 +756,7 @@ static inline int nxffs_rdopen(FAR struct nxffs_volume_s *volume, ret = nxffs_findinode(volume, name, &ofile->entry); if (ret != OK) { - fvdbg("Inode '%s' not found: %d\n", name, -ret); + finfo("Inode '%s' not found: %d\n", name, -ret); goto errout_with_ofile; } @@ -817,7 +817,7 @@ static inline void nxffs_remofile(FAR struct nxffs_volume_s *volume, } else { - fdbg("ERROR: Open inode %p not found\n", ofile); + ferr("ERROR: Open inode %p not found\n", ofile); } } @@ -878,7 +878,7 @@ static inline int nxffs_wrclose(FAR struct nxffs_volume_s *volume, ret = nxffs_wrblkhdr(volume, wrfile); if (ret < 0) { - fdbg("ERROR: Failed to write the final block of the file: %d\n", -ret); + ferr("ERROR: Failed to write the final block of the file: %d\n", -ret); goto errout; } } @@ -892,12 +892,12 @@ static inline int nxffs_wrclose(FAR struct nxffs_volume_s *volume, if (wrfile->truncate && wrfile->ofile.entry.name) { - fvdbg("Removing old file: %s\n", wrfile->ofile.entry.name); + finfo("Removing old file: %s\n", wrfile->ofile.entry.name); ret = nxffs_rminode(volume, wrfile->ofile.entry.name); if (ret < 0) { - fdbg("ERROR: nxffs_rminode failed: %d\n", -ret); + ferr("ERROR: nxffs_rminode failed: %d\n", -ret); goto errout; } } @@ -1000,7 +1000,7 @@ int nxffs_open(FAR struct file *filep, FAR const char *relpath, FAR struct nxffs_ofile_s *ofile = NULL; int ret; - fvdbg("Open '%s'\n", relpath); + finfo("Open '%s'\n", relpath); /* Sanity checks */ @@ -1028,7 +1028,7 @@ int nxffs_open(FAR struct file *filep, FAR const char *relpath, { case 0: default: - fdbg("ERROR: One of O_WRONLY/O_RDONLY must be provided\n"); + ferr("ERROR: One of O_WRONLY/O_RDONLY must be provided\n"); return -EINVAL; case O_WROK: @@ -1040,7 +1040,7 @@ int nxffs_open(FAR struct file *filep, FAR const char *relpath, break; case O_WROK | O_RDOK: - fdbg("ERROR: O_RDWR is not supported\n"); + ferr("ERROR: O_RDWR is not supported\n"); return -ENOSYS; } @@ -1064,16 +1064,16 @@ int nxffs_open(FAR struct file *filep, FAR const char *relpath, int nxffs_dup(FAR const struct file *oldp, FAR struct file *newp) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_ASSERTIONS FAR struct nxffs_volume_s *volume; #endif FAR struct nxffs_ofile_s *ofile; - fvdbg("Dup %p->%p\n", oldp, newp); + finfo("Dup %p->%p\n", oldp, newp); /* Sanity checks */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_ASSERTIONS DEBUGASSERT(oldp->f_priv == NULL && oldp->f_inode != NULL); /* Get the mountpoint private data from the NuttX inode reference in the @@ -1126,7 +1126,7 @@ int nxffs_close(FAR struct file *filep) FAR struct nxffs_ofile_s *ofile; int ret; - fvdbg("Closing\n"); + finfo("Closing\n"); /* Sanity checks */ @@ -1149,7 +1149,7 @@ int nxffs_close(FAR struct file *filep) if (ret != OK) { ret = -get_errno(); - fdbg("ERROR: sem_wait failed: %d\n", ret); + ferr("ERROR: sem_wait failed: %d\n", ret); goto errout; } @@ -1230,7 +1230,7 @@ int nxffs_wrinode(FAR struct nxffs_volume_s *volume, ret = nxffs_rdcache(volume, volume->ioblock); if (ret < 0) { - fdbg("ERROR: Failed to read inode header block %d: %d\n", + ferr("ERROR: Failed to read inode header block %d: %d\n", volume->ioblock, -ret); goto errout; } @@ -1269,7 +1269,7 @@ int nxffs_wrinode(FAR struct nxffs_volume_s *volume, ret = nxffs_wrcache(volume); if (ret < 0) { - fdbg("ERROR: Failed to write inode header block %d: %d\n", + ferr("ERROR: Failed to write inode header block %d: %d\n", volume->ioblock, -ret); } diff --git a/fs/nxffs/nxffs_pack.c b/fs/nxffs/nxffs_pack.c index 0e816b359d27921de0a698505234d13005af886d..134ee430a63da248c604b823b55ecd9e39796a3a 100644 --- a/fs/nxffs/nxffs_pack.c +++ b/fs/nxffs/nxffs_pack.c @@ -331,7 +331,7 @@ static inline int nxffs_startpos(FAR struct nxffs_volume_s *volume, ret = nxffs_nextblock(volume, offset, &blkentry); if (ret < 0) { - fdbg("ERROR: Failed to find next data block: %d\n", -ret); + ferr("ERROR: Failed to find next data block: %d\n", -ret); return ret; } @@ -421,7 +421,7 @@ static int nxffs_srcsetup(FAR struct nxffs_volume_s *volume, int ret = nxffs_rdblkhdr(volume, offset, &pack->src.blklen); if (ret < 0) { - fdbg("ERROR: Failed to verify the data block header: %d\n", -ret); + ferr("ERROR: Failed to verify the data block header: %d\n", -ret); } return ret; @@ -706,7 +706,7 @@ static int nxffs_wrinodehdr(FAR struct nxffs_volume_s *volume, ret = nxffs_updateinode(volume, &pack->dest.entry); if (ret < 0) { - fdbg("ERROR: Failed to update inode info: %s\n", -ret); + ferr("ERROR: Failed to update inode info: %s\n", -ret); } } @@ -849,7 +849,7 @@ static int nxffs_endsrcblock(FAR struct nxffs_volume_s *volume, ret = nxffs_nextblock(volume, offset, &blkentry); if (ret < 0) { - fdbg("ERROR: Failed to find next data block: %d\n", -ret); + ferr("ERROR: Failed to find next data block: %d\n", -ret); return ret; } @@ -893,7 +893,7 @@ static inline int nxffs_packblock(FAR struct nxffs_volume_s *volume, ret = nxffs_srcsetup(volume, pack, pack->src.entry.doffset); if (ret < 0) { - fdbg("ERROR: Failed to configure the src stream: %d\n", -ret); + ferr("ERROR: Failed to configure the src stream: %d\n", -ret); return ret; } } @@ -919,7 +919,7 @@ static inline int nxffs_packblock(FAR struct nxffs_volume_s *volume, } else { - fdbg("ERROR: Failed to configure the dest stream: %d\n", -ret); + ferr("ERROR: Failed to configure the dest stream: %d\n", -ret); return ret; } } @@ -1011,7 +1011,7 @@ static inline int nxffs_packblock(FAR struct nxffs_volume_s *volume, } else { - fdbg("ERROR: Failed to configure the dest stream: %d\n", -ret); + ferr("ERROR: Failed to configure the dest stream: %d\n", -ret); return ret; } } @@ -1146,7 +1146,7 @@ static inline int nxffs_packwriter(FAR struct nxffs_volume_s *volume, ret = nxffs_srcsetup(volume, pack, pack->src.entry.doffset); if (ret < 0) { - fdbg("ERROR: Failed to configure the src stream: %d\n", -ret); + ferr("ERROR: Failed to configure the src stream: %d\n", -ret); return ret; } } @@ -1172,7 +1172,7 @@ static inline int nxffs_packwriter(FAR struct nxffs_volume_s *volume, } else { - fdbg("ERROR: Failed to configure the dest stream: %d\n", -ret); + ferr("ERROR: Failed to configure the dest stream: %d\n", -ret); return ret; } } @@ -1380,7 +1380,7 @@ int nxffs_pack(FAR struct nxffs_volume_s *volume) } else { - fdbg("ERROR: Failed to find a packing position: %d\n", -ret); + ferr("ERROR: Failed to find a packing position: %d\n", -ret); return ret; } } @@ -1418,7 +1418,7 @@ start_pack: ret = MTD_BREAD(volume->mtd, pack.block0, volume->blkper, volume->pack); if (ret < 0) { - fdbg("ERROR: Failed to read erase block %d: %d\n", eblock, -ret); + ferr("ERROR: Failed to read erase block %d: %d\n", eblock, -ret); goto errout_with_pack; } @@ -1446,7 +1446,7 @@ start_pack: { /* Force a the block to be an NXFFS bad block */ - fdbg("ERROR: Failed to read block %d: %d\n", block, ret); + ferr("ERROR: Failed to read block %d: %d\n", block, ret); nxffs_blkinit(volume, pack.iobuffer, BLOCK_STATE_BAD); } } @@ -1514,7 +1514,7 @@ start_pack: { /* Otherwise, something really bad happened */ - fdbg("ERROR: Failed to pack into block %d: %d\n", + ferr("ERROR: Failed to pack into block %d: %d\n", block, ret); goto errout_with_pack; } @@ -1546,7 +1546,7 @@ start_pack: { /* Otherwise, something really bad happened */ - fdbg("ERROR: Failed to pack into block %d: %d\n", + ferr("ERROR: Failed to pack into block %d: %d\n", block, ret); goto errout_with_pack; } @@ -1580,7 +1580,7 @@ start_pack: ret = MTD_ERASE(volume->mtd, eblock, 1); if (ret < 0) { - fdbg("ERROR: Failed to erase block %d [%d]: %d\n", + ferr("ERROR: Failed to erase block %d [%d]: %d\n", eblock, pack.block0, -ret); goto errout_with_pack; } @@ -1590,7 +1590,7 @@ start_pack: ret = MTD_BWRITE(volume->mtd, pack.block0, volume->blkper, volume->pack); if (ret < 0) { - fdbg("ERROR: Failed to write erase block %d [%d]: %d\n", + ferr("ERROR: Failed to write erase block %d [%d]: %d\n", eblock, pack.block0, -ret); goto errout_with_pack; } diff --git a/fs/nxffs/nxffs_read.c b/fs/nxffs/nxffs_read.c index c327013d8291b3f2ae2f6130e2593f5a4b4690f6..4a08a7998bab7564f5e5fbc5cdbe89e9f1199c84 100644 --- a/fs/nxffs/nxffs_read.c +++ b/fs/nxffs/nxffs_read.c @@ -106,7 +106,7 @@ static ssize_t nxffs_rdseek(FAR struct nxffs_volume_s *volume, ret = nxffs_nextblock(volume, offset, blkentry); if (ret < 0) { - fdbg("ERROR: nxffs_nextblock failed: %d\n", -ret); + ferr("ERROR: nxffs_nextblock failed: %d\n", -ret); return ret; } @@ -150,7 +150,7 @@ ssize_t nxffs_read(FAR struct file *filep, FAR char *buffer, size_t buflen) size_t readsize; int ret; - fvdbg("Read %d bytes from offset %d\n", buflen, filep->f_pos); + finfo("Read %d bytes from offset %d\n", buflen, filep->f_pos); /* Sanity checks */ @@ -173,7 +173,7 @@ ssize_t nxffs_read(FAR struct file *filep, FAR char *buffer, size_t buflen) if (ret != OK) { ret = -get_errno(); - fdbg("ERROR: sem_wait failed: %d\n", ret); + ferr("ERROR: sem_wait failed: %d\n", ret); goto errout; } @@ -181,7 +181,7 @@ ssize_t nxffs_read(FAR struct file *filep, FAR char *buffer, size_t buflen) if ((ofile->oflags & O_RDOK) == 0) { - fdbg("ERROR: File not open for read access\n"); + ferr("ERROR: File not open for read access\n"); ret = -EACCES; goto errout_with_semaphore; } @@ -205,7 +205,7 @@ ssize_t nxffs_read(FAR struct file *filep, FAR char *buffer, size_t buflen) ret = nxffs_rdseek(volume, &ofile->entry, filep->f_pos, &blkentry); if (ret < 0) { - fdbg("ERROR: nxffs_rdseek failed: %d\n", -ret); + ferr("ERROR: nxffs_rdseek failed: %d\n", -ret); ret = -EACCES; goto errout_with_semaphore; } @@ -289,7 +289,7 @@ int nxffs_nextblock(FAR struct nxffs_volume_s *volume, off_t offset, ch = nxffs_getc(volume, SIZEOF_NXFFS_DATA_HDR - nmagic); if (ch < 0) { - fdbg("ERROR: nxffs_getc failed: %d\n", -ch); + ferr("ERROR: nxffs_getc failed: %d\n", -ch); return ch; } @@ -304,7 +304,7 @@ int nxffs_nextblock(FAR struct nxffs_volume_s *volume, off_t offset, if (++nerased >= NXFFS_NERASED) { - fvdbg("No entry found\n"); + finfo("No entry found\n"); return -ENOENT; } } @@ -358,7 +358,7 @@ int nxffs_nextblock(FAR struct nxffs_volume_s *volume, off_t offset, ret = nxffs_rdblkhdr(volume, blkentry->hoffset, &blkentry->datlen); if (ret == OK) { - fvdbg("Found a valid data block, offset: %d datlen: %d\n", + finfo("Found a valid data block, offset: %d datlen: %d\n", blkentry->hoffset, blkentry->datlen); return OK; } @@ -412,7 +412,7 @@ int nxffs_rdblkhdr(FAR struct nxffs_volume_s *volume, off_t offset, ret = nxffs_rdcache(volume, volume->ioblock); if (ret < 0) { - fdbg("ERROR: Failed to read data into cache: %d\n", ret); + ferr("ERROR: Failed to read data into cache: %d\n", ret); return ret; } @@ -433,7 +433,7 @@ int nxffs_rdblkhdr(FAR struct nxffs_volume_s *volume, off_t offset, if ((uint32_t)doffset + (uint32_t)dlen > (uint32_t)volume->geo.blocksize) { - fdbg("ERROR: Data length=%d is unreasonable at offset=%d\n", dlen, doffset); + ferr("ERROR: Data length=%d is unreasonable at offset=%d\n", dlen, doffset); return -EIO; } @@ -447,7 +447,7 @@ int nxffs_rdblkhdr(FAR struct nxffs_volume_s *volume, off_t offset, if (crc != ecrc) { - fdbg("ERROR: CRC failure\n"); + ferr("ERROR: CRC failure\n"); return -EIO; } diff --git a/fs/nxffs/nxffs_reformat.c b/fs/nxffs/nxffs_reformat.c index cf2639a04786fb6a5fb53ecceee0e9941435843b..8c3f73222c392ad81b3f98a78674f1e778f52bea 100644 --- a/fs/nxffs/nxffs_reformat.c +++ b/fs/nxffs/nxffs_reformat.c @@ -96,7 +96,7 @@ static int nxffs_format(FAR struct nxffs_volume_s *volume) ret = MTD_ERASE(volume->mtd, eblock, 1); if (ret < 0) { - fdbg("ERROR: Erase block %d failed: %d\n", eblock, ret); + ferr("ERROR: Erase block %d failed: %d\n", eblock, ret); return ret; } @@ -106,7 +106,7 @@ static int nxffs_format(FAR struct nxffs_volume_s *volume) nxfrd = MTD_BWRITE(volume->mtd, lblock, volume->blkper, volume->pack); if (nxfrd != volume->blkper) { - fdbg("ERROR: Write erase block %d failed: %d\n", lblock, nxfrd); + ferr("ERROR: Write erase block %d failed: %d\n", lblock, nxfrd); return -EIO; } } @@ -157,7 +157,7 @@ static int nxffs_badblocks(FAR struct nxffs_volume_s *volume) nxfrd = MTD_BREAD(volume->mtd, lblock, volume->blkper, volume->pack); if (nxfrd != volume->blkper) { - fdbg("ERROR: Read erase block %d failed: %d\n", lblock, nxfrd); + ferr("ERROR: Read erase block %d failed: %d\n", lblock, nxfrd); return -EIO; } #endif @@ -195,7 +195,7 @@ static int nxffs_badblocks(FAR struct nxffs_volume_s *volume) * read a block with uncorrectable bit errors. */ - fdbg("ERROR: Failed to read block %d: %d\n", + ferr("ERROR: Failed to read block %d: %d\n", block, (int)nxfrd); good = false; @@ -244,7 +244,7 @@ static int nxffs_badblocks(FAR struct nxffs_volume_s *volume) nxfrd = MTD_BWRITE(volume->mtd, lblock, volume->blkper, volume->pack); if (nxfrd != volume->blkper) { - fdbg("ERROR: Write erase block %d failed: %d\n", lblock, nxfrd); + ferr("ERROR: Write erase block %d failed: %d\n", lblock, nxfrd); return -EIO; } } @@ -283,7 +283,7 @@ int nxffs_reformat(FAR struct nxffs_volume_s *volume) ret = nxffs_format(volume); if (ret < 0) { - fdbg("ERROR: Failed to reformat the volume: %d\n", -ret); + ferr("ERROR: Failed to reformat the volume: %d\n", -ret); return ret; } @@ -292,7 +292,7 @@ int nxffs_reformat(FAR struct nxffs_volume_s *volume) ret = nxffs_badblocks(volume); if (ret < 0) { - fdbg("ERROR: Bad block check failed: %d\n", -ret); + ferr("ERROR: Bad block check failed: %d\n", -ret); } return ret; diff --git a/fs/nxffs/nxffs_stat.c b/fs/nxffs/nxffs_stat.c index b1dbdcbaf9b97c9f9d5eb375c0343ede9af3df20..bbbd2a82a7ee3bf0932ea09d9a0d4870a2e0afc9 100644 --- a/fs/nxffs/nxffs_stat.c +++ b/fs/nxffs/nxffs_stat.c @@ -70,7 +70,7 @@ int nxffs_statfs(FAR struct inode *mountpt, FAR struct statfs *buf) FAR struct nxffs_volume_s *volume; int ret; - fvdbg("Entry\n"); + finfo("Entry\n"); /* Sanity checks */ @@ -116,7 +116,7 @@ int nxffs_stat(FAR struct inode *mountpt, FAR const char *relpath, struct nxffs_entry_s entry; int ret; - fvdbg("Entry\n"); + finfo("Entry\n"); /* Sanity checks */ @@ -145,7 +145,7 @@ int nxffs_stat(FAR struct inode *mountpt, FAR const char *relpath, ret = nxffs_findinode(volume, relpath, &entry); if (ret < 0) { - fdbg("ERROR: Inode '%s' not found: %d\n", -ret); + ferr("ERROR: Inode '%s' not found: %d\n", -ret); goto errout_with_semaphore; } diff --git a/fs/nxffs/nxffs_unlink.c b/fs/nxffs/nxffs_unlink.c index bc42b5a317451a423278e095cd2114d57760ec89..2ca09dc970d8d1f1f1bd9893aa24c0010bbf0e37 100644 --- a/fs/nxffs/nxffs_unlink.c +++ b/fs/nxffs/nxffs_unlink.c @@ -86,7 +86,7 @@ int nxffs_rminode(FAR struct nxffs_volume_s *volume, FAR const char *name) { /* We can't remove the inode if it is open */ - fdbg("ERROR: Inode '%s' is open\n", name); + ferr("ERROR: Inode '%s' is open\n", name); ret = -EBUSY; goto errout; } @@ -96,7 +96,7 @@ int nxffs_rminode(FAR struct nxffs_volume_s *volume, FAR const char *name) ret = nxffs_findinode(volume, name, &entry); if (ret < 0) { - fdbg("ERROR: Inode '%s' not found\n", name); + ferr("ERROR: Inode '%s' not found\n", name); goto errout; } @@ -111,7 +111,7 @@ int nxffs_rminode(FAR struct nxffs_volume_s *volume, FAR const char *name) ret = nxffs_rdcache(volume, volume->ioblock); if (ret < 0) { - fdbg("ERROR: Failed to read block %d into cache: %d\n", + ferr("ERROR: Failed to read block %d into cache: %d\n", volume->ioblock, ret); goto errout_with_entry; } @@ -126,7 +126,7 @@ int nxffs_rminode(FAR struct nxffs_volume_s *volume, FAR const char *name) ret = nxffs_wrcache(volume); if (ret < 0) { - fdbg("ERROR: Failed to write block %d: %d\n", + ferr("ERROR: Failed to write block %d: %d\n", volume->ioblock, ret); } @@ -148,7 +148,7 @@ int nxffs_unlink(FAR struct inode *mountpt, FAR const char *relpath) FAR struct nxffs_volume_s *volume; int ret; - fvdbg("Entry\n"); + finfo("Entry\n"); /* Sanity checks */ diff --git a/fs/nxffs/nxffs_write.c b/fs/nxffs/nxffs_write.c index 423c61c9f6ea670532e85d34180ac38b89e2a078..1ce11f42866403cf83a013c46da8bad1737ac6c5 100644 --- a/fs/nxffs/nxffs_write.c +++ b/fs/nxffs/nxffs_write.c @@ -239,7 +239,7 @@ static inline int nxffs_wralloc(FAR struct nxffs_volume_s *volume, if (ret != -ENOSPC || packed) { - fdbg("ERROR: Failed to find inode header memory: %d\n", -ret); + ferr("ERROR: Failed to find inode header memory: %d\n", -ret); return -ENOSPC; } @@ -250,7 +250,7 @@ static inline int nxffs_wralloc(FAR struct nxffs_volume_s *volume, ret = nxffs_pack(volume); if (ret < 0) { - fdbg("ERROR: Failed to pack the volume: %d\n", -ret); + ferr("ERROR: Failed to pack the volume: %d\n", -ret); return ret; } @@ -309,7 +309,7 @@ static inline int nxffs_reverify(FAR struct nxffs_volume_s *volume, if (crc != wrfile->crc) { - fdbg("ERROR: CRC failure\n"); + ferr("ERROR: CRC failure\n"); return -EIO; } } @@ -389,7 +389,7 @@ static inline ssize_t nxffs_wrappend(FAR struct nxffs_volume_s *volume, ret = nxffs_wrcache(volume); if (ret < 0) { - fdbg("ERROR: nxffs_wrcache failed: %d\n", -ret); + ferr("ERROR: nxffs_wrcache failed: %d\n", -ret); return ret; } } @@ -404,7 +404,7 @@ static inline ssize_t nxffs_wrappend(FAR struct nxffs_volume_s *volume, ret = nxffs_wrblkhdr(volume, wrfile); if (ret < 0) { - fdbg("ERROR: nxffs_wrblkdhr failed: %d\n", -ret); + ferr("ERROR: nxffs_wrblkdhr failed: %d\n", -ret); return ret; } } @@ -436,7 +436,7 @@ ssize_t nxffs_write(FAR struct file *filep, FAR const char *buffer, size_t bufle ssize_t total; int ret; - fvdbg("Write %d bytes to offset %d\n", buflen, filep->f_pos); + finfo("Write %d bytes to offset %d\n", buflen, filep->f_pos); /* Sanity checks */ @@ -459,7 +459,7 @@ ssize_t nxffs_write(FAR struct file *filep, FAR const char *buffer, size_t bufle if (ret != OK) { ret = -get_errno(); - fdbg("ERROR: sem_wait failed: %d\n", ret); + ferr("ERROR: sem_wait failed: %d\n", ret); goto errout; } @@ -467,7 +467,7 @@ ssize_t nxffs_write(FAR struct file *filep, FAR const char *buffer, size_t bufle if ((wrfile->ofile.oflags & O_WROK) == 0) { - fdbg("ERROR: File not open for write access\n"); + ferr("ERROR: File not open for write access\n"); ret = -EACCES; goto errout_with_semaphore; } @@ -490,7 +490,7 @@ ssize_t nxffs_write(FAR struct file *filep, FAR const char *buffer, size_t bufle ret = nxffs_wralloc(volume, wrfile, remaining); if (ret < 0) { - fdbg("ERROR: Failed to allocate a data block: %d\n", -ret); + ferr("ERROR: Failed to allocate a data block: %d\n", -ret); goto errout_with_semaphore; } } @@ -504,7 +504,7 @@ ssize_t nxffs_write(FAR struct file *filep, FAR const char *buffer, size_t bufle ret = nxffs_reverify(volume, wrfile); if (ret < 0) { - fdbg("ERROR: Failed to verify FLASH data block: %d\n", -ret); + ferr("ERROR: Failed to verify FLASH data block: %d\n", -ret); goto errout_with_semaphore; } @@ -515,7 +515,7 @@ ssize_t nxffs_write(FAR struct file *filep, FAR const char *buffer, size_t bufle nwritten = nxffs_wrappend(volume, wrfile, &buffer[total], remaining); if (nwritten < 0) { - fdbg("ERROR: Failed to append to FLASH to a data block: %d\n", -ret); + ferr("ERROR: Failed to append to FLASH to a data block: %d\n", -ret); goto errout_with_semaphore; } @@ -607,7 +607,7 @@ int nxffs_wrreserve(FAR struct nxffs_volume_s *volume, size_t size) { /* Return -ENOSPC to indicate that the volume is full */ - fdbg("ERROR: No space in last block\n"); + ferr("ERROR: No space in last block\n"); return -ENOSPC; } @@ -619,7 +619,7 @@ int nxffs_wrreserve(FAR struct nxffs_volume_s *volume, size_t size) ret = nxffs_validblock(volume, &volume->ioblock); if (ret < 0) { - fdbg("ERROR: No more valid blocks\n"); + ferr("ERROR: No more valid blocks\n"); return ret; } @@ -695,7 +695,7 @@ int nxffs_wrverify(FAR struct nxffs_volume_s *volume, size_t size) * the block has uncorrectable bit errors. */ - fdbg("ERROR: Failed to read block %d: %d\n", + ferr("ERROR: Failed to read block %d: %d\n", volume->ioblock, -ret); } @@ -754,7 +754,7 @@ int nxffs_wrverify(FAR struct nxffs_volume_s *volume, size_t size) ret = nxffs_validblock(volume, &volume->ioblock); if (ret < 0) { - fdbg("ERROR: No more valid blocks\n"); + ferr("ERROR: No more valid blocks\n"); return ret; } @@ -766,7 +766,7 @@ int nxffs_wrverify(FAR struct nxffs_volume_s *volume, size_t size) * the object. */ - fdbg("ERROR: Not enough memory left to hold the file header\n"); + ferr("ERROR: Not enough memory left to hold the file header\n"); return -ENOSPC; } @@ -812,7 +812,7 @@ int nxffs_wrblkhdr(FAR struct nxffs_volume_s *volume, ret = nxffs_wrcache(volume); if (ret < 0) { - fdbg("ERROR: nxffs_wrcache failed: %d\n", -ret); + ferr("ERROR: nxffs_wrcache failed: %d\n", -ret); goto errout; } diff --git a/fs/procfs/fs_procfs.c b/fs/procfs/fs_procfs.c index 506ab9fcb5412da70a2f8ab95323eee0e576eba8..b350809c9709f726bb0ee08aaae29222a4634979 100644 --- a/fs/procfs/fs_procfs.c +++ b/fs/procfs/fs_procfs.c @@ -322,7 +322,7 @@ static int procfs_open(FAR struct file *filep, FAR const char *relpath, { int x, ret = -ENOENT; - fvdbg("Open '%s'\n", relpath); + finfo("Open '%s'\n", relpath); /* Perform the stat based on the procfs_entry operations */ @@ -382,7 +382,7 @@ static ssize_t procfs_read(FAR struct file *filep, FAR char *buffer, FAR struct procfs_file_s *handler; ssize_t ret = 0; - fvdbg("buffer=%p buflen=%d\n", buffer, (int)buflen); + finfo("buffer=%p buflen=%d\n", buffer, (int)buflen); /* Recover our private data from the struct file instance */ @@ -406,7 +406,7 @@ static ssize_t procfs_write(FAR struct file *filep, FAR const char *buffer, FAR struct procfs_file_s *handler; ssize_t ret = 0; - fvdbg("buffer=%p buflen=%d\n", buffer, (int)buflen); + finfo("buffer=%p buflen=%d\n", buffer, (int)buflen); /* Recover our private data from the struct file instance */ @@ -429,7 +429,7 @@ static ssize_t procfs_write(FAR struct file *filep, FAR const char *buffer, static int procfs_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { - fvdbg("cmd: %d arg: %08lx\n", cmd, arg); + finfo("cmd: %d arg: %08lx\n", cmd, arg); /* No IOCTL commands supported */ @@ -448,7 +448,7 @@ static int procfs_dup(FAR const struct file *oldp, FAR struct file *newp) { FAR struct procfs_file_s *oldattr; - fvdbg("Dup %p->%p\n", oldp, newp); + finfo("Dup %p->%p\n", oldp, newp); /* Recover our private data from the old struct file instance */ @@ -476,7 +476,7 @@ static int procfs_opendir(FAR struct inode *mountpt, FAR const char *relpath, FAR void *priv = NULL; irqstate_t flags; - fvdbg("relpath: \"%s\"\n", relpath ? relpath : "NULL"); + finfo("relpath: \"%s\"\n", relpath ? relpath : "NULL"); DEBUGASSERT(mountpt && relpath && dir && !dir->u.procfs); /* The relative must be either: @@ -496,7 +496,7 @@ static int procfs_opendir(FAR struct inode *mountpt, FAR const char *relpath, if (!level0) { - fdbg("ERROR: Failed to allocate the level0 directory structure\n"); + ferr("ERROR: Failed to allocate the level0 directory structure\n"); return -ENOMEM; } @@ -575,7 +575,7 @@ static int procfs_opendir(FAR struct inode *mountpt, FAR const char *relpath, if (!level1) { - fdbg("ERROR: Failed to allocate the level0 directory structure\n"); + ferr("ERROR: Failed to allocate the level0 directory structure\n"); return -ENOMEM; } @@ -717,7 +717,7 @@ static int procfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir) * error -ENOENT */ - fvdbg("Entry %d: End of directory\n", index); + finfo("Entry %d: End of directory\n", index); ret = -ENOENT; } else @@ -757,7 +757,7 @@ static int procfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir) if (!tcb) { - fdbg("ERROR: PID %d is no longer valid\n", (int)pid); + ferr("ERROR: PID %d is no longer valid\n", (int)pid); return -ENOENT; } diff --git a/fs/procfs/fs_procfscpuload.c b/fs/procfs/fs_procfscpuload.c index 2f54ab841fecd15ba1aa863961be73463484a1f3..593c0c528125042394db011734941df013cc320c 100644 --- a/fs/procfs/fs_procfscpuload.c +++ b/fs/procfs/fs_procfscpuload.c @@ -138,7 +138,7 @@ static int cpuload_open(FAR struct file *filep, FAR const char *relpath, { FAR struct cpuload_file_s *attr; - fvdbg("Open '%s'\n", relpath); + finfo("Open '%s'\n", relpath); /* PROCFS is read-only. Any attempt to open with any kind of write * access is not permitted. @@ -148,7 +148,7 @@ static int cpuload_open(FAR struct file *filep, FAR const char *relpath, if ((oflags & O_WRONLY) != 0 || (oflags & O_RDONLY) == 0) { - fdbg("ERROR: Only O_RDONLY supported\n"); + ferr("ERROR: Only O_RDONLY supported\n"); return -EACCES; } @@ -156,7 +156,7 @@ static int cpuload_open(FAR struct file *filep, FAR const char *relpath, if (strcmp(relpath, "cpuload") != 0) { - fdbg("ERROR: relpath is '%s'\n", relpath); + ferr("ERROR: relpath is '%s'\n", relpath); return -ENOENT; } @@ -165,7 +165,7 @@ static int cpuload_open(FAR struct file *filep, FAR const char *relpath, attr = (FAR struct cpuload_file_s *)kmm_zalloc(sizeof(struct cpuload_file_s)); if (!attr) { - fdbg("ERROR: Failed to allocate file attributes\n"); + ferr("ERROR: Failed to allocate file attributes\n"); return -ENOMEM; } @@ -207,7 +207,7 @@ static ssize_t cpuload_read(FAR struct file *filep, FAR char *buffer, off_t offset; ssize_t ret; - fvdbg("buffer=%p buflen=%d\n", buffer, (int)buflen); + finfo("buffer=%p buflen=%d\n", buffer, (int)buflen); /* Recover our private data from the struct file instance */ @@ -288,7 +288,7 @@ static int cpuload_dup(FAR const struct file *oldp, FAR struct file *newp) FAR struct cpuload_file_s *oldattr; FAR struct cpuload_file_s *newattr; - fvdbg("Dup %p->%p\n", oldp, newp); + finfo("Dup %p->%p\n", oldp, newp); /* Recover our private data from the old struct file instance */ @@ -300,7 +300,7 @@ static int cpuload_dup(FAR const struct file *oldp, FAR struct file *newp) newattr = (FAR struct cpuload_file_s *)kmm_malloc(sizeof(struct cpuload_file_s)); if (!newattr) { - fdbg("ERROR: Failed to allocate file attributes\n"); + ferr("ERROR: Failed to allocate file attributes\n"); return -ENOMEM; } @@ -327,7 +327,7 @@ static int cpuload_stat(const char *relpath, struct stat *buf) if (strcmp(relpath, "cpuload") != 0) { - fdbg("ERROR: relpath is '%s'\n", relpath); + ferr("ERROR: relpath is '%s'\n", relpath); return -ENOENT; } diff --git a/fs/procfs/fs_procfskmm.c b/fs/procfs/fs_procfskmm.c index 3424338dc04893213f7cac08a77849179eb50829..ab0c6779ec5453ac1032a286ff285a3ed49c8eb7 100644 --- a/fs/procfs/fs_procfskmm.c +++ b/fs/procfs/fs_procfskmm.c @@ -137,7 +137,7 @@ static int kmm_open(FAR struct file *filep, FAR const char *relpath, { FAR struct kmm_file_s *procfile; - fvdbg("Open '%s'\n", relpath); + finfo("Open '%s'\n", relpath); /* PROCFS is read-only. Any attempt to open with any kind of write * access is not permitted. @@ -147,7 +147,7 @@ static int kmm_open(FAR struct file *filep, FAR const char *relpath, if ((oflags & O_WRONLY) != 0 || (oflags & O_RDONLY) == 0) { - fdbg("ERROR: Only O_RDONLY supported\n"); + ferr("ERROR: Only O_RDONLY supported\n"); return -EACCES; } @@ -155,7 +155,7 @@ static int kmm_open(FAR struct file *filep, FAR const char *relpath, if (strcmp(relpath, "kmm") != 0) { - fdbg("ERROR: relpath is '%s'\n", relpath); + ferr("ERROR: relpath is '%s'\n", relpath); return -ENOENT; } @@ -164,7 +164,7 @@ static int kmm_open(FAR struct file *filep, FAR const char *relpath, procfile = (FAR struct kmm_file_s *)kmm_zalloc(sizeof(struct kmm_file_s)); if (!procfile) { - fdbg("ERROR: Failed to allocate file attributes\n"); + ferr("ERROR: Failed to allocate file attributes\n"); return -ENOMEM; } @@ -208,7 +208,7 @@ static ssize_t kmm_read(FAR struct file *filep, FAR char *buffer, size_t totalsize; off_t offset; - fvdbg("buffer=%p buflen=%d\n", buffer, (int)buflen); + finfo("buffer=%p buflen=%d\n", buffer, (int)buflen); DEBUGASSERT(filep != NULL && buffer != NULL && buflen > 0); offset = filep->f_pos; @@ -267,7 +267,7 @@ static int kmm_dup(FAR const struct file *oldp, FAR struct file *newp) FAR struct kmm_file_s *oldattr; FAR struct kmm_file_s *newattr; - fvdbg("Dup %p->%p\n", oldp, newp); + finfo("Dup %p->%p\n", oldp, newp); /* Recover our private data from the old struct file instance */ @@ -279,7 +279,7 @@ static int kmm_dup(FAR const struct file *oldp, FAR struct file *newp) newattr = (FAR struct kmm_file_s *)kmm_malloc(sizeof(struct kmm_file_s)); if (!newattr) { - fdbg("ERROR: Failed to allocate file attributes\n"); + ferr("ERROR: Failed to allocate file attributes\n"); return -ENOMEM; } @@ -306,7 +306,7 @@ static int kmm_stat(FAR const char *relpath, FAR struct stat *buf) if (strcmp(relpath, "kmm") != 0) { - fdbg("ERROR: relpath is '%s'\n", relpath); + ferr("ERROR: relpath is '%s'\n", relpath); return -ENOENT; } diff --git a/fs/procfs/fs_procfsproc.c b/fs/procfs/fs_procfsproc.c index f5f6c0397f1a024a6d9f0adab1f93cb08e8b6105..79abd759ef0fbf264f0aa6d3d92a6913fc21e2f6 100644 --- a/fs/procfs/fs_procfsproc.c +++ b/fs/procfs/fs_procfsproc.c @@ -1013,7 +1013,7 @@ static int proc_open(FAR struct file *filep, FAR const char *relpath, unsigned long tmp; pid_t pid; - fvdbg("Open '%s'\n", relpath); + finfo("Open '%s'\n", relpath); /* PROCFS is read-only. Any attempt to open with any kind of write * access is not permitted. @@ -1023,7 +1023,7 @@ static int proc_open(FAR struct file *filep, FAR const char *relpath, if ((oflags & O_WRONLY) != 0 || (oflags & O_RDONLY) == 0) { - fdbg("ERROR: Only O_RDONLY supported\n"); + ferr("ERROR: Only O_RDONLY supported\n"); return -EACCES; } @@ -1034,7 +1034,7 @@ static int proc_open(FAR struct file *filep, FAR const char *relpath, if (!ptr || *ptr != '/') { - fdbg("ERROR: Invalid path \"%s\"\n", relpath); + ferr("ERROR: Invalid path \"%s\"\n", relpath); return -ENOENT; } @@ -1048,7 +1048,7 @@ static int proc_open(FAR struct file *filep, FAR const char *relpath, if (tmp >= 32768) { - fdbg("ERROR: Invalid PID %ld\n", tmp); + ferr("ERROR: Invalid PID %ld\n", tmp); return -ENOENT; } @@ -1062,7 +1062,7 @@ static int proc_open(FAR struct file *filep, FAR const char *relpath, if (!tcb) { - fdbg("ERROR: PID %d is no longer valid\n", (int)pid); + ferr("ERROR: PID %d is no longer valid\n", (int)pid); return -ENOENT; } @@ -1073,7 +1073,7 @@ static int proc_open(FAR struct file *filep, FAR const char *relpath, node = proc_findnode(ptr); if (!node) { - fdbg("ERROR: Invalid path \"%s\"\n", relpath); + ferr("ERROR: Invalid path \"%s\"\n", relpath); return -ENOENT; } @@ -1081,7 +1081,7 @@ static int proc_open(FAR struct file *filep, FAR const char *relpath, if (!DIRENT_ISFILE(node->dtype)) { - fdbg("ERROR: Path \"%s\" is not a regular file\n", relpath); + ferr("ERROR: Path \"%s\" is not a regular file\n", relpath); return -EISDIR; } @@ -1090,7 +1090,7 @@ static int proc_open(FAR struct file *filep, FAR const char *relpath, procfile = (FAR struct proc_file_s *)kmm_zalloc(sizeof(struct proc_file_s)); if (!procfile) { - fdbg("ERROR: Failed to allocate file container\n"); + ferr("ERROR: Failed to allocate file container\n"); return -ENOMEM; } @@ -1137,7 +1137,7 @@ static ssize_t proc_read(FAR struct file *filep, FAR char *buffer, irqstate_t flags; ssize_t ret; - fvdbg("buffer=%p buflen=%d\n", buffer, (int)buflen); + finfo("buffer=%p buflen=%d\n", buffer, (int)buflen); /* Recover our private data from the struct file instance */ @@ -1151,7 +1151,7 @@ static ssize_t proc_read(FAR struct file *filep, FAR char *buffer, if (!tcb) { - fdbg("ERROR: PID %d is not valid\n", (int)procfile->pid); + ferr("ERROR: PID %d is not valid\n", (int)procfile->pid); leave_critical_section(flags); return -ENODEV; } @@ -1215,7 +1215,7 @@ static int proc_dup(FAR const struct file *oldp, FAR struct file *newp) FAR struct proc_file_s *oldfile; FAR struct proc_file_s *newfile; - fvdbg("Dup %p->%p\n", oldp, newp); + finfo("Dup %p->%p\n", oldp, newp); /* Recover our private data from the old struct file instance */ @@ -1227,7 +1227,7 @@ static int proc_dup(FAR const struct file *oldp, FAR struct file *newp) newfile = (FAR struct proc_file_s *)kmm_malloc(sizeof(struct proc_file_s)); if (!newfile) { - fdbg("ERROR: Failed to allocate file container\n"); + ferr("ERROR: Failed to allocate file container\n"); return -ENOMEM; } @@ -1259,7 +1259,7 @@ static int proc_opendir(FAR const char *relpath, FAR struct fs_dirent_s *dir) FAR char *ptr; pid_t pid; - fvdbg("relpath: \"%s\"\n", relpath ? relpath : "NULL"); + finfo("relpath: \"%s\"\n", relpath ? relpath : "NULL"); DEBUGASSERT(relpath && dir && !dir->u.procfs); /* The relative must be either: @@ -1277,7 +1277,7 @@ static int proc_opendir(FAR const char *relpath, FAR struct fs_dirent_s *dir) { /* strtoul failed or there is something in the path after the pid */ - fdbg("ERROR: Invalid path \"%s\"\n", relpath); + ferr("ERROR: Invalid path \"%s\"\n", relpath); return -ENOENT; } @@ -1287,7 +1287,7 @@ static int proc_opendir(FAR const char *relpath, FAR struct fs_dirent_s *dir) if (tmp >= 32768) { - fdbg("ERROR: Invalid PID %ld\n", tmp); + ferr("ERROR: Invalid PID %ld\n", tmp); return -ENOENT; } @@ -1301,7 +1301,7 @@ static int proc_opendir(FAR const char *relpath, FAR struct fs_dirent_s *dir) if (!tcb) { - fdbg("ERROR: PID %d is not valid\n", (int)pid); + ferr("ERROR: PID %d is not valid\n", (int)pid); return -ENOENT; } @@ -1313,7 +1313,7 @@ static int proc_opendir(FAR const char *relpath, FAR struct fs_dirent_s *dir) procdir = (FAR struct proc_dir_s *)kmm_zalloc(sizeof(struct proc_dir_s)); if (!procdir) { - fdbg("ERROR: Failed to allocate the directory structure\n"); + ferr("ERROR: Failed to allocate the directory structure\n"); return -ENOMEM; } @@ -1329,7 +1329,7 @@ static int proc_opendir(FAR const char *relpath, FAR struct fs_dirent_s *dir) node = proc_findnode(ptr); if (!node) { - fdbg("ERROR: Invalid path \"%s\"\n", relpath); + ferr("ERROR: Invalid path \"%s\"\n", relpath); kmm_free(procdir); return -ENOENT; } @@ -1338,7 +1338,7 @@ static int proc_opendir(FAR const char *relpath, FAR struct fs_dirent_s *dir) if (!DIRENT_ISDIRECTORY(node->dtype)) { - fdbg("ERROR: Path \"%s\" is not a directory\n", relpath); + ferr("ERROR: Path \"%s\" is not a directory\n", relpath); kmm_free(procdir); return -ENOTDIR; } @@ -1415,7 +1415,7 @@ static int proc_readdir(struct fs_dirent_s *dir) * error -ENOENT */ - fvdbg("Entry %d: End of directory\n", index); + finfo("Entry %d: End of directory\n", index); ret = -ENOENT; } @@ -1433,7 +1433,7 @@ static int proc_readdir(struct fs_dirent_s *dir) if (!tcb) { - fdbg("ERROR: PID %d is no longer valid\n", (int)pid); + ferr("ERROR: PID %d is no longer valid\n", (int)pid); return -ENOENT; } @@ -1519,7 +1519,7 @@ static int proc_stat(const char *relpath, struct stat *buf) if (!ptr) { - fdbg("ERROR: Invalid path \"%s\"\n", relpath); + ferr("ERROR: Invalid path \"%s\"\n", relpath); return -ENOENT; } @@ -1529,7 +1529,7 @@ static int proc_stat(const char *relpath, struct stat *buf) if (tmp >= 32768) { - fdbg("ERROR: Invalid PID %ld\n", tmp); + ferr("ERROR: Invalid PID %ld\n", tmp); return -ENOENT; } @@ -1543,7 +1543,7 @@ static int proc_stat(const char *relpath, struct stat *buf) if (!tcb) { - fdbg("ERROR: PID %d is no longer valid\n", (int)pid); + ferr("ERROR: PID %d is no longer valid\n", (int)pid); return -ENOENT; } @@ -1562,7 +1562,7 @@ static int proc_stat(const char *relpath, struct stat *buf) { /* We are required to return -ENOENT all all invalid paths */ - fdbg("ERROR: Bad delimiter '%c' in relpath '%s'\n", *ptr, relpath); + ferr("ERROR: Bad delimiter '%c' in relpath '%s'\n", *ptr, relpath); return -ENOENT; } else @@ -1580,7 +1580,7 @@ static int proc_stat(const char *relpath, struct stat *buf) node = proc_findnode(ptr); if (!node) { - fdbg("ERROR: Invalid path \"%s\"\n", relpath); + ferr("ERROR: Invalid path \"%s\"\n", relpath); return -ENOENT; } diff --git a/fs/procfs/fs_procfsuptime.c b/fs/procfs/fs_procfsuptime.c index a1b9b070da7d5e6db81b72c5ee42ac4dc93959cd..9a9f8de8ba8befc40088cb825a2ae82c9ee527af 100644 --- a/fs/procfs/fs_procfsuptime.c +++ b/fs/procfs/fs_procfsuptime.c @@ -140,7 +140,7 @@ static int uptime_open(FAR struct file *filep, FAR const char *relpath, { FAR struct uptime_file_s *attr; - fvdbg("Open '%s'\n", relpath); + finfo("Open '%s'\n", relpath); /* PROCFS is read-only. Any attempt to open with any kind of write * access is not permitted. @@ -150,7 +150,7 @@ static int uptime_open(FAR struct file *filep, FAR const char *relpath, if ((oflags & O_WRONLY) != 0 || (oflags & O_RDONLY) == 0) { - fdbg("ERROR: Only O_RDONLY supported\n"); + ferr("ERROR: Only O_RDONLY supported\n"); return -EACCES; } @@ -158,7 +158,7 @@ static int uptime_open(FAR struct file *filep, FAR const char *relpath, if (strcmp(relpath, "uptime") != 0) { - fdbg("ERROR: relpath is '%s'\n", relpath); + ferr("ERROR: relpath is '%s'\n", relpath); return -ENOENT; } @@ -167,7 +167,7 @@ static int uptime_open(FAR struct file *filep, FAR const char *relpath, attr = (FAR struct uptime_file_s *)kmm_zalloc(sizeof(struct uptime_file_s)); if (!attr) { - fdbg("ERROR: Failed to allocate file attributes\n"); + ferr("ERROR: Failed to allocate file attributes\n"); return -ENOMEM; } @@ -222,7 +222,7 @@ static ssize_t uptime_read(FAR struct file *filep, FAR char *buffer, unsigned int csec; #endif - fvdbg("buffer=%p buflen=%d\n", buffer, (int)buflen); + finfo("buffer=%p buflen=%d\n", buffer, (int)buflen); /* Recover our private data from the struct file instance */ @@ -301,7 +301,7 @@ static int uptime_dup(FAR const struct file *oldp, FAR struct file *newp) FAR struct uptime_file_s *oldattr; FAR struct uptime_file_s *newattr; - fvdbg("Dup %p->%p\n", oldp, newp); + finfo("Dup %p->%p\n", oldp, newp); /* Recover our private data from the old struct file instance */ @@ -313,7 +313,7 @@ static int uptime_dup(FAR const struct file *oldp, FAR struct file *newp) newattr = (FAR struct uptime_file_s *)kmm_malloc(sizeof(struct uptime_file_s)); if (!newattr) { - fdbg("ERROR: Failed to allocate file attributes\n"); + ferr("ERROR: Failed to allocate file attributes\n"); return -ENOMEM; } @@ -340,7 +340,7 @@ static int uptime_stat(FAR const char *relpath, FAR struct stat *buf) if (strcmp(relpath, "uptime") != 0) { - fdbg("ERROR: relpath is '%s'\n", relpath); + ferr("ERROR: relpath is '%s'\n", relpath); return -ENOENT; } diff --git a/fs/procfs/fs_skeleton.c b/fs/procfs/fs_skeleton.c index 052eb1f0f75fd54b26edc313b04eace7476b983a..0a884e03be99214ca90adc8939c998cd8463e817 100644 --- a/fs/procfs/fs_skeleton.c +++ b/fs/procfs/fs_skeleton.c @@ -163,7 +163,7 @@ static int skel_open(FAR struct file *filep, FAR const char *relpath, { FAR struct skel_file_s *priv; - fvdbg("Open '%s'\n", relpath); + finfo("Open '%s'\n", relpath); /* PROCFS is read-only. Any attempt to open with any kind of write * access is not permitted. @@ -174,7 +174,7 @@ static int skel_open(FAR struct file *filep, FAR const char *relpath, if (((oflags & O_WRONLY) != 0 || (oflags & O_RDONLY) == 0) && (skel_procfsoperations.write == NULL)) { - fdbg("ERROR: Only O_RDONLY supported\n"); + ferr("ERROR: Only O_RDONLY supported\n"); return -EACCES; } @@ -183,7 +183,7 @@ static int skel_open(FAR struct file *filep, FAR const char *relpath, priv = (FAR struct skel_file_s *)kmm_zalloc(sizeof(struct skel_file_s)); if (!priv) { - fdbg("ERROR: Failed to allocate file attributes\n"); + ferr("ERROR: Failed to allocate file attributes\n"); return -ENOMEM; } @@ -228,7 +228,7 @@ static ssize_t skel_read(FAR struct file *filep, FAR char *buffer, FAR struct skel_file_s *priv; ssize_t ret; - fvdbg("buffer=%p buflen=%d\n", buffer, (int)buflen); + finfo("buffer=%p buflen=%d\n", buffer, (int)buflen); /* Recover our private data from the struct file instance */ @@ -262,7 +262,7 @@ static int skel_dup(FAR const struct file *oldp, FAR struct file *newp) FAR struct skel_file_s *oldpriv; FAR struct skel_file_s *newpriv; - fvdbg("Dup %p->%p\n", oldp, newp); + finfo("Dup %p->%p\n", oldp, newp); /* Recover our private data from the old struct file instance */ @@ -274,7 +274,7 @@ static int skel_dup(FAR const struct file *oldp, FAR struct file *newp) newpriv = (FAR struct skel_file_s *)kmm_zalloc(sizeof(struct skel_file_s)); if (!newpriv) { - fdbg("ERROR: Failed to allocate file attributes\n"); + ferr("ERROR: Failed to allocate file attributes\n"); return -ENOMEM; } @@ -300,7 +300,7 @@ static int skel_opendir(FAR const char *relpath, FAR struct fs_dirent_s *dir) { FAR struct skel_level1_s *level1; - fvdbg("relpath: \"%s\"\n", relpath ? relpath : "NULL"); + finfo("relpath: \"%s\"\n", relpath ? relpath : "NULL"); DEBUGASSERT(relpath && dir && !dir->u.procfs); /* The path refers to the 1st level sbdirectory. Allocate the level1 @@ -312,7 +312,7 @@ static int skel_opendir(FAR const char *relpath, FAR struct fs_dirent_s *dir) if (!level1) { - fdbg("ERROR: Failed to allocate the level1 directory structure\n"); + ferr("ERROR: Failed to allocate the level1 directory structure\n"); return -ENOMEM; } @@ -383,7 +383,7 @@ static int skel_readdir(FAR struct fs_dirent_s *dir) * error -ENOENT */ - fvdbg("Entry %d: End of directory\n", index); + finfo("Entry %d: End of directory\n", index); ret = -ENOENT; } diff --git a/fs/romfs/fs_romfs.c b/fs/romfs/fs_romfs.c index 804fbb7ed46e36d5d6c5199d549a4c54e7947ad6..92584422e9f9909e3f878893548a278f16630593 100644 --- a/fs/romfs/fs_romfs.c +++ b/fs/romfs/fs_romfs.c @@ -149,7 +149,7 @@ static int romfs_open(FAR struct file *filep, FAR const char *relpath, FAR struct romfs_file_s *rf; int ret; - fvdbg("Open '%s'\n", relpath); + finfo("Open '%s'\n", relpath); /* Sanity checks */ @@ -169,7 +169,7 @@ static int romfs_open(FAR struct file *filep, FAR const char *relpath, ret = romfs_checkmount(rm); if (ret != OK) { - fdbg("romfs_checkmount failed: %d\n", ret); + ferr("ERROR: romfs_checkmount failed: %d\n", ret); goto errout_with_semaphore; } @@ -179,7 +179,7 @@ static int romfs_open(FAR struct file *filep, FAR const char *relpath, if ((oflags & O_WRONLY) != 0 || (oflags & O_RDONLY) == 0) { - fdbg("Only O_RDONLY supported\n"); + ferr("ERROR: Only O_RDONLY supported\n"); ret = -EACCES; goto errout_with_semaphore; } @@ -193,7 +193,7 @@ static int romfs_open(FAR struct file *filep, FAR const char *relpath, ret = romfs_finddirentry(rm, &dirinfo, relpath); if (ret < 0) { - fdbg("Failed to find directory directory entry for '%s': %d\n", + ferr("ERROR: Failed to find directory directory entry for '%s': %d\n", relpath, ret); goto errout_with_semaphore; } @@ -207,7 +207,7 @@ static int romfs_open(FAR struct file *filep, FAR const char *relpath, /* It is a directory */ ret = -EISDIR; - fdbg("'%s' is a directory\n", relpath); + ferr("ERROR: '%s' is a directory\n", relpath); goto errout_with_semaphore; } @@ -222,7 +222,7 @@ static int romfs_open(FAR struct file *filep, FAR const char *relpath, rf = (FAR struct romfs_file_s *)kmm_zalloc(sizeof(struct romfs_file_s)); if (!rf) { - fdbg("Failed to allocate private data\n", ret); + ferr("ERROR: Failed to allocate private data\n", ret); ret = -ENOMEM; goto errout_with_semaphore; } @@ -239,7 +239,7 @@ static int romfs_open(FAR struct file *filep, FAR const char *relpath, &rf->rf_startoffset); if (ret < 0) { - fdbg("Failed to locate start of file data: %d\n", ret); + ferr("ERROR: Failed to locate start of file data: %d\n", ret); goto errout_with_semaphore; } @@ -248,7 +248,7 @@ static int romfs_open(FAR struct file *filep, FAR const char *relpath, ret = romfs_fileconfigure(rm, rf); if (ret < 0) { - fdbg("Failed configure buffering: %d\n", ret); + ferr("ERROR: Failed configure buffering: %d\n", ret); goto errout_with_semaphore; } @@ -285,7 +285,7 @@ static int romfs_close(FAR struct file *filep) FAR struct romfs_file_s *rf; int ret = OK; - fvdbg("Closing\n"); + finfo("Closing\n"); /* Sanity checks */ @@ -340,7 +340,7 @@ static ssize_t romfs_read(FAR struct file *filep, FAR char *buffer, int sectorndx; int ret; - fvdbg("Read %d bytes from offset %d\n", buflen, filep->f_pos); + finfo("Read %d bytes from offset %d\n", buflen, filep->f_pos); /* Sanity checks */ @@ -359,7 +359,7 @@ static ssize_t romfs_read(FAR struct file *filep, FAR char *buffer, ret = romfs_checkmount(rm); if (ret != OK) { - fdbg("romfs_checkmount failed: %d\n", ret); + ferr("ERROR: romfs_checkmount failed: %d\n", ret); goto errout_with_semaphore; } @@ -404,11 +404,11 @@ static ssize_t romfs_read(FAR struct file *filep, FAR char *buffer, /* Read all of the sectors directly into user memory */ - fvdbg("Read %d sectors starting with %d\n", nsectors, sector); + finfo("Read %d sectors starting with %d\n", nsectors, sector); ret = romfs_hwread(rm, userbuffer, sector, nsectors); if (ret < 0) { - fdbg("romfs_hwread failed: %d\n", ret); + ferr("ERROR: romfs_hwread failed: %d\n", ret); goto errout_with_semaphore; } @@ -422,11 +422,11 @@ static ssize_t romfs_read(FAR struct file *filep, FAR char *buffer, * it is already there then all is well. */ - fvdbg("Read sector %d\n", sector); + finfo("Read sector %d\n", sector); ret = romfs_filecacheread(rm, rf, sector); if (ret < 0) { - fdbg("romfs_filecacheread failed: %d\n", ret); + ferr("ERROR: romfs_filecacheread failed: %d\n", ret); goto errout_with_semaphore; } @@ -446,7 +446,7 @@ static ssize_t romfs_read(FAR struct file *filep, FAR char *buffer, sector++; } - fvdbg("Return %d bytes from sector offset %d\n", bytesread, sectorndx); + finfo("Return %d bytes from sector offset %d\n", bytesread, sectorndx); memcpy(userbuffer, &rf->rf_buffer[sectorndx], bytesread); } @@ -477,7 +477,7 @@ static off_t romfs_seek(FAR struct file *filep, off_t offset, int whence) off_t position; int ret; - fvdbg("Seek to offset: %d whence: %d\n", offset, whence); + finfo("Seek to offset: %d whence: %d\n", offset, whence); /* Sanity checks */ @@ -511,7 +511,7 @@ static off_t romfs_seek(FAR struct file *filep, off_t offset, int whence) break; default: - fdbg("Whence is invalid: %d\n", whence); + ferr("ERROR: Whence is invalid: %d\n", whence); return -EINVAL; } @@ -521,7 +521,7 @@ static off_t romfs_seek(FAR struct file *filep, off_t offset, int whence) ret = romfs_checkmount(rm); if (ret != OK) { - fdbg("romfs_checkmount failed: %d\n", ret); + ferr("ERROR: romfs_checkmount failed: %d\n", ret); goto errout_with_semaphore; } @@ -537,7 +537,7 @@ static off_t romfs_seek(FAR struct file *filep, off_t offset, int whence) /* Set file position and return success */ filep->f_pos = position; - fvdbg("New file position: %d\n", filep->f_pos); + finfo("New file position: %d\n", filep->f_pos); romfs_semgive(rm); return OK; @@ -557,7 +557,7 @@ static int romfs_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR struct romfs_file_s *rf; FAR void **ppv = (FAR void**)arg; - fvdbg("cmd: %d arg: %08lx\n", cmd, arg); + finfo("cmd: %d arg: %08lx\n", cmd, arg); /* Sanity checks */ @@ -582,7 +582,7 @@ static int romfs_ioctl(FAR struct file *filep, int cmd, unsigned long arg) return OK; } - fdbg("Invalid cmd: %d \n", cmd); + ferr("ERROR: Invalid cmd: %d \n", cmd); return -ENOTTY; } @@ -597,7 +597,7 @@ static int romfs_dup(FAR const struct file *oldp, FAR struct file *newp) FAR struct romfs_file_s *newrf; int ret; - fvdbg("Dup %p->%p\n", oldp, newp); + finfo("Dup %p->%p\n", oldp, newp); /* Sanity checks */ @@ -618,7 +618,7 @@ static int romfs_dup(FAR const struct file *oldp, FAR struct file *newp) ret = romfs_checkmount(rm); if (ret != OK) { - fdbg("romfs_checkmount failed: %d\n", ret); + ferr("ERROR: romfs_checkmount failed: %d\n", ret); goto errout_with_semaphore; } @@ -633,7 +633,7 @@ static int romfs_dup(FAR const struct file *oldp, FAR struct file *newp) newrf = (FAR struct romfs_file_s *)kmm_malloc(sizeof(struct romfs_file_s)); if (!newrf) { - fdbg("Failed to allocate private data\n", ret); + ferr("ERROR: Failed to allocate private data\n", ret); ret = -ENOMEM; goto errout_with_semaphore; } @@ -649,7 +649,7 @@ static int romfs_dup(FAR const struct file *oldp, FAR struct file *newp) if (ret < 0) { kmm_free(newrf); - fdbg("Failed configure buffering: %d\n", ret); + ferr("ERROR: Failed configure buffering: %d\n", ret); goto errout_with_semaphore; } @@ -691,7 +691,7 @@ static int romfs_opendir(FAR struct inode *mountpt, FAR const char *relpath, FAR struct romfs_dirinfo_s dirinfo; int ret; - fvdbg("relpath: '%s'\n", relpath); + finfo("relpath: '%s'\n", relpath); /* Sanity checks */ @@ -707,7 +707,7 @@ static int romfs_opendir(FAR struct inode *mountpt, FAR const char *relpath, ret = romfs_checkmount(rm); if (ret != OK) { - fdbg("romfs_checkmount failed: %d\n", ret); + ferr("ERROR: romfs_checkmount failed: %d\n", ret); goto errout_with_semaphore; } @@ -716,7 +716,7 @@ static int romfs_opendir(FAR struct inode *mountpt, FAR const char *relpath, ret = romfs_finddirentry(rm, &dirinfo, relpath); if (ret < 0) { - fdbg("Failed to find directory '%s': %d\n", relpath, ret); + ferr("ERROR: Failed to find directory '%s': %d\n", relpath, ret); goto errout_with_semaphore; } @@ -726,7 +726,7 @@ static int romfs_opendir(FAR struct inode *mountpt, FAR const char *relpath, { /* The entry is not a directory */ - fdbg("'%s' is not a directory: %d\n", relpath); + ferr("ERROR: '%s' is not a directory: %d\n", relpath); ret = -ENOTDIR; goto errout_with_semaphore; } @@ -759,7 +759,7 @@ static int romfs_readdir(FAR struct inode *mountpt, uint32_t size; int ret; - fvdbg("Entry\n"); + finfo("Entry\n"); /* Sanity checks */ @@ -775,7 +775,7 @@ static int romfs_readdir(FAR struct inode *mountpt, ret = romfs_checkmount(rm); if (ret != OK) { - fdbg("romfs_checkmount failed: %d\n", ret); + ferr("ERROR: omfs_checkmount failed: %d\n", ret); goto errout_with_semaphore; } @@ -791,7 +791,7 @@ static int romfs_readdir(FAR struct inode *mountpt, * special error -ENOENT */ - fdbg("End of directory\n"); + finfo("End of directory\n"); ret = -ENOENT; goto errout_with_semaphore; } @@ -802,7 +802,7 @@ static int romfs_readdir(FAR struct inode *mountpt, &next, &info, &size); if (ret < 0) { - fdbg("romfs_parsedirentry failed: %d\n", ret); + ferr("ERROR: romfs_parsedirentry failed: %d\n", ret); goto errout_with_semaphore; } @@ -811,7 +811,7 @@ static int romfs_readdir(FAR struct inode *mountpt, ret = romfs_parsefilename(rm, dir->u.romfs.fr_curroffset, dir->fd_dir.d_name); if (ret < 0) { - fdbg("romfs_parsefilename failed: %d\n", ret); + ferr("ERROR: romfs_parsefilename failed: %d\n", ret); goto errout_with_semaphore; } @@ -851,7 +851,7 @@ static int romfs_rewinddir(FAR struct inode *mountpt, FAR struct romfs_mountpt_s *rm; int ret; - fvdbg("Entry\n"); + finfo("Entry\n"); /* Sanity checks */ @@ -891,20 +891,20 @@ static int romfs_bind(FAR struct inode *blkdriver, FAR const void *data, struct romfs_mountpt_s *rm; int ret; - fvdbg("Entry\n"); + finfo("Entry\n"); /* Open the block driver */ if (!blkdriver || !blkdriver->u.i_bops) { - fdbg("No block driver/ops\n"); + ferr("ERROR: No block driver/ops\n"); return -ENODEV; } if (blkdriver->u.i_bops->open && blkdriver->u.i_bops->open(blkdriver) != OK) { - fdbg("No open method\n"); + ferr("ERROR: No open method\n"); return -ENODEV; } @@ -913,7 +913,7 @@ static int romfs_bind(FAR struct inode *blkdriver, FAR const void *data, rm = (FAR struct romfs_mountpt_s *)kmm_zalloc(sizeof(struct romfs_mountpt_s)); if (!rm) { - fdbg("Failed to allocate mountpoint structure\n"); + ferr("ERROR: Failed to allocate mountpoint structure\n"); return -ENOMEM; } @@ -930,7 +930,7 @@ static int romfs_bind(FAR struct inode *blkdriver, FAR const void *data, ret = romfs_hwconfigure(rm); if (ret < 0) { - fdbg("romfs_hwconfigure failed: %d\n", ret); + ferr("ERROR: romfs_hwconfigure failed: %d\n", ret); goto errout_with_sem; } @@ -941,7 +941,7 @@ static int romfs_bind(FAR struct inode *blkdriver, FAR const void *data, ret = romfs_fsconfigure(rm); if (ret < 0) { - fdbg("romfs_fsconfigure failed: %d\n", ret); + ferr("ERROR: romfs_fsconfigure failed: %d\n", ret); goto errout_with_buffer; } @@ -977,9 +977,9 @@ static int romfs_unbind(FAR void *handle, FAR struct inode **blkdriver, FAR struct romfs_mountpt_s *rm = (FAR struct romfs_mountpt_s *)handle; int ret; - fvdbg("Entry\n"); + finfo("Entry\n"); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!rm) { return -EINVAL; @@ -993,7 +993,7 @@ static int romfs_unbind(FAR void *handle, FAR struct inode **blkdriver, { /* We cannot unmount now.. there are open files */ - fdbg("There are open files\n"); + fwarn("WARNING: There are open files\n"); /* This implementation currently only supports unmounting if there are * no open file references. @@ -1056,7 +1056,7 @@ static int romfs_statfs(FAR struct inode *mountpt, FAR struct statfs *buf) FAR struct romfs_mountpt_s *rm; int ret; - fvdbg("Entry\n"); + finfo("Entry\n"); /* Sanity checks */ @@ -1072,7 +1072,7 @@ static int romfs_statfs(FAR struct inode *mountpt, FAR struct statfs *buf) ret = romfs_checkmount(rm); if (ret < 0) { - fdbg("romfs_checkmount failed: %d\n", ret); + ferr("ERROR: romfs_checkmount failed: %d\n", ret); goto errout_with_semaphore; } @@ -1114,7 +1114,7 @@ static int romfs_stat(FAR struct inode *mountpt, FAR const char *relpath, FAR struct romfs_dirinfo_s dirinfo; int ret; - fvdbg("Entry\n"); + finfo("Entry\n"); /* Sanity checks */ @@ -1130,7 +1130,7 @@ static int romfs_stat(FAR struct inode *mountpt, FAR const char *relpath, ret = romfs_checkmount(rm); if (ret != OK) { - fdbg("romfs_checkmount failed: %d\n", ret); + ferr("ERROR: romfs_checkmount failed: %d\n", ret); goto errout_with_semaphore; } @@ -1142,7 +1142,7 @@ static int romfs_stat(FAR struct inode *mountpt, FAR const char *relpath, if (ret < 0) { - fvdbg("Failed to find directory: %d\n", ret); + finfo("Failed to find directory: %d\n", ret); goto errout_with_semaphore; } @@ -1171,7 +1171,7 @@ static int romfs_stat(FAR struct inode *mountpt, FAR const char *relpath, { /* Otherwise, pretend like the unsupported node does not exist */ - fvdbg("Unsupported inode: %d\n", dirinfo.rd_next); + finfo("Unsupported inode: %d\n", dirinfo.rd_next); ret = -ENOENT; goto errout_with_semaphore; } diff --git a/fs/romfs/fs_romfsutil.c b/fs/romfs/fs_romfsutil.c index ade749ffcb52194a80931cd16112d60d0ed43d45..50bf56ddc285a8a2df9620e4b6631727a84a84dc 100644 --- a/fs/romfs/fs_romfsutil.c +++ b/fs/romfs/fs_romfsutil.c @@ -437,7 +437,7 @@ int romfs_filecacheread(struct romfs_mountpt_s *rm, struct romfs_file_s *rf, { int ret; - fvdbg("sector: %d cached: %d sectorsize: %d XIP base: %p buffer: %p\n", + finfo("sector: %d cached: %d sectorsize: %d XIP base: %p buffer: %p\n", sector, rf->rf_cachesector, rm->rm_hwsectorsize, rm->rm_xipbase, rf->rf_buffer); @@ -457,17 +457,17 @@ int romfs_filecacheread(struct romfs_mountpt_s *rm, struct romfs_file_s *rf, */ rf->rf_buffer = rm->rm_xipbase + sector * rm->rm_hwsectorsize; - fvdbg("XIP buffer: %p\n", rf->rf_buffer); + finfo("XIP buffer: %p\n", rf->rf_buffer); } else { /* In non-XIP mode, we will have to read the new sector. */ - fvdbg("Calling romfs_hwread\n"); + finfo("Calling romfs_hwread\n"); ret = romfs_hwread(rm, rf->rf_buffer, sector, 1); if (ret < 0) { - fdbg("romfs_hwread failed: %d\n", ret); + ferr("ERROR: romfs_hwread failed: %d\n", ret); return ret; } } @@ -499,7 +499,7 @@ int romfs_hwconfigure(struct romfs_mountpt_s *rm) /* Get the underlying device geometry */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!inode || !inode->u.i_bops || !inode->u.i_bops->geometry) { return -ENODEV; diff --git a/fs/smartfs/smartfs_procfs.c b/fs/smartfs/smartfs_procfs.c index 474d85009fa5cbf63b5a94678c1043f9ebc797c1..915ebfd559c0f65b5a1e0e2733ba5f4d9e5381e8 100644 --- a/fs/smartfs/smartfs_procfs.c +++ b/fs/smartfs/smartfs_procfs.c @@ -348,7 +348,7 @@ static int smartfs_open(FAR struct file *filep, FAR const char *relpath, FAR struct smartfs_file_s *priv; int ret; - fvdbg("Open '%s'\n", relpath); + finfo("Open '%s'\n", relpath); /* PROCFS is read-only. Any attempt to open with any kind of write * access is not permitted. @@ -359,7 +359,7 @@ static int smartfs_open(FAR struct file *filep, FAR const char *relpath, if (((oflags & O_WRONLY) != 0 || (oflags & O_RDONLY) == 0) && (smartfs_procfsoperations.write == NULL)) { - fdbg("ERROR: Only O_RDONLY supported\n"); + ferr("ERROR: Only O_RDONLY supported\n"); return -EACCES; } @@ -368,7 +368,7 @@ static int smartfs_open(FAR struct file *filep, FAR const char *relpath, priv = (FAR struct smartfs_file_s *)kmm_malloc(sizeof(struct smartfs_file_s)); if (!priv) { - fdbg("ERROR: Failed to allocate file attributes\n"); + ferr("ERROR: Failed to allocate file attributes\n"); return -ENOMEM; } @@ -421,7 +421,7 @@ static ssize_t smartfs_read(FAR struct file *filep, FAR char *buffer, FAR struct smartfs_file_s *priv; ssize_t ret; - fvdbg("buffer=%p buflen=%d\n", buffer, (int)buflen); + finfo("buffer=%p buflen=%d\n", buffer, (int)buflen); /* Recover our private data from the struct file instance */ @@ -506,7 +506,7 @@ static int smartfs_dup(FAR const struct file *oldp, FAR struct file *newp) FAR struct smartfs_file_s *oldpriv; FAR struct smartfs_file_s *newpriv; - fvdbg("Dup %p->%p\n", oldp, newp); + finfo("Dup %p->%p\n", oldp, newp); /* Recover our private data from the old struct file instance */ @@ -518,7 +518,7 @@ static int smartfs_dup(FAR const struct file *oldp, FAR struct file *newp) newpriv = (FAR struct smartfs_file_s *)kmm_malloc(sizeof(struct smartfs_file_s)); if (!newpriv) { - fdbg("ERROR: Failed to allocate file attributes\n"); + ferr("ERROR: Failed to allocate file attributes\n"); return -ENOMEM; } @@ -545,7 +545,7 @@ static int smartfs_opendir(FAR const char *relpath, FAR struct fs_dirent_s *dir) FAR struct smartfs_level1_s *level1; int ret; - fvdbg("relpath: \"%s\"\n", relpath ? relpath : "NULL"); + finfo("relpath: \"%s\"\n", relpath ? relpath : "NULL"); DEBUGASSERT(relpath && dir && !dir->u.procfs); /* The path refers to the 1st level subdirectory. Allocate the level1 @@ -557,7 +557,7 @@ static int smartfs_opendir(FAR const char *relpath, FAR struct fs_dirent_s *dir) if (!level1) { - fdbg("ERROR: Failed to allocate the level1 directory structure\n"); + ferr("ERROR: Failed to allocate the level1 directory structure\n"); return -ENOMEM; } @@ -624,7 +624,7 @@ static int smartfs_readdir(struct fs_dirent_s *dir) * error -ENOENT */ - fvdbg("Entry %d: End of directory\n", index); + finfo("Entry %d: End of directory\n", index); ret = -ENOENT; } diff --git a/fs/smartfs/smartfs_smart.c b/fs/smartfs/smartfs_smart.c index df65d2bdd0478cab852c441a463e8b569bae04c6..c276eeff30ea017595d09f17742caa0401054433 100644 --- a/fs/smartfs/smartfs_smart.c +++ b/fs/smartfs/smartfs_smart.c @@ -505,7 +505,8 @@ static ssize_t smartfs_read(FAR struct file *filep, char *buffer, size_t buflen) ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error %d reading sector %d data\n", ret, sf->currsector); + ferr("ERROR: Error %d reading sector %d data\n", + ret, sf->currsector); goto errout_with_semaphore; } @@ -614,7 +615,8 @@ static int smartfs_sync_internal(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error %d writing used bytes for sector %d\n", ret, sf->currsector); + ferr("ERROR: Error %d writing used bytes for sector %d\n", + ret, sf->currsector); goto errout; } @@ -628,7 +630,7 @@ static int smartfs_sync_internal(struct smartfs_mountpt_s *fs, if (sf->byteswritten > 0) { - fvdbg("Syncing sector %d\n", sf->currsector); + finfo("Syncing sector %d\n", sf->currsector); /* Read the existing sector used bytes value */ @@ -639,7 +641,8 @@ static int smartfs_sync_internal(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error %d reading sector %d data\n", ret, sf->currsector); + ferr("ERROR: Error %d reading sector %d data\n", + ret, sf->currsector); goto errout; } @@ -661,7 +664,8 @@ static int smartfs_sync_internal(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error %d writing used bytes for sector %d\n", ret, sf->currsector); + ferr("ERROR: Error %d writing used bytes for sector %d\n", + ret, sf->currsector); goto errout; } @@ -766,7 +770,8 @@ static ssize_t smartfs_write(FAR struct file *filep, const char *buffer, ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error %d writing sector %d data\n", ret, sf->currsector); + ferr("ERROR: Error %d writing sector %d data\n", + et, sf->currsector); goto errout_with_semaphore; } @@ -793,7 +798,8 @@ static ssize_t smartfs_write(FAR struct file *filep, const char *buffer, ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error %d reading sector %d header\n", ret, sf->currsector); + ferr("ERROR: Error %d reading sector %d header\n", + ret, sf->currsector); goto errout_with_semaphore; } @@ -841,7 +847,8 @@ static ssize_t smartfs_write(FAR struct file *filep, const char *buffer, ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error %d writing sector %d data\n", ret, sf->currsector); + ferr("ERROR: Error %d writing sector %d data\n", + ret, sf->currsector); goto errout_with_semaphore; } } @@ -867,7 +874,7 @@ static ssize_t smartfs_write(FAR struct file *filep, const char *buffer, ret = FS_IOCTL(fs, BIOC_ALLOCSECT, 0xFFFF); if (ret < 0) { - fdbg("Error %d allocating new sector\n", ret); + ferr("ERROR: Error %d allocating new sector\n", ret); goto errout_with_semaphore; } @@ -892,7 +899,7 @@ static ssize_t smartfs_write(FAR struct file *filep, const char *buffer, { /* Error allocating logical sector! */ - fdbg("Error - duplicate logical sector %d\n", sf->currsector); + ferr("ERROR: Duplicate logical sector %d\n", sf->currsector); } sf->bflags = SMARTFS_BFLAG_DIRTY; @@ -922,7 +929,7 @@ static ssize_t smartfs_write(FAR struct file *filep, const char *buffer, ret = FS_IOCTL(fs, BIOC_ALLOCSECT, 0xFFFF); if (ret < 0) { - fdbg("Error %d allocating new sector\n", ret); + ferr("ERROR: Error %d allocating new sector\n", ret); goto errout_with_semaphore; } @@ -937,7 +944,7 @@ static ssize_t smartfs_write(FAR struct file *filep, const char *buffer, ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error %d writing next sector\n", ret); + ferr("ERROR: Error %d writing next sector\n", ret); goto errout_with_semaphore; } @@ -949,7 +956,7 @@ static ssize_t smartfs_write(FAR struct file *filep, const char *buffer, { /* Error allocating logical sector! */ - fdbg("Error - duplicate logical sector %d\n", sf->currsector); + ferr("ERROR: Duplicate logical sector %d\n", sf->currsector); } sf->currsector = SMARTFS_NEXTSECTOR(header); @@ -1078,7 +1085,8 @@ static off_t smartfs_seek_internal(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error %d reading sector %d header\n", ret, sf->currsector); + ferr("ERROR: Error %d reading sector %d header\n", + ret, sf->currsector); goto errout; } @@ -1103,7 +1111,8 @@ static off_t smartfs_seek_internal(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error %d reading sector %d header\n", ret, sf->currsector); + ferr("ERROR: Error %d reading sector %d header\n", + ret, sf->currsector); goto errout; } } @@ -1218,7 +1227,7 @@ static int smartfs_dup(FAR const struct file *oldp, FAR struct file *newp) { struct smartfs_ofile_s *sf; - fvdbg("Dup %p->%p\n", oldp, newp); + finfo("Dup %p->%p\n", oldp, newp); /* Sanity checks */ @@ -1933,7 +1942,8 @@ int smartfs_rename(struct inode *mountpt, const char *oldrelpath, ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error %d reading sector %d data\n", ret, oldentry.dsector); + ferr("ERROR: Error %d reading sector %d data\n", + ret, oldentry.dsector); goto errout_with_semaphore; } @@ -2005,7 +2015,8 @@ int smartfs_rename(struct inode *mountpt, const char *oldrelpath, ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error %d reading sector %d data\n", ret, oldentry.dsector); + ferr("ERROR: Error %d reading sector %d data\n", + ret, oldentry.dsector); goto errout_with_semaphore; } @@ -2024,7 +2035,8 @@ int smartfs_rename(struct inode *mountpt, const char *oldrelpath, ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error %d writing flag bytes for sector %d\n", ret, readwrite.logsector); + ferr("ERROR: Error %d writing flag bytes for sector %d\n", + ret, readwrite.logsector); goto errout_with_semaphore; } } diff --git a/fs/smartfs/smartfs_utils.c b/fs/smartfs/smartfs_utils.c index 4970c51d8fbbfb1dca14600a570f1d286a3bc9d9..44efc60c26eb40cc2b135070c5a2bdba53e07b5e 100644 --- a/fs/smartfs/smartfs_utils.c +++ b/fs/smartfs/smartfs_utils.c @@ -231,7 +231,7 @@ int smartfs_mount(struct smartfs_mountpt_s *fs, bool writeable) ret = FS_IOCTL(fs, BIOC_GETFORMAT, (unsigned long) &fs->fs_llformat); if (ret != OK) { - fdbg("Error getting device low level format: %d\n", ret); + ferr("ERROR: Error getting device low level format: %d\n", ret); goto errout; } @@ -239,7 +239,7 @@ int smartfs_mount(struct smartfs_mountpt_s *fs, bool writeable) if (!(fs->fs_llformat.flags & SMART_FMT_ISFORMATTED)) { - fdbg("No low-level format found\n"); + ferr("ERROR: No low-level format found\n"); ret = -ENODEV; goto errout; } @@ -311,16 +311,16 @@ int smartfs_mount(struct smartfs_mountpt_s *fs, bool writeable) fs->fs_mounted = TRUE; - fdbg("SMARTFS:\n"); - fdbg("\t Sector size: %d\n", fs->fs_llformat.sectorsize); - fdbg("\t Bytes/sector %d\n", fs->fs_llformat.availbytes); - fdbg("\t Num sectors: %d\n", fs->fs_llformat.nsectors); - fdbg("\t Free sectors: %d\n", fs->fs_llformat.nfreesectors); - fdbg("\t Max filename: %d\n", CONFIG_SMARTFS_MAXNAMLEN); + finfo("SMARTFS:\n"); + finfo("\t Sector size: %d\n", fs->fs_llformat.sectorsize); + finfo("\t Bytes/sector %d\n", fs->fs_llformat.availbytes); + finfo("\t Num sectors: %d\n", fs->fs_llformat.nsectors); + finfo("\t Free sectors: %d\n", fs->fs_llformat.nfreesectors); + finfo("\t Max filename: %d\n", CONFIG_SMARTFS_MAXNAMLEN); #ifdef CONFIG_SMARTFS_MULTI_ROOT_DIRS - fdbg("\t RootDirEntries: %d\n", fs->fs_llformat.nrootdirentries); + finfo("\t RootDirEntries: %d\n", fs->fs_llformat.nrootdirentries); #endif - fdbg("\t RootDirSector: %d\n", fs->fs_rootsector); + finfo("\t RootDirSector: %d\n", fs->fs_rootsector); errout: return ret; @@ -695,10 +695,12 @@ int smartfs_finddirentry(struct smartfs_mountpt_s *fs, /* Read the next sector of the file */ readwrite.logsector = dirsector; - ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); + ret = FS_IOCTL(fs, BIOC_READSECT, + (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error in sector chain at %d!\n", dirsector); + ferr("ERROR: Error in sector chain at %d!\n", + dirsector); break; } @@ -937,7 +939,7 @@ int smartfs_createentry(FAR struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error chaining sector %d\n", nextsector); + ferr("ERROR: Error chaining sector %d\n", nextsector); goto errout; } } @@ -1014,7 +1016,7 @@ int smartfs_createentry(FAR struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error %d setting new sector type for sector %d\n", + ferr("ERROR: Error %d setting new sector type for sector %d\n", ret, nextsector); goto errout; } @@ -1129,7 +1131,7 @@ int smartfs_deleteentry(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error reading sector %d\n", nextsector); + ferr("ERROR: Error reading sector %d\n", nextsector); break; } @@ -1148,7 +1150,8 @@ int smartfs_deleteentry(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error reading directory info at sector %d\n", entry->dsector); + ferr("ERROR: Error reading directory info at sector %d\n", + entry->dsector); goto errout; } @@ -1177,7 +1180,8 @@ int smartfs_deleteentry(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error marking entry inactive at sector %d\n", entry->dsector); + ferr("ERROR: Error marking entry inactive at sector %d\n", + entry->dsector); goto errout; } @@ -1242,7 +1246,7 @@ int smartfs_deleteentry(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error reading sector %d\n", nextsector); + ferr("ERROR: Error reading sector %d\n", nextsector); break; } @@ -1259,7 +1263,7 @@ int smartfs_deleteentry(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error unchaining sector (%d)\n", nextsector); + ferr("ERROR: Error unchaining sector (%d)\n", nextsector); goto errout; } @@ -1268,7 +1272,7 @@ int smartfs_deleteentry(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_FREESECT, (unsigned long) entry->dsector); if (ret < 0) { - fdbg("Error freeing sector %d\n", entry->dsector); + ferr("ERROR: Error freeing sector %d\n", entry->dsector); goto errout; } @@ -1327,7 +1331,7 @@ int smartfs_countdirentries(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error reading sector %d\n", nextsector); + ferr("ERROR: Error reading sector %d\n", nextsector); break; } @@ -1336,7 +1340,7 @@ int smartfs_countdirentries(struct smartfs_mountpt_s *fs, header = (struct smartfs_chain_header_s *) fs->fs_rwbuffer; if (header->type != SMARTFS_SECTOR_TYPE_DIR) { - fdbg("Sector %d is not a DIR sector!\n", nextsector); + ferr("ERROR: Sector %d is not a DIR sector!\n", nextsector); goto errout; } @@ -1411,7 +1415,7 @@ int smartfs_truncatefile(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_READSECT, (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error reading sector %d header\n", nextsector); + ferr("ERROR: Error reading sector %d header\n", nextsector); goto errout; } @@ -1447,7 +1451,7 @@ int smartfs_truncatefile(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long) &readwrite); if (ret < 0) { - fdbg("Error blanking 1st sector (%d) of file\n", nextsector); + ferr("ERROR: Error blanking 1st sector (%d) of file\n", nextsector); goto errout; } @@ -1463,7 +1467,7 @@ int smartfs_truncatefile(struct smartfs_mountpt_s *fs, ret = FS_IOCTL(fs, BIOC_FREESECT, (unsigned long) nextsector); if (ret < 0) { - fdbg("Error freeing sector %d\n", nextsector); + ferr("ERROR: Error freeing sector %d\n", nextsector); goto errout; } } diff --git a/fs/tmpfs/fs_tmpfs.c b/fs/tmpfs/fs_tmpfs.c index 09aa6bec7040e0bed90ec6ae362d13bb1f83978b..ee56d7189b536566ff5ce557a54b0a9ba5ce393a 100644 --- a/fs/tmpfs/fs_tmpfs.c +++ b/fs/tmpfs/fs_tmpfs.c @@ -1345,7 +1345,7 @@ static int tmpfs_open(FAR struct file *filep, FAR const char *relpath, off_t offset; int ret; - fvdbg("filep: %p\n", filep); + finfo("filep: %p\n", filep); DEBUGASSERT(filep->f_priv == NULL && filep->f_inode != NULL); /* Get the mountpoint inode reference from the file structure and the @@ -1489,7 +1489,7 @@ static int tmpfs_close(FAR struct file *filep) { FAR struct tmpfs_file_s *tfo; - fvdbg("filep: %p\n", filep); + finfo("filep: %p\n", filep); DEBUGASSERT(filep->f_priv != NULL && filep->f_inode != NULL); /* Recover our private data from the struct file instance */ @@ -1543,7 +1543,7 @@ static ssize_t tmpfs_read(FAR struct file *filep, FAR char *buffer, off_t startpos; off_t endpos; - fvdbg("filep: %p buffer: %p buflen: %lu\n", + finfo("filep: %p buffer: %p buflen: %lu\n", filep, buffer, (unsigned long)buflen); DEBUGASSERT(filep->f_priv != NULL && filep->f_inode != NULL); @@ -1591,7 +1591,7 @@ static ssize_t tmpfs_write(FAR struct file *filep, FAR const char *buffer, off_t endpos; int ret; - fvdbg("filep: %p buffer: %p buflen: %lu\n", + finfo("filep: %p buffer: %p buflen: %lu\n", filep, buffer, (unsigned long)buflen); DEBUGASSERT(filep->f_priv != NULL && filep->f_inode != NULL); @@ -1646,7 +1646,7 @@ static off_t tmpfs_seek(FAR struct file *filep, off_t offset, int whence) FAR struct tmpfs_file_s *tfo; off_t position; - fvdbg("filep: %p\n", filep); + finfo("filep: %p\n", filep); DEBUGASSERT(filep->f_priv != NULL && filep->f_inode != NULL); /* Recover our private data from the struct file instance */ @@ -1706,7 +1706,7 @@ static int tmpfs_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR struct tmpfs_file_s *tfo; FAR void **ppv = (FAR void**)arg; - fvdbg("filep: %p cmd: %d arg: %08lx\n", filep, cmd, arg); + finfo("filep: %p cmd: %d arg: %08lx\n", filep, cmd, arg); DEBUGASSERT(filep->f_priv != NULL && filep->f_inode != NULL); /* Recover our private data from the struct file instance */ @@ -1727,7 +1727,7 @@ static int tmpfs_ioctl(FAR struct file *filep, int cmd, unsigned long arg) return OK; } - fdbg("Invalid cmd: %d\n", cmd); + ferr("ERROR: Invalid cmd: %d\n", cmd); return -ENOTTY; } @@ -1739,7 +1739,7 @@ static int tmpfs_dup(FAR const struct file *oldp, FAR struct file *newp) { FAR struct tmpfs_file_s *tfo; - fvdbg("Dup %p->%p\n", oldp, newp); + finfo("Dup %p->%p\n", oldp, newp); DEBUGASSERT(oldp->f_priv != NULL && oldp->f_inode != NULL && newp->f_priv == NULL && newp->f_inode != NULL); @@ -1774,7 +1774,7 @@ static int tmpfs_opendir(FAR struct inode *mountpt, FAR const char *relpath, FAR struct tmpfs_directory_s *tdo; int ret; - fvdbg("mountpt: %p relpath: %s dir: %p\n", + finfo("mountpt: %p relpath: %s dir: %p\n", mountpt, relpath, dir); DEBUGASSERT(mountpt != NULL && relpath != NULL && dir != NULL); @@ -1820,7 +1820,7 @@ static int tmpfs_closedir(FAR struct inode *mountpt, { FAR struct tmpfs_directory_s *tdo; - fvdbg("mountpt: %p dir: %p\n", mountpt, dir); + finfo("mountpt: %p dir: %p\n", mountpt, dir); DEBUGASSERT(mountpt != NULL && dir != NULL); /* Get the directory structure from the dir argument */ @@ -1847,7 +1847,7 @@ static int tmpfs_readdir(FAR struct inode *mountpt, unsigned int index; int ret; - fvdbg("mountpt: %p dir: %p\n", mountpt, dir); + finfo("mountpt: %p dir: %p\n", mountpt, dir); DEBUGASSERT(mountpt != NULL && dir != NULL); /* Get the directory structure from the dir argument and lock it */ @@ -1866,7 +1866,7 @@ static int tmpfs_readdir(FAR struct inode *mountpt, * -ENOENT */ - fvdbg("End of directory\n"); + finfo("End of directory\n"); ret = -ENOENT; } else @@ -1914,7 +1914,7 @@ static int tmpfs_readdir(FAR struct inode *mountpt, static int tmpfs_rewinddir(FAR struct inode *mountpt, FAR struct fs_dirent_s *dir) { - fvdbg("mountpt: %p dir: %p\n", mountpt, dir); + finfo("mountpt: %p dir: %p\n", mountpt, dir); DEBUGASSERT(mountpt != NULL && dir != NULL); /* Set the readdir index to zero */ @@ -1933,7 +1933,7 @@ static int tmpfs_bind(FAR struct inode *blkdriver, FAR const void *data, FAR struct tmpfs_directory_s *tdo; FAR struct tmpfs_s *fs; - fvdbg("blkdriver: %p data: %p handle: %p\n", blkdriver, data, handle); + finfo("blkdriver: %p data: %p handle: %p\n", blkdriver, data, handle); DEBUGASSERT(blkdriver == NULL && handle != NULL); /* Create an instance of the tmpfs file system */ @@ -1985,7 +1985,7 @@ static int tmpfs_unbind(FAR void *handle, FAR struct inode **blkdriver, FAR struct tmpfs_directory_s *tdo; int ret; - fvdbg("handle: %p blkdriver: %p flags: %02x\n", + finfo("handle: %p blkdriver: %p flags: %02x\n", handle, blkdriver, flags); DEBUGASSERT(fs != NULL && fs->tfs_root.tde_object != NULL); @@ -2023,7 +2023,7 @@ static int tmpfs_statfs(FAR struct inode *mountpt, FAR struct statfs *buf) off_t blkused; int ret; - fvdbg("mountpt: %p buf: %p\n", mountpt, buf); + finfo("mountpt: %p buf: %p\n", mountpt, buf); DEBUGASSERT(mountpt != NULL && buf != NULL); /* Get the file system structure from the inode reference. */ @@ -2090,7 +2090,7 @@ static int tmpfs_unlink(FAR struct inode *mountpt, FAR const char *relpath) FAR const char *name; int ret; - fvdbg("mountpt: %p relpath: %s\n", mountpt, relpath); + finfo("mountpt: %p relpath: %s\n", mountpt, relpath); DEBUGASSERT(mountpt != NULL && relpath != NULL); /* Get the file system structure from the inode reference. */ @@ -2190,7 +2190,7 @@ static int tmpfs_mkdir(FAR struct inode *mountpt, FAR const char *relpath, FAR struct tmpfs_s *fs; int ret; - fvdbg("mountpt: %p relpath: %s mode: %04x\n", mountpt, relpath, mode); + finfo("mountpt: %p relpath: %s mode: %04x\n", mountpt, relpath, mode); DEBUGASSERT(mountpt != NULL && relpath != NULL); /* Get the file system structure from the inode reference. */ @@ -2221,7 +2221,7 @@ static int tmpfs_rmdir(FAR struct inode *mountpt, FAR const char *relpath) FAR const char *name; int ret; - fvdbg("mountpt: %p relpath: %s\n", mountpt, relpath); + finfo("mountpt: %p relpath: %s\n", mountpt, relpath); DEBUGASSERT(mountpt != NULL && relpath != NULL); /* Get the file system structure from the inode reference. */ @@ -2322,7 +2322,7 @@ static int tmpfs_rename(FAR struct inode *mountpt, FAR const char *oldrelpath, FAR char *copy; int ret; - fvdbg("mountpt: %p oldrelpath: %s newrelpath: %s\n", + finfo("mountpt: %p oldrelpath: %s newrelpath: %s\n", mountpt, oldrelpath, newrelpath); DEBUGASSERT(mountpt != NULL && oldrelpath != NULL && newrelpath != NULL); @@ -2462,7 +2462,7 @@ static int tmpfs_stat(FAR struct inode *mountpt, FAR const char *relpath, size_t objsize; int ret; - fvdbg("mountpt=%p relpath=%s buf=%p\n", mountpt, relpath, buf); + finfo("mountpt=%p relpath=%s buf=%p\n", mountpt, relpath, buf); DEBUGASSERT(mountpt != NULL && relpath != NULL && buf != NULL); /* Get the file system structure from the inode reference. */ diff --git a/fs/unionfs/fs_unionfs.c b/fs/unionfs/fs_unionfs.c index b0a0920e8371d4fa2fdab20cacc120d9054ecaa0..30d70c806da3fe9db975966dca9b8bf6660fad46 100644 --- a/fs/unionfs/fs_unionfs.c +++ b/fs/unionfs/fs_unionfs.c @@ -843,7 +843,7 @@ static int unionfs_open(FAR struct file *filep, FAR const char *relpath, DEBUGASSERT(filep != NULL && filep->f_inode != NULL); ui = (FAR struct unionfs_inode_s *)filep->f_inode->i_private; - fvdbg("Opening: ui_nopen=%d\n", ui->ui_nopen); + finfo("Opening: ui_nopen=%d\n", ui->ui_nopen); /* Get exclusive access to the file system data structures */ @@ -946,7 +946,7 @@ static int unionfs_close(FAR struct file *filep) DEBUGASSERT(um != NULL && um->um_node != NULL && um->um_node->u.i_mops != NULL); ops = um->um_node->u.i_mops; - fvdbg("Closing: ui_nopen=%d\n", ui->ui_nopen); + finfo("Closing: ui_nopen=%d\n", ui->ui_nopen); /* Perform the lower level close operation */ @@ -986,7 +986,7 @@ static ssize_t unionfs_read(FAR struct file *filep, FAR char *buffer, FAR const struct mountpt_operations *ops; int ret = -EPERM; - fvdbg("buflen: %lu\n", (unsigned long)buflen); + finfo("buflen: %lu\n", (unsigned long)buflen); /* Recover the open file data from the struct file instance */ @@ -1034,7 +1034,7 @@ static ssize_t unionfs_write(FAR struct file *filep, FAR const char *buffer, FAR const struct mountpt_operations *ops; int ret = -EPERM; - fvdbg("buflen: %lu\n", (unsigned long)buflen); + finfo("buflen: %lu\n", (unsigned long)buflen); /* Recover the open file data from the struct file instance */ @@ -1081,7 +1081,7 @@ static off_t unionfs_seek(FAR struct file *filep, off_t offset, int whence) FAR const struct mountpt_operations *ops; int ret; - fvdbg("offset: %lu whence: %d\n", (unsigned long)offset, whence); + finfo("offset: %lu whence: %d\n", (unsigned long)offset, whence); /* Recover the open file data from the struct file instance */ @@ -1157,7 +1157,7 @@ static int unionfs_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR const struct mountpt_operations *ops; int ret = -ENOTTY; - fvdbg("cmd: %d arg: %lu\n", cmd, arg); + finfo("cmd: %d arg: %lu\n", cmd, arg); /* Recover the open file data from the struct file instance */ @@ -1204,7 +1204,7 @@ static int unionfs_sync(FAR struct file *filep) FAR const struct mountpt_operations *ops; int ret = -EINVAL; - fvdbg("Entry\n"); + finfo("Entry\n"); /* Recover the open file data from the struct file instance */ @@ -1252,7 +1252,7 @@ static int unionfs_dup(FAR const struct file *oldp, FAR struct file *newp) FAR const struct mountpt_operations *ops; int ret = -ENOMEM; - fvdbg("Entry\n"); + finfo("Entry\n"); /* Recover the open file data from the struct file instance */ @@ -1323,7 +1323,7 @@ static int unionfs_opendir(FAR struct inode *mountpt, FAR const char *relpath, FAR struct fs_dirent_s *lowerdir; int ret; - fvdbg("relpath: \"%s\"\n", relpath ? relpath : "NULL"); + finfo("relpath: \"%s\"\n", relpath ? relpath : "NULL"); /* Recover the filesystem data from the struct inode instance */ @@ -1486,7 +1486,7 @@ static int unionfs_closedir(FAR struct inode *mountpt, int ret = OK; int i; - fvdbg("Entry\n"); + finfo("Entry\n"); /* Recover the union file system data from the struct inode instance */ @@ -1638,7 +1638,7 @@ static int unionfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir) DEBUGASSERT(um->um_node != NULL && um->um_node->u.i_mops != NULL); ops = um->um_node->u.i_mops; - fvdbg("fu_ndx: %d\n", fu->fu_ndx); + finfo("fu_ndx: %d\n", fu->fu_ndx); /* Perform the lower level readdir operation */ @@ -1819,7 +1819,7 @@ static int unionfs_rewinddir(struct inode *mountpt, struct fs_dirent_s *dir) FAR struct fs_unionfsdir_s *fu; int ret; - fvdbg("Entry\n"); + finfo("Entry\n"); /* Recover the union file system data from the struct inode instance */ @@ -1883,7 +1883,7 @@ static int unionfs_unbind(FAR void *handle, FAR struct inode **blkdriver, { FAR struct unionfs_inode_s *ui; - fvdbg("Entry\n"); + finfo("Entry\n"); /* Recover the union file system data from the struct inode instance */ @@ -1929,7 +1929,7 @@ static int unionfs_statfs(FAR struct inode *mountpt, FAR struct statfs *buf) uint32_t ratiob16; int ret; - fvdbg("Entry\n"); + finfo("Entry\n"); /* Recover the union file system data from the struct inode instance */ @@ -2065,7 +2065,7 @@ static int unionfs_unlink(FAR struct inode *mountpt, struct stat buf; int ret; - fvdbg("relpath: %s\n", relpath); + finfo("relpath: %s\n", relpath); /* Recover the union file system data from the struct inode instance */ @@ -2137,7 +2137,7 @@ static int unionfs_mkdir(FAR struct inode *mountpt, FAR const char *relpath, int ret2; int ret; - fvdbg("relpath: %s\n", relpath); + finfo("relpath: %s\n", relpath); /* Recover the union file system data from the struct inode instance */ @@ -2210,7 +2210,7 @@ static int unionfs_rmdir(FAR struct inode *mountpt, FAR const char *relpath) int tmp; int ret; - fvdbg("relpath: %s\n", relpath); + finfo("relpath: %s\n", relpath); /* Recover the union file system data from the struct inode instance */ @@ -2285,7 +2285,7 @@ static int unionfs_rename(FAR struct inode *mountpt, int tmp; int ret = -ENOENT; - fvdbg("oldrelpath: %s newrelpath\n", oldrelpath, newrelpath); + finfo("oldrelpath: %s newrelpath\n", oldrelpath, newrelpath); /* Recover the union file system data from the struct inode instance */ @@ -2359,7 +2359,7 @@ static int unionfs_stat(FAR struct inode *mountpt, FAR const char *relpath, FAR struct unionfs_mountpt_s *um; int ret; - fvdbg("relpath: %s\n", relpath); + finfo("relpath: %s\n", relpath); /* Recover the union file system data from the struct inode instance */ @@ -2512,7 +2512,7 @@ int unionfs_mount(FAR const char *fspath1, FAR const char *prefix1, ui = (FAR struct unionfs_inode_s *)kmm_zalloc(sizeof(struct unionfs_inode_s)); if (!ui) { - fdbg("ERROR: Failed to allocated union FS state structure\n"); + ferr("ERROR: Failed to allocated union FS state structure\n"); return -ENOMEM; } @@ -2523,14 +2523,14 @@ int unionfs_mount(FAR const char *fspath1, FAR const char *prefix1, ret = unionfs_getmount(fspath1, &ui->ui_fs[0].um_node); if (ret < 0) { - fdbg("ERROR: unionfs_getmount(fspath1) failed: %d\n", ret); + ferr("ERROR: unionfs_getmount(fspath1) failed: %d\n", ret); goto errout_with_uinode; } ret = unionfs_getmount(fspath2, &ui->ui_fs[1].um_node); if (ret < 0) { - fdbg("ERROR: unionfs_getmount(fspath2) failed: %d\n", ret); + ferr("ERROR: unionfs_getmount(fspath2) failed: %d\n", ret); goto errout_with_fs1; } @@ -2541,7 +2541,7 @@ int unionfs_mount(FAR const char *fspath1, FAR const char *prefix1, ui->ui_fs[0].um_prefix = strdup(prefix1); if (ui->ui_fs[0].um_prefix == NULL) { - fdbg("ERROR: strdup(prefix1) failed\n"); + ferr("ERROR: strdup(prefix1) failed\n"); ret = -ENOMEM; goto errout_with_fs2; } @@ -2552,7 +2552,7 @@ int unionfs_mount(FAR const char *fspath1, FAR const char *prefix1, ui->ui_fs[1].um_prefix = strdup(prefix2); if (ui->ui_fs[1].um_prefix == NULL) { - fdbg("ERROR: strdup(prefix2) failed\n"); + ferr("ERROR: strdup(prefix2) failed\n"); ret = -ENOMEM; goto errout_with_prefix1; } @@ -2580,7 +2580,7 @@ int unionfs_mount(FAR const char *fspath1, FAR const char *prefix1, * -ENOMEM - Failed to allocate in-memory resources for the operation */ - fdbg("ERROR: Failed to reserve inode\n"); + ferr("ERROR: Failed to reserve inode\n"); goto errout_with_semaphore; } diff --git a/fs/vfs/fs_close.c b/fs/vfs/fs_close.c index 3a52d0c086fa3f65877ec82d0a166e8b8a7f0ac4..a2b02b1d8704f810e48d63fc4a4ebabd42edd1fc 100644 --- a/fs/vfs/fs_close.c +++ b/fs/vfs/fs_close.c @@ -79,7 +79,7 @@ int close(int fd) { - int err; + int errcode; #if CONFIG_NFILE_DESCRIPTORS > 0 int ret; @@ -98,7 +98,7 @@ int close(int fd) else #endif { - err = EBADF; + errcode = EBADF; goto errout; } } @@ -119,7 +119,7 @@ int close(int fd) { /* An error occurred while closing the driver */ - err = -ret; + errcode = -ret; goto errout; } @@ -128,7 +128,6 @@ int close(int fd) #endif errout: - set_errno(err); + set_errno(errcode); return ERROR; } - diff --git a/fs/vfs/fs_epoll.c b/fs/vfs/fs_epoll.c index 8cd6e227ac2443a56e95fe7388d185a7ae26de2b..47500d01f323b37d40f0e7ed28b5fcb93e5c6fa7 100644 --- a/fs/vfs/fs_epoll.c +++ b/fs/vfs/fs_epoll.c @@ -114,7 +114,7 @@ int epoll_ctl(int epfd, int op, int fd, struct epoll_event *ev) switch (op) { case EPOLL_CTL_ADD: - fvdbg("%08x CTL ADD(%d): fd=%d ev=%08x\n", + finfo("%08x CTL ADD(%d): fd=%d ev=%08x\n", epfd, eph->occupied, fd, ev->events); eph->evs[eph->occupied].events = ev->events | POLLERR | POLLHUP; @@ -147,7 +147,7 @@ int epoll_ctl(int epfd, int op, int fd, struct epoll_event *ev) { int i; - fvdbg("%08x CTL MOD(%d): fd=%d ev=%08x\n", + finfo("%08x CTL MOD(%d): fd=%d ev=%08x\n", epfd, eph->occupied, fd, ev->events); for (i = 0; i < eph->occupied; i++) @@ -190,12 +190,12 @@ int epoll_wait(int epfd, FAR struct epoll_event *evs, int maxevents, { if (rc < 0) { - fdbg("%08x poll fail: %d for %d, %d msecs\n", + ferr("ERROR: %08x poll fail: %d for %d, %d msecs\n", epfd, rc, eph->occupied, timeout); for (i = 0; i < eph->occupied; i++) { - fdbg("%02d: fd=%d\n", i, eph->evs[i].data.fd); + ferr(" %02d: fd=%d\n", i, eph->evs[i].data.fd); } } diff --git a/fs/vfs/fs_fcntl.c b/fs/vfs/fs_fcntl.c index f4d67ae457f1fa0817dcdda74ffc9d7928d66c9a..01ca8761fe820ac58be624b42656400733150012 100644 --- a/fs/vfs/fs_fcntl.c +++ b/fs/vfs/fs_fcntl.c @@ -75,14 +75,14 @@ #if CONFIG_NFILE_DESCRIPTORS > 0 int file_vfcntl(FAR struct file *filep, int cmd, va_list ap) { - int err = 0; + int errcode = 0; int ret = OK; /* Was this file opened ? */ if (!filep->f_inode) { - err = EBADF; + errcode = EBADF; goto errout; } @@ -119,7 +119,7 @@ int file_vfcntl(FAR struct file *filep, int cmd, va_list ap) * successful execution of one of the exec functions. */ - err = ENOSYS; + errcode = ENOSYS; break; case F_GETFL: @@ -169,7 +169,7 @@ int file_vfcntl(FAR struct file *filep, int cmd, va_list ap) * fd does not refer to a socket, the results are unspecified. */ - err = EBADF; /* Only valid on socket descriptors */ + errcode = EBADF; /* Only valid on socket descriptors */ break; case F_GETLK: @@ -199,18 +199,18 @@ int file_vfcntl(FAR struct file *filep, int cmd, va_list ap) * not be done. */ - err = ENOSYS; /* Not implemented */ + errcode = ENOSYS; /* Not implemented */ break; default: - err = EINVAL; + errcode = EINVAL; break; } errout: - if (err != 0) + if (errcode != 0) { - set_errno(err); + set_errno(errcode); return ERROR; } diff --git a/fs/vfs/fs_fdopen.c b/fs/vfs/fs_fdopen.c index 882337da11dfb877730ef56b80cb8c2bd7cd4f5e..85abbf79897d33786ce477385334441964cc79ad 100644 --- a/fs/vfs/fs_fdopen.c +++ b/fs/vfs/fs_fdopen.c @@ -129,7 +129,7 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR struct tcb_s *tcb) { FAR struct streamlist *slist; FAR FILE *stream; - int err = OK; + int errcode = OK; int ret; int i; @@ -137,7 +137,7 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR struct tcb_s *tcb) if (fd < 0) { - err = EBADF; + errcode = EBADF; goto errout; } @@ -173,7 +173,7 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR struct tcb_s *tcb) #else /* No networking... it is just a bad descriptor */ - err = EBADF; + errcode = EBADF; goto errout; #endif } @@ -193,7 +193,7 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR struct tcb_s *tcb) { /* No... return the reported error */ - err = -ret; + errcode = -ret; goto errout; } @@ -241,7 +241,7 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR struct tcb_s *tcb) if (!stream->fs_bufstart) { - err = ENOMEM; + errcode = ENOMEM; goto errout_with_sem; } @@ -266,7 +266,7 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR struct tcb_s *tcb) /* No free stream available.. report ENFILE */ - err = ENFILE; + errcode = ENFILE; #if CONFIG_STDIO_BUFFER_SIZE > 0 errout_with_sem: @@ -274,7 +274,7 @@ errout_with_sem: sem_post(&slist->sl_sem); errout: - set_errno(err); + set_errno(errcode); errout_with_errno: return NULL; } diff --git a/fs/vfs/fs_ioctl.c b/fs/vfs/fs_ioctl.c index 593eae963a33cd6e8894a356a95f0ad06f666d46..238da907a7940c9e4da313f5fa38bd187d629dcb 100644 --- a/fs/vfs/fs_ioctl.c +++ b/fs/vfs/fs_ioctl.c @@ -91,7 +91,7 @@ int fs_ioctl(int fd, int req, unsigned long arg) int ioctl(int fd, int req, unsigned long arg) #endif { - int err; + int errcode; #if CONFIG_NFILE_DESCRIPTORS > 0 FAR struct file *filep; FAR struct inode *inode; @@ -112,7 +112,7 @@ int ioctl(int fd, int req, unsigned long arg) else #endif { - err = EBADF; + errcode = EBADF; goto errout; } } @@ -138,7 +138,7 @@ int ioctl(int fd, int req, unsigned long arg) ret = (int)inode->u.i_ops->ioctl(filep, req, arg); if (ret < 0) { - err = -ret; + errcode = -ret; goto errout; } } @@ -147,7 +147,6 @@ int ioctl(int fd, int req, unsigned long arg) #endif errout: - set_errno(err); + set_errno(errcode); return ERROR; } - diff --git a/fs/vfs/fs_lseek.c b/fs/vfs/fs_lseek.c index 7136d2ce11866c20a6aed7f4b43503f94f14e419..be74239ecae0b714f290604453191c060c7db907 100644 --- a/fs/vfs/fs_lseek.c +++ b/fs/vfs/fs_lseek.c @@ -75,7 +75,7 @@ off_t file_seek(FAR struct file *filep, off_t offset, int whence) { FAR struct inode *inode; int ret; - int err = OK; + int errcode = OK; DEBUGASSERT(filep); inode = filep->f_inode; @@ -87,7 +87,7 @@ off_t file_seek(FAR struct file *filep, off_t offset, int whence) ret = (int)inode->u.i_ops->seek(filep, offset, whence); if (ret < 0) { - err = -ret; + errcode = -ret; goto errout; } } @@ -108,17 +108,17 @@ off_t file_seek(FAR struct file *filep, off_t offset, int whence) } else { - err = EINVAL; + errcode = EINVAL; goto errout; } break; case SEEK_END: - err = ENOSYS; + errcode = ENOSYS; goto errout; default: - err = EINVAL; + errcode = EINVAL; goto errout; } } @@ -126,7 +126,7 @@ off_t file_seek(FAR struct file *filep, off_t offset, int whence) return filep->f_pos; errout: - set_errno(err); + set_errno(errcode); return (off_t)ERROR; } diff --git a/fs/vfs/fs_poll.c b/fs/vfs/fs_poll.c index 2910b30551f7f8c1105b0b18b1b9dc882415db88..b4163230fea20d4eaf3b7421be8aaf66518932e7 100644 --- a/fs/vfs/fs_poll.c +++ b/fs/vfs/fs_poll.c @@ -77,14 +77,14 @@ static int poll_semtake(FAR sem_t *sem) if (sem_wait(sem) < 0) { - int err = get_errno(); + int errcode = get_errno(); /* The only case that an error should occur here is if the wait were * awakened by a signal. */ - DEBUGASSERT(err == EINTR); - return -err; + DEBUGASSERT(errcode == EINTR); + return -errcode; } return OK; @@ -329,7 +329,7 @@ int poll(FAR struct pollfd *fds, nfds_t nfds, int timeout) { sem_t sem; int count = 0; - int err; + int errcode; int ret; sem_init(&sem, 0, 0); @@ -378,10 +378,10 @@ int poll(FAR struct pollfd *fds, nfds_t nfds, int timeout) * Preserve ret, if negative, since it holds the result of the wait. */ - err = poll_teardown(fds, nfds, &count, ret); - if (err < 0 && ret >= 0) + errcode = poll_teardown(fds, nfds, &count, ret); + if (errcode < 0 && ret >= 0) { - ret = err; + ret = errcode; } } diff --git a/fs/vfs/fs_write.c b/fs/vfs/fs_write.c index b7f71a226567f862e408ea85ed9a31655cb2fabb..34b77e5a472d814b93ec01fa575e3f898775889f 100644 --- a/fs/vfs/fs_write.c +++ b/fs/vfs/fs_write.c @@ -73,13 +73,13 @@ ssize_t file_write(FAR struct file *filep, FAR const void *buf, size_t nbytes) { FAR struct inode *inode; int ret; - int err; + int errcode; /* Was this file opened for write access? */ if ((filep->f_oflags & O_WROK) == 0) { - err = EBADF; + errcode = EBADF; goto errout; } @@ -88,7 +88,7 @@ ssize_t file_write(FAR struct file *filep, FAR const void *buf, size_t nbytes) inode = filep->f_inode; if (!inode || !inode->u.i_ops || !inode->u.i_ops->write) { - err = EBADF; + errcode = EBADF; goto errout; } @@ -97,14 +97,14 @@ ssize_t file_write(FAR struct file *filep, FAR const void *buf, size_t nbytes) ret = inode->u.i_ops->write(filep, buf, nbytes); if (ret < 0) { - err = -ret; + errcode = -ret; goto errout; } return ret; errout: - set_errno(err); + set_errno(errcode); return ERROR; } diff --git a/graphics/nxbe/nxbe_bitmap.c b/graphics/nxbe/nxbe_bitmap.c index c4d29681a24e7b23c1b836144c10516a700c22d8..61a380ca1046336899448a138b0305e6435c2acc 100644 --- a/graphics/nxbe/nxbe_bitmap.c +++ b/graphics/nxbe/nxbe_bitmap.c @@ -125,7 +125,7 @@ void nxbe_bitmap(FAR struct nxbe_window_s *wnd, FAR const struct nxgl_rect_s *de unsigned int deststride; int i; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd || !dest || !src || !origin) { return; @@ -138,7 +138,7 @@ void nxbe_bitmap(FAR struct nxbe_window_s *wnd, FAR const struct nxgl_rect_s *de if (dest->pt1.x < origin->x || dest->pt1.y < origin->y) { - gdbg("Bad dest start position\n"); + gerr("ERROR: Bad dest start position\n"); return; } @@ -149,7 +149,7 @@ void nxbe_bitmap(FAR struct nxbe_window_s *wnd, FAR const struct nxgl_rect_s *de deststride = (((dest->pt2.x - origin->x + 1) * wnd->be->plane[0].pinfo.bpp + 7) >> 3); if (deststride > stride) { - gdbg("Bad dest width\n"); + gerr("ERROR: Bad dest width\n"); return; } diff --git a/graphics/nxbe/nxbe_clipper.c b/graphics/nxbe/nxbe_clipper.c index 0ded5b5c70bdaa370450006afab3c8e3817b6665..e73ba6c8530c9ba6140f191915b4665b92e00908 100644 --- a/graphics/nxbe/nxbe_clipper.c +++ b/graphics/nxbe/nxbe_clipper.c @@ -115,7 +115,7 @@ static inline void nxbe_pushrectangle(FAR struct nxbe_clipstack_s *stack, sizeof(struct nxbe_cliprect_s) * mxrects); if (!newstack) { - gdbg("Failed to reallocate stack\n"); + gerr("ERROR: Failed to reallocate stack\n"); return; } diff --git a/graphics/nxbe/nxbe_closewindow.c b/graphics/nxbe/nxbe_closewindow.c index 04f5b9b23d42b1ed9d6ded920d8baccf6c8b3972..44520da22c182b4fc43985057b5ee6ca4fa316d5 100644 --- a/graphics/nxbe/nxbe_closewindow.c +++ b/graphics/nxbe/nxbe_closewindow.c @@ -70,7 +70,7 @@ void nxbe_closewindow(struct nxbe_window_s *wnd) { FAR struct nxbe_state_s *be; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd) { return; diff --git a/graphics/nxbe/nxbe_configure.c b/graphics/nxbe/nxbe_configure.c index 5dc9b49c19c5751eac993ad1e9d987d53fdff60f..891d2e15c5c2d9946f33bc61299f9ac3e2ad6fcb 100644 --- a/graphics/nxbe/nxbe_configure.c +++ b/graphics/nxbe/nxbe_configure.c @@ -89,7 +89,7 @@ int nxbe_configure(FAR NX_DRIVERTYPE *dev, FAR struct nxbe_state_s *be) ret = dev->getvideoinfo(dev, &be->vinfo); if (ret < 0) { - gdbg("Failed to get vinfo\n"); + gerr("ERROR: Failed to get vinfo\n"); return ret; } @@ -99,16 +99,16 @@ int nxbe_configure(FAR NX_DRIVERTYPE *dev, FAR struct nxbe_state_s *be) /* Check the number of color planes */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (be->vinfo.nplanes > CONFIG_NX_NPLANES) { - gdbg("NX configured for only %d planes, controller wants %d\n", + gerr("ERROR: NX configured for only %d planes, controller wants %d\n", CONFIG_NX_NPLANES, be->vinfo.nplanes); return -E2BIG; } else if (be->vinfo.nplanes < CONFIG_NX_NPLANES) { - gdbg("NX configured for %d planes, controller only needs %d\n", + gwarn("WARNING: NX configured for %d planes, controller only needs %d\n", CONFIG_NX_NPLANES, be->vinfo.nplanes); } #endif @@ -120,7 +120,7 @@ int nxbe_configure(FAR NX_DRIVERTYPE *dev, FAR struct nxbe_state_s *be) ret = dev->getplaneinfo(dev, i, &be->plane[i].pinfo); if (ret < 0) { - gdbg("Failed to get pinfo[%d]\n", i); + gerr("ERROR: Failed to get pinfo[%d]\n", i); return ret; } @@ -216,7 +216,7 @@ int nxbe_configure(FAR NX_DRIVERTYPE *dev, FAR struct nxbe_state_s *be) else #endif { - gdbg("Unsupported pinfo[%d] BPP: %d\n", i, be->plane[i].pinfo.bpp); + gerr("ERROR: Unsupported pinfo[%d] BPP: %d\n", i, be->plane[i].pinfo.bpp); return -ENOSYS; } } diff --git a/graphics/nxbe/nxbe_fill.c b/graphics/nxbe/nxbe_fill.c index c87992052e182773cc2b4b9279ab46e79cd61682..671a3e7ab9617e3941df6f9e5d1bdef534891c8b 100644 --- a/graphics/nxbe/nxbe_fill.c +++ b/graphics/nxbe/nxbe_fill.c @@ -112,7 +112,7 @@ void nxbe_fill(FAR struct nxbe_window_s *wnd, struct nxgl_rect_s remaining; int i; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd || !rect) { return; diff --git a/graphics/nxbe/nxbe_filltrapezoid.c b/graphics/nxbe/nxbe_filltrapezoid.c index cf3b3096a3c4912168403753f781a27f01aafdb1..1936a6c4d6297d943f35b50dfb9a895f4a07927d 100644 --- a/graphics/nxbe/nxbe_filltrapezoid.c +++ b/graphics/nxbe/nxbe_filltrapezoid.c @@ -137,7 +137,7 @@ void nxbe_filltrapezoid(FAR struct nxbe_window_s *wnd, struct nxgl_rect_s remaining; int i; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd || !trap) { return; diff --git a/graphics/nxbe/nxbe_getrectangle.c b/graphics/nxbe/nxbe_getrectangle.c index b4d871bc80c10bb0b6e9dac53bedbe225c5e9af8..2e707a816cd16cffc3d50e0d68265952065eb209 100644 --- a/graphics/nxbe/nxbe_getrectangle.c +++ b/graphics/nxbe/nxbe_getrectangle.c @@ -87,10 +87,10 @@ void nxbe_getrectangle(FAR struct nxbe_window_s *wnd, { struct nxgl_rect_s remaining; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd || !rect || !dest || plane >= wnd->be->vinfo.nplanes) { - gvdbg("Invalid parameters\n"); + ginfo("Invalid parameters\n"); return; } #endif diff --git a/graphics/nxbe/nxbe_move.c b/graphics/nxbe/nxbe_move.c index 9bf56fd1e9c8b9b447effc815f627b81da18058b..e2eee9f01bbf3ffcb2d779a724cfddf01a1fb1cd 100644 --- a/graphics/nxbe/nxbe_move.c +++ b/graphics/nxbe/nxbe_move.c @@ -208,7 +208,7 @@ void nxbe_move(FAR struct nxbe_window_s *wnd, FAR const struct nxgl_rect_s *rect struct nxbe_move_s info; int i; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd || !rect) { return; diff --git a/graphics/nxbe/nxbe_setpixel.c b/graphics/nxbe/nxbe_setpixel.c index 81627f0608d2807fb522306b35641d34e70b091e..0b61897381a0376d05faba6e445f75da1e483a5e 100644 --- a/graphics/nxbe/nxbe_setpixel.c +++ b/graphics/nxbe/nxbe_setpixel.c @@ -112,7 +112,7 @@ void nxbe_setpixel(FAR struct nxbe_window_s *wnd, struct nxgl_rect_s rect; int i; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd || !pos) { return; diff --git a/graphics/nxbe/nxbe_setposition.c b/graphics/nxbe/nxbe_setposition.c index 5647270e548fc3d4e6a676391078e5dae88c384d..a40a01ebe7936b1cd19981be745c9a28be36188a 100644 --- a/graphics/nxbe/nxbe_setposition.c +++ b/graphics/nxbe/nxbe_setposition.c @@ -63,7 +63,7 @@ void nxbe_setposition(FAR struct nxbe_window_s *wnd, struct nxgl_rect_s before; struct nxgl_rect_s rect; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd) { return; diff --git a/graphics/nxbe/nxbe_setsize.c b/graphics/nxbe/nxbe_setsize.c index b542c0a8e87488d3b5cf20f3f76b120003c934ff..3b522d38a4019ad54d5c8435b803f6717feb9f9b 100644 --- a/graphics/nxbe/nxbe_setsize.c +++ b/graphics/nxbe/nxbe_setsize.c @@ -62,7 +62,7 @@ void nxbe_setsize(FAR struct nxbe_window_s *wnd, { struct nxgl_rect_s bounds; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd) { return; diff --git a/graphics/nxmu/nx_start.c b/graphics/nxmu/nx_start.c index 814dc5a70cfaf44231607398fdbca5da5b3a1639..3c3e6446d94662e488ad99a8bca8a577b1770d22 100644 --- a/graphics/nxmu/nx_start.c +++ b/graphics/nxmu/nx_start.c @@ -84,7 +84,7 @@ int nx_server(int argc, char *argv[]) dev = board_graphics_setup(CONFIG_NXSTART_DEVNO); if (!dev) { - gdbg("ERROR: board_graphics_setup failed, devno=%d\n", CONFIG_NXSTART_DEVNO); + gerr("ERROR: board_graphics_setup failed, devno=%d\n", CONFIG_NXSTART_DEVNO); return EXIT_FAILURE; } @@ -94,7 +94,7 @@ int nx_server(int argc, char *argv[]) ret = board_lcd_initialize(); if (ret < 0) { - gdbg("ERROR: board_lcd_initialize failed: %d\n", ret); + gerr("ERROR: board_lcd_initialize failed: %d\n", ret); return EXIT_FAILURE; } @@ -103,7 +103,7 @@ int nx_server(int argc, char *argv[]) dev = board_lcd_getdev(CONFIG_NXSTART_DEVNO); if (!dev) { - gdbg("ERROR: board_lcd_getdev failed, devno=%d\n", CONFIG_NXSTART_DEVNO); + gerr("ERROR: board_lcd_getdev failed, devno=%d\n", CONFIG_NXSTART_DEVNO); return EXIT_FAILURE; } @@ -119,14 +119,14 @@ int nx_server(int argc, char *argv[]) ret = up_fbinitialize(0); if (ret < 0) { - gdbg("ERROR: up_fbinitialize failed: %d\n", ret); + gerr("ERROR: up_fbinitialize failed: %d\n", ret); return EXIT_FAILURE; } dev = up_fbgetvplane(0, CONFIG_NXSTART_VPLANE); if (!dev) { - gdbg("ERROR: up_fbgetvplane failed, vplane=%d\n", CONFIG_NXSTART_VPLANE); + gerr("ERROR: up_fbgetvplane failed, vplane=%d\n", CONFIG_NXSTART_VPLANE); return EXIT_FAILURE; } @@ -135,7 +135,7 @@ int nx_server(int argc, char *argv[]) /* Then start the server (nx_run does not normally return) */ ret = nx_run(dev); - gvdbg("nx_run returned: %d\n", ret); + ginfo("nx_run returned: %d\n", ret); return EXIT_FAILURE; } @@ -174,7 +174,7 @@ int nx_start(void) /* Start the server kernel thread */ - gvdbg("Starting server task\n"); + ginfo("Starting server task\n"); server = kernel_thread("NX Server", CONFIG_NXSTART_SERVERPRIO, CONFIG_NXSTART_SERVERSTACK, nx_server, NULL); if (server < 0) @@ -182,7 +182,7 @@ int nx_start(void) int errcode = errno; DEBUGASSERT(errcode > 0); - gdbg("ERROR: Failed to create nx_server kernel thread: %d\n", errcode); + gerr("ERROR: Failed to create nx_server kernel thread: %d\n", errcode); return -errcode; } diff --git a/graphics/nxmu/nxmu_releasebkgd.c b/graphics/nxmu/nxmu_releasebkgd.c index 4762e69f8a9df5b9fbfb31c7903a58ef15bb061b..7f8d2935076f368b2a862b8495c5a0ad4b320e2a 100644 --- a/graphics/nxmu/nxmu_releasebkgd.c +++ b/graphics/nxmu/nxmu_releasebkgd.c @@ -88,7 +88,7 @@ void nxmu_releasebkgd(FAR struct nxfe_state_s *fe) { FAR struct nxbe_state_s *be = &fe->be; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!fe) { return; diff --git a/graphics/nxmu/nxmu_reportposition.c b/graphics/nxmu/nxmu_reportposition.c index cbc5651f9fb7025ee6757a4f2b94194975a3db83..757873ac1eee3e81d34aff8f199b0664f7da6cb3 100644 --- a/graphics/nxmu/nxmu_reportposition.c +++ b/graphics/nxmu/nxmu_reportposition.c @@ -103,6 +103,6 @@ void nxfe_reportposition(FAR struct nxbe_window_s *wnd) ret = nxmu_sendclientwindow(wnd, &outmsg, sizeof(struct nxclimsg_newposition_s)); if (ret < 0) { - gdbg("nxmu_sendclient failed: %d\n", errno); + gerr("ERROR: nxmu_sendclient failed: %d\n", errno); } } diff --git a/graphics/nxmu/nxmu_requestbkgd.c b/graphics/nxmu/nxmu_requestbkgd.c index d25516008ddbbd6ac914d642b5d99769bc3a8766..23f7748fc30321218d8e92ffdfc950cf2017e84d 100644 --- a/graphics/nxmu/nxmu_requestbkgd.c +++ b/graphics/nxmu/nxmu_requestbkgd.c @@ -92,7 +92,7 @@ void nxmu_requestbkgd(FAR struct nxfe_conn_s *conn, FAR const struct nx_callback_s *cb, FAR void *arg) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!conn || !be || !cb) { errno = EINVAL; diff --git a/graphics/nxmu/nxmu_sendclient.c b/graphics/nxmu/nxmu_sendclient.c index 95b60581f0a54f3371b011235b4ca01e6646949a..7a0ab2be7be45889dc4c4af8f266b44dd17ee354 100644 --- a/graphics/nxmu/nxmu_sendclient.c +++ b/graphics/nxmu/nxmu_sendclient.c @@ -92,7 +92,7 @@ int nxmu_sendclient(FAR struct nxfe_conn_s *conn, FAR const void *msg, /* Sanity checking */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!conn || !conn->swrmq) { set_errno(EINVAL); @@ -105,7 +105,7 @@ int nxmu_sendclient(FAR struct nxfe_conn_s *conn, FAR const void *msg, ret = mq_send(conn->swrmq, msg, msglen, NX_CLIMSG_PRIO); if (ret < 0) { - gdbg("mq_send failed: %d\n", errno); + gerr("ERROR: mq_send failed: %d\n", errno); } return ret; diff --git a/graphics/nxmu/nxmu_sendclientwindow.c b/graphics/nxmu/nxmu_sendclientwindow.c index c06c9f225e1240f8c75fcb1bc2d9ad03b9f010b9..e8ce5276a17f5ee9fa08c0f5577cb69cc5b49d48 100644 --- a/graphics/nxmu/nxmu_sendclientwindow.c +++ b/graphics/nxmu/nxmu_sendclientwindow.c @@ -92,7 +92,7 @@ int nxmu_sendclientwindow(FAR struct nxbe_window_s *wnd, FAR const void *msg, /* Sanity checking */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd || !wnd->conn) { set_errno(EINVAL); diff --git a/graphics/nxmu/nxmu_server.c b/graphics/nxmu/nxmu_server.c index a5dad6ec40bef4a909b85d7d986ef386ae4ebc9a..5ceb92d532a983d970870c76d76bfb48138ff439 100644 --- a/graphics/nxmu/nxmu_server.c +++ b/graphics/nxmu/nxmu_server.c @@ -87,7 +87,7 @@ static inline void nxmu_disconnect(FAR struct nxfe_conn_s *conn) ret = nxmu_sendclient(conn, &outmsg, sizeof(struct nxclimsg_disconnected_s)); if (ret < 0) { - gdbg("nxmu_sendclient failed: %d\n", errno); + gerr("ERROR: nxmu_sendclient failed: %d\n", errno); } /* Close the outgoing client message queue */ @@ -114,7 +114,7 @@ static inline void nxmu_connect(FAR struct nxfe_conn_s *conn) conn->swrmq = mq_open(mqname, O_WRONLY); if (conn->swrmq == (mqd_t)-1) { - gdbg("mq_open(%s) failed: %d\n", mqname, errno); + gerr("ERROR: mq_open(%s) failed: %d\n", mqname, errno); outmsg.msgid = NX_CLIMSG_DISCONNECTED; } @@ -124,7 +124,7 @@ static inline void nxmu_connect(FAR struct nxfe_conn_s *conn) ret = nxmu_sendclient(conn, &outmsg, sizeof(struct nxclimsg_connected_s)); if (ret < 0) { - gdbg("nxmu_sendclient failed: %d\n", errno); + gerr("ERROR: nxmu_sendclient failed: %d\n", errno); } } @@ -166,7 +166,7 @@ static inline void nxmu_blocked(FAR struct nxbe_window_s *wnd, FAR void *arg) ret = nxmu_sendclient(wnd->conn, &outmsg, sizeof(struct nxclimsg_blocked_s)); if (ret < 0) { - gdbg("nxmu_sendclient failed: %d\n", errno); + gerr("ERROR: nxmu_sendclient failed: %d\n", errno); } } @@ -187,7 +187,7 @@ static inline int nxmu_setup(FAR const char *mqname, FAR NX_DRIVERTYPE *dev, ret = nxbe_configure(dev, &fe->be); if (ret < 0) { - gdbg("nxbe_configure failed: %d\n", -ret); + gerr("ERROR: nxbe_configure failed: %d\n", -ret); errno = -ret; return ERROR; } @@ -196,7 +196,7 @@ static inline int nxmu_setup(FAR const char *mqname, FAR NX_DRIVERTYPE *dev, ret = nxbe_colormap(dev); if (ret < 0) { - gdbg("nxbe_colormap failed: %d\n", -ret); + gerr("ERROR: nxbe_colormap failed: %d\n", -ret); errno = -ret; return ERROR; } @@ -217,7 +217,7 @@ static inline int nxmu_setup(FAR const char *mqname, FAR NX_DRIVERTYPE *dev, fe->conn.crdmq = mq_open(mqname, O_RDONLY | O_CREAT, 0666, &attr); if (fe->conn.crdmq == (mqd_t)-1) { - gdbg("mq_open(%s) failed: %d\n", mqname, errno); + gerr("ERROR: mq_open(%s) failed: %d\n", mqname, errno); return ERROR; /* mq_open sets errno */ } @@ -233,7 +233,7 @@ static inline int nxmu_setup(FAR const char *mqname, FAR NX_DRIVERTYPE *dev, fe->conn.swrmq = mq_open(mqname, O_WRONLY); if (fe->conn.swrmq == (mqd_t)-1) { - gdbg("mq_open(%s) failed: %d\n", mqname, errno); + gerr("ERROR: mq_open(%s) failed: %d\n", mqname, errno); mq_close(fe->conn.crdmq); return ERROR; /* mq_open sets errno */ } @@ -301,7 +301,7 @@ int nx_runinstance(FAR const char *mqname, FAR NX_DRIVERTYPE *dev) /* Sanity checking */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!mqname || !dev) { errno = EINVAL; @@ -334,7 +334,7 @@ int nx_runinstance(FAR const char *mqname, FAR NX_DRIVERTYPE *dev) { if (errno != EINTR) { - gdbg("mq_receive failed: %d\n", errno); + gerr("ERROR: mq_receive failed: %d\n", errno); goto errout; /* mq_receive sets errno */ } continue; @@ -345,7 +345,7 @@ int nx_runinstance(FAR const char *mqname, FAR NX_DRIVERTYPE *dev) DEBUGASSERT(nbytes >= sizeof(struct nxsvrmsg_s)); msg = (FAR struct nxsvrmsg_s *)buffer; - gvdbg("Received opcode=%d nbytes=%d\n", msg->msgid, nbytes); + ginfo("Received opcode=%d nbytes=%d\n", msg->msgid, nbytes); switch (msg->msgid) { /* Messages sent from clients to the NX server *********************/ @@ -531,7 +531,7 @@ int nx_runinstance(FAR const char *mqname, FAR NX_DRIVERTYPE *dev) { FAR struct nxclimsg_redraw_s *redraw = (FAR struct nxclimsg_redraw_s *)buffer; DEBUGASSERT(redraw->wnd == &fe.be.bkgd); - gvdbg("Re-draw background rect={(%d,%d),(%d,%d)}\n", + ginfo("Re-draw background rect={(%d,%d),(%d,%d)}\n", redraw->rect.pt1.x, redraw->rect.pt1.y, redraw->rect.pt2.x, redraw->rect.pt2.y); nxbe_fill(&fe.be.bkgd, &redraw->rect, fe.be.bgcolor); @@ -545,7 +545,7 @@ int nx_runinstance(FAR const char *mqname, FAR NX_DRIVERTYPE *dev) case NX_CLIMSG_CONNECTED: /* Shouldn't happen */ case NX_CLIMSG_DISCONNECTED: default: - gdbg("Unrecognized command: %d\n", msg->msgid); + gerr("ERROR: Unrecognized command: %d\n", msg->msgid); break; } } diff --git a/graphics/nxsu/nx_bitmap.c b/graphics/nxsu/nx_bitmap.c index b9d732bee61b3629679a46732d9ed1576ac847e8..59f3199c2d3d4986c00bb7a2320d541a8cd97636 100644 --- a/graphics/nxsu/nx_bitmap.c +++ b/graphics/nxsu/nx_bitmap.c @@ -97,7 +97,7 @@ int nx_bitmap(NXWINDOW hwnd, FAR const struct nxgl_rect_s *dest, FAR const void *src[CONFIG_NX_NPLANES], FAR const struct nxgl_point_s *origin, unsigned int stride) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hwnd || !dest || !src || !origin) { errno = EINVAL; diff --git a/graphics/nxsu/nx_closewindow.c b/graphics/nxsu/nx_closewindow.c index 07fedac83df64b15b8f7d5748a52682d91df8b16..bd3c0e44f04fb4e76b8291395ba1c08f370a3231 100644 --- a/graphics/nxsu/nx_closewindow.c +++ b/graphics/nxsu/nx_closewindow.c @@ -86,7 +86,7 @@ int nx_closewindow(NXWINDOW hwnd) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hwnd) { errno = EINVAL; diff --git a/graphics/nxsu/nx_constructwindow.c b/graphics/nxsu/nx_constructwindow.c index 62bf138e9f937cd26145b14173073e1509a245bf..ca468809d862ae1539e68c1e67db0e7a83e85f28 100644 --- a/graphics/nxsu/nx_constructwindow.c +++ b/graphics/nxsu/nx_constructwindow.c @@ -107,7 +107,7 @@ int nx_constructwindow(NXHANDLE handle, NXWINDOW hwnd, FAR struct nxbe_window_s *wnd = (FAR struct nxbe_window_s *)hwnd; FAR struct nxbe_state_s *be = &fe->be; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd) { set_errno(EINVAL); diff --git a/graphics/nxsu/nx_fill.c b/graphics/nxsu/nx_fill.c index 1659df1869c18d99926db482a753d85fd4c757a1..adf3d16236e61f2889cc970c49716381cc114c6d 100644 --- a/graphics/nxsu/nx_fill.c +++ b/graphics/nxsu/nx_fill.c @@ -90,7 +90,7 @@ int nx_fill(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hwnd || !rect || !color) { errno = EINVAL; diff --git a/graphics/nxsu/nx_filltrapezoid.c b/graphics/nxsu/nx_filltrapezoid.c index dbe99b943af2324012a0fa6f440b89db7f5a0069..dcbace13eb0662bd82b722c43682104c6b2f830a 100644 --- a/graphics/nxsu/nx_filltrapezoid.c +++ b/graphics/nxsu/nx_filltrapezoid.c @@ -92,7 +92,7 @@ int nx_filltrapezoid(NXWINDOW hwnd, FAR const struct nxgl_rect_s *clip, FAR const struct nxgl_trapezoid_s *trap, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hwnd || !trap || !color) { errno = EINVAL; diff --git a/graphics/nxsu/nx_getposition.c b/graphics/nxsu/nx_getposition.c index c41048862df4f5ba5f75cf0bdab4dd016bc73785..86326db1887010a1d1f6fd37541d5fa555198eca 100644 --- a/graphics/nxsu/nx_getposition.c +++ b/graphics/nxsu/nx_getposition.c @@ -87,7 +87,7 @@ int nx_getposition(NXWINDOW hwnd) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hwnd) { errno = EINVAL; diff --git a/graphics/nxsu/nx_getrectangle.c b/graphics/nxsu/nx_getrectangle.c index ed3ebf426853370fd6e655f004532c641b12bb6a..37e5b8b2148d5039f2771d24b163009a27ca62eb 100644 --- a/graphics/nxsu/nx_getrectangle.c +++ b/graphics/nxsu/nx_getrectangle.c @@ -96,7 +96,7 @@ int nx_getrectangle(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, unsigned int plane, FAR uint8_t *dest, unsigned int deststride) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hwnd || !rect || !dest) { set_errno(EINVAL); diff --git a/graphics/nxsu/nx_lower.c b/graphics/nxsu/nx_lower.c index 877c89ce6b539d3445d15bd8ddeede05c753ed42..b6693cb0a55b34bb2fd3b34e55f6067c2b5823eb 100644 --- a/graphics/nxsu/nx_lower.c +++ b/graphics/nxsu/nx_lower.c @@ -85,7 +85,7 @@ int nx_lower(NXWINDOW hwnd) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hwnd) { errno = EINVAL; diff --git a/graphics/nxsu/nx_move.c b/graphics/nxsu/nx_move.c index 6404bf48ac2ff8471d45e7208588a9b6fb67ff26..54f17b696f726fb552cf3ca5c1963e94231de9a5 100644 --- a/graphics/nxsu/nx_move.c +++ b/graphics/nxsu/nx_move.c @@ -88,7 +88,7 @@ int nx_move(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, FAR const struct nxgl_point_s *offset) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hwnd) { errno = EINVAL; diff --git a/graphics/nxsu/nx_open.c b/graphics/nxsu/nx_open.c index 2c646c8b3e4a0d742ae697f9d03f28d238c3f713..5162c020045466e60a2e37b772307b11b1db30ca 100644 --- a/graphics/nxsu/nx_open.c +++ b/graphics/nxsu/nx_open.c @@ -101,7 +101,7 @@ static void nxsu_bkgdredraw(NXWINDOW hwnd, FAR struct nxbe_window_s *wnd = (FAR struct nxbe_window_s *)hwnd; FAR struct nxbe_state_s *be = wnd->be; - gvdbg("BG redraw rect={(%d,%d),(%d,%d)}\n", + ginfo("BG redraw rect={(%d,%d),(%d,%d)}\n", rect->pt1.x, rect->pt1.y, rect->pt2.x, rect->pt2.y); nxbe_fill(wnd, &wnd->bounds, be->bgcolor); } @@ -120,7 +120,7 @@ static inline int nxsu_setup(FAR NX_DRIVERTYPE *dev, ret = nxbe_configure(dev, &fe->be); if (ret < 0) { - gdbg("nxbe_configure failed: %d\n", -ret); + gerr("ERROR: nxbe_configure failed: %d\n", -ret); errno = -ret; return ERROR; } @@ -129,7 +129,7 @@ static inline int nxsu_setup(FAR NX_DRIVERTYPE *dev, ret = nxbe_colormap(dev); if (ret < 0) { - gdbg("nxbe_colormap failed: %d\n", -ret); + gerr("ERROR: nxbe_colormap failed: %d\n", -ret); errno = -ret; return ERROR; } @@ -187,7 +187,7 @@ NXHANDLE nx_open(FAR NX_DRIVERTYPE *dev) /* Sanity checking */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!dev) { errno = EINVAL; diff --git a/graphics/nxsu/nx_openwindow.c b/graphics/nxsu/nx_openwindow.c index 3be9d5393afbb5ef9be9cc4365cbeb7acce955ad..3ff6b5a5f133a6340d59ee626ec5a24d768cd4d3 100644 --- a/graphics/nxsu/nx_openwindow.c +++ b/graphics/nxsu/nx_openwindow.c @@ -95,7 +95,7 @@ NXWINDOW nx_openwindow(NXHANDLE handle, FAR const struct nx_callback_s *cb, FAR struct nxbe_window_s *wnd; int ret; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!handle || !cb) { errno = EINVAL; diff --git a/graphics/nxsu/nx_raise.c b/graphics/nxsu/nx_raise.c index 7e963577a31770597a6eab996893dbac4fb17957..ae7f72480ce16b711e32f5c6ea896fa840d28de5 100644 --- a/graphics/nxsu/nx_raise.c +++ b/graphics/nxsu/nx_raise.c @@ -85,7 +85,7 @@ int nx_raise(NXWINDOW hwnd) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hwnd) { errno = EINVAL; diff --git a/graphics/nxsu/nx_releasebkgd.c b/graphics/nxsu/nx_releasebkgd.c index 8c2181f2d041d7736dc633ba1b57054d2802f0d4..6a0e5f42085595516ef1073660d7655a9294be93 100644 --- a/graphics/nxsu/nx_releasebkgd.c +++ b/graphics/nxsu/nx_releasebkgd.c @@ -88,7 +88,7 @@ int nx_releasebkgd(NXWINDOW hwnd) { FAR struct nxbe_window_s *bkgd = (FAR struct nxbe_window_s *)hwnd; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!bkgd) { errno = EINVAL; diff --git a/graphics/nxsu/nx_requestbkgd.c b/graphics/nxsu/nx_requestbkgd.c index e5aaad311e9e5da29fd55de07881590e843f74f3..5441adaaae5691edb3c89d6de554de9e3fd1d5cd 100644 --- a/graphics/nxsu/nx_requestbkgd.c +++ b/graphics/nxsu/nx_requestbkgd.c @@ -115,7 +115,7 @@ int nx_requestbkgd(NXHANDLE handle, FAR const struct nx_callback_s *cb, FAR struct nxfe_state_s *fe = (FAR struct nxfe_state_s *)handle; FAR struct nxbe_state_s *be = &fe->be; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!fe || !cb) { errno = EINVAL; diff --git a/graphics/nxsu/nx_setbgcolor.c b/graphics/nxsu/nx_setbgcolor.c index 3b6af8062667e92a78e1781f32ed2d15cc8587da..ab1e974bbbad574d84f13435297e5245a8455876 100644 --- a/graphics/nxsu/nx_setbgcolor.c +++ b/graphics/nxsu/nx_setbgcolor.c @@ -89,7 +89,7 @@ int nx_setbgcolor(NXHANDLE handle, { FAR struct nxfe_state_s *fe = (FAR struct nxfe_state_s *)handle; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!fe) { errno = EINVAL; diff --git a/graphics/nxsu/nx_setpixel.c b/graphics/nxsu/nx_setpixel.c index 37ce41af392a8f3ea2380655c47a07fc92784fc8..35e10832afd669285654effe098639098997a76c 100644 --- a/graphics/nxsu/nx_setpixel.c +++ b/graphics/nxsu/nx_setpixel.c @@ -91,7 +91,7 @@ int nx_setpixel(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hwnd || !pos || !color) { errno = EINVAL; diff --git a/graphics/nxsu/nx_setposition.c b/graphics/nxsu/nx_setposition.c index e138ea97330b25bc6605dea38cc94f0b78f0b9fa..e2799f6261c8d6ac29fa2ad827d5eabf98c32195 100644 --- a/graphics/nxsu/nx_setposition.c +++ b/graphics/nxsu/nx_setposition.c @@ -86,7 +86,7 @@ int nx_setposition(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hwnd || !pos) { errno = EINVAL; diff --git a/graphics/nxsu/nx_setsize.c b/graphics/nxsu/nx_setsize.c index 7be045b90e932b06811927200319b91536aebd9c..bec2f7642a1ca7de907f93f26186227b9d7e8329 100644 --- a/graphics/nxsu/nx_setsize.c +++ b/graphics/nxsu/nx_setsize.c @@ -86,7 +86,7 @@ int nx_setsize(NXWINDOW hwnd, FAR const struct nxgl_size_s *size) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hwnd || !size) { errno = EINVAL; diff --git a/graphics/nxsu/nxsu_redrawreq.c b/graphics/nxsu/nxsu_redrawreq.c index 9871e879c5074d362bf71a2e5c8270e93e5e9929..f903639f6646466b126b8cc99023cb0cf60df85d 100644 --- a/graphics/nxsu/nxsu_redrawreq.c +++ b/graphics/nxsu/nxsu_redrawreq.c @@ -82,7 +82,7 @@ void nxfe_redrawreq(FAR struct nxbe_window_s *wnd, FAR const struct nxgl_rect_s { struct nxgl_rect_s relrect; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd) { return; diff --git a/graphics/nxsu/nxsu_reportposition.c b/graphics/nxsu/nxsu_reportposition.c index 043caee8a6f9bb6997b1c82de069952ef1cca17f..9a3be6a61f49f1c737971f4234e82cde040a45be 100644 --- a/graphics/nxsu/nxsu_reportposition.c +++ b/graphics/nxsu/nxsu_reportposition.c @@ -82,7 +82,7 @@ void nxfe_reportposition(FAR struct nxbe_window_s *wnd) FAR struct nxbe_state_s *be; struct nxgl_size_s size; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd) { return; diff --git a/graphics/nxterm/Make.defs b/graphics/nxterm/Make.defs index 5a02507313f861af57bba899afb7a209024e19ba..469d4bfde273091244fcfdae98c0fce391812a1c 100644 --- a/graphics/nxterm/Make.defs +++ b/graphics/nxterm/Make.defs @@ -44,7 +44,7 @@ ifeq ($(CONFIG_NXTERM_NXKBDIN),y) CSRCS += nxterm_kbdin.c endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) CSRCS += nxterm_sem.c endif diff --git a/graphics/nxterm/nxterm.h b/graphics/nxterm/nxterm.h index 1a082e52837507a3ff44769bdad912a3b95a02e5..326a2ed5f9b44595202790c97d07eb124ae89582 100644 --- a/graphics/nxterm/nxterm.h +++ b/graphics/nxterm/nxterm.h @@ -141,7 +141,7 @@ struct nxterm_state_s FAR struct nxterm_window_s wndo; /* Describes the window and font */ NXHANDLE font; /* The current font handle */ sem_t exclsem; /* Forces mutually exclusive access */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES pid_t holder; /* Deadlock avoidance */ #endif uint8_t minor; /* Device minor number */ @@ -206,7 +206,7 @@ extern const struct file_operations g_nxterm_drvrops; ****************************************************************************/ /* Semaphore helpers */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES int nxterm_semwait(FAR struct nxterm_state_s *priv); int nxterm_sempost(FAR struct nxterm_state_s *priv); #else diff --git a/graphics/nxterm/nxterm_driver.c b/graphics/nxterm/nxterm_driver.c index 77cb7b0377be49ff70286f91cc1068d252af7a71..975fae2763d11a343359ea516c0629e755154da9 100644 --- a/graphics/nxterm/nxterm_driver.c +++ b/graphics/nxterm/nxterm_driver.c @@ -128,7 +128,7 @@ static int nxterm_open(FAR struct file *filep) #ifndef CONFIG_NXTERM_NXKBDIN if ((filep->f_oflags & O_RDOK) != 0) { - gdbg("ERROR: Attempted open with read access\n"); + gerr("ERROR: Attempted open with read access\n"); return -EACCES; } #endif diff --git a/graphics/nxterm/nxterm_font.c b/graphics/nxterm/nxterm_font.c index fec6d5a443b28c30162f1f53e526100002c97f5d..b3e95d220deb09efdaeba0e18b1d02eea7b0203e 100644 --- a/graphics/nxterm/nxterm_font.c +++ b/graphics/nxterm/nxterm_font.c @@ -318,7 +318,7 @@ nxterm_renderglyph(FAR struct nxterm_state_s *priv, { /* Actually, the RENDERER never returns a failure */ - gdbg("nxterm_renderglyph: RENDERER failed\n"); + gerr("ERROR: nxterm_renderglyph: RENDERER failed\n"); nxterm_freeglyph(glyph); glyph = NULL; } diff --git a/graphics/nxterm/nxterm_kbdin.c b/graphics/nxterm/nxterm_kbdin.c index 395f6f759fbef57dc864deedab1ae069a5176b40..b81763e6abdffdede57f4657916933aa3f8dbc39 100644 --- a/graphics/nxterm/nxterm_kbdin.c +++ b/graphics/nxterm/nxterm_kbdin.c @@ -118,7 +118,7 @@ ssize_t nxterm_read(FAR struct file *filep, FAR char *buffer, size_t len) ret = nxterm_semwait(priv); if (ret < 0) { - gdbg("ERROR: nxterm_semwait failed\n"); + gerr("ERROR: nxterm_semwait failed\n"); return ret; } @@ -191,7 +191,7 @@ ssize_t nxterm_read(FAR struct file *filep, FAR char *buffer, size_t len) int errval = errno; - gdbg("ERROR: nxterm_semwait failed\n"); + gerr("ERROR: nxterm_semwait failed\n"); /* Were we awakened by a signal? Did we read anything before * we received the signal? @@ -277,7 +277,7 @@ int nxterm_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup) ret = nxterm_semwait(priv); if (ret < 0) { - gdbg("ERROR: nxterm_semwait failed\n"); + gerr("ERROR: nxterm_semwait failed\n"); return ret; } @@ -305,7 +305,7 @@ int nxterm_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup) if (i >= CONFIG_NXTERM_NPOLLWAITERS) { - gdbg("ERROR: Too many poll waiters\n"); + gerr("ERROR: Too many poll waiters\n"); fds->priv = NULL; ret = -EBUSY; @@ -337,10 +337,10 @@ int nxterm_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup) struct pollfd **slot = (struct pollfd **)fds->priv; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!slot) { - gdbg("ERROR: No slot\n"); + gerr("ERROR: No slot\n"); ret = -EIO; goto errout; @@ -393,7 +393,7 @@ void nxterm_kbdin(NXTERM handle, FAR const uint8_t *buffer, uint8_t buflen) char ch; int ret; - gvdbg("buflen=%d\n"); + ginfo("buflen=%d\n"); DEBUGASSERT(handle); /* Get the reference to the driver structure from the handle */ @@ -405,7 +405,7 @@ void nxterm_kbdin(NXTERM handle, FAR const uint8_t *buffer, uint8_t buflen) ret = nxterm_semwait(priv); if (ret < 0) { - gdbg("ERROR: nxterm_semwait failed\n"); + gerr("ERROR: nxterm_semwait failed\n"); return; } @@ -440,7 +440,7 @@ void nxterm_kbdin(NXTERM handle, FAR const uint8_t *buffer, uint8_t buflen) { /* Yes... Return an indication that nothing was saved in the buffer. */ - gdbg("ERROR: Keyboard data overrun\n"); + gerr("ERROR: Keyboard data overrun\n"); break; } diff --git a/graphics/nxterm/nxterm_redraw.c b/graphics/nxterm/nxterm_redraw.c index e2cbc053c9ac5ce3b330bc77417f4789b49e3f53..925495dfd2e25e54fd1d3224df1240eb070c967c 100644 --- a/graphics/nxterm/nxterm_redraw.c +++ b/graphics/nxterm/nxterm_redraw.c @@ -105,7 +105,7 @@ void nxterm_redraw(NXTERM handle, FAR const struct nxgl_rect_s *rect, bool more) int i; DEBUGASSERT(handle && rect); - gvdbg("rect={(%d,%d),(%d,%d)} more=%s\n", + ginfo("rect={(%d,%d),(%d,%d)} more=%s\n", rect->pt1.x, rect->pt1.y, rect->pt2.x, rect->pt2.y, more ? "true" : "false"); @@ -137,7 +137,7 @@ void nxterm_redraw(NXTERM handle, FAR const struct nxgl_rect_s *rect, bool more) ret = priv->ops->fill(priv, rect, priv->wndo.wcolor); if (ret < 0) { - gdbg("fill failed: %d\n", errno); + gerr("ERROR: fill failed: %d\n", errno); } /* Then redraw each character on the display (Only the characters within diff --git a/graphics/nxterm/nxterm_register.c b/graphics/nxterm/nxterm_register.c index a0751773d7a77e1fe65b3263289b523e66f78ec1..41cd456789e0c0381fe94e28a1157af2a31ba768 100644 --- a/graphics/nxterm/nxterm_register.c +++ b/graphics/nxterm/nxterm_register.c @@ -87,7 +87,7 @@ FAR struct nxterm_state_s * priv = (FAR struct nxterm_state_s *)kmm_zalloc(sizeof(struct nxterm_state_s)); if (!priv) { - gdbg("Failed to allocate the NX driver structure\n"); + gerr("ERROR: Failed to allocate the NX driver structure\n"); return NULL; } @@ -99,7 +99,7 @@ FAR struct nxterm_state_s * memcpy(&priv->wndo, wndo, sizeof(struct nxterm_window_s)); sem_init(&priv->exclsem, 0, 1); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES priv->holder = NO_HOLDER; #endif @@ -112,7 +112,7 @@ FAR struct nxterm_state_s * priv->font = nxf_getfonthandle(wndo->fontid); if (!priv->font) { - gdbg("Failed to get font ID %d: %d\n", wndo->fontid, errno); + gerr("ERROR: Failed to get font ID %d: %d\n", wndo->fontid, errno); goto errout; } @@ -150,7 +150,7 @@ FAR struct nxterm_state_s * ret = register_driver(devname, &g_nxterm_drvrops, 0666, priv); if (ret < 0) { - gdbg("Failed to register %s\n", devname); + gerr("ERROR: Failed to register %s\n", devname); } return (NXTERM)priv; diff --git a/graphics/nxterm/nxterm_scroll.c b/graphics/nxterm/nxterm_scroll.c index 38e9f5cb6bfe7cb8619b213f0f740f96a0b2aa98..50a983a56e141f931a893ef63ba53fe6af45d610 100644 --- a/graphics/nxterm/nxterm_scroll.c +++ b/graphics/nxterm/nxterm_scroll.c @@ -118,7 +118,7 @@ static inline void nxterm_movedisplay(FAR struct nxterm_state_s *priv, ret = priv->ops->fill(priv, &rect, priv->wndo.wcolor); if (ret < 0) { - gdbg("Fill failed: %d\n", errno); + gerr("ERROR: Fill failed: %d\n", errno); } /* Fill each character that might lie within in the bounding box */ @@ -141,7 +141,7 @@ static inline void nxterm_movedisplay(FAR struct nxterm_state_s *priv, ret = priv->ops->fill(priv, &rect, priv->wndo.wcolor); if (ret < 0) { - gdbg("Fill failed: %d\n", errno); + gerr("ERROR: Fill failed: %d\n", errno); } } #else @@ -177,7 +177,7 @@ static inline void nxterm_movedisplay(FAR struct nxterm_state_s *priv, ret = priv->ops->move(priv, &rect, &offset); if (ret < 0) { - gdbg("Move failed: %d\n", errno); + gerr("ERROR: Move failed: %d\n", errno); } /* Finally, clear the vacated bottom part of the display */ @@ -187,7 +187,7 @@ static inline void nxterm_movedisplay(FAR struct nxterm_state_s *priv, ret = priv->ops->fill(priv, &rect, priv->wndo.wcolor); if (ret < 0) { - gdbg("Fill failed: %d\n", errno); + gerr("ERROR: Fill failed: %d\n", errno); } } #endif diff --git a/graphics/nxterm/nxterm_sem.c b/graphics/nxterm/nxterm_sem.c index 3bdbf854104d67e357629f369e6c743fcfa2bbf0..185ff30adc596b30dd2e0f9f97ca8ee191133f4e 100644 --- a/graphics/nxterm/nxterm_sem.c +++ b/graphics/nxterm/nxterm_sem.c @@ -46,7 +46,7 @@ #include "nxterm.h" -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /**************************************************************************** * Pre-processor Definitions @@ -126,4 +126,4 @@ int nxterm_sempost(FAR struct nxterm_state_s *priv) return sem_post(&priv->exclsem); } -#endif /* CONFIG_DEBUG */ +#endif /* CONFIG_DEBUG_FEATURES */ diff --git a/graphics/vnc/server/Kconfig b/graphics/vnc/server/Kconfig index 157b62dfc9172ff8c5d3aa5c06b88a0358a236b2..bab68706d18758214e13c9d049e76b237a94bb9b 100644 --- a/graphics/vnc/server/Kconfig +++ b/graphics/vnc/server/Kconfig @@ -130,7 +130,7 @@ config VNCSERVER_INBUFFER_SIZE config VNCSERVER_DEBUG bool "VNC Server debug" default n - depends on DEBUG && !DEBUG_GRAPHICS + depends on DEBUG_FEATURES && !DEBUG_GRAPHICS ---help--- Normally VNC debug output is selected with DEBUG_GRAPHICS. The VNC server server suupport this special option to enable GRAPHICS debug diff --git a/graphics/vnc/server/vnc_fbdev.c b/graphics/vnc/server/vnc_fbdev.c index fb3b71a425740d248d48ebd170002a5fd6698226..54abc1dc5c3364711a3aa4163843fb5bacae1f46 100644 --- a/graphics/vnc/server/vnc_fbdev.c +++ b/graphics/vnc/server/vnc_fbdev.c @@ -45,10 +45,14 @@ #include #if defined(CONFIG_VNCSERVER_DEBUG) && !defined(CONFIG_DEBUG_GRAPHICS) -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 +# undef CONFIG_DEBUG_FEATURES +# undef CONFIG_DEBUG_ERROR +# undef CONFIG_DEBUG_WARN +# undef CONFIG_DEBUG_INFO +# define CONFIG_DEBUG_FEATURES 1 +# define CONFIG_DEBUG_ERROR 1 +# define CONFIG_DEBUG_WARN 1 +# define CONFIG_DEBUG_INFO 1 # define CONFIG_DEBUG_GRAPHICS 1 #endif #include @@ -162,7 +166,7 @@ static int up_getvideoinfo(FAR struct fb_vtable_s *vtable, FAR struct vnc_fbinfo_s *fbinfo = (FAR struct vnc_fbinfo_s *)vtable; FAR struct vnc_session_s *session; - gvdbg("vtable=%p vinfo=%p\n", vtable, vinfo); + ginfo("vtable=%p vinfo=%p\n", vtable, vinfo); DEBUGASSERT(fbinfo != NULL && vinfo != NULL); if (fbinfo != NULL && vinfo != NULL) @@ -172,7 +176,7 @@ static int up_getvideoinfo(FAR struct fb_vtable_s *vtable, if (session == NULL || session->state != VNCSERVER_RUNNING) { - gdbg("ERROR: session is not connected\n"); + gerr("ERROR: session is not connected\n"); return -ENOTCONN; } @@ -189,7 +193,7 @@ static int up_getvideoinfo(FAR struct fb_vtable_s *vtable, return OK; } - gdbg("ERROR: Invalid arguments\n"); + gerr("ERROR: Invalid arguments\n"); return -EINVAL; } @@ -203,7 +207,7 @@ static int up_getplaneinfo(FAR struct fb_vtable_s *vtable, int planeno, FAR struct vnc_fbinfo_s *fbinfo = (FAR struct vnc_fbinfo_s *)vtable; FAR struct vnc_session_s *session; - gvdbg("vtable=%p planeno=%d pinfo=%p\n", vtable, planeno, pinfo); + ginfo("vtable=%p planeno=%d pinfo=%p\n", vtable, planeno, pinfo); DEBUGASSERT(fbinfo != NULL && pinfo != NULL && planeno == 0); if (fbinfo != NULL && pinfo != NULL && planeno == 0) @@ -213,7 +217,7 @@ static int up_getplaneinfo(FAR struct fb_vtable_s *vtable, int planeno, if (session == NULL || session->state != VNCSERVER_RUNNING) { - gdbg("ERROR: session is not connected\n"); + gerr("ERROR: session is not connected\n"); return -ENOTCONN; } @@ -233,7 +237,7 @@ static int up_getplaneinfo(FAR struct fb_vtable_s *vtable, int planeno, return OK; } - gdbg("Returning EINVAL\n"); + gerr("ERROR: Returning EINVAL\n"); return -EINVAL; } @@ -249,7 +253,7 @@ static int up_getcmap(FAR struct fb_vtable_s *vtable, FAR struct vnc_session_s *session; int i; - gvdbg("vtable=%p cmap=%p\n", vtable, cmap); + ginfo("vtable=%p cmap=%p\n", vtable, cmap); DEBUGASSERT(fbinfo != NULL && cmap != NULL); @@ -260,17 +264,17 @@ static int up_getcmap(FAR struct fb_vtable_s *vtable, if (session == NULL || session->state != VNCSERVER_RUNNING) { - gdbg("ERROR: session is not connected\n"); + gerr("ERROR: session is not connected\n"); return -ENOTCONN; } - gvdbg("first=%d len=%d\n", vcmap->first, cmap->len); + ginfo("first=%d len=%d\n", vcmap->first, cmap->len); #warning Missing logic return OK; } - gdbg("Returning EINVAL\n"); + gerr("ERROR: Returning EINVAL\n"); return -EINVAL; } #endif @@ -286,7 +290,7 @@ static int up_putcmap(FAR struct fb_vtable_s *vtable, FAR const struct fb_cmap_s FAR struct vnc_session_s *session; int i; - gvdbg("vtable=%p cmap=%p\n", vtable, cmap); + ginfo("vtable=%p cmap=%p\n", vtable, cmap); DEBUGASSERT(fbinfo != NULL && cmap != NULL); @@ -297,17 +301,17 @@ static int up_putcmap(FAR struct fb_vtable_s *vtable, FAR const struct fb_cmap_s if (session == NULL || session->state != VNCSERVER_RUNNING) { - gdbg("ERROR: session is not connected\n"); + gerr("ERROR: session is not connected\n"); return -ENOTCONN; } - gvdbg("first=%d len=%d\n", vcmap->first, cmap->len); + ginfo("first=%d len=%d\n", vcmap->first, cmap->len); #warning Missing logic return OK; } - gdbg("Returning EINVAL\n"); + gerr("ERROR: Returning EINVAL\n"); return -EINVAL; } #endif @@ -324,7 +328,7 @@ static int up_getcursor(FAR struct fb_vtable_s *vtable, FAR struct vnc_session_s *session; int i; - gvdbg("vtable=%p attrib=%p\n", vtable, attrib); + ginfo("vtable=%p attrib=%p\n", vtable, attrib); DEBUGASSERT(fbinfo != NULL && attrib != NULL); @@ -335,7 +339,7 @@ static int up_getcursor(FAR struct fb_vtable_s *vtable, if (session == NULL || session->state != VNCSERVER_RUNNING) { - gdbg("ERROR: session is not connected\n"); + gerr("ERROR: session is not connected\n"); return -ENOTCONN; } @@ -343,7 +347,8 @@ static int up_getcursor(FAR struct fb_vtable_s *vtable, return OK; } - gdbg("Returning EINVAL\n"); + + gerr("ERROR: Returning EINVAL\n"); return -EINVAL; } #endif @@ -360,7 +365,7 @@ static int up_setcursor(FAR struct fb_vtable_s *vtable, FAR struct vnc_session_s *session; int i; - gvdbg("vtable=%p settings=%p\n", vtable, settings); + ginfo("vtable=%p settings=%p\n", vtable, settings); DEBUGASSERT(fbinfo != NULL && settings != NULL); @@ -371,11 +376,11 @@ static int up_setcursor(FAR struct fb_vtable_s *vtable, if (session == NULL || session->state != VNCSERVER_RUNNING) { - gdbg("ERROR: session is not connected\n"); + gerr("ERROR: session is not connected\n"); return -ENOTCONN; } - gvdbg("flags: %02x\n", settings->flags); + ginfo("flags: %02x\n", settings->flags); if ((settings->flags & FB_CUR_SETPOSITION) != 0) { #warning Missing logic @@ -396,7 +401,7 @@ static int up_setcursor(FAR struct fb_vtable_s *vtable, return OK; } - gdbg("Returning EINVAL\n"); + gerr("ERROR: Returning EINVAL\n"); return -EINVAL; } #endif @@ -435,7 +440,7 @@ static int vnc_start_server(int display) /* Start the VNC server kernel thread. */ - gvdbg("Starting the VNC server for display %d\n", display); + ginfo("Starting the VNC server for display %d\n", display); g_fbstartup[display].result = -EBUSY; sem_reset(&g_fbstartup[display].fbinit, 0); @@ -452,7 +457,7 @@ static int vnc_start_server(int display) (main_t)vnc_server, argv); if (pid < 0) { - gdbg("ERROR: Failed to start the VNC server: %d\n", (int)pid); + gerr("ERROR: Failed to start the VNC server: %d\n", (int)pid); return (int)pid; } @@ -580,11 +585,11 @@ static inline int vnc_wait_connect(int display) result = g_fbstartup[display].result; if (result != -EBUSY) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (result < 0) { DEBUGASSERT(g_vnc_sessions[display] == NULL); - gdbg("ERROR: VNC server startup failed: %d\n", result); + gerr("ERROR: VNC server startup failed: %d\n", result); } else { @@ -630,7 +635,7 @@ int up_fbinitialize(int display) ret = vnc_start_server(display); if (ret < 0) { - gvdbg("ERROR: vnc_start_server() failed: %d\n", ret); + gerr("ERROR: vnc_start_server() failed: %d\n", ret); return ret; } @@ -639,7 +644,7 @@ int up_fbinitialize(int display) ret = vnc_wait_connect(display); if (ret < 0) { - gvdbg("ERROR: vnc_wait_connect() failed: %d\n", ret); + gerr("ERROR: vnc_wait_connect() failed: %d\n", ret); } return ret; @@ -711,7 +716,7 @@ int vnc_fbinitialize(int display, vnc_kbdout_t kbdout, ret = vnc_start_server(display); if (ret < 0) { - gvdbg("ERROR: vnc_start_server() failed: %d\n", ret); + gerr("ERROR: vnc_start_server() failed: %d\n", ret); return ret; } @@ -720,7 +725,7 @@ int vnc_fbinitialize(int display, vnc_kbdout_t kbdout, ret = vnc_wait_start(display); if (ret < 0) { - gvdbg("ERROR: vnc_wait_start() failed: %d\n", ret); + gerr("ERROR: vnc_wait_start() failed: %d\n", ret); return ret; } @@ -880,7 +885,7 @@ void nx_notify_rectangle(FAR NX_PLANEINFOTYPE *pinfo, ret = vnc_update_rectangle(session, rect, true); if (ret < 0) { - gdbg("ERROR: vnc_update_rectangle failed: %d\n", ret); + gerr("ERROR: vnc_update_rectangle failed: %d\n", ret); } } } diff --git a/graphics/vnc/server/vnc_negotiate.c b/graphics/vnc/server/vnc_negotiate.c index 1d7e28d814866caf4e601c5f1a6d5e81c3071472..910d0b6f265c76fbc6b9259f435e5ddd8535a7bf 100644 --- a/graphics/vnc/server/vnc_negotiate.c +++ b/graphics/vnc/server/vnc_negotiate.c @@ -45,10 +45,14 @@ #include #if defined(CONFIG_VNCSERVER_DEBUG) && !defined(CONFIG_DEBUG_GRAPHICS) -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 +# undef CONFIG_DEBUG_FEATURES +# undef CONFIG_DEBUG_ERROR +# undef CONFIG_DEBUG_WARN +# undef CONFIG_DEBUG_INFO +# define CONFIG_DEBUG_FEATURES 1 +# define CONFIG_DEBUG_ERROR 1 +# define CONFIG_DEBUG_WARN 1 +# define CONFIG_DEBUG_INFO 1 # define CONFIG_DEBUG_GRAPHICS 1 #endif #include @@ -128,7 +132,7 @@ int vnc_negotiate(FAR struct vnc_session_s *session) if (ret < 0) { errcode = get_errno(); - gdbg("ERROR: Failed to set receive timeout: %d\n", errcode); + gerr("ERROR: Failed to set receive timeout: %d\n", errcode); DEBUGASSERT(errcode > 0); return -errcode; } @@ -136,14 +140,14 @@ int vnc_negotiate(FAR struct vnc_session_s *session) /* Inform the client of the VNC protocol version */ - gvdbg("Send protocol version: %s\n", g_vncproto); + ginfo("Send protocol version: %s\n", g_vncproto); len = strlen(g_vncproto); nsent = psock_send(&session->connect, g_vncproto, len, 0); if (nsent < 0) { errcode = get_errno(); - gdbg("ERROR: Send ProtocolVersion failed: %d\n", errcode); + gerr("ERROR: Send ProtocolVersion failed: %d\n", errcode); DEBUGASSERT(errcode > 0); return -errcode; } @@ -152,19 +156,19 @@ int vnc_negotiate(FAR struct vnc_session_s *session) /* Receive the echo of the protocol string */ - gvdbg("Receive echo from VNC client\n"); + ginfo("Receive echo from VNC client\n"); nrecvd = psock_recv(&session->connect, session->inbuf, len, 0); if (nrecvd < 0) { errcode = get_errno(); - gdbg("ERROR: Receive protocol confirmation failed: %d\n", errcode); + gerr("ERROR: Receive protocol confirmation failed: %d\n", errcode); DEBUGASSERT(errcode > 0); return -errcode; } else if (nrecvd == 0) { - gdbg("Connection closed\n"); + gwarn("WARNING: Connection closed\n"); return -ECONNABORTED; } @@ -176,7 +180,7 @@ int vnc_negotiate(FAR struct vnc_session_s *session) * any stinkin' security. */ - gvdbg("Send SecurityType\n"); + ginfo("Send SecurityType\n"); sectype = (FAR struct rfb_sectype_s *)session->outbuf; rfb_putbe32(sectype->type, RFB_SECTYPE_NONE); @@ -186,7 +190,7 @@ int vnc_negotiate(FAR struct vnc_session_s *session) if (nsent < 0) { errcode = get_errno(); - gdbg("ERROR: Send Security failed: %d\n", errcode); + gerr("ERROR: Send Security failed: %d\n", errcode); DEBUGASSERT(errcode > 0); return -errcode; } @@ -198,7 +202,7 @@ int vnc_negotiate(FAR struct vnc_session_s *session) * only option offered. */ - gvdbg("Send SupportedSecurityTypes\n"); + ginfo("Send SupportedSecurityTypes\n"); sectypes = (FAR struct rfb_supported_sectypes_s *)session->outbuf; sectypes->ntypes = 1; @@ -209,7 +213,7 @@ int vnc_negotiate(FAR struct vnc_session_s *session) if (nsent < 0) { errcode = get_errno(); - gdbg("ERROR: Send SupportedSecurityTypes failed: %d\n", errcode); + gerr("ERROR: Send SupportedSecurityTypes failed: %d\n", errcode); DEBUGASSERT(errcode > 0); return -errcode; } @@ -221,7 +225,7 @@ int vnc_negotiate(FAR struct vnc_session_s *session) * type is to be used on the connection. */ - gvdbg("Receive SecurityType\n"); + ginfo("Receive SecurityType\n"); sectype = (FAR struct rfb_selected_sectype_s *)session->inbuf; @@ -230,25 +234,25 @@ int vnc_negotiate(FAR struct vnc_session_s *session) if (nrecvd < 0) { errcode = get_errno(); - gdbg("ERROR: Receive SecurityType failed: %d\n", errcode); + gerr("ERROR: Receive SecurityType failed: %d\n", errcode); DEBUGASSERT(errcode > 0); return -errcode; } else if (nrecvd == 0) { - gdbg("Connection closed\n"); + gwarn("WARNING: Connection closed\n"); return -ECONNABORTED; } DEBUGASSERT(nrecvd == sizeof(struct rfb_selected_sectype_s)); - gvdbg("Send SecurityResult\n"); + ginfo("Send SecurityResult\n"); secresult = (FAR struct rfb_sectype_result_s *)session->outbuf; if (sectype->type != RFB_SECTYPE_NONE) { - gdbg("ERROR: Received unsupported SecurityType: %d\n", sectype->type); + gerr("ERROR: Received unsupported SecurityType: %d\n", sectype->type); /* REVISIT: Should send the reason string here */ @@ -259,14 +263,14 @@ int vnc_negotiate(FAR struct vnc_session_s *session) if (nsent < 0) { errcode = get_errno(); - gdbg("ERROR: Send SecurityResult failed: %d\n", errcode); + gerr("ERROR: Send SecurityResult failed: %d\n", errcode); DEBUGASSERT(errcode > 0); return -errcode; } DEBUGASSERT(nsent == sizeof(struct rfb_sectype_result_s)); - gvdbg("Send failure reason\n"); + ginfo("Send failure reason\n"); secfail = (FAR struct rfb_sectype_fail_s *)session->outbuf; len = strlen(g_nosecurity); @@ -278,7 +282,7 @@ int vnc_negotiate(FAR struct vnc_session_s *session) if (nsent < 0) { errcode = get_errno(); - gdbg("ERROR: Send failure reason failed: %d\n", errcode); + gerr("ERROR: Send failure reason failed: %d\n", errcode); DEBUGASSERT(errcode > 0); return -errcode; } @@ -294,7 +298,7 @@ int vnc_negotiate(FAR struct vnc_session_s *session) if (nsent < 0) { errcode = get_errno(); - gdbg("ERROR: Send SecurityResult failed: %d\n", errcode); + gerr("ERROR: Send SecurityResult failed: %d\n", errcode); DEBUGASSERT(errcode > 0); return -errcode; } @@ -312,20 +316,20 @@ int vnc_negotiate(FAR struct vnc_session_s *session) * In this implementation, the sharing flag is ignored. */ - gvdbg("Receive ClientInit\n"); + ginfo("Receive ClientInit\n"); nrecvd = psock_recv(&session->connect, session->inbuf, sizeof(struct rfb_clientinit_s), 0); if (nrecvd < 0) { errcode = get_errno(); - gdbg("ERROR: Receive ClientInit failed: %d\n", errcode); + gerr("ERROR: Receive ClientInit failed: %d\n", errcode); DEBUGASSERT(errcode > 0); return -errcode; } else if (nrecvd == 0) { - gdbg("Connection closed\n"); + gwarn("WARNING: Connection closed\n"); return -ECONNABORTED; } @@ -344,7 +348,7 @@ int vnc_negotiate(FAR struct vnc_session_s *session) * Very Low (8 colors) - RGB3 1:1:1 (TrueColor) */ - gvdbg("Send ServerInit\n"); + ginfo("Send ServerInit\n"); serverinit = (FAR struct rfb_serverinit_s *)session->outbuf; @@ -375,7 +379,7 @@ int vnc_negotiate(FAR struct vnc_session_s *session) if (nsent < 0) { errcode = get_errno(); - gdbg("ERROR: Send ServerInit failed: %d\n", errcode); + gerr("ERROR: Send ServerInit failed: %d\n", errcode); return -errcode; } @@ -385,7 +389,7 @@ int vnc_negotiate(FAR struct vnc_session_s *session) * This may override some of our framebuffer settings. */ - gvdbg("Receive SetPixelFormat\n"); + ginfo("Receive SetPixelFormat\n"); setformat = (FAR struct rfb_setpixelformat_s *)session->inbuf; @@ -394,25 +398,25 @@ int vnc_negotiate(FAR struct vnc_session_s *session) if (nrecvd < 0) { errcode = get_errno(); - gdbg("ERROR: Receive SetPixelFormat failed: %d\n", errcode); + gerr("ERROR: Receive SetPixelFormat failed: %d\n", errcode); DEBUGASSERT(errcode > 0); return -errcode; } else if (nrecvd == 0) { - gdbg("Connection closed\n"); + gwarn("WARNING: Connection closed\n"); return -ECONNABORTED; } else if (nrecvd != sizeof(struct rfb_setpixelformat_s)) { /* Must not be a SetPixelFormat message? */ - gdbg("ERROR: SetFormat wrong size: %d\n", (int)nrecvd); + gerr("ERROR: SetFormat wrong size: %d\n", (int)nrecvd); return -EPROTO; } else if (setformat->msgtype != RFB_SETPIXELFMT_MSG) { - gdbg("ERROR: Not a SetPixelFormat message: %d\n", + gerr("ERROR: Not a SetPixelFormat message: %d\n", (int)setformat->msgtype); return -EPROTO; } @@ -426,13 +430,13 @@ int vnc_negotiate(FAR struct vnc_session_s *session) { /* We do not support this pixel format */ - gdbg("ERROR: PixelFormat not supported\n"); + gerr("ERROR: PixelFormat not supported\n"); return ret; } /* Receive supported encoding types from client. */ - gvdbg("Receive encoding types\n"); + ginfo("Receive encoding types\n"); encodings = (FAR struct rfb_setencodings_s *)session->inbuf; @@ -441,13 +445,13 @@ int vnc_negotiate(FAR struct vnc_session_s *session) if (nrecvd < 0) { errcode = get_errno(); - gdbg("ERROR: Receive SetEncodings failed: %d\n", errcode); + gerr("ERROR: Receive SetEncodings failed: %d\n", errcode); DEBUGASSERT(errcode > 0); return -errcode; } else if (nrecvd == 0) { - gdbg("Connection closed\n"); + gwarn("WARNING: Connection closed\n"); return -ECONNABORTED; } @@ -460,7 +464,7 @@ int vnc_negotiate(FAR struct vnc_session_s *session) ret = vnc_client_encodings(session, encodings); if (ret < 0) { - gdbg("ERROR: vnc_set_encodings failed: %d\n", ret); + gerr("ERROR: vnc_set_encodings failed: %d\n", ret); return ret; } } @@ -492,41 +496,41 @@ int vnc_client_pixelformat(FAR struct vnc_session_s *session, { /* At present, we support only TrueColor formats */ - gdbg("ERROR: No support for palette colors\n"); + gerr("ERROR: No support for palette colors\n"); return -ENOSYS; } if (pixelfmt->bpp == 8 && pixelfmt->depth == 6) { - gvdbg("Client pixel format: RGB8 2:2:2\n"); + ginfo("Client pixel format: RGB8 2:2:2\n"); session->colorfmt = FB_FMT_RGB8_222; session->bpp = 8; session->bigendian = false; } else if (pixelfmt->bpp == 8 && pixelfmt->depth == 8) { - gvdbg("Client pixel format: RGB8 3:3:2\n"); + ginfo("Client pixel format: RGB8 3:3:2\n"); session->colorfmt = FB_FMT_RGB8_332; session->bpp = 8; session->bigendian = false; } else if (pixelfmt->bpp == 16 && pixelfmt->depth == 15) { - gvdbg("Client pixel format: RGB16 5:5:5\n"); + ginfo("Client pixel format: RGB16 5:5:5\n"); session->colorfmt = FB_FMT_RGB16_555; session->bpp = 16; session->bigendian = (pixelfmt->bigendian != 0) ? true : false; } else if (pixelfmt->bpp == 16 && pixelfmt->depth == 16) { - gvdbg("Client pixel format: RGB16 5:6:5\n"); + ginfo("Client pixel format: RGB16 5:6:5\n"); session->colorfmt = FB_FMT_RGB16_565; session->bpp = 16; session->bigendian = (pixelfmt->bigendian != 0) ? true : false; } else if (pixelfmt->bpp == 32 && pixelfmt->depth == 24) { - gvdbg("Client pixel format: RGB32 8:8:8\n"); + ginfo("Client pixel format: RGB32 8:8:8\n"); session->colorfmt = FB_FMT_RGB32; session->bpp = 32; session->bigendian = (pixelfmt->bigendian != 0) ? true : false; @@ -541,7 +545,7 @@ int vnc_client_pixelformat(FAR struct vnc_session_s *session, { /* We do not support any other conversions */ - gdbg("ERROR: No support for this BPP=%d and depth=%d\n", + gerr("ERROR: No support for this BPP=%d and depth=%d\n", pixelfmt->bpp, pixelfmt->depth); return -ENOSYS; } diff --git a/graphics/vnc/server/vnc_raw.c b/graphics/vnc/server/vnc_raw.c index 947cbfe9055f8a5acc9ab58d3dbd600f5bfdd0d6..8e58cfc1d37dd068051773a8d96b8ecf8b6748ab 100644 --- a/graphics/vnc/server/vnc_raw.c +++ b/graphics/vnc/server/vnc_raw.c @@ -44,10 +44,14 @@ #include #if defined(CONFIG_VNCSERVER_DEBUG) && !defined(CONFIG_DEBUG_GRAPHICS) -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 +# undef CONFIG_DEBUG_FEATURES +# undef CONFIG_DEBUG_ERROR +# undef CONFIG_DEBUG_WARN +# undef CONFIG_DEBUG_INFO +# define CONFIG_DEBUG_FEATURES 1 +# define CONFIG_DEBUG_ERROR 1 +# define CONFIG_DEBUG_WARN 1 +# define CONFIG_DEBUG_INFO 1 # define CONFIG_DEBUG_GRAPHICS 1 #endif #include @@ -341,7 +345,7 @@ int vnc_raw(FAR struct vnc_session_s *session, FAR struct nxgl_rect_s *rect) break; default: - gdbg("ERROR: Unrecognized color format: %d\n", session->colorfmt); + gerr("ERROR: Unrecognized color format: %d\n", session->colorfmt); return -EINVAL; } @@ -479,7 +483,7 @@ int vnc_raw(FAR struct vnc_session_s *session, FAR struct nxgl_rect_s *rect) if (nsent < 0) { int errcode = get_errno(); - gdbg("ERROR: Send FrameBufferUpdate failed: %d\n", + gerr("ERROR: Send FrameBufferUpdate failed: %d\n", errcode); DEBUGASSERT(errcode > 0); return -errcode; @@ -491,7 +495,7 @@ int vnc_raw(FAR struct vnc_session_s *session, FAR struct nxgl_rect_s *rect) } while (size > 0); - updvdbg("Sent {(%d, %d),(%d, %d)}\n", + updinfo("Sent {(%d, %d),(%d, %d)}\n", x, y, x + updwidth -1, y + updheight - 1); } } diff --git a/graphics/vnc/server/vnc_receiver.c b/graphics/vnc/server/vnc_receiver.c index 4f25d4931eb3a4016b5e9ee7f6f23d291ec1a682..8f4e0988af88c4db1b38a56feae799a41abf305c 100644 --- a/graphics/vnc/server/vnc_receiver.c +++ b/graphics/vnc/server/vnc_receiver.c @@ -43,10 +43,14 @@ #include #if defined(CONFIG_VNCSERVER_DEBUG) && !defined(CONFIG_DEBUG_GRAPHICS) -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 +# undef CONFIG_DEBUG_FEATURES +# undef CONFIG_DEBUG_ERROR +# undef CONFIG_DEBUG_WARN +# undef CONFIG_DEBUG_INFO +# define CONFIG_DEBUG_FEATURES 1 +# define CONFIG_DEBUG_ERROR 1 +# define CONFIG_DEBUG_WARN 1 +# define CONFIG_DEBUG_INFO 1 # define CONFIG_DEBUG_GRAPHICS 1 #endif #include @@ -101,7 +105,7 @@ int vnc_read_remainder(FAR struct vnc_session_s *session, size_t msglen, if (nrecvd < 0) { errcode = get_errno(); - gdbg("ERROR: Receive message failed: %d\n", errcode); + gerr("ERROR: Receive message failed: %d\n", errcode); DEBUGASSERT(errcode > 0); return -errcode; } @@ -138,7 +142,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) int ret; DEBUGASSERT(session); - gvdbg("Receiver running for Display %d\n", session->display); + ginfo("Receiver running for Display %d\n", session->display); #ifdef CONFIG_NET_SOCKOPTS /* Disable the receive timeout so that we will wait indefinitely for the @@ -152,7 +156,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) if (ret < 0) { errcode = get_errno(); - gdbg("ERROR: Failed to disable receive timeout: %d\n", errcode); + gerr("ERROR: Failed to disable receive timeout: %d\n", errcode); DEBUGASSERT(errcode > 0); return -errcode; } @@ -171,7 +175,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) if (nrecvd < 0) { errcode = get_errno(); - gdbg("ERROR: Receive byte failed: %d\n", errcode); + gerr("ERROR: Receive byte failed: %d\n", errcode); DEBUGASSERT(errcode > 0); return -errcode; } @@ -182,7 +186,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) else if (nrecvd == 0) { - gdbg("Connection closed\n", errcode); + gwarn("WARNING: Connection closed\n", errcode); return OK; } @@ -196,7 +200,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) { case RFB_SETPIXELFMT_MSG: /* SetPixelFormat */ { - gvdbg("Received SetPixelFormat\n"); + ginfo("Received SetPixelFormat\n"); /* Read the rest of the SetPixelFormat message */ @@ -205,7 +209,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) 1); if (ret < 0) { - gdbg("ERROR: Failed to read SetPixelFormat message: %d\n", + gerr("ERROR: Failed to read SetPixelFormat message: %d\n", ret); } else @@ -219,7 +223,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) /* We do not support this pixel format */ /* REVISIT: We are going to be putting garbage on the RFB */ - gdbg("ERROR: PixelFormat not supported\n"); + gerr("ERROR: PixelFormat not supported\n"); } } } @@ -230,7 +234,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) FAR struct rfb_setencodings_s *encodings; unsigned int nencodings; - gvdbg("Received SetEncodings\n"); + ginfo("Received SetEncodings\n"); /* Read the SetEncodings message without the following * encodings. @@ -241,7 +245,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) 1); if (ret < 0) { - gdbg("ERROR: Failed to read SetEncodings message: %d\n", + gerr("ERROR: Failed to read SetEncodings message: %d\n", ret); } else @@ -256,7 +260,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) SIZEOF_RFB_SERVERINIT_S(0)); if (ret < 0) { - gdbg("ERROR: Failed to read encodings: %d\n", + gerr("ERROR: Failed to read encodings: %d\n", ret); } else @@ -266,7 +270,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) ret = vnc_client_encodings(session, encodings); if (ret < 0) { - gdbg("ERROR: vnc_set_encodings failed: %d\n", ret); + gerr("ERROR: vnc_set_encodings failed: %d\n", ret); } } } @@ -278,7 +282,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) FAR struct rfb_fbupdatereq_s *update; struct nxgl_rect_s rect; - gvdbg("Received FramebufferUpdateRequest\n"); + ginfo("Received FramebufferUpdateRequest\n"); /* Read the rest of the SetPixelFormat message */ @@ -287,7 +291,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) 1); if (ret < 0) { - gdbg("ERROR: Failed to read FramebufferUpdateRequest message: %d\n", + gerr("ERROR: Failed to read FramebufferUpdateRequest message: %d\n", ret); } else @@ -304,7 +308,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) ret = vnc_update_rectangle(session, &rect, false); if (ret < 0) { - gdbg("ERROR: Failed to queue update: %d\n", ret); + gerr("ERROR: Failed to queue update: %d\n", ret); } } } @@ -314,7 +318,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) { FAR struct rfb_keyevent_s *keyevent; - gvdbg("Received KeyEvent\n"); + ginfo("Received KeyEvent\n"); /* Read the rest of the KeyEvent message */ @@ -323,7 +327,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) 1); if (ret < 0) { - gdbg("ERROR: Failed to read KeyEvent message: %d\n", + gerr("ERROR: Failed to read KeyEvent message: %d\n", ret); } else @@ -343,7 +347,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) FAR struct rfb_pointerevent_s *event; uint8_t buttons; #endif - gvdbg("Received PointerEvent\n"); + ginfo("Received PointerEvent\n"); /* Read the rest of the PointerEvent message */ @@ -352,7 +356,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) 1); if (ret < 0) { - gdbg("ERROR: Failed to read PointerEvent message: %d\n", + gerr("ERROR: Failed to read PointerEvent message: %d\n", ret); } #ifdef CONFIG_NX_XYINPUT @@ -397,7 +401,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) FAR struct rfb_clientcuttext_s *cuttext; uint32_t length; - gvdbg("Received ClientCutText\n"); + ginfo("Received ClientCutText\n"); /* Read the ClientCutText message without the following * text. @@ -408,7 +412,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) 1); if (ret < 0) { - gdbg("ERROR: Failed to read ClientCutText message: %d\n", + gerr("ERROR: Failed to read ClientCutText message: %d\n", ret); } else @@ -422,7 +426,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) SIZEOF_RFB_CLIENTCUTTEXT_S(0)); if (ret < 0) { - gdbg("ERROR: Failed to read text: %d\n", + gerr("ERROR: Failed to read text: %d\n", ret); } else @@ -434,7 +438,7 @@ int vnc_receiver(FAR struct vnc_session_s *session) break; default: - gdbg("ERROR: Unsynchronized, msgtype=%d\n", session->inbuf[0]); + gerr("ERROR: Unsynchronized, msgtype=%d\n", session->inbuf[0]); return -EPROTO; } } diff --git a/graphics/vnc/server/vnc_rre.c b/graphics/vnc/server/vnc_rre.c index a216a4952491e498d9056c79830448b7c9c218f3..cc0d3c931798afc8b21c728e4747ae2937425f2f 100644 --- a/graphics/vnc/server/vnc_rre.c +++ b/graphics/vnc/server/vnc_rre.c @@ -44,10 +44,14 @@ #include #if defined(CONFIG_VNCSERVER_DEBUG) && !defined(CONFIG_DEBUG_GRAPHICS) -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 +# undef CONFIG_DEBUG_FEATURES +# undef CONFIG_DEBUG_ERROR +# undef CONFIG_DEBUG_WARN +# undef CONFIG_DEBUG_INFO +# define CONFIG_DEBUG_FEATURES 1 +# define CONFIG_DEBUG_ERROR 1 +# define CONFIG_DEBUG_WARN 1 +# define CONFIG_DEBUG_INFO 1 # define CONFIG_DEBUG_GRAPHICS 1 #endif #include @@ -272,7 +276,7 @@ int vnc_rre(FAR struct vnc_session_s *session, FAR struct nxgl_rect_s *rect) break; default: - gdbg("ERROR: Unrecognized color format: %d\n", + gerr("ERROR: Unrecognized color format: %d\n", session->colorfmt); return -EINVAL; } @@ -292,14 +296,14 @@ int vnc_rre(FAR struct vnc_session_s *session, FAR struct nxgl_rect_s *rect) if (nsent < 0) { int errcode = get_errno(); - gdbg("ERROR: Send RRE FrameBufferUpdate failed: %d\n", + gerr("ERROR: Send RRE FrameBufferUpdate failed: %d\n", errcode); DEBUGASSERT(errcode > 0); return -errcode; } DEBUGASSERT(nsent == nbytes); - updvdbg("Sent {(%d, %d),(%d, %d)}\n", + updinfo("Sent {(%d, %d),(%d, %d)}\n", rect->pt1.x, rect->pt1.y, rect->pt2.x, rect->pt2.y); return nbytes; } diff --git a/graphics/vnc/server/vnc_server.c b/graphics/vnc/server/vnc_server.c index cad2f5ca3f4c394ee60f59b5d80da2a159a91d17..513d10c7367f4f6f20e0a4c59405dd17da717586 100644 --- a/graphics/vnc/server/vnc_server.c +++ b/graphics/vnc/server/vnc_server.c @@ -48,10 +48,14 @@ #include #if defined(CONFIG_VNCSERVER_DEBUG) && !defined(CONFIG_DEBUG_GRAPHICS) -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 +# undef CONFIG_DEBUG_FEATURES +# undef CONFIG_DEBUG_ERROR +# undef CONFIG_DEBUG_WARN +# undef CONFIG_DEBUG_INFO +# define CONFIG_DEBUG_FEATURES 1 +# define CONFIG_DEBUG_ERROR 1 +# define CONFIG_DEBUG_WARN 1 +# define CONFIG_DEBUG_INFO 1 # define CONFIG_DEBUG_GRAPHICS 1 #endif #include @@ -161,7 +165,7 @@ static int vnc_connect(FAR struct vnc_session_s *session, int port) struct sockaddr_in addr; int ret; - gvdbg("Connecting display %d\n", session->display); + ginfo("Connecting display %d\n", session->display); /* Create a listening socket */ @@ -197,7 +201,7 @@ static int vnc_connect(FAR struct vnc_session_s *session, int port) /* Connect to the client */ - gvdbg("Accepting connection for Display %d\n", session->display); + ginfo("Accepting connection for Display %d\n", session->display); ret = psock_accept(&session->listen, NULL, NULL, &session->connect); if (ret < 0) @@ -206,7 +210,7 @@ static int vnc_connect(FAR struct vnc_session_s *session, int port) goto errout_with_listener; } - gvdbg("Display %d connected\n", session->display); + ginfo("Display %d connected\n", session->display); session->state = VNCSERVER_CONNECTED; return OK; @@ -244,20 +248,28 @@ int vnc_server(int argc, FAR char *argv[]) if (argc != 2) { - gdbg("ERROR: Unexpected number of arguments: %d\n", argc); + /* In this case the start-up logic will probably hang, waiting for the + * display-related semaphore to be set. + */ + + gerr("ERROR: Unexpected number of arguments: %d\n", argc); ret = -EINVAL; - goto errout_with_post; + goto errout_with_hang; } display = atoi(argv[1]); if (display < 0 || display >= RFB_MAX_DISPLAYS) { - gdbg("ERROR: Invalid display number: %d\n", display); + /* In this case the start-up logic will probably hang, waiting for the + * display-related semaphore to be set. + */ + + gerr("ERROR: Invalid display number: %d\n", display); ret = -EINVAL; - goto errout_with_post; + goto errout_with_hang; } - gvdbg("Server started for Display %d\n", display); + ginfo("Server started for Display %d\n", display); /* Allocate the framebuffer memory. We rely on the fact that * the KMM allocator will align memory to 32-bits or better. @@ -266,7 +278,7 @@ int vnc_server(int argc, FAR char *argv[]) fb = (FAR uint8_t *)kmm_zalloc(RFB_SIZE); if (fb == NULL) { - gdbg("ERROR: Failed to allocate framebuffer memory: %lu KB\n", + gerr("ERROR: Failed to allocate framebuffer memory: %lu KB\n", (unsigned long)(RFB_SIZE / 1024)); ret = -ENOMEM; goto errout_with_post; @@ -277,7 +289,7 @@ int vnc_server(int argc, FAR char *argv[]) session = kmm_zalloc(sizeof(struct vnc_session_s)); if (session == NULL) { - gdbg("ERROR: Failed to allocate session\n"); + gerr("ERROR: Failed to allocate session\n"); ret = -ENOMEM; goto errout_with_fb; } @@ -310,7 +322,7 @@ int vnc_server(int argc, FAR char *argv[]) ret = vnc_connect(session, RFB_DISPLAY_PORT(display)); if (ret >= 0) { - gvdbg("New VNC connection\n"); + ginfo("New VNC connection\n"); /* Perform the VNC initialization sequence after the client has * sucessfully connected to the server. Negotiate security, @@ -320,7 +332,7 @@ int vnc_server(int argc, FAR char *argv[]) ret = vnc_negotiate(session); if (ret < 0) { - gdbg("ERROR: Failed to negotiate security/framebuffer: %d\n", + gerr("ERROR: Failed to negotiate security/framebuffer: %d\n", ret); continue; } @@ -332,7 +344,7 @@ int vnc_server(int argc, FAR char *argv[]) ret = vnc_start_updater(session); if (ret < 0) { - gdbg("ERROR: Failed to start updater thread: %d\n", ret); + gerr("ERROR: Failed to start updater thread: %d\n", ret); continue; } @@ -350,7 +362,7 @@ int vnc_server(int argc, FAR char *argv[]) */ ret = vnc_receiver(session); - gvdbg("Session terminated with %d\n", ret); + ginfo("Session terminated with %d\n", ret); UNUSED(ret); /* Stop the VNC updater thread. */ @@ -358,7 +370,7 @@ int vnc_server(int argc, FAR char *argv[]) ret = vnc_stop_updater(session); if (ret < 0) { - gdbg("ERROR: Failed to stop updater thread: %d\n", ret); + gerr("ERROR: Failed to stop updater thread: %d\n", ret); } } } @@ -369,5 +381,7 @@ errout_with_fb: errout_with_post: g_fbstartup[display].result = ret; sem_post(&g_fbstartup[display].fbconnect); + +errout_with_hang: return EXIT_FAILURE; } diff --git a/graphics/vnc/server/vnc_server.h b/graphics/vnc/server/vnc_server.h index 45d34b52600d7f16cf7b08b38e8e3ed51e9371e1..b513861fe85b3b412bc2ca843b3af37e1ada6d3e 100644 --- a/graphics/vnc/server/vnc_server.h +++ b/graphics/vnc/server/vnc_server.h @@ -186,27 +186,23 @@ #ifdef CONFIG_VNCSERVER_UPDATE_DEBUG # ifdef CONFIG_CPP_HAVE_VARARGS -# define upddbg(format, ...) dbg(format, ##__VA_ARGS__) -# define updlldbg(format, ...) lldbg(format, ##__VA_ARGS__) -# define updvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -# define updllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__) +# define upderr(format, ...) _err(format, ##__VA_ARGS__) +# define updinfo(format, ...) _info(format, ##__VA_ARGS__) +# define updinfo(format, ...) _info(format, ##__VA_ARGS__) # else -# define upddbg dbg -# define updlldbg lldbg -# define updvdbg vdbg -# define updllvdbg llvdbg +# define upderr _err +# define updwarn _warn +# define updinfo _info # endif #else # ifdef CONFIG_CPP_HAVE_VARARGS -# define upddbg(x...) -# define updlldbg(x...) -# define updvdbg(x...) -# define updllvdbg(x...) +# define upderr(x...) +# define updwarn(x...) +# define updinfo(x...) # else -# define upddbg (void) -# define updlldbg (void) -# define updvdbg (void) -# define updllvdbg (void) +# define upderr (void) +# define updwarn (void) +# define updinfo (void) # endif #endif diff --git a/graphics/vnc/server/vnc_updater.c b/graphics/vnc/server/vnc_updater.c index e1db02f040468691fb6d1531da3b2d988fefc615..a0c23a0c020f0eb8a1272c462f0621ec5666bd66 100644 --- a/graphics/vnc/server/vnc_updater.c +++ b/graphics/vnc/server/vnc_updater.c @@ -48,10 +48,14 @@ #include #if defined(CONFIG_VNCSERVER_DEBUG) && !defined(CONFIG_DEBUG_GRAPHICS) -# undef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG 1 -# define CONFIG_DEBUG_VERBOSE 1 +# undef CONFIG_DEBUG_FEATURES +# undef CONFIG_DEBUG_ERROR +# undef CONFIG_DEBUG_WARN +# undef CONFIG_DEBUG_INFO +# define CONFIG_DEBUG_FEATURES 1 +# define CONFIG_DEBUG_ERROR 1 +# define CONFIG_DEBUG_WARN 1 +# define CONFIG_DEBUG_INFO 1 # define CONFIG_DEBUG_GRAPHICS 1 #endif #include @@ -72,7 +76,7 @@ ****************************************************************************/ #ifdef VNCSERVER_SEM_DEBUG -static sem_t g_dbgsem = SEM_INITIALIZER(1); +static sem_t g_errsem = SEM_INITIALIZER(1); #endif /* A rectangle represent the entire local framebuffer */ @@ -122,7 +126,7 @@ static void vnc_sem_debug(FAR struct vnc_session_s *session, int freewaiting; int queuewaiting; - while (sem_wait(&g_dbgsem) < 0) + while (sem_wait(&g_errsem) < 0) { DEBUGASSERT(get_errno() == EINTR); } @@ -164,7 +168,7 @@ static void vnc_sem_debug(FAR struct vnc_session_s *session, syslog(LOG_INFO, " Unqueued: %u\n", unattached); } - sem_post(&g_dbgsem); + sem_post(&g_errsem); } #else # define vnc_sem_debug(s,m,u) @@ -299,7 +303,7 @@ vnc_remove_queue(FAR struct vnc_session_s *session) if (session->nwhupd > 0 && rect->whupd) { session->nwhupd--; - updvdbg("Whole screen update: nwhupd=%d\n", session->nwhupd); + updinfo("Whole screen update: nwhupd=%d\n", session->nwhupd); } sched_unlock(); @@ -369,7 +373,7 @@ static FAR void *vnc_updater(FAR void *arg) int ret; DEBUGASSERT(session != NULL); - gvdbg("Updater running for Display %d\n", session->display); + ginfo("Updater running for Display %d\n", session->display); /* Loop, processing updates until we are asked to stop. * REVISIT: Probably need some kind of signal mechanism to wake up @@ -386,7 +390,7 @@ static FAR void *vnc_updater(FAR void *arg) srcrect = vnc_remove_queue(session); DEBUGASSERT(srcrect != NULL); - updvdbg("Dequeued {(%d, %d),(%d, %d)}\n", + updinfo("Dequeued {(%d, %d),(%d, %d)}\n", srcrect->rect.pt1.x, srcrect->rect.pt1.y, srcrect->rect.pt2.x, srcrect->rect.pt2.y); @@ -408,7 +412,7 @@ static FAR void *vnc_updater(FAR void *arg) if (ret < 0) { - gdbg("ERROR: Encoding failed: %d\n", ret); + gerr("ERROR: Encoding failed: %d\n", ret); break; } } @@ -442,7 +446,7 @@ int vnc_start_updater(FAR struct vnc_session_s *session) struct sched_param param; int status; - gvdbg("Starting updater for Display %d\n", session->display); + ginfo("Starting updater for Display %d\n", session->display); /* Create thread that is gonna send rectangles to the client */ @@ -577,7 +581,7 @@ int vnc_update_rectangle(FAR struct vnc_session_s *session, FAR struct vnc_fbupdate_s *curr; FAR struct vnc_fbupdate_s *next; - updvdbg("New whole screen update...\n"); + updinfo("New whole screen update...\n"); curr = (FAR struct vnc_fbupdate_s *)session->updqueue.head; sq_init(&session->updqueue); @@ -619,7 +623,7 @@ int vnc_update_rectangle(FAR struct vnc_session_s *session, vnc_add_queue(session, update); - updvdbg("Queued {(%d, %d),(%d, %d)}\n", + updinfo("Queued {(%d, %d),(%d, %d)}\n", intersection.pt1.x, intersection.pt1.y, intersection.pt2.x, intersection.pt2.y); } diff --git a/include/assert.h b/include/assert.h index bb6948ab53c256d0c0dda21383f2062234a24996..88254f649454f733fc09462249874d9789ad45bd 100644 --- a/include/assert.h +++ b/include/assert.h @@ -1,9 +1,12 @@ /**************************************************************************** * include/assert.h * - * Copyright (C) 2007-2009, 2011-2013, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011-2013, 2015-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: @@ -47,95 +50,51 @@ * Pre-processor Definitions ****************************************************************************/ -/* Macro Name: ASSERT, VERIFY, et al. */ +/* Macro Name: PANIC, ASSERT, VERIFY, et al. */ +#undef PANIC /* Unconditional abort */ #undef ASSERT /* Assert if the condition is not true */ #undef VERIFY /* Assert if a function returns a negative value */ -#undef DEBUGASSERT /* Like ASSERT, but only if CONFIG_DEBUG is defined */ -#undef DEBUGVERIFY /* Like VERIFY, but only if CONFIG_DEBUG is defined */ -#undef PANIC /* Unconditional abort */ +#undef DEBUGPANIC /* Like PANIC, but only if CONFIG_DEBUG_ASSERTIONS is defined */ +#undef DEBUGASSERT /* Like ASSERT, but only if CONFIG_DEBUG_ASSERTIONS is defined */ +#undef DEBUGVERIFY /* Like VERIFY, but only if CONFIG_DEBUG_ASSERTIONS is defined */ #ifdef CONFIG_HAVE_FILENAME - -# define ASSERT(f) \ - do \ - { \ - if (!(f)) \ - { \ - up_assert((const uint8_t *)__FILE__, (int)__LINE__); \ - } \ - } \ - while (0) - -# define VERIFY(f) \ - do \ - { \ - if ((f) < 0) \ - { \ - up_assert((const uint8_t *)__FILE__, (int)__LINE__); \ - } \ - } \ - while (0) - -# define PANIC() \ - up_assert((const uint8_t *)__FILE__, (int)__LINE__) - -# ifdef CONFIG_DEBUG - -# define DEBUGASSERT(f) \ - do \ - { \ - if (!(f)) \ - { \ - up_assert((const uint8_t *)__FILE__, (int)__LINE__); \ - } \ - } \ - while (0) - -# define DEBUGVERIFY(f) \ - do \ - { \ - if ((f) < 0) \ - { \ - up_assert((const uint8_t *)__FILE__, (int)__LINE__); \ - } \ - } \ - while (0) - -# define DEBUGPANIC() \ - up_assert((const uint8_t *)__FILE__, (int)__LINE__) - -# else - -# define DEBUGASSERT(f) -# define DEBUGVERIFY(f) ((void)(f)) -# define DEBUGPANIC() - -# endif /* CONFIG_DEBUG */ - +# define PANIC() up_assert((const uint8_t *)__FILE__, (int)__LINE__) #else +# define PANIC() up_assert() +#endif -# define ASSERT(f) { if (!(f)) up_assert(); } -# define VERIFY(f) { if ((f) < 0) up_assert(); } -# define PANIC() up_assert() - -# ifdef CONFIG_DEBUG - -# define DEBUGASSERT(f) { if (!(f)) up_assert(); } -# define DEBUGVERIFY(f) { if ((f) < 0) up_assert(); } -# define DEBUGPANIC() up_assert() +#define ASSERT(f) do { if (!(f)) PANIC(); } while (0) +#define VERIFY(f) do { if ((f) < 0) PANIC(); } while (0) -# else +#ifdef CONFIG_DEBUG_ASSERTIONS +# define DEBUGPANIC() PANIC() +# define DEBUGASSERT(f) ASSERT(f) +# define DEBUGVERIFY(f) VERIFY(f) +#else +# define DEBUGPANIC() +# define DEBUGASSERT(f) +# define DEBUGVERIFY(f) ((void)(f)) +#endif -# define DEBUGASSERT(f) -# define DEBUGVERIFY(f) ((void)(f)) -# define DEBUGPANIC() +/* The C standard states that if NDEBUG is defined, assert will do nothing. + * Users can define and undefine NDEBUG as they see fit to choose when assert + * does something or does not do anything. + */ -# endif /* CONFIG_DEBUG */ +#ifdef NDEBUG +# define assert(f) +#else +# define assert(f) ASSERT(f) #endif -#ifndef assert -# define assert ASSERT +/* Definition required for C11 compile-time assertion checking. The + * static_assert macro simply expands to the _Static_assert keyword. + */ + +#ifndef __cplusplus +# define static_assert _Static_assert #endif /**************************************************************************** diff --git a/arch/arm/src/lpc11xx/lpc11_lowgetc.h b/include/crc64.h similarity index 64% rename from arch/arm/src/lpc11xx/lpc11_lowgetc.h rename to include/crc64.h index 4c94f39b7844323d6e79196ac3a964d0f845e350..e08183327a959d26ad453009668e2a796b70c022 100644 --- a/arch/arm/src/lpc11xx/lpc11_lowgetc.h +++ b/include/crc64.h @@ -1,8 +1,8 @@ -/************************************************************************************ - * arch/arm/src/lpc11/lpc11_lowgetc.h +/**************************************************************************** + * include/crc64.h * - * Copyright (C) 2015 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 @@ -31,34 +31,45 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************************************/ + ****************************************************************************/ -#ifndef __ARCH_ARM_SRC_LPC11XX_LPC11_LOWGETC_H -#define __ARCH_ARM_SRC_LPC11XX_LPC11_LOWGETC_H +#ifndef __INCLUDE_CRC64_H +#define __INCLUDE_CRC64_H -/************************************************************************************ +/**************************************************************************** * Included Files - ************************************************************************************/ + ****************************************************************************/ -#include -#include "lpc11_serial.h" +#include +#include -/************************************************************************************ +/**************************************************************************** * Pre-processor Definitions - ************************************************************************************/ + ****************************************************************************/ -/************************************************************************************ - * Public Types - ************************************************************************************/ +/* + * CRC64_CHECK is the CRC64 of the string "123456789" without the null byte. + * + * const uint8_t checkbuf[] = + * { + * '1', '2', '3', '4', '5', '6', '7', '8', '9' + * }; + * + * assert(crc64(checkbuf, sizeof(checkbuf)) == CRC64_CHECK); + */ -/************************************************************************************ - * Public Data - ************************************************************************************/ +/* CRC-64/WE */ -#ifndef __ASSEMBLY__ +#define CRC64_POLY ((uint64_t)0x42f0e1eba9ea3693) +#define CRC64_INIT ((uint64_t)0xffffffffffffffff) +#define CRC64_XOROUT ((uint64_t)0xffffffffffffffff) +#define CRC64_CHECK ((uint64_t)0x62ec59e3f1a4f00a) -#undef EXTERN -#if defined(__cplusplus) +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +#ifdef __cplusplus #define EXTERN extern "C" extern "C" { @@ -66,17 +77,29 @@ extern "C" #define EXTERN extern #endif -/************************************************************************************ - * Public Functions - ************************************************************************************/ +/**************************************************************************** + * Name: crc64part + * + * Description: + * Continue CRC calculation on a part of the buffer. + * + ****************************************************************************/ + +uint64_t crc64part(FAR const uint8_t *src, size_t len, uint64_t crc64val); -#ifdef HAVE_SERIAL_CONSOLE -int lpc11_lowgetc(void); -#endif +/**************************************************************************** + * Name: crc64 + * + * Description: + * Return a 64-bit CRC of the contents of the 'src' buffer, length 'len'. + * + ****************************************************************************/ + +uint64_t crc64(FAR const uint8_t *src, size_t len); #undef EXTERN -#if defined(__cplusplus) +#ifdef __cplusplus } #endif -#endif /* __ASSEMBLY__ */ -#endif /* __ARCH_ARM_SRC_LPC11XX_LPC11_LOWGETC_H */ + +#endif /* __INCLUDE_CRC64_H */ diff --git a/include/debug.h b/include/debug.h index 066ba5a2d6bf9fef285348dbb1818292704629ea..c2fc93dd53fdb6ecc4f50744ae2ac440da8afda7 100644 --- a/include/debug.h +++ b/include/debug.h @@ -1,7 +1,7 @@ /**************************************************************************** * include/debug.h * - * Copyright (C) 2007-2011, 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2011, 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -56,600 +56,1399 @@ /* Debug macros to runtime filter the debug messages sent to the console. In * general, there are four forms of the debug macros: * - * [a-z]dbg() -- Outputs messages to the console similar to printf() except - * that the output is not buffered. The first character indicates the - * system system (e.g., n=network, f=filesystm, etc.). If the first - * character is missing (i.e., dbg()), then it is common. The common - * dbg() macro is enabled by CONFIG_DEBUG. Subsystem debug requires an + * [a-z]info() -- Outputs messages to the console similar to printf() except + * that the output is not buffered. Output is only generated if + * CONFIG_DEBUG_INFO is defined. The info macros are intended for + * verbose "informational" debug output. If you enable CONFIG_DEBUG_INFO, + * then very chatty (and often annoying) output will be generated. + * + * The first character of the macro name indicates the system system + * (e.g., n=network, f=filesystm, etc.). If the first character is + * missing (i.e., _info()), then it is common. The common _info() macro + * is enabled simply with CONFIG_DEBUG_INFO. Subsystem debug requires an * additional configuration setting to enable it (e.g., CONFIG_DEBUG_NET * for the network, CONFIG_DEBUG_FS for the file system, etc). * - * In general, error messages and output of importance use [a-z]dbg(). - * [a-z]dbg() is implementation dependent but usually uses file descriptors. + * In general, error messages and output of importance use [a-z]err(). + * [a-z]err() is implementation dependent but usually uses file descriptors. * (that is a problem only because the interrupt task may have re- - * directed stdout). Therefore [a-z]dbg() should not be used in interrupt + * directed stdout). Therefore [a-z]err() should not be used in interrupt * handlers. * - * [a-z]vdbg() -- Identical to [a-z]dbg() except that it also requires that - * CONFIG_DEBUG_VERBOSE be defined. This is intended for general debug - * output that you would normally want to suppress. - * - * [a-z]lldbg() -- Identical to [a-z]dbg() except this is uses special - * interfaces provided by architecture-specific logic to talk directly - * to the underlying console hardware. If the architecture provides such - * logic, it should define CONFIG_ARCH_LOWPUTC. + * [a-z]warn() -- Identical to [a-z]info() except that it also requires that + * CONFIG_DEBUG_WARN be defined. This is intended for important exception + * conditions that are potential errors (or perhaps real errors with non- + * fatal consequences). * - * [a-z]lldbg() should not be used in normal code because the implementation - * probably disables interrupts and does things that are not consistent with - * good real-time performance. However, [a-z]lldbg() is particularly useful - * in low-level code where it is inappropriate to use file descriptors. For - * example, only [a-z]lldbg() should be used in interrupt handlers. + * [a-z]err() -- Identical to [a-z]info() except that it also requires that + * CONFIG_DEBUG_ERROR be defined. This is intended for important error-related + * information that you probably not want to suppress during normal debug + * general debugging. * - * [a-z]llvdbg() -- Identical to [a-z]lldbg() except that it also requires that - * CONFIG_DEBUG_VERBOSE be defined. This is intended for general debug - * output that you would normally want to suppress. + * _alert() - is a special, high-priority, unconditional version that is really + * intended only for crash error reporting. + */ + +#ifdef CONFIG_HAVE_FUNCTIONNAME +# define EXTRA_FMT "%s: " +# define EXTRA_ARG ,__FUNCTION__ +#else +# define EXTRA_FMT +# define EXTRA_ARG +#endif + +/* Debug macros will differ depending upon if the toolchain supports + * macros with a variable number of arguments or not. */ -#ifdef CONFIG_HAVE_FUNCTIONNAME -# define EXTRA_FMT "%s: " -# define EXTRA_ARG ,__FUNCTION__ +#ifdef CONFIG_CPP_HAVE_VARARGS + +/* C-99 style variadic macros are supported */ + +/* The actual logger function may be overridden in arch/debug.h if needed. + * (Currently only if the pre-processor supports variadic macros) + */ + +#ifndef __arch_syslog +# define __arch_syslog syslog +#endif + +#ifdef CONFIG_DEBUG_ALERT +# define _alert(format, ...) \ + __arch_syslog(LOG_EMERG, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__) +#else /* CONFIG_DEBUG_ERROR */ +# define _alert(x...) +#endif + +#ifdef CONFIG_DEBUG_ERROR +# define _err(format, ...) \ + __arch_syslog(LOG_ERR, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__) +#else +# define _err(x...) +#endif + +#ifdef CONFIG_DEBUG_WARN +# define _warn(format, ...) \ + __arch_syslog(LOG_WARNING, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__) +#else +# define _warn(x...) +#endif + +#ifdef CONFIG_DEBUG_INFO +# define _info(format, ...) \ + __arch_syslog(LOG_INFO, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__) +#else +# define _info(x...) +#endif + +/* Subsystem specific debug */ + +#ifdef CONFIG_DEBUG_MM_ERROR +# define merr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define merr(x...) +#endif + +#ifdef CONFIG_DEBUG_MM_WARN +# define mwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define mwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_MM_INFO +# define minfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define minfo(x...) +#endif + +#ifdef CONFIG_DEBUG_SCHED_ERROR +# define serr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define serr(x...) +#endif + +#ifdef CONFIG_DEBUG_SCHED_WARN +# define swarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define swarn(x...) +#endif + +#ifdef CONFIG_DEBUG_SCHED_INFO +# define sinfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define sinfo(x...) +#endif + +#ifdef CONFIG_DEBUG_SYSCALL_ERROR +# define svcerr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define svcerr(x...) +#endif + +#ifdef CONFIG_DEBUG_SYSCALL_WARN +# define svcwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define svcwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_SYSCALL_INFO +# define svcinfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define svcinfo(x...) +#endif + +#ifdef CONFIG_DEBUG_PAGING_ERROR +# define pgerr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define pgerr(x...) +#endif + +#ifdef CONFIG_DEBUG_PAGING_WARN +# define pgwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define pgwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_PAGING_INFO +# define pginfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define pginfo(x...) +#endif + +#ifdef CONFIG_DEBUG_NET_ERROR +# define nerr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define nerr(x...) +#endif + +#ifdef CONFIG_DEBUG_NET_WARN +# define nwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define nwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_NET_INFO +# define ninfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define ninfo(x...) +#endif + +#ifdef CONFIG_DEBUG_FS_ERROR +# define ferr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define ferr(x...) +#endif + +#ifdef CONFIG_DEBUG_FS_WARN +# define fwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define fwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_FS_INFO +# define finfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define finfo(x...) +#endif + +#ifdef CONFIG_DEBUG_CRYPTO_ERROR +# define crypterr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define crypterr(x...) +#endif + +#ifdef CONFIG_DEBUG_CRYPTO_WARN +# define cryptwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define cryptwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_CRYPTO_INFO +# define cryptinfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define cryptinfo(x...) +#endif + +#ifdef CONFIG_DEBUG_INPUT_ERROR +# define ierr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define ierr(x...) +#endif + +#ifdef CONFIG_DEBUG_INPUT_WARN +# define iwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define iwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_INPUT_INFO +# define iinfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define iinfo(x...) +#endif + +#ifdef CONFIG_DEBUG_ANALOG_ERROR +# define aerr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define aerr(x...) +#endif + +#ifdef CONFIG_DEBUG_ANALOG_WARN +# define awarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define awarn(x...) +#endif + +#ifdef CONFIG_DEBUG_ANALOG_INFO +# define ainfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define ainfo(x...) +#endif + +#ifdef CONFIG_DEBUG_CAN_ERROR +# define canerr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define canerr(x...) +#endif + +#ifdef CONFIG_DEBUG_CAN_WARN +# define canwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define canwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_CAN_INFO +# define caninfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define caninfo(x...) +#endif + +#ifdef CONFIG_DEBUG_GRAPHICS_ERROR +# define gerr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define gerr(x...) +#endif + +#ifdef CONFIG_DEBUG_GRAPHICS_WARN +# define gwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define gwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_GRAPHICS_INFO +# define ginfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define ginfo(x...) +#endif + +#ifdef CONFIG_DEBUG_BINFMT_ERROR +# define berr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define berr(x...) +#endif + +#ifdef CONFIG_DEBUG_BINFMT_WARN +# define bwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define bwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_BINFMT_INFO +# define binfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define binfo(x...) +#endif + +#ifdef CONFIG_DEBUG_LIB_ERROR +# define lerr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define lerr(x...) +#endif + +#ifdef CONFIG_DEBUG_LIB_WARN +# define lwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define lwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_LIB_INFO +# define linfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define linfo(x...) +#endif + +#ifdef CONFIG_DEBUG_AUDIO_ERROR +# define auderr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define auderr(x...) +#endif + +#ifdef CONFIG_DEBUG_AUDIO_WARN +# define audwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define audwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_AUDIO_INFO +# define audinfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define audinfo(x...) +#endif + +#ifdef CONFIG_DEBUG_DMA_ERROR +# define dmaerr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define dmaerr(x...) +#endif + +#ifdef CONFIG_DEBUG_DMA_WARN +# define dmawarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define dmawarn(x...) +#endif + +#ifdef CONFIG_DEBUG_DMA_INFO +# define dmainfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define dmainfo(x...) +#endif + +#ifdef CONFIG_DEBUG_IRQ_ERROR +# define irqerr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define irqerr(x...) +#endif + +#ifdef CONFIG_DEBUG_IRQ_WARN +# define irqwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define irqwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_IRQ_INFO +# define irqinfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define irqinfo(x...) +#endif + +#ifdef CONFIG_DEBUG_LCD_ERROR +# define lcderr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define lcderr(x...) +#endif + +#ifdef CONFIG_DEBUG_LCD_WARN +# define lcdwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define lcdwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_LCD_INFO +# define lcdinfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define lcdinfo(x...) +#endif + +#ifdef CONFIG_DEBUG_LEDS_ERROR +# define lederr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define lederr(x...) +#endif + +#ifdef CONFIG_DEBUG_LEDS_WARN +# define ledwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define ledwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_LEDS_INFO +# define ledinfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define ledinfo(x...) +#endif + +#ifdef CONFIG_DEBUG_GPIO_ERROR +# define gpioerr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define gpioerr(x...) +#endif + +#ifdef CONFIG_DEBUG_GPIO_WARN +# define gpiowarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define gpiowarn(x...) +#endif + +#ifdef CONFIG_DEBUG_GPIO_INFO +# define gpioinfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define gpioinfo(x...) +#endif + +#ifdef CONFIG_DEBUG_I2C_ERROR +# define i2cerr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define i2cerr(x...) +#endif + +#ifdef CONFIG_DEBUG_I2C_WARN +# define i2cwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define i2cwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_I2C_INFO +# define i2cinfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define i2cinfo(x...) +#endif + +#ifdef CONFIG_DEBUG_I2S_ERROR +# define i2serr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define i2serr(x...) +#endif + +#ifdef CONFIG_DEBUG_I2S_WARN +# define i2swarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define i2swarn(x...) +#endif + +#ifdef CONFIG_DEBUG_I2S_INFO +# define i2sinfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define i2sinfo(x...) +#endif + +#ifdef CONFIG_DEBUG_PWM_ERROR +# define pwmerr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define pwmerr(x...) +#endif + +#ifdef CONFIG_DEBUG_PWM_WARN +# define pwmwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define pwmwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_PWM_INFO +# define pwminfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define pwminfo(x...) +#endif + +#ifdef CONFIG_DEBUG_RTC_ERROR +# define rtcerr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define rtcerr(x...) +#endif + +#ifdef CONFIG_DEBUG_RTC_WARN +# define rtcwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define rtcwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_RTC_INFO +# define rtcinfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define rtcinfo(x...) +#endif + +#ifdef CONFIG_DEBUG_MEMCARD_ERROR +# define mcerr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define mcerr(x...) +#endif + +#ifdef CONFIG_DEBUG_MEMCARD_WARN +# define mcwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define mcwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_MEMCARD_INFO +# define mcinfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define mcinfo(x...) +#endif + +#ifdef CONFIG_DEBUG_SENSORS_ERROR +# define snerr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define snerr(x...) +#endif + +#ifdef CONFIG_DEBUG_SENSORS_WARN +# define snwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define snwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_SENSORS_INFO +# define sninfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define sninfo(x...) +#endif + +#ifdef CONFIG_DEBUG_SPI_ERROR +# define spierr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define spierr(x...) +#endif + +#ifdef CONFIG_DEBUG_SPI_WARN +# define spiwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define spiwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_SPI_INFO +# define spiinfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define spiinfo(x...) +#endif + +#ifdef CONFIG_DEBUG_TIMER_ERROR +# define tmrerr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define tmrerr(x...) +#endif + +#ifdef CONFIG_DEBUG_TIMER_WARN +# define tmrwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define tmrwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_TIMER_INFO +# define tmrinfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define tmrinfo(x...) +#endif + +#ifdef CONFIG_DEBUG_USB_ERROR +# define uerr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define uerr(x...) +#endif + +#ifdef CONFIG_DEBUG_USB_WARN +# define uwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define uwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_USB_INFO +# define uinfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define uinfo(x...) +#endif + +#ifdef CONFIG_DEBUG_WATCHDOG_ERROR +# define wderr(format, ...) _err(format, ##__VA_ARGS__) +#else +# define wderr(x...) +#endif + +#ifdef CONFIG_DEBUG_WATCHDOG_WARN +# define wdwarn(format, ...) _warn(format, ##__VA_ARGS__) +#else +# define wdwarn(x...) +#endif + +#ifdef CONFIG_DEBUG_WATCHDOG_INFO +# define wdinfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define wdinfo(x...) +#endif + +#else /* CONFIG_CPP_HAVE_VARARGS */ + +/* Variadic macros NOT supported */ + +#ifndef CONFIG_DEBUG_ALERT +# define _alert (void) +# endif + +#ifndef CONFIG_DEBUG_ERROR +# define _err (void) +#endif + +#ifndef CONFIG_DEBUG_WARN +# define _warn (void) +#endif + +#ifndef CONFIG_DEBUG_INFO +# define _info (void) +#endif + +/* Subsystem specific debug */ + +#ifdef CONFIG_DEBUG_MM_ERROR +# define merr _err #else -# define EXTRA_FMT -# define EXTRA_ARG +# define merr (void) #endif -/* The actual logger function may be overridden in arch/debug.h if needed. */ +#ifdef CONFIG_DEBUG_MM_WARN +# define mwarn _warn +#else +# define mwarn (void) +#endif -#ifndef __arch_syslog -# define __arch_syslog syslog +#ifdef CONFIG_DEBUG_MM_INFO +# define minfo _info +#else +# define minfo (void) #endif -#ifndef __arch_lowsyslog -# define __arch_lowsyslog lowsyslog + +#ifdef CONFIG_DEBUG_SCHED_ERROR +# define serr _err +#else +# define serr (void) #endif -/* Debug macros will differ depending upon if the toolchain supports - * macros with a variable number of arguments or not. - */ +#ifdef CONFIG_DEBUG_SCHED_WARN +# define swarn _warn +#else +# define swarn (void) +#endif -#ifdef CONFIG_CPP_HAVE_VARARGS +#ifdef CONFIG_DEBUG_SCHED_INFO +# define sinfo _info +#else +# define sinfo (void) +#endif -/* C-99 style variadic macros are supported */ +#ifdef CONFIG_DEBUG_SYSCALL_ERROR +# define svcerr _err +#else +# define svcerr (void) +#endif -#ifdef CONFIG_DEBUG -# define dbg(format, ...) \ - __arch_syslog(LOG_ERR, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__) +#ifdef CONFIG_DEBUG_SYSCALL_WARN +# define svcwarn _warn +#else +# define svcwarn (void) +#endif -# ifdef CONFIG_ARCH_LOWPUTC -# define lldbg(format, ...) \ - __arch_lowsyslog(LOG_ERR, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__) -# else -# define lldbg(x...) -# endif +#ifdef CONFIG_DEBUG_SYSCALL_INFO +# define svcinfo _info +#else +# define svcinfo (void) +#endif -# ifdef CONFIG_DEBUG_VERBOSE -# define vdbg(format, ...) \ - __arch_syslog(LOG_DEBUG, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__) +#ifdef CONFIG_DEBUG_PAGING_ERROR +# define pgerr _err +#else +# define pgerr (void) +#endif -# ifdef CONFIG_ARCH_LOWPUTC -# define llvdbg(format, ...) \ - __arch_lowsyslog(LOG_DEBUG, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__) -# else -# define llvdbg(x...) -# endif +#ifdef CONFIG_DEBUG_PAGING_WARN +# define pgwarn _warn +#else +# define pgwarn (void) +#endif -# else /* CONFIG_DEBUG_VERBOSE */ -# define vdbg(x...) -# define llvdbg(x...) -# endif /* CONFIG_DEBUG_VERBOSE */ +#ifdef CONFIG_DEBUG_PAGING_INFO +# define pginfo _info +#else +# define pginfo (void) +#endif -#else /* CONFIG_DEBUG */ +#ifdef CONFIG_DEBUG_NET_ERROR +# define nerr _err +#else +# define nerr (void) +#endif -# define dbg(x...) -# define lldbg(x...) -# define vdbg(x...) -# define llvdbg(x...) +#ifdef CONFIG_DEBUG_NET_WARN +# define nwarn _warn +#else +# define nwarn (void) +#endif -#endif /* CONFIG_DEBUG */ +#ifdef CONFIG_DEBUG_NET_INFO +# define ninfo _info +#else +# define ninfo (void) +#endif -/* Subsystem specific debug */ +#ifdef CONFIG_DEBUG_FS_ERROR +# define ferr _err +#else +# define ferr (void) +#endif -#ifdef CONFIG_DEBUG_MM -# define mdbg(format, ...) dbg(format, ##__VA_ARGS__) -# define mlldbg(format, ...) lldbg(format, ##__VA_ARGS__) -# define mvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -# define mllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__) +#ifdef CONFIG_DEBUG_FS_WARN +# define fwarn _warn #else -# define mdbg(x...) -# define mlldbg(x...) -# define mvdbg(x...) -# define mllvdbg(x...) +# define fwarn (void) #endif -#ifdef CONFIG_DEBUG_SCHED -# define sdbg(format, ...) dbg(format, ##__VA_ARGS__) -# define slldbg(format, ...) lldbg(format, ##__VA_ARGS__) -# define svdbg(format, ...) vdbg(format, ##__VA_ARGS__) -# define sllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__) +#ifdef CONFIG_DEBUG_FS_INFO +# define finfo _info #else -# define sdbg(x...) -# define slldbg(x...) -# define svdbg(x...) -# define sllvdbg(x...) +# define finfo (void) #endif -#ifdef CONFIG_DEBUG_PAGING -# define pgdbg(format, ...) dbg(format, ##__VA_ARGS__) -# define pglldbg(format, ...) lldbg(format, ##__VA_ARGS__) -# define pgvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -# define pgllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__) +#ifdef CONFIG_DEBUG_CRYPTO_ERROR +# define crypterr _err #else -# define pgdbg(x...) -# define pglldbg(x...) -# define pgvdbg(x...) -# define pgllvdbg(x...) +# define crypterr (void) #endif -#ifdef CONFIG_DEBUG_DMA -# define dmadbg(format, ...) dbg(format, ##__VA_ARGS__) -# define dmalldbg(format, ...) lldbg(format, ##__VA_ARGS__) -# define dmavdbg(format, ...) vdbg(format, ##__VA_ARGS__) -# define dmallvdbg(format, ...) llvdbg(format, ##__VA_ARGS__) +#ifdef CONFIG_DEBUG_CRYPTO_WARN +# define cryptwarn _warn #else -# define dmadbg(x...) -# define dmalldbg(x...) -# define dmavdbg(x...) -# define dmallvdbg(x...) +# define cryptwarn (void) #endif -#ifdef CONFIG_DEBUG_NET -# define ndbg(format, ...) dbg(format, ##__VA_ARGS__) -# define nlldbg(format, ...) lldbg(format, ##__VA_ARGS__) -# define nvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -# define nllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__) +#ifdef CONFIG_DEBUG_CRYPTO_INFO +# define cryptinfo _info #else -# define ndbg(x...) -# define nlldbg(x...) -# define nvdbg(x...) -# define nllvdbg(x...) +# define cryptinfo(x...) #endif -#ifdef CONFIG_DEBUG_USB -# define udbg(format, ...) dbg(format, ##__VA_ARGS__) -# define ulldbg(format, ...) lldbg(format, ##__VA_ARGS__) -# define uvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -# define ullvdbg(format, ...) llvdbg(format, ##__VA_ARGS__) +#ifdef CONFIG_DEBUG_INPUT_ERROR +# define ierr _err #else -# define udbg(x...) -# define ulldbg(x...) -# define uvdbg(x...) -# define ullvdbg(x...) +# define ierr (void) #endif -#ifdef CONFIG_DEBUG_FS -# define fdbg(format, ...) dbg(format, ##__VA_ARGS__) -# define flldbg(format, ...) lldbg(format, ##__VA_ARGS__) -# define fvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -# define fllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__) +#ifdef CONFIG_DEBUG_INPUT_WARN +# define iwarn _warn #else -# define fdbg(x...) -# define flldbg(x...) -# define fvdbg(x...) -# define fllvdbg(x...) +# define iwarn (void) #endif -#ifdef CONFIG_DEBUG_CRYPTO -# define cryptdbg(format, ...) dbg(format, ##__VA_ARGS__) -# define cryptlldbg(format, ...) lldbg(format, ##__VA_ARGS__) -# define cryptvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -# define cryptllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__) +#ifdef CONFIG_DEBUG_INPUT_INFO +# define iinfo _info #else -# define cryptdbg(x...) -# define cryptlldbg(x...) -# define cryptvdbg(x...) -# define cryptllvdbg(x...) +# define iinfo (void) #endif -#ifdef CONFIG_DEBUG_INPUT -# define idbg(format, ...) dbg(format, ##__VA_ARGS__) -# define illdbg(format, ...) lldbg(format, ##__VA_ARGS__) -# define ivdbg(format, ...) vdbg(format, ##__VA_ARGS__) -# define illvdbg(format, ...) llvdbg(format, ##__VA_ARGS__) +#ifdef CONFIG_DEBUG_ANALOG_ERROR +# define aerr _err #else -# define idbg(x...) -# define illdbg(x...) -# define ivdbg(x...) -# define illvdbg(x...) +# define aerr (void) #endif -#ifdef CONFIG_DEBUG_SENSORS -# define sndbg(format, ...) dbg(format, ##__VA_ARGS__) -# define snlldbg(format, ...) lldbg(format, ##__VA_ARGS__) -# define snvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -# define snllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__) +#ifdef CONFIG_DEBUG_ANALOG_WARN +# define awarn _warn #else -# define sndbg(x...) -# define snlldbg(x...) -# define snvdbg(x...) -# define snllvdbg(x...) +# define awarn (void) #endif -#ifdef CONFIG_DEBUG_ANALOG -# define adbg(format, ...) dbg(format, ##__VA_ARGS__) -# define alldbg(format, ...) lldbg(format, ##__VA_ARGS__) -# define avdbg(format, ...) vdbg(format, ##__VA_ARGS__) -# define allvdbg(format, ...) llvdbg(format, ##__VA_ARGS__) +#ifdef CONFIG_DEBUG_ANALOG_INFO +# define ainfo _info #else -# define adbg(x...) -# define alldbg(x...) -# define avdbg(x...) -# define allvdbg(x...) +# define ainfo (void) #endif -#ifdef CONFIG_DEBUG_GRAPHICS -# define gdbg(format, ...) dbg(format, ##__VA_ARGS__) -# define glldbg(format, ...) lldbg(format, ##__VA_ARGS__) -# define gvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -# define gllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__) +#ifdef CONFIG_DEBUG_CAN_ERROR +# define canerr _err #else -# define gdbg(x...) -# define glldbg(x...) -# define gvdbg(x...) -# define gllvdbg(x...) +# define canerr (void) #endif -#ifdef CONFIG_DEBUG_BINFMT -# define bdbg(format, ...) dbg(format, ##__VA_ARGS__) -# define blldbg(format, ...) lldbg(format, ##__VA_ARGS__) -# define bvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -# define bllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__) +#ifdef CONFIG_DEBUG_CAN_WARN +# define canwarn _warn #else -# define bdbg(x...) -# define blldbg(x...) -# define bvdbg(x...) -# define bllvdbg(x...) +# define canwarn (void) #endif -#ifdef CONFIG_DEBUG_LIB -# define ldbg(format, ...) dbg(format, ##__VA_ARGS__) -# define llldbg(format, ...) lldbg(format, ##__VA_ARGS__) -# define lvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -# define lllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__) +#ifdef CONFIG_DEBUG_CAN_INFO +# define caninfo _info #else -# define ldbg(x...) -# define llldbg(x...) -# define lvdbg(x...) -# define lllvdbg(x...) +# define caninfo (void) #endif -#ifdef CONFIG_DEBUG_AUDIO -# define auddbg(format, ...) dbg(format, ##__VA_ARGS__) -# define audlldbg(format, ...) lldbg(format, ##__VA_ARGS__) -# define audvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -# define audllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__) +#ifdef CONFIG_DEBUG_GRAPHICS_ERROR +# define gerr _err #else -# define auddbg(x...) -# define audlldbg(x...) -# define audvdbg(x...) -# define audllvdbg(x...) +# define gerr (void) #endif -#else /* CONFIG_CPP_HAVE_VARARGS */ +#ifdef CONFIG_DEBUG_GRAPHICS_WARN +# define gwarn _warn +#else +# define gwarn (void) +#endif -/* Variadic macros NOT supported */ +#ifdef CONFIG_DEBUG_GRAPHICS_INFO +# define ginfo _info +#else +# define ginfo (void) +#endif -#ifdef CONFIG_DEBUG -# ifndef CONFIG_ARCH_LOWPUTC -# define lldbg (void) -# endif -# ifndef CONFIG_DEBUG_VERBOSE -# define vdbg (void) -# define llvdbg (void) -# else -# ifndef CONFIG_ARCH_LOWPUTC -# define llvdbg (void) -# endif -# endif +#ifdef CONFIG_DEBUG_BINFMT_ERROR +# define berr _err #else -# define dbg (void) -# define lldbg (void) -# define vdbg (void) -# define llvdbg (void) +# define berr (void) #endif -/* Subsystem specific debug */ +#ifdef CONFIG_DEBUG_BINFMT_WARN +# define bwarn _warn +#else +# define bwarn (void) +#endif -#ifdef CONFIG_DEBUG_MM -# define mdbg dbg -# define mlldbg lldbg -# define mvdbg vdbg -# define mllvdbg llvdbg +#ifdef CONFIG_DEBUG_BINFMT_INFO +# define binfo _info #else -# define mdbg (void) -# define mlldbg (void) -# define mvdbg (void) -# define mllvdbg (void) +# define binfo (void) #endif -#ifdef CONFIG_DEBUG_SCHED -# define sdbg dbg -# define slldbg lldbg -# define svdbg vdbg -# define sllvdbg llvdbg +#ifdef CONFIG_DEBUG_LIB_ERROR +# define lerr _err #else -# define sdbg (void) -# define slldbg (void) -# define svdbg (void) -# define sllvdbg (void) +# define lerr (void) #endif -#ifdef CONFIG_DEBUG_PAGING -# define pgdbg dbg -# define pglldbg lldbg -# define pgvdbg vdbg -# define pgllvdbg llvdbg +#ifdef CONFIG_DEBUG_LIB_WARN +# define lwarn _warn #else -# define pgdbg (void) -# define pglldbg (void) -# define pgvdbg (void) -# define pgllvdbg (void) +# define lwarn (void) #endif -#ifdef CONFIG_DEBUG_DMA -# define dmadbg dbg -# define dmalldbg lldbg -# define dmavdbg vdbg -# define dmallvdbg llvdbg +#ifdef CONFIG_DEBUG_LIB_INFO +# define linfo _info #else -# define dmadbg (void) -# define dmalldbg (void) -# define dmavdbg (void) -# define dmallvdbg (void) +# define linfo (void) #endif -#ifdef CONFIG_DEBUG_NET -# define ndbg dbg -# define nlldbg lldbg -# define nvdbg vdbg -# define nllvdbg llvdbg +#ifdef CONFIG_DEBUG_AUDIO_ERROR +# define auderr _err #else -# define ndbg (void) -# define nlldbg (void) -# define nvdbg (void) -# define nllvdbg (void) +# define auderr (void) #endif -#ifdef CONFIG_DEBUG_USB -# define udbg dbg -# define ulldbg lldbg -# define uvdbg vdbg -# define ullvdbg llvdbg +#ifdef CONFIG_DEBUG_AUDIO_WARN +# define audwarn _warn #else -# define udbg (void) -# define ulldbg (void) -# define uvdbg (void) -# define ullvdbg (void) +# define audwarn (void) #endif -#ifdef CONFIG_DEBUG_FS -# define fdbg dbg -# define flldbg lldbg -# define fvdbg vdbg -# define fllvdbg llvdbg +#ifdef CONFIG_DEBUG_AUDIO_INFO +# define audinfo _info #else -# define fdbg (void) -# define flldbg (void) -# define fvdbg (void) -# define fllvdbg (void) +# define audinfo (void) #endif -#ifdef CONFIG_DEBUG_CRYPTO -# define cryptdbg dbg -# define cryptlldbg lldbg -# define cryptvdbg vdbg -# define cryptllvdbg llvdbg +#ifdef CONFIG_DEBUG_DMA_ERROR +# define dmaerr _err #else -# define cryptdbg (void) -# define cryptlldbg (void) -# define cryptvdbg (void) -# define cryptllvdbg (void) +# define dmaerr (void) #endif -#ifdef CONFIG_DEBUG_INPUT -# define idbg dbg -# define illdbg lldbg -# define ivdbg vdbg -# define illvdbg llvdbg +#ifdef CONFIG_DEBUG_DMA_WARN +# define dmawarn _warn #else -# define idbg (void) -# define illdbg (void) -# define ivdbg (void) -# define illvdbg (void) +# define dmawarn (void) #endif -#ifdef CONFIG_DEBUG_SENSORS -# define sndbg dbg -# define snlldbg lldbg -# define snvdbg vdbg -# define snllvdbg llvdbg +#ifdef CONFIG_DEBUG_DMA_INFO +# define dmainfo _info #else -# define sndbg (void) -# define snlldbg (void) -# define snvdbg (void) -# define snllvdbg (void) +# define dmainfo (void) #endif -#ifdef CONFIG_DEBUG_ANALOG -# define adbg dbg -# define alldbg lldbg -# define avdbg vdbg -# define allvdbg llvdbg +#ifdef CONFIG_DEBUG_IRQ_ERROR +# define irqerr _err #else -# define adbg (void) -# define alldbg (void) -# define avdbg (void) -# define allvdbg (void) +# define irqerr (void) #endif -#ifdef CONFIG_DEBUG_GRAPHICS -# define gdbg dbg -# define glldbg lldbg -# define gvdbg vdbg -# define gllvdbg llvdbg +#ifdef CONFIG_DEBUG_IRQ_WARN +# define irqwarn _warn #else -# define gdbg (void) -# define glldbg (void) -# define gvdbg (void) -# define gllvdbg (void) +# define irqwarn (void) #endif -#ifdef CONFIG_DEBUG_BINFMT -# define bdbg dbg -# define blldbg lldbg -# define bvdbg vdbg -# define bllvdbg llvdbg +#ifdef CONFIG_DEBUG_IRQ_INFO +# define irqinfo _info #else -# define bdbg (void) -# define blldbg (void) -# define bvdbg (void) -# define bllvdbg (void) +# define irqinfo (void) #endif -#ifdef CONFIG_DEBUG_LIB -# define ldbg dbg -# define llldbg lldbg -# define lvdbg vdbg -# define lllvdbg llvdbg +#ifdef CONFIG_DEBUG_LCD_ERROR +# define lcderr _err #else -# define ldbg (void) -# define llldbg (void) -# define lvdbg (void) -# define lllvdbg (void) +# define lcderr (void) #endif -#ifdef CONFIG_DEBUG_AUDIO -# define auddbg dbg -# define audlldbg lldbg -# define audvdbg vdbg -# define audllvdbg llvdbg +#ifdef CONFIG_DEBUG_LCD_WARN +# define lcdwarn _warn +#else +# define lcdwarn (void) +#endif + +#ifdef CONFIG_DEBUG_LCD_INFO +# define lcdinfo _info +#else +# define lcdinfo (void) +#endif + +#ifdef CONFIG_DEBUG_LEDS_ERROR +# define lederr _err +#else +# define lederr (void) +#endif + +#ifdef CONFIG_DEBUG_LEDS_WARN +# define ledwarn _warn +#else +# define ledwarn (void) +#endif + +#ifdef CONFIG_DEBUG_LEDS_INFO +# define ledinfo _info +#else +# define ledinfo (void) +#endif + +#ifdef CONFIG_DEBUG_GPIO_ERROR +# define gpioerr _err +#else +# define gpioerr (void) +#endif + +#ifdef CONFIG_DEBUG_GPIO_WARN +# define gpiowarn _warn +#else +# define gpiowarn (void) +#endif + +#ifdef CONFIG_DEBUG_GPIO_INFO +# define gpioinfo _info +#else +# define gpioinfo (void) +#endif + +#ifdef CONFIG_DEBUG_I2C_ERROR +# define i2cerr _err +#else +# define i2cerr (void) +#endif + +#ifdef CONFIG_DEBUG_I2C_WARN +# define i2cwarn _warn +#else +# define i2cwarn (void) +#endif + +#ifdef CONFIG_DEBUG_I2C_INFO +# define i2cinfo _info +#else +# define i2cinfo (void) +#endif + +#ifdef CONFIG_DEBUG_I2S_ERROR +# define i2serr _err +#else +# define i2serr (void) +#endif + +#ifdef CONFIG_DEBUG_I2S_WARN +# define i2swarn _warn +#else +# define i2swarn (void) +#endif + +#ifdef CONFIG_DEBUG_I2S_INFO +# define i2sinfo _info +#else +# define i2sinfo (void) +#endif + +#ifdef CONFIG_DEBUG_PWM_ERROR +# define pwmerr _err +#else +# define pwmerr (void) +#endif + +#ifdef CONFIG_DEBUG_PWM_WARN +# define pwmwarn _warn +#else +# define pwmwarn (void) +#endif + +#ifdef CONFIG_DEBUG_PWM_INFO +# define pwminfo _info #else -# define auddbg (void) -# define audlldbg (void) -# define audvdbg (void) -# define audllvdbg (void) +# define pwminfo (void) +#endif + +#ifdef CONFIG_DEBUG_RTC_ERROR +# define rtcerr _err +#else +# define rtcerr (void) +#endif + +#ifdef CONFIG_DEBUG_RTC_WARN +# define rtcwarn _warn +#else +# define rtcwarn (void) +#endif + +#ifdef CONFIG_DEBUG_RTC_INFO +# define rtcinfo _info +#else +# define rtcinfo (void) +#endif + +#ifdef CONFIG_DEBUG_MEMCARD_ERROR +# define mcerr _err +#else +# define mcerr (void) +#endif + +#ifdef CONFIG_DEBUG_MEMCARD_WARN +# define mcwarn _warn +#else +# define mcwarn (void) +#endif + +#ifdef CONFIG_DEBUG_MEMCARD_INFO +# define mcinfo _info +#else +# define mcinfo (void) +#endif + +#ifdef CONFIG_DEBUG_SENSORS_ERROR +# define snerr _err +#else +# define snerr (void) +#endif + +#ifdef CONFIG_DEBUG_SENSORS_WARN +# define snwarn _warn +#else +# define snwarn (void) +#endif + +#ifdef CONFIG_DEBUG_SENSORS_INFO +# define sninfo _info +#else +# define sninfo (void) +#endif + +#ifdef CONFIG_DEBUG_SPI_ERROR +# define spierr _err +#else +# define spierr (void) +#endif + +#ifdef CONFIG_DEBUG_SPI_WARN +# define spiwarn _warn +#else +# define spiwarn (void) +#endif + +#ifdef CONFIG_DEBUG_SPI_INFO +# define spiinfo _info +#else +# define spiinfo (void) +#endif + +#ifdef CONFIG_DEBUG_TIMER_ERROR +# define tmrerr _err +#else +# define tmrerr (void) +#endif + +#ifdef CONFIG_DEBUG_TIMER_WARN +# define tmrwarn _warn +#else +# define tmrwarn (void) +#endif + +#ifdef CONFIG_DEBUG_TIMER_INFO +# define tmrinfo _info +#else +# define tmrinfo (void) +#endif + +#ifdef CONFIG_DEBUG_USB_ERROR +# define uerr _err +#else +# define uerr (void) +#endif + +#ifdef CONFIG_DEBUG_USB_WARN +# define uwarn _warn +#else +# define uwarn (void) +#endif + +#ifdef CONFIG_DEBUG_USB_INFO +# define uinfo _info +#else +# define uinfo (void) +#endif + +#ifdef CONFIG_DEBUG_WATCHDOG_ERROR +# define wderr _err +#else +# define wderr (void) +#endif + +#ifdef CONFIG_DEBUG_WATCHDOG_WARN +# define wdwarn _warn +#else +# define wdwarn (void) +#endif + +#ifdef CONFIG_DEBUG_WATCHDOG_INFO +# define wdinfo _info +#else +# define wdinfo (void) #endif #endif /* CONFIG_CPP_HAVE_VARARGS */ /* Buffer dumping macros do not depend on varargs */ -#ifdef CONFIG_DEBUG -# define dbgdumpbuffer(m,b,n) lib_dumpbuffer(m,b,n) -# ifdef CONFIG_DEBUG_VERBOSE -# define vdbgdumpbuffer(m,b,n) lib_dumpbuffer(m,b,n) +#ifdef CONFIG_DEBUG_ERROR +# define errdumpbuffer(m,b,n) lib_dumpbuffer(m,b,n) +# ifdef CONFIG_DEBUG_INFO +# define infodumpbuffer(m,b,n) lib_dumpbuffer(m,b,n) # else -# define vdbgdumpbuffer(m,b,n) +# define infodumpbuffer(m,b,n) # endif #else -# define dbgdumpbuffer(m,b,n) -# define vdbgdumpbuffer(m,b,n) +# define errdumpbuffer(m,b,n) +# define infodumpbuffer(m,b,n) # endif /* Subsystem specific debug */ #ifdef CONFIG_DEBUG_MM -# define mdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n) -# define mvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n) +# define merrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define minfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) #else -# define mdbgdumpbuffer(m,b,n) -# define mvdbgdumpbuffer(m,b,n) +# define merrdumpbuffer(m,b,n) +# define minfodumpbuffer(m,b,n) #endif #ifdef CONFIG_DEBUG_SCHED -# define sdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n) -# define svdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n) +# define serrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define sinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) #else -# define sdbgdumpbuffer(m,b,n) -# define svdbgdumpbuffer(m,b,n) +# define serrdumpbuffer(m,b,n) +# define sinfodumpbuffer(m,b,n) #endif -#ifdef CONFIG_DEBUG_PAGING -# define pgdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n) -# define pgvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n) +#ifdef CONFIG_DEBUG_SYSCALL +# define svcerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define svcinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) #else -# define pgdbgdumpbuffer(m,b,n) -# define pgvdbgdumpbuffer(m,b,n) +# define svcerrdumpbuffer(m,b,n) +# define svcinfodumpbuffer(m,b,n) #endif -#ifdef CONFIG_DEBUG_DMA -# define dmadbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n) -# define dmavdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n) +#ifdef CONFIG_DEBUG_PAGING +# define pgerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define pginfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) #else -# define dmadbgdumpbuffer(m,b,n) -# define dmavdbgdumpbuffer(m,b,n) +# define pgerrdumpbuffer(m,b,n) +# define pginfodumpbuffer(m,b,n) #endif #ifdef CONFIG_DEBUG_NET -# define ndbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n) -# define nvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n) +# define nerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define ninfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) #else -# define ndbgdumpbuffer(m,b,n) -# define nvdbgdumpbuffer(m,b,n) +# define nerrdumpbuffer(m,b,n) +# define ninfodumpbuffer(m,b,n) #endif -#ifdef CONFIG_DEBUG_USB -# define udbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n) -# define uvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n) +#ifdef CONFIG_DEBUG_FS +# define ferrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define finfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) #else -# define udbgdumpbuffer(m,b,n) -# define uvdbgdumpbuffer(m,b,n) +# define ferrdumpbuffer(m,b,n) +# define finfodumpbuffer(m,b,n) #endif -#ifdef CONFIG_DEBUG_FS -# define fdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n) -# define fvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n) +#ifdef CONFIG_DEBUG_INPUT +# define ierrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define iinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) #else -# define fdbgdumpbuffer(m,b,n) -# define fvdbgdumpbuffer(m,b,n) +# define ierrdumpbuffer(m,b,n) +# define iinfodumpbuffer(m,b,n) #endif -#ifdef CONFIG_DEBUG_INPUT -# define idbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n) -# define ivdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n) +#ifdef CONFIG_DEBUG_ANALOG +# define aerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define ainfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) #else -# define idbgdumpbuffer(m,b,n) -# define ivdbgdumpbuffer(m,b,n) +# define aerrdumpbuffer(m,b,n) +# define ainfodumpbuffer(m,b,n) +#endif + +#ifdef CONFIG_DEBUG_CAN +# define canerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define caninfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) +#else +# define canerrdumpbuffer(m,b,n) +# define caninfodumpbuffer(m,b,n) #endif #ifdef CONFIG_DEBUG_GRAPHICS -# define gdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n) -# define gvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n) +# define gerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define ginfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) #else -# define gdbgdumpbuffer(m,b,n) -# define gvdbgdumpbuffer(m,b,n) +# define gerrdumpbuffer(m,b,n) +# define ginfodumpbuffer(m,b,n) #endif #ifdef CONFIG_DEBUG_BINFMT -# define bdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n) -# define bvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n) +# define berrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define binfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) #else -# define bdbgdumpbuffer(m,b,n) -# define bvdbgdumpbuffer(m,b,n) +# define berrdumpbuffer(m,b,n) +# define binfodumpbuffer(m,b,n) #endif #ifdef CONFIG_DEBUG_LIB -# define ldbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n) -# define lvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n) +# define lerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define linfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) #else -# define ldbgdumpbuffer(m,b,n) -# define lvdbgdumpbuffer(m,b,n) +# define lerrdumpbuffer(m,b,n) +# define linfodumpbuffer(m,b,n) #endif #ifdef CONFIG_DEBUG_AUDIO -# define auddbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n) -# define audvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n) +# define auderrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define audinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) +#else +# define auderrdumpbuffer(m,b,n) +# define audinfodumpbuffer(m,b,n) +#endif + +#ifdef CONFIG_DEBUG_DMA +# define dmaerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define dmainfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) +#else +# define dmaerrdumpbuffer(m,b,n) +# define dmainfodumpbuffer(m,b,n) +#endif + +#ifdef CONFIG_DEBUG_IRQ +# define irqerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define irqinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) +#else +# define irqerrdumpbuffer(m,b,n) +# define irqinfodumpbuffer(m,b,n) +#endif + +#ifdef CONFIG_DEBUG_LCD +# define lcderrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define lcdinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) +#else +# define lcderrdumpbuffer(m,b,n) +# define lcdinfodumpbuffer(m,b,n) +#endif + +#ifdef CONFIG_DEBUG_LEDS +# define lederrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define ledinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) +#else +# define lederrdumpbuffer(m,b,n) +# define ledinfodumpbuffer(m,b,n) +#endif + +#ifdef CONFIG_DEBUG_GPIO +# define gpioerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define gpioinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) +#else +# define gpioerrdumpbuffer(m,b,n) +# define gpioinfodumpbuffer(m,b,n) +#endif + +#ifdef CONFIG_DEBUG_I2C +# define i2cerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define i2cinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) +#else +# define i2cerrdumpbuffer(m,b,n) +# define i2cinfodumpbuffer(m,b,n) +#endif + +#ifdef CONFIG_DEBUG_I2S +# define i2serrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define i2sinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) +#else +# define i2serrdumpbuffer(m,b,n) +# define i2sinfodumpbuffer(m,b,n) +#endif + +#ifdef CONFIG_DEBUG_PWM +# define pwmerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define pwminfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) +#else +# define pwmerrdumpbuffer(m,b,n) +# define pwminfodumpbuffer(m,b,n) +#endif + +#ifdef CONFIG_DEBUG_RTC +# define rtcerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define rtcinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) +#else +# define rtcerrdumpbuffer(m,b,n) +# define rtcinfodumpbuffer(m,b,n) +#endif + +#ifdef CONFIG_DEBUG_MEMCARD +# define mcerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define mcinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) +#else +# define mcerrdumpbuffer(m,b,n) +# define mcinfodumpbuffer(m,b,n) +#endif + +#ifdef CONFIG_DEBUG_SENSORS +# define snerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define sninfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) +#else +# define snerrdumpbuffer(m,b,n) +# define sninfodumpbuffer(m,b,n) +#endif + +#ifdef CONFIG_DEBUG_SPI +# define spierrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define spiinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) +#else +# define spierrdumpbuffer(m,b,n) +# define spiinfodumpbuffer(m,b,n) +#endif + +#ifdef CONFIG_DEBUG_TIMER +# define tmrerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define tmrinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) +#else +# define tmrerrdumpbuffer(m,b,n) +# define tmrinfodumpbuffer(m,b,n) +#endif + +#ifdef CONFIG_DEBUG_USB +# define uerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define uinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) #else -# define auddbgdumpbuffer(m,b,n) -# define audvdbgdumpbuffer(m,b,n) +# define uerrdumpbuffer(m,b,n) +# define uinfodumpbuffer(m,b,n) +#endif + +#ifdef CONFIG_DEBUG_WATCHDOG +# define wderrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define wdinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) +#else +# define wderrdumpbuffer(m,b,n) +# define wdinfodumpbuffer(m,b,n) #endif /**************************************************************************** @@ -684,21 +1483,21 @@ void lib_dumpbuffer(FAR const char *msg, FAR const uint8_t *buffer, */ #ifndef CONFIG_CPP_HAVE_VARARGS -#ifdef CONFIG_DEBUG -int dbg(const char *format, ...); +#ifdef CONFIG_DEBUG_ALERT +int _alert(const char *format, ...); +#endif -# ifdef CONFIG_ARCH_LOWPUTC -int lldbg(const char *format, ...); -# endif +#ifdef CONFIG_DEBUG_ERROR +int _err(const char *format, ...); +#endif -# ifdef CONFIG_DEBUG_VERBOSE -int vdbg(const char *format, ...); +#ifdef CONFIG_DEBUG_WARN +int _warn(const char *format, ...); +#endif -# ifdef CONFIG_ARCH_LOWPUTC -int llvdbg(const char *format, ...); -# endif +#ifdef CONFIG_DEBUG_INFO +int _info(const char *format, ...); #endif -#endif /* CONFIG_DEBUG */ #endif /* CONFIG_CPP_HAVE_VARARGS */ #if defined(__cplusplus) diff --git a/include/netinet/arp.h b/include/netinet/arp.h index caaa3e64b49f94d3cf7bd3a9fe2b91d53eb22ba4..1ed14a6a67f5ec105f21680970d678a83684c79e 100644 --- a/include/netinet/arp.h +++ b/include/netinet/arp.h @@ -102,9 +102,9 @@ extern "C" ****************************************************************************/ /* If CONFIG_NET_ARPIOCTLS is defined then the semi-standard ioctl commands - * described above are supported. If not, you can call the uIP ARP interfaces - * directly in a very non-standard way. See include/nuttx/net/arp.h for - * prototypes. + * described above are supported. If not, you can call the network ARP + * interfaces directly in a very non-standard way. See + * include/nuttx/net/arp.h for prototypes. */ #undef EXTERN diff --git a/include/nuttx/analog/pga11x.h b/include/nuttx/analog/pga11x.h index 7b6cf7881c3457a020b6f7fb4271315401b87541..e4e2ebbc92286b4e8322efbb206e83e3ffabc8c3 100644 --- a/include/nuttx/analog/pga11x.h +++ b/include/nuttx/analog/pga11x.h @@ -73,8 +73,8 @@ * When SPI_SELECT is called with devid=SPIDEV_MUX. * * Other settings that effect the driver: - * CONFIG_DEBUG_SPI -- With CONFIG_DEBUG and CONFIG_DEBUG_VERBOSE, - * this will enable debug output from the PGA117 driver. + * CONFIG_DEBUG_SPI_ERR/WARN/INFO -- This will enable debug output from + * the PGA117 driver. */ #ifndef CONFIG_PGA11X_SPIFREQUENCY diff --git a/include/nuttx/audio/audio.h b/include/nuttx/audio/audio.h index 323c4dd696f2742464f7674c5073ae70302aa4ba..e955a4618ba75c8f2ad126d2ad757668cfd64b15 100644 --- a/include/nuttx/audio/audio.h +++ b/include/nuttx/audio/audio.h @@ -67,8 +67,8 @@ ****************************************************************************/ /* Configuration ************************************************************/ /* CONFIG_AUDIO - Enables Audio driver support - * CONFIG_DEBUG_AUDIO - If enabled (with CONFIG_DEBUG and, optionally, - * CONFIG_DEBUG_VERBOSE), this will generate output that can be used to + * CONFIG_DEBUG_AUDIO - If enabled (with CONFIG_DEBUG_FEATURES and, optionally, + * CONFIG_DEBUG_INFO), this will generate output that can be used to * debug Audio drivers. */ diff --git a/include/nuttx/can.h b/include/nuttx/can.h index 573edd16b2bd59cd6691b41014b26aa35674b0ac..27ef01d77c433178e19855018f513543f35fb3ff 100644 --- a/include/nuttx/can.h +++ b/include/nuttx/can.h @@ -74,6 +74,8 @@ * CONFIG_CAN_LOOPBACK - A CAN driver may or may not support a loopback * mode for testing. If the driver does support loopback mode, the setting * will enable it. (If the driver does not, this setting will have no effect). + * The loopback mode may be changed later by ioctl() if the driver supports the + * CANIOC_SET_CONNMODES ioctl command. * CONFIG_CAN_TXREADY - Add support for the can_txready() callback. This is needed * only for CAN hardware the supports an separate H/W TX message FIFO. The call * back is needed to keep the S/W FIFO and the H/W FIFO in sync. Work queue @@ -163,6 +165,24 @@ * is returned with the errno variable set to indicate the * nature of the error. * Dependencies: None + * + * CANIOC_GET_CONNMODES: + * Description: Get the current bus connection modes + * Argument: A pointer to a write-able instance of struct + * canioc_connmodes_s in which the new bus modes will be returned. + * Returned Value: Zero (OK) is returned on success. Otherwise -1 (ERROR) + * is returned with the errno variable set to indicate the + * nature of the error. + * Dependencies: None + * + * CANIOC_SET_CONNMODES: + * Description: Set new bus connection modes values + * Argument: A pointer to a read-able instance of struct + * canioc_connmodes_s in which the new bus modes are provided. + * Returned Value: Zero (OK) is returned on success. Otherwise -1 (ERROR) + * is returned with the errno variable set to indicate the + * nature of the error. + * Dependencies: None */ #define CANIOC_RTR _CANIOC(1) @@ -172,12 +192,14 @@ #define CANIOC_ADD_EXTFILTER _CANIOC(5) #define CANIOC_DEL_STDFILTER _CANIOC(6) #define CANIOC_DEL_EXTFILTER _CANIOC(7) +#define CANIOC_GET_CONNMODES _CANIOC(8) +#define CANIOC_SET_CONNMODES _CANIOC(9) /* CANIOC_USER: Device specific ioctl calls can be supported with cmds greater * than this value */ -#define CANIOC_USER _CANIOC(8) +#define CANIOC_USER _CANIOC(10) /* Convenience macros ***************************************************************/ @@ -504,6 +526,9 @@ struct can_dev_s uint8_t cd_error; /* Flags to indicate internal device errors */ #endif sem_t cd_closesem; /* Locks out new opens while close is in progress */ +#ifndef CONFIG_DISABLE_POLL + sem_t cd_pollsem; /* Manages exclusive access to cd_fds[] */ +#endif struct can_txfifo_s cd_xmit; /* Describes transmit FIFO */ struct can_rxfifo_s cd_recv; /* Describes receive FIFO */ #ifdef CONFIG_CAN_TXREADY @@ -513,6 +538,10 @@ struct can_dev_s struct can_rtrwait_s cd_rtr[CONFIG_CAN_NPENDINGRTR]; FAR const struct can_ops_s *cd_ops; /* Arch-specific operations */ FAR void *cd_priv; /* Used by the arch-specific logic */ + +#ifndef CONFIG_DISABLE_POLL + FAR struct pollfd *cd_fds[CONFIG_CAN_NPOLLWAITERS]; +#endif }; /* Structures used with ioctl calls */ @@ -540,6 +569,19 @@ struct canioc_bittiming_s uint8_t bt_sjw; /* Synchronization Jump Width in time quanta */ }; +/* CANIOC_GET_CONNMODES/CANIOC_SET_CONNMODES: */ +/* A CAN device may support loopback and silent mode. Both modes may not be + * settable independently. + */ + +struct canioc_connmodes_s +{ + uint8_t bm_loopback : 1; /* Enable reception of messages sent + * by this node.*/ + uint8_t bm_silent : 1; /* Disable transmission of messages. + * The node still receives messages. */ +}; + #ifdef CONFIG_CAN_EXTID /* CANIOC_ADD_EXTFILTER: */ diff --git a/include/nuttx/fs/fs.h b/include/nuttx/fs/fs.h index b415725ee8f4f8c9773cf3101867ab7409cded0d..f1bc737ffe8b0a9477c69432f771108df1bbd5c2 100644 --- a/include/nuttx/fs/fs.h +++ b/include/nuttx/fs/fs.h @@ -65,6 +65,52 @@ #define __FS_FLAG_EOF (1 << 0) /* EOF detected by a read operation */ #define __FS_FLAG_ERROR (1 << 1) /* Error detected by any operation */ +/* Inode i_flag values */ + +#define FSNODEFLAG_TYPE_MASK 0x00000007 /* Isolates type field */ +#define FSNODEFLAG_TYPE_DRIVER 0x00000000 /* Character driver */ +#define FSNODEFLAG_TYPE_BLOCK 0x00000001 /* Block driver */ +#define FSNODEFLAG_TYPE_MOUNTPT 0x00000002 /* Mount point */ +#define FSNODEFLAG_TYPE_SPECIAL 0x00000004 /* Special OS type */ +#define FSNODEFLAG_TYPE_NAMEDSEM 0x00000004 /* Named semaphore */ +#define FSNODEFLAG_TYPE_MQUEUE 0x00000005 /* Message Queue */ +#define FSNODEFLAG_TYPE_SHM 0x00000006 /* Shared memory region */ +#define FSNODEFLAG_DELETED 0x00000008 /* Unlinked */ + +#define INODE_IS_TYPE(i,t) \ + (((i)->i_flags & FSNODEFLAG_TYPE_MASK) == (t)) +#define INODE_IS_SPECIAL(i) \ + (((i)->i_flags & FSNODEFLAG_TYPE_SPECIAL) != 0) + +#define INODE_IS_DRIVER(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_DRIVER) +#define INODE_IS_BLOCK(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_BLOCK) +#define INODE_IS_MOUNTPT(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_MOUNTPT) +#define INODE_IS_NAMEDSEM(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_NAMEDSEM) +#define INODE_IS_MQUEUE(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_MQUEUE) +#define INODE_IS_SHM(i) INODE_IS_TYPE(i,FSNODEFLAG_TYPE_SHM) + +#define INODE_GET_TYPE(i) ((i)->i_flags & FSNODEFLAG_TYPE_MASK) +#define INODE_SET_TYPE(i,t) \ + do \ + { \ + (i)->i_flags = ((i)->i_flags & ~FSNODEFLAG_TYPE_MASK) | (t); \ + } \ + while (0) + +#define INODE_SET_DRIVER(i) INODE_SET_TYPE(i,FSNODEFLAG_TYPE_DRIVER) +#define INODE_SET_BLOCK(i) INODE_SET_TYPE(i,FSNODEFLAG_TYPE_BLOCK) +#define INODE_SET_MOUNTPT(i) INODE_SET_TYPE(i,FSNODEFLAG_TYPE_MOUNTPT) +#define INODE_SET_NAMEDSEM(i) INODE_SET_TYPE(i,FSNODEFLAG_TYPE_NAMEDSEM) +#define INODE_SET_MQUEUE(i) INODE_SET_TYPE(i,FSNODEFLAG_TYPE_MQUEUE) +#define INODE_SET_SHM(i) INODE_SET_TYPE(i,FSNODEFLAG_TYPE_SHM) + +/* Mountpoint fd_flags values */ + +#define DIRENTFLAGS_PSEUDONODE 1 + +#define DIRENT_SETPSEUDONODE(f) do (f) |= DIRENTFLAGS_PSEUDONODE; while (0) +#define DIRENT_ISPSEUDONODE(f) (((f) & DIRENTFLAGS_PSEUDONODE) != 0) + /**************************************************************************** * Public Type Definitions ****************************************************************************/ diff --git a/include/nuttx/fs/ioctl.h b/include/nuttx/fs/ioctl.h index e404057d7e6729a019242a4ca75aac2e9a716e9c..b79c783923f75b24425a5aadcfbd72093228c127 100644 --- a/include/nuttx/fs/ioctl.h +++ b/include/nuttx/fs/ioctl.h @@ -83,6 +83,7 @@ #define _LOOPBASE (0x1e00) /* Loop device commands */ #define _MODEMBASE (0x1f00) /* Modem ioctl commands */ #define _I2CBASE (0x2000) /* I2C driver commands */ +#define _GPIOBASE (0x2100) /* GPIO driver commands */ /* boardctl commands share the same number space */ @@ -381,6 +382,11 @@ #define _I2CIOCVALID(c) (_IOC_TYPE(c)==_I2CBASE) #define _I2CIOC(nr) _IOC(_I2CBASE,nr) +/* GPIO driver command definitions ******************************************/ + +#define _GPIOCVALID(c) (_IOC_TYPE(c)==_GPIOBASE) +#define _GPIOC(nr) _IOC(_GPIOBASE,nr) + /* boardctl() command definitions *******************************************/ #define _BOARDIOCVALID(c) (_IOC_TYPE(c)==_BOARDBASE) diff --git a/include/nuttx/fs/nxffs.h b/include/nuttx/fs/nxffs.h index a93a69705688d13dad54891703593a0dc0b94817..edbaf190aa099fa2b4cb1467e987429d291afe35 100644 --- a/include/nuttx/fs/nxffs.h +++ b/include/nuttx/fs/nxffs.h @@ -140,7 +140,7 @@ int nxffs_initialize(FAR struct mtd_dev_s *mtd); * Name: nxffs_dump * * Description: - * Dump a summary of the contents of an NXFFS file system. CONFIG_DEBUG + * Dump a summary of the contents of an NXFFS file system. CONFIG_DEBUG_FEATURES * and CONFIG_DEBUG_FS must be enabled for this function to do anything. * * Input Parameters: diff --git a/include/nuttx/input/ajoystick.h b/include/nuttx/input/ajoystick.h index b672ed57edc7a50ab001798eb4a7ffdcdc433660..b50d98d56e30dc462fa761eef4862f0fc01ed6fa 100644 --- a/include/nuttx/input/ajoystick.h +++ b/include/nuttx/input/ajoystick.h @@ -61,6 +61,7 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* Configuration ************************************************************/ #ifndef CONFIG_AJOYSTICK_NPOLLWAITERS @@ -159,6 +160,7 @@ /**************************************************************************** * Public Types ****************************************************************************/ + /* This type is a bit set that contains the state of all analog joystick * buttons. */ diff --git a/include/nuttx/input/buttons.h b/include/nuttx/input/buttons.h index f31a197a1e287a1bc570dcb4f78852c32dcc5346..ee0785ef95c634d6c3cf2b22c17781847fff0c3c 100644 --- a/include/nuttx/input/buttons.h +++ b/include/nuttx/input/buttons.h @@ -1,7 +1,7 @@ /************************************************************************************ * include/nuttx/input/buttons.h * - * 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 @@ -46,6 +46,7 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* Configuration ************************************************************/ #ifndef CONFIG_BUTTONS_NPOLLWAITERS @@ -64,6 +65,17 @@ #define BTNIOC_SUPPORTED _BTNIOC(0x0001) +/* Command: BTNIOC_POLLEVENTS + * Description: Specify the set of button events that can cause a poll() + * to awaken. The default is all button depressions and all + * button releases (all supported buttons); + * Argument: A read-only pointer to an instance of struct ajoy_pollevents_s + * Return: Zero (OK) on success. Minus one will be returned on failure + * with the errno value set appropriately. + */ + +#define BTNIOC_POLLEVENTS _BTNIOC(0x0002) + /* Command: BTNIOC_REGISTER * Description: Register to receive a signal whenever there is a change in * the state of button inputs. This feature, of course, depends @@ -73,11 +85,12 @@ * with the errno value set appropriately. */ -#define BTNIOC_REGISTER _BTNIOC(0x0002) +#define BTNIOC_REGISTER _BTNIOC(0x0003) /**************************************************************************** * Public Types ****************************************************************************/ + /* This type is a bit set that contains the state of all buttons as defined * in arch/board/board.h. This is the value that is returned when reading * from the button driver. @@ -85,6 +98,17 @@ typedef uint8_t btn_buttonset_t; +/* A reference to this structure is provided with the BTNIOC_POLLEVENTS IOCTL + * command and describes the conditions under which the client would like + * to receive notification. + */ + +struct btn_pollevents_s +{ + btn_buttonset_t bp_press; /* Set of button depressions to wake up the poll */ + btn_buttonset_t bp_release; /* Set of button releases to wake up the poll */ +}; + /* A reference to this structure is provided with the BTNIOC_REGISTER IOCTL * command and describes the conditions under which the client would like * to receive notification. diff --git a/include/nuttx/input/stmpe811.h b/include/nuttx/input/stmpe811.h index 0ace9ea3131cb06cecbe1d872fd5ba2d7d3fd7ab..08b7e6f3cf9d5182ed6821bda1b5e33f18813f48 100644 --- a/include/nuttx/input/stmpe811.h +++ b/include/nuttx/input/stmpe811.h @@ -85,7 +85,7 @@ * CONFIG_STMPE811_TEMP_DISABLE * Disable driver temperature sensor functionality. * CONFIG_STMPE811_REGDEBUG - * Enable very low register-level debug output. Requires CONFIG_DEBUG. + * Enable very low register-level debug output. Requires CONFIG_DEBUG_FEATURES. * CONFIG_STMPE811_THRESHX and CONFIG_STMPE811_THRESHY * STMPE811 touchscreen data comes in a a very high rate. New touch positions * will only be reported when the X or Y data changes by these thresholds. @@ -143,7 +143,7 @@ /* Debug output */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_STMPE811_REGDEBUG #endif diff --git a/libc/syslog/lib_lowsyslog.c b/include/nuttx/ioexpander/gpio.h similarity index 55% rename from libc/syslog/lib_lowsyslog.c rename to include/nuttx/ioexpander/gpio.h index 8c9c84c177a22b01815cf56f28734bfc8857329e..1e5ae50cc739bc800422e33e816bf2e400facd1a 100644 --- a/libc/syslog/lib_lowsyslog.c +++ b/include/nuttx/ioexpander/gpio.h @@ -1,7 +1,7 @@ -/**************************************************************************** - * lib/syslog/lib_lowsyslog.c +/******************************************************************************************** + * include/nuttx/ioexpander/gpio.h * - * Copyright (C) 2007-2009, 2011-2012 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 @@ -31,109 +31,102 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ****************************************************************************/ + ********************************************************************************************/ + +#ifndef __INCLUDE_NUTTX_IOEXPANDER_GPIO_H +#define __INCLUDE_NUTTX_IOEXPANDER_GPIO_H /**************************************************************************** * Included Files ****************************************************************************/ #include +#include -#include -#include - -#include +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ -#include "syslog/syslog.h" +/* Command: GPIO_WRITE + * Description: Set the value of an output GPIO + * Argument: 0=output a low value; 1=outut a high value + * + * Command: GPIO_READ + * Description: Read the value of an input or output GPIO + * Argument: A pointer to an integer value to receive the result: + * 0=low value; 1=high value. + */ -#if defined(CONFIG_ARCH_LOWPUTC) || defined(CONFIG_SYSLOG) +#define GPIO_WRITE _GPIOC(1) +#define GPIO_READ _GPIOC(2) /**************************************************************************** - * Private Functions + * Public Types ****************************************************************************/ -/**************************************************************************** - * Name: lowvsyslog_internal - * - * Description: - * This is the internal implementation of lowvsyslog (see the description - * of lowsyslog and lowvsyslog below) - * - ****************************************************************************/ +/* Common interface definition. Must be cast-compatible with struct + * gpio_input_dev_s and struct gpio_output_dev_s + */ -static inline int lowvsyslog_internal(FAR const IPTR char *fmt, va_list ap) +struct gpio_common_dev_s { - struct lib_outstream_s stream; + bool gp_output; + uint8_t gp_unused[3]; +}; - /* Wrap the stdout in a stream object and let lib_vsprintf do the work. */ +/* The interface to a GPIO input pin */ -#ifdef CONFIG_SYSLOG - lib_syslogstream((FAR struct lib_outstream_s *)&stream); -#else - lib_lowoutstream((FAR struct lib_outstream_s *)&stream); -#endif - return lib_vsprintf((FAR struct lib_outstream_s *)&stream, fmt, ap); -} +struct gpio_input_dev_s +{ + bool gpin_output; + uint8_t gpin_unused[3]; + CODE int (*gpin_read)(FAR struct gpio_input_dev_s *dev); +}; + +/* The interface to a GPIO input pin */ + +struct gpio_output_dev_s +{ + bool gpout_output; + uint8_t gpout_unused[3]; + CODE int (*gpout_read)(FAR struct gpio_output_dev_s *dev); + CODE int (*gpout_write)(FAR struct gpio_output_dev_s *dev, int value); +}; /**************************************************************************** - * Public Functions + * Public Function Prototypes ****************************************************************************/ +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + /**************************************************************************** - * Name: lowvsyslog + * Name: gpio_input_register * * Description: - * The function lowvsyslog() performs the same task as lowsyslog() with - * the difference that it takes a set of arguments which have been - * obtained using the stdarg variable argument list macros. + * Register GPIO input pin device driver. * ****************************************************************************/ -int lowvsyslog(int priority, FAR const IPTR char *fmt, va_list ap) -{ - int ret = 0; - - /* Check if this priority is enabled */ - - if ((g_syslog_mask & LOG_MASK(priority)) != 0) - { - /* Yes.. let vsylog_internal to the deed */ - - ret = lowvsyslog_internal(fmt, ap); - } - - return ret; -} +int gpio_input_register(FAR struct gpio_input_dev_s *dev, int minor); /**************************************************************************** - * Name: lowsyslog + * Name: gpio_output_register * * Description: - * syslog() generates a log message. The priority argument is formed by - * ORing the facility and the level values (see include/syslog.h). The - * remaining arguments are a format, as in printf and any arguments to the - * format. - * - * This is a non-standard, low-level system logging interface. The - * difference between syslog() and lowsyslog() is that the syslog() - * interface writes to the syslog device (usually fd=1, stdout) whereas - * lowsyslog() uses a lower level interface that works even from interrupt - * handlers. + * Register GPIO output pin device driver. * ****************************************************************************/ -int lowsyslog(int priority, FAR const IPTR char *fmt, ...) -{ - va_list ap; - int ret; - - /* Let lowvsyslog do the work */ +int gpio_output_register(FAR struct gpio_output_dev_s *dev, int minor); - va_start(ap, fmt); - ret = lowvsyslog(priority, fmt, ap); - va_end(ap); - - return ret; +#ifdef __cplusplus } +#endif -#endif /* CONFIG_ARCH_LOWPUTC || CONFIG_SYSLOG */ +#endif /* __INCLUDE_NUTTX_IOEXPANDER_GPIO_H */ diff --git a/include/nuttx/ioexpander/pca9555.h b/include/nuttx/ioexpander/pca9555.h index aa0b3c286351242ea2aba1067727a579931fe066..3a99a7def32b877c0f63a3770e5cd4c67a09e734 100644 --- a/include/nuttx/ioexpander/pca9555.h +++ b/include/nuttx/ioexpander/pca9555.h @@ -1,4 +1,4 @@ -/******************************************************************************************** +/**************************************************************************** * include/nuttx/ioexpander/pca9555.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. @@ -35,20 +35,31 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ********************************************************************************************/ + ****************************************************************************/ #ifndef __INCLUDE_NUTTX_IOEXPANDER_PCA9555_H #define __INCLUDE_NUTTX_IOEXPANDER_PCA9555_H +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include #include -/* A reference to a structure of this type must be passed to the PCA9555 driver when the - * driver is instantiated. This structure provides information about the configuration of - * the PCA9555 and provides some board-specific hooks. +/**************************************************************************** + * Public Types + ****************************************************************************/ + +/* A reference to a structure of this type must be passed to the PCA9555 + * driver when the driver is instantiated. This structure provides + * information about the configuration of the PCA9555 and provides some + * board-specific hooks. * - * Memory for this structure is provided by the caller. It is not copied by the driver - * and is presumed to persist while the driver is active. The memory must be writeable - * because, under certain circumstances, the driver may modify the frequency. + * Memory for this structure is provided by the caller. It is not copied by + * the driver and is presumed to persist while the driver is active. The + * memory must be writeable because, under certain circumstances, the driver + * may modify the frequency. */ struct pca9555_config_s @@ -81,9 +92,9 @@ struct pca9555_config_s #endif }; -/******************************************************************************************** +/**************************************************************************** * Public Function Prototypes - ********************************************************************************************/ + ****************************************************************************/ #ifdef __cplusplus #define EXTERN extern "C" @@ -93,11 +104,12 @@ extern "C" #define EXTERN extern #endif -/******************************************************************************************** +/**************************************************************************** * Name: pca9555_initialize * * Description: - * Instantiate and configure the PCA9555 device driver to use the provided I2C device + * Instantiate and configure the PCA9555 device driver to use the provided + * I2C device * instance. * * Input Parameters: @@ -108,9 +120,9 @@ extern "C" * Returned Value: * an ioexpander_dev_s instance on success, NULL on failure. * - ********************************************************************************************/ + ****************************************************************************/ -FAR struct ioexpander_dev_s* pca9555_initialize(FAR struct i2c_master_s *dev, +FAR struct ioexpander_dev_s *pca9555_initialize(FAR struct i2c_master_s *dev, FAR struct pca9555_config_s *config); #ifdef __cplusplus diff --git a/include/nuttx/leds/ncp5623c.h b/include/nuttx/leds/ncp5623c.h new file mode 100644 index 0000000000000000000000000000000000000000..e78a83ee68f76f44c5bdef401afd4f8507fb2c96 --- /dev/null +++ b/include/nuttx/leds/ncp5623c.h @@ -0,0 +1,155 @@ +/**************************************************************************** + * include/nuttx/leds/ncp5623c.h + * based on include/nuttx/leds/pca9635pw.c + * + * Author: Konstantin Berzenko + * + * 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_LEDS_NCP5623C_H +#define __INCLUDE_NUTTX_LEDS_NCP5623C_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include + +/* Configuration + * CONFIG_I2C - Enables support for I2C drivers + * CONFIG_NCP5623C - Enables support for the NCP5623C driver + */ + +#if defined(CONFIG_I2C) && defined(CONFIG_NCP5623C) + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* I2C definitions */ + +#define I2C_BUS_FREQ_HZ (400000) + +/* NCP5623C register addresses */ + +#define NCP5623C_SHUTDOWN (0x00) /* System Shut Down */ +#define NCP5623C_ILED (0x1) /* ILED current */ +#define NCP5623C_PWM1 (0x2) /* LED 1 brightness control */ +#define NCP5623C_PWM2 (0x3) /* LED 2 brightness control */ +#define NCP5623C_PWM3 (0x4) /* LED 3 brightness control */ +#define NCP5623C_UPWARD (0x5) /* Set Up the IEND Upward */ +#define NCP5623C_DWNWRD (0x6) /* Set Up the IEND Downward */ +#define NCP5623C_GRAD (0x7) /* Set Up the Gradual Dimming */ +#define NCP5623C_MAX_REG (0x7) /* Highest register */ + +#define NCP5623C_ADDRESS_MASK (0xe0) /* Address part of reg */ +#define NCP5623C_VALUE_MASK (0x1f) /* Value part of reg */ +#define NCP5623C_SHIFT_ADDRESS (5) +#define NCP5623C_MAX_VALUE (0x1f) /* Max value of all registers */ + +#define NCP5623C_SET_REG(addr, val) \ + (((addr << NCP5623C_SHIFT_ADDRESS) & NCP5623C_ADDRESS_MASK) | \ + (val & NCP5623C_VALUE_MASK)) /* combine addr and val */ + +/* IOCTL commands */ + +#define LEDIOC_SET_REG _ULEDIOC(1) /* Arg: ncp5623c_set_reg_s * pointer */ + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +enum led_select_e +{ + LED_1 = NCP5623C_PWM1, + LED_2 = NCP5623C_PWM2, + LED_3 = NCP5623C_PWM3 +}; + +/* This structure is used in an IOCTL command for setting the PWM of an individual + * LED. The desired LED is selected by setting the 'led' parameter accordingly + * whereas the 'led_pwm' field governs the brightness of the selected LED. A value + * of 0 (0x00) leads to a duty cycle of 0 % = LED off while a value of 255 (0xFF) + * leads to a duty cycle of 99.6 % = Maximum brightness. + */ + +struct ncp5623c_set_reg_s +{ + uint8_t reg; + uint8_t val; +}; + +/**************************************************************************** + * Forward declarations + ****************************************************************************/ + +struct i2c_master_s; + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Name: ncp5623c_register + * + * Description: + * Register the NCP5623C device as 'devpath' + * + * Input Parameters: + * devpath - The full path to the driver to register. E.g., "/dev/leddrv0". + * i2c - An instance of the I2C interface to use to communicate + * with the LM92. + * ncp5623c_i2c_addr + * - The I2C address of the NCP5623C. + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +int ncp5623c_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, + uint8_t const ncp5623c_i2c_addr); + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* CONFIG_I2C && CONFIG_I2C_NCP5623C */ +#endif /* __INCLUDE_NUTTX_LEDS_NCP5623C_H */ diff --git a/include/nuttx/mm/mm.h b/include/nuttx/mm/mm.h index 7d2e102f318bd1fb8500cde56716ce26880c29b2..485e73fbeb4f88f6dac0ef8426c77c287e471bcc 100644 --- a/include/nuttx/mm/mm.h +++ b/include/nuttx/mm/mm.h @@ -427,7 +427,7 @@ FAR void *kmm_memalign(size_t alignment, size_t size); /* Functions contained in kmm_heapmember.c **********************************/ -#if defined(CONFIG_MM_KERNEL_HEAP) && defined(CONFIG_DEBUG) +#if defined(CONFIG_MM_KERNEL_HEAP) && defined(CONFIG_DEBUG_FEATURES) bool kmm_heapmember(FAR void *mem); #endif diff --git a/include/nuttx/mm/shm.h b/include/nuttx/mm/shm.h index 1a568e81c422dd0ea45d70ac9fa538d5c5da35f2..35f19c50d222fcf4b798947a598e1c60b2839191 100644 --- a/include/nuttx/mm/shm.h +++ b/include/nuttx/mm/shm.h @@ -77,19 +77,19 @@ #ifdef CONFIG_CPP_HAVE_VARARGS # ifdef CONFIG_DEBUG_SHM -# define shmdbg(format, ...) dbg(format, ##__VA_ARGS__) -# define shmvdbg(format, ...) vdbg(format, ##__VA_ARGS__) +# define shmerr(format, ...) _err(format, ##__VA_ARGS__) +# define shminfo(format, ...) _info(format, ##__VA_ARGS__) # else -# define shmdbg(format, ...) mdbg(format, ##__VA_ARGS__) -# define shmvdbg(format, ...) mvdbg(format, ##__VA_ARGS__) +# define shmerr(format, ...) merr(format, ##__VA_ARGS__) +# define shminfo(format, ...) minfo(format, ##__VA_ARGS__) # endif #else # ifdef CONFIG_DEBUG_SHM -# define shmdbg dbg -# define shmvdbg vdbg +# define shmerr _err +# define shminfo _info # else -# define shmdbg (void) -# define shmvdbg (void) +# define shmerr (void) +# define shminfo (void) # endif #endif diff --git a/include/nuttx/mtd/mtd.h b/include/nuttx/mtd/mtd.h index 8d1ee6db7056f1f52baf957a26021cc349784212..566f75b314104c17340df333d8caba9e486c792a 100644 --- a/include/nuttx/mtd/mtd.h +++ b/include/nuttx/mtd/mtd.h @@ -298,17 +298,6 @@ FAR struct mtd_dev_s *mtd_rwb_initialize(FAR struct mtd_dev_s *mtd); int ftl_initialize(int minor, FAR struct mtd_dev_s *mtd); -/**************************************************************************** - * Name: flash_eraseall - * - * Description: - * Call a block driver with the MTDIOC_BULKERASE ioctl command. This will - * cause the MTD driver to erase all of the flash. - * - ****************************************************************************/ - -int flash_eraseall(FAR const char *driver); - /**************************************************************************** * Name: smart_initialize * @@ -412,6 +401,16 @@ void at24c_uninitialize(FAR struct mtd_dev_s *mtd); FAR struct mtd_dev_s *at25_initialize(FAR struct spi_dev_s *dev); +/**************************************************************************** + * Name: is25xp + * + * Description: + * Initializes the driver for SPI-based IS25xP FLASH + * + ****************************************************************************/ + +FAR struct mtd_dev_s *is25xp_initialize(FAR struct spi_dev_s *dev); + /**************************************************************************** * Name: m25p_initialize * diff --git a/include/nuttx/net/arp.h b/include/nuttx/net/arp.h index 236053ce70393d6fc7d4f5fb77a7a5560e152e0c..cf04895f7678200b0da6729c1ebc4378fb701451 100644 --- a/include/nuttx/net/arp.h +++ b/include/nuttx/net/arp.h @@ -5,7 +5,7 @@ * Copyright (C) 2007, 2009-2012, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * - * Derived from uIP with has a similar BSD-styple license: + * Derived from uIP with has a similar BSD-style license: * * Author: Adam Dunkels * Copyright (c) 2001-2003, Adam Dunkels. diff --git a/include/nuttx/net/cs89x0.h b/include/nuttx/net/cs89x0.h index 9d92a193117d21c0accbb95eb0b522ed9f3c6201..5629a8f479562c314635bbc8698d01e50bc78277 100644 --- a/include/nuttx/net/cs89x0.h +++ b/include/nuttx/net/cs89x0.h @@ -86,9 +86,9 @@ struct cs89x0_driver_s uint32_t cs_txunderrun; /* Count of Tx underrun errors */ #endif - /* This holds the information visible to uIP/NuttX */ + /* This holds the information visible to the NuttX network */ - struct net_driver_s cs_dev; /* Interface understood by uIP */ + struct net_driver_s cs_dev; /* Interface understood by the network */ }; /**************************************************************************** diff --git a/include/nuttx/net/icmp.h b/include/nuttx/net/icmp.h index f64895afc4e4ecbf66ec160eab71608ce46fc8d7..875deaae425eb1508ffab15dc4599e76122a7ed9 100644 --- a/include/nuttx/net/icmp.h +++ b/include/nuttx/net/icmp.h @@ -1,6 +1,6 @@ /**************************************************************************** * include/nuttx/net/icmp.h - * Header file for the uIP ICMP stack. + * Header file for the NuttX ICMP stack. * * Copyright (C) 2007-2009, 2012, 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/include/nuttx/net/icmpv6.h b/include/nuttx/net/icmpv6.h index af17c4b95b01cac501ba40417a724afd6cbb5bea..d303cfa84809a8bc61fa16b328ae5b6aee9f2330 100644 --- a/include/nuttx/net/icmpv6.h +++ b/include/nuttx/net/icmpv6.h @@ -1,6 +1,6 @@ /**************************************************************************** * include/nuttx/net/icmpv6.h - * Header file for the uIP ICMPv6 stack. + * Header file for the NuttX ICMPv6 stack. * * Copyright (C) 2007-2009, 2012, 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/include/nuttx/net/igmp.h b/include/nuttx/net/igmp.h index 68028daeea30a8b053cedae2553e31524b581515..d0620dbc7b2a030871416141b7966329b5ba137d 100644 --- a/include/nuttx/net/igmp.h +++ b/include/nuttx/net/igmp.h @@ -1,7 +1,7 @@ /**************************************************************************** * include/nuttx/net/igmp.h * The definitions in this header file are intended only for internal use - * by the NuttX port of the uIP stack. + * by the NuttX network stack. * * Copyright (C) 2010, 2012, 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/include/nuttx/net/iob.h b/include/nuttx/net/iob.h index b9ff53d78c9d5d83bb4f89ff0283b2555e602cba..2ac74dceb851c4a74a36ae4638d8465385408c42 100644 --- a/include/nuttx/net/iob.h +++ b/include/nuttx/net/iob.h @@ -410,7 +410,7 @@ int iob_contig(FAR struct iob_s *iob, unsigned int len); * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES void iob_dump(FAR const char *msg, FAR struct iob_s *iob, unsigned int len, unsigned int offset); #else diff --git a/include/nuttx/net/ip.h b/include/nuttx/net/ip.h index 6a494bd283e239e2d7f1546fb5a0a5868f18fdfb..6a07edd585bcca60d5b39d49e855d667e4260a0a 100644 --- a/include/nuttx/net/ip.h +++ b/include/nuttx/net/ip.h @@ -1,7 +1,7 @@ /**************************************************************************** * include/nuttx/net/ip.h * - * The uIP header file contains IP-related definitions for a number of C + * This header file contains IP-related definitions for a number of C * macros that are used by applications as well as internally by the * OS networking logic. * diff --git a/include/nuttx/net/net.h b/include/nuttx/net/net.h index e95c9e82a735b5084b47c0fcf2ce8861c2ae6f0d..4fadfd2c8fea2d2c0469b73e19a244c607292f5f 100644 --- a/include/nuttx/net/net.h +++ b/include/nuttx/net/net.h @@ -222,10 +222,11 @@ void net_initialize(void); /**************************************************************************** * Critical section management. The NuttX configuration setting - * CONFIG_NET_NOINTS indicates that uIP not called from the interrupt level. - * If CONFIG_NET_NOINTS is defined, then these will map to semaphore - * controls. Otherwise, it assumed that uIP will be called from interrupt - * level handling and these will map to interrupt enable/disable controls. + * CONFIG_NET_NOINTS indicates that the network stack not called from the + * interrupt level. If CONFIG_NET_NOINTS is defined, then these will map + * to semaphore controls. Otherwise, it assumed that the stack will be + * called from interrupt level handling and these will map to interrupt + * enable/disable controls. * * * If CONFIG_NET_NOINTS is defined, then semaphore based locking is used: diff --git a/include/nuttx/net/netconfig.h b/include/nuttx/net/netconfig.h index f65b1c478d30fa1fabe7ee7355e8a990cf13a0f9..e00b75da91e4dd56a8f9a52b41edd8e86e721649 100644 --- a/include/nuttx/net/netconfig.h +++ b/include/nuttx/net/netconfig.h @@ -1,10 +1,10 @@ /**************************************************************************** * include/nuttx/net/netconfig.h - * Configuration options for NuttX uIP-based networking. + * Configuration options for NuttX networking. * - * This file is used for tweaking various configuration options for - * uIP. This is most assuring the correct default values are provided and - * that configured options are valid. + * This file is used for tweaking various configuration options for the + * network. This is most assuring the correct default values are provided + * and that configured options are valid. * * Note: Network configuration options the netconfig.h should not be changed, * but rather the per-project defconfig file. @@ -72,8 +72,8 @@ /* Layer 2 Configuration Options ********************************************/ -/* The default data link layer for uIP is Ethernet. If CONFIG_NET_SLIP is - * defined in the NuttX header file, then SLIP will be supported. The basic +/* The default data link laye is Ethernet. If CONFIG_NET_SLIP is defined in + * the NuttX header file, then SLIP will be supported. The basic * differences between the SLIP and Ethernet configurations is that when SLIP * is selected: * @@ -204,7 +204,7 @@ /* IP configuration options */ -/* The IP TTL (time to live) of IP packets sent by uIP. +/* The IP TTL (time to live) of IP packets sent by the network stack. * * This should normally not be changed. */ @@ -494,7 +494,7 @@ #ifndef CONFIG_NET_ARPTAB_SIZE /* The size of the ARP table. * - * This option should be set to a larger value if this uIP node will + * This option should be set to a larger value if this network node will * have many connections from the local network. */ @@ -532,7 +532,7 @@ /* Statistics datatype * * This typedef defines the dataype used for keeping statistics in - * uIP. + * the network. */ typedef uint16_t net_stats_t; diff --git a/include/nuttx/net/netdev.h b/include/nuttx/net/netdev.h index de6e997faf142874cb5fe986ebcb26d3d2fb9dd4..7ef7cc62d75b1a256dc879bf9c602cd86bccd7f5 100644 --- a/include/nuttx/net/netdev.h +++ b/include/nuttx/net/netdev.h @@ -1,6 +1,7 @@ /**************************************************************************** * include/nuttx/net/netdev.h - * Defines architecture-specific device driver interfaces to the uIP network. + * Defines architecture-specific device driver interfaces to the NuttX + * network. * * Copyright (C) 2007, 2009, 2011-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -232,9 +233,9 @@ struct net_driver_s * headers from this buffer. The size of the link level headers is * configured by the NET_LL_HDRLEN(dev) define. * - * uIP will handle only a single buffer for both incoming and outgoing - * packets. However, the drive design may be concurrently send and - * filling separate, break-off buffers if CONFIG_NET_MULTIBUFFER is + * The network will handle only a single buffer for both incoming and + * outgoing packets. However, the driver design may be concurrently send + * and filling separate, break-off buffers if CONFIG_NET_MULTIBUFFER is * defined. That buffer management must be controlled by the driver. */ @@ -266,7 +267,7 @@ struct net_driver_s * * Holds the length of the packet in the d_buf buffer. * - * When the network device driver calls the uIP input function, + * When the network device driver calls the network input function, * d_len should be set to the length of the packet in the d_buf * buffer. * @@ -353,10 +354,10 @@ typedef int (*devif_poll_callback_t)(FAR struct net_driver_s *dev); ****************************************************************************/ /**************************************************************************** - * uIP device driver functions + * Network device driver functions * * These functions are used by a network device driver for interacting - * with uIP. + * with the NuttX network. * * Process an incoming IP packet. * @@ -383,9 +384,9 @@ typedef int (*devif_poll_callback_t)(FAR struct net_driver_s *dev); * } * } * - * Note: If you are writing a uIP device driver that needs ARP - * (Address Resolution Protocol), e.g., when running uIP over - * Ethernet, you will need to call the uIP ARP code before calling + * Note: If you are writing a network device driver that needs ARP + * (Address Resolution Protocol), e.g., when running the network over + * Ethernet, you will need to call the network ARP code before calling * this function: * * #define BUF ((struct eth_hdr_s *)&dev->d_buf[0]) @@ -424,8 +425,8 @@ int ipv6_input(FAR struct net_driver_s *dev); /**************************************************************************** * Polling of connections * - * These functions will traverse each active uIP connection structure and - * perform appropriate operations: devif_timer() will perform TCP timer + * These functions will traverse each active network connection structure + * and perform appropriate operations: devif_timer() will perform TCP timer * operations (and UDP polling operations); devif_poll() will perform TCP * and UDP polling operations. The CAN driver MUST implement logic to * periodically call devif_timer(); devif_poll() may be called asynchronously @@ -437,7 +438,7 @@ int ipv6_input(FAR struct net_driver_s *dev); * value (which it should do only if it cannot accept further write data). * * When the callback function is called, there may be an outbound packet - * waiting for service in the uIP packet buffer, and if so the d_len field + * waiting for service in the device packet buffer, and if so the d_len field * is set to a value larger than zero. The device driver should then send * out the packet. * @@ -455,9 +456,9 @@ int ipv6_input(FAR struct net_driver_s *dev); * ... * devif_poll(dev, driver_callback); * - * Note: If you are writing a uIP device driver that needs ARP (Address - * Resolution Protocol), e.g., when running uIP over Ethernet, you will - * need to call the arp_out() function in the callback function + * Note: If you are writing a network device driver that needs ARP (Address + * Resolution Protocol), e.g., when running the networ over Ethernet, you + * will need to call the arp_out() function in the callback function * before sending the packet: * * int driver_callback(FAR struct net_driver_s *dev) diff --git a/include/nuttx/net/tcp.h b/include/nuttx/net/tcp.h index 02dfa885cdc7af3bd67443045e1a2c75bbae70f1..fd26d7ba5ed94aafd524456ca2eb79a33cbdea18 100644 --- a/include/nuttx/net/tcp.h +++ b/include/nuttx/net/tcp.h @@ -1,10 +1,10 @@ /**************************************************************************** * include/nuttx/net/tcp.h - * Header file for the uIP TCP/IP stack. + * Header file for the NuttX TCP/IP stack. * - * The uIP TCP/IP stack header file contains definitions for a number - * of C macros that are used by uIP programs as well as internal uIP - * structures, TCP/IP header structures and function declarations. + * This TCP/IP stack header file contains definitions for a number of C + * macros that are used by internal network structures, TCP/IP header + * structures and function declarations. * * Copyright (C) 2007, 2009-2010, 2012-2014 Gregory Nutt. All rights * reserved. diff --git a/include/nuttx/net/udp.h b/include/nuttx/net/udp.h index 24b47452f5454843eb9a3c7b68d7c9615b7dc5fb..6d73cdae10babbaa0af4c9bb7a3ae0d9667d43c7 100644 --- a/include/nuttx/net/udp.h +++ b/include/nuttx/net/udp.h @@ -1,10 +1,10 @@ /**************************************************************************** * include/nuttx/net/udp.h - * Header file for the uIP UDP stack. + * Header file for the NuttX UDP stack. * - * The uIP UDP stack header file contains definitions for a number - * of C macros that are used by uIP programs as well as internal uIP - * structures, UDP header structures and function declarations. + * The UDP stack header file contains definitions for a number of C macros + * that are used by the internal network structures, UDP header structures + * and function declarations. * * Copyright (C) 2007, 2009, 2012, 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/include/nuttx/pwm.h b/include/nuttx/pwm.h index f77cbee23ae2f1a816306ebba64a78fd8843ee08..fe13a4efc6921037d45f561e6fef7bb4c6ca75e7 100644 --- a/include/nuttx/pwm.h +++ b/include/nuttx/pwm.h @@ -72,8 +72,7 @@ * number of pulses. This might be used, for example to support a stepper * motor. If the hardware will support a fixed pulse count, then this * configuration should be set to enable the capability. - * CONFIG_DEBUG_PWM - If enabled (with CONFIG_DEBUG and, optionally, - * CONFIG_DEBUG_VERBOSE), this will generate output that can be use dto + * CONFIG_DEBUG_PWM_INFO - This will generate output that can be use to * debug the PWM driver. */ diff --git a/include/nuttx/sensors/adxl345.h b/include/nuttx/sensors/adxl345.h index da563c8ac6022c5e8fe0c91eb1f09547fb3db4b8..59df6c9dad93d1aebf8525aa320b3b8c4df65630 100644 --- a/include/nuttx/sensors/adxl345.h +++ b/include/nuttx/sensors/adxl345.h @@ -66,7 +66,7 @@ * going high, it will start high and will go low when an interrupt * is fired. Default: Active high/rising edge. * CONFIG_ADXL345_REGDEBUG - * Enable very low register-level debug output. Requires CONFIG_DEBUG. + * Enable very low register-level debug output. Requires CONFIG_DEBUG_FEATURES. */ #ifdef CONFIG_DISABLE_SIGNALS diff --git a/include/nuttx/sensors/bmp180.h b/include/nuttx/sensors/bmp180.h index 0c12e242265a49dd5e69e5ca4f99726610916467..9a2d21d839d5b059c2399ca0cd7b59c744054383 100644 --- a/include/nuttx/sensors/bmp180.h +++ b/include/nuttx/sensors/bmp180.h @@ -52,7 +52,7 @@ * CONFIG_BMP180 * Enables support for the BMP180 driver * CONFIG_BMP180_REGDEBUG - * Enable very low register-level debug output. Requires CONFIG_DEBUG. + * Enable very low register-level debug output. Requires CONFIG_DEBUG_FEATURES. */ /**************************************************************************** diff --git a/include/nuttx/sensors/mpl115a.h b/include/nuttx/sensors/mpl115a.h index c958c8025df9487c2208769fe68edb159f01010a..736922d968e1f73fd40870b265deb5718b64cb0d 100644 --- a/include/nuttx/sensors/mpl115a.h +++ b/include/nuttx/sensors/mpl115a.h @@ -49,7 +49,7 @@ * CONFIG_SENSORS_MPL115A * Enables support for the MPL115A driver * CONFIG_MPL115A_REGDEBUG - * Enable very low register-level debug output. Requires CONFIG_DEBUG. + * Enable very low register-level debug output. Requires CONFIG_DEBUG_FEATURES. */ /* There are two types of MPL115A chips. The MPL115A1 communicates with the target CPU diff --git a/include/nuttx/spi/spi.h b/include/nuttx/spi/spi.h index 5daacd30059ace89312ec6a2082f7f8442431d4c..45b041ffba648d56eb4041b923774a2a06b0bb75 100644 --- a/include/nuttx/spi/spi.h +++ b/include/nuttx/spi/spi.h @@ -127,6 +127,27 @@ #define SPI_SETFREQUENCY(d,f) ((d)->ops->setfrequency(d,f)) +/**************************************************************************** + * Name: SPI_SETDELAY + * + * Description: + * Set the SPI Delays in nanoseconds. Optional. + * + * Input Parameters: + * dev - Device-specific state data + * startdelay - The delay between CS active and first CLK + * stopdelay - The delay between last CLK and CS inactive + * csdelay - The delay between CS inactive and CS active again + * + * Returned Value: + * Returns the actual frequency selected + * + ****************************************************************************/ + +#ifdef CONFIG_SPI_CS_DELAY_CONTROL +# define SPI_SETDELAY(d,a,b,c) ((d)->ops->setdelay(d,a,b,c)) +#endif + /**************************************************************************** * Name: SPI_SETMODE * @@ -189,15 +210,35 @@ # define SPI_HWFEATURES(d,f) \ (((d)->ops->hwfeatures) ? (d)->ops->hwfeatures(d,f) : ((f) == 0 ? OK : -ENOSYS)) - /* These are currently defined feature flags */ + /* These are currently defined feature flags: + * + * Bit 0: HWFEAT_CRCGENERATION + * Hardware CRC generation + * Bit 1: HWFEAT_FORCE_CS_INACTIVE_AFTER_TRANSFER + * CS rises after every Transmission, also if we provide new data + * immediately + * Bit 2: HWFEAT_FORCE_CS_ACTIVE_AFTER_TRANSFER + * CS does not rise automatically after a transmission, also if + * the spi runs out of data (for a long time) + * Bit 3: HWFEAT_ESCAPE_LASTXFER + * Do not set the LASTXFER-Bit at the last word of the next + * exchange, Flag is auto-resetting after the next LASTXFER + * condition. (see spi_exchange) + */ # ifdef CONFIG_SPI_CRCGENERATION -# HWFEAT_CRCGENERATION (1 << 0) /* Bit 0: Hardward CRC generation */ +# define HWFEAT_CRCGENERATION (1 << 0) +# endif + +# ifdef CONFIG_SPI_CS_CONTROL +# define HWFEAT_FORCE_CS_INACTIVE_AFTER_TRANSFER (1 << 1) +# define HWFEAT_FORCE_CS_ACTIVE_AFTER_TRANSFER (1 << 2) +# define HWFEAT_ESCAPE_LASTXFER (1 << 3) # endif #else /* Any attempt to select hardware features with CONFIG_SPI_HWFEATURES - * deselected will cause an assertion. + * deselected will return an -ENOSYS error. */ # define SPI_HWFEATURES(d,f) (((f) == 0) ? OK : -ENOSYS) @@ -431,6 +472,10 @@ struct spi_ops_s CODE void (*select)(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected); CODE uint32_t (*setfrequency)(FAR struct spi_dev_s *dev, uint32_t frequency); +#ifdef CONFIG_SPI_CS_DELAY_CONTROL + CODE int (*setdelay)(FAR struct spi_dev_s *dev, uint32_t a, uint32_t b, + uint32_t c); +#endif CODE void (*setmode)(FAR struct spi_dev_s *dev, enum spi_mode_e mode); CODE void (*setbits)(FAR struct spi_dev_s *dev, int nbits); #ifdef CONFIG_SPI_HWFEATURES diff --git a/include/nuttx/spi/spi_bitbang.c b/include/nuttx/spi/spi_bitbang.c index d0281a249267d0f96acbc7546997503eb6af9f1b..86b340bcdc71cb900dfe12e02b9782098511c4a9 100644 --- a/include/nuttx/spi/spi_bitbang.c +++ b/include/nuttx/spi/spi_bitbang.c @@ -64,32 +64,6 @@ * in the bit bang interface and calls spi_create_bitbang(). */ -/* Debug ********************************************************************/ -/* Check if SPI debut is enabled (non-standard.. no support in - * include/debug.h - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_SPI -#endif - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ - /**************************************************************************** * Private Function Prototypes ****************************************************************************/ @@ -273,7 +247,7 @@ static uint32_t spi_setfrequency(FAR struct spi_bitbang_s *priv, uint32_t freque static void spi_setmode(FAR struct spi_bitbang_s *priv, enum spi_mode_e mode) { - spivdbg("mode=%d\n", mode); + spiinfo("mode=%d\n", mode); switch (mode) { diff --git a/include/nuttx/spi/spi_bitbang.h b/include/nuttx/spi/spi_bitbang.h index fee6a9f1fca19e9a0121627c4b7232b069cc2ba3..f5058be9d30e52c8a4ffaa1ef77b5b38555ef93a 100644 --- a/include/nuttx/spi/spi_bitbang.h +++ b/include/nuttx/spi/spi_bitbang.h @@ -48,34 +48,10 @@ #ifdef CONFIG_SPI_BITBANG -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Debug ********************************************************************/ -/* Check if SPI debut is enabled (non-standard.. no support in - * include/debug.h - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_SPI -#endif - -#ifdef CONFIG_DEBUG_SPI -# define spidbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define spivdbg lldbg -# else -# define spivdbg(x...) -# endif -#else -# define spidbg(x...) -# define spivdbg(x...) -#endif - /**************************************************************************** * Private Types ****************************************************************************/ + #ifndef __ASSEMBLY__ /* These are the lower-half handlers that perform the level-level, platform- diff --git a/include/nuttx/streams.h b/include/nuttx/streams.h index ab57b33b35d1bc145272984db41e1f6423c7d864..6ae6b8c943015be9a9e819b329682aec905b5b94 100644 --- a/include/nuttx/streams.h +++ b/include/nuttx/streams.h @@ -1,7 +1,7 @@ /**************************************************************************** * include/nuttx/streams.h * - * Copyright (C) 2009, 2011-2012, 2014-2015 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 @@ -354,23 +354,40 @@ void lib_nullinstream(FAR struct lib_instream_s *nullinstream); void lib_nulloutstream(FAR struct lib_outstream_s *nulloutstream); /**************************************************************************** - * Name: lib_sylogstream + * Name: syslogstream * * Description: * Initializes a stream for use with the configured syslog interface. + * Only accessible from with the OS SYSLOG logic. * * 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). * ****************************************************************************/ -#ifdef CONFIG_SYSLOG -void lib_syslogstream(FAR struct lib_outstream_s *stream); -#endif +void syslogstream(FAR struct lib_outstream_s *stream); + +/**************************************************************************** + * Name: emergstream + * + * Description: + * Initializes a stream for use with the configured emergency syslog + * interface. Only accessible from with the OS SYSLOG logic. + * + * Input parameters: + * stream - User allocated, uninitialized instance of struct + * lib_lowoutstream_s to be initialized. + * + * Returned Value: + * None (User allocated instance initialized). + * + ****************************************************************************/ + +void emergstream(FAR struct lib_outstream_s *stream); /**************************************************************************** * Name: lib_noflush diff --git a/include/nuttx/syslog/ramlog.h b/include/nuttx/syslog/ramlog.h index 75c767819cbd6f53f97330c63e7b1b3bf19793db..70ec26f316e968b9917f8d7673f5c134b8383c7e 100644 --- a/include/nuttx/syslog/ramlog.h +++ b/include/nuttx/syslog/ramlog.h @@ -70,12 +70,11 @@ * in that case, console output from non-Telnet threads will go to the * circular buffer and can be viewed using the NSH 'dmesg' command. * CONFIG_RAMLOG_SYSLOG - Use the RAM logging device for the syslogging - * interface. If this feature is enabled (along with CONFIG_SYSLOG), - * then all debug output (only) will be re-directed to the circular - * buffer in RAM. This RAM log can be view from NSH using the 'dmesg' - * command. NOTE: Unlike the limited, generic character driver SYSLOG - * device, the RAMLOG *can* be used to generate debug output from interrupt - * level handlers. + * interface. If this feature is enabled then all debug output (only) + * will be re-directed to the circular buffer in RAM. This RAM log can + * be viewied from NSH using the 'dmesg' command. NOTE: Unlike the + * limited, generic character driver SYSLOG device, the RAMLOG *can* be + * used to generate debug output from interrupt level handlers. * CONFIG_RAMLOG_NPOLLWAITERS - The number of threads than can be waiting * for this driver on poll(). Default: 4 * @@ -89,10 +88,6 @@ # undef CONFIG_RAMLOG_CONSOLE #endif -#ifndef CONFIG_SYSLOG -# undef CONFIG_RAMLOG_SYSLOG -#endif - #if defined(CONFIG_RAMLOG_SYSLOG) && !defined(CONFIG_SYSLOG_DEVPATH) # define CONFIG_SYSLOG_DEVPATH "/dev/ramlog" #endif @@ -101,25 +96,10 @@ # define CONFIG_RAMLOG_NPOLLWAITERS 4 #endif -#ifndef CONFIG_SYSLOG -# undef CONFIG_RAMLOG_SYSLOG -#endif - #ifndef CONFIG_RAMLOG_BUFSIZE # define CONFIG_RAMLOG_BUFSIZE 1024 #endif -/* The normal behavior of the RAM log when used as a SYSLOG is to return - * end-of-file if there is no data in the RAM log (rather than blocking until - * data is available). That allows you to 'cat' the SYSLOG with no ill - * consequences. - */ - -#ifdef CONFIG_SYSLOG -# undef CONFIG_RAMLOG_NONBLOCKING -# define CONFIG_RAMLOG_NONBLOCKING 1 -#endif - /* When used as a console or syslogging device, the RAM log will pre-pend * line-feeds with carriage returns. */ @@ -183,7 +163,7 @@ int ramlog_consoleinit(void); #endif /**************************************************************************** - * Name: ramlog_sysloginit + * Name: ramlog_syslog_channel * * Description: * Create the RAM logging device and register it at the specified path. @@ -195,7 +175,19 @@ int ramlog_consoleinit(void); ****************************************************************************/ #ifdef CONFIG_RAMLOG_SYSLOG -int ramlog_sysloginit(void); +int ramlog_syslog_channel(void); +#endif + +/**************************************************************************** + * Name: ramlog_putc + * + * Description: + * This is the low-level system logging interface. + * + ****************************************************************************/ + +#if defined(CONFIG_RAMLOG_CONSOLE) || defined(CONFIG_RAMLOG_SYSLOG) +int ramlog_putc(int ch); #endif #undef EXTERN diff --git a/include/nuttx/syslog/syslog.h b/include/nuttx/syslog/syslog.h index 836440da8164b98b29c9f24d7dc08c7a3a8aaee0..fdb2794b79b5f711c5b7a9d033942a4335b0296e 100644 --- a/include/nuttx/syslog/syslog.h +++ b/include/nuttx/syslog/syslog.h @@ -2,7 +2,7 @@ * include/nuttx/syslog/syslog.h * The NuttX SYSLOGing interface * - * Copyright (C) 2012, 2014-2015 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 @@ -42,16 +42,20 @@ ****************************************************************************/ #include +#include +#include /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ /* Configuration ************************************************************/ -/* CONFIG_SYSLOG - Enables generic system logging features. +/* CONFIG_SYSLOG_INTBUFFER - Enables an interrupt buffer that will be used + * to serialize debug output from interrupt handlers. + * CONFIG_SYSLOG_INTBUFSIZE - The size of the interrupt buffer in bytes. * CONFIG_SYSLOG_DEVPATH - The full path to the system logging device * * In addition, some SYSLOG device must also be enabled that will provide - * the syslog_putc() function. As of this writing, there are two SYSLOG + * the syslog output "channel. As of this writing, there are two SYSLOG * devices avaiable: * * 1. A RAM SYSLOGing device that will log data into a circular buffer @@ -66,19 +70,54 @@ * CONFIG_SYSLOG_CHAR - Enable the generic character device for the SYSLOG. * The full path to the SYSLOG device is provided by CONFIG_SYSLOG_DEVPATH. * A valid character device must exist at this path. It will by opened - * by syslog_initialize. + * by logic in syslog_initialize() based on the current configuration. * * NOTE: No more than one SYSLOG device should be configured. */ -#ifndef CONFIG_SYSLOG -# undef CONFIG_SYSLOG_CHAR -#endif - #if defined(CONFIG_SYSLOG_CHAR) && !defined(CONFIG_SYSLOG_DEVPATH) # define CONFIG_SYSLOG_DEVPATH "/dev/ttyS1" #endif +#ifdef CONFIG_SYSLOG_INTBUFFER +# ifndef CONFIG_SYSLOG_INTBUFSIZE +# define CONFIG_SYSLOG_INTBUFSIZE 512 +# endif +# if CONFIG_SYSLOG_INTBUFSIZE > 65535 +# undef CONFIG_SYSLOG_INTBUFSIZE +# define CONFIG_SYSLOG_INTBUFSIZE 65535 +# endif +#endif + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +/* Initialization phases */ + +enum syslog_init_e +{ + SYSLOG_INIT_RESET = 0, /* Power on SYSLOG initializaton phase */ + SYSLOG_INIT_EARLY, /* Early initialization in up_initialize() */ + SYSLOG_INIT_LATE /* Late initialization in os_start(). */ +}; + +/* This structure provides the interface to a SYSLOG device */ + +typedef CODE int (*syslog_putc_t)(int ch); +typedef CODE int (*syslog_flush_t)(void); + +struct syslog_channel_s +{ + /* I/O redirection methods */ + + syslog_putc_t sc_putc; /* Normal buffered output */ + syslog_putc_t sc_force; /* Low-level output for interrupt handlers */ + syslog_flush_t sc_flush; /* Flush buffered output (on crash) */ + + /* Implementation specific logic may follow */ +}; + /**************************************************************************** * Public Data ****************************************************************************/ @@ -96,38 +135,142 @@ extern "C" /**************************************************************************** * Public Function Prototypes ****************************************************************************/ + +/**************************************************************************** + * Name: syslog_channel + * + * Description: + * Configure the SYSLOGging function to use the provided channel to + * generate SYSLOG output. + * + * Input buffer: + * channel - Provides the interface to the channel to be used. + * + * Returned Value: + * Zero (OK)is returned on success. A negated errno value is returned + * on any failure. + * + ****************************************************************************/ + +int syslog_channel(FAR const struct syslog_channel_s *channel); + /**************************************************************************** * Name: syslog_initialize * * Description: - * Initialize to use the character device (or file) at - * CONFIG_SYSLOG_DEVPATH as the SYSLOG sink. + * One power up, the SYSLOG facility is non-existent or limited to very + * low-level output. This function is called later in the initialization + * sequence after full driver support has been initialized. It installs + * the configured SYSLOG drivers and enables full SYSLOGing capability. + * + * This function performs these basic operations: + * + * - Initialize the SYSLOG device + * - Call syslog_channel() to begin using that device. + * + * If CONFIG_ARCH_SYSLOG is selected, then the architecture-specifica + * logic will provide its own SYSLOG device initialize which must include + * as a minimum a call to syslog_channel() to use the device. * - * NOTE that this implementation excludes using a network connection as - * SYSLOG device. That would be a good extension. + * Input Parameters: + * phase - One of {SYSLOG_INIT_EARLY, SYSLOG_INIT_LATE} + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure. + * + ****************************************************************************/ + +#ifndef CONFIG_ARCH_SYSLOG +int syslog_initialize(enum syslog_init_e phase); +#else +# define syslog_initialize(phase) +#endif + +/**************************************************************************** + * Name: syslog_file_channel + * + * Description: + * Configure to use a file in a mounted file system at 'devpath' as the + * SYSLOG channel. + * + * This tiny function is simply a wrapper around syslog_dev_initialize() + * and syslog_channel(). It calls syslog_dev_initialize() to configure + * the character file at 'devpath then calls syslog_channel() to use that + * device as the SYSLOG output channel. + * + * File SYSLOG channels differ from other SYSLOG channels in that they + * cannot be established until after fully booting and mounting the target + * file system. This function would need to be called from board-specific + * bring-up logic AFTER mounting the file system containing 'devpath'. + * + * SYSLOG data generated prior to calling syslog_file_channel will, of + * course, not be included in the file. + * + * NOTE interrupt level SYSLOG output will be lost in this case unless + * the interrupt buffer is used. + * + * Input Parameters: + * devpath - The full path to the file to be used for SYSLOG output. + * This may be an existing file or not. If the file exists, + * syslog_file_channel() will append new SYSLOG data to the end of the + * file. If it does not, then syslog_file_channel() will create the + * file. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure. * ****************************************************************************/ -#ifdef CONFIG_SYSLOG_CHAR -int syslog_initialize(void); +#ifdef CONFIG_SYSLOG_FILE +int syslog_file_channel(FAR const char *devpath); #endif /**************************************************************************** - * Name: syslog_putc + * Name: syslog_flush * * Description: - * This is the low-level system logging interface. The debugging/syslogging - * interfaces are syslog() and lowsyslog(). The difference is that - * the syslog() internface writes to fd=1 (stdout) whereas lowsyslog() uses - * a lower level interface that works from interrupt handlers. This - * function is the low-level interface used to implement lowsyslog(). + * This is called by system crash-handling logic. It must flush any + * buffered data to the SYSLOG device. + * + * Interrupts are disabled at the time of the crash and this logic must + * perform the flush using low-level, non-interrupt driven logic. + * + * Input Parameters: + * None + * + * Returned Value: + * Zero (OK)is returned on success. A negated errno value is returned + * on any failure. * ****************************************************************************/ -#ifdef CONFIG_SYSLOG -int syslog_putc(int ch); +#if 0 +/* REVISIT: (1) Not yet integrated into assertion handlers and (2) there is + * an implementation problem in that if a character driver is the underlying + * device, then there is no mechanism to flush the data buffered in the + * driver with interrupts disabled. + */ + +int syslog_flush(void); #endif +/**************************************************************************** + * Name: _vsyslog + * + * Description: + * _vsyslog() handles the system logging system calls. It is functionally + * equivalent to vsyslog() except that (1) the per-process priority + * filtering has already been performed and the va_list parameter is + * passed by reference. That is because the va_list is a structure in + * some compilers and passing of structures in the NuttX sycalls does + * not work. + * + ****************************************************************************/ + +int _vsyslog(int priority, FAR const IPTR char *src, FAR va_list *ap); + #undef EXTERN #ifdef __cplusplus } diff --git a/include/nuttx/syslog/syslog_console.h b/include/nuttx/syslog/syslog_console.h index a14d75d963308619bdf28554bd14016696306dd1..18283d9f3938022f7fbe9a0e8d20363069ad4089 100644 --- a/include/nuttx/syslog/syslog_console.h +++ b/include/nuttx/syslog/syslog_console.h @@ -43,22 +43,22 @@ #include #include -#ifdef CONFIG_SYSLOG_CONSOLE +#ifdef CONFIG_CONSOLE_SYSLOG /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ /* Configuration ************************************************************/ -/* CONFIG_SYSLOG_CONSOLE - Use the syslog logging output as a system console. +/* CONFIG_CONSOLE_SYSLOG - Use the syslog logging output as a system console. * If this feature is enabled (along with CONFIG_DEV_CONSOLE), then all - * console output will be re-directed to a syslog_putc function. This + * console output will be re-directed to the SYSLOG output channel. This * is useful, for example, if the only console is a Telnet console. Then * in that case, console output from non-Telnet threads will go to the - * syslog_putc output. + * SYSLOG output channel. */ #ifndef CONFIG_DEV_CONSOLE -# undef CONFIG_SYSLOG_CONSOLE +# undef CONFIG_CONSOLE_SYSLOG #endif /**************************************************************************** @@ -88,7 +88,7 @@ extern "C" * ****************************************************************************/ -#ifdef CONFIG_SYSLOG_CONSOLE +#ifdef CONFIG_CONSOLE_SYSLOG int syslog_console_init(void); #endif @@ -98,5 +98,5 @@ int syslog_console_init(void); #endif #endif /* __ASSEMBLY__ */ -#endif /* CONFIG_SYSLOG_CONSOLE */ +#endif /* CONFIG_CONSOLE_SYSLOG */ #endif /* __INCLUDE_NUTTX_SYSLOG_SYSLOG_CONSOLE_H */ diff --git a/include/nuttx/timers/cs2100-cp.h b/include/nuttx/timers/cs2100-cp.h index fe72836770b97675d5580cd7d3ee4d77d83f9c1b..51fe48974da091cc2a0f0e01e1bc7b361f11332d 100644 --- a/include/nuttx/timers/cs2100-cp.h +++ b/include/nuttx/timers/cs2100-cp.h @@ -60,7 +60,7 @@ # define CONFIG_TIMERS_CS2100CP_CLKINBW 16 #endif -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_CS2100CP_DEBUG # undef CONFIG_CS2100CP_REGDEBUG #endif diff --git a/include/nuttx/usb/usbdev_trace.h b/include/nuttx/usb/usbdev_trace.h index 445ef5f560a3933c8b8edc224588a20291e66fc3..4ef4e170e11d035eea43e650e3e21cde03b0d68c 100644 --- a/include/nuttx/usb/usbdev_trace.h +++ b/include/nuttx/usb/usbdev_trace.h @@ -480,7 +480,7 @@ EXTERN const struct trace_msg_t g_usb_trace_strings_intdecode[]; * ****************************************************************************/ -#if defined(CONFIG_USBDEV_TRACE) || (defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_USB)) +#if defined(CONFIG_USBDEV_TRACE) || (defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_USB)) usbtrace_idset_t usbtrace_enable(usbtrace_idset_t idset); #else # define usbtrace_enable(idset) @@ -497,7 +497,7 @@ usbtrace_idset_t usbtrace_enable(usbtrace_idset_t idset); * ****************************************************************************/ -#if defined(CONFIG_USBDEV_TRACE) || (defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_USB)) +#if defined(CONFIG_USBDEV_TRACE) || (defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_USB)) void usbtrace(uint16_t event, uint16_t value); #else # define usbtrace(event, value) diff --git a/include/nuttx/usb/usbhost_trace.h b/include/nuttx/usb/usbhost_trace.h index f8e8d1b4956ef1d5421ae98a99b2d39565319d1e..f71b7c90b80c15bd6b8f32d8f3330e838cabad3e 100644 --- a/include/nuttx/usb/usbhost_trace.h +++ b/include/nuttx/usb/usbhost_trace.h @@ -48,9 +48,9 @@ /* Configuration ************************************************************/ /* Debug/Trace-related definitions */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_USB -# undef CONFIG_DEBUG_VERBOSE +# undef CONFIG_DEBUG_INFO #endif #ifndef CONFIG_USBHOST_TRACE @@ -61,7 +61,7 @@ #if defined(CONFIG_USBHOST_TRACE) || defined(CONFIG_DEBUG_USB) # define HAVE_USBHOST_TRACE 1 -# if defined(CONFIG_USBHOST_TRACE_VERBOSE) || defined(CONFIG_DEBUG_VERBOSE) +# if defined(CONFIG_USBHOST_TRACE_VERBOSE) || defined(CONFIG_DEBUG_INFO) # define HAVE_USBHOST_TRACE_VERBOSE 1 # endif #endif @@ -115,8 +115,8 @@ extern "C" * ****************************************************************************/ -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE +#ifndef CONFIG_DEBUG_FEATURES +# undef CONFIG_DEBUG_INFO # undef CONFIG_DEBUG_USB #endif diff --git a/include/nuttx/wireless/nrf24l01.h b/include/nuttx/wireless/nrf24l01.h index 6d2128606b6e498f8be2e50950e5b54dc0e9494a..4ed00c1a47b09e046c195c158a35ba317262c622 100644 --- a/include/nuttx/wireless/nrf24l01.h +++ b/include/nuttx/wireless/nrf24l01.h @@ -91,15 +91,13 @@ /* NRF24L01 debug */ #ifdef NRF24L01_DEBUG -# define wdbg(format, ...) dbg(format, ##__VA_ARGS__) -# define wlldbg(format, ...) lldbg(format, ##__VA_ARGS__) -# define wvdbg(format, ...) vdbg(format, ##__VA_ARGS__) -# define wllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__) +# define werr(format, ...) _err(format, ##__VA_ARGS__) +# define werr(format, ...) _err(format, ##__VA_ARGS__) +# define winfo(format, ...) _info(format, ##__VA_ARGS__) #else -# define wdbg(x...) -# define wlldbg(x...) -# define wvdbg(x...) -# define wllvdbg(x...) +# define werr(x...) +# define werr(x...) +# define winfo(x...) #endif /**************************************************************************** diff --git a/include/pthread.h b/include/pthread.h index b2ebffda45bec72cb786da09507437f309a8e40c..64228154f7d907a025eb178fce54dca2508bbb69 100644 --- a/include/pthread.h +++ b/include/pthread.h @@ -138,7 +138,7 @@ /* Definitions to map some non-standard, BSD thread management interfaces to * the non-standard Linux-like prctl() interface. Since these are simple * mappings to prctl, they will return 0 on success and -1 on failure with the - * err number in errno. This is an inconsistency with the pthread interfaces. + * error number in errno. This is an inconsistency with the pthread interfaces. */ #define pthread_setname_np(thread, name) \ diff --git a/include/sched.h b/include/sched.h index b9a21f0f6f07d0a7a244c1d276b28a1456394907..0c4443e93d4359357e180779d40fc5155171fd8f 100644 --- a/include/sched.h +++ b/include/sched.h @@ -44,6 +44,7 @@ #include #include +#include #include /******************************************************************************** @@ -255,6 +256,10 @@ int sched_lock(void); int sched_unlock(void); int sched_lockcount(void); +/* Queries */ + +bool sched_idletask(void); + #undef EXTERN #if defined(__cplusplus) } diff --git a/include/signal.h b/include/signal.h index 12585c91e31fe33159486e949fafd9b2517c5e48..7cfc93b136bb8393b815137891698d9b7bca7a8f 100644 --- a/include/signal.h +++ b/include/signal.h @@ -175,22 +175,21 @@ /* Special values of of sa_handler used by sigaction and sigset. They are all * treated like NULL for now. This is okay for SIG_DFL and SIG_IGN because * in NuttX, the default action for all signals is to ignore them. - * - * REVISIT: Need to distinguish the value of SIG_HOLD. It is needed in the - * implementation of sigset() but would need to be recognized in all signal - * functions that deal with signal disposition. */ -#define SIG_ERR ((CODE void *)-1) /* And error occurred */ -#define SIG_DFL ((CODE void *)0) /* Default is SIG_IGN for all signals */ -#define SIG_IGN ((CODE void *)0) /* Ignore the signal */ -#define SIG_HOLD ((CODE void *)1) /* Used only with sigset() */ +#define SIG_ERR ((_sa_handler_t)-1) /* And error occurred */ +#define SIG_DFL ((_sa_handler_t)0) /* Default is SIG_IGN for all signals */ +#define SIG_IGN ((_sa_handler_t)0) /* Ignore the signal */ +#define SIG_HOLD ((_sa_handler_t)1) /* Used only with sigset() */ /******************************************************************************** * Public Type Definitions ********************************************************************************/ -/* This defines a set of 32 signals (numbered 0 through 31). */ +/* This defines a set of 32 signals (numbered 0 through 31). + * REVISIT: Signal 0 is, however, not generally usable since that value has + * special meaning in some circumstances (e.g., kill()). + */ typedef uint32_t sigset_t; /* Bit set of 32 signals */ #define __SIGSET_T_DEFINED 1 diff --git a/include/spawn.h b/include/spawn.h index 19b0c24501626b73bff76859d4850928a9dea0d4..f2d49f041079617ce5b88222d4778e8aaf818ab8 100644 --- a/include/spawn.h +++ b/include/spawn.h @@ -186,7 +186,7 @@ int posix_spawn_file_actions_addopen(FAR posix_spawn_file_actions_t *file_action int posix_spawnattr_init(FAR posix_spawnattr_t *attr); /* int posix_spawnattr_destroy(FAR posix_spawnattr_t *); */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES # define posix_spawnattr_destroy(attr) (attr ? 0 : EINVAL) #else # define posix_spawnattr_destroy(attr) (0) @@ -234,7 +234,7 @@ int task_spawnattr_setstacksize(FAR posix_spawnattr_t *attr, /* Non standard debug functions */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES void posix_spawn_file_actions_dump(FAR posix_spawn_file_actions_t *file_actions); void posix_spawnattr_dump(FAR posix_spawnattr_t *attr); #else diff --git a/include/sys/boardctl.h b/include/sys/boardctl.h index 5177dd8074fade0e7f3a105ce93cb71ff74f902c..b1ebe45e8fa84bca24998bb4806b87675465a4f9 100644 --- a/include/sys/boardctl.h +++ b/include/sys/boardctl.h @@ -265,6 +265,19 @@ struct boardioc_usbdev_ctrl_s }; #endif /* CONFIG_BOARDCTL_USBDEVCTRL */ +/**************************************************************************** + * Public Data + ****************************************************************************/ + +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + /**************************************************************************** * Public Function Prototypes ****************************************************************************/ @@ -299,5 +312,10 @@ struct boardioc_usbdev_ctrl_s int boardctl(unsigned int cmd, uintptr_t arg); +#undef EXTERN +#if defined(__cplusplus) +} +#endif + #endif /* CONFIG_LIB_BOARDCTL */ #endif /* __INCLUDE_SYS_BOARDCTL_H */ diff --git a/include/sys/syscall.h b/include/sys/syscall.h index 198b27c95332027e814ddb119ff3c1546995774e..389c11bf08fe8f5651099828a5b07c42de91492f 100644 --- a/include/sys/syscall.h +++ b/include/sys/syscall.h @@ -225,11 +225,16 @@ # define SYS_timer_getoverrun (__SYS_timers+2) # define SYS_timer_gettime (__SYS_timers+3) # define SYS_timer_settime (__SYS_timers+4) -# define __SYS_descriptors (__SYS_timers+5) +# define __SYS_syslog (__SYS_timers+5) #else -# define __SYS_descriptors __SYS_timers +# define __SYS_syslog __SYS_timers #endif +/* Unconditional system logging */ + +#define SYS__vsyslog (__SYS_syslog+0) +#define __SYS_descriptors (__SYS_syslog+1) + /* The following are defined if either file or socket descriptor are * enabled. */ diff --git a/include/sys/wait.h b/include/sys/wait.h index b46e302879a04dbab71d767b4043ad76baae4673..500c8b51f97bf282cfa6ca1afc47b148e4048f84 100644 --- a/include/sys/wait.h +++ b/include/sys/wait.h @@ -50,7 +50,7 @@ ****************************************************************************/ /* The following are provided for analysis of returned status values. - * Encoded is as follows as 2 bytes of info(MS) then two bytes of code (LS). + * Encoded is as follows as 2 bytes of _info(MS) then two bytes of code (LS). * Code: * 0 - Child has exited, info is the exit code. * Other values - Not implemented diff --git a/include/syslog.h b/include/syslog.h index 6c1316a7e61477eea4f0a754e326bb388a5112a2..4c1112cf76d02a1f84793e6c8d3c185b4a77bf01 100644 --- a/include/syslog.h +++ b/include/syslog.h @@ -128,14 +128,6 @@ #define LOG_UPTO(p) ((1 << (p)) - 1) #define LOG_ALL 0xff -/**************************************************************************** - * Public Type Declarations - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - /**************************************************************************** * Public Function Prototypes ****************************************************************************/ @@ -145,8 +137,60 @@ extern "C" { #endif +/**************************************************************************** + * Name: openlog + * + * Description: + * The openlog() function sets process attributes that affect subsequent + * calls to syslog(). The ident argument is a string that is prepended to + * every message. The logopt argument indicates logging options. Values + * for logopt are constructed by a bitwise-inclusive OR of zero or more of + * the following: + * + * LOG_PID - Log the process ID with each message. This is useful for + * identifying specific processes. + * + * LOG_CONS - Write messages to the system console if they cannot be + * sent to the logging facility. The syslog() function ensures that + * the process does not acquire the console as a controlling terminal + * in the process of writing the message. + * + * LOG_NDELAY - Open the connection to the logging facility immediately. + * Normally the open is delayed until the first message is logged. + * This is useful for programs that need to manage the order in which + * file descriptors are allocated. + * + * LOG_ODELAY - Delay open until syslog() is called. + * + * LOG_NOWAIT - Do not wait for child processes that may have been + * created during the course of logging the message. This option + * should be used by processes that enable notification of child + * termination using SIGCHLD, since syslog() may otherwise block + * waiting for a child whose exit status has already been collected. + * + * The facility argument encodes a default facility to be assigned to all + * messages that do not have an explicit facility already encoded. The + * initial default facility is LOG_USER. + * + * It is not necessary to call openlog() prior to calling syslog(). + * + ****************************************************************************/ + #if 0 /* Not supported */ void openlog(FAR const char *ident, int option, int facility); +#endif + +/**************************************************************************** + * Name: closelog + * + * Description: + * The openlog() and syslog() functions may allocate a file descriptor. + * The closelog() function will close any open file descriptors allocated + * by previous calls to openlog() or syslog(). + * + ****************************************************************************/ + +#if 0 /* Not supported */ void closelog(void); #endif @@ -171,48 +215,6 @@ void closelog(void); int syslog(int priority, FAR const IPTR char *format, ...); int vsyslog(int priority, FAR const IPTR char *src, va_list ap); -/**************************************************************************** - * Name: lowsyslog and lowvsyslog - * - * Description: - * syslog() generates a log message. The priority argument is formed by - * ORing the facility and the level values (see include/syslog.h). The - * remaining arguments are a format, as in printf and any arguments to the - * format. - * - * This is a non-standard, low-level system logging interface. The - * difference between syslog() and lowsyslog() is that the syslog() - * interface writes to the syslog device (usually fd=1, stdout) whereas - * lowsyslog() uses a lower level interface that works even from interrupt - * handlers. - * - * If the platform cannot support lowsyslog, then we will substitute the - * standard syslogging functions. These will, however, probably cause - * problems if called from interrupt handlers, depending upon the nature of - * the underlying syslog device. - * - * The function lowvsyslog() performs the same task as lowsyslog() with - * the difference that it takes a set of arguments which have been - * obtained using the stdarg variable argument list macros. - * - ****************************************************************************/ - -#ifdef CONFIG_ARCH_LOWPUTC - -int lowsyslog(int priority, FAR const IPTR char *format, ...); -int lowvsyslog(int priority, FAR const IPTR char *format, va_list ap); - -#else - -# ifdef CONFIG_CPP_HAVE_VARARGS -# define lowsyslog(p,f,...) syslog(p,f,##__VA_ARGS__) -# else -# define lowsyslog (void) -# endif -# define lowvsyslog(p,f,a) vsyslog(p,f,a) - -#endif - /**************************************************************************** * Name: setlogmask * @@ -225,8 +227,12 @@ int lowvsyslog(int priority, FAR const IPTR char *format, va_list ap); * to a priority p is LOG_MASK(p); LOG_UPTO(p) provides the mask of all * priorities in the above list up to and including p. * + * Per OpenGroup.org "If the maskpri argument is 0, the current log mask + * is not modified." In this implementation, the value zero is permitted + * in order to disable all syslog levels. + * * REVISIT: Per POSIX the syslog mask should be a per-process value but in - * NuttX, the scope of the mask is dependent on the nature of the build. + * NuttX, the scope of the mask is dependent on the nature of the build: * * Flat Build: There is one, global SYSLOG mask that controls all output. * Protected Build: There are two SYSLOG masks. One within the kernel diff --git a/libc/Kconfig b/libc/Kconfig index 276cc502e5d228070e2040aeac9952dd72c114cc..59f41f73eda601dc9677ecb25d628b04bf377910 100644 --- a/libc/Kconfig +++ b/libc/Kconfig @@ -795,6 +795,12 @@ endif # NETDB_DNSCLIENT comment "Non-standard Library Support" +config LIB_CRC64_FAST + bool "Fast CRC64" + default n + ---help--- + Enable the CRC64 lookup table to compute the CRC64 faster. + if BUILD_PROTECTED || BUILD_KERNEL config LIB_USRWORK diff --git a/libc/aio/lio_listio.c b/libc/aio/lio_listio.c index b123a4e7357d3f984ee8cc4259279afe11a10c9e..fa03c38f62b2e65ab593a3d1d7757efa889c71e3 100644 --- a/libc/aio/lio_listio.c +++ b/libc/aio/lio_listio.c @@ -255,7 +255,7 @@ static int lio_sigsetup(FAR struct aiocb * const *list, int nent, sighand = (FAR struct lio_sighand_s *)lib_zalloc(sizeof(struct lio_sighand_s)); if (!sighand) { - fdbg("ERROR: lib_zalloc failed\n"); + ferr("ERROR: lib_zalloc failed\n"); return -ENOMEM; } @@ -296,7 +296,7 @@ static int lio_sigsetup(FAR struct aiocb * const *list, int nent, if (status != OK) { int errcode = get_errno(); - fdbg("ERROR sigprocmask failed: %d\n", errcode); + ferr("ERROR sigprocmask failed: %d\n", errcode); DEBUGASSERT(errcode > 0); return -errcode; } @@ -314,7 +314,7 @@ static int lio_sigsetup(FAR struct aiocb * const *list, int nent, if (status != OK) { int errcode = get_errno(); - fdbg("ERROR sigaction failed: %d\n", errcode); + ferr("ERROR sigaction failed: %d\n", errcode); DEBUGASSERT(errcode > 0); return -errcode; } @@ -379,7 +379,7 @@ static int lio_waitall(FAR struct aiocb * const *list, int nent) */ int errcode = get_errno(); - fdbg("ERROR: sigwaitinfo failed: %d\n", errcode); + ferr("ERROR: sigwaitinfo failed: %d\n", errcode); DEBUGASSERT(errcode > 0); return -errcode; } @@ -600,7 +600,7 @@ int lio_listio(int mode, FAR struct aiocb *const list[], int nent, /* Failed to queue the I/O. Set up the error return. */ errcode = get_errno(); - fdbg("ERROR: aio_read/write failed: %d\n", errcode); + ferr("ERROR: aio_read/write failed: %d\n", errcode); DEBUGASSERT(errcode > 0); aiocbp->aio_result = -errcode; ret = ERROR; @@ -618,7 +618,7 @@ int lio_listio(int mode, FAR struct aiocb *const list[], int nent, { /* Make the invalid operation complete with an error */ - fdbg("ERROR: Unrecognized opcode: %d\n", aiocbp->aio_lio_opcode); + ferr("ERROR: Unrecognized opcode: %d\n", aiocbp->aio_lio_opcode); aiocbp->aio_result = -EINVAL; ret = ERROR; } diff --git a/libc/audio/lib_buffer.c b/libc/audio/lib_buffer.c index af4e719879e649246856b2d7105a7b0b3113aa36..6ad506aa6e58b1b03c72f6349d6d06da3587e83c 100644 --- a/libc/audio/lib_buffer.c +++ b/libc/audio/lib_buffer.c @@ -174,7 +174,7 @@ void apb_free(FAR struct ap_buffer_s *apb) if (refcount <= 1) { - audvdbg("Freeing %p\n", apb); + audinfo("Freeing %p\n", apb); lib_ufree(apb); } } diff --git a/libc/libc.csv b/libc/libc.csv index d93fe22a27d2e33c7ca0525999efa04b7cdb92c6..9a385a215b9b0e9f91c8e628b8887ea63fcaa91d 100644 --- a/libc/libc.csv +++ b/libc/libc.csv @@ -18,7 +18,6 @@ "chdir","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_ENVIRON)","int","FAR const char *" "crc32","crc32.h","","uint32_t","FAR const uint8_t *","size_t" "crc32part","crc32.h","","uint32_t","FAR const uint8_t *","size_t","uint32_t" -"dbg","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG)","int","const char *","..." "dirname","libgen.h","","FAR char","FAR char *" "dq_addafter","queue.h","","void","FAR dq_entry_t *","FAR dq_entry_t *","FAR dq_queue_t *" "dq_addbefore","queue.h","","void","FAR dq_entry_t *","FAR dq_entry_t *","FAR dq_queue_t *" @@ -27,6 +26,7 @@ "dq_rem","queue.h","","void","FAR dq_entry_t *","dq_queue_t *" "dq_remfirst","queue.h","","FAR dq_entry_t","dq_queue_t *" "dq_remlast","queue.h","","FAR dq_entry_t","dq_queue_t *" +"_err","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_ERROR)","int","const char *","..." "ether_ntoa","netinet/ether.h","","FAR char","FAR const struct ether_addr *" "fclose","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *" "fdopen","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","FAR FILE","int","FAR const char *" @@ -64,10 +64,6 @@ "lib_dumpbuffer","debug.h","","void","FAR const char *","FAR const uint8_t *","unsigned int" "lio_listio","aio.h","defined(CONFIG_FS_AIO)","int","int","FAR struct aiocb *const []|FAR struct aiocb *const *","int","FAR struct sigevent *" "llabs","stdlib.h","defined(CONFIG_HAVE_LONG_LONG)","long long int","long long int" -"lldbg","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG) && defined(CONFIG_ARCH_LOWPUTC)","int","const char *","..." -"llvdbg","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_ARCH_LOWPUTC)","int","const char *","..." -"lowsyslog","syslog.h","","int","int","FAR const char *","..." -"lowvsyslog","syslog.h","","int","int","FAR const char *","va_list" "match","nuttx/regex.h","","int","const char *","const char *" "memccpy","string.h","","FAR void","FAR void *","FAR const void *","int c","size_t" "memchr","string.h","","FAR void","FAR const void *","int c","size_t" @@ -168,10 +164,11 @@ "ub16sqr","fixedmath.h","!defined(CONFIG_HAVE_LONG_LONG)","ub16_t","ub16_t" "ungetc","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","int","FAR FILE *" "usleep","unistd.h","!defined(CONFIG_DISABLE_SIGNALS)","int","int","FAR FILE *" -"vdbg","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_VERBOSE)","int","const char *","..." +"_info","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_INFO)","int","const char *","..." "vfprintf","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR FILE *","const char *","va_list" "vprintf","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","int","FAR const char *","va_list" "vsnprintf","stdio.h","","int","FAR char *","size_t","const char *","va_list" "vsprintf","stdio.h","","int","FAR char *","const char *","va_list" "vsscanf","stdio.h","","int","char *","const char *","va_list" "vsyslog","syslog.h","","int","int","FAR const char *","va_list" +"_warn","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG_WARN)","int","const char *","..." diff --git a/libc/math/lib_asin.c b/libc/math/lib_asin.c index 08a2dc9573bd9a56b736f89e42d8dcf6704144d2..2f45a24a1d9ecf142176e2d1806cf0cf82dcde55 100644 --- a/libc/math/lib_asin.c +++ b/libc/math/lib_asin.c @@ -3,7 +3,7 @@ * * This file is a part of NuttX: * - * Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2015-2016 Gregory Nutt. All rights reserved. * Ported by: Darcy Gong * * It derives from the Rhombs OS math library by Nick Johnson which has @@ -55,7 +55,7 @@ double asin(double x) /* Verify that the input value is in the domain of the function */ - if (x < -1.0 || x > 1.0) + if (x < -1.0 || x > 1.0 || isnan(x)) { return NAN; } diff --git a/libc/misc/Make.defs b/libc/misc/Make.defs index 1a9f7911c18a53b62a79100897bd33b50bfee628..e25b6a783ad021460d4d2bccd3d2afbc51fd6ba9 100644 --- a/libc/misc/Make.defs +++ b/libc/misc/Make.defs @@ -75,10 +75,11 @@ endif # Add the miscellaneous C files to the build -CSRCS += lib_match.c lib_crc32.c lib_crc16.c lib_crc8.c lib_dumpbuffer.c +CSRCS += lib_crc64.c lib_crc32.c lib_crc16.c lib_crc8.c +CSRCS += lib_dumpbuffer.c lib_match.c -ifeq ($(CONFIG_DEBUG),y) -CSRCS += lib_dbg.c +ifeq ($(CONFIG_DEBUG_FEATURES),y) +CSRCS += lib_debug.c endif # Keyboard driver encoder/decoder diff --git a/libc/misc/lib_crc16.c b/libc/misc/lib_crc16.c index 76e8dac8a5a80f591d9ddb9dc613503d75378a48..0240e41ab275bc8bd67cfb2a18999f70598722cd 100644 --- a/libc/misc/lib_crc16.c +++ b/libc/misc/lib_crc16.c @@ -114,9 +114,9 @@ uint16_t crc16part(FAR const uint8_t *src, size_t len, uint16_t crc16val) { size_t i; - for (i = 0; i < len; i++) + for (i = 0; i < len; i++) { - crc16val = crc16_tab[((crc16val >> 8) & 255)] ^ (crc16val << 8) ^ src[i]; + crc16val = crc16_tab[((crc16val >> 8) & 0xff) ^ src[i]] ^ (crc16val << 8); } return crc16val; diff --git a/libc/misc/lib_crc32.c b/libc/misc/lib_crc32.c index 40e7c014a03b600dfe501423bb58caf7e79de925..cd6ac0758ad11caac9934c5119e0dafbfa3d2560 100644 --- a/libc/misc/lib_crc32.c +++ b/libc/misc/lib_crc32.c @@ -102,9 +102,9 @@ uint32_t crc32part(FAR const uint8_t *src, size_t len, uint32_t crc32val) { size_t i; - for (i = 0; i < len; i++) + for (i = 0; i < len; i++) { - crc32val = crc32_tab[(crc32val ^ src[i]) & 0xff] ^ (crc32val >> 8); + crc32val = crc32_tab[(crc32val & 0xff) ^ src[i]] ^ (crc32val >> 8); } return crc32val; } diff --git a/libc/misc/lib_crc64.c b/libc/misc/lib_crc64.c new file mode 100644 index 0000000000000000000000000000000000000000..8faf0193d1f28c8f1d5bea2cd53904ed2cca3c0e --- /dev/null +++ b/libc/misc/lib_crc64.c @@ -0,0 +1,301 @@ +/**************************************************************************** + * libc/misc/lib_crc64.c + * + * 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: + * + * 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 + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/**************************************************************************** + * CRC64 table generated with: + * + * #include + * #include + * #include + * + * #define CRC64_POLY ((uint64_t)0x42f0e1eba9ea3693) + * #define CRC64_TABLEN ((size_t)256) + * + * int main(void) + * { + * uint64_t crc64val; + * size_t i; + * size_t j; + * + * printf("static const uint64_t crc64_tab[%zu] =\n", CRC64_TABLEN); + * printf("{\n "); + * + * for (i = 0; i < CRC64_TABLEN; i++) + * { + * crc64val = (uint64_t)i << 56; + * for (j = 0; j < 8; j++) + * { + * if ((crc64val & ((uint64_t)1 << 63)) != 0) + * { + * crc64val = (crc64val << 1) ^ CRC64_POLY; + * } + * else + * { + * crc64val = crc64val << 1; + * } + * } + * + * printf("0x%016"PRIx64, crc64val); + * if (i + 1 >= CRC64_TABLEN) + * { + * printf("\n"); + * } + * else if (i % 2 == 1) + * { + * printf(",\n "); + * } + * else + * { + * printf(", "); + * } + * } + * + * printf("};\n"); + * return 0; + * } + * + ****************************************************************************/ + +#ifdef CONFIG_LIB_CRC64_FAST +static const uint64_t crc64_tab[256] = +{ + 0x0000000000000000, 0x42f0e1eba9ea3693, + 0x85e1c3d753d46d26, 0xc711223cfa3e5bb5, + 0x493366450e42ecdf, 0x0bc387aea7a8da4c, + 0xccd2a5925d9681f9, 0x8e224479f47cb76a, + 0x9266cc8a1c85d9be, 0xd0962d61b56fef2d, + 0x17870f5d4f51b498, 0x5577eeb6e6bb820b, + 0xdb55aacf12c73561, 0x99a54b24bb2d03f2, + 0x5eb4691841135847, 0x1c4488f3e8f96ed4, + 0x663d78ff90e185ef, 0x24cd9914390bb37c, + 0xe3dcbb28c335e8c9, 0xa12c5ac36adfde5a, + 0x2f0e1eba9ea36930, 0x6dfeff5137495fa3, + 0xaaefdd6dcd770416, 0xe81f3c86649d3285, + 0xf45bb4758c645c51, 0xb6ab559e258e6ac2, + 0x71ba77a2dfb03177, 0x334a9649765a07e4, + 0xbd68d2308226b08e, 0xff9833db2bcc861d, + 0x388911e7d1f2dda8, 0x7a79f00c7818eb3b, + 0xcc7af1ff21c30bde, 0x8e8a101488293d4d, + 0x499b3228721766f8, 0x0b6bd3c3dbfd506b, + 0x854997ba2f81e701, 0xc7b97651866bd192, + 0x00a8546d7c558a27, 0x4258b586d5bfbcb4, + 0x5e1c3d753d46d260, 0x1cecdc9e94ace4f3, + 0xdbfdfea26e92bf46, 0x990d1f49c77889d5, + 0x172f5b3033043ebf, 0x55dfbadb9aee082c, + 0x92ce98e760d05399, 0xd03e790cc93a650a, + 0xaa478900b1228e31, 0xe8b768eb18c8b8a2, + 0x2fa64ad7e2f6e317, 0x6d56ab3c4b1cd584, + 0xe374ef45bf6062ee, 0xa1840eae168a547d, + 0x66952c92ecb40fc8, 0x2465cd79455e395b, + 0x3821458aada7578f, 0x7ad1a461044d611c, + 0xbdc0865dfe733aa9, 0xff3067b657990c3a, + 0x711223cfa3e5bb50, 0x33e2c2240a0f8dc3, + 0xf4f3e018f031d676, 0xb60301f359dbe0e5, + 0xda050215ea6c212f, 0x98f5e3fe438617bc, + 0x5fe4c1c2b9b84c09, 0x1d14202910527a9a, + 0x93366450e42ecdf0, 0xd1c685bb4dc4fb63, + 0x16d7a787b7faa0d6, 0x5427466c1e109645, + 0x4863ce9ff6e9f891, 0x0a932f745f03ce02, + 0xcd820d48a53d95b7, 0x8f72eca30cd7a324, + 0x0150a8daf8ab144e, 0x43a04931514122dd, + 0x84b16b0dab7f7968, 0xc6418ae602954ffb, + 0xbc387aea7a8da4c0, 0xfec89b01d3679253, + 0x39d9b93d2959c9e6, 0x7b2958d680b3ff75, + 0xf50b1caf74cf481f, 0xb7fbfd44dd257e8c, + 0x70eadf78271b2539, 0x321a3e938ef113aa, + 0x2e5eb66066087d7e, 0x6cae578bcfe24bed, + 0xabbf75b735dc1058, 0xe94f945c9c3626cb, + 0x676dd025684a91a1, 0x259d31cec1a0a732, + 0xe28c13f23b9efc87, 0xa07cf2199274ca14, + 0x167ff3eacbaf2af1, 0x548f120162451c62, + 0x939e303d987b47d7, 0xd16ed1d631917144, + 0x5f4c95afc5edc62e, 0x1dbc74446c07f0bd, + 0xdaad56789639ab08, 0x985db7933fd39d9b, + 0x84193f60d72af34f, 0xc6e9de8b7ec0c5dc, + 0x01f8fcb784fe9e69, 0x43081d5c2d14a8fa, + 0xcd2a5925d9681f90, 0x8fdab8ce70822903, + 0x48cb9af28abc72b6, 0x0a3b7b1923564425, + 0x70428b155b4eaf1e, 0x32b26afef2a4998d, + 0xf5a348c2089ac238, 0xb753a929a170f4ab, + 0x3971ed50550c43c1, 0x7b810cbbfce67552, + 0xbc902e8706d82ee7, 0xfe60cf6caf321874, + 0xe224479f47cb76a0, 0xa0d4a674ee214033, + 0x67c58448141f1b86, 0x253565a3bdf52d15, + 0xab1721da49899a7f, 0xe9e7c031e063acec, + 0x2ef6e20d1a5df759, 0x6c0603e6b3b7c1ca, + 0xf6fae5c07d3274cd, 0xb40a042bd4d8425e, + 0x731b26172ee619eb, 0x31ebc7fc870c2f78, + 0xbfc9838573709812, 0xfd39626eda9aae81, + 0x3a28405220a4f534, 0x78d8a1b9894ec3a7, + 0x649c294a61b7ad73, 0x266cc8a1c85d9be0, + 0xe17dea9d3263c055, 0xa38d0b769b89f6c6, + 0x2daf4f0f6ff541ac, 0x6f5faee4c61f773f, + 0xa84e8cd83c212c8a, 0xeabe6d3395cb1a19, + 0x90c79d3fedd3f122, 0xd2377cd44439c7b1, + 0x15265ee8be079c04, 0x57d6bf0317edaa97, + 0xd9f4fb7ae3911dfd, 0x9b041a914a7b2b6e, + 0x5c1538adb04570db, 0x1ee5d94619af4648, + 0x02a151b5f156289c, 0x4051b05e58bc1e0f, + 0x87409262a28245ba, 0xc5b073890b687329, + 0x4b9237f0ff14c443, 0x0962d61b56fef2d0, + 0xce73f427acc0a965, 0x8c8315cc052a9ff6, + 0x3a80143f5cf17f13, 0x7870f5d4f51b4980, + 0xbf61d7e80f251235, 0xfd913603a6cf24a6, + 0x73b3727a52b393cc, 0x31439391fb59a55f, + 0xf652b1ad0167feea, 0xb4a25046a88dc879, + 0xa8e6d8b54074a6ad, 0xea16395ee99e903e, + 0x2d071b6213a0cb8b, 0x6ff7fa89ba4afd18, + 0xe1d5bef04e364a72, 0xa3255f1be7dc7ce1, + 0x64347d271de22754, 0x26c49cccb40811c7, + 0x5cbd6cc0cc10fafc, 0x1e4d8d2b65facc6f, + 0xd95caf179fc497da, 0x9bac4efc362ea149, + 0x158e0a85c2521623, 0x577eeb6e6bb820b0, + 0x906fc95291867b05, 0xd29f28b9386c4d96, + 0xcedba04ad0952342, 0x8c2b41a1797f15d1, + 0x4b3a639d83414e64, 0x09ca82762aab78f7, + 0x87e8c60fded7cf9d, 0xc51827e4773df90e, + 0x020905d88d03a2bb, 0x40f9e43324e99428, + 0x2cffe7d5975e55e2, 0x6e0f063e3eb46371, + 0xa91e2402c48a38c4, 0xebeec5e96d600e57, + 0x65cc8190991cb93d, 0x273c607b30f68fae, + 0xe02d4247cac8d41b, 0xa2dda3ac6322e288, + 0xbe992b5f8bdb8c5c, 0xfc69cab42231bacf, + 0x3b78e888d80fe17a, 0x7988096371e5d7e9, + 0xf7aa4d1a85996083, 0xb55aacf12c735610, + 0x724b8ecdd64d0da5, 0x30bb6f267fa73b36, + 0x4ac29f2a07bfd00d, 0x08327ec1ae55e69e, + 0xcf235cfd546bbd2b, 0x8dd3bd16fd818bb8, + 0x03f1f96f09fd3cd2, 0x41011884a0170a41, + 0x86103ab85a2951f4, 0xc4e0db53f3c36767, + 0xd8a453a01b3a09b3, 0x9a54b24bb2d03f20, + 0x5d45907748ee6495, 0x1fb5719ce1045206, + 0x919735e51578e56c, 0xd367d40ebc92d3ff, + 0x1476f63246ac884a, 0x568617d9ef46bed9, + 0xe085162ab69d5e3c, 0xa275f7c11f7768af, + 0x6564d5fde549331a, 0x279434164ca30589, + 0xa9b6706fb8dfb2e3, 0xeb46918411358470, + 0x2c57b3b8eb0bdfc5, 0x6ea7525342e1e956, + 0x72e3daa0aa188782, 0x30133b4b03f2b111, + 0xf7021977f9cceaa4, 0xb5f2f89c5026dc37, + 0x3bd0bce5a45a6b5d, 0x79205d0e0db05dce, + 0xbe317f32f78e067b, 0xfcc19ed95e6430e8, + 0x86b86ed5267cdbd3, 0xc4488f3e8f96ed40, + 0x0359ad0275a8b6f5, 0x41a94ce9dc428066, + 0xcf8b0890283e370c, 0x8d7be97b81d4019f, + 0x4a6acb477bea5a2a, 0x089a2aacd2006cb9, + 0x14dea25f3af9026d, 0x562e43b4931334fe, + 0x913f6188692d6f4b, 0xd3cf8063c0c759d8, + 0x5dedc41a34bbeeb2, 0x1f1d25f19d51d821, + 0xd80c07cd676f8394, 0x9afce626ce85b507 +}; +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: crc64part + * + * Description: + * Continue CRC calculation on a part of the buffer. + * + ****************************************************************************/ + +#ifdef CONFIG_LIB_CRC64_FAST +uint64_t crc64part(FAR const uint8_t *src, size_t len, uint64_t crc64val) +{ + size_t i; + + for (i = 0; i < len; i++) + { + crc64val = crc64_tab[((crc64val >> 56) & 0xff) ^ src[i]] ^ + (crc64val << 8); + } + + return crc64val; +} +#else +uint64_t crc64part(FAR const uint8_t *src, size_t len, uint64_t crc64val) +{ + size_t i; + size_t j; + + for (i = 0; i < len; i++) + { + crc64val ^= (uint64_t)src[i] << 56; + for (j = 0; j < 8; j++) + { + if ((crc64val & ((uint64_t)1 << 63)) != 0) + { + crc64val = (crc64val << 1) ^ CRC64_POLY; + } + else + { + crc64val = crc64val << 1; + } + } + } + + return crc64val; +} +#endif + +/**************************************************************************** + * Name: crc64 + * + * Description: + * Return a 64-bit CRC of the contents of the 'src' buffer, length 'len'. + * + ****************************************************************************/ + +uint64_t crc64(FAR const uint8_t *src, size_t len) +{ + return crc64part(src, len, CRC64_INIT) ^ CRC64_XOROUT; +} diff --git a/libc/misc/lib_crc8.c b/libc/misc/lib_crc8.c index ae3e01d5d75954b18f2c71e9cee35fd172d601d9..4da049c60a7a23cddd4884922b81d9a0824d9993 100644 --- a/libc/misc/lib_crc8.c +++ b/libc/misc/lib_crc8.c @@ -124,13 +124,13 @@ uint8_t crc8part(FAR const uint8_t *src, size_t len, uint8_t crc8val) { size_t i; - crc8val ^= 0xFF; - for (i = 0; i < len; i++) + crc8val ^= 0xff; + for (i = 0; i < len; i++) { crc8val = crc8_tab[crc8val ^ src[i]]; } - return crc8val ^ 0xFF; + return crc8val ^ 0xff; } /************************************************************************************************ diff --git a/libc/misc/lib_dbg.c b/libc/misc/lib_debug.c similarity index 76% rename from libc/misc/lib_dbg.c rename to libc/misc/lib_debug.c index 14044175b79c494de7441bf7fc4e56daa9856d68..098f3cc2dd7ff02cffd1927b95d9ddb0d440eea7 100644 --- a/libc/misc/lib_dbg.c +++ b/libc/misc/lib_debug.c @@ -1,7 +1,7 @@ /**************************************************************************** - * libc/misc/lib_dbg.c + * libc/misc/lib_err.c * - * Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011-2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -46,76 +46,73 @@ #ifndef CONFIG_CPP_HAVE_VARARGS -/**************************************************************************** - * Public Data - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: dbg, lldbg, vdbg + * Name: alert, err, warn, and info * * Description: * If the cross-compiler's pre-processor does not support variable - * length arguments, then these additional APIs will be built. + * length arguments, then these additional APIs will be built. * ****************************************************************************/ -#ifdef CONFIG_DEBUG -int dbg(const char *format, ...) +#ifdef CONFIG_DEBUG_ALERT +int _alert(const char *format, ...) { va_list ap; int ret; va_start(ap, format); - ret = vsyslog(LOG_DEBUG, format, ap); + ret = vsyslog(LOG_EMERG, format, ap); va_end(ap); return ret; } +#endif /* CONFIG_DEBUG_ALERT */ -#ifdef CONFIG_ARCH_LOWPUTC -int lldbg(const char *format, ...) +#ifdef CONFIG_DEBUG_ERROR +int _err(const char *format, ...) { va_list ap; int ret; va_start(ap, format); - ret = lowvsyslog(LOG_DEBUG, format, ap); + ret = vsyslog(LOG_ERR, format, ap); va_end(ap); return ret; } -#endif +#endif /* CONFIG_DEBUG_ERROR */ -#ifdef CONFIG_DEBUG_VERBOSE -int vdbg(const char *format, ...) +#ifdef CONFIG_DEBUG_WARN +int _warn(const char *format, ...) { va_list ap; int ret; va_start(ap, format); - ret = vsyslog(LOG_DEBUG, format, ap); + ret = vsyslog(LOG_WARNING, format, ap); va_end(ap); return ret; } +#endif /* CONFIG_DEBUG_WARN */ -#ifdef CONFIG_ARCH_LOWPUTC -int llvdbg(const char *format, ...) +#ifdef CONFIG_DEBUG_INFO +int _info(const char *format, ...) { va_list ap; int ret; va_start(ap, format); - ret = lowvsyslog(LOG_DEBUG, format, ap); + ret = vsyslog(LOG_INFO, format, ap); va_end(ap); return ret; } -#endif /* CONFIG_ARCH_LOWPUTC */ -#endif /* CONFIG_DEBUG_VERBOSE */ -#endif /* CONFIG_DEBUG */ +#endif /* CONFIG_DEBUG_INFO */ + #endif /* CONFIG_CPP_HAVE_VARARGS */ diff --git a/libc/misc/lib_dumpbuffer.c b/libc/misc/lib_dumpbuffer.c index 23e7e617b8f2cc36348be5cf4634b67b9f108e7d..b1024d00b730d8c33e5d2e79d78381711736779c 100644 --- a/libc/misc/lib_dumpbuffer.c +++ b/libc/misc/lib_dumpbuffer.c @@ -66,52 +66,52 @@ void lib_dumpbuffer(FAR const char *msg, FAR const uint8_t *buffer, unsigned int j; unsigned int k; - lowsyslog(LOG_INFO, "%s (%p):\n", msg, buffer); + syslog(LOG_INFO, "%s (%p):\n", msg, buffer); for (i = 0; i < buflen; i += 32) { - lowsyslog(LOG_INFO, "%04x: ", i); + syslog(LOG_INFO, "%04x: ", i); for (j = 0; j < 32; j++) { k = i + j; if (j == 16) { - lowsyslog(LOG_INFO, " "); + syslog(LOG_INFO, " "); } if (k < buflen) { - lowsyslog(LOG_INFO, "%02x", buffer[k]); + syslog(LOG_INFO, "%02x", buffer[k]); } else { - lowsyslog(LOG_INFO, " "); + syslog(LOG_INFO, " "); } } - lowsyslog(LOG_INFO, " "); + syslog(LOG_INFO, " "); for (j = 0; j < 32; j++) { k = i + j; if (j == 16) { - lowsyslog(LOG_INFO, " "); + syslog(LOG_INFO, " "); } if (k < buflen) { if (buffer[k] >= 0x20 && buffer[k] < 0x7f) { - lowsyslog(LOG_INFO, "%c", buffer[k]); + syslog(LOG_INFO, "%c", buffer[k]); } else { - lowsyslog(LOG_INFO, "."); + syslog(LOG_INFO, "."); } } } - lowsyslog(LOG_INFO, "\n"); + syslog(LOG_INFO, "\n"); } } diff --git a/libc/misc/lib_slcddecode.c b/libc/misc/lib_slcddecode.c index 00055de3607cede34fdad4517e1886c20f24c95a..14d4e5253cbde1d2b1af40b3cc332d5bbd3eb627 100644 --- a/libc/misc/lib_slcddecode.c +++ b/libc/misc/lib_slcddecode.c @@ -52,19 +52,6 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ -/* Configuration ************************************************************/ -/* Define CONFIG_DEBUG_LCD to enable detailed LCD debug output. Verbose - * debug must also be enabled. - */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif - -#ifndef CONFIG_DEBUG_VERBOSE -# undef CONFIG_DEBUG_LCD -#endif /* Indices, counts, helper macros ******************************************/ @@ -89,16 +76,6 @@ #define IS_CODE(a) (((a) >= CODE_MIN) && ((a) <= CODE_MAX)) #define CODE_RETURN(a) (enum slcdcode_e)((a) - 'A') -/* Debug ********************************************************************/ - -#ifdef CONFIG_DEBUG_LCD -# define lcddbg dbg -# define lcdvdbg vdbg -#else -# define lcddbg(x...) -# define lcdvdbg(x...) -#endif - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -264,7 +241,7 @@ enum slcdret_e slcd_decode(FAR struct lib_instream_s *stream, * return the following characters later. */ - lcddbg("Parsing failed: ESC followed by %02x\n", ch); + lcderr("ERROR: Parsing failed: ESC followed by %02x\n", ch); return slcd_reget(state, pch, parg); } @@ -295,7 +272,7 @@ enum slcdret_e slcd_decode(FAR struct lib_instream_s *stream, if (code < (int)FIRST_SLCDCODE || code > (int)LAST_SLCDCODE) { - lcddbg("Parsing failed: ESC-L followed by %02x\n", ch); + lcderr("ERROR: Parsing failed: ESC-L followed by %02x\n", ch); /* Not a special command code.. put the character in the reget * buffer. @@ -338,7 +315,7 @@ enum slcdret_e slcd_decode(FAR struct lib_instream_s *stream, * following characters later. */ - lcddbg("Parsing failed: ESC-L-%c followed by %02x\n", + lcderr("ERROR: Parsing failed: ESC-L-%c followed by %02x\n", state->buf[NDX_COUNTH], ch); return slcd_reget(state, pch, parg); @@ -384,7 +361,7 @@ enum slcdret_e slcd_decode(FAR struct lib_instream_s *stream, * of the characters later. */ - lcddbg("Parsing failed: ESC-L-%c-%c followed by %02x\n", + lcderr("ERROR: Parsing failed: ESC-L-%c-%c followed by %02x\n", state->buf[NDX_COUNTH], state->buf[NDX_COUNTL], ch); return slcd_reget(state, pch, parg); diff --git a/libc/netdb/lib_dnsaddserver.c b/libc/netdb/lib_dnsaddserver.c index ff2436985a886c5211d46e1ff98b0d30b3e8db45..3efbeb9ca0add813c72263b53a73cd94da4ec83d 100644 --- a/libc/netdb/lib_dnsaddserver.c +++ b/libc/netdb/lib_dnsaddserver.c @@ -91,7 +91,7 @@ int dns_add_nameserver(FAR const struct sockaddr *addr, socklen_t addrlen) if (stream == NULL) { int errcode = errno; - ndbg("ERROR: Failed to open %s: %d\n", + nerr("ERROR: Failed to open %s: %d\n", CONFIG_NETDB_RESOLVCONF_PATH, errcode); DEBUGASSERT(errcode > 0); return -errcode; @@ -114,7 +114,7 @@ int dns_add_nameserver(FAR const struct sockaddr *addr, socklen_t addrlen) if (inet_ntop(AF_INET, &in4->sin_addr, addrstr, DNS_MAX_ADDRSTR) == NULL) { ret = -errno; - ndbg("ERROR: inet_ntop failed: %d\n", errcode); + nerr("ERROR: inet_ntop failed: %d\n", errcode); DEBUGASSERT(errcode < 0); goto errout; } @@ -146,7 +146,7 @@ int dns_add_nameserver(FAR const struct sockaddr *addr, socklen_t addrlen) if (inet_ntop(AF_INET6, &in6->sin6_addr, addrstr, DNS_MAX_ADDRSTR) == NULL) { ret = -errno; - ndbg("ERROR: inet_ntop failed: %d\n", errcode); + nerr("ERROR: inet_ntop failed: %d\n", errcode); DEBUGASSERT(errcode < 0); goto errout; } @@ -161,7 +161,7 @@ int dns_add_nameserver(FAR const struct sockaddr *addr, socklen_t addrlen) else #endif { - nvdbg("ERROR: Unsupported family: %d\n", + nerr("ERROR: Unsupported family: %d\n", g_dns_server.addr.sa_family); ret = -ENOSYS; goto errout; @@ -193,7 +193,7 @@ int dns_add_nameserver(FAR const struct sockaddr *addr, socklen_t addrlen) if (status < 0) { ret = -errno; - ndbg("ERROR: fprintf failed: %d\n", errcode); + nerr("ERROR: fprintf failed: %d\n", errcode); DEBUGASSERT(errcode < 0); goto errout; } @@ -242,7 +242,7 @@ int dns_add_nameserver(FAR const struct sockaddr *addr, socklen_t addrlen) else #endif { - nvdbg("ERROR: Unsupported family: %d\n", addr->sa_family); + nerr("ERROR: Unsupported family: %d\n", addr->sa_family); return -ENOSYS; } @@ -250,7 +250,7 @@ int dns_add_nameserver(FAR const struct sockaddr *addr, socklen_t addrlen) if (addrlen < copylen) { - nvdbg("ERROR: Invalid addrlen %ld for family %d\n", + nerr("ERROR: Invalid addrlen %ld for family %d\n", (long)addrlen, addr->sa_family); return -EINVAL; } diff --git a/libc/netdb/lib_dnsbind.c b/libc/netdb/lib_dnsbind.c index c7eae42953ade19336821dc9426287c48b602894..3feec95912711d453bee15e57955affb869c6096 100644 --- a/libc/netdb/lib_dnsbind.c +++ b/libc/netdb/lib_dnsbind.c @@ -91,7 +91,7 @@ int dns_bind(void) if (!dns_initialize()) { - ndbg("ERROR: DNS client has not been initialized\n"); + nerr("ERROR: DNS client has not been initialized\n"); return -EDESTADDRREQ; } @@ -101,7 +101,7 @@ int dns_bind(void) if (sd < 0) { errcode = get_errno(); - ndbg("ERROR: socket() failed: %d\n", errcode); + nerr("ERROR: socket() failed: %d\n", errcode); return -errcode; } @@ -114,7 +114,7 @@ int dns_bind(void) if (ret < 0) { errcode = get_errno(); - ndbg("ERROR: setsockopt() failed: %d\n", errcode); + nerr("ERROR: setsockopt() failed: %d\n", errcode); close(sd); return -errcode; } diff --git a/libc/netdb/lib_dnscache.c b/libc/netdb/lib_dnscache.c index 72979e4066f4a42d3b3ba603169a2dc13ee93549..5a95dc9b1b58fdda582e36daa318544a0e7683f9 100644 --- a/libc/netdb/lib_dnscache.c +++ b/libc/netdb/lib_dnscache.c @@ -207,7 +207,7 @@ int dns_find_answer(FAR const char *hostname, FAR struct sockaddr *addr, if (!dns_initialize()) { - ndbg("ERROR: DNS failed to initialize\n"); + nerr("ERROR: DNS failed to initialize\n"); return -EAGAIN; } diff --git a/libc/netdb/lib_dnsforeach.c b/libc/netdb/lib_dnsforeach.c index 761cc441f38fbe5f8cfe1303a7a5a8d065ee7b23..cc34b1658f299c18313b374e8d8aeb61e55efc41 100644 --- a/libc/netdb/lib_dnsforeach.c +++ b/libc/netdb/lib_dnsforeach.c @@ -105,7 +105,7 @@ int dns_foreach_nameserver(dns_callback_t callback, FAR void *arg) if (stream == NULL) { int errcode = errno; - ndbg("ERROR: Failed to open %s: %d\n", + nerr("ERROR: Failed to open %s: %d\n", CONFIG_NETDB_RESOLVCONF_PATH, errcode); DEBUGASSERT(errcode > 0); return -errcode; @@ -123,7 +123,7 @@ int dns_foreach_nameserver(dns_callback_t callback, FAR void *arg) addrstr = skip_spaces(ptr); if (*addrstr == '\0') { - ndbg("ERROR: Missing address in %s record\n", + nerr("ERROR: Missing address in %s record\n", CONFIG_NETDB_RESOLVCONF_PATH); continue; } @@ -155,7 +155,7 @@ int dns_foreach_nameserver(dns_callback_t callback, FAR void *arg) ptr = strchr(addrstr, ']'); if (ptr == NULL) { - ndbg("ERROR: Missing right bracket after %s\n", line); + nerr("ERROR: Missing right bracket after %s\n", line); continue; } @@ -224,7 +224,7 @@ int dns_foreach_nameserver(dns_callback_t callback, FAR void *arg) else #endif { - ndbg("ERROR: Unrecognized address: %s\n", addrstr) + nerr("ERROR: Unrecognized address: %s\n", addrstr) ret = OK; } #ifdef CONFIG_NET_IPv6 @@ -276,7 +276,7 @@ int dns_foreach_nameserver(dns_callback_t callback, FAR void *arg) else #endif { - nvdbg("ERROR: Unsupported family: %d\n", + nerr("ERROR: Unsupported family: %d\n", g_dns_server.addr.sa_family); ret = -ENOSYS; } diff --git a/libc/netdb/lib_dnsquery.c b/libc/netdb/lib_dnsquery.c index 54a5046fabea960ea2b7ece5971b5526c7facde6..21ed201ba80fb8a0ff7d13a9be38f4b771d6133f 100644 --- a/libc/netdb/lib_dnsquery.c +++ b/libc/netdb/lib_dnsquery.c @@ -2,8 +2,8 @@ * libc/netdb/lib_dnsquery.c * DNS host name to IP address resolver. * - * The uIP DNS resolver functions are used to lookup a hostname and - * map it to a numerical IP address. + * The DNS resolver functions are used to lookup a hostname and map it to a + * numerical IP address. * * Copyright (C) 2007, 2009, 2012, 2014-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -213,7 +213,7 @@ static int dns_send_query(int sd, FAR const char *name, if (ret < 0) { errcode = get_errno(); - ndbg("ERROR: sendto failed: %d\n", errcode); + nerr("ERROR: sendto failed: %d\n", errcode); return -errcode; } @@ -248,16 +248,16 @@ static int dns_recv_response(int sd, FAR struct sockaddr *addr, if (ret < 0) { errcode = get_errno(); - ndbg("ERROR: recv failed: %d\n", errcode); + nerr("ERROR: recv failed: %d\n", errcode); return -errcode; } hdr = (FAR struct dns_header_s *)buffer; - nvdbg("ID %d\n", htons(hdr->id)); - nvdbg("Query %d\n", hdr->flags1 & DNS_FLAG1_RESPONSE); - nvdbg("Error %d\n", hdr->flags2 & DNS_FLAG2_ERR_MASK); - nvdbg("Num questions %d, answers %d, authrr %d, extrarr %d\n", + ninfo("ID %d\n", htons(hdr->id)); + ninfo("Query %d\n", hdr->flags1 & DNS_FLAG1_RESPONSE); + ninfo("Error %d\n", hdr->flags2 & DNS_FLAG2_ERR_MASK); + ninfo("Num questions %d, answers %d, authrr %d, extrarr %d\n", htons(hdr->numquestions), htons(hdr->numanswers), htons(hdr->numauthrr), htons(hdr->numextrarr)); @@ -265,7 +265,7 @@ static int dns_recv_response(int sd, FAR struct sockaddr *addr, if ((hdr->flags2 & DNS_FLAG2_ERR_MASK) != 0) { - ndbg("ERROR: DNS reported error: flags2=%02x\n", hdr->flags2); + nerr("ERROR: DNS reported error: flags2=%02x\n", hdr->flags2); return -EPROTO; } @@ -283,16 +283,16 @@ static int dns_recv_response(int sd, FAR struct sockaddr *addr, * match. */ -#ifdef CONFIG_DEBUG_NET +#if defined(CONFIG_DEBUG_NET) && defined(CONFIG_DEBUG_INFO) { int d = 64; nameptr = dns_parse_name((uint8_t *)buffer + 12) + 4; for (; ; ) { - ndbg("%02X %02X %02X %02X %02X %02X %02X %02X \n", - nameptr[0], nameptr[1], nameptr[2], nameptr[3], - nameptr[4], nameptr[5], nameptr[6], nameptr[7]); + ninfo("%02X %02X %02X %02X %02X %02X %02X %02X \n", + nameptr[0], nameptr[1], nameptr[2], nameptr[3], + nameptr[4], nameptr[5], nameptr[6], nameptr[7]); nameptr += 8; d -= 8; @@ -317,7 +317,7 @@ static int dns_recv_response(int sd, FAR struct sockaddr *addr, /* Compressed name. */ nameptr += 2; - nvdbg("Compressed answer\n"); + ninfo("Compressed answer\n"); } else { @@ -328,7 +328,7 @@ static int dns_recv_response(int sd, FAR struct sockaddr *addr, ans = (FAR struct dns_answer_s *)nameptr; - nvdbg("Answer: type=%04x, class=%04x, ttl=%06x, length=%04x \n", + ninfo("Answer: type=%04x, class=%04x, ttl=%06x, length=%04x \n", htons(ans->type), htons(ans->class), (htons(ans->ttl[0]) << 16) | htons(ans->ttl[1]), htons(ans->len)); @@ -342,7 +342,7 @@ static int dns_recv_response(int sd, FAR struct sockaddr *addr, { ans->u.ipv4.s_addr = *(FAR uint32_t *)(nameptr + 10); - nvdbg("IPv4 address: %d.%d.%d.%d\n", + ninfo("IPv4 address: %d.%d.%d.%d\n", (ans->u.ipv4.s_addr ) & 0xff, (ans->u.ipv4.s_addr >> 8 ) & 0xff, (ans->u.ipv4.s_addr >> 16) & 0xff, @@ -374,7 +374,7 @@ static int dns_recv_response(int sd, FAR struct sockaddr *addr, { memcpy(&ans->u.ipv6.s6_addr, nameptr + 10, 16); - nvdbg("IPv6 address: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", + ninfo("IPv6 address: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", htons(ans->u.ipv6.s6_addr[7]), htons(ans->u.ipv6.s6_addr[6]), htons(ans->u.ipv6.s6_addr[5]), htons(ans->u.ipv6.s6_addr[4]), htons(ans->u.ipv6.s6_addr[3]), htons(ans->u.ipv6.s6_addr[2]), @@ -450,7 +450,7 @@ static int dns_query_callback(FAR void *arg, FAR struct sockaddr *addr, * namserver address in resolv.conf. */ - ndbg("ERROR: Invalid IPv4 address size: %d\n", addrlen); + nerr("ERROR: Invalid IPv4 address size: %d\n", addrlen); query->result = -EINVAL; return 0; } @@ -466,7 +466,7 @@ static int dns_query_callback(FAR void *arg, FAR struct sockaddr *addr, * namserver address in resolv.conf. */ - ndbg("ERROR: IPv4 dns_send_query failed: %d\n", ret); + nerr("ERROR: IPv4 dns_send_query failed: %d\n", ret); query->result = ret; return 0; } @@ -492,7 +492,7 @@ static int dns_query_callback(FAR void *arg, FAR struct sockaddr *addr, /* Handle errors */ - ndbg("ERROR: IPv4 dns_recv_response failed: %d\n", ret); + nerr("ERROR: IPv4 dns_recv_response failed: %d\n", ret); if (ret != -EADDRNOTAVAIL) { @@ -531,7 +531,7 @@ static int dns_query_callback(FAR void *arg, FAR struct sockaddr *addr, * namserver address in resolv.conf. */ - ndbg("ERROR: Invalid IPv6 address size: %d\n", addrlen); + nerr("ERROR: Invalid IPv6 address size: %d\n", addrlen); query->result = -EINVAL; return 0; } @@ -547,7 +547,7 @@ static int dns_query_callback(FAR void *arg, FAR struct sockaddr *addr, * namserver address in resolv.conf. */ - ndbg("ERROR: IPv6 dns_send_query failed: %d\n", ret); + nerr("ERROR: IPv6 dns_send_query failed: %d\n", ret); query->result = ret; return 0; } @@ -573,7 +573,7 @@ static int dns_query_callback(FAR void *arg, FAR struct sockaddr *addr, /* Handle errors */ - ndbg("ERROR: IPv6 dns_recv_response failed: %d\n", ret); + nerr("ERROR: IPv6 dns_recv_response failed: %d\n", ret); if (ret != -EADDRNOTAVAIL) { diff --git a/libc/netdb/lib_gethostbyaddrr.c b/libc/netdb/lib_gethostbyaddrr.c index 6dcb8e8ab1d22e8d4a5b3ba5bf22d705249e8f22..53e91fda34785720e3b3729c65ed2e242a1912f2 100644 --- a/libc/netdb/lib_gethostbyaddrr.c +++ b/libc/netdb/lib_gethostbyaddrr.c @@ -265,7 +265,7 @@ int lib_hostfile_lookup(FAR const void *addr, socklen_t len, int type, { int errcode = errno; - ndbg("ERROR: Failed to open the hosts file %s: %d\n", + nerr("ERROR: Failed to open the hosts file %s: %d\n", CONFIG_NETDB_HOSTCONF_PATH, errcode); UNUSED(errcode); @@ -309,7 +309,7 @@ int lib_hostfile_lookup(FAR const void *addr, socklen_t len, int type, FAR char *hostaddr = host->h_addr; if (hostaddr != NULL) { - nvdbg("Comparing addresses...\n"); + ninfo("Comparing addresses...\n"); if (memcmp(addr, hostaddr, len) == 0) { /* We have a match */ diff --git a/libc/netdb/lib_gethostbynamer.c b/libc/netdb/lib_gethostbynamer.c index 86d46d2054e7cda186943463da94de38f70e1e05..b655211651654d3dc4ff38f287a6bb3689dae675 100644 --- a/libc/netdb/lib_gethostbynamer.c +++ b/libc/netdb/lib_gethostbynamer.c @@ -583,7 +583,7 @@ static int lib_hostfile_lookup(FAR const char *name, FAR struct hostent *host, { int errcode = errno; - ndbg("ERROR: Failed to open the hosts file %s: %d\n", + nerr("ERROR: Failed to open the hosts file %s: %d\n", CONFIG_NETDB_HOSTCONF_PATH, errcode); UNUSED(errcode); @@ -622,7 +622,7 @@ static int lib_hostfile_lookup(FAR const char *name, FAR struct hostent *host, { /* We successfully read the entry */ - nvdbg("Comparing %s to %s\n", name, host->h_name); + ninfo("Comparing %s to %s\n", name, host->h_name); /* Check for a host name match */ diff --git a/libc/pthread/pthread_attrdestroy.c b/libc/pthread/pthread_attrdestroy.c index 04223f0e047d93b5b3b20f5bb15545519326e8f3..7dc431f8085d79c38462e4b4b16d852874d3e723 100644 --- a/libc/pthread/pthread_attrdestroy.c +++ b/libc/pthread/pthread_attrdestroy.c @@ -69,7 +69,7 @@ int pthread_attr_destroy(FAR pthread_attr_t *attr) { int ret; - sdbg("attr=0x%p\n", attr); + linfo("attr=0x%p\n", attr); if (!attr) { @@ -81,7 +81,7 @@ int pthread_attr_destroy(FAR pthread_attr_t *attr) ret = OK; } - sdbg("Returning %d\n", ret); + linfo("Returning %d\n", ret); return ret; } diff --git a/libc/pthread/pthread_attrgetaffinity.c b/libc/pthread/pthread_attrgetaffinity.c index c13ee71d0b5d7bee64bcdfd38c5a64864a413afc..a08f18cb001d3d0acd5392921d990ef4bd7ca3d4 100644 --- a/libc/pthread/pthread_attrgetaffinity.c +++ b/libc/pthread/pthread_attrgetaffinity.c @@ -66,7 +66,7 @@ int pthread_attr_getaffinity_np(FAR const pthread_attr_t *attr, size_t cpusetsize, cpu_set_t *cpuset) { - sdbg("attr=0x%p cpusetsize=%d cpuset=0x%p\n", attr, (int)cpusetsize, cpuset); + linfo("attr=0x%p cpusetsize=%d cpuset=0x%p\n", attr, (int)cpusetsize, cpuset); DEBUGASSERT(attr != NULL && cpusetsize == sizeof(cpu_set_t) && cpuset != NULL); diff --git a/libc/pthread/pthread_attrgetinheritsched.c b/libc/pthread/pthread_attrgetinheritsched.c index c4c2838dae495544c3a2de062b8947167241e999..0f6b42a879bfc6c5dcc5cf63ef7c56aaeadb523b 100644 --- a/libc/pthread/pthread_attrgetinheritsched.c +++ b/libc/pthread/pthread_attrgetinheritsched.c @@ -72,7 +72,7 @@ int pthread_attr_getinheritsched(FAR const pthread_attr_t *attr, { int ret; - sdbg("attr=0x%p inheritsched=0x%p\n", attr, inheritsched); + linfo("attr=0x%p inheritsched=0x%p\n", attr, inheritsched); if (!attr || !inheritsched) { @@ -84,8 +84,6 @@ int pthread_attr_getinheritsched(FAR const pthread_attr_t *attr, ret = OK; } - sdbg("Returning %d\n", ret); + linfo("Returning %d\n", ret); return ret; } - - diff --git a/libc/pthread/pthread_attrgetschedparam.c b/libc/pthread/pthread_attrgetschedparam.c index ddf67a1d661444445936dc4c28de46e0a7e15e93..beea2a595bf0f6f0d3bdd7c857f2b65f0c279553 100644 --- a/libc/pthread/pthread_attrgetschedparam.c +++ b/libc/pthread/pthread_attrgetschedparam.c @@ -70,7 +70,7 @@ int pthread_attr_getschedparam(FAR const pthread_attr_t *attr, { int ret; - sdbg("attr=0x%p param=0x%p\n", attr, param); + linfo("attr=0x%p param=0x%p\n", attr, param); if (!attr || !param) { @@ -90,6 +90,6 @@ int pthread_attr_getschedparam(FAR const pthread_attr_t *attr, ret = OK; } - sdbg("Returning %d\n", ret); + linfo("Returning %d\n", ret); return ret; } diff --git a/libc/pthread/pthread_attrgetschedpolicy.c b/libc/pthread/pthread_attrgetschedpolicy.c index 52a48a9504aadd34532f0c9cb8f3ce9dc13ca315..601b3cebeafc56a777380300f909b2cf73e9965b 100644 --- a/libc/pthread/pthread_attrgetschedpolicy.c +++ b/libc/pthread/pthread_attrgetschedpolicy.c @@ -68,7 +68,7 @@ int pthread_attr_getschedpolicy(FAR const pthread_attr_t *attr, int *policy) { int ret; - sdbg("attr=0x%p policy=0x%p\n", attr, policy); + linfo("attr=0x%p policy=0x%p\n", attr, policy); if (!attr || !policy) { @@ -80,6 +80,6 @@ int pthread_attr_getschedpolicy(FAR const pthread_attr_t *attr, int *policy) ret = OK; } - sdbg("Returning %d\n", ret); + linfo("Returning %d\n", ret); return ret; } diff --git a/libc/pthread/pthread_attrgetstacksize.c b/libc/pthread/pthread_attrgetstacksize.c index ea95ec7328ab30e4b26560019a39120a4f99ce85..130bed7fb669c3591cce2457835fc0a8aca35267 100644 --- a/libc/pthread/pthread_attrgetstacksize.c +++ b/libc/pthread/pthread_attrgetstacksize.c @@ -67,7 +67,7 @@ int pthread_attr_getstacksize(FAR const pthread_attr_t *attr, FAR long *stacksiz { int ret; - sdbg("attr=0x%p stacksize=0x%p\n", attr, stacksize); + linfo("attr=0x%p stacksize=0x%p\n", attr, stacksize); if (!stacksize) { @@ -79,7 +79,7 @@ int pthread_attr_getstacksize(FAR const pthread_attr_t *attr, FAR long *stacksiz ret = OK; } - sdbg("Returning %d\n", ret); + linfo("Returning %d\n", ret); return ret; } diff --git a/libc/pthread/pthread_attrinit.c b/libc/pthread/pthread_attrinit.c index e073fcd89fb925511b6cfba33f098109b49a456d..1d303a05f0288e83bb8098b7dc08ccce69d13199 100644 --- a/libc/pthread/pthread_attrinit.c +++ b/libc/pthread/pthread_attrinit.c @@ -87,7 +87,7 @@ int pthread_attr_init(FAR pthread_attr_t *attr) { int ret = OK; - sdbg("attr=0x%p\n", attr); + linfo("attr=0x%p\n", attr); if (!attr) { ret = ENOMEM; @@ -102,7 +102,7 @@ int pthread_attr_init(FAR pthread_attr_t *attr) memcpy(attr, &g_default_pthread_attr, sizeof(pthread_attr_t)); } - sdbg("Returning %d\n", ret); + linfo("Returning %d\n", ret); return ret; } diff --git a/libc/pthread/pthread_attrsetaffinity.c b/libc/pthread/pthread_attrsetaffinity.c index 0222dfdd7db0d538091773621ff26d61d13c56a1..c8e7c3607dfc8204855f35fce8208d89fb4b7e5b 100644 --- a/libc/pthread/pthread_attrsetaffinity.c +++ b/libc/pthread/pthread_attrsetaffinity.c @@ -68,7 +68,7 @@ int pthread_attr_setaffinity_np(FAR pthread_attr_t *attr, size_t cpusetsize, FAR const cpu_set_t *cpuset) { - sdbg("attr=0x%p cpusetsize=%d cpuset=0x%p\n", attr, (int)cpusetsize, cpuset); + linfo("attr=0x%p cpusetsize=%d cpuset=0x%p\n", attr, (int)cpusetsize, cpuset); DEBUGASSERT(attr != NULL && cpusetsize == sizeof(cpu_set_t) && cpuset != NULL && *cpuset != 0); diff --git a/libc/pthread/pthread_attrsetinheritsched.c b/libc/pthread/pthread_attrsetinheritsched.c index 07506773ad02e6005172ea64a67f4204df54a897..89d29d07bbf72a508eb5534613691a276594858d 100644 --- a/libc/pthread/pthread_attrsetinheritsched.c +++ b/libc/pthread/pthread_attrsetinheritsched.c @@ -73,7 +73,7 @@ int pthread_attr_setinheritsched(FAR pthread_attr_t *attr, { int ret; - sdbg("inheritsched=%d\n", inheritsched); + linfo("inheritsched=%d\n", inheritsched); if (!attr || (inheritsched != PTHREAD_INHERIT_SCHED && @@ -87,7 +87,7 @@ int pthread_attr_setinheritsched(FAR pthread_attr_t *attr, ret = OK; } - sdbg("Returning %d\n", ret); + linfo("Returning %d\n", ret); return ret; } diff --git a/libc/pthread/pthread_attrsetschedparam.c b/libc/pthread/pthread_attrsetschedparam.c index 70fcd11272b116afbc356e91b48bbe71a356aade..602f76eafaf170b383373ff251888cefb11d5af9 100644 --- a/libc/pthread/pthread_attrsetschedparam.c +++ b/libc/pthread/pthread_attrsetschedparam.c @@ -70,7 +70,7 @@ int pthread_attr_setschedparam(FAR pthread_attr_t *attr, { int ret; - sdbg("attr=0x%p param=0x%p\n", attr, param); + linfo("attr=0x%p param=0x%p\n", attr, param); if (!attr || !param) { @@ -90,6 +90,6 @@ int pthread_attr_setschedparam(FAR pthread_attr_t *attr, ret = OK; } - sdbg("Returning %d\n", ret); + linfo("Returning %d\n", ret); return ret; } diff --git a/libc/pthread/pthread_attrsetschedpolicy.c b/libc/pthread/pthread_attrsetschedpolicy.c index 76e774e2506575ad38507a7bcb23104c5c7f5ead..2aa268615787689108dc698c61ec95d597c308c3 100644 --- a/libc/pthread/pthread_attrsetschedpolicy.c +++ b/libc/pthread/pthread_attrsetschedpolicy.c @@ -70,7 +70,7 @@ int pthread_attr_setschedpolicy(FAR pthread_attr_t *attr, int policy) { int ret; - sdbg("attr=0x%p policy=%d\n", attr, policy); + linfo("attr=0x%p policy=%d\n", attr, policy); if (!attr || (policy != SCHED_FIFO @@ -90,6 +90,6 @@ int pthread_attr_setschedpolicy(FAR pthread_attr_t *attr, int policy) ret = OK; } - sdbg("Returning %d\n", ret); + linfo("Returning %d\n", ret); return ret; } diff --git a/libc/pthread/pthread_attrsetstacksize.c b/libc/pthread/pthread_attrsetstacksize.c index 97769acd259bbc8d2fcecd6d24cbf94e002bb369..3ed309981cf6c73b33ad1f8e2adde5999de3e315 100644 --- a/libc/pthread/pthread_attrsetstacksize.c +++ b/libc/pthread/pthread_attrsetstacksize.c @@ -68,7 +68,7 @@ int pthread_attr_setstacksize(FAR pthread_attr_t *attr, long stacksize) { int ret; - sdbg("attr=0x%p stacksize=%ld\n", attr, stacksize); + linfo("attr=0x%p stacksize=%ld\n", attr, stacksize); if (!attr || stacksize < PTHREAD_STACK_MIN) { @@ -80,7 +80,7 @@ int pthread_attr_setstacksize(FAR pthread_attr_t *attr, long stacksize) ret = OK; } - sdbg("Returning %d\n", ret); + linfo("Returning %d\n", ret); return ret; } diff --git a/libc/pthread/pthread_condattrdestroy.c b/libc/pthread/pthread_condattrdestroy.c index 5e25a7d421f79bbfabd5fb20a48bbc646d249cea..d538891f82bbb20a0f3cd238e7c60a71ba08d890 100644 --- a/libc/pthread/pthread_condattrdestroy.c +++ b/libc/pthread/pthread_condattrdestroy.c @@ -67,14 +67,14 @@ int pthread_condattr_destroy(FAR pthread_condattr_t *attr) { int ret = OK; - sdbg("attr=0x%p\n", attr); + linfo("attr=0x%p\n", attr); if (!attr) { ret = EINVAL; } - sdbg("Returning %d\n", ret); + linfo("Returning %d\n", ret); return ret; } diff --git a/libc/pthread/pthread_condattrinit.c b/libc/pthread/pthread_condattrinit.c index 220d972e1001c26fb48fb157236555f69ea21614..64d2d0ac2504134cec619c2408148b756106d55b 100644 --- a/libc/pthread/pthread_condattrinit.c +++ b/libc/pthread/pthread_condattrinit.c @@ -67,7 +67,7 @@ int pthread_condattr_init(FAR pthread_condattr_t *attr) { int ret = OK; - sdbg("attr=0x%p\n", attr); + linfo("attr=0x%p\n", attr); if (!attr) { @@ -78,7 +78,7 @@ int pthread_condattr_init(FAR pthread_condattr_t *attr) *attr = 0; } - sdbg("Returning %d\n", ret); + linfo("Returning %d\n", ret); return ret; } diff --git a/libc/pthread/pthread_mutexattrdestroy.c b/libc/pthread/pthread_mutexattrdestroy.c index 60b50718c1538f000d882113fbfaf4505bd203fd..c20a67bdf77e585f30304e2f4de1506c60c9cb78 100644 --- a/libc/pthread/pthread_mutexattrdestroy.c +++ b/libc/pthread/pthread_mutexattrdestroy.c @@ -68,7 +68,7 @@ int pthread_mutexattr_destroy(FAR pthread_mutexattr_t *attr) { int ret = OK; - sdbg("attr=0x%p\n", attr); + linfo("attr=0x%p\n", attr); if (!attr) { @@ -79,6 +79,6 @@ int pthread_mutexattr_destroy(FAR pthread_mutexattr_t *attr) attr->pshared = 0; } - sdbg("Returning %d\n", ret); + linfo("Returning %d\n", ret); return ret; } diff --git a/libc/pthread/pthread_mutexattrgetpshared.c b/libc/pthread/pthread_mutexattrgetpshared.c index 586a1b203ea121d6abef703a14fba15afc3e90bb..b8f0b77ec458599a6a32102dca93151da52a1bcb 100644 --- a/libc/pthread/pthread_mutexattrgetpshared.c +++ b/libc/pthread/pthread_mutexattrgetpshared.c @@ -68,7 +68,7 @@ int pthread_mutexattr_getpshared(FAR const pthread_mutexattr_t *attr, FAR int *p { int ret = OK; - sdbg("attr=0x%p pshared=0x%p\n", attr, pshared); + linfo("attr=0x%p pshared=0x%p\n", attr, pshared); if (!attr || !pshared) { @@ -79,6 +79,6 @@ int pthread_mutexattr_getpshared(FAR const pthread_mutexattr_t *attr, FAR int *p *pshared = attr->pshared; } - sdbg("Returning %d\n", ret); + linfo("Returning %d\n", ret); return ret; } diff --git a/libc/pthread/pthread_mutexattrinit.c b/libc/pthread/pthread_mutexattrinit.c index b12b8a29940515c8c49ba48f3cc452f036326caa..95f5ba8ab810a8745d11b6d3890574333734cf14 100644 --- a/libc/pthread/pthread_mutexattrinit.c +++ b/libc/pthread/pthread_mutexattrinit.c @@ -67,7 +67,7 @@ int pthread_mutexattr_init(FAR pthread_mutexattr_t *attr) { int ret = OK; - sdbg("attr=0x%p\n", attr); + linfo("attr=0x%p\n", attr); if (!attr) { @@ -81,6 +81,6 @@ int pthread_mutexattr_init(FAR pthread_mutexattr_t *attr) #endif } - sdbg("Returning %d\n", ret); + linfo("Returning %d\n", ret); return ret; } diff --git a/libc/pthread/pthread_mutexattrsetpshared.c b/libc/pthread/pthread_mutexattrsetpshared.c index 82f20092bd34251f561045c1e8624203ef75ff9b..3418521ee8756cf28cc7453236083b79efee61a4 100644 --- a/libc/pthread/pthread_mutexattrsetpshared.c +++ b/libc/pthread/pthread_mutexattrsetpshared.c @@ -68,7 +68,7 @@ int pthread_mutexattr_setpshared(FAR pthread_mutexattr_t *attr, int pshared) { int ret = OK; - sdbg("attr=0x%p pshared=%d\n", attr, pshared); + linfo("attr=0x%p pshared=%d\n", attr, pshared); if (!attr || (pshared != 0 && pshared != 1)) { @@ -79,6 +79,6 @@ int pthread_mutexattr_setpshared(FAR pthread_mutexattr_t *attr, int pshared) attr->pshared = pshared; } - sdbg("Returning %d\n", ret); + linfo("Returning %d\n", ret); return ret; } diff --git a/libc/spawn/Make.defs b/libc/spawn/Make.defs index 7b4fdba4ce6c1febcc63bdffe2a3002890ed4246..3581193f6773535de0ae7c6ea634efc77f6f5b68 100644 --- a/libc/spawn/Make.defs +++ b/libc/spawn/Make.defs @@ -38,7 +38,7 @@ CSRCS += lib_psfa_addaction.c lib_psfa_addclose.c lib_psfa_adddup2.c CSRCS += lib_psfa_addopen.c lib_psfa_destroy.c lib_psfa_init.c -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) CSRCS += lib_psfa_dump.c endif @@ -54,7 +54,7 @@ ifneq ($(CONFIG_BUILD_KERNEL),y) CSRCS += lib_psa_getstacksize.c lib_psa_setstacksize.c endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) CSRCS += lib_psa_dump.c endif diff --git a/libc/spawn/lib_psa_dump.c b/libc/spawn/lib_psa_dump.c index 935de174ed2c06691c8daad7cc9de40da9bccff3..9a66501556f94f538848c703599fbf3b14e2f007 100644 --- a/libc/spawn/lib_psa_dump.c +++ b/libc/spawn/lib_psa_dump.c @@ -39,10 +39,19 @@ #include +/* Output debug info even if debug output is not selected. */ + +#undef CONFIG_DEBUG_ERROR +#undef CONFIG_DEBUG_WARN +#undef CONFIG_DEBUG_INFO +#define CONFIG_DEBUG_ERROR 1 +#define CONFIG_DEBUG_WARN 1 +#define CONFIG_DEBUG_INFO 1 + #include #include -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /**************************************************************************** * Public Functions @@ -64,64 +73,66 @@ void posix_spawnattr_dump(posix_spawnattr_t *attr) { - dbg("attr[%p]:\n", attr); - dbg(" flags: %04x\n", attr->flags); +#ifdef CONFIG_DEBUG_ERROR + _err("attr[%p]:\n", attr); + _err(" flags: %04x\n", attr->flags); if (attr->flags == 0) { - dbg(" None\n"); + _err(" None\n"); } else { if ((attr->flags & POSIX_SPAWN_RESETIDS) != 0) { - dbg(" POSIX_SPAWN_RESETIDS\n"); + _err(" POSIX_SPAWN_RESETIDS\n"); } if ((attr->flags & POSIX_SPAWN_SETPGROUP) != 0) { - dbg(" POSIX_SPAWN_SETPGROUP\n"); + _err(" POSIX_SPAWN_SETPGROUP\n"); } if ((attr->flags & POSIX_SPAWN_SETSCHEDPARAM) != 0) { - dbg(" POSIX_SPAWN_SETSCHEDPARAM\n"); + _err(" POSIX_SPAWN_SETSCHEDPARAM\n"); } if ((attr->flags & POSIX_SPAWN_SETSCHEDULER) != 0) { - dbg(" POSIX_SPAWN_SETSCHEDULER\n"); + _err(" POSIX_SPAWN_SETSCHEDULER\n"); } if ((attr->flags & POSIX_SPAWN_SETSIGDEF) != 0) { - dbg(" POSIX_SPAWN_SETSIGDEF\n"); + _err(" POSIX_SPAWN_SETSIGDEF\n"); } if ((attr->flags & POSIX_SPAWN_SETSIGMASK) != 0) { - dbg(" POSIX_SPAWN_SETSIGMASK\n"); + _err(" POSIX_SPAWN_SETSIGMASK\n"); } } - dbg(" priority: %d\n", attr->priority); + _err(" priority: %d\n", attr->priority); - dbg(" policy: %d\n", attr->policy); + _err(" policy: %d\n", attr->policy); if (attr->policy == SCHED_FIFO) { - dbg(" SCHED_FIFO\n"); + _err(" SCHED_FIFO\n"); } else if (attr->policy == SCHED_RR) { - dbg(" SCHED_RR\n"); + _err(" SCHED_RR\n"); } else { - dbg(" Unrecognized\n"); + _err(" Unrecognized\n"); } #ifndef CONFIG_DISABLE_SIGNALS - dbg(" sigmask: %08x\n", attr->sigmask); + _err(" sigmask: %08x\n", attr->sigmask); #endif +#endif /* CONFIG_DEBUG_ERROR */ } -#endif /* CONFIG_DEBUG */ +#endif /* CONFIG_DEBUG_FEATURES */ diff --git a/libc/spawn/lib_psfa_dump.c b/libc/spawn/lib_psfa_dump.c index 45ca67107a03867c807d68d7fe7dafb20b951084..e9371fec31969a7c200a4411b8ffc7f732634fdc 100644 --- a/libc/spawn/lib_psfa_dump.c +++ b/libc/spawn/lib_psfa_dump.c @@ -39,17 +39,22 @@ #include +/* Output debug info even if debug output is not selected. */ + +#undef CONFIG_DEBUG_ERROR +#undef CONFIG_DEBUG_WARN +#undef CONFIG_DEBUG_INFO +#define CONFIG_DEBUG_ERROR 1 +#define CONFIG_DEBUG_WARN 1 +#define CONFIG_DEBUG_INFO 1 + #include #include #include #include -#ifdef CONFIG_DEBUG - -/**************************************************************************** - * Public Functions - ****************************************************************************/ +#ifdef CONFIG_DEBUG_FEATURES /**************************************************************************** * Public Functions @@ -75,10 +80,10 @@ void posix_spawn_file_actions_dump(FAR posix_spawn_file_actions_t *file_actions) DEBUGASSERT(file_actions); - dbg("File Actions[%p->%p]:\n", file_actions, *file_actions); + _err("File Actions[%p->%p]:\n", file_actions, *file_actions); if (!*file_actions) { - dbg(" NONE\n"); + _err(" NONE\n"); return; } @@ -95,7 +100,7 @@ void posix_spawn_file_actions_dump(FAR posix_spawn_file_actions_t *file_actions) FAR struct spawn_close_file_action_s *action = (FAR struct spawn_close_file_action_s *)entry; - dbg(" CLOSE: fd=%d\n", action->fd); + _err(" CLOSE: fd=%d\n", action->fd); } break; @@ -104,7 +109,7 @@ void posix_spawn_file_actions_dump(FAR posix_spawn_file_actions_t *file_actions) FAR struct spawn_dup2_file_action_s *action = (FAR struct spawn_dup2_file_action_s *)entry; - dbg(" DUP2: %d->%d\n", action->fd1, action->fd2); + _err(" DUP2: %d->%d\n", action->fd1, action->fd2); } break; @@ -113,18 +118,18 @@ void posix_spawn_file_actions_dump(FAR posix_spawn_file_actions_t *file_actions) FAR struct spawn_open_file_action_s *action = (FAR struct spawn_open_file_action_s *)entry; - dbg(" OPEN: path=%s oflags=%04x mode=%04x fd=%d\n", + _err(" OPEN: path=%s oflags=%04x mode=%04x fd=%d\n", action->path, action->oflags, action->mode, action->fd); } break; case SPAWN_FILE_ACTION_NONE: default: - dbg(" ERROR: Unknown action: %d\n", entry->action); + _err(" ERROR: Unknown action: %d\n", entry->action); break; } } } -#endif /* CONFIG_DEBUG */ +#endif /* CONFIG_DEBUG_FEATURES */ diff --git a/libc/stdio/lib_dtoa.c b/libc/stdio/lib_dtoa.c index e3452126d86db3cf7f06613c6fcf9e29b7db2d4c..8ddc3bfd3540843f6e046bb443d046a04de98ce9 100644 --- a/libc/stdio/lib_dtoa.c +++ b/libc/stdio/lib_dtoa.c @@ -556,15 +556,16 @@ static int cmp(Bigint * a, Bigint * b) i = a->wds; j = b->wds; + #ifdef CONFIG_DEBUG_LIB if (i > 1 && !a->x[i - 1]) { - ldbg("cmp called with a->x[a->wds-1] == 0\n"); + lerr("ERROR: cmp called with a->x[a->wds-1] == 0\n"); } if (j > 1 && !b->x[j - 1]) { - ldbg("cmp called with b->x[b->wds-1] == 0\n"); + lerr("ERROR: cmp called with b->x[b->wds-1] == 0\n"); } #endif @@ -722,7 +723,7 @@ static Bigint *d2b(double d, int *e, int *bits) #ifdef CONFIG_DEBUG_LIB if (!z) { - ldbg("Zero passed to d2b\n"); + lerr("ERROR: Zero passed to d2b\n"); } #endif k = lo0bits(&z); @@ -763,7 +764,7 @@ static Bigint *d2b(double d, int *e, int *bits) #ifdef CONFIG_DEBUG_LIB if (!z) { - ldbg("Zero passed to d2b\n"); + lerr("ERROR: Zero passed to d2b\n"); } #endif k = lo0bits(&z); @@ -851,7 +852,7 @@ static int quorem(Bigint * b, Bigint * S) #ifdef CONFIG_DEBUG_LIB if (b->wds > n) { - ldbg("oversize b in quorem\n"); + lerr("ERROR: oversize b in quorem\n"); } #endif if (b->wds < n) @@ -867,7 +868,7 @@ static int quorem(Bigint * b, Bigint * S) #ifdef CONFIG_DEBUG_LIB if (q > 9) { - ldbg("oversized quotient in quorem\n"); + lerr("ERROR: oversized quotient in quorem\n"); } #endif diff --git a/libc/stdio/lib_fclose.c b/libc/stdio/lib_fclose.c index 35301fc6bb45c02c59afd7fddb904b3f094d6bd4..9700b2854f09b776054d0ffc42de6b7b7ddd6f78 100644 --- a/libc/stdio/lib_fclose.c +++ b/libc/stdio/lib_fclose.c @@ -69,7 +69,7 @@ int fclose(FAR FILE *stream) { - int err = EINVAL; + int errcode = EINVAL; int ret = ERROR; int status; @@ -89,7 +89,7 @@ int fclose(FAR FILE *stream) if ((stream->fs_oflags & O_WROK) != 0) { ret = lib_fflush(stream, true); - err = errno; + errcode = errno; } /* Close the underlying file descriptor and save the return status */ @@ -103,7 +103,7 @@ int fclose(FAR FILE *stream) if (ret == OK) { ret = status; - err = errno; + errcode = errno; } } @@ -143,7 +143,7 @@ int fclose(FAR FILE *stream) if (ret != OK) { - set_errno(err); + set_errno(errcode); return EOF; } diff --git a/libc/stdio/lib_fgetpos.c b/libc/stdio/lib_fgetpos.c index ba4fa478b27e7527c07fe4fe3e60ef7bdbe25aa3..deca7e4455006a15b835a5c2d70ec421f34daac3 100644 --- a/libc/stdio/lib_fgetpos.c +++ b/libc/stdio/lib_fgetpos.c @@ -104,7 +104,7 @@ int fgetpos(FAR FILE *stream, FAR fpos_t *pos) { long position; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!stream || !pos) { set_errno(EINVAL); diff --git a/libc/stdio/lib_fprintf.c b/libc/stdio/lib_fprintf.c index 191dc2e34a41602f13ee5d3c70ccf786d3bcc31c..bb744c4698bf91acd9a8e7f57ac16b6625b256f6 100644 --- a/libc/stdio/lib_fprintf.c +++ b/libc/stdio/lib_fprintf.c @@ -33,44 +33,12 @@ * ****************************************************************************/ -/**************************************************************************** - * Compilation Switches - ****************************************************************************/ - /**************************************************************************** * Included Files ****************************************************************************/ #include -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Type Declarations - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Public Constant Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Constant Data - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/libc/stdio/lib_fputs.c b/libc/stdio/lib_fputs.c index 4b47a0462881483b199f56acddee5278ff28adec..1d66c269d354f79e04c32efcfffe49998a3b68f1 100644 --- a/libc/stdio/lib_fputs.c +++ b/libc/stdio/lib_fputs.c @@ -104,7 +104,7 @@ int fputs(FAR const char *s, FAR FILE *stream) /* Make sure that a string was provided. */ -#ifdef CONFIG_DEBUG /* Most parameter checking is disabled if DEBUG is off */ +#ifdef CONFIG_DEBUG_FEATURES /* Most parameter checking is disabled if DEBUG is off */ if (!s) { set_errno(EINVAL); @@ -149,7 +149,7 @@ int fputs(FAR const char *s, FAR FILE *stream) /* Make sure that a string was provided. */ -#ifdef CONFIG_DEBUG /* Most parameter checking is disabled if DEBUG is off */ +#ifdef CONFIG_DEBUG_FEATURES /* Most parameter checking is disabled if DEBUG is off */ if (!s) { set_errno(EINVAL); @@ -192,7 +192,7 @@ int fputs(FAR const char *s, FAR FILE *stream) /* Make sure that a string was provided. */ -#ifdef CONFIG_DEBUG /* Most parameter checking is disabled if DEBUG is off */ +#ifdef CONFIG_DEBUG_FEATURES /* Most parameter checking is disabled if DEBUG is off */ if (!s) { set_errno(EINVAL); diff --git a/libc/stdio/lib_fsetpos.c b/libc/stdio/lib_fsetpos.c index 18843cb6f7eb23a99ced3e91e5c34721e44a3e56..faa7324cde184a8b96205e343ee58549fc167721 100644 --- a/libc/stdio/lib_fsetpos.c +++ b/libc/stdio/lib_fsetpos.c @@ -104,7 +104,7 @@ int fsetpos(FAR FILE *stream, FAR fpos_t *pos) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!stream || !pos) { set_errno(EINVAL); diff --git a/libc/stdio/lib_printf.c b/libc/stdio/lib_printf.c index 5f1096a3a2f7df75b432eeaf144d402d3937ed9d..b760abb4bb99e2c4a83f813c5cde1929831fd3c8 100644 --- a/libc/stdio/lib_printf.c +++ b/libc/stdio/lib_printf.c @@ -1,7 +1,7 @@ /**************************************************************************** * libc/stdio/lib_printf.c * - * 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 @@ -60,8 +60,6 @@ int printf(FAR const IPTR char *fmt, ...) ret = vfprintf(stdout, fmt, ap); #elif CONFIG_NFILE_DESCRIPTORS > 0 ret = vsyslog(LOG_INFO, fmt, ap); -#elif defined(CONFIG_ARCH_LOWPUTC) - ret = lowvsyslog(LOG_INFO, fmt, ap); #else # ifdef CONFIG_CPP_HAVE_WARNING # warning "printf has no data sink" diff --git a/libc/stdio/lib_sscanf.c b/libc/stdio/lib_sscanf.c index c54fb3f1458a4ffb0868a5f8fed17742c3c9b21c..cc6714530666e180557388d84879c0050021334c 100644 --- a/libc/stdio/lib_sscanf.c +++ b/libc/stdio/lib_sscanf.c @@ -193,7 +193,7 @@ int vsscanf(FAR const char *buf, FAR const char *fmt, va_list ap) int base = 10; char tmp[MAXLN]; - lvdbg("vsscanf: buf=\"%s\" fmt=\"%s\"\n", buf, fmt); + linfo("vsscanf: buf=\"%s\" fmt=\"%s\"\n", buf, fmt); /* Remember the start of the input buffer. We will need this for %n * calculations. @@ -226,14 +226,14 @@ int vsscanf(FAR const char *buf, FAR const char *fmt, va_list ap) if (*fmt == '%') { - lvdbg("vsscanf: Specifier found\n"); + linfo("vsscanf: Specifier found\n"); /* Check for qualifiers on the conversion specifier */ fmt++; for (; *fmt; fmt++) { - lvdbg("vsscanf: Processing %c\n", *fmt); + linfo("vsscanf: Processing %c\n", *fmt); if (strchr("dibouxcsefgn%", *fmt)) { @@ -264,7 +264,7 @@ int vsscanf(FAR const char *buf, FAR const char *fmt, va_list ap) if (*fmt == 's') { - lvdbg("vsscanf: Performing string conversion\n"); + linfo("vsscanf: Performing string conversion\n"); /* Get a pointer to the char * value. We need to do this even * if we have reached the end of the input data in order to @@ -320,7 +320,7 @@ int vsscanf(FAR const char *buf, FAR const char *fmt, va_list ap) else if (*fmt == 'c') { - lvdbg("vsscanf: Performing character conversion\n"); + linfo("vsscanf: Performing character conversion\n"); /* Get a pointer to the char * value. We need to do this even * if we have reached the end of the input data in order to @@ -374,7 +374,7 @@ int vsscanf(FAR const char *buf, FAR const char *fmt, va_list ap) FAR int *pint = NULL; bool sign; - lvdbg("vsscanf: Performing integer conversion\n"); + linfo("vsscanf: Performing integer conversion\n"); /* Get a pointer to the integer value. We need to do this even * if we have reached the end of the input data in order to @@ -461,7 +461,7 @@ int vsscanf(FAR const char *buf, FAR const char *fmt, va_list ap) strncpy(tmp, buf, width); tmp[width] = '\0'; - lvdbg("vsscanf: tmp[]=\"%s\"\n", tmp); + linfo("vsscanf: tmp[]=\"%s\"\n", tmp); /* Perform the integer conversion */ /* Preserve the errno value */ @@ -497,13 +497,13 @@ int vsscanf(FAR const char *buf, FAR const char *fmt, va_list ap) if (lflag) { - lvdbg("vsscanf: Return %ld to 0x%p\n", + linfo("vsscanf: Return %ld to 0x%p\n", tmplong, plong); *plong = tmplong; } else { - lvdbg("vsscanf: Return %ld to 0x%p\n", + linfo("vsscanf: Return %ld to 0x%p\n", tmplong, pint); *pint = (int)tmplong; } @@ -524,7 +524,7 @@ int vsscanf(FAR const char *buf, FAR const char *fmt, va_list ap) #endif FAR float *pf = NULL; - lvdbg("vsscanf: Performing floating point conversion\n"); + linfo("vsscanf: Performing floating point conversion\n"); /* Get a pointer to the double value. We need to do this even * if we have reached the end of the input data in order to @@ -580,7 +580,7 @@ int vsscanf(FAR const char *buf, FAR const char *fmt, va_list ap) tmp[width] = '\0'; buf += width; - lvdbg("vsscanf: tmp[]=\"%s\"\n", tmp); + linfo("vsscanf: tmp[]=\"%s\"\n", tmp); /* Perform the floating point conversion */ @@ -614,13 +614,13 @@ int vsscanf(FAR const char *buf, FAR const char *fmt, va_list ap) #ifdef CONFIG_HAVE_DOUBLE if (lflag) { - lvdbg("vsscanf: Return %f to %p\n", dvalue, pd); + linfo("vsscanf: Return %f to %p\n", dvalue, pd); *pd = dvalue; } else #endif { - lvdbg("vsscanf: Return %f to %p\n", dvalue, pf); + linfo("vsscanf: Return %f to %p\n", dvalue, pf); *pf = (float)dvalue; } @@ -634,7 +634,7 @@ int vsscanf(FAR const char *buf, FAR const char *fmt, va_list ap) else if (*fmt == 'n') { - lvdbg("vsscanf: Performing character count\n"); + linfo("vsscanf: Performing character count\n"); if (!noassign) { diff --git a/libc/stdio/lib_wrflush.c b/libc/stdio/lib_wrflush.c index b07c48b2904e43e3acbd37d2970c265295060054..ad562f128dc9da0f041a0e6b8a2564c33eed4d82 100644 --- a/libc/stdio/lib_wrflush.c +++ b/libc/stdio/lib_wrflush.c @@ -91,7 +91,7 @@ int lib_wrflush(FAR FILE *stream) #if CONFIG_STDIO_BUFFER_SIZE > 0 /* Verify that we were passed a valid (i.e., non-NULL) stream */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!stream) { return -EINVAL; @@ -122,7 +122,7 @@ int lib_wrflush(FAR FILE *stream) #else /* Verify that we were passed a valid (i.e., non-NULL) stream */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!stream) { return -EINVAL; diff --git a/libc/stdlib/lib_checkbase.c b/libc/stdlib/lib_checkbase.c index 05abe7b8968bbb6fdfd46dc1786bf73005ee8378..a94140e81ec02dbc762694f63eae9dd94e6abb7a 100644 --- a/libc/stdlib/lib_checkbase.c +++ b/libc/stdlib/lib_checkbase.c @@ -1,7 +1,7 @@ /**************************************************************************** * libc/stdlib/lib_checkbase.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 * * Redistribution and use in source and binary forms, with or without @@ -44,10 +44,6 @@ #include "libc.h" -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -63,11 +59,16 @@ * Assumptions: * *ptr points to the first, non-whitespace character in the string. * + * Returns: + * - if base is valid, the actual base to use, and pptr is updated to point + * at the first digit. + * - if base is invalid (<2 or >36), return -1. + * ****************************************************************************/ int lib_checkbase(int base, FAR const char **pptr) { - const char *ptr = *pptr; + FAR const char *ptr = *pptr; /* Check for unspecified base */ @@ -107,9 +108,15 @@ int lib_checkbase(int base, FAR const char **pptr) } } + /* Check for incorrect bases. */ + + else if (base < 2 || base > 26) + { + return -1; /* Means incorrect base */ + } + /* Return the updated pointer and base */ *pptr = ptr; return base; } - diff --git a/libc/stdlib/lib_strtoul.c b/libc/stdlib/lib_strtoul.c index 3dfe5a5e60b0acb20ee41ea476a82937003caaa2..30ffbd31c3fc383913a9eab52d7e99f626b812bf 100644 --- a/libc/stdlib/lib_strtoul.c +++ b/libc/stdlib/lib_strtoul.c @@ -1,7 +1,7 @@ /**************************************************************************** * /libc/stdlib/lib_strtoul.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 * * Redistribution and use in source and binary forms, with or without @@ -40,13 +40,10 @@ #include #include +#include #include "libc.h" -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -59,13 +56,18 @@ * nptr to a long unsigned integer value according to the given base, which * must be between 2 and 36 inclusive, or be the special value 0. * - * Warning: does not check for integer overflow! + * Returns: + * - The converted value, if the base and number are valid + * - 0 if an error occurs, and seterrno to: + * * EINVAL if base < 2 or base > 36 + * * ERANGE if the number cannot be represented using unsigned long * ****************************************************************************/ unsigned long strtoul(FAR const char *nptr, FAR char **endptr, int base) { unsigned long accum = 0; + unsigned long prev; int value; if (nptr) @@ -74,16 +76,32 @@ unsigned long strtoul(FAR const char *nptr, FAR char **endptr, int base) lib_skipspace(&nptr); - /* Check for unspecified base */ + /* Check for unspecified or incorrect base */ base = lib_checkbase(base, &nptr); + if (base < 0) + { + set_errno(EINVAL); + return 0; + } + /* Accumulate each "digit" */ while (lib_isbasedigit(*nptr, base, &value)) { - accum = accum*base + value; - nptr++; + prev = accum; + accum = accum*base + value; + nptr++; + + /* Check for overflow */ + + if (accum < prev) + { + set_errno(ERANGE); + accum = 0; + break; + } } /* Return the final pointer to the unused value */ diff --git a/libc/stdlib/lib_strtoull.c b/libc/stdlib/lib_strtoull.c index 82adc0450ac2ad7fb0d0f3f508aeb65dbb9752df..fab588891ba91f1beebe8089bc424722a184a81a 100644 --- a/libc/stdlib/lib_strtoull.c +++ b/libc/stdlib/lib_strtoull.c @@ -1,7 +1,7 @@ /**************************************************************************** * /libc/stdlib/lib_strtoull.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 @@ -41,15 +41,12 @@ #include #include +#include #include "libc.h" #ifdef CONFIG_HAVE_LONG_LONG -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -62,11 +59,18 @@ * nptr to a long unsigned integer value according to the given base, which * must be between 2 and 36 inclusive, or be the special value 0. * + * Returns: + * - The converted value, if the base and number are valid + * - 0 if an error occurs, and seterrno to: + * * EINVAL if base < 2 or base > 36 + * * ERANGE if the number cannot be represented using unsigned long long + * ****************************************************************************/ unsigned long long strtoull(FAR const char *nptr, FAR char **endptr, int base) { unsigned long long accum = 0; + unsigned long long prev; int value; if (nptr) @@ -79,12 +83,28 @@ unsigned long long strtoull(FAR const char *nptr, FAR char **endptr, int base) base = lib_checkbase(base, &nptr); + if (base < 0) + { + set_errno(EINVAL); + return 0; + } + /* Accumulate each "digit" */ while (lib_isbasedigit(*nptr, base, &value)) { - accum = accum*base + value; - nptr++; + prev = accum; + accum = accum*base + value; + nptr++; + + /* Check for overflow */ + + if (accum < prev) + { + set_errno(ERANGE); + accum = 0; + break; + } } /* Return the final pointer to the unused value */ @@ -94,7 +114,8 @@ unsigned long long strtoull(FAR const char *nptr, FAR char **endptr, int base) *endptr = (char *)nptr; } } - return accum; + + return accum; } #endif diff --git a/libc/string/lib_strpbrk.c b/libc/string/lib_strpbrk.c index 4170926bb6843c723d98814b924e370b3f39c523..f01b5a148b3a0b68a02b3200242d93bf0860f9d8 100644 --- a/libc/string/lib_strpbrk.c +++ b/libc/string/lib_strpbrk.c @@ -49,7 +49,7 @@ FAR char *strpbrk(FAR const char *str, FAR const char *charset) { /* Sanity checking */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!str || !charset) { return NULL; diff --git a/libc/syslog/Make.defs b/libc/syslog/Make.defs index 7ebdc907cf5b50a4e66a4e4c30f6014ecb65340d..b1d6b093043626aa843850315a825e2a66aaa63c 100644 --- a/libc/syslog/Make.defs +++ b/libc/syslog/Make.defs @@ -35,11 +35,7 @@ # Add the internal C files to the build -CSRCS += lib_syslog.c lib_lowsyslog.c lib_setlogmask.c - -ifeq ($(CONFIG_SYSLOG),y) -CSRCS += lib_syslogstream.c -endif +CSRCS += lib_syslog.c lib_setlogmask.c # Add the syslog directory to the build diff --git a/libc/syslog/lib_setlogmask.c b/libc/syslog/lib_setlogmask.c index 84352411bd97bb8811601cb2c8f2e0bfe63ef6d4..1d91d405558c8eab33cedbbd6c92e64069984722 100644 --- a/libc/syslog/lib_setlogmask.c +++ b/libc/syslog/lib_setlogmask.c @@ -70,8 +70,12 @@ uint8_t g_syslog_mask = LOG_ALL; * to a priority p is LOG_MASK(p); LOG_UPTO(p) provides the mask of all * priorities in the above list up to and including p. * + * Per OpenGroup.org "If the maskpri argument is 0, the current log mask + * is not modified." In this implementation, the value zero is permitted + * in order to disable all syslog levels. + * * REVISIT: Per POSIX the syslog mask should be a per-process value but in - * NuttX, the scope of the mask is dependent on the nature of the build. + * NuttX, the scope of the mask is dependent on the nature of the build: * * Flat Build: There is one, global SYSLOG mask that controls all output. * Protected Build: There are two SYSLOG masks. One within the kernel diff --git a/libc/syslog/lib_syslog.c b/libc/syslog/lib_syslog.c index f6e35b35b563309565c49af0fdab22766bb872a9..408ffc100156c3fddee50a8b6811a0c0fa8eae48 100644 --- a/libc/syslog/lib_syslog.c +++ b/libc/syslog/lib_syslog.c @@ -39,111 +39,12 @@ #include -#include #include -#include -#include -#include +#include #include "syslog/syslog.h" -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: vsyslog_internal - * - * Description: - * This is the internal implementation of vsyslog (see the description of - * syslog and vsyslog below) - * - ****************************************************************************/ - -static inline int vsyslog_internal(FAR const IPTR char *fmt, va_list ap) -{ -#if defined(CONFIG_SYSLOG) - struct lib_outstream_s stream; -#elif CONFIG_NFILE_DESCRIPTORS > 0 - struct lib_rawoutstream_s stream; -#elif defined(CONFIG_ARCH_LOWPUTC) - struct lib_outstream_s stream; -#endif - -#if defined(CONFIG_SYSLOG_TIMESTAMP) - struct timespec ts; - - /* Get the current time. Since debug output may be generated very early - * in the start-up sequence, hardware timer support may not yet be - * available. - */ - - if (!OSINIT_HW_READY() || clock_systimespec(&ts) < 0) - { - /* Timer hardware is not available, or clock_systimespec failed */ - - ts.tv_sec = 0; - ts.tv_nsec = 0; - } -#endif - -#if defined(CONFIG_SYSLOG) - /* Wrap the low-level output in a stream object and let lib_vsprintf - * do the work. - */ - - lib_syslogstream((FAR struct lib_outstream_s *)&stream); - -#if defined(CONFIG_SYSLOG_TIMESTAMP) - /* Pre-pend the message with the current time, if available */ - - (void)lib_sprintf((FAR struct lib_outstream_s *)&stream, - "[%6d.%06d]", ts.tv_sec, ts.tv_nsec/1000); - -#endif - - return lib_vsprintf((FAR struct lib_outstream_s *)&stream, fmt, ap); - -#elif CONFIG_NFILE_DESCRIPTORS > 0 - /* Wrap the stdout in a stream object and let lib_vsprintf - * do the work. - */ - - lib_rawoutstream(&stream, 1); - -#if defined(CONFIG_SYSLOG_TIMESTAMP) - /* Pre-pend the message with the current time, if available */ - - (void)lib_sprintf((FAR struct lib_outstream_s *)&stream, - "[%6d.%06d]", ts.tv_sec, ts.tv_nsec/1000); -#endif - - return lib_vsprintf(&stream.public, fmt, ap); - -#elif defined(CONFIG_ARCH_LOWPUTC) - /* Wrap the low-level output in a stream object and let lib_vsprintf - * do the work. - */ - - lib_lowoutstream((FAR struct lib_outstream_s *)&stream); - -#if defined(CONFIG_SYSLOG_TIMESTAMP) - /* Pre-pend the message with the current time, if available */ - - (void)lib_sprintf((FAR struct lib_outstream_s *)&stream, - "[%6d.%06d]", ts.tv_sec, ts.tv_nsec/1000); -#endif - - return lib_vsprintf((FAR struct lib_outstream_s *)&stream, fmt, ap); - -#else /* CONFIG_SYSLOG */ - - return 0; - -#endif /* CONFIG_SYSLOG */ -} - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -166,9 +67,14 @@ int vsyslog(int priority, FAR const IPTR char *fmt, va_list ap) if ((g_syslog_mask & LOG_MASK(priority)) != 0) { - /* Yes.. let vsylog_internal do the deed */ - - ret = vsyslog_internal(fmt, ap); + /* Yes.. Perform the _vsyslog system call. + * + * NOTE: The va_list parameter is passed by reference. That is + * because the va_list is a structure in some compilers and passing + * of structures in the NuttX sycalls does not work. + */ + + ret = _vsyslog(priority, fmt, &ap); } return ret; diff --git a/libc/syslog/syslog.h b/libc/syslog/syslog.h index 3188d3f2d63d14e3349aad12cfb53fba71ec044a..31ad268770e28ba862615085aca6722fde56bbae 100644 --- a/libc/syslog/syslog.h +++ b/libc/syslog/syslog.h @@ -41,7 +41,6 @@ ****************************************************************************/ #include -#include /**************************************************************************** * Public Data diff --git a/libc/time/lib_gettimeofday.c b/libc/time/lib_gettimeofday.c index d1315b1288860c39a11c4447408a41b1bc589eec..6a1f01d16edcf0543e39492e79209012df11e9c7 100644 --- a/libc/time/lib_gettimeofday.c +++ b/libc/time/lib_gettimeofday.c @@ -75,7 +75,7 @@ int gettimeofday(FAR struct timeval *tv, FAR struct timezone *tz) struct timespec ts; int ret; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!tv) { set_errno(EINVAL); diff --git a/libc/time/lib_gmtimer.c b/libc/time/lib_gmtimer.c index d6b224cfcc04cd323a95ad19964a307217d91fb3..a9624747c9815e6ad4e3b1781d90fc582b3d2728 100644 --- a/libc/time/lib_gmtimer.c +++ b/libc/time/lib_gmtimer.c @@ -317,7 +317,7 @@ FAR struct tm *gmtime_r(FAR const time_t *timer, FAR struct tm *result) /* Get the seconds since the EPOCH */ epoch = *timer; - sdbg("timer=%d\n", (int)epoch); + linfo("timer=%d\n", (int)epoch); /* Convert to days, hours, minutes, and seconds since the EPOCH */ @@ -332,15 +332,15 @@ FAR struct tm *gmtime_r(FAR const time_t *timer, FAR struct tm *result) sec = epoch; - sdbg("hour=%d min=%d sec=%d\n", - (int)hour, (int)min, (int)sec); + linfo("hour=%d min=%d sec=%d\n", + (int)hour, (int)min, (int)sec); /* Convert the days since the EPOCH to calendar day */ clock_utc2calendar(jdn, &year, &month, &day); - sdbg("jdn=%d year=%d month=%d day=%d\n", - (int)jdn, (int)year, (int)month, (int)day); + linfo("jdn=%d year=%d month=%d day=%d\n", + (int)jdn, (int)year, (int)month, (int)day); /* Then return the struct tm contents */ diff --git a/libc/time/lib_mktime.c b/libc/time/lib_mktime.c index 5798ce530992216d89d45d002a910f3dee901905..160e10fcf10b65be510a9b29e1e3433cc513b5ac 100644 --- a/libc/time/lib_mktime.c +++ b/libc/time/lib_mktime.c @@ -94,14 +94,14 @@ time_t mktime(FAR struct tm *tp) */ jdn = clock_calendar2utc(tp->tm_year + 1900, tp->tm_mon, tp->tm_mday); - sdbg("jdn=%d tm_year=%d tm_mon=%d tm_mday=%d\n", - (int)jdn, tp->tm_year, tp->tm_mon, tp->tm_mday); + linfo("jdn=%d tm_year=%d tm_mon=%d tm_mday=%d\n", + (int)jdn, tp->tm_year, tp->tm_mon, tp->tm_mday); /* Return the seconds into the julian day. */ ret = ((jdn * 24 + tp->tm_hour) * 60 + tp->tm_min) * 60 + tp->tm_sec; - sdbg("ret=%d tm_hour=%d tm_min=%d tm_sec=%d\n", - (int)ret, tp->tm_hour, tp->tm_min, tp->tm_sec); + linfo("ret=%d tm_hour=%d tm_min=%d tm_sec=%d\n", + (int)ret, tp->tm_hour, tp->tm_min, tp->tm_sec); return ret; } diff --git a/libc/time/lib_settimeofday.c b/libc/time/lib_settimeofday.c index ea404b7e0397b96da280274ced858c914287bd68..a36f32911bdf97266c4bafa699841556e58d79b5 100644 --- a/libc/time/lib_settimeofday.c +++ b/libc/time/lib_settimeofday.c @@ -73,7 +73,7 @@ int settimeofday(FAR const struct timeval *tv, FAR struct timezone *tz) { struct timespec ts; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!tv || tv->tv_usec >= USEC_PER_SEC) { set_errno(EINVAL); diff --git a/libc/unistd/lib_chdir.c b/libc/unistd/lib_chdir.c index 4780a6b72e927d41b2eb80a4b6d48353ca6d3803..16786a0f317817a74eb957ef89866a30fc7f0396 100644 --- a/libc/unistd/lib_chdir.c +++ b/libc/unistd/lib_chdir.c @@ -119,14 +119,14 @@ int chdir(FAR const char *path) struct stat buf; char *oldpwd; char *alloc; - int err; + int errcode; int ret; /* Verify the input parameters */ if (!path) { - err = ENOENT; + errcode = ENOENT; goto errout; } @@ -135,7 +135,7 @@ int chdir(FAR const char *path) ret = stat(path, &buf); if (ret != 0) { - err = ENOENT; + errcode = ENOENT; goto errout; } @@ -143,7 +143,7 @@ int chdir(FAR const char *path) if (!S_ISDIR(buf.st_mode)) { - err = ENOTDIR; + errcode = ENOTDIR; goto errout; } @@ -173,7 +173,7 @@ int chdir(FAR const char *path) return OK; errout: - set_errno(err); + set_errno(errcode); return ERROR; } #endif /* CONFIG_NFILE_DESCRIPTORS && !CONFIG_DISABLE_ENVIRON */ diff --git a/libc/unistd/lib_getcwd.c b/libc/unistd/lib_getcwd.c index 851d380fb6c864401df7f47fe140c38b9137b4eb..55587a599e2356cadfdf7c1dac0799f76b422305 100644 --- a/libc/unistd/lib_getcwd.c +++ b/libc/unistd/lib_getcwd.c @@ -99,7 +99,7 @@ FAR char *getcwd(FAR char *buf, size_t size) /* Verify input parameters */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!buf || !size) { set_errno(EINVAL); diff --git a/libnx/nx/nx_drawline.c b/libnx/nx/nx_drawline.c index 49046be94b0287fdd33edfa2a44f2398cb98f71b..6ca0ade436ee71ca49c1ebc6a1b0be2e28af1f4a 100644 --- a/libnx/nx/nx_drawline.c +++ b/libnx/nx/nx_drawline.c @@ -99,7 +99,7 @@ int nx_drawline(NXWINDOW hwnd, FAR struct nxgl_vector_s *vector, struct nxgl_rect_s rect; int ret; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hwnd || !vector || width < 1 || !color) { set_errno(EINVAL); diff --git a/libnx/nxfonts/nxfonts_getfont.c b/libnx/nxfonts/nxfonts_getfont.c index c52c082281c2c07c090a6d80b33b1092d6f610ec..1e8f80edc2af7f7737f5413733e39e845363632b 100644 --- a/libnx/nxfonts/nxfonts_getfont.c +++ b/libnx/nxfonts/nxfonts_getfont.c @@ -475,7 +475,7 @@ static inline FAR const struct nx_fontset_s * fontset = &package->font8; #else - gdbg("8-bit font support disabled: %d\n", ch); + gwarn("WARNING: 8-bit font support disabled: %d\n", ch); return NULL; #endif } @@ -483,7 +483,7 @@ static inline FAR const struct nx_fontset_s * { /* Someday, perhaps 16-bit fonts will go here */ - gdbg("16-bit font not currently supported\n"); + gerr("ERROR: 16-bit font not currently supported\n"); return NULL; } @@ -494,7 +494,7 @@ static inline FAR const struct nx_fontset_s * return fontset; } - gdbg("No bitmap for code %02x\n", ch); + gerr("ERROR: No bitmap for code %02x\n", ch); return NULL; } diff --git a/libnx/nxglib/nxglib_splitline.c b/libnx/nxglib/nxglib_splitline.c index fa2ccc1a0dac2f7dab10d67f1741bf21c26d5b06..c63539b8c13c45a214f7ba9e4c429e07884a5250 100644 --- a/libnx/nxglib/nxglib_splitline.c +++ b/libnx/nxglib/nxglib_splitline.c @@ -139,7 +139,7 @@ int nxgl_splitline(FAR struct nxgl_vector_s *vector, b16_t b16x; b16_t b16y; - gvdbg("vector: (%d,%d)->(%d,%d) linewidth: %d\n", + ginfo("vector: (%d,%d)->(%d,%d) linewidth: %d\n", vector->pt1.x, vector->pt1.y, vector->pt2.x, vector->pt2.y, linewidth); /* First, check the linewidth */ @@ -190,7 +190,7 @@ int nxgl_splitline(FAR struct nxgl_vector_s *vector, rect->pt1.y = vector->pt1.y - (linewidth >> 1); rect->pt2.y = rect->pt1.y + linewidth - 1; - gvdbg("Horizontal rect: (%d,%d),(%d,%d)\n", + ginfo("Horizontal rect: (%d,%d),(%d,%d)\n", rect->pt1.x, rect->pt1.y, rect->pt2.x, rect->pt2.y); return 2; @@ -208,7 +208,7 @@ int nxgl_splitline(FAR struct nxgl_vector_s *vector, rect->pt1.x = line.pt1.x - (linewidth >> 1); rect->pt2.x = rect->pt1.x + linewidth - 1; - gvdbg("Vertical rect: (%d,%d),(%d,%d)\n", + ginfo("Vertical rect: (%d,%d),(%d,%d)\n", rect->pt1.x, rect->pt1.y, rect->pt2.x, rect->pt2.y); return 2; @@ -231,7 +231,7 @@ int nxgl_splitline(FAR struct nxgl_vector_s *vector, traps[1].bot.x2 = traps[1].bot.x1; traps[1].bot.y = line.pt2.y; - gvdbg("Vertical traps[1]: (%08x,%08x,%d),(%08x,%08x, %d)\n", + ginfo("Vertical traps[1]: (%08x,%08x,%d),(%08x,%08x, %d)\n", traps[1].top.x1, traps[1].top.x2, traps[1].top.y, traps[1].bot.x1, traps[1].bot.x2, traps[1].bot.y); @@ -277,7 +277,7 @@ int nxgl_splitline(FAR struct nxgl_vector_s *vector, sinangle = b16sin(angle); b16xoffset = (linewidth * sinangle + 1) >> 1; - gvdbg("height: %d width: %d angle: %08x b16yoffset: %08x b16xoffset: %08x\n", + ginfo("height: %d width: %d angle: %08x b16yoffset: %08x b16xoffset: %08x\n", iheight, iwidth, angle, b16yoffset, b16xoffset); /* Now we know all four points of the rotated rectangle */ @@ -307,7 +307,7 @@ int nxgl_splitline(FAR struct nxgl_vector_s *vector, quad[2].x = b16x + b16xoffset; quad[3].x = b16x - b16xoffset; - gvdbg("Southeast: quad (%08x,%08x),(%08x,%08x),(%08x,%08x),(%08x,%08x)\n", + ginfo("Southeast: quad (%08x,%08x),(%08x,%08x),(%08x,%08x),(%08x,%08x)\n", quad[0].x, quad[0].y, quad[1].x, quad[1].y, quad[2].x, quad[2].y, quad[3].x, quad[3].y); @@ -408,7 +408,7 @@ int nxgl_splitline(FAR struct nxgl_vector_s *vector, quad[2].x = b16x - b16xoffset; quad[3].x = b16x + b16xoffset; - gvdbg("Southwest: quad (%08x,%08x),(%08x,%08x),(%08x,%08x),(%08x,%08x)\n", + ginfo("Southwest: quad (%08x,%08x),(%08x,%08x),(%08x,%08x),(%08x,%08x)\n", quad[0].x, quad[0].y, quad[1].x, quad[1].y, quad[2].x, quad[2].y, quad[3].x, quad[3].y); @@ -498,13 +498,13 @@ int nxgl_splitline(FAR struct nxgl_vector_s *vector, traps[2].bot.y = b16toi(quad[3].y + b16HALF); } - gvdbg("traps[0]: (%08x,%08x,%d),(%08x,%08x,%d)\n", + ginfo("traps[0]: (%08x,%08x,%d),(%08x,%08x,%d)\n", traps[0].top.x1, traps[0].top.x2, traps[0].top.y, traps[0].bot.x1, traps[0].bot.x2, traps[0].bot.y); - gvdbg("traps[1]: (%08x,%08x,%d),(%08x,%08x,%d)\n", + ginfo("traps[1]: (%08x,%08x,%d),(%08x,%08x,%d)\n", traps[1].top.x1, traps[1].top.x2, traps[1].top.y, traps[1].bot.x1, traps[1].bot.x2, traps[1].bot.y); - gvdbg("traps[2]: (%08x,%08x,%d),(%08x,%08x,%d)\n", + ginfo("traps[2]: (%08x,%08x,%d),(%08x,%08x,%d)\n", traps[2].top.x1, traps[2].top.x2, traps[2].top.y, traps[2].bot.x1, traps[2].bot.x2, traps[2].bot.y); @@ -523,7 +523,7 @@ int nxgl_splitline(FAR struct nxgl_vector_s *vector, traps[1].bot.x2 = traps[1].bot.x1 + itob16(linewidth - 1); traps[1].bot.y = line.pt2.y; - gvdbg("Horizontal traps[1]: (%08x,%08x,%d),(%08x,%08x, %d)\n", + ginfo("Horizontal traps[1]: (%08x,%08x,%d),(%08x,%08x, %d)\n", traps[1].top.x1, traps[1].top.x2, traps[1].top.y, traps[1].bot.x1, traps[1].bot.x2, traps[1].bot.y); diff --git a/libnx/nxmu/nx_bitmap.c b/libnx/nxmu/nx_bitmap.c index 6ed0096b7b6d475e3cdfc4b4f0f8d706adb4fe4f..0d8ec93f40565832418607e248f7a0a0eb017303 100644 --- a/libnx/nxmu/nx_bitmap.c +++ b/libnx/nxmu/nx_bitmap.c @@ -102,7 +102,7 @@ int nx_bitmap(NXWINDOW hwnd, FAR const struct nxgl_rect_s *dest, int ret; sem_t sem_done; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd || !dest || !src || !origin) { set_errno(EINVAL); @@ -133,7 +133,7 @@ int nx_bitmap(NXWINDOW hwnd, FAR const struct nxgl_rect_s *dest, if (ret != OK) { - gdbg("sem_init failed: %d\n", errno); + gerr("ERROR: sem_init failed: %d\n", errno); return ret; } diff --git a/libnx/nxmu/nx_block.c b/libnx/nxmu/nx_block.c index 56b66f23a9f23ec0a45e818b111ecf2aee2a4016..eb4cb41fd9dea611951e8317a7ed3681ede6e76d 100644 --- a/libnx/nxmu/nx_block.c +++ b/libnx/nxmu/nx_block.c @@ -107,7 +107,7 @@ int nx_block(NXWINDOW hwnd, FAR void *arg) struct nxsvrmsg_blocked_s outmsg; int ret = OK; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hwnd) { set_errno(EINVAL); diff --git a/libnx/nxmu/nx_connect.c b/libnx/nxmu/nx_connect.c index 07cf7a7514770c13a1368a5a3d1222a42893fb57..7b2db2808f07c9748716d6825db0d5cc0a757e74 100644 --- a/libnx/nxmu/nx_connect.c +++ b/libnx/nxmu/nx_connect.c @@ -122,7 +122,7 @@ NXHANDLE nx_connectinstance(FAR const char *svrmqname) /* Sanity checking */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!svrmqname) { set_errno(EINVAL); @@ -160,7 +160,7 @@ NXHANDLE nx_connectinstance(FAR const char *svrmqname) #endif if (conn->crdmq == (mqd_t)-1) { - gdbg("mq_open(%s) failed: %d\n", climqname, errno); + gerr("ERROR: mq_open(%s) failed: %d\n", climqname, errno); goto errout_with_conn; } @@ -173,7 +173,7 @@ NXHANDLE nx_connectinstance(FAR const char *svrmqname) conn->cwrmq = mq_open(svrmqname, O_WRONLY|O_CREAT, 0666, &attr); if (conn->cwrmq == (mqd_t)-1) { - gdbg("mq_open(%s) failed: %d\n", svrmqname, errno); + gerr("ERROR: mq_open(%s) failed: %d\n", svrmqname, errno); goto errout_with_rmq; } @@ -185,7 +185,7 @@ NXHANDLE nx_connectinstance(FAR const char *svrmqname) ret = nxmu_sendserver(conn, &outmsg, sizeof(struct nxsvrmsg_s)); if (ret < 0) { - gdbg("nxmu_sendserver failed: %d\n", errno); + gerr("ERROR: nxmu_sendserver failed: %d\n", errno); goto errout_with_wmq; } @@ -201,7 +201,7 @@ NXHANDLE nx_connectinstance(FAR const char *svrmqname) ret = nx_eventhandler((NXHANDLE)conn); if (ret < 0) { - gdbg("nx_message failed: %d\n", errno); + gerr("ERROR: nx_message failed: %d\n", errno); goto errout_with_wmq; } usleep(300000); diff --git a/libnx/nxmu/nx_constructwindow.c b/libnx/nxmu/nx_constructwindow.c index 677706e1856160cc8bf52afdce10e8ac3a8f281f..32f47880d5711de43353cd8af2a17ce842ed74a1 100644 --- a/libnx/nxmu/nx_constructwindow.c +++ b/libnx/nxmu/nx_constructwindow.c @@ -108,7 +108,7 @@ int nx_constructwindow(NXHANDLE handle, NXWINDOW hwnd, FAR struct nxbe_window_s *wnd = (FAR struct nxbe_window_s *)hwnd; struct nxsvrmsg_openwindow_s outmsg; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd) { set_errno(EINVAL); diff --git a/libnx/nxmu/nx_disconnect.c b/libnx/nxmu/nx_disconnect.c index 323e414af70583c8bc3bb924fb4bcd42feb5b50b..50571f38ac91508ad71ebb7febb2a243a362406e 100644 --- a/libnx/nxmu/nx_disconnect.c +++ b/libnx/nxmu/nx_disconnect.c @@ -102,6 +102,6 @@ void nx_disconnect(NXHANDLE handle) ret = nxmu_sendserver(conn, &outmsg, sizeof(struct nxsvrmsg_s)); if (ret < 0) { - gdbg("ERROR: nxmu_sendserver() returned %d\n", ret); + gerr("ERROR: nxmu_sendserver() returned %d\n", ret); } } diff --git a/libnx/nxmu/nx_eventhandler.c b/libnx/nxmu/nx_eventhandler.c index 71172fe6f97fa927c12e6bcb6de7e6f344720906..fbc694826d2c7da0e5190ade5cb2cd757435194a 100644 --- a/libnx/nxmu/nx_eventhandler.c +++ b/libnx/nxmu/nx_eventhandler.c @@ -164,7 +164,7 @@ int nx_eventhandler(NXHANDLE handle) } else { - gdbg("mq_receive failed: %d\n", errno); + gerr("ERROR: mq_receive failed: %d\n", errno); return ERROR; } } @@ -177,7 +177,7 @@ int nx_eventhandler(NXHANDLE handle) /* Dispatch the message appropriately */ msg = (struct nxsvrmsg_s *)buffer; - gvdbg("Received msgid=%d\n", msg->msgid); + ginfo("Received msgid=%d\n", msg->msgid); switch (msg->msgid) { case NX_CLIMSG_CONNECTED: @@ -254,7 +254,8 @@ int nx_eventhandler(NXHANDLE handle) break; default: - gdbg("Unrecognized message opcode: %d\n", ((FAR struct nxsvrmsg_s *)buffer)->msgid); + gerr("ERROR: Unrecognized message opcode: %d\n", + ((FAR struct nxsvrmsg_s *)buffer)->msgid); break; } diff --git a/libnx/nxmu/nx_fill.c b/libnx/nxmu/nx_fill.c index 263431b064a07c67f670a450fdcde400e5939cca..93c8c613ca7c5c152010760aa571cc4adead84a0 100644 --- a/libnx/nxmu/nx_fill.c +++ b/libnx/nxmu/nx_fill.c @@ -94,7 +94,7 @@ int nx_fill(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, FAR struct nxbe_window_s *wnd = (FAR struct nxbe_window_s *)hwnd; struct nxsvrmsg_fill_s outmsg; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd || !rect || !color) { set_errno(EINVAL); diff --git a/libnx/nxmu/nx_filltrapezoid.c b/libnx/nxmu/nx_filltrapezoid.c index 374d86614ed0c8eda9022988ce279b14c118c1fd..04f69320acf294e50ce2c04c0a51beaf0209131e 100644 --- a/libnx/nxmu/nx_filltrapezoid.c +++ b/libnx/nxmu/nx_filltrapezoid.c @@ -99,7 +99,7 @@ int nx_filltrapezoid(NXWINDOW hwnd, FAR const struct nxgl_rect_s *clip, /* Some debug-only sanity checks */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd || !trap || !color) { set_errno(EINVAL); diff --git a/libnx/nxmu/nx_getposition.c b/libnx/nxmu/nx_getposition.c index 19fee248ff9664456980ec337dac47f954c7374b..ff3f7723f37c0fd75099ea743c9056b70965db2e 100644 --- a/libnx/nxmu/nx_getposition.c +++ b/libnx/nxmu/nx_getposition.c @@ -91,7 +91,7 @@ int nx_getposition(NXWINDOW hwnd) FAR struct nxbe_window_s *wnd = (FAR struct nxbe_window_s *)hwnd; struct nxsvrmsg_getposition_s outmsg; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd) { set_errno(EINVAL); diff --git a/libnx/nxmu/nx_getrectangle.c b/libnx/nxmu/nx_getrectangle.c index a3b9a3a2416100669597c46f7aa4848c6b8ed60d..3bac5a3ae9ba7e3980a1a8b10b8d5059beb5e274 100644 --- a/libnx/nxmu/nx_getrectangle.c +++ b/libnx/nxmu/nx_getrectangle.c @@ -101,10 +101,10 @@ int nx_getrectangle(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, int ret; sem_t sem_done; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hwnd || !rect || !dest) { - gvdbg("Invalid parameters\n"); + ginfo("Invalid parameters\n"); set_errno(EINVAL); return ERROR; } @@ -127,7 +127,7 @@ int nx_getrectangle(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, if (ret != OK) { - gdbg("sem_init failed: %d\n", errno); + gerr("ERROR: sem_init failed: %d\n", errno); return ret; } diff --git a/libnx/nxmu/nx_move.c b/libnx/nxmu/nx_move.c index 19d36703ecdf33e0c4c2bad346934ea0b2cda616..d62d680df558a7cc8d1c1881a17606ce951bfb69 100644 --- a/libnx/nxmu/nx_move.c +++ b/libnx/nxmu/nx_move.c @@ -92,7 +92,7 @@ int nx_move(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, FAR struct nxbe_window_s *wnd = (FAR struct nxbe_window_s *)hwnd; struct nxsvrmsg_move_s outmsg; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd) { set_errno(EINVAL); diff --git a/libnx/nxmu/nx_openwindow.c b/libnx/nxmu/nx_openwindow.c index 5100a3b9a50684729b742ef8b5cf7543f5234311..a704c4249610a2473fd4786d4b176118cc61aee5 100644 --- a/libnx/nxmu/nx_openwindow.c +++ b/libnx/nxmu/nx_openwindow.c @@ -95,7 +95,7 @@ NXWINDOW nx_openwindow(NXHANDLE handle, FAR const struct nx_callback_s *cb, FAR struct nxbe_window_s *wnd; int ret; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!handle || !cb) { set_errno(EINVAL); diff --git a/libnx/nxmu/nx_redrawreq.c b/libnx/nxmu/nx_redrawreq.c index ed0e6390967ca8328add81ca9a415f7800092a2d..cc771119f95d5874a037d23bc19bcca315ef0d99 100644 --- a/libnx/nxmu/nx_redrawreq.c +++ b/libnx/nxmu/nx_redrawreq.c @@ -106,6 +106,6 @@ void nx_redrawreq(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect) ret = nxmu_sendwindow(wnd, &outmsg, sizeof(struct nxsvrmsg_redrawreq_s)); if (ret < 0) { - gdbg("ERROR: nxmu_sendwindow failed: %d\n", errno); + gerr("ERROR: nxmu_sendwindow failed: %d\n", errno); } } diff --git a/libnx/nxmu/nx_releasebkgd.c b/libnx/nxmu/nx_releasebkgd.c index 3bad1b265da18ae95dfef03b56d34556d2d413e4..ca51f5e92eb1cb87e41d98dba6f208f995a692b8 100644 --- a/libnx/nxmu/nx_releasebkgd.c +++ b/libnx/nxmu/nx_releasebkgd.c @@ -90,7 +90,7 @@ int nx_releasebkgd(NXWINDOW hwnd) FAR struct nxbe_window_s *wnd = (FAR struct nxbe_window_s *)hwnd; struct nxsvrmsg_releasebkgd_s outmsg; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd) { set_errno(EINVAL); diff --git a/libnx/nxmu/nx_requestbkgd.c b/libnx/nxmu/nx_requestbkgd.c index 20f217d084957fb9e6277e2b665a125f6220beaa..b1f3e68028c776d769d85fd95d0b78baa0e35307 100644 --- a/libnx/nxmu/nx_requestbkgd.c +++ b/libnx/nxmu/nx_requestbkgd.c @@ -116,7 +116,7 @@ int nx_requestbkgd(NXHANDLE handle, FAR const struct nx_callback_s *cb, FAR struct nxfe_conn_s *conn = (FAR struct nxfe_conn_s *)handle; struct nxsvrmsg_requestbkgd_s outmsg; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!conn || !cb) { set_errno(EINVAL); diff --git a/libnx/nxmu/nx_setbgcolor.c b/libnx/nxmu/nx_setbgcolor.c index ac3afe48a29af316f4ed88a03375ceee7d36f218..78599edb2ba054ee8f476a1f2f37f9743572cead 100644 --- a/libnx/nxmu/nx_setbgcolor.c +++ b/libnx/nxmu/nx_setbgcolor.c @@ -90,7 +90,7 @@ int nx_setbgcolor(NXHANDLE handle, FAR struct nxfe_conn_s *conn = (FAR struct nxfe_conn_s *)handle; struct nxsvrmsg_setbgcolor_s outmsg; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!conn) { set_errno(EINVAL); diff --git a/libnx/nxmu/nx_setpixel.c b/libnx/nxmu/nx_setpixel.c index fef16c05357642391c28f361f7ca21765aff4b9a..5c973bec71b1e22b34e8779ba382ba8388fd5754 100644 --- a/libnx/nxmu/nx_setpixel.c +++ b/libnx/nxmu/nx_setpixel.c @@ -95,7 +95,7 @@ int nx_setpixel(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos, FAR struct nxbe_window_s *wnd = (FAR struct nxbe_window_s *)hwnd; struct nxsvrmsg_setpixel_s outmsg; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd || !pos || !color) { set_errno(EINVAL); diff --git a/libnx/nxmu/nx_setposition.c b/libnx/nxmu/nx_setposition.c index 10568595a6cdd0d42ed0b38fc00c2addfd3f68b4..7ca0d02baf33ff34fefc7040cd8769ed29cdf824 100644 --- a/libnx/nxmu/nx_setposition.c +++ b/libnx/nxmu/nx_setposition.c @@ -90,7 +90,7 @@ int nx_setposition(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos) FAR struct nxbe_window_s *wnd = (FAR struct nxbe_window_s *)hwnd; struct nxsvrmsg_setposition_s outmsg; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd || !pos) { set_errno(EINVAL); diff --git a/libnx/nxmu/nx_setsize.c b/libnx/nxmu/nx_setsize.c index 948ace430770b27f4dcf0c58deda789755a44f63..b1cbb1086aa341c731715497c1f09d3298cb863c 100644 --- a/libnx/nxmu/nx_setsize.c +++ b/libnx/nxmu/nx_setsize.c @@ -90,7 +90,7 @@ int nx_setsize(NXWINDOW hwnd, FAR const struct nxgl_size_s *size) FAR struct nxbe_window_s *wnd = (FAR struct nxbe_window_s *)hwnd; struct nxsvrmsg_setsize_s outmsg; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd || !size) { set_errno(EINVAL); diff --git a/libnx/nxmu/nxmu_sendserver.c b/libnx/nxmu/nxmu_sendserver.c index 0281903980dcac298af2284fa256a9215cda3882..59bd5b795df520c0f4fc161d24ff54062e74f41b 100644 --- a/libnx/nxmu/nxmu_sendserver.c +++ b/libnx/nxmu/nxmu_sendserver.c @@ -92,7 +92,7 @@ int nxmu_sendserver(FAR struct nxfe_conn_s *conn, FAR const void *msg, /* Sanity checking */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!conn || !conn->cwrmq) { set_errno(EINVAL); @@ -105,7 +105,7 @@ int nxmu_sendserver(FAR struct nxfe_conn_s *conn, FAR const void *msg, ret = mq_send(conn->cwrmq, msg, msglen, NX_SVRMSG_PRIO); if (ret < 0) { - gdbg("mq_send failed: %d\n", errno); + gerr("ERROR: mq_send failed: %d\n", errno); } return ret; diff --git a/libnx/nxmu/nxmu_sendwindow.c b/libnx/nxmu/nxmu_sendwindow.c index f240c5614f6f0f50c267fc89071e66bb5bbef213..ff279d86ac105b5b41da92be283bc83396120753 100644 --- a/libnx/nxmu/nxmu_sendwindow.c +++ b/libnx/nxmu/nxmu_sendwindow.c @@ -94,7 +94,7 @@ int nxmu_sendwindow(FAR struct nxbe_window_s *wnd, FAR const void *msg, /* Sanity checking */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!wnd || !wnd->conn) { set_errno(EINVAL); diff --git a/libnx/nxtk/nxtk_bitmaptoolbar.c b/libnx/nxtk/nxtk_bitmaptoolbar.c index abc1815b8f70d0de1ebb47589aa1d40c8a93f72c..6f31d9300992ae7366323a75a3074684448c5ace 100644 --- a/libnx/nxtk/nxtk_bitmaptoolbar.c +++ b/libnx/nxtk/nxtk_bitmaptoolbar.c @@ -102,7 +102,7 @@ int nxtk_bitmaptoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *dest, struct nxgl_point_s wndorigin; struct nxgl_rect_s clipdest; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hfwnd || !dest || !src || !origin) { set_errno(EINVAL); diff --git a/libnx/nxtk/nxtk_bitmapwindow.c b/libnx/nxtk/nxtk_bitmapwindow.c index 59a8776b626e7ee07b3f67a52054e304296dbcd5..0371715ba7c400fdf6c2f9ab506559d1e9995b86 100644 --- a/libnx/nxtk/nxtk_bitmapwindow.c +++ b/libnx/nxtk/nxtk_bitmapwindow.c @@ -102,7 +102,7 @@ int nxtk_bitmapwindow(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *dest, struct nxgl_point_s wndorigin; struct nxgl_rect_s clipdest; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hfwnd || !dest || !src || !origin) { set_errno(EINVAL); diff --git a/libnx/nxtk/nxtk_drawlinetoolbar.c b/libnx/nxtk/nxtk_drawlinetoolbar.c index bd7744725e0431df54bdc3f0d8d0400d941dac10..84d25ad83caf307c6b7049f9a40b0a973c393569 100644 --- a/libnx/nxtk/nxtk_drawlinetoolbar.c +++ b/libnx/nxtk/nxtk_drawlinetoolbar.c @@ -102,7 +102,7 @@ int nxtk_drawlinetoolbar(NXTKWINDOW hfwnd, FAR struct nxgl_vector_s *vector, struct nxgl_rect_s rect; int ret; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hfwnd || !vector || width < 1 || !color) { set_errno(EINVAL); diff --git a/libnx/nxtk/nxtk_drawlinewindow.c b/libnx/nxtk/nxtk_drawlinewindow.c index a616ce13205741b0118c5332802443f18652ed4a..231842b8828a83cfe48ca8c457da0d4b4629ff60 100644 --- a/libnx/nxtk/nxtk_drawlinewindow.c +++ b/libnx/nxtk/nxtk_drawlinewindow.c @@ -101,7 +101,7 @@ int nxtk_drawlinewindow(NXTKWINDOW hfwnd, FAR struct nxgl_vector_s *vector, struct nxgl_rect_s rect; int ret; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hfwnd || !vector || width < 1 || !color) { set_errno(EINVAL); diff --git a/libnx/nxtk/nxtk_events.c b/libnx/nxtk/nxtk_events.c index d7f33e6ebedd0259410da459feae54e9f8586684..6644366e2531f6d36f1cebe44f2735ad75c5d567 100644 --- a/libnx/nxtk/nxtk_events.c +++ b/libnx/nxtk/nxtk_events.c @@ -119,7 +119,7 @@ static void nxtk_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, DEBUGASSERT(hwnd && rect && fwnd->fwcb); - gvdbg("hwnd=%p rect={(%d,%d),(%d,%d)} more=%d\n", + ginfo("hwnd=%p rect={(%d,%d),(%d,%d)} more=%d\n", hwnd, rect->pt1.x, rect->pt1.y, rect->pt2.x, rect->pt2.y, more); /* The incoming rectangle (rect) is relative to the containing window @@ -137,7 +137,7 @@ static void nxtk_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, nxtk_containerclip(fwnd, &intersection, rect, &fwnd->fwrect); - gvdbg("fwrect intersection={(%d,%d),(%d,%d)}\n", + ginfo("fwrect intersection={(%d,%d),(%d,%d)}\n", intersection.pt1.x, intersection.pt1.y, intersection.pt2.x, intersection.pt2.y); @@ -160,7 +160,7 @@ static void nxtk_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, nxtk_containerclip(fwnd, &intersection, rect, &fwnd->tbrect); - gvdbg("tbrect intersection={(%d,%d),(%d,%d)}\n", + ginfo("tbrect intersection={(%d,%d),(%d,%d)}\n", intersection.pt1.x, intersection.pt1.y, intersection.pt2.x, intersection.pt2.y); @@ -187,7 +187,7 @@ static void nxtk_position(NXWINDOW hwnd, FAR const struct nxgl_size_s *size, FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hwnd; struct nxgl_size_s subwindowsize; - gvdbg("hwnd=%p size=(%d,%d) pos=(%d,%d) bounds={(%d,%d),(%d,%d)}\n", + ginfo("hwnd=%p size=(%d,%d) pos=(%d,%d) bounds={(%d,%d),(%d,%d)}\n", hwnd, size->w, size->h, pos->x, pos->y, bounds->pt1.x, bounds->pt1.y, bounds->pt2.x, bounds->pt2.y); diff --git a/libnx/nxtk/nxtk_filltoolbar.c b/libnx/nxtk/nxtk_filltoolbar.c index 0d62eaaf84e2f52bc7af2cdaa06fd50cfef2bbee..25eb6a8e8e833a733ba7a10139db1034bb268de8 100644 --- a/libnx/nxtk/nxtk_filltoolbar.c +++ b/libnx/nxtk/nxtk_filltoolbar.c @@ -94,7 +94,7 @@ int nxtk_filltoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect, FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd; struct nxgl_rect_s fillrect; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hfwnd || !rect || !color) { set_errno(EINVAL); diff --git a/libnx/nxtk/nxtk_filltraptoolbar.c b/libnx/nxtk/nxtk_filltraptoolbar.c index 1b7ae272770a6de462c3140bd198644baf983431..3ca0b38ad2361eb159c445f83d6079adeaa98530 100644 --- a/libnx/nxtk/nxtk_filltraptoolbar.c +++ b/libnx/nxtk/nxtk_filltraptoolbar.c @@ -95,7 +95,7 @@ int nxtk_filltraptoolbar(NXTKWINDOW hfwnd, FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd; struct nxgl_rect_s relclip; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hfwnd || !trap || !color) { set_errno(EINVAL); diff --git a/libnx/nxtk/nxtk_filltrapwindow.c b/libnx/nxtk/nxtk_filltrapwindow.c index bbfba26599e69acd5c56c663bd078dc9a0987366..88c3077223f2ea20ba85374f2c1c196e96e00b09 100644 --- a/libnx/nxtk/nxtk_filltrapwindow.c +++ b/libnx/nxtk/nxtk_filltrapwindow.c @@ -96,7 +96,7 @@ int nxtk_filltrapwindow(NXTKWINDOW hfwnd, struct nxgl_rect_s relclip; struct nxgl_trapezoid_s reltrap; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hfwnd || !trap || !color) { set_errno(EINVAL); diff --git a/libnx/nxtk/nxtk_fillwindow.c b/libnx/nxtk/nxtk_fillwindow.c index fa0fd8d8f2408c533ab022c08e1c7d2ef36e277b..9ff1caca57eb4bba494eccd8ae5ef22c606a1ed4 100644 --- a/libnx/nxtk/nxtk_fillwindow.c +++ b/libnx/nxtk/nxtk_fillwindow.c @@ -94,7 +94,7 @@ int nxtk_fillwindow(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect, FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd; struct nxgl_rect_s fillrect; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hfwnd || !rect || !color) { set_errno(EINVAL); diff --git a/libnx/nxtk/nxtk_gettoolbar.c b/libnx/nxtk/nxtk_gettoolbar.c index 593fcb09a639525f803d5d399edcaf48da82e1e2..bc05cbce94261939029d686f700c33033161a10f 100644 --- a/libnx/nxtk/nxtk_gettoolbar.c +++ b/libnx/nxtk/nxtk_gettoolbar.c @@ -100,10 +100,10 @@ int nxtk_gettoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect, FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd; struct nxgl_rect_s getrect; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hfwnd || !rect || !dest) { - gvdbg("Invalid parameters\n"); + ginfo("Invalid parameters\n"); set_errno(EINVAL); return ERROR; } diff --git a/libnx/nxtk/nxtk_getwindow.c b/libnx/nxtk/nxtk_getwindow.c index b22945997378144b7825fee5b592deb7c61945e1..4106267fb0cb311ba93d3a0119b3eeb9ecb5ab91 100644 --- a/libnx/nxtk/nxtk_getwindow.c +++ b/libnx/nxtk/nxtk_getwindow.c @@ -100,10 +100,10 @@ int nxtk_getwindow(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect, FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd; struct nxgl_rect_s getrect; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hfwnd || !rect || !dest) { - gvdbg("Invalid parameters\n"); + ginfo("Invalid parameters\n"); set_errno(EINVAL); return ERROR; } diff --git a/libnx/nxtk/nxtk_movetoolbar.c b/libnx/nxtk/nxtk_movetoolbar.c index 62d14e7bf85fa8ab02c41cfcee411b10f36862b5..913142a0d4ae37dc5d1f4c9859db01f5143a3e88 100644 --- a/libnx/nxtk/nxtk_movetoolbar.c +++ b/libnx/nxtk/nxtk_movetoolbar.c @@ -99,7 +99,7 @@ int nxtk_movetoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect, struct nxgl_rect_s srcrect; struct nxgl_point_s clipoffset; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hfwnd || !rect || !offset) { set_errno(EINVAL); diff --git a/libnx/nxtk/nxtk_movewindow.c b/libnx/nxtk/nxtk_movewindow.c index 2b34f44a8b655bf9040a167dca201d45e96e92f2..302cff98d1d0bc23328c16f5c1f008b1bf8efd7b 100644 --- a/libnx/nxtk/nxtk_movewindow.c +++ b/libnx/nxtk/nxtk_movewindow.c @@ -98,7 +98,7 @@ int nxtk_movewindow(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect, struct nxgl_rect_s srcrect; struct nxgl_point_s clipoffset; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hfwnd || !rect || !offset) { set_errno(EINVAL); diff --git a/libnx/nxtk/nxtk_opentoolbar.c b/libnx/nxtk/nxtk_opentoolbar.c index 26aa4c504f745781b041c6b7a2385a3807923fa5..f5d58979eaaaede926b9217b769208fccc7687fa 100644 --- a/libnx/nxtk/nxtk_opentoolbar.c +++ b/libnx/nxtk/nxtk_opentoolbar.c @@ -96,7 +96,7 @@ int nxtk_opentoolbar(NXTKWINDOW hfwnd, nxgl_coord_t height, { FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hfwnd || !cb) { set_errno(EINVAL); diff --git a/libnx/nxtk/nxtk_openwindow.c b/libnx/nxtk/nxtk_openwindow.c index 796a57d3b7048e3a0a4ecddca6eebe4dba5e7232..ebefaec892060f1eb069f92fc2a4cc9a77f3f42a 100644 --- a/libnx/nxtk/nxtk_openwindow.c +++ b/libnx/nxtk/nxtk_openwindow.c @@ -120,7 +120,7 @@ NXTKWINDOW nxtk_openwindow(NXHANDLE handle, FAR struct nxtk_framedwindow_s *fwnd; int ret; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!handle || !cb) { set_errno(EINVAL); diff --git a/libnx/nxtk/nxtk_setsize.c b/libnx/nxtk/nxtk_setsize.c index 8848c717200c60c1e3cc99bbfdd1444785c2e6ce..7e9079696647c847f2551fc6a00ef0cdc0a476ae 100644 --- a/libnx/nxtk/nxtk_setsize.c +++ b/libnx/nxtk/nxtk_setsize.c @@ -94,7 +94,7 @@ int nxtk_setsize(NXTKWINDOW hfwnd, FAR const struct nxgl_size_s *size) FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd; struct nxgl_size_s newsize; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!hfwnd || !size) { set_errno(EINVAL); diff --git a/libxx/libxx_new.cxx b/libxx/libxx_new.cxx index a4575519ab414111c8f113f0095a3715fa1d64bf..423ab833b55a2dddad987037808895dec428579a 100644 --- a/libxx/libxx_new.cxx +++ b/libxx/libxx_new.cxx @@ -87,13 +87,13 @@ void *operator new(unsigned int nbytes) void *alloc = lib_malloc(nbytes); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (alloc == 0) { // Oh my.. we are required to return a valid pointer and // we cannot throw an exception! We are bad. - dbg("Failed to allocate\n"); + _err("ERROR: Failed to allocate\n"); } #endif diff --git a/libxx/libxx_newa.cxx b/libxx/libxx_newa.cxx index c1e4dfa95d9a2fff445544eeee189fdc739a9e7a..a3b327eb63de951fb6ed985e8a5811f118a80bf7 100644 --- a/libxx/libxx_newa.cxx +++ b/libxx/libxx_newa.cxx @@ -87,13 +87,13 @@ void *operator new[](unsigned int nbytes) void *alloc = lib_malloc(nbytes); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (alloc == 0) { // Oh my.. we are required to return a valid pointer and // we cannot throw an exception! We are bad. - dbg("Failed to allocate\n"); + _err("ERROR: Failed to allocate\n"); } #endif diff --git a/libxx/libxx_stdthrow.cxx b/libxx/libxx_stdthrow.cxx index 79f20093a4871cbfc1fb99de21313542480618cc..20957e236b496bb22146cbeb71c1b7286bb610ba 100644 --- a/libxx/libxx_stdthrow.cxx +++ b/libxx/libxx_stdthrow.cxx @@ -56,25 +56,25 @@ namespace std { void __throw_out_of_range(const char*) { - dbg("C++: Vector .at() with argument out of range\n"); + _err("ERROR: C++: Vector .at() with argument out of range\n"); abort(); } void __throw_length_error(const char*) { - dbg("C++: Vector resize to excessive length\n"); + _err("ERROR: C++: Vector resize to excessive length\n"); abort(); } void __throw_bad_alloc() { - dbg("C++: Bad allocation\n"); + _err("ERROR: C++: Bad allocation\n"); abort(); } void __throw_bad_function_call() { - dbg("C++: Bad function call\n"); + _err("ERROR: C++: Bad function call\n"); abort(); } } diff --git a/mm/Kconfig b/mm/Kconfig index 1f0a79f0de78a6337b54af76931ebdbe14b0fb2a..8cba9265ea99880a5f38abe280c0fc53029844a3 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -116,7 +116,7 @@ config GRAN_INTR config DEBUG_GRAN bool "Granule Allocator Debug" default n - depends on GRAN && DEBUG + depends on GRAN && DEBUG_FEATURES ---help--- Just like DEBUG_MM, but only generates output from the gran allocation logic. @@ -143,7 +143,7 @@ config MM_PGSIZE config DEBUG_PGALLOC bool "Page Allocator Debug" default n - depends on DEBUG + depends on DEBUG_FEATURES ---help--- Just like DEBUG_MM, but only generates output from the page allocation logic. diff --git a/mm/kmm_heap/Make.defs b/mm/kmm_heap/Make.defs index cf7053e54b55199958090afd1a51d89d61d50fa4..9f7ac447a3e8a0a6f0bbb81d17e1725689052ee3 100644 --- a/mm/kmm_heap/Make.defs +++ b/mm/kmm_heap/Make.defs @@ -44,7 +44,7 @@ ifeq ($(CONFIG_BUILD_KERNEL),y) CSRCS += kmm_sbrk.c endif -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) CSRCS += kmm_heapmember.c endif diff --git a/mm/kmm_heap/kmm_heapmember.c b/mm/kmm_heap/kmm_heapmember.c index b96a6f7ada7691fe8c93de40a0f5268527f93a98..53fa7027b7d00dbe16eb84064664f0d81741e819 100644 --- a/mm/kmm_heap/kmm_heapmember.c +++ b/mm/kmm_heap/kmm_heapmember.c @@ -43,7 +43,7 @@ #include -#if defined(CONFIG_MM_KERNEL_HEAP) && defined(CONFIG_DEBUG) +#if defined(CONFIG_MM_KERNEL_HEAP) && defined(CONFIG_DEBUG_FEATURES) /**************************************************************************** * Public Functions @@ -105,4 +105,4 @@ bool kmm_heapmember(FAR void *mem) #endif } -#endif /* CONFIG_MM_KERNEL_HEAP && CONFIG_DEBUG */ +#endif /* CONFIG_MM_KERNEL_HEAP && CONFIG_DEBUG_FEATURES */ diff --git a/mm/kmm_heap/kmm_kernel.c b/mm/kmm_heap/kmm_kernel.c index 4a2231dd01fda3a1f8cf355f1c94421c405c9258..e2fc9232b818b0e30438568bac6a2d722c9376c5 100644 --- a/mm/kmm_heap/kmm_kernel.c +++ b/mm/kmm_heap/kmm_kernel.c @@ -66,7 +66,7 @@ * ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES bool kmm_heapmember(FAR void *mem) { #if CONFIG_MM_REGIONS > 1 diff --git a/mm/mm_gran/mm_gran.h b/mm/mm_gran/mm_gran.h index 20229216b7c175cc3702e433dd7e32ea654cb104..dcc04c72178bb124e285e271ae7a47823288b76c 100644 --- a/mm/mm_gran/mm_gran.h +++ b/mm/mm_gran/mm_gran.h @@ -63,19 +63,23 @@ #ifdef CONFIG_CPP_HAVE_VARARGS # ifdef CONFIG_DEBUG_GRAM -# define grandbg(format, ...) dbg(format, ##__VA_ARGS__) -# define granvdbg(format, ...) vdbg(format, ##__VA_ARGS__) +# define granerr(format, ...) _err(format, ##__VA_ARGS__) +# define granwarn(format, ...) _warn(format, ##__VA_ARGS__) +# define graninfo(format, ...) _info(format, ##__VA_ARGS__) # else -# define grandbg(format, ...) mdbg(format, ##__VA_ARGS__) -# define granvdbg(format, ...) mvdbg(format, ##__VA_ARGS__) +# define granerr(format, ...) merr(format, ##__VA_ARGS__) +# define granwarn(format, ...) mwarn(format, ##__VA_ARGS__) +# define graninfo(format, ...) minfo(format, ##__VA_ARGS__) # endif #else # ifdef CONFIG_DEBUG_GRAM -# define grandbg dbg -# define granvdbg vdbg +# define granerr _err +# define granwarn _warn +# define graninfo _info # else -# define grandbg (void) -# define granvdbg (void) +# define granerr merr +# define granwarn mwarn +# define graninfo minfo # endif #endif diff --git a/mm/mm_gran/mm_pgalloc.c b/mm/mm_gran/mm_pgalloc.c index 474d9e0f4ea8972a6a0b97d7b4d295e8179d0e81..2574e20912bbdf71de764e451defb254b5e5d53a 100644 --- a/mm/mm_gran/mm_pgalloc.c +++ b/mm/mm_gran/mm_pgalloc.c @@ -66,19 +66,23 @@ #ifdef CONFIG_CPP_HAVE_VARARGS # ifdef CONFIG_DEBUG_PGALLOC -# define pgadbg(format, ...) dbg(format, ##__VA_ARGS__) -# define pgavdbg(format, ...) vdbg(format, ##__VA_ARGS__) +# define pgaerr(format, ...) _err(format, ##__VA_ARGS__) +# define pgawarn(format, ...) _warn(format, ##__VA_ARGS__) +# define pgainfo(format, ...) _info(format, ##__VA_ARGS__) # else -# define pgadbg(format, ...) mdbg(format, ##__VA_ARGS__) -# define pgavdbg(format, ...) mvdbg(format, ##__VA_ARGS__) +# define pgaerr(format, ...) merr(format, ##__VA_ARGS__) +# define pgawarn(format, ...) mwarn(format, ##__VA_ARGS__) +# define pgainfo(format, ...) minfo(format, ##__VA_ARGS__) # endif #else # ifdef CONFIG_DEBUG_PGALLOC -# define pgadbg dbg -# define pgavdbg vdbg +# define pgaerr _err +# define pgawarn _warn +# define pgainfo _info # else -# define pgadbg (void) -# define pgavdbg (void) +# define pgaerr merr +# define pgawarn mwarn +# define pgainfo minfo # endif #endif diff --git a/mm/mm_heap/mm_free.c b/mm/mm_heap/mm_free.c index 57cb867f8dec58a569f29f2307cfbb3d0c66fb00..4dad12e3666df1f830cb6b66234ff8edb47369b9 100644 --- a/mm/mm_heap/mm_free.c +++ b/mm/mm_heap/mm_free.c @@ -63,7 +63,7 @@ void mm_free(FAR struct mm_heap_s *heap, FAR void *mem) FAR struct mm_freenode_s *prev; FAR struct mm_freenode_s *next; - mvdbg("Freeing %p\n", mem); + minfo("Freeing %p\n", mem); /* Protect against attempts to free a NULL reference */ diff --git a/mm/mm_heap/mm_initialize.c b/mm/mm_heap/mm_initialize.c index bd9d4f524a4cb15c817a4cb288d91db193540999..cacff9c0471016bdd8ce745f51e55095141ee314 100644 --- a/mm/mm_heap/mm_initialize.c +++ b/mm/mm_heap/mm_initialize.c @@ -96,7 +96,7 @@ void mm_addregion(FAR struct mm_heap_s *heap, FAR void *heapstart, heapend = MM_ALIGN_DOWN((uintptr_t)heapstart + (uintptr_t)heapsize); heapsize = heapend - heapbase; - mlldbg("Region %d: base=%p size=%u\n", IDX+1, heapstart, heapsize); + minfo("Region %d: base=%p size=%u\n", IDX+1, heapstart, heapsize); /* Add the size of this region to the total size of the heap */ @@ -157,7 +157,7 @@ void mm_initialize(FAR struct mm_heap_s *heap, FAR void *heapstart, { int i; - mlldbg("Heap: start=%p size=%u\n", heapstart, heapsize); + minfo("Heap: start=%p size=%u\n", heapstart, heapsize); /* The following two lines have cause problems for some older ZiLog * compilers in the past (but not the more recent). Life is easier if we diff --git a/mm/mm_heap/mm_mallinfo.c b/mm/mm_heap/mm_mallinfo.c index f3c8775ba6323ec0abba371c3a580aa71968172d..3ee276c917b70f4e7cb05a604472bf25d452f950 100644 --- a/mm/mm_heap/mm_mallinfo.c +++ b/mm/mm_heap/mm_mallinfo.c @@ -88,7 +88,7 @@ int mm_mallinfo(FAR struct mm_heap_s *heap, FAR struct mallinfo *info) node < heap->mm_heapend[region]; node = (FAR struct mm_allocnode_s *)((FAR char *)node + node->size)) { - mvdbg("region=%d node=%p size=%p preceding=%p (%c)\n", + minfo("region=%d node=%p size=%p preceding=%p (%c)\n", region, node, node->size, (node->preceding & ~MM_ALLOC_BIT), (node->preceding & MM_ALLOC_BIT) ? 'A' : 'F'); @@ -111,7 +111,7 @@ int mm_mallinfo(FAR struct mm_heap_s *heap, FAR struct mallinfo *info) mm_givesemaphore(heap); - mvdbg("region=%d node=%p heapend=%p\n", region, node, heap->mm_heapend[region]); + minfo("region=%d node=%p heapend=%p\n", region, node, heap->mm_heapend[region]); DEBUGASSERT(node == heap->mm_heapend[region]); uordblks += SIZEOF_MM_ALLOCNODE; /* account for the tail node */ } diff --git a/mm/mm_heap/mm_malloc.c b/mm/mm_heap/mm_malloc.c index 3f9db86a336463b514bf6fa66045dbb0d79699e6..3efa15259f7a006bed7336165b7db923fc2aa233 100644 --- a/mm/mm_heap/mm_malloc.c +++ b/mm/mm_heap/mm_malloc.c @@ -186,11 +186,11 @@ FAR void *mm_malloc(FAR struct mm_heap_s *heap, size_t size) #ifdef CONFIG_DEBUG_MM if (!ret) { - mdbg("Allocation failed, size %d\n", size); + mwarn("WARNING: Allocation failed, size %d\n", size); } else { - mvdbg("Allocated %p, size %d\n", ret, size); + minfo("Allocated %p, size %d\n", ret, size); } #endif diff --git a/mm/mm_heap/mm_sbrk.c b/mm/mm_heap/mm_sbrk.c index 774d5d3f1118b239c5d3e082e438145354e395cc..ddbf288d068cd4378bdb01c395ed04035ac297ba 100644 --- a/mm/mm_heap/mm_sbrk.c +++ b/mm/mm_heap/mm_sbrk.c @@ -94,12 +94,12 @@ FAR void *mm_sbrk(FAR struct mm_heap_s *heap, intptr_t incr, uintptr_t allocbase; unsigned int pgincr; size_t bytesize; - int err; + int errcode; DEBUGASSERT(incr >= 0); if (incr < 0) { - err = ENOSYS; + errcode = ENOSYS; goto errout; } @@ -119,7 +119,7 @@ FAR void *mm_sbrk(FAR struct mm_heap_s *heap, intptr_t incr, if ((brkaddr > 0) && ((maxbreak - brkaddr) < (pgincr << MM_PGSHIFT))) { - err = ENOMEM; + errcode = ENOMEM; goto errout; } @@ -132,7 +132,7 @@ FAR void *mm_sbrk(FAR struct mm_heap_s *heap, intptr_t incr, allocbase = pgalloc(brkaddr, pgincr); if (allocbase == 0) { - err = EAGAIN; + errcode = EAGAIN; goto errout; } @@ -158,7 +158,7 @@ FAR void *mm_sbrk(FAR struct mm_heap_s *heap, intptr_t incr, return (FAR void *)brkaddr; errout: - set_errno(err); + set_errno(errcode); return (FAR void *)-1; } #endif /* CONFIG_BUILD_KERNEL */ diff --git a/mm/mm_heap/mm_sem.c b/mm/mm_heap/mm_sem.c index ae00b0b80fe68e4cc995f04e83c66a5a7d45f391..49083da2130dbe416eaa9a84ad74ca7070ab131d 100644 --- a/mm/mm_heap/mm_sem.c +++ b/mm/mm_heap/mm_sem.c @@ -53,17 +53,19 @@ //#define MONITOR_MM_SEMAPHORE 1 #ifdef MONITOR_MM_SEMAPHORE -# ifdef CONFIG_DEBUG -# include -# define msemdbg dbg -# else -# define msemdbg printf -# endif +# include +# define msemerr _err +# define msemwarn _warn +# define mseminfo _info #else # ifdef CONFIG_CPP_HAVE_VARARGS -# define msemdbg(x...) +# define msemerr(x...) +# define msemwarn(x...) +# define mseminfo(x...) # else -# define msemdbg (void) +# define msemerr (void) +# define msemwarn (void) +# define mseminfo (void) # endif #endif @@ -157,7 +159,7 @@ void mm_takesemaphore(FAR struct mm_heap_s *heap) { /* Take the semaphore (perhaps waiting) */ - msemdbg("PID=%d taking\n", my_pid); + mseminfo("PID=%d taking\n", my_pid); while (sem_wait(&heap->mm_semaphore) != 0) { /* The only case that an error should occur here is if @@ -173,7 +175,7 @@ void mm_takesemaphore(FAR struct mm_heap_s *heap) heap->mm_counts_held = 1; } - msemdbg("Holder=%d count=%d\n", heap->mm_holder, heap->mm_counts_held); + mseminfo("Holder=%d count=%d\n", heap->mm_holder, heap->mm_counts_held); } /**************************************************************************** @@ -186,7 +188,8 @@ void mm_takesemaphore(FAR struct mm_heap_s *heap) void mm_givesemaphore(FAR struct mm_heap_s *heap) { -#ifdef CONFIG_DEBUG +#if defined(CONFIG_DEBUG_ASSERTIONS) || \ + (defined(MONITOR_MM_SEMAPHORE) && defined(CONFIG_DEBUG_INFO)) pid_t my_pid = getpid(); #endif @@ -201,15 +204,14 @@ void mm_givesemaphore(FAR struct mm_heap_s *heap) /* Yes, just release one count and return */ heap->mm_counts_held--; - msemdbg("Holder=%d count=%d\n", heap->mm_holder, heap->mm_counts_held); + mseminfo("Holder=%d count=%d\n", heap->mm_holder, + heap->mm_counts_held); } else { /* Nope, this is the last reference I have */ -#ifdef CONFIG_DEBUG - msemdbg("PID=%d giving\n", my_pid); -#endif + mseminfo("PID=%d giving\n", my_pid); heap->mm_holder = -1; heap->mm_counts_held = 0; diff --git a/mm/shm/shm_initialize.c b/mm/shm/shm_initialize.c index a25bc8fd1997dabbc69d71dc0d6dd627598f69d5..f20e7b0873ffcd9a214bdac01d788b14f8b8f673 100644 --- a/mm/shm/shm_initialize.c +++ b/mm/shm/shm_initialize.c @@ -127,7 +127,7 @@ int shm_group_initialize(FAR struct task_group_s *group) if (!group->tg_shm.gs_handle) { - shmdbg("gran_initialize() failed\n"); + shmerr("ERROR: gran_initialize() failed\n"); return -ENOMEM; } diff --git a/mm/shm/shmat.c b/mm/shm/shmat.c index b3658a38fad95f1dce62e57bbe51f961d3742a44..6b677e5ddd0f75cc1e371c76c9af0b6f48ccc835 100644 --- a/mm/shm/shmat.c +++ b/mm/shm/shmat.c @@ -136,7 +136,7 @@ FAR void *shmat(int shmid, FAR const void *shmaddr, int shmflg) ret = sem_wait(®ion->sr_sem); if (ret < 0) { - shmdbg("sem_wait failed: %d\n", ret); + shmerr("ERROR: sem_wait failed: %d\n", ret); goto errout; } @@ -146,7 +146,7 @@ FAR void *shmat(int shmid, FAR const void *shmaddr, int shmflg) region->sr_ds.shm_segsz); if (vaddr == 0) { - shmdbg("gran_alloc() failed\n"); + shmerr("ERROR: gran_alloc() failed\n"); ret = -ENOMEM; goto errout_with_semaphore; } @@ -160,7 +160,7 @@ FAR void *shmat(int shmid, FAR const void *shmaddr, int shmflg) ret = up_shmat(region->sr_pages, npages, vaddr); if (ret < 0) { - shmdbg("up_shmat() failed\n"); + shmerr("ERROR: up_shmat() failed\n"); goto errout_with_vaddr; } diff --git a/mm/shm/shmctl.c b/mm/shm/shmctl.c index 6ba3a33f1af4466031681c69859a1e96d88a4aaf..4e5ac13c5f65a134c2c72256b12d86b3abfe4a96 100644 --- a/mm/shm/shmctl.c +++ b/mm/shm/shmctl.c @@ -134,7 +134,7 @@ int shmctl(int shmid, int cmd, struct shmid_ds *buf) ret = sem_wait(®ion->sr_sem); if (ret < 0) { - shmdbg("sem_wait failed: %d\n", ret); + shmerr("ERROR: sem_wait failed: %d\n", ret); return ret; } @@ -190,7 +190,7 @@ int shmctl(int shmid, int cmd, struct shmid_ds *buf) break; default: - shmdbg("Unrecognized command: %d\n", cmd); + shmerr("ERROR: Unrecognized command: %d\n", cmd); ret = -EINVAL; goto errout_with_semaphore; } diff --git a/mm/shm/shmdt.c b/mm/shm/shmdt.c index 201e944b6561a9073f79174c52df38c4d399a2a9..55c2fd055445eb69374e67bbb3c62c5ea9ee37b6 100644 --- a/mm/shm/shmdt.c +++ b/mm/shm/shmdt.c @@ -106,7 +106,7 @@ int shmdt(FAR const void *shmaddr) if (shmid >= CONFIG_ARCH_SHM_MAXREGIONS) { - shmdbg("No region matching this virtual address: %p\n", shmaddr); + shmerr("ERROR: No region matching this virtual address: %p\n", shmaddr); ret = -EINVAL; goto errout_with_errno; } @@ -121,7 +121,7 @@ int shmdt(FAR const void *shmaddr) ret = sem_wait(®ion->sr_sem); if (ret < 0) { - shmdbg("sem_wait failed: %d\n", ret); + shmerr("ERROR: sem_wait failed: %d\n", ret); goto errout; } @@ -141,7 +141,7 @@ int shmdt(FAR const void *shmaddr) ret = up_shmdt((uintptr_t)shmaddr, npages); if (ret < 0) { - shmdbg("up_shmdt() failed\n"); + shmerr("ERROR: up_shmdt() failed\n"); } /* Indicate that there is no longer any mapping for this region. */ diff --git a/mm/shm/shmget.c b/mm/shm/shmget.c index e3f020846099caf7f7f7e98c7e5dddf6c66dbb9a..460850605aa3b128bd9eb6d101e397f920a9ec94 100644 --- a/mm/shm/shmget.c +++ b/mm/shm/shmget.c @@ -188,7 +188,7 @@ static int shm_extend(int shmid, size_t size) region->sr_pages[pgalloc] = mm_pgalloc(1); if (region->sr_pages[pgalloc] == 0) { - shmdbg("mm_pgalloc(1) failed\n"); + shmerr("ERROR: mm_pgalloc(1) failed\n"); break; } @@ -249,7 +249,7 @@ static int shm_create(key_t key, size_t size, int shmflg) ret = shm_reserve(key, shmflg); if (ret < 0) { - shmdbg("shm_reserve failed: %d\n", ret); + shmerr("ERROR: shm_reserve failed: %d\n", ret); return ret; } @@ -400,7 +400,7 @@ int shmget(key_t key, size_t size, int shmflg) ret = shm_create(key, size, shmflg); if (ret < 0) { - shmdbg("shm_create failed: %d\n", ret); + shmerr("ERROR: shm_create failed: %d\n", ret); goto errout_with_semaphore; } @@ -443,7 +443,7 @@ int shmget(key_t key, size_t size, int shmflg) ret = shm_extend(shmid, size); if (ret < 0) { - shmdbg("shm_create failed: %d\n", ret); + shmerr("ERROR: shm_create failed: %d\n", ret); goto errout_with_semaphore; } } diff --git a/net/Kconfig b/net/Kconfig index 6d98fc77dc2cd65a355f03f1b368c4fe93a67eac..3f454f4288dd47d851ac3018a8607eabc6a0abcc 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -44,7 +44,7 @@ config NET_MULTIBUFFER bool "Use multiple device-side I/O buffers" default n ---help--- - Traditionally, the uIP stacl has used a single buffer for all + Traditionally, the uIP-based stack has used a single buffer for all incoming and outgoing traffic. If this configuration is selected, then the driver can manage multiple I/O buffers and can, for example, be filling one input buffer while sending another output diff --git a/net/arp/Kconfig b/net/arp/Kconfig index df228db6b7166822c5e1b585cd3972adecabd984..b4935e4c55cd5afeb2ec0e0e0b68325bb6168e2e 100644 --- a/net/arp/Kconfig +++ b/net/arp/Kconfig @@ -65,7 +65,7 @@ endif # NET_ARP_SEND config NET_ARP_DUMP bool "Dump ARP packet header" default n - depends on DEBUG + depends on DEBUG_NET_INFO ---help--- Dump ARP packets to the SYSLOG device. diff --git a/net/arp/arp.h b/net/arp/arp.h index b32490b4111909f7dee7de6e44f85abaec8228b0..0b95c4abd3e53da30b714b253a1b185d5f8d5a1e 100644 --- a/net/arp/arp.h +++ b/net/arp/arp.h @@ -64,7 +64,7 @@ ****************************************************************************/ /* Configuration ************************************************************/ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_NET_ARP_DUMP #endif @@ -382,7 +382,7 @@ void arp_notify(in_addr_t ipaddr); * * Assumptions * Interrupts are disabled; Returned value will become unstable when - * interrupts are re-enabled or if any other uIP APIs are called. + * interrupts are re-enabled or if any other network APIs are called. * ****************************************************************************/ diff --git a/net/arp/arp_arpin.c b/net/arp/arp_arpin.c index 6945ff666abd4536ff81b285a0054ba79bfc265f..40c557c41d73a7b49d73055e1f1bdc2ced7a6a93 100644 --- a/net/arp/arp_arpin.c +++ b/net/arp/arp_arpin.c @@ -96,7 +96,7 @@ void arp_arpin(FAR struct net_driver_s *dev) if (dev->d_len < (sizeof(struct arp_hdr_s) + ETH_HDRLEN)) { - nlldbg("Too small\n"); + nerr("ERROR: Packet Too small\n"); dev->d_len = 0; return; } @@ -107,7 +107,7 @@ void arp_arpin(FAR struct net_driver_s *dev) switch (arp->ah_opcode) { case HTONS(ARP_REQUEST): - nllvdbg("ARP request for IP %04lx\n", (long)ipaddr); + ninfo("ARP request for IP %04lx\n", (long)ipaddr); /* ARP request. If it asked for our address, we send out a reply. */ @@ -139,7 +139,7 @@ void arp_arpin(FAR struct net_driver_s *dev) break; case HTONS(ARP_REPLY): - nllvdbg("ARP reply for IP %04lx\n", (long)ipaddr); + ninfo("ARP reply for IP %04lx\n", (long)ipaddr); /* ARP reply. We insert or update the ARP table if it was meant * for us. diff --git a/net/arp/arp_dump.c b/net/arp/arp_dump.c index 50ea5a27e5a236fba6371f63d323a4e06985d3b1..8466763d859fded1b518b475c8302e643d030446 100644 --- a/net/arp/arp_dump.c +++ b/net/arp/arp_dump.c @@ -69,20 +69,20 @@ void arp_dump(FAR struct arp_hdr_s *arp) { - nlldbg(" HW type: %04x Protocol: %04x\n", - arp->ah_hwtype, arp->ah_protocol); - nlldbg(" HW len: %02x Proto len: %02x Operation: %04x\n", - arp->ah_hwlen, arp->ah_protolen, arp->ah_opcode); - nlldbg(" Sender MAC: %02x:%02x:%02x:%02x:%02x:%02x IP: %d.%d.%d.%d\n", - arp->ah_shwaddr[0], arp->ah_shwaddr[1], arp->ah_shwaddr[2], - arp->ah_shwaddr[3], arp->ah_shwaddr[4], arp->ah_shwaddr[5], - arp->ah_sipaddr[0] & 0xff, arp->ah_sipaddr[0] >> 8, - arp->ah_sipaddr[1] & 0xff, arp->ah_sipaddr[1] >> 8); - nlldbg(" Dest MAC: %02x:%02x:%02x:%02x:%02x:%02x IP: %d.%d.%d.%d\n", - arp->ah_dhwaddr[0], arp->ah_dhwaddr[1], arp->ah_dhwaddr[2], - arp->ah_dhwaddr[3], arp->ah_dhwaddr[4], arp->ah_dhwaddr[5], - arp->ah_dipaddr[0] & 0xff, arp->ah_dipaddr[0] >> 8, - arp->ah_dipaddr[1] & 0xff, arp->ah_dipaddr[1] >> 8); + ninfo(" HW type: %04x Protocol: %04x\n", + arp->ah_hwtype, arp->ah_protocol); + ninfo(" HW len: %02x Proto len: %02x Operation: %04x\n", + arp->ah_hwlen, arp->ah_protolen, arp->ah_opcode); + ninfo(" Sender MAC: %02x:%02x:%02x:%02x:%02x:%02x IP: %d.%d.%d.%d\n", + arp->ah_shwaddr[0], arp->ah_shwaddr[1], arp->ah_shwaddr[2], + arp->ah_shwaddr[3], arp->ah_shwaddr[4], arp->ah_shwaddr[5], + arp->ah_sipaddr[0] & 0xff, arp->ah_sipaddr[0] >> 8, + arp->ah_sipaddr[1] & 0xff, arp->ah_sipaddr[1] >> 8); + ninfo(" Dest MAC: %02x:%02x:%02x:%02x:%02x:%02x IP: %d.%d.%d.%d\n", + arp->ah_dhwaddr[0], arp->ah_dhwaddr[1], arp->ah_dhwaddr[2], + arp->ah_dhwaddr[3], arp->ah_dhwaddr[4], arp->ah_dhwaddr[5], + arp->ah_dipaddr[0] & 0xff, arp->ah_dipaddr[0] >> 8, + arp->ah_dipaddr[1] & 0xff, arp->ah_dipaddr[1] >> 8); } #endif /* CONFIG_NET_ARP_DUMP */ diff --git a/net/arp/arp_out.c b/net/arp/arp_out.c index 563d601337d5e67eb193964c5f61b4c6ae900ae7..667851a200f6b2d2406fc27991ae420c9de5fb01 100644 --- a/net/arp/arp_out.c +++ b/net/arp/arp_out.c @@ -231,7 +231,7 @@ void arp_out(FAR struct net_driver_s *dev) tabptr = arp_find(ipaddr); if (!tabptr) { - nllvdbg("ARP request for IP %08lx\n", (unsigned long)ipaddr); + ninfo("ARP request for IP %08lx\n", (unsigned long)ipaddr); /* The destination address was not in our ARP table, so we * overwrite the IP packet with an ARP request. diff --git a/net/arp/arp_send.c b/net/arp/arp_send.c index 0fff9041c3210008df0de0f16a82459677e2447a..faec0a13f460d4b46bd68c5ece3bb6551fbfd40b 100644 --- a/net/arp/arp_send.c +++ b/net/arp/arp_send.c @@ -102,7 +102,7 @@ static uint16_t arp_send_interrupt(FAR struct net_driver_s *dev, { FAR struct arp_send_s *state = (FAR struct arp_send_s *)priv; - nllvdbg("flags: %04x sent: %d\n", flags, state->snd_sent); + ninfo("flags: %04x sent: %d\n", flags, state->snd_sent); if (state) { @@ -110,7 +110,7 @@ static uint16_t arp_send_interrupt(FAR struct net_driver_s *dev, if ((flags & NETDEV_DOWN) != 0) { - nlldbg("ERROR: Interface is down\n"); + nerr("ERROR: Interface is down\n"); arp_send_terminate(state, -ENETUNREACH); return flags; } @@ -230,7 +230,7 @@ int arp_send(in_addr_t ipaddr) #endif if (!dev) { - ndbg("ERROR: Unreachable: %08lx\n", (unsigned long)ipaddr); + nerr("ERROR: Unreachable: %08lx\n", (unsigned long)ipaddr); ret = -EHOSTUNREACH; goto errout; } @@ -285,7 +285,7 @@ int arp_send(in_addr_t ipaddr) state.snd_cb = arp_callback_alloc(dev); if (!state.snd_cb) { - ndbg("ERROR: Failed to allocate a callback\n"); + nerr("ERROR: Failed to allocate a callback\n"); ret = -ENOMEM; goto errout_with_lock; } @@ -368,7 +368,7 @@ int arp_send(in_addr_t ipaddr) { /* Break out on a send failure */ - ndbg("ERROR: Send failed: %d\n", ret); + nerr("ERROR: Send failed: %d\n", ret); break; } @@ -396,7 +396,7 @@ int arp_send(in_addr_t ipaddr) /* Increment the retry count */ state.snd_retries++; - ndbg("ERROR: arp_wait failed: %d\n", ret); + nerr("ERROR: arp_wait failed: %d\n", ret); } sem_destroy(&state.snd_sem); diff --git a/net/arp/arp_table.c b/net/arp/arp_table.c index bdb27ad79dd9280f73ad680e1195be20cc851f65..928ed5901939adf879e55ce8f8f8bd0c742894a6 100644 --- a/net/arp/arp_table.c +++ b/net/arp/arp_table.c @@ -260,7 +260,7 @@ void arp_hdr_update(FAR uint16_t *pipaddr, FAR uint8_t *ethaddr) * * Assumptions * Interrupts are disabled; Returned value will become unstable when - * interrupts are re-enabled or if any other uIP APIs are called. + * interrupts are re-enabled or if any other network APIs are called. * ****************************************************************************/ diff --git a/net/devif/devif.h b/net/devif/devif.h index 2251ffcad0e00bfa8219a06d7ebdbc8a142e01d4..bca098789683060863d1b72f74a598b57b469d69 100644 --- a/net/devif/devif.h +++ b/net/devif/devif.h @@ -426,8 +426,8 @@ uint16_t devif_dev_event(FAR struct net_driver_s *dev, void *pvconn, * processing can send data. * * The amount of data that actually is sent out after a call to this - * function is determined by the maximum amount of data TCP allows. uIP - * will automatically crop the data so that only the appropriate + * function is determined by the maximum amount of data TCP allows. The + * network will automatically crop the data so that only the appropriate * amount of data is sent. The mss field of the TCP connection structure * can be used to determine the amount of data that actually will be sent. * diff --git a/net/devif/devif_callback.c b/net/devif/devif_callback.c index fc89eaf7d593adb159ed83c8cf325d6ba4377922..01986a3a9e801a84678088b652a9ce04120ee1b2 100644 --- a/net/devif/devif_callback.c +++ b/net/devif/devif_callback.c @@ -86,7 +86,7 @@ static void devif_callback_free(FAR struct net_driver_s *dev, { save = net_lock(); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Check for double freed callbacks */ curr = g_cbfreelist; @@ -257,10 +257,10 @@ FAR struct devif_callback_s * *list = ret; } } -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES else { - nlldbg("Failed to allocate callback\n"); + nerr("ERROR: Failed to allocate callback\n"); } #endif @@ -410,7 +410,7 @@ uint16_t devif_conn_event(FAR struct net_driver_s *dev, void *pvconn, * beginning of the list (which will be ignored on this pass) */ - nllvdbg("Call event=%p with flags=%04x\n", list->event, flags); + ninfo("Call event=%p with flags=%04x\n", list->event, flags); flags = list->event(dev, pvconn, list->priv, flags); } @@ -475,7 +475,7 @@ uint16_t devif_dev_event(FAR struct net_driver_s *dev, void *pvconn, * beginning of the list (which will be ignored on this pass) */ - nllvdbg("Call event=%p with flags=%04x\n", cb->event, flags); + ninfo("Call event=%p with flags=%04x\n", cb->event, flags); flags = cb->event(dev, pvconn, cb->priv, flags); } diff --git a/net/devif/devif_poll.c b/net/devif/devif_poll.c index 3ec68be4f394e36ec4550d4361b053040b62aeb5..928b779fb382a039f1ba9d4ea9a08eccd790c26d 100644 --- a/net/devif/devif_poll.c +++ b/net/devif/devif_poll.c @@ -296,7 +296,7 @@ static inline int devif_poll_tcp_timer(FAR struct net_driver_s *dev, * Function: devif_poll * * Description: - * This function will traverse each active uIP connection structure and + * This function will traverse each active network connection structure and * will perform network polling operations. devif_poll() may be called * asynchronously with the network driver can accept another outgoing * packet. @@ -307,7 +307,7 @@ static inline int devif_poll_tcp_timer(FAR struct net_driver_s *dev, * should do only if it cannot accept further write data). * * When the callback function is called, there may be an outbound packet - * waiting for service in the uIP packet buffer, and if so the d_len field + * waiting for service in the device packet buffer, and if so the d_len field * is set to a value larger than zero. The device driver should then send * out the packet. * @@ -400,7 +400,7 @@ int devif_poll(FAR struct net_driver_s *dev, devif_poll_callback_t callback) * Function: devif_timer * * Description: - * These function will traverse each active uIP connection structure and + * These function will traverse each active network connection structure and * perform network timer operations. The Ethernet driver MUST implement * logic to periodically call devif_timer(). * @@ -410,7 +410,7 @@ int devif_poll(FAR struct net_driver_s *dev, devif_poll_callback_t callback) * should do only if it cannot accept further write data). * * When the callback function is called, there may be an outbound packet - * waiting for service in the uIP packet buffer, and if so the d_len field + * waiting for service in the device packet buffer, and if so the d_len field * is set to a value larger than zero. The device driver should then send * out the packet. * diff --git a/net/devif/ipv4_input.c b/net/devif/ipv4_input.c index 1b3caf5087fbaf336492876f6ca3b632e635bc4b..ee959754e23e8fa56a59f4b4bf2363a5dadc1b26 100644 --- a/net/devif/ipv4_input.c +++ b/net/devif/ipv4_input.c @@ -116,10 +116,6 @@ #define TCP_REASS_BUFSIZE (NET_DEV_MTU(dev) - NET_LL_HDRLEN(dev)) #define TCP_REASS_LASTFRAG 0x01 -/**************************************************************************** - * Public Data - ****************************************************************************/ - /**************************************************************************** * Private Data ****************************************************************************/ @@ -323,6 +319,7 @@ nullreturn: int ipv4_input(FAR struct net_driver_s *dev) { FAR struct ipv4_hdr_s *pbuf = BUF; + uint16_t hdrlen; uint16_t iplen; /* This is where the input processing starts. */ @@ -342,10 +339,22 @@ int ipv4_input(FAR struct net_driver_s *dev) g_netstats.ipv4.drop++; g_netstats.ipv4.vhlerr++; #endif - nlldbg("Invalid IP version or header length: %02x\n", pbuf->vhl); + nwarn("WARNING: Invalid IP version or header length: %02x\n", + pbuf->vhl); goto drop; } + /* Get the size of the packet minus the size of link layer header */ + + hdrlen = NET_LL_HDRLEN(dev); + if ((hdrlen + IPv4_HDRLEN) > dev->d_len) + { + nwarn("WARNING: Packet shorter than IPv4 header\n"); + goto drop; + } + + dev->d_len -= hdrlen; + /* Check the size of the packet. If the size reported to us in d_len is * smaller the size reported in the IP header, we assume that the packet * has been corrupted in transit. If the size of d_len is larger than the @@ -360,7 +369,7 @@ int ipv4_input(FAR struct net_driver_s *dev) } else { - nlldbg("IP packet shorter than length in IP header\n"); + nwarn("WARNING: IP packet shorter than length in IP header\n"); goto drop; } @@ -379,7 +388,7 @@ int ipv4_input(FAR struct net_driver_s *dev) g_netstats.ipv4.drop++; g_netstats.ipv4.fragerr++; #endif - nlldbg("IP fragment dropped\n"); + nwarn("WARNING: IP fragment dropped\n"); goto drop; #endif /* CONFIG_NET_TCP_REASSEMBLY */ } @@ -405,7 +414,7 @@ int ipv4_input(FAR struct net_driver_s *dev) #ifdef CONFIG_NET_ICMP if (net_ipv4addr_cmp(dev->d_ipaddr, INADDR_ANY)) { - nlldbg("No IP address assigned\n"); + nwarn("WARNING: No IP address assigned\n"); goto drop; } @@ -438,7 +447,7 @@ int ipv4_input(FAR struct net_driver_s *dev) g_netstats.ipv4.drop++; g_netstats.ipv4.chkerr++; #endif - nlldbg("Bad IP checksum\n"); + nwarn("WARNING: Bad IP checksum\n"); goto drop; } @@ -486,7 +495,7 @@ int ipv4_input(FAR struct net_driver_s *dev) g_netstats.ipv4.protoerr++; #endif - nlldbg("Unrecognized IP protocol\n"); + nwarn("WARNING: Unrecognized IP protocol\n"); goto drop; } diff --git a/net/devif/ipv6_input.c b/net/devif/ipv6_input.c index f5be1751f0840ab4359414ce9c31d3b9e6954a92..d51d7aa80502ba797e109fb60321026ea5935bf4 100644 --- a/net/devif/ipv6_input.c +++ b/net/devif/ipv6_input.c @@ -108,18 +108,6 @@ #define IPv6BUF ((FAR struct ipv6_hdr_s *)&dev->d_buf[NET_LL_HDRLEN(dev)]) -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -142,6 +130,7 @@ int ipv6_input(FAR struct net_driver_s *dev) { FAR struct ipv6_hdr_s *ipv6 = IPv6BUF; + uint16_t hdrlen; uint16_t pktlen; /* This is where the input processing starts. */ @@ -162,10 +151,21 @@ int ipv6_input(FAR struct net_driver_s *dev) g_netstats.ipv6.vhlerr++; #endif - nlldbg("ERROR: Invalid IPv6 version: %d\n", ipv6->vtc >> 4); + nwarn("WARNING: Invalid IPv6 version: %d\n", ipv6->vtc >> 4); goto drop; } + /* Get the size of the packet minus the size of link layer header */ + + hdrlen = NET_LL_HDRLEN(dev); + if ((hdrlen + IPv6_HDRLEN) > dev->d_len) + { + nwarn("WARNING: Packet shorter than IPv6 header\n"); + goto drop; + } + + dev->d_len -= hdrlen; + /* Check the size of the packet. If the size reported to us in d_len is * smaller the size reported in the IP header, we assume that the packet * has been corrupted in transit. If the size of d_len is larger than the @@ -187,7 +187,7 @@ int ipv6_input(FAR struct net_driver_s *dev) } else { - nlldbg("ERROR: IP packet shorter than length in IP header\n"); + nwarn("WARNING: IP packet shorter than length in IP header\n"); goto drop; } @@ -216,7 +216,7 @@ int ipv6_input(FAR struct net_driver_s *dev) * packets. */ - nlldbg("ERROR: No IP address assigned\n"); + nwarn("WARNING: No IP address assigned\n"); goto drop; } @@ -279,7 +279,7 @@ int ipv6_input(FAR struct net_driver_s *dev) g_netstats.ipv6.protoerr++; #endif - nlldbg("ERROR: Unrecognized IP protocol: %04x\n", ipv6->proto); + nwarn("WARNING: Unrecognized IP protocol: %04x\n", ipv6->proto); goto drop; } diff --git a/net/icmp/icmp_input.c b/net/icmp/icmp_input.c index 2d919b8f7634038a5a74a919a74b6a0df1fe0c76..ff822e493a23e5c07e3023dcbb152e352659a31a 100644 --- a/net/icmp/icmp_input.c +++ b/net/icmp/icmp_input.c @@ -140,7 +140,7 @@ void icmp_input(FAR struct net_driver_s *dev) } #endif - nllvdbg("Outgoing ICMP packet length: %d (%d)\n", + ninfo("Outgoing ICMP packet length: %d (%d)\n", dev->d_len, (picmp->len[0] << 8) | picmp->len[1]); #ifdef CONFIG_NET_STATISTICS @@ -164,7 +164,7 @@ void icmp_input(FAR struct net_driver_s *dev) else { - nlldbg("Unknown ICMP cmd: %d\n", picmp->type); + nwarn("WARNING: Unknown ICMP cmd: %d\n", picmp->type); goto typeerr; } diff --git a/net/icmp/icmp_ping.c b/net/icmp/icmp_ping.c index 337968bf8435d4ba1ea587c2fafa41b7d39cab76..a121ddfbbdb2c84ff457c5299a30ebb74091b266 100644 --- a/net/icmp/icmp_ping.c +++ b/net/icmp/icmp_ping.c @@ -154,7 +154,7 @@ static uint16_t ping_interrupt(FAR struct net_driver_s *dev, FAR void *conn, FAR uint8_t *ptr; int i; - nllvdbg("flags: %04x\n", flags); + ninfo("flags: %04x\n", flags); if (pstate) { @@ -162,7 +162,7 @@ static uint16_t ping_interrupt(FAR struct net_driver_s *dev, FAR void *conn, if ((flags & NETDEV_DOWN) != 0) { - nlldbg("ERROR: Interface is down\n"); + nerr("ERROR: Interface is down\n"); pstate->png_result = -ENETUNREACH; goto end_wait; } @@ -177,8 +177,8 @@ static uint16_t ping_interrupt(FAR struct net_driver_s *dev, FAR void *conn, { FAR struct icmp_iphdr_s *icmp = (FAR struct icmp_iphdr_s *)conn; - nllvdbg("ECHO reply: id=%d seqno=%d\n", - ntohs(icmp->id), ntohs(icmp->seqno)); + ninfo("ECHO reply: id=%d seqno=%d\n", + ntohs(icmp->id), ntohs(icmp->seqno)); if (ntohs(icmp->id) == pstate->png_id) { @@ -236,7 +236,7 @@ static uint16_t ping_interrupt(FAR struct net_driver_s *dev, FAR void *conn, * of the ICMP header. */ - nllvdbg("Send ECHO request: seqno=%d\n", pstate->png_seqno); + ninfo("Send ECHO request: seqno=%d\n", pstate->png_seqno); dev->d_sndlen = pstate->png_datlen + 4; icmp_send(dev, &pstate->png_addr); @@ -262,12 +262,12 @@ static uint16_t ping_interrupt(FAR struct net_driver_s *dev, FAR void *conn, * that the destination address is not reachable. */ - nlldbg("Not reachable\n"); + nerr("ERROR:Not reachable\n"); failcode = -ENETUNREACH; } else { - nlldbg("Ping timeout\n"); + nerr("ERROR:Ping timeout\n"); failcode = -ETIMEDOUT; } @@ -283,7 +283,7 @@ static uint16_t ping_interrupt(FAR struct net_driver_s *dev, FAR void *conn, return flags; end_wait: - nllvdbg("Resuming\n"); + ninfo("Resuming\n"); /* Do not allow any further callbacks */ @@ -347,7 +347,7 @@ int icmp_ping(in_addr_t addr, uint16_t id, uint16_t seqno, uint16_t datalen, #endif if (dev == 0) { - ndbg("ERROR: Not reachable\n"); + nerr("ERROR: Not reachable\n"); return -ENETUNREACH; } @@ -357,7 +357,7 @@ int icmp_ping(in_addr_t addr, uint16_t id, uint16_t seqno, uint16_t datalen, ret = arp_send(addr); if (ret < 0) { - ndbg("ERROR: Not reachable\n"); + nerr("ERROR: Not reachable\n"); return -ENETUNREACH; } #endif @@ -397,7 +397,7 @@ int icmp_ping(in_addr_t addr, uint16_t id, uint16_t seqno, uint16_t datalen, * re-enabled when the task restarts. */ - nllvdbg("Start time: 0x%08x seqno: %d\n", state.png_time, seqno); + ninfo("Start time: 0x%08x seqno: %d\n", state.png_time, seqno); net_lockedwait(&state.png_sem); icmp_callback_free(dev, state.png_cb); @@ -411,12 +411,12 @@ int icmp_ping(in_addr_t addr, uint16_t id, uint16_t seqno, uint16_t datalen, if (!state.png_result) { - nllvdbg("Return seqno=%d\n", state.png_seqno); + ninfo("Return seqno=%d\n", state.png_seqno); return (int)state.png_seqno; } else { - nlldbg("Return error=%d\n", -state.png_result); + nerr("ERROR: Return error=%d\n", -state.png_result); return state.png_result; } } diff --git a/net/icmp/icmp_send.c b/net/icmp/icmp_send.c index b92e992704dfa025e7ac66224e9326e2e2254cd9..768451c9d71e4330d58966716facabbe9f3e1ce3 100644 --- a/net/icmp/icmp_send.c +++ b/net/icmp/icmp_send.c @@ -131,7 +131,7 @@ void icmp_send(FAR struct net_driver_s *dev, FAR in_addr_t *destaddr) picmp->icmpchksum = 0xffff; } - nllvdbg("Outgoing ICMP packet length: %d (%d)\n", + ninfo("Outgoing ICMP packet length: %d (%d)\n", dev->d_len, (picmp->len[0] << 8) | picmp->len[1]); #ifdef CONFIG_NET_STATISTICS diff --git a/net/icmpv6/icmpv6_advertise.c b/net/icmpv6/icmpv6_advertise.c index c30456d85591285e8d66f9b7740b31ecca08ec2b..68d417873af0fc91f696f51292c156fd551ca538 100644 --- a/net/icmpv6/icmpv6_advertise.c +++ b/net/icmpv6/icmpv6_advertise.c @@ -180,7 +180,7 @@ void icmpv6_advertise(FAR struct net_driver_s *dev, IFF_SET_NOARP(dev->d_flags); - nllvdbg("Outgoing ICMPv6 Neighbor Advertise length: %d (%d)\n", + ninfo("Outgoing ICMPv6 Neighbor Advertise length: %d (%d)\n", dev->d_len, (icmp->len[0] << 8) | icmp->len[1]); #ifdef CONFIG_NET_STATISTICS diff --git a/net/icmpv6/icmpv6_autoconfig.c b/net/icmpv6/icmpv6_autoconfig.c index 7899f07451abd1e1df9582eafddc0dfa5f09d06a..eb404e781238eb67ec82d7a24e2fae4b776d4a68 100644 --- a/net/icmpv6/icmpv6_autoconfig.c +++ b/net/icmpv6/icmpv6_autoconfig.c @@ -119,7 +119,7 @@ static uint16_t icmpv6_router_interrupt(FAR struct net_driver_s *dev, { FAR struct icmpv6_router_s *state = (FAR struct icmpv6_router_s *)priv; - nllvdbg("flags: %04x sent: %d\n", flags, state->snd_sent); + ninfo("flags: %04x sent: %d\n", flags, state->snd_sent); if (state) { @@ -127,7 +127,7 @@ static uint16_t icmpv6_router_interrupt(FAR struct net_driver_s *dev, if ((flags & NETDEV_DOWN) != 0) { - nlldbg("ERROR: Interface is down\n"); + nerr("ERROR: Interface is down\n"); icmpv6_router_terminate(state, -ENETUNREACH); return flags; } @@ -225,7 +225,7 @@ static int icmpv6_send_message(FAR struct net_driver_s *dev, bool advertise) state.snd_cb = icmpv6_callback_alloc(dev); if (!state.snd_cb) { - ndbg("ERROR: Failed to allocate a cllback\n"); + nerr("ERROR: Failed to allocate a cllback\n"); ret = -ENOMEM; goto errout_with_semaphore; } @@ -341,7 +341,7 @@ int icmpv6_autoconfig(FAR struct net_driver_s *dev) #ifndef CONFIG_NET_ETHERNET /* Only Ethernet supported for now */ - ndbg("ERROR: Only Ethernet is supported\n"); + nerr("ERROR: Only Ethernet is supported\n"); return -ENOSYS; #else /* CONFIG_NET_ETHERNET */ @@ -354,14 +354,14 @@ int icmpv6_autoconfig(FAR struct net_driver_s *dev) /* Sanity checks */ DEBUGASSERT(dev); - nvdbg("Auto-configuring %s\n", dev->d_ifname); + ninfo("Auto-configuring %s\n", dev->d_ifname); #ifdef CONFIG_NET_MULTILINK /* Only Ethernet devices are supported for now */ if (dev->d_lltype != NET_LL_ETHERNET) { - ndbg("ERROR: Only Ethernet is supported\n"); + nerr("ERROR: Only Ethernet is supported\n"); return -ENOSYS; } #endif @@ -402,7 +402,7 @@ int icmpv6_autoconfig(FAR struct net_driver_s *dev) memcpy(&lladdr[5], dev->d_mac.ether_addr_octet, sizeof(struct ether_addr)); /* 48-bit Ethernet address */ - nvdbg("lladdr=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", + ninfo("lladdr=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", lladdr[0], lladdr[1], lladdr[2], lladdr[3], lladdr[4], lladdr[6], lladdr[6], lladdr[7]); @@ -439,7 +439,7 @@ int icmpv6_autoconfig(FAR struct net_driver_s *dev) * have not back-up plan in place. Just bail. */ - ndbg("ERROR: IP conflict\n"); + nerr("ERROR: IP conflict\n"); return -EEXIST; } #endif @@ -477,7 +477,7 @@ int icmpv6_autoconfig(FAR struct net_driver_s *dev) ret = icmpv6_send_message(dev, false); if (ret < 0) { - ndbg("ERROR: Failed send router solicitation: %d\n", ret); + nerr("ERROR: Failed send router solicitation: %d\n", ret); break; } @@ -493,7 +493,7 @@ int icmpv6_autoconfig(FAR struct net_driver_s *dev) break; } - nvdbg("Timed out... retrying %d\n", retries + 1); + ninfo("Timed out... retrying %d\n", retries + 1); } /* Check for failures. Note: On successful return, the network will be @@ -502,7 +502,7 @@ int icmpv6_autoconfig(FAR struct net_driver_s *dev) if (ret < 0) { - ndbg("ERROR: Failed to get the router advertisement: %d (retries=%d)\n", + nerr("ERROR: Failed to get the router advertisement: %d (retries=%d)\n", ret, retries); /* Claim the link local address as ours by sending the ICMPv6 Neighbor @@ -512,7 +512,7 @@ int icmpv6_autoconfig(FAR struct net_driver_s *dev) ret = icmpv6_send_message(dev, true); if (ret < 0) { - ndbg("ERROR: Failed send neighbor advertisement: %d\n", ret); + nerr("ERROR: Failed send neighbor advertisement: %d\n", ret); netdev_ifdown(dev); } diff --git a/net/icmpv6/icmpv6_input.c b/net/icmpv6/icmpv6_input.c index 3ffc30662ee89624a9e00c7ef2fe3153170c766a..21f171fbf84ceb6276b355ebd78bdaea5dcfc0e4 100644 --- a/net/icmpv6/icmpv6_input.c +++ b/net/icmpv6/icmpv6_input.c @@ -307,12 +307,12 @@ void icmpv6_input(FAR struct net_driver_s *dev) default: { - nlldbg("Unknown ICMPv6 type: %d\n", icmp->type); + nwarn("WARNING: Unknown ICMPv6 type: %d\n", icmp->type); goto icmpv6_type_error; } } - nllvdbg("Outgoing ICMPv6 packet length: %d (%d)\n", + ninfo("Outgoing ICMPv6 packet length: %d (%d)\n", dev->d_len, (icmp->len[0] << 8) | icmp->len[1]); #ifdef CONFIG_NET_STATISTICS diff --git a/net/icmpv6/icmpv6_neighbor.c b/net/icmpv6/icmpv6_neighbor.c index d2de41650435cf79632cdc0d03227e879b181f49..9bb02f34b4f41e34b1610929c6694c6707abd200 100644 --- a/net/icmpv6/icmpv6_neighbor.c +++ b/net/icmpv6/icmpv6_neighbor.c @@ -103,7 +103,7 @@ static uint16_t icmpv6_neighbor_interrupt(FAR struct net_driver_s *dev, { FAR struct icmpv6_neighbor_s *state = (FAR struct icmpv6_neighbor_s *)priv; - nllvdbg("flags: %04x sent: %d\n", flags, state->snd_sent); + ninfo("flags: %04x sent: %d\n", flags, state->snd_sent); if (state) { @@ -232,7 +232,7 @@ int icmpv6_neighbor(const net_ipv6addr_t ipaddr) #endif if (!dev) { - ndbg("ERROR: Unreachable: %08lx\n", (unsigned long)ipaddr); + nerr("ERROR: Unreachable: %08lx\n", (unsigned long)ipaddr); ret = -EHOSTUNREACH; goto errout; } @@ -298,7 +298,7 @@ int icmpv6_neighbor(const net_ipv6addr_t ipaddr) state.snd_cb = icmpv6_callback_alloc(dev); if (!state.snd_cb) { - ndbg("ERROR: Failed to allocate a cllback\n"); + nerr("ERROR: Failed to allocate a callback\n"); ret = -ENOMEM; goto errout_with_lock; } diff --git a/net/icmpv6/icmpv6_ping.c b/net/icmpv6/icmpv6_ping.c index 0e9ac3b691394d6903294e258f24054396bacc25..507d09a266a68d7bbca5885458849ca698a4bb26 100644 --- a/net/icmpv6/icmpv6_ping.c +++ b/net/icmpv6/icmpv6_ping.c @@ -164,7 +164,7 @@ static void icmpv6_echo_request(FAR struct net_driver_s *dev, uint16_t reqlen; int i; - nllvdbg("Send ECHO request: seqno=%d\n", pstate->png_seqno); + ninfo("Send ECHO request: seqno=%d\n", pstate->png_seqno); /* Set up the IPv6 header (most is probably already in place) */ @@ -217,8 +217,8 @@ static void icmpv6_echo_request(FAR struct net_driver_s *dev, dev->d_sndlen = reqlen; dev->d_len = reqlen + IPv6_HDRLEN; - nllvdbg("Outgoing ICMPv6 Echo Request length: %d (%d)\n", - dev->d_len, (icmp->len[0] << 8) | icmp->len[1]); + ninfo("Outgoing ICMPv6 Echo Request length: %d (%d)\n", + dev->d_len, (icmp->len[0] << 8) | icmp->len[1]); #ifdef CONFIG_NET_STATISTICS g_netstats.icmpv6.sent++; @@ -253,7 +253,7 @@ static uint16_t ping_interrupt(FAR struct net_driver_s *dev, FAR void *conn, { FAR struct icmpv6_ping_s *pstate = (struct icmpv6_ping_s *)pvpriv; - nllvdbg("flags: %04x\n", flags); + ninfo("flags: %04x\n", flags); if (pstate) { @@ -261,7 +261,7 @@ static uint16_t ping_interrupt(FAR struct net_driver_s *dev, FAR void *conn, if ((flags & NETDEV_DOWN) != 0) { - nlldbg("ERROR: Interface is down\n"); + nerr("ERROR: Interface is down\n"); pstate->png_result = -ENETUNREACH; goto end_wait; } @@ -276,8 +276,8 @@ static uint16_t ping_interrupt(FAR struct net_driver_s *dev, FAR void *conn, { FAR struct icmpv6_echo_reply_s *reply = ICMPv6ECHOREPLY; - nllvdbg("ECHO reply: id=%d seqno=%d\n", - ntohs(reply->id), ntohs(reply->seqno)); + ninfo("ECHO reply: id=%d seqno=%d\n", + ntohs(reply->id), ntohs(reply->seqno)); if (ntohs(reply->id) == pstate->png_id) { @@ -336,12 +336,12 @@ static uint16_t ping_interrupt(FAR struct net_driver_s *dev, FAR void *conn, * reason is that the destination address is not reachable. */ - nlldbg("Not reachable\n"); + nerr("ERROR: Not reachable\n"); failcode = -ENETUNREACH; } else { - nlldbg("Ping timeout\n"); + nerr("ERROR: Ping timeout\n"); failcode = -ETIMEDOUT; } @@ -357,7 +357,7 @@ static uint16_t ping_interrupt(FAR struct net_driver_s *dev, FAR void *conn, return flags; end_wait: - nllvdbg("Resuming\n"); + ninfo("Resuming\n"); /* Do not allow any further callbacks */ @@ -417,7 +417,7 @@ int icmpv6_ping(net_ipv6addr_t addr, uint16_t id, uint16_t seqno, ret = icmpv6_neighbor(addr); if (ret < 0) { - ndbg("ERROR: Not reachable\n"); + nerr("ERROR: Not reachable\n"); return -ENETUNREACH; } #endif /* CONFIG_NET_ICMPv6_NEIGHBOR */ @@ -431,7 +431,7 @@ int icmpv6_ping(net_ipv6addr_t addr, uint16_t id, uint16_t seqno, #endif if (dev == 0) { - ndbg("ERROR: Not reachable\n"); + nerr("ERROR: Not reachable\n"); return -ENETUNREACH; } @@ -471,7 +471,7 @@ int icmpv6_ping(net_ipv6addr_t addr, uint16_t id, uint16_t seqno, * re-enabled when the task restarts. */ - nllvdbg("Start time: 0x%08x seqno: %d\n", state.png_time, seqno); + ninfo("Start time: 0x%08x seqno: %d\n", state.png_time, seqno); net_lockedwait(&state.png_sem); icmpv6_callback_free(dev, state.png_cb); @@ -485,12 +485,12 @@ int icmpv6_ping(net_ipv6addr_t addr, uint16_t id, uint16_t seqno, if (!state.png_result) { - nllvdbg("Return seqno=%d\n", state.png_seqno); + ninfo("Return seqno=%d\n", state.png_seqno); return (int)state.png_seqno; } else { - nlldbg("Return error=%d\n", -state.png_result); + nerr("ERROR: Return error=%d\n", -state.png_result); return state.png_result; } } diff --git a/net/icmpv6/icmpv6_radvertise.c b/net/icmpv6/icmpv6_radvertise.c index 09bd4c48579234474a9181afe14286eab83b2948..040d1e39f7adb5781f73d6352ad46e19c6ea1b8a 100644 --- a/net/icmpv6/icmpv6_radvertise.c +++ b/net/icmpv6/icmpv6_radvertise.c @@ -242,7 +242,7 @@ void icmpv6_radvertise(FAR struct net_driver_s *dev) IFF_SET_NOARP(dev->d_flags); - nllvdbg("Outgoing ICMPv6 Router Advertise length: %d (%d)\n", + ninfo("Outgoing ICMPv6 Router Advertise length: %d (%d)\n", dev->d_len, (icmp->len[0] << 8) | icmp->len[1]); #ifdef CONFIG_NET_STATISTICS diff --git a/net/icmpv6/icmpv6_rnotify.c b/net/icmpv6/icmpv6_rnotify.c index c8e38e3d633ace937592451789ba698b1f15bb42..bf1f1beffd5159dddc6ff9e6a17d505f1049113a 100644 --- a/net/icmpv6/icmpv6_rnotify.c +++ b/net/icmpv6/icmpv6_rnotify.c @@ -106,7 +106,7 @@ static void icmpv6_setaddresses(FAR struct net_driver_s *dev, net_ipv6_pref2mask(preflen, dev->d_ipv6netmask); - nvdbg("preflen=%d netmask=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", + ninfo("preflen=%d netmask=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", preflen, dev->d_ipv6netmask[0], dev->d_ipv6netmask[1], dev->d_ipv6netmask[2], dev->d_ipv6netmask[3], dev->d_ipv6netmask[4], dev->d_ipv6netmask[5], dev->d_ipv6netmask[6], dev->d_ipv6netmask[7]); @@ -119,10 +119,10 @@ static void icmpv6_setaddresses(FAR struct net_driver_s *dev, (prefix[i] & dev->d_ipv6netmask[i]); } - nvdbg("prefix=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", + ninfo("prefix=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", prefix[0], prefix[1], prefix[2], prefix[3], prefix[4], prefix[6], prefix[6], prefix[7]); - nvdbg("IP address=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", + ninfo("IP address=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2], dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[6], dev->d_ipv6addr[6], dev->d_ipv6addr[7]); @@ -131,7 +131,7 @@ static void icmpv6_setaddresses(FAR struct net_driver_s *dev, net_ipv6addr_copy(dev->d_ipv6draddr, draddr); - nvdbg("DR address=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", + ninfo("DR address=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", dev->d_ipv6draddr[0], dev->d_ipv6draddr[1], dev->d_ipv6draddr[2], dev->d_ipv6draddr[3], dev->d_ipv6draddr[4], dev->d_ipv6draddr[6], dev->d_ipv6draddr[6], dev->d_ipv6draddr[7]); @@ -212,7 +212,7 @@ int icmpv6_rwait_cancel(FAR struct icmpv6_rnotify_s *notify) irqstate_t flags; int ret = -ENOENT; - nvdbg("Cancelling...\n"); + ninfo("Cancelling...\n"); /* Remove our wait structure from the list (we may no longer be at the * head of the list). @@ -243,7 +243,7 @@ int icmpv6_rwait_cancel(FAR struct icmpv6_rnotify_s *notify) return ret; #else - nvdbg("Cancelling...\n"); + ninfo("Cancelling...\n"); /* If there is only one network device, then there can be only one entry * in the list of waiters. @@ -276,7 +276,7 @@ int icmpv6_rwait(FAR struct icmpv6_rnotify_s *notify, irqstate_t flags; int ret; - nvdbg("Waiting...\n"); + ninfo("Waiting...\n"); /* And wait for the Neighbor Advertisement (or a timeout). Interrupts will * be re-enabled while we wait. @@ -335,7 +335,7 @@ void icmpv6_rnotify(FAR struct net_driver_s *dev, const net_ipv6addr_t draddr, #ifdef CONFIG_NETDEV_MULTINIC FAR struct icmpv6_rnotify_s *curr; - nvdbg("Notified\n"); + ninfo("Notified\n"); /* Find an entry with the matching device name in the list of waiters */ @@ -364,7 +364,7 @@ void icmpv6_rnotify(FAR struct net_driver_s *dev, const net_ipv6addr_t draddr, #else FAR struct icmpv6_rnotify_s *waiter = g_icmpv6_rwaiters; - nvdbg("Notified\n"); + ninfo("Notified\n"); if (waiter) { diff --git a/net/icmpv6/icmpv6_rsolicit.c b/net/icmpv6/icmpv6_rsolicit.c index 58e60fdd3d8f292d71ab32fff2cae0ea867ee2d5..db21f7f0a72db98a9610130b34dae868441c8c3b 100644 --- a/net/icmpv6/icmpv6_rsolicit.c +++ b/net/icmpv6/icmpv6_rsolicit.c @@ -183,7 +183,7 @@ void icmpv6_rsolicit(FAR struct net_driver_s *dev) * outgoing packet. */ dev->d_len += netdev_ipv6_hdrlen(dev); - nllvdbg("Outgoing ICMPv6 Router Solicitation length: %d (%d)\n", + ninfo("Outgoing ICMPv6 Router Solicitation length: %d (%d)\n", dev->d_len, (icmp->len[0] << 8) | icmp->len[1]); #ifdef CONFIG_NET_STATISTICS diff --git a/net/icmpv6/icmpv6_solicit.c b/net/icmpv6/icmpv6_solicit.c index 7e84ccf7d50160d6b0e65ec10e1a431f4896882a..5a9c6e868a7a08cc273b83402c3f268f6eb021ef 100644 --- a/net/icmpv6/icmpv6_solicit.c +++ b/net/icmpv6/icmpv6_solicit.c @@ -211,7 +211,7 @@ void icmpv6_solicit(FAR struct net_driver_s *dev, * outgoing packet. */ dev->d_len += netdev_ipv6_hdrlen(dev); - nllvdbg("Outgoing ICMPv6 Neighbor Solicitation length: %d (%d)\n", + ninfo("Outgoing ICMPv6 Neighbor Solicitation length: %d (%d)\n", dev->d_len, (icmp->len[0] << 8) | icmp->len[1]); #ifdef CONFIG_NET_STATISTICS diff --git a/net/igmp/igmp_group.c b/net/igmp/igmp_group.c index 92b34427b40636263d9a9d7b729f233c502f188f..90e8fb657908dc0e9aaf53688b32e5edf3fbd0e2 100644 --- a/net/igmp/igmp_group.c +++ b/net/igmp/igmp_group.c @@ -88,27 +88,19 @@ #ifdef CONFIG_CPP_HAVE_VARARGS # ifdef IGMP_GRPDEBUG -# define grpdbg(format, ...) ndbg(format, ##__VA_ARGS__) -# define grplldbg(format, ...) nlldbg(format, ##__VA_ARGS__) -# define grpvdbg(format, ...) nvdbg(format, ##__VA_ARGS__) -# define grpllvdbg(format, ...) nllvdbg(format, ##__VA_ARGS__) +# define grperr(format, ...) nerr(format, ##__VA_ARGS__) +# define grpinfo(format, ...) ninfo(format, ##__VA_ARGS__) # else -# define grpdbg(x...) -# define grplldbg(x...) -# define grpvdbg(x...) -# define grpllvdbg(x...) +# define grperr(x...) +# define grpinfo(x...) # endif #else # ifdef IGMP_GRPDEBUG -# define grpdbg ndbg -# define grplldbg nlldbg -# define grpvdbg nvdbg -# define grpllvdbg nllvdbg +# define grperr nerr +# define grpinfo ninfo # else -# define grpdbg (void) -# define grplldbg (void) -# define grpvdbg (void) -# define grpllvdbg (void) +# define grperr (void) +# define grpinfo (void) # endif #endif @@ -194,7 +186,7 @@ void igmp_grpinit(void) FAR struct igmp_group_s *group; int i; - grplldbg("Initializing\n"); + grpinfo("Initializing\n"); #if CONFIG_PREALLOC_IGMPGROUPS > 0 for (i = 0; i < CONFIG_PREALLOC_IGMPGROUPS; i++) @@ -222,24 +214,24 @@ FAR struct igmp_group_s *igmp_grpalloc(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group; net_lock_t flags; - nllvdbg("addr: %08x dev: %p\n", *addr, dev); + ninfo("addr: %08x dev: %p\n", *addr, dev); if (up_interrupt_context()) { #if CONFIG_PREALLOC_IGMPGROUPS > 0 - grplldbg("Use a pre-allocated group entry\n"); + grpinfo("Use a pre-allocated group entry\n"); group = igmp_grpprealloc(); #else - grplldbg("Cannot allocate from interrupt handler\n"); + grperr("ERROR: Cannot allocate from interrupt handler\n"); group = NULL; #endif } else { - grplldbg("Allocate from the heap\n"); + grpinfo("Allocate from the heap\n"); group = igmp_grpheapalloc(); } - grplldbg("group: %p\n", group); + grpinfo("group: %p\n", group); /* Check if we successfully allocated a group structure */ @@ -285,7 +277,7 @@ FAR struct igmp_group_s *igmp_grpfind(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group; net_lock_t flags; - grplldbg("Searching for addr %08x\n", (int)*addr); + grpinfo("Searching for addr %08x\n", (int)*addr); /* We must disable interrupts because we don't which context we were * called from. @@ -296,10 +288,10 @@ FAR struct igmp_group_s *igmp_grpfind(FAR struct net_driver_s *dev, group; group = group->next) { - grplldbg("Compare: %08x vs. %08x\n", group->grpaddr, *addr); + grpinfo("Compare: %08x vs. %08x\n", group->grpaddr, *addr); if (net_ipv4addr_cmp(group->grpaddr, *addr)) { - grplldbg("Match!\n"); + grpinfo("Match!\n"); break; } } @@ -325,13 +317,13 @@ FAR struct igmp_group_s *igmp_grpallocfind(FAR struct net_driver_s *dev, { FAR struct igmp_group_s *group = igmp_grpfind(dev, addr); - grplldbg("group: %p addr: %08x\n", group, (int)*addr); + grpinfo("group: %p addr: %08x\n", group, (int)*addr); if (!group) { group = igmp_grpalloc(dev, addr); } - grplldbg("group: %p\n", group); + grpinfo("group: %p\n", group); return group; } @@ -350,7 +342,7 @@ void igmp_grpfree(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group) { net_lock_t flags; - grplldbg("Free: %p flags: %02x\n", group, group->flags); + grpinfo("Free: %p flags: %02x\n", group, group->flags); /* Cancel the wdog */ @@ -376,7 +368,7 @@ void igmp_grpfree(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group) #if CONFIG_PREALLOC_IGMPGROUPS > 0 if (IS_PREALLOCATED(group->flags)) { - grplldbg("Put back on free list\n"); + grpinfo("Put back on free list\n"); sq_addlast((FAR sq_entry_t *)group, &g_freelist); net_unlock(flags); } @@ -388,7 +380,7 @@ void igmp_grpfree(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group) */ net_unlock(flags); - grplldbg("Call sched_kfree()\n"); + grpinfo("Call sched_kfree()\n"); sched_kfree(group); } } diff --git a/net/igmp/igmp_initialize.c b/net/igmp/igmp_initialize.c index 1a92cb3ecf22bc78341653d73fd55eaf9907ebd0..84dd6f34c15beec55e11619abdb5033b83ada033 100644 --- a/net/igmp/igmp_initialize.c +++ b/net/igmp/igmp_initialize.c @@ -84,7 +84,7 @@ in_addr_t g_ipv4_allrouters; void igmp_initialize(void) { - nvdbg("IGMP initializing\n"); + ninfo("IGMP initializing\n"); net_ipaddr(g_ipv4_allrouters, 224, 0, 0, 2); net_ipaddr(g_ipv4_allsystems, 224, 0, 0, 1); @@ -105,7 +105,7 @@ void igmp_initialize(void) void igmp_devinit(struct net_driver_s *dev) { - nvdbg("IGMP initializing dev %p\n", dev); + ninfo("IGMP initializing dev %p\n", dev); DEBUGASSERT(dev->grplist.head == NULL); /* Add the all systems address to the group */ diff --git a/net/igmp/igmp_input.c b/net/igmp/igmp_input.c index c2b3c870a38d04bc520f2f105e0ee285dd4af7f7..d89569b5098b36f246d69fb2acb2725d597b3aa4 100644 --- a/net/igmp/igmp_input.c +++ b/net/igmp/igmp_input.c @@ -117,14 +117,14 @@ void igmp_input(struct net_driver_s *dev) in_addr_t grpaddr; unsigned int ticks; - nllvdbg("IGMP message: %04x%04x\n", IGMPBUF->destipaddr[1], IGMPBUF->destipaddr[0]); + ninfo("IGMP message: %04x%04x\n", IGMPBUF->destipaddr[1], IGMPBUF->destipaddr[0]); /* Verify the message length */ if (dev->d_len < NET_LL_HDRLEN(dev) + IPIGMP_HDRLEN) { IGMP_STATINCR(g_netstats.igmp.length_errors); - nlldbg("Length error\n"); + nwarn("WARNING: Length error\n"); return; } @@ -133,7 +133,7 @@ void igmp_input(struct net_driver_s *dev) if (net_chksum((FAR uint16_t *)&IGMPBUF->type, IGMP_HDRLEN) != 0) { IGMP_STATINCR(g_netstats.igmp.chksum_errors); - nlldbg("Checksum error\n"); + nwarn("WARNING: Checksum error\n"); return; } @@ -143,7 +143,7 @@ void igmp_input(struct net_driver_s *dev) group = igmp_grpallocfind(dev, &destipaddr); if (!group) { - nlldbg("Failed to allocate/find group: %08x\n", destipaddr); + nerr("ERROR: Failed to allocate/find group: %08x\n", destipaddr); return; } @@ -186,13 +186,13 @@ void igmp_input(struct net_driver_s *dev) /* This is the general query */ - nllvdbg("General multicast query\n"); + ninfo("General multicast query\n"); if (IGMPBUF->maxresp == 0) { IGMP_STATINCR(g_netstats.igmp.v1_received); IGMPBUF->maxresp = 10; - nlldbg("V1 not implemented\n"); + nwarn("WARNING: V1 not implemented\n"); } IGMP_STATINCR(g_netstats.igmp.query_received); @@ -216,7 +216,7 @@ void igmp_input(struct net_driver_s *dev) } else /* if (IGMPBUF->grpaddr != 0) */ { - nllvdbg("Group-specific multicast queury\n"); + ninfo("Group-specific multicast queury\n"); /* We first need to re-lookup the group since we used dest last time. * Use the incoming IPaddress! @@ -238,10 +238,10 @@ void igmp_input(struct net_driver_s *dev) else if (group->grpaddr != 0) { - nllvdbg("Unicast query\n"); + ninfo("Unicast query\n"); IGMP_STATINCR(g_netstats.igmp.ucast_query); - nlldbg("Query to a specific group with the group address as destination\n"); + ninfo("Query to a specific group with the group address as destination\n"); ticks = net_dsec2tick((int)IGMPBUF->maxresp); if (IS_IDLEMEMBER(group->flags) || igmp_cmptimer(group, ticks)) @@ -254,7 +254,7 @@ void igmp_input(struct net_driver_s *dev) case IGMPv2_MEMBERSHIP_REPORT: { - nllvdbg("Membership report\n"); + ninfo("Membership report\n"); IGMP_STATINCR(g_netstats.igmp.report_received); if (!IS_IDLEMEMBER(group->flags)) @@ -270,7 +270,7 @@ void igmp_input(struct net_driver_s *dev) default: { - nlldbg("Unexpected msg %02x\n", IGMPBUF->type); + nwarn("WARNING: Unexpected msg %02x\n", IGMPBUF->type); } break; } diff --git a/net/igmp/igmp_join.c b/net/igmp/igmp_join.c index 83ef65a0f88eea2a6be6317a1aa0c25ead652934..c72ebe3f0ae7d9e5c5de8fa7de1520fa59305fcd 100644 --- a/net/igmp/igmp_join.c +++ b/net/igmp/igmp_join.c @@ -129,7 +129,7 @@ int igmp_joingroup(struct net_driver_s *dev, FAR const struct in_addr *grpaddr) { /* No... allocate a new entry */ - nvdbg("Join to new group: %08x\n", grpaddr->s_addr); + ninfo("Join to new group: %08x\n", grpaddr->s_addr); group = igmp_grpalloc(dev, &grpaddr->s_addr); IGMP_STATINCR(g_netstats.igmp.joins); diff --git a/net/igmp/igmp_leave.c b/net/igmp/igmp_leave.c index 4035358e8f6e767ab544482f6c32f4a5d91d937f..8e40451101b68d76dc76531a64eabc501ff21967 100644 --- a/net/igmp/igmp_leave.c +++ b/net/igmp/igmp_leave.c @@ -134,7 +134,7 @@ int igmp_leavegroup(struct net_driver_s *dev, FAR const struct in_addr *grpaddr) /* Find the entry corresponding to the address leaving the group */ group = igmp_grpfind(dev, &grpaddr->s_addr); - ndbg("Leaving group: %p\n", group); + ninfo("Leaving group: %p\n", group); if (group) { /* Cancel the timer and discard any queued Membership Reports. Canceling @@ -155,7 +155,7 @@ int igmp_leavegroup(struct net_driver_s *dev, FAR const struct in_addr *grpaddr) if (IS_LASTREPORT(group->flags)) { - ndbg("Schedule Leave Group message\n"); + ninfo("Schedule Leave Group message\n"); IGMP_STATINCR(g_netstats.igmp.leave_sched); igmp_waitmsg(group, IGMP_LEAVE_GROUP); } @@ -172,7 +172,7 @@ int igmp_leavegroup(struct net_driver_s *dev, FAR const struct in_addr *grpaddr) /* Return ENOENT if the address is not a member of the group */ - nvdbg("Return -ENOENT\n"); + ninfo("Return -ENOENT\n"); return -ENOENT; } diff --git a/net/igmp/igmp_mcastmac.c b/net/igmp/igmp_mcastmac.c index 2172a281ec9b89ac6b47b91a9bbc5fb56d83107d..88c12a8cb7de69e023aa6ce58443db72d7fa8af6 100644 --- a/net/igmp/igmp_mcastmac.c +++ b/net/igmp/igmp_mcastmac.c @@ -79,7 +79,7 @@ static void igmp_mcastmac(in_addr_t *ip, FAR uint8_t *mac) mac[4] = ip4_addr3(*ip); mac[5] = ip4_addr4(*ip); - nvdbg("IP: %08x -> MAC: %02x%02x%02x%02x%02x%02x\n", + ninfo("IP: %08x -> MAC: %02x%02x%02x%02x%02x%02x\n", *ip, mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); } @@ -99,7 +99,7 @@ void igmp_addmcastmac(FAR struct net_driver_s *dev, FAR in_addr_t *ip) { uint8_t mcastmac[6]; - nvdbg("Adding: IP %08x\n", *ip); + ninfo("Adding: IP %08x\n", *ip); if (dev->d_addmac) { igmp_mcastmac(ip, mcastmac); @@ -119,7 +119,7 @@ void igmp_removemcastmac(FAR struct net_driver_s *dev, FAR in_addr_t *ip) { uint8_t mcastmac[6]; - nvdbg("Removing: IP %08x\n", *ip); + ninfo("Removing: IP %08x\n", *ip); if (dev->d_rmmac) { igmp_mcastmac(ip, mcastmac); diff --git a/net/igmp/igmp_poll.c b/net/igmp/igmp_poll.c index e7dfd1068399b0dcfcb95c2ef596e48c110db9b5..0fe705868fa3abde0689c3e87c80d70ad911826d 100644 --- a/net/igmp/igmp_poll.c +++ b/net/igmp/igmp_poll.c @@ -87,8 +87,8 @@ static inline void igmp_sched_send(FAR struct net_driver_s *dev, if (group->msgid == IGMPv2_MEMBERSHIP_REPORT) { dest = &group->grpaddr; - nllvdbg("Send IGMPv2_MEMBERSHIP_REPORT, dest=%08x flags=%02x\n", - *dest, group->flags); + ninfo("Send IGMPv2_MEMBERSHIP_REPORT, dest=%08x flags=%02x\n", + *dest, group->flags); IGMP_STATINCR(g_netstats.igmp.report_sched); SET_LASTREPORT(group->flags); /* Remember we were the last to report */ } @@ -96,8 +96,8 @@ static inline void igmp_sched_send(FAR struct net_driver_s *dev, { DEBUGASSERT(group->msgid == IGMP_LEAVE_GROUP); dest = &g_ipv4_allrouters; - nllvdbg("Send IGMP_LEAVE_GROUP, dest=%08x flags=%02x\n", - *dest, group->flags); + ninfo("Send IGMP_LEAVE_GROUP, dest=%08x flags=%02x\n", + *dest, group->flags); IGMP_STATINCR(g_netstats.igmp.leave_sched); } @@ -114,7 +114,7 @@ static inline void igmp_sched_send(FAR struct net_driver_s *dev, if (IS_WAITMSG(group->flags)) { - nllvdbg("Awakening waiter\n"); + ninfo("Awakening waiter\n"); sem_post(&group->sem); } } @@ -143,7 +143,7 @@ void igmp_poll(FAR struct net_driver_s *dev) { FAR struct igmp_group_s *group; - nllvdbg("Entry\n"); + ninfo("Entry\n"); /* Setup the poll operation */ diff --git a/net/igmp/igmp_send.c b/net/igmp/igmp_send.c index d40301495a0b73e91bc8a42220aca43c4f006142..7e51068ab252ddfeb33e1ad42ffcc71907a0358e 100644 --- a/net/igmp/igmp_send.c +++ b/net/igmp/igmp_send.c @@ -116,7 +116,7 @@ static uint16_t igmp_chksum(FAR uint8_t *buffer, int buflen) void igmp_send(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group, FAR in_addr_t *destipaddr) { - nllvdbg("msgid: %02x destipaddr: %08x\n", group->msgid, (int)*destipaddr); + ninfo("msgid: %02x destipaddr: %08x\n", group->msgid, (int)*destipaddr); /* The total length to send is the size of the IP and IGMP headers and 4 * bytes for the ROUTER ALERT (and, eventually, the Ethernet header) @@ -169,7 +169,7 @@ void igmp_send(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group, IGMP_STATINCR(g_netstats.igmp.poll_send); IGMP_STATINCR(g_netstats.ipv4.sent); - nllvdbg("Outgoing IGMP packet length: %d (%d)\n", + ninfo("Outgoing IGMP packet length: %d (%d)\n", dev->d_len, (IGMPBUF->len[0] << 8) | IGMPBUF->len[1]); igmp_dumppkt(RA, IPIGMP_HDRLEN + RASIZE); } diff --git a/net/igmp/igmp_timer.c b/net/igmp/igmp_timer.c index 5465a68f72ccb5176e8389d27c0807c0434522d3..e413eb75fb8879a46a502841f3d59335e27c5443 100644 --- a/net/igmp/igmp_timer.c +++ b/net/igmp/igmp_timer.c @@ -73,27 +73,19 @@ #ifdef CONFIG_CPP_HAVE_VARARGS # ifdef IGMP_GTMRDEBUG -# define gtmrdbg(format, ...) ndbg(format, ##__VA_ARGS__) -# define gtmrlldbg(format, ...) nlldbg(format, ##__VA_ARGS__) -# define gtmrvdbg(format, ...) nvdbg(format, ##__VA_ARGS__) -# define gtmrllvdbg(format, ...) nllvdbg(format, ##__VA_ARGS__) +# define gtmrerr(format, ...) nerr(format, ##__VA_ARGS__) +# define gtmrinfo(format, ...) ninfo(format, ##__VA_ARGS__) # else -# define gtmrdbg(x...) -# define gtmrlldbg(x...) -# define gtmrvdbg(x...) -# define gtmrllvdbg(x...) +# define gtmrerr(x...) +# define gtmrinfo(x...) # endif #else # ifdef IGMP_GTMRDEBUG -# define gtmrdbg ndbg -# define gtmrlldbg nlldbg -# define gtmrvdbg nvdbg -# define gtmrllvdbg nllvdbg +# define gtmrerr nerr +# define gtmrinfo ninfo # else -# define gtmrdbg (void) -# define gtmrlldbg (void) -# define gtmrvdbg (void) -# define gtmrllvdbg (void) +# define gtmrerr (void) +# define gtmrinfo (void) # endif #endif @@ -119,7 +111,7 @@ static void igmp_timeout(int argc, uint32_t arg, ...) /* If the state is DELAYING_MEMBER then we send a report for this group */ - nllvdbg("Timeout!\n"); + ninfo("Timeout!\n"); group = (FAR struct igmp_group_s *)arg; DEBUGASSERT(argc == 1 && group); @@ -170,7 +162,7 @@ void igmp_startticks(FAR struct igmp_group_s *group, unsigned int ticks) /* Start the timer */ - gtmrlldbg("ticks: %d\n", ticks); + gtmrinfo("ticks: %d\n", ticks); ret = wd_start(group->wdog, ticks, igmp_timeout, 1, (uint32_t)group); @@ -184,7 +176,7 @@ void igmp_starttimer(FAR struct igmp_group_s *group, uint8_t decisecs) * Important!! this should be a random timer from 0 to decisecs */ - gtmrdbg("decisecs: %d\n", decisecs); + gtmrinfo("decisecs: %d\n", decisecs); igmp_startticks(group, net_dsec2tick(decisecs)); } @@ -224,7 +216,7 @@ bool igmp_cmptimer(FAR struct igmp_group_s *group, int maxticks) * test as well. */ - gtmrdbg("maxticks: %d remaining: %d\n", maxticks, remaining); + gtmrinfo("maxticks: %d remaining: %d\n", maxticks, remaining); if (maxticks > remaining) { /* Cancel the watchdog timer and return true */ diff --git a/net/iob/Kconfig b/net/iob/Kconfig index e6018d64263929cb039b102c01f90724d1f3ee22..a5cec7e1178986efac13f30dabfc83d3da29010b 100644 --- a/net/iob/Kconfig +++ b/net/iob/Kconfig @@ -63,7 +63,7 @@ config IOB_THROTTLE config IOB_DEBUG bool "Force I/O buffer debug" default n - depends on DEBUG + depends on DEBUG_FEATURES ---help--- This option will force debug output from I/O buffer logic, even without network debug output. This is not normally something diff --git a/net/iob/Make.defs b/net/iob/Make.defs index 27827cff49876eb463ae004cbb14e6f7c6d3a44a..7f5f1d665b32cf0e5e1ede9dd31178bb9e24bd84 100644 --- a/net/iob/Make.defs +++ b/net/iob/Make.defs @@ -43,7 +43,7 @@ NET_CSRCS += iob_free_chain.c iob_free_qentry.c iob_free_queue.c NET_CSRCS += iob_initialize.c iob_pack.c iob_peek_queue.c iob_remove_queue.c NET_CSRCS += iob_trimhead.c iob_trimhead_queue.c iob_trimtail.c -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) NET_CSRCS += iob_dump.c endif diff --git a/net/iob/iob_add_queue.c b/net/iob/iob_add_queue.c index bc7e0adb8e48442d9dcdb199d9fbd349bd41bf47..b59646ef8d4996194df4a761d9f200a506a4e075 100644 --- a/net/iob/iob_add_queue.c +++ b/net/iob/iob_add_queue.c @@ -39,7 +39,7 @@ #include -#if defined(CONFIG_DEBUG) && defined(CONFIG_IOB_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_IOB_DEBUG) /* Force debug output (from this file only) */ # undef CONFIG_DEBUG_NET @@ -125,7 +125,7 @@ int iob_add_queue(FAR struct iob_s *iob, FAR struct iob_queue_s *iobq) qentry = iob_alloc_qentry(); if (!qentry) { - ndbg("ERROR: Failed to allocate a container\n"); + nerr("ERROR: Failed to allocate a container\n"); return -ENOMEM; } @@ -150,7 +150,7 @@ int iob_tryadd_queue(FAR struct iob_s *iob, FAR struct iob_queue_s *iobq) qentry = iob_tryalloc_qentry(); if (!qentry) { - nlldbg("ERROR: Failed to allocate a container\n"); + nerr("ERROR: Failed to allocate a container\n"); return -ENOMEM; } diff --git a/net/iob/iob_alloc.c b/net/iob/iob_alloc.c index e5483a2c3e68365caf75ba1a58f954e9316faaee..4b43320fcd79d9bff220374bff5695da83283f7b 100644 --- a/net/iob/iob_alloc.c +++ b/net/iob/iob_alloc.c @@ -39,7 +39,7 @@ #include -#if defined(CONFIG_DEBUG) && defined(CONFIG_IOB_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_IOB_DEBUG) /* Force debug output (from this file only) */ # undef CONFIG_DEBUG_NET diff --git a/net/iob/iob_alloc_qentry.c b/net/iob/iob_alloc_qentry.c index c1a9f54a97364ee13a59d32490472c88746904c9..5ba2e6205a0e9ff075af4ba600f19e6d8b12f424 100644 --- a/net/iob/iob_alloc_qentry.c +++ b/net/iob/iob_alloc_qentry.c @@ -39,7 +39,7 @@ #include -#if defined(CONFIG_DEBUG) && defined(CONFIG_IOB_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_IOB_DEBUG) /* Force debug output (from this file only) */ # undef CONFIG_DEBUG_NET diff --git a/net/iob/iob_clone.c b/net/iob/iob_clone.c index db29abde2421070e35d869a3d9c312b23c6ebe01..eb55a496bcf976fd01d38df97090d36a33b8ede7 100644 --- a/net/iob/iob_clone.c +++ b/net/iob/iob_clone.c @@ -39,7 +39,7 @@ #include -#if defined(CONFIG_DEBUG) && defined(CONFIG_IOB_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_IOB_DEBUG) /* Force debug output (from this file only) */ # undef CONFIG_DEBUG_NET @@ -168,7 +168,7 @@ int iob_clone(FAR struct iob_s *iob1, FAR struct iob_s *iob2, bool throttled) next = iob_alloc(throttled); if (!next) { - ndbg("Failed to allocate an I/O buffer/n"); + nerr("ERROR: Failed to allocate an I/O buffer/n"); return -ENOMEM; } diff --git a/net/iob/iob_concat.c b/net/iob/iob_concat.c index b543d63e6cc55915d882e54b5171a2eb8d86e896..99fff8e75a88a48fc61285323b20a192623c8e4f 100644 --- a/net/iob/iob_concat.c +++ b/net/iob/iob_concat.c @@ -39,7 +39,7 @@ #include -#if defined(CONFIG_DEBUG) && defined(CONFIG_IOB_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_IOB_DEBUG) /* Force debug output (from this file only) */ # undef CONFIG_DEBUG_NET diff --git a/net/iob/iob_contig.c b/net/iob/iob_contig.c index 749e72a0c76399def0fd298bb9803ec905524ec0..c7b948f25e177ed76def7b5713e685c0105adddf 100644 --- a/net/iob/iob_contig.c +++ b/net/iob/iob_contig.c @@ -39,7 +39,7 @@ #include -#if defined(CONFIG_DEBUG) && defined(CONFIG_IOB_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_IOB_DEBUG) /* Force debug output (from this file only) */ # undef CONFIG_DEBUG_NET @@ -161,7 +161,7 @@ int iob_contig(FAR struct iob_s *iob, unsigned int len) else { - ndbg("ERROR: pktlen=%u < requested len=%u\n", iob->io_pktlen, len); + nerr("ERROR: pktlen=%u < requested len=%u\n", iob->io_pktlen, len); return -ENOSPC; } } diff --git a/net/iob/iob_copyin.c b/net/iob/iob_copyin.c index c5030c91c56dc28762dea1348dbbbde9196de1ae..3507bc50048751d7830ab417742794059a1e2054 100644 --- a/net/iob/iob_copyin.c +++ b/net/iob/iob_copyin.c @@ -39,7 +39,7 @@ #include -#if defined(CONFIG_DEBUG) && defined(CONFIG_IOB_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_IOB_DEBUG) /* Force debug output (from this file only) */ # undef CONFIG_DEBUG_NET @@ -97,14 +97,14 @@ static int iob_copyin_internal(FAR struct iob_s *iob, FAR const uint8_t *src, unsigned int avail; unsigned int total = len; - nllvdbg("iob=%p len=%u offset=%u\n", iob, len, offset); + ninfo("iob=%p len=%u offset=%u\n", iob, len, offset); DEBUGASSERT(iob && src); /* The offset must applied to data that is already in the I/O buffer chain */ if (offset > iob->io_pktlen) { - ndbg("ERROR: offset is past the end of data: %u > %u\n", + nerr("ERROR: offset is past the end of data: %u > %u\n", offset, iob->io_pktlen); return -ESPIPE; } @@ -130,7 +130,7 @@ static int iob_copyin_internal(FAR struct iob_s *iob, FAR const uint8_t *src, dest = &iob->io_data[iob->io_offset + offset]; avail = iob->io_len - offset; - nllvdbg("iob=%p avail=%u len=%u next=%p\n", iob, avail, len, next); + ninfo("iob=%p avail=%u len=%u next=%p\n", iob, avail, len, next); /* Will the rest of the copy fit into this buffer, overwriting * existing data. @@ -187,8 +187,8 @@ static int iob_copyin_internal(FAR struct iob_s *iob, FAR const uint8_t *src, /* Copy from the user buffer to the I/O buffer. */ memcpy(dest, src, ncopy); - nllvdbg("iob=%p Copy %u bytes new len=%u\n", - iob, ncopy, iob->io_len); + ninfo("iob=%p Copy %u bytes new len=%u\n", + iob, ncopy, iob->io_len); /* Adjust the total length of the copy and the destination address in * the user buffer. @@ -220,14 +220,14 @@ static int iob_copyin_internal(FAR struct iob_s *iob, FAR const uint8_t *src, if (next == NULL) { - ndbg("ERROR: Failed to allocate I/O buffer\n"); + nerr("ERROR: Failed to allocate I/O buffer\n"); return len; } /* Add the new, empty I/O buffer to the end of the buffer chain. */ iob->io_flink = next; - nllvdbg("iob=%p added to the chain\n", iob); + ninfo("iob=%p added to the chain\n", iob); } iob = next; diff --git a/net/iob/iob_copyout.c b/net/iob/iob_copyout.c index 2cb0a10be6248f0176cc0f52d17c1fdc07c1ca98..b250cc5601d4bf6a0e6b91612945b498733e7d55 100644 --- a/net/iob/iob_copyout.c +++ b/net/iob/iob_copyout.c @@ -39,7 +39,7 @@ #include -#if defined(CONFIG_DEBUG) && defined(CONFIG_IOB_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_IOB_DEBUG) /* Force debug output (from this file only) */ # undef CONFIG_DEBUG_NET diff --git a/net/iob/iob_dump.c b/net/iob/iob_dump.c index a34dc1ca2aea3510598eb983c90560501dc6319a..2be0198a5bdc4963dc3fdf4196c5272840f2d9b2 100644 --- a/net/iob/iob_dump.c +++ b/net/iob/iob_dump.c @@ -44,7 +44,7 @@ #include -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /**************************************************************************** * Pre-processor definitions @@ -77,13 +77,13 @@ void iob_dump(FAR const char *msg, FAR struct iob_s *iob, unsigned int len, unsigned int cndx; head = iob; - lowsyslog(LOG_DEBUG, "%s: iob=%p pktlen=%d\n", msg, head, head->io_pktlen); + syslog(LOG_DEBUG, "%s: iob=%p pktlen=%d\n", msg, head, head->io_pktlen); /* Check if the offset is beyond the data in the I/O buffer chain */ if (offset > head->io_pktlen) { - ndbg("ERROR: offset is past the end of data: %u > %u\n", + nerr("ERROR: offset is past the end of data: %u > %u\n", offset, head->io_pktlen); return; } @@ -92,8 +92,8 @@ void iob_dump(FAR const char *msg, FAR struct iob_s *iob, unsigned int len, for (; iob; iob = iob->io_flink) { - lowsyslog(LOG_DEBUG, " iob=%p len=%d offset=%d\n", - iob, iob->io_len, iob->io_offset); + syslog(LOG_DEBUG, " iob=%p len=%d offset=%d\n", + iob, iob->io_len, iob->io_offset); } /* Get the amount of data to be displayed, limited by the amount that we @@ -117,49 +117,49 @@ void iob_dump(FAR const char *msg, FAR struct iob_s *iob, unsigned int len, if (nbytes > 0) { - lowsyslog(LOG_DEBUG, " %04x: ", offset); + syslog(LOG_DEBUG, " %04x: ", offset); for (cndx = 0; cndx < 32; cndx++) { if (cndx == 16) { - lowsyslog(LOG_DEBUG, " "); + syslog(LOG_DEBUG, " "); } if ((lndx + cndx) < len) { - lowsyslog(LOG_DEBUG, "%02x", data[cndx]); + syslog(LOG_DEBUG, "%02x", data[cndx]); } else { - lowsyslog(LOG_DEBUG, " "); + syslog(LOG_DEBUG, " "); } } - lowsyslog(LOG_DEBUG, " "); + syslog(LOG_DEBUG, " "); for (cndx = 0; cndx < 32; cndx++) { if (cndx == 16) { - lowsyslog(LOG_DEBUG, " "); + syslog(LOG_DEBUG, " "); } if ((lndx + cndx) < len) { if (data[cndx] >= 0x20 && data[cndx] < 0x7f) { - lowsyslog(LOG_DEBUG, "%c", data[cndx]); + syslog(LOG_DEBUG, "%c", data[cndx]); } else { - lowsyslog(LOG_DEBUG, "."); + syslog(LOG_DEBUG, "."); } } } - lowsyslog(LOG_DEBUG, "\n"); + syslog(LOG_DEBUG, "\n"); } } } -#endif /* CONFIG_DEBUG */ +#endif /* CONFIG_DEBUG_FEATURES */ diff --git a/net/iob/iob_free.c b/net/iob/iob_free.c index 53d8f6fb1de636d35f45031bb852da29adf2a3ba..38eb5fb3458d469d0fc04e0756e69a617bf75188 100644 --- a/net/iob/iob_free.c +++ b/net/iob/iob_free.c @@ -39,7 +39,7 @@ #include -#if defined(CONFIG_DEBUG) && defined(CONFIG_IOB_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_IOB_DEBUG) /* Force debug output (from this file only) */ # undef CONFIG_DEBUG_NET @@ -74,8 +74,8 @@ FAR struct iob_s *iob_free(FAR struct iob_s *iob) FAR struct iob_s *next = iob->io_flink; irqstate_t flags; - nllvdbg("iob=%p io_pktlen=%u io_len=%u next=%p\n", - iob, iob->io_pktlen, iob->io_len, next); + ninfo("iob=%p io_pktlen=%u io_len=%u next=%p\n", + iob, iob->io_pktlen, iob->io_len, next); /* Copy the data that only exists in the head of a I/O buffer chain into * the next entry. @@ -104,8 +104,8 @@ FAR struct iob_s *iob_free(FAR struct iob_s *iob) DEBUGASSERT(next->io_len == 0 && next->io_flink == NULL); } - nllvdbg("next=%p io_pktlen=%u io_len=%u\n", - next, next->io_pktlen, next->io_len); + ninfo("next=%p io_pktlen=%u io_len=%u\n", + next, next->io_pktlen, next->io_len); } /* Free the I/O buffer by adding it to the head of the free list. We don't diff --git a/net/iob/iob_free_chain.c b/net/iob/iob_free_chain.c index 810622e8288ff9c9c098325a2a734dcb402de729..6f5d4d4ba128a023437084f43b1458715d45b8e3 100644 --- a/net/iob/iob_free_chain.c +++ b/net/iob/iob_free_chain.c @@ -39,7 +39,7 @@ #include -#if defined(CONFIG_DEBUG) && defined(CONFIG_IOB_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_IOB_DEBUG) /* Force debug output (from this file only) */ # undef CONFIG_DEBUG_NET diff --git a/net/iob/iob_free_qentry.c b/net/iob/iob_free_qentry.c index e663d8a2ea2baf75e6c675463a8b18f1c0e9f56c..66cccb99471dce0dddbe1419bc600a712e0452df 100644 --- a/net/iob/iob_free_qentry.c +++ b/net/iob/iob_free_qentry.c @@ -39,7 +39,7 @@ #include -#if defined(CONFIG_DEBUG) && defined(CONFIG_IOB_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_IOB_DEBUG) /* Force debug output (from this file only) */ # undef CONFIG_DEBUG_NET diff --git a/net/iob/iob_free_queue.c b/net/iob/iob_free_queue.c index 91ded4f42c4b23ee2e9dfaf25a82f52ecd0f3a7d..5a4a52513dfeaa4de0652c24553489da47a2fa77 100644 --- a/net/iob/iob_free_queue.c +++ b/net/iob/iob_free_queue.c @@ -39,7 +39,7 @@ #include -#if defined(CONFIG_DEBUG) && defined(CONFIG_IOB_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_IOB_DEBUG) /* Force debug output (from this file only) */ # undef CONFIG_DEBUG_NET diff --git a/net/iob/iob_initialize.c b/net/iob/iob_initialize.c index d63d957219fcd4c90fe99c4208d796784d9557bc..9bae90b0e437c9edebeedb2435d2e5eae2b7d628 100644 --- a/net/iob/iob_initialize.c +++ b/net/iob/iob_initialize.c @@ -39,7 +39,7 @@ #include -#if defined(CONFIG_DEBUG) && defined(CONFIG_IOB_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_IOB_DEBUG) /* Force debug output (from this file only) */ # undef CONFIG_DEBUG_NET diff --git a/net/iob/iob_pack.c b/net/iob/iob_pack.c index 660b31d4a85e33449966cb437ff2f27233eca609..2df9300ece15193e37f7d8af00a07bf71dc625f9 100644 --- a/net/iob/iob_pack.c +++ b/net/iob/iob_pack.c @@ -39,7 +39,7 @@ #include -#if defined(CONFIG_DEBUG) && defined(CONFIG_IOB_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_IOB_DEBUG) /* Force debug output (from this file only) */ # undef CONFIG_DEBUG_NET diff --git a/net/iob/iob_peek_queue.c b/net/iob/iob_peek_queue.c index c49fb1ecbf93f2b8b45663daca7654165ff020dc..3422d65d60c0da91723a0781ed3a494fea08f178 100644 --- a/net/iob/iob_peek_queue.c +++ b/net/iob/iob_peek_queue.c @@ -39,7 +39,7 @@ #include -#if defined(CONFIG_DEBUG) && defined(CONFIG_IOB_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_IOB_DEBUG) /* Force debug output (from this file only) */ # undef CONFIG_DEBUG_NET diff --git a/net/iob/iob_remove_queue.c b/net/iob/iob_remove_queue.c index e134bcd0160625c42d2aa98381733a9681191330..4d8a45a38149a7bbf58f51a9f53ecad5b311f517 100644 --- a/net/iob/iob_remove_queue.c +++ b/net/iob/iob_remove_queue.c @@ -39,7 +39,7 @@ #include -#if defined(CONFIG_DEBUG) && defined(CONFIG_IOB_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_IOB_DEBUG) /* Force debug output (from this file only) */ # undef CONFIG_DEBUG_NET diff --git a/net/iob/iob_trimhead.c b/net/iob/iob_trimhead.c index 70a5359603f09aceaae1fc8e6a0867ded4e306ae..c11cfa43b99998b3f206c025c750eadaa76b01bc 100644 --- a/net/iob/iob_trimhead.c +++ b/net/iob/iob_trimhead.c @@ -39,7 +39,7 @@ #include -#if defined(CONFIG_DEBUG) && defined(CONFIG_IOB_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_IOB_DEBUG) /* Force debug output (from this file only) */ # undef CONFIG_DEBUG_NET @@ -78,7 +78,7 @@ FAR struct iob_s *iob_trimhead(FAR struct iob_s *iob, unsigned int trimlen) { uint16_t pktlen; - nllvdbg("iob=%p trimlen=%d\n", iob, trimlen); + ninfo("iob=%p trimlen=%d\n", iob, trimlen); if (iob && trimlen > 0) { @@ -89,8 +89,8 @@ FAR struct iob_s *iob_trimhead(FAR struct iob_s *iob, unsigned int trimlen) { /* Do we trim this entire I/O buffer away? */ - nllvdbg("iob=%p io_len=%d pktlen=%d trimlen=%d\n", - iob, iob->io_len, pktlen, trimlen); + ninfo("iob=%p io_len=%d pktlen=%d trimlen=%d\n", + iob, iob->io_len, pktlen, trimlen); if (iob->io_len <= trimlen) { @@ -120,7 +120,7 @@ FAR struct iob_s *iob_trimhead(FAR struct iob_s *iob, unsigned int trimlen) /* Free this entry and set the next I/O buffer as the head */ - nllvdbg("iob=%p: Freeing\n", iob); + ninfo("iob=%p: Freeing\n", iob); (void)iob_free(iob); iob = next; } diff --git a/net/iob/iob_trimhead_queue.c b/net/iob/iob_trimhead_queue.c index 24b98783215e6292f54bc606591f642282b48163..791892d7380fa22c6107a88b5e0f0f7c18576a3e 100644 --- a/net/iob/iob_trimhead_queue.c +++ b/net/iob/iob_trimhead_queue.c @@ -39,7 +39,7 @@ #include -#if defined(CONFIG_DEBUG) && defined(CONFIG_IOB_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_IOB_DEBUG) /* Force debug output (from this file only) */ # undef CONFIG_DEBUG_NET diff --git a/net/iob/iob_trimtail.c b/net/iob/iob_trimtail.c index 6965fe3da5f1c7bc05513fb5dd35440f26b2420e..039e3c6db7c31106ed427a1f0f9a139ac54014a5 100644 --- a/net/iob/iob_trimtail.c +++ b/net/iob/iob_trimtail.c @@ -39,7 +39,7 @@ #include -#if defined(CONFIG_DEBUG) && defined(CONFIG_IOB_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_IOB_DEBUG) /* Force debug output (from this file only) */ # undef CONFIG_DEBUG_NET @@ -72,7 +72,7 @@ FAR struct iob_s *iob_trimtail(FAR struct iob_s *iob, unsigned int trimlen) FAR struct iob_s *last; int len; - nlldbg("iob=%p pktlen=%d trimlen=%d\n", iob, iob->io_pktlen, trimlen); + ninfo("iob=%p pktlen=%d trimlen=%d\n", iob, iob->io_pktlen, trimlen); if (iob && trimlen > 0) { @@ -101,7 +101,7 @@ FAR struct iob_s *iob_trimtail(FAR struct iob_s *iob, unsigned int trimlen) * I/O buffer away? */ - nllvdbg("iob=%p len=%d vs %d\n", last, last->io_len, len); + ninfo("iob=%p len=%d vs %d\n", last, last->io_len, len); if (last->io_len <= len) { /* Yes.. Consume the entire buffer */ diff --git a/net/local/local_accept.c b/net/local/local_accept.c index d26fc74813d920caed5cbd35f5f313527ea02437..e148e3e60fc839c4cf522f1213ba204860c537ef 100644 --- a/net/local/local_accept.c +++ b/net/local/local_accept.c @@ -156,7 +156,7 @@ int psock_local_accept(FAR struct socket *psock, FAR struct sockaddr *addr, conn = local_alloc(); if (!conn) { - ndbg("ERROR: Failed to allocate new connection structure\n"); + nerr("ERROR: Failed to allocate new connection structure\n"); ret = -ENOMEM; } else @@ -180,7 +180,7 @@ int psock_local_accept(FAR struct socket *psock, FAR struct sockaddr *addr, _SS_ISNONBLOCK(psock->s_flags)); if (ret < 0) { - ndbg("ERROR: Failed to open write-only FIFOs for %s: %d\n", + nerr("ERROR: Failed to open write-only FIFOs for %s: %d\n", conn->lc_path, ret); } } @@ -200,7 +200,7 @@ int psock_local_accept(FAR struct socket *psock, FAR struct sockaddr *addr, _SS_ISNONBLOCK(psock->s_flags)); if (ret < 0) { - ndbg("ERROR: Failed to open read-only FIFOs for %s: %d\n", + nerr("ERROR: Failed to open read-only FIFOs for %s: %d\n", conn->lc_path, ret); } } diff --git a/net/local/local_connect.c b/net/local/local_connect.c index 1eab7220835e9c4a35b9b1306876d8b430227665..b336b370b3ed7dd749998b4803b7f102562c7ec6 100644 --- a/net/local/local_connect.c +++ b/net/local/local_connect.c @@ -136,9 +136,9 @@ int inline local_stream_connect(FAR struct local_conn_s *client, server->u.server.lc_pending >= server->u.server.lc_backlog) { net_unlock(state); - ndbg("ERROR: Server is not listening: lc_state=%d\n", + nerr("ERROR: Server is not listening: lc_state=%d\n", server->lc_state); - ndbg(" OR: The backlog limit was reached: %d or %d\n", + nerr(" OR: The backlog limit was reached: %d or %d\n", server->u.server.lc_pending, server->u.server.lc_backlog); return -ECONNREFUSED; } @@ -153,7 +153,7 @@ int inline local_stream_connect(FAR struct local_conn_s *client, ret = local_create_fifos(client); if (ret < 0) { - ndbg("ERROR: Failed to create FIFOs for %s: %d\n", + nerr("ERROR: Failed to create FIFOs for %s: %d\n", client->lc_path, ret); net_unlock(state); @@ -167,7 +167,7 @@ int inline local_stream_connect(FAR struct local_conn_s *client, ret = local_open_client_tx(client, nonblock); if (ret < 0) { - ndbg("ERROR: Failed to open write-only FIFOs for %s: %d\n", + nerr("ERROR: Failed to open write-only FIFOs for %s: %d\n", client->lc_path, ret); net_unlock(state); @@ -198,7 +198,7 @@ int inline local_stream_connect(FAR struct local_conn_s *client, if (ret < 0) { - ndbg("ERROR: Failed to connect: %d\n", ret); + nerr("ERROR: Failed to connect: %d\n", ret); goto errout_with_outfd; } @@ -207,7 +207,7 @@ int inline local_stream_connect(FAR struct local_conn_s *client, ret = local_open_client_rx(client, nonblock); if (ret < 0) { - ndbg("ERROR: Failed to open write-only FIFOs for %s: %d\n", + nerr("ERROR: Failed to open write-only FIFOs for %s: %d\n", client->lc_path, ret); goto errout_with_outfd; } diff --git a/net/local/local_fifo.c b/net/local/local_fifo.c index 569aa92a01244cd130d3c721a1b5ac808efc15a7..ff53d400246be672c759705e1c9dd703cdb9123c 100644 --- a/net/local/local_fifo.c +++ b/net/local/local_fifo.c @@ -189,7 +189,7 @@ static int local_create_fifo(FAR const char *path) int errcode = get_errno(); DEBUGASSERT(errcode > 0); - ndbg("ERROR: Failed to create FIFO %s: %d\n", path, errcode); + nerr("ERROR: Failed to create FIFO %s: %d\n", path, errcode); return -errcode; } } @@ -230,7 +230,7 @@ static int local_release_fifo(FAR const char *path) int errcode = get_errno(); DEBUGASSERT(errcode > 0); - ndbg("ERROR: Failed to unlink FIFO %s: %d\n", path, errcode); + nerr("ERROR: Failed to unlink FIFO %s: %d\n", path, errcode); return -errcode; } } @@ -260,7 +260,7 @@ static int local_rx_open(FAR struct local_conn_s *conn, FAR const char *path, int errcode = get_errno(); DEBUGASSERT(errcode > 0); - ndbg("ERROR: Failed on open %s for reading: %d\n", + nerr("ERROR: Failed on open %s for reading: %d\n", path, errcode); /* Map the errcode to something consistent with the return @@ -296,7 +296,7 @@ static int local_tx_open(FAR struct local_conn_s *conn, FAR const char *path, int errcode = get_errno(); DEBUGASSERT(errcode > 0); - ndbg("ERROR: Failed on open %s for writing: %d\n", + nerr("ERROR: Failed on open %s for writing: %d\n", path, errcode); /* Map the errcode to something consistent with the return @@ -336,7 +336,7 @@ static int local_set_policy(int fd, unsigned long policy) int errcode = get_errno(); DEBUGASSERT(errcode > 0); - ndbg("ERROR: Failed to set FIFO buffer policty: %d\n", errcode); + nerr("ERROR: Failed to set FIFO buffer policty: %d\n", errcode); return -errcode; } diff --git a/net/local/local_netpoll.c b/net/local/local_netpoll.c index 01ebe0884a72561e480c8664d6778b95d94a8289..4b100d67d029dffaf2647838fb9d31611d0094cc 100644 --- a/net/local/local_netpoll.c +++ b/net/local/local_netpoll.c @@ -152,7 +152,7 @@ void local_accept_pollnotify(FAR struct local_conn_s *conn, fds->revents |= (fds->events & eventset); if (fds->revents != 0) { - ndbg("Report events: %02x\n", fds->revents); + ninfo("Report events: %02x\n", fds->revents); sem_post(fds->sem); } } diff --git a/net/local/local_recvfrom.c b/net/local/local_recvfrom.c index bf5dc45c16fb296b6e3870d2a134b710e95483f0..8585468f616e95f4f28321fb3462e5bedb06d695 100644 --- a/net/local/local_recvfrom.c +++ b/net/local/local_recvfrom.c @@ -88,7 +88,7 @@ static int psock_fifo_read(FAR struct socket *psock, FAR void *buf, if (ret == -ECONNRESET) { - ndbg("ERROR: Lost connection: %d\n", ret); + nerr("ERROR: Lost connection: %d\n", ret); /* Report an ungraceful loss of connection. This should * eventually be reported as ENOTCONN. @@ -111,7 +111,7 @@ static int psock_fifo_read(FAR struct socket *psock, FAR void *buf, } else { - ndbg("ERROR: Failed to read packet: %d\n", ret); + nerr("ERROR: Failed to read packet: %d\n", ret); return ret; } } @@ -155,7 +155,7 @@ psock_stream_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, if (conn->lc_state != LOCAL_STATE_CONNECTED) { - ndbg("ERROR: not connected\n"); + nerr("ERROR: not connected\n"); return -ENOTCONN; } @@ -174,12 +174,12 @@ psock_stream_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, ret = local_sync(conn->lc_infd); if (ret < 0) { - ndbg("ERROR: Failed to get packet length: %d\n", ret); + nerr("ERROR: Failed to get packet length: %d\n", ret); return ret; } else if (ret > UINT16_MAX) { - ndbg("ERROR: Packet is too big: %d\n", ret); + nerr("ERROR: Packet is too big: %d\n", ret); return -E2BIG; } @@ -259,7 +259,7 @@ psock_dgram_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, { /* Either not bound to address or it is connected */ - ndbg("ERROR: Connected or not bound\n"); + nerr("ERROR: Connected or not bound\n"); return -EISCONN; } @@ -272,7 +272,7 @@ psock_dgram_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, ret = local_create_halfduplex(conn, conn->lc_path); if (ret < 0) { - ndbg("ERROR: Failed to create FIFO for %s: %d\n", + nerr("ERROR: Failed to create FIFO for %s: %d\n", conn->lc_path, ret); return ret; } @@ -282,7 +282,7 @@ psock_dgram_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, ret = local_open_receiver(conn, _SS_ISNONBLOCK(psock->s_flags)); if (ret < 0) { - ndbg("ERROR: Failed to open FIFO for %s: %d\n", + nerr("ERROR: Failed to open FIFO for %s: %d\n", conn->lc_path, ret); goto errout_with_halfduplex; return ret; @@ -295,12 +295,12 @@ psock_dgram_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, ret = local_sync(conn->lc_infd); if (ret < 0) { - ndbg("ERROR: Failed to get packet length: %d\n", ret); + nerr("ERROR: Failed to get packet length: %d\n", ret); goto errout_with_infd; } else if (ret > UINT16_MAX) { - ndbg("ERROR: Packet is too big: %d\n", ret); + nerr("ERROR: Packet is too big: %d\n", ret); goto errout_with_infd; } @@ -439,7 +439,7 @@ ssize_t psock_local_recvfrom(FAR struct socket *psock, FAR void *buf, #endif { DEBUGPANIC(); - ndbg("ERROR: Unrecognized socket type: %s\n", psock->s_type); + nerr("ERROR: Unrecognized socket type: %s\n", psock->s_type); return -EINVAL; } } diff --git a/net/local/local_recvutils.c b/net/local/local_recvutils.c index 27272a59dbaa528b417b897f5a2c5523521cb536..ea19aa65a6ca72ba609fc332966a2e65a3d8e4c4 100644 --- a/net/local/local_recvutils.c +++ b/net/local/local_recvutils.c @@ -93,12 +93,12 @@ int local_fifo_read(int fd, FAR uint8_t *buf, size_t *len) if (errcode != EINTR) { - ndbg("ERROR: Read failed: %d\n", errcode); + nerr("ERROR: Read failed: %d\n", errcode); ret = -errcode; goto errout; } - nvdbg("Ignoring signal\n"); + ninfo("Ignoring signal\n"); } else if (nread == 0) { @@ -160,7 +160,7 @@ int local_sync(int fd) ret = local_fifo_read(fd, &sync, &readlen); if (ret < 0) { - ndbg("ERROR: Failed to read sync bytes: %d\n", ret); + nerr("ERROR: Failed to read sync bytes: %d\n", ret); return ret; } } @@ -174,7 +174,7 @@ int local_sync(int fd) ret = local_fifo_read(fd, &sync, &readlen); if (ret < 0) { - ndbg("ERROR: Failed to read sync bytes: %d\n", ret); + nerr("ERROR: Failed to read sync bytes: %d\n", ret); return ret; } } diff --git a/net/local/local_send.c b/net/local/local_send.c index 272120138d3bb730e8919e71335c22e7d90b6b99..c8f1cd92a0eb52c65426e71877c9f2933e04956e 100644 --- a/net/local/local_send.c +++ b/net/local/local_send.c @@ -88,7 +88,7 @@ ssize_t psock_local_send(FAR struct socket *psock, FAR const void *buf, if (peer->lc_state != LOCAL_STATE_CONNECTED || peer->lc_outfd < 0) { - ndbg("ERROR: not connected\n"); + nerr("ERROR: not connected\n"); return -ENOTCONN; } diff --git a/net/local/local_sendpacket.c b/net/local/local_sendpacket.c index c55aa7efbfcf656619808461e1cc5e5e82ba7114..fce8b4fe68c362acf621110047d3bffc4e29a055 100644 --- a/net/local/local_sendpacket.c +++ b/net/local/local_sendpacket.c @@ -100,11 +100,11 @@ static int local_fifo_write(int fd, FAR const uint8_t *buf, size_t len) if (errcode != EINTR) { - ndbg("ERROR: Write failed: %d\n", errcode); + nerr("ERROR: Write failed: %d\n", errcode); return -errcode; } - nvdbg("Ignoring signal\n"); + ninfo("Ignoring signal\n"); } else { diff --git a/net/local/local_sendto.c b/net/local/local_sendto.c index 8142110c0837588d0bb926691117efb7a8671e17..1351c67a288cd0813a6823a3995a1be86ea0b05b 100644 --- a/net/local/local_sendto.c +++ b/net/local/local_sendto.c @@ -106,7 +106,7 @@ ssize_t psock_local_sendto(FAR struct socket *psock, FAR const void *buf, { /* Either not bound to address or it is connected */ - ndbg("ERROR: Connected state\n"); + nerr("ERROR: Connected state\n"); return -EISCONN; } @@ -130,7 +130,7 @@ ssize_t psock_local_sendto(FAR struct socket *psock, FAR const void *buf, ret = local_create_halfduplex(conn, unaddr->sun_path); if (ret < 0) { - ndbg("ERROR: Failed to create FIFO for %s: %d\n", + nerr("ERROR: Failed to create FIFO for %s: %d\n", conn->lc_path, ret); return ret; } @@ -141,7 +141,7 @@ ssize_t psock_local_sendto(FAR struct socket *psock, FAR const void *buf, _SS_ISNONBLOCK(psock->s_flags)); if (ret < 0) { - ndbg("ERROR: Failed to open FIFO for %s: %d\n", + nerr("ERROR: Failed to open FIFO for %s: %d\n", unaddr->sun_path, ret); nsent = ret; @@ -153,7 +153,7 @@ ssize_t psock_local_sendto(FAR struct socket *psock, FAR const void *buf, nsent = local_send_packet(conn->lc_outfd, buf, len); if (nsent < 0) { - ndbg("ERROR: Failed to send the packet: %d\n", ret); + nerr("ERROR: Failed to send the packet: %d\n", ret); } else { diff --git a/net/neighbor/neighbor_add.c b/net/neighbor/neighbor_add.c index 4205f60db2a44323c1b18c327ee6de232bc18e44..fed15353ae064c947473633fc577e1e8fcdebe1e 100644 --- a/net/neighbor/neighbor_add.c +++ b/net/neighbor/neighbor_add.c @@ -76,17 +76,17 @@ void neighbor_add(FAR net_ipv6addr_t ipaddr, FAR struct neighbor_addr_s *addr) int oldest_ndx; int i; - nllvdbg("Add neighbor: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", - ntohs(ipaddr[0]), ntohs(ipaddr[1]), ntohs(ipaddr[2]), - ntohs(ipaddr[3]), ntohs(ipaddr[4]), ntohs(ipaddr[5]), - ntohs(ipaddr[6]), ntohs(ipaddr[7])); - nllvdbg(" at: %02x:%02x:%02x:%02x:%02x:%02x\n", - addr->na_addr.ether_addr_octet[0], - addr->na_addr.ether_addr_octet[1], - addr->na_addr.ether_addr_octet[2], - addr->na_addr.ether_addr_octet[3], - addr->na_addr.ether_addr_octet[4], - addr->na_addr.ether_addr_octet[5]); + ninfo("Add neighbor: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", + ntohs(ipaddr[0]), ntohs(ipaddr[1]), ntohs(ipaddr[2]), + ntohs(ipaddr[3]), ntohs(ipaddr[4]), ntohs(ipaddr[5]), + ntohs(ipaddr[6]), ntohs(ipaddr[7])); + ninfo(" at: %02x:%02x:%02x:%02x:%02x:%02x\n", + addr->na_addr.ether_addr_octet[0], + addr->na_addr.ether_addr_octet[1], + addr->na_addr.ether_addr_octet[2], + addr->na_addr.ether_addr_octet[3], + addr->na_addr.ether_addr_octet[4], + addr->na_addr.ether_addr_octet[5]); /* Find the first unused entry or the oldest used entry. */ diff --git a/net/neighbor/neighbor_findentry.c b/net/neighbor/neighbor_findentry.c index 88b7abf94ef9918dd3063b95cfb17c3d20651af9..fe6a7b7b319205982bf78cdcd8f0bf7df9ce9c5d 100644 --- a/net/neighbor/neighbor_findentry.c +++ b/net/neighbor/neighbor_findentry.c @@ -72,10 +72,10 @@ FAR struct neighbor_entry *neighbor_findentry(const net_ipv6addr_t ipaddr) { int i; - nllvdbg("Find neighbor: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", - ntohs(ipaddr[0]), ntohs(ipaddr[1]), ntohs(ipaddr[2]), - ntohs(ipaddr[3]), ntohs(ipaddr[4]), ntohs(ipaddr[5]), - ntohs(ipaddr[6]), ntohs(ipaddr[7])); + ninfo("Find neighbor: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", + ntohs(ipaddr[0]), ntohs(ipaddr[1]), ntohs(ipaddr[2]), + ntohs(ipaddr[3]), ntohs(ipaddr[4]), ntohs(ipaddr[5]), + ntohs(ipaddr[6]), ntohs(ipaddr[7])); for (i = 0; i < CONFIG_NET_IPv6_NCONF_ENTRIES; ++i) { @@ -83,18 +83,18 @@ FAR struct neighbor_entry *neighbor_findentry(const net_ipv6addr_t ipaddr) if (net_ipv6addr_cmp(neighbor->ne_ipaddr, ipaddr)) { - nllvdbg(" at: %02x:%02x:%02x:%02x:%02x:%02x\n", - neighbor->ne_addr.na_addr.ether_addr_octet[0], - neighbor->ne_addr.na_addr.ether_addr_octet[1], - neighbor->ne_addr.na_addr.ether_addr_octet[2], - neighbor->ne_addr.na_addr.ether_addr_octet[3], - neighbor->ne_addr.na_addr.ether_addr_octet[4], - neighbor->ne_addr.na_addr.ether_addr_octet[5]); + ninfo(" at: %02x:%02x:%02x:%02x:%02x:%02x\n", + neighbor->ne_addr.na_addr.ether_addr_octet[0], + neighbor->ne_addr.na_addr.ether_addr_octet[1], + neighbor->ne_addr.na_addr.ether_addr_octet[2], + neighbor->ne_addr.na_addr.ether_addr_octet[3], + neighbor->ne_addr.na_addr.ether_addr_octet[4], + neighbor->ne_addr.na_addr.ether_addr_octet[5]); return &g_neighbors[i]; } } - nllvdbg(" Not found\n"); + ninfo(" Not found\n"); return NULL; } diff --git a/net/neighbor/neighbor_lookup.c b/net/neighbor/neighbor_lookup.c index 39b9f941bbd40c5e9033e3adf43cbc1963c12ec9..01f029b69fa6d90a33bbc7a3d31f25f2a8cf8d7d 100644 --- a/net/neighbor/neighbor_lookup.c +++ b/net/neighbor/neighbor_lookup.c @@ -76,13 +76,13 @@ FAR const struct neighbor_addr_s *neighbor_lookup(const net_ipv6addr_t ipaddr) neighbor = neighbor_findentry(ipaddr); if (neighbor != NULL) { - nllvdbg("Lookup neighbor: %02x:%02x:%02x:%02x:%02x:%02x\n", - neighbor->ne_addr.na_addr.ether_addr_octet[0], - neighbor->ne_addr.na_addr.ether_addr_octet[1], - neighbor->ne_addr.na_addr.ether_addr_octet[2], - neighbor->ne_addr.na_addr.ether_addr_octet[3], - neighbor->ne_addr.na_addr.ether_addr_octet[4], - neighbor->ne_addr.na_addr.ether_addr_octet[5]); + ninfo("Lookup neighbor: %02x:%02x:%02x:%02x:%02x:%02x\n", + neighbor->ne_addr.na_addr.ether_addr_octet[0], + neighbor->ne_addr.na_addr.ether_addr_octet[1], + neighbor->ne_addr.na_addr.ether_addr_octet[2], + neighbor->ne_addr.na_addr.ether_addr_octet[3], + neighbor->ne_addr.na_addr.ether_addr_octet[4], + neighbor->ne_addr.na_addr.ether_addr_octet[5]); return &neighbor->ne_addr; } diff --git a/net/neighbor/neighbor_out.c b/net/neighbor/neighbor_out.c index 061a45518dc5e08b3267c90d3c985fd9c56dd19d..c00253ffe3eedaec1dbd6a678b6bea6cdba52dfe 100644 --- a/net/neighbor/neighbor_out.c +++ b/net/neighbor/neighbor_out.c @@ -227,7 +227,7 @@ void neighbor_out(FAR struct net_driver_s *dev) naddr = neighbor_lookup(ipaddr); if (!naddr) { - nllvdbg("IPv6 Neighbor solicitation for IPv6\n"); + ninfo("IPv6 Neighbor solicitation for IPv6\n"); /* The destination address was not in our Neighbor Table, so we * overwrite the IPv6 packet with an ICMDv6 Neighbor Solicitation @@ -253,6 +253,6 @@ void neighbor_out(FAR struct net_driver_s *dev) */ dev->d_len += netdev_ipv6_hdrlen(dev); - nllvdbg("Outgoing IPv6 Packet length: %d (%d)\n", + ninfo("Outgoing IPv6 Packet length: %d (%d)\n", dev->d_len, (ip->len[0] << 8) | ip->len[1]); } diff --git a/net/netdev/netdev_ioctl.c b/net/netdev/netdev_ioctl.c index c4a1a650d03418fde71d65e483ddd5bef871a18c..d12d3bdbbd666f5286492bfea655988d4b971981 100644 --- a/net/netdev/netdev_ioctl.c +++ b/net/netdev/netdev_ioctl.c @@ -363,7 +363,7 @@ static int netdev_ifrioctl(FAR struct socket *psock, int cmd, FAR struct net_driver_s *dev; int ret = -EINVAL; - nvdbg("cmd: %d\n", cmd); + ninfo("cmd: %d\n", cmd); /* Execute the command */ @@ -769,7 +769,7 @@ static int netdev_imsfioctl(FAR struct socket *psock, int cmd, FAR struct net_driver_s *dev; int ret = -EINVAL; - nvdbg("cmd: %d\n", cmd); + ninfo("cmd: %d\n", cmd); /* Execute the command */ diff --git a/net/netdev/netdev_register.c b/net/netdev/netdev_register.c index 11982d9eeb14b129d365b9829717367e46ab0bb7..81bfe8232b3305257812890884656df9d04aa810 100644 --- a/net/netdev/netdev_register.c +++ b/net/netdev/netdev_register.c @@ -248,7 +248,7 @@ int netdev_register(FAR struct net_driver_s *dev, enum net_lltype_e lltype) #endif default: - nlldbg("ERROR: Unrecognized link type: %d\n", lltype); + nerr("ERROR: Unrecognized link type: %d\n", lltype); return -EINVAL; } @@ -319,13 +319,13 @@ int netdev_register(FAR struct net_driver_s *dev, enum net_lltype_e lltype) net_unlock(save); #ifdef CONFIG_NET_ETHERNET - nlldbg("Registered MAC: %02x:%02x:%02x:%02x:%02x:%02x as dev: %s\n", - dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], - dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], - dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5], - dev->d_ifname); + ninfo("Registered MAC: %02x:%02x:%02x:%02x:%02x:%02x as dev: %s\n", + dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], + dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], + dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5], + dev->d_ifname); #else - nlldbg("Registered dev: %s\n", dev->d_ifname); + ninfo("Registered dev: %s\n", dev->d_ifname); #endif return OK; } diff --git a/net/netdev/netdev_unregister.c b/net/netdev/netdev_unregister.c index fc326dcf318d90fed4fda69f21499faa8f4f0d73..405118e308a39a04618feacc0488634d68546bb6 100644 --- a/net/netdev/netdev_unregister.c +++ b/net/netdev/netdev_unregister.c @@ -128,13 +128,13 @@ int netdev_unregister(FAR struct net_driver_s *dev) net_unlock(save); #ifdef CONFIG_NET_ETHERNET - nlldbg("Unregistered MAC: %02x:%02x:%02x:%02x:%02x:%02x as dev: %s\n", - dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], - dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], - dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5], - dev->d_ifname); + ninfo("Unregistered MAC: %02x:%02x:%02x:%02x:%02x:%02x as dev: %s\n", + dev->d_mac.ether_addr_octet[0], dev->d_mac.ether_addr_octet[1], + dev->d_mac.ether_addr_octet[2], dev->d_mac.ether_addr_octet[3], + dev->d_mac.ether_addr_octet[4], dev->d_mac.ether_addr_octet[5], + dev->d_ifname); #else - nlldbg("Registered dev: %s\n", dev->d_ifname); + ninfo("Registered dev: %s\n", dev->d_ifname); #endif return OK; } diff --git a/net/pkt/Kconfig b/net/pkt/Kconfig index 2fc26442dd39b41d45f71e6bf6cafe49b34702bd..ae9c7891f565fa3764ed1a9895b426c71079f7cb 100644 --- a/net/pkt/Kconfig +++ b/net/pkt/Kconfig @@ -13,9 +13,9 @@ config NET_PKT Packet sockets allow receiving and transmitting frames without a transport protocol in between. Frames received are copied into - a packet socket tap before they enter uIP. Data written into a - packet socket will bypass uIP altogether and be placed in the - transmission buffer of the network interface driver. + a packet socket tap before they enter the network. Data written into + a packet socket will bypass the network altogether and be placed in + the transmission buffer of the network interface driver. if NET_PKT diff --git a/net/pkt/pkt_callback.c b/net/pkt/pkt_callback.c index 5376b4ce224ecf7c228f28084bd1fb6059f8708c..53df4c4afdf4ad0077cb90d8476e43497f06a3e7 100644 --- a/net/pkt/pkt_callback.c +++ b/net/pkt/pkt_callback.c @@ -70,7 +70,7 @@ uint16_t pkt_callback(FAR struct net_driver_s *dev, FAR struct pkt_conn_s *conn, uint16_t flags) { - nllvdbg("flags: %04x\n", flags); + ninfo("flags: %04x\n", flags); /* Some sanity checking */ diff --git a/net/pkt/pkt_input.c b/net/pkt/pkt_input.c index 27b3af4d257a887454f915c686ef9bbf34fb979f..b585dd5432fa6c087344b04725edd835bd154554 100644 --- a/net/pkt/pkt_input.c +++ b/net/pkt/pkt_input.c @@ -118,7 +118,7 @@ int pkt_input(struct net_driver_s *dev) } else { - nlldbg("No listener\n"); + nerr("ERROR: No listener\n"); } return ret; diff --git a/net/pkt/pkt_poll.c b/net/pkt/pkt_poll.c index dc4f5a92d040e555712fa138d961a47297a7e732..c289b146d8389eecb7df2a653ab3651ee2ff3780 100644 --- a/net/pkt/pkt_poll.c +++ b/net/pkt/pkt_poll.c @@ -78,7 +78,7 @@ void pkt_poll(FAR struct net_driver_s *dev, FAR struct pkt_conn_s *conn) { - nlldbg("IN\n"); + ninfo("IN\n"); /* Verify that the packet connection is valid */ diff --git a/net/pkt/pkt_send.c b/net/pkt/pkt_send.c index 1310cb92086ef932dc191917a6a74b7a7d8faa9e..a419d69d8fbfd9a8cd9f02926b4159100bfeebe2 100644 --- a/net/pkt/pkt_send.c +++ b/net/pkt/pkt_send.c @@ -93,7 +93,7 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, { FAR struct send_s *pstate = (FAR struct send_s *)pvpriv; - nllvdbg("flags: %04x sent: %d\n", flags, pstate->snd_sent); + ninfo("flags: %04x sent: %d\n", flags, pstate->snd_sent); if (pstate) { @@ -212,14 +212,14 @@ ssize_t psock_pkt_send(FAR struct socket *psock, FAR const void *buf, FAR struct net_driver_s *dev; struct send_s state; net_lock_t save; - int err; + int errcode; int ret = OK; /* Verify that the sockfd corresponds to valid, allocated socket */ if (!psock || psock->s_crefs <= 0) { - err = EBADF; + errcode = EBADF; goto errout; } @@ -228,7 +228,7 @@ ssize_t psock_pkt_send(FAR struct socket *psock, FAR const void *buf, dev = pkt_find_device((FAR struct pkt_conn_s *)psock->s_conn); if (dev == NULL) { - err = ENODEV; + errcode = ENODEV; goto errout; } @@ -296,7 +296,7 @@ ssize_t psock_pkt_send(FAR struct socket *psock, FAR const void *buf, if (state.snd_sent < 0) { - err = state.snd_sent; + errcode = state.snd_sent; goto errout; } @@ -306,7 +306,7 @@ ssize_t psock_pkt_send(FAR struct socket *psock, FAR const void *buf, if (ret < 0) { - err = -ret; + errcode = -ret; goto errout; } @@ -315,7 +315,7 @@ ssize_t psock_pkt_send(FAR struct socket *psock, FAR const void *buf, return state.snd_sent; errout: - set_errno(err); + set_errno(errcode); return ERROR; } diff --git a/net/procfs/net_procfs.c b/net/procfs/net_procfs.c index f65cf040df97d30ffa0026e1ee7c05705e099edb..80e30a9a0d76cf19b98e4b61cf974cb93770e996 100644 --- a/net/procfs/net_procfs.c +++ b/net/procfs/net_procfs.c @@ -126,7 +126,7 @@ static int netprocfs_open(FAR struct file *filep, FAR const char *relpath, FAR struct netprocfs_file_s *priv; FAR struct net_driver_s *dev; - fvdbg("Open '%s'\n", relpath); + finfo("Open '%s'\n", relpath); /* PROCFS is read-only. Any attempt to open with any kind of write * access is not permitted. @@ -137,7 +137,7 @@ static int netprocfs_open(FAR struct file *filep, FAR const char *relpath, if (((oflags & O_WRONLY) != 0 || (oflags & O_RDONLY) == 0) && (net_procfsoperations.write == NULL)) { - fdbg("ERROR: Only O_RDONLY supported\n"); + ferr("ERROR: Only O_RDONLY supported\n"); return -EACCES; } @@ -167,7 +167,7 @@ static int netprocfs_open(FAR struct file *filep, FAR const char *relpath, copy = strdup(relpath); if (copy == NULL) { - fdbg("ERROR: strdup failed\n"); + ferr("ERROR: strdup failed\n"); return -ENOMEM; } @@ -177,7 +177,7 @@ static int netprocfs_open(FAR struct file *filep, FAR const char *relpath, if (dev == NULL) { - fdbg("ERROR: relpath is '%s'\n", relpath); + ferr("ERROR: relpath is '%s'\n", relpath); return -ENOENT; } } @@ -187,7 +187,7 @@ static int netprocfs_open(FAR struct file *filep, FAR const char *relpath, priv = (FAR struct netprocfs_file_s *)kmm_zalloc(sizeof(struct netprocfs_file_s)); if (!priv) { - fdbg("ERROR: Failed to allocate file attributes\n"); + ferr("ERROR: Failed to allocate file attributes\n"); return -ENOMEM; } @@ -233,7 +233,7 @@ static ssize_t netprocfs_read(FAR struct file *filep, FAR char *buffer, FAR struct netprocfs_file_s *priv; ssize_t nreturned; - fvdbg("buffer=%p buflen=%lu\n", buffer, (unsigned long)buflen); + finfo("buffer=%p buflen=%lu\n", buffer, (unsigned long)buflen); /* Recover our private data from the struct file instance */ @@ -282,7 +282,7 @@ static int netprocfs_dup(FAR const struct file *oldp, FAR struct file *newp) FAR struct netprocfs_file_s *oldpriv; FAR struct netprocfs_file_s *newpriv; - fvdbg("Dup %p->%p\n", oldp, newp); + finfo("Dup %p->%p\n", oldp, newp); /* Recover our private data from the old struct file instance */ @@ -294,7 +294,7 @@ static int netprocfs_dup(FAR const struct file *oldp, FAR struct file *newp) newpriv = (FAR struct netprocfs_file_s *)kmm_zalloc(sizeof(struct netprocfs_file_s)); if (!newpriv) { - fdbg("ERROR: Failed to allocate file attributes\n"); + ferr("ERROR: Failed to allocate file attributes\n"); return -ENOMEM; } @@ -322,7 +322,7 @@ static int netprocfs_opendir(FAR const char *relpath, FAR struct netprocfs_level1_s *level1; int ndevs; - fvdbg("relpath: \"%s\"\n", relpath ? relpath : "NULL"); + finfo("relpath: \"%s\"\n", relpath ? relpath : "NULL"); DEBUGASSERT(relpath && dir && !dir->u.procfs); /* "net" is the only value of relpath that is a directory */ @@ -334,7 +334,7 @@ static int netprocfs_opendir(FAR const char *relpath, * should return -ENOENT. */ - fdbg("ERROR: Bad relpath: %s\n", relpath); + ferr("ERROR: Bad relpath: %s\n", relpath); return -ENOTDIR; } @@ -347,7 +347,7 @@ static int netprocfs_opendir(FAR const char *relpath, if (!level1) { - fdbg("ERROR: Failed to allocate the level1 directory structure\n"); + ferr("ERROR: Failed to allocate the level1 directory structure\n"); return -ENOMEM; } @@ -420,7 +420,7 @@ static int netprocfs_readdir(FAR struct fs_dirent_s *dir) * error -ENOENT. */ - fvdbg("Entry %d: End of directory\n", index); + finfo("Entry %d: End of directory\n", index); return -ENOENT; } @@ -518,7 +518,7 @@ static int netprocfs_stat(FAR const char *relpath, FAR struct stat *buf) copy = strdup(relpath); if (copy == NULL) { - fdbg("ERROR: strdup failed\n"); + ferr("ERROR: strdup failed\n"); return -ENOMEM; } @@ -528,7 +528,7 @@ static int netprocfs_stat(FAR const char *relpath, FAR struct stat *buf) if (dev == NULL) { - fdbg("ERROR: relpath is '%s'\n", relpath); + ferr("ERROR: relpath is '%s'\n", relpath); return -ENOENT; } @@ -575,7 +575,7 @@ ssize_t netprocfs_read_linegen(FAR struct netprocfs_file_s *priv, size_t xfrsize; ssize_t nreturned; - fvdbg("buffer=%p buflen=%lu\n", buffer, (unsigned long)buflen); + finfo("buffer=%p buflen=%lu\n", buffer, (unsigned long)buflen); /* Is there line data already buffered? */ diff --git a/net/route/net_addroute.c b/net/route/net_addroute.c index bf9ea3f3df9e4ef691aca51037d05286a6ce18a9..3451a1691e9a8c24aabb178f8c408b248ecf2c8a 100644 --- a/net/route/net_addroute.c +++ b/net/route/net_addroute.c @@ -81,7 +81,7 @@ int net_addroute(in_addr_t target, in_addr_t netmask, in_addr_t router) route = net_allocroute(); if (!route) { - ndbg("ERROR: Failed to allocate a route\n"); + nerr("ERROR: Failed to allocate a route\n"); return -ENOMEM; } @@ -114,7 +114,7 @@ int net_addroute_ipv6(net_ipv6addr_t target, net_ipv6addr_t netmask, net_ipv6add route = net_allocroute_ipv6(); if (!route) { - ndbg("ERROR: Failed to allocate a route\n"); + nerr("ERROR: Failed to allocate a route\n"); return -ENOMEM; } diff --git a/net/route/net_foreachroute.c b/net/route/net_foreachroute.c index 13c154f539e0a895156ff2de972c32a622143142..1c5789dd64910885b92dad800021260d541019c8 100644 --- a/net/route/net_foreachroute.c +++ b/net/route/net_foreachroute.c @@ -91,7 +91,7 @@ int net_foreachroute(route_handler_t handler, FAR void *arg) ret = handler(route, arg); } - /* Unlock uIP */ + /* Unlock the network */ net_unlock(save); return ret; @@ -122,7 +122,7 @@ int net_foreachroute_ipv6(route_handler_ipv6_t handler, FAR void *arg) ret = handler(route, arg); } - /* Unlock uIP */ + /* Unlock the network */ net_unlock(save); return ret; diff --git a/net/socket/accept.c b/net/socket/accept.c index 11c2301ba8b648fe5babba20128c99e789e0d4d4..59fa329bd8947aa5cfa6f01f231caedb65483b94 100644 --- a/net/socket/accept.c +++ b/net/socket/accept.c @@ -127,7 +127,7 @@ int psock_accept(FAR struct socket *psock, FAR struct sockaddr *addr, FAR socklen_t *addrlen, FAR struct socket *newsock) { - int err; + int errcode; int ret; DEBUGASSERT(psock != NULL); @@ -136,7 +136,7 @@ int psock_accept(FAR struct socket *psock, FAR struct sockaddr *addr, if (psock->s_type != SOCK_STREAM) { - err = EOPNOTSUPP; + errcode = EOPNOTSUPP; goto errout; } @@ -144,7 +144,7 @@ int psock_accept(FAR struct socket *psock, FAR struct sockaddr *addr, if (!_SS_ISLISTENING(psock->s_flags)) { - err = EINVAL; + errcode = EINVAL; goto errout; } @@ -167,7 +167,7 @@ int psock_accept(FAR struct socket *psock, FAR struct sockaddr *addr, { if (*addrlen < sizeof(struct sockaddr_in)) { - err = EBADF; + errcode = EBADF; goto errout; } } @@ -179,7 +179,7 @@ int psock_accept(FAR struct socket *psock, FAR struct sockaddr *addr, { if (*addrlen < sizeof(struct sockaddr_in6)) { - err = EBADF; + errcode = EBADF; goto errout; } } @@ -191,7 +191,7 @@ int psock_accept(FAR struct socket *psock, FAR struct sockaddr *addr, { if (*addrlen < sizeof(sa_family_t)) { - err = EBADF; + errcode = EBADF; goto errout; } } @@ -200,7 +200,7 @@ int psock_accept(FAR struct socket *psock, FAR struct sockaddr *addr, default: DEBUGPANIC(); - err = EINVAL; + errcode = EINVAL; goto errout; } } @@ -222,7 +222,7 @@ int psock_accept(FAR struct socket *psock, FAR struct sockaddr *addr, ret = psock_local_accept(psock, addr, addrlen, &newsock->s_conn); if (ret < 0) { - err = -ret; + errcode = -ret; goto errout; } } @@ -242,7 +242,7 @@ int psock_accept(FAR struct socket *psock, FAR struct sockaddr *addr, if (ret < 0) { net_unlock(state); - err = -ret; + errcode = -ret; goto errout; } @@ -259,7 +259,7 @@ int psock_accept(FAR struct socket *psock, FAR struct sockaddr *addr, */ net_unlock(state); - err = -ret; + errcode = -ret; goto errout_after_accept; } @@ -277,7 +277,7 @@ errout_after_accept: psock_close(newsock); errout: - set_errno(err); + set_errno(errcode); return ERROR; } @@ -354,7 +354,7 @@ int accept(int sockfd, FAR struct sockaddr *addr, FAR socklen_t *addrlen) FAR struct socket *psock = sockfd_socket(sockfd); FAR struct socket *newsock; int newfd; - int err; + int errcode; int ret; /* Verify that the sockfd corresponds to valid, allocated socket */ @@ -369,12 +369,12 @@ int accept(int sockfd, FAR struct sockaddr *addr, FAR socklen_t *addrlen) #if CONFIG_NFILE_DESCRIPTORS > 0 if ((unsigned int)sockfd < CONFIG_NFILE_DESCRIPTORS) { - err = ENOTSOCK; + errcode = ENOTSOCK; } else #endif { - err = EBADF; + errcode = EBADF; } goto errout; @@ -387,14 +387,14 @@ int accept(int sockfd, FAR struct sockaddr *addr, FAR socklen_t *addrlen) newfd = sockfd_allocate(0); if (newfd < 0) { - err = ENFILE; + errcode = ENFILE; goto errout; } newsock = sockfd_socket(newfd); if (newsock == NULL) { - err = ENFILE; + errcode = ENFILE; goto errout_with_socket; } @@ -413,7 +413,7 @@ errout_with_socket: sockfd_release(newfd); errout: - set_errno(err); + set_errno(errcode); return ERROR; } diff --git a/net/socket/bind.c b/net/socket/bind.c index 8095c7180777a846c848693c2bbe038303eff280..1197460ce796634499328c3a088c03d547be1836 100644 --- a/net/socket/bind.c +++ b/net/socket/bind.c @@ -156,14 +156,14 @@ int psock_bind(FAR struct socket *psock, const struct sockaddr *addr, FAR const struct sockaddr_ll *lladdr = (const struct sockaddr_ll *)addr; #endif socklen_t minlen; - int err; + int errcode; int ret = OK; /* Verify that the psock corresponds to valid, allocated socket */ if (!psock || psock->s_crefs <= 0) { - err = ENOTSOCK; + errcode = ENOTSOCK; goto errout; } @@ -196,15 +196,15 @@ int psock_bind(FAR struct socket *psock, const struct sockaddr *addr, #endif default: - ndbg("ERROR: Unrecognized address family: %d\n", addr->sa_family); - err = EAFNOSUPPORT; + nerr("ERROR: Unrecognized address family: %d\n", addr->sa_family); + errcode = EAFNOSUPPORT; goto errout; } if (addrlen < minlen) { - ndbg("ERROR: Invalid address length: %d < %d\n", addrlen, minlen); - err = EBADF; + nerr("ERROR: Invalid address length: %d < %d\n", addrlen, minlen); + errcode = EBADF; goto errout; } @@ -301,7 +301,7 @@ int psock_bind(FAR struct socket *psock, const struct sockaddr *addr, #endif /* CONFIG_NET_UDP || CONFIG_NET_LOCAL_DGRAM */ default: - err = EBADF; + errcode = EBADF; goto errout; } @@ -309,14 +309,14 @@ int psock_bind(FAR struct socket *psock, const struct sockaddr *addr, if (ret < 0) { - err = -ret; + errcode = -ret; goto errout; } return OK; errout: - set_errno(err); + set_errno(errcode); return ERROR; } diff --git a/net/socket/connect.c b/net/socket/connect.c index cbd19e177450523f0f9f69895122592c69748fd1..22c9cbbe3186a28072ed1d64faad3e956a1e2175 100644 --- a/net/socket/connect.c +++ b/net/socket/connect.c @@ -185,7 +185,7 @@ static uint16_t psock_connect_interrupt(FAR struct net_driver_s *dev, { struct tcp_connect_s *pstate = (struct tcp_connect_s *)pvpriv; - nllvdbg("flags: %04x\n", flags); + ninfo("flags: %04x\n", flags); /* 'priv' might be null in some race conditions (?) */ @@ -261,7 +261,7 @@ static uint16_t psock_connect_interrupt(FAR struct net_driver_s *dev, return flags & ~TCP_NEWDATA; } - nllvdbg("Resuming: %d\n", pstate->tc_result); + ninfo("Resuming: %d\n", pstate->tc_result); /* Stop further callbacks */ @@ -507,13 +507,13 @@ int psock_connect(FAR struct socket *psock, FAR const struct sockaddr *addr, #if defined(CONFIG_NET_TCP) || defined(CONFIG_NET_UDP) || defined(CONFIG_NET_LOCAL) int ret; #endif - int err; + int errcode; /* Verify that the psock corresponds to valid, allocated socket */ if (!psock || psock->s_crefs <= 0) { - err = EBADF; + errcode = EBADF; goto errout; } @@ -526,7 +526,7 @@ int psock_connect(FAR struct socket *psock, FAR const struct sockaddr *addr, { if (addrlen < sizeof(struct sockaddr_in)) { - err = EBADF; + errcode = EBADF; goto errout; } } @@ -538,7 +538,7 @@ int psock_connect(FAR struct socket *psock, FAR const struct sockaddr *addr, { if (addrlen < sizeof(struct sockaddr_in6)) { - err = EBADF; + errcode = EBADF; goto errout; } } @@ -550,7 +550,7 @@ int psock_connect(FAR struct socket *psock, FAR const struct sockaddr *addr, { if (addrlen < sizeof(sa_family_t)) { - err = EBADF; + errcode = EBADF; goto errout; } } @@ -559,7 +559,7 @@ int psock_connect(FAR struct socket *psock, FAR const struct sockaddr *addr, default: DEBUGPANIC(); - err = EAFNOSUPPORT; + errcode = EAFNOSUPPORT; goto errout; } @@ -574,7 +574,7 @@ int psock_connect(FAR struct socket *psock, FAR const struct sockaddr *addr, if (_SS_ISCONNECTED(psock->s_flags)) { - err = EISCONN; + errcode = EISCONN; goto errout; } @@ -604,7 +604,7 @@ int psock_connect(FAR struct socket *psock, FAR const struct sockaddr *addr, if (ret < 0) { - err = -ret; + errcode = -ret; goto errout; } } @@ -644,7 +644,7 @@ int psock_connect(FAR struct socket *psock, FAR const struct sockaddr *addr, if (ret < 0) { - err = -ret; + errcode = -ret; goto errout; } } @@ -652,14 +652,14 @@ int psock_connect(FAR struct socket *psock, FAR const struct sockaddr *addr, #endif /* CONFIG_NET_UDP || CONFIG_NET_LOCAL_DGRAM */ default: - err = EBADF; + errcode = EBADF; goto errout; } return OK; errout: - set_errno(err); + set_errno(errcode); return ERROR; } diff --git a/net/socket/getsockname.c b/net/socket/getsockname.c index b6b8eebcee8e6fb92aa9eeb906704acd64e44601..3b895525ef40e4c1d1d0de7d686e36d01cdf4d4d 100644 --- a/net/socket/getsockname.c +++ b/net/socket/getsockname.c @@ -351,13 +351,13 @@ int getsockname(int sockfd, FAR struct sockaddr *addr, FAR socklen_t *addrlen) { FAR struct socket *psock = sockfd_socket(sockfd); int ret; - int err; + int errcode; /* Verify that the sockfd corresponds to valid, allocated socket */ if (!psock || psock->s_crefs <= 0) { - err = EBADF; + errcode = EBADF; goto errout; } @@ -365,10 +365,10 @@ int getsockname(int sockfd, FAR struct sockaddr *addr, FAR socklen_t *addrlen) * system (?) */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!addr || !addrlen) { - err = EINVAL; + errcode = EINVAL; goto errout; } #endif @@ -391,7 +391,7 @@ int getsockname(int sockfd, FAR struct sockaddr *addr, FAR socklen_t *addrlen) case PF_PACKET: default: - err = EAFNOSUPPORT; + errcode = EAFNOSUPPORT; goto errout; } @@ -399,14 +399,14 @@ int getsockname(int sockfd, FAR struct sockaddr *addr, FAR socklen_t *addrlen) if (ret < 0) { - err = -ret; + errcode = -ret; goto errout; } return OK; errout: - set_errno(err); + set_errno(errcode); return ERROR; } diff --git a/net/socket/getsockopt.c b/net/socket/getsockopt.c index c2236e7591052fe909cb627b5243a17ce1ebe6be..5072f02067cfc13f6cea28132d9559fa9afc3016 100644 --- a/net/socket/getsockopt.c +++ b/net/socket/getsockopt.c @@ -96,13 +96,13 @@ int psock_getsockopt(FAR struct socket *psock, int level, int option, FAR void *value, FAR socklen_t *value_len) { - int err; + int errcode; /* Verify that the socket option if valid (but might not be supported ) */ if (!_SO_GETVALID(option) || !value || !value_len) { - err = EINVAL; + errcode = EINVAL; goto errout; } @@ -131,7 +131,7 @@ int psock_getsockopt(FAR struct socket *psock, int level, int option, if (*value_len < sizeof(int)) { - err = EINVAL; + errcode = EINVAL; goto errout; } @@ -155,7 +155,7 @@ int psock_getsockopt(FAR struct socket *psock, int level, int option, if (*value_len < sizeof(int)) { - err = EINVAL; + errcode = EINVAL; goto errout; } @@ -179,7 +179,7 @@ int psock_getsockopt(FAR struct socket *psock, int level, int option, if (*value_len < sizeof(struct timeval)) { - err = EINVAL; + errcode = EINVAL; goto errout; } @@ -214,14 +214,14 @@ int psock_getsockopt(FAR struct socket *psock, int level, int option, case SO_SNDLOWAT: /* Sets the minimum number of bytes to output */ default: - err = ENOPROTOOPT; + errcode = ENOPROTOOPT; goto errout; } return OK; errout: - set_errno(err); + set_errno(errcode); return ERROR; } diff --git a/net/socket/listen.c b/net/socket/listen.c index c552d79402345100a8691c949717a9435cc3a200..0d91ccb5867b44ab2edadb1538073f60c84cebcf 100644 --- a/net/socket/listen.c +++ b/net/socket/listen.c @@ -84,7 +84,7 @@ int psock_listen(FAR struct socket *psock, int backlog) { - int err; + int errcode; DEBUGASSERT(psock != NULL); @@ -92,7 +92,7 @@ int psock_listen(FAR struct socket *psock, int backlog) if (psock->s_type != SOCK_STREAM || !psock->s_conn) { - err = EOPNOTSUPP; + errcode = EOPNOTSUPP; goto errout; } @@ -104,10 +104,10 @@ int psock_listen(FAR struct socket *psock, int backlog) FAR struct local_conn_s *conn = (FAR struct local_conn_s *)psock->s_conn; - err = local_listen(conn, backlog); - if (err < 0) + errcode = local_listen(conn, backlog); + if (errcode < 0) { - err = -err; + errcode = -errcode; goto errout; } } @@ -123,17 +123,17 @@ int psock_listen(FAR struct socket *psock, int backlog) if (conn->lport <= 0) { - err = EOPNOTSUPP; + errcode = EOPNOTSUPP; goto errout; } /* Set up the backlog for this connection */ #ifdef CONFIG_NET_TCPBACKLOG - err = tcp_backlogcreate(conn, backlog); - if (err < 0) + errcode = tcp_backlogcreate(conn, backlog); + if (errcode < 0) { - err = -err; + errcode = -errcode; goto errout; } #endif @@ -150,7 +150,7 @@ int psock_listen(FAR struct socket *psock, int backlog) return OK; errout: - set_errno(err); + set_errno(errcode); return ERROR; } @@ -190,7 +190,7 @@ errout: int listen(int sockfd, int backlog) { FAR struct socket *psock = sockfd_socket(sockfd); - int err; + int errcode; /* Verify that the sockfd corresponds to valid, allocated socket */ @@ -204,15 +204,15 @@ int listen(int sockfd, int backlog) #if CONFIG_NFILE_DESCRIPTORS > 0 if ((unsigned int)sockfd < CONFIG_NFILE_DESCRIPTORS) { - err = ENOTSOCK; + errcode = ENOTSOCK; } else #endif { - err = EBADF; + errcode = EBADF; } - set_errno(err); + set_errno(errcode); return ERROR; } diff --git a/net/socket/net_checksd.c b/net/socket/net_checksd.c index 3269b531a9fb842f4a9f4f32f8b13d13d9aa1756..64a2f4df8ead496f55d75feb3f0d0dc4d5e5bd70 100644 --- a/net/socket/net_checksd.c +++ b/net/socket/net_checksd.c @@ -72,7 +72,7 @@ int net_checksd(int sd, int oflags) if (!psock || psock->s_crefs <= 0) { - nvdbg("No valid socket for sd: %d\n", sd); + ninfo("No valid socket for sd: %d\n", sd); return -EBADF; } diff --git a/net/socket/net_clone.c b/net/socket/net_clone.c index 5d46f45ead31f34266e647d615dc40922ac7360d..e76f4ed2ceead7d06e84392039640bec04a4c332 100644 --- a/net/socket/net_clone.c +++ b/net/socket/net_clone.c @@ -116,7 +116,7 @@ int net_clone(FAR struct socket *psock1, FAR struct socket *psock2) else #endif { - ndbg("Unsupported type: %d\n", psock2->s_type); + nerr("ERROR: Unsupported type: %d\n", psock2->s_type); ret = -EBADF; } diff --git a/net/socket/net_close.c b/net/socket/net_close.c index f439811b854b1cf6453efa56a78f2b1fea90a5ff..261e1d4a883baeddd0cf255418877b51dc54211a 100644 --- a/net/socket/net_close.c +++ b/net/socket/net_close.c @@ -136,10 +136,10 @@ static inline int close_timeout(FAR struct tcp_close_s *pstate) * Function: netclose_interrupt * * Description: - * Handle uIP callback events. + * Handle network callback events. * * Parameters: - * conn - uIP TCP connection structure + * conn - TCP connection structure * * Returned Value: * None @@ -161,7 +161,7 @@ static uint16_t netclose_interrupt(FAR struct net_driver_s *dev, DEBUGASSERT(conn != NULL); - nllvdbg("conn: %p flags: %04x\n", conn, flags); + ninfo("conn: %p flags: %04x\n", conn, flags); /* TCP_DISCONN_EVENTS: * TCP_CLOSE: The remote host has closed the connection @@ -209,7 +209,7 @@ static uint16_t netclose_interrupt(FAR struct net_driver_s *dev, { /* Yes.. Wake up the waiting thread and report the timeout */ - nlldbg("CLOSE timeout\n"); + nerr("ERROR: CLOSE timeout\n"); pstate->cl_result = -ETIMEDOUT; goto end_wait; } @@ -250,7 +250,7 @@ end_wait: pstate->cl_cb->event = NULL; sem_post(&pstate->cl_sem); - nllvdbg("Resuming\n"); + ninfo("Resuming\n"); return 0; #endif } @@ -320,7 +320,7 @@ static inline void netclose_txnotify(FAR struct socket *psock, * Break any current TCP connection * * Parameters: - * conn - uIP TCP connection structure + * conn - TCP connection structure * * Returned Value: * None @@ -428,7 +428,7 @@ static inline int netclose_disconnect(FAR struct socket *psock) /* Free the connection */ conn->crefs = 0; /* No more references on the connection */ - tcp_free(conn); /* Free uIP resources */ + tcp_free(conn); /* Free network resources */ /* Get the result of the close */ @@ -507,17 +507,17 @@ static void local_close(FAR struct socket *psock) int psock_close(FAR struct socket *psock) { - int err; + int errcode; /* Verify that the sockfd corresponds to valid, allocated socket */ if (!psock || psock->s_crefs <= 0) { - err = EBADF; + errcode = EBADF; goto errout; } - /* We perform the uIP close operation only if this is the last count on + /* We perform the close operation only if this is the last count on * the socket. (actually, I think the socket crefs only takes the values * 0 and 1 right now). * @@ -527,7 +527,7 @@ int psock_close(FAR struct socket *psock) if (psock->s_crefs <= 1 && psock->s_conn != NULL) { - /* Perform uIP side of the close depending on the protocol type */ + /* Perform local side of the close depending on the protocol type */ switch (psock->s_type) { @@ -565,8 +565,8 @@ int psock_close(FAR struct socket *psock) /* Break any current connections */ - err = netclose_disconnect(psock); - if (err < 0) + errcode = netclose_disconnect(psock); + if (errcode < 0) { /* This would normally occur only if there is a * timeout from a lingering close. @@ -649,7 +649,7 @@ int psock_close(FAR struct socket *psock) /* Yes... free the connection structure */ conn->crefs = 0; /* No more references on the connection */ - pkt_free(psock->s_conn); /* Free uIP resources */ + pkt_free(psock->s_conn); /* Free network resources */ } else { @@ -662,7 +662,7 @@ int psock_close(FAR struct socket *psock) #endif default: - err = EBADF; + errcode = EBADF; goto errout; } } @@ -678,7 +678,7 @@ errout_with_psock: #endif errout: - set_errno(err); + set_errno(errcode); return ERROR; } diff --git a/net/socket/net_dupsd.c b/net/socket/net_dupsd.c index 85d9b6f9356fcf80b95abfd257e5d8013327bae3..b5696871d21b09872985a66103939dd38207521d 100644 --- a/net/socket/net_dupsd.c +++ b/net/socket/net_dupsd.c @@ -68,7 +68,7 @@ int net_dupsd(int sockfd, int minsd) FAR struct socket *psock1; FAR struct socket *psock2; int sockfd2; - int err; + int errcode; int ret; /* Make sure that the minimum socket descriptor is within the legal range. @@ -99,7 +99,7 @@ int net_dupsd(int sockfd, int minsd) if (!psock1 || psock1->s_crefs <= 0) { - err = EBADF; + errcode = EBADF; goto errout; } @@ -108,7 +108,7 @@ int net_dupsd(int sockfd, int minsd) sockfd2 = sockfd_allocate(minsd); if (sockfd2 < 0) { - err = ENFILE; + errcode = ENFILE; goto errout; } @@ -117,7 +117,7 @@ int net_dupsd(int sockfd, int minsd) psock2 = sockfd_socket(sockfd2); if (!psock2) { - err = ENOSYS; /* should not happen */ + errcode = ENOSYS; /* should not happen */ goto errout; } @@ -126,7 +126,7 @@ int net_dupsd(int sockfd, int minsd) ret = net_clone(psock1, psock2); if (ret < 0) { - err = -ret; + errcode = -ret; goto errout; } @@ -136,10 +136,8 @@ int net_dupsd(int sockfd, int minsd) errout: sched_unlock(); - set_errno(err); + set_errno(errcode); return ERROR; } #endif /* defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0 */ - - diff --git a/net/socket/net_dupsd2.c b/net/socket/net_dupsd2.c index 96c3d1831569d87668e436e623f6b3ca958d8ff3..7aa2634e21e4eb9bd1a1b83a7cf71aade0f0d1eb 100644 --- a/net/socket/net_dupsd2.c +++ b/net/socket/net_dupsd2.c @@ -71,7 +71,7 @@ int dup2(int sockfd1, int sockfd2) { FAR struct socket *psock1; FAR struct socket *psock2; - int err; + int errcode; int ret; /* Lock the scheduler throughout the following */ @@ -89,7 +89,7 @@ int dup2(int sockfd1, int sockfd2) if (!psock1 || !psock2 || psock1->s_crefs <= 0) { - err = EBADF; + errcode = EBADF; goto errout; } @@ -107,7 +107,7 @@ int dup2(int sockfd1, int sockfd2) ret = net_clone(psock1, psock2); if (ret < 0) { - err = -ret; + errcode = -ret; goto errout; } @@ -116,10 +116,8 @@ int dup2(int sockfd1, int sockfd2) errout: sched_unlock(); - set_errno(err); + set_errno(errcode); return ERROR; } #endif /* CONFIG_NET && CONFIG_NSOCKET_DESCRIPTORS > 0 */ - - diff --git a/net/socket/net_monitor.c b/net/socket/net_monitor.c index 3e6cf0c2ae318fe1d69095fb33cc2b423c82ee6e..d7d566725ba0456153592cb3a938908224a0f86a 100644 --- a/net/socket/net_monitor.c +++ b/net/socket/net_monitor.c @@ -145,7 +145,7 @@ static uint16_t connection_event(FAR struct net_driver_s *dev, if (psock) { - nllvdbg("flags: %04x s_flags: %02x\n", flags, psock->s_flags); + ninfo("flags: %04x s_flags: %02x\n", flags, psock->s_flags); /* TCP_DISCONN_EVENTS: TCP_CLOSE, TCP_ABORT, TCP_TIMEDOUT, or * NETDEV_DOWN. All loss-of-connection events. diff --git a/net/socket/net_sendfile.c b/net/socket/net_sendfile.c index a8b7b9f16284d902611ef61e20e3899bff95ebbd..6c70cab18e677fe34edab615e33e636b9cf3a38d 100644 --- a/net/socket/net_sendfile.c +++ b/net/socket/net_sendfile.c @@ -156,7 +156,7 @@ static uint16_t ack_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn, { FAR struct sendfile_s *pstate = (FAR struct sendfile_s *)pvpriv; - nllvdbg("flags: %04x\n", flags); + ninfo("flags: %04x\n", flags); if ((flags & TCP_ACKDATA) != 0) { @@ -197,8 +197,8 @@ static uint16_t ack_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn, */ pstate->snd_acked = tcp_getsequence(tcp->ackno) - pstate->snd_isn; - nllvdbg("ACK: acked=%d sent=%d flen=%d\n", - pstate->snd_acked, pstate->snd_sent, pstate->snd_flen); + ninfo("ACK: acked=%d sent=%d flen=%d\n", + pstate->snd_acked, pstate->snd_sent, pstate->snd_flen); dev->d_sndlen = 0; @@ -206,7 +206,7 @@ static uint16_t ack_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn, } else if ((flags & TCP_REXMIT) != 0) { - nlldbg("REXMIT\n"); + nwarn("WARNING: TCP_REXMIT\n"); /* Yes.. in this case, reset the number of bytes that have been sent * to the number of bytes that have been ACKed. @@ -221,7 +221,7 @@ static uint16_t ack_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn, { /* Report not connected */ - nlldbg("Lost connection\n"); + nwarn("WARNING: Lost connection\n"); net_lostconnection(pstate->snd_sock, flags); pstate->snd_sent = -ENOTCONN; @@ -336,8 +336,8 @@ static uint16_t sendfile_interrupt(FAR struct net_driver_s *dev, FAR void *pvcon } #endif - nllvdbg("flags: %04x acked: %d sent: %d\n", - flags, pstate->snd_acked, pstate->snd_sent); + ninfo("flags: %04x acked: %d sent: %d\n", + flags, pstate->snd_acked, pstate->snd_sent); /* Check for a loss of connection */ @@ -345,7 +345,7 @@ static uint16_t sendfile_interrupt(FAR struct net_driver_s *dev, FAR void *pvcon { /* Report not connected */ - nlldbg("Lost connection\n"); + nwarn("WARNING: Lost connection\n"); net_lostconnection(pstate->snd_sock, flags); pstate->snd_sent = -ENOTCONN; @@ -386,7 +386,7 @@ static uint16_t sendfile_interrupt(FAR struct net_driver_s *dev, FAR void *pvcon if (ret < 0) { int errcode = get_errno(); - nlldbg("failed to lseek: %d\n", errcode); + nerr("ERROR: Failed to lseek: %d\n", errcode); pstate->snd_sent = -errcode; goto end_wait; } @@ -395,14 +395,14 @@ static uint16_t sendfile_interrupt(FAR struct net_driver_s *dev, FAR void *pvcon if (ret < 0) { int errcode = get_errno(); - nlldbg("failed to read from input file: %d\n", errcode); + nerr("ERROR: Failed to read from input file: %d\n", errcode); pstate->snd_sent = -errcode; goto end_wait; } dev->d_sndlen = sndlen; - /* Set the sequence number for this packet. NOTE: uIP updates + /* Set the sequence number for this packet. NOTE: The network updates * sndseq on recept of ACK *before* this function is called. In that * case sndseq will point to the next unacknowledge byte (which might * have already been sent). We will overwrite the value of sndseq @@ -410,7 +410,7 @@ static uint16_t sendfile_interrupt(FAR struct net_driver_s *dev, FAR void *pvcon */ seqno = pstate->snd_sent + pstate->snd_isn; - nllvdbg("SEND: sndseq %08x->%08x len: %d\n", conn->sndseq, seqno, ret); + ninfo("SEND: sndseq %08x->%08x len: %d\n", conn->sndseq, seqno, ret); tcp_setsequence(conn->sndseq, seqno); @@ -424,13 +424,13 @@ static uint16_t sendfile_interrupt(FAR struct net_driver_s *dev, FAR void *pvcon /* Update the amount of data sent (but not necessarily ACKed) */ pstate->snd_sent += sndlen; - nllvdbg("pid: %d SEND: acked=%d sent=%d flen=%d\n", getpid(), - pstate->snd_acked, pstate->snd_sent, pstate->snd_flen); + ninfo("pid: %d SEND: acked=%d sent=%d flen=%d\n", getpid(), + pstate->snd_acked, pstate->snd_sent, pstate->snd_flen); } } else { - nlldbg("Window full, wait for ack\n"); + nwarn("WARNING: Window full, wait for ack\n"); goto wait; } } @@ -444,7 +444,7 @@ static uint16_t sendfile_interrupt(FAR struct net_driver_s *dev, FAR void *pvcon { /* Yes.. report the timeout */ - nlldbg("SEND timeout\n"); + nwarn("WARNING: SEND timeout\n"); pstate->snd_sent = -ETIMEDOUT; goto end_wait; } @@ -604,14 +604,14 @@ ssize_t net_sendfile(int outfd, struct file *infile, off_t *offset, FAR struct tcp_conn_s *conn; struct sendfile_s state; net_lock_t save; - int err; + int errcode; /* Verify that the sockfd corresponds to valid, allocated socket */ if (!psock || psock->s_crefs <= 0) { - ndbg("ERROR: Invalid socket\n"); - err = EBADF; + nerr("ERROR: Invalid socket\n"); + errcode = EBADF; goto errout; } @@ -619,8 +619,8 @@ ssize_t net_sendfile(int outfd, struct file *infile, off_t *offset, if (psock->s_type != SOCK_STREAM || !_SS_ISCONNECTED(psock->s_flags)) { - ndbg("ERROR: Not connected\n"); - err = ENOTCONN; + nerr("ERROR: Not connected\n"); + errcode = ENOTCONN; goto errout; } @@ -657,8 +657,8 @@ ssize_t net_sendfile(int outfd, struct file *infile, off_t *offset, if (ret < 0) { - ndbg("ERROR: Not reachable\n"); - err = ENETUNREACH; + nerr("ERROR: Not reachable\n"); + errcode = ENETUNREACH; goto errout; } #endif /* CONFIG_NET_ARP_SEND || CONFIG_NET_ICMPv6_NEIGHBOR */ @@ -687,8 +687,8 @@ ssize_t net_sendfile(int outfd, struct file *infile, off_t *offset, if (state.snd_datacb == NULL) { - nlldbg("Failed to allocate data callback\n"); - err = ENOMEM; + nerr("ERROR: Failed to allocate data callback\n"); + errcode = ENOMEM; goto errout_locked; } @@ -696,8 +696,8 @@ ssize_t net_sendfile(int outfd, struct file *infile, off_t *offset, if (state.snd_ackcb == NULL) { - nlldbg("Failed to allocate ack callback\n"); - err = ENOMEM; + nerr("ERROR: Failed to allocate ack callback\n"); + errcode = ENOMEM; goto errout_datacb; } @@ -754,9 +754,9 @@ errout_locked: errout: - if (err) + if (errcode) { - set_errno(err); + set_errno(errcode); return ERROR; } else if (state.snd_sent < 0) diff --git a/net/socket/net_sockets.c b/net/socket/net_sockets.c index 31274117c7307eb1935df46e7477b6fdf40ad85c..ceac793ee8b0ed5ac105e951d427a925af2d402c 100644 --- a/net/socket/net_sockets.c +++ b/net/socket/net_sockets.c @@ -201,7 +201,7 @@ int sockfd_allocate(int minsd) void sock_release(FAR struct socket *psock) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (psock) #endif { diff --git a/net/socket/net_vfcntl.c b/net/socket/net_vfcntl.c index d6fd76f20b51ba5a269469206bada1e57b55369f..977db7833ad22312593970134492d60041b5f103 100644 --- a/net/socket/net_vfcntl.c +++ b/net/socket/net_vfcntl.c @@ -77,16 +77,16 @@ int net_vfcntl(int sockfd, int cmd, va_list ap) { FAR struct socket *psock = sockfd_socket(sockfd); net_lock_t flags; - int err = 0; + int errcode = 0; int ret = 0; - nvdbg("sockfd=%d cmd=%d\n", sockfd, cmd); + ninfo("sockfd=%d cmd=%d\n", sockfd, cmd); /* Verify that the sockfd corresponds to valid, allocated socket */ if (!psock || psock->s_crefs <= 0) { - err = EBADF; + errcode = EBADF; goto errout; } @@ -126,7 +126,7 @@ int net_vfcntl(int sockfd, int cmd, va_list ap) * successful execution of one of the exec functions. */ - err = ENOSYS; /* F_GETFD and F_SETFD not implemented */ + errcode = ENOSYS; /* F_GETFD and F_SETFD not implemented */ break; case F_GETFL: @@ -216,7 +216,7 @@ int net_vfcntl(int sockfd, int cmd, va_list ap) #endif #endif /* CONFIG_NET_LOCAL || CONFIG_NET_TCP_READAHEAD || CONFIG_NET_UDP_READAHEAD */ { - ndbg("ERROR: Non-blocking not supported for this socket\n"); + nerr("ERROR: Non-blocking not supported for this socket\n"); } } break; @@ -263,20 +263,20 @@ int net_vfcntl(int sockfd, int cmd, va_list ap) * not be done. */ - err = ENOSYS; /* F_GETOWN, F_SETOWN, F_GETLK, F_SETLK, F_SETLKW */ + errcode = ENOSYS; /* F_GETOWN, F_SETOWN, F_GETLK, F_SETLK, F_SETLKW */ break; default: - err = EINVAL; + errcode = EINVAL; break; } net_unlock(flags); errout: - if (err != 0) + if (errcode != 0) { - set_errno(err); + set_errno(errcode); return ERROR; } diff --git a/net/socket/recvfrom.c b/net/socket/recvfrom.c index 01259753933fe40ef8fe7f3cb79fa908db883069..8b318bb6df8dbd41c3a48b585320749ae93ffb8d 100644 --- a/net/socket/recvfrom.c +++ b/net/socket/recvfrom.c @@ -181,7 +181,7 @@ static size_t recvfrom_newdata(FAR struct net_driver_s *dev, /* Copy the new appdata into the user buffer */ memcpy(pstate->rf_buffer, dev->d_appdata, recvlen); - nllvdbg("Received %d bytes (of %d)\n", (int)recvlen, (int)dev->d_len); + ninfo("Received %d bytes (of %d)\n", (int)recvlen, (int)dev->d_len); /* Update the accumulated size of the data read */ @@ -227,7 +227,7 @@ static void recvfrom_newpktdata(FAR struct net_driver_s *dev, /* Copy the new packet data into the user buffer */ memcpy(pstate->rf_buffer, dev->d_buf, recvlen); - nllvdbg("Received %d bytes (of %d)\n", (int)recvlen, (int)dev->d_len); + ninfo("Received %d bytes (of %d)\n", (int)recvlen, (int)dev->d_len); /* Update the accumulated size of the data read */ @@ -293,11 +293,11 @@ static inline void recvfrom_newtcpdata(FAR struct net_driver_s *dev, #ifdef CONFIG_DEBUG_NET if (nsaved < buflen) { - ndbg("ERROR: packet data not saved (%d bytes)\n", buflen - nsaved); + nerr("ERROR: packet data not saved (%d bytes)\n", buflen - nsaved); } #endif #else - ndbg("ERROR: packet data lost (%d bytes)\n", dev->d_len - recvlen); + nerr("ERROR: packet data lost (%d bytes)\n", dev->d_len - recvlen); #endif } @@ -378,7 +378,7 @@ static inline void recvfrom_tcpreadahead(struct recvfrom_s *pstate) */ recvlen = iob_copyout(pstate->rf_buffer, iob, pstate->rf_buflen, 0); - nllvdbg("Received %d bytes (of %d)\n", recvlen, iob->io_pktlen); + ninfo("Received %d bytes (of %d)\n", recvlen, iob->io_pktlen); /* Update the accumulated size of the data read */ @@ -478,7 +478,7 @@ static inline void recvfrom_udpreadahead(struct recvfrom_s *pstate) recvlen = iob_copyout(pstate->rf_buffer, iob, pstate->rf_buflen, src_addr_size + sizeof(uint8_t)); - nllvdbg("Received %d bytes (of %d)\n", recvlen, iob->io_pktlen); + ninfo("Received %d bytes (of %d)\n", recvlen, iob->io_pktlen); /* Update the accumulated size of the data read */ @@ -621,7 +621,7 @@ static uint16_t recvfrom_pktinterrupt(FAR struct net_driver_s *dev, { struct recvfrom_s *pstate = (struct recvfrom_s *)pvpriv; - nllvdbg("flags: %04x\n", flags); + ninfo("flags: %04x\n", flags); /* 'priv' might be null in some race conditions (?) */ @@ -636,7 +636,7 @@ static uint16_t recvfrom_pktinterrupt(FAR struct net_driver_s *dev, /* We are finished. */ - nllvdbg("PKT done\n"); + ninfo("PKT done\n"); /* Don't allow any further call backs. */ @@ -778,7 +778,7 @@ static uint16_t recvfrom_tcpinterrupt(FAR struct net_driver_s *dev, #endif #endif - nllvdbg("flags: %04x\n", flags); + ninfo("flags: %04x\n", flags); /* 'priv' might be null in some race conditions (?) */ @@ -827,7 +827,7 @@ static uint16_t recvfrom_tcpinterrupt(FAR struct net_driver_s *dev, if (pstate->rf_recvlen > 0) #endif { - nllvdbg("TCP resume\n"); + ninfo("TCP resume\n"); /* The TCP receive buffer is full. Return now and don't allow * any further TCP call backs. @@ -864,7 +864,7 @@ static uint16_t recvfrom_tcpinterrupt(FAR struct net_driver_s *dev, else if ((flags & TCP_DISCONN_EVENTS) != 0) { - nllvdbg("Lost connection\n"); + ninfo("Lost connection\n"); /* Stop further callbacks */ @@ -924,7 +924,7 @@ static uint16_t recvfrom_tcpinterrupt(FAR struct net_driver_s *dev, * callbacks */ - nllvdbg("TCP timeout\n"); + ninfo("TCP timeout\n"); pstate->rf_cb->flags = 0; pstate->rf_cb->priv = NULL; @@ -1122,7 +1122,7 @@ static uint16_t recvfrom_udp_interrupt(FAR struct net_driver_s *dev, { FAR struct recvfrom_s *pstate = (FAR struct recvfrom_s *)pvpriv; - nllvdbg("flags: %04x\n", flags); + ninfo("flags: %04x\n", flags); /* 'priv' might be null in some race conditions (?) */ @@ -1136,7 +1136,7 @@ static uint16_t recvfrom_udp_interrupt(FAR struct net_driver_s *dev, { /* Terminate the transfer with an error. */ - nlldbg("ERROR: Network is down\n"); + nerr("ERROR: Network is down\n"); recvfrom_udp_terminate(pstate, -ENETUNREACH); } @@ -1150,7 +1150,7 @@ static uint16_t recvfrom_udp_interrupt(FAR struct net_driver_s *dev, /* We are finished. */ - nllvdbg("UDP done\n"); + ninfo("UDP done\n"); /* Save the sender's address in the caller's 'from' location */ @@ -1176,7 +1176,7 @@ static uint16_t recvfrom_udp_interrupt(FAR struct net_driver_s *dev, * callbacks */ - nllvdbg("ERROR: UDP timeout\n"); + nerr("ERROR: UDP timeout\n"); /* Terminate the transfer with an -EAGAIN error */ @@ -1692,8 +1692,8 @@ static ssize_t tcp_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, } } - /* In general, this uIP-based implementation will not support non-blocking - * socket operations... except in a few cases: Here for TCP receive with read-ahead + /* In general, this implementation will not support non-blocking socket + * operations... except in a few cases: Here for TCP receive with read-ahead * enabled. If this socket is configured as non-blocking then return EAGAIN * if no data was obtained from the read-ahead buffers. */ @@ -1844,21 +1844,21 @@ ssize_t psock_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, FAR socklen_t *fromlen) { ssize_t ret; - int err; + int errcode; /* Verify that non-NULL pointers were passed */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!buf) { - err = EINVAL; + errcode = EINVAL; goto errout; } #endif if (from && !fromlen) { - err = EINVAL; + errcode = EINVAL; goto errout; } @@ -1866,7 +1866,7 @@ ssize_t psock_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, if (!psock || psock->s_crefs <= 0) { - err = EBADF; + errcode = EBADF; goto errout; } @@ -1908,13 +1908,13 @@ ssize_t psock_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, default: DEBUGPANIC(); - err = EINVAL; + errcode = EINVAL; goto errout; } if (*fromlen < minlen) { - err = EINVAL; + errcode = EINVAL; goto errout; } } @@ -1988,7 +1988,7 @@ ssize_t psock_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, default: { - ndbg("ERROR: Unsupported socket type: %d\n", psock->s_type); + nerr("ERROR: Unsupported socket type: %d\n", psock->s_type); ret = -ENOSYS; } break; @@ -2002,7 +2002,7 @@ ssize_t psock_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, if (ret < 0) { - err = -ret; + errcode = -ret; goto errout; } @@ -2011,7 +2011,7 @@ ssize_t psock_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, return ret; errout: - set_errno(err); + set_errno(errcode); return ERROR; } diff --git a/net/socket/sendto.c b/net/socket/sendto.c index 193e3ae4fe222b22fe421123abe127b28060f64a..79eb93e68fa4c1a4cda05341d9a2c7a12865b7c2 100644 --- a/net/socket/sendto.c +++ b/net/socket/sendto.c @@ -128,7 +128,7 @@ ssize_t psock_sendto(FAR struct socket *psock, FAR const void *buf, #if defined(CONFIG_NET_UDP) || defined(CONFIG_NET_LOCAL_DGRAM) ssize_t nsent; #endif - int err; + int errcode; /* If to is NULL or tolen is zero, then this function is same as send (for * connected socket types) @@ -139,8 +139,8 @@ ssize_t psock_sendto(FAR struct socket *psock, FAR const void *buf, #if defined(CONFIG_NET_TCP) || defined(CONFIG_NET_LOCAL_STREAM) return psock_send(psock, buf, len, flags); #else - ndbg("ERROR: No 'to' address\n"); - err = EINVAL; + nerr("ERROR: No 'to' address\n"); + errcode = EINVAL; goto errout; #endif } @@ -168,15 +168,15 @@ ssize_t psock_sendto(FAR struct socket *psock, FAR const void *buf, #endif default: - ndbg("ERROR: Unrecognized address family: %d\n", to->sa_family); - err = EAFNOSUPPORT; + nerr("ERROR: Unrecognized address family: %d\n", to->sa_family); + errcode = EAFNOSUPPORT; goto errout; } if (tolen < minlen) { - ndbg("ERROR: Invalid address length: %d < %d\n", tolen, minlen); - err = EBADF; + nerr("ERROR: Invalid address length: %d < %d\n", tolen, minlen); + errcode = EBADF; goto errout; } @@ -184,8 +184,8 @@ ssize_t psock_sendto(FAR struct socket *psock, FAR const void *buf, if (!psock || psock->s_crefs <= 0) { - ndbg("ERROR: Invalid socket\n"); - err = EBADF; + nerr("ERROR: Invalid socket\n"); + errcode = EBADF; goto errout; } @@ -193,8 +193,8 @@ ssize_t psock_sendto(FAR struct socket *psock, FAR const void *buf, if (psock->s_type != SOCK_DGRAM) { - ndbg("ERROR: Connected socket\n"); - err = EISCONN; + nerr("ERROR: Connected socket\n"); + errcode = EISCONN; goto errout; } @@ -225,18 +225,18 @@ ssize_t psock_sendto(FAR struct socket *psock, FAR const void *buf, if (nsent < 0) { - ndbg("ERROR: UDP or Unix domain sendto() failed: %ld\n", (long)nsent); - err = -nsent; + nerr("ERROR: UDP or Unix domain sendto() failed: %ld\n", (long)nsent); + errcode = -nsent; goto errout; } return nsent; #else - err = ENOSYS; + errcode = ENOSYS; #endif /* CONFIG_NET_UDP || CONFIG_NET_LOCAL_DGRAM */ errout: - set_errno(err); + set_errno(errcode); return ERROR; } diff --git a/net/socket/setsockopt.c b/net/socket/setsockopt.c index 99ec9378ed0a40b132c19d67a0e511b965dd8deb..2086771b37b91a1abc12cac20aa4ea6cdb3330d6 100644 --- a/net/socket/setsockopt.c +++ b/net/socket/setsockopt.c @@ -106,13 +106,13 @@ int psock_setsockopt(FAR struct socket *psock, int level, int option, FAR const void *value, socklen_t value_len) { net_lock_t flags; - int err; + int errcode; /* Verify that the socket option if valid (but might not be supported ) */ if (!_SO_SETVALID(option) || !value) { - err = EINVAL; + errcode = EINVAL; goto errout; } @@ -141,7 +141,7 @@ int psock_setsockopt(FAR struct socket *psock, int level, int option, if (value_len != sizeof(int)) { - err = EINVAL; + errcode = EINVAL; goto errout; } @@ -180,7 +180,7 @@ int psock_setsockopt(FAR struct socket *psock, int level, int option, if (tv == NULL || value_len != sizeof(struct timeval)) { - err = EINVAL; + errcode = EINVAL; goto errout; } @@ -223,7 +223,7 @@ int psock_setsockopt(FAR struct socket *psock, int level, int option, if (value_len < sizeof(FAR struct linger)) { - err = EINVAL; + errcode = EINVAL; goto errout; } @@ -268,14 +268,14 @@ int psock_setsockopt(FAR struct socket *psock, int level, int option, case SO_TYPE: /* Reports the socket type */ default: - err = ENOPROTOOPT; + errcode = ENOPROTOOPT; goto errout; } return OK; errout: - set_errno(err); + set_errno(errcode); return ERROR; } diff --git a/net/socket/socket.c b/net/socket/socket.c index 93fd41a278db51d6f9aafd7cdb6d00ca3108afde..56f6ddfe9c29465cda15f8fac8adf6d8cf6af548 100644 --- a/net/socket/socket.c +++ b/net/socket/socket.c @@ -248,7 +248,7 @@ int psock_socket(int domain, int type, int protocol, FAR struct socket *psock) #endif bool dgramok = false; int ret; - int err; + int errcode; /* Only PF_INET, PF_INET6 or PF_PACKET domains supported */ @@ -284,7 +284,7 @@ int psock_socket(int domain, int type, int protocol, FAR struct socket *psock) #endif default: - err = EAFNOSUPPORT; + errcode = EAFNOSUPPORT; goto errout; } @@ -305,7 +305,7 @@ int psock_socket(int domain, int type, int protocol, FAR struct socket *psock) { if ((protocol != 0 && protocol != IPPROTO_TCP) || !dgramok) { - err = EPROTONOSUPPORT; + errcode = EPROTONOSUPPORT; goto errout; } } @@ -318,7 +318,7 @@ int psock_socket(int domain, int type, int protocol, FAR struct socket *psock) { if (protocol != 0 || !dgramok) { - err = EPROTONOSUPPORT; + errcode = EPROTONOSUPPORT; goto errout; } } @@ -336,7 +336,7 @@ int psock_socket(int domain, int type, int protocol, FAR struct socket *psock) { if ((protocol != 0 && protocol != IPPROTO_UDP) || !dgramok) { - err = EPROTONOSUPPORT; + errcode = EPROTONOSUPPORT; goto errout; } } @@ -349,7 +349,7 @@ int psock_socket(int domain, int type, int protocol, FAR struct socket *psock) { if (protocol != 0 || !dgramok) { - err = EPROTONOSUPPORT; + errcode = EPROTONOSUPPORT; goto errout; } } @@ -362,7 +362,7 @@ int psock_socket(int domain, int type, int protocol, FAR struct socket *psock) case SOCK_RAW: if (dgramok) { - err = EPROTONOSUPPORT; + errcode = EPROTONOSUPPORT; goto errout; } @@ -370,7 +370,7 @@ int psock_socket(int domain, int type, int protocol, FAR struct socket *psock) #endif default: - err = EPROTONOSUPPORT; + errcode = EPROTONOSUPPORT; goto errout; } @@ -389,7 +389,7 @@ int psock_socket(int domain, int type, int protocol, FAR struct socket *psock) * not actually be initialized until the socket is connected. */ - err = ENOMEM; /* Assume failure to allocate connection instance */ + errcode = ENOMEM; /* Assume failure to allocate connection instance */ switch (type) { #if defined(CONFIG_NET_TCP) || defined(CONFIG_NET_LOCAL_STREAM) @@ -423,7 +423,7 @@ int psock_socket(int domain, int type, int protocol, FAR struct socket *psock) { /* Failed to reserve a connection structure */ - err = -ret; + errcode = -ret; goto errout; } } @@ -461,7 +461,7 @@ int psock_socket(int domain, int type, int protocol, FAR struct socket *psock) { /* Failed to reserve a connection structure */ - err = -ret; + errcode = -ret; goto errout; } } @@ -476,7 +476,7 @@ int psock_socket(int domain, int type, int protocol, FAR struct socket *psock) { /* Failed to reserve a connection structure */ - err = -ret; + errcode = -ret; goto errout; } } @@ -490,7 +490,7 @@ int psock_socket(int domain, int type, int protocol, FAR struct socket *psock) return OK; errout: - set_errno(err); + set_errno(errcode); return ERROR; } diff --git a/net/tcp/Kconfig b/net/tcp/Kconfig index fccfba8feabd4a158c9a5fdc06937fb96e5782fc..59fa04d018bd8245aca9268b199f3e0aba932cf9 100644 --- a/net/tcp/Kconfig +++ b/net/tcp/Kconfig @@ -107,7 +107,7 @@ config NET_TCP_NWRBCHAINS config NET_TCP_WRBUFFER_DEBUG bool "Force write buffer debug" default n - depends on DEBUG + depends on DEBUG_FEATURES select IOB_DEBUG ---help--- This option will force debug output from TCP write buffer logic, diff --git a/net/tcp/Make.defs b/net/tcp/Make.defs index 9581c626abf8596488dd91c35e654fca0e97f766..520e601f4c197b31c1c9510f63faf5113a708fcc 100644 --- a/net/tcp/Make.defs +++ b/net/tcp/Make.defs @@ -63,7 +63,7 @@ NET_CSRCS += tcp_callback.c tcp_backlog.c tcp_ipselect.c ifeq ($(CONFIG_NET_TCP_WRITE_BUFFERS),y) NET_CSRCS += tcp_wrbuffer.c -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) NET_CSRCS += tcp_wrbuffer_dump.c endif endif diff --git a/net/tcp/tcp.h b/net/tcp/tcp.h index 0b3bd37ce5720537d7b6b26e1ff58350be37b01c..c53475d75a46e3103c701baf718d3e05c19d0e65 100644 --- a/net/tcp/tcp.h +++ b/net/tcp/tcp.h @@ -115,7 +115,7 @@ # define WRB_TRIM(wrb,n) \ do { (wrb)->wb_iob = iob_trimhead((wrb)->wb_iob,(n)); } while (0) -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES # define WRB_DUMP(msg,wrb,len,offset) \ tcp_wrbuffer_dump(msg,wrb,len,offset) #else @@ -206,6 +206,8 @@ struct tcp_conn_s * it can only be updated at TCP_ESTABLISHED state */ uint32_t sent; /* The number of bytes sent (ACKed and un-ACKed) */ uint32_t isn; /* Initial sequence number */ + uint32_t sndseq_max; /* The sequence number of next not-retransmitted + * segment (next greater sndseq) */ #endif #ifdef CONFIG_NET_TCPBACKLOG @@ -665,7 +667,7 @@ void tcp_poll(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn); * Parameters: * dev - The device driver structure to use in the send operation * conn - The TCP "connection" to poll for TX data - * hsed - The polling interval in halves of a second + * hsec - The polling interval in halves of a second * * Return: * None @@ -1251,7 +1253,7 @@ int tcp_wrbuffer_test(void); ****************************************************************************/ #ifdef CONFIG_NET_TCP_WRITE_BUFFERS -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES void tcp_wrbuffer_dump(FAR const char *msg, FAR struct tcp_wrbuffer_s *wrb, unsigned int len, unsigned int offset); #else diff --git a/net/tcp/tcp_accept.c b/net/tcp/tcp_accept.c index a37db211db4887857750d5322e1e280d46d8ed5a..d2b7d426ed774ac0ba09751307e4cd82a75fe127 100644 --- a/net/tcp/tcp_accept.c +++ b/net/tcp/tcp_accept.c @@ -246,12 +246,12 @@ int psock_tcp_accept(FAR struct socket *psock, FAR struct sockaddr *addr, { /* Yes... get the address of the connected client */ - nvdbg("Pending conn=%p\n", state.acpt_newconn); + ninfo("Pending conn=%p\n", state.acpt_newconn); accept_tcpsender(psock, state.acpt_newconn, addr, addrlen); } - /* In general, this uIP-based implementation will not support non-blocking - * socket operations... except in a few cases: Here for TCP accept with + /* In general, this implementation will not support non-blocking socket + * operations... except in a few cases: Here for TCP accept with * backlog enabled. If this socket is configured as non-blocking then * return EAGAIN if there is no pending connection in the backlog. */ diff --git a/net/tcp/tcp_appsend.c b/net/tcp/tcp_appsend.c index a56da75714f086c500b0a8423259c64bb7817a4f..e638bf18b764acfafbf6712ca51b543039cea371 100644 --- a/net/tcp/tcp_appsend.c +++ b/net/tcp/tcp_appsend.c @@ -87,8 +87,8 @@ void tcp_appsend(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, /* Handle the result based on the application response */ - nllvdbg("result: %04x d_sndlen: %d conn->unacked: %d\n", - result, dev->d_sndlen, conn->unacked); + ninfo("result: %04x d_sndlen: %d conn->unacked: %d\n", + result, dev->d_sndlen, conn->unacked); /* Get the IP header length associated with the IP domain configured for * this TCP connection. @@ -124,7 +124,7 @@ void tcp_appsend(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, dev->d_sndlen = 0; conn->tcpstateflags = TCP_CLOSED; - nllvdbg("TCP state: NETDEV_DOWN\n"); + ninfo("TCP state: NETDEV_DOWN\n"); } /* Check for connection aborted */ @@ -133,7 +133,7 @@ void tcp_appsend(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, { dev->d_sndlen = 0; conn->tcpstateflags = TCP_CLOSED; - nllvdbg("TCP state: TCP_CLOSED\n"); + ninfo("TCP state: TCP_CLOSED\n"); tcp_send(dev, conn, TCP_RST | TCP_ACK, hdrlen); } @@ -145,7 +145,7 @@ void tcp_appsend(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, conn->tcpstateflags = TCP_FIN_WAIT_1; conn->unacked = 1; conn->nrtx = 0; - nllvdbg("TCP state: TCP_FIN_WAIT_1\n"); + ninfo("TCP state: TCP_FIN_WAIT_1\n"); dev->d_sndlen = 0; tcp_send(dev, conn, TCP_FIN | TCP_ACK, hdrlen); @@ -210,8 +210,8 @@ void tcp_rexmit(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, { uint8_t hdrlen; - nllvdbg("result: %04x d_sndlen: %d conn->unacked: %d\n", - result, dev->d_sndlen, conn->unacked); + ninfo("result: %04x d_sndlen: %d conn->unacked: %d\n", + result, dev->d_sndlen, conn->unacked); /* Get the IP header length associated with the IP domain configured for * this TCP connection. diff --git a/net/tcp/tcp_backlog.c b/net/tcp/tcp_backlog.c index f4bba6cbebc61c35c873979d83c98f0ef60e8cd2..6d7122fd3d0e2981571298d0dce64d1cf3919fa4 100644 --- a/net/tcp/tcp_backlog.c +++ b/net/tcp/tcp_backlog.c @@ -77,9 +77,9 @@ int tcp_backlogcreate(FAR struct tcp_conn_s *conn, int nblg) int offset; int i; - nllvdbg("conn=%p nblg=%d\n", conn, nblg); + ninfo("conn=%p nblg=%d\n", conn, nblg); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!conn) { return -EINVAL; @@ -109,7 +109,7 @@ int tcp_backlogcreate(FAR struct tcp_conn_s *conn, int nblg) bls = (FAR struct tcp_backlog_s *)kmm_zalloc(size); if (!bls) { - nlldbg("Failed to allocate backlog\n"); + nerr("ERROR: Failed to allocate backlog\n"); return -ENOMEM; } @@ -161,9 +161,9 @@ int tcp_backlogdestroy(FAR struct tcp_conn_s *conn) FAR struct tcp_blcontainer_s *blc; FAR struct tcp_conn_s *blconn; - nllvdbg("conn=%p\n", conn); + ninfo("conn=%p\n", conn); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!conn) { return -EINVAL; @@ -222,9 +222,9 @@ int tcp_backlogadd(FAR struct tcp_conn_s *conn, FAR struct tcp_conn_s *blconn) FAR struct tcp_blcontainer_s *blc; int ret = -EINVAL; - nllvdbg("conn=%p blconn=%p\n", conn, blconn); + ninfo("conn=%p blconn=%p\n", conn, blconn); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!conn) { return -EINVAL; @@ -239,7 +239,7 @@ int tcp_backlogadd(FAR struct tcp_conn_s *conn, FAR struct tcp_conn_s *blconn) blc = (FAR struct tcp_blcontainer_s *)sq_remfirst(&bls->bl_free); if (!blc) { - nlldbg("Failed to allocate container\n"); + nerr("ERROR: Failed to allocate container\n"); ret = -ENOMEM; } else @@ -294,7 +294,7 @@ FAR struct tcp_conn_s *tcp_backlogremove(FAR struct tcp_conn_s *conn) FAR struct tcp_blcontainer_s *blc; FAR struct tcp_conn_s *blconn = NULL; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!conn) { return NULL; @@ -321,7 +321,7 @@ FAR struct tcp_conn_s *tcp_backlogremove(FAR struct tcp_conn_s *conn) } } - nllvdbg("conn=%p, returning %p\n", conn, blconn); + ninfo("conn=%p, returning %p\n", conn, blconn); return blconn; } @@ -345,9 +345,9 @@ int tcp_backlogdelete(FAR struct tcp_conn_s *conn, FAR struct tcp_blcontainer_s *blc; FAR struct tcp_blcontainer_s *prev; - nllvdbg("conn=%p blconn=%p\n", conn, blconn); + ninfo("conn=%p blconn=%p\n", conn, blconn); -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!conn) { return -EINVAL; @@ -390,7 +390,7 @@ int tcp_backlogdelete(FAR struct tcp_conn_s *conn, } } - nlldbg("Failed to find pending connection\n"); + nerr("ERROR: Failed to find pending connection\n"); return -EINVAL; } diff --git a/net/tcp/tcp_callback.c b/net/tcp/tcp_callback.c index 73c6175fee508243b380c861821500f859cef196..2ed5476d4f27a5c6b3f376ad5357a048423adfd0 100644 --- a/net/tcp/tcp_callback.c +++ b/net/tcp/tcp_callback.c @@ -95,7 +95,7 @@ tcp_data_event(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t recvlen; #endif - nllvdbg("No listener on connection\n"); + ninfo("No listener on connection\n"); #ifdef CONFIG_NET_TCP_READAHEAD /* Save as the packet data as in the read-ahead buffer. NOTE that @@ -110,7 +110,7 @@ tcp_data_event(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, * read-ahead buffers to retain the data -- drop the packet. */ - nllvdbg("Dropped %d bytes\n", dev->d_len); + ninfo("Dropped %d bytes\n", dev->d_len); #ifdef CONFIG_NET_STATISTICS g_netstats.tcp.syndrop++; @@ -147,12 +147,12 @@ uint16_t tcp_callback(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t flags) { /* Preserve the TCP_ACKDATA, TCP_CLOSE, and TCP_ABORT in the response. - * These is needed by uIP to handle responses and buffer state. The + * These is needed by the network to handle responses and buffer state. The * TCP_NEWDATA indication will trigger the ACK response, but must be * explicitly set in the callback. */ - nllvdbg("flags: %04x\n", flags); + ninfo("flags: %04x\n", flags); /* Perform the data callback. When a data callback is executed from 'list', * the input flags are normally returned, however, the implementation @@ -245,7 +245,7 @@ uint16_t tcp_datahandler(FAR struct tcp_conn_s *conn, FAR uint8_t *buffer, iob = iob_tryalloc(true); if (iob == NULL) { - nlldbg("ERROR: Failed to create new I/O buffer chain\n"); + nerr("ERROR: Failed to create new I/O buffer chain\n"); return 0; } @@ -258,7 +258,7 @@ uint16_t tcp_datahandler(FAR struct tcp_conn_s *conn, FAR uint8_t *buffer, * not free any I/O buffers. */ - nlldbg("ERROR: Failed to add data to the I/O buffer chain: %d\n", ret); + nerr("ERROR: Failed to add data to the I/O buffer chain: %d\n", ret); (void)iob_free_chain(iob); return 0; } @@ -270,12 +270,12 @@ uint16_t tcp_datahandler(FAR struct tcp_conn_s *conn, FAR uint8_t *buffer, ret = iob_tryadd_queue(iob, &conn->readahead); if (ret < 0) { - nlldbg("ERROR: Failed to queue the I/O buffer chain: %d\n", ret); + nerr("ERROR: Failed to queue the I/O buffer chain: %d\n", ret); (void)iob_free_chain(iob); return 0; } - nllvdbg("Buffered %d bytes\n", buflen); + ninfo("Buffered %d bytes\n", buflen); return buflen; } #endif /* CONFIG_NET_TCP_READAHEAD */ diff --git a/net/tcp/tcp_conn.c b/net/tcp/tcp_conn.c index 6cc9950fc0675384c062c55d669dd44c44760045..ac861c24d4e2d9b44fc45a1390aeae6547ce637a 100644 --- a/net/tcp/tcp_conn.c +++ b/net/tcp/tcp_conn.c @@ -73,7 +73,7 @@ * Private Data ****************************************************************************/ -/* The array containing all uIP TCP connections. */ +/* The array containing all TCP connections. */ static struct tcp_conn_s g_tcp_connections[CONFIG_NET_TCP_CONNS]; @@ -532,7 +532,7 @@ static inline int tcp_ipv4_bind(FAR struct tcp_conn_s *conn, if (port < 0) { - ndbg("tcp_selectport failed: %d\n", port); + nerr("ERROR: tcp_selectport failed: %d\n", port); return port; } @@ -552,7 +552,7 @@ static inline int tcp_ipv4_bind(FAR struct tcp_conn_s *conn, { /* If no device is found, then the address is not reachable */ - ndbg("tcp_local_ipv4_device failed: %d\n", ret); + nerr("ERROR: tcp_local_ipv4_device failed: %d\n", ret); /* Back out the local address setting */ @@ -613,7 +613,7 @@ static inline int tcp_ipv6_bind(FAR struct tcp_conn_s *conn, if (port < 0) { - ndbg("tcp_selectport failed: %d\n", port); + nerr("ERROR: tcp_selectport failed: %d\n", port); return port; } @@ -633,7 +633,7 @@ static inline int tcp_ipv6_bind(FAR struct tcp_conn_s *conn, { /* If no device is found, then the address is not reachable */ - ndbg("tcp_local_ipv6_device failed: %d\n", ret); + nerr("ERROR: tcp_local_ipv6_device failed: %d\n", ret); /* Back out the local address setting */ @@ -727,7 +727,7 @@ FAR struct tcp_conn_s *tcp_alloc(uint8_t domain) while (tmp) { - nllvdbg("conn: %p state: %02x\n", tmp, tmp->tcpstateflags); + ninfo("conn: %p state: %02x\n", tmp, tmp->tcpstateflags); /* Is this connection in a state we can sacrifice. */ @@ -760,7 +760,7 @@ FAR struct tcp_conn_s *tcp_alloc(uint8_t domain) if (conn != NULL) { - nlldbg("Closing unestablished connection: %p\n", conn); + nwarn("WARNING: Closing unestablished connection: %p\n", conn); /* Yes... free it. This will remove the connection from the list * of active connections and release all resources held by the @@ -1066,7 +1066,7 @@ FAR struct tcp_conn_s *tcp_alloc_accept(FAR struct net_driver_s *dev, * probably really just assert here. */ - ndbg("Failed to find network device: %d\n", ret); + nerr("ERROR: Failed to find network device: %d\n", ret); tcp_free(conn); return NULL; } @@ -1083,11 +1083,12 @@ FAR struct tcp_conn_s *tcp_alloc_accept(FAR struct net_driver_s *dev, conn->tcpstateflags = TCP_SYN_RCVD; tcp_initsequence(conn->sndseq); - conn->unacked = 1; + conn->unacked = 1; #ifdef CONFIG_NET_TCP_WRITE_BUFFERS - conn->expired = 0; - conn->isn = 0; - conn->sent = 0; + conn->expired = 0; + conn->isn = 0; + conn->sent = 0; + conn->sndseq_max = 0; #endif /* rcvseq should be the seqno from the incoming packet + 1. */ @@ -1320,7 +1321,7 @@ int tcp_connect(FAR struct tcp_conn_s *conn, FAR const struct sockaddr *addr) * just assert here. */ - ndbg("Failed to find network device: %d\n", ret); + nerr("ERROR: Failed to find network device: %d\n", ret); goto errout_with_lock; } @@ -1344,6 +1345,7 @@ int tcp_connect(FAR struct tcp_conn_s *conn, FAR const struct sockaddr *addr) conn->expired = 0; conn->isn = 0; conn->sent = 0; + conn->sndseq_max = 0; #endif #ifdef CONFIG_NET_TCP_READAHEAD diff --git a/net/tcp/tcp_input.c b/net/tcp/tcp_input.c index 97bcb402fd7bafd7dee338dbcfd2137452020cb6..184dfebb01c6b4a25e7015563bee9bf8c52b0759 100644 --- a/net/tcp/tcp_input.c +++ b/net/tcp/tcp_input.c @@ -71,9 +71,9 @@ * Handle incoming TCP input * * Parameters: - * dev - The device driver structure containing the received TCP packet. - * tcp - A pointer to the TCP header in the packet - * tcpiplen - Combined length of the IP and TCP headers + * dev - The device driver structure containing the received TCP packet. + * tcp - A pointer to the TCP header in the packet + * iplen - Combined length of the IP and TCP headers * * Return: * None @@ -126,7 +126,7 @@ static void tcp_input(FAR struct net_driver_s *dev, unsigned int iplen) g_netstats.tcp.drop++; g_netstats.tcp.chkerr++; #endif - nlldbg("Bad TCP checksum\n"); + nwarn("WARNING: Bad TCP checksum\n"); goto drop; } @@ -206,7 +206,7 @@ static void tcp_input(FAR struct net_driver_s *dev, unsigned int iplen) #ifdef CONFIG_NET_STATISTICS g_netstats.tcp.syndrop++; #endif - nlldbg("No free TCP connections\n"); + nerr("ERROR: No free TCP connections\n"); goto drop; } @@ -308,7 +308,7 @@ found: if ((tcp->flags & TCP_RST) != 0) { conn->tcpstateflags = TCP_CLOSED; - nlldbg("RESET - TCP state: TCP_CLOSED\n"); + nwarn("WARNING: RESET - TCP state: TCP_CLOSED\n"); (void)tcp_callback(dev, conn, TCP_ABORT); goto drop; @@ -364,7 +364,7 @@ found: */ #ifdef CONFIG_NET_TCP_WRITE_BUFFERS - unackseq = conn->isn + conn->sent; + unackseq = conn->sndseq_max; #else unackseq = tcp_addsequence(conn->sndseq, conn->unacked); #endif @@ -376,7 +376,7 @@ found: ackseq = tcp_getsequence(tcp->ackno); /* Check how many of the outstanding bytes have been acknowledged. For - * a most uIP send operation, this should always be true. However, + * most send operations, this should always be true. However, * the send() API sends data ahead when it can without waiting for * the ACK. In this case, the 'ackseq' could be less than then the * new sequence number. @@ -398,8 +398,8 @@ found: if ((conn->tcpstateflags & TCP_STATE_MASK) == TCP_ESTABLISHED) { - nlldbg("ERROR: conn->sndseq %d, conn->unacked %d\n", - tcp_getsequence(conn->sndseq), conn->unacked); + nwarn("WARNING: conn->sndseq %d, conn->unacked %d\n", + tcp_getsequence(conn->sndseq), conn->unacked); goto reset; } } @@ -409,8 +409,8 @@ found: * be beyond ackseq. */ - nllvdbg("sndseq: %08x->%08x unackseq: %08x new unacked: %d\n", - conn->sndseq, ackseq, unackseq, conn->unacked); + ninfo("sndseq: %08x->%08x unackseq: %08x new unacked: %d\n", + conn->sndseq, ackseq, unackseq, conn->unacked); tcp_setsequence(conn->sndseq, ackseq); /* Do RTT estimation, unless we have done retransmissions. */ @@ -468,10 +468,11 @@ found: conn->isn = tcp_getsequence(tcp->ackno); tcp_setsequence(conn->sndseq, conn->isn); conn->sent = 0; + conn->sndseq_max = 0; #endif conn->unacked = 0; flags = TCP_CONNECTED; - nllvdbg("TCP state: TCP_ESTABLISHED\n"); + ninfo("TCP state: TCP_ESTABLISHED\n"); if (dev->d_len > 0) { @@ -571,7 +572,7 @@ found: dev->d_len = 0; dev->d_sndlen = 0; - nllvdbg("TCP state: TCP_ESTABLISHED\n"); + ninfo("TCP state: TCP_ESTABLISHED\n"); result = tcp_callback(dev, conn, TCP_CONNECTED | TCP_NEWDATA); tcp_appsend(dev, conn, result); return; @@ -584,7 +585,7 @@ found: /* The connection is closed after we send the RST */ conn->tcpstateflags = TCP_CLOSED; - nllvdbg("Connection failed - TCP state: TCP_CLOSED\n"); + ninfo("Connection failed - TCP state: TCP_CLOSED\n"); /* We do not send resets in response to resets. */ @@ -640,7 +641,7 @@ found: conn->tcpstateflags = TCP_LAST_ACK; conn->unacked = 1; conn->nrtx = 0; - nllvdbg("TCP state: TCP_LAST_ACK\n"); + ninfo("TCP state: TCP_LAST_ACK\n"); tcp_send(dev, conn, TCP_FIN | TCP_ACK, tcpiplen); return; @@ -748,7 +749,7 @@ found: if ((flags & TCP_ACKDATA) != 0) { conn->tcpstateflags = TCP_CLOSED; - nllvdbg("TCP_LAST_ACK TCP state: TCP_CLOSED\n"); + ninfo("TCP_LAST_ACK TCP state: TCP_CLOSED\n"); (void)tcp_callback(dev, conn, TCP_CLOSE); } @@ -772,12 +773,12 @@ found: conn->tcpstateflags = TCP_TIME_WAIT; conn->timer = 0; conn->unacked = 0; - nllvdbg("TCP state: TCP_TIME_WAIT\n"); + ninfo("TCP state: TCP_TIME_WAIT\n"); } else { conn->tcpstateflags = TCP_CLOSING; - nllvdbg("TCP state: TCP_CLOSING\n"); + ninfo("TCP state: TCP_CLOSING\n"); } net_incr32(conn->rcvseq, 1); @@ -789,7 +790,7 @@ found: { conn->tcpstateflags = TCP_FIN_WAIT_2; conn->unacked = 0; - nllvdbg("TCP state: TCP_FIN_WAIT_2\n"); + ninfo("TCP state: TCP_FIN_WAIT_2\n"); goto drop; } @@ -811,7 +812,7 @@ found: { conn->tcpstateflags = TCP_TIME_WAIT; conn->timer = 0; - nllvdbg("TCP state: TCP_TIME_WAIT\n"); + ninfo("TCP state: TCP_TIME_WAIT\n"); net_incr32(conn->rcvseq, 1); (void)tcp_callback(dev, conn, TCP_CLOSE); @@ -836,7 +837,7 @@ found: { conn->tcpstateflags = TCP_TIME_WAIT; conn->timer = 0; - nllvdbg("TCP state: TCP_TIME_WAIT\n"); + ninfo("TCP state: TCP_TIME_WAIT\n"); } default: diff --git a/net/tcp/tcp_netpoll.c b/net/tcp/tcp_netpoll.c index 522c00986b82e2e0072a005e91f019a733a0a350..41382144c2f5ac45e453e2da8581cb40a841de67 100644 --- a/net/tcp/tcp_netpoll.c +++ b/net/tcp/tcp_netpoll.c @@ -93,7 +93,7 @@ static uint16_t tcp_poll_interrupt(FAR struct net_driver_s *dev, FAR void *conn, { FAR struct tcp_poll_s *info = (FAR struct tcp_poll_s *)pvpriv; - nllvdbg("flags: %04x\n", flags); + ninfo("flags: %04x\n", flags); DEBUGASSERT(!info || (info->psock && info->fds)); @@ -169,7 +169,7 @@ int tcp_pollsetup(FAR struct socket *psock, FAR struct pollfd *fds) /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!conn || !fds) { return -EINVAL; @@ -329,7 +329,7 @@ int tcp_pollteardown(FAR struct socket *psock, FAR struct pollfd *fds) /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!conn || !fds->priv) { return -EINVAL; diff --git a/net/tcp/tcp_send.c b/net/tcp/tcp_send.c index 14affd53de92a05bd9d1347bd146d1756e7fe49d..edce06a196f30f4b9c2860863a03aa69f03e86be 100644 --- a/net/tcp/tcp_send.c +++ b/net/tcp/tcp_send.c @@ -167,7 +167,7 @@ static inline void tcp_ipv4_sendcomplete(FAR struct net_driver_s *dev, ipv4->ipchksum = 0; ipv4->ipchksum = ~ipv4_chksum(dev); - nllvdbg("IPv4 length: %d\n", ((int)ipv4->len[0] << 8) + ipv4->len[1]); + ninfo("IPv4 length: %d\n", ((int)ipv4->len[0] << 8) + ipv4->len[1]); #ifdef CONFIG_NET_STATISTICS g_netstats.ipv4.sent++; @@ -230,7 +230,7 @@ static inline void tcp_ipv6_sendcomplete(FAR struct net_driver_s *dev, ipv6->tcf = 0x00; ipv6->flow = 0x00; - nllvdbg("IPv6 length: %d\n", ((int)ipv6->len[0] << 8) + ipv6->len[1]); + ninfo("IPv6 length: %d\n", ((int)ipv6->len[0] << 8) + ipv6->len[1]); #ifdef CONFIG_NET_STATISTICS g_netstats.ipv6.sent++; @@ -277,7 +277,7 @@ static void tcp_sendcomplete(FAR struct net_driver_s *dev, } #endif /* CONFIG_NET_IPv4 */ - nllvdbg("Outgoing TCP packet length: %d bytes\n", dev->d_len); + ninfo("Outgoing TCP packet length: %d bytes\n", dev->d_len); #ifdef CONFIG_NET_STATISTICS g_netstats.tcp.sent++; diff --git a/net/tcp/tcp_send_buffered.c b/net/tcp/tcp_send_buffered.c index af4766c30981d683fdbc5589d556461b2c6c2bef..468f90b9dac3e68bd3f931627ed7e571b25b1ebb 100644 --- a/net/tcp/tcp_send_buffered.c +++ b/net/tcp/tcp_send_buffered.c @@ -43,7 +43,7 @@ #if defined(CONFIG_NET) && defined(CONFIG_NET_TCP) && \ defined(CONFIG_NET_TCP_WRITE_BUFFERS) -#if defined(CONFIG_DEBUG) && defined(CONFIG_NET_TCP_WRBUFFER_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_NET_TCP_WRBUFFER_DEBUG) /* Force debug output (from this file only) */ # undef CONFIG_DEBUG_NET @@ -201,7 +201,8 @@ static inline void psock_lost_connection(FAR struct socket *psock, sq_init(&conn->unacked_q); sq_init(&conn->write_q); - conn->sent = 0; + conn->sent = 0; + conn->sndseq_max = 0; } /**************************************************************************** @@ -349,7 +350,7 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, } #endif - nllvdbg("flags: %04x\n", flags); + ninfo("flags: %04x\n", flags); /* If this packet contains an acknowledgement, then update the count of * acknowledged bytes. @@ -388,7 +389,7 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, /* Get the ACK number from the TCP header */ ackno = tcp_getsequence(tcp->ackno); - nllvdbg("ACK: ackno=%u flags=%04x\n", ackno, flags); + ninfo("ACK: ackno=%u flags=%04x\n", ackno, flags); /* Look at every write buffer in the unacked_q. The unacked_q * holds write buffers that have been entirely sent, but which @@ -414,14 +415,14 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, /* Get the sequence number at the end of the data */ lastseq = WRB_SEQNO(wrb) + WRB_PKTLEN(wrb); - nllvdbg("ACK: wrb=%p seqno=%u lastseq=%u pktlen=%u ackno=%u\n", - wrb, WRB_SEQNO(wrb), lastseq, WRB_PKTLEN(wrb), ackno); + ninfo("ACK: wrb=%p seqno=%u lastseq=%u pktlen=%u ackno=%u\n", + wrb, WRB_SEQNO(wrb), lastseq, WRB_PKTLEN(wrb), ackno); /* Has the entire buffer been ACKed? */ if (ackno >= lastseq) { - nllvdbg("ACK: wrb=%p Freeing write buffer\n", wrb); + ninfo("ACK: wrb=%p Freeing write buffer\n", wrb); /* Yes... Remove the write buffer from ACK waiting queue */ @@ -449,7 +450,7 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, trimlen = WRB_SENT(wrb); } - nllvdbg("ACK: wrb=%p trim %u bytes\n", wrb, trimlen); + ninfo("ACK: wrb=%p trim %u bytes\n", wrb, trimlen); WRB_TRIM(wrb, trimlen); WRB_SEQNO(wrb) = ackno; @@ -457,7 +458,7 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, /* Set the new sequence number for what remains */ - nllvdbg("ACK: wrb=%p seqno=%u pktlen=%u\n", + ninfo("ACK: wrb=%p seqno=%u pktlen=%u\n", wrb, WRB_SEQNO(wrb), WRB_PKTLEN(wrb)); } } @@ -483,8 +484,8 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, nacked = WRB_SENT(wrb); } - nllvdbg("ACK: wrb=%p seqno=%u nacked=%u sent=%u ackno=%u\n", - wrb, WRB_SEQNO(wrb), nacked, WRB_SENT(wrb), ackno); + ninfo("ACK: wrb=%p seqno=%u nacked=%u sent=%u ackno=%u\n", + wrb, WRB_SEQNO(wrb), nacked, WRB_SENT(wrb), ackno); /* Trim the ACKed bytes from the beginning of the write buffer. */ @@ -492,8 +493,8 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, WRB_SEQNO(wrb) = ackno; WRB_SENT(wrb) -= nacked; - nllvdbg("ACK: wrb=%p seqno=%u pktlen=%u sent=%u\n", - wrb, WRB_SEQNO(wrb), WRB_PKTLEN(wrb), WRB_SENT(wrb)); + ninfo("ACK: wrb=%p seqno=%u pktlen=%u sent=%u\n", + wrb, WRB_SEQNO(wrb), WRB_PKTLEN(wrb), WRB_SENT(wrb)); } } @@ -501,7 +502,7 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, else if ((flags & TCP_DISCONN_EVENTS) != 0) { - nllvdbg("Lost connection: %04x\n", flags); + ninfo("Lost connection: %04x\n", flags); if (psock->s_conn != NULL) { @@ -523,14 +524,14 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, FAR struct tcp_wrbuffer_s *wrb; FAR sq_entry_t *entry; - nllvdbg("REXMIT: %04x\n", flags); + ninfo("REXMIT: %04x\n", flags); /* If there is a partially sent write buffer at the head of the * write_q? Has anything been sent from that write buffer? */ wrb = (FAR struct tcp_wrbuffer_s *)sq_peek(&conn->write_q); - nllvdbg("REXMIT: wrb=%p sent=%u\n", wrb, wrb ? WRB_SENT(wrb) : 0); + ninfo("REXMIT: wrb=%p sent=%u\n", wrb, wrb ? WRB_SENT(wrb) : 0); if (wrb != NULL && WRB_SENT(wrb) > 0) { @@ -559,14 +560,15 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, } WRB_SENT(wrb) = 0; - nllvdbg("REXMIT: wrb=%p sent=%u, conn unacked=%d sent=%d\n", - wrb, WRB_SENT(wrb), conn->unacked, conn->sent); + ninfo("REXMIT: wrb=%p sent=%u, conn unacked=%d sent=%d\n", + wrb, WRB_SENT(wrb), conn->unacked, conn->sent); /* Increment the retransmit count on this write buffer. */ if (++WRB_NRTX(wrb) >= TCP_MAXRTX) { - nlldbg("Expiring wrb=%p nrtx=%u\n", wrb, WRB_NRTX(wrb)); + nwarn("WARNING: Expiring wrb=%p nrtx=%u\n", + wrb, WRB_NRTX(wrb)); /* The maximum retry count as been exhausted. Remove the write * buffer at the head of the queue. @@ -624,14 +626,15 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, } WRB_SENT(wrb) = 0; - nllvdbg("REXMIT: wrb=%p sent=%u, conn unacked=%d sent=%d\n", - wrb, WRB_SENT(wrb), conn->unacked, conn->sent); + ninfo("REXMIT: wrb=%p sent=%u, conn unacked=%d sent=%d\n", + wrb, WRB_SENT(wrb), conn->unacked, conn->sent); /* Free any write buffers that have exceed the retry count */ if (++WRB_NRTX(wrb) >= TCP_MAXRTX) { - nlldbg("Expiring wrb=%p nrtx=%u\n", wrb, WRB_NRTX(wrb)); + nwarn("WARNING: Expiring wrb=%p nrtx=%u\n", + wrb, WRB_NRTX(wrb)); /* Return the write buffer to the free list */ @@ -652,11 +655,11 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, { /* Insert the write buffer into the write_q (in sequence * number order). The retransmission will occur below - * when the write buffer with the lowest sequenc number + * when the write buffer with the lowest sequence number * is pulled from the write_q again. */ - nllvdbg("REXMIT: Moving wrb=%p nrtx=%u\n", wrb, WRB_NRTX(wrb)); + ninfo("REXMIT: Moving wrb=%p nrtx=%u\n", wrb, WRB_NRTX(wrb)); psock_insert_segment(wrb, &conn->write_q); } @@ -694,6 +697,7 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, if (psock_send_addrchck(conn)) { FAR struct tcp_wrbuffer_s *wrb; + uint32_t predicted_seqno; size_t sndlen; /* Peek at the head of the write queue (but don't remove anything @@ -721,8 +725,8 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, sndlen = conn->winsize; } - nllvdbg("SEND: wrb=%p pktlen=%u sent=%u sndlen=%u\n", - wrb, WRB_PKTLEN(wrb), WRB_SENT(wrb), sndlen); + ninfo("SEND: wrb=%p pktlen=%u sent=%u sndlen=%u\n", + wrb, WRB_PKTLEN(wrb), WRB_SENT(wrb), sndlen); /* Set the sequence number for this segment. If we are * retransmitting, then the sequence number will already @@ -768,15 +772,25 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, conn->unacked += sndlen; conn->sent += sndlen; - nllvdbg("SEND: wrb=%p nrtx=%u unacked=%u sent=%u\n", - wrb, WRB_NRTX(wrb), conn->unacked, conn->sent); + /* Below prediction will become true, unless retransmission occurrence */ + + predicted_seqno = tcp_getsequence(conn->sndseq) + sndlen; + + if ((predicted_seqno > conn->sndseq_max) || + (tcp_getsequence(conn->sndseq) > predicted_seqno)) /* overflow */ + { + conn->sndseq_max = predicted_seqno; + } + + ninfo("SEND: wrb=%p nrtx=%u unacked=%u sent=%u\n", + wrb, WRB_NRTX(wrb), conn->unacked, conn->sent); /* Increment the count of bytes sent from this write buffer */ WRB_SENT(wrb) += sndlen; - nllvdbg("SEND: wrb=%p sent=%u pktlen=%u\n", - wrb, WRB_SENT(wrb), WRB_PKTLEN(wrb)); + ninfo("SEND: wrb=%p sent=%u pktlen=%u\n", + wrb, WRB_SENT(wrb), WRB_PKTLEN(wrb)); /* Remove the write buffer from the write queue if the * last of the data has been sent from the buffer. @@ -787,7 +801,7 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, { FAR struct tcp_wrbuffer_s *tmp; - nllvdbg("SEND: wrb=%p Move to unacked_q\n", wrb); + ninfo("SEND: wrb=%p Move to unacked_q\n", wrb); tmp = (FAR struct tcp_wrbuffer_s *)sq_remfirst(&conn->write_q); DEBUGASSERT(tmp == wrb); @@ -936,20 +950,20 @@ ssize_t psock_tcp_send(FAR struct socket *psock, FAR const void *buf, FAR struct tcp_wrbuffer_s *wrb; net_lock_t save; ssize_t result = 0; - int err; + int errcode; int ret = OK; if (!psock || psock->s_crefs <= 0) { - ndbg("ERROR: Invalid socket\n"); - err = EBADF; + nerr("ERROR: Invalid socket\n"); + errcode = EBADF; goto errout; } if (psock->s_type != SOCK_STREAM || !_SS_ISCONNECTED(psock->s_flags)) { - ndbg("ERROR: Not connected\n"); - err = ENOTCONN; + nerr("ERROR: Not connected\n"); + errcode = ENOTCONN; goto errout; } @@ -985,8 +999,8 @@ ssize_t psock_tcp_send(FAR struct socket *psock, FAR const void *buf, if (ret < 0) { - ndbg("ERROR: Not reachable\n"); - err = ENETUNREACH; + nerr("ERROR: Not reachable\n"); + errcode = ENETUNREACH; goto errout; } #endif /* CONFIG_NET_ARP_SEND || CONFIG_NET_ICMPv6_NEIGHBOR */ @@ -1011,8 +1025,8 @@ ssize_t psock_tcp_send(FAR struct socket *psock, FAR const void *buf, { /* A buffer allocation error occurred */ - ndbg("ERROR: Failed to allocate write buffer\n"); - err = ENOMEM; + nerr("ERROR: Failed to allocate write buffer\n"); + errcode = ENOMEM; goto errout_with_lock; } @@ -1029,8 +1043,8 @@ ssize_t psock_tcp_send(FAR struct socket *psock, FAR const void *buf, { /* A buffer allocation error occurred */ - ndbg("ERROR: Failed to allocate callback\n"); - err = ENOMEM; + nerr("ERROR: Failed to allocate callback\n"); + errcode = ENOMEM; goto errout_with_wrb; } @@ -1056,9 +1070,9 @@ ssize_t psock_tcp_send(FAR struct socket *psock, FAR const void *buf, */ sq_addlast(&wrb->wb_node, &conn->write_q); - nllvdbg("Queued WRB=%p pktlen=%u write_q(%p,%p)\n", - wrb, WRB_PKTLEN(wrb), - conn->write_q.head, conn->write_q.tail); + ninfo("Queued WRB=%p pktlen=%u write_q(%p,%p)\n", + wrb, WRB_PKTLEN(wrb), + conn->write_q.head, conn->write_q.tail); /* Notify the device driver of the availability of TX data */ @@ -1076,7 +1090,7 @@ ssize_t psock_tcp_send(FAR struct socket *psock, FAR const void *buf, if (result < 0) { - err = result; + errcode = result; goto errout; } @@ -1086,7 +1100,7 @@ ssize_t psock_tcp_send(FAR struct socket *psock, FAR const void *buf, if (ret < 0) { - err = -ret; + errcode = -ret; goto errout; } @@ -1101,7 +1115,7 @@ errout_with_lock: net_unlock(save); errout: - set_errno(err); + set_errno(errcode); return ERROR; } @@ -1136,13 +1150,13 @@ int psock_tcp_cansend(FAR struct socket *psock) { if (!psock || psock->s_crefs <= 0) { - ndbg("ERROR: Invalid socket\n"); + nerr("ERROR: Invalid socket\n"); return -EBADF; } if (psock->s_type != SOCK_STREAM || !_SS_ISCONNECTED(psock->s_flags)) { - ndbg("ERROR: Not connected\n"); + nerr("ERROR: Not connected\n"); return -ENOTCONN; } diff --git a/net/tcp/tcp_send_unbuffered.c b/net/tcp/tcp_send_unbuffered.c index 6d5c608ba374a719baad639422f63e74e85fbd88..f0f7c601217eb331cf3d000d6796149791824dce 100644 --- a/net/tcp/tcp_send_unbuffered.c +++ b/net/tcp/tcp_send_unbuffered.c @@ -302,8 +302,8 @@ static uint16_t tcpsend_interrupt(FAR struct net_driver_s *dev, } #endif - nllvdbg("flags: %04x acked: %d sent: %d\n", - flags, pstate->snd_acked, pstate->snd_sent); + ninfo("flags: %04x acked: %d sent: %d\n", + flags, pstate->snd_acked, pstate->snd_sent); /* If this packet contains an acknowledgement, then update the count of * acknowledged bytes. @@ -348,8 +348,8 @@ static uint16_t tcpsend_interrupt(FAR struct net_driver_s *dev, */ pstate->snd_acked = tcp_getsequence(tcp->ackno) - pstate->snd_isn; - nllvdbg("ACK: acked=%d sent=%d buflen=%d\n", - pstate->snd_acked, pstate->snd_sent, pstate->snd_buflen); + ninfo("ACK: acked=%d sent=%d buflen=%d\n", + pstate->snd_acked, pstate->snd_sent, pstate->snd_buflen); /* Have all of the bytes in the buffer been sent and acknowledged? */ @@ -392,7 +392,7 @@ static uint16_t tcpsend_interrupt(FAR struct net_driver_s *dev, { /* Report not connected */ - nllvdbg("Lost connection\n"); + ninfo("Lost connection\n"); net_lostconnection(pstate->snd_sock, flags); pstate->snd_sent = -ENOTCONN; @@ -518,7 +518,7 @@ static uint16_t tcpsend_interrupt(FAR struct net_driver_s *dev, if ((pstate->snd_sent - pstate->snd_acked + sndlen) < conn->winsize) { - /* Set the sequence number for this packet. NOTE: uIP updates + /* Set the sequence number for this packet. NOTE: The network updates * sndseq on receipt of ACK *before* this function is called. In that * case sndseq will point to the next unacknowledged byte (which might * have already been sent). We will overwrite the value of sndseq @@ -526,7 +526,7 @@ static uint16_t tcpsend_interrupt(FAR struct net_driver_s *dev, */ seqno = pstate->snd_sent + pstate->snd_isn; - nllvdbg("SEND: sndseq %08x->%08x\n", conn->sndseq, seqno); + ninfo("SEND: sndseq %08x->%08x\n", conn->sndseq, seqno); tcp_setsequence(conn->sndseq, seqno); #ifdef NEED_IPDOMAIN_SUPPORT @@ -554,8 +554,8 @@ static uint16_t tcpsend_interrupt(FAR struct net_driver_s *dev, /* Update the amount of data sent (but not necessarily ACKed) */ pstate->snd_sent += sndlen; - nllvdbg("SEND: acked=%d sent=%d buflen=%d\n", - pstate->snd_acked, pstate->snd_sent, pstate->snd_buflen); + ninfo("SEND: acked=%d sent=%d buflen=%d\n", + pstate->snd_acked, pstate->snd_sent, pstate->snd_buflen); } } @@ -570,7 +570,7 @@ static uint16_t tcpsend_interrupt(FAR struct net_driver_s *dev, { /* Yes.. report the timeout */ - nlldbg("SEND timeout\n"); + nwarn("WARNING: SEND timeout\n"); pstate->snd_sent = -ETIMEDOUT; goto end_wait; } @@ -719,15 +719,15 @@ ssize_t psock_tcp_send(FAR struct socket *psock, FAR struct tcp_conn_s *conn = (FAR struct tcp_conn_s *)psock->s_conn; struct send_s state; net_lock_t save; - int err; + int errcode; int ret = OK; /* Verify that the sockfd corresponds to valid, allocated socket */ if (!psock || psock->s_crefs <= 0) { - ndbg("ERROR: Invalid socket\n"); - err = EBADF; + nerr("ERROR: Invalid socket\n"); + errcode = EBADF; goto errout; } @@ -735,8 +735,8 @@ ssize_t psock_tcp_send(FAR struct socket *psock, if (psock->s_type != SOCK_STREAM || !_SS_ISCONNECTED(psock->s_flags)) { - ndbg("ERROR: Not connected\n"); - err = ENOTCONN; + nerr("ERROR: Not connected\n"); + errcode = ENOTCONN; goto errout; } @@ -773,8 +773,8 @@ ssize_t psock_tcp_send(FAR struct socket *psock, if (ret < 0) { - ndbg("ERROR: Not reachable\n"); - err = ENETUNREACH; + nerr("ERROR: Not reachable\n"); + errcode = ENETUNREACH; goto errout; } #endif /* CONFIG_NET_ARP_SEND || CONFIG_NET_ICMPv6_NEIGHBOR */ @@ -857,7 +857,7 @@ ssize_t psock_tcp_send(FAR struct socket *psock, if (state.snd_sent < 0) { - err = state.snd_sent; + errcode = state.snd_sent; goto errout; } @@ -867,7 +867,7 @@ ssize_t psock_tcp_send(FAR struct socket *psock, if (ret < 0) { - err = -ret; + errcode = -ret; goto errout; } @@ -876,7 +876,7 @@ ssize_t psock_tcp_send(FAR struct socket *psock, return state.snd_sent; errout: - set_errno(err); + set_errno(errcode); return ERROR; } diff --git a/net/tcp/tcp_timer.c b/net/tcp/tcp_timer.c index 0ba497bb2a143a0cd717297ed276a8d095b2f940..eeabb0910c4da4c735d6f3a3d044a52c28e04580 100644 --- a/net/tcp/tcp_timer.c +++ b/net/tcp/tcp_timer.c @@ -157,7 +157,7 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, DEBUGASSERT(conn->dev != NULL); if (dev != conn->dev) { - nllvdbg("TCP: TCP_CLOSED pending\n"); + ninfo("TCP: TCP_CLOSED pending\n"); } else #endif @@ -168,7 +168,7 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, result = tcp_callback(dev, conn, TCP_TIMEDOUT); - nllvdbg("TCP state: TCP_CLOSED\n"); + ninfo("TCP state: TCP_CLOSED\n"); } } else @@ -213,7 +213,7 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, DEBUGASSERT(conn->dev != NULL); if (dev != conn->dev) { - nllvdbg("TCP: TCP_CLOSED pending\n"); + ninfo("TCP: TCP_CLOSED pending\n"); goto done; } #endif @@ -231,7 +231,7 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, ) { conn->tcpstateflags = TCP_CLOSED; - nllvdbg("TCP state: TCP_CLOSED\n"); + ninfo("TCP state: TCP_CLOSED\n"); /* We call tcp_callback() with TCP_TIMEDOUT to * inform the application that the connection has diff --git a/net/tcp/tcp_wrbuffer.c b/net/tcp/tcp_wrbuffer.c index cb6c10e9d8d405c1be47d65a766b168ad8f1c2f4..149c83143d684db05059921b5efeb7f7777692f5 100644 --- a/net/tcp/tcp_wrbuffer.c +++ b/net/tcp/tcp_wrbuffer.c @@ -41,7 +41,7 @@ #include #if defined(CONFIG_NET) && defined(CONFIG_NET_TCP) && defined(CONFIG_NET_TCP_WRITE_BUFFERS) -#if defined(CONFIG_DEBUG) && defined(CONFIG_NET_TCP_WRBUFFER_DEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_NET_TCP_WRBUFFER_DEBUG) /* Force debug output (from this file only) */ # undef CONFIG_DEBUG_NET @@ -160,7 +160,7 @@ FAR struct tcp_wrbuffer_s *tcp_wrbuffer_alloc(void) wrb->wb_iob = iob_alloc(false); if (!wrb->wb_iob) { - ndbg("ERROR: Failed to allocate I/O buffer\n"); + nerr("ERROR: Failed to allocate I/O buffer\n"); tcp_wrbuffer_release(wrb); return NULL; } diff --git a/net/tcp/tcp_wrbuffer_dump.c b/net/tcp/tcp_wrbuffer_dump.c index 5458519195d27158f53479b601dc63dddbf2ad34..6d1fbf85f6b8368ada55fb68ef117aeb066f006a 100644 --- a/net/tcp/tcp_wrbuffer_dump.c +++ b/net/tcp/tcp_wrbuffer_dump.c @@ -46,7 +46,7 @@ #include "tcp/tcp.h" -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /**************************************************************************** * Public Functions @@ -63,9 +63,9 @@ void tcp_wrbuffer_dump(FAR const char *msg, FAR struct tcp_wrbuffer_s *wrb, unsigned int len, unsigned int offset) { - lowsyslog(LOG_DEBUG, "%s: wrb=%p segno=%d sent=%d nrtx=%d\n", - msg, wrb, WRB_SEQNO(wrb), WRB_SENT(wrb), WRB_NRTX(wrb)); + syslog(LOG_DEBUG, "%s: wrb=%p segno=%d sent=%d nrtx=%d\n", + msg, wrb, WRB_SEQNO(wrb), WRB_SENT(wrb), WRB_NRTX(wrb)); iob_dump("I/O Buffer Chain", WRB_IOB(wrb), len, offset); } -#endif /* CONFIG_DEBUG */ +#endif /* CONFIG_DEBUG_FEATURES */ diff --git a/net/udp/udp.h b/net/udp/udp.h index 91447d25965a8e41f398b08201951ce75d7c77b6..f8584bff0b9ad0eecea5ad3f685d6202c759f3f2 100644 --- a/net/udp/udp.h +++ b/net/udp/udp.h @@ -74,7 +74,7 @@ * Public Type Definitions ****************************************************************************/ -/* Representation of a uIP UDP connection */ +/* Representation of a UDP connection */ struct devif_callback_s; /* Forward reference */ struct udp_hdr_s; /* Forward reference */ diff --git a/net/udp/udp_callback.c b/net/udp/udp_callback.c index 86b733f81a3de4da34f4bfb93425f8c01fe52d5c..74c0527fae8a4542a4d272b280b3fde69b114eb9 100644 --- a/net/udp/udp_callback.c +++ b/net/udp/udp_callback.c @@ -98,7 +98,7 @@ static uint16_t udp_datahandler(FAR struct net_driver_s *dev, FAR struct udp_con iob = iob_tryalloc(true); if (iob == NULL) { - nlldbg("ERROR: Failed to create new I/O buffer chain\n"); + nerr("ERROR: Failed to create new I/O buffer chain\n"); return 0; } @@ -178,7 +178,7 @@ static uint16_t udp_datahandler(FAR struct net_driver_s *dev, FAR struct udp_con * not free any I/O buffers. */ - nlldbg("ERROR: Failed to add data to the I/O buffer chain: %d\n", ret); + nerr("ERROR: Failed to add data to the I/O buffer chain: %d\n", ret); (void)iob_free_chain(iob); return 0; } @@ -191,7 +191,7 @@ static uint16_t udp_datahandler(FAR struct net_driver_s *dev, FAR struct udp_con * not free any I/O buffers. */ - nlldbg("ERROR: Failed to add data to the I/O buffer chain: %d\n", ret); + nerr("ERROR: Failed to add data to the I/O buffer chain: %d\n", ret); (void)iob_free_chain(iob); return 0; } @@ -208,8 +208,8 @@ static uint16_t udp_datahandler(FAR struct net_driver_s *dev, FAR struct udp_con * does not free any I/O buffers. */ - nlldbg("ERROR: Failed to add data to the I/O buffer chain: %d\n", - ret); + nerr("ERROR: Failed to add data to the I/O buffer chain: %d\n", + ret); (void)iob_free_chain(iob); return 0; } @@ -220,12 +220,12 @@ static uint16_t udp_datahandler(FAR struct net_driver_s *dev, FAR struct udp_con ret = iob_tryadd_queue(iob, &conn->readahead); if (ret < 0) { - nlldbg("ERROR: Failed to queue the I/O buffer chain: %d\n", ret); + nerr("ERROR: Failed to queue the I/O buffer chain: %d\n", ret); (void)iob_free_chain(iob); return 0; } - nllvdbg("Buffered %d bytes\n", buflen); + ninfo("Buffered %d bytes\n", buflen); return buflen; } #endif /* CONFIG_NET_UDP_READAHEAD */ @@ -255,7 +255,7 @@ net_dataevent(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn, * can have zero-length with UDP_NEWDATA set just to cause an ACK). */ - nllvdbg("No receive on connection\n"); + ninfo("No receive on connection\n"); #ifdef CONFIG_NET_UDP_READAHEAD /* Save as the packet data as in the read-ahead buffer. NOTE that @@ -270,7 +270,7 @@ net_dataevent(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn, * read-ahead buffers to retain the data -- drop the packet. */ - nllvdbg("Dropped %d bytes\n", dev->d_len); + ninfo("Dropped %d bytes\n", dev->d_len); #ifdef CONFIG_NET_STATISTICS g_netstats.udp.drop++; @@ -304,7 +304,7 @@ net_dataevent(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn, uint16_t udp_callback(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn, uint16_t flags) { - nllvdbg("flags: %04x\n", flags); + ninfo("flags: %04x\n", flags); /* Some sanity checking */ diff --git a/net/udp/udp_conn.c b/net/udp/udp_conn.c index ddd599382e55cc12a2e0afa19ec2e4682095a4ad..1f5ecd095c6b997dad95c9f1b9ee677068709541 100644 --- a/net/udp/udp_conn.c +++ b/net/udp/udp_conn.c @@ -76,7 +76,7 @@ * Private Data ****************************************************************************/ -/* The array containing all uIP UDP connections. */ +/* The array containing all UDP connections. */ struct udp_conn_s g_udp_connections[CONFIG_NET_UDP_CONNS]; diff --git a/net/udp/udp_input.c b/net/udp/udp_input.c index 640fd617ad784081198c56db99e5c82d8fb55da9..6678e3e4b50194f6d89b6c63c7053ac676c5271e 100644 --- a/net/udp/udp_input.c +++ b/net/udp/udp_input.c @@ -67,9 +67,9 @@ * Handle incoming UDP input * * Parameters: - * dev - The device driver structure containing the received UDP packet - * udp - A pointer to the UDP header in the packet - * udpiplen - Length of the IP and UDP headers + * dev - The device driver structure containing the received UDP packet + * udp - A pointer to the UDP header in the packet + * iplen - Length of the IP and UDP headers * * Return: * OK The packet has been processed and can be deleted @@ -149,7 +149,7 @@ static int udp_input(FAR struct net_driver_s *dev, unsigned int iplen) g_netstats.udp.drop++; g_netstats.udp.chkerr++; #endif - nlldbg("Bad UDP checksum\n"); + nwarn("WARNING: Bad UDP checksum\n"); dev->d_len = 0; } else @@ -207,7 +207,7 @@ static int udp_input(FAR struct net_driver_s *dev, unsigned int iplen) } else { - nlldbg("No listener on UDP port\n"); + nwarn("WARNING: No listener on UDP port\n"); dev->d_len = 0; } } diff --git a/net/udp/udp_netpoll.c b/net/udp/udp_netpoll.c index 07772b6604453c4f28ca9b45789fa34d62b9801a..eade182fa120448bcccec9942f4d8d2410e3c5fc 100644 --- a/net/udp/udp_netpoll.c +++ b/net/udp/udp_netpoll.c @@ -93,7 +93,7 @@ static uint16_t udp_poll_interrupt(FAR struct net_driver_s *dev, FAR void *conn, { FAR struct udp_poll_s *info = (FAR struct udp_poll_s *)pvpriv; - nllvdbg("flags: %04x\n", flags); + ninfo("flags: %04x\n", flags); DEBUGASSERT(!info || (info->psock && info->fds)); @@ -166,7 +166,7 @@ int udp_pollsetup(FAR struct socket *psock, FAR struct pollfd *fds) /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!conn || !fds) { return -EINVAL; @@ -295,7 +295,7 @@ int udp_pollteardown(FAR struct socket *psock, FAR struct pollfd *fds) /* Sanity check */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!conn || !fds->priv) { return -EINVAL; diff --git a/net/udp/udp_psock_sendto.c b/net/udp/udp_psock_sendto.c index 71fbe55af186a569eee4040440ed648958e63d79..9210a5dcef6b7fe8760710605bb5701ccac054fe 100644 --- a/net/udp/udp_psock_sendto.c +++ b/net/udp/udp_psock_sendto.c @@ -224,7 +224,7 @@ static uint16_t sendto_interrupt(FAR struct net_driver_s *dev, FAR void *conn, { FAR struct sendto_s *pstate = (FAR struct sendto_s *)pvpriv; - nllvdbg("flags: %04x\n", flags); + ninfo("flags: %04x\n", flags); if (pstate) { /* If the network device has gone down, then we will have terminate @@ -235,7 +235,7 @@ static uint16_t sendto_interrupt(FAR struct net_driver_s *dev, FAR void *conn, { /* Terminate the transfer with an error. */ - nlldbg("ERROR: Network is down\n"); + nwarn("WARNING: Network is down\n"); pstate->st_sndlen = -ENETUNREACH; } @@ -257,7 +257,7 @@ static uint16_t sendto_interrupt(FAR struct net_driver_s *dev, FAR void *conn, { /* Yes.. report the timeout */ - nlldbg("ERROR: SEND timeout\n"); + nwarn("WARNING: SEND timeout\n"); pstate->st_sndlen = -ETIMEDOUT; } else @@ -375,7 +375,7 @@ ssize_t psock_udp_sendto(FAR struct socket *psock, FAR const void *buf, if (ret < 0) { - ndbg("ERROR: Peer not reachable\n"); + nerr("ERROR: Peer not reachable\n"); return -ENETUNREACH; } #endif /* CONFIG_NET_ARP_SEND || CONFIG_NET_ICMPv6_NEIGHBOR */ @@ -419,7 +419,7 @@ ssize_t psock_udp_sendto(FAR struct socket *psock, FAR const void *buf, ret = udp_connect(conn, to); if (ret < 0) { - ndbg("ERROR: udp_connect failed: %d\n", ret); + nerr("ERROR: udp_connect failed: %d\n", ret); goto errout_with_lock; } @@ -430,7 +430,7 @@ ssize_t psock_udp_sendto(FAR struct socket *psock, FAR const void *buf, dev = udp_find_raddr_device(conn); if (dev == NULL) { - ndbg("ERROR: udp_find_raddr_device failed\n"); + nerr("ERROR: udp_find_raddr_device failed\n"); ret = -ENETUNREACH; goto errout_with_lock; } diff --git a/net/udp/udp_send.c b/net/udp/udp_send.c index b764fade4204bdbe38de7b781a8a5ebff72dd4c5..f58bdf5a134f1c9275c5145acce1fa9777e24a10 100644 --- a/net/udp/udp_send.c +++ b/net/udp/udp_send.c @@ -100,7 +100,7 @@ void udp_send(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn) { FAR struct udp_hdr_s *udp; - nllvdbg("UDP payload: %d (%d) bytes\n", dev->d_sndlen, dev->d_len); + ninfo("UDP payload: %d (%d) bytes\n", dev->d_sndlen, dev->d_len); if (dev->d_sndlen > 0) { @@ -252,7 +252,7 @@ void udp_send(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn) } #endif /* CONFIG_NET_UDP_CHECKSUMS */ - nllvdbg("Outgoing UDP packet length: %d\n", dev->d_len); + ninfo("Outgoing UDP packet length: %d\n", dev->d_len); #ifdef CONFIG_NET_STATISTICS g_netstats.udp.sent++; diff --git a/sched/Kconfig b/sched/Kconfig index 27ba4e43c0457419b84c1df4c092dfb958978f71..864220286ab546b922350989bfacd0378a3b2b8b 100644 --- a/sched/Kconfig +++ b/sched/Kconfig @@ -484,7 +484,7 @@ config PREALLOC_CHILDSTATUS config DEBUG_CHILDSTATUS bool "Enable Child Status Debug Output" default n - depends on SCHED_CHILD_STATUS && DEBUG + depends on SCHED_CHILD_STATUS && DEBUG_FEATURES ---help--- Very detailed... I am sure that you do not want this. @@ -1013,7 +1013,7 @@ config MODULE_BUFFERINCR config MODULE_DUMPBUFFER bool "Dump module buffers" default n - depends on DEBUG && DEBUG_VERBOSE + depends on DEBUG_INFO ---help--- Dump various module buffers for debug purposes diff --git a/sched/clock/clock_getres.c b/sched/clock/clock_getres.c index aad5dec9c32a1deee788b75bd83fb2f1980e8ea2..54d666ae53623a4f31d73f4b87cee4013d0d60dd 100644 --- a/sched/clock/clock_getres.c +++ b/sched/clock/clock_getres.c @@ -62,13 +62,13 @@ int clock_getres(clockid_t clock_id, struct timespec *res) { int ret = OK; - sdbg("clock_id=%d\n", clock_id); + sinfo("clock_id=%d\n", clock_id); /* Only CLOCK_REALTIME is supported */ if (clock_id != CLOCK_REALTIME) { - sdbg("Returning ERROR\n"); + serr("Returning ERROR\n"); set_errno(EINVAL); ret = ERROR; } @@ -79,7 +79,7 @@ int clock_getres(clockid_t clock_id, struct timespec *res) res->tv_sec = 0; res->tv_nsec = NSEC_PER_TICK; - sdbg("Returning res=(%d,%d)\n", (int)res->tv_sec, (int)res->tv_nsec); + sinfo("Returning res=(%d,%d)\n", (int)res->tv_sec, (int)res->tv_nsec); } return ret; diff --git a/sched/clock/clock_gettime.c b/sched/clock/clock_gettime.c index 50e3c6e7c12781eb4a9d649547f3aae3d42766fa..e014984f491a6598ce5b7b262c722f660bc1d902 100644 --- a/sched/clock/clock_gettime.c +++ b/sched/clock/clock_gettime.c @@ -68,7 +68,7 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp) uint32_t carry; int ret = OK; - sdbg("clock_id=%d\n", clock_id); + sinfo("clock_id=%d\n", clock_id); DEBUGASSERT(tp != NULL); #ifdef CONFIG_CLOCK_MONOTONIC @@ -148,14 +148,14 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp) if (ret < 0) { - sdbg("Returning ERROR\n"); + serr("Returning ERROR\n"); set_errno(-ret); ret = ERROR; } else { - sdbg("Returning tp=(%d,%d)\n", (int)tp->tv_sec, (int)tp->tv_nsec); + sinfo("Returning tp=(%d,%d)\n", (int)tp->tv_sec, (int)tp->tv_nsec); } return ret; diff --git a/sched/clock/clock_settime.c b/sched/clock/clock_settime.c index 640e375a63c1ad279fd6bf7bea844b5c1668bb79..8f269079d89909c9ee6787a4fd1ea190c7f93d1e 100644 --- a/sched/clock/clock_settime.c +++ b/sched/clock/clock_settime.c @@ -67,7 +67,7 @@ int clock_settime(clockid_t clock_id, FAR const struct timespec *tp) irqstate_t flags; int ret = OK; - sdbg("clock_id=%d\n", clock_id); + sinfo("clock_id=%d\n", clock_id); DEBUGASSERT(tp != NULL); /* CLOCK_REALTIME - POSIX demands this to be present. This is the wall @@ -120,13 +120,13 @@ int clock_settime(clockid_t clock_id, FAR const struct timespec *tp) #endif leave_critical_section(flags); - sdbg("basetime=(%ld,%lu) bias=(%ld,%lu)\n", - (long)g_basetime.tv_sec, (unsigned long)g_basetime.tv_nsec, - (long)bias.tv_sec, (unsigned long)bias.tv_nsec); + sinfo("basetime=(%ld,%lu) bias=(%ld,%lu)\n", + (long)g_basetime.tv_sec, (unsigned long)g_basetime.tv_nsec, + (long)bias.tv_sec, (unsigned long)bias.tv_nsec); } else { - sdbg("Returning ERROR\n"); + serr("Returning ERROR\n"); set_errno(EINVAL); ret = ERROR; } diff --git a/sched/group/group_addrenv.c b/sched/group/group_addrenv.c index ddc27a4153fd9d6557fe9bb4745f4748336b560f..596de965a6ec8bbe658f82a5bb576bd6b11e6054 100644 --- a/sched/group/group_addrenv.c +++ b/sched/group/group_addrenv.c @@ -163,7 +163,7 @@ int group_addrenv(FAR struct tcb_s *tcb) ret = up_addrenv_select(&group->tg_addrenv, NULL); if (ret < 0) { - bdbg("ERROR: up_addrenv_select failed: %d\n", ret); + berr("ERROR: up_addrenv_select failed: %d\n", ret); } /* Save the new, current group */ diff --git a/sched/group/group_childstatus.c b/sched/group/group_childstatus.c index 00e78b4322dffb7187a55cacbbe997c030dd267d..729fb23ef7c825bfed3072467c0dd480442e2926 100644 --- a/sched/group/group_childstatus.c +++ b/sched/group/group_childstatus.c @@ -66,7 +66,7 @@ # define CONFIG_PREALLOC_CHILDSTATUS (2*CONFIG_MAX_TASKS) #endif -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_INFO # undef CONFIG_DEBUG_CHILDSTATUS #endif @@ -115,11 +115,11 @@ static void group_dumpchildren(FAR struct task_group_s *group, FAR struct child_status_s *child; int i; - dbg("Task group=%p: %s\n", group, msg); + _info("Task group=%p: %s\n", group, msg); for (i = 0, child = group->tg_children; child; i++, child = child->flink) { - dbg(" %d. ch_flags=%02x ch_pid=%d ch_status=%d\n", - i, child->ch_flags, child->ch_pid, child->ch_status); + _info(" %d. ch_flags=%02x ch_pid=%d ch_status=%d\n", + i, child->ch_flags, child->ch_pid, child->ch_status); } } #else diff --git a/sched/group/group_join.c b/sched/group/group_join.c index bdf2fc546d0e7ec9c45da343b65d216a48c2b3c4..5aecedebe711e0dc804e85ebf3820b2f2c14462a 100644 --- a/sched/group/group_join.c +++ b/sched/group/group_join.c @@ -110,7 +110,7 @@ static inline int group_addmember(FAR struct task_group_s *group, pid_t pid) if (!newmembers) { - sdbg("ERROR: Failed to reallocate tg_members\n"); + serr("ERROR: Failed to reallocate tg_members\n"); return -ENOMEM; } diff --git a/sched/group/group_setupidlefiles.c b/sched/group/group_setupidlefiles.c index c5ed320f5e3fc571f4ffc146421f72dca81b5329..0d4eb19ca29410a0e8ced572f04bf5cd502062d4 100644 --- a/sched/group/group_setupidlefiles.c +++ b/sched/group/group_setupidlefiles.c @@ -120,13 +120,14 @@ int group_setupidlefiles(FAR struct task_tcb_s *tcb) if (fd > 0) { - slldbg("Open /dev/console fd: %d\n", fd); + sinfo("Open /dev/console fd: %d\n", fd); (void)close(fd); } else { - slldbg("Failed to open /dev/console: %d\n", errno); + serr("ERROR: Failed to open /dev/console: %d\n", errno); } + return -ENFILE; } #endif diff --git a/sched/init/os_bringup.c b/sched/init/os_bringup.c index 1652a36b7fdb1a8e267fb349280a9189f448c173..7887ab8770c4446929a20205e1c31822710dccef 100644 --- a/sched/init/os_bringup.c +++ b/sched/init/os_bringup.c @@ -152,7 +152,7 @@ static inline void os_pgworker(void) * resolve page faults in other threads */ - svdbg("Starting paging thread\n"); + sinfo("Starting paging thread\n"); g_pgworker = kernel_thread("pgfill", CONFIG_PAGING_DEFPRIO, CONFIG_PAGING_STACKSIZE, @@ -253,7 +253,7 @@ static inline void os_do_appstart(void) * entrypoint from the header at the beginning of the user-space blob. */ - svdbg("Starting init thread\n"); + sinfo("Starting init thread\n"); #ifdef CONFIG_BUILD_PROTECTED DEBUGASSERT(USERSPACE->us_entrypoint != NULL); @@ -287,7 +287,7 @@ static inline void os_do_appstart(void) * of the board_initialize() operation. */ - svdbg("Starting init task: %s\n", CONFIG_USER_INITPATH); + sinfo("Starting init task: %s\n", CONFIG_USER_INITPATH); ret = exec(CONFIG_USER_INITPATH, NULL, CONFIG_INIT_SYMTAB, CONFIG_INIT_NEXPORTS); diff --git a/sched/init/os_smpstart.c b/sched/init/os_smpstart.c index da7852317c1bfcf5c989915aa52f5311777a6ffe..ba8afac2ded0cd0f1b4fb427f4febb6cd5bb80b7 100644 --- a/sched/init/os_smpstart.c +++ b/sched/init/os_smpstart.c @@ -133,7 +133,7 @@ int os_idle_task(int argc, FAR char *argv[]) { /* Enter the IDLE loop */ - sdbg("CPU%d: Beginning Idle Loop\n", this_cpu()); + sinfo("CPU%d: Beginning Idle Loop\n", this_cpu()); for (; ; ) { @@ -207,7 +207,7 @@ int os_smp_start(void) ret = up_cpu_idlestack(cpu, tcb, CONFIG_SMP_IDLETHREAD_STACKSIZE); if (ret < 0) { - sdbg("ERROR: Failed to allocate stack for CPU%d\n", cpu); + serr("ERROR: Failed to allocate stack for CPU%d\n", cpu); return ret; } @@ -231,7 +231,7 @@ int os_smp_start(void) ret = up_cpu_start(cpu); if (ret < 0) { - sdbg("ERROR: Failed to start CPU%d: %d\n", cpu, ret); + serr("ERROR: Failed to start CPU%d: %d\n", cpu, ret); return ret; } } diff --git a/sched/init/os_start.c b/sched/init/os_start.c index 5a50c1b2fc3a84890dc06e2d14a536b3792b59f1..1a65af1403c8fef1d7a4bec0ade611d34ab46b95 100644 --- a/sched/init/os_start.c +++ b/sched/init/os_start.c @@ -54,6 +54,7 @@ #include #include #include +#include #include #include "sched/sched.h" @@ -372,7 +373,7 @@ void os_start(void) #endif int i; - slldbg("Entry\n"); + sinfo("Entry\n"); /* Boot up is complete */ @@ -757,7 +758,15 @@ void os_start(void) DEBUGVERIFY(group_initialize(&g_idletcb[cpu])); g_idletcb[cpu].cmn.group->tg_flags = GROUP_FLAG_NOCLDWAIT; #endif -} + } + + /* Start SYSLOG ***********************************************************/ + /* Late initialization of the system logging device. Some SYSLOG channel + * must be initialized late in the initialization sequence because it may + * depend on having IDLE task file structures setup. + */ + + syslog_initialize(SYSLOG_INIT_LATE); #ifdef CONFIG_SMP /* Start all CPUs *********************************************************/ @@ -797,7 +806,7 @@ void os_start(void) /* The IDLE Loop **********************************************************/ /* When control is return to this point, the system is idle. */ - sdbg("CPU0: Beginning Idle Loop\n"); + sinfo("CPU0: Beginning Idle Loop\n"); for (; ; ) { /* Perform garbage collection (if it is not being done by the worker diff --git a/sched/irq/irq_unexpectedisr.c b/sched/irq/irq_unexpectedisr.c index 191d0a21940c27fde966c770dd182086ed3cab1a..9eb250fa4919913f2e6607feb39065643e60615c 100644 --- a/sched/irq/irq_unexpectedisr.c +++ b/sched/irq/irq_unexpectedisr.c @@ -61,7 +61,7 @@ int irq_unexpected_isr(int irq, FAR void *context) { (void)up_irq_save(); - lldbg("irq: %d\n", irq); + _err("ERROR irq: %d\n", irq); PANIC(); return OK; /* Won't get here */ } diff --git a/sched/module/mod_bind.c b/sched/module/mod_bind.c index 75d8e1b56a4a7f26e7debf72dd9720e8bc45a950..da905444e9d8008c34156dadf1f2a081f6757b5b 100644 --- a/sched/module/mod_bind.c +++ b/sched/module/mod_bind.c @@ -73,7 +73,7 @@ static inline int mod_readrel(FAR struct mod_loadinfo_s *loadinfo, if (index < 0 || index > (relsec->sh_size / sizeof(Elf32_Rel))) { - sdbg("Bad relocation symbol index: %d\n", index); + serr("ERROR: Bad relocation symbol index: %d\n", index); return -EINVAL; } @@ -125,7 +125,7 @@ static int mod_relocate(FAR struct mod_loadinfo_s *loadinfo, int relidx) ret = mod_readrel(loadinfo, relsec, i, &rel); if (ret < 0) { - sdbg("Section %d reloc %d: Failed to read relocation entry: %d\n", + serr("ERROR: Section %d reloc %d: Failed to read relocation entry: %d\n", relidx, i, ret); return ret; } @@ -141,7 +141,7 @@ static int mod_relocate(FAR struct mod_loadinfo_s *loadinfo, int relidx) ret = mod_readsym(loadinfo, symidx, &sym); if (ret < 0) { - sdbg("Section %d reloc %d: Failed to read symbol[%d]: %d\n", + serr("ERROR: Section %d reloc %d: Failed to read symbol[%d]: %d\n", relidx, i, symidx, ret); return ret; } @@ -163,13 +163,13 @@ static int mod_relocate(FAR struct mod_loadinfo_s *loadinfo, int relidx) if (ret == -ESRCH) { - sdbg("Section %d reloc %d: Undefined symbol[%d] has no name: %d\n", + serr("ERROR: Section %d reloc %d: Undefined symbol[%d] has no name: %d\n", relidx, i, symidx, ret); psym = NULL; } else { - sdbg("Section %d reloc %d: Failed to get value of symbol[%d]: %d\n", + serr("ERROR: Section %d reloc %d: Failed to get value of symbol[%d]: %d\n", relidx, i, symidx, ret); return ret; } @@ -179,7 +179,7 @@ static int mod_relocate(FAR struct mod_loadinfo_s *loadinfo, int relidx) if (rel.r_offset < 0 || rel.r_offset > dstsec->sh_size - sizeof(uint32_t)) { - sdbg("Section %d reloc %d: Relocation address out of range, offset %d size %d\n", + serr("ERROR: Section %d reloc %d: Relocation address out of range, offset %d size %d\n", relidx, i, rel.r_offset, dstsec->sh_size); return -EINVAL; } @@ -191,7 +191,7 @@ static int mod_relocate(FAR struct mod_loadinfo_s *loadinfo, int relidx) ret = up_relocate(&rel, psym, addr); if (ret < 0) { - sdbg("ERROR: Section %d reloc %d: Relocation failed: %d\n", relidx, i, ret); + serr("ERROR: Section %d reloc %d: Relocation failed: %d\n", relidx, i, ret); return ret; } } @@ -201,7 +201,7 @@ static int mod_relocate(FAR struct mod_loadinfo_s *loadinfo, int relidx) static int mod_relocateadd(FAR struct mod_loadinfo_s *loadinfo, int relidx) { - sdbg("Not implemented\n"); + serr("ERROR: Not implemented\n"); return -ENOSYS; } @@ -242,7 +242,7 @@ int mod_bind(FAR struct mod_loadinfo_s *loadinfo) ret = mod_allocbuffer(loadinfo); if (ret < 0) { - sdbg("mod_allocbuffer failed: %d\n", ret); + serr("ERROR: mod_allocbuffer failed: %d\n", ret); return -ENOMEM; } diff --git a/sched/module/mod_init.c b/sched/module/mod_init.c index c16069caf52f10a8b5b7a50888674c6fe86c01a1..b46d38912c70ac691b7159032fc1a21ce2d8ca9a 100644 --- a/sched/module/mod_init.c +++ b/sched/module/mod_init.c @@ -56,16 +56,16 @@ * Pre-processor Definitions ****************************************************************************/ -/* CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, and CONFIG_MODULE_DUMPBUFFER have to +/* CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, and CONFIG_MODULE_DUMPBUFFER have to * be defined or CONFIG_MODULE_DUMPBUFFER does nothing. */ -#if !defined(CONFIG_DEBUG_VERBOSE) || !defined (CONFIG_MODULE_DUMPBUFFER) +#if !defined(CONFIG_DEBUG_INFO) || !defined (CONFIG_MODULE_DUMPBUFFER) # undef CONFIG_MODULE_DUMPBUFFER #endif #ifdef CONFIG_MODULE_DUMPBUFFER -# define mod_dumpbuffer(m,b,n) svdbgdumpbuffer(m,b,n) +# define mod_dumpbuffer(m,b,n) sinfodumpbuffer(m,b,n) #else # define mod_dumpbuffer(m,b,n) #endif @@ -102,7 +102,7 @@ static inline int mod_filelen(FAR struct mod_loadinfo_s *loadinfo, if (ret < 0) { int errval = errno; - sdbg("Failed to stat file: %d\n", errval); + serr("ERROR: Failed to stat file: %d\n", errval); return -errval; } @@ -110,7 +110,7 @@ static inline int mod_filelen(FAR struct mod_loadinfo_s *loadinfo, if (!S_ISREG(buf.st_mode)) { - sdbg("Not a regular file. mode: %d\n", buf.st_mode); + serr("ERROR: Not a regular file. mode: %d\n", buf.st_mode); return -ENOENT; } @@ -146,7 +146,7 @@ int mod_initialize(FAR const char *filename, { int ret; - svdbg("filename: %s loadinfo: %p\n", filename, loadinfo); + sinfo("filename: %s loadinfo: %p\n", filename, loadinfo); /* Clear the load info structure */ @@ -157,7 +157,7 @@ int mod_initialize(FAR const char *filename, ret = mod_filelen(loadinfo, filename); if (ret < 0) { - sdbg("mod_filelen failed: %d\n", ret); + serr("ERROR: mod_filelen failed: %d\n", ret); return ret; } @@ -167,7 +167,7 @@ int mod_initialize(FAR const char *filename, if (loadinfo->filfd < 0) { int errval = errno; - sdbg("Failed to open ELF binary %s: %d\n", filename, errval); + serr("ERROR: Failed to open ELF binary %s: %d\n", filename, errval); return -errval; } @@ -177,7 +177,7 @@ int mod_initialize(FAR const char *filename, sizeof(Elf32_Ehdr), 0); if (ret < 0) { - sdbg("Failed to read ELF header: %d\n", ret); + serr("ERROR: Failed to read ELF header: %d\n", ret); return ret; } @@ -196,7 +196,7 @@ int mod_initialize(FAR const char *filename, * is not correctly formed. */ - sdbg("Bad ELF header: %d\n", ret); + serr("ERROR: Bad ELF header: %d\n", ret); return ret; } diff --git a/sched/module/mod_insmod.c b/sched/module/mod_insmod.c index 9242c5419efbad38eef2ace7d14f067c9490ac60..3b4b5b3ceb0b02989e27776258d00f285b919eab 100644 --- a/sched/module/mod_insmod.c +++ b/sched/module/mod_insmod.c @@ -58,16 +58,16 @@ * Pre-processor Definitions ****************************************************************************/ -/* CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, and CONFIG_DEBUG_BINFMT have to be - * defined or CONFIG_MODULE_DUMPBUFFER does nothing. +/* CONFIG_DEBUG_INFO, and CONFIG_DEBUG_BINFMT have to be defined or + * CONFIG_MODULE_DUMPBUFFER does nothing. */ -#if !defined(CONFIG_DEBUG_VERBOSE) || !defined (CONFIG_DEBUG_BINFMT) +#if !defined(CONFIG_DEBUG_INFO) || !defined (CONFIG_DEBUG_BINFMT) # undef CONFIG_MODULE_DUMPBUFFER #endif #ifdef CONFIG_MODULE_DUMPBUFFER -# define mod_dumpbuffer(m,b,n) svdbgdumpbuffer(m,b,n) +# define mod_dumpbuffer(m,b,n) sinfodumpbuffer(m,b,n) #else # define mod_dumpbuffer(m,b,n) #endif @@ -84,55 +84,55 @@ * Name: mod_dumploadinfo ****************************************************************************/ -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_BINFMT) +#if defined(CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_BINFMT) static void mod_dumploadinfo(FAR struct mod_loadinfo_s *loadinfo) { int i; - sdbg("LOAD_INFO:\n"); - sdbg(" textalloc: %08lx\n", (long)loadinfo->textalloc); - sdbg(" datastart: %08lx\n", (long)loadinfo->datastart); - sdbg(" textsize: %ld\n", (long)loadinfo->textsize); - sdbg(" datasize: %ld\n", (long)loadinfo->datasize); - sdbg(" filelen: %ld\n", (long)loadinfo->filelen); - sdbg(" filfd: %d\n", loadinfo->filfd); - sdbg(" symtabidx: %d\n", loadinfo->symtabidx); - sdbg(" strtabidx: %d\n", loadinfo->strtabidx); - - sdbg("ELF Header:\n"); - sdbg(" e_ident: %02x %02x %02x %02x\n", + sinfo("LOAD_INFO:\n"); + sinfo(" textalloc: %08lx\n", (long)loadinfo->textalloc); + sinfo(" datastart: %08lx\n", (long)loadinfo->datastart); + sinfo(" textsize: %ld\n", (long)loadinfo->textsize); + sinfo(" datasize: %ld\n", (long)loadinfo->datasize); + sinfo(" filelen: %ld\n", (long)loadinfo->filelen); + sinfo(" filfd: %d\n", loadinfo->filfd); + sinfo(" symtabidx: %d\n", loadinfo->symtabidx); + sinfo(" strtabidx: %d\n", loadinfo->strtabidx); + + sinfo("ELF Header:\n"); + sinfo(" e_ident: %02x %02x %02x %02x\n", loadinfo->ehdr.e_ident[0], loadinfo->ehdr.e_ident[1], loadinfo->ehdr.e_ident[2], loadinfo->ehdr.e_ident[3]); - sdbg(" e_type: %04x\n", loadinfo->ehdr.e_type); - sdbg(" e_machine: %04x\n", loadinfo->ehdr.e_machine); - sdbg(" e_version: %08x\n", loadinfo->ehdr.e_version); - sdbg(" e_entry: %08lx\n", (long)loadinfo->ehdr.e_entry); - sdbg(" e_phoff: %d\n", loadinfo->ehdr.e_phoff); - sdbg(" e_shoff: %d\n", loadinfo->ehdr.e_shoff); - sdbg(" e_flags: %08x\n" , loadinfo->ehdr.e_flags); - sdbg(" e_ehsize: %d\n", loadinfo->ehdr.e_ehsize); - sdbg(" e_phentsize: %d\n", loadinfo->ehdr.e_phentsize); - sdbg(" e_phnum: %d\n", loadinfo->ehdr.e_phnum); - sdbg(" e_shentsize: %d\n", loadinfo->ehdr.e_shentsize); - sdbg(" e_shnum: %d\n", loadinfo->ehdr.e_shnum); - sdbg(" e_shstrndx: %d\n", loadinfo->ehdr.e_shstrndx); + sinfo(" e_type: %04x\n", loadinfo->ehdr.e_type); + sinfo(" e_machine: %04x\n", loadinfo->ehdr.e_machine); + sinfo(" e_version: %08x\n", loadinfo->ehdr.e_version); + sinfo(" e_entry: %08lx\n", (long)loadinfo->ehdr.e_entry); + sinfo(" e_phoff: %d\n", loadinfo->ehdr.e_phoff); + sinfo(" e_shoff: %d\n", loadinfo->ehdr.e_shoff); + sinfo(" e_flags: %08x\n" , loadinfo->ehdr.e_flags); + sinfo(" e_ehsize: %d\n", loadinfo->ehdr.e_ehsize); + sinfo(" e_phentsize: %d\n", loadinfo->ehdr.e_phentsize); + sinfo(" e_phnum: %d\n", loadinfo->ehdr.e_phnum); + sinfo(" e_shentsize: %d\n", loadinfo->ehdr.e_shentsize); + sinfo(" e_shnum: %d\n", loadinfo->ehdr.e_shnum); + sinfo(" e_shstrndx: %d\n", loadinfo->ehdr.e_shstrndx); if (loadinfo->shdr && loadinfo->ehdr.e_shnum > 0) { for (i = 0; i < loadinfo->ehdr.e_shnum; i++) { FAR Elf32_Shdr *shdr = &loadinfo->shdr[i]; - sdbg("Sections %d:\n", i); - sdbg(" sh_name: %08x\n", shdr->sh_name); - sdbg(" sh_type: %08x\n", shdr->sh_type); - sdbg(" sh_flags: %08x\n", shdr->sh_flags); - sdbg(" sh_addr: %08x\n", shdr->sh_addr); - sdbg(" sh_offset: %d\n", shdr->sh_offset); - sdbg(" sh_size: %d\n", shdr->sh_size); - sdbg(" sh_link: %d\n", shdr->sh_link); - sdbg(" sh_info: %d\n", shdr->sh_info); - sdbg(" sh_addralign: %d\n", shdr->sh_addralign); - sdbg(" sh_entsize: %d\n", shdr->sh_entsize); + sinfo("Sections %d:\n", i); + sinfo(" sh_name: %08x\n", shdr->sh_name); + sinfo(" sh_type: %08x\n", shdr->sh_type); + sinfo(" sh_flags: %08x\n", shdr->sh_flags); + sinfo(" sh_addr: %08x\n", shdr->sh_addr); + sinfo(" sh_offset: %d\n", shdr->sh_offset); + sinfo(" sh_size: %d\n", shdr->sh_size); + sinfo(" sh_link: %d\n", shdr->sh_link); + sinfo(" sh_info: %d\n", shdr->sh_info); + sinfo(" sh_addralign: %d\n", shdr->sh_addralign); + sinfo(" sh_entsize: %d\n", shdr->sh_entsize); } } } @@ -191,7 +191,7 @@ int insmod(FAR const char *filename, FAR const char *modulename) int ret; DEBUGASSERT(filename != NULL && modulename != NULL); - svdbg("Loading file: %s\n", filename); + sinfo("Loading file: %s\n", filename); /* Get exclusive access to the module registry */ @@ -212,7 +212,7 @@ int insmod(FAR const char *filename, FAR const char *modulename) mod_dumploadinfo(&loadinfo); if (ret != 0) { - sdbg("ERROR: Failed to initialize to load module: %d\n", ret); + serr("ERROR: Failed to initialize to load module: %d\n", ret); goto errout_with_lock; } @@ -221,7 +221,7 @@ int insmod(FAR const char *filename, FAR const char *modulename) modp = (FAR struct module_s *)kmm_zalloc(sizeof(struct module_s)); if (ret != 0) { - sdbg("Failed to initialize for load of ELF program: %d\n", ret); + sinfo("Failed to initialize for load of ELF program: %d\n", ret); goto errout_with_loadinfo; } @@ -235,7 +235,7 @@ int insmod(FAR const char *filename, FAR const char *modulename) mod_dumploadinfo(&loadinfo); if (ret != 0) { - sdbg("Failed to load ELF program binary: %d\n", ret); + sinfo("Failed to load ELF program binary: %d\n", ret); goto errout_with_registry_entry; } @@ -244,7 +244,7 @@ int insmod(FAR const char *filename, FAR const char *modulename) ret = mod_bind(&loadinfo); if (ret != 0) { - sdbg("Failed to bind symbols program binary: %d\n", ret); + sinfo("Failed to bind symbols program binary: %d\n", ret); goto errout_with_load; } @@ -269,7 +269,7 @@ int insmod(FAR const char *filename, FAR const char *modulename) ret = initializer(&modp->uninitializer, &modp->arg); if (ret < 0) { - sdbg("Failed to initialize the module: %d\n", ret); + sinfo("Failed to initialize the module: %d\n", ret); goto errout_with_load; } diff --git a/sched/module/mod_iobuffer.c b/sched/module/mod_iobuffer.c index 0a8c4bc4ef5d0d5cf3c153c8263cb68b1ad1398e..f2d86c69ce1e34ea892d0226094b7982edd55c61 100644 --- a/sched/module/mod_iobuffer.c +++ b/sched/module/mod_iobuffer.c @@ -75,7 +75,7 @@ int mod_allocbuffer(FAR struct mod_loadinfo_s *loadinfo) loadinfo->iobuffer = (FAR uint8_t *)kmm_malloc(CONFIG_MODULE_BUFFERSIZE); if (!loadinfo->iobuffer) { - sdbg("Failed to allocate an I/O buffer\n"); + serr("ERROR: Failed to allocate an I/O buffer\n"); return -ENOMEM; } @@ -111,7 +111,7 @@ int mod_reallocbuffer(FAR struct mod_loadinfo_s *loadinfo, size_t increment) buffer = kmm_realloc((FAR void *)loadinfo->iobuffer, newsize); if (!buffer) { - sdbg("Failed to reallocate the I/O buffer\n"); + serr("ERROR: Failed to reallocate the I/O buffer\n"); return -ENOMEM; } diff --git a/sched/module/mod_load.c b/sched/module/mod_load.c index cce6ac0cb20cd4b905d10e8568f561162d2107f9..2ce413bd6fbeb27840491d65f0ae3787266ac376 100644 --- a/sched/module/mod_load.c +++ b/sched/module/mod_load.c @@ -152,7 +152,7 @@ static inline int mod_loadfile(FAR struct mod_loadinfo_s *loadinfo) /* Read each section into memory that is marked SHF_ALLOC + SHT_NOBITS */ - svdbg("Loaded sections:\n"); + sinfo("Loaded sections:\n"); text = (FAR uint8_t *)loadinfo->textalloc; data = (FAR uint8_t *)loadinfo->datastart; @@ -192,7 +192,7 @@ static inline int mod_loadfile(FAR struct mod_loadinfo_s *loadinfo) ret = mod_read(loadinfo, *pptr, shdr->sh_size, shdr->sh_offset); if (ret < 0) { - sdbg("ERROR: Failed to read section %d: %d\n", i, ret); + serr("ERROR: Failed to read section %d: %d\n", i, ret); return ret; } } @@ -208,7 +208,7 @@ static inline int mod_loadfile(FAR struct mod_loadinfo_s *loadinfo) /* Update sh_addr to point to copy in memory */ - svdbg("%d. %08lx->%08lx\n", i, + sinfo("%d. %08lx->%08lx\n", i, (unsigned long)shdr->sh_addr, (unsigned long)*pptr); shdr->sh_addr = (uintptr_t)*pptr; @@ -242,7 +242,7 @@ int mod_load(FAR struct mod_loadinfo_s *loadinfo) { int ret; - svdbg("loadinfo: %p\n", loadinfo); + sinfo("loadinfo: %p\n", loadinfo); DEBUGASSERT(loadinfo && loadinfo->filfd >= 0); /* Load section headers into memory */ @@ -250,7 +250,7 @@ int mod_load(FAR struct mod_loadinfo_s *loadinfo) ret = mod_loadshdrs(loadinfo); if (ret < 0) { - sdbg("ERROR: mod_loadshdrs failed: %d\n", ret); + serr("ERROR: mod_loadshdrs failed: %d\n", ret); goto errout_with_buffers; } @@ -265,7 +265,7 @@ int mod_load(FAR struct mod_loadinfo_s *loadinfo) loadinfo->textalloc = (uintptr_t)kmm_zalloc(loadinfo->textsize + loadinfo->datasize); if (!loadinfo->textalloc) { - sdbg("ERROR: Failed to allocate memory for the module\n"); + serr("ERROR: Failed to allocate memory for the module\n"); ret = -ENOMEM; goto errout_with_buffers; } @@ -277,7 +277,7 @@ int mod_load(FAR struct mod_loadinfo_s *loadinfo) ret = mod_loadfile(loadinfo); if (ret < 0) { - sdbg("ERROR: mod_loadfile failed: %d\n", ret); + serr("ERROR: mod_loadfile failed: %d\n", ret); goto errout_with_buffers; } diff --git a/sched/module/mod_procfs.c b/sched/module/mod_procfs.c index 411cb1eccdee6450ce5ca686034c0b22c0fcfd33..50388d0d72ae1284b344ea7e13a22543dcfebafe 100644 --- a/sched/module/mod_procfs.c +++ b/sched/module/mod_procfs.c @@ -171,7 +171,7 @@ static int modprocfs_open(FAR struct file *filep, FAR const char *relpath, { FAR struct modprocfs_file_s *priv; - fvdbg("Open '%s'\n", relpath); + finfo("Open '%s'\n", relpath); /* PROCFS is read-only. Any attempt to open with any kind of write * access is not permitted. @@ -181,7 +181,7 @@ static int modprocfs_open(FAR struct file *filep, FAR const char *relpath, if (((oflags & O_WRONLY) != 0 || (oflags & O_RDONLY) == 0)) { - fdbg("ERROR: Only O_RDONLY supported\n"); + ferr("ERROR: Only O_RDONLY supported\n"); return -EACCES; } @@ -190,7 +190,7 @@ static int modprocfs_open(FAR struct file *filep, FAR const char *relpath, priv = (FAR struct modprocfs_file_s *)kmm_zalloc(sizeof(struct modprocfs_file_s)); if (!priv) { - fdbg("ERROR: Failed to allocate file attributes\n"); + ferr("ERROR: Failed to allocate file attributes\n"); return -ENOMEM; } @@ -232,7 +232,7 @@ static ssize_t modprocfs_read(FAR struct file *filep, FAR char *buffer, FAR struct modprocfs_file_s *priv; int ret; - fvdbg("buffer=%p buflen=%lu\n", buffer, (unsigned long)buflen); + finfo("buffer=%p buflen=%lu\n", buffer, (unsigned long)buflen); /* Recover our private data from the struct file instance */ @@ -270,7 +270,7 @@ static int modprocfs_dup(FAR const struct file *oldp, FAR struct file *newp) FAR struct modprocfs_file_s *oldpriv; FAR struct modprocfs_file_s *newpriv; - fvdbg("Dup %p->%p\n", oldp, newp); + finfo("Dup %p->%p\n", oldp, newp); /* Recover our private data from the old struct file instance */ @@ -282,7 +282,7 @@ static int modprocfs_dup(FAR const struct file *oldp, FAR struct file *newp) newpriv = (FAR struct modprocfs_file_s *)kmm_zalloc(sizeof(struct modprocfs_file_s)); if (!newpriv) { - fdbg("ERROR: Failed to allocate file attributes\n"); + ferr("ERROR: Failed to allocate file attributes\n"); return -ENOMEM; } diff --git a/sched/module/mod_read.c b/sched/module/mod_read.c index 8cad4adb8913cf30dce901a69e855ec2dc52be32..910f48d5398517c1c92354c75a2ab8d2c477b5a5 100644 --- a/sched/module/mod_read.c +++ b/sched/module/mod_read.c @@ -114,7 +114,7 @@ int mod_read(FAR struct mod_loadinfo_s *loadinfo, FAR uint8_t *buffer, ssize_t nbytes; /* Number of bytes read */ off_t rpos; /* Position returned by lseek */ - svdbg("Read %ld bytes from offset %ld\n", (long)readsize, (long)offset); + sinfo("Read %ld bytes from offset %ld\n", (long)readsize, (long)offset); /* Loop until all of the requested data has been read. */ @@ -126,7 +126,7 @@ int mod_read(FAR struct mod_loadinfo_s *loadinfo, FAR uint8_t *buffer, if (rpos != offset) { int errval = errno; - sdbg("Failed to seek to position %lu: %d\n", + serr("ERROR: Failed to seek to position %lu: %d\n", (unsigned long)offset, errval); return -errval; } @@ -142,14 +142,14 @@ int mod_read(FAR struct mod_loadinfo_s *loadinfo, FAR uint8_t *buffer, if (errval != EINTR) { - sdbg("Read from offset %lu failed: %d\n", + serr("ERROR: Read from offset %lu failed: %d\n", (unsigned long)offset, errval); return -errval; } } else if (nbytes == 0) { - sdbg("Unexpected end of file\n"); + serr("ERROR: Unexpected end of file\n"); return -ENODATA; } else diff --git a/sched/module/mod_registry.c b/sched/module/mod_registry.c index 7df1168b350a07932e779a42cd0dd4d22d23ac0f..93a022e8bd038fd7fbbc5da9601a8f9d8fb60543 100644 --- a/sched/module/mod_registry.c +++ b/sched/module/mod_registry.c @@ -153,7 +153,7 @@ int mod_registry_del(FAR struct module_s *modp) if (curr == NULL) { - sdbg("ERROR: Could not find module entry\n"); + serr("ERROR: Could not find module entry\n"); return -ENOENT; } diff --git a/sched/module/mod_rmmod.c b/sched/module/mod_rmmod.c index 76fff1c7aab14d55642a5cbf9e4fe347ca34b18b..59f7d2f15d3f5516584364008370d9b12ec0a5c4 100644 --- a/sched/module/mod_rmmod.c +++ b/sched/module/mod_rmmod.c @@ -88,7 +88,7 @@ int rmmod(FAR const char *modulename) modp = mod_registry_find(modulename); if (modp == NULL) { - sdbg("ERROR: Failed to find module %s: %d\n", modulename, ret); + serr("ERROR: Failed to find module %s: %d\n", modulename, ret); ret = -ENOENT; goto errout_with_lock; } @@ -105,7 +105,7 @@ int rmmod(FAR const char *modulename) if (ret < 0) { - sdbg("ERROR: Failed to uninitialize the module: %d\n", ret); + serr("ERROR: Failed to uninitialize the module: %d\n", ret); goto errout_with_lock; } @@ -140,7 +140,7 @@ int rmmod(FAR const char *modulename) ret = mod_registry_del(modp); if (ret < 0) { - sdbg("ERROR: Failed to remove the module from the registry: %d\n", ret); + serr("ERROR: Failed to remove the module from the registry: %d\n", ret); goto errout_with_lock; } diff --git a/sched/module/mod_sections.c b/sched/module/mod_sections.c index dcdb4de9918bf1f28d761717396e868a7e0cfa77..9aa8cb43fd1560543955a2dd89e5bcbe2dfcb0e0 100644 --- a/sched/module/mod_sections.c +++ b/sched/module/mod_sections.c @@ -85,7 +85,7 @@ static inline int mod_sectname(FAR struct mod_loadinfo_s *loadinfo, shstrndx = loadinfo->ehdr.e_shstrndx; if (shstrndx == SHN_UNDEF) { - sdbg("No section header string table\n"); + serr("ERROR: No section header string table\n"); return -EINVAL; } @@ -118,7 +118,7 @@ static inline int mod_sectname(FAR struct mod_loadinfo_s *loadinfo, { if (loadinfo->filelen <= offset) { - sdbg("At end of file\n"); + serr("ERROR: At end of file\n"); return -EINVAL; } @@ -131,7 +131,7 @@ static inline int mod_sectname(FAR struct mod_loadinfo_s *loadinfo, ret = mod_read(loadinfo, buffer, readlen, offset); if (ret < 0) { - sdbg("Failed to read section name\n"); + serr("ERROR: Failed to read section name: %d\n", ret); return ret; } @@ -151,7 +151,7 @@ static inline int mod_sectname(FAR struct mod_loadinfo_s *loadinfo, ret = mod_reallocbuffer(loadinfo, CONFIG_MODULE_BUFFERINCR); if (ret < 0) { - sdbg("mod_reallocbuffer failed: %d\n", ret); + serr("ERROR: mod_reallocbuffer failed: %d\n", ret); return ret; } } @@ -188,7 +188,7 @@ int mod_loadshdrs(FAR struct mod_loadinfo_s *loadinfo) if (loadinfo->ehdr.e_shnum < 1) { - sdbg("No sections(?)\n"); + serr("ERROR: No sections(?)\n"); return -EINVAL; } @@ -197,7 +197,7 @@ int mod_loadshdrs(FAR struct mod_loadinfo_s *loadinfo) shdrsize = (size_t)loadinfo->ehdr.e_shentsize * (size_t)loadinfo->ehdr.e_shnum; if (loadinfo->ehdr.e_shoff + shdrsize > loadinfo->filelen) { - sdbg("Insufficent space in file for section header table\n"); + serr("ERROR: Insufficent space in file for section header table\n"); return -ESPIPE; } @@ -206,7 +206,7 @@ int mod_loadshdrs(FAR struct mod_loadinfo_s *loadinfo) loadinfo->shdr = (FAR FAR Elf32_Shdr *)kmm_malloc(shdrsize); if (!loadinfo->shdr) { - sdbg("Failed to allocate the section header table. Size: %ld\n", + serr("ERROR: Failed to allocate the section header table. Size: %ld\n", (long)shdrsize); return -ENOMEM; } @@ -217,7 +217,7 @@ int mod_loadshdrs(FAR struct mod_loadinfo_s *loadinfo) loadinfo->ehdr.e_shoff); if (ret < 0) { - sdbg("Failed to read section header table: %d\n", ret); + serr("ERROR: Failed to read section header table: %d\n", ret); } return ret; @@ -256,13 +256,13 @@ int mod_findsection(FAR struct mod_loadinfo_s *loadinfo, ret = mod_sectname(loadinfo, shdr); if (ret < 0) { - sdbg("mod_sectname failed: %d\n", ret); + serr("ERROR: mod_sectname failed: %d\n", ret); return ret; } /* Check if the name of this section is 'sectname' */ - svdbg("%d. Comparing \"%s\" and .\"%s\"\n", + sinfo("%d. Comparing \"%s\" and .\"%s\"\n", i, loadinfo->iobuffer, sectname); if (strcmp((FAR const char *)loadinfo->iobuffer, sectname) == 0) diff --git a/sched/module/mod_symbols.c b/sched/module/mod_symbols.c index bc91a426e3e45d3471c056d9b83cd12a4a0d4da1..3a42f314f302da716e8725a55ae2011e77690e11 100644 --- a/sched/module/mod_symbols.c +++ b/sched/module/mod_symbols.c @@ -93,7 +93,7 @@ static int mod_symname(FAR struct mod_loadinfo_s *loadinfo, if (sym->st_name == 0) { - sdbg("Symbol has no name\n"); + serr("ERROR: Symbol has no name\n"); return -ESRCH; } @@ -112,7 +112,7 @@ static int mod_symname(FAR struct mod_loadinfo_s *loadinfo, { if (loadinfo->filelen <= offset) { - sdbg("At end of file\n"); + serr("ERROR: At end of file\n"); return -EINVAL; } @@ -125,7 +125,7 @@ static int mod_symname(FAR struct mod_loadinfo_s *loadinfo, ret = mod_read(loadinfo, buffer, readlen, offset); if (ret < 0) { - sdbg("mod_read failed: %d\n", ret); + serr("ERROR: mod_read failed: %d\n", ret); return ret; } @@ -145,7 +145,7 @@ static int mod_symname(FAR struct mod_loadinfo_s *loadinfo, ret = mod_reallocbuffer(loadinfo, CONFIG_MODULE_BUFFERINCR); if (ret < 0) { - sdbg("mod_reallocbuffer failed: %d\n", ret); + serr("ERROR: mod_reallocbuffer failed: %d\n", ret); return ret; } } @@ -191,7 +191,7 @@ int mod_findsymtab(FAR struct mod_loadinfo_s *loadinfo) if (loadinfo->symtabidx == 0) { - sdbg("No symbols in ELF file\n"); + serr("ERROR: No symbols in ELF file\n"); return -EINVAL; } @@ -225,7 +225,7 @@ int mod_readsym(FAR struct mod_loadinfo_s *loadinfo, int index, if (index < 0 || index > (symtab->sh_size / sizeof(Elf32_Sym))) { - sdbg("Bad relocation symbol index: %d\n", index); + serr("ERROR: Bad relocation symbol index: %d\n", index); return -EINVAL; } @@ -273,7 +273,7 @@ int mod_symvalue(FAR struct mod_loadinfo_s *loadinfo, FAR Elf32_Sym *sym) { /* NuttX ELF modules should be compiled with -fno-common. */ - sdbg("SHN_COMMON: Re-compile with -fno-common\n"); + serr("ERROR: SHN_COMMON: Re-compile with -fno-common\n"); return -ENOSYS; } @@ -281,7 +281,7 @@ int mod_symvalue(FAR struct mod_loadinfo_s *loadinfo, FAR Elf32_Sym *sym) { /* st_value already holds the correct value */ - svdbg("SHN_ABS: st_value=%08lx\n", (long)sym->st_value); + sinfo("SHN_ABS: st_value=%08lx\n", (long)sym->st_value); return OK; } @@ -298,7 +298,7 @@ int mod_symvalue(FAR struct mod_loadinfo_s *loadinfo, FAR Elf32_Sym *sym) * indicate the nameless symbol. */ - sdbg("SHN_UNDEF: Failed to get symbol name: %d\n", ret); + serr("ERROR: SHN_UNDEF: Failed to get symbol name: %d\n", ret); return ret; } @@ -315,13 +315,14 @@ int mod_symvalue(FAR struct mod_loadinfo_s *loadinfo, FAR Elf32_Sym *sym) #endif if (!symbol) { - sdbg("SHN_UNDEF: Exported symbol \"%s\" not found\n", loadinfo->iobuffer); + serr("ERROR: SHN_UNDEF: Exported symbol \"%s\" not found\n", + loadinfo->iobuffer); return -ENOENT; } /* Yes... add the exported symbol value to the ELF symbol table entry */ - svdbg("SHN_ABS: name=%s %08x+%08x=%08x\n", + sinfo("SHN_ABS: name=%s %08x+%08x=%08x\n", loadinfo->iobuffer, sym->st_value, symbol->sym_value, sym->st_value + symbol->sym_value); @@ -333,7 +334,7 @@ int mod_symvalue(FAR struct mod_loadinfo_s *loadinfo, FAR Elf32_Sym *sym) { secbase = loadinfo->shdr[sym->st_shndx].sh_addr; - svdbg("Other: %08x+%08x=%08x\n", + sinfo("Other: %08x+%08x=%08x\n", sym->st_value, secbase, sym->st_value + secbase); sym->st_value += secbase; diff --git a/sched/module/mod_verify.c b/sched/module/mod_verify.c index a46d96f73d885d545ba50c890f0d73e587107ab6..5ad4d745962b39f2335e9ff1acfb1284bac6ea27 100644 --- a/sched/module/mod_verify.c +++ b/sched/module/mod_verify.c @@ -79,7 +79,7 @@ int mod_verifyheader(FAR const Elf32_Ehdr *ehdr) { if (!ehdr) { - sdbg("NULL ELF header!"); + serr("ERROR: NULL ELF header!"); return -ENOEXEC; } @@ -87,7 +87,7 @@ int mod_verifyheader(FAR const Elf32_Ehdr *ehdr) if (memcmp(ehdr->e_ident, g_modmagic, EI_MAGIC_SIZE) != 0) { - svdbg("Not ELF magic {%02x, %02x, %02x, %02x}\n", + sinfo("Not ELF magic {%02x, %02x, %02x, %02x}\n", ehdr->e_ident[0], ehdr->e_ident[1], ehdr->e_ident[2], ehdr->e_ident[3]); return -ENOEXEC; } @@ -96,7 +96,7 @@ int mod_verifyheader(FAR const Elf32_Ehdr *ehdr) if (ehdr->e_type != ET_REL) { - sdbg("Not a relocatable file: e_type=%d\n", ehdr->e_type); + serr("ERROR: Not a relocatable file: e_type=%d\n", ehdr->e_type); return -EINVAL; } @@ -104,7 +104,7 @@ int mod_verifyheader(FAR const Elf32_Ehdr *ehdr) if (up_checkarch(ehdr)) { - sdbg("Not a supported architecture\n"); + serr("ERROR: Not a supported architecture\n"); return -ENOEXEC; } diff --git a/sched/paging/pg_miss.c b/sched/paging/pg_miss.c index 945678f99a98b11c7f8a4c01dc6999a441e39cdd..c3eb14cb7ca9333914de19f1da940f7d876a177e 100644 --- a/sched/paging/pg_miss.c +++ b/sched/paging/pg_miss.c @@ -132,7 +132,7 @@ void pg_miss(void) * always present in memory. */ - pglldbg("Blocking TCB: %p PID: %d\n", ftcb, ftcb->pid); + pginfo("Blocking TCB: %p PID: %d\n", ftcb, ftcb->pid); DEBUGASSERT(g_pgworker != ftcb->pid); /* Block the currently executing task @@ -159,8 +159,8 @@ void pg_miss(void) { /* Reprioritize the page fill worker thread */ - pgllvdbg("New worker priority. %d->%d\n", - wtcb->sched_priority, ftcb->sched_priority); + pginfo("New worker priority. %d->%d\n", + wtcb->sched_priority, ftcb->sched_priority); sched_setpriority(wtcb, ftcb->sched_priority); } @@ -171,7 +171,7 @@ void pg_miss(void) if (!g_pftcb) { - pglldbg("Signaling worker. PID: %d\n", g_pgworker); + pginfo("Signaling worker. PID: %d\n", g_pgworker); kill(g_pgworker, SIGWORK); } } diff --git a/sched/paging/pg_worker.c b/sched/paging/pg_worker.c index 08c94fd17c7f32fba45cf156e53dd4526c7e0bf9..003897e52f7d550f5b182b5b5d199ffa843850bf 100644 --- a/sched/paging/pg_worker.c +++ b/sched/paging/pg_worker.c @@ -155,7 +155,7 @@ static void pg_callback(FAR struct tcb_s *tcb, int result) { /* Verify that g_pftcb is non-NULL */ - pgllvdbg("g_pftcb: %p\n", g_pftcb); + pginfo("g_pftcb: %p\n", g_pftcb); if (g_pftcb) { FAR struct tcb_s *htcb = (FAR struct tcb_s *)g_waitingforfill.head; @@ -181,8 +181,8 @@ static void pg_callback(FAR struct tcb_s *tcb, int result) if (priority > wtcb->sched_priority) { - pgllvdbg("New worker priority. %d->%d\n", - wtcb->sched_priority, priority); + pginfo("New worker priority. %d->%d\n", + wtcb->sched_priority, priority); sched_setpriority(wtcb, priority); } @@ -198,7 +198,7 @@ static void pg_callback(FAR struct tcb_s *tcb, int result) /* Signal the page fill worker thread (in any event) */ - pglldbg("Signaling worker. PID: %d\n", g_pgworker); + pginfo("Signaling worker. PID: %d\n", g_pgworker); kill(g_pgworker, SIGWORK); } #endif @@ -246,7 +246,7 @@ static inline bool pg_dequeue(void) /* Remove the TCB from the head of the list (if any) */ g_pftcb = (FAR struct tcb_s *)dq_remfirst((dq_queue_t *)&g_waitingforfill); - pgllvdbg("g_pftcb: %p\n", g_pftcb); + pginfo("g_pftcb: %p\n", g_pftcb); if (g_pftcb != NULL) { /* Call the architecture-specific function up_checkmapping() to see if @@ -292,8 +292,8 @@ static inline bool pg_dequeue(void) /* Reduce the priority of the page fill worker thread */ - pgllvdbg("New worker priority. %d->%d\n", - wtcb->sched_priority, priority); + pginfo("New worker priority. %d->%d\n", + wtcb->sched_priority, priority); sched_setpriority(wtcb, priority); } @@ -308,7 +308,7 @@ static inline bool pg_dequeue(void) * virtual address space -- just restart it. */ - pglldbg("Restarting TCB: %p\n", g_pftcb); + pginfo("Restarting TCB: %p\n", g_pftcb); up_unblock_task(g_pftcb); } } @@ -365,7 +365,7 @@ static inline bool pg_startfill(void) * a page in-use, un-map it, and make it available. */ - pgllvdbg("Call up_allocpage(%p)\n", g_pftcb); + pginfo("Call up_allocpage(%p)\n", g_pftcb); result = up_allocpage(g_pftcb, &vpage); DEBUGASSERT(result == OK); @@ -382,7 +382,7 @@ static inline bool pg_startfill(void) * status of the fill will be provided by return value from up_fillpage(). */ - pgllvdbg("Call up_fillpage(%p)\n", g_pftcb); + pginfo("Call up_fillpage(%p)\n", g_pftcb); result = up_fillpage(g_pftcb, vpage); DEBUGASSERT(result == OK); #else @@ -395,7 +395,7 @@ static inline bool pg_startfill(void) * This callback will probably from interrupt level. */ - pgllvdbg("Call up_fillpage(%p)\n", g_pftcb); + pginfo("Call up_fillpage(%p)\n", g_pftcb); result = up_fillpage(g_pftcb, vpage, pg_callback); DEBUGASSERT(result == OK); @@ -422,7 +422,7 @@ static inline bool pg_startfill(void) return true; } - pglldbg("Queue empty\n"); + pginfo("Queue empty\n"); return false; } @@ -454,8 +454,8 @@ static inline void pg_alldone(void) { FAR struct tcb_s *wtcb = this_task(); g_pftcb = NULL; - pgllvdbg("New worker priority. %d->%d\n", - wtcb->sched_priority, CONFIG_PAGING_DEFPRIO); + pginfo("New worker priority. %d->%d\n", + wtcb->sched_priority, CONFIG_PAGING_DEFPRIO); sched_setpriority(wtcb, CONFIG_PAGING_DEFPRIO); } @@ -490,7 +490,7 @@ static inline void pg_fillcomplete(void) * received the fill ready-to-run. */ - pglldbg("Restarting TCB: %p\n", g_pftcb); + pginfo("Restarting TCB: %p\n", g_pftcb); up_unblock_task(g_pftcb); } @@ -532,7 +532,7 @@ int pg_worker(int argc, char *argv[]) * fill completions should occur while this thread sleeps. */ - pglldbg("Started\n"); + pginfo("Started\n"); (void)up_irq_save(); for (; ; ) { @@ -580,7 +580,7 @@ int pg_worker(int argc, char *argv[]) * task that was blocked waiting for this page fill. */ - pglldbg("Restarting TCB: %p\n", g_pftcb); + pginfo("Restarting TCB: %p\n", g_pftcb); up_unblock_task(g_pftcb); /* Yes .. Start the next asynchronous fill. Check the return @@ -588,7 +588,7 @@ int pg_worker(int argc, char *argv[]) * no fill was started). */ - pgllvdbg("Calling pg_startfill\n"); + pginfo("Calling pg_startfill\n"); if (!pg_startfill()) { /* No fill was started. This can mean only that all queued @@ -596,7 +596,7 @@ int pg_worker(int argc, char *argv[]) * nothing more to do. */ - pgllvdbg("Call pg_alldone()\n"); + pginfo("Call pg_alldone()\n"); pg_alldone(); } } @@ -608,7 +608,7 @@ int pg_worker(int argc, char *argv[]) #ifdef CONFIG_PAGING_TIMEOUT_TICKS else { - lldbg("Timeout!\n"); + pgerr("ERROR: Timeout!\n"); ASSERT(clock_systimer() - g_starttime < CONFIG_PAGING_TIMEOUT_TICKS); } #endif @@ -626,7 +626,7 @@ int pg_worker(int argc, char *argv[]) * g_pftcb). */ - pgllvdbg("Calling pg_startfill\n"); + pginfo("Calling pg_startfill\n"); (void)pg_startfill(); } #else @@ -641,7 +641,7 @@ int pg_worker(int argc, char *argv[]) * (false means that no fill was perforemd). */ - pgllvdbg("Calling pg_startfill\n"); + pginfo("Calling pg_startfill\n"); if (!pg_startfill()) { /* Break out of the loop -- there is nothing more to do */ @@ -656,13 +656,13 @@ int pg_worker(int argc, char *argv[]) * returns true. */ - pgllvdbg("Restarting TCB: %p\n", g_pftcb); + pginfo("Restarting TCB: %p\n", g_pftcb); up_unblock_task(g_pftcb); } /* All queued fills have been processed */ - pgllvdbg("Call pg_alldone()\n"); + pginfo("Call pg_alldone()\n"); pg_alldone(); #endif } diff --git a/sched/pthread/pthread_completejoin.c b/sched/pthread/pthread_completejoin.c index 2d9f3530e5987ac3a4bab672b1a42b53a4a85447..b516c9defd0f53c594815654e0b59e25e0410d1d 100644 --- a/sched/pthread/pthread_completejoin.c +++ b/sched/pthread/pthread_completejoin.c @@ -68,7 +68,7 @@ static bool pthread_notifywaiters(FAR struct join_s *pjoin) int ntasks_waiting; int status; - svdbg("pjoin=0x%p\n", pjoin); + sinfo("pjoin=0x%p\n", pjoin); /* Are any tasks waiting for our exit value? */ @@ -205,7 +205,7 @@ int pthread_completejoin(pid_t pid, FAR void *exit_value) FAR struct task_group_s *group = task_getgroup(pid); FAR struct join_s *pjoin; - svdbg("pid=%d exit_value=%p group=%p\n", pid, exit_value, group); + sinfo("pid=%d exit_value=%p group=%p\n", pid, exit_value, group); DEBUGASSERT(group); /* First, find thread's structure in the private data set. */ @@ -214,7 +214,7 @@ int pthread_completejoin(pid_t pid, FAR void *exit_value) pjoin = pthread_findjoininfo(group, pid); if (!pjoin) { - sdbg("Could not find join info, pid=%d\n", pid); + serr("ERROR: Could not find join info, pid=%d\n", pid); (void)pthread_givesemaphore(&group->tg_joinsem); return ERROR; } @@ -271,7 +271,7 @@ int pthread_completejoin(pid_t pid, FAR void *exit_value) void pthread_destroyjoin(FAR struct task_group_s *group, FAR struct join_s *pjoin) { - sdbg("pjoin=0x%p\n", pjoin); + sinfo("pjoin=0x%p\n", pjoin); /* Remove the join info from the set of joins */ diff --git a/sched/pthread/pthread_condbroadcast.c b/sched/pthread/pthread_condbroadcast.c index a86c3a8a14681e9abcc99e603a0c943387fd86c8..35427ad48a41a2dbd413b2e04c88899f38812121 100644 --- a/sched/pthread/pthread_condbroadcast.c +++ b/sched/pthread/pthread_condbroadcast.c @@ -71,7 +71,7 @@ int pthread_cond_broadcast(FAR pthread_cond_t *cond) int ret = OK; int sval; - sdbg("cond=0x%p\n", cond); + sinfo("cond=0x%p\n", cond); if (!cond) { @@ -118,7 +118,7 @@ int pthread_cond_broadcast(FAR pthread_cond_t *cond) sched_unlock(); } - sdbg("Returning %d\n", ret); + sinfo("Returning %d\n", ret); return ret; } diff --git a/sched/pthread/pthread_conddestroy.c b/sched/pthread/pthread_conddestroy.c index 2584e8dbaee298d9f5d76223f510df0a3804ce6f..bff0c3c28b6c03dd84e9029d36561a8d34efe408 100644 --- a/sched/pthread/pthread_conddestroy.c +++ b/sched/pthread/pthread_conddestroy.c @@ -68,7 +68,7 @@ int pthread_cond_destroy(FAR pthread_cond_t *cond) { int ret = OK; - sdbg("cond=0x%p\n", cond); + sinfo("cond=0x%p\n", cond); if (!cond) { @@ -82,7 +82,7 @@ int pthread_cond_destroy(FAR pthread_cond_t *cond) ret = EINVAL; } - sdbg("Returning %d\n", ret); + sinfo("Returning %d\n", ret); return ret; } diff --git a/sched/pthread/pthread_condinit.c b/sched/pthread/pthread_condinit.c index a73811e0782ac1e0580d1977d032d46226e157cb..73a6423c697a7b98c00bb125f98915aa4fcc8cb4 100644 --- a/sched/pthread/pthread_condinit.c +++ b/sched/pthread/pthread_condinit.c @@ -69,7 +69,7 @@ int pthread_cond_init(FAR pthread_cond_t *cond, FAR const pthread_condattr_t *at { int ret = OK; - sdbg("cond=0x%p attr=0x%p\n", cond, attr); + sinfo("cond=0x%p attr=0x%p\n", cond, attr); if (!cond) { @@ -85,7 +85,7 @@ int pthread_cond_init(FAR pthread_cond_t *cond, FAR const pthread_condattr_t *at ret = EINVAL; } - sdbg("Returning %d\n", ret); + sinfo("Returning %d\n", ret); return ret; } diff --git a/sched/pthread/pthread_condsignal.c b/sched/pthread/pthread_condsignal.c index b84ef5d55ca8368952032b03d29597157d1122de..8936572ac5cac8bb355f6329676a883b5957ca0c 100644 --- a/sched/pthread/pthread_condsignal.c +++ b/sched/pthread/pthread_condsignal.c @@ -70,7 +70,7 @@ int pthread_cond_signal(FAR pthread_cond_t *cond) int ret = OK; int sval; - sdbg("cond=0x%p\n", cond); + sinfo("cond=0x%p\n", cond); if (!cond) { @@ -101,16 +101,16 @@ int pthread_cond_signal(FAR pthread_cond_t *cond) * operation that will guarantee this to be so. */ - sdbg("sval=%d\n", sval); + sinfo("sval=%d\n", sval); if (sval < 0) { - sdbg("Signalling...\n"); + sinfo("Signalling...\n"); ret = pthread_givesemaphore((FAR sem_t *)&cond->sem); } } } - sdbg("Returning %d\n", ret); + sinfo("Returning %d\n", ret); return ret; } diff --git a/sched/pthread/pthread_condtimedwait.c b/sched/pthread/pthread_condtimedwait.c index 0e8443b2fb160316a10ef0f5dad0252b9d16082d..7950c5b5fc45f046def501e17cf1265d20c6dc9e 100644 --- a/sched/pthread/pthread_condtimedwait.c +++ b/sched/pthread/pthread_condtimedwait.c @@ -174,7 +174,7 @@ int pthread_cond_timedwait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex, int ret = OK; int status; - sdbg("cond=0x%p mutex=0x%p abstime=0x%p\n", cond, mutex, abstime); + sinfo("cond=0x%p mutex=0x%p abstime=0x%p\n", cond, mutex, abstime); DEBUGASSERT(rtcb->waitdog == NULL); @@ -212,7 +212,7 @@ int pthread_cond_timedwait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex, } else { - sdbg("Give up mutex...\n"); + sinfo("Give up mutex...\n"); /* We must disable pre-emption and interrupts here so that * the time stays valid until the wait begins. This adds @@ -292,7 +292,7 @@ int pthread_cond_timedwait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex, if (get_errno() == EINTR) { - sdbg("Timedout!\n"); + serr("ERROR: Timedout!\n"); ret = ETIMEDOUT; } else @@ -312,7 +312,7 @@ int pthread_cond_timedwait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex, /* Reacquire the mutex (retaining the ret). */ - sdbg("Re-locking...\n"); + sinfo("Re-locking...\n"); status = pthread_takesemaphore((FAR sem_t *)&mutex->sem); if (!status) { @@ -338,7 +338,7 @@ int pthread_cond_timedwait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex, } } - sdbg("Returning %d\n", ret); + sinfo("Returning %d\n", ret); return ret; } diff --git a/sched/pthread/pthread_condwait.c b/sched/pthread/pthread_condwait.c index d60aece8ef8071097e12740577eacb7dac4db260..a9ad2ba91cfc0c1832f6bcee2e0038761227ec13 100644 --- a/sched/pthread/pthread_condwait.c +++ b/sched/pthread/pthread_condwait.c @@ -71,7 +71,7 @@ int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex) { int ret; - sdbg("cond=0x%p mutex=0x%p\n", cond, mutex); + sinfo("cond=0x%p mutex=0x%p\n", cond, mutex); /* Make sure that non-NULL references were provided. */ @@ -90,7 +90,7 @@ int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex) { /* Give up the mutex */ - sdbg("Give up mutex / take cond\n"); + sinfo("Give up mutex / take cond\n"); sched_lock(); mutex->pid = -1; @@ -103,7 +103,7 @@ int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex) /* Reacquire the mutex */ - sdbg("Reacquire mutex...\n"); + sinfo("Reacquire mutex...\n"); ret |= pthread_takesemaphore((FAR sem_t *)&mutex->sem); if (!ret) { @@ -111,7 +111,7 @@ int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex) } } - sdbg("Returning %d\n", ret); + sinfo("Returning %d\n", ret); return ret; } diff --git a/sched/pthread/pthread_create.c b/sched/pthread/pthread_create.c index 0869c56ed895481bc6ebdb6fb8c675aa07ee5061..487827fbcb0a05cd0fa5ac351426db299ed5adcc 100644 --- a/sched/pthread/pthread_create.c +++ b/sched/pthread/pthread_create.c @@ -249,7 +249,7 @@ int pthread_create(FAR pthread_t *thread, FAR const pthread_attr_t *attr, ptcb = (FAR struct pthread_tcb_s *)kmm_zalloc(sizeof(struct pthread_tcb_s)); if (!ptcb) { - sdbg("ERROR: Failed to allocate TCB\n"); + serr("ERROR: Failed to allocate TCB\n"); return ENOMEM; } @@ -282,7 +282,7 @@ int pthread_create(FAR pthread_t *thread, FAR const pthread_attr_t *attr, pjoin = (FAR struct join_s *)kmm_zalloc(sizeof(struct join_s)); if (!pjoin) { - sdbg("ERROR: Failed to allocate join\n"); + serr("ERROR: Failed to allocate join\n"); errcode = ENOMEM; goto errout_with_tcb; } diff --git a/sched/pthread/pthread_detach.c b/sched/pthread/pthread_detach.c index 6bc3585b487dbfddbfd531558882b268460e8091..0d165e2d23bf0773dc54dee271941cb65e52275b 100644 --- a/sched/pthread/pthread_detach.c +++ b/sched/pthread/pthread_detach.c @@ -82,7 +82,7 @@ int pthread_detach(pthread_t thread) FAR struct join_s *pjoin; int ret; - sdbg("Thread=%d group=%p\n", thread, group); + sinfo("Thread=%d group=%p\n", thread, group); DEBUGASSERT(group); /* Find the entry associated with this pthread. */ @@ -91,7 +91,7 @@ int pthread_detach(pthread_t thread) pjoin = pthread_findjoininfo(group, (pid_t)thread); if (!pjoin) { - sdbg("Could not find thread entry\n"); + serr("ERROR: Could not find thread entry\n"); ret = EINVAL; } else @@ -121,6 +121,6 @@ int pthread_detach(pthread_t thread) (void)pthread_givesemaphore(&group->tg_joinsem); - sdbg("Returning %d\n", ret); + sinfo("Returning %d\n", ret); return ret; } diff --git a/sched/pthread/pthread_exit.c b/sched/pthread/pthread_exit.c index d742ef8fdd68e118f7beed9faf5beda44f08419b..15b6240ee79ace4c1e217b9c8aa443f8cba50923 100644 --- a/sched/pthread/pthread_exit.c +++ b/sched/pthread/pthread_exit.c @@ -78,7 +78,7 @@ void pthread_exit(FAR void *exit_value) FAR struct tcb_s *tcb = this_task(); int status; - sdbg("exit_value=%p\n", exit_value); + sinfo("exit_value=%p\n", exit_value); /* Block any signal actions that would awaken us while were * are performing the JOIN handshake. diff --git a/sched/pthread/pthread_getaffinity.c b/sched/pthread/pthread_getaffinity.c index 04d19219105bb7c85996f95ba94f1b6cb0cdf8bd..817aa11a206ff0b556f72abdb4fa571f3d8be579 100644 --- a/sched/pthread/pthread_getaffinity.c +++ b/sched/pthread/pthread_getaffinity.c @@ -80,8 +80,8 @@ int pthread_getaffinity_np(pthread_t thread, size_t cpusetsize, { int ret; - sdbg("thread ID=%d cpusetsize=%d cpuset=%p\n", - (int)thread, (int)cpusetsize, cpusetsize); + sinfo("thread ID=%d cpusetsize=%d cpuset=%p\n", + (int)thread, (int)cpusetsize, cpusetsize); DEBUGASSERT(thread > 0 && cpusetsize == sizeof(cpu_set_t) && cpuset != NULL); diff --git a/sched/pthread/pthread_getschedparam.c b/sched/pthread/pthread_getschedparam.c index fbb1be26b0a256bc6ba6186696850ee55a6109dd..a3fe352c0cfacfa97cda5733085a7b4f032aeb38 100644 --- a/sched/pthread/pthread_getschedparam.c +++ b/sched/pthread/pthread_getschedparam.c @@ -88,7 +88,7 @@ int pthread_getschedparam(pthread_t thread, FAR int *policy, { int ret; - sdbg("Thread ID=%d policy=0x%p param=0x%p\n", thread, policy, param); + sinfo("Thread ID=%d policy=0x%p param=0x%p\n", thread, policy, param); if (!policy || !param) { @@ -113,7 +113,7 @@ int pthread_getschedparam(pthread_t thread, FAR int *policy, } } - sdbg("Returning %d\n", ret); + sinfo("Returning %d\n", ret); return ret; } diff --git a/sched/pthread/pthread_join.c b/sched/pthread/pthread_join.c index 9bb9fa3fa0dde5f610e16d16e497b45d313b3458..90628bb444506d8c4289d60268510a12604bbc3c 100644 --- a/sched/pthread/pthread_join.c +++ b/sched/pthread/pthread_join.c @@ -87,7 +87,7 @@ int pthread_join(pthread_t thread, FAR pthread_addr_t *pexit_value) FAR struct join_s *pjoin; int ret; - sdbg("thread=%d group=%p\n", thread, group); + sinfo("thread=%d group=%p\n", thread, group); DEBUGASSERT(group); /* First make sure that this is not an attempt to join to @@ -121,7 +121,7 @@ int pthread_join(pthread_t thread, FAR pthread_addr_t *pexit_value) FAR struct tcb_s *tcb = sched_gettcb((pthread_t)thread); - sdbg("Could not find thread data\n"); + serr("ERROR: Could not find thread data\n"); /* Case (1) or (3) -- we can't tell which. Assume (3) */ @@ -159,19 +159,19 @@ int pthread_join(pthread_t thread, FAR pthread_addr_t *pexit_value) if (pjoin->terminated) { - sdbg("Thread has terminated\n"); + sinfo("Thread has terminated\n"); /* Get the thread exit value from the terminated thread. */ if (pexit_value) { - sdbg("exit_value=0x%p\n", pjoin->exit_value); + sinfo("exit_value=0x%p\n", pjoin->exit_value); *pexit_value = pjoin->exit_value; } } else { - sdbg("Thread is still running\n"); + sinfo("Thread is still running\n"); /* Relinquish the data set semaphore. Since pre-emption is * disabled, we can be certain that no task has the @@ -195,7 +195,7 @@ int pthread_join(pthread_t thread, FAR pthread_addr_t *pexit_value) if (pexit_value) { *pexit_value = pjoin->exit_value; - sdbg("exit_value=0x%p\n", pjoin->exit_value); + sinfo("exit_value=0x%p\n", pjoin->exit_value); } /* Post the thread's data semaphore so that the exiting thread @@ -230,6 +230,6 @@ int pthread_join(pthread_t thread, FAR pthread_addr_t *pexit_value) ret = OK; } - sdbg("Returning %d\n", ret); + sinfo("Returning %d\n", ret); return ret; } diff --git a/sched/pthread/pthread_mutexdestroy.c b/sched/pthread/pthread_mutexdestroy.c index d7d5e7c898ad67df811c8f5bd8b31e12bf741bd9..a6b945f67022f370ef28968357162c12fc2fe2e0 100644 --- a/sched/pthread/pthread_mutexdestroy.c +++ b/sched/pthread/pthread_mutexdestroy.c @@ -72,7 +72,7 @@ int pthread_mutex_destroy(FAR pthread_mutex_t *mutex) int ret = OK; int status; - sdbg("mutex=0x%p\n", mutex); + sinfo("mutex=0x%p\n", mutex); if (!mutex) { @@ -106,6 +106,6 @@ int pthread_mutex_destroy(FAR pthread_mutex_t *mutex) sched_unlock(); } - sdbg("Returning %d\n", ret); + sinfo("Returning %d\n", ret); return ret; } diff --git a/sched/pthread/pthread_mutexinit.c b/sched/pthread/pthread_mutexinit.c index c4355d41bd949ebcfc8c569aa48d1dc7ef6e7bcd..31d18e2f466db80fec32d6509cb5af4f5d281511 100644 --- a/sched/pthread/pthread_mutexinit.c +++ b/sched/pthread/pthread_mutexinit.c @@ -75,7 +75,7 @@ int pthread_mutex_init(FAR pthread_mutex_t *mutex, FAR const pthread_mutexattr_t int ret = OK; int status; - sdbg("mutex=0x%p attr=0x%p\n", mutex, attr); + sinfo("mutex=0x%p attr=0x%p\n", mutex, attr); if (!mutex) { @@ -113,6 +113,6 @@ int pthread_mutex_init(FAR pthread_mutex_t *mutex, FAR const pthread_mutexattr_t #endif } - sdbg("Returning %d\n", ret); + sinfo("Returning %d\n", ret); return ret; } diff --git a/sched/pthread/pthread_mutexlock.c b/sched/pthread/pthread_mutexlock.c index 85e16adc473f71322898e9488f4c457d9138b205..ebd650df6fb0732fc5b59532386585117c732c33 100644 --- a/sched/pthread/pthread_mutexlock.c +++ b/sched/pthread/pthread_mutexlock.c @@ -106,7 +106,7 @@ int pthread_mutex_lock(FAR pthread_mutex_t *mutex) int mypid = (int)getpid(); int ret = OK; - sdbg("mutex=0x%p\n", mutex); + sinfo("mutex=0x%p\n", mutex); if (!mutex) { @@ -140,7 +140,7 @@ int pthread_mutex_lock(FAR pthread_mutex_t *mutex) * is like PTHREAD_MUTEX_ERRORCHECK) */ - sdbg("Returning EDEADLK\n"); + serr("ERROR: Returning EDEADLK\n"); ret = EDEADLK; } } @@ -166,7 +166,7 @@ int pthread_mutex_lock(FAR pthread_mutex_t *mutex) sched_unlock(); } - sdbg("Returning %d\n", ret); + sinfo("Returning %d\n", ret); return ret; } diff --git a/sched/pthread/pthread_mutextrylock.c b/sched/pthread/pthread_mutextrylock.c index 249dd28d8c770a4c69c17dde9b8920271aa41268..825cb992a143f903ef6bb058c09b274cea8adcdd 100644 --- a/sched/pthread/pthread_mutextrylock.c +++ b/sched/pthread/pthread_mutextrylock.c @@ -85,7 +85,7 @@ int pthread_mutex_trylock(FAR pthread_mutex_t *mutex) { int ret = OK; - sdbg("mutex=0x%p\n", mutex); + sinfo("mutex=0x%p\n", mutex); if (!mutex) { @@ -149,7 +149,7 @@ int pthread_mutex_trylock(FAR pthread_mutex_t *mutex) sched_unlock(); } - sdbg("Returning %d\n", ret); + sinfo("Returning %d\n", ret); return ret; } diff --git a/sched/pthread/pthread_mutexunlock.c b/sched/pthread/pthread_mutexunlock.c index 3b508940509d91f1394b288b01089235b7f8db92..078d9094b93bfa6fb2c52a64d081cc4b163bbc15 100644 --- a/sched/pthread/pthread_mutexunlock.c +++ b/sched/pthread/pthread_mutexunlock.c @@ -82,7 +82,7 @@ int pthread_mutex_unlock(FAR pthread_mutex_t *mutex) { int ret = OK; - sdbg("mutex=0x%p\n", mutex); + sinfo("mutex=0x%p\n", mutex); if (!mutex) { @@ -102,7 +102,7 @@ int pthread_mutex_unlock(FAR pthread_mutex_t *mutex) { /* No... return an error (default behavior is like PTHREAD_MUTEX_ERRORCHECK) */ - sdbg("Holder=%d returning EPERM\n", mutex->pid); + serr("ERROR: Holder=%d returning EPERM\n", mutex->pid); ret = EPERM; } @@ -137,7 +137,7 @@ int pthread_mutex_unlock(FAR pthread_mutex_t *mutex) sched_unlock(); } - sdbg("Returning %d\n", ret); + sinfo("Returning %d\n", ret); return ret; } diff --git a/sched/pthread/pthread_setaffinity.c b/sched/pthread/pthread_setaffinity.c index 3948bf9025833181f4375409e824d8a2a409cfd5..cf8ccf639fd4d3c90f5f3253bedd66affdc3a005 100644 --- a/sched/pthread/pthread_setaffinity.c +++ b/sched/pthread/pthread_setaffinity.c @@ -82,8 +82,8 @@ int pthread_setaffinity_np(pthread_t thread, size_t cpusetsize, { int ret; - sdbg("thread ID=%d cpusetsize=%d cpuset=%p\n", - (int)thread, (int)cpusetsize, cpusetsize); + sinfo("thread ID=%d cpusetsize=%d cpuset=%p\n", + (int)thread, (int)cpusetsize, cpusetsize); DEBUGASSERT(thread > 0 && cpusetsize == sizeof(cpu_set_t) && cpuset != NULL); diff --git a/sched/pthread/pthread_setschedparam.c b/sched/pthread/pthread_setschedparam.c index fe7ee0cdb116d189c3aa1c5786dc79b3729f3cbe..3c04cfb0232029e86934f28c053c52f50c2c8413 100644 --- a/sched/pthread/pthread_setschedparam.c +++ b/sched/pthread/pthread_setschedparam.c @@ -103,7 +103,7 @@ int pthread_setschedparam(pthread_t thread, int policy, { int ret; - sdbg("thread ID=%d policy=%d param=0x%p\n", thread, policy, param); + sinfo("thread ID=%d policy=%d param=0x%p\n", thread, policy, param); /* Set the errno to some non-zero value (failsafe) */ diff --git a/sched/sched/Make.defs b/sched/sched/Make.defs index dff73fdba210c7b25fdcd64bd903a732ac0a1537..e690aeaa83a1c7e4b4372a68d5409443003a50b5 100644 --- a/sched/sched/Make.defs +++ b/sched/sched/Make.defs @@ -42,7 +42,8 @@ CSRCS += sched_getsockets.c sched_getstreams.c CSRCS += sched_setparam.c sched_setpriority.c sched_getparam.c CSRCS += sched_setscheduler.c sched_getscheduler.c CSRCS += sched_yield.c sched_rrgetinterval.c sched_foreach.c -CSRCS += sched_lock.c sched_unlock.c sched_lockcount.c sched_self.c +CSRCS += sched_lock.c sched_unlock.c sched_lockcount.c +CSRCS += sched_idletask.c sched_self.c ifeq ($(CONFIG_PRIORITY_INHERITANCE),y) CSRCS += sched_reprioritize.c diff --git a/sched/sched/sched_idletask.c b/sched/sched/sched_idletask.c new file mode 100644 index 0000000000000000000000000000000000000000..9885aca1a7dfe13bed5e73c5ac8255fcf1bbca84 --- /dev/null +++ b/sched/sched/sched_idletask.c @@ -0,0 +1,95 @@ +/**************************************************************************** + * sched/sched/sched_idletask.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 "sched/sched.h" + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: sched_idletask + * + * Description: + * Check if the caller is an IDLE thread. For most implementations of + * the SYSLOG output semaphore locking is required for mutual exclusion. + * The idle threads are unable to lock semaphores because they cannot + * want. So IDLE thread output is a special case and is treated much as + * we treat debug output from an interrupt handler. + * + * Input Parameters: + * None + * + * Returned Value: + * true if the calling task is and IDLE thread. + * + ****************************************************************************/ + +bool sched_idletask(void) +{ + FAR struct tcb_s *rtcb = this_task(); + + /* If called early in the initialization sequence, the tasks lists may not + * have been initialized and, in that case, rtcb may be NULL. + */ + + DEBUGASSERT(rtcb != NULL || g_os_initstate < OSINIT_TASKLISTS); + if (rtcb != NULL) + { + /* The IDLE task TCB is distinguishable by a few things: + * + * (1) It always lies at the end of the task list, + * (2) It always has priority zero, and + * (3) It should have the TCB_FLAG_CPU_LOCKED flag set. + */ + + return (rtcb->flink == NULL); + } + + /* We must be on the IDLE thread if we are early in initialization */ + + return true; +} diff --git a/sched/sched/sched_sporadic.c b/sched/sched/sched_sporadic.c index d31837d3f1af7e8f8d9f6288e4a5ba9349b94bae..086e27d44f69013c5a27ea58bc98112c08ce52fd 100644 --- a/sched/sched/sched_sporadic.c +++ b/sched/sched/sched_sporadic.c @@ -150,7 +150,7 @@ static int sporadic_set_lowpriority(FAR struct tcb_s *tcb) if (ret < 0) { int errcode = get_errno(); - slldbg("ERROR: sched_reprioritize failed: %d\n", errcode); + serr("ERROR: sched_reprioritize failed: %d\n", errcode); return -errcode; } @@ -218,7 +218,7 @@ static int sporadic_set_hipriority(FAR struct tcb_s *tcb) if (ret < 0) { int errcode = get_errno(); - slldbg("ERROR: sched_reprioritize failed: %d\n", errcode); + serr("ERROR: sched_reprioritize failed: %d\n", errcode); return -errcode; } @@ -771,7 +771,7 @@ int sched_sporadic_initialize(FAR struct tcb_s *tcb) sporadic = (FAR struct sporadic_s *)kmm_zalloc(sizeof(struct sporadic_s)); if (sporadic == NULL) { - slldbg("ERROR: Failed to allocate sporadic data structure\n"); + serr("ERROR: Failed to allocate sporadic data structure\n"); return -ENOMEM; } @@ -1078,8 +1078,8 @@ int sched_sporadic_resume(FAR struct tcb_s *tcb) * failure from the standpoint of higher level logic. */ - slldbg("Failed to allocate timer, nrepls=%d\n", - sporadic->nrepls); + serr("ERROR: Failed to allocate timer, nrepls=%d\n", + sporadic->nrepls); } } } diff --git a/sched/sched/sched_timerexpiration.c b/sched/sched/sched_timerexpiration.c index ee340996870ba42e1ba0c2b2250605ffc266be6f..a0ebcff8c9ce21d8b1342c19f7d76cd51c1c73cb 100644 --- a/sched/sched/sched_timerexpiration.c +++ b/sched/sched/sched_timerexpiration.c @@ -362,7 +362,7 @@ static void sched_timer_start(unsigned int ticks) if (ret < 0) { - slldbg("ERROR: up_timer_start/up_alarm_start failed: %d\n"); + serr("ERROR: up_timer_start/up_alarm_start failed: %d\n"); UNUSED(ret); } } diff --git a/sched/sched/sched_waitid.c b/sched/sched/sched_waitid.c index c6fd8d4501c384201692cd7b50bff2d644cd5c67..003f8b597f90766fddcfbc27708e551bddde9ef8 100644 --- a/sched/sched/sched_waitid.c +++ b/sched/sched/sched_waitid.c @@ -161,7 +161,7 @@ int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options) bool retains; #endif sigset_t set; - int err; + int errcode; int ret; /* MISSING LOGIC: If WNOHANG is provided in the options, then this function @@ -175,7 +175,7 @@ int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options) * distinguish any other events. */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (options != WEXITED) { set_errno(ENOSYS); @@ -205,7 +205,7 @@ int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options) { /* There are no children */ - err = ECHILD; + errcode = ECHILD; goto errout_with_errno; } else if (idtype == P_PID) @@ -219,7 +219,7 @@ int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options) if (!ctcb || ctcb->ppid != rtcb->pid) #endif { - err = ECHILD; + errcode = ECHILD; goto errout_with_errno; } @@ -233,7 +233,7 @@ int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options) { /* This specific pid is not a child */ - err = ECHILD; + errcode = ECHILD; goto errout_with_errno; } } @@ -243,7 +243,7 @@ int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options) { /* There are no children */ - err = ECHILD; + errcode = ECHILD; goto errout_with_errno; } else if (idtype == P_PID) @@ -257,7 +257,7 @@ int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options) if (!ctcb || ctcb->ppid != rtcb->pid) #endif { - err = ECHILD; + errcode = ECHILD; goto errout_with_errno; } } @@ -327,7 +327,7 @@ int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options) * to reported ECHILD than bogus status. */ - err = ECHILD; + errcode = ECHILD; goto errout_with_errno; } } @@ -346,7 +346,7 @@ int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options) * Let's return ECHILD.. that is at least informative. */ - err = ECHILD; + errcode = ECHILD; goto errout_with_errno; } #endif @@ -400,7 +400,7 @@ int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options) return OK; errout_with_errno: - set_errno(err); + set_errno(errcode); errout: sched_unlock(); return ERROR; diff --git a/sched/sched/sched_waitpid.c b/sched/sched/sched_waitpid.c index 4a669958c7ca2061e62aa54580bb4b390d88f645..0e3902342b13d142d79d0385e55d0d4064d2b1c6 100644 --- a/sched/sched/sched_waitpid.c +++ b/sched/sched/sched_waitpid.c @@ -180,14 +180,14 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) FAR struct tcb_s *ctcb; FAR struct task_group_s *group; bool mystat = false; - int err; + int errcode; int ret; DEBUGASSERT(stat_loc); /* None of the options are supported */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (options != 0) { set_errno(ENOSYS); @@ -204,7 +204,7 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) ctcb = sched_gettcb(pid); if (!ctcb) { - err = ECHILD; + errcode = ECHILD; goto errout_with_errno; } @@ -272,7 +272,7 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) return pid; errout_with_errno: - set_errno(err); + set_errno(errcode); errout: sched_unlock(); return ERROR; @@ -302,14 +302,14 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) #endif FAR struct siginfo info; sigset_t set; - int err; + int errcode; int ret; DEBUGASSERT(stat_loc); /* None of the options are supported */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (options != 0) { set_errno(ENOSYS); @@ -337,7 +337,7 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) if (rtcb->group->tg_children == NULL && retains) { - err = ECHILD; + errcode = ECHILD; goto errout_with_errno; } else if (pid != (pid_t)-1) @@ -351,7 +351,7 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) if (!ctcb || ctcb->ppid != rtcb->pid) #endif { - err = ECHILD; + errcode = ECHILD; goto errout_with_errno; } @@ -363,7 +363,7 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) if (group_findchild(rtcb->group, pid) == NULL) { - err = ECHILD; + errcode = ECHILD; goto errout_with_errno; } } @@ -375,7 +375,7 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) { /* There are no children */ - err = ECHILD; + errcode = ECHILD; goto errout_with_errno; } else if (pid != (pid_t)-1) @@ -389,7 +389,7 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) if (!ctcb || ctcb->ppid != rtcb->pid) #endif { - err = ECHILD; + errcode = ECHILD; goto errout_with_errno; } } @@ -472,7 +472,7 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) * to reported ECHILD than bogus status. */ - err = ECHILD; + errcode = ECHILD; goto errout_with_errno; } } @@ -493,7 +493,7 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) * Let's return ECHILD.. that is at least informative. */ - err = ECHILD; + errcode = ECHILD; goto errout_with_errno; } @@ -526,7 +526,7 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) return (int)pid; errout_with_errno: - set_errno(err); + set_errno(errcode); errout_with_lock: sched_unlock(); diff --git a/sched/semaphore/sem_holder.c b/sched/semaphore/sem_holder.c index 854747cb01205b61f16d70d6d15001bdba8da9bd..f56eb1bc8d6db901c7265ff834891ad452bd9b6f 100644 --- a/sched/semaphore/sem_holder.c +++ b/sched/semaphore/sem_holder.c @@ -116,7 +116,7 @@ static inline FAR struct semholder_s *sem_allocholder(sem_t *sem) #endif else { - sdbg("Insufficient pre-allocated holders\n"); + serr("ERROR: Insufficient pre-allocated holders\n"); pholder = NULL; } @@ -283,7 +283,7 @@ static int sem_boostholderprio(FAR struct semholder_s *pholder, if (!sched_verifytcb(htcb)) { - sdbg("TCB 0x%08x is a stale handle, counts lost\n", htcb); + serr("ERROR: TCB 0x%08x is a stale handle, counts lost\n", htcb); sem_freeholder(sem, pholder); } @@ -321,7 +321,7 @@ static int sem_boostholderprio(FAR struct semholder_s *pholder, } else { - sdbg("CONFIG_SEM_NNESTPRIO exceeded\n"); + serr("ERROR: CONFIG_SEM_NNESTPRIO exceeded\n"); } } @@ -372,7 +372,7 @@ static int sem_boostholderprio(FAR struct semholder_s *pholder, * Name: sem_verifyholder ****************************************************************************/ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_ASSERTIONS static int sem_verifyholder(FAR struct semholder_s *pholder, FAR sem_t *sem, FAR void *arg) { @@ -397,15 +397,15 @@ static int sem_verifyholder(FAR struct semholder_s *pholder, FAR sem_t *sem, * Name: sem_dumpholder ****************************************************************************/ -#if defined(CONFIG_DEBUG) && defined(CONFIG_SEM_PHDEBUG) +#if defined(CONFIG_DEBUG_INFO) && defined(CONFIG_SEM_PHDEBUG) static int sem_dumpholder(FAR struct semholder_s *pholder, FAR sem_t *sem, FAR void *arg) { #if CONFIG_SEM_PREALLOCHOLDERS > 0 - dbg(" %08x: %08x %08x %04x\n", + _info(" %08x: %08x %08x %04x\n", pholder, pholder->flink, pholder->htcb, pholder->counts); #else - dbg(" %08x: %08x %04x\n", pholder, pholder->htcb, pholder->counts); + _info(" %08x: %08x %04x\n", pholder, pholder->htcb, pholder->counts); #endif return 0; } @@ -434,7 +434,7 @@ static int sem_restoreholderprio(FAR struct semholder_s *pholder, if (!sched_verifytcb(htcb)) { - sdbg("TCB 0x%08x is a stale handle, counts lost\n", htcb); + serr("ERROR: TCB 0x%08x is a stale handle, counts lost\n", htcb); sem_freeholder(sem, pholder); } @@ -648,7 +648,7 @@ static inline void sem_restorebaseprio_irq(FAR struct tcb_s *stcb, * should be at their base priority. */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_ASSERTIONS else { (void)sem_foreachholder(sem, sem_verifyholder, NULL); @@ -723,7 +723,7 @@ static inline void sem_restorebaseprio_task(FAR struct tcb_s *stcb, * should be at their base priority. */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_ASSERTIONS else { (void)sem_foreachholder(sem, sem_verifyholder, NULL); @@ -819,13 +819,13 @@ void sem_destroyholder(FAR sem_t *sem) #if CONFIG_SEM_PREALLOCHOLDERS > 0 if (sem->hhead) { - sdbg("Semaphore destroyed with holders\n"); + serr("ERROR: Semaphore destroyed with holders\n"); (void)sem_foreachholder(sem, sem_recoverholders, NULL); } #else if (sem->holder.htcb) { - sdbg("Semaphore destroyed with holder\n"); + serr("ERROR: Semaphore destroyed with holder\n"); } sem->holder.htcb = NULL; @@ -1036,10 +1036,12 @@ void sem_canceled(FAR struct tcb_s *stcb, FAR sem_t *sem) * ****************************************************************************/ -#if defined(CONFIG_DEBUG) && defined(CONFIG_SEM_PHDEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_SEM_PHDEBUG) void sem_enumholders(FAR sem_t *sem) { +#ifdef CONFIG_DEBUG_INFO (void)sem_foreachholder(sem, sem_dumpholder, NULL); +#endif } #endif @@ -1060,7 +1062,7 @@ void sem_enumholders(FAR sem_t *sem) * ****************************************************************************/ -#if defined(CONFIG_DEBUG) && defined(CONFIG_SEM_PHDEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_SEM_PHDEBUG) int sem_nfreeholders(void) { #if CONFIG_SEM_PREALLOCHOLDERS > 0 diff --git a/sched/semaphore/sem_timedwait.c b/sched/semaphore/sem_timedwait.c index f006268c5cffc48f092cd30cf96079ddc40f907d..81e7a79d50615a6c3806518ea139117a635deb48 100644 --- a/sched/semaphore/sem_timedwait.c +++ b/sched/semaphore/sem_timedwait.c @@ -107,7 +107,7 @@ int sem_timedwait(FAR sem_t *sem, FAR const struct timespec *abstime) * errno appropriately. */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES if (!abstime || !sem) { errcode = EINVAL; diff --git a/sched/signal/sig_deliver.c b/sched/signal/sig_deliver.c index 1f9c378b8a640dec0056b22e3a60b68c6b9d59e5..7f676a14a130b9771d81cd38a489f2e3b6035182 100644 --- a/sched/signal/sig_deliver.c +++ b/sched/signal/sig_deliver.c @@ -86,7 +86,7 @@ void sig_deliver(FAR struct tcb_s *stcb) for (sigq = (FAR sigq_t *)stcb->sigpendactionq.head; (sigq); sigq = next) { next = sigq->flink; - sdbg("Sending signal sigq=0x%x\n", sigq); + sinfo("Sending signal sigq=0x%x\n", sigq); /* Remove the signal structure from the sigpendactionq and place it * in the sigpostedq. NOTE: Since signals are processed one at a diff --git a/sched/signal/sig_dispatch.c b/sched/signal/sig_dispatch.c index 107982c59baef03c1570a02c31dab37ccf34429a..31ce56d9ebb9b41fafaec56cb4a76bf7474ea666 100644 --- a/sched/signal/sig_dispatch.c +++ b/sched/signal/sig_dispatch.c @@ -301,9 +301,9 @@ int sig_tcbdispatch(FAR struct tcb_s *stcb, siginfo_t *info) irqstate_t flags; int ret = OK; - sdbg("TCB=0x%08x signo=%d code=%d value=%d mask=%08x\n", - stcb, info->si_signo, info->si_code, - info->si_value.sival_int, stcb->sigprocmask); + sinfo("TCB=0x%08x signo=%d code=%d value=%d mask=%08x\n", + stcb, info->si_signo, info->si_code, + info->si_value.sival_int, stcb->sigprocmask); DEBUGASSERT(stcb != NULL && info != NULL); diff --git a/sched/signal/sig_mqnotempty.c b/sched/signal/sig_mqnotempty.c index 44b05b7aff70c8b413d7d0665c7f3ce13827d100..b183514c1aa025b793715f3e04025542ff4805b4 100644 --- a/sched/signal/sig_mqnotempty.c +++ b/sched/signal/sig_mqnotempty.c @@ -76,9 +76,9 @@ int sig_mqnotempty(int pid, int signo, void *sival_ptr) int ret; #ifdef CONFIG_CAN_PASS_STRUCTS - sdbg("pid=%p signo=%d value=%d\n", pid, signo, value.sival_int); + sinfo("pid=%p signo=%d value=%d\n", pid, signo, value.sival_int); #else - sdbg("pid=%p signo=%d sival_ptr=%p\n", pid, signo, sival_ptr); + sinfo("pid=%p signo=%d sival_ptr=%p\n", pid, signo, sival_ptr); #endif /* Verify that we can perform the signalling operation */ diff --git a/sched/signal/sig_nanosleep.c b/sched/signal/sig_nanosleep.c index 9ffbcb52c764161dc6c378b8b17144949b90d75b..0ac8e7fadb70be37a561be07a7f54d8dc61e0420 100644 --- a/sched/signal/sig_nanosleep.c +++ b/sched/signal/sig_nanosleep.c @@ -108,7 +108,7 @@ int nanosleep(FAR const struct timespec *rqtp, FAR struct timespec *rmtp) sigset_t set; struct siginfo value; int errval; -#ifdef CONFIG_DEBUG /* Warning avoidance */ +#ifdef CONFIG_DEBUG_ASSERTIONS /* Warning avoidance */ int ret; #endif @@ -135,7 +135,7 @@ int nanosleep(FAR const struct timespec *rqtp, FAR struct timespec *rmtp) /* nanosleep is a simple application of sigtimedwait. */ -#ifdef CONFIG_DEBUG /* Warning avoidance */ +#ifdef CONFIG_DEBUG_ASSERTIONS /* Warning avoidance */ ret = sigtimedwait(&set, &value, rqtp); #else (void)sigtimedwait(&set, &value, rqtp); diff --git a/sched/signal/sig_queue.c b/sched/signal/sig_queue.c index 3daa59c155e3f2b67820a6ece9a9e0afa04d24f8..6662030b34fbddec6881287a54a942cb41e362ec 100644 --- a/sched/signal/sig_queue.c +++ b/sched/signal/sig_queue.c @@ -98,9 +98,9 @@ int sigqueue(int pid, int signo, void *sival_ptr) int ret; #ifdef CONFIG_CAN_PASS_STRUCTS - sdbg("pid=0x%08x signo=%d value=%d\n", pid, signo, value.sival_int); + sinfo("pid=0x%08x signo=%d value=%d\n", pid, signo, value.sival_int); #else - sdbg("pid=0x%08x signo=%d value=%p\n", pid, signo, sival_ptr); + sinfo("pid=0x%08x signo=%d value=%p\n", pid, signo, sival_ptr); #endif /* Sanity checks */ diff --git a/sched/task/task_create.c b/sched/task/task_create.c index c8dc768d5abc4bf7cda5f5614e5e75bb686ce3e9..520dd921fb16a077b93b88e3ed5795cabc0ba2c0 100644 --- a/sched/task/task_create.c +++ b/sched/task/task_create.c @@ -98,7 +98,7 @@ static int thread_create(FAR const char *name, uint8_t ttype, int priority, tcb = (FAR struct task_tcb_s *)kmm_zalloc(sizeof(struct task_tcb_s)); if (!tcb) { - sdbg("ERROR: Failed to allocate TCB\n"); + serr("ERROR: Failed to allocate TCB\n"); errcode = ENOMEM; goto errout; } diff --git a/sched/task/task_execv.c b/sched/task/task_execv.c index c4457df537f26ff314c95e74d543fc535fb1d8f8..b6fa85c3e3e86f7d668dc316f92155819869ea33 100644 --- a/sched/task/task_execv.c +++ b/sched/task/task_execv.c @@ -134,7 +134,7 @@ int execv(FAR const char *path, FAR char * const argv[]) ret = exec(path, (FAR char * const *)argv, symtab, nsymbols); if (ret < 0) { - sdbg("exec failed: %d\n", errno); + serr("ERROR: exec failed: %d\n", errno); return ERROR; } diff --git a/sched/task/task_posixspawn.c b/sched/task/task_posixspawn.c index 17172086fc19c512ecee64cfc64fa57121ac0bd6..a185dd8ae170cfe0de785194af867aff2b52c6f3 100644 --- a/sched/task/task_posixspawn.c +++ b/sched/task/task_posixspawn.c @@ -135,7 +135,7 @@ static int posix_spawn_exec(FAR pid_t *pidp, FAR const char *path, if (pid < 0) { ret = get_errno(); - sdbg("ERROR: exec failed: %d\n", ret); + serr("ERROR: exec failed: %d\n", ret); goto errout; } @@ -224,7 +224,7 @@ static int posix_spawn_proxy(int argc, FAR char *argv[]) int tmp = task_reparent(0, *g_spawn_parms.pid); if (tmp < 0) { - sdbg("ERROR: task_reparent() failed: %d\n", tmp); + serr("ERROR: task_reparent() failed: %d\n", tmp); } } #endif @@ -359,7 +359,7 @@ int posix_spawn(FAR pid_t *pid, FAR const char *path, DEBUGASSERT(path); - svdbg("pid=%p path=%s file_actions=%p attr=%p argv=%p\n", + sinfo("pid=%p path=%s file_actions=%p attr=%p argv=%p\n", pid, path, file_actions, attr, argv); /* If there are no file actions to be performed and there is no change to @@ -407,7 +407,7 @@ int posix_spawn(FAR pid_t *pid, FAR const char *path, { int errcode = get_errno(); - sdbg("ERROR: sched_getparam failed: %d\n", errcode); + serr("ERROR: sched_getparam failed: %d\n", errcode); spawn_semgive(&g_spawn_parmsem); return errcode; } @@ -433,7 +433,7 @@ int posix_spawn(FAR pid_t *pid, FAR const char *path, if (proxy < 0) { ret = get_errno(); - sdbg("ERROR: Failed to start posix_spawn_proxy: %d\n", ret); + serr("ERROR: Failed to start posix_spawn_proxy: %d\n", ret); goto errout_with_lock; } @@ -444,7 +444,7 @@ int posix_spawn(FAR pid_t *pid, FAR const char *path, ret = waitpid(proxy, &status, 0); if (ret < 0) { - sdbg("ERROR: waitpid() failed: %d\n", errno); + serr("ERROR: waitpid() failed: %d\n", errno); goto errout_with_lock; } #else diff --git a/sched/task/task_prctl.c b/sched/task/task_prctl.c index 1908872536dbcfca5cc7ea5252f8b2ea8038a181..5c74ea09f0a18d81ed1b50ec097c9903e5ac0c0d 100644 --- a/sched/task/task_prctl.c +++ b/sched/task/task_prctl.c @@ -77,7 +77,7 @@ int prctl(int option, ...) { va_list ap; - int err; + int errcode; va_start(ap, option); switch (option) @@ -111,8 +111,8 @@ int prctl(int option, ...) if (!tcb) { - sdbg("Pid does not correspond to a task: %d\n", pid); - err = ESRCH; + serr("ERROR: Pid does not correspond to a task: %d\n", pid); + errcode = ESRCH; goto errout; } @@ -120,8 +120,8 @@ int prctl(int option, ...) if (!name) { - sdbg("No name provide\n"); - err = EFAULT; + serr("ERROR: No name provide\n"); + errcode = EFAULT; goto errout; } @@ -144,14 +144,14 @@ int prctl(int option, ...) } break; #else - sdbg("Option not enabled: %d\n", option); - err = ENOSYS; + serr("ERROR: Option not enabled: %d\n", option); + errcode = ENOSYS; goto errout; #endif default: - sdbg("Unrecognized option: %d\n", option); - err = EINVAL; + serr("ERROR: Unrecognized option: %d\n", option); + errcode = EINVAL; goto errout; } @@ -166,6 +166,6 @@ int prctl(int option, ...) errout: va_end(ap); - set_errno(err); + set_errno(errcode); return ERROR; } diff --git a/sched/task/task_restart.c b/sched/task/task_restart.c index 9090d789cacbe8e52ff04a668faeb00042c64a1d..5f3b76958f8f67d11d6081ca2cdd297f01a62d11 100644 --- a/sched/task/task_restart.c +++ b/sched/task/task_restart.c @@ -83,7 +83,7 @@ int task_restart(pid_t pid) FAR struct task_tcb_s *tcb; FAR dq_queue_t *tasklist; irqstate_t flags; - int err; + int errcode; int status; /* Make sure this task does not become ready-to-run while we are futzing @@ -99,7 +99,7 @@ int task_restart(pid_t pid) { /* Not implemented */ - err = ENOSYS; + errcode = ENOSYS; goto errout_with_lock; } @@ -115,7 +115,7 @@ int task_restart(pid_t pid) { /* There is no TCB with this pid or, if there is, it is not a task. */ - err = ESRCH; + errcode = ESRCH; goto errout_with_lock; } @@ -133,7 +133,7 @@ int task_restart(pid_t pid) { /* Not implemented */ - err = ENOSYS; + errcode = ENOSYS; goto errout_with_lock; } #endif /* CONFIG_SMP */ @@ -197,7 +197,7 @@ int task_restart(pid_t pid) if (status != OK) { (void)task_delete(pid); - err = -status; + errcode = -status; goto errout_with_lock; } @@ -205,7 +205,7 @@ int task_restart(pid_t pid) return OK; errout_with_lock: - set_errno(err); + set_errno(errcode); sched_unlock(); return ERROR; } diff --git a/sched/task/task_spawn.c b/sched/task/task_spawn.c index ef686e03ade36d1a4a1cd10e4d38095fa341f955..b2ae31c1f3a2c642c5309155056a67a88f21bc94 100644 --- a/sched/task/task_spawn.c +++ b/sched/task/task_spawn.c @@ -155,7 +155,7 @@ static int task_spawn_exec(FAR pid_t *pidp, FAR const char *name, if (pid < 0) { ret = get_errno(); - sdbg("ERROR: task_create failed: %d\n", ret); + serr("ERROR: task_create failed: %d\n", ret); goto errout; } @@ -252,7 +252,7 @@ static int task_spawn_proxy(int argc, FAR char *argv[]) int tmp = task_reparent(0, *g_spawn_parms.pid); if (tmp < 0) { - sdbg("ERROR: task_reparent() failed: %d\n", tmp); + serr("ERROR: task_reparent() failed: %d\n", tmp); } } #endif @@ -350,7 +350,7 @@ int task_spawn(FAR pid_t *pid, FAR const char *name, main_t entry, #endif int ret; - svdbg("pid=%p name=%s entry=%p file_actions=%p attr=%p argv=%p\n", + sinfo("pid=%p name=%s entry=%p file_actions=%p attr=%p argv=%p\n", pid, name, entry, file_actions, attr, argv); /* If there are no file actions to be performed and there is no change to @@ -399,7 +399,7 @@ int task_spawn(FAR pid_t *pid, FAR const char *name, main_t entry, { int errcode = get_errno(); - sdbg("ERROR: sched_getparam failed: %d\n", errcode); + serr("ERROR: sched_getparam failed: %d\n", errcode); spawn_semgive(&g_spawn_parmsem); return errcode; } @@ -425,7 +425,7 @@ int task_spawn(FAR pid_t *pid, FAR const char *name, main_t entry, if (proxy < 0) { ret = get_errno(); - sdbg("ERROR: Failed to start task_spawn_proxy: %d\n", ret); + serr("ERROR: Failed to start task_spawn_proxy: %d\n", ret); goto errout_with_lock; } @@ -436,7 +436,7 @@ int task_spawn(FAR pid_t *pid, FAR const char *name, main_t entry, ret = waitpid(proxy, &status, 0); if (ret < 0) { - sdbg("ERROR: waitpid() failed: %d\n", errno); + serr("ERROR: waitpid() failed: %d\n", errno); goto errout_with_lock; } #else diff --git a/sched/task/task_spawnparms.c b/sched/task/task_spawnparms.c index df0946c2fb69a8ab6183770357d09f881c7ebe48..bb249e584abb926d51c77a3440beb402bc02edde 100644 --- a/sched/task/task_spawnparms.c +++ b/sched/task/task_spawnparms.c @@ -83,7 +83,7 @@ static inline int spawn_close(FAR struct spawn_close_file_action_s *action) { /* The return value from close() is ignored */ - svdbg("Closing fd=%d\n", action->fd); + sinfo("Closing fd=%d\n", action->fd); (void)close(action->fd); return OK; @@ -95,14 +95,14 @@ static inline int spawn_dup2(FAR struct spawn_dup2_file_action_s *action) /* Perform the dup */ - svdbg("Dup'ing %d->%d\n", action->fd1, action->fd2); + sinfo("Dup'ing %d->%d\n", action->fd1, action->fd2); ret = dup2(action->fd1, action->fd2); if (ret < 0) { int errcode = get_errno(); - sdbg("ERROR: dup2 failed: %d\n", errcode); + serr("ERROR: dup2 failed: %d\n", errcode); return -errcode; } @@ -116,14 +116,14 @@ static inline int spawn_open(FAR struct spawn_open_file_action_s *action) /* Open the file */ - svdbg("Open'ing path=%s oflags=%04x mode=%04x\n", + sinfo("Open'ing path=%s oflags=%04x mode=%04x\n", action->path, action->oflags, action->mode); fd = open(action->path, action->oflags, action->mode); if (fd < 0) { ret = get_errno(); - sdbg("ERROR: open failed: %d\n", ret); + serr("ERROR: open failed: %d\n", ret); } /* Does the return file descriptor happen to match the required file @@ -134,16 +134,16 @@ static inline int spawn_open(FAR struct spawn_open_file_action_s *action) { /* No.. dup2 to get the correct file number */ - svdbg("Dup'ing %d->%d\n", fd, action->fd); + sinfo("Dup'ing %d->%d\n", fd, action->fd); ret = dup2(fd, action->fd); if (ret < 0) { ret = get_errno(); - sdbg("ERROR: dup2 failed: %d\n", ret); + serr("ERROR: dup2 failed: %d\n", ret); } - svdbg("Closing fd=%d\n", fd); + sinfo("Closing fd=%d\n", fd); close(fd); } @@ -246,7 +246,7 @@ int spawn_execattrs(pid_t pid, FAR const posix_spawnattr_t *attr) if ((attr->flags & POSIX_SPAWN_SETSCHEDULER) == 0) { - svdbg("Setting priority=%d for pid=%d\n", + sinfo("Setting priority=%d for pid=%d\n", param.sched_priority, pid); (void)sched_setparam(pid, ¶m); @@ -269,7 +269,7 @@ int spawn_execattrs(pid_t pid, FAR const posix_spawnattr_t *attr) if ((attr->flags & POSIX_SPAWN_SETSCHEDULER) != 0) { - svdbg("Setting policy=%d priority=%d for pid=%d\n", + sinfo("Setting policy=%d priority=%d for pid=%d\n", attr->policy, param.sched_priority, pid); #ifdef CONFIG_SCHED_SPORADIC @@ -347,7 +347,7 @@ int spawn_proxyattrs(FAR const posix_spawnattr_t *attr, case SPAWN_FILE_ACTION_NONE: default: - sdbg("ERROR: Unknown action: %d\n", entry->action); + serr("ERROR: Unknown action: %d\n", entry->action); ret = EINVAL; break; } diff --git a/sched/task/task_vfork.c b/sched/task/task_vfork.c index b2fef61d3675febe46a480382d9fdf79e0b9432c..a427d7c0001b9de68c3cc1fea8dcb7511d0f8e15 100644 --- a/sched/task/task_vfork.c +++ b/sched/task/task_vfork.c @@ -268,7 +268,7 @@ FAR struct task_tcb_s *task_vforksetup(start_t retaddr) child = (FAR struct task_tcb_s *)kmm_zalloc(sizeof(struct task_tcb_s)); if (!child) { - sdbg("ERROR: Failed to allocate TCB\n"); + serr("ERROR: Failed to allocate TCB\n"); set_errno(ENOMEM); return NULL; } @@ -303,14 +303,14 @@ FAR struct task_tcb_s *task_vforksetup(start_t retaddr) /* Initialize the task control block. This calls up_initial_state() */ - svdbg("Child priority=%d start=%p\n", priority, retaddr); + sinfo("Child priority=%d start=%p\n", priority, retaddr); ret = task_schedsetup(child, priority, retaddr, parent->entry.main, ttype); if (ret < OK) { goto errout_with_tcb; } - svdbg("parent=%p, returning child=%p\n", parent, child); + sinfo("parent=%p, returning child=%p\n", parent, child); return child; errout_with_tcb: @@ -369,7 +369,7 @@ pid_t task_vforkstart(FAR struct task_tcb_s *child) int rc; int ret; - svdbg("Starting Child TCB=%p, parent=%p\n", child, this_task()); + sinfo("Starting Child TCB=%p, parent=%p\n", child, this_task()); DEBUGASSERT(child); /* Duplicate the original argument list in the forked child TCB */ @@ -430,11 +430,11 @@ pid_t task_vforkstart(FAR struct task_tcb_s *child) rc = 0; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES ret = waitpid(pid, &rc, 0); if (ret < 0) { - sdbg("ERROR: waitpid failed: %d\n", errno); + serr("ERROR: waitpid failed: %d\n", errno); } #else (void)waitpid(pid, &rc, 0); diff --git a/sched/wdog/wd_start.c b/sched/wdog/wd_start.c index 9e99d01277fb462f3258650f57d1b1663ae08575..898f80060fcdd3ffedb586ad2a38e4cb9187f137 100644 --- a/sched/wdog/wd_start.c +++ b/sched/wdog/wd_start.c @@ -260,7 +260,7 @@ int wd_start(WDOG_ID wdog, int32_t delay, wdentry_t wdentry, int argc, ...) { wdog->parm[i] = va_arg(ap, wdparm_t); } -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES for (; i < CONFIG_MAX_WDOGPARMS; i++) { wdog->parm[i] = 0; diff --git a/sched/wqueue/kwork_hpthread.c b/sched/wqueue/kwork_hpthread.c index ae3f518be56673ec37869221535b1bf857497a06..4ef84731eae38f746aa2fbad74ee1e5977131390 100644 --- a/sched/wqueue/kwork_hpthread.c +++ b/sched/wqueue/kwork_hpthread.c @@ -152,7 +152,7 @@ int work_hpstart(void) /* Start the high-priority, kernel mode worker thread */ - svdbg("Starting high-priority kernel worker thread\n"); + sinfo("Starting high-priority kernel worker thread\n"); pid = kernel_thread(HPWORKNAME, CONFIG_SCHED_HPWORKPRIORITY, CONFIG_SCHED_HPWORKSTACKSIZE, @@ -165,7 +165,7 @@ int work_hpstart(void) int errcode = errno; DEBUGASSERT(errcode > 0); - slldbg("kernel_thread failed: %d\n", errcode); + serr("ERROR: kernel_thread failed: %d\n", errcode); return -errcode; } diff --git a/sched/wqueue/kwork_lpthread.c b/sched/wqueue/kwork_lpthread.c index 2a47fbca481cc40f7566a6131c3149bf1a53959c..84078c2751820bbc2cdaa8d9a8a36df33efd7f3c 100644 --- a/sched/wqueue/kwork_lpthread.c +++ b/sched/wqueue/kwork_lpthread.c @@ -197,7 +197,7 @@ int work_lpstart(void) /* Start the low-priority, kernel mode worker thread(s) */ - svdbg("Starting low-priority kernel worker thread(s)\n"); + sinfo("Starting low-priority kernel worker thread(s)\n"); for (wndx = 0; wndx < CONFIG_SCHED_LPNTHREADS; wndx++) { @@ -212,7 +212,7 @@ int work_lpstart(void) int errcode = errno; DEBUGASSERT(errcode > 0); - slldbg("kernel_thread %d failed: %d\n", wndx, errcode); + serr("ERROR: kernel_thread %d failed: %d\n", wndx, errcode); sched_unlock(); return -errcode; } diff --git a/syscall/syscall.csv b/syscall/syscall.csv index a7d81215358f217cd8dbbbbd7219b6994bd78515..77b7ce750c4ea2de40b5cfff84e93cb63f337d81 100644 --- a/syscall/syscall.csv +++ b/syscall/syscall.csv @@ -159,6 +159,7 @@ "up_assert","assert.h","","void","FAR const uint8_t*","int" #"up_assert","assert.h","","void" "vfork","unistd.h","defined(CONFIG_ARCH_HAVE_VFORK)","pid_t" +"_vsyslog","nuttx/syslog/syslog.h","","int","int","FAR const IPTR char*","FAR va_list*" "wait","sys/wait.h","defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_SCHED_HAVE_PARENT)","pid_t","int*" "waitid","sys/wait.h","defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_SCHED_HAVE_PARENT)","int","idtype_t","id_t"," FAR siginfo_t *","int" "waitpid","sys/wait.h","defined(CONFIG_SCHED_WAITPID)","pid_t","pid_t","int*","int" diff --git a/syscall/syscall_lookup.h b/syscall/syscall_lookup.h index 8fb2f507b04fffef6bd9d031039f2de83e81a9ab..4cd1a3d676581fd7c0c6fa3b28c5c1a56b7b9a9d 100644 --- a/syscall/syscall_lookup.h +++ b/syscall/syscall_lookup.h @@ -163,6 +163,10 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert) SYSCALL_LOOKUP(timer_settime, 4, STUB_timer_settime) #endif +/* System logging */ + + SYSCALL_LOOKUP(_vsyslog, 3, STUB__vsyslog) + /* The following are defined if either file or socket descriptor are * enabled. */ diff --git a/syscall/syscall_stublookup.c b/syscall/syscall_stublookup.c index 63af75eb4095a89bf2a4750b5320dd9ca9bc2813..96862aa4062f5b7f25f0258edc6c6e665cf32776 100644 --- a/syscall/syscall_stublookup.c +++ b/syscall/syscall_stublookup.c @@ -165,6 +165,11 @@ uintptr_t STUB_timer_gettime(int nbr, uintptr_t parm1, uintptr_t parm2); uintptr_t STUB_timer_settime(int nbr, uintptr_t parm1, uintptr_t parm2, uintptr_t parm3, uintptr_t parm4); +/* System logging */ + +uintptr_t STUB__vsyslog(int nbr, uintptr_t parm1, uintptr_t parm2, + uintptr_t parm3); + /* The following are defined if either file or socket descriptor are * enabled. */ diff --git a/tools/mkconfig.c b/tools/mkconfig.c index 710a0926e28d0b98c6d508be4ee137409fd15c4a..307e7381d5db0a709e81f50e7b4e584d04926acb 100644 --- a/tools/mkconfig.c +++ b/tools/mkconfig.c @@ -184,11 +184,6 @@ int main(int argc, char **argv, char **envp) printf("# define CONFIG_NFILE_STREAMS 0\n"); printf("#endif\n\n"); - printf("/* There must be at least one memory region. */\n\n"); - printf("#ifndef CONFIG_MM_REGIONS\n"); - printf("# define CONFIG_MM_REGIONS 1\n"); - printf("#endif\n\n"); - printf("/* If the end of RAM is not specified then it is assumed to be the beginning\n"); printf(" * of RAM plus the RAM size.\n"); printf(" */\n\n"); @@ -214,13 +209,6 @@ int main(int argc, char **argv, char **envp) printf("# define CONFIG_STDIO_BUFFER_SIZE 0\n"); printf("#endif\n\n"); - printf("/* If no standard C buffered I/O is not supported, then line-oriented buffering\n"); - printf(" * cannot be supported.\n"); - printf(" */\n\n"); - printf("#if CONFIG_STDIO_BUFFER_SIZE == 0\n"); - printf("# undef CONFIG_STDIO_LINEBUFFER\n"); - printf("#endif\n\n"); - printf("/* If the maximum message size is zero, then we assume that message queues\n"); printf(" * support should be disabled\n"); printf(" */\n\n"); @@ -232,19 +220,6 @@ int main(int argc, char **argv, char **envp) printf("# define CONFIG_DISABLE_MQUEUE 1\n"); printf("#endif\n\n"); - printf("/* If mountpoint support in not included, then no filesystem can be supported */\n\n"); - printf("#ifdef CONFIG_DISABLE_MOUNTPOINT\n"); - printf("# undef CONFIG_FS_BINFS\n"); - printf("# undef CONFIG_FS_FAT\n"); - printf("# undef CONFIG_FS_HOSTFS\n"); - printf("# undef CONFIG_NFS\n"); - printf("# undef CONFIG_FS_NXFFS\n"); - printf("# undef CONFIG_FS_PROCFS\n"); - printf("# undef CONFIG_FS_ROMFS\n"); - printf("# undef CONFIG_FS_SMARTFS\n"); - printf("# undef CONFIG_FS_TMPFS\n"); - printf("#endif\n\n"); - printf("/* There can be no network support with no socket descriptors */\n\n"); printf("#if CONFIG_NSOCKET_DESCRIPTORS <= 0\n"); printf("# undef CONFIG_NET\n"); @@ -253,59 +228,10 @@ int main(int argc, char **argv, char **envp) printf(" * socket descriptors\n"); printf(" */\n\n"); printf("#ifndef CONFIG_NET\n"); - printf("# undef CONFIG_NSOCKET_DESCRIPTORS\n"); + printf("# undef CONFIG_NSOCKET_DESCRIPTORS\n"); printf("# define CONFIG_NSOCKET_DESCRIPTORS 0\n"); printf("#endif\n\n"); - printf("/* Protocol support can only be provided on top of basic network support */\n\n"); - printf("#ifndef CONFIG_NET\n"); - printf("# undef CONFIG_NET_TCP\n"); - printf("# undef CONFIG_NET_UDP\n"); - printf("# undef CONFIG_NET_ICMP\n"); - printf("#endif\n\n"); - - printf("/* NFS client can only be provided on top of UDP network support */\n\n"); - printf("#if !defined(CONFIG_NET) || !defined(CONFIG_NET_UDP)\n"); - printf("# undef CONFIG_NFS\n"); - printf("#endif\n\n"); - - printf("/* Verbose debug and sub-system debug only make sense if debug is enabled */\n\n"); - printf("#ifndef CONFIG_DEBUG\n"); - printf("# undef CONFIG_DEBUG_VERBOSE\n"); - printf("# undef CONFIG_DEBUG_ANALOG\n"); - printf("# undef CONFIG_DEBUG_AUDIO\n"); - printf("# undef CONFIG_DEBUG_BINFMT\n"); - printf("# undef CONFIG_DEBUG_CRYPTO\n"); - printf("# undef CONFIG_DEBUG_CAN\n"); - printf("# undef CONFIG_DEBUG_DMA\n"); - printf("# undef CONFIG_DEBUG_FS\n"); - printf("# undef CONFIG_DEBUG_GPIO\n"); - printf("# undef CONFIG_DEBUG_GRAPHICS\n"); - printf("# undef CONFIG_DEBUG_HEAP\n"); - printf("# undef CONFIG_DEBUG_I2C\n"); - printf("# undef CONFIG_DEBUG_I2S\n"); - printf("# undef CONFIG_DEBUG_INPUT\n"); - printf("# undef CONFIG_DEBUG_IRQ\n"); - printf("# undef CONFIG_DEBUG_LCD\n"); - printf("# undef CONFIG_DEBUG_LEDS\n"); - printf("# undef CONFIG_DEBUG_LIB\n"); - printf("# undef CONFIG_DEBUG_MM\n"); - printf("# undef CONFIG_DEBUG_NET\n"); - printf("# undef CONFIG_DEBUG_PAGING\n"); - printf("# undef CONFIG_DEBUG_PWM\n"); - printf("# undef CONFIG_DEBUG_RTC\n"); - printf("# undef CONFIG_DEBUG_SCHED\n"); - printf("# undef CONFIG_DEBUG_SDIO\n"); - printf("# undef CONFIG_DEBUG_SENSORS\n"); - printf("# undef CONFIG_DEBUG_SHM\n"); - printf("# undef CONFIG_DEBUG_SPI\n"); - printf("# undef CONFIG_DEBUG_SYSCALL\n"); - printf("# undef CONFIG_DEBUG_TIMER\n"); - printf("# undef CONFIG_DEBUG_USB\n"); - printf("# undef CONFIG_DEBUG_WATCHDOG\n"); - printf("# undef CONFIG_DEBUG_WIRELESS\n"); - printf("#endif\n\n"); - printf("#endif /* __INCLUDE_NUTTX_CONFIG_H */\n"); fclose(stream); diff --git a/tools/pic32mx/mkpichex.c b/tools/pic32mx/mkpichex.c index 48cb02805f8fc973e239cc7be53b2b8bd9f9ea39..1562031bc855123849e2d18068c2d0fe8dc7ba54 100644 --- a/tools/pic32mx/mkpichex.c +++ b/tools/pic32mx/mkpichex.c @@ -239,7 +239,7 @@ int main(int argc, char **argv, char **envp) char *destfile; FILE *src; FILE *dest; - int err; + int errcode; if (argc != 2) { @@ -258,7 +258,7 @@ int main(int argc, char **argv, char **envp) if (!destfile) { fprintf(stderr, "getfilepath failed\n"); - err = 2; + errcode = 2; goto errout_with_srcfile; } @@ -266,7 +266,7 @@ int main(int argc, char **argv, char **envp) if (!src) { fprintf(stderr, "open %s failed: %s\n", srcfile, strerror(errno)); - err = 3; + errcode = 3; goto errout_with_destfile; } @@ -274,7 +274,7 @@ int main(int argc, char **argv, char **envp) if (!dest) { fprintf(stderr, "open %s failed: %s\n", destfile, strerror(errno)); - err = 3; + errcode = 3; goto errout_with_destfile; } @@ -285,7 +285,7 @@ int main(int argc, char **argv, char **envp) if (parse_line(&hexline)) { fprintf(stderr, "Failed to parse line\n"); - err = 1; + errcode = 1; goto errout_with_destfile; } @@ -325,5 +325,5 @@ errout_with_destfile: free(destfile); errout_with_srcfile: free(srcfile); - return err; + return errcode; } diff --git a/tools/refresh.sh b/tools/refresh.sh index a38eadaffd0b432b3c3ba31a19c6198ebb72f2e1..8e24fa0d90f14797941ced462c1b64b20db7a29b 100755 --- a/tools/refresh.sh +++ b/tools/refresh.sh @@ -32,7 +32,7 @@ # POSSIBILITY OF SUCH DAMAGE. # -USAGE="USAGE: $0 [--debug|--help] /" +USAGE="USAGE: $0 [options] /" ADVICE="Try '$0 --help' for more information" unset CONFIG @@ -51,7 +51,7 @@ while [ ! -z "$1" ]; do echo "" echo $USAGE echo "" - echo "Where:" + echo "Where [options] include:" echo " --debug" echo " Enable script debug" echo " --silent" diff --git a/tools/testbuild.sh b/tools/testbuild.sh index 9546c921447d0761af433a6772692cb8a498c780..31b0f9b4eae7e59f018fc7fda37233d584d73cc6 100755 --- a/tools/testbuild.sh +++ b/tools/testbuild.sh @@ -34,22 +34,28 @@ WD=$PWD nuttx=$WD/../nuttx +TOOLSDIR=$nuttx/tools +UNLINK=$TOOLSDIR/unlink.sh progname=$0 host=linux wenv=cygwin sizet=uint +APPSDIR=../apps +NXWDIR=../NxWidgets unset testfile function showusage { echo "" - echo "USAGE: $progname [-w|l] [-c|n] [-s] " + echo "USAGE: $progname [-w|l] [-c|n] [-s] [-a ] [-n ] " echo " $progname -h" echo "" echo "Where:" echo " -w|l selects Windows (w) or Linux (l). Default: Linux" echo " -c|n selects Windows native (n) or Cygwin (c). Default Cygwin" echo " -s Use C++ unsigned long size_t in new operator. Default unsigned int" + echo " -a provides the relative path to the apps/ directory. Default ../apps" + echo " -n provides the relative path to the NxWidgets/ directory. Default ../NxWidgets" echo " -h will show this help test and terminate" echo " selects the list of configurations to test. No default" echo "" @@ -78,6 +84,14 @@ while [ ! -z "$1" ]; do -s ) sizet=long ;; + -a ) + shift + APPSDIR="$1" + ;; + -n ) + shift + NXWDIR="$1" + ;; -h ) showusage ;; @@ -196,11 +210,45 @@ function configure { make olddefconfig 1>/dev/null 2>&1 } +# Build the NxWidgets libraries + +function nxbuild { + if [ -e $APPSDIR/external ]; then + $UNLINK $APPSDIR/external + fi + + unset nxconfig + if [ -d $NXWDIR ]; then + nxconfig=`grep CONFIG_NXWM=y $nuttx/.config` + fi + + if [ ! -z "$nxconfig" ]; then + echo " Building NxWidgets..." + echo "------------------------------------------------------------------------------------" + + cd $nuttx/$NXTOOLS || { echo "Failed to CD to $NXTOOLS"; exit 1; } + ./install.sh $nuttx/$APPSDIR nxwm 1>/dev/null + + make -C $nuttx/$APPSDIR/external TOPDIR=$nuttx APPDIR=$nuttx/$APPSDIR TOPDIR=$nuttx clean 1>/dev/null + + cd $nuttx || { echo "Failed to CD to $nuttx"; exit 1; } + make -i context 1>/dev/null + + cd $nuttx/$NXWIDGETSDIR || { echo "Failed to CD to $NXWIDGETSDIR"; exit 1; } + make -i TOPDIR=$nuttx clean 1>/dev/null + make -i TOPDIR=$nuttx 1>/dev/null + + cd $nuttx/$NXWMDIR || { echo "Failed to CD to $NXWMDIR"; exit 1; } + make -i TOPDIR=$nuttx clean 1>/dev/null + make -i TOPDIR=$nuttx 1>/dev/null + fi +} + # Perform the next build function build { cd $nuttx || { echo "ERROR: failed to CD to $nuttx"; exit 1; } - echo " Building..." + echo " Building NuttX..." echo "------------------------------------------------------------------------------------" make -i 1>/dev/null } @@ -211,12 +259,24 @@ function dotest { echo "------------------------------------------------------------------------------------" distclean configure + nxbuild build } # Perform the build test for each entry in the test list file -export APPSDIR=../apps +if [ ! -d $APPSDIR ]; then + export "ERROR: No directory found at $APPSDIR" + exit 1 +fi + +export APPSDIR + +if [ -d $NXWDIR ]; then + NXWIDGETSDIR=$NXWDIR/libnxwidgets + NXWMDIR=$NXWDIR/nxwm + NXTOOLS=$NXWDIR/tools +fi # Shouldn't have to do this